-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c556f24
commit 128805e
Showing
27 changed files
with
1,812 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?php | ||
/** | ||
* Register Settings. | ||
* | ||
* @since 4.0.0 | ||
* | ||
* @package WebberZone\Better_Search\Admin | ||
*/ | ||
|
||
namespace WebberZone\Better_Search\Admin\Network; | ||
|
||
use WebberZone\Better_Search\Main; | ||
|
||
// If this file is called directly, abort. | ||
if ( ! defined( 'WPINC' ) ) { | ||
die; | ||
} | ||
|
||
/** | ||
* Class to register the settings. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
class Admin { | ||
|
||
/** | ||
* Parent ID. | ||
* | ||
* @var string | ||
*/ | ||
public $parent_id; | ||
|
||
/** | ||
* Main constructor class. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function __construct() { | ||
$this->hooks(); | ||
} | ||
|
||
/** | ||
* Run the hooks. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function hooks() { | ||
add_action( 'network_admin_menu', array( $this, 'network_admin_menu' ) ); | ||
} | ||
|
||
/** | ||
* Add the network admin menu. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function network_admin_menu() { | ||
$this->parent_id = add_menu_page( | ||
esc_html__( 'Better Search Multisite Dashboard', 'better-search' ), | ||
esc_html__( 'Better Search', 'better-search' ), | ||
'manage_network_options', | ||
'bsearch_dashboard', | ||
array( $this, 'render_page' ), | ||
'dashicons-search' | ||
); | ||
|
||
add_submenu_page( | ||
'bsearch_dashboard', | ||
esc_html__( 'Better Search Multisite Settings', 'better-search' ), | ||
esc_html__( 'Settings', 'better-search' ), | ||
'manage_network_options', | ||
'bsearch_dashboard', | ||
array( $this, 'render_page' ) | ||
); | ||
} | ||
|
||
/** | ||
* Render the page. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function render_page() { | ||
?> | ||
<div class="wrap"> | ||
<h1><?php esc_html_e( 'Better Search Multisite Settings', 'better-search' ); ?></h1> | ||
<p><?php esc_html_e( 'This page allows you to configure the settings for Better Search on your multisite network.', 'better-search' ); ?></p> | ||
|
||
<?php Main::pro_upgrade_banner( false ); ?> | ||
|
||
<?php do_action( 'bsearch_multisite_settings' ); ?> | ||
</div> | ||
<?php | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.