| 1 |
<?php |
| 2 |
|
| 3 |
//Activate-Deactivate functions |
| 4 |
class RabbitLoader_AD_AD{ |
| 5 |
|
| 6 |
public static function on_plugins_loaded(){ |
| 7 |
global $pagenow; |
| 8 |
if (strcmp($pagenow,'plugins.php')==0) { |
| 9 |
RabbitLoader_21_Core::getWpUserOption($user_options); |
| 10 |
add_action('admin_enqueue_scripts', function() { |
| 11 |
$kb_link = "https://rabbitloader.com/kb/new-errors-with-rabbit-loader/#turn_on_me_mode"; |
| 12 |
wp_enqueue_script('rabbitloader-index', RABBITLOADER_PLUG_URL . 'admin/js/index.js', ['jquery'], RABBITLOADER_PLUG_VERSION); |
| 13 |
|
| 14 |
wp_localize_script('rabbitloader-index', 'rl_de_popup', [ |
| 15 |
'btn_de' => RabbitLoader_21_Util_WP::__('Continue Deactivate'), |
| 16 |
'btn_en' => RabbitLoader_21_Util_WP::__('Enable Me mode'), |
| 17 |
'pop_msg' => RabbitLoader_21_Util_WP::__(sprintf('By turning on the <a href="%s" target="_blank">"Me" mode <i class="dashicons-before dashicons-external"></i></a>, only you can see the optimized version of the website. Do you still want to deactivate?', $kb_link)), |
| 18 |
'private_mode_val'=> empty($user_options['private_mode_val']) ? "0" : "1" |
| 19 |
]); |
| 20 |
}); |
| 21 |
} |
| 22 |
} |
| 23 |
} |
| 24 |
|