Admin screen strings need to be sanitised to work with chinese chars Closes #4788
This commit is contained in:
parent
7afe12e696
commit
4dcea21d76
|
@ -115,7 +115,7 @@ class WC_Admin_Settings {
|
||||||
|
|
||||||
do_action( 'woocommerce_settings_start' );
|
do_action( 'woocommerce_settings_start' );
|
||||||
|
|
||||||
wp_enqueue_script( 'woocommerce_settings', WC()->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris' ), WC()->version, true );
|
wp_enqueue_script( 'woocommerce_settings', WC()->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris', 'chosen' ), WC()->version, true );
|
||||||
|
|
||||||
wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array(
|
wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array(
|
||||||
'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'woocommerce' )
|
'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'woocommerce' )
|
||||||
|
|
|
@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function wc_get_screen_ids() {
|
function wc_get_screen_ids() {
|
||||||
$wc_screen_id = strtolower( __( 'WooCommerce', 'woocommerce' ) );
|
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
|
||||||
|
|
||||||
return apply_filters( 'woocommerce_screen_ids', array(
|
return apply_filters( 'woocommerce_screen_ids', array(
|
||||||
'toplevel_page_' . $wc_screen_id,
|
'toplevel_page_' . $wc_screen_id,
|
||||||
|
|
Loading…
Reference in New Issue