Last active
October 22, 2021 00:04
-
-
Save pavelrich/dc6e4406767c78f82c4da90dfb498471 to your computer and use it in GitHub Desktop.
FORQY — Custom Settings of the jQuery UI Datepicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! function_exists( 'prefix_scripts_datepicker' ) ) { | |
/** | |
* Custom Settings of the jQuery UI Datepicker | |
* @url https://api.jqueryui.com/datepicker/ | |
*/ | |
function prefix_scripts_datepicker() { | |
$datepicker = ' | |
(function ($) { | |
"use strict"; | |
$(".js-datepicker").datepicker( | |
// YOUR SETTINGS | |
); | |
}(jQuery)); | |
'; | |
wp_add_inline_script( 'jquery-ui-datepicker', $datepicker ); | |
} | |
add_action( 'wp_enqueue_scripts', 'prefix_scripts_datepicker', 90 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment