Plugin Directory

Changeset 2557002


Ignore:
Timestamp:
07/01/2021 12:56:39 PM (5 years ago)
Author:
ampenhancer
Message:

1.0.46 updated

Location:
amp-enhancer
Files:
167 added
3 edited

Legend:

Unmodified
Added
Removed
  • amp-enhancer/trunk/amp-enhancer.php

    r2551421 r2557002  
    44Description: AMP Enhancer is a Compatibility Layer for Official AMP Plugin ( Its Plug & Play, Requires No Settings )
    55Author: ampenhancer
    6 Version: 1.0.45
     6Version: 1.0.46
    77Author URI: http://ampenhancer.com
    88License: GPLv2 or later
     
    1313if ( ! defined( 'ABSPATH' ) ) exit;
    1414
    15 define('AMP_ENHANCER_VERSION','1.0.45');
     15define('AMP_ENHANCER_VERSION','1.0.46');
    1616define('AMP_ENHANCER_PLUGIN_URI', plugin_dir_url(__FILE__));
    1717define('AMP_ENHANCER_PLUGIN_DIR', plugin_dir_path(__FILE__));
  • amp-enhancer/trunk/includes/functions.php

    r2551421 r2557002  
    292292     }
    293293     
     294      if(defined('EZOIC__PLUGIN_NAME')){
     295        amp_enhancer_remove_filters_by_class( 'shutdown', 'Ezoic_Namespace\Ezoic_Integration_Public', 'ez_buffer_end', 0 );
     296      }
    294297
    295298    }// amp endpoint
     
    299302        add_action( 'admin_enqueue_scripts', 'amp_enhancer_load_custom_wp_admin_styles_and_script' );
    300303    }
     304}
     305
     306function amp_enhancer_remove_filters_by_class( $hook_name = '', $class_name ='', $method_name = '', $priority = 0 ) {
     307  global $wp_filter;
     308  if ( !isset($wp_filter[$hook_name][$priority]) || !is_array($wp_filter[$hook_name][$priority]) )
     309    return false;
     310  foreach( (array) $wp_filter[$hook_name][$priority] as $unique_id => $filter_array ) {
     311    if ( isset($filter_array['function']) && is_array($filter_array['function']) ) {
     312      if ( is_object($filter_array['function'][0]) && get_class($filter_array['function'][0]) && get_class($filter_array['function'][0]) == $class_name && $filter_array['function'][1] == $method_name ) {
     313          if( is_a( $wp_filter[$hook_name], 'WP_Hook' ) ) {
     314              unset( $wp_filter[$hook_name]->callbacks[$priority][$unique_id] );
     315          }
     316          else {
     317            unset($wp_filter[$hook_name][$priority][$unique_id]);
     318          }
     319      }
     320    }
     321  }
     322  return false;
    301323}
    302324
  • amp-enhancer/trunk/readme.txt

    r2551421 r2557002  
    55Requires at least: 3.0
    66Tested up to: 5.7.2
    7 Stable tag: 1.0.45
     7Stable tag: 1.0.46
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    223223== Changelog ==
    224224
     225= 1.0.46 (1st July 2021) =
     226* Added Ezoic Compatibility #64
     227
    225228= 1.0.45 (21st June 2021) =
    226229* Added TablePress Compatibility #45
Note: See TracChangeset for help on using the changeset viewer.