WordPress - Add/Edit Post Screen Options not showi

2019-07-11 18:50发布

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!!

Word Press 3.4.2 - Add/Edit Post Screen Options

1条回答
姐就是有狂的资本
2楼-- · 2019-07-11 19:24

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.

查看更多
登录 后发表回答