gl_admin_assets
Add scripts for button.
Description
gl_admin_assets( $hook );
Parameters (1)
- 0. $hook
- The hook.
Usage
if ( !function_exists( 'gl_admin_assets' ) ) { require_once '/admin/init.php'; } // The hook. $hook = null; // NOTICE! Understand what this does before running. $result = gl_admin_assets($hook);
Defined (1)
The function is defined in the following location(s).
- /admin/init.php
- function gl_admin_assets( $hook ) {
- global $wp_version;
- if ( version_compare( $wp_version, '3.9', '>=' ) ) {
- if ( in_array( $hook, array('edit.php', 'post.php', 'post-new.php') ) ) {
- ?>
- <style>
- i.g-locker-shortcode-icon {
- background: url("<?php echo G_LOCKER_PLUGIN_URL ?>/assets/admin/img/g-locker-shortcode-icon.png");
- }
- </style>
- <?php
- }
- }
- }