Filters whether the post should be considered “empty”.
The post is considered "empty" if both:
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.
$maybe_emptybool
$postarrarray
if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_insert_post_empty_content