Use add query arg in customizer links

This commit is contained in:
Mike Jolley 2018-02-05 17:10:39 +00:00
parent 63f95a4498
commit 0ad37a6426
2 changed files with 8 additions and 2 deletions

View File

@ -285,7 +285,10 @@ class WC_Settings_General extends WC_Settings_Page {
<p><?php
/* translators: %s: URL to customizer. */
echo wp_kses( sprintf( __( 'Looking for the store notice setting? It can now be found <a href="%s">in the Customizer</a>.', 'woocommerce' ), esc_url( admin_url( 'customize.php?url=' . wc_get_page_permalink( 'shop' ) . '&autofocus[panel]=woocommerce' ) ) ), array(
echo wp_kses( sprintf( __( 'Looking for the store notice setting? It can now be found <a href="%s">in the Customizer</a>.', 'woocommerce' ), esc_url( add_query_arg( array(
'autofocus[panel]' => 'woocommerce',
'url' => wc_get_page_permalink( 'shop' ),
), admin_url( 'customize.php' ) ) ) ), array(
'a' => array(
'href' => array(),
'title' => array(),

View File

@ -75,7 +75,10 @@ class WC_Settings_Products extends WC_Settings_Page {
<p><?php
/* translators: %s: URL to customizer. */
echo wp_kses( sprintf( __( 'Looking for the product display options? They can now be found in the Customizer. <a href="%s">Go see them in action here.</a>', 'woocommerce' ), esc_url( admin_url( 'customize.php?url=' . wc_get_page_permalink( 'shop' ) . '&autofocus[panel]=woocommerce' ) ) ), array(
echo wp_kses( sprintf( __( 'Looking for the product display options? They can now be found in the Customizer. <a href="%s">Go see them in action here.</a>', 'woocommerce' ), esc_url( add_query_arg( array(
'autofocus[panel]' => 'woocommerce',
'url' => wc_get_page_permalink( 'shop' ),
), admin_url( 'customize.php' ) ) ) ), array(
'a' => array(
'href' => array(),
'title' => array(),