Files
SODEW/sodew-bash-main/assets/wordpress/shared/mu-plugin/00-mu-test.php
T
2026-08-18 09:40:08 +02:00

46 lines
1.1 KiB
PHP

<?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>';
});