gads_dash_admin_enqueue_styles

The Google Adsense Dashboard gads dash admin enqueue styles function.

Description

gads_dash_admin_enqueue_styles( $hook ); 

Parameters (1)

0. $hook
The hook.

Usage

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

Defined (1)

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

/gads_dash.php  
  1. function gads_dash_admin_enqueue_styles($hook) { 
  2.  
  3. $valid_hooks = array ( 
  4. 'settings_page_Earnings_Dashboard'  
  5. ); 
  6.  
  7. if (! in_array ( $hook, $valid_hooks ) and 'index.php' != $hook) { 
  8. return; 
  9.  
  10. if ('green' == get_option ( 'gads_dash_style' ) || 'index.php' != $hook) { 
  11. wp_register_style ( 'gads_dash', plugins_url ( 'gads_dash.css', __FILE__ ) ); 
  12. wp_enqueue_style ( 'gads_dash' );