[wp-trac] [WordPress Trac] #54819: Adding Taxonomy with word "media" not showing list in Edit/Create Post
WordPress Trac
noreply at wordpress.org
Fri Jan 14 11:53:44 UTC 2022
#54819: Adding Taxonomy with word "media" not showing list in Edit/Create Post
--------------------------+-----------------------------
Reporter: auriel2017 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Wordpress Version 5.8.3
PHP version 7.4.27 (Supports 64bit values)
{{{
<?php
add_action( 'init', 'your_prefix_register_taxonomy' );
function your_prefix_register_taxonomy() {
$labels = [
'name' => esc_html__( 'Media
Classes', 'your-textdomain' ),
'singular_name' => esc_html__( 'Media Class',
'your-textdomain' ),
'menu_name' => esc_html__( 'Media
Classes', 'your-textdomain' ),
'search_items' => esc_html__( 'Search Media
Classes', 'your-textdomain' ),
'popular_items' => esc_html__( 'Popular Media
Classes', 'your-textdomain' ),
'all_items' => esc_html__( 'All Media
Classes', 'your-textdomain' ),
'parent_item' => esc_html__( 'Parent Media
Class', 'your-textdomain' ),
'parent_item_colon' => esc_html__( 'Parent Media
Class', 'your-textdomain' ),
'edit_item' => esc_html__( 'Edit Media
Class', 'your-textdomain' ),
'view_item' => esc_html__( 'View Media
Class', 'your-textdomain' ),
'update_item' => esc_html__( 'Update Media
Class', 'your-textdomain' ),
'add_new_item' => esc_html__( 'Add new media
class', 'your-textdomain' ),
'new_item_name' => esc_html__( 'New media
class name', 'your-textdomain' ),
'separate_items_with_commas' => esc_html__( 'Separate
media classes with commas', 'your-textdomain' ),
'add_or_remove_items' => esc_html__( 'Add or remove
media classes', 'your-textdomain' ),
'choose_from_most_used' => esc_html__( 'Choose most
used media classes', 'your-textdomain' ),
'not_found' => esc_html__( 'No media
classes found', 'your-textdomain' ),
'no_terms' => esc_html__( 'No Media
Classes', 'your-textdomain' ),
'filter_by_item' => esc_html__( 'Filter by
media class', 'your-textdomain' ),
'items_list_navigation' => esc_html__( 'Media classes
list pagination', 'your-textdomain' ),
'items_list' => esc_html__( 'Media Classes
list', 'your-textdomain' ),
'most_used' => esc_html__( 'Most Used',
'your-textdomain' ),
'back_to_items' => esc_html__( 'Back to media
classes', 'your-textdomain' ),
];
$args = [
'label' => esc_html__( 'Media Classes',
'your-textdomain' ),
'labels' => $labels,
'description' => '',
'public' => true,
'publicly_queryable' => true,
'hierarchical' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'show_tagcloud' => true,
'show_in_quick_edit' => true,
'show_admin_column' => true,
'query_var' => true,
'sort' => true,
'meta_box_cb' => 'post_tags_meta_box',
'rest_base' => '',
'rewrite' => [
'with_front' => true,
'hierarchical' => true,
],
];
register_taxonomy( 'media-class', ['post', 'comunidad'], $args );
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54819>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list