Inventory_Presser_Admin_Location_Meta::load_scripts( string $hook )
load_scripts
Contents
Description Description
Loads stylesheets and JavaScript files on pages that edit terms.
Parameters Parameters
- $hook
-
(string) (Required) The file name of the current page
Return Return
(void)
Source Source
File: includes/admin/class-admin-location-meta.php
function load_scripts( $hook ) { global $current_screen; if ( ( $hook == 'edit-tags.php' || $hook == 'term.php' ) && $current_screen->post_type == INVP::POST_TYPE && $current_screen->taxonomy == 'location' ) { wp_enqueue_style( 'inventory-presser-timepicker-css', plugins_url( '/css/jquery.timepicker.min.css', INVP_PLUGIN_FILE_PATH ) ); wp_enqueue_script( 'inventory-presser-timepicker', plugins_url( '/js/jquery.timepicker.min.js', INVP_PLUGIN_FILE_PATH ), array( 'jquery' ), '1.8.10' ); wp_enqueue_script( 'jquery-ui-sortable' ); wp_enqueue_script( 'inventory-presser-location', plugins_url( '/js/tax-location.min.js', INVP_PLUGIN_FILE_PATH ), array( 'inventory-presser-timepicker', 'jquery-ui-sortable' ) ); } }
Expand full source code Collapse full source code View on Github