Changeset 2288083
- Timestamp:
- 04/21/2020 07:20:06 AM (6 years ago)
- Location:
- s-dev-seo/trunk
- Files:
-
- 3 edited
-
inc/replace.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
sdev-seo.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
s-dev-seo/trunk/inc/replace.php
r2278053 r2288083 45 45 if(!$desc = get_post_meta($post->ID,'sdevseo_desc', true)) { 46 46 $desc = false; 47 } else { 48 $desc = str_replace('%year%', date('Y'), $desc); 49 $desc = addcslashes($desc,'$'); 47 50 } 48 51 49 52 /* 1.84 - Dynamic year implementation */ 50 53 $title = str_replace('%year%', date('Y'), $title); 51 $desc = str_replace('%year%', date('Y'), $desc);52 53 54 $in = ob_get_clean(); 54 55 … … 65 66 66 67 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 } 69 75 } 70 76 … … 85 91 if( (int)$wpse_sdevseo_settings['enable_meta_desc'] === 1 ) { 86 92 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 } 88 98 89 99 } -
s-dev-seo/trunk/readme.txt
r2278053 r2288083 5 5 License URI: http://www.gnu.org/licenses/gpl-2.0.html 6 6 Tags: SEO, Title, Meta Description 7 Stable tag: 1.8 58 Tested up to: 5. 39 Requires at least: 5. 37 Stable tag: 1.86 8 Tested up to: 5.4 9 Requires at least: 5.2 10 10 Requires PHP: 7.0 11 11 … … 27 27 28 28 == Changelog == 29 30 = 1.86 = 31 Bugfixes regarding meta description implementation. 29 32 30 33 = 1.85 = -
s-dev-seo/trunk/sdev-seo.php
r2278053 r2288083 4 4 Plugin Name: S-DEV SEO 5 5 Description: Add SEO Title and Meta Description fields to posts and pages 6 Version: 1.8 56 Version: 1.86 7 7 Author: Rob von Bothmer / SeoDev 8 8 Author URI: https://www.seodev.se
Note: See TracChangeset
for help on using the changeset viewer.