Filters whether the post should be considered "empty".
Description
The post is considered "empty" if both: <ol> <li>The post type supports the title, editor, and excerpt fields</li> <li>The title, editor, and excerpt fields are all empty</li> </ol> Returning a truthy value from the filter will effectively short-circuit the new post being inserted and return 0. If $wp_error is true, a WP_Error will be returned instead.
4689*4690* @since 3.3.04691*4692* @param bool$maybe_empty Whether the post should be considered "empty".4693* @param array$postarrArray of post data.4694*/4695if(apply_filters('wp_insert_post_empty_content',$maybe_empty,$postarr)){4696if($wp_error){4697returnnewWP_Error('empty_content',__('Content, title, and excerpt are empty.'));4698}else{4699return0;4700}4701}
History
Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.