Benutzerdefinierte Taxonomie erstellt unerwünschte Integer-Bedingungen bei der Postspeicherung

Nachdem ich Begriffe ausgewählt und dann meinen benutzerdefinierten Beitragstyp gespeichert habe, werden neue Taxonomiebegriffe mit ganzzahligen Werten generiert und jedes Mal ausgewählt. Ich weiß nicht, was das Problem ist, noch habe ich irgendwo im Internet ein ähnliches Problem gefunden. Hier ist ein Bild von dem, was genau passiert: http://prntscr.com/fvfqvf

Beitragstyp registrieren

function tbs_register_post_type() { $singular = 'Stylist'; $plural = 'Stylists'; $labels = array( 'name' => $plural, 'singular_name' => $singular, 'add_new' => 'Add New', 'add_new_item' => 'Add New ' . $singular, 'edit_item' => 'Edit ' . $singular, 'new_item' => 'New ' . $singular, 'view_item' => 'View ' . $singular, 'view_items' => 'View ' . $plural, 'search_items' => 'Search ' . $plural, 'not_found' => 'No ' . strtolower($plural) . ' found', 'not_found_in_trash' => 'No ' . strtolower($plural) . ' found in trash', 'all_items' => 'All ' . $plural, 'archives' => $singular . ' Archives', 'attributes' => $singular . ' Attributes', 'insert_into_item' => 'Insert into ' . strtolower($singular), 'uploaded_to_this_item' => 'Uploaded to this ' . strtolower($singular), 'featured_image' => $singular . ' Picture', 'set_featured_image' => 'Set ' . strtolower($singular) . ' picture', 'remove_featured_image' => 'Remove ' . strtolower($singular) . ' picture', 'use_featured_image' => 'Use as ' . strtolower($singular) . ' picture', 'filter_items_list' => 'Filter ' . strtolower($plural) . ' list', 'items_list_navigation' => $plural . ' list navigation', 'items_list' => $plural . ' list' ); $args = array( 'label' => $plural, 'labels' => $labels, 'description' => 'A custom plugin to create, edit, and delete stylists made for -.', 'public' => true, 'menu_position' => '2', 'menu_icon' => 'dashicons-groups', 'supports' => array('title', 'thumbnail'), 'taxonomies' => array('tbs_skills', 'tbs_fun_facts'), 'has_archive' => false, 'rewrite' => array('slug' => 'stylists') ); register_post_type('tbs_stylists', $args); } add_action('init', 'tbs_register_post_type'); 

Taxonomien registrieren

 function tbs_register_skills_taxonomy() { $singular = 'Skill'; $plural = 'Skills'; $labels = array( 'name' => $plural, 'singular_name' => $singular, 'all_items' => _('All '. $plural), 'edit_item' => _('Edit ' . $singular), 'view_item' => _('View ' . $singular), 'update_item' => _('Update ' . $singular), 'add_new_item' => _('Add New ' . $singular), 'new_item_name' => _('New ' . $singular . ' Name'), 'search_items' => _('Search ' . $plural), 'popular_items' => _('Popular ' . $plural), 'separate_items_with_commas' => _('Separate ' . strtolower($plural) . ' with commas'), 'add_or_remove_items' => _('Add or remove ' . strtolower($plural)), 'choose_from_most_used' => _('Choose from the most common ' . strtolower($plural)), 'not_found' => _('No ' . strtolower($plural) . ' found.') ); $args = array( 'label' => $plural, 'labels' => $labels, 'description' => 'A custom taxonomy for the stylists custom post type made for -.', 'public' => true ); register_taxonomy('tbs_skills', 'tbs_stylists', $args); } add_action('init', 'tbs_register_skills_taxonomy'); function tbs_register_fun_facts_taxonomy() { $singular = 'Fun Fact'; $plural = 'Fun Facts'; $labels = array( 'name' => $plural, 'singular_name' => $singular, 'all_items' => _('All '. $plural), 'edit_item' => _('Edit ' . $singular), 'view_item' => _('View ' . $singular), 'update_item' => _('Update ' . $singular), 'add_new_item' => _('Add New ' . $singular), 'new_item_name' => _('New ' . $singular . ' Name'), 'search_items' => _('Search ' . $plural), 'popular_items' => _('Popular ' . $plural), 'separate_items_with_commas' => _('Separate ' . strtolower($plural) . ' with commas'), 'add_or_remove_items' => _('Add or remove ' . strtolower($plural)), 'choose_from_most_used' => _('Choose from the most common ' . strtolower($plural)), 'not_found' => _('No ' . strtolower($plural) . ' found.') ); $args = array( 'label' => $plural, 'labels' => $labels, 'description' => 'A custom taxonomy for the stylists custom post type made for -.', 'public' => true ); register_taxonomy('tbs_fun_facts', 'tbs_stylists', $args); } add_action('init', 'tbs_register_fun_facts_taxonomy'); 

Post-Seitenfunktionen bearbeiten

 function tbs_change_title_text($title){ $screen = get_current_screen(); if ('tbs_stylists' == $screen->post_type) $title = 'Enter stylist name'; return $title; } add_filter('enter_title_here', 'tbs_change_title_text'); function tbs_move_metas() { remove_meta_box('tagsdiv-tbs_skills', 'tbs_stylists', 'side'); add_meta_box('tagsdiv-tbs_skills', 'Skills', 'post_categories_meta_box', 'tbs_stylists', 'normal', 'high', array('taxonomy' => 'tbs_skills')); remove_meta_box('tagsdiv-tbs_fun_facts', 'tbs_stylists', 'side'); add_meta_box('tagsdiv-tbs_fun_facts', 'Fun Facts', 'post_categories_meta_box', 'tbs_stylists', 'normal', 'high', array('taxonomy' => 'tbs_fun_facts')); } add_action('admin_init', 'tbs_move_metas'); 

Wenn jemand etwas Einblick bieten könnte, würde ich es begrüßen. Vielen Dank.

Solutions Collecting From Web of "Benutzerdefinierte Taxonomie erstellt unerwünschte Integer-Bedingungen bei der Postspeicherung"