wp_insert_post_empty_content

wp_insert_post_empty_content

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('wp_insert_post_empty_content') is found 1 times:

  • /wp-includes/post.php line 4247
    	 *
    	 * @param bool  $maybe_empty Whether the post should be considered "empty".
    	 * @param array $postarr     Array of post data.
    	 */
    	if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
    		if ( $wp_error ) {
    			return new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.' ) );
    		} else {
    			return 0;
    		}
    	}
    

See this hook used in plugins: