Plugin Directory

Changeset 2288083


Ignore:
Timestamp:
04/21/2020 07:20:06 AM (6 years ago)
Author:
seodevrobin
Message:

Update 1.86

Location:
s-dev-seo/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • s-dev-seo/trunk/inc/replace.php

    r2278053 r2288083  
    4545        if(!$desc = get_post_meta($post->ID,'sdevseo_desc', true)) {
    4646            $desc = false;
     47        } else {
     48            $desc = str_replace('%year%', date('Y'), $desc);
     49            $desc = addcslashes($desc,'$');
    4750        }
    4851       
    4952        /* 1.84 - Dynamic year implementation */
    5053        $title = str_replace('%year%', date('Y'), $title);
    51         $desc = str_replace('%year%', date('Y'), $desc);
    52        
    5354        $in = ob_get_clean();
    5455
     
    6566               
    6667                if( (int)$wpse_sdevseo_settings['enable_meta_desc'] === 1 ) {
    67                
    68                     $meta_desc_tag = "\n\t".'<meta name="description" content="'.$desc.'" />'."\n";
     68                    preg_match('/<meta.*?name=("|\')description("|\').*?content=("|\')(.*?)("|\')/i', $in, $matches);
     69                   
     70                    if(count($matches) === 0) {
     71                        $meta_desc_tag = "\n\t".'<meta name="description" content="'.$desc.'" />'."\n";
     72                    } else {
     73                        $meta_desc_tag = null;
     74                    }
    6975                }
    7076               
     
    8591                if( (int)$wpse_sdevseo_settings['enable_meta_desc'] === 1 ) {
    8692               
    87                     $in .= "\n".'<meta name="description" content="'.$desc.'" />'."\n";
     93                    preg_match('/<meta.*?name=("|\')description("|\').*?content=("|\')(.*?)("|\')/i', $in, $matches);
     94                   
     95                    if (count($matches) < 1) {
     96                        $in .= "\n".'<meta name="description" content="'.$desc.'" />'."\n";
     97                    }
    8898                   
    8999                }
  • s-dev-seo/trunk/readme.txt

    r2278053 r2288083  
    55License URI: http://www.gnu.org/licenses/gpl-2.0.html
    66Tags: SEO, Title, Meta Description
    7 Stable tag: 1.85
    8 Tested up to: 5.3
    9 Requires at least: 5.3
     7Stable tag: 1.86
     8Tested up to: 5.4
     9Requires at least: 5.2
    1010Requires PHP: 7.0
    1111
     
    2727
    2828== Changelog ==
     29
     30= 1.86 =
     31Bugfixes regarding meta description implementation.
    2932
    3033= 1.85 =
  • s-dev-seo/trunk/sdev-seo.php

    r2278053 r2288083  
    44Plugin Name: S-DEV SEO
    55Description: Add SEO Title and Meta Description fields to posts and pages
    6 Version: 1.85
     6Version: 1.86
    77Author: Rob von Bothmer / SeoDev
    88Author URI: https://www.seodev.se
Note: See TracChangeset for help on using the changeset viewer.