wp_super_cache_admin_enqueue_scripts()
Load JavaScript on admin pages.
No Hooks.
Return
null
. Nothing (null).
Usage
wp_super_cache_admin_enqueue_scripts( $hook );
- $hook (required)
- -
wp_super_cache_admin_enqueue_scripts() wp super cache admin enqueue scripts code WPSCache 1.12.4
function wp_super_cache_admin_enqueue_scripts( $hook ) { if ( 'settings_page_wpsupercache' !== $hook ) { return; } wp_enqueue_script( 'wp-super-cache-admin', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/admin.js', array( 'jquery' ), WPSC_VERSION_ID, false ); wp_localize_script( 'wp-super-cache-admin', 'wpscAdmin', array( 'boostNoticeDismissNonce' => wp_create_nonce( 'wpsc_dismiss_boost_notice' ), 'boostDismissNonce' => wp_create_nonce( 'wpsc_dismiss_boost_banner' ), 'boostInstallNonce' => wp_create_nonce( 'updates' ), 'boostActivateNonce' => wp_create_nonce( 'activate-boost' ), ) ); }