wff_load_custom_wp_admin_scripts

The Facebook Feed wff load custom wp admin scripts function.

Description

wff_load_custom_wp_admin_scripts( $hook ); 

Parameters (1)

0. $hook
The hook.

Usage

  1. if ( !function_exists( 'wff_load_custom_wp_admin_scripts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'facebook-feed/facebook-feed.php'; 
  3.  
  4. // The hook. 
  5. $hook = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wff_load_custom_wp_admin_scripts($hook); 
  9.  

Defined (1)

The function is defined in the following location(s).

/facebook-feed.php  
  1. function wff_load_custom_wp_admin_scripts($hook) { 
  2.  
  3. if ($hook != 'toplevel_page_wff_setting') {return;} // we dont want to load our js on other pages 
  4.  
  5. wp_register_script( 'wff_custom_wp_admin_js', plugin_dir_url( __FILE__ ) . 'js/my-custom.js', array('jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'wp-color-picker'), false, '1.0.0' ); 
  6. wp_enqueue_script ('wff_custom_wp_admin_js'); 
  7.