smazani
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Plugin Name: MU Test Plugin
|
||||
* Description: MU Test plugin.
|
||||
* Author: WEDOS
|
||||
* Version: 1.0.0
|
||||
*/
|
||||
|
||||
if (!defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
add_action('admin_notices', function () {
|
||||
if (!current_user_can('manage_options')) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div class="notice notice-success is-dismissible">';
|
||||
echo '<p><strong>MU TEST OK</strong> — shared MU plugin.</p>';
|
||||
echo '</div>';
|
||||
});
|
||||
|
||||
add_action('admin_bar_menu', function ($wp_admin_bar) {
|
||||
if (!current_user_can('manage_options')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$wp_admin_bar->add_node([
|
||||
'id' => 'mu-test-ok',
|
||||
'title' => 'MU TEST OK',
|
||||
'href' => admin_url('plugins.php?plugin_status=mustuse'),
|
||||
'meta' => [
|
||||
'title' => 'MU plugin',
|
||||
],
|
||||
]);
|
||||
}, 100);
|
||||
|
||||
add_action('wp_footer', function () {
|
||||
if (!current_user_can('manage_options')) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div style="position:fixed;right:16px;bottom:16px;z-index:99999;padding:10px 14px;background:#16a34a;color:#fff;border-radius:8px;font:14px/1.4 sans-serif;box-shadow:0 4px 16px rgba(0,0,0,.2);">MU TEST OK</div>';
|
||||
});
|
||||
Reference in New Issue
Block a user