Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Stops Advanced AJAX Page Loader plugin from loading
- * when used with the AppPresser plugin.
- *
- * Add this file to the wp-content/mu-plugins/ folder.
- */
- add_action('plugins_loaded', 'remove_aapl');
- function remove_aapl() {
- if( is_appp_request() ) {
- remove_action('wp_head', 'insert_head_AAPL');
- remove_action('wp_footer', 'insert_foot_AAPL');
- remove_action('wp_enqueue_scripts', 'enqueue_AAPL');
- }
- }
- function is_appp_request() {
- $is_apppv = 0;
- if( isset( $_GET['appp'] ) && $_GET['appp'] == 3 || isset( $_COOKIE['AppPresser_Appp3'] ) && $_COOKIE['AppPresser_Appp3'] === 'true' ) {
- $is_apppv = 3;
- } else if( isset( $_GET['appp'] ) && $_GET['appp'] == 2 || isset( $_COOKIE['AppPresser_Appp2'] ) && $_COOKIE['AppPresser_Appp2'] === 'true' ) {
- $is_apppv = 2;
- } else if( ( isset( $_GET['appp'] ) && $_GET['appp'] == 1 ) || isset( $_COOKIE['AppPresser_Appp'] ) && $_COOKIE['AppPresser_Appp'] === 'true' ) {
- $is_apppv = 1;
- }
- return $is_apppv;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement