Datepicker not supporting timepicker

WordPress supports only datepicker. If you want to add timepicker in datepicker you have to use jquery-ui-timepicker-addon as extension in your theme or plug-in. Add css and js as below add_action(‘wp_enqueue_scripts’, ‘custom_datepicker’); function custom_datepicker() { //wp_enqueue_script(‘jquery-ui-datepicker’); //wp_enqueue_script(‘jquery-ui-core’); wp_enqueue_script(‘jquery-ui-timepicker-addon’,get_stylesheet_directory_uri().’/js/jquery-ui-timepicker-addon.js’,array()); wp_enqueue_style(‘jquery-ui-timepicker-addon’,get_stylesheet_directory_uri().’/css/jquery-ui-timepicker-addon.css’,array()); wp_enqueue_style(‘jquery-ui’,get_stylesheet_directory_uri().’/css/jquery-ui.css’,array()); } You can download all css and js files from this link http://trentrichardson.com/examples/timepicker/ Call timepicker … Read more

Custom options page checkbox will not save, despite working with text

Don’t comment out your validation code remember you are using it to validate the data, so its returning nothing right now, so its saving nothing, try this: add_action(‘admin_bar_menu’, ‘make_parent_node’, 999); function make_parent_node($wp_admin_bar) { $args = array( ‘id’ => ‘test1234’, // id of the existing child node (New > Post) ‘title’ => ‘test’, // alter the … Read more

Enable/Disable WP options programmatically

I understand what you are trying, to make changing the WP config settings more convenient but I do not think it is possible to change them from a plugin. Constants like WP_DEBUG and DISALLOW_FILE_EDIT are defined in core files, specifically in wp-config.php, according to the Codex and, looking over the source code of this file … Read more

Action on post publish

If your aim is to trigger code when a post is published, as in, the post_status of the post is set to publish, then you can hook into save_post like this: function cc_publish_wpse_263985( $postid ) { // check if post status is ‘publish’ if ( get_post_status( $postid ) == ‘publish’) ) { // do something … Read more

Popup Maker nav menu item not working

You can use something like this, add_filter( ‘wp_nav_menu_items’, ‘your_custom_menu_item’, 10, 2 ); function your_custom_menu_item ( $items, $args ) { if ( $args->theme_location == ‘Primary’ ) { // change the menu location if not Primary $items .= ‘<a class=”request-maintenance-open” href=”#contact_form_pop”>Request Maintenance</a>’; } return $items; }

How to avoid redefining requirejs in plugin when another plugin also uses requirejs

You could take a look at the enqueued scripts in $wp_scripts ($wp_scripts->registered), but the naming could be different (“it’s requirejs but let’s call it loadstuffjs, just because”), so I doubt it’ll be close to perfect. Also, your plugin might be loaded before the other plugin, and they might trigger the problem without you having any … Read more

How can I use a video header that’s over 8MB?

The limit is enforced by _validate_header_video method, registered as validation callback on respective Customizer setting. There is a filter that allows you to hook into the process and manipulate those arguments: add_filter( ‘customize_dynamic_setting_args’, function ( $args, $id ) { if ( ‘header_video’ === $id ) { // change $args[‘validate_callback’] } return $args; }, 10, 2 … Read more