PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / trunk
پارسی دیت – Parsi Date vtrunk
6.2.1 6.2 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 / inc / Admin / AdminConvert.php
wp-parsidate / inc / Admin Last commit date
Admin.php 3 months ago AdminAbout.php 1 month ago AdminAssets.php 1 month ago AdminConvert.php 3 months ago AdminCore.php 1 month ago AdminDashboard.php 1 month ago AdminIntegration.php 1 month ago AdminPages.php 1 month ago AdminSettings.php 1 month ago AdminTools.php 1 month ago
AdminConvert.php
46 lines
1 <?php
2
3 namespace WPParsidate\Admin;
4
5 defined( 'ABSPATH' ) || exit;
6
7 class AdminConvert {
8 public const tab = 'convert';
9 public const icon = '<svg viewBox="0 0 24 24" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" transform="matrix(1, 0, 0, 1, 0, 0)rotate(90)"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M10 22C6.22876 22 4.34315 22 3.17157 20.8284C2 19.6569 2 18.7712 2 15" stroke="#3c3c3c" stroke-width="1.5" stroke-linecap="round"></path> <path d="M22 15C22 18.7712 22 19.6569 20.8284 20.8284C19.6569 22 17.7712 22 14 22" stroke="#3c3c3c" stroke-width="1.5" stroke-linecap="round"></path> <path d="M14 2C17.7712 2 19.6569 2 20.8284 3.17157C22 4.34315 22 5.22876 22 9" stroke="#3c3c3c" stroke-width="1.5" stroke-linecap="round"></path> <path d="M10 2C6.22876 2 4.34315 2 3.17157 3.17157C2 4.34315 2 5.22876 2 9" stroke="#3c3c3c" stroke-width="1.5" stroke-linecap="round"></path> <path d="M2 12H22" stroke="#3c3c3c" stroke-width="1.5" stroke-linecap="round"></path> </g></svg>';
10
11 private static ?array $settings = null;
12
13 public function __construct() {
14 add_filter( 'wp_parsidate_menus', [ $this, 'addMenu' ] );
15 add_filter( 'wp_parsidate_' . self::tab . '_settings', [ $this, 'settings' ] );
16 add_filter( 'wp_parsidate_settings', [ $this, 'allSettings' ] );
17 }
18
19 public function addMenu( $menus ) {
20 $menus[ self::tab ] = array(
21 'title' => esc_html__( 'Convert', 'wp-parsidate' ),
22 'icon' => self::icon
23 );
24
25 return $menus;
26 }
27
28 public function allSettings( $settings ): array {
29 $settings[ self::tab ] = $this->settings();
30
31 return $settings;
32 }
33
34 public function settings(): array {
35 if ( self::$settings === null ) {
36 self::$settings = array(
37 'title' => esc_html__( 'Convert settings', 'wp-parsidate' ),
38 'desc' => esc_html__( 'Convert Persian letters and numbers', 'wp-parsidate' ),
39 'settings' => apply_filters( 'wp_parsidate_' . self::tab . '_settings_options', [] )
40 );
41 }
42
43 return self::$settings;
44 }
45 }
46