Inventory_Presser_Admin_Location_Meta::scripts_and_styles( string $hook )
Loads stylesheets and JavaScript files on pages that edit terms.
On This Page
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
public function scripts_and_styles( $hook ) { global $current_screen; if ( ( 'edit-tags.php' === $hook || 'term.php' === $hook ) && INVP::POST_TYPE === $current_screen->post_type && 'location' === $current_screen->taxonomy ) { $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_style( 'inventory-presser-timepicker-css', plugins_url( "/css/jquery.timepicker{$min}.css", INVP_PLUGIN_FILE_PATH ), array(), INVP_PLUGIN_VERSION ); wp_enqueue_style( 'invp-location-term', plugins_url( "/css/location-term{$min}.css", INVP_PLUGIN_FILE_PATH ), array(), INVP_PLUGIN_VERSION ); wp_enqueue_script( 'inventory-presser-timepicker' ); wp_enqueue_script( 'jquery-ui-sortable' ); wp_enqueue_script( 'inventory-presser-location' ); } }
Expand full source codeCollapse full source codeView on Github