Choose which cookies we can use. You can change this at any time from “Cookie settings” in the footer. See our cookie policy for details.

Essential

Needed for the site to work, such as remembering your cookie choices. These can’t be switched off.

Always on
Skip to content
Developer reference

Post Type Switcher hooks

2 filters and actions, read from the plugin source. Add these in a theme’s functions.php or a Code Snippet.

  • filter

    wpextended/post-type-switcher/exclude_post_types

    Filters the post types left out of this module’s post type list.

    $excluded
    (array) post type keys to leave out

    Returns: array

    add_filter( 'wpextended/post-type-switcher/exclude_post_types', function ( $excluded ) {
        return $excluded;
    } );
  • filter

    wpextended/post-type-switcher/translations

    add_filter( 'wpextended/post-type-switcher/translations', function ( $value ) {
        return $value;
    } );