Removed author tag and bumped version of templates to 3.5.0, factored out function to one common place.
This commit is contained in:
parent
355d95db9d
commit
ae05d6e5ea
|
@ -3397,3 +3397,23 @@ if ( ! function_exists( 'woocommerce_product_reviews_tab' ) ) {
|
|||
wc_deprecated_function( 'woocommerce_product_reviews_tab', '2.4' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters out the same tags as wp_kses_post, but allows tabindex for <a> element.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @param string $message Content to filter through kses.
|
||||
* @return string
|
||||
*/
|
||||
function wc_kses_notice( $message ) {
|
||||
return wp_kses( $message,
|
||||
array_replace_recursive( // phpcs:ignore PHPCompatibility.PHP.NewFunctions.array_replace_recursiveFound
|
||||
wp_kses_allowed_html( 'post' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'tabindex' => true,
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
* @version 3.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -29,16 +28,7 @@ if ( ! $messages ) {
|
|||
<?php foreach ( $messages as $message ) : ?>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses( $message,
|
||||
array_replace_recursive(
|
||||
wp_kses_allowed_html( 'post' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'tabindex' => true,
|
||||
),
|
||||
)
|
||||
) // phpcs:ignore PHPCompatibility.PHP.NewFunctions.array_replace_recursiveFound
|
||||
);
|
||||
echo wc_kses_notice( $message ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
* @version 3.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -29,16 +28,7 @@ if ( ! $messages ) {
|
|||
<?php foreach ( $messages as $message ) : ?>
|
||||
<div class="woocommerce-info">
|
||||
<?php
|
||||
echo wp_kses( $message,
|
||||
array_replace_recursive(
|
||||
wp_kses_allowed_html( 'post' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'tabindex' => true,
|
||||
),
|
||||
)
|
||||
) // phpcs:ignore PHPCompatibility.PHP.NewFunctions.array_replace_recursiveFound
|
||||
);
|
||||
echo wc_kses_notice( $message ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
* @version 3.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -29,16 +28,7 @@ if ( ! $messages ) {
|
|||
<?php foreach ( $messages as $message ) : ?>
|
||||
<div class="woocommerce-message" role="alert">
|
||||
<?php
|
||||
echo wp_kses( $message,
|
||||
array_replace_recursive(
|
||||
wp_kses_allowed_html( 'post' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'tabindex' => true,
|
||||
),
|
||||
)
|
||||
) // phpcs:ignore PHPCompatibility.PHP.NewFunctions.array_replace_recursiveFound
|
||||
);
|
||||
echo wc_kses_notice( $message ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
|
Loading…
Reference in New Issue