Add ID to apply_filters post_title
This commit is contained in:
parent
6c2e00c1c7
commit
43bdc4ce99
|
@ -493,7 +493,7 @@ class WC_Product {
|
||||||
*/
|
*/
|
||||||
function get_title() {
|
function get_title() {
|
||||||
$this->get_post_data();
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ get_header('shop'); ?>
|
||||||
<?php
|
<?php
|
||||||
$shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
|
$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; ?>
|
<?php endif; ?>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
|
@ -45,7 +45,7 @@ if ( ! function_exists( 'woocommerce_content' ) ) {
|
||||||
<?php
|
<?php
|
||||||
$shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
|
$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; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue