awesomemotive / all-in-one-seo-pack

All in One SEO plugin for WordPress SEO
https://aioseo.com
339 stars 155 forks source link

Broken filter in version 2.3.13 #932

Closed wpsmort closed 7 years ago

wpsmort commented 7 years ago

Reported by Marco Ricca by email

Marco uses the filter below that we provided him back in 2014. This filter adds the comment number to descriptions for paginated comment pages. It's now outputting the comment number twice. This broke in v2.3.13 and is probably related to #899.

add_filter( 'aioseop_description', 'sfwd_description_comment_page_num' );
function sfwd_description_comment_page_num( $description ) {
$cpage = get_query_var( 'cpage' );
if ( !empty( $cpage ) ) $description = "Pag. n.$cpage - " . $description;
return $description;
}
michaeltorbert commented 7 years ago

This was most likely adding the extra apply_filter aioseop_description in aioseop_class.php:2571

Since the filter is applied twice, part of it gets repeated.