wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_insert_post_empty_content › Les Filtres WordPress

Depuis3.3.0
Dépréciéen/a
› apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr )
Paramètres: (2)
  • () maybe_empty Whether the post should be considered "empty".
    Requis: Oui
  • () postarr Array of post data.
    Requis: Oui
Défini(e) dans:
Codex:

Filters whether the post should be considered "empty".

The post is considered "empty" if both: 1. The post type supports the title, editor, and excerpt fields 2. The title, editor, and excerpt fields are all empty 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.




Source

if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {