gl_admin_assets

Add scripts for button.

Description

gl_admin_assets( $hook ); 

Parameters (1)

0. $hook
The hook.

Usage

  1. if ( !function_exists( 'gl_admin_assets' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-locker-for-wordpress/admin/init.php'; 
  3.  
  4. // The hook. 
  5. $hook = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gl_admin_assets($hook); 
  9.  

Defined (1)

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

/admin/init.php  
  1. function gl_admin_assets( $hook ) { 
  2.  
  3. global $wp_version; 
  4.  
  5. if ( version_compare( $wp_version, '3.9', '>=' ) ) { 
  6. if ( in_array( $hook, array('edit.php', 'post.php', 'post-new.php') ) ) { 
  7. ?> 
  8. <style> 
  9. i.g-locker-shortcode-icon { 
  10. background: url("<?php echo G_LOCKER_PLUGIN_URL ?>/assets/admin/img/g-locker-shortcode-icon.png"); 
  11. </style> 
  12. <?php