Skip to content

Commit

Permalink
fix: menu order
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Nov 1, 2024
1 parent ce4c35c commit bbf3a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions includes/wizards/class-listings-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Listings_Wizard extends Wizard {
*
* @var int
*/
public $menu_order = 2;
public $menu_order = 3;

/**
* Constructor.
Expand Down Expand Up @@ -99,7 +99,6 @@ public function __construct() {
* Replaces Listings Plugin's 'admin_menu' action => Newspack_Listings\Core => 'add_plugin_page'
*/
public function add_page() {

// Top-level menu item.
add_menu_page(
__( 'Newspack Listings', 'newspack-plugin' ),
Expand All @@ -120,7 +119,6 @@ public function add_page() {
'newspack-listings-settings-admin',
[ Newspack_Listings_Settings::class, 'create_admin_page' ]
);

}
}

Expand Down
2 changes: 1 addition & 1 deletion includes/wizards/class-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class Wizard {
* $my_wizard = new My_Wizard( [ 'sections' => [ 'my-wizard-section' => 'Newspack\Wizards\My_Wizard\My_Wizard_Section' ] ] );
*/
public function __construct( $args = [] ) {
add_action( 'admin_menu', [ $this, 'add_page' ], 2 );
add_action( 'admin_menu', [ $this, 'add_page' ] );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts_and_styles' ] );
if ( isset( $args['sections'] ) ) {
$this->load_wizard_sections( $args['sections'] );
Expand Down

0 comments on commit bbf3a80

Please sign in to comment.