Inventory_Presser_Admin_Editor_Sidebar::sidebar_plugin_script_enqueue()
Includes the JavaScript file when editing a vehicle in the dashboard.
Return Return
(void)
Source Source
File: includes/admin/class-admin-editor-sidebar.php
public function sidebar_plugin_script_enqueue() {
// Are we on a post editor page?
global $pagenow, $post;
if ( ! in_array( $pagenow, array( 'post-new.php', 'post.php' ), true ) ) {
return;
}
// Are we editing a vehicle?
if ( empty( $post->post_type ) || INVP::POST_TYPE !== $post->post_type ) {
return;
}
wp_enqueue_script( 'invp-plugin-sidebar' );
}
Expand full source codeCollapse full source codeView on Github