conflict with other lists
-
Hi,
I have modified some code to add style only for pages plugin.
There is no conflict with other listsinit.php
function op_register_styles_backend() { if (is_my_plugin_screen()) { wp_enqueue_style('jQuery-ui-timepicker', op_baseurl() . '/js/jQuery.ui.timepicker/jquery.ui.timepicker.css', false, false, 'all'); wp_enqueue_style('jQuery-ui-style', 'https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css', false, false, 'all'); wp_enqueue_style('opening-hours-backend', apply_filters( 'op_backend_stylesheet', op_baseurl() . '/css/backend.css' ), false, false, 'all'); wp_register_script('jQuery-ui', 'https://code.jquery.com/ui/1.10.3/jquery-ui.js', false, null, false); wp_register_script('jQuery-ui-timepicker', op_baseurl() . '/js/jQuery.ui.timepicker/jquery.ui.timepicker.js', false, null, false); wp_enqueue_script('jQuery-ui'); wp_enqueue_script('jQuery-ui-timepicker'); } } // Check if we're on our options page function is_my_plugin_screen() { global $parent_file; if ( $parent_file == 'opening-hours') { return true; } else { return false; } } add_action('admin_init', 'op_register_styles_backend');
- The topic ‘conflict with other lists’ is closed to new replies.