$value ) { $taxonomies[$key]['label'] = sprintf( "Selected %s's %s", ucwords( $value['label'] ), ucwords( $obj->labels->singular_name ) ); } $taxonomies['all_items'] = array( 'label' => sprintf( "All %s", ucwords( $obj->labels->name ) ), ); $taxonomies['selected_single_items'] = array( 'label' => sprintf( "Selected %s", ucwords( $obj->labels->singular_name ) ), ); if ( 'page' === $post_type_key ) { $taxonomies = self::create_page_restrict_in_extra( $taxonomies ); } if ( 'post' === $post_type_key ) { $taxonomies = self::create_post_restrict_in_extra( $taxonomies ); unset( $taxonomies['post_format'] ); } if ( ! $markup ) { return $taxonomies; } return Markup_Manager::create_html_options( apply_filters( 'all_in_one_content_restriction_taxonomies', $taxonomies ), $selected_restrict_in ); } public static function has_custom_restrict_in( $restriction_in ) { $custom_restrict_in = array( 'frontpage', 'the_blog_index', 'all_items', ); return in_array( $restriction_in, $custom_restrict_in ); } private static function create_page_restrict_in_extra( $taxonomies ) { $custom_restrict_in = array( 'frontpage' => array( 'label' => esc_attr__( 'Homepage / Frontpage', 'all-in-one-content-restriction' ), ), ); return array_merge( $custom_restrict_in, $taxonomies ); } private static function create_post_restrict_in_extra( $taxonomies ) { $custom_restrict_in = array( 'the_blog_index' => array( 'label' => esc_attr__( 'Blog Index', 'all-in-one-content-restriction' ), ), ); return array_merge( $custom_restrict_in, $taxonomies ); } }