wpseek.com
A WordPress-centric search engine for devs and theme authors
_wp_nav_menu_meta_box_object is private and should not be used in themes or plugins directly.
_wp_nav_menu_meta_box_object › WordPress Function
Since3.0.0
Deprecatedn/a
› _wp_nav_menu_meta_box_object ( $data_object = null )
Access: |
|
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: |
Adds custom arguments to some of the meta box object types.
Source
function _wp_nav_menu_meta_box_object( $data_object = null ) {
if ( isset( $data_object->name ) ) {
if ( 'page' === $data_object->name ) {
$data_object->_default_query = array(
'orderby' => 'menu_order title',
'post_status' => 'publish',
);
// Posts should show only published items.
} elseif ( 'post' === $data_object->name ) {
$data_object->_default_query = array(
'post_status' => 'publish',
);
// Categories should be in reverse chronological order.
} elseif ( 'category' === $data_object->name ) {
$data_object->_default_query = array(
'orderby' => 'id',
'order' => 'DESC',
);
// Custom post types should show only published items.
} else {
$data_object->_default_query = array(
'post_status' => 'publish',
);
}
}
return $data_object;
}