/** * Display a notice in WP admin to the Admins to prompt * them to do the extra steps to fully activate the * Media Vault plugin * * @since 0.8.5 */ function mgjp_mv_extra_activation_steps_notice() { // only show to admins on single site install or // network admins on multisite install if (!current_user_can('install_plugins')) { return; } $screen = get_current_screen(); if (!in_array($screen->id, array('plugins-network', 'plugins', 'options-media', 'upload', 'media', 'attachment'))) { return; } mgjp_mv_admin_notice('<strong>' . __('Almost there!', 'media-vault') . '</strong> - ' . __('Because of your setup, Media Vault requires some extra steps before it is enabled. Follow the instructions and then go protect some files!', 'media-vault'), array('link' => network_admin_url('plugins.php?page=mgjp-mv-eas'), 'text' => __('Fully Activate Media Vault', 'media-vault'))); }
/** * Display a notice in WP admin to the Admins to prompt * them to do the extra steps to fully deactivate the * Media Vault plugin * * @since 0.8.5 */ function mgjp_mv_extra_deactivation_steps_notice() { // only show to admins on single site install or // network admins on multisite install if (!current_user_can('install_plugins')) { return; } $screen = get_current_screen(); if (is_multisite()) { if ('plugins-network' !== $screen->id) { return; } } else { if ('plugins' !== $screen->id) { return; } } if ('disallowed' !== get_site_option('mgjp_mv_deactivation')) { return; } mgjp_mv_admin_notice('<strong>' . __('Almost done!', 'media-vault') . '</strong> - ' . __('Because of your setup, Media Vault requires some extra steps before it is deactivated. If you really want to deactivate, just click the button and follow the instructions!', 'media-vault'), array(array('link' => network_admin_url('plugins.php?page=mgjp-mv-eds'), 'text' => __('Fully Deactivate Media Vault', 'media-vault')), array('link' => network_admin_url('plugins.php?page=mgjp-mv-eds&cancel_deactivation=1&_wpnonce=' . wp_create_nonce('mgjp_mv_deactivation')), 'text' => __('Cancel Deactivation', 'media-vault')))); }