Skip to content

Commit

Permalink
update menu page to be submenu on post type page
Browse files Browse the repository at this point in the history
  • Loading branch information
bxfocht-godaddy committed Nov 30, 2017
1 parent 46f2198 commit 8895a85
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions includes/class-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ final class Setup {
*/
const SLUG = 'reseller-store-setup';

/**
* POST TYPE SLUG
*
* @since NEXT
*
* @var string
*/
const PAGE_SLUG = 'edit.php?post_type=reseller_product';

/**
* Install nonce action name.
*
Expand Down Expand Up @@ -133,14 +142,13 @@ public function admin_enqueue_scripts() {
*/
public function page() {

add_menu_page(
add_submenu_page(
self::PAGE_SLUG,
esc_html__( 'Reseller Store Setup', 'reseller-store' ),
esc_html__( 'Reseller Store', 'reseller-store' ),
esc_html__( 'Setup', 'reseller-store' ),
'activate_plugins',
self::SLUG,
[ $this, 'content' ],
'dashicons-cart',
Post_Type::MENU_POSITION
[ $this, 'content' ]
);

}
Expand Down

0 comments on commit 8895a85

Please sign in to comment.