wpseo_indexable_excluded_post_types

wpseo_indexable_excluded_post_types

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-seo.22.3

apply_filters('wpseo_indexable_excluded_post_types') is found 2 times:

  • /src/deprecated/src/actions/indexables-page-action.php line 82
    	 */
    	protected function get_sub_types() {
    		$object_sub_types = \array_values( $this->post_type_helper->get_public_post_types() );
    
    		$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [ 'attachment' ] );
    
    		/**
    		 * Filter: 'wpseo_indexable_included_post_types' - Allow developers to specify which post types will
    		 * be shown in the indexables overview cards.
    		 *
    		 * @param array $included_post_types The currently included post types.
    
  • /src/helpers/post-type-helper.php line 108
    		 * type from being saved to the indexable table.
    		 *
    		 * @param array $excluded_post_types The currently excluded post types that indexables will not be created for.
    		 */
    		$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [] );
    
    		// Failsafe, to always make sure that `excluded_post_types` is an array.
    		if ( ! \is_array( $excluded_post_types ) ) {
    			return [];
    		}
    
    

See this hook used in plugins: