Only append generator tag on HTML pages Closes #5113
This commit is contained in:
parent
fa089f7c0d
commit
26b5ffa3d0
|
@ -127,8 +127,16 @@ function wc_products_rss_feed() {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function wc_generator_tag() {
|
||||
echo "\n\n" . '<!-- WooCommerce Version -->' . "\n" . '<meta name="generator" content="WooCommerce ' . esc_attr( WC_VERSION ) . '" />' . "\n\n";
|
||||
function wc_generator_tag( $gen, $type ) {
|
||||
switch ( $type ) {
|
||||
case 'html':
|
||||
$gen .= "\n" . '<meta name="generator" content="WooCommerce ' . esc_attr( WC_VERSION ) . '">';
|
||||
break;
|
||||
case 'xhtml':
|
||||
$gen .= "\n" . '<meta name="generator" content="WooCommerce ' . esc_attr( WC_VERSION ) . '" />';
|
||||
break;
|
||||
}
|
||||
return $gen;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,7 +22,8 @@ add_filter( 'post_class', 'wc_product_post_class', 20, 3 );
|
|||
* @see wc_generator_tag()
|
||||
*/
|
||||
add_action( 'wp_head', 'wc_products_rss_feed' );
|
||||
add_action( 'wp_head', 'wc_generator_tag' );
|
||||
add_action( 'get_the_generator_html', 'wc_generator_tag', 10, 2 );
|
||||
add_action( 'get_the_generator_xhtml', 'wc_generator_tag', 10, 2 );
|
||||
|
||||
/**
|
||||
* Content Wrappers
|
||||
|
|
Loading…
Reference in New Issue