Merge pull request #5440 from toddlahman/master

Use WP SEO class method rather than deprecated fn
This commit is contained in:
Mike Jolley 2014-05-07 14:48:35 +01:00
commit 588242e5bd
1 changed files with 4 additions and 3 deletions

View File

@ -193,7 +193,7 @@ class WC_Query {
$q->is_archive = true;
// Fix WP SEO
if ( function_exists( 'wpseo_get_value' ) ) {
if ( class_exists( 'WPSEO_Meta' ) ) {
add_filter( 'wpseo_metadesc', array( $this, 'wpseo_metadesc' ) );
add_filter( 'wpseo_metakey', array( $this, 'wpseo_metakey' ) );
}
@ -263,7 +263,8 @@ class WC_Query {
* @return string
*/
public function wpseo_metadesc() {
return wpseo_get_value( 'metadesc', wc_get_page_id('shop') );
return WPSEO_Meta::get_value( 'metadesc', wc_get_page_id('shop') );
}
@ -275,7 +276,7 @@ class WC_Query {
* @return string
*/
public function wpseo_metakey() {
return wpseo_get_value( 'metakey', wc_get_page_id('shop') );
return WPSEO_Meta::get_value( 'metakey', wc_get_page_id('shop') );
}