$responsive_menu, ) ); } //* HTML5 shiv. wp_enqueue_script( 'html5shiv' ); $wp_scripts->add_data( 'html5shiv', 'conditional', 'lt IE 9' ); } /** * Conditionally enqueues the scripts used in the admin. * * @since 1.0.0 */ add_action( 'admin_enqueue_scripts', 'bizznis_load_admin_scripts' ); function bizznis_load_admin_scripts( $hook_suffix ) { // If we're on a Bizznis admin screen. if ( bizznis_is_menu_page( 'bizznis' ) ) { bizznis_load_admin_js(); } } /** * Enqueues the custom script used in the admin, and localizes several strings or values used in the scripts. * * @since 1.0.0 */ function bizznis_load_admin_js() { wp_enqueue_script( 'bizznis_admin_js', BIZZNIS_ASSETS_JS_URL . '/admin.js', array( 'jquery' ), PARENT_THEME_VERSION, true ); // Strings. $strings = array( 'categoryChecklistToggle' => __( 'Select / Deselect All', 'bizznis' ), 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.', 'bizznis' ), 'confirmUpgrade' => __( 'Updating Bizznis will overwrite the current installed version of Bizznis. Are you sure you want to update?. "Cancel" to stop, "OK" to update.', 'bizznis' ), 'confirmReset' => __( 'Are you sure you want to reset?', 'bizznis' ), ); wp_localize_script( 'bizznis_admin_js', 'bizznisL10n', $strings ); }