Pledges: Adjust admin menu entries

This commit is contained in:
Corey McKrill 2019-10-21 15:01:41 -07:00
parent 75428a3c95
commit aef07828a6
No known key found for this signature in database
GPG key ID: C2C0746F7BF17E38

View file

@ -16,6 +16,7 @@ const SLUG_PL = 'pledges';
const CPT_ID = FiveForTheFuture\PREFIX . '_' . SLUG;
add_action( 'init', __NAMESPACE__ . '\register', 0 );
add_action( 'admin_menu', __NAMESPACE__ . '\admin_menu' );
/**
* Register all the things.
@ -27,6 +28,15 @@ function register() {
register_custom_post_status();
}
/**
* Adjustments to the Five for the Future admin menu.
*
* @return void
*/
function admin_menu() {
remove_submenu_page( 'edit.php?post_type=' . CPT_ID, 'post-new.php?post_type=' . CPT_ID );
}
/**
* Register the post type(s).
*
@ -40,7 +50,7 @@ function register_custom_post_type() {
'archives' => __( 'Pledge Archives', 'wporg' ),
'attributes' => __( 'Pledge Attributes', 'wporg' ),
'parent_item_colon' => __( 'Parent Pledge:', 'wporg' ),
'all_items' => __( 'All Pledges', 'wporg' ),
'all_items' => __( 'Pledges', 'wporg' ),
'add_new_item' => __( 'Add New Pledge', 'wporg' ),
'add_new' => __( 'Add New', 'wporg' ),
'new_item' => __( 'New Pledge', 'wporg' ),