wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_{$post->post_type}_revisions_to_keep › WordPress Filter Hooks

Seit5.8.0
Veraltetn/v
apply_filters( "wp_{$post->post_type}_revisions_to_keep", $num, $post )
Parameter: (2)
  • (int) $num Number of revisions to store.
    Erforderlich: Ja
  • (WP_Post) $post Post object.
    Erforderlich: Ja
Definiert in:
Codex:

Filters the number of revisions to save for the given post by its post type.

Overrides both the value of WP_POST_REVISIONS and the {@see 'wp_revisions_to_keep'} filter.

The dynamic portion of the hook name, $post->post_type, refers to the post type slug.

Possible hook names include:

  • wp_post_revisions_to_keep
  • wp_page_revisions_to_keep




Quellcode

$num = apply_filters( "wp_{$post->post_type}_revisions_to_keep", $num, $post );