-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from bmlt-enabled/Major-Refactor
Major refactor
- Loading branch information
Showing
147 changed files
with
19,710 additions
and
9,094 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
.vscode/* | ||
.DS_Store | ||
.idea | ||
.phpunit.result.cache | ||
vendor/ | ||
logs/ | ||
build/ |
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 was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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,50 @@ | ||
<?php | ||
|
||
/** | ||
* Creates the main item in the admin menu, where both bread and crouton admins can live. | ||
* | ||
* @package Bread | ||
* @subpackage Bread/admin | ||
* @author bmlt-enabled <help@bmlt.app> | ||
*/ | ||
class BmltEnabled_Admin | ||
{ | ||
private bool $menu_created = false; | ||
/** | ||
* Initialize the class and set its properties. | ||
* | ||
* @since 2.8.0 | ||
* @param string $plugin_name The name of this plugin. | ||
* @param string $version The version of this plugin. | ||
*/ | ||
public function __construct() | ||
{ | ||
} | ||
public function createdMenu() | ||
{ | ||
$this->menu_created = true; | ||
} | ||
function admin_menu_link() | ||
{ | ||
if ($this->menu_created) { | ||
return; | ||
} | ||
$cap = 'manage_options'; | ||
if (!current_user_can($cap)) { | ||
$cap = 'manage_bread'; | ||
} | ||
$slugs = apply_filters('BmltEnabled_Slugs', []); | ||
$icon = apply_filters("BmltEnabled_IconSVG", 'dashicons-locations-alt'); | ||
$slug = $slugs[0]; | ||
add_menu_page( | ||
'Meeting List', | ||
'Meeting List', | ||
$cap, | ||
$slug, | ||
'', | ||
$icon, | ||
null | ||
); | ||
do_action('BmltEnabled_Submenu', $slug); | ||
} | ||
} |
Oops, something went wrong.