Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Comment exiger une longueur minimale de commentaire dans WordPress

<?php
add_filter( 'preprocess_comment', 'minimal_comment_length' );
function minimal_comment_length( $commentdata ) {
     $minimalCommentLength = 20;
      if ( strlen( trim( $commentdata['comment_content'] ) ) &lt; $minimalCommentLength ){
       wp_die( 'All comments must be at least ' . $minimalCommentLength . ' characters long.' );
     }
     return $commentdata;
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: 200usd to php 
Php :: laravel create event listener 
Php :: phpmyadmin timedeconnexion : a placer tt en bas dans "config.inc.php" 
Php :: php generator for mysql 
Php :: Laravel You may determine if a template inheritance section has content using the @hasSection directive: 
Php :: image_lib codeigniter add _thumb 
Php :: how to remove payment link in invoice woocommerce 
Php :: deploy php composer with vercel.com 
Php :: PHP number_format — Format a number with grouped thousands 
Php :: When you click on the search button, it is moved to the page laravel 
Php :: Input sanitization to prevent XSS 
Php :: visual studio php dollar sign double click 
Php :: php mysql insert record if not exists in table 
Php :: validate unique or equal 
Php :: VerifyEmailController in Api 
Php :: fix-wordpress-limit-permalink 
Php :: laravel Add a static label/text above panel 
Php :: crc32 (PHP 4 = 4.0.1, PHP 5, PHP 7, PHP 8) crc32 — Calculates the crc32 polynomial of a string 
Php :: divi layout injector shortcode module in function php file 
Php :: php if class exists 
Php :: avoid grouping databases in phpmyadmin 
Php :: Assignment By Reference 
Php :: if ( $post_armi-have_posts() ) { while ($post_armi-have_posts() ) { $post_armi-the_post(); 
Php :: Separate A String Into Array Elements 
Php :: old codestar textarea field 
Php :: laravel get referer without host 
Php :: array length php for loop 
Php :: Wordpress srcset with ACF Image & lazy Load 
Php :: symfony translation variable in twig 
Php :: laravel list unique indexes 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =