-
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.
Multi-Layer Admin Menu, Removed legacy ASM table, Cleanup
- Loading branch information
Showing
8 changed files
with
278 additions
and
327 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 |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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', []); | ||
$slug = $slugs[0]; | ||
add_menu_page( | ||
'Meeting List', | ||
'Meeting List', | ||
$cap, | ||
$slug, | ||
'', | ||
//'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiB3aWR0aD0iNTAuMDAwMDAwcHQiIGhlaWdodD0iNTAuMDAwMDAwcHQiIHZpZXdCb3g9IjAgMCA1MC4wMDAwMDAgNTAuMDAwMDAwIg0KIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPg0KDQo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0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SAyMSAtMjEgMTN6Ii8+DQo8cGF0aCBkPSJNNDE5IDczIGMtMTMgLTE2IC0xMiAtMTcgNCAtNCAxNiAxMyAyMSAyMSAxMyAyMSAtMiAwIC0xMCAtOCAtMTcNCi0xN3oiLz4NCjxwYXRoIGQ9Ik00NTUgNTAgYy00IC02IC0zIC0xNiAzIC0yMiA2IC02IDEyIC02IDE3IDIgNCA2IDMgMTYgLTMgMjIgLTYgNg0KLTEyIDYgLTE3IC0yeiIvPg0KPC9nPg0KPC9zdmc+', | ||
'dashicons-location-alt', | ||
null | ||
); | ||
do_action('BmltEnabled_Submenu', $slug); | ||
} | ||
} |
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.