📌  相关文章
📜  Définir un nombre maximum de mots sur les titres des publications WordPress - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:39.959000             🧑  作者: Mango

代码示例1
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');
?>