Server IP : 104.21.14.48 / Your IP : 3.136.18.93 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/plugins/wp-parsidate/includes/admin/ |
Upload File : |
<?php defined( 'ABSPATH' ) or exit( 'No direct script access allowed' ); /** * Gutenberg Jalali Calendar * * This package, will add a Jalali calendar to WordPress Gutenberg editor * introduced from version v5.0. * * @author Alireza Dabiri Nejad / Alirdn * @package WP-Parsidate * @subpackage Admin/Gutenber_Jalali_Calendar */ /** * Enqueue Gutenberg Jalali Calendar assets for backend editor. * * @uses {wp-plugins} * @uses {wp-i18n} to internationalize the block's text. * @uses {wp-compose} * @uses {wp-components} * @uses {wp-element} for WP Element abstraction — structure of blocks. * @uses {wp-editor} for WP editor styles. * @uses {wp-edit-post} to internationalize the block's text. * @uses {wp-data} * @uses {wp-date} * @since 3.0.0 */ if ( ! function_exists( 'wpp_gutenberg_jalali_calendar_editor_assets' ) ) { function wpp_gutenberg_jalali_calendar_editor_assets() { wp_enqueue_script( 'wpp_gutenberg_jalali_calendar_editor_scripts', WP_PARSI_URL . 'assets/js/gutenberg-jalali-calendar.build.js', array( 'wp-plugins', 'wp-i18n', 'wp-compose', 'wp-components', 'wp-element', 'wp-editor', 'wp-edit-post', 'wp-data', 'wp-date' ), true ); // Styles. wp_enqueue_style( 'wpp_gutenberg_jalali_calendar_editor_styles', WP_PARSI_URL . 'assets/css/gutenberg-jalali-calendar.build.css', array( 'wp-edit-blocks' ) ); } } // Hook: Editor assets. if ( version_compare( get_bloginfo( 'version' ), '5.0.0', '>=' ) && wpp_is_active( 'persian_date' ) ) { add_action( 'enqueue_block_editor_assets', 'wpp_gutenberg_jalali_calendar_editor_assets' ); }