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
styles-fix.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | defined( 'ABSPATH' ) or exit( 'No direct script access allowed' ); |
| 4 | |
| 5 | /** |
| 6 | * Fix admin styles & TinyMCE editor |
| 7 | * |
| 8 | * @author Morteza Geransayeh |
| 9 | * @package WP-Parsidate |
| 10 | * @subpackage Admin/Styles |
| 11 | */ |
| 12 | |
| 13 | /** |
| 14 | * Fixes themes and plugins RTL style, they should be LTR |
| 15 | * |
| 16 | * @return void |
| 17 | * @since 2.0 |
| 18 | */ |
| 19 | function wpp_fix_editor_rtl() { |
| 20 | $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || wpp_is_active( 'dev_mode' ) ? '' : '.min'; |
| 21 | |
| 22 | wp_enqueue_style( 'functions', WP_PARSI_URL . "assets/css/admin-fix$suffix.css", false, WP_PARSI_VER, 'all' ); |
| 23 | } |
| 24 | |
| 25 | add_action( 'admin_print_styles-plugin-editor.php', 'wpp_fix_editor_rtl', 10 ); |
| 26 | add_action( 'admin_print_styles-theme-editor.php', 'wpp_fix_editor_rtl', 10 ); |
| 27 | |
| 28 | /** |
| 29 | * Fixes TinyMCE font |
| 30 | * |
| 31 | * @return void |
| 32 | * @since 2.0 |
| 33 | */ |
| 34 | function wpp_fix_tinymce_font() { |
| 35 | $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || wpp_is_active( 'dev_mode' ) ? '' : '.min'; |
| 36 | |
| 37 | add_editor_style( WP_PARSI_URL . "assets/css/editor$suffix.css" ); |
| 38 | } |
| 39 | |
| 40 | add_filter( 'init', 'wpp_fix_tinymce_font', 9 ); |