datepicker-rtl.php
4 years ago
gutenberg-jalali-calendar.php
4 years ago
lists-fix.php
4 years ago
styles-fix.php
4 years ago
widgets.php
4 years ago
datepicker-rtl.php
29 lines
| 1 | <?php |
| 2 | /** |
| 3 | * RTL jQuery Datepicker |
| 4 | * |
| 5 | * @author Morteza Geransayeh |
| 6 | * @package WP-Parsidate |
| 7 | * @subpackage Admin/jQuery |
| 8 | */ |
| 9 | |
| 10 | /** |
| 11 | * Fixes jQuery Datepicker RTL style and code |
| 12 | * |
| 13 | * @return void |
| 14 | * @since 3.0 |
| 15 | */ |
| 16 | |
| 17 | function wpp_enqueue_datepicker_css() { |
| 18 | wp_enqueue_style( 'wp-parsi-datepicker', WP_PARSI_URL . 'assets/css/jquery-ui.css', false, WP_PARSI_VER, 'all' ); |
| 19 | } |
| 20 | |
| 21 | function wpp_enqueue_datepicker_scripts() { |
| 22 | wp_register_script( 'wpp_ui_datepicker', WP_PARSI_URL . 'assets/js/jquery-ui.js', false, WP_PARSI_VER ); |
| 23 | wp_register_script( 'wpp_datepicker_fa', WP_PARSI_URL . 'assets/js/datepicker.js', false, WP_PARSI_VER ); |
| 24 | wp_enqueue_script( 'wpp_ui_datepicker' ); |
| 25 | wp_enqueue_script( 'wpp_datepicker_fa' ); |
| 26 | } |
| 27 | |
| 28 | add_action( 'admin_enqueue_scripts', 'wpp_enqueue_datepicker_css' ); |
| 29 | add_action( 'admin_enqueue_scripts', 'wpp_enqueue_datepicker_scripts', 9999 ); |