Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Définir un nombre maximum de mots sur les titres des publications WordPress

<?php
function maxWord($title){
global $post;
$title = $post->post_title;
if (str_word_count($title) >= 10 ) //set this to the maximum number of words
wp_die( __('Error: your post title is over the maximum word count.') );
}
add_action('publish_post', 'maxWord');
?>
Comment

Définir le nombre minimum de mots sur les publications WordPress

<?php
function minWord($content){
global $post;
$num = 900; //set this to the minimum number of words
$content = $post->post_content;
if (str_word_count($content) < $num) wp_die( __('Error: your post is below the minimum word count.') ); } add_action('publish_post', 'minWord');
?>
Comment

PREVIOUS NEXT
Code Example
Php :: docker commant 
Php :: global phpcs 
Php :: php string concat 
Php :: hardening PHP7 
Php :: php explode and typecast 
Php :: css en linea php 
Php :: download yii 1.1 
Php :: Get authors who has posts in category - WordPress 
Php :: many posts in the isset 
Php :: php array_diff vs array_diff_assoc 
Php :: joomla include jfactory 
Php :: beanstalk run laravel command 
Php :: php read textarea line by line 
Php :: check which php.ini file enabled from code 
Php :: laravel multiple status for a attribute in laravel migration 
Php :: laravel select option form add please select option 
Php :: fxcjahid 
Php :: Comment ajouter nofollow à un lien spécifique ou à tous les liens WordPress dans the_content 
Php :: how to make login and logout to blog with php without database or MySQL 
Php :: how to check request method in php 
Php :: echo define value 
Php :: Régler l’enregistrement automatique dans WordPress 
Php :: haseeb php code 
Php :: Change initial country + add top countiries on Caldera forms 
Php :: use varable on all site pages laravel 
Php :: the_fiel 
Php :: run drush command from php 
Php :: php send to message to mobile number using springedge 
Php :: Expected response code 250 but got code "530", with message "530 Must issue a STARTTLS command first. " 
Php :: convert string to int php 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =