Add ID to apply_filters post_title

This commit is contained in:
Mike Jolley 2012-09-05 20:40:09 +01:00
parent 6c2e00c1c7
commit 43bdc4ce99
3 changed files with 3 additions and 3 deletions

View File

@ -493,7 +493,7 @@ class WC_Product {
*/
function get_title() {
$this->get_post_data();
return apply_filters('woocommerce_product_title', apply_filters('the_title', $this->post->post_title), $this);
return apply_filters('woocommerce_product_title', apply_filters( 'the_title', $this->post->post_title, $this->id ), $this);
}

View File

@ -34,7 +34,7 @@ get_header('shop'); ?>
<?php
$shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title );
echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title, $shop_page->ID );
?>
<?php endif; ?>
</h1>

View File

@ -45,7 +45,7 @@ if ( ! function_exists( 'woocommerce_content' ) ) {
<?php
$shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title );
echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title, $shop_page->ID );
?>
<?php endif; ?>