PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 4.0.0
پارسی دیت – Parsi Date v4.0.0
6.1 5.1.6 5.1.7 5.1.8 5.1.8.2 6.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.0.0-alpha 2.1 2.1.1 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0.1 2.3.0.2 2.3.1 2.3.2 2.3.3 2.3.4 3.0.1 3.0.2 3.0.3 4.0.0 4.0.1 4.0.2 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5
wp-parsidate / includes / admin / gutenberg-jalali-calendar.php
wp-parsidate / includes / admin Last commit date
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
gutenberg-jalali-calendar.php
62 lines
1 <?php
2
3 defined( 'ABSPATH' ) or exit( 'No direct script access allowed' );
4
5 /**
6 * Gutenberg Jalali Calendar
7 *
8 * This package, will add a Jalali calendar to WordPress Gutenberg editor
9 * introduced from version v5.0.
10 *
11 * @author Alireza Dabiri Nejad / Alirdn
12 * @package WP-Parsidate
13 * @subpackage Admin/Gutenber_Jalali_Calendar
14 */
15
16 /**
17 * Enqueue Gutenberg Jalali Calendar assets for backend editor.
18 *
19 * @uses {wp-plugins}
20 * @uses {wp-i18n} to internationalize the block's text.
21 * @uses {wp-compose}
22 * @uses {wp-components}
23 * @uses {wp-element} for WP Element abstraction — structure of blocks.
24 * @uses {wp-editor} for WP editor styles.
25 * @uses {wp-edit-post} to internationalize the block's text.
26 * @uses {wp-data}
27 * @uses {wp-date}
28 * @since 3.0.0
29 */
30 if ( ! function_exists( 'wpp_gutenberg_jalali_calendar_editor_assets' ) ) {
31 function wpp_gutenberg_jalali_calendar_editor_assets() {
32 wp_enqueue_script(
33 'wpp_gutenberg_jalali_calendar_editor_scripts',
34 WP_PARSI_URL . 'assets/js/gutenberg-jalali-calendar.build.js',
35 array(
36 'wp-plugins',
37 'wp-i18n',
38 'wp-compose',
39 'wp-components',
40 'wp-element',
41 'wp-editor',
42 'wp-edit-post',
43 'wp-data',
44 'wp-date'
45 ),
46 true
47 );
48
49 // Styles.
50 wp_enqueue_style(
51 'wpp_gutenberg_jalali_calendar_editor_styles',
52 WP_PARSI_URL . 'assets/css/gutenberg-jalali-calendar.build.css',
53 array( 'wp-edit-blocks' )
54 );
55 }
56 }
57
58 // Hook: Editor assets.
59 if ( version_compare( get_bloginfo( 'version' ), '5.0.0', '>=' ) && wpp_is_active( 'persian_date' ) ) {
60 add_action( 'enqueue_block_editor_assets', 'wpp_gutenberg_jalali_calendar_editor_assets' );
61 }
62