Cyr-To-Lat - Version 4.3

Version Description

(14.12.2019) = * Added Chinese table * Tested up to WordPress 5.3 * Tested up to PHP 7.4 * External library wp-background-processing scoped into own namespace to prevent errors in some cases

Download this release

Release Info

Developer mihdan
Plugin Icon 128x128 Cyr-To-Lat
Version 4.3
Comparing to
See all releases

Code changes from version 4.2.3 to 4.3

Files changed (30) hide show
  1. includes/background-processes/class-cyr-to-lat-conversion-process.php → classes/background-processes/class-conversion-process.php +12 -8
  2. includes/background-processes/class-cyr-to-lat-post-conversion-process.php → classes/background-processes/class-post-conversion-process.php +11 -7
  3. includes/background-processes/class-cyr-to-lat-term-conversion-process.php → classes/background-processes/class-term-conversion-process.php +14 -10
  4. includes/class-cyr-to-lat-acf.php → classes/class-acf.php +10 -10
  5. includes/class-cyr-to-lat-admin-notices.php → classes/class-admin-notices.php +10 -8
  6. classes/class-conversion-tables.php +827 -0
  7. includes/class-cyr-to-lat-converter.php → classes/class-converter.php +28 -26
  8. includes/class-cyr-to-lat-main.php → classes/class-main.php +68 -35
  9. includes/class-cyr-to-lat-requirements.php → classes/class-requirements.php +6 -4
  10. includes/class-cyr-to-lat-settings.php → classes/class-settings.php +146 -94
  11. includes/class-cyr-to-lat-wp-cli.php → classes/class-wp-cli.php +20 -13
  12. cyr-to-lat.php +12 -10
  13. dist/js/settings/app.js +1 -1
  14. includes/class-cyr-to-lat-conversion-tables.php +0 -415
  15. languages/cyr2lat-ru_RU.mo +0 -0
  16. languages/cyr2lat-ru_RU.po +69 -56
  17. languages/cyr2lat-sv.mo +0 -0
  18. languages/cyr2lat-sv.po +67 -54
  19. languages/cyr2lat-uk.mo +0 -0
  20. languages/cyr2lat-uk.po +69 -54
  21. lib/wp-background-processing/class-wp-async-request.php +142 -0
  22. lib/wp-background-processing/class-wp-background-process.php +464 -0
  23. readme.txt +16 -11
  24. vendor/a5hleyrich/wp-background-processing/classes/wp-async-request.php +0 -163
  25. vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php +0 -535
  26. vendor/a5hleyrich/wp-background-processing/license.txt +0 -280
  27. vendor/a5hleyrich/wp-background-processing/wp-background-processing.php +0 -20
  28. vendor/composer/autoload_classmap.php +13 -107
  29. vendor/composer/autoload_static.php +13 -107
  30. vendor/composer/installed.json +0 -40
includes/background-processes/class-cyr-to-lat-conversion-process.php → classes/background-processes/class-conversion-process.php RENAMED
@@ -5,10 +5,14 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_Conversion_Process
10
  */
11
- class Cyr_To_Lat_Conversion_Process extends WP_Background_Process {
12
 
13
  /**
14
  * Prefix
@@ -20,14 +24,14 @@ class Cyr_To_Lat_Conversion_Process extends WP_Background_Process {
20
  /**
21
  * Plugin main class
22
  *
23
- * @var Cyr_To_Lat_Main
24
  */
25
  protected $main;
26
 
27
  /**
28
- * Cyr_To_Lat_Conversion_Process constructor
29
  *
30
- * @param Cyr_To_Lat_Main $main Plugin main class.
31
  */
32
  public function __construct( $main ) {
33
  $this->main = $main;
@@ -71,6 +75,7 @@ class Cyr_To_Lat_Conversion_Process extends WP_Background_Process {
71
  return false;
72
  }
73
 
 
74
  /**
75
  * Is process running
76
  *
@@ -78,10 +83,9 @@ class Cyr_To_Lat_Conversion_Process extends WP_Background_Process {
78
  * in a background process.
79
  */
80
  public function is_process_running() {
81
- $is_process_running = parent::is_process_running();
82
-
83
- return $is_process_running;
84
  }
 
85
 
86
  /**
87
  * Log
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
+ use Cyr_To_Lat\KAGG\WP_Background_Processing\WP_Background_Process;
11
+
12
  /**
13
+ * Class Conversion_Process
14
  */
15
+ class Conversion_Process extends WP_Background_Process {
16
 
17
  /**
18
  * Prefix
24
  /**
25
  * Plugin main class
26
  *
27
+ * @var Main
28
  */
29
  protected $main;
30
 
31
  /**
32
+ * Conversion_Process constructor
33
  *
34
+ * @param Main $main Plugin main class.
35
  */
36
  public function __construct( $main ) {
37
  $this->main = $main;
75
  return false;
76
  }
77
 
78
+ // phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod.Found
79
  /**
80
  * Is process running
81
  *
83
  * in a background process.
84
  */
85
  public function is_process_running() {
86
+ return parent::is_process_running();
 
 
87
  }
88
+ // phpcs:enable Generic.CodeAnalysis.UselessOverridingMethod.Found
89
 
90
  /**
91
  * Log
includes/background-processes/class-cyr-to-lat-post-conversion-process.php → classes/background-processes/class-post-conversion-process.php RENAMED
@@ -5,10 +5,14 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_Post_Conversion_Process
10
  */
11
- class Cyr_To_Lat_Post_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
12
 
13
  /**
14
  * Site locale.
@@ -32,9 +36,9 @@ class Cyr_To_Lat_Post_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
32
  protected $action = CYR_TO_LAT_POST_CONVERSION_ACTION;
33
 
34
  /**
35
- * Cyr_To_Lat_Post_Conversion_Process constructor.
36
  *
37
- * @param Cyr_To_Lat_Main $main Plugin main class.
38
  */
39
  public function __construct( $main ) {
40
  parent::__construct( $main );
@@ -54,14 +58,14 @@ class Cyr_To_Lat_Post_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
54
  $this->post = $post;
55
  $post_name = urldecode( $post->post_name );
56
 
57
- add_filter( 'locale', array( $this, 'filter_post_locale' ) );
58
  $sanitized_name = sanitize_title( $post_name );
59
- remove_filter( 'locale', array( $this, 'filter_post_locale' ) );
60
 
61
  if ( urldecode( $sanitized_name ) !== $post_name ) {
62
  update_post_meta( $post->ID, '_wp_old_slug', $post_name );
63
  // phpcs:disable WordPress.DB.DirectDatabaseQuery
64
- $wpdb->update( $wpdb->posts, array( 'post_name' => $sanitized_name ), array( 'ID' => $post->ID ) );
65
  // phpcs:enable
66
 
67
  $this->log( __( 'Post slug converted:', 'cyr2lat' ) . ' ' . $post_name . ' => ' . urldecode( $sanitized_name ) );
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
+ use stdClass;
11
+
12
  /**
13
+ * Class Post_Conversion_Process
14
  */
15
+ class Post_Conversion_Process extends Conversion_Process {
16
 
17
  /**
18
  * Site locale.
36
  protected $action = CYR_TO_LAT_POST_CONVERSION_ACTION;
37
 
38
  /**
39
+ * Post_Conversion_Process constructor.
40
  *
41
+ * @param Main $main Plugin main class.
42
  */
43
  public function __construct( $main ) {
44
  parent::__construct( $main );
58
  $this->post = $post;
59
  $post_name = urldecode( $post->post_name );
60
 
61
+ add_filter( 'locale', [ $this, 'filter_post_locale' ] );
62
  $sanitized_name = sanitize_title( $post_name );
63
+ remove_filter( 'locale', [ $this, 'filter_post_locale' ] );
64
 
65
  if ( urldecode( $sanitized_name ) !== $post_name ) {
66
  update_post_meta( $post->ID, '_wp_old_slug', $post_name );
67
  // phpcs:disable WordPress.DB.DirectDatabaseQuery
68
+ $wpdb->update( $wpdb->posts, [ 'post_name' => $sanitized_name ], [ 'ID' => $post->ID ] );
69
  // phpcs:enable
70
 
71
  $this->log( __( 'Post slug converted:', 'cyr2lat' ) . ' ' . $post_name . ' => ' . urldecode( $sanitized_name ) );
includes/background-processes/class-cyr-to-lat-term-conversion-process.php → classes/background-processes/class-term-conversion-process.php RENAMED
@@ -5,10 +5,14 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_Term_Conversion_Process
10
  */
11
- class Cyr_To_Lat_Term_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
12
 
13
  /**
14
  * Site locale.
@@ -32,9 +36,9 @@ class Cyr_To_Lat_Term_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
32
  protected $action = CYR_TO_LAT_TERM_CONVERSION_ACTION;
33
 
34
  /**
35
- * Cyr_To_Lat_Term_Conversion_Process constructor.
36
  *
37
- * @param Cyr_To_Lat_Main $main Plugin main class.
38
  */
39
  public function __construct( $main ) {
40
  parent::__construct( $main );
@@ -54,13 +58,13 @@ class Cyr_To_Lat_Term_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
54
  $this->term = $term;
55
  $slug = urldecode( $term->slug );
56
 
57
- add_filter( 'locale', array( $this, 'filter_term_locale' ) );
58
  $sanitized_slug = sanitize_title( $slug );
59
- remove_filter( 'locale', array( $this, 'filter_term_locale' ) );
60
 
61
  if ( urldecode( $sanitized_slug ) !== $slug ) {
62
  // phpcs:disable WordPress.DB.DirectDatabaseQuery
63
- $wpdb->update( $wpdb->terms, array( 'slug' => $sanitized_slug ), array( 'term_id' => $term->term_id ) );
64
  // phpcs:enable
65
 
66
  $this->log( __( 'Term slug converted:', 'cyr2lat' ) . ' ' . $slug . ' => ' . urldecode( $sanitized_slug ) );
@@ -84,10 +88,10 @@ class Cyr_To_Lat_Term_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
84
  * @return string
85
  */
86
  public function filter_term_locale() {
87
- $args = array(
88
  'element_type' => $this->term->taxonomy,
89
  'element_id' => $this->term->term_taxonomy_id,
90
- );
91
 
92
  $wpml_element_language_details = apply_filters( 'wpml_element_language_details', false, $args );
93
 
@@ -97,7 +101,7 @@ class Cyr_To_Lat_Term_Conversion_Process extends Cyr_To_Lat_Conversion_Process {
97
 
98
  $language_code = $wpml_element_language_details->language_code;
99
 
100
- $wpml_active_languages = apply_filters( 'wpml_active_languages', false, array() );
101
 
102
  return isset( $wpml_active_languages[ $language_code ]['default_locale'] ) ?
103
  $wpml_active_languages[ $language_code ]['default_locale'] : $this->locale;
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
+ use stdClass;
11
+
12
  /**
13
+ * Class Term_Conversion_Process
14
  */
15
+ class Term_Conversion_Process extends Conversion_Process {
16
 
17
  /**
18
  * Site locale.
36
  protected $action = CYR_TO_LAT_TERM_CONVERSION_ACTION;
37
 
38
  /**
39
+ * Term_Conversion_Process constructor.
40
  *
41
+ * @param Main $main Plugin main class.
42
  */
43
  public function __construct( $main ) {
44
  parent::__construct( $main );
58
  $this->term = $term;
59
  $slug = urldecode( $term->slug );
60
 
61
+ add_filter( 'locale', [ $this, 'filter_term_locale' ] );
62
  $sanitized_slug = sanitize_title( $slug );
63
+ remove_filter( 'locale', [ $this, 'filter_term_locale' ] );
64
 
65
  if ( urldecode( $sanitized_slug ) !== $slug ) {
66
  // phpcs:disable WordPress.DB.DirectDatabaseQuery
67
+ $wpdb->update( $wpdb->terms, [ 'slug' => $sanitized_slug ], [ 'term_id' => $term->term_id ] );
68
  // phpcs:enable
69
 
70
  $this->log( __( 'Term slug converted:', 'cyr2lat' ) . ' ' . $slug . ' => ' . urldecode( $sanitized_slug ) );
88
  * @return string
89
  */
90
  public function filter_term_locale() {
91
+ $args = [
92
  'element_type' => $this->term->taxonomy,
93
  'element_id' => $this->term->term_taxonomy_id,
94
+ ];
95
 
96
  $wpml_element_language_details = apply_filters( 'wpml_element_language_details', false, $args );
97
 
101
 
102
  $language_code = $wpml_element_language_details->language_code;
103
 
104
+ $wpml_active_languages = apply_filters( 'wpml_active_languages', false, [] );
105
 
106
  return isset( $wpml_active_languages[ $language_code ]['default_locale'] ) ?
107
  $wpml_active_languages[ $language_code ]['default_locale'] : $this->locale;
includes/class-cyr-to-lat-acf.php → classes/class-acf.php RENAMED
@@ -5,22 +5,24 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_ACF
10
  */
11
- class Cyr_To_Lat_ACF {
12
 
13
  /**
14
  * Plugin settings.
15
  *
16
- * @var Cyr_To_Lat_Settings
17
  */
18
  private $settings;
19
 
20
  /**
21
- * Cyr_To_Lat_ACF constructor.
22
  *
23
- * @param Cyr_To_Lat_Settings $settings Plugin settings.
24
  */
25
  public function __construct( $settings ) {
26
  $this->settings = $settings;
@@ -32,7 +34,7 @@ class Cyr_To_Lat_ACF {
32
  * Init class hooks.
33
  */
34
  public function init_hooks() {
35
- add_action( 'acf/field_group/admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
36
  }
37
 
38
  /**
@@ -44,14 +46,12 @@ class Cyr_To_Lat_ACF {
44
  wp_enqueue_script(
45
  'cyr-to-lat-acf-field-group',
46
  CYR_TO_LAT_URL . '/js/acf-field-group.js',
47
- array(),
48
  CYR_TO_LAT_VERSION,
49
  true
50
  );
51
 
52
- $object = array(
53
- 'table' => $table,
54
- );
55
 
56
  wp_localize_script( 'cyr-to-lat-acf-field-group', 'CyrToLatAcfFieldGroup', $object );
57
  }
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
  /**
11
+ * Class ACF
12
  */
13
+ class ACF {
14
 
15
  /**
16
  * Plugin settings.
17
  *
18
+ * @var Settings
19
  */
20
  private $settings;
21
 
22
  /**
23
+ * ACF constructor.
24
  *
25
+ * @param Settings $settings Plugin settings.
26
  */
27
  public function __construct( $settings ) {
28
  $this->settings = $settings;
34
  * Init class hooks.
35
  */
36
  public function init_hooks() {
37
+ add_action( 'acf/field_group/admin_enqueue_scripts', [ $this, 'enqueue_script' ] );
38
  }
39
 
40
  /**
46
  wp_enqueue_script(
47
  'cyr-to-lat-acf-field-group',
48
  CYR_TO_LAT_URL . '/js/acf-field-group.js',
49
+ [],
50
  CYR_TO_LAT_VERSION,
51
  true
52
  );
53
 
54
+ $object = [ 'table' => $table ];
 
 
55
 
56
  wp_localize_script( 'cyr-to-lat-acf-field-group', 'CyrToLatAcfFieldGroup', $object );
57
  }
includes/class-cyr-to-lat-admin-notices.php → classes/class-admin-notices.php RENAMED
@@ -5,25 +5,27 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_Admin_Notices
10
  *
11
- * @class Cyr_To_Lat_Admin_Notices
12
  */
13
- class Cyr_To_Lat_Admin_Notices {
14
 
15
  /**
16
  * Admin notices array.
17
  *
18
  * @var array
19
  */
20
- private $notices = array();
21
 
22
  /**
23
- * Cyr_To_Lat_Admin_Notices constructor.
24
  */
25
  public function __construct() {
26
- add_action( 'admin_notices', array( $this, 'show_notices' ) );
27
  }
28
 
29
  /**
@@ -34,10 +36,10 @@ class Cyr_To_Lat_Admin_Notices {
34
  * is-dismissible.
35
  */
36
  public function add_notice( $message, $class = 'notice' ) {
37
- $this->notices[] = array(
38
  'message' => $message,
39
  'class' => $class,
40
- );
41
  }
42
 
43
  /**
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
  /**
11
+ * Class Admin_Notices
12
  *
13
+ * @class Admin_Notices
14
  */
15
+ class Admin_Notices {
16
 
17
  /**
18
  * Admin notices array.
19
  *
20
  * @var array
21
  */
22
+ private $notices = [];
23
 
24
  /**
25
+ * Admin_Notices constructor.
26
  */
27
  public function __construct() {
28
+ add_action( 'admin_notices', [ $this, 'show_notices' ] );
29
  }
30
 
31
  /**
36
  * is-dismissible.
37
  */
38
  public function add_notice( $message, $class = 'notice' ) {
39
+ $this->notices[] = [
40
  'message' => $message,
41
  'class' => $class,
42
+ ];
43
  }
44
 
45
  /**
classes/class-conversion-tables.php ADDED
@@ -0,0 +1,827 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Conversion tables.
4
+ *
5
+ * @package cyr-to-lat
6
+ */
7
+
8
+ namespace Cyr_To_Lat;
9
+
10
+ use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
11
+
12
+ /**
13
+ * Class Conversion_Tables
14
+ *
15
+ * @class Conversion_Tables
16
+ */
17
+ class Conversion_Tables {
18
+
19
+ /**
20
+ * Get conversion table by locale.
21
+ *
22
+ * @link https://ru.wikipedia.org/wiki/ISO_9
23
+ *
24
+ * @param string $locale WordPress locale.
25
+ *
26
+ * @return array
27
+ */
28
+ public static function get( $locale = '' ) {
29
+ $table = [
30
+ 'А' => 'A',
31
+ 'Б' => 'B',
32
+ 'В' => 'V',
33
+ 'Г' => 'G',
34
+ 'Д' => 'D',
35
+ 'Е' => 'E',
36
+ 'Ё' => 'YO',
37
+ 'Ж' => 'ZH',
38
+ 'З' => 'Z',
39
+ 'И' => 'I',
40
+ 'Й' => 'J',
41
+ 'І' => 'I',
42
+ 'К' => 'K',
43
+ 'Л' => 'L',
44
+ 'М' => 'M',
45
+ 'Н' => 'N',
46
+ 'О' => 'O',
47
+ 'П' => 'P',
48
+ 'Р' => 'R',
49
+ 'С' => 'S',
50
+ 'Т' => 'T',
51
+ 'У' => 'U',
52
+ 'Ф' => 'F',
53
+ 'Х' => 'H',
54
+ 'Ц' => 'CZ',
55
+ 'Ч' => 'CH',
56
+ 'Ш' => 'SH',
57
+ 'Щ' => 'SHH',
58
+ 'Ъ' => '',
59
+ 'Ы' => 'Y',
60
+ 'Ь' => '',
61
+ 'Э' => 'E',
62
+ 'Ю' => 'YU',
63
+ 'Я' => 'YA',
64
+ 'Ѣ' => 'YE',
65
+ 'Ѳ' => 'FH',
66
+ 'Ѵ' => 'YH',
67
+ 'а' => 'a',
68
+ 'б' => 'b',
69
+ 'в' => 'v',
70
+ 'г' => 'g',
71
+ 'д' => 'd',
72
+ 'е' => 'e',
73
+ 'ё' => 'yo',
74
+ 'ж' => 'zh',
75
+ 'з' => 'z',
76
+ 'и' => 'i',
77
+ 'й' => 'j',
78
+ 'і' => 'i',
79
+ 'к' => 'k',
80
+ 'л' => 'l',
81
+ 'м' => 'm',
82
+ 'н' => 'n',
83
+ 'о' => 'o',
84
+ 'п' => 'p',
85
+ 'р' => 'r',
86
+ 'с' => 's',
87
+ 'т' => 't',
88
+ 'у' => 'u',
89
+ 'ф' => 'f',
90
+ 'х' => 'h',
91
+ 'ц' => 'cz',
92
+ 'ч' => 'ch',
93
+ 'ш' => 'sh',
94
+ 'щ' => 'shh',
95
+ 'ъ' => '',
96
+ 'ы' => 'y',
97
+ 'ь' => '',
98
+ 'э' => 'e',
99
+ 'ю' => 'yu',
100
+ 'я' => 'ya',
101
+ 'ѣ' => 'ye',
102
+ 'ѳ' => 'fh',
103
+ 'ѵ' => 'yh',
104
+ ];
105
+ switch ( $locale ) {
106
+ // Belorussian.
107
+ case 'bel':
108
+ unset( $table['И'] );
109
+ unset( $table['и'] );
110
+ $table['Ў'] = 'U';
111
+ $table['ў'] = 'u';
112
+ unset( $table['Щ'] );
113
+ unset( $table['щ'] );
114
+ unset( $table['Ъ'] );
115
+ unset( $table['ъ'] );
116
+ unset( $table['Ѣ'] );
117
+ unset( $table['ѣ'] );
118
+ unset( $table['Ѳ'] );
119
+ unset( $table['ѳ'] );
120
+ unset( $table['Ѵ'] );
121
+ unset( $table['ѵ'] );
122
+ break;
123
+ // Ukrainian.
124
+ case 'uk':
125
+ $table['Ґ'] = 'G';
126
+ $table['ґ'] = 'g';
127
+ unset( $table['Ё'] );
128
+ unset( $table['ё'] );
129
+ $table['Є'] = 'YE';
130
+ $table['є'] = 'ye';
131
+ $table['И'] = 'Y';
132
+ $table['и'] = 'y';
133
+ $table['Ї'] = 'YI';
134
+ $table['ї'] = 'yi';
135
+ unset( $table['Ъ'] );
136
+ unset( $table['ъ'] );
137
+ unset( $table['Ы'] );
138
+ unset( $table['ы'] );
139
+ unset( $table['Э'] );
140
+ unset( $table['э'] );
141
+ unset( $table['Ѣ'] );
142
+ unset( $table['ѣ'] );
143
+ unset( $table['Ѳ'] );
144
+ unset( $table['ѳ'] );
145
+ unset( $table['Ѵ'] );
146
+ unset( $table['ѵ'] );
147
+ break;
148
+ // Bulgarian.
149
+ case 'bg_BG':
150
+ unset( $table['Ё'] );
151
+ unset( $table['ё'] );
152
+ $table['Щ'] = 'STH';
153
+ $table['щ'] = 'sth';
154
+ $table['Ъ'] = 'A';
155
+ $table['ъ'] = 'a';
156
+ unset( $table['Ы'] );
157
+ unset( $table['ы'] );
158
+ unset( $table['Э'] );
159
+ unset( $table['э'] );
160
+ $table['Ѫ'] = 'О';
161
+ $table['ѫ'] = 'о';
162
+ break;
163
+ // Macedonian.
164
+ case 'mk_MK':
165
+ $table['Ѓ'] = 'G';
166
+ $table['ѓ'] = 'g';
167
+ unset( $table['Ё'] );
168
+ unset( $table['ё'] );
169
+ $table['Ѕ'] = 'Z';
170
+ $table['ѕ'] = 'z';
171
+ unset( $table['Й'] );
172
+ unset( $table['й'] );
173
+ $table['Ј'] = 'J';
174
+ $table['ј'] = 'j';
175
+ unset( $table['I'] );
176
+ unset( $table['i'] );
177
+ $table['Ќ'] = 'K';
178
+ $table['ќ'] = 'k';
179
+ $table['Љ'] = 'L';
180
+ $table['љ'] = 'l';
181
+ $table['Њ'] = 'N';
182
+ $table['њ'] = 'n';
183
+ $table['Џ'] = 'DH';
184
+ $table['џ'] = 'dh';
185
+ unset( $table['Щ'] );
186
+ unset( $table['щ'] );
187
+ unset( $table['Ъ'] );
188
+ unset( $table['ъ'] );
189
+ unset( $table['Ы'] );
190
+ unset( $table['ы'] );
191
+ unset( $table['Ь'] );
192
+ unset( $table['ь'] );
193
+ unset( $table['Э'] );
194
+ unset( $table['э'] );
195
+ unset( $table['Ю'] );
196
+ unset( $table['ю'] );
197
+ unset( $table['Я'] );
198
+ unset( $table['я'] );
199
+ unset( $table['Ѣ'] );
200
+ unset( $table['ѣ'] );
201
+ unset( $table['Ѳ'] );
202
+ unset( $table['ѳ'] );
203
+ unset( $table['Ѵ'] );
204
+ unset( $table['ѵ'] );
205
+ break;
206
+ // Serbian.
207
+ case 'sr_RS':
208
+ $table['Ђ'] = 'Dj';
209
+ $table['ђ'] = 'dj';
210
+ unset( $table['Ё'] );
211
+ unset( $table['ё'] );
212
+ $table['Ж'] = 'Z';
213
+ $table['ж'] = 'z';
214
+ unset( $table['Й'] );
215
+ unset( $table['й'] );
216
+ unset( $table['І'] );
217
+ unset( $table['і'] );
218
+ $table['J'] = 'J';
219
+ $table['j'] = 'j';
220
+ $table['Љ'] = 'Lj';
221
+ $table['љ'] = 'lj';
222
+ $table['Њ'] = 'Nj';
223
+ $table['њ'] = 'nj';
224
+ $table['Ћ'] = 'C';
225
+ $table['ћ'] = 'c';
226
+ $table['Ц'] = 'C';
227
+ $table['ц'] = 'c';
228
+ $table['Ч'] = 'C';
229
+ $table['ч'] = 'c';
230
+ $table['Џ'] = 'Dz';
231
+ $table['џ'] = 'dz';
232
+ $table['Ш'] = 'S';
233
+ $table['ш'] = 's';
234
+ unset( $table['Щ'] );
235
+ unset( $table['щ'] );
236
+ unset( $table['Ъ'] );
237
+ unset( $table['ъ'] );
238
+ unset( $table['Ы'] );
239
+ unset( $table['ы'] );
240
+ unset( $table['Ь'] );
241
+ unset( $table['ь'] );
242
+ unset( $table['Э'] );
243
+ unset( $table['э'] );
244
+ unset( $table['Ю'] );
245
+ unset( $table['ю'] );
246
+ unset( $table['Я'] );
247
+ unset( $table['я'] );
248
+ unset( $table['Ѣ'] );
249
+ unset( $table['ѣ'] );
250
+ unset( $table['Ѳ'] );
251
+ unset( $table['ѳ'] );
252
+ unset( $table['Ѵ'] );
253
+ unset( $table['ѵ'] );
254
+ break;
255
+ // Georgian.
256
+ case 'ka_GE':
257
+ $table['ა'] = 'a';
258
+ $table['ბ'] = 'b';
259
+ $table['გ'] = 'g';
260
+ $table['დ'] = 'd';
261
+ $table['ე'] = 'e';
262
+ $table['ვ'] = 'v';
263
+ $table['ზ'] = 'z';
264
+ $table['თ'] = 'th';
265
+ $table['ი'] = 'i';
266
+ $table['კ'] = 'k';
267
+ $table['ლ'] = 'l';
268
+ $table['მ'] = 'm';
269
+ $table['ნ'] = 'n';
270
+ $table['ო'] = 'o';
271
+ $table['პ'] = 'p';
272
+ $table['ჟ'] = 'zh';
273
+ $table['რ'] = 'r';
274
+ $table['ს'] = 's';
275
+ $table['ტ'] = 't';
276
+ $table['უ'] = 'u';
277
+ $table['ფ'] = 'ph';
278
+ $table['ქ'] = 'q';
279
+ $table['ღ'] = 'gh';
280
+ $table['ყ'] = 'qh';
281
+ $table['შ'] = 'sh';
282
+ $table['ჩ'] = 'ch';
283
+ $table['ც'] = 'ts';
284
+ $table['ძ'] = 'dz';
285
+ $table['წ'] = 'ts';
286
+ $table['ჭ'] = 'tch';
287
+ $table['ხ'] = 'kh';
288
+ $table['ჯ'] = 'j';
289
+ $table['ჰ'] = 'h';
290
+ break;
291
+ // Kazakh.
292
+ case 'kk':
293
+ $table['Ә'] = 'Ae';
294
+ $table['ә'] = 'ae';
295
+ $table['Ғ'] = 'Gh';
296
+ $table['ғ'] = 'gh';
297
+ unset( $table['Ё'] );
298
+ unset( $table['ё'] );
299
+ $table['Қ'] = 'Q';
300
+ $table['қ'] = 'q';
301
+ $table['Ң'] = 'Ng';
302
+ $table['ң'] = 'ng';
303
+ $table['Ө'] = 'Oe';
304
+ $table['ө'] = 'oe';
305
+ $table['У'] = 'W';
306
+ $table['у'] = 'w';
307
+ $table['Ұ'] = 'U';
308
+ $table['ұ'] = 'u';
309
+ $table['Ү'] = 'Ue';
310
+ $table['ү'] = 'ue';
311
+ $table['Һ'] = 'H';
312
+ $table['һ'] = 'h';
313
+ $table['Ц'] = 'C';
314
+ $table['ц'] = 'c';
315
+ unset( $table['Щ'] );
316
+ unset( $table['щ'] );
317
+ unset( $table['Ъ'] );
318
+ unset( $table['ъ'] );
319
+ unset( $table['Ь'] );
320
+ unset( $table['ь'] );
321
+ unset( $table['Э'] );
322
+ unset( $table['э'] );
323
+ unset( $table['Ю'] );
324
+ unset( $table['ю'] );
325
+ unset( $table['Я'] );
326
+ unset( $table['я'] );
327
+
328
+ // Kazakh 2018 latin.
329
+ $table['Á'] = 'A';
330
+ $table['á'] = 'a';
331
+ $table['Ǵ'] = 'G';
332
+ $table['ǵ'] = 'g';
333
+ $table['I'] = 'I';
334
+ $table['ı'] = 'i';
335
+ $table['Ń'] = 'N';
336
+ $table['ń'] = 'n';
337
+ $table['Ó'] = 'O';
338
+ $table['ó'] = 'o';
339
+ $table['Ú'] = 'O';
340
+ $table['ú'] = 'o';
341
+ $table['Ý'] = 'O';
342
+ $table['ý'] = 'o';
343
+ break;
344
+ // Hebrew.
345
+ case 'he_IL':
346
+ $table = [
347
+ 'א' => '',
348
+ 'ב' => 'b',
349
+ 'ג' => 'g',
350
+ 'ד' => 'd',
351
+ 'ה' => 'h',
352
+ 'ו' => 'w',
353
+ 'ז' => 'z',
354
+ 'ח' => 'x',
355
+ 'ט' => 't',
356
+ 'י' => 'y',
357
+ 'ך' => '',
358
+ 'כ' => 'kh',
359
+ 'ל' => 'l',
360
+ 'ם' => '',
361
+ 'מ' => 'm',
362
+ 'ן' => '',
363
+ 'נ' => 'n',
364
+ 'ס' => 's',
365
+ 'ע' => '',
366
+ 'ף' => '',
367
+ 'פ' => 'ph',
368
+ 'ץ' => '',
369
+ 'צ' => 's',
370
+ 'ק' => 'k',
371
+ 'ר' => 'r',
372
+ 'ש' => 'sh',
373
+ 'ת' => 'th',
374
+ ];
375
+ for ( $code = 0x0590; $code <= 0x05CF; $code ++ ) {
376
+ $table[ Mbstring::mb_chr( $code ) ] = '';
377
+ }
378
+ for ( $code = 0x05F0; $code <= 0x05F5; $code ++ ) {
379
+ $table[ Mbstring::mb_chr( $code ) ] = '';
380
+ }
381
+ for ( $code = 0xFB1D; $code <= 0xFB4F; $code ++ ) {
382
+ $table[ Mbstring::mb_chr( $code ) ] = '';
383
+ }
384
+ break;
385
+ // phpcs:disable PSR2.ControlStructures.SwitchDeclaration.TerminatingComment
386
+ case 'zh_CN':
387
+ case 'zh_HK':
388
+ case 'zh_SG':
389
+ case 'zh_TW':
390
+ // phpcs:enable PSR2.ControlStructures.SwitchDeclaration.TerminatingComment
391
+
392
+ // Chinese dictionary copied from Pinyin Permalinks plugin.
393
+ $table = [
394
+ 'A' => '啊阿吖嗄锕',
395
+ 'Ai' => '埃挨哎唉哀皑癌蔼矮艾碍爱隘捱嗳嫒瑷暧砹锿霭',
396
+ 'An' => '鞍氨安俺按暗岸胺案谙埯揞庵桉铵鹌黯',
397
+ 'Ang' => '肮昂盎',
398
+ 'Ao' => '凹敖熬翱袄傲奥懊澳坳拗嗷岙廒遨媪骜獒聱螯鏊鳌鏖',
399
+ 'Ba' => '芭捌扒叭吧笆八疤巴拔跋靶把坝霸罢爸茇菝岜灞钯粑鲅魃',
400
+ 'Bai' => '白柏百摆佰败拜稗捭掰',
401
+ 'Ban' => '斑班搬扳般颁板版扮拌伴瓣半办绊阪坂钣瘢癍舨',
402
+ 'Bang' => '邦帮梆榜膀绑棒磅蚌镑傍谤蒡浜',
403
+ 'Bao' => '苞胞包褒薄雹保堡饱宝抱报暴豹鲍爆曝勹葆孢煲鸨褓趵龅',
404
+ 'Bei' => '杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶蓓呗悖碚鹎褙鐾鞴',
405
+ 'Ben' => '奔苯本笨畚坌锛',
406
+ 'Beng' => '崩绷甭泵蹦迸嘣甏',
407
+ 'Bi' => '逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必壁臂避陛匕俾荜荸萆薜吡哔狴庳愎滗濞弼妣婢嬖璧贲睥畀铋秕裨筚箅篦舭襞跸髀',
408
+ 'Bian' => '鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥窆褊蝙笾鳊',
409
+ 'Biao' => '标彪膘表婊骠飑飙飚镖镳瘭裱鳔',
410
+ 'Bie' => '鳖憋别瘪蹩',
411
+ 'Bin' => '彬斌濒滨宾摈傧豳缤玢殡膑镔髌鬓',
412
+ 'Bing' => '兵冰柄丙秉饼炳病并禀邴摒槟',
413
+ 'Bo' => '剥玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳卜亳啵饽檗擘礴钹鹁簸跛踣',
414
+ 'Bu' => '捕哺补埠不布步簿部怖卟逋瓿晡钚钸醭',
415
+ 'Ca' => '擦礤',
416
+ 'Cai' => '猜裁材才财睬踩采彩菜蔡',
417
+ 'Can' => '餐参蚕残惭惨灿孱骖璨粲黪',
418
+ 'Cang' => '苍舱仓沧藏伧',
419
+ 'Cao' => '操糙槽曹草嘈漕螬艚',
420
+ 'Ce' => '厕策侧册测恻',
421
+ 'Cen' => '岑涔',
422
+ 'Ceng' => '层蹭曾噌',
423
+ 'Cha' => '插叉茬茶查碴搽察岔差诧嚓猹馇汊姹杈槎檫锸镲衩',
424
+ 'Chai' => '拆柴豺侪钗瘥虿',
425
+ 'Chan' => '搀掺蝉馋谗缠铲产阐颤冁谄蒇廛忏潺澶羼婵骣觇禅蟾躔',
426
+ 'Chang' => '昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅阊娼嫦昶氅鲳',
427
+ 'Chao' => '超抄钞朝嘲潮巢吵炒怊晁焯耖',
428
+ 'Che' => '车扯撤掣彻澈坼砗',
429
+ 'Chen' => '郴臣辰尘晨忱沉陈趁衬谌谶抻嗔宸琛榇碜龀',
430
+ 'Cheng' => '撑称城橙成呈乘程惩澄诚承逞骋秤丞埕枨柽塍瞠铖裎蛏酲',
431
+ 'Chi' => '吃痴持池迟弛驰耻齿侈尺赤翅斥炽傺墀茌叱哧啻嗤彳饬媸敕眵鸱瘛褫蚩螭笞篪豉踟魑',
432
+ 'Chong' => '充冲虫崇宠茺忡憧铳舂艟',
433
+ 'Chou' => '抽酬畴踌稠愁筹仇绸瞅丑臭俦帱惆瘳雠',
434
+ 'Chu' => '初出橱厨躇锄雏滁除楚础储矗搐触处畜亍刍怵憷绌杵楮樗褚蜍蹰黜',
435
+ 'Chuai' => '揣搋啜膪踹',
436
+ 'Chuan' => '川穿椽传船喘串舛遄氚钏舡',
437
+ 'Chuang' => '疮窗床闯创怆',
438
+ 'Chui' => '吹炊捶锤垂陲棰槌',
439
+ 'Chun' => '春椿醇唇淳纯蠢莼鹑蝽',
440
+ 'Chuo' => '戳绰辍踔龊',
441
+ 'Ci' => '疵茨磁雌辞慈瓷词此刺赐次茈祠鹚糍',
442
+ 'Cong' => '聪葱囱匆从丛苁淙骢琮璁枞',
443
+ 'Cou' => '凑楱辏腠',
444
+ 'Cu' => '粗醋簇促蔟徂猝殂蹙蹴',
445
+ 'Cuan' => '蹿篡窜汆撺爨镩',
446
+ 'Cui' => '摧崔催脆瘁粹淬翠萃啐悴璀榱毳',
447
+ 'Cun' => '村存寸忖皴',
448
+ 'Cuo' => '磋撮搓措挫错厝嵯脞锉矬痤鹾蹉',
449
+ 'Da' => '搭达答瘩打大耷哒嗒怛妲沓褡笪靼鞑',
450
+ 'Dai' => '呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨绐玳黛',
451
+ 'Dan' => '耽担丹单郸掸胆旦氮但惮淡诞弹蛋儋凼萏菪啖澹宕殚赕眈疸瘅聃箪',
452
+ 'Dang' => '当挡党荡档谠砀铛裆',
453
+ 'Dao' => '刀捣蹈倒岛祷导到稻悼道盗叨氘焘纛',
454
+ 'De' => '德得的锝',
455
+ 'Deng' => '蹬灯登等瞪凳邓噔嶝戥磴镫簦',
456
+ 'Di' => '堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻荻嘀娣柢棣觌祗砥碲睇镝羝骶',
457
+ 'Dia' => '嗲',
458
+ 'Dian' => '颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫巅玷钿癜癫簟踮',
459
+ 'Diao' => '碉叼雕凋刁掉吊钓调铞貂鲷',
460
+ 'Die' => '跌爹碟蝶迭谍叠垤堞揲喋牒瓞耋鲽',
461
+ 'Ding' => '丁盯叮钉顶鼎锭定订仃啶玎腚碇町疔耵酊',
462
+ 'Diu' => '丢铥',
463
+ 'Dong' => '东冬董懂动栋侗恫冻洞垌咚岽峒氡胨胴硐鸫',
464
+ 'Dou' => '兜抖斗陡豆逗痘都蔸钭窦蚪篼',
465
+ 'Du' => '督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟牍蠹笃髑黩',
466
+ 'Duan' => '端短锻段断缎椴煅簖',
467
+ 'Dui' => '堆兑队对怼憝碓镦',
468
+ 'Dun' => '墩吨蹲敦顿钝盾遁沌炖砘礅盹趸',
469
+ 'Duo' => '掇哆多夺垛躲朵跺舵剁惰堕咄哚沲缍铎裰踱',
470
+ 'E' => '蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩苊莪萼呃愕屙婀轭腭锇锷鹗颚鳄',
471
+ 'Ei' => '诶',
472
+ 'En' => '恩蒽摁嗯',
473
+ 'Er' => '而儿耳尔饵洱二贰迩珥铒鸸鲕',
474
+ 'Fa' => '发罚筏伐乏阀法珐垡砝',
475
+ 'Fan' => '藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蕃蘩幡梵燔畈蹯',
476
+ 'Fang' => '坊芳方肪房防妨仿访纺放邡枋钫舫鲂',
477
+ 'Fei' => '菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绯榧腓斐扉砩镄痱蜚篚翡霏鲱',
478
+ 'Fen' => '芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼鲼鼢',
479
+ 'Feng' => '丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑唪沣砜',
480
+ 'Fo' => '佛',
481
+ 'Fou' => '否缶',
482
+ 'Fu' => '夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔拊呋呒幞怫滏艴孚驸绂绋桴赙祓黻黼罘稃馥蚨蜉蝠蝮麸趺跗鲋鳆',
483
+ 'Ga' => '噶嘎垓尬尕尜旮钆',
484
+ 'Gai' => '该改概钙盖溉丐陔戤赅',
485
+ 'Gan' => '干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐',
486
+ 'Gang' => '冈刚钢缸肛纲岗港杠戆罡筻',
487
+ 'Gao' => '篙皋高膏羔糕搞镐稿告睾诰郜藁缟槔槁杲锆',
488
+ 'Ge' => '哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各咯鬲仡哿圪塥嗝纥搿膈硌镉袼虼舸骼',
489
+ 'Gei' => '给',
490
+ 'Gen' => '根跟亘茛哏艮',
491
+ 'Geng' => '耕更庚羹埂耿梗哽赓绠鲠',
492
+ 'Gong' => '工攻功恭龚供躬公宫弓巩汞拱贡共珙肱蚣觥',
493
+ 'Gou' => '钩勾沟苟狗垢构购够佝诟岣遘媾缑枸觏彀笱篝鞲',
494
+ 'Gu' => '辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰崮汩梏轱牯牿臌毂瞽罟钴锢鸪痼蛄酤觚鲴',
495
+ 'Gua' => '刮瓜剐寡挂褂卦诖呱栝胍鸹',
496
+ 'Guai' => '乖拐怪',
497
+ 'Guan' => '棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏',
498
+ 'Guang' => '光广逛咣犷桄胱',
499
+ 'Gui' => '瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫炅晷皈簋鲑鳜',
500
+ 'Gun' => '辊滚棍衮绲磙鲧',
501
+ 'Guo' => '锅郭国果裹过馘埚掴呙帼崞猓椁虢聒蜾蝈',
502
+ 'Ha' => '哈铪',
503
+ 'Hai' => '骸孩海氦亥害骇嗨胲醢',
504
+ 'Han' => '酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖犴阚瀚晗焓顸颔蚶鼾',
505
+ 'Hang' => '夯杭航沆绗颃',
506
+ 'Hao' => '壕嚎豪毫郝好耗号浩蒿薅嗥嚆濠灏昊皓颢蚝',
507
+ 'He' => '呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑嗬阖曷盍颌蚵翮',
508
+ 'Hei' => '嘿黑',
509
+ 'Hen' => '痕很狠恨',
510
+ 'Heng' => '哼亨横衡恒蘅珩桁',
511
+ 'Hong' => '轰哄烘虹鸿洪宏弘红黉訇讧荭蕻薨闳泓',
512
+ 'Hou' => '喉侯猴吼厚候后堠後逅瘊篌糇鲎骺',
513
+ 'Hu' => '呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜瓠鹄鹕鹱笏醐斛鹘',
514
+ 'Hua' => '花哗华猾滑画划化话骅桦砉铧',
515
+ 'Huai' => '槐徊怀淮坏踝',
516
+ 'Huan' => '欢环桓还缓换患唤痪豢焕涣宦幻奂擐獾洹浣漶寰逭缳锾鲩鬟',
517
+ 'Huang' => '荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇',
518
+ 'Hui' => '灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙咴喙隳洄彗缋桧晖恚虺蟪麾',
519
+ 'Hun' => '荤昏婚魂浑混诨馄阍溷珲',
520
+ 'Huo' => '豁活伙火获或惑霍货祸劐藿攉嚯夥钬锪镬耠蠖',
521
+ 'Ji' => '击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪藉亟乩剞佶偈墼芨芰荠蒺蕺掎叽咭哜唧岌嵴洎屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠虮笈笄暨跻跽霁鲚鲫髻麂',
522
+ 'Jia' => '嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏葭岬浃迦珈戛胛恝铗镓痂瘕蛱笳袈跏',
523
+ 'Jian' => '歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛湔蹇謇缣枧楗戋戬牮犍毽腱睑锏鹣裥笕翦踺鲣鞯',
524
+ 'Jiang' => '僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇',
525
+ 'Jiao' => '蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖佼僬艽茭挢噍徼姣敫皎鹪蛟醮跤鲛',
526
+ 'Jie' => '揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒芥界借介疥诫届讦诘拮喈嗟婕孑桀碣疖颉蚧羯鲒骱',
527
+ 'Jin' => '巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲卺荩堇噤馑廑妗缙瑾槿赆觐衿矜',
528
+ 'Jing' => '荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌箐',
529
+ 'Jiong' => '炯窘迥扃',
530
+ 'Jiu' => '揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鸠鹫赳鬏',
531
+ 'Ju' => '鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚椐榘榉橘犋飓钜锔窭裾醵踽龃雎鞫',
532
+ 'Juan' => '捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽',
533
+ 'Jue' => '撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖',
534
+ 'Jun' => '均菌钧军君峻俊竣浚郡骏捃皲',
535
+ 'Ka' => '喀咖卡佧咔胩',
536
+ 'Kai' => '开揩楷凯慨剀垲蒈忾恺铠锎锴',
537
+ 'Kan' => '刊堪勘坎砍看侃莰戡龛瞰',
538
+ 'Kang' => '康慷糠扛抗亢炕伉闶钪',
539
+ 'Kao' => '考拷烤靠尻栲犒铐',
540
+ 'Ke' => '坷苛柯棵磕颗科壳咳可渴克刻客课嗑岢恪溘骒缂珂轲氪瞌钶锞稞疴窠颏蝌髁',
541
+ 'Ken' => '肯啃垦恳裉',
542
+ 'Keng' => '坑吭铿',
543
+ 'Kong' => '空恐孔控倥崆箜',
544
+ 'Kou' => '抠口扣寇芤蔻叩囗眍筘',
545
+ 'Ku' => '枯哭窟苦酷库裤刳堀喾绔骷',
546
+ 'Kua' => '夸垮挎跨胯侉',
547
+ 'Kuai' => '块筷侩快蒯郐哙狯浍脍',
548
+ 'Kuan' => '宽款髋',
549
+ 'Kuang' => '匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶',
550
+ 'Kui' => '亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗蒉揆喹喟悝愦逵暌睽聩蝰篑跬',
551
+ 'Kun' => '坤昆捆困悃阃琨锟醌鲲髡',
552
+ 'Kuo' => '括扩廓阔蛞',
553
+ 'La' => '垃拉喇蜡腊辣啦剌邋旯砬瘌',
554
+ 'Lai' => '莱来赖崃徕涞濑赉睐铼癞籁',
555
+ 'Lan' => '蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥岚漤榄斓罱镧褴',
556
+ 'Lang' => '琅榔狼廊郎朗浪蒗啷阆稂螂',
557
+ 'Lao' => '捞劳牢老佬姥酪烙涝唠崂忉栳铑铹痨耢醪',
558
+ 'Le' => '勒乐了仂叻泐鳓',
559
+ 'Lei' => '雷镭蕾磊累儡垒擂肋类泪羸诔嘞嫘缧檑耒酹',
560
+ 'Leng' => '棱楞冷塄愣',
561
+ 'Li' => '厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜呖唳喱猁溧澧逦娌嫠骊缡枥栎轹膦戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧',
562
+ 'Lian' => '联莲连镰廉怜涟帘敛脸链恋炼练蔹奁潋濂琏楝殓臁裢裣蠊鲢',
563
+ 'Liang' => '俩粮凉梁粱良两辆量晾亮谅墚莨椋锒踉靓魉',
564
+ 'Liao' => '撩聊僚疗燎寥辽潦撂镣廖料蓼尥嘹獠寮缭钌鹩',
565
+ 'Lie' => '列裂烈劣猎冽埒捩咧洌趔躐鬣',
566
+ 'Lin' => '琳林磷霖临邻鳞淋凛赁吝拎蔺啉嶙廪懔遴檩辚瞵粼躏麟',
567
+ 'Ling' => '玲菱零龄铃伶羚凌灵陵岭领另令酃苓呤囹泠绫柃棂瓴聆蛉翎鲮',
568
+ 'Liu' => '溜琉榴硫馏留刘瘤流柳六浏遛骝绺旒熘锍镏鹨鎏',
569
+ 'Long' => '龙聋咙笼窿隆垄拢陇垅茏泷珑栊胧砻癃',
570
+ 'Lou' => '楼娄搂篓漏陋偻蒌喽嵝镂瘘耧蝼髅',
571
+ 'Lu' => '芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆撸噜泸渌漉逯璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈',
572
+ 'Luan' => '峦挛孪滦卵乱脔娈栾鸾銮',
573
+ 'Lue' => '掠略锊',
574
+ 'Lun' => '抡轮伦仑沦纶论囵',
575
+ 'Luo' => '萝螺罗逻锣箩骡裸落洛骆络倮蠃荦摞猡泺漯珞椤脶镙瘰雒',
576
+ 'Lv' => '驴吕铝侣旅履屡缕虑氯律滤绿捋闾榈膂稆褛',
577
+ 'Ma' => '妈麻玛码蚂马骂嘛吗唛犸杩蟆',
578
+ 'Mai' => '埋买麦卖迈脉劢荬霾',
579
+ 'Man' => '瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔',
580
+ 'Mang' => '芒茫盲氓忙莽邙漭硭蟒',
581
+ 'Mao' => '猫茅锚毛矛铆卯茂冒帽貌贸袤茆峁泖瑁昴牦耄旄懋瞀蝥蟊髦',
582
+ 'Me' => '么麽',
583
+ 'Mei' => '玫枚梅酶霉煤没眉媒镁每美昧寐妹媚莓嵋猸浼湄楣镅鹛袂魅',
584
+ 'Men' => '门闷们扪焖懑钔',
585
+ 'Meng' => '萌蒙檬盟锰猛梦孟勐甍瞢懵朦礞虻蜢蠓艋艨',
586
+ 'Mi' => '眯醚靡糜迷谜弥米秘觅泌蜜密幂芈谧咪嘧猕汨宓弭脒祢敉縻麋',
587
+ 'Mian' => '棉眠绵冕免勉娩缅面沔渑湎腼眄',
588
+ 'Miao' => '苗描瞄藐秒渺庙妙喵邈缈杪淼眇鹋',
589
+ 'Mie' => '蔑灭乜咩蠛篾',
590
+ 'Min' => '民抿皿敏悯闽苠岷闵泯缗玟珉愍黾鳘',
591
+ 'Ming' => '明螟鸣铭名命冥茗溟暝瞑酩',
592
+ 'Miu' => '谬缪',
593
+ 'Mo' => '摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫嬷殁镆秣瘼耱貊貘',
594
+ 'Mou' => '谋牟某侔哞眸蛑鍪',
595
+ 'Mu' => '拇牡亩姆母墓暮幕募慕木目睦牧穆仫坶苜沐毪钼',
596
+ 'Na' => '拿哪呐钠那娜纳讷捺肭镎衲',
597
+ 'Nai' => '氖乃奶耐奈鼐佴艿萘柰',
598
+ 'Nan' => '南男难喃囝囡楠腩蝻赧',
599
+ 'Nang' => '囊攮囔馕曩',
600
+ 'Nao' => '挠脑恼闹淖孬垴呶猱瑙硇铙蛲',
601
+ 'Ne' => '呢',
602
+ 'Nei' => '馁内',
603
+ 'Nen' => '嫩恁',
604
+ 'Neng' => '能',
605
+ 'Ni' => '妮霓倪泥尼拟你匿腻逆溺伲坭蘼猊怩昵旎睨铌鲵',
606
+ 'Nian' => '蔫拈年碾撵捻念廿埝辇黏鲇鲶',
607
+ 'Niang' => '娘酿',
608
+ 'Niao' => '鸟尿茑嬲脲袅',
609
+ 'Nie' => '捏聂孽啮镊镍涅陧蘖嗫颞臬蹑',
610
+ 'Nin' => '您',
611
+ 'Ning' => '柠狞凝宁拧泞佞咛甯聍',
612
+ 'Niu' => '牛扭钮纽狃忸妞',
613
+ 'Nong' => '脓浓农弄侬哝',
614
+ 'Nou' => '耨',
615
+ 'Nu' => '奴努怒弩胬孥驽',
616
+ 'Nuan' => '暖',
617
+ 'Nue' => '虐疟挪',
618
+ 'Nuo' => '懦糯诺傩搦喏锘',
619
+ 'Nv' => '女恧钕衄',
620
+ 'O' => '哦噢',
621
+ 'Ou' => '欧鸥殴藕呕偶沤讴怄瓯耦',
622
+ 'Pa' => '耙啪趴爬帕怕琶葩杷筢',
623
+ 'Pai' => '拍排牌徘湃派俳蒎哌',
624
+ 'Pan' => '攀潘盘磐盼畔判叛拚爿泮袢襻蟠蹒',
625
+ 'Pang' => '乓庞旁耪胖彷滂逄螃',
626
+ 'Pao' => '抛咆刨炮袍跑泡匏狍庖脬疱',
627
+ 'Pei' => '呸胚培裴赔陪配佩沛辔帔旆锫醅霈',
628
+ 'Pen' => '喷盆湓',
629
+ 'Peng' => '砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰堋嘭怦蟛',
630
+ 'Pi' => '辟坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕仳陴邳郫圮埤鼙芘擗噼庀淠媲纰枇甓罴铍癖疋蚍蜱貔',
631
+ 'Pian' => '篇偏片骗谝骈犏胼翩蹁',
632
+ 'Piao' => '飘漂瓢票剽嘌嫖缥殍瞟螵',
633
+ 'Pie' => '撇瞥丿苤氕',
634
+ 'Pin' => '拼频贫品聘姘嫔榀牝颦',
635
+ 'Ping' => '乒坪苹萍平凭瓶评屏俜娉枰鲆',
636
+ 'Po' => '坡泼颇婆破魄迫粕叵鄱珀钋钷皤笸',
637
+ 'Pou' => '剖裒掊',
638
+ 'Pu' => '扑铺仆莆葡菩蒲埔朴圃普浦谱瀑匍噗溥濮璞氆镤镨蹼',
639
+ 'Qi' => '期欺戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亓圻芑芪萁萋葺蕲嘁屺岐汔淇骐绮琪琦杞桤槭耆祺憩碛颀蛴蜞綦鳍麒',
640
+ 'Qia' => '掐恰洽葜袷髂',
641
+ 'Qian' => '牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉倩佥阡芊芡掮岍悭慊骞搴褰缱椠肷愆钤虔箝',
642
+ 'Qiang' => '枪呛腔羌墙蔷强抢戕嫱樯戗炝锖锵镪襁蜣羟跄',
643
+ 'Qiao' => '橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞峤愀憔缲樵硗跷鞒',
644
+ 'Qie' => '切茄且怯窃郄惬妾挈锲箧趄',
645
+ 'Qin' => '钦侵亲秦琴勤芹擒禽寝沁芩揿吣嗪噙溱檎锓螓衾',
646
+ 'Qing' => '青轻氢倾卿清擎晴氰情顷请庆苘圊檠磬蜻罄綮謦鲭黥',
647
+ 'Qiong' => '琼穷邛茕穹蛩筇跫銎',
648
+ 'Qiu' => '秋丘邱球求囚酋泅俅巯犰湫逑遒楸赇虬蚯蝤裘糗鳅鼽',
649
+ 'Qu' => '趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍朐祛磲鸲癯蛐蠼麴瞿黢',
650
+ 'Quan' => '圈颧权醛泉全痊拳犬券劝诠荃犭悛绻辁畎铨蜷筌鬈',
651
+ 'Que' => '缺炔瘸却鹊榷确雀阕阙悫',
652
+ 'Qun' => '裙群逡麇',
653
+ 'Ran' => '然燃冉染苒蚺髯',
654
+ 'Rang' => '瓤壤攘嚷让禳穰',
655
+ 'Rao' => '饶扰绕荛娆桡',
656
+ 'Re' => '惹热',
657
+ 'Ren' => '壬仁人忍韧任认刃妊纫仞荏饪轫稔衽',
658
+ 'Reng' => '扔仍',
659
+ 'Ri' => '日',
660
+ 'Rong' => '戎茸蓉荣融熔溶容绒冗嵘狨榕肜蝾',
661
+ 'Rou' => '揉柔肉糅蹂鞣',
662
+ 'Ru' => '茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡缛铷襦颥',
663
+ 'Ruan' => '软阮朊',
664
+ 'Rui' => '蕊瑞锐芮蕤枘睿蚋',
665
+ 'Run' => '闰润',
666
+ 'Ruo' => '若弱偌箬',
667
+ 'Sa' => '撒洒萨卅挲脎飒',
668
+ 'Sai' => '腮鳃塞赛噻',
669
+ 'San' => '三叁伞散仨彡馓毵',
670
+ 'Sang' => '桑嗓丧搡磉颡',
671
+ 'Sao' => '搔骚扫嫂埽缫臊瘙鳋',
672
+ 'Se' => '瑟色涩啬铯穑',
673
+ 'Sen' => '森',
674
+ 'Seng' => '僧',
675
+ 'Sha' => '莎砂杀刹沙纱傻啥煞唼歃铩痧裟霎鲨',
676
+ 'Shai' => '筛晒酾',
677
+ 'Shan' => '珊苫杉山删煽衫闪陕擅赡膳善汕扇缮栅讪鄯芟潸姗嬗骟膻钐疝蟮舢跚鳝',
678
+ 'Shang' => '墒伤商赏晌上尚裳垧绱殇熵觞',
679
+ 'Shao' => '梢捎稍烧芍勺韶少哨邵绍劭潲杓蛸筲艄',
680
+ 'She' => '奢赊蛇舌舍赦摄射慑涉社设厍佘猞滠畲麝',
681
+ 'Shen' => '砷申呻伸身深娠绅神沈审婶甚肾慎渗什诜谂莘葚哂渖胂矧蜃糁',
682
+ 'Sheng' => '声生甥牲升绳省盛剩胜圣嵊晟眚笙',
683
+ 'Shi' => '匙师失狮施湿诗尸虱十石拾时食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑轼贳炻礻铈舐筮豕鲥鲺',
684
+ 'Shou' => '收手首守寿授售受瘦兽狩绶艏',
685
+ 'Shu' => '蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕丨倏塾菽摅沭澍姝纾毹腧殳秫',
686
+ 'Shua' => '刷耍唰',
687
+ 'Shuai' => '率摔衰甩帅蟀',
688
+ 'Shuan' => '栓拴闩涮',
689
+ 'Shuang' => '霜双爽孀',
690
+ 'Shui' => '谁水睡税',
691
+ 'Shun' => '吮瞬顺舜',
692
+ 'Shuo' => '说硕朔烁蒴搠妁槊铄',
693
+ 'Si' => '斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕厶咝汜泗澌姒驷缌祀锶鸶耜蛳笥',
694
+ 'Song' => '松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦',
695
+ 'Sou' => '搜艘擞嗽叟薮嗖嗾馊溲飕瞍锼螋',
696
+ 'Su' => '苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫涑簌觫稣',
697
+ 'Suan' => '酸蒜算狻',
698
+ 'Sui' => '虽隋随绥髓碎岁穗遂隧祟谇荽濉邃燧眭睢',
699
+ 'Sun' => '孙损笋荪狲飧榫隼',
700
+ 'Suo' => '蓑梭唆缩琐索锁所唢嗦嗍娑桫睃羧',
701
+ 'Ta' => '塌他它她塔獭挞蹋踏闼溻遢榻铊趿鳎',
702
+ 'Tai' => '胎苔抬台泰酞太态汰邰薹骀肽炱钛跆鲐',
703
+ 'Tan' => '坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯昙忐钽锬覃',
704
+ 'Tang' => '汤塘搪堂棠膛唐糖倘躺淌趟烫傥帑惝溏瑭樘铴镗耥螗螳羰醣',
705
+ 'Tao' => '掏涛滔绦萄桃逃淘陶讨套鼗啕洮韬饕',
706
+ 'Te' => '特忒忑慝铽',
707
+ 'Teng' => '藤腾疼誊滕',
708
+ 'Ti' => '梯剔踢锑提题蹄啼体替嚏惕涕剃屉倜悌逖绨缇鹈醍',
709
+ 'Tian' => '天添填田甜恬舔腆掭忝阗殄畋',
710
+ 'Tiao' => '挑条迢眺跳佻苕祧窕蜩笤粜龆鲦髫',
711
+ 'Tie' => '贴铁帖萜餮',
712
+ 'Ting' => '厅听烃汀廷停亭庭挺艇莛葶婷梃铤蜓霆',
713
+ 'Tong' => '通桐酮瞳同铜彤童桶捅筒统痛佟仝茼嗵恸潼砼',
714
+ 'Tou' => '偷投头透骰',
715
+ 'Tu' => '凸秃突图徒途涂屠土吐兔堍荼菟钍酴',
716
+ 'Tuan' => '湍团抟彖疃',
717
+ 'Tui' => '推颓腿蜕褪退煺',
718
+ 'Tun' => '囤吞屯臀氽饨暾豚',
719
+ 'Tuo' => '拖托脱鸵陀驮驼椭妥拓唾佗坨庹沱柝柁橐砣箨酡跎鼍',
720
+ 'Wa' => '挖哇蛙洼娃瓦袜佤娲腽',
721
+ 'Wai' => '歪外崴',
722
+ 'Wan' => '豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄菀纨绾琬脘畹蜿',
723
+ 'Wang' => '汪王亡枉网往旺望忘妄罔惘辋魍',
724
+ 'Wei' => '威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫偎诿隈圩葳薇帏帷嵬猥猬闱沩洧涠逶娓玮韪軎炜煨痿艉鲔',
725
+ 'Wen' => '瘟温蚊文闻纹吻稳紊问刎夂阌汶璺攵雯',
726
+ 'Weng' => '嗡翁瓮蓊蕹',
727
+ 'Wo' => '挝蜗涡窝我斡卧握沃倭莴喔幄渥肟硪龌',
728
+ 'Wu' => '巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴唔庑怃忤寤迕妩婺骛杌牾焐鹉鹜痦蜈鋈鼯',
729
+ 'Xi' => '栖昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜菥葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷歙熹禊禧皙穸裼蜥螅蟋舄舾羲粞翕醯蹊鼷',
730
+ 'Xia' => '瞎虾匣霞辖暇峡侠狭下厦夏吓呷狎遐瑕柙硖罅黠',
731
+ 'Xian' => '掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼苋莶藓岘猃暹娴氙燹祆鹇痫蚬筅籼酰跣跹霰',
732
+ 'Xiang' => '相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨',
733
+ 'Xiao' => '萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓崤潇逍骁绡枭枵筱箫魈',
734
+ 'Xie' => '楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷獬廨渫瀣邂绁缬榭榍蹀躞',
735
+ 'Xin' => '薪芯锌欣辛新忻心信衅囟馨昕歆镡鑫',
736
+ 'Xing' => '星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤饧悻硎',
737
+ 'Xiong' => '兄凶胸匈汹雄熊芎',
738
+ 'Xiu' => '休修羞朽嗅锈秀袖绣咻岫馐庥溴鸺貅髹',
739
+ 'Xu' => '墟戌需虚嘘须徐许蓄酗叙旭序恤絮婿绪续吁诩勖蓿洫溆顼栩煦盱胥糈醑',
740
+ 'Xuan' => '轩喧宣悬旋玄选癣眩绚儇谖萱揎泫渲漩璇楦暄炫煊碹铉镟痃',
741
+ 'Xue' => '靴薛学穴雪血谑噱泶踅鳕',
742
+ 'Xun' => '勋熏循旬询寻驯巡殉汛训讯逊迅巽郇埙荀荨蕈薰峋徇獯恂洵浔曛醺鲟',
743
+ 'Ya' => '压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢垭揠岈迓娅琊桠氩砑睚痖',
744
+ 'Yan' => '焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣赝剡俨偃兖谳郾鄢埏菸崦恹闫阏湮滟妍嫣琰檐晏胭腌焱罨筵酽趼魇餍鼹',
745
+ 'Yang' => '殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅',
746
+ 'Yao' => '邀腰妖瑶摇尧遥窑谣姚咬舀药要耀钥夭爻吆崾徭幺珧杳轺曜肴铫鹞窈繇鳐',
747
+ 'Ye' => '椰噎耶爷野冶也页掖业叶曳腋夜液靥谒邺揶晔烨铘',
748
+ 'Yi' => '一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佚佾诒圯埸懿苡荑薏弈奕挹弋呓咦咿嗌噫峄嶷猗饴怿怡悒漪迤驿缢殪轶贻欹旖熠眙钇镒镱痍瘗癔翊蜴舣羿翳酏黟',
749
+ 'Yin' => '茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞垠堙茚吲喑狺夤洇氤铟瘾窨蚓霪龈',
750
+ 'Ying' => '英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦蓥撄嘤膺滢潆瀛瑛璎楹媵鹦瘿颍罂',
751
+ 'Yo' => '哟唷',
752
+ 'Yong' => '拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉喁慵邕镛甬鳙饔',
753
+ 'You' => '幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莠莜莸尢呦囿宥柚猷牖铕疣蚰蚴蝣鱿黝鼬',
754
+ 'Yu' => '迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄圄圉嵛狳饫馀庾阈鬻妪妤纡瑜昱觎腴欤於煜燠聿钰鹆鹬瘐瘀窬窳蜮蝓竽臾舁雩龉',
755
+ 'Yuan' => '鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院垸塬芫掾圜沅媛瑗橼爰眢鸢螈箢鼋',
756
+ 'Yue' => '曰约越跃岳粤月悦阅龠哕瀹樾刖钺',
757
+ 'Yun' => '耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽愠纭韫殒昀氲熨筠',
758
+ 'Za' => '匝砸杂咋拶咂',
759
+ 'Zai' => '栽哉灾宰载再在崽甾',
760
+ 'Zan' => '咱攒暂赞瓒昝簪糌趱錾',
761
+ 'Zang' => '赃脏葬奘驵臧',
762
+ 'Zao' => '遭糟凿藻枣早澡蚤躁噪造皂灶燥唣',
763
+ 'Ze' => '责择则泽仄赜啧帻迮昃笮箦舴',
764
+ 'Zei' => '贼',
765
+ 'Zen' => '怎谮',
766
+ 'Zeng' => '增憎赠缯甑罾锃',
767
+ 'Zha' => '扎喳渣札轧铡闸眨榨乍炸诈柞揸吒咤哳楂砟痄蚱齄',
768
+ 'Zhai' => '摘斋宅窄债寨砦瘵',
769
+ 'Zhan' => '瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃',
770
+ 'Zhang' => '樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑',
771
+ 'Zhao' => '招昭找沼赵照罩兆肇召诏棹钊笊',
772
+ 'Zhe' => '遮折哲蛰辙者锗蔗这浙着乇谪摺柘辄磔鹧褶蜇螫赭',
773
+ 'Zhen' => '珍斟真甄砧臻贞针侦枕疹诊震振镇阵帧圳蓁浈缜桢椹榛轸赈胗朕祯畛稹鸩箴',
774
+ 'Zheng' => '蒸挣睁征狰争怔整拯正政症郑证诤峥徵钲铮筝',
775
+ 'Zhi' => '芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾贽胝膣祉黹雉鸷痣蛭絷酯跖踬踯豸觯',
776
+ 'Zhong' => '中盅忠钟衷终种肿重仲众冢锺螽舯踵',
777
+ 'Zhou' => '舟周州洲诌粥轴肘帚咒皱宙昼骤荮啁妯纣绉胄碡籀酎',
778
+ 'Zhu' => '珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴杼槠橥炷铢疰瘃竺箸舳翥躅麈',
779
+ 'Zhua' => '抓爪',
780
+ 'Zhuai' => '拽',
781
+ 'Zhuan' => '专砖转撰赚篆啭馔颛',
782
+ 'Zhuang' => '幢桩庄装妆撞壮状僮',
783
+ 'Zhui' => '椎锥追赘坠缀萑惴骓缒隹',
784
+ 'Zhun' => '谆准肫窀',
785
+ 'Zhuo' => '捉拙卓桌琢茁酌啄灼浊倬诼擢浞涿濯禚斫镯',
786
+ 'Zi' => '兹咨资姿滋淄孜紫仔籽滓子自渍字谘呲嵫姊孳缁梓辎赀恣眦锱秭耔笫粢趑訾龇鲻髭',
787
+ 'Zong' => '鬃棕踪宗综总纵偬腙粽',
788
+ 'Zou' => '邹走奏揍诹陬鄹驺鲰',
789
+ 'Zu' => '租足卒族祖诅阻组俎菹镞',
790
+ 'Zuan' => '钻纂攥缵躜',
791
+ 'Zui' => '嘴醉最罪蕞觜',
792
+ 'Zun' => '尊遵撙樽鳟',
793
+ 'Zuo' => '昨左佐做作坐座阼唑嘬怍胙祚酢',
794
+ ];
795
+ default:
796
+ }
797
+
798
+ return $table;
799
+ }
800
+
801
+ /**
802
+ * Get fix table for MacOS.
803
+ * On MacOS, files containing characters in the table, are sometimes encoded improperly.
804
+ *
805
+ * @return array
806
+ */
807
+ public static function get_fix_table_for_mac() {
808
+ /**
809
+ * Keys in the table are standard ISO9 characters.
810
+ *
811
+ * Example of wrong encoding on Mac:
812
+ * берЁзовыЙ-белозёрский - original input,
813
+ * берЁзовыЙ-белозёрский.png - actual filename created on Mac (ЁёЙй are already wrongly encoded),
814
+ * ber%d0%95%cc%88zovy%d0%98%cc%86-beloz%d0%B5%cc%88rski%d0%B8%cc%86.png - urlencode() of the above,
815
+ * berËzovyĬ-belozërskiĭ.png - actual filename passed via standard ISO9 transliteration table,
816
+ * berE%CC%88zovyI%CC%86-beloze%CC%88rskii%CC%86.png - urlencode() of the above.
817
+ *
818
+ * To avoid misunderstanding, we use urldecode() here.
819
+ */
820
+ return [
821
+ 'Ё' => urldecode( '%d0%95%cc%88' ),
822
+ 'ё' => urldecode( '%d0%B5%cc%88' ),
823
+ 'Й' => urldecode( '%d0%98%cc%86' ),
824
+ 'й' => urldecode( '%d0%B8%cc%86' ),
825
+ ];
826
+ }
827
+ }
includes/class-cyr-to-lat-converter.php → classes/class-converter.php RENAMED
@@ -5,12 +5,14 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_Converter
10
  *
11
- * @class Cyr_To_Lat_Converter
12
  */
13
- class Cyr_To_Lat_Converter {
14
 
15
  /**
16
  * Query arg in url to start conversion.
@@ -20,35 +22,35 @@ class Cyr_To_Lat_Converter {
20
  /**
21
  * Plugin main class.
22
  *
23
- * @var Cyr_To_Lat_Main
24
  */
25
  private $main;
26
 
27
  /**
28
  * Plugin settings.
29
  *
30
- * @var Cyr_To_Lat_Settings
31
  */
32
  private $settings;
33
 
34
  /**
35
  * Background process to convert posts.
36
  *
37
- * @var Cyr_To_Lat_Post_Conversion_Process
38
  */
39
  private $process_all_posts;
40
 
41
  /**
42
  * Background process to convert terms.
43
  *
44
- * @var Cyr_To_Lat_Term_Conversion_Process
45
  */
46
  private $process_all_terms;
47
 
48
  /**
49
  * Admin notices.
50
  *
51
- * @var Cyr_To_Lat_Admin_Notices
52
  */
53
  private $admin_notices;
54
 
@@ -60,34 +62,34 @@ class Cyr_To_Lat_Converter {
60
  private $option_group = '';
61
 
62
  /**
63
- * Cyr_To_Lat_Converter constructor.
64
  *
65
- * @param Cyr_To_Lat_Main $main Plugin main class.
66
- * @param Cyr_To_Lat_Settings $settings Plugin settings.
67
- * @param Cyr_To_Lat_Post_Conversion_Process $process_all_posts Plugin settings.
68
- * @param Cyr_To_Lat_Term_Conversion_Process $process_all_terms Plugin settings.
69
- * @param Cyr_To_Lat_Admin_Notices $admin_notices Plugin settings.
70
  */
71
  public function __construct(
72
  $main, $settings, $process_all_posts = null, $process_all_terms = null, $admin_notices = null
73
  ) {
74
  $this->main = $main;
75
  $this->settings = $settings;
76
- $this->option_group = Cyr_To_Lat_Settings::OPTION_GROUP;
77
 
78
  $this->process_all_posts = $process_all_posts;
79
  if ( ! $this->process_all_posts ) {
80
- $this->process_all_posts = new Cyr_To_Lat_Post_Conversion_Process( $main );
81
  }
82
 
83
  $this->process_all_terms = $process_all_terms;
84
  if ( ! $this->process_all_terms ) {
85
- $this->process_all_terms = new Cyr_To_Lat_Term_Conversion_Process( $main );
86
  }
87
 
88
  $this->admin_notices = $admin_notices;
89
  if ( ! $this->admin_notices ) {
90
- $this->admin_notices = new Cyr_To_Lat_Admin_Notices();
91
  }
92
 
93
  $this->init_hooks();
@@ -97,8 +99,8 @@ class Cyr_To_Lat_Converter {
97
  * Init class hooks.
98
  */
99
  public function init_hooks() {
100
- add_action( 'admin_init', array( $this, 'process_handler' ) );
101
- add_action( 'admin_init', array( $this, 'conversion_notices' ) );
102
  }
103
 
104
  /**
@@ -109,7 +111,7 @@ class Cyr_To_Lat_Converter {
109
  $terms_process_running = $this->process_all_terms->is_process_running();
110
 
111
  if ( ! $posts_process_running && ! $terms_process_running ) {
112
- add_action( 'admin_init', array( $this, 'start_conversion' ), 20 );
113
  }
114
 
115
  if ( $posts_process_running ) {
@@ -172,15 +174,15 @@ class Cyr_To_Lat_Converter {
172
  *
173
  * @param array $args Arguments for query.
174
  */
175
- public function convert_existing_slugs( $args = array() ) {
176
  global $wpdb;
177
 
178
- $regexp = Cyr_To_Lat_Main::PROHIBITED_CHARS_REGEX . '+';
179
 
180
- $defaults = array(
181
  'post_type' => get_post_types(),
182
- 'post_status' => array( 'publish', 'future', 'private' ),
183
- );
184
 
185
  $args = wp_parse_args( $args, $defaults );
186
 
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
  /**
11
+ * Class Converter
12
  *
13
+ * @class Converter
14
  */
15
+ class Converter {
16
 
17
  /**
18
  * Query arg in url to start conversion.
22
  /**
23
  * Plugin main class.
24
  *
25
+ * @var Main
26
  */
27
  private $main;
28
 
29
  /**
30
  * Plugin settings.
31
  *
32
+ * @var Settings
33
  */
34
  private $settings;
35
 
36
  /**
37
  * Background process to convert posts.
38
  *
39
+ * @var Post_Conversion_Process
40
  */
41
  private $process_all_posts;
42
 
43
  /**
44
  * Background process to convert terms.
45
  *
46
+ * @var Term_Conversion_Process
47
  */
48
  private $process_all_terms;
49
 
50
  /**
51
  * Admin notices.
52
  *
53
+ * @var Admin_Notices
54
  */
55
  private $admin_notices;
56
 
62
  private $option_group = '';
63
 
64
  /**
65
+ * Converter constructor.
66
  *
67
+ * @param Main $main Plugin main class.
68
+ * @param Settings $settings Plugin settings.
69
+ * @param Post_Conversion_Process $process_all_posts Plugin settings.
70
+ * @param Term_Conversion_Process $process_all_terms Plugin settings.
71
+ * @param Admin_Notices $admin_notices Plugin settings.
72
  */
73
  public function __construct(
74
  $main, $settings, $process_all_posts = null, $process_all_terms = null, $admin_notices = null
75
  ) {
76
  $this->main = $main;
77
  $this->settings = $settings;
78
+ $this->option_group = Settings::OPTION_GROUP;
79
 
80
  $this->process_all_posts = $process_all_posts;
81
  if ( ! $this->process_all_posts ) {
82
+ $this->process_all_posts = new Post_Conversion_Process( $main );
83
  }
84
 
85
  $this->process_all_terms = $process_all_terms;
86
  if ( ! $this->process_all_terms ) {
87
+ $this->process_all_terms = new Term_Conversion_Process( $main );
88
  }
89
 
90
  $this->admin_notices = $admin_notices;
91
  if ( ! $this->admin_notices ) {
92
+ $this->admin_notices = new Admin_Notices();
93
  }
94
 
95
  $this->init_hooks();
99
  * Init class hooks.
100
  */
101
  public function init_hooks() {
102
+ add_action( 'admin_init', [ $this, 'process_handler' ] );
103
+ add_action( 'admin_init', [ $this, 'conversion_notices' ] );
104
  }
105
 
106
  /**
111
  $terms_process_running = $this->process_all_terms->is_process_running();
112
 
113
  if ( ! $posts_process_running && ! $terms_process_running ) {
114
+ add_action( 'admin_init', [ $this, 'start_conversion' ], 20 );
115
  }
116
 
117
  if ( $posts_process_running ) {
174
  *
175
  * @param array $args Arguments for query.
176
  */
177
+ public function convert_existing_slugs( $args = [] ) {
178
  global $wpdb;
179
 
180
+ $regexp = Main::PROHIBITED_CHARS_REGEX . '+';
181
 
182
+ $defaults = [
183
  'post_type' => get_post_types(),
184
+ 'post_status' => [ 'publish', 'future', 'private' ],
185
+ ];
186
 
187
  $args = wp_parse_args( $args, $defaults );
188
 
includes/class-cyr-to-lat-main.php → classes/class-main.php RENAMED
@@ -5,12 +5,16 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
 
 
8
  use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
9
 
10
  /**
11
- * Class Cyr_To_Lat_Main
12
  */
13
- class Cyr_To_Lat_Main {
14
 
15
  /**
16
  * Regex of prohibited chars in slugs
@@ -23,60 +27,60 @@ class Cyr_To_Lat_Main {
23
  /**
24
  * Plugin settings.
25
  *
26
- * @var Cyr_To_Lat_Settings
27
  */
28
- private $settings;
29
 
30
  /**
31
  * Converter instance.
32
  *
33
- * @var Cyr_To_Lat_Converter
34
  */
35
- private $converter;
36
 
37
  /**
38
- * Cyr_To_Lat_WP_CLI instance.
39
  *
40
- * @var Cyr_To_Lat_WP_CLI
41
  */
42
- private $cli;
43
 
44
  /**
45
- * Cyr_To_Lat_ACF instance.
46
  *
47
- * @var Cyr_To_Lat_ACF
48
  */
49
- private $acf;
50
 
51
  /**
52
- * Cyr_To_Lat_Main constructor.
53
  *
54
- * @param Cyr_To_Lat_Settings $settings Plugin settings.
55
- * @param Cyr_To_Lat_Converter $converter Converter instance.
56
- * @param Cyr_To_Lat_WP_CLI $cli CLI instance.
57
- * @param Cyr_To_Lat_ACF $acf ACF instance.
58
  */
59
  public function __construct( $settings = null, $converter = null, $cli = null, $acf = null ) {
60
  $this->settings = $settings;
61
  if ( ! $this->settings ) {
62
- $this->settings = new Cyr_To_Lat_Settings();
63
  }
64
 
65
  $this->converter = $converter;
66
  if ( ! $this->converter ) {
67
- $this->converter = new Cyr_To_Lat_Converter( $this, $this->settings );
68
  }
69
 
70
  $this->cli = $cli;
71
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
72
  if ( ! $this->cli ) {
73
- $this->cli = new Cyr_To_Lat_WP_CLI( $this->converter );
74
  }
75
  }
76
 
77
  $this->acf = $acf;
78
  if ( ! $this->acf ) {
79
- $this->acf = new Cyr_To_Lat_ACF( $this->settings );
80
  }
81
 
82
  $this->init();
@@ -93,7 +97,7 @@ class Cyr_To_Lat_Main {
93
  *
94
  * @noinspection PhpParamsInspection
95
  */
96
- WP_CLI::add_command( 'cyr2lat', $this->cli );
97
  } catch ( Exception $e ) {
98
  return;
99
  }
@@ -106,9 +110,9 @@ class Cyr_To_Lat_Main {
106
  * Init class hooks.
107
  */
108
  public function init_hooks() {
109
- add_filter( 'sanitize_title', array( $this, 'ctl_sanitize_title' ), 9, 3 );
110
- add_filter( 'sanitize_file_name', array( $this, 'ctl_sanitize_filename' ), 10, 2 );
111
- add_filter( 'wp_insert_post_data', array( $this, 'ctl_sanitize_post_name' ), 10, 2 );
112
  }
113
 
114
  /**
@@ -141,7 +145,7 @@ class Cyr_To_Lat_Main {
141
 
142
  $is_term = false;
143
  // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
144
- $backtrace = debug_backtrace( ~ DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS );
145
  // phpcs:enable
146
  foreach ( $backtrace as $backtrace_entry ) {
147
  if ( 'wp_insert_term' === $backtrace_entry['function'] ) {
@@ -179,11 +183,7 @@ class Cyr_To_Lat_Main {
179
  }
180
 
181
  if ( seems_utf8( $filename ) ) {
182
- if ( function_exists( 'mb_strtolower' ) ) {
183
- $filename = mb_strtolower( $filename, 'UTF-8' );
184
- } else {
185
- $filename = Mbstring::mb_strtolower( $filename );
186
- }
187
  }
188
 
189
  return $this->transliterate( $filename );
@@ -198,7 +198,7 @@ class Cyr_To_Lat_Main {
198
  */
199
  private function fix_mac_string( $string ) {
200
  $table = $this->get_filtered_table();
201
- $fix_table = Cyr_To_Lat_Conversion_Tables::get_fix_table_for_mac();
202
 
203
  $fix = [];
204
  foreach ( $fix_table as $key => $value ) {
@@ -210,6 +210,33 @@ class Cyr_To_Lat_Main {
210
  return strtr( $string, $fix );
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  /**
214
  * Get transliteration table.
215
  *
@@ -230,6 +257,7 @@ class Cyr_To_Lat_Main {
230
  $table = $this->get_filtered_table();
231
 
232
  $string = $this->fix_mac_string( $string );
 
233
  $string = strtr( $string, $table );
234
 
235
  if ( function_exists( 'iconv' ) ) {
@@ -250,6 +278,11 @@ class Cyr_To_Lat_Main {
250
  private function ctl_is_classic_editor_plugin_active() {
251
  if ( ! function_exists( 'is_plugin_active' ) ) {
252
  // @codeCoverageIgnoreStart
 
 
 
 
 
253
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
254
  // @codeCoverageIgnoreEnd
255
  }
@@ -279,7 +312,7 @@ class Cyr_To_Lat_Main {
279
 
280
  if ( $this->ctl_is_classic_editor_plugin_active() ) {
281
  $editor_option = get_option( 'classic-editor-replace' );
282
- $block_editor_active = array( 'no-replace', 'block' );
283
 
284
  return in_array( $editor_option, $block_editor_active, true );
285
  }
@@ -295,7 +328,7 @@ class Cyr_To_Lat_Main {
295
  *
296
  * @return mixed
297
  */
298
- public function ctl_sanitize_post_name( $data, $postarr = array() ) {
299
  global $current_screen;
300
 
301
  if ( ! $this->ctl_is_gutenberg_editor_active() ) {
@@ -309,7 +342,7 @@ class Cyr_To_Lat_Main {
309
 
310
  if (
311
  ! $data['post_name'] && $data['post_title'] &&
312
- ! in_array( $data['post_status'], array( 'auto-draft', 'revision' ), true )
313
  ) {
314
  $data['post_name'] = sanitize_title( $data['post_title'] );
315
  }
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
+ use wpdb;
11
+ use Exception;
12
  use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
13
 
14
  /**
15
+ * Class Main
16
  */
17
+ class Main {
18
 
19
  /**
20
  * Regex of prohibited chars in slugs
27
  /**
28
  * Plugin settings.
29
  *
30
+ * @var Settings
31
  */
32
+ protected $settings;
33
 
34
  /**
35
  * Converter instance.
36
  *
37
+ * @var Converter
38
  */
39
+ protected $converter;
40
 
41
  /**
42
+ * WP_CLI instance.
43
  *
44
+ * @var WP_CLI
45
  */
46
+ protected $cli;
47
 
48
  /**
49
+ * ACF instance.
50
  *
51
+ * @var ACF
52
  */
53
+ protected $acf;
54
 
55
  /**
56
+ * Main constructor.
57
  *
58
+ * @param Settings $settings Plugin settings.
59
+ * @param Converter $converter Converter instance.
60
+ * @param WP_CLI $cli CLI instance.
61
+ * @param ACF $acf ACF instance.
62
  */
63
  public function __construct( $settings = null, $converter = null, $cli = null, $acf = null ) {
64
  $this->settings = $settings;
65
  if ( ! $this->settings ) {
66
+ $this->settings = new Settings();
67
  }
68
 
69
  $this->converter = $converter;
70
  if ( ! $this->converter ) {
71
+ $this->converter = new Converter( $this, $this->settings );
72
  }
73
 
74
  $this->cli = $cli;
75
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
76
  if ( ! $this->cli ) {
77
+ $this->cli = new WP_CLI( $this->converter );
78
  }
79
  }
80
 
81
  $this->acf = $acf;
82
  if ( ! $this->acf ) {
83
+ $this->acf = new ACF( $this->settings );
84
  }
85
 
86
  $this->init();
97
  *
98
  * @noinspection PhpParamsInspection
99
  */
100
+ \WP_CLI::add_command( 'cyr2lat', $this->cli );
101
  } catch ( Exception $e ) {
102
  return;
103
  }
110
  * Init class hooks.
111
  */
112
  public function init_hooks() {
113
+ add_filter( 'sanitize_title', [ $this, 'ctl_sanitize_title' ], 9, 3 );
114
+ add_filter( 'sanitize_file_name', [ $this, 'ctl_sanitize_filename' ], 10, 2 );
115
+ add_filter( 'wp_insert_post_data', [ $this, 'ctl_sanitize_post_name' ], 10, 2 );
116
  }
117
 
118
  /**
145
 
146
  $is_term = false;
147
  // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
148
+ $backtrace = debug_backtrace( ~DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS );
149
  // phpcs:enable
150
  foreach ( $backtrace as $backtrace_entry ) {
151
  if ( 'wp_insert_term' === $backtrace_entry['function'] ) {
183
  }
184
 
185
  if ( seems_utf8( $filename ) ) {
186
+ $filename = Mbstring::mb_strtolower( $filename );
 
 
 
 
187
  }
188
 
189
  return $this->transliterate( $filename );
198
  */
199
  private function fix_mac_string( $string ) {
200
  $table = $this->get_filtered_table();
201
+ $fix_table = Conversion_Tables::get_fix_table_for_mac();
202
 
203
  $fix = [];
204
  foreach ( $fix_table as $key => $value ) {
210
  return strtr( $string, $fix );
211
  }
212
 
213
+ /**
214
+ * Split Chinese string by hyphens.
215
+ *
216
+ * @param string $string String.
217
+ * @param array $table Conversion table.
218
+ *
219
+ * @return string
220
+ */
221
+ protected function split_chinese_string( $string, $table ) {
222
+ if ( ! $this->settings->is_chinese_locale() || Mbstring::mb_strlen( $string ) < 4 ) {
223
+ return $string;
224
+ }
225
+
226
+ $chars = Mbstring::mb_str_split( $string );
227
+ $string = '';
228
+
229
+ foreach ( $chars as $char ) {
230
+ if ( isset( $table[ $char ] ) ) {
231
+ $string .= '-' . $char . '-';
232
+ } else {
233
+ $string .= $char;
234
+ }
235
+ }
236
+
237
+ return $string;
238
+ }
239
+
240
  /**
241
  * Get transliteration table.
242
  *
257
  $table = $this->get_filtered_table();
258
 
259
  $string = $this->fix_mac_string( $string );
260
+ $string = $this->split_chinese_string( $string, $table );
261
  $string = strtr( $string, $table );
262
 
263
  if ( function_exists( 'iconv' ) ) {
278
  private function ctl_is_classic_editor_plugin_active() {
279
  if ( ! function_exists( 'is_plugin_active' ) ) {
280
  // @codeCoverageIgnoreStart
281
+ /**
282
+ * Do not inspect include path.
283
+ *
284
+ * @noinspection PhpIncludeInspection
285
+ */
286
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
287
  // @codeCoverageIgnoreEnd
288
  }
312
 
313
  if ( $this->ctl_is_classic_editor_plugin_active() ) {
314
  $editor_option = get_option( 'classic-editor-replace' );
315
+ $block_editor_active = [ 'no-replace', 'block' ];
316
 
317
  return in_array( $editor_option, $block_editor_active, true );
318
  }
328
  *
329
  * @return mixed
330
  */
331
+ public function ctl_sanitize_post_name( $data, $postarr = [] ) {
332
  global $current_screen;
333
 
334
  if ( ! $this->ctl_is_gutenberg_editor_active() ) {
342
 
343
  if (
344
  ! $data['post_name'] && $data['post_title'] &&
345
+ ! in_array( $data['post_status'], [ 'auto-draft', 'revision' ], true )
346
  ) {
347
  $data['post_name'] = sanitize_title( $data['post_title'] );
348
  }
includes/class-cyr-to-lat-requirements.php → classes/class-requirements.php RENAMED
@@ -5,12 +5,14 @@
5
  * @package cyr-to-lat
6
  */
7
 
8
- if ( ! class_exists( 'Cyr_To_Lat_Requirements' ) ) {
 
 
9
 
10
  /**
11
- * Class Cyr_To_Lat_Requirements
12
  */
13
- class Cyr_To_Lat_Requirements {
14
 
15
  /**
16
  * Check if requirements are met.
@@ -28,7 +30,7 @@ if ( ! class_exists( 'Cyr_To_Lat_Requirements' ) ) {
28
  */
29
  private function is_php_version_required() {
30
  if ( version_compare( CYR_TO_LAT_MINIMUM_PHP_REQUIRED_VERSION, phpversion(), '>' ) ) {
31
- add_action( 'admin_notices', array( $this, 'php_requirement_message' ) );
32
 
33
  return false;
34
  }
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
+ if ( ! class_exists( __NAMESPACE__ . '\Requirements' ) ) {
11
 
12
  /**
13
+ * Class Requirements
14
  */
15
+ class Requirements {
16
 
17
  /**
18
  * Check if requirements are met.
30
  */
31
  private function is_php_version_required() {
32
  if ( version_compare( CYR_TO_LAT_MINIMUM_PHP_REQUIRED_VERSION, phpversion(), '>' ) ) {
33
+ add_action( 'admin_notices', [ $this, 'php_requirement_message' ] );
34
 
35
  return false;
36
  }
includes/class-cyr-to-lat-settings.php → classes/class-settings.php RENAMED
@@ -5,12 +5,16 @@
5
  * @package cyr-to-lat
6
  */
7
 
 
 
 
 
8
  /**
9
- * Class Cyr_To_Lat_Settings
10
  *
11
- * @class Cyr_To_Lat_Settings
12
  */
13
- class Cyr_To_Lat_Settings {
14
 
15
  /**
16
  * Admin screen id.
@@ -62,10 +66,10 @@ class Cyr_To_Lat_Settings {
62
  public $settings;
63
 
64
  /**
65
- * Cyr_To_Lat_Settings constructor.
66
  */
67
  public function __construct() {
68
- add_action( 'plugins_loaded', array( $this, 'init' ) );
69
  }
70
 
71
  /**
@@ -84,21 +88,18 @@ class Cyr_To_Lat_Settings {
84
  public function init_hooks() {
85
  add_filter(
86
  'plugin_action_links_' . plugin_basename( CYR_TO_LAT_FILE ),
87
- array(
88
- $this,
89
- 'add_settings_link',
90
- ),
91
  10,
92
  4
93
  );
94
 
95
- add_action( 'admin_menu', array( $this, 'add_settings_page' ) );
96
- add_action( 'current_screen', array( $this, 'setup_sections' ) );
97
- add_action( 'current_screen', array( $this, 'setup_fields' ) );
98
 
99
- add_filter( 'pre_update_option_' . self::OPTION_NAME, array( $this, 'pre_update_option_filter' ), 10, 3 );
100
 
101
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
102
  }
103
 
104
  /**
@@ -115,12 +116,12 @@ class Cyr_To_Lat_Settings {
115
  * @return array|mixed Plugin links
116
  */
117
  public function add_settings_link( $actions, $plugin_file, $plugin_data, $context ) {
118
- $ctl_actions = array(
119
  'settings' =>
120
  '<a href="' . admin_url( 'options-general.php?page=' . self::PAGE ) .
121
  '" aria-label="' . esc_attr__( 'View Cyr To Lat settings', 'cyr2lat' ) . '">' .
122
  esc_html__( 'Settings', 'cyr2lat' ) . '</a>',
123
- );
124
 
125
  return array_merge( $ctl_actions, $actions );
126
  }
@@ -129,89 +130,98 @@ class Cyr_To_Lat_Settings {
129
  * Init options form fields.
130
  */
131
  public function init_form_fields() {
132
- $this->form_fields = array(
133
- 'iso9' => array(
134
  'label' => __( 'ISO9 Table', 'cyr2lat' ),
135
  'section' => 'iso9_section',
136
  'type' => 'table',
137
  'placeholder' => '',
138
  'helper' => '',
139
  'supplemental' => '',
140
- 'default' => Cyr_To_Lat_Conversion_Tables::get(),
141
- ),
142
- 'bel' => array(
143
  'label' => __( 'bel Table', 'cyr2lat' ),
144
  'section' => 'bel_section',
145
  'type' => 'table',
146
  'placeholder' => '',
147
  'helper' => '',
148
  'supplemental' => '',
149
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'bel' ),
150
- ),
151
- 'uk' => array(
152
  'label' => __( 'uk Table', 'cyr2lat' ),
153
  'section' => 'uk_section',
154
  'type' => 'table',
155
  'placeholder' => '',
156
  'helper' => '',
157
  'supplemental' => '',
158
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'uk' ),
159
- ),
160
- 'bg_BG' => array(
161
  'label' => __( 'bg_BG Table', 'cyr2lat' ),
162
  'section' => 'bg_BG_section',
163
  'type' => 'table',
164
  'placeholder' => '',
165
  'helper' => '',
166
  'supplemental' => '',
167
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'bg_BG' ),
168
- ),
169
- 'mk_MK' => array(
170
  'label' => __( 'mk_MK Table', 'cyr2lat' ),
171
  'section' => 'mk_MK_section',
172
  'type' => 'table',
173
  'placeholder' => '',
174
  'helper' => '',
175
  'supplemental' => '',
176
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'mk_MK' ),
177
- ),
178
- 'sr_RS' => array(
179
  'label' => __( 'sr_RS Table', 'cyr2lat' ),
180
  'section' => 'sr_RS_section',
181
  'type' => 'table',
182
  'placeholder' => '',
183
  'helper' => '',
184
  'supplemental' => '',
185
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'sr_RS' ),
186
- ),
187
- 'ka_GE' => array(
188
  'label' => __( 'ka_GE Table', 'cyr2lat' ),
189
  'section' => 'ka_GE_section',
190
  'type' => 'table',
191
  'placeholder' => '',
192
  'helper' => '',
193
  'supplemental' => '',
194
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'ka_GE' ),
195
- ),
196
- 'kk' => array(
197
  'label' => __( 'kk Table', 'cyr2lat' ),
198
  'section' => 'kk_section',
199
  'type' => 'table',
200
  'placeholder' => '',
201
  'helper' => '',
202
  'supplemental' => '',
203
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'kk' ),
204
- ),
205
- 'he_IL' => array(
206
  'label' => __( 'he_IL Table', 'cyr2lat' ),
207
  'section' => 'he_IL_section',
208
  'type' => 'table',
209
  'placeholder' => '',
210
  'helper' => '',
211
  'supplemental' => '',
212
- 'default' => Cyr_To_Lat_Conversion_Tables::get( 'he_IL' ),
213
- ),
214
- );
 
 
 
 
 
 
 
 
 
215
  }
216
 
217
  /**
@@ -244,7 +254,7 @@ class Cyr_To_Lat_Settings {
244
  $this->init_form_fields();
245
  }
246
 
247
- return array_map( array( $this, 'set_defaults' ), $this->form_fields );
248
  }
249
 
250
  /**
@@ -271,7 +281,7 @@ class Cyr_To_Lat_Settings {
271
  $menu_title = __( 'Cyr To Lat', 'cyr2lat' );
272
  $capability = 'manage_options';
273
  $slug = self::PAGE;
274
- $callback = array( $this, 'ctl_settings_page' );
275
  add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $slug, $callback );
276
  }
277
 
@@ -318,19 +328,19 @@ class Cyr_To_Lat_Settings {
318
  <input type="hidden" name="cmd" value="_s-xclick">
319
  <input type="hidden" name="hosted_button_id" value="BENCPARA8S224">
320
  <input
321
- type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif"
322
- name="submit" alt="PayPal - The safer, easier way to pay online!">
323
  <img
324
- alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1"
325
- height="1">
326
  </form>
327
 
328
  <h2 id="appreciation">
329
  <?php echo esc_html( __( 'Your appreciation', 'cyr2lat' ) ); ?>
330
  </h2>
331
  <a
332
- target="_blank"
333
- href="https://wordpress.org/support/view/plugin-reviews/cyr2lat?rate=5#postform">
334
  <?php echo esc_html( __( 'Leave a ★★★★★ plugin review on WordPress.org', 'cyr2lat' ) ); ?>
335
  </a>
336
  </div>
@@ -349,55 +359,61 @@ class Cyr_To_Lat_Settings {
349
  add_settings_section(
350
  'iso9_section',
351
  __( 'ISO9 Table', 'cyr2lat' ),
352
- array( $this, 'cyr_to_lat_section' ),
353
  self::PAGE
354
  );
355
  add_settings_section(
356
  'bel_section',
357
  __( 'bel Table', 'cyr2lat' ),
358
- array( $this, 'cyr_to_lat_section' ),
359
  self::PAGE
360
  );
361
  add_settings_section(
362
  'uk_section',
363
  __( 'uk Table', 'cyr2lat' ),
364
- array( $this, 'cyr_to_lat_section' ),
365
  self::PAGE
366
  );
367
  add_settings_section(
368
  'bg_BG_section',
369
  __( 'bg_BG Table', 'cyr2lat' ),
370
- array( $this, 'cyr_to_lat_section' ),
371
  self::PAGE
372
  );
373
  add_settings_section(
374
  'mk_MK_section',
375
  __( 'mk_MK Table', 'cyr2lat' ),
376
- array( $this, 'cyr_to_lat_section' ),
377
  self::PAGE
378
  );
379
  add_settings_section(
380
  'sr_RS_section',
381
  __( 'sr_RS Table', 'cyr2lat' ),
382
- array( $this, 'cyr_to_lat_section' ),
383
  self::PAGE
384
  );
385
  add_settings_section(
386
  'ka_GE_section',
387
  __( 'ka_GE Table', 'cyr2lat' ),
388
- array( $this, 'cyr_to_lat_section' ),
389
  self::PAGE
390
  );
391
  add_settings_section(
392
  'kk_section',
393
  __( 'kk Table', 'cyr2lat' ),
394
- array( $this, 'cyr_to_lat_section' ),
395
  self::PAGE
396
  );
397
  add_settings_section(
398
  'he_IL_section',
399
  __( 'he_IL Table', 'cyr2lat' ),
400
- array( $this, 'cyr_to_lat_section' ),
 
 
 
 
 
 
401
  self::PAGE
402
  );
403
  }
@@ -429,7 +445,7 @@ class Cyr_To_Lat_Settings {
429
  add_settings_field(
430
  $key,
431
  $field['label'],
432
- array( $this, 'field_callback' ),
433
  self::PAGE,
434
  $field['section'],
435
  $field
@@ -475,7 +491,7 @@ class Cyr_To_Lat_Settings {
475
  case 'checkbox':
476
  case 'radio':
477
  if ( 'checkbox' === $arguments['type'] ) {
478
- $arguments['options'] = array( 'yes' => '' );
479
  }
480
 
481
  if ( ! empty( $arguments['options'] ) && is_array( $arguments['options'] ) ) {
@@ -498,19 +514,19 @@ class Cyr_To_Lat_Settings {
498
  '<fieldset>%s</fieldset>',
499
  wp_kses(
500
  $options_markup,
501
- array(
502
- 'label' => array(
503
- 'for' => array(),
504
- ),
505
- 'input' => array(
506
- 'id' => array(),
507
- 'name' => array(),
508
- 'type' => array(),
509
- 'value' => array(),
510
- 'checked' => array(),
511
- ),
512
- 'br' => array(),
513
- )
514
  )
515
  );
516
  }
@@ -532,12 +548,12 @@ class Cyr_To_Lat_Settings {
532
  esc_html( $arguments['field_id'] ),
533
  wp_kses(
534
  $options_markup,
535
- array(
536
- 'option' => array(
537
- 'value' => array(),
538
- 'selected' => array(),
539
- ),
540
- )
541
  )
542
  );
543
  }
@@ -565,12 +581,12 @@ class Cyr_To_Lat_Settings {
565
  esc_html( $arguments['field_id'] ),
566
  wp_kses(
567
  $options_markup,
568
- array(
569
- 'option' => array(
570
- 'value' => array(),
571
- 'selected' => array(),
572
- ),
573
- )
574
  )
575
  );
576
  }
@@ -626,7 +642,7 @@ class Cyr_To_Lat_Settings {
626
  * @param string $key Setting name.
627
  * @param mixed $empty_value Empty value for this setting.
628
  *
629
- * @return string The value specified for the option or a default value for the option.
630
  */
631
  public function get_option( $key, $empty_value = null ) {
632
  if ( empty( $this->settings ) ) {
@@ -713,7 +729,7 @@ class Cyr_To_Lat_Settings {
713
  wp_enqueue_script(
714
  'cyr-to-lat-settings',
715
  CYR_TO_LAT_URL . '/dist/js/settings/app.js',
716
- array(),
717
  CYR_TO_LAT_VERSION,
718
  true
719
  );
@@ -721,7 +737,7 @@ class Cyr_To_Lat_Settings {
721
  wp_enqueue_style(
722
  'cyr-to-lat-admin',
723
  CYR_TO_LAT_URL . '/css/cyr-to-lat-admin.css',
724
- array(),
725
  CYR_TO_LAT_VERSION
726
  );
727
  }
@@ -740,7 +756,7 @@ class Cyr_To_Lat_Settings {
740
  /**
741
  * Get transliteration table.
742
  *
743
- * @return string
744
  */
745
  public function get_table() {
746
  // List of locales: https://make.wordpress.org/polyglots/teams/.
@@ -750,7 +766,43 @@ class Cyr_To_Lat_Settings {
750
  $table = $this->get_option( 'iso9' );
751
  }
752
 
753
- return $table;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754
  }
755
 
756
  /**
5
  * @package cyr-to-lat
6
  */
7
 
8
+ namespace Cyr_To_Lat;
9
+
10
+ use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
11
+
12
  /**
13
+ * Class Settings
14
  *
15
+ * @class Settings
16
  */
17
+ class Settings {
18
 
19
  /**
20
  * Admin screen id.
66
  public $settings;
67
 
68
  /**
69
+ * Settings constructor.
70
  */
71
  public function __construct() {
72
+ add_action( 'plugins_loaded', [ $this, 'init' ] );
73
  }
74
 
75
  /**
88
  public function init_hooks() {
89
  add_filter(
90
  'plugin_action_links_' . plugin_basename( CYR_TO_LAT_FILE ),
91
+ [ $this, 'add_settings_link' ],
 
 
 
92
  10,
93
  4
94
  );
95
 
96
+ add_action( 'admin_menu', [ $this, 'add_settings_page' ] );
97
+ add_action( 'current_screen', [ $this, 'setup_sections' ] );
98
+ add_action( 'current_screen', [ $this, 'setup_fields' ] );
99
 
100
+ add_filter( 'pre_update_option_' . self::OPTION_NAME, [ $this, 'pre_update_option_filter' ], 10, 3 );
101
 
102
+ add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
103
  }
104
 
105
  /**
116
  * @return array|mixed Plugin links
117
  */
118
  public function add_settings_link( $actions, $plugin_file, $plugin_data, $context ) {
119
+ $ctl_actions = [
120
  'settings' =>
121
  '<a href="' . admin_url( 'options-general.php?page=' . self::PAGE ) .
122
  '" aria-label="' . esc_attr__( 'View Cyr To Lat settings', 'cyr2lat' ) . '">' .
123
  esc_html__( 'Settings', 'cyr2lat' ) . '</a>',
124
+ ];
125
 
126
  return array_merge( $ctl_actions, $actions );
127
  }
130
  * Init options form fields.
131
  */
132
  public function init_form_fields() {
133
+ $this->form_fields = [
134
+ 'iso9' => [
135
  'label' => __( 'ISO9 Table', 'cyr2lat' ),
136
  'section' => 'iso9_section',
137
  'type' => 'table',
138
  'placeholder' => '',
139
  'helper' => '',
140
  'supplemental' => '',
141
+ 'default' => Conversion_Tables::get(),
142
+ ],
143
+ 'bel' => [
144
  'label' => __( 'bel Table', 'cyr2lat' ),
145
  'section' => 'bel_section',
146
  'type' => 'table',
147
  'placeholder' => '',
148
  'helper' => '',
149
  'supplemental' => '',
150
+ 'default' => Conversion_Tables::get( 'bel' ),
151
+ ],
152
+ 'uk' => [
153
  'label' => __( 'uk Table', 'cyr2lat' ),
154
  'section' => 'uk_section',
155
  'type' => 'table',
156
  'placeholder' => '',
157
  'helper' => '',
158
  'supplemental' => '',
159
+ 'default' => Conversion_Tables::get( 'uk' ),
160
+ ],
161
+ 'bg_BG' => [
162
  'label' => __( 'bg_BG Table', 'cyr2lat' ),
163
  'section' => 'bg_BG_section',
164
  'type' => 'table',
165
  'placeholder' => '',
166
  'helper' => '',
167
  'supplemental' => '',
168
+ 'default' => Conversion_Tables::get( 'bg_BG' ),
169
+ ],
170
+ 'mk_MK' => [
171
  'label' => __( 'mk_MK Table', 'cyr2lat' ),
172
  'section' => 'mk_MK_section',
173
  'type' => 'table',
174
  'placeholder' => '',
175
  'helper' => '',
176
  'supplemental' => '',
177
+ 'default' => Conversion_Tables::get( 'mk_MK' ),
178
+ ],
179
+ 'sr_RS' => [
180
  'label' => __( 'sr_RS Table', 'cyr2lat' ),
181
  'section' => 'sr_RS_section',
182
  'type' => 'table',
183
  'placeholder' => '',
184
  'helper' => '',
185
  'supplemental' => '',
186
+ 'default' => Conversion_Tables::get( 'sr_RS' ),
187
+ ],
188
+ 'ka_GE' => [
189
  'label' => __( 'ka_GE Table', 'cyr2lat' ),
190
  'section' => 'ka_GE_section',
191
  'type' => 'table',
192
  'placeholder' => '',
193
  'helper' => '',
194
  'supplemental' => '',
195
+ 'default' => Conversion_Tables::get( 'ka_GE' ),
196
+ ],
197
+ 'kk' => [
198
  'label' => __( 'kk Table', 'cyr2lat' ),
199
  'section' => 'kk_section',
200
  'type' => 'table',
201
  'placeholder' => '',
202
  'helper' => '',
203
  'supplemental' => '',
204
+ 'default' => Conversion_Tables::get( 'kk' ),
205
+ ],
206
+ 'he_IL' => [
207
  'label' => __( 'he_IL Table', 'cyr2lat' ),
208
  'section' => 'he_IL_section',
209
  'type' => 'table',
210
  'placeholder' => '',
211
  'helper' => '',
212
  'supplemental' => '',
213
+ 'default' => Conversion_Tables::get( 'he_IL' ),
214
+ ],
215
+ 'zh_CN' => [
216
+ 'label' => __( 'zh_CN Table', 'cyr2lat' ),
217
+ 'section' => 'zh_CN_section',
218
+ 'type' => 'table',
219
+ 'placeholder' => '',
220
+ 'helper' => '',
221
+ 'supplemental' => '',
222
+ 'default' => Conversion_Tables::get( 'zh_CN' ),
223
+ ],
224
+ ];
225
  }
226
 
227
  /**
254
  $this->init_form_fields();
255
  }
256
 
257
+ return array_map( [ $this, 'set_defaults' ], $this->form_fields );
258
  }
259
 
260
  /**
281
  $menu_title = __( 'Cyr To Lat', 'cyr2lat' );
282
  $capability = 'manage_options';
283
  $slug = self::PAGE;
284
+ $callback = [ $this, 'ctl_settings_page' ];
285
  add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $slug, $callback );
286
  }
287
 
328
  <input type="hidden" name="cmd" value="_s-xclick">
329
  <input type="hidden" name="hosted_button_id" value="BENCPARA8S224">
330
  <input
331
+ type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif"
332
+ name="submit" alt="PayPal - The safer, easier way to pay online!">
333
  <img
334
+ alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1"
335
+ height="1">
336
  </form>
337
 
338
  <h2 id="appreciation">
339
  <?php echo esc_html( __( 'Your appreciation', 'cyr2lat' ) ); ?>
340
  </h2>
341
  <a
342
+ target="_blank"
343
+ href="https://wordpress.org/support/view/plugin-reviews/cyr2lat?rate=5#postform">
344
  <?php echo esc_html( __( 'Leave a ★★★★★ plugin review on WordPress.org', 'cyr2lat' ) ); ?>
345
  </a>
346
  </div>
359
  add_settings_section(
360
  'iso9_section',
361
  __( 'ISO9 Table', 'cyr2lat' ),
362
+ [ $this, 'cyr_to_lat_section' ],
363
  self::PAGE
364
  );
365
  add_settings_section(
366
  'bel_section',
367
  __( 'bel Table', 'cyr2lat' ),
368
+ [ $this, 'cyr_to_lat_section' ],
369
  self::PAGE
370
  );
371
  add_settings_section(
372
  'uk_section',
373
  __( 'uk Table', 'cyr2lat' ),
374
+ [ $this, 'cyr_to_lat_section' ],
375
  self::PAGE
376
  );
377
  add_settings_section(
378
  'bg_BG_section',
379
  __( 'bg_BG Table', 'cyr2lat' ),
380
+ [ $this, 'cyr_to_lat_section' ],
381
  self::PAGE
382
  );
383
  add_settings_section(
384
  'mk_MK_section',
385
  __( 'mk_MK Table', 'cyr2lat' ),
386
+ [ $this, 'cyr_to_lat_section' ],
387
  self::PAGE
388
  );
389
  add_settings_section(
390
  'sr_RS_section',
391
  __( 'sr_RS Table', 'cyr2lat' ),
392
+ [ $this, 'cyr_to_lat_section' ],
393
  self::PAGE
394
  );
395
  add_settings_section(
396
  'ka_GE_section',
397
  __( 'ka_GE Table', 'cyr2lat' ),
398
+ [ $this, 'cyr_to_lat_section' ],
399
  self::PAGE
400
  );
401
  add_settings_section(
402
  'kk_section',
403
  __( 'kk Table', 'cyr2lat' ),
404
+ [ $this, 'cyr_to_lat_section' ],
405
  self::PAGE
406
  );
407
  add_settings_section(
408
  'he_IL_section',
409
  __( 'he_IL Table', 'cyr2lat' ),
410
+ [ $this, 'cyr_to_lat_section' ],
411
+ self::PAGE
412
+ );
413
+ add_settings_section(
414
+ 'zh_CN_section',
415
+ __( 'zh_CN Table', 'cyr2lat' ),
416
+ [ $this, 'cyr_to_lat_section' ],
417
  self::PAGE
418
  );
419
  }
445
  add_settings_field(
446
  $key,
447
  $field['label'],
448
+ [ $this, 'field_callback' ],
449
  self::PAGE,
450
  $field['section'],
451
  $field
491
  case 'checkbox':
492
  case 'radio':
493
  if ( 'checkbox' === $arguments['type'] ) {
494
+ $arguments['options'] = [ 'yes' => '' ];
495
  }
496
 
497
  if ( ! empty( $arguments['options'] ) && is_array( $arguments['options'] ) ) {
514
  '<fieldset>%s</fieldset>',
515
  wp_kses(
516
  $options_markup,
517
+ [
518
+ 'label' => [
519
+ 'for' => [],
520
+ ],
521
+ 'input' => [
522
+ 'id' => [],
523
+ 'name' => [],
524
+ 'type' => [],
525
+ 'value' => [],
526
+ 'checked' => [],
527
+ ],
528
+ 'br' => [],
529
+ ]
530
  )
531
  );
532
  }
548
  esc_html( $arguments['field_id'] ),
549
  wp_kses(
550
  $options_markup,
551
+ [
552
+ 'option' => [
553
+ 'value' => [],
554
+ 'selected' => [],
555
+ ],
556
+ ]
557
  )
558
  );
559
  }
581
  esc_html( $arguments['field_id'] ),
582
  wp_kses(
583
  $options_markup,
584
+ [
585
+ 'option' => [
586
+ 'value' => [],
587
+ 'selected' => [],
588
+ ],
589
+ ]
590
  )
591
  );
592
  }
642
  * @param string $key Setting name.
643
  * @param mixed $empty_value Empty value for this setting.
644
  *
645
+ * @return string|array The value specified for the option or a default value for the option.
646
  */
647
  public function get_option( $key, $empty_value = null ) {
648
  if ( empty( $this->settings ) ) {
729
  wp_enqueue_script(
730
  'cyr-to-lat-settings',
731
  CYR_TO_LAT_URL . '/dist/js/settings/app.js',
732
+ [],
733
  CYR_TO_LAT_VERSION,
734
  true
735
  );
737
  wp_enqueue_style(
738
  'cyr-to-lat-admin',
739
  CYR_TO_LAT_URL . '/css/cyr-to-lat-admin.css',
740
+ [],
741
  CYR_TO_LAT_VERSION
742
  );
743
  }
756
  /**
757
  * Get transliteration table.
758
  *
759
+ * @return array
760
  */
761
  public function get_table() {
762
  // List of locales: https://make.wordpress.org/polyglots/teams/.
766
  $table = $this->get_option( 'iso9' );
767
  }
768
 
769
+ return $this->transpose_chinese_table( $table );
770
+ }
771
+
772
+ /**
773
+ * Is current locale a Chinese one.
774
+ *
775
+ * @return bool
776
+ */
777
+ public function is_chinese_locale() {
778
+ $chinese_locales = [ 'zh_CN', 'zh_HK', 'zh_SG', 'zh_TW' ];
779
+
780
+ return in_array( get_locale(), $chinese_locales, true );
781
+ }
782
+
783
+ /**
784
+ * Transpose Chinese table.
785
+ *
786
+ * Chinese tables are stored in different way, to show them compact.
787
+ *
788
+ * @param array $table Table.
789
+ *
790
+ * @return array
791
+ */
792
+ protected function transpose_chinese_table( $table ) {
793
+ if ( ! $this->is_chinese_locale() ) {
794
+ return $table;
795
+ }
796
+
797
+ $transposed_table = [];
798
+ foreach ( $table as $key => $item ) {
799
+ $hieroglyphs = Mbstring::mb_str_split( $item );
800
+ foreach ( $hieroglyphs as $hieroglyph ) {
801
+ $transposed_table[ $hieroglyph ] = $key;
802
+ }
803
+ }
804
+
805
+ return $transposed_table;
806
  }
807
 
808
  /**
includes/class-cyr-to-lat-wp-cli.php → classes/class-wp-cli.php RENAMED
@@ -6,26 +6,33 @@
6
  * @link https://github.com/mihdan/wp-rocket-cli/blob/master/command.php
7
  */
8
 
 
 
 
 
 
 
 
9
  /**
10
- * Class Cyr_To_Lat_WP_CLI
11
  *
12
- * @class Cyr_To_Lat_WP_CLI
13
  */
14
- class Cyr_To_Lat_WP_CLI extends WP_CLI_Command {
15
 
16
  /**
17
  * Converter class.
18
  *
19
- * @var Cyr_To_Lat_Converter
20
  */
21
  private $converter;
22
 
23
  /**
24
- * Cyr_To_Lat_WP_CLI constructor.
25
  *
26
- * @param Cyr_To_Lat_Converter $converter Converter.
27
  */
28
- public function __construct( Cyr_To_Lat_Converter $converter ) {
29
  parent::__construct();
30
  $this->converter = $converter;
31
  }
@@ -43,16 +50,16 @@ class Cyr_To_Lat_WP_CLI extends WP_CLI_Command {
43
  * @param array $args Arguments.
44
  * @param array $assoc_args Arguments in associative array.
45
  */
46
- public function regenerate( $args = array(), $assoc_args = array() ) {
47
 
48
  /**
49
  * Notify instance.
50
  *
51
- * @var \cli\progress\Bar $notify
52
  */
53
  $notify = $this->make_progress_bar();
54
 
55
- $result = array();
56
 
57
  if ( ! empty( $assoc_args['post_status'] ) ) {
58
  $result['post_status'] = explode( ',', $assoc_args['post_status'] );
@@ -68,15 +75,15 @@ class Cyr_To_Lat_WP_CLI extends WP_CLI_Command {
68
  $notify->tick();
69
  $notify->finish();
70
 
71
- WP_CLI::success( 'Regenerate Completed.' );
72
  }
73
 
74
  /**
75
  * Make progress bar.
76
  *
77
- * @return \cli\progress\Bar|\WP_CLI\NoOp
78
  */
79
  protected function make_progress_bar() {
80
- return \WP_CLI\Utils\make_progress_bar( 'Regenerate existing slugs', 1 );
81
  }
82
  }
6
  * @link https://github.com/mihdan/wp-rocket-cli/blob/master/command.php
7
  */
8
 
9
+ namespace Cyr_To_Lat;
10
+
11
+ use cli\progress\Bar;
12
+ use WP_CLI\NoOp;
13
+ use WP_CLI_Command;
14
+ use function WP_CLI\Utils\make_progress_bar;
15
+
16
  /**
17
+ * Class WP_CLI
18
  *
19
+ * @class WP_CLI
20
  */
21
+ class WP_CLI extends WP_CLI_Command {
22
 
23
  /**
24
  * Converter class.
25
  *
26
+ * @var Converter
27
  */
28
  private $converter;
29
 
30
  /**
31
+ * WP_CLI constructor.
32
  *
33
+ * @param Converter $converter Converter.
34
  */
35
+ public function __construct( Converter $converter ) {
36
  parent::__construct();
37
  $this->converter = $converter;
38
  }
50
  * @param array $args Arguments.
51
  * @param array $assoc_args Arguments in associative array.
52
  */
53
+ public function regenerate( $args = [], $assoc_args = [] ) {
54
 
55
  /**
56
  * Notify instance.
57
  *
58
+ * @var Bar $notify
59
  */
60
  $notify = $this->make_progress_bar();
61
 
62
+ $result = [];
63
 
64
  if ( ! empty( $assoc_args['post_status'] ) ) {
65
  $result['post_status'] = explode( ',', $assoc_args['post_status'] );
75
  $notify->tick();
76
  $notify->finish();
77
 
78
+ \WP_CLI::success( 'Regenerate Completed.' );
79
  }
80
 
81
  /**
82
  * Make progress bar.
83
  *
84
+ * @return Bar|NoOp
85
  */
86
  protected function make_progress_bar() {
87
+ return make_progress_bar( 'Regenerate existing slugs', 1 );
88
  }
89
  }
cyr-to-lat.php CHANGED
@@ -8,9 +8,9 @@
8
  * Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
9
  * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
  * Requires at least: 5.1
11
- * Tested up to: 5.2
12
- * Version: 4.2.3
13
- * Stable tag: 4.2.3
14
  *
15
  * Text Domain: cyr2lat
16
  * Domain Path: /languages/
@@ -19,6 +19,8 @@
19
  * @author Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
20
  */
21
 
 
 
22
  // @codeCoverageIgnoreStart
23
  if ( ! defined( 'ABSPATH' ) ) {
24
  exit; // Exit if accessed directly.
@@ -28,7 +30,7 @@ if ( ! defined( 'CYR_TO_LAT_VERSION' ) ) {
28
  /**
29
  * Plugin version.
30
  */
31
- define( 'CYR_TO_LAT_VERSION', '4.2.3' );
32
  }
33
 
34
  if ( ! defined( 'CYR_TO_LAT_PATH' ) ) {
@@ -86,21 +88,21 @@ if ( ! defined( 'CYR_TO_LAT_MINIMUM_PHP_REQUIRED_VERSION' ) ) {
86
  */
87
 
88
  static $requirements;
89
- static $plugin;
90
 
91
  if ( ! isset( $requirements ) ) {
92
- require_once CYR_TO_LAT_PATH . '/includes/class-cyr-to-lat-requirements.php'; // We cannot use composer autoloader here.
93
- $requirements = new Cyr_To_Lat_Requirements();
94
  }
95
 
96
  if ( ! $requirements->are_requirements_met() ) {
97
- $plugin = false;
98
  return;
99
  }
100
 
101
- if ( ! isset( $plugin ) ) {
102
  require_once CYR_TO_LAT_PATH . '/vendor/autoload.php';
103
 
104
- $plugin = new Cyr_To_Lat_Main();
105
  }
106
 
8
  * Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
9
  * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
  * Requires at least: 5.1
11
+ * Tested up to: 5.3
12
+ * Version: 4.3
13
+ * Stable tag: 4.3
14
  *
15
  * Text Domain: cyr2lat
16
  * Domain Path: /languages/
19
  * @author Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
20
  */
21
 
22
+ namespace Cyr_To_Lat;
23
+
24
  // @codeCoverageIgnoreStart
25
  if ( ! defined( 'ABSPATH' ) ) {
26
  exit; // Exit if accessed directly.
30
  /**
31
  * Plugin version.
32
  */
33
+ define( 'CYR_TO_LAT_VERSION', '4.3' );
34
  }
35
 
36
  if ( ! defined( 'CYR_TO_LAT_PATH' ) ) {
88
  */
89
 
90
  static $requirements;
91
+ static $cyr_to_lat_plugin;
92
 
93
  if ( ! isset( $requirements ) ) {
94
+ require_once CYR_TO_LAT_PATH . '/classes/class-requirements.php';
95
+ $requirements = new Requirements();
96
  }
97
 
98
  if ( ! $requirements->are_requirements_met() ) {
99
+ $cyr_to_lat_plugin = false;
100
  return;
101
  }
102
 
103
+ if ( ! isset( $cyr_to_lat_plugin ) ) {
104
  require_once CYR_TO_LAT_PATH . '/vendor/autoload.php';
105
 
106
+ $cyr_to_lat_plugin = new Main();
107
  }
108
 
dist/js/settings/app.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hideTables(),this.bindEvents()}return n(t,[{key:"hideTables",value:function(){[].concat(o(document.querySelectorAll("#ctl-options table"))).map(function(t,e){if(t.classList.add("ctl-table"),0===e){t.classList.add("active");var r=document.createElement("ul");r.classList.add("nav-tab-wrapper"),t.parentNode.insertBefore(r,t)}}),[].concat(o(document.querySelectorAll("#ctl-options h2"))).map(function(t,e){t.classList.add("nav-tab"),t.dataset.index=e,document.querySelector("#ctl-options ul").appendChild(t),0===e&&t.classList.add("nav-tab-active")})}},{key:"bindEvents",value:function(){[].concat(o(document.querySelectorAll("#ctl-options ul h2"))).map(function(t){t.onclick=function(t){t.preventDefault();var e=t.target.dataset.index,r=[].concat(o(document.querySelectorAll("#ctl-options ul h2")));r.map(function(t){t.classList.remove("nav-tab-active")}),r[e].classList.add("nav-tab-active");var n=[].concat(o(document.querySelectorAll(".ctl-table")));return n.map(function(t){t.classList.remove("active")}),n[e].classList.add("active"),!1}})}}]),t}();e.default=i},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}}(r(0));document.addEventListener("DOMContentLoaded",function(){new n.default})},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},p.call(b.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=c,t.Request=b,t.Response=v,t.fetch=function(t,r){return new Promise(function(n,o){var i=new b(t,r),s=new XMLHttpRequest;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:function(t){var e=new c;return t.split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e}(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;n(new v(e,t))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&e.blob&&(s.responseType="blob"),i.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function h(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=d(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(t,e){var r=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=function(t){var e=t.toUpperCase();return i.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function v(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,r){r(2),t.exports=r(1)}]);
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){r(1),t.exports=r(2)},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),f(t)},c.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),f(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},p.call(b.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=c,t.Request=b,t.Response=v,t.fetch=function(t,r){return new Promise((function(n,o){var i=new b(t,r),s=new XMLHttpRequest;s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new c,t.split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;n(new v(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&e.blob&&(s.responseType="blob"),i.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),s.send(void 0===i._bodyInit?null:i._bodyInit)}))},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function c(t){this.map={},t instanceof c?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function h(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t,e,r,n=l(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=d(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(t,e){var r,n,o=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),i.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function v(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,r){"use strict";var n,o=r(3),i=(n=o)&&n.__esModule?n:{default:n};document.addEventListener("DOMContentLoaded",(function(){new i.default}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hideTables(),this.bindEvents()}return n(t,[{key:"hideTables",value:function(){[].concat(o(document.querySelectorAll("#ctl-options table"))).map((function(t,e){if(t.classList.add("ctl-table"),0===e){t.classList.add("active");var r=document.createElement("ul");r.classList.add("nav-tab-wrapper"),t.parentNode.insertBefore(r,t)}})),[].concat(o(document.querySelectorAll("#ctl-options h2"))).map((function(t,e){t.classList.add("nav-tab"),t.dataset.index=e,document.querySelector("#ctl-options ul").appendChild(t),0===e&&t.classList.add("nav-tab-active")}))}},{key:"bindEvents",value:function(){[].concat(o(document.querySelectorAll("#ctl-options ul h2"))).map((function(t){t.onclick=function(t){t.preventDefault();var e=t.target.dataset.index,r=[].concat(o(document.querySelectorAll("#ctl-options ul h2")));r.map((function(t){t.classList.remove("nav-tab-active")})),r[e].classList.add("nav-tab-active");var n=[].concat(o(document.querySelectorAll(".ctl-table")));return n.map((function(t){t.classList.remove("active")})),n[e].classList.add("active"),!1}}))}}]),t}();e.default=i}]);
includes/class-cyr-to-lat-conversion-tables.php DELETED
@@ -1,415 +0,0 @@
1
- <?php
2
- /**
3
- * Conversion tables.
4
- *
5
- * @package cyr-to-lat
6
- */
7
-
8
- use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
9
-
10
- /**
11
- * Class Cyr_To_Lat_Conversion_Tables
12
- *
13
- * @class Cyr_To_Lat_Conversion_Tables
14
- */
15
- class Cyr_To_Lat_Conversion_Tables {
16
-
17
- /**
18
- * Get conversion table by locale.
19
- *
20
- * @link https://ru.wikipedia.org/wiki/ISO_9
21
- *
22
- * @param string $locale WordPress locale.
23
- *
24
- * @return array
25
- */
26
- public static function get( $locale = '' ) {
27
- $table = array(
28
- 'А' => 'A',
29
- 'Б' => 'B',
30
- 'В' => 'V',
31
- 'Г' => 'G',
32
- 'Д' => 'D',
33
- 'Е' => 'E',
34
- 'Ё' => 'YO',
35
- 'Ж' => 'ZH',
36
- 'З' => 'Z',
37
- 'И' => 'I',
38
- 'Й' => 'J',
39
- 'І' => 'I',
40
- 'К' => 'K',
41
- 'Л' => 'L',
42
- 'М' => 'M',
43
- 'Н' => 'N',
44
- 'О' => 'O',
45
- 'П' => 'P',
46
- 'Р' => 'R',
47
- 'С' => 'S',
48
- 'Т' => 'T',
49
- 'У' => 'U',
50
- 'Ф' => 'F',
51
- 'Х' => 'H',
52
- 'Ц' => 'CZ',
53
- 'Ч' => 'CH',
54
- 'Ш' => 'SH',
55
- 'Щ' => 'SHH',
56
- 'Ъ' => '',
57
- 'Ы' => 'Y',
58
- 'Ь' => '',
59
- 'Э' => 'E',
60
- 'Ю' => 'YU',
61
- 'Я' => 'YA',
62
- 'Ѣ' => 'YE',
63
- 'Ѳ' => 'FH',
64
- 'Ѵ' => 'YH',
65
- 'а' => 'a',
66
- 'б' => 'b',
67
- 'в' => 'v',
68
- 'г' => 'g',
69
- 'д' => 'd',
70
- 'е' => 'e',
71
- 'ё' => 'yo',
72
- 'ж' => 'zh',
73
- 'з' => 'z',
74
- 'и' => 'i',
75
- 'й' => 'j',
76
- 'і' => 'i',
77
- 'к' => 'k',
78
- 'л' => 'l',
79
- 'м' => 'm',
80
- 'н' => 'n',
81
- 'о' => 'o',
82
- 'п' => 'p',
83
- 'р' => 'r',
84
- 'с' => 's',
85
- 'т' => 't',
86
- 'у' => 'u',
87
- 'ф' => 'f',
88
- 'х' => 'h',
89
- 'ц' => 'cz',
90
- 'ч' => 'ch',
91
- 'ш' => 'sh',
92
- 'щ' => 'shh',
93
- 'ъ' => '',
94
- 'ы' => 'y',
95
- 'ь' => '',
96
- 'э' => 'e',
97
- 'ю' => 'yu',
98
- 'я' => 'ya',
99
- 'ѣ' => 'ye',
100
- 'ѳ' => 'fh',
101
- 'ѵ' => 'yh',
102
- );
103
- switch ( $locale ) {
104
- // Belorussian.
105
- case 'bel':
106
- unset( $table['И'] );
107
- unset( $table['и'] );
108
- $table['Ў'] = 'U';
109
- $table['ў'] = 'u';
110
- unset( $table['Щ'] );
111
- unset( $table['щ'] );
112
- unset( $table['Ъ'] );
113
- unset( $table['ъ'] );
114
- unset( $table['Ѣ'] );
115
- unset( $table['ѣ'] );
116
- unset( $table['Ѳ'] );
117
- unset( $table['ѳ'] );
118
- unset( $table['Ѵ'] );
119
- unset( $table['ѵ'] );
120
- break;
121
- // Ukrainian.
122
- case 'uk':
123
- $table['Ґ'] = 'G';
124
- $table['ґ'] = 'g';
125
- unset( $table['Ё'] );
126
- unset( $table['ё'] );
127
- $table['Є'] = 'YE';
128
- $table['є'] = 'ye';
129
- $table['И'] = 'Y';
130
- $table['и'] = 'y';
131
- $table['Ї'] = 'YI';
132
- $table['ї'] = 'yi';
133
- unset( $table['Ъ'] );
134
- unset( $table['ъ'] );
135
- unset( $table['Ы'] );
136
- unset( $table['ы'] );
137
- unset( $table['Э'] );
138
- unset( $table['э'] );
139
- unset( $table['Ѣ'] );
140
- unset( $table['ѣ'] );
141
- unset( $table['Ѳ'] );
142
- unset( $table['ѳ'] );
143
- unset( $table['Ѵ'] );
144
- unset( $table['ѵ'] );
145
- break;
146
- // Bulgarian.
147
- case 'bg_BG':
148
- unset( $table['Ё'] );
149
- unset( $table['ё'] );
150
- $table['Щ'] = 'STH';
151
- $table['щ'] = 'sth';
152
- $table['Ъ'] = 'A';
153
- $table['ъ'] = 'a';
154
- unset( $table['Ы'] );
155
- unset( $table['ы'] );
156
- unset( $table['Э'] );
157
- unset( $table['э'] );
158
- $table['Ѫ'] = 'О';
159
- $table['ѫ'] = 'о';
160
- break;
161
- // Macedonian.
162
- case 'mk_MK':
163
- $table['Ѓ'] = 'G';
164
- $table['ѓ'] = 'g';
165
- unset( $table['Ё'] );
166
- unset( $table['ё'] );
167
- $table['Ѕ'] = 'Z';
168
- $table['ѕ'] = 'z';
169
- unset( $table['Й'] );
170
- unset( $table['й'] );
171
- $table['Ј'] = 'J';
172
- $table['ј'] = 'j';
173
- unset( $table['I'] );
174
- unset( $table['i'] );
175
- $table['Ќ'] = 'K';
176
- $table['ќ'] = 'k';
177
- $table['Љ'] = 'L';
178
- $table['љ'] = 'l';
179
- $table['Њ'] = 'N';
180
- $table['њ'] = 'n';
181
- $table['Џ'] = 'DH';
182
- $table['џ'] = 'dh';
183
- unset( $table['Щ'] );
184
- unset( $table['щ'] );
185
- unset( $table['Ъ'] );
186
- unset( $table['ъ'] );
187
- unset( $table['Ы'] );
188
- unset( $table['ы'] );
189
- unset( $table['Ь'] );
190
- unset( $table['ь'] );
191
- unset( $table['Э'] );
192
- unset( $table['э'] );
193
- unset( $table['Ю'] );
194
- unset( $table['ю'] );
195
- unset( $table['Я'] );
196
- unset( $table['я'] );
197
- unset( $table['Ѣ'] );
198
- unset( $table['ѣ'] );
199
- unset( $table['Ѳ'] );
200
- unset( $table['ѳ'] );
201
- unset( $table['Ѵ'] );
202
- unset( $table['ѵ'] );
203
- break;
204
- // Serbian.
205
- case 'sr_RS':
206
- $table['Ђ'] = 'Dj';
207
- $table['ђ'] = 'dj';
208
- unset( $table['Ё'] );
209
- unset( $table['ё'] );
210
- $table['Ж'] = 'Z';
211
- $table['ж'] = 'z';
212
- unset( $table['Й'] );
213
- unset( $table['й'] );
214
- unset( $table['І'] );
215
- unset( $table['і'] );
216
- $table['J'] = 'J';
217
- $table['j'] = 'j';
218
- $table['Љ'] = 'Lj';
219
- $table['љ'] = 'lj';
220
- $table['Њ'] = 'Nj';
221
- $table['њ'] = 'nj';
222
- $table['Ћ'] = 'C';
223
- $table['ћ'] = 'c';
224
- $table['Ц'] = 'C';
225
- $table['ц'] = 'c';
226
- $table['Ч'] = 'C';
227
- $table['ч'] = 'c';
228
- $table['Џ'] = 'Dz';
229
- $table['џ'] = 'dz';
230
- $table['Ш'] = 'S';
231
- $table['ш'] = 's';
232
- unset( $table['Щ'] );
233
- unset( $table['щ'] );
234
- unset( $table['Ъ'] );
235
- unset( $table['ъ'] );
236
- unset( $table['Ы'] );
237
- unset( $table['ы'] );
238
- unset( $table['Ь'] );
239
- unset( $table['ь'] );
240
- unset( $table['Э'] );
241
- unset( $table['э'] );
242
- unset( $table['Ю'] );
243
- unset( $table['ю'] );
244
- unset( $table['Я'] );
245
- unset( $table['я'] );
246
- unset( $table['Ѣ'] );
247
- unset( $table['ѣ'] );
248
- unset( $table['Ѳ'] );
249
- unset( $table['ѳ'] );
250
- unset( $table['Ѵ'] );
251
- unset( $table['ѵ'] );
252
- break;
253
- // Georgian.
254
- case 'ka_GE':
255
- $table['ა'] = 'a';
256
- $table['ბ'] = 'b';
257
- $table['გ'] = 'g';
258
- $table['დ'] = 'd';
259
- $table['ე'] = 'e';
260
- $table['ვ'] = 'v';
261
- $table['ზ'] = 'z';
262
- $table['თ'] = 'th';
263
- $table['ი'] = 'i';
264
- $table['კ'] = 'k';
265
- $table['ლ'] = 'l';
266
- $table['მ'] = 'm';
267
- $table['ნ'] = 'n';
268
- $table['ო'] = 'o';
269
- $table['პ'] = 'p';
270
- $table['ჟ'] = 'zh';
271
- $table['რ'] = 'r';
272
- $table['ს'] = 's';
273
- $table['ტ'] = 't';
274
- $table['უ'] = 'u';
275
- $table['ფ'] = 'ph';
276
- $table['ქ'] = 'q';
277
- $table['ღ'] = 'gh';
278
- $table['ყ'] = 'qh';
279
- $table['შ'] = 'sh';
280
- $table['ჩ'] = 'ch';
281
- $table['ც'] = 'ts';
282
- $table['ძ'] = 'dz';
283
- $table['წ'] = 'ts';
284
- $table['ჭ'] = 'tch';
285
- $table['ხ'] = 'kh';
286
- $table['ჯ'] = 'j';
287
- $table['ჰ'] = 'h';
288
- break;
289
- // Kazakh.
290
- case 'kk':
291
- $table['Ә'] = 'Ae';
292
- $table['ә'] = 'ae';
293
- $table['Ғ'] = 'Gh';
294
- $table['ғ'] = 'gh';
295
- unset( $table['Ё'] );
296
- unset( $table['ё'] );
297
- $table['Қ'] = 'Q';
298
- $table['қ'] = 'q';
299
- $table['Ң'] = 'Ng';
300
- $table['ң'] = 'ng';
301
- $table['Ө'] = 'Oe';
302
- $table['ө'] = 'oe';
303
- $table['У'] = 'W';
304
- $table['у'] = 'w';
305
- $table['Ұ'] = 'U';
306
- $table['ұ'] = 'u';
307
- $table['Ү'] = 'Ue';
308
- $table['ү'] = 'ue';
309
- $table['Һ'] = 'H';
310
- $table['һ'] = 'h';
311
- $table['Ц'] = 'C';
312
- $table['ц'] = 'c';
313
- unset( $table['Щ'] );
314
- unset( $table['щ'] );
315
- unset( $table['Ъ'] );
316
- unset( $table['ъ'] );
317
- unset( $table['Ь'] );
318
- unset( $table['ь'] );
319
- unset( $table['Э'] );
320
- unset( $table['э'] );
321
- unset( $table['Ю'] );
322
- unset( $table['ю'] );
323
- unset( $table['Я'] );
324
- unset( $table['я'] );
325
-
326
- // Kazakh 2018 latin.
327
- $table['Á'] = 'A';
328
- $table['á'] = 'a';
329
- $table['Ǵ'] = 'G';
330
- $table['ǵ'] = 'g';
331
- $table['I'] = 'I';
332
- $table['ı'] = 'i';
333
- $table['Ń'] = 'N';
334
- $table['ń'] = 'n';
335
- $table['Ó'] = 'O';
336
- $table['ó'] = 'o';
337
- $table['Ú'] = 'O';
338
- $table['ú'] = 'o';
339
- $table['Ý'] = 'O';
340
- $table['ý'] = 'o';
341
- break;
342
- // Hebrew.
343
- case 'he_IL':
344
- $table = array(
345
- 'א' => '',
346
- 'ב' => 'b',
347
- 'ג' => 'g',
348
- 'ד' => 'd',
349
- 'ה' => 'h',
350
- 'ו' => 'w',
351
- 'ז' => 'z',
352
- 'ח' => 'x',
353
- 'ט' => 't',
354
- 'י' => 'y',
355
- 'ך' => '',
356
- 'כ' => 'kh',
357
- 'ל' => 'l',
358
- 'ם' => '',
359
- 'מ' => 'm',
360
- 'ן' => '',
361
- 'נ' => 'n',
362
- 'ס' => 's',
363
- 'ע' => '',
364
- 'ף' => '',
365
- 'פ' => 'ph',
366
- 'ץ' => '',
367
- 'צ' => 's',
368
- 'ק' => 'k',
369
- 'ר' => 'r',
370
- 'ש' => 'sh',
371
- 'ת' => 'th',
372
- );
373
- for ( $code = 0x0590; $code <= 0x05CF; $code ++ ) {
374
- $table[ Mbstring::mb_chr( $code ) ] = '';
375
- }
376
- for ( $code = 0x05F0; $code <= 0x05F5; $code ++ ) {
377
- $table[ Mbstring::mb_chr( $code ) ] = '';
378
- }
379
- for ( $code = 0xFB1D; $code <= 0xFB4F; $code ++ ) {
380
- $table[ Mbstring::mb_chr( $code ) ] = '';
381
- }
382
- break;
383
- default:
384
- }
385
-
386
- return $table;
387
- }
388
-
389
- /**
390
- * Get fix table for MacOS.
391
- * On MacOS, files containing characters in the table, are sometimes encoded improperly.
392
- *
393
- * @return array
394
- */
395
- public static function get_fix_table_for_mac() {
396
- /**
397
- * Keys in the table are standard ISO9 characters.
398
- *
399
- * Example of wrong encoding on Mac:
400
- * берЁзовыЙ-белозёрский - original input,
401
- * берЁзовыЙ-белозёрский.png - actual filename created on Mac (ЁёЙй are already wrongly encoded),
402
- * ber%d0%95%cc%88zovy%d0%98%cc%86-beloz%d0%B5%cc%88rski%d0%B8%cc%86.png - urlencode() of the above,
403
- * berËzovyĬ-belozërskiĭ.png - actual filename passed via standard ISO9 transliteration table,
404
- * berE%CC%88zovyI%CC%86-beloze%CC%88rskii%CC%86.png - urlencode() of the above.
405
- *
406
- * To avoid misunderstanding, we use urldecode() here.
407
- */
408
- return [
409
- 'Ё' => urldecode( '%d0%95%cc%88' ),
410
- 'ё' => urldecode( '%d0%B5%cc%88' ),
411
- 'Й' => urldecode( '%d0%98%cc%86' ),
412
- 'й' => urldecode( '%d0%B8%cc%86' ),
413
- ];
414
- }
415
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/cyr2lat-ru_RU.mo CHANGED
Binary file
languages/cyr2lat-ru_RU.po CHANGED
@@ -1,172 +1,185 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
- "POT-Creation-Date: 2019-06-23 11:48+0300\n"
5
- "PO-Revision-Date: 2019-06-23 11:48+0300\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
16
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPathExcluded-0: vendor\n"
20
- "X-Poedit-SearchPathExcluded-1: dist\n"
21
- "X-Poedit-SearchPathExcluded-2: src\n"
22
-
23
- #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
24
- #: cyr-to-lat.php:85
25
- #, php-format
26
- msgid ""
27
- "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
28
- "least %3$s."
29
- msgstr ""
30
- "На сервере установлен PHP версии %1$s, однако для Cyr To Lat %2$s требуется "
31
- "хотя бы %3$s."
32
 
33
  #. phpcs:enable
34
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:67
35
  msgid "Post slug converted:"
36
  msgstr "Ярлык поста сконвертирован:"
37
 
38
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:79
39
  msgid "Post slugs conversion completed."
40
  msgstr "Конвертация ярлыков постов завершена."
41
 
42
  #. phpcs:enable
43
- #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:66
44
  msgid "Term slug converted:"
45
  msgstr "Ярлык термина сконвертирован:"
46
 
47
- #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:78
48
  msgid "Term slugs conversion completed."
49
  msgstr "Конвертация ярлыков терминов завершена."
50
 
51
- #: includes/class-cyr-to-lat-converter.php:117
52
  msgid "Cyr To Lat converts existing post slugs in the background process."
53
  msgstr "Cyr To Lat конвертирует существующие ярлыки постов в фоновом процессе."
54
 
55
- #: includes/class-cyr-to-lat-converter.php:124
56
  msgid "Cyr To Lat converts existing term slugs in the background process."
57
  msgstr ""
58
  "Cyr To Lat конвертирует существующие ярлыки терминов в фоновом процессе."
59
 
60
- #: includes/class-cyr-to-lat-converter.php:131
61
  msgid "Cyr To Lat completed conversion of existing post slugs."
62
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков постов."
63
 
64
- #: includes/class-cyr-to-lat-converter.php:138
65
  msgid "Cyr To Lat completed conversion of existing term slugs."
66
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков терминов."
67
 
68
- #: includes/class-cyr-to-lat-converter.php:204
69
  msgid "Post slugs conversion started."
70
  msgstr "Начата конвертация ярлыков постов."
71
 
72
- #: includes/class-cyr-to-lat-converter.php:206
73
  msgid "Cyr To Lat started conversion of existing post slugs."
74
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков постов."
75
 
76
- #: includes/class-cyr-to-lat-converter.php:213
77
  msgid "Cyr To Lat has not found existing post slugs for conversion."
78
  msgstr "Cyr To Lat не нашёл существующих ярлыков постов для конвертации."
79
 
80
- #: includes/class-cyr-to-lat-converter.php:232
81
  msgid "Term slugs conversion started."
82
  msgstr "Начата конвертация ярлыков терминов."
83
 
84
- #: includes/class-cyr-to-lat-converter.php:234
85
  msgid "Cyr To Lat started conversion of existing term slugs."
86
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков терминов."
87
 
88
- #: includes/class-cyr-to-lat-converter.php:241
89
  msgid "Cyr To Lat has not found existing term slugs for conversion."
90
  msgstr "Cyr To Lat не нашёл существующих ярлыков терминов для конвертации."
91
 
92
- #: includes/class-cyr-to-lat-settings.php:121
 
 
 
 
 
 
 
 
 
 
93
  msgid "View Cyr To Lat settings"
94
  msgstr "Посмотреть настройки Cyr To Lat"
95
 
96
- #: includes/class-cyr-to-lat-settings.php:122
97
  msgid "Settings"
98
  msgstr "Настройки"
99
 
100
- #: includes/class-cyr-to-lat-settings.php:134
101
- #: includes/class-cyr-to-lat-settings.php:342
102
  msgid "ISO9 Table"
103
  msgstr "Таблица ISO9"
104
 
105
- #: includes/class-cyr-to-lat-settings.php:143
106
- #: includes/class-cyr-to-lat-settings.php:348
107
  msgid "bel Table"
108
  msgstr "Таблица bel"
109
 
110
- #: includes/class-cyr-to-lat-settings.php:152
111
- #: includes/class-cyr-to-lat-settings.php:354
112
  msgid "uk Table"
113
  msgstr "Таблица uk"
114
 
115
- #: includes/class-cyr-to-lat-settings.php:161
116
- #: includes/class-cyr-to-lat-settings.php:360
117
  msgid "bg_BG Table"
118
  msgstr "Таблица bg_BG"
119
 
120
- #: includes/class-cyr-to-lat-settings.php:170
121
- #: includes/class-cyr-to-lat-settings.php:366
122
  msgid "mk_MK Table"
123
  msgstr "Таблица mk_MK"
124
 
125
- #: includes/class-cyr-to-lat-settings.php:179
126
- #: includes/class-cyr-to-lat-settings.php:372
 
 
 
127
  msgid "ka_GE Table"
128
  msgstr "Таблица ka_GE"
129
 
130
- #: includes/class-cyr-to-lat-settings.php:188
131
- #: includes/class-cyr-to-lat-settings.php:378
132
  msgid "kk Table"
133
  msgstr "Таблица kk"
134
 
135
- #: includes/class-cyr-to-lat-settings.php:197
136
- #: includes/class-cyr-to-lat-settings.php:384
137
  msgid "he_IL Table"
138
  msgstr "Таблица he_IL"
139
 
140
- #: includes/class-cyr-to-lat-settings.php:261
141
- #: includes/class-cyr-to-lat-settings.php:262
 
 
 
142
  msgid "Cyr To Lat"
143
  msgstr "Cyr To Lat"
144
 
145
  #. Admin panel title.
146
- #: includes/class-cyr-to-lat-settings.php:282
147
  msgid "Cyr To Lat Plugin Options"
148
  msgstr "Опции плагина Cyr To Lat"
149
 
150
- #: includes/class-cyr-to-lat-settings.php:297
151
  msgid "Convert Existing Slugs"
152
  msgstr "Конвертировать существующие ярлыки"
153
 
154
- #: includes/class-cyr-to-lat-settings.php:303
155
  msgid "Donate"
156
  msgstr "Пожертвовать"
157
 
158
- #: includes/class-cyr-to-lat-settings.php:306
159
  msgid "Would you like to support the advancement of this plugin?"
160
  msgstr "Хотите поддержать развитие этого плагина?"
161
 
162
- #: includes/class-cyr-to-lat-settings.php:320
163
  msgid "Your appreciation"
164
  msgstr "Ваша оценка"
165
 
166
- #: includes/class-cyr-to-lat-settings.php:325
167
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
168
  msgstr "Оставьте ★★★★★ обзор плагина на WordPress.org"
169
 
 
 
 
 
 
 
170
  #~ msgid ""
171
  #~ "Your server is running PHP version %1$s but Cyr To Lat version %2$s "
172
  #~ "requires at least %3$s."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
+ "POT-Creation-Date: 2019-12-15 10:00+0200\n"
5
+ "PO-Revision-Date: 2019-12-15 10:01+0200\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2.4\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
16
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: .git\n"
20
+ "X-Poedit-SearchPathExcluded-1: .make\n"
21
+ "X-Poedit-SearchPathExcluded-2: assets\n"
22
+ "X-Poedit-SearchPathExcluded-3: css\n"
23
+ "X-Poedit-SearchPathExcluded-4: dist\n"
24
+ "X-Poedit-SearchPathExcluded-5: js\n"
25
+ "X-Poedit-SearchPathExcluded-6: languages\n"
26
+ "X-Poedit-SearchPathExcluded-7: node_modules\n"
27
+ "X-Poedit-SearchPathExcluded-8: src\n"
28
+ "X-Poedit-SearchPathExcluded-9: tests\n"
29
+ "X-Poedit-SearchPathExcluded-10: vendor\n"
 
 
30
 
31
  #. phpcs:enable
32
+ #: classes/background-processes/class-post-conversion-process.php:71
33
  msgid "Post slug converted:"
34
  msgstr "Ярлык поста сконвертирован:"
35
 
36
+ #: classes/background-processes/class-post-conversion-process.php:83
37
  msgid "Post slugs conversion completed."
38
  msgstr "Конвертация ярлыков постов завершена."
39
 
40
  #. phpcs:enable
41
+ #: classes/background-processes/class-term-conversion-process.php:70
42
  msgid "Term slug converted:"
43
  msgstr "Ярлык термина сконвертирован:"
44
 
45
+ #: classes/background-processes/class-term-conversion-process.php:82
46
  msgid "Term slugs conversion completed."
47
  msgstr "Конвертация ярлыков терминов завершена."
48
 
49
+ #: classes/class-converter.php:119
50
  msgid "Cyr To Lat converts existing post slugs in the background process."
51
  msgstr "Cyr To Lat конвертирует существующие ярлыки постов в фоновом процессе."
52
 
53
+ #: classes/class-converter.php:126
54
  msgid "Cyr To Lat converts existing term slugs in the background process."
55
  msgstr ""
56
  "Cyr To Lat конвертирует существующие ярлыки терминов в фоновом процессе."
57
 
58
+ #: classes/class-converter.php:133
59
  msgid "Cyr To Lat completed conversion of existing post slugs."
60
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков постов."
61
 
62
+ #: classes/class-converter.php:140
63
  msgid "Cyr To Lat completed conversion of existing term slugs."
64
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков терминов."
65
 
66
+ #: classes/class-converter.php:206
67
  msgid "Post slugs conversion started."
68
  msgstr "Начата конвертация ярлыков постов."
69
 
70
+ #: classes/class-converter.php:208
71
  msgid "Cyr To Lat started conversion of existing post slugs."
72
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков постов."
73
 
74
+ #: classes/class-converter.php:215
75
  msgid "Cyr To Lat has not found existing post slugs for conversion."
76
  msgstr "Cyr To Lat не нашёл существующих ярлыков постов для конвертации."
77
 
78
+ #: classes/class-converter.php:234
79
  msgid "Term slugs conversion started."
80
  msgstr "Начата конвертация ярлыков терминов."
81
 
82
+ #: classes/class-converter.php:236
83
  msgid "Cyr To Lat started conversion of existing term slugs."
84
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков терминов."
85
 
86
+ #: classes/class-converter.php:243
87
  msgid "Cyr To Lat has not found existing term slugs for conversion."
88
  msgstr "Cyr To Lat не нашёл существующих ярлыков терминов для конвертации."
89
 
90
+ #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
91
+ #: classes/class-requirements.php:52
92
+ #, php-format
93
+ msgid ""
94
+ "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
95
+ "least %3$s."
96
+ msgstr ""
97
+ "На сервере установлен PHP версии %1$s, однако для Cyr To Lat %2$s требуется "
98
+ "хотя бы %3$s."
99
+
100
+ #: classes/class-settings.php:122
101
  msgid "View Cyr To Lat settings"
102
  msgstr "Посмотреть настройки Cyr To Lat"
103
 
104
+ #: classes/class-settings.php:123
105
  msgid "Settings"
106
  msgstr "Настройки"
107
 
108
+ #: classes/class-settings.php:135 classes/class-settings.php:361
 
109
  msgid "ISO9 Table"
110
  msgstr "Таблица ISO9"
111
 
112
+ #: classes/class-settings.php:144 classes/class-settings.php:367
 
113
  msgid "bel Table"
114
  msgstr "Таблица bel"
115
 
116
+ #: classes/class-settings.php:153 classes/class-settings.php:373
 
117
  msgid "uk Table"
118
  msgstr "Таблица uk"
119
 
120
+ #: classes/class-settings.php:162 classes/class-settings.php:379
 
121
  msgid "bg_BG Table"
122
  msgstr "Таблица bg_BG"
123
 
124
+ #: classes/class-settings.php:171 classes/class-settings.php:385
 
125
  msgid "mk_MK Table"
126
  msgstr "Таблица mk_MK"
127
 
128
+ #: classes/class-settings.php:180 classes/class-settings.php:391
129
+ msgid "sr_RS Table"
130
+ msgstr "Таблица sr_RS"
131
+
132
+ #: classes/class-settings.php:189 classes/class-settings.php:397
133
  msgid "ka_GE Table"
134
  msgstr "Таблица ka_GE"
135
 
136
+ #: classes/class-settings.php:198 classes/class-settings.php:403
 
137
  msgid "kk Table"
138
  msgstr "Таблица kk"
139
 
140
+ #: classes/class-settings.php:207 classes/class-settings.php:409
 
141
  msgid "he_IL Table"
142
  msgstr "Таблица he_IL"
143
 
144
+ #: classes/class-settings.php:216 classes/class-settings.php:415
145
+ msgid "zh_CN Table"
146
+ msgstr "Таблица zh_CN"
147
+
148
+ #: classes/class-settings.php:280 classes/class-settings.php:281
149
  msgid "Cyr To Lat"
150
  msgstr "Cyr To Lat"
151
 
152
  #. Admin panel title.
153
+ #: classes/class-settings.php:301
154
  msgid "Cyr To Lat Plugin Options"
155
  msgstr "Опции плагина Cyr To Lat"
156
 
157
+ #: classes/class-settings.php:316
158
  msgid "Convert Existing Slugs"
159
  msgstr "Конвертировать существующие ярлыки"
160
 
161
+ #: classes/class-settings.php:322
162
  msgid "Donate"
163
  msgstr "Пожертвовать"
164
 
165
+ #: classes/class-settings.php:325
166
  msgid "Would you like to support the advancement of this plugin?"
167
  msgstr "Хотите поддержать развитие этого плагина?"
168
 
169
+ #: classes/class-settings.php:339
170
  msgid "Your appreciation"
171
  msgstr "Ваша оценка"
172
 
173
+ #: classes/class-settings.php:344
174
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
175
  msgstr "Оставьте ★★★★★ обзор плагина на WordPress.org"
176
 
177
+ #. translators: %d: cron interval
178
+ #: lib/wp-background-processing/class-wp-background-process.php:399
179
+ #, php-format
180
+ msgid "Every %d Minutes"
181
+ msgstr "Каждые %d минут"
182
+
183
  #~ msgid ""
184
  #~ "Your server is running PHP version %1$s but Cyr To Lat version %2$s "
185
  #~ "requires at least %3$s."
languages/cyr2lat-sv.mo CHANGED
Binary file
languages/cyr2lat-sv.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Plugins - Cyr-To-Lat - Development (trunk)\n"
4
- "POT-Creation-Date: 2019-06-23 11:49+0300\n"
5
- "PO-Revision-Date: 2019-06-23 11:49+0300\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: \n"
8
  "Language: sv_SE\n"
@@ -10,165 +10,178 @@ msgstr ""
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Generator: Poedit 2.2.3\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
16
  "X-Poedit-Flags-xgettext: --add-comments\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
- "X-Poedit-SearchPathExcluded-0: vendor\n"
19
- "X-Poedit-SearchPathExcluded-1: dist\n"
20
- "X-Poedit-SearchPathExcluded-2: src\n"
21
-
22
- #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
23
- #: cyr-to-lat.php:85
24
- #, php-format
25
- msgid ""
26
- "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
27
- "least %3$s."
28
- msgstr ""
29
 
30
  #. phpcs:enable
31
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:67
32
  msgid "Post slug converted:"
33
  msgstr "Konverterad inläggs-slug:"
34
 
35
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:79
36
  msgid "Post slugs conversion completed."
37
  msgstr "Konvertering av inläggs-sluggar är klar."
38
 
39
  #. phpcs:enable
40
- #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:66
41
  msgid "Term slug converted:"
42
  msgstr "Konverterad term-slug:"
43
 
44
- #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:78
45
  msgid "Term slugs conversion completed."
46
  msgstr "Konvertering av term-sluggar är klar."
47
 
48
- #: includes/class-cyr-to-lat-converter.php:117
49
  msgid "Cyr To Lat converts existing post slugs in the background process."
50
  msgstr ""
51
  "Cyr To Lat konverterar befintliga inläggssluggar i en process som körs i "
52
  "bakgrunden."
53
 
54
- #: includes/class-cyr-to-lat-converter.php:124
55
  msgid "Cyr To Lat converts existing term slugs in the background process."
56
  msgstr ""
57
  "Cyr To Lat konverterar befintliga term-sluggar i en process som körs i "
58
  "bakgrunden."
59
 
60
- #: includes/class-cyr-to-lat-converter.php:131
61
  msgid "Cyr To Lat completed conversion of existing post slugs."
62
  msgstr "Cyr To Lat har genomfört konverteringen av befintliga inläggs-sluggar."
63
 
64
- #: includes/class-cyr-to-lat-converter.php:138
65
  msgid "Cyr To Lat completed conversion of existing term slugs."
66
  msgstr "Cyr To Lat har genomfört konverteringen av befintliga term-sluggar."
67
 
68
- #: includes/class-cyr-to-lat-converter.php:204
69
  msgid "Post slugs conversion started."
70
  msgstr "Konverteringen av inläggs-sluggar har inletts."
71
 
72
- #: includes/class-cyr-to-lat-converter.php:206
73
  msgid "Cyr To Lat started conversion of existing post slugs."
74
  msgstr "Cyr To Lat har inlett konverteringen av befintliga inläggs-sluggar."
75
 
76
- #: includes/class-cyr-to-lat-converter.php:213
77
  msgid "Cyr To Lat has not found existing post slugs for conversion."
78
  msgstr ""
79
  "Cyr To Lat hittade inga befintliga inläggs-sluggar som behöver konverteras."
80
 
81
- #: includes/class-cyr-to-lat-converter.php:232
82
  msgid "Term slugs conversion started."
83
  msgstr "Konverteringen av term-sluggar har inletts."
84
 
85
- #: includes/class-cyr-to-lat-converter.php:234
86
  msgid "Cyr To Lat started conversion of existing term slugs."
87
  msgstr "Cyr To Lat har inlett konverteringen av befintliga term-sluggar."
88
 
89
- #: includes/class-cyr-to-lat-converter.php:241
90
  msgid "Cyr To Lat has not found existing term slugs for conversion."
91
  msgstr ""
92
  "Cyr To Lat hittade inga befintliga term-sluggar som behöver konverteras."
93
 
94
- #: includes/class-cyr-to-lat-settings.php:121
 
 
 
 
 
 
 
 
95
  msgid "View Cyr To Lat settings"
96
  msgstr "Visa inställningar för Cyr To Lat"
97
 
98
- #: includes/class-cyr-to-lat-settings.php:122
99
  msgid "Settings"
100
  msgstr "Inställningar"
101
 
102
- #: includes/class-cyr-to-lat-settings.php:134
103
- #: includes/class-cyr-to-lat-settings.php:342
104
  msgid "ISO9 Table"
105
  msgstr "ISO9-tabell"
106
 
107
- #: includes/class-cyr-to-lat-settings.php:143
108
- #: includes/class-cyr-to-lat-settings.php:348
109
  msgid "bel Table"
110
  msgstr "Tabell för bel"
111
 
112
- #: includes/class-cyr-to-lat-settings.php:152
113
- #: includes/class-cyr-to-lat-settings.php:354
114
  msgid "uk Table"
115
  msgstr "Tabell för uk"
116
 
117
- #: includes/class-cyr-to-lat-settings.php:161
118
- #: includes/class-cyr-to-lat-settings.php:360
119
  msgid "bg_BG Table"
120
  msgstr "Tabell för bg_BG"
121
 
122
- #: includes/class-cyr-to-lat-settings.php:170
123
- #: includes/class-cyr-to-lat-settings.php:366
124
  msgid "mk_MK Table"
125
  msgstr "Tabell för mk_MK"
126
 
127
- #: includes/class-cyr-to-lat-settings.php:179
128
- #: includes/class-cyr-to-lat-settings.php:372
 
 
 
129
  msgid "ka_GE Table"
130
  msgstr "Tabell för ka_GE"
131
 
132
- #: includes/class-cyr-to-lat-settings.php:188
133
- #: includes/class-cyr-to-lat-settings.php:378
134
  msgid "kk Table"
135
  msgstr "Tabell för kk"
136
 
137
- #: includes/class-cyr-to-lat-settings.php:197
138
- #: includes/class-cyr-to-lat-settings.php:384
139
  msgid "he_IL Table"
140
  msgstr "Tabell för he_IL"
141
 
142
- #: includes/class-cyr-to-lat-settings.php:261
143
- #: includes/class-cyr-to-lat-settings.php:262
 
 
 
144
  msgid "Cyr To Lat"
145
  msgstr "Cyr To Lat"
146
 
147
  #. Admin panel title.
148
- #: includes/class-cyr-to-lat-settings.php:282
149
  msgid "Cyr To Lat Plugin Options"
150
  msgstr "Alternativ för tillägget Cyr To Lat"
151
 
152
- #: includes/class-cyr-to-lat-settings.php:297
153
  msgid "Convert Existing Slugs"
154
  msgstr "Konvertera befintliga sluggar"
155
 
156
- #: includes/class-cyr-to-lat-settings.php:303
157
  msgid "Donate"
158
  msgstr "Donera"
159
 
160
- #: includes/class-cyr-to-lat-settings.php:306
161
  msgid "Would you like to support the advancement of this plugin?"
162
  msgstr "Vill du stödja den vidare utvecklingen av detta tillägg?"
163
 
164
- #: includes/class-cyr-to-lat-settings.php:320
165
  msgid "Your appreciation"
166
  msgstr "Din uppskattning"
167
 
168
- #: includes/class-cyr-to-lat-settings.php:325
169
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
170
  msgstr "Ge tillägget betyget ★★★★★ på WordPress.org"
171
 
 
 
 
 
 
 
172
  #~ msgid "https://profiles.wordpress.org/sergeybiryukov/"
173
  #~ msgstr "https://profiles.wordpress.org/sergeybiryukov/"
174
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Plugins - Cyr-To-Lat - Development (trunk)\n"
4
+ "POT-Creation-Date: 2019-12-15 10:05+0200\n"
5
+ "PO-Revision-Date: 2019-12-15 10:07+0200\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: \n"
8
  "Language: sv_SE\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Generator: Poedit 2.2.4\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
16
  "X-Poedit-Flags-xgettext: --add-comments\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPathExcluded-0: .git\n"
19
+ "X-Poedit-SearchPathExcluded-1: .make\n"
20
+ "X-Poedit-SearchPathExcluded-2: assets\n"
21
+ "X-Poedit-SearchPathExcluded-3: css\n"
22
+ "X-Poedit-SearchPathExcluded-4: dist\n"
23
+ "X-Poedit-SearchPathExcluded-5: js\n"
24
+ "X-Poedit-SearchPathExcluded-6: languages\n"
25
+ "X-Poedit-SearchPathExcluded-7: node_modules\n"
26
+ "X-Poedit-SearchPathExcluded-8: src\n"
27
+ "X-Poedit-SearchPathExcluded-9: tests\n"
28
+ "X-Poedit-SearchPathExcluded-10: vendor\n"
29
 
30
  #. phpcs:enable
31
+ #: classes/background-processes/class-post-conversion-process.php:71
32
  msgid "Post slug converted:"
33
  msgstr "Konverterad inläggs-slug:"
34
 
35
+ #: classes/background-processes/class-post-conversion-process.php:83
36
  msgid "Post slugs conversion completed."
37
  msgstr "Konvertering av inläggs-sluggar är klar."
38
 
39
  #. phpcs:enable
40
+ #: classes/background-processes/class-term-conversion-process.php:70
41
  msgid "Term slug converted:"
42
  msgstr "Konverterad term-slug:"
43
 
44
+ #: classes/background-processes/class-term-conversion-process.php:82
45
  msgid "Term slugs conversion completed."
46
  msgstr "Konvertering av term-sluggar är klar."
47
 
48
+ #: classes/class-converter.php:119
49
  msgid "Cyr To Lat converts existing post slugs in the background process."
50
  msgstr ""
51
  "Cyr To Lat konverterar befintliga inläggssluggar i en process som körs i "
52
  "bakgrunden."
53
 
54
+ #: classes/class-converter.php:126
55
  msgid "Cyr To Lat converts existing term slugs in the background process."
56
  msgstr ""
57
  "Cyr To Lat konverterar befintliga term-sluggar i en process som körs i "
58
  "bakgrunden."
59
 
60
+ #: classes/class-converter.php:133
61
  msgid "Cyr To Lat completed conversion of existing post slugs."
62
  msgstr "Cyr To Lat har genomfört konverteringen av befintliga inläggs-sluggar."
63
 
64
+ #: classes/class-converter.php:140
65
  msgid "Cyr To Lat completed conversion of existing term slugs."
66
  msgstr "Cyr To Lat har genomfört konverteringen av befintliga term-sluggar."
67
 
68
+ #: classes/class-converter.php:206
69
  msgid "Post slugs conversion started."
70
  msgstr "Konverteringen av inläggs-sluggar har inletts."
71
 
72
+ #: classes/class-converter.php:208
73
  msgid "Cyr To Lat started conversion of existing post slugs."
74
  msgstr "Cyr To Lat har inlett konverteringen av befintliga inläggs-sluggar."
75
 
76
+ #: classes/class-converter.php:215
77
  msgid "Cyr To Lat has not found existing post slugs for conversion."
78
  msgstr ""
79
  "Cyr To Lat hittade inga befintliga inläggs-sluggar som behöver konverteras."
80
 
81
+ #: classes/class-converter.php:234
82
  msgid "Term slugs conversion started."
83
  msgstr "Konverteringen av term-sluggar har inletts."
84
 
85
+ #: classes/class-converter.php:236
86
  msgid "Cyr To Lat started conversion of existing term slugs."
87
  msgstr "Cyr To Lat har inlett konverteringen av befintliga term-sluggar."
88
 
89
+ #: classes/class-converter.php:243
90
  msgid "Cyr To Lat has not found existing term slugs for conversion."
91
  msgstr ""
92
  "Cyr To Lat hittade inga befintliga term-sluggar som behöver konverteras."
93
 
94
+ #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
95
+ #: classes/class-requirements.php:52
96
+ #, php-format
97
+ msgid ""
98
+ "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
99
+ "least %3$s."
100
+ msgstr "Din server kör PHP-version %1$s men Cyr To Lat %2$s kräver minst %3$s."
101
+
102
+ #: classes/class-settings.php:122
103
  msgid "View Cyr To Lat settings"
104
  msgstr "Visa inställningar för Cyr To Lat"
105
 
106
+ #: classes/class-settings.php:123
107
  msgid "Settings"
108
  msgstr "Inställningar"
109
 
110
+ #: classes/class-settings.php:135 classes/class-settings.php:361
 
111
  msgid "ISO9 Table"
112
  msgstr "ISO9-tabell"
113
 
114
+ #: classes/class-settings.php:144 classes/class-settings.php:367
 
115
  msgid "bel Table"
116
  msgstr "Tabell för bel"
117
 
118
+ #: classes/class-settings.php:153 classes/class-settings.php:373
 
119
  msgid "uk Table"
120
  msgstr "Tabell för uk"
121
 
122
+ #: classes/class-settings.php:162 classes/class-settings.php:379
 
123
  msgid "bg_BG Table"
124
  msgstr "Tabell för bg_BG"
125
 
126
+ #: classes/class-settings.php:171 classes/class-settings.php:385
 
127
  msgid "mk_MK Table"
128
  msgstr "Tabell för mk_MK"
129
 
130
+ #: classes/class-settings.php:180 classes/class-settings.php:391
131
+ msgid "sr_RS Table"
132
+ msgstr "Tabell för sr_RS"
133
+
134
+ #: classes/class-settings.php:189 classes/class-settings.php:397
135
  msgid "ka_GE Table"
136
  msgstr "Tabell för ka_GE"
137
 
138
+ #: classes/class-settings.php:198 classes/class-settings.php:403
 
139
  msgid "kk Table"
140
  msgstr "Tabell för kk"
141
 
142
+ #: classes/class-settings.php:207 classes/class-settings.php:409
 
143
  msgid "he_IL Table"
144
  msgstr "Tabell för he_IL"
145
 
146
+ #: classes/class-settings.php:216 classes/class-settings.php:415
147
+ msgid "zh_CN Table"
148
+ msgstr "Tabell för zh_CN"
149
+
150
+ #: classes/class-settings.php:280 classes/class-settings.php:281
151
  msgid "Cyr To Lat"
152
  msgstr "Cyr To Lat"
153
 
154
  #. Admin panel title.
155
+ #: classes/class-settings.php:301
156
  msgid "Cyr To Lat Plugin Options"
157
  msgstr "Alternativ för tillägget Cyr To Lat"
158
 
159
+ #: classes/class-settings.php:316
160
  msgid "Convert Existing Slugs"
161
  msgstr "Konvertera befintliga sluggar"
162
 
163
+ #: classes/class-settings.php:322
164
  msgid "Donate"
165
  msgstr "Donera"
166
 
167
+ #: classes/class-settings.php:325
168
  msgid "Would you like to support the advancement of this plugin?"
169
  msgstr "Vill du stödja den vidare utvecklingen av detta tillägg?"
170
 
171
+ #: classes/class-settings.php:339
172
  msgid "Your appreciation"
173
  msgstr "Din uppskattning"
174
 
175
+ #: classes/class-settings.php:344
176
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
177
  msgstr "Ge tillägget betyget ★★★★★ på WordPress.org"
178
 
179
+ #. translators: %d: cron interval
180
+ #: lib/wp-background-processing/class-wp-background-process.php:399
181
+ #, php-format
182
+ msgid "Every %d Minutes"
183
+ msgstr "Var %d e minut"
184
+
185
  #~ msgid "https://profiles.wordpress.org/sergeybiryukov/"
186
  #~ msgstr "https://profiles.wordpress.org/sergeybiryukov/"
187
 
languages/cyr2lat-uk.mo CHANGED
Binary file
languages/cyr2lat-uk.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Plugins - Cyr-To-Lat - Development (trunk)\n"
4
- "POT-Creation-Date: 2019-06-23 11:48+0300\n"
5
- "PO-Revision-Date: 2019-06-23 11:48+0300\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: \n"
8
  "Language: uk_UA\n"
@@ -11,159 +11,174 @@ msgstr ""
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
13
  "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
14
- "X-Generator: Poedit 2.2.3\n"
15
  "X-Poedit-Basepath: ..\n"
16
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPathExcluded-0: vendor\n"
20
- "X-Poedit-SearchPathExcluded-1: dist\n"
21
- "X-Poedit-SearchPathExcluded-2: src\n"
22
-
23
- #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
24
- #: cyr-to-lat.php:85
25
- #, php-format
26
- msgid ""
27
- "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
28
- "least %3$s."
29
- msgstr ""
30
 
31
  #. phpcs:enable
32
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:67
33
  msgid "Post slug converted:"
34
  msgstr "Посилання запису конвертовано:"
35
 
36
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:79
37
  msgid "Post slugs conversion completed."
38
  msgstr "Конвертація посилань записів завершена."
39
 
40
  #. phpcs:enable
41
- #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:66
42
  msgid "Term slug converted:"
43
  msgstr "Посилання терміну конвертовано:"
44
 
45
- #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:78
46
  msgid "Term slugs conversion completed."
47
  msgstr "Конвертація посилань термінів завершена."
48
 
49
- #: includes/class-cyr-to-lat-converter.php:117
50
  msgid "Cyr To Lat converts existing post slugs in the background process."
51
  msgstr "Cyr To Lat конвертує існуючі посилання записів у фоновому процесі."
52
 
53
- #: includes/class-cyr-to-lat-converter.php:124
54
  msgid "Cyr To Lat converts existing term slugs in the background process."
55
  msgstr "Cyr To Lat конвертує існуючі посилання термінів у фоновому процесі."
56
 
57
- #: includes/class-cyr-to-lat-converter.php:131
58
  msgid "Cyr To Lat completed conversion of existing post slugs."
59
  msgstr "Cyr To Lat завершив конвертацію існуючих посилань записів."
60
 
61
- #: includes/class-cyr-to-lat-converter.php:138
62
  msgid "Cyr To Lat completed conversion of existing term slugs."
63
  msgstr "Cyr To Lat завершив конвертацію існуючих посилань термінів."
64
 
65
- #: includes/class-cyr-to-lat-converter.php:204
66
  msgid "Post slugs conversion started."
67
  msgstr "Розпочато конвертація посилань записів."
68
 
69
- #: includes/class-cyr-to-lat-converter.php:206
70
  msgid "Cyr To Lat started conversion of existing post slugs."
71
  msgstr "Cyr To Lat почав конвертацію існуючих посилань записів."
72
 
73
- #: includes/class-cyr-to-lat-converter.php:213
74
  msgid "Cyr To Lat has not found existing post slugs for conversion."
75
  msgstr "Cyr To Lat не знайшов існуючих посилань записів для конвертації."
76
 
77
- #: includes/class-cyr-to-lat-converter.php:232
78
  msgid "Term slugs conversion started."
79
  msgstr "Розпочато конвертацію посилань термінів."
80
 
81
- #: includes/class-cyr-to-lat-converter.php:234
82
  msgid "Cyr To Lat started conversion of existing term slugs."
83
  msgstr "Cyr To Lat почав конвертацію існуючих посилань термінів."
84
 
85
- #: includes/class-cyr-to-lat-converter.php:241
86
  msgid "Cyr To Lat has not found existing term slugs for conversion."
87
  msgstr "Cyr To Lat не знайшов існуючих посилань термінів для конвертації."
88
 
89
- #: includes/class-cyr-to-lat-settings.php:121
 
 
 
 
 
 
 
 
 
 
90
  msgid "View Cyr To Lat settings"
91
  msgstr "Подивитися налаштування Cyr To Lat"
92
 
93
- #: includes/class-cyr-to-lat-settings.php:122
94
  msgid "Settings"
95
  msgstr "Налаштування"
96
 
97
- #: includes/class-cyr-to-lat-settings.php:134
98
- #: includes/class-cyr-to-lat-settings.php:342
99
  msgid "ISO9 Table"
100
  msgstr "Таблиця ISO9"
101
 
102
- #: includes/class-cyr-to-lat-settings.php:143
103
- #: includes/class-cyr-to-lat-settings.php:348
104
  msgid "bel Table"
105
  msgstr "Таблиця bel"
106
 
107
- #: includes/class-cyr-to-lat-settings.php:152
108
- #: includes/class-cyr-to-lat-settings.php:354
109
  msgid "uk Table"
110
  msgstr "Таблиця uk"
111
 
112
- #: includes/class-cyr-to-lat-settings.php:161
113
- #: includes/class-cyr-to-lat-settings.php:360
114
  msgid "bg_BG Table"
115
  msgstr "Таблиця bg_BG"
116
 
117
- #: includes/class-cyr-to-lat-settings.php:170
118
- #: includes/class-cyr-to-lat-settings.php:366
119
  msgid "mk_MK Table"
120
  msgstr "Таблиця mk_MK"
121
 
122
- #: includes/class-cyr-to-lat-settings.php:179
123
- #: includes/class-cyr-to-lat-settings.php:372
 
 
 
124
  msgid "ka_GE Table"
125
  msgstr "Таблиця ka_GE"
126
 
127
- #: includes/class-cyr-to-lat-settings.php:188
128
- #: includes/class-cyr-to-lat-settings.php:378
129
  msgid "kk Table"
130
  msgstr "Таблиця kk"
131
 
132
- #: includes/class-cyr-to-lat-settings.php:197
133
- #: includes/class-cyr-to-lat-settings.php:384
134
  msgid "he_IL Table"
135
  msgstr "Таблиця he_IL"
136
 
137
- #: includes/class-cyr-to-lat-settings.php:261
138
- #: includes/class-cyr-to-lat-settings.php:262
 
 
 
139
  msgid "Cyr To Lat"
140
  msgstr "Cyr To Lat"
141
 
142
  #. Admin panel title.
143
- #: includes/class-cyr-to-lat-settings.php:282
144
  msgid "Cyr To Lat Plugin Options"
145
  msgstr "Опції плагіну Cyr To Lat"
146
 
147
- #: includes/class-cyr-to-lat-settings.php:297
148
  msgid "Convert Existing Slugs"
149
  msgstr "Конвертувати існуючі посилання"
150
 
151
- #: includes/class-cyr-to-lat-settings.php:303
152
  msgid "Donate"
153
  msgstr "Пожертвувати"
154
 
155
- #: includes/class-cyr-to-lat-settings.php:306
156
  msgid "Would you like to support the advancement of this plugin?"
157
  msgstr "Хочете підтримати розвиток цього плагіну?"
158
 
159
- #: includes/class-cyr-to-lat-settings.php:320
160
  msgid "Your appreciation"
161
  msgstr "Ваша оцінка"
162
 
163
- #: includes/class-cyr-to-lat-settings.php:325
164
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
165
  msgstr "Залиште ★★★★★ огляд плагіну на WordPress.org"
166
 
 
 
 
 
 
 
167
  #~ msgid "https://profiles.wordpress.org/sergeybiryukov/"
168
  #~ msgstr "https://profiles.wordpress.org/sergeybiryukov/"
169
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Plugins - Cyr-To-Lat - Development (trunk)\n"
4
+ "POT-Creation-Date: 2019-12-15 10:02+0200\n"
5
+ "PO-Revision-Date: 2019-12-15 10:04+0200\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: \n"
8
  "Language: uk_UA\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
13
  "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
14
+ "X-Generator: Poedit 2.2.4\n"
15
  "X-Poedit-Basepath: ..\n"
16
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: .git\n"
20
+ "X-Poedit-SearchPathExcluded-1: .make\n"
21
+ "X-Poedit-SearchPathExcluded-2: assets\n"
22
+ "X-Poedit-SearchPathExcluded-3: css\n"
23
+ "X-Poedit-SearchPathExcluded-4: dist\n"
24
+ "X-Poedit-SearchPathExcluded-5: js\n"
25
+ "X-Poedit-SearchPathExcluded-6: languages\n"
26
+ "X-Poedit-SearchPathExcluded-7: node_modules\n"
27
+ "X-Poedit-SearchPathExcluded-8: src\n"
28
+ "X-Poedit-SearchPathExcluded-9: tests\n"
29
+ "X-Poedit-SearchPathExcluded-10: vendor\n"
30
 
31
  #. phpcs:enable
32
+ #: classes/background-processes/class-post-conversion-process.php:71
33
  msgid "Post slug converted:"
34
  msgstr "Посилання запису конвертовано:"
35
 
36
+ #: classes/background-processes/class-post-conversion-process.php:83
37
  msgid "Post slugs conversion completed."
38
  msgstr "Конвертація посилань записів завершена."
39
 
40
  #. phpcs:enable
41
+ #: classes/background-processes/class-term-conversion-process.php:70
42
  msgid "Term slug converted:"
43
  msgstr "Посилання терміну конвертовано:"
44
 
45
+ #: classes/background-processes/class-term-conversion-process.php:82
46
  msgid "Term slugs conversion completed."
47
  msgstr "Конвертація посилань термінів завершена."
48
 
49
+ #: classes/class-converter.php:119
50
  msgid "Cyr To Lat converts existing post slugs in the background process."
51
  msgstr "Cyr To Lat конвертує існуючі посилання записів у фоновому процесі."
52
 
53
+ #: classes/class-converter.php:126
54
  msgid "Cyr To Lat converts existing term slugs in the background process."
55
  msgstr "Cyr To Lat конвертує існуючі посилання термінів у фоновому процесі."
56
 
57
+ #: classes/class-converter.php:133
58
  msgid "Cyr To Lat completed conversion of existing post slugs."
59
  msgstr "Cyr To Lat завершив конвертацію існуючих посилань записів."
60
 
61
+ #: classes/class-converter.php:140
62
  msgid "Cyr To Lat completed conversion of existing term slugs."
63
  msgstr "Cyr To Lat завершив конвертацію існуючих посилань термінів."
64
 
65
+ #: classes/class-converter.php:206
66
  msgid "Post slugs conversion started."
67
  msgstr "Розпочато конвертація посилань записів."
68
 
69
+ #: classes/class-converter.php:208
70
  msgid "Cyr To Lat started conversion of existing post slugs."
71
  msgstr "Cyr To Lat почав конвертацію існуючих посилань записів."
72
 
73
+ #: classes/class-converter.php:215
74
  msgid "Cyr To Lat has not found existing post slugs for conversion."
75
  msgstr "Cyr To Lat не знайшов існуючих посилань записів для конвертації."
76
 
77
+ #: classes/class-converter.php:234
78
  msgid "Term slugs conversion started."
79
  msgstr "Розпочато конвертацію посилань термінів."
80
 
81
+ #: classes/class-converter.php:236
82
  msgid "Cyr To Lat started conversion of existing term slugs."
83
  msgstr "Cyr To Lat почав конвертацію існуючих посилань термінів."
84
 
85
+ #: classes/class-converter.php:243
86
  msgid "Cyr To Lat has not found existing term slugs for conversion."
87
  msgstr "Cyr To Lat не знайшов існуючих посилань термінів для конвертації."
88
 
89
+ #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
90
+ #: classes/class-requirements.php:52
91
+ #, php-format
92
+ msgid ""
93
+ "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
94
+ "least %3$s."
95
+ msgstr ""
96
+ "На сервері встановлено PHP версії %1$s, але для Cyr To Lat %2$s потрібно "
97
+ "хоча б %3$s."
98
+
99
+ #: classes/class-settings.php:122
100
  msgid "View Cyr To Lat settings"
101
  msgstr "Подивитися налаштування Cyr To Lat"
102
 
103
+ #: classes/class-settings.php:123
104
  msgid "Settings"
105
  msgstr "Налаштування"
106
 
107
+ #: classes/class-settings.php:135 classes/class-settings.php:361
 
108
  msgid "ISO9 Table"
109
  msgstr "Таблиця ISO9"
110
 
111
+ #: classes/class-settings.php:144 classes/class-settings.php:367
 
112
  msgid "bel Table"
113
  msgstr "Таблиця bel"
114
 
115
+ #: classes/class-settings.php:153 classes/class-settings.php:373
 
116
  msgid "uk Table"
117
  msgstr "Таблиця uk"
118
 
119
+ #: classes/class-settings.php:162 classes/class-settings.php:379
 
120
  msgid "bg_BG Table"
121
  msgstr "Таблиця bg_BG"
122
 
123
+ #: classes/class-settings.php:171 classes/class-settings.php:385
 
124
  msgid "mk_MK Table"
125
  msgstr "Таблиця mk_MK"
126
 
127
+ #: classes/class-settings.php:180 classes/class-settings.php:391
128
+ msgid "sr_RS Table"
129
+ msgstr "Таблиця sr_RS"
130
+
131
+ #: classes/class-settings.php:189 classes/class-settings.php:397
132
  msgid "ka_GE Table"
133
  msgstr "Таблиця ka_GE"
134
 
135
+ #: classes/class-settings.php:198 classes/class-settings.php:403
 
136
  msgid "kk Table"
137
  msgstr "Таблиця kk"
138
 
139
+ #: classes/class-settings.php:207 classes/class-settings.php:409
 
140
  msgid "he_IL Table"
141
  msgstr "Таблиця he_IL"
142
 
143
+ #: classes/class-settings.php:216 classes/class-settings.php:415
144
+ msgid "zh_CN Table"
145
+ msgstr "Таблиця zh_CN"
146
+
147
+ #: classes/class-settings.php:280 classes/class-settings.php:281
148
  msgid "Cyr To Lat"
149
  msgstr "Cyr To Lat"
150
 
151
  #. Admin panel title.
152
+ #: classes/class-settings.php:301
153
  msgid "Cyr To Lat Plugin Options"
154
  msgstr "Опції плагіну Cyr To Lat"
155
 
156
+ #: classes/class-settings.php:316
157
  msgid "Convert Existing Slugs"
158
  msgstr "Конвертувати існуючі посилання"
159
 
160
+ #: classes/class-settings.php:322
161
  msgid "Donate"
162
  msgstr "Пожертвувати"
163
 
164
+ #: classes/class-settings.php:325
165
  msgid "Would you like to support the advancement of this plugin?"
166
  msgstr "Хочете підтримати розвиток цього плагіну?"
167
 
168
+ #: classes/class-settings.php:339
169
  msgid "Your appreciation"
170
  msgstr "Ваша оцінка"
171
 
172
+ #: classes/class-settings.php:344
173
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
174
  msgstr "Залиште ★★★★★ огляд плагіну на WordPress.org"
175
 
176
+ #. translators: %d: cron interval
177
+ #: lib/wp-background-processing/class-wp-background-process.php:399
178
+ #, php-format
179
+ msgid "Every %d Minutes"
180
+ msgstr "Кожні %d хвилин"
181
+
182
  #~ msgid "https://profiles.wordpress.org/sergeybiryukov/"
183
  #~ msgstr "https://profiles.wordpress.org/sergeybiryukov/"
184
 
lib/wp-background-processing/class-wp-async-request.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WP Async Request
4
+ *
5
+ * @package WP-Background-Processing
6
+ */
7
+
8
+ namespace Cyr_To_Lat\KAGG\WP_Background_Processing;
9
+
10
+ use WP_Error;
11
+ /**
12
+ * Abstract WP_Async_Request class.
13
+ *
14
+ * @abstract
15
+ */
16
+ abstract class WP_Async_Request {
17
+
18
+ /**
19
+ * Prefix
20
+ *
21
+ * (default value: 'wp')
22
+ *
23
+ * @var string
24
+ * @access protected
25
+ */
26
+ protected $prefix = 'wp';
27
+ /**
28
+ * Action
29
+ *
30
+ * (default value: 'async_request')
31
+ *
32
+ * @var string
33
+ * @access protected
34
+ */
35
+ protected $action = 'async_request';
36
+ /**
37
+ * Identifier
38
+ *
39
+ * @var mixed
40
+ * @access protected
41
+ */
42
+ protected $identifier;
43
+ /**
44
+ * Data
45
+ *
46
+ * (default value: array())
47
+ *
48
+ * @var array
49
+ * @access protected
50
+ */
51
+ protected $data = [];
52
+ /**
53
+ * Initiate new async request
54
+ */
55
+ public function __construct() {
56
+ $this->identifier = $this->prefix . '_' . $this->action;
57
+ add_action( 'wp_ajax_' . $this->identifier, [ $this, 'maybe_handle' ] );
58
+ add_action( 'wp_ajax_nopriv_' . $this->identifier, [ $this, 'maybe_handle' ] );
59
+ }
60
+ /**
61
+ * Set data used during the request
62
+ *
63
+ * @param array $data Data.
64
+ *
65
+ * @return $this
66
+ */
67
+ public function data( $data ) {
68
+ $this->data = $data;
69
+ return $this;
70
+ }
71
+ /**
72
+ * Dispatch the async request
73
+ *
74
+ * @return array|WP_Error
75
+ */
76
+ public function dispatch() {
77
+ $url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
78
+ $args = $this->get_post_args();
79
+ return wp_remote_post( esc_url_raw( $url ), $args );
80
+ }
81
+ /**
82
+ * Get query args
83
+ *
84
+ * @return array
85
+ */
86
+ protected function get_query_args() {
87
+ if ( \property_exists( $this, 'query_args' ) ) {
88
+ return $this->query_args;
89
+ }
90
+ return [
91
+ 'action' => $this->identifier,
92
+ 'nonce' => wp_create_nonce( $this->identifier ),
93
+ ];
94
+ }
95
+ /**
96
+ * Get query URL
97
+ *
98
+ * @return string
99
+ */
100
+ protected function get_query_url() {
101
+ if ( \property_exists( $this, 'query_url' ) ) {
102
+ return $this->query_url;
103
+ }
104
+ return admin_url( 'admin-ajax.php' );
105
+ }
106
+ /**
107
+ * Get post args
108
+ *
109
+ * @return array
110
+ */
111
+ protected function get_post_args() {
112
+ if ( \property_exists( $this, 'post_args' ) ) {
113
+ return $this->post_args;
114
+ }
115
+ return [
116
+ 'timeout' => 5,
117
+ 'blocking' => \false,
118
+ 'body' => $this->data,
119
+ 'cookies' => $_COOKIE,
120
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', \false ),
121
+ ];
122
+ }
123
+ /**
124
+ * Maybe handle
125
+ *
126
+ * Check for correct nonce and pass to handler.
127
+ */
128
+ public function maybe_handle() {
129
+ // Don't lock up other requests while processing.
130
+ \session_write_close();
131
+ check_ajax_referer( $this->identifier, 'nonce' );
132
+ $this->handle();
133
+ wp_die();
134
+ }
135
+ /**
136
+ * Handle
137
+ *
138
+ * Override this method to perform any actions required
139
+ * during the async request.
140
+ */
141
+ abstract protected function handle();
142
+ }
lib/wp-background-processing/class-wp-background-process.php ADDED
@@ -0,0 +1,464 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WP Background Process
4
+ *
5
+ * @package WP-Background-Processing
6
+ */
7
+
8
+ namespace Cyr_To_Lat\KAGG\WP_Background_Processing;
9
+
10
+ use stdClass;
11
+ use WP_Error;
12
+ /**
13
+ * Abstract WP_Background_Process class.
14
+ *
15
+ * @abstract
16
+ * @extends WP_Async_Request
17
+ */
18
+ abstract class WP_Background_Process extends \Cyr_To_Lat\KAGG\WP_Background_Processing\WP_Async_Request {
19
+
20
+ /**
21
+ * Action
22
+ *
23
+ * (default value: 'background_process')
24
+ *
25
+ * @var string
26
+ * @access protected
27
+ */
28
+ protected $action = 'background_process';
29
+ /**
30
+ * Start time of current process.
31
+ *
32
+ * (default value: 0)
33
+ *
34
+ * @var int
35
+ * @access protected
36
+ */
37
+ protected $start_time = 0;
38
+ /**
39
+ * Cron_hook_identifier
40
+ *
41
+ * @var mixed
42
+ * @access protected
43
+ */
44
+ protected $cron_hook_identifier;
45
+ /**
46
+ * Cron_interval_identifier
47
+ *
48
+ * @var mixed
49
+ * @access protected
50
+ */
51
+ protected $cron_interval_identifier;
52
+ /**
53
+ * Initiate new background process
54
+ */
55
+ public function __construct() {
56
+ parent::__construct();
57
+ $this->cron_hook_identifier = $this->identifier . '_cron';
58
+ $this->cron_interval_identifier = $this->identifier . '_cron_interval';
59
+ add_action( $this->cron_hook_identifier, [ $this, 'handle_cron_healthcheck' ] );
60
+ // phpcs:ignore WordPress.WP.CronInterval.ChangeDetected
61
+ add_filter( 'cron_schedules', [ $this, 'schedule_cron_healthcheck' ] );
62
+ }
63
+ /**
64
+ * Dispatch
65
+ *
66
+ * @access public
67
+ * @return array|WP_Error
68
+ */
69
+ public function dispatch() {
70
+ // Schedule the cron healthcheck.
71
+ $this->schedule_event();
72
+ // Perform remote post.
73
+ return parent::dispatch();
74
+ }
75
+ /**
76
+ * Push to queue
77
+ *
78
+ * @param mixed $data Data.
79
+ *
80
+ * @return $this
81
+ */
82
+ public function push_to_queue( $data ) {
83
+ $this->data[] = $data;
84
+ return $this;
85
+ }
86
+ /**
87
+ * Save queue
88
+ *
89
+ * @return $this
90
+ */
91
+ public function save() {
92
+ $key = $this->generate_key();
93
+ if ( ! empty( $this->data ) ) {
94
+ update_site_option( $key, $this->data );
95
+ }
96
+ return $this;
97
+ }
98
+ /**
99
+ * Update queue
100
+ *
101
+ * @param string $key Key.
102
+ * @param array $data Data.
103
+ *
104
+ * @return $this
105
+ */
106
+ public function update( $key, $data ) {
107
+ if ( ! empty( $data ) ) {
108
+ update_site_option( $key, $data );
109
+ }
110
+ return $this;
111
+ }
112
+ /**
113
+ * Delete queue
114
+ *
115
+ * @param string $key Key.
116
+ *
117
+ * @return $this
118
+ */
119
+ public function delete( $key ) {
120
+ delete_site_option( $key );
121
+ return $this;
122
+ }
123
+ /**
124
+ * Generate key
125
+ *
126
+ * Generates a unique key based on microtime. Queue items are
127
+ * given a unique key so that they can be merged upon save.
128
+ *
129
+ * @param int $length Length.
130
+ *
131
+ * @return string
132
+ */
133
+ protected function generate_key( $length = 64 ) {
134
+ $unique = \md5( \microtime() . wp_rand() );
135
+ $prepend = $this->identifier . '_batch_';
136
+ return \substr( $prepend . $unique, 0, $length );
137
+ }
138
+ /**
139
+ * Maybe process queue
140
+ *
141
+ * Checks whether data exists within the queue and that
142
+ * the process is not already running.
143
+ */
144
+ public function maybe_handle() {
145
+ // Don't lock up other requests while processing.
146
+ \session_write_close();
147
+ if ( $this->is_process_running() ) {
148
+ // Background process already running.
149
+ wp_die();
150
+ }
151
+ if ( $this->is_queue_empty() ) {
152
+ // No data to process.
153
+ wp_die();
154
+ }
155
+ check_ajax_referer( $this->identifier, 'nonce' );
156
+ $this->handle();
157
+ wp_die();
158
+ }
159
+ /**
160
+ * Is queue empty
161
+ *
162
+ * @return bool
163
+ */
164
+ protected function is_queue_empty() {
165
+ global $wpdb;
166
+ $table = $wpdb->options;
167
+ $column = 'option_name';
168
+ if ( is_multisite() ) {
169
+ $table = $wpdb->sitemeta;
170
+ $column = 'meta_key';
171
+ }
172
+ $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
173
+ // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
174
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
175
+ $count = $wpdb->get_var(
176
+ $wpdb->prepare(
177
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
178
+ "SELECT COUNT(*) FROM {$table} WHERE {$column} LIKE %s",
179
+ $key
180
+ )
181
+ );
182
+ // phpcs:enable WordPress.DB.DirectDatabaseQuery.NoCaching
183
+ return $count > 0 ? \false : \true;
184
+ }
185
+ /**
186
+ * Is process running
187
+ *
188
+ * Check whether the current process is already running
189
+ * in a background process.
190
+ */
191
+ protected function is_process_running() {
192
+ if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
193
+ // Process already running.
194
+ return \true;
195
+ }
196
+ return \false;
197
+ }
198
+ /**
199
+ * Lock process
200
+ *
201
+ * Lock the process so that multiple instances can't run simultaneously.
202
+ * Override if applicable, but the duration should be greater than that
203
+ * defined in the time_exceeded() method.
204
+ */
205
+ protected function lock_process() {
206
+ $this->start_time = \time();
207
+ // Set start time of current process.
208
+ $lock_duration = \property_exists( $this, 'queue_lock_time' ) ? $this->queue_lock_time : 60;
209
+ // 1 minute
210
+ $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration );
211
+ set_site_transient( $this->identifier . '_process_lock', \microtime(), $lock_duration );
212
+ }
213
+ /**
214
+ * Unlock process
215
+ *
216
+ * Unlock the process so that other instances can spawn.
217
+ *
218
+ * @return $this
219
+ */
220
+ protected function unlock_process() {
221
+ delete_site_transient( $this->identifier . '_process_lock' );
222
+ return $this;
223
+ }
224
+ /**
225
+ * Get batch
226
+ *
227
+ * @return stdClass Return the first batch from the queue
228
+ */
229
+ protected function get_batch() {
230
+ global $wpdb;
231
+ $table = $wpdb->options;
232
+ $column = 'option_name';
233
+ $key_column = 'option_id';
234
+ $value_column = 'option_value';
235
+ if ( is_multisite() ) {
236
+ $table = $wpdb->sitemeta;
237
+ $column = 'meta_key';
238
+ $key_column = 'meta_id';
239
+ $value_column = 'meta_value';
240
+ }
241
+ $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
242
+ // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
243
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
244
+ $query = $wpdb->get_row(
245
+ $wpdb->prepare(
246
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
247
+ "SELECT * FROM {$table} WHERE {$column} LIKE %s ORDER BY {$key_column} LIMIT 1",
248
+ $key
249
+ )
250
+ );
251
+ // phpcs:enable WordPress.DB.DirectDatabaseQuery.NoCaching
252
+ $batch = new \stdClass();
253
+ $batch->key = $query->{$column};
254
+ $batch->data = maybe_unserialize( $query->{$value_column} );
255
+ return $batch;
256
+ }
257
+ /**
258
+ * Handle
259
+ *
260
+ * Pass each queue item to the task handler, while remaining
261
+ * within server memory and time limit constraints.
262
+ */
263
+ protected function handle() {
264
+ $this->lock_process();
265
+ do {
266
+ $batch = $this->get_batch();
267
+ foreach ( $batch->data as $key => $value ) {
268
+ $task = $this->task( $value );
269
+ if ( \false !== $task ) {
270
+ $batch->data[ $key ] = $task;
271
+ } else {
272
+ unset( $batch->data[ $key ] );
273
+ }
274
+ if ( $this->time_exceeded() || $this->memory_exceeded() ) {
275
+ // Batch limits reached.
276
+ break;
277
+ }
278
+ }
279
+ // Update or delete current batch.
280
+ if ( ! empty( $batch->data ) ) {
281
+ $this->update( $batch->key, $batch->data );
282
+ } else {
283
+ $this->delete( $batch->key );
284
+ }
285
+ } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() );
286
+ $this->unlock_process();
287
+ // Start next batch or complete process.
288
+ if ( ! $this->is_queue_empty() ) {
289
+ $this->dispatch();
290
+ } else {
291
+ $this->complete();
292
+ }
293
+ wp_die();
294
+ }
295
+ /**
296
+ * Memory exceeded
297
+ *
298
+ * Ensures the batch process never exceeds 90%
299
+ * of the maximum WordPress memory.
300
+ *
301
+ * @return bool
302
+ */
303
+ protected function memory_exceeded() {
304
+ $memory_limit = $this->get_memory_limit() * 0.9;
305
+ // 90% of max memory
306
+ $current_memory = \memory_get_usage( \true );
307
+ $return = \false;
308
+ if ( $current_memory >= $memory_limit ) {
309
+ $return = \true;
310
+ }
311
+ return apply_filters( $this->identifier . '_memory_exceeded', $return );
312
+ }
313
+ /**
314
+ * Get memory limit in bytes.
315
+ *
316
+ * @return int
317
+ */
318
+ protected function get_memory_limit() {
319
+ if ( \function_exists( 'ini_get' ) ) {
320
+ $memory_limit = \ini_get( 'memory_limit' );
321
+ } else {
322
+ // Sensible default.
323
+ $memory_limit = '128M';
324
+ }
325
+ if ( ! $memory_limit || -1 === \intval( $memory_limit ) ) {
326
+ // Unlimited, set to 32GB.
327
+ $memory_limit = '32000M';
328
+ }
329
+ return $this->convert_shorthand_to_bytes( $memory_limit );
330
+ }
331
+ /**
332
+ * Converts a shorthand byte value to an integer byte value.
333
+ *
334
+ * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
335
+ *
336
+ * @return int An integer byte value.
337
+ */
338
+ protected function convert_shorthand_to_bytes( $value ) {
339
+ $value = \strtolower( \trim( $value ) );
340
+ $bytes = (int) $value;
341
+ if ( \false !== \strpos( $value, 'g' ) ) {
342
+ $bytes *= 1024 * 1024 * 1024;
343
+ } elseif ( \false !== \strpos( $value, 'm' ) ) {
344
+ $bytes *= 1024 * 1024;
345
+ } elseif ( \false !== \strpos( $value, 'k' ) ) {
346
+ $bytes *= 1024;
347
+ }
348
+ // Deal with large (float) values which run into the maximum integer size.
349
+ return \min( $bytes, \PHP_INT_MAX );
350
+ }
351
+ /**
352
+ * Time exceeded.
353
+ *
354
+ * Ensures the batch never exceeds a sensible time limit.
355
+ * A timeout limit of 30s is common on shared hosting.
356
+ *
357
+ * @return bool
358
+ */
359
+ protected function time_exceeded() {
360
+ $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 );
361
+ // 20 seconds
362
+ $return = \false;
363
+ if ( \time() >= $finish ) {
364
+ $return = \true;
365
+ }
366
+ if ( \defined( 'WP_CLI' ) && WP_CLI ) {
367
+ return \false;
368
+ }
369
+ return apply_filters( $this->identifier . '_time_exceeded', $return );
370
+ }
371
+ /**
372
+ * Complete.
373
+ *
374
+ * Override if applicable, but ensure that the below actions are
375
+ * performed, or, call parent::complete().
376
+ */
377
+ protected function complete() {
378
+ // Unschedule the cron healthcheck.
379
+ $this->clear_scheduled_event();
380
+ }
381
+ /**
382
+ * Schedule cron healthcheck
383
+ *
384
+ * @access public
385
+ *
386
+ * @param mixed $schedules Schedules.
387
+ *
388
+ * @return mixed
389
+ */
390
+ public function schedule_cron_healthcheck( $schedules ) {
391
+ $interval = apply_filters( $this->identifier . '_cron_interval', 5 );
392
+ if ( \property_exists( $this, 'cron_interval' ) ) {
393
+ $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval );
394
+ }
395
+ // Adds every 5 minutes to the existing schedules.
396
+ $schedules[ $this->identifier . '_cron_interval' ] = [
397
+ 'interval' => MINUTE_IN_SECONDS * $interval,
398
+ /* translators: %d: cron interval */
399
+ 'display' => \sprintf( __( 'Every %d Minutes' ), $interval ),
400
+ ];
401
+ return $schedules;
402
+ }
403
+ /**
404
+ * Handle cron healthcheck
405
+ *
406
+ * Restart the background process if not already running
407
+ * and data exists in the queue.
408
+ */
409
+ public function handle_cron_healthcheck() {
410
+ if ( $this->is_process_running() ) {
411
+ // Background process already running.
412
+ exit;
413
+ }
414
+ if ( $this->is_queue_empty() ) {
415
+ // No data to process.
416
+ $this->clear_scheduled_event();
417
+ exit;
418
+ }
419
+ $this->handle();
420
+ exit;
421
+ }
422
+ /**
423
+ * Schedule event
424
+ */
425
+ protected function schedule_event() {
426
+ if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) {
427
+ wp_schedule_event( \time(), $this->cron_interval_identifier, $this->cron_hook_identifier );
428
+ }
429
+ }
430
+ /**
431
+ * Clear scheduled event
432
+ */
433
+ protected function clear_scheduled_event() {
434
+ $timestamp = wp_next_scheduled( $this->cron_hook_identifier );
435
+ if ( $timestamp ) {
436
+ wp_unschedule_event( $timestamp, $this->cron_hook_identifier );
437
+ }
438
+ }
439
+ /**
440
+ * Cancel Process
441
+ *
442
+ * Stop processing queue items, clear cronjob and delete batch.
443
+ */
444
+ public function cancel_process() {
445
+ if ( ! $this->is_queue_empty() ) {
446
+ $batch = $this->get_batch();
447
+ $this->delete( $batch->key );
448
+ wp_clear_scheduled_hook( $this->cron_hook_identifier );
449
+ }
450
+ }
451
+ /**
452
+ * Task
453
+ *
454
+ * Override this method to perform any actions required on each
455
+ * queue item. Return the modified item for further processing
456
+ * in the next pass through. Or, return false to remove the
457
+ * item from the queue.
458
+ *
459
+ * @param mixed $item Queue item to iterate over.
460
+ *
461
+ * @return mixed
462
+ */
463
+ abstract protected function task( $item);
464
+ }
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
3
  Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
4
  Requires at least: 5.1
5
- Tested up to: 5.2
6
- Stable tag: 4.2.3
7
- Requires PHP: 5.6
8
 
9
  Converts Cyrillic characters in post, page and term slugs to Latin characters.
10
 
@@ -37,7 +37,7 @@ Based on the original Rus-To-Lat plugin by Anton Skorobogatov.
37
 
38
  Add this code to your theme's `functions.php` file:
39
 
40
- ```
41
  function my_cyr_to_lat_table( $ctl_table ) {
42
  $ctl_table['Ъ'] = 'U';
43
  $ctl_table['ъ'] = 'u';
@@ -45,13 +45,13 @@ function my_cyr_to_lat_table( $ctl_table ) {
45
  return $ctl_table;
46
  }
47
  add_filter( 'ctl_table', 'my_cyr_to_lat_table' );
48
- ```
49
 
50
  = How can I redefine non-standard locale ? =
51
 
52
  For instance, if your non-standard locale is uk_UA, you can redefine it to `uk` by adding the following code to your theme's `function.php` file:
53
 
54
- ```
55
  /**
56
  * Use conversion table for non-standard locale.
57
  *
@@ -67,17 +67,16 @@ function my_ctl_table( $table ) {
67
 
68
  return $table;
69
  }
70
-
71
  add_filter( 'ctl_table', 'my_ctl_table' );
72
- ```
73
 
74
  = How can I convert a large number of posts/terms using wp-cli? =
75
 
76
  Use the following command in console:
77
 
78
- ```
79
  wp cyr2lat regenerate [--post_type=<post_type>] [--post_status=<post_status>]
80
- ```
81
 
82
  Where
83
  `-post_type` is list of post types,
@@ -92,8 +91,14 @@ Yes you can!
92
 
93
  == Changelog ==
94
 
 
 
 
 
 
 
95
  = 4.2.3 (29.08.2019) =
96
- * Scoped Symfony polyfill to avoid problems with composer autoloader on some sites.
97
 
98
  = 4.2.2 (28.08.2019) =
99
  * Added ACF (Advanced Custom Fields) plugin support
2
  Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
3
  Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
4
  Requires at least: 5.1
5
+ Tested up to: 5.3
6
+ Stable tag: 4.3
7
+ Requires PHP: 5.6.20
8
 
9
  Converts Cyrillic characters in post, page and term slugs to Latin characters.
10
 
37
 
38
  Add this code to your theme's `functions.php` file:
39
 
40
+ `
41
  function my_cyr_to_lat_table( $ctl_table ) {
42
  $ctl_table['Ъ'] = 'U';
43
  $ctl_table['ъ'] = 'u';
45
  return $ctl_table;
46
  }
47
  add_filter( 'ctl_table', 'my_cyr_to_lat_table' );
48
+ `
49
 
50
  = How can I redefine non-standard locale ? =
51
 
52
  For instance, if your non-standard locale is uk_UA, you can redefine it to `uk` by adding the following code to your theme's `function.php` file:
53
 
54
+ `
55
  /**
56
  * Use conversion table for non-standard locale.
57
  *
67
 
68
  return $table;
69
  }
 
70
  add_filter( 'ctl_table', 'my_ctl_table' );
71
+ `
72
 
73
  = How can I convert a large number of posts/terms using wp-cli? =
74
 
75
  Use the following command in console:
76
 
77
+ `
78
  wp cyr2lat regenerate [--post_type=<post_type>] [--post_status=<post_status>]
79
+ `
80
 
81
  Where
82
  `-post_type` is list of post types,
91
 
92
  == Changelog ==
93
 
94
+ = 4.3 (14.12.2019) =
95
+ * Added Chinese table
96
+ * Tested up to WordPress 5.3
97
+ * Tested up to PHP 7.4
98
+ * External library wp-background-processing scoped into own namespace to prevent errors in some cases
99
+
100
  = 4.2.3 (29.08.2019) =
101
+ * Scoped Symfony Mbstring polyfill to avoid problems with composer autoloader on some sites.
102
 
103
  = 4.2.2 (28.08.2019) =
104
  * Added ACF (Advanced Custom Fields) plugin support
vendor/a5hleyrich/wp-background-processing/classes/wp-async-request.php DELETED
@@ -1,163 +0,0 @@
1
- <?php
2
- /**
3
- * WP Async Request
4
- *
5
- * @package WP-Background-Processing
6
- */
7
-
8
- if ( ! class_exists( 'WP_Async_Request' ) ) {
9
-
10
- /**
11
- * Abstract WP_Async_Request class.
12
- *
13
- * @abstract
14
- */
15
- abstract class WP_Async_Request {
16
-
17
- /**
18
- * Prefix
19
- *
20
- * (default value: 'wp')
21
- *
22
- * @var string
23
- * @access protected
24
- */
25
- protected $prefix = 'wp';
26
-
27
- /**
28
- * Action
29
- *
30
- * (default value: 'async_request')
31
- *
32
- * @var string
33
- * @access protected
34
- */
35
- protected $action = 'async_request';
36
-
37
- /**
38
- * Identifier
39
- *
40
- * @var mixed
41
- * @access protected
42
- */
43
- protected $identifier;
44
-
45
- /**
46
- * Data
47
- *
48
- * (default value: array())
49
- *
50
- * @var array
51
- * @access protected
52
- */
53
- protected $data = array();
54
-
55
- /**
56
- * Initiate new async request
57
- */
58
- public function __construct() {
59
- $this->identifier = $this->prefix . '_' . $this->action;
60
-
61
- add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
62
- add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
63
- }
64
-
65
- /**
66
- * Set data used during the request
67
- *
68
- * @param array $data Data.
69
- *
70
- * @return $this
71
- */
72
- public function data( $data ) {
73
- $this->data = $data;
74
-
75
- return $this;
76
- }
77
-
78
- /**
79
- * Dispatch the async request
80
- *
81
- * @return array|WP_Error
82
- */
83
- public function dispatch() {
84
- $url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
85
- $args = $this->get_post_args();
86
-
87
- return wp_remote_post( esc_url_raw( $url ), $args );
88
- }
89
-
90
- /**
91
- * Get query args
92
- *
93
- * @return array
94
- */
95
- protected function get_query_args() {
96
- if ( property_exists( $this, 'query_args' ) ) {
97
- return $this->query_args;
98
- }
99
-
100
- return array(
101
- 'action' => $this->identifier,
102
- 'nonce' => wp_create_nonce( $this->identifier ),
103
- );
104
- }
105
-
106
- /**
107
- * Get query URL
108
- *
109
- * @return string
110
- */
111
- protected function get_query_url() {
112
- if ( property_exists( $this, 'query_url' ) ) {
113
- return $this->query_url;
114
- }
115
-
116
- return admin_url( 'admin-ajax.php' );
117
- }
118
-
119
- /**
120
- * Get post args
121
- *
122
- * @return array
123
- */
124
- protected function get_post_args() {
125
- if ( property_exists( $this, 'post_args' ) ) {
126
- return $this->post_args;
127
- }
128
-
129
- return array(
130
- 'timeout' => 5,
131
- 'blocking' => false,
132
- 'body' => $this->data,
133
- 'cookies' => $_COOKIE,
134
- 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
135
- );
136
- }
137
-
138
- /**
139
- * Maybe handle
140
- *
141
- * Check for correct nonce and pass to handler.
142
- */
143
- public function maybe_handle() {
144
- // Don't lock up other requests while processing.
145
- session_write_close();
146
-
147
- check_ajax_referer( $this->identifier, 'nonce' );
148
-
149
- $this->handle();
150
-
151
- wp_die();
152
- }
153
-
154
- /**
155
- * Handle
156
- *
157
- * Override this method to perform any actions required
158
- * during the async request.
159
- */
160
- abstract protected function handle();
161
-
162
- }
163
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php DELETED
@@ -1,535 +0,0 @@
1
- <?php
2
- /**
3
- * WP Background Process
4
- *
5
- * @package WP-Background-Processing
6
- */
7
-
8
- if ( ! class_exists( 'WP_Background_Process' ) ) {
9
-
10
- /**
11
- * Abstract WP_Background_Process class.
12
- *
13
- * @abstract
14
- * @extends WP_Async_Request
15
- */
16
- abstract class WP_Background_Process extends WP_Async_Request {
17
-
18
- /**
19
- * Action
20
- *
21
- * (default value: 'background_process')
22
- *
23
- * @var string
24
- * @access protected
25
- */
26
- protected $action = 'background_process';
27
-
28
- /**
29
- * Start time of current process.
30
- *
31
- * (default value: 0)
32
- *
33
- * @var int
34
- * @access protected
35
- */
36
- protected $start_time = 0;
37
-
38
- /**
39
- * Cron_hook_identifier
40
- *
41
- * @var mixed
42
- * @access protected
43
- */
44
- protected $cron_hook_identifier;
45
-
46
- /**
47
- * Cron_interval_identifier
48
- *
49
- * @var mixed
50
- * @access protected
51
- */
52
- protected $cron_interval_identifier;
53
-
54
- /**
55
- * Initiate new background process
56
- */
57
- public function __construct() {
58
- parent::__construct();
59
-
60
- $this->cron_hook_identifier = $this->identifier . '_cron';
61
- $this->cron_interval_identifier = $this->identifier . '_cron_interval';
62
-
63
- add_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) );
64
- add_filter( 'cron_schedules', array( $this, 'schedule_cron_healthcheck' ) );
65
- }
66
-
67
- /**
68
- * Dispatch
69
- *
70
- * @access public
71
- * @return array|WP_Error
72
- */
73
- public function dispatch() {
74
- // Schedule the cron healthcheck.
75
- $this->schedule_event();
76
-
77
- // Perform remote post.
78
- return parent::dispatch();
79
- }
80
-
81
- /**
82
- * Push to queue
83
- *
84
- * @param mixed $data Data.
85
- *
86
- * @return $this
87
- */
88
- public function push_to_queue( $data ) {
89
- $this->data[] = $data;
90
-
91
- return $this;
92
- }
93
-
94
- /**
95
- * Save queue
96
- *
97
- * @return $this
98
- */
99
- public function save() {
100
- $key = $this->generate_key();
101
-
102
- if ( ! empty( $this->data ) ) {
103
- update_site_option( $key, $this->data );
104
- }
105
-
106
- return $this;
107
- }
108
-
109
- /**
110
- * Update queue
111
- *
112
- * @param string $key Key.
113
- * @param array $data Data.
114
- *
115
- * @return $this
116
- */
117
- public function update( $key, $data ) {
118
- if ( ! empty( $data ) ) {
119
- update_site_option( $key, $data );
120
- }
121
-
122
- return $this;
123
- }
124
-
125
- /**
126
- * Delete queue
127
- *
128
- * @param string $key Key.
129
- *
130
- * @return $this
131
- */
132
- public function delete( $key ) {
133
- delete_site_option( $key );
134
-
135
- return $this;
136
- }
137
-
138
- /**
139
- * Generate key
140
- *
141
- * Generates a unique key based on microtime. Queue items are
142
- * given a unique key so that they can be merged upon save.
143
- *
144
- * @param int $length Length.
145
- *
146
- * @return string
147
- */
148
- protected function generate_key( $length = 64 ) {
149
- $unique = md5( microtime() . rand() );
150
- $prepend = $this->identifier . '_batch_';
151
-
152
- return substr( $prepend . $unique, 0, $length );
153
- }
154
-
155
- /**
156
- * Maybe process queue
157
- *
158
- * Checks whether data exists within the queue and that
159
- * the process is not already running.
160
- */
161
- public function maybe_handle() {
162
- // Don't lock up other requests while processing.
163
- session_write_close();
164
-
165
- if ( $this->is_process_running() ) {
166
- // Background process already running.
167
- wp_die();
168
- }
169
-
170
- if ( $this->is_queue_empty() ) {
171
- // No data to process.
172
- wp_die();
173
- }
174
-
175
- check_ajax_referer( $this->identifier, 'nonce' );
176
-
177
- $this->handle();
178
-
179
- wp_die();
180
- }
181
-
182
- /**
183
- * Is queue empty
184
- *
185
- * @return bool
186
- */
187
- protected function is_queue_empty() {
188
- global $wpdb;
189
-
190
- $table = $wpdb->options;
191
- $column = 'option_name';
192
-
193
- if ( is_multisite() ) {
194
- $table = $wpdb->sitemeta;
195
- $column = 'meta_key';
196
- }
197
-
198
- $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
199
-
200
- $count = $wpdb->get_var(
201
- $wpdb->prepare(
202
- "SELECT COUNT(*) FROM {$table} WHERE {$column} LIKE %s ",
203
- $key
204
- )
205
- );
206
-
207
- return ( $count > 0 ) ? false : true;
208
- }
209
-
210
- /**
211
- * Is process running
212
- *
213
- * Check whether the current process is already running
214
- * in a background process.
215
- */
216
- protected function is_process_running() {
217
- if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
218
- // Process already running.
219
- return true;
220
- }
221
-
222
- return false;
223
- }
224
-
225
- /**
226
- * Lock process
227
- *
228
- * Lock the process so that multiple instances can't run simultaneously.
229
- * Override if applicable, but the duration should be greater than that
230
- * defined in the time_exceeded() method.
231
- */
232
- protected function lock_process() {
233
- $this->start_time = time(); // Set start time of current process.
234
-
235
- $lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute
236
- $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration );
237
-
238
- set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration );
239
- }
240
-
241
- /**
242
- * Unlock process
243
- *
244
- * Unlock the process so that other instances can spawn.
245
- *
246
- * @return $this
247
- */
248
- protected function unlock_process() {
249
- delete_site_transient( $this->identifier . '_process_lock' );
250
-
251
- return $this;
252
- }
253
-
254
- /**
255
- * Get batch
256
- *
257
- * @return stdClass Return the first batch from the queue
258
- */
259
- protected function get_batch() {
260
- global $wpdb;
261
-
262
- $table = $wpdb->options;
263
- $column = 'option_name';
264
- $key_column = 'option_id';
265
- $value_column = 'option_value';
266
-
267
- if ( is_multisite() ) {
268
- $table = $wpdb->sitemeta;
269
- $column = 'meta_key';
270
- $key_column = 'meta_id';
271
- $value_column = 'meta_value';
272
- }
273
-
274
- $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
275
-
276
- $query = $wpdb->get_row(
277
- $wpdb->prepare(
278
- "SELECT * FROM {$table} WHERE {$column} LIKE %s ORDER BY {$key_column} ASC LIMIT 1",
279
- $key
280
- )
281
- );
282
-
283
- $batch = new stdClass();
284
- $batch->key = $query->$column;
285
- $batch->data = maybe_unserialize( $query->$value_column );
286
-
287
- return $batch;
288
- }
289
-
290
- /**
291
- * Handle
292
- *
293
- * Pass each queue item to the task handler, while remaining
294
- * within server memory and time limit constraints.
295
- */
296
- protected function handle() {
297
- $this->lock_process();
298
-
299
- do {
300
- $batch = $this->get_batch();
301
-
302
- foreach ( $batch->data as $key => $value ) {
303
- $task = $this->task( $value );
304
-
305
- if ( false !== $task ) {
306
- $batch->data[ $key ] = $task;
307
- } else {
308
- unset( $batch->data[ $key ] );
309
- }
310
-
311
- if ( $this->time_exceeded() || $this->memory_exceeded() ) {
312
- // Batch limits reached.
313
- break;
314
- }
315
- }
316
-
317
- // Update or delete current batch.
318
- if ( ! empty( $batch->data ) ) {
319
- $this->update( $batch->key, $batch->data );
320
- } else {
321
- $this->delete( $batch->key );
322
- }
323
- } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() );
324
-
325
- $this->unlock_process();
326
-
327
- // Start next batch or complete process.
328
- if ( ! $this->is_queue_empty() ) {
329
- $this->dispatch();
330
- } else {
331
- $this->complete();
332
- }
333
-
334
- wp_die();
335
- }
336
-
337
- /**
338
- * Memory exceeded
339
- *
340
- * Ensures the batch process never exceeds 90%
341
- * of the maximum WordPress memory.
342
- *
343
- * @return bool
344
- */
345
- protected function memory_exceeded() {
346
- $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
347
- $current_memory = memory_get_usage( true );
348
- $return = false;
349
-
350
- if ( $current_memory >= $memory_limit ) {
351
- $return = true;
352
- }
353
-
354
- return apply_filters( $this->identifier . '_memory_exceeded', $return );
355
- }
356
-
357
- /**
358
- * Get memory limit in bytes.
359
- *
360
- * @return int
361
- */
362
- protected function get_memory_limit() {
363
- if ( function_exists( 'ini_get' ) ) {
364
- $memory_limit = ini_get( 'memory_limit' );
365
- } else {
366
- // Sensible default.
367
- $memory_limit = '128M';
368
- }
369
-
370
- if ( ! $memory_limit || - 1 === intval( $memory_limit ) ) {
371
- // Unlimited, set to 32GB.
372
- $memory_limit = '32000M';
373
- }
374
-
375
- return $this->convert_shorthand_to_bytes( $memory_limit );
376
- }
377
-
378
- /**
379
- * Converts a shorthand byte value to an integer byte value.
380
- *
381
- * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
382
- *
383
- * @return int An integer byte value.
384
- */
385
- protected function convert_shorthand_to_bytes( $value ) {
386
- $value = strtolower( trim( $value ) );
387
- $bytes = (int) $value;
388
-
389
- if ( false !== strpos( $value, 'g' ) ) {
390
- $bytes *= 1024 * 1024 * 1024;
391
- } elseif ( false !== strpos( $value, 'm' ) ) {
392
- $bytes *= 1024 * 1024;
393
- } elseif ( false !== strpos( $value, 'k' ) ) {
394
- $bytes *= 1024;
395
- }
396
-
397
- // Deal with large (float) values which run into the maximum integer size.
398
- return min( $bytes, PHP_INT_MAX );
399
- }
400
-
401
- /**
402
- * Time exceeded.
403
- *
404
- * Ensures the batch never exceeds a sensible time limit.
405
- * A timeout limit of 30s is common on shared hosting.
406
- *
407
- * @return bool
408
- */
409
- protected function time_exceeded() {
410
- $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds
411
- $return = false;
412
-
413
- if ( time() >= $finish ) {
414
- $return = true;
415
- }
416
-
417
- if ( defined( 'WP_CLI' ) && WP_CLI ) {
418
- return false;
419
- }
420
-
421
- return apply_filters( $this->identifier . '_time_exceeded', $return );
422
- }
423
-
424
- /**
425
- * Complete.
426
- *
427
- * Override if applicable, but ensure that the below actions are
428
- * performed, or, call parent::complete().
429
- */
430
- protected function complete() {
431
- // Unschedule the cron healthcheck.
432
- $this->clear_scheduled_event();
433
- }
434
-
435
- /**
436
- * Schedule cron healthcheck
437
- *
438
- * @access public
439
- *
440
- * @param mixed $schedules Schedules.
441
- *
442
- * @return mixed
443
- */
444
- public function schedule_cron_healthcheck( $schedules ) {
445
- $interval = apply_filters( $this->identifier . '_cron_interval', 5 );
446
-
447
- if ( property_exists( $this, 'cron_interval' ) ) {
448
- $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval );
449
- }
450
-
451
- // Adds every 5 minutes to the existing schedules.
452
- $schedules[ $this->identifier . '_cron_interval' ] = array(
453
- 'interval' => MINUTE_IN_SECONDS * $interval,
454
- /* translators: %d: cron interval */
455
- 'display' => sprintf( __( 'Every %d Minutes' ), $interval ),
456
- );
457
-
458
- return $schedules;
459
- }
460
-
461
- /**
462
- * Handle cron healthcheck
463
- *
464
- * Restart the background process if not already running
465
- * and data exists in the queue.
466
- */
467
- public function handle_cron_healthcheck() {
468
- if ( $this->is_process_running() ) {
469
- // Background process already running.
470
- exit;
471
- }
472
-
473
- if ( $this->is_queue_empty() ) {
474
- // No data to process.
475
- $this->clear_scheduled_event();
476
- exit;
477
- }
478
-
479
- $this->handle();
480
-
481
- exit;
482
- }
483
-
484
- /**
485
- * Schedule event
486
- */
487
- protected function schedule_event() {
488
- if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) {
489
- wp_schedule_event( time(), $this->cron_interval_identifier, $this->cron_hook_identifier );
490
- }
491
- }
492
-
493
- /**
494
- * Clear scheduled event
495
- */
496
- protected function clear_scheduled_event() {
497
- $timestamp = wp_next_scheduled( $this->cron_hook_identifier );
498
-
499
- if ( $timestamp ) {
500
- wp_unschedule_event( $timestamp, $this->cron_hook_identifier );
501
- }
502
- }
503
-
504
- /**
505
- * Cancel Process
506
- *
507
- * Stop processing queue items, clear cronjob and delete batch.
508
- */
509
- public function cancel_process() {
510
- if ( ! $this->is_queue_empty() ) {
511
- $batch = $this->get_batch();
512
-
513
- $this->delete( $batch->key );
514
-
515
- wp_clear_scheduled_hook( $this->cron_hook_identifier );
516
- }
517
-
518
- }
519
-
520
- /**
521
- * Task
522
- *
523
- * Override this method to perform any actions required on each
524
- * queue item. Return the modified item for further processing
525
- * in the next pass through. Or, return false to remove the
526
- * item from the queue.
527
- *
528
- * @param mixed $item Queue item to iterate over.
529
- *
530
- * @return mixed
531
- */
532
- abstract protected function task( $item );
533
-
534
- }
535
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/a5hleyrich/wp-background-processing/license.txt DELETED
@@ -1,280 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
6
-
7
- Everyone is permitted to copy and distribute verbatim copies
8
- of this license document, but changing it is not allowed.
9
-
10
- Preamble
11
-
12
- The licenses for most software are designed to take away your
13
- freedom to share and change it. By contrast, the GNU General Public
14
- License is intended to guarantee your freedom to share and change free
15
- software--to make sure the software is free for all its users. This
16
- General Public License applies to most of the Free Software
17
- Foundation's software and to any other program whose authors commit to
18
- using it. (Some other Free Software Foundation software is covered by
19
- the GNU Library General Public License instead.) You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- this service if you wish), that you receive source code or can get it
26
- if you want it, that you can change the software or use pieces of it
27
- in new free programs; and that you know you can do these things.
28
-
29
- To protect your rights, we need to make restrictions that forbid
30
- anyone to deny you these rights or to ask you to surrender the rights.
31
- These restrictions translate to certain responsibilities for you if you
32
- distribute copies of the software, or if you modify it.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must give the recipients all the rights that
36
- you have. You must make sure that they, too, receive or can get the
37
- source code. And you must show them these terms so they know their
38
- rights.
39
-
40
- We protect your rights with two steps: (1) copyright the software, and
41
- (2) offer you this license which gives you legal permission to copy,
42
- distribute and/or modify the software.
43
-
44
- Also, for each author's protection and ours, we want to make certain
45
- that everyone understands that there is no warranty for this free
46
- software. If the software is modified by someone else and passed on, we
47
- want its recipients to know that what they have is not the original, so
48
- that any problems introduced by others will not reflect on the original
49
- authors' reputations.
50
-
51
- Finally, any free program is threatened constantly by software
52
- patents. We wish to avoid the danger that redistributors of a free
53
- program will individually obtain patent licenses, in effect making the
54
- program proprietary. To prevent this, we have made it clear that any
55
- patent must be licensed for everyone's free use or not licensed at all.
56
-
57
- The precise terms and conditions for copying, distribution and
58
- modification follow.
59
-
60
- GNU GENERAL PUBLIC LICENSE
61
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62
-
63
- 0. This License applies to any program or other work which contains
64
- a notice placed by the copyright holder saying it may be distributed
65
- under the terms of this General Public License. The "Program", below,
66
- refers to any such program or work, and a "work based on the Program"
67
- means either the Program or any derivative work under copyright law:
68
- that is to say, a work containing the Program or a portion of it,
69
- either verbatim or with modifications and/or translated into another
70
- language. (Hereinafter, translation is included without limitation in
71
- the term "modification".) Each licensee is addressed as "you".
72
-
73
- Activities other than copying, distribution and modification are not
74
- covered by this License; they are outside its scope. The act of
75
- running the Program is not restricted, and the output from the Program
76
- is covered only if its contents constitute a work based on the
77
- Program (independent of having been made by running the Program).
78
- Whether that is true depends on what the Program does.
79
-
80
- 1. You may copy and distribute verbatim copies of the Program's
81
- source code as you receive it, in any medium, provided that you
82
- conspicuously and appropriately publish on each copy an appropriate
83
- copyright notice and disclaimer of warranty; keep intact all the
84
- notices that refer to this License and to the absence of any warranty;
85
- and give any other recipients of the Program a copy of this License
86
- along with the Program.
87
-
88
- You may charge a fee for the physical act of transferring a copy, and
89
- you may at your option offer warranty protection in exchange for a fee.
90
-
91
- 2. You may modify your copy or copies of the Program or any portion
92
- of it, thus forming a work based on the Program, and copy and
93
- distribute such modifications or work under the terms of Section 1
94
- above, provided that you also meet all of these conditions:
95
-
96
- a) You must cause the modified files to carry prominent notices
97
- stating that you changed the files and the date of any change.
98
-
99
- b) You must cause any work that you distribute or publish, that in
100
- whole or in part contains or is derived from the Program or any
101
- part thereof, to be licensed as a whole at no charge to all third
102
- parties under the terms of this License.
103
-
104
- c) If the modified program normally reads commands interactively
105
- when run, you must cause it, when started running for such
106
- interactive use in the most ordinary way, to print or display an
107
- announcement including an appropriate copyright notice and a
108
- notice that there is no warranty (or else, saying that you provide
109
- a warranty) and that users may redistribute the program under
110
- these conditions, and telling the user how to view a copy of this
111
- License. (Exception: if the Program itself is interactive but
112
- does not normally print such an announcement, your work based on
113
- the Program is not required to print an announcement.)
114
-
115
- These requirements apply to the modified work as a whole. If
116
- identifiable sections of that work are not derived from the Program,
117
- and can be reasonably considered independent and separate works in
118
- themselves, then this License, and its terms, do not apply to those
119
- sections when you distribute them as separate works. But when you
120
- distribute the same sections as part of a whole which is a work based
121
- on the Program, the distribution of the whole must be on the terms of
122
- this License, whose permissions for other licensees extend to the
123
- entire whole, and thus to each and every part regardless of who wrote it.
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/a5hleyrich/wp-background-processing/wp-background-processing.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
- /**
3
- * WP-Background Processing
4
- *
5
- * @package WP-Background-Processing
6
- */
7
-
8
- /**
9
- * Plugin Name: WP Background Processing
10
- * Plugin URI: https://github.com/A5hleyRich/wp-background-processing
11
- * Description: Asynchronous requests and background processing in WordPress.
12
- * Author: Delicious Brains Inc., forked by KAGG Design
13
- * Version: 1.0.1
14
- * Author URI: https://deliciousbrains.com/
15
- * GitHub Plugin URI: https://github.com/A5hleyRich/wp-background-processing
16
- * GitHub Branch: master
17
- */
18
-
19
- require_once plugin_dir_path( __FILE__ ) . 'classes/wp-async-request.php';
20
- require_once plugin_dir_path( __FILE__ ) . 'classes/wp-background-process.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_classmap.php CHANGED
@@ -6,112 +6,18 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
10
- 'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
11
- 'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
12
- 'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
13
- 'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
14
- 'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
15
- 'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
16
- 'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
17
- 'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
18
- 'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
19
- 'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
20
- 'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
21
- 'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
22
- 'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
23
- 'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
24
- 'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
25
- 'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
26
- 'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
27
- 'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
28
- 'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
29
- 'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
30
- 'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
31
- 'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
32
- 'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
33
- 'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
34
- 'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
35
- 'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
36
- 'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
37
- 'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
38
- 'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
39
- 'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
40
- 'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
41
- 'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
42
- 'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
43
- 'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
44
- 'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
45
- 'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
46
- 'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
47
- 'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
48
- 'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
49
- 'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
50
- 'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
51
- 'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
52
- 'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
53
- 'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
54
- 'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
55
- 'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
56
- 'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
57
- 'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
58
- 'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
59
- 'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
60
- 'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
61
- 'Composer\\Installers\\ModxInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
62
- 'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
63
- 'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
64
- 'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
65
- 'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
66
- 'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
67
- 'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
68
- 'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
69
- 'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
70
- 'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
71
- 'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
72
- 'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
73
- 'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
74
- 'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
75
- 'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
76
- 'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
77
- 'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
78
- 'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
79
- 'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
80
- 'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
81
- 'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
82
- 'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
83
- 'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
84
- 'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
85
- 'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
86
- 'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
87
- 'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
88
- 'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
89
- 'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
90
- 'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
91
- 'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
92
- 'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
93
- 'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
94
- 'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
95
- 'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
96
- 'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
97
- 'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
98
- 'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
99
- 'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
100
- 'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
101
- 'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
102
- 'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
103
  'Cyr_To_Lat\\Symfony\\Polyfill\\Mbstring\\Mbstring' => $baseDir . '/lib/polyfill-mbstring/Mbstring.php',
104
- 'Cyr_To_Lat_ACF' => $baseDir . '/includes/class-cyr-to-lat-acf.php',
105
- 'Cyr_To_Lat_Admin_Notices' => $baseDir . '/includes/class-cyr-to-lat-admin-notices.php',
106
- 'Cyr_To_Lat_Conversion_Process' => $baseDir . '/includes/background-processes/class-cyr-to-lat-conversion-process.php',
107
- 'Cyr_To_Lat_Conversion_Tables' => $baseDir . '/includes/class-cyr-to-lat-conversion-tables.php',
108
- 'Cyr_To_Lat_Converter' => $baseDir . '/includes/class-cyr-to-lat-converter.php',
109
- 'Cyr_To_Lat_Main' => $baseDir . '/includes/class-cyr-to-lat-main.php',
110
- 'Cyr_To_Lat_Post_Conversion_Process' => $baseDir . '/includes/background-processes/class-cyr-to-lat-post-conversion-process.php',
111
- 'Cyr_To_Lat_Requirements' => $baseDir . '/includes/class-cyr-to-lat-requirements.php',
112
- 'Cyr_To_Lat_Settings' => $baseDir . '/includes/class-cyr-to-lat-settings.php',
113
- 'Cyr_To_Lat_Term_Conversion_Process' => $baseDir . '/includes/background-processes/class-cyr-to-lat-term-conversion-process.php',
114
- 'Cyr_To_Lat_WP_CLI' => $baseDir . '/includes/class-cyr-to-lat-wp-cli.php',
115
- 'WP_Async_Request' => $vendorDir . '/a5hleyrich/wp-background-processing/classes/wp-async-request.php',
116
- 'WP_Background_Process' => $vendorDir . '/a5hleyrich/wp-background-processing/classes/wp-background-process.php',
117
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'Cyr_To_Lat\\ACF' => $baseDir . '/classes/class-acf.php',
10
+ 'Cyr_To_Lat\\Admin_Notices' => $baseDir . '/classes/class-admin-notices.php',
11
+ 'Cyr_To_Lat\\Conversion_Process' => $baseDir . '/classes/background-processes/class-conversion-process.php',
12
+ 'Cyr_To_Lat\\Conversion_Tables' => $baseDir . '/classes/class-conversion-tables.php',
13
+ 'Cyr_To_Lat\\Converter' => $baseDir . '/classes/class-converter.php',
14
+ 'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Async_Request' => $baseDir . '/lib/wp-background-processing/class-wp-async-request.php',
15
+ 'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Background_Process' => $baseDir . '/lib/wp-background-processing/class-wp-background-process.php',
16
+ 'Cyr_To_Lat\\Main' => $baseDir . '/classes/class-main.php',
17
+ 'Cyr_To_Lat\\Post_Conversion_Process' => $baseDir . '/classes/background-processes/class-post-conversion-process.php',
18
+ 'Cyr_To_Lat\\Requirements' => $baseDir . '/classes/class-requirements.php',
19
+ 'Cyr_To_Lat\\Settings' => $baseDir . '/classes/class-settings.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  'Cyr_To_Lat\\Symfony\\Polyfill\\Mbstring\\Mbstring' => $baseDir . '/lib/polyfill-mbstring/Mbstring.php',
21
+ 'Cyr_To_Lat\\Term_Conversion_Process' => $baseDir . '/classes/background-processes/class-term-conversion-process.php',
22
+ 'Cyr_To_Lat\\WP_CLI' => $baseDir . '/classes/class-wp-cli.php',
 
 
 
 
 
 
 
 
 
 
 
23
  );
vendor/composer/autoload_static.php CHANGED
@@ -21,114 +21,20 @@ class ComposerStaticInit889b56da8e5c956977b4e015c55d5852
21
  );
22
 
23
  public static $classMap = array (
24
- 'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
25
- 'Composer\\Installers\\AimeosInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
26
- 'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
27
- 'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
28
- 'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
29
- 'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
30
- 'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
31
- 'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
32
- 'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
33
- 'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
34
- 'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
35
- 'Composer\\Installers\\ClanCatsFrameworkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
36
- 'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
37
- 'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
38
- 'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
39
- 'Composer\\Installers\\CraftInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
40
- 'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
41
- 'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
42
- 'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
43
- 'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
44
- 'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
45
- 'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
46
- 'Composer\\Installers\\ElggInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
47
- 'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
48
- 'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
49
- 'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
50
- 'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
51
- 'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
52
- 'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
53
- 'Composer\\Installers\\HuradInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
54
- 'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
55
- 'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
56
- 'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
57
- 'Composer\\Installers\\JoomlaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
58
- 'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
59
- 'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
60
- 'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
61
- 'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
62
- 'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
63
- 'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
64
- 'Composer\\Installers\\LaravelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
65
- 'Composer\\Installers\\LavaLiteInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
66
- 'Composer\\Installers\\LithiumInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
67
- 'Composer\\Installers\\MODULEWorkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
68
- 'Composer\\Installers\\MODXEvoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
69
- 'Composer\\Installers\\MagentoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
70
- 'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
71
- 'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
72
- 'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
73
- 'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
74
- 'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
75
- 'Composer\\Installers\\MicroweberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
76
- 'Composer\\Installers\\ModxInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
77
- 'Composer\\Installers\\MoodleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
78
- 'Composer\\Installers\\OctoberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
79
- 'Composer\\Installers\\OntoWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
80
- 'Composer\\Installers\\OsclassInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
81
- 'Composer\\Installers\\OxidInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
82
- 'Composer\\Installers\\PPIInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
83
- 'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
84
- 'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
85
- 'Composer\\Installers\\PimcoreInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
86
- 'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
87
- 'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
88
- 'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
89
- 'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
90
- 'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
91
- 'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
92
- 'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
93
- 'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
94
- 'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
95
- 'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
96
- 'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
97
- 'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
98
- 'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
99
- 'Composer\\Installers\\ShopwareInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
100
- 'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
101
- 'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
102
- 'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
103
- 'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
104
- 'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
105
- 'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
106
- 'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
107
- 'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
108
- 'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
109
- 'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
110
- 'Composer\\Installers\\VanillaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
111
- 'Composer\\Installers\\VgmcpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
112
- 'Composer\\Installers\\WHMCSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
113
- 'Composer\\Installers\\WolfCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
114
- 'Composer\\Installers\\WordPressInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
115
- 'Composer\\Installers\\YawikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
116
- 'Composer\\Installers\\ZendInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
117
- 'Composer\\Installers\\ZikulaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
118
  'Cyr_To_Lat\\Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/Mbstring.php',
119
- 'Cyr_To_Lat_ACF' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-acf.php',
120
- 'Cyr_To_Lat_Admin_Notices' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-admin-notices.php',
121
- 'Cyr_To_Lat_Conversion_Process' => __DIR__ . '/../..' . '/includes/background-processes/class-cyr-to-lat-conversion-process.php',
122
- 'Cyr_To_Lat_Conversion_Tables' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-conversion-tables.php',
123
- 'Cyr_To_Lat_Converter' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-converter.php',
124
- 'Cyr_To_Lat_Main' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-main.php',
125
- 'Cyr_To_Lat_Post_Conversion_Process' => __DIR__ . '/../..' . '/includes/background-processes/class-cyr-to-lat-post-conversion-process.php',
126
- 'Cyr_To_Lat_Requirements' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-requirements.php',
127
- 'Cyr_To_Lat_Settings' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-settings.php',
128
- 'Cyr_To_Lat_Term_Conversion_Process' => __DIR__ . '/../..' . '/includes/background-processes/class-cyr-to-lat-term-conversion-process.php',
129
- 'Cyr_To_Lat_WP_CLI' => __DIR__ . '/../..' . '/includes/class-cyr-to-lat-wp-cli.php',
130
- 'WP_Async_Request' => __DIR__ . '/..' . '/a5hleyrich/wp-background-processing/classes/wp-async-request.php',
131
- 'WP_Background_Process' => __DIR__ . '/..' . '/a5hleyrich/wp-background-processing/classes/wp-background-process.php',
132
  );
133
 
134
  public static function getInitializer(ClassLoader $loader)
21
  );
22
 
23
  public static $classMap = array (
24
+ 'Cyr_To_Lat\\ACF' => __DIR__ . '/../..' . '/classes/class-acf.php',
25
+ 'Cyr_To_Lat\\Admin_Notices' => __DIR__ . '/../..' . '/classes/class-admin-notices.php',
26
+ 'Cyr_To_Lat\\Conversion_Process' => __DIR__ . '/../..' . '/classes/background-processes/class-conversion-process.php',
27
+ 'Cyr_To_Lat\\Conversion_Tables' => __DIR__ . '/../..' . '/classes/class-conversion-tables.php',
28
+ 'Cyr_To_Lat\\Converter' => __DIR__ . '/../..' . '/classes/class-converter.php',
29
+ 'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Async_Request' => __DIR__ . '/../..' . '/lib/wp-background-processing/class-wp-async-request.php',
30
+ 'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Background_Process' => __DIR__ . '/../..' . '/lib/wp-background-processing/class-wp-background-process.php',
31
+ 'Cyr_To_Lat\\Main' => __DIR__ . '/../..' . '/classes/class-main.php',
32
+ 'Cyr_To_Lat\\Post_Conversion_Process' => __DIR__ . '/../..' . '/classes/background-processes/class-post-conversion-process.php',
33
+ 'Cyr_To_Lat\\Requirements' => __DIR__ . '/../..' . '/classes/class-requirements.php',
34
+ 'Cyr_To_Lat\\Settings' => __DIR__ . '/../..' . '/classes/class-settings.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  'Cyr_To_Lat\\Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/Mbstring.php',
36
+ 'Cyr_To_Lat\\Term_Conversion_Process' => __DIR__ . '/../..' . '/classes/background-processes/class-term-conversion-process.php',
37
+ 'Cyr_To_Lat\\WP_CLI' => __DIR__ . '/../..' . '/classes/class-wp-cli.php',
 
 
 
 
 
 
 
 
 
 
 
38
  );
39
 
40
  public static function getInitializer(ClassLoader $loader)
vendor/composer/installed.json CHANGED
@@ -1,44 +1,4 @@
1
  [
2
- {
3
- "name": "a5hleyrich/wp-background-processing",
4
- "version": "dev-master",
5
- "version_normalized": "9999999-dev",
6
- "source": {
7
- "type": "git",
8
- "url": "https://github.com/kagg-design/wp-background-processing.git",
9
- "reference": "75142e7269c5df90ad3699031b35028975980258"
10
- },
11
- "dist": {
12
- "type": "zip",
13
- "url": "https://api.github.com/repos/kagg-design/wp-background-processing/zipball/75142e7269c5df90ad3699031b35028975980258",
14
- "reference": "75142e7269c5df90ad3699031b35028975980258",
15
- "shasum": ""
16
- },
17
- "require": {
18
- "php": ">=5.2"
19
- },
20
- "time": "2019-06-22T13:34:08+00:00",
21
- "type": "library",
22
- "installation-source": "source",
23
- "autoload": {
24
- "classmap": [
25
- "classes/"
26
- ]
27
- },
28
- "license": [
29
- "GPL-2.0-only"
30
- ],
31
- "authors": [
32
- {
33
- "name": "Ashley Rich",
34
- "email": "hello@ashleyrich.com"
35
- }
36
- ],
37
- "description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.",
38
- "support": {
39
- "source": "https://github.com/kagg-design/wp-background-processing/tree/master"
40
- }
41
- },
42
  {
43
  "name": "composer/installers",
44
  "version": "v1.7.0",
1
  [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {
3
  "name": "composer/installers",
4
  "version": "v1.7.0",