Plugin Directory

Changeset 2454762


Ignore:
Timestamp:
01/12/2021 12:47:46 PM (5 years ago)
Author:
thecrackerjack
Message:

Fix AIOSEO v4.0.0+ deprecated hooks

Location:
ppc-masterminds/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ppc-masterminds/trunk/includes/class-ppcm-url-params-to-content.php

    r2372273 r2454762  
    1818     
    1919        /* The following requires All In One SEO Pack plugin or Yoast, so don't load these actions if plugin not installed */
    20         if ( ( $this->is_aio = is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) )
    21              || ( $this->is_yoast = is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) ) {
     20        if ( ( $this->is_aio = defined( 'AIOSEO_VERSION' ) )
     21             || ( $this->is_yoast = defined( 'WPSEO_VERSION' ) ) ) {
    2222           
    2323            /* If in an admin page, init meta box */
     
    2727            }
    2828           
    29             /** Change meta description if url params are set @see PPCM_URL_Params_To_Content::change_seo_meta_desc_for_url_params() */
    30             add_filter( 'aioseop_description', array( $this, 'change_seo_meta_desc_for_url_params' ), PHP_INT_MAX, 1 );
    31             add_filter( 'wpseo_metadesc', array( $this, 'change_seo_meta_desc_for_url_params' ), PHP_INT_MAX, 1 );
    32             /** Change title tag if url params are set @see PPCM_URL_Params_To_Content::change_seo_page_title_for_url_params() */
    33             add_filter( 'aioseop_title', array( $this, 'change_seo_page_title_for_url_params' ), PHP_INT_MAX, 1 );
    34             add_filter( 'wpseo_title', array( $this, 'change_seo_page_title_for_url_params' ), PHP_INT_MAX, 1 );
     29            /* All-In-One SEO Pack */
     30            if ( $this->is_aio ) {
     31                if ( version_compare( AIOSEO_VERSION, '4.0.0', '<' ) ) {
     32                    add_filter( 'aioseop_description', array( $this, 'change_seo_meta_desc_for_url_params' ), PHP_INT_MAX, 1 );
     33                    add_filter( 'aioseop_title', array( $this, 'change_seo_page_title_for_url_params' ), PHP_INT_MAX, 1 );
     34                } else {
     35                    add_filter( 'aioseo_description', array( $this, 'change_seo_meta_desc_for_url_params' ), PHP_INT_MAX, 1 );
     36                    add_filter( 'aioseo_title', array( $this, 'change_seo_page_title_for_url_params' ), PHP_INT_MAX, 1 );
     37                }
     38            };
     39           
     40            /* Yoast SEO */
     41            if ( $this->is_yoast ) {
     42                add_filter( 'wpseo_metadesc', array( $this, 'change_seo_meta_desc_for_url_params' ), PHP_INT_MAX, 1 );
     43                add_filter( 'wpseo_title', array( $this, 'change_seo_page_title_for_url_params' ), PHP_INT_MAX, 1 );
     44            }
    3545        }
    3646       
  • ppc-masterminds/trunk/ppcmasterminds.php

    r2372273 r2454762  
    66 * Author URI:        https://ppcmasterminds.com/
    77 * Description:       PPC/SEO Utility plugin by PPC Masterminds
    8  * Version:           1.1.0
     8 * Version:           1.1.1
    99 * Requires at least: 5.2
    1010 * Requires PHP:      7.2
  • ppc-masterminds/trunk/readme.txt

    r2372287 r2454762  
    44Tags: ppc, pay per click, landing page optimization, cro, geoip, plugin extensions
    55Requires at least: 5.2
    6 Tested up to: 5.4
     6Tested up to: 5.6
    77Requires PHP: 7.2
    8 Stable tag: 1.1.0
     8Stable tag: 1.1.1
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7373**Yoast SEO Support**
    7474* The swapping of meta titles and descriptions with URL parameters is now compatible with both Yoast SEO & All-In-One SEO Pack
     75
     76= 1.1.1 - 2021-01-12 =
     77**AIOSEO Deprecated Filter Update**
     78* Updated code to accommodate All-In-One SEO plugin deprecated hooks and filters.
Note: See TracChangeset for help on using the changeset viewer.