apply_filters( 'wp_insert_post_empty_content', bool $maybe_empty , array $postarr )
Filters whether the post should be considered “empty”.
Description
The post is considered "empty" if both:
- The post type supports the title, editor, and excerpt fields
- The title, editor, and excerpt fields are all empty
Returning a truthy value to the filter will effectively short-circuit the new post being inserted, returning 0. If $wp_error is true, a WP_Error will be returned instead.
Parameters
- $maybe_empty
-
Whether the post should be considered "empty".
- $postarr
-
Array of post data.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
WP-3.3.0 | Introduced. |