- This topic has 2 replies, 2 voices, and was last updated 7 years, 5 months ago by
cotswoldphoto.
-
AuthorPosts
-
-
August 15, 2014 at 3:01 pm #2246
cotswoldphotoMemberHi
After a bit of digging to find the cause of a problem, I found that Piklist conflicts with this plugin:
You can see the problem by going to the Opening Hours plugin Special Openings settings. With Piklist activated, clicking on the date field will do nothing, whereas without Piklist, a date picker will pop up.
-
August 15, 2014 at 3:45 pm #2250
MarcusMemberHi Cotswold.
From what I can see, (installed opening-hours and checked piklist datepicker fields)
It comes from these lines in Opening Hours init.php file:function op_register_styles_backend() { 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', 'http://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', 'http://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'); }In opening-hours-backend all of the css is changed completely from what piklist has. (due to the same naming conventions)
If you comment out the following:function op_register_styles_backend() { 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', 'http://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', 'http://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'); }You should find that piklist datepickers work again, (at least it did for me) but your styles for opening hours will no longer work.
So either you need to hook into a filter that only loads those styles on an opening hours page or plugin, or Piklist will have to change their naming conventions, or opening hours will need to learn how to load native jquery-ui styles and scripts. (as all of those don’t need to be loaded remotely)
There will probably need to be a more elegant solution, but for the 2 minutes I looked at it, this is what I found.
Marcus
-
August 15, 2014 at 3:52 pm #2251
cotswoldphotoMembermmm
I will have to rethink how I do this then. Thanks for getting back to me.
-
-
AuthorPosts
- You must be logged in to reply to this topic.