WordPress - Add/Edit Post Screen Options not showing Categories

泪湿孤枕 提交于 2019-12-24 01:17:31

问题


this is hopefully a very simple fix but i just noticed on my Add New/Edit Post Screen Options i don't have Categories to Enable/Disable (see pic). Any help muchos appreciated!!


回答1:


in wp-admin/includes/screen.php we see:

<div class="metabox-prefs">
    <?php
        meta_box_prefs( $this ); // draw checkboxes in screen options
    ?>
</div>

and meta_box_prefs function takes in account the get_hidden_meta_boxes function:

function meta_box_prefs( $screen ) {
    global $wp_meta_boxes;

    $hidden = get_hidden_meta_boxes($screen);

    // hide some boxes
}

An this function includes 2 filters default_hidden_meta_boxes and hidden_meta_boxes:

function get_hidden_meta_boxes( $screen ) {
    // code
    $hidden = apply_filters( 'default_hidden_meta_boxes', $hidden, $screen );
    // code
    return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults );
}

Mi conclusion is that one of your plugins is hiding categories in your screen options.



来源:https://stackoverflow.com/questions/12674827/wordpress-add-edit-post-screen-options-not-showing-categories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!