Skip to content

Commit

Permalink
feat(ia): network, disallow menu to appear before setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredrethman committed Dec 16, 2024
1 parent ea94615 commit 88a93b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions includes/wizards/class-network-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public function __construct() {
// Hooks: admin_menu/add_page, admin_enqueue_scripts/enqueue_scripts_and_styles, admin_body_class/add_body_class .
parent::__construct();

// Remove Newspack Network admin menu if setup is incomplete.
// @TODO: move to standardized method for altering menu items.
if ( ! Newspack::is_setup_complete() ) {
remove_action( 'admin_menu', [ Newspack_Network_Admin::class, 'add_admin_menu' ] );
}

// Display screen.
if ( $this->is_wizard_page() ) {

Expand Down

0 comments on commit 88a93b8

Please sign in to comment.