[wp-trac] [WordPress Trac] #27330: Custom post type disapears from menu editor after update/first install.
WordPress Trac
noreply at wordpress.org
Sun Mar 9 07:10:04 UTC 2014
#27330: Custom post type disapears from menu editor after update/first install.
--------------------------+-----------------------------
Reporter: CyberSpy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.8.1
Severity: normal | Keywords:
Focuses: template |
--------------------------+-----------------------------
To reproduce the bug:
1. Get clean 3.8.1 installation
2. Edit functions.php of 2014 theme and add at the end:
{{{
add_action( 'init', 'vocabulary_register_post_type' );
function vocabulary_register_post_type() {
$labels = array(
'name' => 'Słowniczek',
'singular_name' => 'Pojęcie',
'menu_name' => 'Pojęcia',
'name_admin_bar' => 'Pojęcie',
'add_new' => 'Dodaj nowe pojęcie',
'add_new_item' => 'Dodaj nowe pojęcie',
'edit_item' => 'Edytuj pojęcie',
'new_item' => 'Nowe pojęcie',
'view_item' => 'Wyswietl pojęcie',
'all_items' => 'Wszystkie pojęcia',
'search_items' => 'Wyszukaj pojęcia',
'parent_item_colon' => 'Nadrzędne książki',
'not_found' => 'Pojęć nie znaleziono',
'not_found_in_trash' => 'Brak usuniętych pojęć'
);
$product_args = array(
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'vocabulary' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor',
'author', 'thumbnail', 'excerpt', 'comments' ),
'labels' => $labels
);
register_post_type( 'vocabulary', $product_args );
}
}}}
(thats just a sample code from my project)
3. Install wp, get into admin, go to Appearance -> Menus
4. Check "Screen options" - custom post type "Slowniczkek" is hidden.
Now same process but:
1. Get clean 3.8.1 installation
2. Install wp, get into admin, go to Appearance -> Menus
3. Edit functions.php of 2014 theme and add the registering process at the
end of functions.php
4. Reload Appearance -> Menus - custom post type "Slowniczek" is visible.
It looks like same problem (with hiding custom post types) happens while
updating to 3.8.1
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27330>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list