Permalink Manager Lite - Version 2.2.9.2

Version Description

  • Dev | Improvements for Permalink_Manager_Core_Functions::control_trailing_slashes() function
  • Dev | Minor codebase improvements
  • Fix | Hotfix for "Automatically fix broken URIs" function
  • Fix | Underscores are now by default allowed in the custom permalinks
  • Enhancement | Better support for GeoDirectory plugin
  • Fix | 'permalink_manager_allow_new_post_uri' & 'permalink_manager_allow_update_post_uri' filter replaced 'permalink_manager_new_post_uri_{$post_object->post_type}' and 'permalink_manager_update_post_uri_{$post->post_type}'
Download this release

Release Info

Developer mbis
Plugin Icon 128x128 Permalink Manager Lite
Version 2.2.9.2
Comparing to
See all releases

Code changes from version 2.2.9.2.1 to 2.2.9.2

Files changed (95) hide show
  1. README.txt +7 -13
  2. includes/core/permalink-manager-admin-functions.php +14 -36
  3. includes/core/permalink-manager-core-functions.php +9 -20
  4. includes/core/permalink-manager-helper-functions.php +2 -7
  5. includes/core/permalink-manager-language-plugins.php +2 -2
  6. includes/core/permalink-manager-pro-functions.php +587 -0
  7. includes/core/permalink-manager-third-parties.php +2 -40
  8. includes/core/permalink-manager-uri-functions-post.php +3 -4
  9. includes/core/permalink-manager-uri-functions-tax.php +610 -0
  10. includes/ext/plugin-update-checker/Puc/v4/Factory.php +271 -0
  11. includes/ext/plugin-update-checker/Puc/v4p1/Autoloader.php +49 -0
  12. includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/Extension.php +117 -0
  13. includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/Panel.php +165 -0
  14. includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/PluginExtension.php +33 -0
  15. includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/PluginPanel.php +38 -0
  16. includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/ThemePanel.php +21 -0
  17. includes/ext/plugin-update-checker/Puc/v4p1/Metadata.php +132 -0
  18. includes/ext/plugin-update-checker/Puc/v4p1/OAuthSignature.php +88 -0
  19. includes/ext/plugin-update-checker/Puc/v4p1/Plugin/Info.php +127 -0
  20. includes/ext/plugin-update-checker/Puc/v4p1/Plugin/Update.php +91 -0
  21. includes/ext/plugin-update-checker/Puc/v4p1/Plugin/UpdateChecker.php +546 -0
  22. includes/ext/plugin-update-checker/Puc/v4p1/Scheduler.php +177 -0
  23. includes/ext/plugin-update-checker/Puc/v4p1/StateStore.php +207 -0
  24. includes/ext/plugin-update-checker/Puc/v4p1/Theme/Update.php +84 -0
  25. includes/ext/plugin-update-checker/Puc/v4p1/Theme/UpdateChecker.php +167 -0
  26. includes/ext/plugin-update-checker/Puc/v4p1/Update.php +34 -0
  27. includes/ext/plugin-update-checker/Puc/v4p1/UpdateChecker.php +825 -0
  28. includes/ext/plugin-update-checker/Puc/v4p1/UpgraderStatus.php +199 -0
  29. includes/ext/plugin-update-checker/Puc/v4p1/Utils.php +77 -0
  30. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/Api.php +243 -0
  31. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/BaseChecker.php +22 -0
  32. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/BitBucketApi.php +251 -0
  33. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/GitHubApi.php +289 -0
  34. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/PluginUpdateChecker.php +198 -0
  35. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/Reference.php +49 -0
  36. includes/ext/plugin-update-checker/Puc/v4p1/Vcs/ThemeUpdateChecker.php +101 -0
  37. includes/ext/plugin-update-checker/plugin-update-checker.php +22 -0
  38. includes/ext/stopwords-json/README.md +77 -0
  39. includes/ext/stopwords-json/dist/af.json +1 -0
  40. includes/ext/stopwords-json/dist/ar.json +1 -0
  41. includes/ext/stopwords-json/dist/bg.json +1 -0
  42. includes/ext/stopwords-json/dist/bn.json +1 -0
  43. includes/ext/stopwords-json/dist/br.json +1 -0
  44. includes/ext/stopwords-json/dist/ca.json +1 -0
  45. includes/ext/stopwords-json/dist/cs.json +1 -0
  46. includes/ext/stopwords-json/dist/da.json +1 -0
  47. includes/ext/stopwords-json/dist/de.json +1 -0
  48. includes/ext/stopwords-json/dist/el.json +1 -0
  49. includes/ext/stopwords-json/dist/en.json +1 -0
  50. includes/ext/stopwords-json/dist/eo.json +1 -0
  51. includes/ext/stopwords-json/dist/es.json +1 -0
  52. includes/ext/stopwords-json/dist/et.json +1 -0
  53. includes/ext/stopwords-json/dist/eu.json +1 -0
  54. includes/ext/stopwords-json/dist/fa.json +1 -0
  55. includes/ext/stopwords-json/dist/fi.json +1 -0
  56. includes/ext/stopwords-json/dist/fr.json +1 -0
  57. includes/ext/stopwords-json/dist/ga.json +1 -0
  58. includes/ext/stopwords-json/dist/gl.json +1 -0
  59. includes/ext/stopwords-json/dist/ha.json +1 -0
  60. includes/ext/stopwords-json/dist/he.json +1 -0
  61. includes/ext/stopwords-json/dist/hi.json +1 -0
  62. includes/ext/stopwords-json/dist/hr.json +1 -0
  63. includes/ext/stopwords-json/dist/hu.json +1 -0
  64. includes/ext/stopwords-json/dist/hy.json +1 -0
  65. includes/ext/stopwords-json/dist/id.json +1 -0
  66. includes/ext/stopwords-json/dist/it.json +1 -0
  67. includes/ext/stopwords-json/dist/ja.json +1 -0
  68. includes/ext/stopwords-json/dist/ko.json +1 -0
  69. includes/ext/stopwords-json/dist/la.json +1 -0
  70. includes/ext/stopwords-json/dist/lv.json +1 -0
  71. includes/ext/stopwords-json/dist/mr.json +1 -0
  72. includes/ext/stopwords-json/dist/nl.json +1 -0
  73. includes/ext/stopwords-json/dist/no.json +1 -0
  74. includes/ext/stopwords-json/dist/pl.json +1 -0
  75. includes/ext/stopwords-json/dist/pt.json +1 -0
  76. includes/ext/stopwords-json/dist/ro.json +1 -0
  77. includes/ext/stopwords-json/dist/ru.json +1 -0
  78. includes/ext/stopwords-json/dist/sk.json +1 -0
  79. includes/ext/stopwords-json/dist/sl.json +1 -0
  80. includes/ext/stopwords-json/dist/so.json +1 -0
  81. includes/ext/stopwords-json/dist/st.json +1 -0
  82. includes/ext/stopwords-json/dist/sv.json +1 -0
  83. includes/ext/stopwords-json/dist/sw.json +1 -0
  84. includes/ext/stopwords-json/dist/th.json +1 -0
  85. includes/ext/stopwords-json/dist/tr.json +1 -0
  86. includes/ext/stopwords-json/dist/yo.json +1 -0
  87. includes/ext/stopwords-json/dist/zh.json +1 -0
  88. includes/ext/stopwords-json/dist/zu.json +1 -0
  89. includes/views/permalink-manager-pro-addons.php +325 -0
  90. includes/views/permalink-manager-settings.php +3 -20
  91. includes/views/permalink-manager-uri-editor-tax.php +236 -0
  92. languages/permalink-manager-ja.mo +0 -0
  93. languages/permalink-manager-ja.po +231 -237
  94. languages/permalink-manager.pot +224 -232
  95. permalink-manager.php +10 -19
README.txt CHANGED
@@ -7,7 +7,7 @@ Tags: permalinks, custom permalinks, url editor, permalinks, woocommerce permali
7
  Requires at least: 4.4.0
8
  Requires PHP: 5.4
9
  Tested up to: 5.5.3
10
- Stable tag: 2.2.9.2.1
11
 
12
  Permalink Manager allows to easily change full URL addresses of posts, pages, custom post types, terms and WooCommerce links. You can also set different permalink formats per language or bulk change the URLs.
13
 
@@ -103,19 +103,13 @@ It is because Permalink Manager overwrites one of the core Wordpress functionali
103
 
104
  == Changelog ==
105
 
106
- = 2.2.9.3 =
107
- * Fix - The custom permalinks are now saved correctly for new posts with 'wp_insert_post' hook
108
- * Fix - The custom permalinks are deleted when 'delete_post' hook is called
109
- * Fix - WPML - language switcher on posts (blog) page work correctly now
110
- * Enhancement - Basic support for Ultimate Member plugin added
111
-
112
  = 2.2.9.2 =
113
- * Dev - Improvements for Permalink_Manager_Core_Functions::control_trailing_slashes() function
114
- * Dev - Minor codebase improvements
115
- * Fix - Hotfix for "Automatically fix broken URIs" function
116
- * Fix - Underscores are now by default allowed in the custom permalinks
117
- * Enhancement - Better support for GeoDirectory plugin
118
- * Fix - 'permalink_manager_allow_new_post_uri' & 'permalink_manager_allow_update_post_uri' filter replaced 'permalink_manager_new_post_uri_{$post_object->post_type}' and 'permalink_manager_update_post_uri_{$post->post_type}'
119
 
120
  = 2.2.9.0/2.2.9.1 =
121
  * Enhancement - Basic support for BasePress added
7
  Requires at least: 4.4.0
8
  Requires PHP: 5.4
9
  Tested up to: 5.5.3
10
+ Stable tag: 2.2.9.2
11
 
12
  Permalink Manager allows to easily change full URL addresses of posts, pages, custom post types, terms and WooCommerce links. You can also set different permalink formats per language or bulk change the URLs.
13
 
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
 
106
  = 2.2.9.2 =
107
+ * Dev | Improvements for Permalink_Manager_Core_Functions::control_trailing_slashes() function
108
+ * Dev | Minor codebase improvements
109
+ * Fix | Hotfix for "Automatically fix broken URIs" function
110
+ * Fix | Underscores are now by default allowed in the custom permalinks
111
+ * Enhancement | Better support for GeoDirectory plugin
112
+ * Fix | 'permalink_manager_allow_new_post_uri' & 'permalink_manager_allow_update_post_uri' filter replaced 'permalink_manager_new_post_uri_{$post_object->post_type}' and 'permalink_manager_update_post_uri_{$post->post_type}'
113
 
114
  = 2.2.9.0/2.2.9.1 =
115
  * Enhancement - Basic support for BasePress added
includes/core/permalink-manager-admin-functions.php CHANGED
@@ -195,6 +195,7 @@ class Permalink_Manager_Admin_Functions extends Permalink_Manager_Class {
195
  $default = (isset($args['default'])) ? $args['default'] : '';
196
  $label = (isset($args['label'])) ? $args['label'] : '';
197
  $rows = (isset($args['rows'])) ? "rows=\"{$rows}\"" : "rows=\"5\"";
 
198
  $description = (isset($args['before_description'])) ? $args['before_description'] : "";
199
  $description .= (isset($args['description'])) ? "<p class=\"field-description description\">{$args['description']}</p>" : "";
200
  $description .= (isset($args['after_description'])) ? $args['after_description'] : "";
@@ -208,27 +209,6 @@ class Permalink_Manager_Admin_Functions extends Permalink_Manager_Class {
208
  $input_atts .= (isset($args['placeholder'])) ? " placeholder='{$args['placeholder']}'" : '';
209
  $input_atts .= (isset($args['extra_atts'])) ? " {$args['extra_atts']}" : '';
210
 
211
- // Display the field if the related class exists
212
- if(!empty($args['class_exists'])) {
213
- $related_classes = (array) $args['class_exists'];
214
- $related_classes_exist = 0;
215
-
216
- foreach($related_classes as $related_class) {
217
- if(class_exists($related_class)) {
218
- $related_classes_exist = 1;
219
- break;
220
- }
221
- }
222
-
223
- // Do not display if the related class it not found
224
- if(empty($related_classes_exist)) {
225
- $field_type = $args['container_class'] = 'hidden';
226
- }
227
- }
228
-
229
- // Check the container classes
230
- $container_class = (isset($args['container_class'])) ? " class=\"{$args['container_class']} field-container\"" : " class=\"field-container\"";
231
-
232
  // Get the field value (if it is not set in $args)
233
  if(isset($args['value']) && empty($args['value']) == false) {
234
  $value = $args['value'];
@@ -447,8 +427,7 @@ class Permalink_Manager_Admin_Functions extends Permalink_Manager_Class {
447
  $html .= $append_content;
448
  $html .= "</div>";
449
  } else if(isset($args['container']) && $args['container'] == 'row') {
450
- $html = sprintf("<tr id=\"%s\" data-field=\"%s\" %s>", esc_attr(preg_replace('/(?:.*\[)(.*)(?:\].*)/', '$1', $input_name)), $input_name, $container_class);
451
- $html .= sprintf("<th><label for=\"%s\">%s</label></th>", $input_name, $args['label']);
452
  $html .= "<td><fieldset>{$fields}{$description}</fieldset></td></tr>";
453
  $html .= ($append_content) ? "<tr class=\"appended-row\"><td colspan=\"2\">{$append_content}</td></tr>" : "";
454
  } else if(isset($args['container']) && $args['container'] == 'screen-options') {
@@ -843,18 +822,7 @@ class Permalink_Manager_Admin_Functions extends Permalink_Manager_Class {
843
  $custom_uri_field
844
  );
845
 
846
- // 5. Auto-update URI
847
- if(empty($is_front_page)) {
848
- if(!empty($auto_update_choices)) {
849
- $html .= sprintf("<div><p><label for=\"auto_auri\" class=\"strong\">%s %s</label></p><span>%s</span></div>",
850
- __("Auto-update the URI", "permalink-manager"),
851
- self::help_tooltip(__("If enabled, the 'Current URI' field will be automatically changed to 'Default URI' (displayed below) after the post is saved or updated.", "permalink-manager")),
852
- self::generate_option_field("auto_update_uri", array("type" => "select", "input_class" => "widefat auto_update", "value" => $auto_update_val, "choices" => $auto_update_choices))
853
- );
854
- }
855
- }
856
-
857
- // 6. Native slug
858
  if(!empty($element->ID) && !empty($permalink_manager_options["general"]["show_native_slug_field"])) {
859
  $native_slug_field = self::generate_option_field("native_slug", array("extra_atts" => "data-default=\"{$native_slug}\" data-element-id=\"{$element_id}\"", "input_class" => "widefat native_slug", "value" => rawurldecode($native_slug)));
860
 
@@ -865,7 +833,17 @@ class Permalink_Manager_Admin_Functions extends Permalink_Manager_Class {
865
  );
866
  }
867
 
 
868
  if(empty($is_front_page)) {
 
 
 
 
 
 
 
 
 
869
  // 7. Default URI
870
  $html .= sprintf(
871
  "<div class=\"default-permalink-row columns-container\"><span class=\"column-3_4\"><strong>%s:</strong> %s</span><span class=\"column-1_4\"><a href=\"#\" class=\"restore-default\"><span class=\"dashicons dashicons-image-rotate\"></span> %s</a></span></div>",
@@ -887,7 +865,7 @@ class Permalink_Manager_Admin_Functions extends Permalink_Manager_Class {
887
  }
888
  }
889
 
890
- // 9. Extra discount
891
  if(self::is_pro_active() == false) {
892
  $html .= sprintf(
893
  "<div class=\"default-permalink-row save-row columns-container hidden\"><div>%s</div></div>",
195
  $default = (isset($args['default'])) ? $args['default'] : '';
196
  $label = (isset($args['label'])) ? $args['label'] : '';
197
  $rows = (isset($args['rows'])) ? "rows=\"{$rows}\"" : "rows=\"5\"";
198
+ $container_class = (isset($args['container_class'])) ? " class=\"{$args['container_class']} field-container\"" : " class=\"field-container\"";
199
  $description = (isset($args['before_description'])) ? $args['before_description'] : "";
200
  $description .= (isset($args['description'])) ? "<p class=\"field-description description\">{$args['description']}</p>" : "";
201
  $description .= (isset($args['after_description'])) ? $args['after_description'] : "";
209
  $input_atts .= (isset($args['placeholder'])) ? " placeholder='{$args['placeholder']}'" : '';
210
  $input_atts .= (isset($args['extra_atts'])) ? " {$args['extra_atts']}" : '';
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  // Get the field value (if it is not set in $args)
213
  if(isset($args['value']) && empty($args['value']) == false) {
214
  $value = $args['value'];
427
  $html .= $append_content;
428
  $html .= "</div>";
429
  } else if(isset($args['container']) && $args['container'] == 'row') {
430
+ $html = sprintf("<tr id=\"%s\" data-field=\"%s\" %s><th><label for=\"%s\">%s</label></th>", esc_attr(preg_replace('/(?:.*\[)(.*)(?:\].*)/', '$1', $input_name)), $input_name, $container_class, $input_name, $args['label']);
 
431
  $html .= "<td><fieldset>{$fields}{$description}</fieldset></td></tr>";
432
  $html .= ($append_content) ? "<tr class=\"appended-row\"><td colspan=\"2\">{$append_content}</td></tr>" : "";
433
  } else if(isset($args['container']) && $args['container'] == 'screen-options') {
822
  $custom_uri_field
823
  );
824
 
825
+ // 5. Native slug
 
 
 
 
 
 
 
 
 
 
 
826
  if(!empty($element->ID) && !empty($permalink_manager_options["general"]["show_native_slug_field"])) {
827
  $native_slug_field = self::generate_option_field("native_slug", array("extra_atts" => "data-default=\"{$native_slug}\" data-element-id=\"{$element_id}\"", "input_class" => "widefat native_slug", "value" => rawurldecode($native_slug)));
828
 
833
  );
834
  }
835
 
836
+ // Three fields that should be hidden on front-page
837
  if(empty($is_front_page)) {
838
+ // 6. Auto-update URI
839
+ if(!empty($auto_update_choices)) {
840
+ $html .= sprintf("<div><p><label for=\"auto_auri\" class=\"strong\">%s %s</label></p><span>%s</span></div>",
841
+ __("Auto-update the URI", "permalink-manager"),
842
+ self::help_tooltip(__("If enabled, the 'Current URI' field will be automatically changed to 'Default URI' (displayed below) after the post is saved or updated.", "permalink-manager")),
843
+ self::generate_option_field("auto_update_uri", array("type" => "select", "input_class" => "widefat auto_update", "value" => $auto_update_val, "choices" => $auto_update_choices))
844
+ );
845
+ }
846
+
847
  // 7. Default URI
848
  $html .= sprintf(
849
  "<div class=\"default-permalink-row columns-container\"><span class=\"column-3_4\"><strong>%s:</strong> %s</span><span class=\"column-1_4\"><a href=\"#\" class=\"restore-default\"><span class=\"dashicons dashicons-image-rotate\"></span> %s</a></span></div>",
865
  }
866
  }
867
 
868
+ // 10. Extra discount
869
  if(self::is_pro_active() == false) {
870
  $html .= sprintf(
871
  "<div class=\"default-permalink-row save-row columns-container hidden\"><div>%s</div></div>",
includes/core/permalink-manager-core-functions.php CHANGED
@@ -97,7 +97,7 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
97
  $uri_parts['endpoint_value'] = (!empty($regex_parts[3])) ? $regex_parts[3] : "";
98
 
99
  // Allow to filter the results by third-parties + store the URI parts with $pm_query global
100
- $uri_parts = apply_filters('permalink_manager_detect_uri', $uri_parts, $request_url, $endpoints);
101
 
102
  // Support comment pages
103
  preg_match("/(.*)\/{$wp_rewrite->comments_pagination_base}-([\d]+)/", $request_url, $regex_parts);
@@ -115,9 +115,6 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
115
  // Stop the function if $uri_parts is empty
116
  if(empty($uri_parts)) return $query;
117
 
118
- // Store the URI parts in a separate global variable
119
- $pm_query = $uri_parts;
120
-
121
  // Get the URI parts from REGEX parts
122
  $lang = $uri_parts['lang'];
123
  $uri = $uri_parts['uri'];
@@ -445,9 +442,6 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
445
  // Ignore empty permalinks
446
  if(empty($permalink)) { return $permalink; }
447
 
448
- // Keep the original permalink in a separate variable
449
- $original_permalink = $permalink;
450
-
451
  $trailing_slash_setting = (!empty($permalink_manager_options['general']['trailing_slashes'])) ? $permalink_manager_options['general']['trailing_slashes'] : "";
452
 
453
  // Remove trailing slashes from URLs that end with file extension (eg. .html)
@@ -474,7 +468,7 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
474
  // Remove trailing slashes from URLs that end with query string or anchors
475
  $permalink = preg_replace('/([\?\#]{1}[^\/]+)([\/]+)$/', '$1', $permalink);
476
 
477
- return apply_filters('permalink_manager_control_trailing_slashes', $permalink, $original_permalink);
478
  }
479
 
480
  /**
@@ -524,7 +518,7 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
524
  * Redirects
525
  */
526
  function new_uri_redirect_and_404() {
527
- global $wp_query, $wp, $wp_rewrite, $wpdb, $permalink_manager_uris, $permalink_manager_redirects, $permalink_manager_external_redirects, $permalink_manager_options, $pm_query;
528
 
529
  // Get the redirection mode & trailing slashes settings
530
  $redirect_mode = (!empty($permalink_manager_options['general']['redirect'])) ? $permalink_manager_options['general']['redirect'] : false;
@@ -691,11 +685,7 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
691
  if(empty($pm_query['endpoint']) && is_numeric($endpoint_value)) {
692
  $correct_permalink = sprintf("%s/%d", trim($correct_permalink, "/"), $endpoint_value);
693
  } else if(isset($pm_query['endpoint']) && !empty($endpoint_value)) {
694
- if($pm_query['endpoint'] == 'cpage') {
695
- $correct_permalink = sprintf("%s/%s-%s", trim($correct_permalink, "/"), $wp_rewrite->comments_pagination_base, $endpoint_value);
696
- } else {
697
- $correct_permalink = sprintf("%s/%s/%s", trim($correct_permalink, "/"), $pm_query['endpoint'], $endpoint_value);
698
- }
699
  } else {
700
  $correct_permalink = sprintf("%s/%s", trim($correct_permalink, "/"), $pm_query['endpoint']);
701
  }
@@ -714,17 +704,16 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
714
 
715
  // Ignore empty URIs
716
  if($old_uri != "/") {
 
 
 
717
  // 2A. Force trailing slashes
718
  if($trailing_slashes_mode == 1 && $ends_with_slash == false) {
719
- $correct_permalink = sprintf("%s/%s/", rtrim($home_url, '/'), trim($old_uri, '/'));
720
  }
721
  // 2B. Remove trailing slashes
722
  else if($trailing_slashes_mode == 2 && $ends_with_slash == true) {
723
- $correct_permalink = sprintf("%s/%s", rtrim($home_url, '/'), trim($old_uri, '/'));
724
- }
725
- // 2C. Remove duplicated trailing slashes
726
- else if($trailing_slashes_mode == 1 && preg_match('/[\/]{2,}$/', $old_uri)) {
727
- $correct_permalink = sprintf("%s/%s/", rtrim($home_url, '/'), trim($old_uri, '/'));
728
  }
729
  }
730
 
97
  $uri_parts['endpoint_value'] = (!empty($regex_parts[3])) ? $regex_parts[3] : "";
98
 
99
  // Allow to filter the results by third-parties + store the URI parts with $pm_query global
100
+ $uri_parts = $pm_query = apply_filters('permalink_manager_detect_uri', $uri_parts, $request_url, $endpoints);
101
 
102
  // Support comment pages
103
  preg_match("/(.*)\/{$wp_rewrite->comments_pagination_base}-([\d]+)/", $request_url, $regex_parts);
115
  // Stop the function if $uri_parts is empty
116
  if(empty($uri_parts)) return $query;
117
 
 
 
 
118
  // Get the URI parts from REGEX parts
119
  $lang = $uri_parts['lang'];
120
  $uri = $uri_parts['uri'];
442
  // Ignore empty permalinks
443
  if(empty($permalink)) { return $permalink; }
444
 
 
 
 
445
  $trailing_slash_setting = (!empty($permalink_manager_options['general']['trailing_slashes'])) ? $permalink_manager_options['general']['trailing_slashes'] : "";
446
 
447
  // Remove trailing slashes from URLs that end with file extension (eg. .html)
468
  // Remove trailing slashes from URLs that end with query string or anchors
469
  $permalink = preg_replace('/([\?\#]{1}[^\/]+)([\/]+)$/', '$1', $permalink);
470
 
471
+ return $permalink;
472
  }
473
 
474
  /**
518
  * Redirects
519
  */
520
  function new_uri_redirect_and_404() {
521
+ global $wp_query, $wp, $wpdb, $permalink_manager_uris, $permalink_manager_redirects, $permalink_manager_external_redirects, $permalink_manager_options, $pm_query;
522
 
523
  // Get the redirection mode & trailing slashes settings
524
  $redirect_mode = (!empty($permalink_manager_options['general']['redirect'])) ? $permalink_manager_options['general']['redirect'] : false;
685
  if(empty($pm_query['endpoint']) && is_numeric($endpoint_value)) {
686
  $correct_permalink = sprintf("%s/%d", trim($correct_permalink, "/"), $endpoint_value);
687
  } else if(isset($pm_query['endpoint']) && !empty($endpoint_value)) {
688
+ $correct_permalink = sprintf("%s/%s/%s", trim($correct_permalink, "/"), $pm_query['endpoint'], $endpoint_value);
 
 
 
 
689
  } else {
690
  $correct_permalink = sprintf("%s/%s", trim($correct_permalink, "/"), $pm_query['endpoint']);
691
  }
704
 
705
  // Ignore empty URIs
706
  if($old_uri != "/") {
707
+ // Remove the trailing slashes (and add them again if needed below)
708
+ $old_uri = trim($old_uri, "/");
709
+
710
  // 2A. Force trailing slashes
711
  if($trailing_slashes_mode == 1 && $ends_with_slash == false) {
712
+ $correct_permalink = "{$home_url}/{$old_uri}/";
713
  }
714
  // 2B. Remove trailing slashes
715
  else if($trailing_slashes_mode == 2 && $ends_with_slash == true) {
716
+ $correct_permalink = "{$home_url}/{$old_uri}";
 
 
 
 
717
  }
718
  }
719
 
includes/core/permalink-manager-helper-functions.php CHANGED
@@ -179,10 +179,7 @@ class Permalink_Manager_Helper_Functions extends Permalink_Manager_Class {
179
  static function get_disabled_post_types($include_user_excluded = true) {
180
  global $wp_post_types, $permalink_manager_options;
181
 
182
- $disabled_post_types = array(
183
- 'revision', 'algolia_task', 'fl_builder', 'fl-builder', 'fl-builder-template', 'fl-theme-layout', 'fusion_tb_layout', 'fusion_tb_section', 'fusion_template', 'fusion_element', 'wc_product_tab', 'wc_voucher', 'wc_voucher_template',
184
- 'sliders', 'thirstylink', 'elementor_library', 'elementor_menu_item', 'cms_block', 'nooz_coverage'
185
- );
186
 
187
  // 1. Disable post types that are not publicly_queryable
188
  foreach($wp_post_types as $post_type) {
@@ -204,9 +201,7 @@ class Permalink_Manager_Helper_Functions extends Permalink_Manager_Class {
204
  static function get_disabled_taxonomies($include_user_excluded = true) {
205
  global $wp_taxonomies, $permalink_manager_options;
206
 
207
- $disabled_taxonomies = array(
208
- 'product_shipping_class', 'post_status', 'fl-builder-template-category', 'post_format', 'nav_menu', 'language'
209
- );
210
 
211
  // 1. Disable taxonomies that are not publicly_queryable
212
  foreach($wp_taxonomies as $taxonomy) {
179
  static function get_disabled_post_types($include_user_excluded = true) {
180
  global $wp_post_types, $permalink_manager_options;
181
 
182
+ $disabled_post_types = array('revision', 'algolia_task', 'fl_builder', 'fl-builder', 'fl-builder-template', 'fl-theme-layout', 'fusion_tb_layout', 'fusion_tb_section', 'fusion_template', 'fusion_element', 'wc_product_tab', 'wc_voucher', 'wc_voucher_template', 'sliders', 'thirstylink', 'elementor_library', 'cms_block');
 
 
 
183
 
184
  // 1. Disable post types that are not publicly_queryable
185
  foreach($wp_post_types as $post_type) {
201
  static function get_disabled_taxonomies($include_user_excluded = true) {
202
  global $wp_taxonomies, $permalink_manager_options;
203
 
204
+ $disabled_taxonomies = array('product_shipping_class', 'post_status', 'fl-builder-template-category', 'post_format', 'nav_menu', 'language');
 
 
205
 
206
  // 1. Disable taxonomies that are not publicly_queryable
207
  foreach($wp_taxonomies as $taxonomy) {
includes/core/permalink-manager-language-plugins.php CHANGED
@@ -20,9 +20,9 @@ class Permalink_Manager_Language_Plugins extends Permalink_Manager_Class {
20
  add_filter('permalink_manager_detected_term_id', array($this, 'fix_language_mismatch'), 9, 3);
21
  }
22
  // Fix posts page
23
- // else {
24
  add_filter('permalink_manager_filter_query', array($this, 'fix_posts_page'), 5, 5);
25
- // }
26
 
27
  // URI Editor
28
  add_filter('permalink_manager_uri_editor_extra_info', array($this, 'language_column_uri_editor'), 9, 3);
20
  add_filter('permalink_manager_detected_term_id', array($this, 'fix_language_mismatch'), 9, 3);
21
  }
22
  // Fix posts page
23
+ else {
24
  add_filter('permalink_manager_filter_query', array($this, 'fix_posts_page'), 5, 5);
25
+ }
26
 
27
  // URI Editor
28
  add_filter('permalink_manager_uri_editor_extra_info', array($this, 'language_column_uri_editor'), 9, 3);
includes/core/permalink-manager-pro-functions.php ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Additional hooks for "Permalink Manager Pro"
5
+ */
6
+ class Permalink_Manager_Pro_Functions extends Permalink_Manager_Class {
7
+
8
+ public $update_checker, $license_key;
9
+
10
+ public function __construct() {
11
+ define( 'PERMALINK_MANAGER_PRO', true );
12
+ $plugin_name = preg_replace('/(.*)\/([^\/]+\/[^\/]+.php)$/', '$2', PERMALINK_MANAGER_FILE);
13
+
14
+ // Stop words
15
+ add_filter( 'permalink_manager_filter_default_post_slug', array($this, 'remove_stop_words'), 9, 3 );
16
+ add_filter( 'permalink_manager_filter_default_term_slug', array($this, 'remove_stop_words'), 9, 3 );
17
+
18
+ // Custom fields in permalinks
19
+ add_filter( 'permalink_manager_filter_default_post_uri', array($this, 'replace_custom_field_tags'), 9, 5 );
20
+ add_filter( 'permalink_manager_filter_default_term_uri', array($this, 'replace_custom_field_tags'), 9, 5 );
21
+
22
+ // Permalink Manager Pro Alerts
23
+ add_filter( 'permalink_manager_alerts', array($this, 'pro_alerts'), 9, 3 );
24
+
25
+ // Save redirects
26
+ add_action( 'permalink_manager_updated_post_uri', array($this, 'save_redirects'), 9, 5 );
27
+ add_action( 'permalink_manager_updated_term_uri', array($this, 'save_redirects'), 9, 5 );
28
+
29
+ // Check for updates
30
+ add_action( 'admin_init', array($this, 'check_for_updates'), 10 );
31
+ add_action( 'wp_ajax_pm_get_exp_date', array($this, 'get_expiration_date'), 9 );
32
+
33
+ // Display License info on "Plugins" page
34
+ add_action( "after_plugin_row_{$plugin_name}", array($this, 'license_info_bar'), 10, 2);
35
+ }
36
+
37
+ /**
38
+ * Get license key
39
+ */
40
+ public function get_license_key() {
41
+ $permalink_manager_options = get_option('permalink-manager', array());
42
+
43
+ // Network licence key (multisite)
44
+ if(is_multisite()) {
45
+ // A. Move the license key to site options
46
+ if(!empty($_POST['licence']['licence_key'])) {
47
+ $site_licence_key = sanitize_text_field($_POST['licence']['licence_key']);
48
+ update_site_option('permalink-manager-licence-key', $site_licence_key);
49
+ }
50
+
51
+ $this->license_key = get_site_option('permalink-manager-licence-key');
52
+ }
53
+ // Single website licence key
54
+ else {
55
+ $this->license_key = (!empty($permalink_manager_options['licence']['licence_key'])) ? $permalink_manager_options['licence']['licence_key'] : "";
56
+ }
57
+
58
+ $license_key = $this->license_key;
59
+
60
+ return $license_key;
61
+ }
62
+
63
+ /**
64
+ * Update check
65
+ */
66
+ public function check_for_updates($flush_exp_date = false) {
67
+ $license_key = $this->get_license_key();
68
+
69
+ // Load Plugin Update Checker by YahnisElsts
70
+ require_once PERMALINK_MANAGER_DIR . '/includes/ext/plugin-update-checker/plugin-update-checker.php';
71
+
72
+ $this->update_checker = Puc_v4_Factory::buildUpdateChecker(
73
+ "https://updates.permalinkmanager.pro/?action=get_metadata&slug=permalink-manager-pro&licence_key={$this->license_key}",
74
+ PERMALINK_MANAGER_FILE,
75
+ "permalink-manager-pro"
76
+ );
77
+
78
+ add_filter('puc_request_info_result-permalink-manager-pro', array($this, 'update_pro_info'), 99, 2);
79
+
80
+ if(!empty($_POST['licence']['licence_key']) || (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'pm_get_exp_date') || (!empty($_REQUEST['puc_slug']) && $_REQUEST['puc_slug'] == 'permalink-manager-pro')) {
81
+ delete_transient('permalink_manager_active');
82
+ $this->update_checker->requestInfo();
83
+ }
84
+ }
85
+
86
+ public function update_pro_info($raw, $result) {
87
+ $permalink_manager_active = get_transient('permalink_manager_active');
88
+
89
+ // A. Do not do anything - the license info was saved before
90
+ if(!empty($this->license_key) && ($permalink_manager_active == $this->license_key)) {
91
+ return $raw;
92
+ }
93
+ // B. The license info was not removed or not downloaded before
94
+ else if(empty($permalink_manager_active) && is_array($result) && !empty($result['body']) && !empty($this->license_key)) {
95
+ $plugin_info = json_decode($result['body']);
96
+
97
+ if(is_object($plugin_info) && isset($plugin_info->version)) {
98
+ $exp_date = (!empty($plugin_info->expiration_date) && strlen($plugin_info->expiration_date) > 6) ? strtotime($plugin_info->expiration_date) : '-';
99
+
100
+ Permalink_Manager_Actions::save_settings('licence', array(
101
+ 'licence_key' => $this->license_key,
102
+ 'expiration_date' => $exp_date,
103
+ ), false);
104
+
105
+ set_transient('permalink_manager_active', $this->license_key, 12 * HOUR_IN_SECONDS);
106
+ }
107
+ }
108
+ return $raw;
109
+ }
110
+
111
+ /**
112
+ * Get license expiration date
113
+ */
114
+ public static function get_expiration_date($basic_check = false, $empty_if_valid = false) {
115
+ global $permalink_manager_options;
116
+
117
+ // Get expiration info & the licence key
118
+ $exp_date = (!empty($permalink_manager_options['licence']['expiration_date'])) ? $permalink_manager_options['licence']['expiration_date'] : false;
119
+ $license_key = (!empty($permalink_manager_options['licence']['licence_key'])) ? $permalink_manager_options['licence']['licence_key'] : "";
120
+
121
+ $license_info_page = (!empty($license_key)) ? sprintf("https://permalinkmanager.pro/license-info/%s", trim($license_key)) : "";
122
+
123
+ // There is no key defined
124
+ if(empty($license_key)) {
125
+ $settings_page_url = Permalink_Manager_Admin_Functions::get_admin_url("&section=settings");
126
+ $expiration_info = sprintf(__('Please paste the licence key to access all Permalink Manager Pro updates & features <a href="%s" target="_blank">on this page</a>.', 'permalink-manager'), $settings_page_url);
127
+ $expired = 2;
128
+ }
129
+ // License key is invalid
130
+ else if($exp_date == '-') {
131
+ $expiration_info = __('Your Permalink Manager Pro licence key is invalid!', 'permalink-manager');
132
+ $expired = 2;
133
+ }
134
+ // Key expired
135
+ else if(!empty($exp_date) && $exp_date < time()) {
136
+ $expiration_info = sprintf(__('Your Permalink Manager Pro licence key expired! To restore access to plugin updates & technical support please go to <a href="%s" target="_blank">this page</a>.', 'permalink-manager'), $license_info_page);
137
+ $expired = 1;
138
+ }
139
+ // Valid lifetime license key
140
+ else if(date("Y", intval($exp_date)) > 2028) {
141
+ $expiration_info = __('You own a lifetime licence key.', 'permalink-manager');
142
+ $expired = 0;
143
+ }
144
+ // License key is valid
145
+ else if($exp_date) {
146
+ $expiration_info = sprintf(__('Your licence key is valid until %s.<br />To prolong it please go to <a href="%s" target="_blank">this page</a> for more information.', 'permalink-manager'), date(get_option('date_format'), $exp_date), $license_info_page);
147
+ $expired = 0;
148
+ }
149
+ // Expiration data could not be downloaded
150
+ else {
151
+ $expiration_info = __('Expiration date could not be downloaded at this moment. Please try again in a few minutes.', 'permalink-manager');
152
+ $expired = 0;
153
+ }
154
+
155
+ // Do not return any text alert
156
+ if($basic_check || ($empty_if_valid && $expired == 0)) {
157
+ return $expired;
158
+ }
159
+
160
+ if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'pm_get_exp_date') {
161
+ echo $expiration_info;
162
+ die();
163
+ } else {
164
+ return $expiration_info;
165
+ }
166
+ }
167
+
168
+ function license_info_bar($plugin_data, $response) {
169
+ $plugin_name = preg_replace('/(.*)\/([^\/]+\/[^\/]+.php)$/', '$2', PERMALINK_MANAGER_FILE);
170
+ $exp_info_text = self::get_expiration_date(false, true);
171
+
172
+ if($exp_info_text) {
173
+ printf('<tr class="plugin-update-tr active" data-slug="%s" data-plugin="%s"><td colspan="3" class="plugin-update colspanchange plugin_license_info_row">', PERMALINK_MANAGER_PLUGIN_SLUG, $plugin_name);
174
+ printf('<div class="update-message notice inline notice-error notice-alt">%s</div>', wpautop($exp_info_text));
175
+ printf('</td></tr>');
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Stop words
181
+ */
182
+ static function load_stop_words_languages() {
183
+ return array (
184
+ 'ar' => __('Arabic', 'permalink-manager'),
185
+ 'zh' => __('Chinese', 'permalink-manager'),
186
+ 'da' => __('Danish', 'permalink-manager'),
187
+ 'nl' => __('Dutch', 'permalink-manager'),
188
+ 'en' => __('English', 'permalink-manager'),
189
+ 'fi' => __('Finnish', 'permalink-manager'),
190
+ 'fr' => __('French', 'permalink-manager'),
191
+ 'de' => __('German', 'permalink-manager'),
192
+ 'he' => __('Hebrew', 'permalink-manager'),
193
+ 'hi' => __('Hindi', 'permalink-manager'),
194
+ 'it' => __('Italian', 'permalink-manager'),
195
+ 'ja' => __('Japanese', 'permalink-manager'),
196
+ 'ko' => __('Korean', 'permalink-manager'),
197
+ 'no' => __('Norwegian', 'permalink-manager'),
198
+ 'fa' => __('Persian', 'permalink-manager'),
199
+ 'pl' => __('Polish', 'permalink-manager'),
200
+ 'pt' => __('Portuguese', 'permalink-manager'),
201
+ 'ru' => __('Russian', 'permalink-manager'),
202
+ 'es' => __('Spanish', 'permalink-manager'),
203
+ 'sv' => __('Swedish', 'permalink-manager'),
204
+ 'tr' => __('Turkish', 'permalink-manager')
205
+ );
206
+ }
207
+
208
+ /**
209
+ * Load stop words
210
+ */
211
+ static function load_stop_words($iso = '') {
212
+ $json_dir = PERMALINK_MANAGER_DIR . "/includes/ext/stopwords-json/dist/{$iso}.json";
213
+ $json_a = array();
214
+
215
+ if(file_exists($json_dir)) {
216
+ $string = file_get_contents($json_dir);
217
+ $json_a = json_decode($string, true);
218
+ }
219
+
220
+ return $json_a;
221
+ }
222
+
223
+ /**
224
+ * Remove stop words from default URIs
225
+ */
226
+ public function remove_stop_words($slug, $object, $name) {
227
+ global $permalink_manager_options;
228
+
229
+ if(!empty($permalink_manager_options['stop-words']['stop-words-enable']) && !empty($permalink_manager_options['stop-words']['stop-words-list'])) {
230
+ $stop_words = explode(",", strtolower(stripslashes($permalink_manager_options['stop-words']['stop-words-list'])));
231
+
232
+ foreach($stop_words as $stop_word) {
233
+ $stop_word = trim($stop_word);
234
+ $slug = preg_replace("/([\/-]|^)({$stop_word})([\/-]|$)/", '$1$3', $slug);
235
+ }
236
+
237
+ // Clear the slug
238
+ $slug = preg_replace("/(-+)/", "-", trim($slug, "-"));
239
+ $slug = preg_replace("/(-\/-)|(\/-)|(-\/)/", "/", $slug);
240
+ }
241
+
242
+ return $slug;
243
+ }
244
+
245
+ /**
246
+ * Hide "Buy Permalink Manager Pro" alert
247
+ */
248
+ function pro_alerts($alerts = array()) {
249
+ global $permalink_manager_options;
250
+
251
+ // Check expiration date
252
+ $exp_info_text = self::get_expiration_date(false, true);
253
+
254
+ if(!empty($exp_info_text)) {
255
+ $alerts['licence_key'] = array('txt' => $exp_info_text, 'type' => 'notice-error', 'show' => 1);
256
+ }
257
+
258
+ return $alerts;
259
+ }
260
+
261
+ /**
262
+ * Replace custom field tags in default post URIs
263
+ */
264
+ function replace_custom_field_tags($default_uri, $native_slug, $element, $slug, $native_uri) {
265
+ // Do not affect native URIs
266
+ if($native_uri == true) { return $default_uri; }
267
+
268
+ preg_match_all("/%__(.[^\%]+)%/", $default_uri, $custom_fields);
269
+
270
+ if(!empty($custom_fields[1])) {
271
+ foreach($custom_fields[1] as $i => $custom_field) {
272
+ // Reset custom field value
273
+ $custom_field_value = "";
274
+
275
+ // 1. Use WooCommerce fields
276
+ if(class_exists('WooCommerce') && in_array($custom_field, array('sku')) && !empty($element->ID)) {
277
+ $product = wc_get_product($element->ID);
278
+
279
+ // 1A. SKU
280
+ if($custom_field == 'sku') {
281
+ $custom_field_value = $product->get_sku();
282
+ }
283
+ // 1B ...
284
+ }
285
+
286
+ // 2. Try to get value using ACF API
287
+ else if(function_exists('get_field')) {
288
+ $acf_element_id = (!empty($element->ID)) ? $element->ID : "{$element->taxonomy}_{$element->term_id}";
289
+ $field_object = get_field_object($custom_field, $acf_element_id);
290
+
291
+ // A. Taxonomy field
292
+ if(!empty($field_object['taxonomy']) && !empty($field_object['value'])) {
293
+ $rel_terms_id = $field_object['value'];
294
+
295
+ if(!empty($rel_terms_id) && (is_array($rel_terms_id) || is_numeric($rel_terms_id))) {
296
+ $rel_terms = get_terms(array('taxonomy' => $field_object['taxonomy'], 'include' => $rel_terms_id));
297
+
298
+ // Get lowest term
299
+ if(!is_wp_error($rel_terms) && !empty($rel_terms[0]) && is_object($rel_terms[0])) {
300
+ $rel_term = Permalink_Manager_Helper_Functions::get_lowest_element($rel_terms[0], $rel_terms);
301
+ }
302
+
303
+ // Get the replacement slug
304
+ $custom_field_value = (!empty($rel_term->term_id)) ? Permalink_Manager_Helper_Functions::get_term_full_slug($rel_term, $rel_terms, false, $native_uri) : "";
305
+ }
306
+ }
307
+
308
+ // B. Relationship field
309
+ if(!empty($field_object['type']) && (in_array($field_object['type'], array('relationship', 'post_object', 'taxonomy'))) && !empty($field_object['value'])) {
310
+ $rel_elements = $field_object['value'];
311
+
312
+ // B1. Terms
313
+ if($field_object['type'] == 'taxonomy') {
314
+ if(!empty($rel_elements) && (is_array($rel_elements))) {
315
+ if(is_numeric($rel_elements[0]) && !empty($field_object['taxonomy'])) {
316
+ $rel_elements = get_terms(array('include' => $rel_elements, 'taxonomy' => $field_object['taxonomy'], 'hide_empty' => false));
317
+ }
318
+
319
+ // Get lowest term
320
+ if(!is_wp_error($rel_elements) && !empty($rel_elements) && is_object($rel_elements[0])) {
321
+ $rel_term = Permalink_Manager_Helper_Functions::get_lowest_element($rel_elements[0], $rel_elements);
322
+ }
323
+ } else if(is_numeric($rel_elements)) {
324
+ $rel_term = get_term($rel_elements, $field_object['taxonomy']);
325
+ }
326
+
327
+ if(!empty($rel_term->term_id)) {
328
+ $custom_field_value = $rel_term->slug;
329
+ } else if(!empty($rel_elements->term_id)) {
330
+ $custom_field_value = $rel_elements->slug;
331
+ } else {
332
+ $custom_field_value = "";
333
+ }
334
+ }
335
+ // B2. Posts
336
+ else {
337
+ if(!empty($rel_elements) && (is_array($rel_elements))) {
338
+ if(is_numeric($rel_elements[0])) {
339
+ $rel_elements = get_posts(array('include' => $rel_elements));
340
+ }
341
+
342
+ // Get lowest element
343
+ if(!is_wp_error($rel_elements) && !empty($rel_elements) && is_object($rel_elements[0])) {
344
+ $rel_post = Permalink_Manager_Helper_Functions::get_lowest_element($rel_elements[0], $rel_elements);
345
+ }
346
+ } else if(!empty($rel_elements->ID)) {
347
+ $rel_post = $rel_elements;
348
+ }
349
+
350
+ $rel_post_id = (!empty($rel_post->ID)) ? $rel_post->ID : $rel_elements;
351
+
352
+ // Get the replacement slug
353
+ $custom_field_value = (is_numeric($rel_post_id)) ? get_page_uri($rel_post_id) : "";
354
+ }
355
+ }
356
+ // C. Text field
357
+ else {
358
+ $custom_field_value = (!empty($field_object['value'])) ? $field_object['value'] : "";
359
+ $custom_field_value = (!empty($custom_field_value['value'])) ? $custom_field_value['value'] : $custom_field_value;
360
+ }
361
+ }
362
+
363
+ // 3. Use native method
364
+ if(empty($custom_field_value)) {
365
+ if(!empty($element->ID)) {
366
+ $custom_field_value = get_post_meta($element->ID, $custom_field, true);
367
+
368
+ // Toolset
369
+ if(empty($custom_field_value) && (defined('TYPES_VERSION') || defined('WPCF_VERSION'))) {
370
+ $custom_field_value = get_post_meta($element->ID, "wpcf-{$custom_field}", true);
371
+ }
372
+ } else if(!empty($element->term_id)) {
373
+ $custom_field_value = get_term_meta($element->term_id, $custom_field, true);
374
+ } else {
375
+ $custom_field_value = "";
376
+ }
377
+ }
378
+
379
+ // Allow to filter the custom field value
380
+ $custom_field_value = apply_filters('permalink_manager_custom_field_value', $custom_field_value, $custom_field, $element);
381
+
382
+ // Make sure that custom field is a string
383
+ if(!empty($custom_field_value) && is_string($custom_field_value)) {
384
+ $default_uri = str_replace($custom_fields[0][$i], Permalink_Manager_Helper_Functions::sanitize_title($custom_field_value), $default_uri);
385
+ }
386
+ }
387
+ }
388
+
389
+ return $default_uri;
390
+ }
391
+
392
+ /**
393
+ * Save Redirects
394
+ */
395
+ public function save_redirects($element_id, $new_uri, $old_uri, $native_uri, $default_uri) {
396
+ global $permalink_manager_options, $permalink_manager_uris, $permalink_manager_redirects, $permalink_manager_external_redirects;
397
+
398
+ // Terms IDs should be prepended with prefix
399
+ $element_id = (current_filter() == 'permalink_manager_updated_term_uri') ? "tax-{$element_id}" : $element_id;
400
+
401
+ // Make sure that $permalink_manager_redirects variable is an array
402
+ $permalink_manager_redirects = (is_array($permalink_manager_redirects)) ? $permalink_manager_redirects : array();
403
+
404
+ // 1A. Post/term is saved or updated
405
+ if(isset($_POST['permalink-manager-redirects']) && is_array($_POST['permalink-manager-redirects'])) {
406
+ $permalink_manager_redirects[$element_id] = array_filter($_POST['permalink-manager-redirects']);
407
+ $redirects_updated = true;
408
+ }
409
+ // 1B. All redirects are removed
410
+ else if(isset($_POST['permalink-manager-redirects'])) {
411
+ $permalink_manager_redirects[$element_id] = array();
412
+ $redirects_updated = true;
413
+ }
414
+
415
+ // 1C. No longer needed
416
+ if(isset($_POST['permalink-manager-redirects'])) {
417
+ unset($_POST['permalink-manager-redirects']);
418
+ }
419
+
420
+ // 2. Custom URI is updated
421
+ if(get_option('page_on_front') != $element_id && !empty($permalink_manager_options['general']['setup_redirects']) && ($new_uri != $old_uri)) {
422
+ // Make sure that the array with redirects exists
423
+ $permalink_manager_redirects[$element_id] = (!empty($permalink_manager_redirects[$element_id])) ? $permalink_manager_redirects[$element_id] : array();
424
+
425
+ // Append the old custom URI
426
+ $permalink_manager_redirects[$element_id][] = $old_uri;
427
+ $redirects_updated = true;
428
+ }
429
+
430
+ // 3. Save the custom redirects
431
+ if(!empty($redirects_updated) && is_array($permalink_manager_redirects[$element_id])) {
432
+ // Remove empty redirects
433
+ $permalink_manager_redirects[$element_id] = array_filter($permalink_manager_redirects[$element_id]);
434
+
435
+ // Sanitize the array with redirects
436
+ foreach($permalink_manager_redirects[$element_id] as $i => $redirect) {
437
+ $redirect = rawurldecode($redirect);
438
+ $redirect = Permalink_Manager_Helper_Functions::sanitize_title($redirect, true);
439
+ $permalink_manager_redirects[$element_id][$i] = $redirect;
440
+ }
441
+
442
+ // Reset the keys
443
+ $permalink_manager_redirects[$element_id] = array_values($permalink_manager_redirects[$element_id]);
444
+
445
+ // Remove the duplicates
446
+ $permalink_manager_redirects[$element_id] = array_unique($permalink_manager_redirects[$element_id]);
447
+
448
+ Permalink_Manager_Actions::clear_single_element_duplicated_redirect($element_id, true, $new_uri);
449
+
450
+ update_option('permalink-manager-redirects', $permalink_manager_redirects);
451
+ }
452
+
453
+ // 4. Save the external redirect
454
+ if(isset($_POST['permalink-manager-external-redirect'])) {
455
+ self::save_external_redirect($_POST['permalink-manager-external-redirect'], $element_id);
456
+ }
457
+ }
458
+
459
+ /**
460
+ * Save external redirect
461
+ */
462
+ public static function save_external_redirect($url, $element_id) {
463
+ global $permalink_manager_external_redirects;
464
+
465
+ $url = filter_var($url, FILTER_SANITIZE_URL);
466
+
467
+ if((empty($url) || filter_var($url, FILTER_VALIDATE_URL) === false) && !empty($permalink_manager_external_redirects[$element_id]) && isset($_POST['permalink-manager-external-redirect'])) {
468
+ unset($permalink_manager_external_redirects[$element_id]);
469
+ } else {
470
+ $permalink_manager_external_redirects[$element_id] = $url;
471
+ }
472
+
473
+ update_option('permalink-manager-external-redirects', $permalink_manager_external_redirects);
474
+ }
475
+
476
+ /**
477
+ * WooCommerce Coupon URL functions
478
+ */
479
+ public static function woocommerce_coupon_uris($post_types) {
480
+ $post_types = array_diff($post_types, array('shop_coupon'));
481
+ return $post_types;
482
+ }
483
+
484
+ public static function woocommerce_coupon_tabs($tabs = array()) {
485
+ $tabs['coupon-url'] = array(
486
+ 'label' => __( 'Coupon Link', 'permalink-manager' ),
487
+ 'target' => 'permalink-manager-coupon-url',
488
+ 'class' => 'permalink-manager-coupon-url',
489
+ );
490
+
491
+ return $tabs;
492
+ }
493
+
494
+ public static function woocommerce_coupon_panel() {
495
+ global $permalink_manager_uris, $post;
496
+
497
+ $custom_uri = (!empty($permalink_manager_uris[$post->ID])) ? $permalink_manager_uris[$post->ID] : "";
498
+
499
+ $html = "<div id=\"permalink-manager-coupon-url\" class=\"panel woocommerce_options_panel custom_uri_container permalink-manager\">";
500
+
501
+ // URI field
502
+ ob_start();
503
+ wp_nonce_field('permalink-manager-coupon-uri-box', 'permalink-manager-nonce', true);
504
+
505
+ woocommerce_wp_text_input(array(
506
+ 'id' => 'custom_uri',
507
+ 'label' => __( 'Coupon URI', 'permalink-manager' ),
508
+ 'description' => '<span class="duplicated_uri_alert"></span>' . __( 'The URIs are case-insensitive, eg. <strong>BLACKFRIDAY</strong> and <strong>blackfriday</strong> are equivalent.', 'permalink-manager' ),
509
+ 'value' => $custom_uri,
510
+ 'custom_attributes' => array('data-element-id' => $post->ID),
511
+ //'desc_tip' => true
512
+ ));
513
+
514
+ $html .= ob_get_contents();
515
+ ob_end_clean();
516
+
517
+ // URI preview
518
+ $html .= "<p class=\"form-field coupon-full-url hidden\">";
519
+ $html .= sprintf("<label>%s</label>", __("Coupon Full URL", "permalink-manager"));
520
+ $html .= sprintf("<code>%s/<span>%s</span></code>", trim(get_option('home'), "/"), $custom_uri);
521
+ $html .= "</p>";
522
+
523
+ $html .= "</div>";
524
+
525
+ echo $html;
526
+ }
527
+
528
+ public static function woocommerce_save_coupon_uri($post_id, $coupon) {
529
+ global $permalink_manager_uris;
530
+
531
+ // Verify nonce at first
532
+ if(!isset($_POST['permalink-manager-nonce']) || !wp_verify_nonce($_POST['permalink-manager-nonce'], 'permalink-manager-coupon-uri-box')) { return $post_id; }
533
+
534
+ // Do not do anything if post is autosaved
535
+ if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $post_id; }
536
+
537
+ $old_uri = (!empty($permalink_manager_uris[$post_id])) ? $permalink_manager_uris[$post_id] : "";
538
+ $new_uri = (!empty($_POST['custom_uri'])) ? $_POST['custom_uri'] : "";
539
+
540
+ if($old_uri != $new_uri) {
541
+ $permalink_manager_uris[$post_id] = Permalink_Manager_Helper_Functions::sanitize_title($new_uri, true);
542
+ update_option('permalink-manager-uris', $permalink_manager_uris);
543
+ }
544
+ }
545
+
546
+ public static function woocommerce_detect_coupon_code($query) {
547
+ global $woocommerce, $pm_query;
548
+
549
+ // Check if custom URI with coupon URL is requested
550
+ if(!empty($query['shop_coupon']) && !empty($pm_query['id'])) {
551
+ // Check if cart/shop page is set & redirect to it
552
+ $shop_page_id = wc_get_page_id('shop');
553
+ $cart_page_id = wc_get_page_id('cart');
554
+
555
+
556
+ if(!empty($cart_page_id) && WC()->cart->get_cart_contents_count() > 0) {
557
+ $redirect_page = $cart_page_id;
558
+ } else if(!empty($shop_page_id)) {
559
+ $redirect_page = $shop_page_id;
560
+ }
561
+
562
+ $coupon_code = get_the_title($pm_query['id']);
563
+
564
+ // Set-up session
565
+ if(!WC()->session->has_session()) {
566
+ WC()->session->set_customer_session_cookie(true);
567
+ }
568
+
569
+ // Add the discount code
570
+ if(!WC()->cart->has_discount($coupon_code)) {
571
+ $woocommerce->cart->add_discount(sanitize_text_field($coupon_code));
572
+ }
573
+
574
+ // Do redirect
575
+ if(!empty($redirect_page)) {
576
+ wp_safe_redirect(get_permalink($redirect_page));
577
+ exit();
578
+ }
579
+
580
+ }
581
+
582
+ return $query;
583
+ }
584
+
585
+ }
586
+
587
+ ?>
includes/core/permalink-manager-third-parties.php CHANGED
@@ -79,7 +79,7 @@ class Permalink_Manager_Third_Parties extends Permalink_Manager_Class {
79
  }
80
 
81
  // 10. WP All Import
82
- if(class_exists('PMXI_Plugin') && (empty($permalink_manager_options['general']['pmxi_support']))) {
83
  add_action('pmxi_extend_options_featured', array($this, 'wpaiextra_uri_display'), 9, 2);
84
  add_filter('pmxi_options_options', array($this, 'wpai_api_options'));
85
  add_filter('pmxi_addons', array($this, 'wpai_api_register'));
@@ -126,11 +126,6 @@ class Permalink_Manager_Third_Parties extends Permalink_Manager_Class {
126
  if(class_exists('Basepress')) {
127
  add_filter('permalink_manager_filter_query', array($this, 'kb_adjust_query'), 5, 5);
128
  }
129
-
130
- // 17. Ultimate Member
131
- if(class_exists('UM') && (empty($permalink_manager_options['general']['um_support']))) {
132
- add_filter('permalink_manager_detect_uri', array($this, 'um_detect_extra_pages'), 20);
133
- }
134
  }
135
 
136
  /**
@@ -1089,40 +1084,7 @@ class Permalink_Manager_Third_Parties extends Permalink_Manager_Class {
1089
  }
1090
 
1091
  /**
1092
- * 17. Ultimate Member
1093
- */
1094
- public function um_detect_extra_pages($uri_parts) {
1095
- global $permalink_manager_uris;
1096
-
1097
- $request_url = trim("{$uri_parts['uri']}/{$uri_parts['endpoint_value']}", "/");
1098
- $um_pages = array(
1099
- 'user' => 'um_user',
1100
- 'account' => 'um_tab',
1101
- );
1102
-
1103
- // Detect UM permalinks
1104
- foreach($um_pages as $um_page => $query_var) {
1105
- $um_page_id = UM()->config()->permalinks[$um_page];
1106
- // Support for WPML/Polylang
1107
- $um_page_id = (!empty($uri_parts['lang'])) ? apply_filters('wpml_object_id', $um_page_id, 'page', true, $uri_parts['lang']) : $um_page_id;
1108
-
1109
- if(!empty($um_page_id) && !empty($permalink_manager_uris[$um_page_id])) {
1110
- $user_page_uri = preg_quote($permalink_manager_uris[$um_page_id], '/');
1111
- preg_match("/^({$user_page_uri})\/([^\/]+)?$/", $request_url, $parts);
1112
-
1113
- if(!empty($parts[2])) {
1114
- $uri_parts['uri'] = $parts[1];
1115
- $uri_parts['endpoint'] = $query_var;
1116
- $uri_parts['endpoint_value'] = sanitize_title($parts[2]);
1117
- }
1118
- }
1119
- }
1120
-
1121
- return $uri_parts;
1122
- }
1123
-
1124
- /**
1125
- * 18. Store Locator - CSV Manager
1126
  */
1127
  public function wpsl_regenerate_after_import($meta_id, $post_id, $meta_key, $meta_value) {
1128
  global $permalink_manager_uris;
79
  }
80
 
81
  // 10. WP All Import
82
+ if(class_exists('PMXI_Plugin') && (empty($permalink_manager_options['general']['pmxi_import_support']))) {
83
  add_action('pmxi_extend_options_featured', array($this, 'wpaiextra_uri_display'), 9, 2);
84
  add_filter('pmxi_options_options', array($this, 'wpai_api_options'));
85
  add_filter('pmxi_addons', array($this, 'wpai_api_register'));
126
  if(class_exists('Basepress')) {
127
  add_filter('permalink_manager_filter_query', array($this, 'kb_adjust_query'), 5, 5);
128
  }
 
 
 
 
 
129
  }
130
 
131
  /**
1084
  }
1085
 
1086
  /**
1087
+ * 17. Store Locator - CSV Manager
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1088
  */
1089
  public function wpsl_regenerate_after_import($meta_id, $post_id, $meta_key, $meta_value) {
1090
  global $permalink_manager_uris;
includes/core/permalink-manager-uri-functions-post.php CHANGED
@@ -29,7 +29,6 @@ class Permalink_Manager_URI_Functions_Post extends Permalink_Manager_Class {
29
  add_action( 'wp_insert_post', array($this, 'new_post_uri'), 99, 1 );
30
  add_action( 'add_attachment', array($this, 'new_post_uri'), 99, 1 );
31
  add_action( 'wp_trash_post', array($this, 'remove_post_uri'), 100, 1 );
32
- add_action( 'delete_post', array($this, 'remove_post_uri'), 100, 1 );
33
 
34
  add_action( 'quick_edit_custom_box', array($this, 'quick_edit_column_form'), 99, 3);
35
  }
@@ -739,11 +738,11 @@ class Permalink_Manager_URI_Functions_Post extends Permalink_Manager_Class {
739
  $allow_new_uri = apply_filters("permalink_manager_allow_new_post_uri", true, $post_object);
740
  if(!$allow_new_uri) { return $post_id; }
741
 
742
- // Ignore menu items & revision posts
743
  if($post_object->post_type == 'nav_menu_item') { return $post_id; }
744
 
745
- // Ignore auto-drafts, revisions, removed posts and posts without title
746
- if(in_array($post_object->post_status, array('auto-draft', 'trash')) || (strpos($post_object->post_name, 'revision-v1') !== false) || empty($post_object->post_title) || (!empty($post_object->post_name) && $post_object->post_name == 'auto-draft')) { return $post_id; }
747
 
748
  $native_uri = self::get_default_post_uri($post_id, true);
749
  $new_uri = self::get_default_post_uri($post_id);
29
  add_action( 'wp_insert_post', array($this, 'new_post_uri'), 99, 1 );
30
  add_action( 'add_attachment', array($this, 'new_post_uri'), 99, 1 );
31
  add_action( 'wp_trash_post', array($this, 'remove_post_uri'), 100, 1 );
 
32
 
33
  add_action( 'quick_edit_custom_box', array($this, 'quick_edit_column_form'), 99, 3);
34
  }
738
  $allow_new_uri = apply_filters("permalink_manager_allow_new_post_uri", true, $post_object);
739
  if(!$allow_new_uri) { return $post_id; }
740
 
741
+ // Ignore menu items
742
  if($post_object->post_type == 'nav_menu_item') { return $post_id; }
743
 
744
+ // Ignore auto-drafts, removed posts and posts without title
745
+ if(in_array($post_object->post_status, array('auto-draft', 'trash')) || empty($post_object->post_title) || (!empty($post_object->post_name) && $post_object->post_name == 'auto-draft')) { return $post_id; }
746
 
747
  $native_uri = self::get_default_post_uri($post_id, true);
748
  $new_uri = self::get_default_post_uri($post_id);
includes/core/permalink-manager-uri-functions-tax.php ADDED
@@ -0,0 +1,610 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Additional functions used in classes and another subclasses
5
+ */
6
+ class Permalink_Manager_URI_Functions_Tax extends Permalink_Manager_Class {
7
+
8
+ public function __construct() {
9
+ add_action( 'admin_init', array($this, 'init') );
10
+
11
+ add_filter( 'term_link', array($this, 'custom_tax_permalinks'), 999, 2 );
12
+ // add_filter( 'category_link', array($this, 'custom_tax_permalinks'), 999, 2 );
13
+ // add_filter( 'tag_link', array($this, 'custom_tax_permalinks'), 999, 2 );
14
+
15
+ /**
16
+ * URI Editor
17
+ */
18
+ add_action( 'quick_edit_custom_box', array($this, 'quick_edit_column_form'), 999, 3);
19
+ }
20
+
21
+ /**
22
+ * Allow to edit URIs from "Edit Term" admin pages (register hooks)
23
+ */
24
+ public function init() {
25
+ global $permalink_manager_options;
26
+
27
+ $all_taxonomies = Permalink_Manager_Helper_Functions::get_taxonomies_array();
28
+
29
+ // Add "URI Editor" to "Quick Edit" for all taxonomies
30
+ foreach($all_taxonomies as $tax => $label) {
31
+ // Check if post type is allowed
32
+ if(Permalink_Manager_Helper_Functions::is_disabled($tax, 'taxonomy')) { continue; }
33
+
34
+ add_action( "edited_{$tax}", array($this, 'update_term_uri'), 10, 2 );
35
+ add_action( "create_{$tax}", array($this, 'update_term_uri'), 10, 2 );
36
+ add_action( "delete_{$tax}", array($this, 'remove_term_uri'), 10, 2 );
37
+
38
+ // Check the user capabilities
39
+ $edit_uris_cap = (!empty($permalink_manager_options['general']['edit_uris_cap'])) ? $permalink_manager_options['general']['edit_uris_cap'] : 'publish_posts';
40
+ if(current_user_can($edit_uris_cap)) {
41
+ add_action( "{$tax}_add_form_fields", array($this, 'edit_uri_box'), 10, 1 );
42
+ add_action( "{$tax}_edit_form_fields", array($this, 'edit_uri_box'), 10, 1 );
43
+ add_filter( "manage_edit-{$tax}_columns", array($this, 'quick_edit_column') );
44
+ add_filter( "manage_{$tax}_custom_column" , array($this, 'quick_edit_column_content'), 10, 3 );
45
+ }
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Change permalinks for taxonomies
51
+ */
52
+ function custom_tax_permalinks($permalink, $term) {
53
+ global $wp_rewrite, $permalink_manager_uris, $permalink_manager_options;
54
+
55
+ // Do not filter permalinks in Customizer
56
+ if((function_exists('is_customize_preview') && is_customize_preview()) || !empty($_REQUEST['customize_url'])) { return $permalink; }
57
+
58
+ // Do not filter in WPML String Editor
59
+ if(!empty($_REQUEST['icl_ajx_action']) && $_REQUEST['icl_ajx_action'] == 'icl_st_save_translation') { return $permalink; }
60
+
61
+ $term = (is_numeric($term)) ? get_term($term) : $term;
62
+
63
+ // Check if taxonomy is allowed
64
+ if(empty($term->term_id) || (!empty($term->taxonomy) && Permalink_Manager_Helper_Functions::is_disabled($term->taxonomy, 'taxonomy'))) { return $permalink; }
65
+
66
+ // Get term id
67
+ $term_id = $term->term_id;
68
+
69
+ // Save the old permalink to separate variable
70
+ $old_permalink = $permalink;
71
+
72
+ if(isset($permalink_manager_uris["tax-{$term_id}"])) {
73
+ // Start with homepage URL
74
+ $permalink = Permalink_Manager_Helper_Functions::get_permalink_base($term);
75
+
76
+ // Encode URI?
77
+ if(!empty($permalink_manager_options['general']['decode_uris'])) {
78
+ $permalink .= rawurldecode("/{$permalink_manager_uris["tax-{$term_id}"]}");
79
+ } else {
80
+ $permalink .= Permalink_Manager_Helper_Functions::encode_uri("/{$permalink_manager_uris["tax-{$term_id}"]}");
81
+ }
82
+ } else if(!empty($permalink_manager_options['general']['decode_uris'])) {
83
+ $permalink = rawurldecode($permalink);
84
+ }
85
+
86
+ return apply_filters('permalink_manager_filter_final_term_permalink', $permalink, $term, $old_permalink);
87
+ }
88
+
89
+ /**
90
+ * Check if the provided slug is unique and then update it with SQL query.
91
+ */
92
+ static function update_slug_by_id($slug, $id) {
93
+ global $wpdb;
94
+
95
+ // Update slug and make it unique
96
+ $term = get_term(intval($id));
97
+ $slug = (empty($slug)) ? get_the_title($term->name) : $slug;
98
+ $slug = sanitize_title($slug);
99
+
100
+ $new_slug = wp_unique_term_slug($slug, $term);
101
+ $wpdb->query($wpdb->prepare("UPDATE {$wpdb->terms} SET slug = %s WHERE term_id = %d", $new_slug, $id));
102
+
103
+ return $new_slug;
104
+ }
105
+
106
+ /**
107
+ * Get the active URI
108
+ */
109
+ public static function get_term_uri($term_id, $native_uri = false) {
110
+ global $permalink_manager_uris;
111
+
112
+ // Check if input is term object
113
+ $term = (isset($term_id->term_id)) ? $term_id->term_id : get_term($term_id);
114
+
115
+ $final_uri = (!empty($permalink_manager_uris["tax-{$term_id}"])) ? $permalink_manager_uris["tax-{$term_id}"] : self::get_default_term_uri($term->term_id, $native_uri);
116
+ return $final_uri;
117
+ }
118
+
119
+ /**
120
+ * Get the default (not overwritten by the user) or native URI (unfiltered)
121
+ */
122
+ public static function get_default_term_uri($term, $native_uri = false, $check_if_disabled = false) {
123
+ global $permalink_manager_options, $permalink_manager_uris, $permalink_manager_permastructs, $wp_rewrite, $wp_taxonomies, $icl_adjust_id_url_filter_off;
124
+
125
+ // Disable WPML adjust ID filter
126
+ $icl_adjust_id_url_filter_off = true;
127
+
128
+ // 1. Load all bases & term
129
+ $term = is_object($term) ? $term : get_term($term);
130
+ $term_id = $term->term_id;
131
+ $taxonomy_name = $term->taxonomy;
132
+ $taxonomy = get_taxonomy($taxonomy_name);
133
+ $term_slug = $term->slug;
134
+
135
+ // 1A. Check if taxonomy is allowed
136
+ if($check_if_disabled && Permalink_Manager_Helper_Functions::is_disabled($taxonomy, 'taxonomy')) { return ''; }
137
+
138
+ // 2A. Get the native permastructure
139
+ $native_permastructure = Permalink_Manager_Helper_Functions::get_default_permastruct($taxonomy_name, true);
140
+
141
+ // 2B. Get the permastructure
142
+ if($native_uri || empty($permalink_manager_permastructs['taxonomies'][$taxonomy_name])) {
143
+ $permastructure = $native_permastructure;
144
+ } else {
145
+ $permastructure = apply_filters('permalink_manager_filter_permastructure', $permalink_manager_permastructs['taxonomies'][$taxonomy_name], $term);
146
+ }
147
+
148
+ // 2C. Set the permastructure
149
+ $default_base = (!empty($permastructure)) ? trim($permastructure, '/') : "";
150
+
151
+ // 3A. Check if the taxonomy has custom permastructure set
152
+ if(empty($default_base) && !isset($permalink_manager_permastructs['taxonomies'][$taxonomy_name])) {
153
+ if('category' == $taxonomy_name) {
154
+ $default_uri = "?cat={$term->term_id}";
155
+ } elseif ($taxonomy->query_var) {
156
+ $default_uri = "?{$taxonomy->query_var}={$term_slug}";
157
+ } else if(!empty($term_slug)) {
158
+ $default_uri = "?taxonomy={$taxonomy_name}&term={$term_slug}";
159
+ } else {
160
+ $default_uri = '';
161
+ }
162
+ }
163
+ // 3B. Use custom permastructure
164
+ else {
165
+ $default_uri = $default_base;
166
+
167
+ // 3B. Get the full slug
168
+ $term_slug = Permalink_Manager_Helper_Functions::remove_slashes($term_slug);
169
+ $custom_slug = $full_custom_slug = Permalink_Manager_Helper_Functions::force_custom_slugs($term_slug, $term);
170
+ $full_native_slug = $term_slug;
171
+
172
+ // Add ancestors to hierarchical taxonomy
173
+ if(is_taxonomy_hierarchical($taxonomy_name)) {
174
+ $ancestors = (array) get_ancestors($term->term_id, $taxonomy_name, 'taxonomy');
175
+
176
+ foreach($ancestors as $ancestor) {
177
+ $ancestor_term = get_term($ancestor, $taxonomy_name);
178
+
179
+ $full_native_slug = $ancestor_term->slug . '/' . $full_native_slug;
180
+ $full_custom_slug = Permalink_Manager_Helper_Functions::force_custom_slugs($ancestor_term->slug, $ancestor_term) . '/' . $full_custom_slug;
181
+ }
182
+ }
183
+
184
+ // Allow filter the default slug (only custom permalinks)
185
+ if(!$native_uri) {
186
+ $full_slug = apply_filters('permalink_manager_filter_default_term_slug', $full_custom_slug, $term, $term->name);
187
+ } else {
188
+ $full_slug = $full_native_slug;
189
+ }
190
+
191
+ // Get the taxonomy slug
192
+ if(!empty($wp_taxonomies[$taxonomy_name]->rewrite['slug'])) {
193
+ $taxonomy_name_slug = $wp_taxonomies[$taxonomy_name]->rewrite['slug'];
194
+ } else if(is_string($wp_taxonomies[$taxonomy_name]->rewrite)) {
195
+ $taxonomy_name_slug = $wp_taxonomies[$taxonomy_name]->rewrite;
196
+ } else {
197
+ $taxonomy_name_slug = $taxonomy_name;
198
+ }
199
+ $taxonomy_name_slug = apply_filters('permalink_manager_filter_taxonomy_slug', $taxonomy_name_slug, $term, $taxonomy_name);
200
+
201
+ $slug_tags = array("%term_name%", "%term_flat%", "%{$taxonomy_name}%", "%{$taxonomy_name}_flat%", "%native_slug%", "%taxonomy%", "%term_id%");
202
+ $slug_tags_replacement = array($full_slug, $custom_slug, $full_slug, $custom_slug, $full_native_slug, $taxonomy_name_slug, $term->term_id);
203
+
204
+ // Check if any term tag is present in custom permastructure
205
+ $do_not_append_slug = (!empty($permalink_manager_options['permastructure-settings']['do_not_append_slug']['taxonomies'][$taxonomy_name])) ? true : false;
206
+ $do_not_append_slug = apply_filters("permalink_manager_do_not_append_slug", $do_not_append_slug, $taxonomy, $term);
207
+ if($do_not_append_slug == false) {
208
+ foreach($slug_tags as $tag) {
209
+ if(strpos($default_uri, $tag) !== false) {
210
+ $do_not_append_slug = true;
211
+ break;
212
+ }
213
+ }
214
+ }
215
+
216
+ // Replace the term tags with slugs or rppend the slug if no term tag is defined
217
+ if(!empty($do_not_append_slug)) {
218
+ $default_uri = str_replace($slug_tags, $slug_tags_replacement, $default_uri);
219
+ } else {
220
+ $default_uri .= "/{$full_slug}";
221
+ }
222
+ }
223
+
224
+ // Enable WPML adjust ID filter
225
+ $icl_adjust_id_url_filter_off = false;
226
+
227
+ return apply_filters('permalink_manager_filter_default_term_uri', $default_uri, $term->slug, $term, $term_slug, $native_uri);
228
+ }
229
+
230
+ /**
231
+ * Bulk tools
232
+ */
233
+ public static function get_items() {
234
+ global $wpdb;
235
+
236
+ // Check if taxonomies are not empty
237
+ if(empty($_POST['taxonomies'])) { return false; }
238
+
239
+ $taxonomy_names_array = ($_POST['taxonomies']) ? ($_POST['taxonomies']) : '';
240
+ $taxonomy_names = implode("', '", $taxonomy_names_array);
241
+
242
+ // Filter the terms by IDs
243
+ $where = '';
244
+ if(!empty($_POST['ids'])) {
245
+ // Remove whitespaces and prepare array with IDs and/or ranges
246
+ $ids = esc_sql(preg_replace('/\s*/m', '', $_POST['ids']));
247
+ preg_match_all("/([\d]+(?:-?[\d]+)?)/x", $ids, $groups);
248
+
249
+ // Prepare the extra ID filters
250
+ $where .= "AND (";
251
+ foreach($groups[0] as $group) {
252
+ $where .= ($group == reset($groups[0])) ? "" : " OR ";
253
+ // A. Single number
254
+ if(is_numeric($group)) {
255
+ $where .= "(t.term_id = {$group})";
256
+ }
257
+ // B. Range
258
+ else if(substr_count($group, '-')) {
259
+ $range_edges = explode("-", $group);
260
+ $where .= "(t.term_id BETWEEN {$range_edges[0]} AND {$range_edges[1]})";
261
+ }
262
+ }
263
+ $where .= ")";
264
+ }
265
+
266
+ // Get excluded items
267
+ $exclude_terms = $wpdb->get_col("SELECT t.term_id FROM {$wpdb->termmeta} AS tm LEFT JOIN {$wpdb->terms} AS t ON (tm.term_id = t.term_id) WHERE tm.meta_key = 'auto_update_uri' AND tm.meta_value = '-2'");
268
+ if(!empty($exclude_terms)) {
269
+ $where .= sprintf(" AND t.term_id NOT IN ('%s') ", implode("', '", $exclude_terms));
270
+ }
271
+
272
+ // Get the rows before they are altered
273
+ return $wpdb->get_results("SELECT t.slug, t.name, t.term_id, tt.taxonomy FROM {$wpdb->terms} as t INNER JOIN {$wpdb->term_taxonomy} as tt ON tt.term_id = t.term_id WHERE tt.taxonomy IN ('{$taxonomy_names}') {$where}", ARRAY_A);
274
+ }
275
+
276
+ /**
277
+ * Find & replace (bulk action)
278
+ */
279
+ public static function find_and_replace($chunk = null, $mode = '', $old_string = '', $new_string = '') {
280
+ global $wpdb, $permalink_manager_uris;
281
+
282
+ // Reset variables
283
+ $updated_slugs_count = 0;
284
+ $updated_array = array();
285
+ $alert_type = $alert_content = $errors = '';
286
+
287
+ // Get the rows before they are altered
288
+ $terms_to_update = ($chunk) ? $chunk : self::get_items();
289
+
290
+ // Now if the array is not empty use IDs from each subarray as a key
291
+ if($terms_to_update && empty($errors)) {
292
+ foreach ($terms_to_update as $row) {
293
+ // Prepare variables
294
+ $this_term = get_term($row['term_id']);
295
+ $term_permalink_id = "tax-{$row['term_id']}";
296
+
297
+ // Get default & native URL
298
+ $native_uri = self::get_default_term_uri($this_term, true);
299
+ $default_uri = self::get_default_term_uri($this_term);
300
+ $old_term_name = $row['slug'];
301
+ $old_uri = (isset($permalink_manager_uris[$term_permalink_id])) ? $permalink_manager_uris[$term_permalink_id] : $native_uri;
302
+
303
+ // Do replacement on slugs (non-REGEX)
304
+ if(preg_match("/^\/.+\/[a-z]*$/i", $old_string)) {
305
+ // Use $_POST['old_string'] directly here & fix double slashes problem
306
+ $pattern = "~" . stripslashes(trim(sanitize_text_field($_POST['old_string']), "/")) . "~";
307
+ $regex = stripslashes(trim(sanitize_text_field($_POST['old_string']), "/"));
308
+ $regex = preg_quote($regex, '~');
309
+ $pattern = "~{$regex}~";
310
+
311
+ $new_term_name = ($mode == 'slugs') ? preg_replace($pattern, $new_string, $old_term_name) : $old_term_name;
312
+ $new_uri = ($mode != 'slugs') ? preg_replace($pattern, $new_string, $old_uri) : $old_uri;
313
+ } else {
314
+ $new_term_name = ($mode == 'slugs') ? str_replace($old_string, $new_string, $old_term_name) : $old_term_name; // Term slug is changed only in first mode
315
+ $new_uri = ($mode != 'slugs') ? str_replace($old_string, $new_string, $old_uri) : $old_uri;
316
+ }
317
+
318
+ //print_r("{$old_uri} - {$new_uri} - {$native_uri} - {$default_uri} \n");
319
+
320
+ // Check if native slug should be changed
321
+ if(($mode == 'slugs') && ($old_term_name != $new_term_name)) {
322
+ self::update_slug_by_id($new_term_name, $row['term_id']);
323
+ }
324
+
325
+ if(($old_uri != $new_uri) || ($old_term_name != $new_term_name)) {
326
+ $permalink_manager_uris[$term_permalink_id] = $new_uri;
327
+ $updated_array[] = array('item_title' => $row['name'], 'ID' => $row['term_id'], 'old_uri' => $old_uri, 'new_uri' => $new_uri, 'old_slug' => $old_term_name, 'new_slug' => $new_term_name, 'tax' => $this_term->taxonomy);
328
+ $updated_slugs_count++;
329
+ }
330
+
331
+ do_action('permalink_manager_updated_term_uri', $row['term_id'], $new_uri, $old_uri, $native_uri, $default_uri);
332
+ }
333
+
334
+ // Filter array before saving
335
+ $permalink_manager_uris = array_filter($permalink_manager_uris);
336
+ update_option('permalink-manager-uris', $permalink_manager_uris);
337
+
338
+ $output = array('updated' => $updated_array, 'updated_count' => $updated_slugs_count);
339
+ }
340
+
341
+ return (!empty($output)) ? $output : "";
342
+ }
343
+
344
+ /**
345
+ * Regenerate slugs & bases (bulk action)
346
+ */
347
+ static function regenerate_all_permalinks($chunk = null, $mode = '') {
348
+ global $wpdb, $permalink_manager_uris;
349
+
350
+ // Reset variables
351
+ $updated_slugs_count = 0;
352
+ $updated_array = array();
353
+ $alert_type = $alert_content = $errors = '';
354
+
355
+ // Get the rows before they are altered
356
+ $terms_to_update = ($chunk) ? $chunk : self::get_items();
357
+
358
+ // Now if the array is not empty use IDs from each subarray as a key
359
+ if($terms_to_update && empty($errors)) {
360
+ foreach ($terms_to_update as $row) {
361
+ // Prepare variables
362
+ $this_term = get_term($row['term_id']);
363
+ $term_permalink_id = "tax-{$row['term_id']}";
364
+
365
+ // Get default & native URL
366
+ $native_uri = self::get_default_term_uri($this_term, true);
367
+ $default_uri = self::get_default_term_uri($this_term);
368
+ $old_term_name = $row['slug'];
369
+ $old_uri = (isset($permalink_manager_uris[$term_permalink_id])) ? $permalink_manager_uris[$term_permalink_id] : '';
370
+ $correct_slug = ($mode == 'slugs') ? sanitize_title($row['name']) : Permalink_Manager_Helper_Functions::sanitize_title($row['name']);
371
+
372
+ // Process URI & slug
373
+ $new_slug = wp_unique_term_slug($correct_slug, $this_term);
374
+ $new_term_name = ($mode == 'slugs') ? $new_slug : $old_term_name; // Post name is changed only in first mode
375
+
376
+ // Prepare the new URI
377
+ if($mode == 'slugs') {
378
+ $new_uri = ($old_uri) ? $old_uri : $native_uri;
379
+ } else if($mode == 'native') {
380
+ $new_uri = $native_uri;
381
+ } else {
382
+ $new_uri = $default_uri;
383
+ }
384
+
385
+ //print_r("{$old_uri} - {$new_uri} - {$native_uri} - {$default_uri} \n");
386
+
387
+ // Check if native slug should be changed
388
+ if(($mode == 'slugs') && ($old_term_name != $new_term_name)) {
389
+ self::update_slug_by_id($new_term_name, $row['term_id']);
390
+ }
391
+
392
+ if(($old_uri != $new_uri) || ($old_term_name != $new_term_name)) {
393
+ $permalink_manager_uris[$term_permalink_id] = $new_uri;
394
+ $updated_array[] = array('item_title' => $row['name'], 'ID' => $row['term_id'], 'old_uri' => $old_uri, 'new_uri' => $new_uri, 'old_slug' => $old_term_name, 'new_slug' => $new_term_name, 'tax' => $this_term->taxonomy);
395
+ $updated_slugs_count++;
396
+ }
397
+
398
+ do_action('permalink_manager_updated_term_uri', $row['term_id'], $new_uri, $old_uri, $native_uri, $default_uri);
399
+ }
400
+
401
+ // Filter array before saving
402
+ $permalink_manager_uris = array_filter($permalink_manager_uris);
403
+ update_option('permalink-manager-uris', $permalink_manager_uris);
404
+
405
+ $output = array('updated' => $updated_array, 'updated_count' => $updated_slugs_count);
406
+ wp_reset_postdata();
407
+ }
408
+
409
+ return (!empty($output)) ? $output : "";
410
+ }
411
+
412
+ /**
413
+ * Update all slugs & bases (bulk action)
414
+ */
415
+ static public function update_all_permalinks() {
416
+ global $permalink_manager_uris;
417
+
418
+ // Setup needed variables
419
+ $updated_slugs_count = 0;
420
+ $updated_array = array();
421
+
422
+ $old_uris = $permalink_manager_uris;
423
+ $new_uris = isset($_POST['uri']) ? $_POST['uri'] : array();
424
+
425
+ // Double check if the slugs and ids are stored in arrays
426
+ if (!is_array($new_uris)) $new_uris = explode(',', $new_uris);
427
+
428
+ if (!empty($new_uris)) {
429
+ foreach($new_uris as $id => $new_uri) {
430
+ // Remove prefix from field name to obtain term id
431
+ $term_id = filter_var(str_replace('tax-', '', $id), FILTER_SANITIZE_NUMBER_INT);
432
+
433
+ // Prepare variables
434
+ $this_term = get_term($term_id);
435
+ $updated = '';
436
+
437
+ // Get default & native URL
438
+ $native_uri = self::get_default_term_uri($this_term, true);
439
+ $default_uri = self::get_default_term_uri($this_term);
440
+
441
+ $old_uri = isset($old_uris[$id]) ? trim($old_uris[$id], "/") : "";
442
+
443
+ // Process new values - empty entries will be treated as default values
444
+ $new_uri = preg_replace('/\s+/', '', $new_uri);
445
+ $new_uri = (!empty($new_uri)) ? trim($new_uri, "/") : $default_uri;
446
+ $new_slug = (strpos($new_uri, '/') !== false) ? substr($new_uri, strrpos($new_uri, '/') + 1) : $new_uri;
447
+
448
+ if($new_uri != $old_uri) {
449
+ $old_uris[$id] = $new_uri;
450
+ $updated_array[] = array('item_title' => $this_term->name, 'ID' => $term_id, 'old_uri' => $old_uri, 'new_uri' => $new_uri, 'tax' => $this_term->taxonomy);
451
+ $updated_slugs_count++;
452
+ }
453
+
454
+ do_action('permalink_manager_updated_term_uri', $term_id, $new_uri, $old_uri, $native_uri, $default_uri);
455
+ }
456
+
457
+ // Filter array before saving & append the global
458
+ $old_uris = $permalink_manager_uris = array_filter($old_uris);
459
+ update_option('permalink-manager-uris', $old_uris);
460
+
461
+ //print_r($permalink_manager_uris);
462
+
463
+ $output = array('updated' => $updated_array, 'updated_count' => $updated_slugs_count);
464
+ }
465
+
466
+ return ($output) ? $output : "";
467
+ }
468
+
469
+ /**
470
+ * Allow to edit URIs from "New Term" & "Edit Term" admin pages
471
+ */
472
+ public function edit_uri_box($term = '') {
473
+ global $permalink_manager_uris;
474
+
475
+ // Stop the hook (if needed)
476
+ if(!empty($term->taxonomy)) {
477
+ $show_uri_editor = apply_filters("permalink_manager_hide_uri_editor_term_{$term->taxonomy}", true);
478
+
479
+ if(!$show_uri_editor) { return; }
480
+ }
481
+
482
+ $label = __("Custom URI", "permalink-manager");
483
+ $description = __("Clear/leave the field empty to use the default permalink.", "permalink-manager");
484
+
485
+ // A. New term
486
+ if(empty($term->term_id)) {
487
+ $html = "<div class=\"form-field\">";
488
+ $html .= "<label for=\"term_meta[uri]\">{$label}</label>";
489
+ $html .= "<input type=\"text\" name=\"custom_uri\" id=\"custom_uri\" value=\"\">";
490
+ $html .= "<p class=\"description\">{$description}</p>";
491
+ $html .= "</div>";
492
+
493
+ // Append nonce field
494
+ $html .= wp_nonce_field( 'permalink-manager-edit-uri-box', 'permalink-manager-nonce', true, false );
495
+ }
496
+ // B. Edit term
497
+ else {
498
+ $custom_uri = (!empty($permalink_manager_uris["tax-{$term->term_id}"])) ? $permalink_manager_uris["tax-{$term->term_id}"] : true;
499
+
500
+ $html = "<tr id=\"permalink-manager\" class=\"form-field permalink-manager-edit-term permalink-manager\">";
501
+ $html .= "<th scope=\"row\" valign=\"top\"><label for=\"custom_uri\">{$label}</label></th>";
502
+ $html .= "<td><div>";
503
+ $html .= Permalink_Manager_Admin_Functions::display_uri_box($term);
504
+ $html .= "</div></td>";
505
+ $html .= "</tr>";
506
+ }
507
+
508
+ echo $html;
509
+ }
510
+
511
+ /**
512
+ * "Quick Edit" form
513
+ */
514
+ function quick_edit_column($columns) {
515
+ return array_merge($columns, array('permalink-manager-col' => __( 'Current URI', 'permalink-manager')));
516
+ }
517
+
518
+ function quick_edit_column_content($content, $column_name, $term_id) {
519
+ global $permalink_manager_uris;
520
+
521
+ if($column_name != "permalink-manager-col") { return $content; }
522
+ return (!empty($permalink_manager_uris["tax-{$term_id}"])) ? self::get_term_uri($term_id) : self::get_term_uri($term_id, true);
523
+ }
524
+
525
+ function quick_edit_column_form($column_name, $post_type, $taxonomy = '') {
526
+ if($taxonomy && $column_name == 'permalink-manager-col') {
527
+ echo Permalink_Manager_Admin_Functions::quick_edit_column_form();
528
+ }
529
+ }
530
+
531
+ /**
532
+ * Update URI from "Edit Term" admin page
533
+ */
534
+ function update_term_uri($term_id, $taxonomy) {
535
+ global $permalink_manager_uris, $permalink_manager_options, $wp_current_filter, $current_screen;
536
+
537
+ // Term ID must be defined
538
+ if(empty($term_id)) { return; }
539
+
540
+ // Check if term was added via "Edit Post" page
541
+ if(!empty($wp_current_filter[0]) && strpos($wp_current_filter[0], 'wp_ajax_add') !== false && empty($_POST['custom_uri'])) {
542
+ $force_default_uri = true;
543
+ } else if(isset($_POST['custom_uri']) && (!isset($_POST['permalink-manager-nonce']) || !wp_verify_nonce($_POST['permalink-manager-nonce'], 'permalink-manager-edit-uri-box'))) { return; }
544
+
545
+ // Get the term object
546
+ $this_term = get_term($term_id);
547
+ $term_permalink_id = "tax-{$term_id}";
548
+
549
+ // Check if taxonomy is allowed
550
+ if(Permalink_Manager_Helper_Functions::is_disabled($this_term->taxonomy, 'taxonomy')) { return; }
551
+
552
+ // Stop the hook (if needed)
553
+ $allow_update_term = apply_filters("permalink_manager_update_term_uri_{$this_term->taxonomy}", true);
554
+ if(!$allow_update_term) { return $post_id; }
555
+
556
+ // Get auto-update URI setting (if empty use global setting)
557
+ if(!empty($_POST["auto_update_uri"])) {
558
+ $auto_update_uri_current = intval($_POST["auto_update_uri"]);
559
+ } else if(!empty($_POST["action"]) && $_POST['action'] == 'inline-save') {
560
+ $auto_update_uri_current = get_term_meta($term_id, "auto_update_uri", true);
561
+ }
562
+ $auto_update_uri = (!empty($auto_update_uri_current)) ? $auto_update_uri_current : $permalink_manager_options["general"]["auto_update_uris"];
563
+
564
+ // Get default & native & user-submitted URIs
565
+ $native_uri = self::get_default_term_uri($this_term, true);
566
+ $default_uri = self::get_default_term_uri($this_term);
567
+ $old_uri = (isset($permalink_manager_uris[$term_permalink_id])) ? $permalink_manager_uris[$term_permalink_id] : "";
568
+
569
+ // A little hack (if user removes whole URI from input) +
570
+ // The terms added via "Edit Post" page should have default URI
571
+ if(!empty($_POST['custom_uri']) && empty($force_default_uri) && empty($_POST['post_ID']) && $auto_update_uri !== 1) {
572
+ $new_uri = Permalink_Manager_Helper_Functions::sanitize_title($_POST['custom_uri']);
573
+ } else {
574
+ $new_uri = $default_uri;
575
+ }
576
+
577
+ // Save or remove "Auto-update URI" settings
578
+ if(!empty($auto_update_uri_current)) {
579
+ update_term_meta($term_id, "auto_update_uri", $auto_update_uri_current);
580
+ } elseif(isset($_POST['auto_update_uri'])) {
581
+ delete_term_meta($term_id, "auto_update_uri");
582
+ }
583
+
584
+ // Save only changed URIs
585
+ if($new_uri != $old_uri) {
586
+ $permalink_manager_uris[$term_permalink_id] = $new_uri;
587
+ }
588
+
589
+ do_action('permalink_manager_updated_term_uri', $term_id, $new_uri, $old_uri, $native_uri, $default_uri);
590
+
591
+ update_option('permalink-manager-uris', $permalink_manager_uris);
592
+ }
593
+
594
+ /**
595
+ * Remove URI from options array after post is moved to the trash
596
+ */
597
+ function remove_term_uri($term_id) {
598
+ global $permalink_manager_uris;
599
+
600
+ // Check if the custom permalink is assigned to this post
601
+ if(isset($permalink_manager_uris["tax-{$term_id}"])) {
602
+ unset($permalink_manager_uris["tax-{$term_id}"]);
603
+ }
604
+
605
+ update_option('permalink-manager-uris', $permalink_manager_uris);
606
+ }
607
+
608
+ }
609
+
610
+ ?>
includes/ext/plugin-update-checker/Puc/v4/Factory.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4_Factory', false) ):
3
+
4
+ /**
5
+ * A factory that builds update checker instances.
6
+ *
7
+ * When multiple versions of the same class have been loaded (e.g. PluginUpdateChecker 4.0
8
+ * and 4.1), this factory will always use the latest available minor version. Register class
9
+ * versions by calling {@link PucFactory::addVersion()}.
10
+ *
11
+ * At the moment it can only build instances of the UpdateChecker class. Other classes are
12
+ * intended mainly for internal use and refer directly to specific implementations.
13
+ */
14
+ class Puc_v4_Factory {
15
+ protected static $classVersions = array();
16
+ protected static $sorted = false;
17
+
18
+ protected static $myMajorVersion = '';
19
+ protected static $latestCompatibleVersion = '';
20
+
21
+ /**
22
+ * Create a new instance of the update checker.
23
+ *
24
+ * This method automatically detects if you're using it for a plugin or a theme and chooses
25
+ * the appropriate implementation for your update source (JSON file, GitHub, BitBucket, etc).
26
+ *
27
+ * @see Puc_v4p1_UpdateChecker::__construct
28
+ *
29
+ * @param string $metadataUrl The URL of the metadata file, a GitHub repository, or another supported update source.
30
+ * @param string $fullPath Full path to the main plugin file or to the theme directory.
31
+ * @param string $slug Custom slug. Defaults to the name of the main plugin file or the theme directory.
32
+ * @param int $checkPeriod How often to check for updates (in hours).
33
+ * @param string $optionName Where to store book-keeping info about update checks.
34
+ * @param string $muPluginFile The plugin filename relative to the mu-plugins directory.
35
+ * @return Puc_v4p1_Plugin_UpdateChecker|Puc_v4p1_Theme_UpdateChecker|Puc_v4p1_Vcs_BaseChecker
36
+ */
37
+ public static function buildUpdateChecker($metadataUrl, $fullPath, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') {
38
+ $fullPath = wp_normalize_path($fullPath);
39
+ $id = null;
40
+
41
+ //Plugin or theme?
42
+ $themeDirectory = self::getThemeDirectoryName($fullPath);
43
+ if ( self::isPluginFile($fullPath) ) {
44
+ $type = 'Plugin';
45
+ $id = $fullPath;
46
+ } else if ( $themeDirectory !== null ) {
47
+ $type = 'Theme';
48
+ $id = $themeDirectory;
49
+ } else {
50
+ throw new RuntimeException(sprintf(
51
+ 'The update checker cannot determine if "%s" is a plugin or a theme. ' .
52
+ 'This is a bug. Please contact the PUC developer.',
53
+ htmlentities($fullPath)
54
+ ));
55
+ }
56
+
57
+ //Which hosting service does the URL point to?
58
+ $service = self::getVcsService($metadataUrl);
59
+
60
+ $apiClass = null;
61
+ if ( empty($service) ) {
62
+ //The default is to get update information from a remote JSON file.
63
+ $checkerClass = $type . '_UpdateChecker';
64
+ } else {
65
+ //You can also use a VCS repository like GitHub.
66
+ $checkerClass = 'Vcs_' . $type . 'UpdateChecker';
67
+ $apiClass = $service . 'Api';
68
+ }
69
+
70
+ $checkerClass = self::getCompatibleClassVersion($checkerClass);
71
+ if ( $checkerClass === null ) {
72
+ trigger_error(
73
+ sprintf(
74
+ 'PUC %s does not support updates for %ss %s',
75
+ htmlentities(self::$latestCompatibleVersion),
76
+ strtolower($type),
77
+ $service ? ('hosted on ' . htmlentities($service)) : 'using JSON metadata'
78
+ ),
79
+ E_USER_ERROR
80
+ );
81
+ return null;
82
+ }
83
+
84
+ if ( !isset($apiClass) ) {
85
+ //Plain old update checker.
86
+ return new $checkerClass($metadataUrl, $id, $slug, $checkPeriod, $optionName, $muPluginFile);
87
+ } else {
88
+ //VCS checker + an API client.
89
+ $apiClass = self::getCompatibleClassVersion($apiClass);
90
+ if ( $apiClass === null ) {
91
+ trigger_error(sprintf(
92
+ 'PUC %s does not support %s',
93
+ htmlentities(self::$latestCompatibleVersion),
94
+ htmlentities($service)
95
+ ), E_USER_ERROR);
96
+ return null;
97
+ }
98
+
99
+ return new $checkerClass(
100
+ new $apiClass($metadataUrl),
101
+ $id,
102
+ $slug,
103
+ $checkPeriod,
104
+ $optionName,
105
+ $muPluginFile
106
+ );
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Check if the path points to a plugin file.
112
+ *
113
+ * @param string $absolutePath Normalized path.
114
+ * @return bool
115
+ */
116
+ protected static function isPluginFile($absolutePath) {
117
+ //Is the file inside the "plugins" or "mu-plugins" directory?
118
+ $pluginDir = wp_normalize_path(WP_PLUGIN_DIR);
119
+ $muPluginDir = wp_normalize_path(WPMU_PLUGIN_DIR);
120
+ if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) {
121
+ return true;
122
+ }
123
+
124
+ //Is it a file at all? Caution: is_file() can fail if the parent dir. doesn't have the +x permission set.
125
+ if ( !is_file($absolutePath) ) {
126
+ return false;
127
+ }
128
+
129
+ //Does it have a valid plugin header?
130
+ //This is a last-ditch check for plugins symlinked from outside the WP root.
131
+ if ( function_exists('get_file_data') ) {
132
+ $headers = get_file_data($absolutePath, array('Name' => 'Plugin Name'), 'plugin');
133
+ return !empty($headers['Name']);
134
+ }
135
+
136
+ return false;
137
+ }
138
+
139
+ /**
140
+ * Get the name of the theme's directory from a full path to a file inside that directory.
141
+ * E.g. "/abc/public_html/wp-content/themes/foo/whatever.php" => "foo".
142
+ *
143
+ * Note that subdirectories are currently not supported. For example,
144
+ * "/xyz/wp-content/themes/my-theme/includes/whatever.php" => NULL.
145
+ *
146
+ * @param string $absolutePath Normalized path.
147
+ * @return string|null Directory name, or NULL if the path doesn't point to a theme.
148
+ */
149
+ protected static function getThemeDirectoryName($absolutePath) {
150
+ if ( is_file($absolutePath) ) {
151
+ $absolutePath = dirname($absolutePath);
152
+ }
153
+
154
+ if ( file_exists($absolutePath . '/style.css') ) {
155
+ return basename($absolutePath);
156
+ }
157
+ return null;
158
+ }
159
+
160
+ /**
161
+ * Get the name of the hosting service that the URL points to.
162
+ *
163
+ * @param string $metadataUrl
164
+ * @return string|null
165
+ */
166
+ private static function getVcsService($metadataUrl) {
167
+ $service = null;
168
+
169
+ //Which hosting service does the URL point to?
170
+ $host = @parse_url($metadataUrl, PHP_URL_HOST);
171
+ $path = @parse_url($metadataUrl, PHP_URL_PATH);
172
+ //Check if the path looks like "/user-name/repository".
173
+ $usernameRepoRegex = '@^/?([^/]+?)/([^/#?&]+?)/?$@';
174
+ if ( preg_match($usernameRepoRegex, $path) ) {
175
+ $knownServices = array(
176
+ 'github.com' => 'GitHub',
177
+ 'bitbucket.org' => 'BitBucket',
178
+ 'gitlab.com' => 'GitLab',
179
+ );
180
+ if ( isset($knownServices[$host]) ) {
181
+ $service = $knownServices[$host];
182
+ }
183
+ }
184
+
185
+ return $service;
186
+ }
187
+
188
+ /**
189
+ * Get the latest version of the specified class that has the same major version number
190
+ * as this factory class.
191
+ *
192
+ * @param string $class Partial class name.
193
+ * @return string|null Full class name.
194
+ */
195
+ protected static function getCompatibleClassVersion($class) {
196
+ if ( isset(self::$classVersions[$class][self::$latestCompatibleVersion]) ) {
197
+ return self::$classVersions[$class][self::$latestCompatibleVersion];
198
+ }
199
+ return null;
200
+ }
201
+
202
+ /**
203
+ * Get the specific class name for the latest available version of a class.
204
+ *
205
+ * @param string $class
206
+ * @return null|string
207
+ */
208
+ public static function getLatestClassVersion($class) {
209
+ if ( !self::$sorted ) {
210
+ self::sortVersions();
211
+ }
212
+
213
+ if ( isset(self::$classVersions[$class]) ) {
214
+ return reset(self::$classVersions[$class]);
215
+ } else {
216
+ return null;
217
+ }
218
+ }
219
+
220
+ /**
221
+ * Sort available class versions in descending order (i.e. newest first).
222
+ */
223
+ protected static function sortVersions() {
224
+ foreach ( self::$classVersions as $class => $versions ) {
225
+ uksort($versions, array(__CLASS__, 'compareVersions'));
226
+ self::$classVersions[$class] = $versions;
227
+ }
228
+ self::$sorted = true;
229
+ }
230
+
231
+ protected static function compareVersions($a, $b) {
232
+ return -version_compare($a, $b);
233
+ }
234
+
235
+ /**
236
+ * Register a version of a class.
237
+ *
238
+ * @access private This method is only for internal use by the library.
239
+ *
240
+ * @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'.
241
+ * @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'.
242
+ * @param string $version Version number, e.g. '1.2'.
243
+ */
244
+ public static function addVersion($generalClass, $versionedClass, $version) {
245
+ if ( empty(self::$myMajorVersion) ) {
246
+ $nameParts = explode('_', __CLASS__, 3);
247
+ self::$myMajorVersion = substr(ltrim($nameParts[1], 'v'), 0, 1);
248
+ }
249
+
250
+ //Store the greatest version number that matches our major version.
251
+ $components = explode('.', $version);
252
+ if ( $components[0] === self::$myMajorVersion ) {
253
+
254
+ if (
255
+ empty(self::$latestCompatibleVersion)
256
+ || version_compare($version, self::$latestCompatibleVersion, '>')
257
+ ) {
258
+ self::$latestCompatibleVersion = $version;
259
+ }
260
+
261
+ }
262
+
263
+ if ( !isset(self::$classVersions[$generalClass]) ) {
264
+ self::$classVersions[$generalClass] = array();
265
+ }
266
+ self::$classVersions[$generalClass][$version] = $versionedClass;
267
+ self::$sorted = false;
268
+ }
269
+ }
270
+
271
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Autoloader.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_Autoloader', false) ):
4
+
5
+ class Puc_v4p1_Autoloader {
6
+ private $prefix = '';
7
+ private $rootDir = '';
8
+ private $libraryDir = '';
9
+
10
+ private $staticMap;
11
+
12
+ public function __construct() {
13
+ $this->rootDir = dirname(__FILE__) . '/';
14
+ $nameParts = explode('_', __CLASS__, 3);
15
+ $this->prefix = $nameParts[0] . '_' . $nameParts[1] . '_';
16
+
17
+ $this->libraryDir = realpath($this->rootDir . '../..') . '/';
18
+ $this->staticMap = array(
19
+ 'PucReadmeParser' => 'vendor/readme-parser.php',
20
+ 'Parsedown' => 'vendor/ParsedownLegacy.php',
21
+ );
22
+ if ( version_compare(PHP_VERSION, '5.3.0', '>=') ) {
23
+ $this->staticMap['Parsedown'] = 'vendor/Parsedown.php';
24
+ }
25
+
26
+ spl_autoload_register(array($this, 'autoload'));
27
+ }
28
+
29
+ public function autoload($className) {
30
+ if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) {
31
+ /** @noinspection PhpIncludeInspection */
32
+ include ($this->libraryDir . $this->staticMap[$className]);
33
+ return;
34
+ }
35
+
36
+ if (strpos($className, $this->prefix) === 0) {
37
+ $path = substr($className, strlen($this->prefix));
38
+ $path = str_replace('_', '/', $path);
39
+ $path = $this->rootDir . $path . '.php';
40
+
41
+ if (file_exists($path)) {
42
+ /** @noinspection PhpIncludeInspection */
43
+ include $path;
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/Extension.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_DebugBar_Extension', false) ):
3
+
4
+ class Puc_v4p1_DebugBar_Extension {
5
+ /** @var Puc_v4p1_UpdateChecker */
6
+ protected $updateChecker;
7
+ protected $panelClass = 'Puc_v4p1_DebugBar_Panel';
8
+
9
+ public function __construct($updateChecker, $panelClass = null) {
10
+ $this->updateChecker = $updateChecker;
11
+ if ( isset($panelClass) ) {
12
+ $this->panelClass = $panelClass;
13
+ }
14
+
15
+ add_filter('debug_bar_panels', array($this, 'addDebugBarPanel'));
16
+ add_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies'));
17
+
18
+ add_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow'));
19
+ }
20
+
21
+ /**
22
+ * Register the PUC Debug Bar panel.
23
+ *
24
+ * @param array $panels
25
+ * @return array
26
+ */
27
+ public function addDebugBarPanel($panels) {
28
+ if ( $this->updateChecker->userCanInstallUpdates() ) {
29
+ $panels[] = new $this->panelClass($this->updateChecker);
30
+ }
31
+ return $panels;
32
+ }
33
+
34
+ /**
35
+ * Enqueue our Debug Bar scripts and styles.
36
+ */
37
+ public function enqueuePanelDependencies() {
38
+ wp_enqueue_style(
39
+ 'puc-debug-bar-style-v4',
40
+ $this->getLibraryUrl("/css/puc-debug-bar.css"),
41
+ array('debug-bar'),
42
+ '20161217'
43
+ );
44
+
45
+ wp_enqueue_script(
46
+ 'puc-debug-bar-js-v4',
47
+ $this->getLibraryUrl("/js/debug-bar.js"),
48
+ array('jquery'),
49
+ '20170516'
50
+ );
51
+ }
52
+
53
+ /**
54
+ * Run an update check and output the result. Useful for making sure that
55
+ * the update checking process works as expected.
56
+ */
57
+ public function ajaxCheckNow() {
58
+ if ( $_POST['uid'] !== $this->updateChecker->getUniqueName('uid') ) {
59
+ return;
60
+ }
61
+ $this->preAjaxReqest();
62
+ $update = $this->updateChecker->checkForUpdates();
63
+ if ( $update !== null ) {
64
+ echo "An update is available:";
65
+ echo '<pre>', htmlentities(print_r($update, true)), '</pre>';
66
+ } else {
67
+ echo 'No updates found.';
68
+ }
69
+ exit;
70
+ }
71
+
72
+ /**
73
+ * Check access permissions and enable error display (for debugging).
74
+ */
75
+ protected function preAjaxReqest() {
76
+ if ( !$this->updateChecker->userCanInstallUpdates() ) {
77
+ die('Access denied');
78
+ }
79
+ check_ajax_referer('puc-ajax');
80
+
81
+ error_reporting(E_ALL);
82
+ @ini_set('display_errors','On');
83
+ }
84
+
85
+ /**
86
+ * @param string $filePath
87
+ * @return string
88
+ */
89
+ private function getLibraryUrl($filePath) {
90
+ $absolutePath = realpath(dirname(__FILE__) . '/../../../' . ltrim($filePath, '/'));
91
+
92
+ //Where is the library located inside the WordPress directory structure?
93
+ $absolutePath = wp_normalize_path($absolutePath);
94
+
95
+ $pluginDir = wp_normalize_path(WP_PLUGIN_DIR);
96
+ $muPluginDir = wp_normalize_path(WPMU_PLUGIN_DIR);
97
+ $themeDir = wp_normalize_path(get_theme_root());
98
+
99
+ if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) {
100
+ //It's part of a plugin.
101
+ return plugins_url(basename($absolutePath), $absolutePath);
102
+ } else if ( strpos($absolutePath, $themeDir) === 0 ) {
103
+ //It's part of a theme.
104
+ $relativePath = substr($absolutePath, strlen($themeDir) + 1);
105
+ $template = substr($relativePath, 0, strpos($relativePath, '/'));
106
+ $baseUrl = get_theme_root_uri($template);
107
+
108
+ if ( !empty($baseUrl) && $relativePath ) {
109
+ return $baseUrl . '/' . $relativePath;
110
+ }
111
+ }
112
+
113
+ return '';
114
+ }
115
+ }
116
+
117
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/Panel.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_DebugBar_Panel', false) && class_exists('Debug_Bar_Panel', false) ):
4
+
5
+ class Puc_v4p1_DebugBar_Panel extends Debug_Bar_Panel {
6
+ /** @var Puc_v4p1_UpdateChecker */
7
+ protected $updateChecker;
8
+
9
+ private $responseBox = '<div class="puc-ajax-response" style="display: none;"></div>';
10
+
11
+ public function __construct($updateChecker) {
12
+ $this->updateChecker = $updateChecker;
13
+ $title = sprintf(
14
+ '<span class="puc-debug-menu-link-%s">PUC (%s)</span>',
15
+ esc_attr($this->updateChecker->getUniqueName('uid')),
16
+ $this->updateChecker->slug
17
+ );
18
+ parent::__construct($title);
19
+ }
20
+
21
+ public function render() {
22
+ printf(
23
+ '<div class="puc-debug-bar-panel-v4" id="%1$s" data-slug="%2$s" data-uid="%3$s" data-nonce="%4$s">',
24
+ esc_attr($this->updateChecker->getUniqueName('debug-bar-panel')),
25
+ esc_attr($this->updateChecker->slug),
26
+ esc_attr($this->updateChecker->getUniqueName('uid')),
27
+ esc_attr(wp_create_nonce('puc-ajax'))
28
+ );
29
+
30
+ $this->displayConfiguration();
31
+ $this->displayStatus();
32
+ $this->displayCurrentUpdate();
33
+
34
+ echo '</div>';
35
+ }
36
+
37
+ private function displayConfiguration() {
38
+ echo '<h3>Configuration</h3>';
39
+ echo '<table class="puc-debug-data">';
40
+ $this->displayConfigHeader();
41
+ $this->row('Slug', htmlentities($this->updateChecker->slug));
42
+ $this->row('DB option', htmlentities($this->updateChecker->optionName));
43
+
44
+ $requestInfoButton = $this->getMetadataButton();
45
+ $this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $this->responseBox);
46
+
47
+ $scheduler = $this->updateChecker->scheduler;
48
+ if ( $scheduler->checkPeriod > 0 ) {
49
+ $this->row('Automatic checks', 'Every ' . $scheduler->checkPeriod . ' hours');
50
+ } else {
51
+ $this->row('Automatic checks', 'Disabled');
52
+ }
53
+
54
+ if ( isset($scheduler->throttleRedundantChecks) ) {
55
+ if ( $scheduler->throttleRedundantChecks && ($scheduler->checkPeriod > 0) ) {
56
+ $this->row(
57
+ 'Throttling',
58
+ sprintf(
59
+ 'Enabled. If an update is already available, check for updates every %1$d hours instead of every %2$d hours.',
60
+ $scheduler->throttledCheckPeriod,
61
+ $scheduler->checkPeriod
62
+ )
63
+ );
64
+ } else {
65
+ $this->row('Throttling', 'Disabled');
66
+ }
67
+ }
68
+
69
+ $this->updateChecker->onDisplayConfiguration($this);
70
+
71
+ echo '</table>';
72
+ }
73
+
74
+ protected function displayConfigHeader() {
75
+ //Do nothing. This should be implemented in subclasses.
76
+ }
77
+
78
+ protected function getMetadataButton() {
79
+ return '';
80
+ }
81
+
82
+ private function displayStatus() {
83
+ echo '<h3>Status</h3>';
84
+ echo '<table class="puc-debug-data">';
85
+ $state = $this->updateChecker->getUpdateState();
86
+ $checkNowButton = '';
87
+ if ( function_exists('get_submit_button') ) {
88
+ $checkNowButton = get_submit_button(
89
+ 'Check Now',
90
+ 'secondary',
91
+ 'puc-check-now-button',
92
+ false,
93
+ array('id' => $this->updateChecker->getUniqueName('check-now-button'))
94
+ );
95
+ }
96
+
97
+ if ( $state->getLastCheck() > 0 ) {
98
+ $this->row('Last check', $this->formatTimeWithDelta($state->getLastCheck()) . ' ' . $checkNowButton . $this->responseBox);
99
+ } else {
100
+ $this->row('Last check', 'Never');
101
+ }
102
+
103
+ $nextCheck = wp_next_scheduled($this->updateChecker->scheduler->getCronHookName());
104
+ $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck));
105
+
106
+ if ( $state->getCheckedVersion() !== '' ) {
107
+ $this->row('Checked version', htmlentities($state->getCheckedVersion()));
108
+ $this->row('Cached update', $state->getUpdate());
109
+ }
110
+ $this->row('Update checker class', htmlentities(get_class($this->updateChecker)));
111
+ echo '</table>';
112
+ }
113
+
114
+ private function displayCurrentUpdate() {
115
+ $update = $this->updateChecker->getUpdate();
116
+ if ( $update !== null ) {
117
+ echo '<h3>An Update Is Available</h3>';
118
+ echo '<table class="puc-debug-data">';
119
+ $fields = $this->getUpdateFields();
120
+ foreach($fields as $field) {
121
+ if ( property_exists($update, $field) ) {
122
+ $this->row(ucwords(str_replace('_', ' ', $field)), htmlentities($update->$field));
123
+ }
124
+ }
125
+ echo '</table>';
126
+ } else {
127
+ echo '<h3>No updates currently available</h3>';
128
+ }
129
+ }
130
+
131
+ protected function getUpdateFields() {
132
+ return array('version', 'download_url', 'slug',);
133
+ }
134
+
135
+ private function formatTimeWithDelta($unixTime) {
136
+ if ( empty($unixTime) ) {
137
+ return 'Never';
138
+ }
139
+
140
+ $delta = time() - $unixTime;
141
+ $result = human_time_diff(time(), $unixTime);
142
+ if ( $delta < 0 ) {
143
+ $result = 'after ' . $result;
144
+ } else {
145
+ $result = $result . ' ago';
146
+ }
147
+ $result .= ' (' . $this->formatTimestamp($unixTime) . ')';
148
+ return $result;
149
+ }
150
+
151
+ private function formatTimestamp($unixTime) {
152
+ return gmdate('Y-m-d H:i:s', $unixTime + (get_option('gmt_offset') * 3600));
153
+ }
154
+
155
+ public function row($name, $value) {
156
+ if ( is_object($value) || is_array($value) ) {
157
+ $value = '<pre>' . htmlentities(print_r($value, true)) . '</pre>';
158
+ } else if ($value === null) {
159
+ $value = '<code>null</code>';
160
+ }
161
+ printf('<tr><th scope="row">%1$s</th> <td>%2$s</td></tr>', $name, $value);
162
+ }
163
+ }
164
+
165
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/PluginExtension.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_DebugBar_PluginExtension', false) ):
3
+
4
+ class Puc_v4p1_DebugBar_PluginExtension extends Puc_v4p1_DebugBar_Extension {
5
+ /** @var Puc_v4p1_Plugin_UpdateChecker */
6
+ protected $updateChecker;
7
+
8
+ public function __construct($updateChecker) {
9
+ parent::__construct($updateChecker, 'Puc_v4p1_DebugBar_PluginPanel');
10
+
11
+ add_action('wp_ajax_puc_v4_debug_request_info', array($this, 'ajaxRequestInfo'));
12
+ }
13
+
14
+ /**
15
+ * Request plugin info and output it.
16
+ */
17
+ public function ajaxRequestInfo() {
18
+ if ( $_POST['uid'] !== $this->updateChecker->getUniqueName('uid') ) {
19
+ return;
20
+ }
21
+ $this->preAjaxReqest();
22
+ $info = $this->updateChecker->requestInfo();
23
+ if ( $info !== null ) {
24
+ echo 'Successfully retrieved plugin info from the metadata URL:';
25
+ echo '<pre>', htmlentities(print_r($info, true)), '</pre>';
26
+ } else {
27
+ echo 'Failed to retrieve plugin info from the metadata URL.';
28
+ }
29
+ exit;
30
+ }
31
+ }
32
+
33
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/PluginPanel.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_DebugBar_PluginPanel', false) ):
4
+
5
+ class Puc_v4p1_DebugBar_PluginPanel extends Puc_v4p1_DebugBar_Panel {
6
+ /**
7
+ * @var Puc_v4p1_Plugin_UpdateChecker
8
+ */
9
+ protected $updateChecker;
10
+
11
+ protected function displayConfigHeader() {
12
+ $this->row('Plugin file', htmlentities($this->updateChecker->pluginFile));
13
+ parent::displayConfigHeader();
14
+ }
15
+
16
+ protected function getMetadataButton() {
17
+ $requestInfoButton = '';
18
+ if ( function_exists('get_submit_button') ) {
19
+ $requestInfoButton = get_submit_button(
20
+ 'Request Info',
21
+ 'secondary',
22
+ 'puc-request-info-button',
23
+ false,
24
+ array('id' => $this->updateChecker->getUniqueName('request-info-button'))
25
+ );
26
+ }
27
+ return $requestInfoButton;
28
+ }
29
+
30
+ protected function getUpdateFields() {
31
+ return array_merge(
32
+ parent::getUpdateFields(),
33
+ array('homepage', 'upgrade_notice', 'tested',)
34
+ );
35
+ }
36
+ }
37
+
38
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/DebugBar/ThemePanel.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_DebugBar_ThemePanel', false) ):
4
+
5
+ class Puc_v4p1_DebugBar_ThemePanel extends Puc_v4p1_DebugBar_Panel {
6
+ /**
7
+ * @var Puc_v4p1_Theme_UpdateChecker
8
+ */
9
+ protected $updateChecker;
10
+
11
+ protected function displayConfigHeader() {
12
+ $this->row('Theme directory', htmlentities($this->updateChecker->directoryName));
13
+ parent::displayConfigHeader();
14
+ }
15
+
16
+ protected function getUpdateFields() {
17
+ return array_merge(parent::getUpdateFields(), array('details_url'));
18
+ }
19
+ }
20
+
21
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Metadata.php ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Metadata', false) ):
3
+
4
+ /**
5
+ * A base container for holding information about updates and plugin metadata.
6
+ *
7
+ * @author Janis Elsts
8
+ * @copyright 2016
9
+ * @access public
10
+ */
11
+ abstract class Puc_v4p1_Metadata {
12
+
13
+ /**
14
+ * Create an instance of this class from a JSON document.
15
+ *
16
+ * @abstract
17
+ * @param string $json
18
+ * @return self
19
+ */
20
+ public static function fromJson(/** @noinspection PhpUnusedParameterInspection */ $json) {
21
+ throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses');
22
+ }
23
+
24
+ /**
25
+ * @param string $json
26
+ * @param self $target
27
+ * @return bool
28
+ */
29
+ protected static function createFromJson($json, $target) {
30
+ /** @var StdClass $apiResponse */
31
+ $apiResponse = json_decode($json);
32
+ if ( empty($apiResponse) || !is_object($apiResponse) ){
33
+ trigger_error(
34
+ "Failed to parse update metadata. Try validating your .json file with http://jsonlint.com/",
35
+ E_USER_NOTICE
36
+ );
37
+ return false;
38
+ }
39
+
40
+ $valid = $target->validateMetadata($apiResponse);
41
+ if ( is_wp_error($valid) ){
42
+ trigger_error($valid->get_error_message(), E_USER_NOTICE);
43
+ return false;
44
+ }
45
+
46
+ foreach(get_object_vars($apiResponse) as $key => $value){
47
+ $target->$key = $value;
48
+ }
49
+
50
+ return true;
51
+ }
52
+
53
+ /**
54
+ * No validation by default! Subclasses should check that the required fields are present.
55
+ *
56
+ * @param StdClass $apiResponse
57
+ * @return bool|WP_Error
58
+ */
59
+ protected function validateMetadata(/** @noinspection PhpUnusedParameterInspection */ $apiResponse) {
60
+ return true;
61
+ }
62
+
63
+ /**
64
+ * Create a new instance by copying the necessary fields from another object.
65
+ *
66
+ * @abstract
67
+ * @param StdClass|self $object The source object.
68
+ * @return self The new copy.
69
+ */
70
+ public static function fromObject(/** @noinspection PhpUnusedParameterInspection */ $object) {
71
+ throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses');
72
+ }
73
+
74
+ /**
75
+ * Create an instance of StdClass that can later be converted back to an
76
+ * update or info container. Useful for serialization and caching, as it
77
+ * avoids the "incomplete object" problem if the cached value is loaded
78
+ * before this class.
79
+ *
80
+ * @return StdClass
81
+ */
82
+ public function toStdClass() {
83
+ $object = new stdClass();
84
+ $this->copyFields($this, $object);
85
+ return $object;
86
+ }
87
+
88
+ /**
89
+ * Transform the metadata into the format used by WordPress core.
90
+ *
91
+ * @return object
92
+ */
93
+ abstract public function toWpFormat();
94
+
95
+ /**
96
+ * Copy known fields from one object to another.
97
+ *
98
+ * @param StdClass|self $from
99
+ * @param StdClass|self $to
100
+ */
101
+ protected function copyFields($from, $to) {
102
+ $fields = $this->getFieldNames();
103
+
104
+ if ( property_exists($from, 'slug') && !empty($from->slug) ) {
105
+ //Let plugins add extra fields without having to create subclasses.
106
+ $fields = apply_filters($this->getPrefixedFilter('retain_fields') . '-' . $from->slug, $fields);
107
+ }
108
+
109
+ foreach ($fields as $field) {
110
+ if ( property_exists($from, $field) ) {
111
+ $to->$field = $from->$field;
112
+ }
113
+ }
114
+ }
115
+
116
+ /**
117
+ * @return string[]
118
+ */
119
+ protected function getFieldNames() {
120
+ return array();
121
+ }
122
+
123
+ /**
124
+ * @param string $tag
125
+ * @return string
126
+ */
127
+ protected function getPrefixedFilter($tag) {
128
+ return 'puc_' . $tag;
129
+ }
130
+ }
131
+
132
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/OAuthSignature.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_OAuthSignature', false) ):
4
+
5
+ /**
6
+ * A basic signature generator for zero-legged OAuth 1.0.
7
+ */
8
+ class Puc_v4p1_OAuthSignature {
9
+ private $consumerKey = '';
10
+ private $consumerSecret = '';
11
+
12
+ public function __construct($consumerKey, $consumerSecret) {
13
+ $this->consumerKey = $consumerKey;
14
+ $this->consumerSecret = $consumerSecret;
15
+ }
16
+
17
+ /**
18
+ * Sign a URL using OAuth 1.0.
19
+ *
20
+ * @param string $url The URL to be signed. It may contain query parameters.
21
+ * @param string $method HTTP method such as "GET", "POST" and so on.
22
+ * @return string The signed URL.
23
+ */
24
+ public function sign($url, $method = 'GET') {
25
+ $parameters = array();
26
+
27
+ //Parse query parameters.
28
+ $query = @parse_url($url, PHP_URL_QUERY);
29
+ if ( !empty($query) ) {
30
+ parse_str($query, $parsedParams);
31
+ if ( is_array($parameters) ) {
32
+ $parameters = $parsedParams;
33
+ }
34
+ //Remove the query string from the URL. We'll replace it later.
35
+ $url = substr($url, 0, strpos($url, '?'));
36
+ }
37
+
38
+ $parameters = array_merge(
39
+ $parameters,
40
+ array(
41
+ 'oauth_consumer_key' => $this->consumerKey,
42
+ 'oauth_nonce' => $this->nonce(),
43
+ 'oauth_signature_method' => 'HMAC-SHA1',
44
+ 'oauth_timestamp' => time(),
45
+ 'oauth_version' => '1.0',
46
+ )
47
+ );
48
+ unset($parameters['oauth_signature']);
49
+
50
+ //Parameters must be sorted alphabetically before signing.
51
+ ksort($parameters);
52
+
53
+ //The most complicated part of the request - generating the signature.
54
+ //The string to sign contains the HTTP method, the URL path, and all of
55
+ //our query parameters. Everything is URL encoded. Then we concatenate
56
+ //them with ampersands into a single string to hash.
57
+ $encodedVerb = urlencode($method);
58
+ $encodedUrl = urlencode($url);
59
+ $encodedParams = urlencode(http_build_query($parameters, '', '&'));
60
+
61
+ $stringToSign = $encodedVerb . '&' . $encodedUrl . '&' . $encodedParams;
62
+
63
+ //Since we only have one OAuth token (the consumer secret) we only have
64
+ //to use it as our HMAC key. However, we still have to append an & to it
65
+ //as if we were using it with additional tokens.
66
+ $secret = urlencode($this->consumerSecret) . '&';
67
+
68
+ //The signature is a hash of the consumer key and the base string. Note
69
+ //that we have to get the raw output from hash_hmac and base64 encode
70
+ //the binary data result.
71
+ $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $stringToSign, $secret, true));
72
+
73
+ return ($url . '?' . http_build_query($parameters));
74
+ }
75
+
76
+ /**
77
+ * Generate a random nonce.
78
+ *
79
+ * @return string
80
+ */
81
+ private function nonce() {
82
+ $mt = microtime();
83
+ $rand = mt_rand();
84
+ return md5($mt . '_' . $rand);
85
+ }
86
+ }
87
+
88
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Plugin/Info.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Plugin_Info', false) ):
3
+
4
+ /**
5
+ * A container class for holding and transforming various plugin metadata.
6
+ *
7
+ * @author Janis Elsts
8
+ * @copyright 2016
9
+ * @access public
10
+ */
11
+ class Puc_v4p1_Plugin_Info extends Puc_v4p1_Metadata {
12
+ //Most fields map directly to the contents of the plugin's info.json file.
13
+ //See the relevant docs for a description of their meaning.
14
+ public $name;
15
+ public $slug;
16
+ public $version;
17
+ public $homepage;
18
+ public $sections = array();
19
+ public $banners;
20
+ public $translations = array();
21
+ public $download_url;
22
+
23
+ public $author;
24
+ public $author_homepage;
25
+
26
+ public $requires;
27
+ public $tested;
28
+ public $upgrade_notice;
29
+
30
+ public $rating;
31
+ public $num_ratings;
32
+ public $downloaded;
33
+ public $active_installs;
34
+ public $last_updated;
35
+
36
+ public $id = 0; //The native WP.org API returns numeric plugin IDs, but they're not used for anything.
37
+
38
+ public $filename; //Plugin filename relative to the plugins directory.
39
+
40
+ /**
41
+ * Create a new instance of Plugin Info from JSON-encoded plugin info
42
+ * returned by an external update API.
43
+ *
44
+ * @param string $json Valid JSON string representing plugin info.
45
+ * @return self|null New instance of Plugin Info, or NULL on error.
46
+ */
47
+ public static function fromJson($json){
48
+ $instance = new self();
49
+
50
+ if ( !parent::createFromJson($json, $instance) ) {
51
+ return null;
52
+ }
53
+
54
+ //json_decode decodes assoc. arrays as objects. We want it as an array.
55
+ $instance->sections = (array)$instance->sections;
56
+
57
+ return $instance;
58
+ }
59
+
60
+ /**
61
+ * Very, very basic validation.
62
+ *
63
+ * @param StdClass $apiResponse
64
+ * @return bool|WP_Error
65
+ */
66
+ protected function validateMetadata($apiResponse) {
67
+ if (
68
+ !isset($apiResponse->name, $apiResponse->version)
69
+ || empty($apiResponse->name)
70
+ || empty($apiResponse->version)
71
+ ) {
72
+ return new WP_Error(
73
+ 'puc-invalid-metadata',
74
+ "The plugin metadata file does not contain the required 'name' and/or 'version' keys."
75
+ );
76
+ }
77
+ return true;
78
+ }
79
+
80
+
81
+ /**
82
+ * Transform plugin info into the format used by the native WordPress.org API
83
+ *
84
+ * @return object
85
+ */
86
+ public function toWpFormat(){
87
+ $info = new stdClass;
88
+
89
+ //The custom update API is built so that many fields have the same name and format
90
+ //as those returned by the native WordPress.org API. These can be assigned directly.
91
+ $sameFormat = array(
92
+ 'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice',
93
+ 'num_ratings', 'downloaded', 'active_installs', 'homepage', 'last_updated',
94
+ );
95
+ foreach($sameFormat as $field){
96
+ if ( isset($this->$field) ) {
97
+ $info->$field = $this->$field;
98
+ } else {
99
+ $info->$field = null;
100
+ }
101
+ }
102
+
103
+ //Other fields need to be renamed and/or transformed.
104
+ $info->download_link = $this->download_url;
105
+ $info->author = $this->getFormattedAuthor();
106
+ $info->sections = array_merge(array('description' => ''), $this->sections);
107
+
108
+ if ( !empty($this->banners) ) {
109
+ //WP expects an array with two keys: "high" and "low". Both are optional.
110
+ //Docs: https://wordpress.org/plugins/about/faq/#banners
111
+ $info->banners = is_object($this->banners) ? get_object_vars($this->banners) : $this->banners;
112
+ $info->banners = array_intersect_key($info->banners, array('high' => true, 'low' => true));
113
+ }
114
+
115
+ return $info;
116
+ }
117
+
118
+ protected function getFormattedAuthor() {
119
+ if ( !empty($this->author_homepage) ){
120
+ /** @noinspection HtmlUnknownTarget */
121
+ return sprintf('<a href="%s">%s</a>', $this->author_homepage, $this->author);
122
+ }
123
+ return $this->author;
124
+ }
125
+ }
126
+
127
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Plugin/Update.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Plugin_Update', false) ):
3
+
4
+ /**
5
+ * A simple container class for holding information about an available update.
6
+ *
7
+ * @author Janis Elsts
8
+ * @copyright 2016
9
+ * @access public
10
+ */
11
+ class Puc_v4p1_Plugin_Update extends Puc_v4p1_Update {
12
+ public $id = 0;
13
+ public $homepage;
14
+ public $upgrade_notice;
15
+ public $tested;
16
+ public $filename; //Plugin filename relative to the plugins directory.
17
+
18
+ protected static $extraFields = array(
19
+ 'id', 'homepage', 'tested', 'upgrade_notice', 'filename',
20
+ );
21
+
22
+ /**
23
+ * Create a new instance of PluginUpdate from its JSON-encoded representation.
24
+ *
25
+ * @param string $json
26
+ * @return Puc_v4p1_Plugin_Update|null
27
+ */
28
+ public static function fromJson($json){
29
+ //Since update-related information is simply a subset of the full plugin info,
30
+ //we can parse the update JSON as if it was a plugin info string, then copy over
31
+ //the parts that we care about.
32
+ $pluginInfo = Puc_v4p1_Plugin_Info::fromJson($json);
33
+ if ( $pluginInfo != null ) {
34
+ return self::fromPluginInfo($pluginInfo);
35
+ } else {
36
+ return null;
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Create a new instance of PluginUpdate based on an instance of PluginInfo.
42
+ * Basically, this just copies a subset of fields from one object to another.
43
+ *
44
+ * @param Puc_v4p1_Plugin_Info $info
45
+ * @return Puc_v4p1_Plugin_Update
46
+ */
47
+ public static function fromPluginInfo($info){
48
+ return self::fromObject($info);
49
+ }
50
+
51
+ /**
52
+ * Create a new instance by copying the necessary fields from another object.
53
+ *
54
+ * @param StdClass|Puc_v4p1_Plugin_Info|Puc_v4p1_Plugin_Update $object The source object.
55
+ * @return Puc_v4p1_Plugin_Update The new copy.
56
+ */
57
+ public static function fromObject($object) {
58
+ $update = new self();
59
+ $update->copyFields($object, $update);
60
+ return $update;
61
+ }
62
+
63
+ /**
64
+ * @return string[]
65
+ */
66
+ protected function getFieldNames() {
67
+ return array_merge(parent::getFieldNames(), self::$extraFields);
68
+ }
69
+
70
+ /**
71
+ * Transform the update into the format used by WordPress native plugin API.
72
+ *
73
+ * @return object
74
+ */
75
+ public function toWpFormat(){
76
+ $update = parent::toWpFormat();
77
+
78
+ $update->id = $this->id;
79
+ $update->url = $this->homepage;
80
+ $update->tested = $this->tested;
81
+ $update->plugin = $this->filename;
82
+
83
+ if ( !empty($this->upgrade_notice) ){
84
+ $update->upgrade_notice = $this->upgrade_notice;
85
+ }
86
+
87
+ return $update;
88
+ }
89
+ }
90
+
91
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Plugin/UpdateChecker.php ADDED
@@ -0,0 +1,546 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Plugin_UpdateChecker', false) ):
3
+
4
+ /**
5
+ * A custom plugin update checker.
6
+ *
7
+ * @author Janis Elsts
8
+ * @copyright 2016
9
+ * @access public
10
+ */
11
+ class Puc_v4p1_Plugin_UpdateChecker extends Puc_v4p1_UpdateChecker {
12
+ protected $updateTransient = 'update_plugins';
13
+ protected $translationType = 'plugin';
14
+
15
+ public $pluginAbsolutePath = ''; //Full path of the main plugin file.
16
+ public $pluginFile = ''; //Plugin filename relative to the plugins directory. Many WP APIs use this to identify plugins.
17
+ public $muPluginFile = ''; //For MU plugins, the plugin filename relative to the mu-plugins directory.
18
+
19
+ private $cachedInstalledVersion = null;
20
+
21
+ /**
22
+ * Class constructor.
23
+ *
24
+ * @param string $metadataUrl The URL of the plugin's metadata file.
25
+ * @param string $pluginFile Fully qualified path to the main plugin file.
26
+ * @param string $slug The plugin's 'slug'. If not specified, the filename part of $pluginFile sans '.php' will be used as the slug.
27
+ * @param integer $checkPeriod How often to check for updates (in hours). Defaults to checking every 12 hours. Set to 0 to disable automatic update checks.
28
+ * @param string $optionName Where to store book-keeping info about update checks. Defaults to 'external_updates-$slug'.
29
+ * @param string $muPluginFile Optional. The plugin filename relative to the mu-plugins directory.
30
+ */
31
+ public function __construct($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = ''){
32
+ $this->pluginAbsolutePath = $pluginFile;
33
+ $this->pluginFile = plugin_basename($this->pluginAbsolutePath);
34
+ $this->muPluginFile = $muPluginFile;
35
+
36
+ //If no slug is specified, use the name of the main plugin file as the slug.
37
+ //For example, 'my-cool-plugin/cool-plugin.php' becomes 'cool-plugin'.
38
+ if ( empty($slug) ){
39
+ $slug = basename($this->pluginFile, '.php');
40
+ }
41
+
42
+ //Plugin slugs must be unique.
43
+ $slugCheckFilter = 'puc_is_slug_in_use-' . $this->slug;
44
+ $slugUsedBy = apply_filters($slugCheckFilter, false);
45
+ if ( $slugUsedBy ) {
46
+ $this->triggerError(sprintf(
47
+ 'Plugin slug "%s" is already in use by %s. Slugs must be unique.',
48
+ htmlentities($this->slug),
49
+ htmlentities($slugUsedBy)
50
+ ), E_USER_ERROR);
51
+ }
52
+ add_filter($slugCheckFilter, array($this, 'getAbsolutePath'));
53
+
54
+ //Backwards compatibility: If the plugin is a mu-plugin but no $muPluginFile is specified, assume
55
+ //it's the same as $pluginFile given that it's not in a subdirectory (WP only looks in the base dir).
56
+ if ( (strpbrk($this->pluginFile, '/\\') === false) && $this->isUnknownMuPlugin() ) {
57
+ $this->muPluginFile = $this->pluginFile;
58
+ }
59
+
60
+ parent::__construct($metadataUrl, dirname($this->pluginFile), $slug, $checkPeriod, $optionName);
61
+ }
62
+
63
+ /**
64
+ * Create an instance of the scheduler.
65
+ *
66
+ * @param int $checkPeriod
67
+ * @return Puc_v4p1_Scheduler
68
+ */
69
+ protected function createScheduler($checkPeriod) {
70
+ $scheduler = new Puc_v4p1_Scheduler($this, $checkPeriod, array('load-plugins.php'));
71
+ register_deactivation_hook($this->pluginFile, array($scheduler, 'removeUpdaterCron'));
72
+ return $scheduler;
73
+ }
74
+
75
+ /**
76
+ * Install the hooks required to run periodic update checks and inject update info
77
+ * into WP data structures.
78
+ *
79
+ * @return void
80
+ */
81
+ protected function installHooks(){
82
+ //Override requests for plugin information
83
+ add_filter('plugins_api', array($this, 'injectInfo'), 20, 3);
84
+
85
+ add_filter('plugin_row_meta', array($this, 'addCheckForUpdatesLink'), 10, 2);
86
+ add_action('admin_init', array($this, 'handleManualCheck'));
87
+ add_action('all_admin_notices', array($this, 'displayManualCheckResult'));
88
+
89
+ //Clear the version number cache when something - anything - is upgraded or WP clears the update cache.
90
+ add_filter('upgrader_post_install', array($this, 'clearCachedVersion'));
91
+ add_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion'));
92
+
93
+ parent::installHooks();
94
+ }
95
+
96
+ /**
97
+ * Retrieve plugin info from the configured API endpoint.
98
+ *
99
+ * @uses wp_remote_get()
100
+ *
101
+ * @param array $queryArgs Additional query arguments to append to the request. Optional.
102
+ * @return Puc_v4p1_Plugin_Info
103
+ */
104
+ public function requestInfo($queryArgs = array()) {
105
+ list($pluginInfo, $result) = $this->requestMetadata('Puc_v4p1_Plugin_Info', 'request_info', $queryArgs);
106
+
107
+ if ( $pluginInfo !== null ) {
108
+ /** @var Puc_v4p1_Plugin_Info $pluginInfo */
109
+ $pluginInfo->filename = $this->pluginFile;
110
+ $pluginInfo->slug = $this->slug;
111
+ }
112
+
113
+ $pluginInfo = apply_filters($this->getUniqueName('request_info_result'), $pluginInfo, $result);
114
+ return $pluginInfo;
115
+ }
116
+
117
+ /**
118
+ * Retrieve the latest update (if any) from the configured API endpoint.
119
+ *
120
+ * @uses PluginUpdateChecker::requestInfo()
121
+ *
122
+ * @return Puc_v4p1_Update|null An instance of Plugin_Update, or NULL when no updates are available.
123
+ */
124
+ public function requestUpdate() {
125
+ //For the sake of simplicity, this function just calls requestInfo()
126
+ //and transforms the result accordingly.
127
+ $pluginInfo = $this->requestInfo(array('checking_for_updates' => '1'));
128
+ if ( $pluginInfo == null ){
129
+ return null;
130
+ }
131
+ $update = Puc_v4p1_Plugin_Update::fromPluginInfo($pluginInfo);
132
+
133
+ $update = $this->filterUpdateResult($update);
134
+
135
+ return $update;
136
+ }
137
+
138
+ /**
139
+ * Get the currently installed version of the plugin.
140
+ *
141
+ * @return string Version number.
142
+ */
143
+ public function getInstalledVersion(){
144
+ if ( isset($this->cachedInstalledVersion) ) {
145
+ return $this->cachedInstalledVersion;
146
+ }
147
+
148
+ $pluginHeader = $this->getPluginHeader();
149
+ if ( isset($pluginHeader['Version']) ) {
150
+ $this->cachedInstalledVersion = $pluginHeader['Version'];
151
+ return $pluginHeader['Version'];
152
+ } else {
153
+ //This can happen if the filename points to something that is not a plugin.
154
+ $this->triggerError(
155
+ sprintf(
156
+ "Can't to read the Version header for '%s'. The filename is incorrect or is not a plugin.",
157
+ $this->pluginFile
158
+ ),
159
+ E_USER_WARNING
160
+ );
161
+ return null;
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Get plugin's metadata from its file header.
167
+ *
168
+ * @return array
169
+ */
170
+ protected function getPluginHeader() {
171
+ if ( !is_file($this->pluginAbsolutePath) ) {
172
+ //This can happen if the plugin filename is wrong.
173
+ $this->triggerError(
174
+ sprintf(
175
+ "Can't to read the plugin header for '%s'. The file does not exist.",
176
+ $this->pluginFile
177
+ ),
178
+ E_USER_WARNING
179
+ );
180
+ return array();
181
+ }
182
+
183
+ if ( !function_exists('get_plugin_data') ){
184
+ /** @noinspection PhpIncludeInspection */
185
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
186
+ }
187
+ return get_plugin_data($this->pluginAbsolutePath, false, false);
188
+ }
189
+
190
+ /**
191
+ * @return array
192
+ */
193
+ protected function getHeaderNames() {
194
+ return array(
195
+ 'Name' => 'Plugin Name',
196
+ 'PluginURI' => 'Plugin URI',
197
+ 'Version' => 'Version',
198
+ 'Description' => 'Description',
199
+ 'Author' => 'Author',
200
+ 'AuthorURI' => 'Author URI',
201
+ 'TextDomain' => 'Text Domain',
202
+ 'DomainPath' => 'Domain Path',
203
+ 'Network' => 'Network',
204
+
205
+ //The newest WordPress version that this plugin requires or has been tested with.
206
+ //We support several different formats for compatibility with other libraries.
207
+ 'Tested WP' => 'Tested WP',
208
+ 'Requires WP' => 'Requires WP',
209
+ 'Tested up to' => 'Tested up to',
210
+ 'Requires at least' => 'Requires at least',
211
+ );
212
+ }
213
+
214
+
215
+ /**
216
+ * Intercept plugins_api() calls that request information about our plugin and
217
+ * use the configured API endpoint to satisfy them.
218
+ *
219
+ * @see plugins_api()
220
+ *
221
+ * @param mixed $result
222
+ * @param string $action
223
+ * @param array|object $args
224
+ * @return mixed
225
+ */
226
+ public function injectInfo($result, $action = null, $args = null){
227
+ $relevant = ($action == 'plugin_information') && isset($args->slug) && (
228
+ ($args->slug == $this->slug) || ($args->slug == dirname($this->pluginFile))
229
+ );
230
+ if ( !$relevant ) {
231
+ return $result;
232
+ }
233
+
234
+ $pluginInfo = $this->requestInfo();
235
+ $pluginInfo = apply_filters($this->getUniqueName('pre_inject_info'), $pluginInfo);
236
+ if ( $pluginInfo ) {
237
+ return $pluginInfo->toWpFormat();
238
+ }
239
+
240
+ return $result;
241
+ }
242
+
243
+ protected function shouldShowUpdates() {
244
+ //No update notifications for mu-plugins unless explicitly enabled. The MU plugin file
245
+ //is usually different from the main plugin file so the update wouldn't show up properly anyway.
246
+ return !$this->isUnknownMuPlugin();
247
+ }
248
+
249
+ /**
250
+ * @param stdClass|null $updates
251
+ * @param stdClass $updateToAdd
252
+ * @return stdClass
253
+ */
254
+ protected function addUpdateToList($updates, $updateToAdd) {
255
+ if ( $this->isMuPlugin() ) {
256
+ //WP does not support automatic update installation for mu-plugins, but we can
257
+ //still display a notice.
258
+ $updateToAdd->package = null;
259
+ }
260
+ return parent::addUpdateToList($updates, $updateToAdd);
261
+ }
262
+
263
+ /**
264
+ * @param stdClass|null $updates
265
+ * @return stdClass|null
266
+ */
267
+ protected function removeUpdateFromList($updates) {
268
+ $updates = parent::removeUpdateFromList($updates);
269
+ if ( !empty($this->muPluginFile) && isset($updates, $updates->response) ) {
270
+ unset($updates->response[$this->muPluginFile]);
271
+ }
272
+ return $updates;
273
+ }
274
+
275
+ /**
276
+ * For plugins, the update array is indexed by the plugin filename relative to the "plugins"
277
+ * directory. Example: "plugin-name/plugin.php".
278
+ *
279
+ * @return string
280
+ */
281
+ protected function getUpdateListKey() {
282
+ if ( $this->isMuPlugin() ) {
283
+ return $this->muPluginFile;
284
+ }
285
+ return $this->pluginFile;
286
+ }
287
+
288
+ /**
289
+ * Alias for isBeingUpgraded().
290
+ *
291
+ * @deprecated
292
+ * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
293
+ * @return bool
294
+ */
295
+ public function isPluginBeingUpgraded($upgrader = null) {
296
+ return $this->isBeingUpgraded($upgrader);
297
+ }
298
+
299
+ /**
300
+ * Is there an update being installed for this plugin, right now?
301
+ *
302
+ * @param WP_Upgrader|null $upgrader
303
+ * @return bool
304
+ */
305
+ public function isBeingUpgraded($upgrader = null) {
306
+ return $this->upgraderStatus->isPluginBeingUpgraded($this->pluginFile, $upgrader);
307
+ }
308
+
309
+ /**
310
+ * Get the details of the currently available update, if any.
311
+ *
312
+ * If no updates are available, or if the last known update version is below or equal
313
+ * to the currently installed version, this method will return NULL.
314
+ *
315
+ * Uses cached update data. To retrieve update information straight from
316
+ * the metadata URL, call requestUpdate() instead.
317
+ *
318
+ * @return Puc_v4p1_Plugin_Update|null
319
+ */
320
+ public function getUpdate() {
321
+ $update = parent::getUpdate();
322
+ if ( isset($update) ) {
323
+ /** @var Puc_v4p1_Plugin_Update $update */
324
+ $update->filename = $this->pluginFile;
325
+ }
326
+ return $update;
327
+ }
328
+
329
+ /**
330
+ * Add a "Check for updates" link to the plugin row in the "Plugins" page. By default,
331
+ * the new link will appear after the "Visit plugin site" link.
332
+ *
333
+ * You can change the link text by using the "puc_manual_check_link-$slug" filter.
334
+ * Returning an empty string from the filter will disable the link.
335
+ *
336
+ * @param array $pluginMeta Array of meta links.
337
+ * @param string $pluginFile
338
+ * @return array
339
+ */
340
+ public function addCheckForUpdatesLink($pluginMeta, $pluginFile) {
341
+ $isRelevant = ($pluginFile == $this->pluginFile)
342
+ || (!empty($this->muPluginFile) && $pluginFile == $this->muPluginFile);
343
+
344
+ if ( $isRelevant && $this->userCanInstallUpdates() ) {
345
+ $linkUrl = wp_nonce_url(
346
+ add_query_arg(
347
+ array(
348
+ 'puc_check_for_updates' => 1,
349
+ 'puc_slug' => $this->slug,
350
+ ),
351
+ self_admin_url('plugins.php')
352
+ ),
353
+ 'puc_check_for_updates'
354
+ );
355
+
356
+ $linkText = apply_filters(
357
+ $this->getUniqueName('manual_check_link'),
358
+ __('Check for updates', 'plugin-update-checker')
359
+ );
360
+ if ( !empty($linkText) ) {
361
+ /** @noinspection HtmlUnknownTarget */
362
+ $pluginMeta[] = sprintf('<a href="%s">%s</a>', esc_attr($linkUrl), $linkText);
363
+ }
364
+ }
365
+ return $pluginMeta;
366
+ }
367
+
368
+ /**
369
+ * Check for updates when the user clicks the "Check for updates" link.
370
+ * @see self::addCheckForUpdatesLink()
371
+ *
372
+ * @return void
373
+ */
374
+ public function handleManualCheck() {
375
+ $shouldCheck =
376
+ isset($_GET['puc_check_for_updates'], $_GET['puc_slug'])
377
+ && $_GET['puc_slug'] == $this->slug
378
+ && $this->userCanInstallUpdates()
379
+ && check_admin_referer('puc_check_for_updates');
380
+
381
+ if ( $shouldCheck ) {
382
+ $update = $this->checkForUpdates();
383
+ $status = ($update === null) ? 'no_update' : 'update_available';
384
+ wp_redirect(add_query_arg(
385
+ array(
386
+ 'puc_update_check_result' => $status,
387
+ 'puc_slug' => $this->slug,
388
+ ),
389
+ self_admin_url('plugins.php')
390
+ ));
391
+ }
392
+ }
393
+
394
+ /**
395
+ * Display the results of a manual update check.
396
+ * @see self::handleManualCheck()
397
+ *
398
+ * You can change the result message by using the "puc_manual_check_message-$slug" filter.
399
+ */
400
+ public function displayManualCheckResult() {
401
+ if ( isset($_GET['puc_update_check_result'], $_GET['puc_slug']) && ($_GET['puc_slug'] == $this->slug) ) {
402
+ $status = strval($_GET['puc_update_check_result']);
403
+ $title = $this->getPluginTitle();
404
+ if ( $status == 'no_update' ) {
405
+ $message = sprintf(_x('The %s plugin is up to date.', 'the plugin title', 'plugin-update-checker'), $title);
406
+ } else if ( $status == 'update_available' ) {
407
+ $message = sprintf(_x('A new version of the %s plugin is available.', 'the plugin title', 'plugin-update-checker'), $title);
408
+ } else {
409
+ $message = sprintf(__('Unknown update checker status "%s"', 'plugin-update-checker'), htmlentities($status));
410
+ }
411
+ printf(
412
+ '<div class="updated notice is-dismissible"><p>%s</p></div>',
413
+ apply_filters($this->getUniqueName('manual_check_message'), $message, $status)
414
+ );
415
+ }
416
+ }
417
+
418
+ /**
419
+ * Get the translated plugin title.
420
+ *
421
+ * @return string
422
+ */
423
+ protected function getPluginTitle() {
424
+ $title = '';
425
+ $header = $this->getPluginHeader();
426
+ if ( $header && !empty($header['Name']) && isset($header['TextDomain']) ) {
427
+ $title = translate($header['Name'], $header['TextDomain']);
428
+ }
429
+ return $title;
430
+ }
431
+
432
+ /**
433
+ * Check if the current user has the required permissions to install updates.
434
+ *
435
+ * @return bool
436
+ */
437
+ public function userCanInstallUpdates() {
438
+ return current_user_can('update_plugins');
439
+ }
440
+
441
+ /**
442
+ * Check if the plugin file is inside the mu-plugins directory.
443
+ *
444
+ * @return bool
445
+ */
446
+ protected function isMuPlugin() {
447
+ static $cachedResult = null;
448
+
449
+ if ( $cachedResult === null ) {
450
+ //Convert both paths to the canonical form before comparison.
451
+ $muPluginDir = (string) realpath(WPMU_PLUGIN_DIR);
452
+ $pluginPath = (string) realpath($this->pluginAbsolutePath);
453
+
454
+ $cachedResult = (($pluginPath && $muPluginDir) && strpos($pluginPath, $muPluginDir) === 0);
455
+ }
456
+
457
+ return $cachedResult;
458
+ }
459
+
460
+ /**
461
+ * MU plugins are partially supported, but only when we know which file in mu-plugins
462
+ * corresponds to this plugin.
463
+ *
464
+ * @return bool
465
+ */
466
+ protected function isUnknownMuPlugin() {
467
+ return empty($this->muPluginFile) && $this->isMuPlugin();
468
+ }
469
+
470
+ /**
471
+ * Clear the cached plugin version. This method can be set up as a filter (hook) and will
472
+ * return the filter argument unmodified.
473
+ *
474
+ * @param mixed $filterArgument
475
+ * @return mixed
476
+ */
477
+ public function clearCachedVersion($filterArgument = null) {
478
+ $this->cachedInstalledVersion = null;
479
+ return $filterArgument;
480
+ }
481
+
482
+ /**
483
+ * Get absolute path to the main plugin file.
484
+ *
485
+ * @return string
486
+ */
487
+ public function getAbsolutePath() {
488
+ return $this->pluginAbsolutePath;
489
+ }
490
+
491
+ /**
492
+ * Register a callback for filtering query arguments.
493
+ *
494
+ * The callback function should take one argument - an associative array of query arguments.
495
+ * It should return a modified array of query arguments.
496
+ *
497
+ * @uses add_filter() This method is a convenience wrapper for add_filter().
498
+ *
499
+ * @param callable $callback
500
+ * @return void
501
+ */
502
+ public function addQueryArgFilter($callback){
503
+ $this->addFilter('request_info_query_args', $callback);
504
+ }
505
+
506
+ /**
507
+ * Register a callback for filtering arguments passed to wp_remote_get().
508
+ *
509
+ * The callback function should take one argument - an associative array of arguments -
510
+ * and return a modified array or arguments. See the WP documentation on wp_remote_get()
511
+ * for details on what arguments are available and how they work.
512
+ *
513
+ * @uses add_filter() This method is a convenience wrapper for add_filter().
514
+ *
515
+ * @param callable $callback
516
+ * @return void
517
+ */
518
+ public function addHttpRequestArgFilter($callback) {
519
+ $this->addFilter('request_info_options', $callback);
520
+ }
521
+
522
+ /**
523
+ * Register a callback for filtering the plugin info retrieved from the external API.
524
+ *
525
+ * The callback function should take two arguments. If the plugin info was retrieved
526
+ * successfully, the first argument passed will be an instance of PluginInfo. Otherwise,
527
+ * it will be NULL. The second argument will be the corresponding return value of
528
+ * wp_remote_get (see WP docs for details).
529
+ *
530
+ * The callback function should return a new or modified instance of PluginInfo or NULL.
531
+ *
532
+ * @uses add_filter() This method is a convenience wrapper for add_filter().
533
+ *
534
+ * @param callable $callback
535
+ * @return void
536
+ */
537
+ public function addResultFilter($callback) {
538
+ $this->addFilter('request_info_result', $callback, 10, 2);
539
+ }
540
+
541
+ protected function createDebugBarExtension() {
542
+ return new Puc_v4p1_DebugBar_PluginExtension($this);
543
+ }
544
+ }
545
+
546
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Scheduler.php ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Scheduler', false) ):
3
+
4
+ /**
5
+ * The scheduler decides when and how often to check for updates.
6
+ * It calls @see Puc_v4p1_UpdateChecker::checkForUpdates() to perform the actual checks.
7
+ */
8
+ class Puc_v4p1_Scheduler {
9
+ public $checkPeriod = 12; //How often to check for updates (in hours).
10
+ public $throttleRedundantChecks = false; //Check less often if we already know that an update is available.
11
+ public $throttledCheckPeriod = 72;
12
+
13
+ protected $hourlyCheckHooks = array('load-update.php');
14
+
15
+ /**
16
+ * @var Puc_v4p1_UpdateChecker
17
+ */
18
+ protected $updateChecker;
19
+
20
+ private $cronHook = null;
21
+
22
+ /**
23
+ * Scheduler constructor.
24
+ *
25
+ * @param Puc_v4p1_UpdateChecker $updateChecker
26
+ * @param int $checkPeriod How often to check for updates (in hours).
27
+ * @param array $hourlyHooks
28
+ */
29
+ public function __construct($updateChecker, $checkPeriod, $hourlyHooks = array('load-plugins.php')) {
30
+ $this->updateChecker = $updateChecker;
31
+ $this->checkPeriod = $checkPeriod;
32
+
33
+ //Set up the periodic update checks
34
+ $this->cronHook = $this->updateChecker->getUniqueName('cron_check_updates');
35
+ if ( $this->checkPeriod > 0 ){
36
+
37
+ //Trigger the check via Cron.
38
+ //Try to use one of the default schedules if possible as it's less likely to conflict
39
+ //with other plugins and their custom schedules.
40
+ $defaultSchedules = array(
41
+ 1 => 'hourly',
42
+ 12 => 'twicedaily',
43
+ 24 => 'daily',
44
+ );
45
+ if ( array_key_exists($this->checkPeriod, $defaultSchedules) ) {
46
+ $scheduleName = $defaultSchedules[$this->checkPeriod];
47
+ } else {
48
+ //Use a custom cron schedule.
49
+ $scheduleName = 'every' . $this->checkPeriod . 'hours';
50
+ add_filter('cron_schedules', array($this, '_addCustomSchedule'));
51
+ }
52
+
53
+ if ( !wp_next_scheduled($this->cronHook) && !defined('WP_INSTALLING') ) {
54
+ wp_schedule_event(time(), $scheduleName, $this->cronHook);
55
+ }
56
+ add_action($this->cronHook, array($this, 'maybeCheckForUpdates'));
57
+
58
+ //In case Cron is disabled or unreliable, we also manually trigger
59
+ //the periodic checks while the user is browsing the Dashboard.
60
+ add_action( 'admin_init', array($this, 'maybeCheckForUpdates') );
61
+
62
+ //Like WordPress itself, we check more often on certain pages.
63
+ /** @see wp_update_plugins */
64
+ add_action('load-update-core.php', array($this, 'maybeCheckForUpdates'));
65
+ //"load-update.php" and "load-plugins.php" or "load-themes.php".
66
+ $this->hourlyCheckHooks = array_merge($this->hourlyCheckHooks, $hourlyHooks);
67
+ foreach($this->hourlyCheckHooks as $hook) {
68
+ add_action($hook, array($this, 'maybeCheckForUpdates'));
69
+ }
70
+ //This hook fires after a bulk update is complete.
71
+ add_action('upgrader_process_complete', array($this, 'maybeCheckForUpdates'), 11, 0);
72
+
73
+ } else {
74
+ //Periodic checks are disabled.
75
+ wp_clear_scheduled_hook($this->cronHook);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Check for updates if the configured check interval has already elapsed.
81
+ * Will use a shorter check interval on certain admin pages like "Dashboard -> Updates" or when doing cron.
82
+ *
83
+ * You can override the default behaviour by using the "puc_check_now-$slug" filter.
84
+ * The filter callback will be passed three parameters:
85
+ * - Current decision. TRUE = check updates now, FALSE = don't check now.
86
+ * - Last check time as a Unix timestamp.
87
+ * - Configured check period in hours.
88
+ * Return TRUE to check for updates immediately, or FALSE to cancel.
89
+ *
90
+ * This method is declared public because it's a hook callback. Calling it directly is not recommended.
91
+ */
92
+ public function maybeCheckForUpdates(){
93
+ if ( empty($this->checkPeriod) ){
94
+ return;
95
+ }
96
+
97
+ $state = $this->updateChecker->getUpdateState();
98
+ $shouldCheck = ($state->timeSinceLastCheck() >= $this->getEffectiveCheckPeriod());
99
+
100
+ //Let plugin authors substitute their own algorithm.
101
+ $shouldCheck = apply_filters(
102
+ $this->updateChecker->getUniqueName('check_now'),
103
+ $shouldCheck,
104
+ $state->getLastCheck(),
105
+ $this->checkPeriod
106
+ );
107
+
108
+ if ( $shouldCheck ) {
109
+ $this->updateChecker->checkForUpdates();
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Calculate the actual check period based on the current status and environment.
115
+ *
116
+ * @return int Check period in seconds.
117
+ */
118
+ protected function getEffectiveCheckPeriod() {
119
+ $currentFilter = current_filter();
120
+ if ( in_array($currentFilter, array('load-update-core.php', 'upgrader_process_complete')) ) {
121
+ //Check more often when the user visits "Dashboard -> Updates" or does a bulk update.
122
+ $period = 60;
123
+ } else if ( in_array($currentFilter, $this->hourlyCheckHooks) ) {
124
+ //Also check more often on /wp-admin/update.php and the "Plugins" or "Themes" page.
125
+ $period = 3600;
126
+ } else if ( $this->throttleRedundantChecks && ($this->updateChecker->getUpdate() !== null) ) {
127
+ //Check less frequently if it's already known that an update is available.
128
+ $period = $this->throttledCheckPeriod * 3600;
129
+ } else if ( defined('DOING_CRON') && constant('DOING_CRON') ) {
130
+ //WordPress cron schedules are not exact, so lets do an update check even
131
+ //if slightly less than $checkPeriod hours have elapsed since the last check.
132
+ $cronFuzziness = 20 * 60;
133
+ $period = $this->checkPeriod * 3600 - $cronFuzziness;
134
+ } else {
135
+ $period = $this->checkPeriod * 3600;
136
+ }
137
+
138
+ return $period;
139
+ }
140
+
141
+ /**
142
+ * Add our custom schedule to the array of Cron schedules used by WP.
143
+ *
144
+ * @param array $schedules
145
+ * @return array
146
+ */
147
+ public function _addCustomSchedule($schedules){
148
+ if ( $this->checkPeriod && ($this->checkPeriod > 0) ){
149
+ $scheduleName = 'every' . $this->checkPeriod . 'hours';
150
+ $schedules[$scheduleName] = array(
151
+ 'interval' => $this->checkPeriod * 3600,
152
+ 'display' => sprintf('Every %d hours', $this->checkPeriod),
153
+ );
154
+ }
155
+ return $schedules;
156
+ }
157
+
158
+ /**
159
+ * Remove the scheduled cron event that the library uses to check for updates.
160
+ *
161
+ * @return void
162
+ */
163
+ public function removeUpdaterCron(){
164
+ wp_clear_scheduled_hook($this->cronHook);
165
+ }
166
+
167
+ /**
168
+ * Get the name of the update checker's WP-cron hook. Mostly useful for debugging.
169
+ *
170
+ * @return string
171
+ */
172
+ public function getCronHookName() {
173
+ return $this->cronHook;
174
+ }
175
+ }
176
+
177
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/StateStore.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_StateStore', false) ):
4
+
5
+ class Puc_v4p1_StateStore {
6
+ /**
7
+ * @var int Last update check timestamp.
8
+ */
9
+ protected $lastCheck = 0;
10
+
11
+ /**
12
+ * @var string Version number.
13
+ */
14
+ protected $checkedVersion = '';
15
+
16
+ /**
17
+ * @var Puc_v4p1_Update|null Cached update.
18
+ */
19
+ protected $update = null;
20
+
21
+ /**
22
+ * @var string Site option name.
23
+ */
24
+ private $optionName = '';
25
+
26
+ /**
27
+ * @var bool Whether we've already tried to load the state from the database.
28
+ */
29
+ private $isLoaded = false;
30
+
31
+ public function __construct($optionName) {
32
+ $this->optionName = $optionName;
33
+ }
34
+
35
+ /**
36
+ * Get time elapsed since the last update check.
37
+ *
38
+ * If there are no recorded update checks, this method returns a large arbitrary number
39
+ * (i.e. time since the Unix epoch).
40
+ *
41
+ * @return int Elapsed time in seconds.
42
+ */
43
+ public function timeSinceLastCheck() {
44
+ $this->lazyLoad();
45
+ return time() - $this->lastCheck;
46
+ }
47
+
48
+ /**
49
+ * @return int
50
+ */
51
+ public function getLastCheck() {
52
+ $this->lazyLoad();
53
+ return $this->lastCheck;
54
+ }
55
+
56
+ /**
57
+ * Set the time of the last update check to the current timestamp.
58
+ *
59
+ * @return $this
60
+ */
61
+ public function setLastCheckToNow() {
62
+ $this->lazyLoad();
63
+ $this->lastCheck = time();
64
+ return $this;
65
+ }
66
+
67
+ /**
68
+ * @return null|Puc_v4p1_Update
69
+ */
70
+ public function getUpdate() {
71
+ $this->lazyLoad();
72
+ return $this->update;
73
+ }
74
+
75
+ /**
76
+ * @param Puc_v4p1_Update|null $update
77
+ * @return $this
78
+ */
79
+ public function setUpdate(Puc_v4p1_Update $update = null) {
80
+ $this->lazyLoad();
81
+ $this->update = $update;
82
+ return $this;
83
+ }
84
+
85
+ /**
86
+ * @return string
87
+ */
88
+ public function getCheckedVersion() {
89
+ $this->lazyLoad();
90
+ return $this->checkedVersion;
91
+ }
92
+
93
+ /**
94
+ * @param string $version
95
+ * @return $this
96
+ */
97
+ public function setCheckedVersion($version) {
98
+ $this->lazyLoad();
99
+ $this->checkedVersion = strval($version);
100
+ return $this;
101
+ }
102
+
103
+ /**
104
+ * Get translation updates.
105
+ *
106
+ * @return array
107
+ */
108
+ public function getTranslations() {
109
+ $this->lazyLoad();
110
+ if ( isset($this->update, $this->update->translations) ) {
111
+ return $this->update->translations;
112
+ }
113
+ return array();
114
+ }
115
+
116
+ /**
117
+ * Set translation updates.
118
+ *
119
+ * @param array $translationUpdates
120
+ */
121
+ public function setTranslations($translationUpdates) {
122
+ $this->lazyLoad();
123
+ if ( isset($this->update) ) {
124
+ $this->update->translations = $translationUpdates;
125
+ $this->save();
126
+ }
127
+ }
128
+
129
+ public function save() {
130
+ $state = new stdClass();
131
+
132
+ $state->lastCheck = $this->lastCheck;
133
+ $state->checkedVersion = $this->checkedVersion;
134
+
135
+ if ( isset($this->update)) {
136
+ $state->update = $this->update->toStdClass();
137
+
138
+ $updateClass = get_class($this->update);
139
+ $state->updateClass = $updateClass;
140
+ $prefix = $this->getLibPrefix();
141
+ if ( Puc_v4p1_Utils::startsWith($updateClass, $prefix) ) {
142
+ $state->updateBaseClass = substr($updateClass, strlen($prefix));
143
+ }
144
+ }
145
+
146
+ update_site_option($this->optionName, $state);
147
+ $this->isLoaded = true;
148
+ }
149
+
150
+ /**
151
+ * @return $this
152
+ */
153
+ public function lazyLoad() {
154
+ if ( !$this->isLoaded ) {
155
+ $this->load();
156
+ }
157
+ return $this;
158
+ }
159
+
160
+ protected function load() {
161
+ $this->isLoaded = true;
162
+
163
+ $state = get_site_option($this->optionName, null);
164
+
165
+ if ( !is_object($state) ) {
166
+ $this->lastCheck = 0;
167
+ $this->checkedVersion = '';
168
+ $this->update = null;
169
+ return;
170
+ }
171
+
172
+ $this->lastCheck = intval(Puc_v4p1_Utils::get($state, 'lastCheck', 0));
173
+ $this->checkedVersion = Puc_v4p1_Utils::get($state, 'checkedVersion', '');
174
+ $this->update = null;
175
+
176
+ if ( isset($state->update) ) {
177
+ //This mess is due to the fact that the want the update class from this version
178
+ //of the library, not the version that saved the update.
179
+
180
+ $updateClass = null;
181
+ if ( isset($state->updateBaseClass) ) {
182
+ $updateClass = $this->getLibPrefix() . $state->updateBaseClass;
183
+ } else if ( isset($state->updateClass) && class_exists($state->updateClass) ) {
184
+ $updateClass = $state->updateClass;
185
+ }
186
+
187
+ if ( $updateClass !== null ) {
188
+ $this->update = call_user_func(array($updateClass, 'fromObject'), $state->update);
189
+ }
190
+ }
191
+ }
192
+
193
+ public function delete() {
194
+ delete_site_option($this->optionName);
195
+
196
+ $this->lastCheck = 0;
197
+ $this->checkedVersion = '';
198
+ $this->update = null;
199
+ }
200
+
201
+ private function getLibPrefix() {
202
+ $parts = explode('_', __CLASS__, 3);
203
+ return $parts[0] . '_' . $parts[1] . '_';
204
+ }
205
+ }
206
+
207
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Theme/Update.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_Theme_Update', false) ):
4
+
5
+ class Puc_v4p1_Theme_Update extends Puc_v4p1_Update {
6
+ public $details_url = '';
7
+
8
+ protected static $extraFields = array('details_url');
9
+
10
+ /**
11
+ * Transform the metadata into the format used by WordPress core.
12
+ * Note the inconsistency: WP stores plugin updates as objects and theme updates as arrays.
13
+ *
14
+ * @return array
15
+ */
16
+ public function toWpFormat() {
17
+ $update = array(
18
+ 'theme' => $this->slug,
19
+ 'new_version' => $this->version,
20
+ 'url' => $this->details_url,
21
+ );
22
+
23
+ if ( !empty($this->download_url) ) {
24
+ $update['package'] = $this->download_url;
25
+ }
26
+
27
+ return $update;
28
+ }
29
+
30
+ /**
31
+ * Create a new instance of Theme_Update from its JSON-encoded representation.
32
+ *
33
+ * @param string $json Valid JSON string representing a theme information object.
34
+ * @return self New instance of ThemeUpdate, or NULL on error.
35
+ */
36
+ public static function fromJson($json) {
37
+ $instance = new self();
38
+ if ( !parent::createFromJson($json, $instance) ) {
39
+ return null;
40
+ }
41
+ return $instance;
42
+ }
43
+
44
+ /**
45
+ * Create a new instance by copying the necessary fields from another object.
46
+ *
47
+ * @param StdClass|Puc_v4p1_Theme_Update $object The source object.
48
+ * @return Puc_v4p1_Theme_Update The new copy.
49
+ */
50
+ public static function fromObject($object) {
51
+ $update = new self();
52
+ $update->copyFields($object, $update);
53
+ return $update;
54
+ }
55
+
56
+ /**
57
+ * Basic validation.
58
+ *
59
+ * @param StdClass $apiResponse
60
+ * @return bool|WP_Error
61
+ */
62
+ protected function validateMetadata($apiResponse) {
63
+ $required = array('version', 'details_url');
64
+ foreach($required as $key) {
65
+ if ( !isset($apiResponse->$key) || empty($apiResponse->$key) ) {
66
+ return new WP_Error(
67
+ 'tuc-invalid-metadata',
68
+ sprintf('The theme metadata is missing the required "%s" key.', $key)
69
+ );
70
+ }
71
+ }
72
+ return true;
73
+ }
74
+
75
+ protected function getFieldNames() {
76
+ return array_merge(parent::getFieldNames(), self::$extraFields);
77
+ }
78
+
79
+ protected function getPrefixedFilter($tag) {
80
+ return parent::getPrefixedFilter($tag) . '_theme';
81
+ }
82
+ }
83
+
84
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Theme/UpdateChecker.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_Theme_UpdateChecker', false) ):
4
+
5
+ class Puc_v4p1_Theme_UpdateChecker extends Puc_v4p1_UpdateChecker {
6
+ protected $filterSuffix = 'theme';
7
+ protected $updateTransient = 'update_themes';
8
+ protected $translationType = 'theme';
9
+
10
+ /**
11
+ * @var string Theme directory name.
12
+ */
13
+ protected $stylesheet;
14
+
15
+ /**
16
+ * @var WP_Theme Theme object.
17
+ */
18
+ protected $theme;
19
+
20
+ public function __construct($metadataUrl, $stylesheet = null, $customSlug = null, $checkPeriod = 12, $optionName = '') {
21
+ if ( $stylesheet === null ) {
22
+ $stylesheet = get_stylesheet();
23
+ }
24
+ $this->stylesheet = $stylesheet;
25
+ $this->theme = wp_get_theme($this->stylesheet);
26
+
27
+ parent::__construct(
28
+ $metadataUrl,
29
+ $stylesheet,
30
+ $customSlug ? $customSlug : $stylesheet,
31
+ $checkPeriod,
32
+ $optionName
33
+ );
34
+ }
35
+
36
+ /**
37
+ * For themes, the update array is indexed by theme directory name.
38
+ *
39
+ * @return string
40
+ */
41
+ protected function getUpdateListKey() {
42
+ return $this->directoryName;
43
+ }
44
+
45
+ /**
46
+ * Retrieve the latest update (if any) from the configured API endpoint.
47
+ *
48
+ * @return Puc_v4p1_Update|null An instance of Update, or NULL when no updates are available.
49
+ */
50
+ public function requestUpdate() {
51
+ list($themeUpdate, $result) = $this->requestMetadata('Puc_v4p1_Theme_Update', 'request_update');
52
+
53
+ if ( $themeUpdate !== null ) {
54
+ /** @var Puc_v4p1_Theme_Update $themeUpdate */
55
+ $themeUpdate->slug = $this->slug;
56
+ }
57
+
58
+ $themeUpdate = $this->filterUpdateResult($themeUpdate, $result);
59
+ return $themeUpdate;
60
+ }
61
+
62
+ public function userCanInstallUpdates() {
63
+ return current_user_can('update_themes');
64
+ }
65
+
66
+ /**
67
+ * Get the currently installed version of the plugin or theme.
68
+ *
69
+ * @return string Version number.
70
+ */
71
+ public function getInstalledVersion() {
72
+ return $this->theme->get('Version');
73
+ }
74
+
75
+ /**
76
+ * Create an instance of the scheduler.
77
+ *
78
+ * @param int $checkPeriod
79
+ * @return Puc_v4p1_Scheduler
80
+ */
81
+ protected function createScheduler($checkPeriod) {
82
+ return new Puc_v4p1_Scheduler($this, $checkPeriod, array('load-themes.php'));
83
+ }
84
+
85
+ /**
86
+ * Is there an update being installed right now for this theme?
87
+ *
88
+ * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
89
+ * @return bool
90
+ */
91
+ public function isBeingUpgraded($upgrader = null) {
92
+ return $this->upgraderStatus->isThemeBeingUpgraded($this->stylesheet, $upgrader);
93
+ }
94
+
95
+ protected function createDebugBarExtension() {
96
+ return new Puc_v4p1_DebugBar_Extension($this, 'Puc_v4p1_DebugBar_ThemePanel');
97
+ }
98
+
99
+ /**
100
+ * Register a callback for filtering query arguments.
101
+ *
102
+ * The callback function should take one argument - an associative array of query arguments.
103
+ * It should return a modified array of query arguments.
104
+ *
105
+ * @param callable $callback
106
+ * @return void
107
+ */
108
+ public function addQueryArgFilter($callback){
109
+ $this->addFilter('request_update_query_args', $callback);
110
+ }
111
+
112
+ /**
113
+ * Register a callback for filtering arguments passed to wp_remote_get().
114
+ *
115
+ * The callback function should take one argument - an associative array of arguments -
116
+ * and return a modified array or arguments. See the WP documentation on wp_remote_get()
117
+ * for details on what arguments are available and how they work.
118
+ *
119
+ * @uses add_filter() This method is a convenience wrapper for add_filter().
120
+ *
121
+ * @param callable $callback
122
+ * @return void
123
+ */
124
+ public function addHttpRequestArgFilter($callback) {
125
+ $this->addFilter('request_update_options', $callback);
126
+ }
127
+
128
+ /**
129
+ * Register a callback for filtering theme updates retrieved from the external API.
130
+ *
131
+ * The callback function should take two arguments. If the theme update was retrieved
132
+ * successfully, the first argument passed will be an instance of Theme_Update. Otherwise,
133
+ * it will be NULL. The second argument will be the corresponding return value of
134
+ * wp_remote_get (see WP docs for details).
135
+ *
136
+ * The callback function should return a new or modified instance of Theme_Update or NULL.
137
+ *
138
+ * @uses add_filter() This method is a convenience wrapper for add_filter().
139
+ *
140
+ * @param callable $callback
141
+ * @return void
142
+ */
143
+ public function addResultFilter($callback) {
144
+ $this->addFilter('request_update_result', $callback, 10, 2);
145
+ }
146
+
147
+ /**
148
+ * @return array
149
+ */
150
+ protected function getHeaderNames() {
151
+ return array(
152
+ 'Name' => 'Theme Name',
153
+ 'ThemeURI' => 'Theme URI',
154
+ 'Description' => 'Description',
155
+ 'Author' => 'Author',
156
+ 'AuthorURI' => 'Author URI',
157
+ 'Version' => 'Version',
158
+ 'Template' => 'Template',
159
+ 'Status' => 'Status',
160
+ 'Tags' => 'Tags',
161
+ 'TextDomain' => 'Text Domain',
162
+ 'DomainPath' => 'Domain Path',
163
+ );
164
+ }
165
+ }
166
+
167
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Update.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Update', false) ):
3
+
4
+ /**
5
+ * A simple container class for holding information about an available update.
6
+ *
7
+ * @author Janis Elsts
8
+ * @access public
9
+ */
10
+ abstract class Puc_v4p1_Update extends Puc_v4p1_Metadata {
11
+ public $slug;
12
+ public $version;
13
+ public $download_url;
14
+ public $translations = array();
15
+
16
+ /**
17
+ * @return string[]
18
+ */
19
+ protected function getFieldNames() {
20
+ return array('slug', 'version', 'download_url', 'translations');
21
+ }
22
+
23
+ public function toWpFormat() {
24
+ $update = new stdClass();
25
+
26
+ $update->slug = $this->slug;
27
+ $update->new_version = $this->version;
28
+ $update->package = $this->download_url;
29
+
30
+ return $update;
31
+ }
32
+ }
33
+
34
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/UpdateChecker.php ADDED
@@ -0,0 +1,825 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_UpdateChecker', false) ):
4
+
5
+ abstract class Puc_v4p1_UpdateChecker {
6
+ protected $filterSuffix = '';
7
+ protected $updateTransient = '';
8
+ protected $translationType = ''; //"plugin" or "theme".
9
+
10
+ /**
11
+ * Set to TRUE to enable error reporting. Errors are raised using trigger_error()
12
+ * and should be logged to the standard PHP error log.
13
+ * @var bool
14
+ */
15
+ public $debugMode = false;
16
+
17
+ /**
18
+ * @var string Where to store the update info.
19
+ */
20
+ public $optionName = '';
21
+
22
+ /**
23
+ * @var string The URL of the metadata file.
24
+ */
25
+ public $metadataUrl = '';
26
+
27
+ /**
28
+ * @var string Plugin or theme directory name.
29
+ */
30
+ public $directoryName = '';
31
+
32
+ /**
33
+ * @var string The slug that will be used in update checker hooks and remote API requests.
34
+ * Usually matches the directory name unless the plugin/theme directory has been renamed.
35
+ */
36
+ public $slug = '';
37
+
38
+ /**
39
+ * @var Puc_v4p1_Scheduler
40
+ */
41
+ public $scheduler;
42
+
43
+ /**
44
+ * @var Puc_v4p1_UpgraderStatus
45
+ */
46
+ protected $upgraderStatus;
47
+
48
+ /**
49
+ * @var Puc_v4p1_StateStore
50
+ */
51
+ protected $updateState;
52
+
53
+ public function __construct($metadataUrl, $directoryName, $slug = null, $checkPeriod = 12, $optionName = '') {
54
+ $this->debugMode = (bool)(constant('WP_DEBUG'));
55
+ $this->metadataUrl = $metadataUrl;
56
+ $this->directoryName = $directoryName;
57
+ $this->slug = !empty($slug) ? $slug : $this->directoryName;
58
+
59
+ $this->optionName = $optionName;
60
+ if ( empty($this->optionName) ) {
61
+ //BC: Initially the library only supported plugin updates and didn't use type prefixes
62
+ //in the option name. Lets use the same prefix-less name when possible.
63
+ if ( $this->filterSuffix === '' ) {
64
+ $this->optionName = 'external_updates-' . $this->slug;
65
+ } else {
66
+ $this->optionName = $this->getUniqueName('external_updates');
67
+ }
68
+ }
69
+
70
+ $this->scheduler = $this->createScheduler($checkPeriod);
71
+ $this->upgraderStatus = new Puc_v4p1_UpgraderStatus();
72
+ $this->updateState = new Puc_v4p1_StateStore($this->optionName);
73
+
74
+ if ( did_action('init') ) {
75
+ $this->loadTextDomain();
76
+ } else {
77
+ add_action('init', array($this, 'loadTextDomain'));
78
+ }
79
+
80
+ $this->installHooks();
81
+ }
82
+
83
+ /**
84
+ * @internal
85
+ */
86
+ public function loadTextDomain() {
87
+ //We're not using load_plugin_textdomain() or its siblings because figuring out where
88
+ //the library is located (plugin, mu-plugin, theme, custom wp-content paths) is messy.
89
+ $domain = 'plugin-update-checker';
90
+ $locale = apply_filters(
91
+ 'plugin_locale',
92
+ (is_admin() && function_exists('get_user_locale')) ? get_user_locale() : get_locale(),
93
+ $domain
94
+ );
95
+
96
+ $moFile = $domain . '-' . $locale . '.mo';
97
+ $path = realpath(dirname(__FILE__) . '/../../languages');
98
+
99
+ if ($path && file_exists($path)) {
100
+ load_textdomain($domain, $path . '/' . $moFile);
101
+ }
102
+ }
103
+
104
+ protected function installHooks() {
105
+ //Insert our update info into the update array maintained by WP.
106
+ add_filter('site_transient_' . $this->updateTransient, array($this,'injectUpdate'));
107
+
108
+ //Insert translation updates into the update list.
109
+ add_filter('site_transient_' . $this->updateTransient, array($this, 'injectTranslationUpdates'));
110
+
111
+ //Clear translation updates when WP clears the update cache.
112
+ //This needs to be done directly because the library doesn't actually remove obsolete plugin updates,
113
+ //it just hides them (see getUpdate()). We can't do that with translations - too much disk I/O.
114
+ add_action(
115
+ 'delete_site_transient_' . $this->updateTransient,
116
+ array($this, 'clearCachedTranslationUpdates')
117
+ );
118
+
119
+ //Rename the update directory to be the same as the existing directory.
120
+ if ( $this->directoryName !== '.' ) {
121
+ add_filter('upgrader_source_selection', array($this, 'fixDirectoryName'), 10, 3);
122
+ }
123
+
124
+ //Allow HTTP requests to the metadata URL even if it's on a local host.
125
+ add_filter('http_request_host_is_external', array($this, 'allowMetadataHost'), 10, 2);
126
+
127
+ //DebugBar integration.
128
+ if ( did_action('plugins_loaded') ) {
129
+ $this->maybeInitDebugBar();
130
+ } else {
131
+ add_action('plugins_loaded', array($this, 'maybeInitDebugBar'));
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Check if the current user has the required permissions to install updates.
137
+ *
138
+ * @return bool
139
+ */
140
+ abstract public function userCanInstallUpdates();
141
+
142
+ /**
143
+ * Explicitly allow HTTP requests to the metadata URL.
144
+ *
145
+ * WordPress has a security feature where the HTTP API will reject all requests that are sent to
146
+ * another site hosted on the same server as the current site (IP match), a local host, or a local
147
+ * IP, unless the host exactly matches the current site.
148
+ *
149
+ * This feature is opt-in (at least in WP 4.4). Apparently some people enable it.
150
+ *
151
+ * That can be a problem when you're developing your plugin and you decide to host the update information
152
+ * on the same server as your test site. Update requests will mysteriously fail.
153
+ *
154
+ * We fix that by adding an exception for the metadata host.
155
+ *
156
+ * @param bool $allow
157
+ * @param string $host
158
+ * @return bool
159
+ */
160
+ public function allowMetadataHost($allow, $host) {
161
+ static $metadataHost = 0; //Using 0 instead of NULL because parse_url can return NULL.
162
+ if ( $metadataHost === 0 ) {
163
+ $metadataHost = @parse_url($this->metadataUrl, PHP_URL_HOST);
164
+ }
165
+
166
+ if ( is_string($metadataHost) && (strtolower($host) === strtolower($metadataHost)) ) {
167
+ return true;
168
+ }
169
+ return $allow;
170
+ }
171
+
172
+ /**
173
+ * Create an instance of the scheduler.
174
+ *
175
+ * This is implemented as a method to make it possible for plugins to subclass the update checker
176
+ * and substitute their own scheduler.
177
+ *
178
+ * @param int $checkPeriod
179
+ * @return Puc_v4p1_Scheduler
180
+ */
181
+ abstract protected function createScheduler($checkPeriod);
182
+
183
+ /**
184
+ * Check for updates. The results are stored in the DB option specified in $optionName.
185
+ *
186
+ * @return Puc_v4p1_Update|null
187
+ */
188
+ public function checkForUpdates() {
189
+ $installedVersion = $this->getInstalledVersion();
190
+ //Fail silently if we can't find the plugin/theme or read its header.
191
+ if ( $installedVersion === null ) {
192
+ $this->triggerError(
193
+ sprintf('Skipping update check for %s - installed version unknown.', $this->slug),
194
+ E_USER_WARNING
195
+ );
196
+ return null;
197
+ }
198
+
199
+ $state = $this->updateState;
200
+ $state->setLastCheckToNow()
201
+ ->setCheckedVersion($installedVersion)
202
+ ->save(); //Save before checking in case something goes wrong
203
+
204
+ $state->setUpdate($this->requestUpdate());
205
+ $state->save();
206
+
207
+ return $this->getUpdate();
208
+ }
209
+
210
+ /**
211
+ * Load the update checker state from the DB.
212
+ *
213
+ * @return Puc_v4p1_StateStore
214
+ */
215
+ public function getUpdateState() {
216
+ return $this->updateState->lazyLoad();
217
+ }
218
+
219
+ /**
220
+ * Reset update checker state - i.e. last check time, cached update data and so on.
221
+ *
222
+ * Call this when your plugin is being uninstalled, or if you want to
223
+ * clear the update cache.
224
+ */
225
+ public function resetUpdateState() {
226
+ $this->updateState->delete();
227
+ }
228
+
229
+ /**
230
+ * Get the details of the currently available update, if any.
231
+ *
232
+ * If no updates are available, or if the last known update version is below or equal
233
+ * to the currently installed version, this method will return NULL.
234
+ *
235
+ * Uses cached update data. To retrieve update information straight from
236
+ * the metadata URL, call requestUpdate() instead.
237
+ *
238
+ * @return Puc_v4p1_Update|null
239
+ */
240
+ public function getUpdate() {
241
+ $update = $this->updateState->getUpdate();
242
+
243
+ //Is there an update available?
244
+ if ( isset($update) ) {
245
+ //Check if the update is actually newer than the currently installed version.
246
+ $installedVersion = $this->getInstalledVersion();
247
+ if ( ($installedVersion !== null) && version_compare($update->version, $installedVersion, '>') ){
248
+ return $update;
249
+ }
250
+ }
251
+ return null;
252
+ }
253
+
254
+ /**
255
+ * Retrieve the latest update (if any) from the configured API endpoint.
256
+ *
257
+ * Subclasses should run the update through filterUpdateResult before returning it.
258
+ *
259
+ * @return Puc_v4p1_Update An instance of Update, or NULL when no updates are available.
260
+ */
261
+ abstract public function requestUpdate();
262
+
263
+ /**
264
+ * Filter the result of a requestUpdate() call.
265
+ *
266
+ * @param Puc_v4p1_Update|null $update
267
+ * @param array|WP_Error|null $httpResult The value returned by wp_remote_get(), if any.
268
+ * @return Puc_v4p1_Update
269
+ */
270
+ protected function filterUpdateResult($update, $httpResult = null) {
271
+ //Let plugins/themes modify the update.
272
+ $update = apply_filters($this->getUniqueName('request_update_result'), $update, $httpResult);
273
+
274
+ if ( isset($update, $update->translations) ) {
275
+ //Keep only those translation updates that apply to this site.
276
+ $update->translations = $this->filterApplicableTranslations($update->translations);
277
+ }
278
+
279
+ return $update;
280
+ }
281
+
282
+ /**
283
+ * Get the currently installed version of the plugin or theme.
284
+ *
285
+ * @return string|null Version number.
286
+ */
287
+ abstract public function getInstalledVersion();
288
+
289
+ /**
290
+ * Trigger a PHP error, but only when $debugMode is enabled.
291
+ *
292
+ * @param string $message
293
+ * @param int $errorType
294
+ */
295
+ protected function triggerError($message, $errorType) {
296
+ if ($this->debugMode) {
297
+ trigger_error($message, $errorType);
298
+ }
299
+ }
300
+
301
+ /**
302
+ * Get the full name of an update checker filter, action or DB entry.
303
+ *
304
+ * This method adds the "puc_" prefix and the "-$slug" suffix to the filter name.
305
+ * For example, "pre_inject_update" becomes "puc_pre_inject_update-plugin-slug".
306
+ *
307
+ * @param string $baseTag
308
+ * @return string
309
+ */
310
+ public function getUniqueName($baseTag) {
311
+ $name = 'puc_' . $baseTag;
312
+ if ($this->filterSuffix !== '') {
313
+ $name .= '_' . $this->filterSuffix;
314
+ }
315
+ return $name . '-' . $this->slug;
316
+ }
317
+
318
+ /* -------------------------------------------------------------------
319
+ * PUC filters and filter utilities
320
+ * -------------------------------------------------------------------
321
+ */
322
+
323
+ /**
324
+ * Register a callback for one of the update checker filters.
325
+ *
326
+ * Identical to add_filter(), except it automatically adds the "puc_" prefix
327
+ * and the "-$slug" suffix to the filter name. For example, "request_info_result"
328
+ * becomes "puc_request_info_result-your_plugin_slug".
329
+ *
330
+ * @param string $tag
331
+ * @param callable $callback
332
+ * @param int $priority
333
+ * @param int $acceptedArgs
334
+ */
335
+ public function addFilter($tag, $callback, $priority = 10, $acceptedArgs = 1) {
336
+ add_filter($this->getUniqueName($tag), $callback, $priority, $acceptedArgs);
337
+ }
338
+
339
+ /* -------------------------------------------------------------------
340
+ * Inject updates
341
+ * -------------------------------------------------------------------
342
+ */
343
+
344
+ /**
345
+ * Insert the latest update (if any) into the update list maintained by WP.
346
+ *
347
+ * @param stdClass $updates Update list.
348
+ * @return stdClass Modified update list.
349
+ */
350
+ public function injectUpdate($updates) {
351
+ //Is there an update to insert?
352
+ $update = $this->getUpdate();
353
+
354
+ if ( !$this->shouldShowUpdates() ) {
355
+ $update = null;
356
+ }
357
+
358
+ if ( !empty($update) ) {
359
+ //Let plugins filter the update info before it's passed on to WordPress.
360
+ $update = apply_filters($this->getUniqueName('pre_inject_update'), $update);
361
+ $updates = $this->addUpdateToList($updates, $update->toWpFormat());
362
+ } else {
363
+ //Clean up any stale update info.
364
+ $updates = $this->removeUpdateFromList($updates);
365
+ }
366
+
367
+ return $updates;
368
+ }
369
+
370
+ /**
371
+ * @param stdClass|null $updates
372
+ * @param stdClass|array $updateToAdd
373
+ * @return stdClass
374
+ */
375
+ protected function addUpdateToList($updates, $updateToAdd) {
376
+ if ( !is_object($updates) ) {
377
+ $updates = new stdClass();
378
+ $updates->response = array();
379
+ }
380
+
381
+ $updates->response[$this->getUpdateListKey()] = $updateToAdd;
382
+ return $updates;
383
+ }
384
+
385
+ /**
386
+ * @param stdClass|null $updates
387
+ * @return stdClass|null
388
+ */
389
+ protected function removeUpdateFromList($updates) {
390
+ if ( isset($updates, $updates->response) ) {
391
+ unset($updates->response[$this->getUpdateListKey()]);
392
+ }
393
+ return $updates;
394
+ }
395
+
396
+ /**
397
+ * Get the key that will be used when adding updates to the update list that's maintained
398
+ * by the WordPress core. The list is always an associative array, but the key is different
399
+ * for plugins and themes.
400
+ *
401
+ * @return string
402
+ */
403
+ abstract protected function getUpdateListKey();
404
+
405
+ /**
406
+ * Should we show available updates?
407
+ *
408
+ * Usually the answer is "yes", but there are exceptions. For example, WordPress doesn't
409
+ * support automatic updates installation for mu-plugins, so PUC usually won't show update
410
+ * notifications in that case. See the plugin-specific subclass for details.
411
+ *
412
+ * Note: This method only applies to updates that are displayed (or not) in the WordPress
413
+ * admin. It doesn't affect APIs like requestUpdate and getUpdate.
414
+ *
415
+ * @return bool
416
+ */
417
+ protected function shouldShowUpdates() {
418
+ return true;
419
+ }
420
+
421
+ /* -------------------------------------------------------------------
422
+ * JSON-based update API
423
+ * -------------------------------------------------------------------
424
+ */
425
+
426
+ /**
427
+ * Retrieve plugin or theme metadata from the JSON document at $this->metadataUrl.
428
+ *
429
+ * @param string $metaClass Parse the JSON as an instance of this class. It must have a static fromJson method.
430
+ * @param string $filterRoot
431
+ * @param array $queryArgs Additional query arguments.
432
+ * @return array [Puc_v4p1_Metadata|null, array|WP_Error] A metadata instance and the value returned by wp_remote_get().
433
+ */
434
+ protected function requestMetadata($metaClass, $filterRoot, $queryArgs = array()) {
435
+ //Query args to append to the URL. Plugins can add their own by using a filter callback (see addQueryArgFilter()).
436
+ $queryArgs = array_merge(
437
+ array(
438
+ 'installed_version' => strval($this->getInstalledVersion()),
439
+ 'php' => phpversion(),
440
+ 'locale' => get_locale(),
441
+ ),
442
+ $queryArgs
443
+ );
444
+ $queryArgs = apply_filters($this->getUniqueName($filterRoot . '_query_args'), $queryArgs);
445
+
446
+ //Various options for the wp_remote_get() call. Plugins can filter these, too.
447
+ $options = array(
448
+ 'timeout' => 10, //seconds
449
+ 'headers' => array(
450
+ 'Accept' => 'application/json',
451
+ ),
452
+ );
453
+ $options = apply_filters($this->getUniqueName($filterRoot . '_options'), $options);
454
+
455
+ //The metadata file should be at 'http://your-api.com/url/here/$slug/info.json'
456
+ $url = $this->metadataUrl;
457
+ if ( !empty($queryArgs) ){
458
+ $url = add_query_arg($queryArgs, $url);
459
+ }
460
+
461
+ $result = wp_remote_get($url, $options);
462
+
463
+ //Try to parse the response
464
+ $status = $this->validateApiResponse($result);
465
+ $metadata = null;
466
+ if ( !is_wp_error($status) ){
467
+ $metadata = call_user_func(array($metaClass, 'fromJson'), $result['body']);
468
+ } else {
469
+ $this->triggerError(
470
+ sprintf('The URL %s does not point to a valid metadata file. ', $url)
471
+ . $status->get_error_message(),
472
+ E_USER_WARNING
473
+ );
474
+ }
475
+
476
+ return array($metadata, $result);
477
+ }
478
+
479
+ /**
480
+ * Check if $result is a successful update API response.
481
+ *
482
+ * @param array|WP_Error $result
483
+ * @return true|WP_Error
484
+ */
485
+ protected function validateApiResponse($result) {
486
+ if ( is_wp_error($result) ) { /** @var WP_Error $result */
487
+ return new WP_Error($result->get_error_code(), 'WP HTTP Error: ' . $result->get_error_message());
488
+ }
489
+
490
+ if ( !isset($result['response']['code']) ) {
491
+ return new WP_Error(
492
+ 'puc_no_response_code',
493
+ 'wp_remote_get() returned an unexpected result.'
494
+ );
495
+ }
496
+
497
+ if ( $result['response']['code'] !== 200 ) {
498
+ return new WP_Error(
499
+ 'puc_unexpected_response_code',
500
+ 'HTTP response code is ' . $result['response']['code'] . ' (expected: 200)'
501
+ );
502
+ }
503
+
504
+ if ( empty($result['body']) ) {
505
+ return new WP_Error('puc_empty_response', 'The metadata file appears to be empty.');
506
+ }
507
+
508
+ return true;
509
+ }
510
+
511
+ /* -------------------------------------------------------------------
512
+ * Language packs / Translation updates
513
+ * -------------------------------------------------------------------
514
+ */
515
+
516
+ /**
517
+ * Filter a list of translation updates and return a new list that contains only updates
518
+ * that apply to the current site.
519
+ *
520
+ * @param array $translations
521
+ * @return array
522
+ */
523
+ protected function filterApplicableTranslations($translations) {
524
+ $languages = array_flip(array_values(get_available_languages()));
525
+ $installedTranslations = $this->getInstalledTranslations();
526
+
527
+ $applicableTranslations = array();
528
+ foreach($translations as $translation) {
529
+ //Does it match one of the available core languages?
530
+ $isApplicable = array_key_exists($translation->language, $languages);
531
+ //Is it more recent than an already-installed translation?
532
+ if ( isset($installedTranslations[$translation->language]) ) {
533
+ $updateTimestamp = strtotime($translation->updated);
534
+ $installedTimestamp = strtotime($installedTranslations[$translation->language]['PO-Revision-Date']);
535
+ $isApplicable = $updateTimestamp > $installedTimestamp;
536
+ }
537
+
538
+ if ( $isApplicable ) {
539
+ $applicableTranslations[] = $translation;
540
+ }
541
+ }
542
+
543
+ return $applicableTranslations;
544
+ }
545
+
546
+ /**
547
+ * Get a list of installed translations for this plugin or theme.
548
+ *
549
+ * @return array
550
+ */
551
+ protected function getInstalledTranslations() {
552
+ $installedTranslations = wp_get_installed_translations($this->translationType . 's');
553
+ if ( isset($installedTranslations[$this->directoryName]) ) {
554
+ $installedTranslations = $installedTranslations[$this->directoryName];
555
+ } else {
556
+ $installedTranslations = array();
557
+ }
558
+ return $installedTranslations;
559
+ }
560
+
561
+ /**
562
+ * Insert translation updates into the list maintained by WordPress.
563
+ *
564
+ * @param stdClass $updates
565
+ * @return stdClass
566
+ */
567
+ public function injectTranslationUpdates($updates) {
568
+ $translationUpdates = $this->getTranslationUpdates();
569
+ if ( empty($translationUpdates) ) {
570
+ return $updates;
571
+ }
572
+
573
+ //Being defensive.
574
+ if ( !is_object($updates) ) {
575
+ $updates = new stdClass();
576
+ }
577
+ if ( !isset($updates->translations) ) {
578
+ $updates->translations = array();
579
+ }
580
+
581
+ //In case there's a name collision with a plugin or theme hosted on wordpress.org,
582
+ //remove any preexisting updates that match our thing.
583
+ $updates->translations = array_values(array_filter(
584
+ $updates->translations,
585
+ array($this, 'isNotMyTranslation')
586
+ ));
587
+
588
+ //Add our updates to the list.
589
+ foreach($translationUpdates as $update) {
590
+ $convertedUpdate = array_merge(
591
+ array(
592
+ 'type' => $this->translationType,
593
+ 'slug' => $this->directoryName,
594
+ 'autoupdate' => 0,
595
+ //AFAICT, WordPress doesn't actually use the "version" field for anything.
596
+ //But lets make sure it's there, just in case.
597
+ 'version' => isset($update->version) ? $update->version : ('1.' . strtotime($update->updated)),
598
+ ),
599
+ (array)$update
600
+ );
601
+
602
+ $updates->translations[] = $convertedUpdate;
603
+ }
604
+
605
+ return $updates;
606
+ }
607
+
608
+ /**
609
+ * Get a list of available translation updates.
610
+ *
611
+ * This method will return an empty array if there are no updates.
612
+ * Uses cached update data.
613
+ *
614
+ * @return array
615
+ */
616
+ public function getTranslationUpdates() {
617
+ return $this->updateState->getTranslations();
618
+ }
619
+
620
+ /**
621
+ * Remove all cached translation updates.
622
+ *
623
+ * @see wp_clean_update_cache
624
+ */
625
+ public function clearCachedTranslationUpdates() {
626
+ $this->updateState->setTranslations(array());
627
+ }
628
+
629
+ /**
630
+ * Filter callback. Keeps only translations that *don't* match this plugin or theme.
631
+ *
632
+ * @param array $translation
633
+ * @return bool
634
+ */
635
+ protected function isNotMyTranslation($translation) {
636
+ $isMatch = isset($translation['type'], $translation['slug'])
637
+ && ($translation['type'] === $this->translationType)
638
+ && ($translation['slug'] === $this->directoryName);
639
+
640
+ return !$isMatch;
641
+ }
642
+
643
+ /* -------------------------------------------------------------------
644
+ * Fix directory name when installing updates
645
+ * -------------------------------------------------------------------
646
+ */
647
+
648
+ /**
649
+ * Rename the update directory to match the existing plugin/theme directory.
650
+ *
651
+ * When WordPress installs a plugin or theme update, it assumes that the ZIP file will contain
652
+ * exactly one directory, and that the directory name will be the same as the directory where
653
+ * the plugin or theme is currently installed.
654
+ *
655
+ * GitHub and other repositories provide ZIP downloads, but they often use directory names like
656
+ * "project-branch" or "project-tag-hash". We need to change the name to the actual plugin folder.
657
+ *
658
+ * This is a hook callback. Don't call it from a plugin.
659
+ *
660
+ * @access protected
661
+ *
662
+ * @param string $source The directory to copy to /wp-content/plugins or /wp-content/themes. Usually a subdirectory of $remoteSource.
663
+ * @param string $remoteSource WordPress has extracted the update to this directory.
664
+ * @param WP_Upgrader $upgrader
665
+ * @return string|WP_Error
666
+ */
667
+ public function fixDirectoryName($source, $remoteSource, $upgrader) {
668
+ global $wp_filesystem;
669
+ /** @var WP_Filesystem_Base $wp_filesystem */
670
+
671
+ //Basic sanity checks.
672
+ if ( !isset($source, $remoteSource, $upgrader, $upgrader->skin, $wp_filesystem) ) {
673
+ return $source;
674
+ }
675
+
676
+ //If WordPress is upgrading anything other than our plugin/theme, leave the directory name unchanged.
677
+ if ( !$this->isBeingUpgraded($upgrader) ) {
678
+ return $source;
679
+ }
680
+
681
+ //Rename the source to match the existing directory.
682
+ $correctedSource = trailingslashit($remoteSource) . $this->directoryName . '/';
683
+ if ( $source !== $correctedSource ) {
684
+ //The update archive should contain a single directory that contains the rest of plugin/theme files.
685
+ //Otherwise, WordPress will try to copy the entire working directory ($source == $remoteSource).
686
+ //We can't rename $remoteSource because that would break WordPress code that cleans up temporary files
687
+ //after update.
688
+ if ( $this->isBadDirectoryStructure($remoteSource) ) {
689
+ return new WP_Error(
690
+ 'puc-incorrect-directory-structure',
691
+ sprintf(
692
+ 'The directory structure of the update is incorrect. All files should be inside ' .
693
+ 'a directory named <span class="code">%s</span>, not at the root of the ZIP archive.',
694
+ htmlentities($this->slug)
695
+ )
696
+ );
697
+ }
698
+
699
+ /** @var WP_Upgrader_Skin $upgrader ->skin */
700
+ $upgrader->skin->feedback(sprintf(
701
+ 'Renaming %s to %s&#8230;',
702
+ '<span class="code">' . basename($source) . '</span>',
703
+ '<span class="code">' . $this->directoryName . '</span>'
704
+ ));
705
+
706
+ if ( $wp_filesystem->move($source, $correctedSource, true) ) {
707
+ $upgrader->skin->feedback('Directory successfully renamed.');
708
+ return $correctedSource;
709
+ } else {
710
+ return new WP_Error(
711
+ 'puc-rename-failed',
712
+ 'Unable to rename the update to match the existing directory.'
713
+ );
714
+ }
715
+ }
716
+
717
+ return $source;
718
+ }
719
+
720
+ /**
721
+ * Is there an update being installed right now, for this plugin or theme?
722
+ *
723
+ * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
724
+ * @return bool
725
+ */
726
+ abstract public function isBeingUpgraded($upgrader = null);
727
+
728
+ /**
729
+ * Check for incorrect update directory structure. An update must contain a single directory,
730
+ * all other files should be inside that directory.
731
+ *
732
+ * @param string $remoteSource Directory path.
733
+ * @return bool
734
+ */
735
+ protected function isBadDirectoryStructure($remoteSource) {
736
+ global $wp_filesystem;
737
+ /** @var WP_Filesystem_Base $wp_filesystem */
738
+
739
+ $sourceFiles = $wp_filesystem->dirlist($remoteSource);
740
+ if ( is_array($sourceFiles) ) {
741
+ $sourceFiles = array_keys($sourceFiles);
742
+ $firstFilePath = trailingslashit($remoteSource) . $sourceFiles[0];
743
+ return (count($sourceFiles) > 1) || (!$wp_filesystem->is_dir($firstFilePath));
744
+ }
745
+
746
+ //Assume it's fine.
747
+ return false;
748
+ }
749
+
750
+ /* -------------------------------------------------------------------
751
+ * File header parsing
752
+ * -------------------------------------------------------------------
753
+ */
754
+
755
+ /**
756
+ * Parse plugin or theme metadata from the header comment.
757
+ *
758
+ * This is basically a simplified version of the get_file_data() function from /wp-includes/functions.php.
759
+ * It's intended as a utility for subclasses that detect updates by parsing files in a VCS.
760
+ *
761
+ * @param string|null $content File contents.
762
+ * @return string[]
763
+ */
764
+ public function getFileHeader($content) {
765
+ $content = (string) $content;
766
+
767
+ //WordPress only looks at the first 8 KiB of the file, so we do the same.
768
+ $content = substr($content, 0, 8192);
769
+ //Normalize line endings.
770
+ $content = str_replace("\r", "\n", $content);
771
+
772
+ $headers = $this->getHeaderNames();
773
+ $results = array();
774
+ foreach ($headers as $field => $name) {
775
+ $success = preg_match('/^[ \t\/*#@]*' . preg_quote($name, '/') . ':(.*)$/mi', $content, $matches);
776
+
777
+ if ( ($success === 1) && $matches[1] ) {
778
+ $value = $matches[1];
779
+ if ( function_exists('_cleanup_header_comment') ) {
780
+ $value = _cleanup_header_comment($value);
781
+ }
782
+ $results[$field] = $value;
783
+ } else {
784
+ $results[$field] = '';
785
+ }
786
+ }
787
+
788
+ return $results;
789
+ }
790
+
791
+ /**
792
+ * @return array Format: ['HeaderKey' => 'Header Name']
793
+ */
794
+ abstract protected function getHeaderNames();
795
+
796
+ /* -------------------------------------------------------------------
797
+ * DebugBar integration
798
+ * -------------------------------------------------------------------
799
+ */
800
+
801
+ /**
802
+ * Initialize the update checker Debug Bar plugin/add-on thingy.
803
+ */
804
+ public function maybeInitDebugBar() {
805
+ if ( class_exists('Debug_Bar', false) && file_exists(dirname(__FILE__ . '/DebugBar')) ) {
806
+ $this->createDebugBarExtension();
807
+ }
808
+ }
809
+
810
+ protected function createDebugBarExtension() {
811
+ return new Puc_v4p1_DebugBar_Extension($this);
812
+ }
813
+
814
+ /**
815
+ * Display additional configuration details in the Debug Bar panel.
816
+ *
817
+ * @param Puc_v4p1_DebugBar_Panel $panel
818
+ */
819
+ public function onDisplayConfiguration($panel) {
820
+ //Do nothing. Subclasses can use this to add additional info to the panel.
821
+ }
822
+
823
+ }
824
+
825
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/UpgraderStatus.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_UpgraderStatus', false) ):
3
+
4
+ /**
5
+ * A utility class that helps figure out which plugin or theme WordPress is upgrading.
6
+ *
7
+ * It may seem strange to have a separate class just for that, but the task is surprisingly complicated.
8
+ * Core classes like Plugin_Upgrader don't expose the plugin file name during an in-progress update (AFAICT).
9
+ * This class uses a few workarounds and heuristics to get the file name.
10
+ */
11
+ class Puc_v4p1_UpgraderStatus {
12
+ private $currentType = null; //"plugin" or "theme".
13
+ private $currentId = null; //Plugin basename or theme directory name.
14
+
15
+ public function __construct() {
16
+ //Keep track of which plugin/theme WordPress is currently upgrading.
17
+ add_filter('upgrader_pre_install', array($this, 'setUpgradedThing'), 10, 2);
18
+ add_filter('upgrader_package_options', array($this, 'setUpgradedPluginFromOptions'), 10, 1);
19
+ add_filter('upgrader_post_install', array($this, 'clearUpgradedThing'), 10, 1);
20
+ add_action('upgrader_process_complete', array($this, 'clearUpgradedThing'), 10, 1);
21
+ }
22
+
23
+ /**
24
+ * Is there and update being installed RIGHT NOW, for a specific plugin?
25
+ *
26
+ * Caution: This method is unreliable. WordPress doesn't make it easy to figure out what it is upgrading,
27
+ * and upgrader implementations are liable to change without notice.
28
+ *
29
+ * @param string $pluginFile The plugin to check.
30
+ * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
31
+ * @return bool True if the plugin identified by $pluginFile is being upgraded.
32
+ */
33
+ public function isPluginBeingUpgraded($pluginFile, $upgrader = null) {
34
+ return $this->isBeingUpgraded('plugin', $pluginFile, $upgrader);
35
+ }
36
+
37
+ /**
38
+ * Is there an update being installed for a specific theme?
39
+ *
40
+ * @param string $stylesheet Theme directory name.
41
+ * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
42
+ * @return bool
43
+ */
44
+ public function isThemeBeingUpgraded($stylesheet, $upgrader = null) {
45
+ return $this->isBeingUpgraded('theme', $stylesheet, $upgrader);
46
+ }
47
+
48
+ /**
49
+ * Check if a specific theme or plugin is being upgraded.
50
+ *
51
+ * @param string $type
52
+ * @param string $id
53
+ * @param Plugin_Upgrader|WP_Upgrader|null $upgrader
54
+ * @return bool
55
+ */
56
+ protected function isBeingUpgraded($type, $id, $upgrader = null) {
57
+ if ( isset($upgrader) ) {
58
+ list($currentType, $currentId) = $this->getThingBeingUpgradedBy($upgrader);
59
+ if ( $currentType !== null ) {
60
+ $this->currentType = $currentType;
61
+ $this->currentId = $currentId;
62
+ }
63
+ }
64
+ return ($this->currentType === $type) && ($this->currentId === $id);
65
+ }
66
+
67
+ /**
68
+ * Figure out which theme or plugin is being upgraded by a WP_Upgrader instance.
69
+ *
70
+ * Returns an array with two items. The first item is the type of the thing that's being
71
+ * upgraded: "plugin" or "theme". The second item is either the plugin basename or
72
+ * the theme directory name. If we can't determine what the upgrader is doing, both items
73
+ * will be NULL.
74
+ *
75
+ * Examples:
76
+ * ['plugin', 'plugin-dir-name/plugin.php']
77
+ * ['theme', 'theme-dir-name']
78
+ *
79
+ * @param Plugin_Upgrader|WP_Upgrader $upgrader
80
+ * @return array
81
+ */
82
+ private function getThingBeingUpgradedBy($upgrader) {
83
+ if ( !isset($upgrader, $upgrader->skin) ) {
84
+ return array(null, null);
85
+ }
86
+
87
+ //Figure out which plugin or theme is being upgraded.
88
+ $pluginFile = null;
89
+ $themeDirectoryName = null;
90
+
91
+ $skin = $upgrader->skin;
92
+ if ( isset($skin->theme_info) && ($skin->theme_info instanceof WP_Theme) ) {
93
+ $themeDirectoryName = $skin->theme_info->get_stylesheet();
94
+ } elseif ( $skin instanceof Plugin_Upgrader_Skin ) {
95
+ if ( isset($skin->plugin) && is_string($skin->plugin) && ($skin->plugin !== '') ) {
96
+ $pluginFile = $skin->plugin;
97
+ }
98
+ } elseif ( $skin instanceof Theme_Upgrader_Skin ) {
99
+ if ( isset($skin->theme) && is_string($skin->theme) && ($skin->theme !== '') ) {
100
+ $themeDirectoryName = $skin->theme;
101
+ }
102
+ } elseif ( isset($skin->plugin_info) && is_array($skin->plugin_info) ) {
103
+ //This case is tricky because Bulk_Plugin_Upgrader_Skin (etc) doesn't actually store the plugin
104
+ //filename anywhere. Instead, it has the plugin headers in $plugin_info. So the best we can
105
+ //do is compare those headers to the headers of installed plugins.
106
+ $pluginFile = $this->identifyPluginByHeaders($skin->plugin_info);
107
+ }
108
+
109
+ if ( $pluginFile !== null ) {
110
+ return array('plugin', $pluginFile);
111
+ } elseif ( $themeDirectoryName !== null ) {
112
+ return array('theme', $themeDirectoryName);
113
+ }
114
+ return array(null, null);
115
+ }
116
+
117
+ /**
118
+ * Identify an installed plugin based on its headers.
119
+ *
120
+ * @param array $searchHeaders The plugin file header to look for.
121
+ * @return string|null Plugin basename ("foo/bar.php"), or NULL if we can't identify the plugin.
122
+ */
123
+ private function identifyPluginByHeaders($searchHeaders) {
124
+ if ( !function_exists('get_plugins') ){
125
+ /** @noinspection PhpIncludeInspection */
126
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
127
+ }
128
+
129
+ $installedPlugins = get_plugins();
130
+ $matches = array();
131
+ foreach($installedPlugins as $pluginBasename => $headers) {
132
+ $diff1 = array_diff_assoc($headers, $searchHeaders);
133
+ $diff2 = array_diff_assoc($searchHeaders, $headers);
134
+ if ( empty($diff1) && empty($diff2) ) {
135
+ $matches[] = $pluginBasename;
136
+ }
137
+ }
138
+
139
+ //It's possible (though very unlikely) that there could be two plugins with identical
140
+ //headers. In that case, we can't unambiguously identify the plugin that's being upgraded.
141
+ if ( count($matches) !== 1 ) {
142
+ return null;
143
+ }
144
+
145
+ return reset($matches);
146
+ }
147
+
148
+ /**
149
+ * @access private
150
+ *
151
+ * @param mixed $input
152
+ * @param array $hookExtra
153
+ * @return mixed Returns $input unaltered.
154
+ */
155
+ public function setUpgradedThing($input, $hookExtra) {
156
+ if ( !empty($hookExtra['plugin']) && is_string($hookExtra['plugin']) ) {
157
+ $this->currentId = $hookExtra['plugin'];
158
+ $this->currentType = 'plugin';
159
+ } elseif ( !empty($hookExtra['theme']) && is_string($hookExtra['theme']) ) {
160
+ $this->currentId = $hookExtra['theme'];
161
+ $this->currentType = 'theme';
162
+ } else {
163
+ $this->currentType = null;
164
+ $this->currentId = null;
165
+ }
166
+ return $input;
167
+ }
168
+
169
+ /**
170
+ * @access private
171
+ *
172
+ * @param array $options
173
+ * @return array
174
+ */
175
+ public function setUpgradedPluginFromOptions($options) {
176
+ if ( isset($options['hook_extra']['plugin']) && is_string($options['hook_extra']['plugin']) ) {
177
+ $this->currentType = 'plugin';
178
+ $this->currentId = $options['hook_extra']['plugin'];
179
+ } else {
180
+ $this->currentType = null;
181
+ $this->currentId = null;
182
+ }
183
+ return $options;
184
+ }
185
+
186
+ /**
187
+ * @access private
188
+ *
189
+ * @param mixed $input
190
+ * @return mixed Returns $input unaltered.
191
+ */
192
+ public function clearUpgradedThing($input = null) {
193
+ $this->currentId = null;
194
+ $this->currentType = null;
195
+ return $input;
196
+ }
197
+ }
198
+
199
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Utils.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_Utils', false) ):
4
+
5
+ class Puc_v4p1_Utils {
6
+ /**
7
+ * Get a value from a nested array or object based on a path.
8
+ *
9
+ * @param array|object|null $collection Get an entry from this array.
10
+ * @param array|string $path A list of array keys in hierarchy order, or a string path like "foo.bar.baz".
11
+ * @param mixed $default The value to return if the specified path is not found.
12
+ * @param string $separator Path element separator. Only applies to string paths.
13
+ * @return mixed
14
+ */
15
+ public static function get($collection, $path, $default = null, $separator = '.') {
16
+ if ( is_string($path) ) {
17
+ $path = explode($separator, $path);
18
+ }
19
+ if ( empty($path) ) {
20
+ return $default;
21
+ }
22
+
23
+ //Follow the $path into $input as far as possible.
24
+ $currentValue = $collection;
25
+ $pathExists = true;
26
+ foreach ($path as $node) {
27
+ if ( is_array($currentValue) && isset($currentValue[$node]) ) {
28
+ $currentValue = $currentValue[$node];
29
+ } else if ( is_object($currentValue) && isset($currentValue->$node) ) {
30
+ $currentValue = $currentValue->$node;
31
+ } else {
32
+ $pathExists = false;
33
+ break;
34
+ }
35
+ }
36
+
37
+ if ( $pathExists ) {
38
+ return $currentValue;
39
+ }
40
+ return $default;
41
+ }
42
+
43
+ /**
44
+ * Get the first array element that is not empty.
45
+ *
46
+ * @param array $values
47
+ * @param mixed|null $default Returns this value if there are no non-empty elements.
48
+ * @return mixed|null
49
+ */
50
+ public static function findNotEmpty($values, $default = null) {
51
+ if ( empty($values) ) {
52
+ return $default;
53
+ }
54
+
55
+ foreach ($values as $value) {
56
+ if ( !empty($value) ) {
57
+ return $value;
58
+ }
59
+ }
60
+
61
+ return $default;
62
+ }
63
+
64
+ /**
65
+ * Check if the input string starts with the specified prefix.
66
+ *
67
+ * @param string $input
68
+ * @param string $prefix
69
+ * @return bool
70
+ */
71
+ public static function startsWith($input, $prefix) {
72
+ $length = strlen($prefix);
73
+ return (substr($input, 0, $length) === $prefix);
74
+ }
75
+ }
76
+
77
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/Api.php ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Vcs_Api') ):
3
+
4
+ abstract class Puc_v4p1_Vcs_Api {
5
+ protected $tagNameProperty = 'name';
6
+
7
+ /**
8
+ * @var string
9
+ */
10
+ protected $repositoryUrl = '';
11
+
12
+ /**
13
+ * @var mixed Authentication details for private repositories. Format depends on service.
14
+ */
15
+ protected $credentials = null;
16
+
17
+ /**
18
+ * @var string The filter tag that's used to filter options passed to wp_remote_get.
19
+ * For example, "puc_request_info_options-slug" or "puc_request_update_options_theme-slug".
20
+ */
21
+ protected $httpFilterName = '';
22
+
23
+ /**
24
+ * Puc_v4p1_Vcs_Api constructor.
25
+ *
26
+ * @param string $repositoryUrl
27
+ * @param array|string|null $credentials
28
+ */
29
+ public function __construct($repositoryUrl, $credentials = null) {
30
+ $this->repositoryUrl = $repositoryUrl;
31
+ $this->setAuthentication($credentials);
32
+ }
33
+
34
+ /**
35
+ * @return string
36
+ */
37
+ public function getRepositoryUrl() {
38
+ return $this->repositoryUrl;
39
+ }
40
+
41
+ /**
42
+ * Figure out which reference (i.e tag or branch) contains the latest version.
43
+ *
44
+ * @param string $configBranch Start looking in this branch.
45
+ * @return null|Puc_v4p1_Vcs_Reference
46
+ */
47
+ abstract public function chooseReference($configBranch);
48
+
49
+ /**
50
+ * Get the readme.txt file from the remote repository and parse it
51
+ * according to the plugin readme standard.
52
+ *
53
+ * @param string $ref Tag or branch name.
54
+ * @return array Parsed readme.
55
+ */
56
+ public function getRemoteReadme($ref = 'master') {
57
+ $fileContents = $this->getRemoteFile('readme.txt', $ref);
58
+ if ( empty($fileContents) ) {
59
+ return array();
60
+ }
61
+
62
+ $parser = new PucReadmeParser();
63
+ return $parser->parse_readme_contents($fileContents);
64
+ }
65
+
66
+ /**
67
+ * Get a branch.
68
+ *
69
+ * @param string $branchName
70
+ * @return Puc_v4p1_Vcs_Reference|null
71
+ */
72
+ abstract public function getBranch($branchName);
73
+
74
+ /**
75
+ * Get a specific tag.
76
+ *
77
+ * @param string $tagName
78
+ * @return Puc_v4p1_Vcs_Reference|null
79
+ */
80
+ abstract public function getTag($tagName);
81
+
82
+ /**
83
+ * Get the tag that looks like the highest version number.
84
+ * (Implementations should skip pre-release versions if possible.)
85
+ *
86
+ * @return Puc_v4p1_Vcs_Reference|null
87
+ */
88
+ abstract public function getLatestTag();
89
+
90
+ /**
91
+ * Check if a tag name string looks like a version number.
92
+ *
93
+ * @param string $name
94
+ * @return bool
95
+ */
96
+ protected function looksLikeVersion($name) {
97
+ //Tag names may be prefixed with "v", e.g. "v1.2.3".
98
+ $name = ltrim($name, 'v');
99
+
100
+ //The version string must start with a number.
101
+ if ( !is_numeric(substr($name, 0, 1)) ) {
102
+ return false;
103
+ }
104
+
105
+ //The goal is to accept any SemVer-compatible or "PHP-standardized" version number.
106
+ return (preg_match('@^(\d{1,5}?)(\.\d{1,10}?){0,4}?($|[abrdp+_\-]|\s)@i', $name) === 1);
107
+ }
108
+
109
+ /**
110
+ * Check if a tag appears to be named like a version number.
111
+ *
112
+ * @param stdClass $tag
113
+ * @return bool
114
+ */
115
+ protected function isVersionTag($tag) {
116
+ $property = $this->tagNameProperty;
117
+ return isset($tag->$property) && $this->looksLikeVersion($tag->$property);
118
+ }
119
+
120
+ /**
121
+ * Sort a list of tags as if they were version numbers.
122
+ * Tags that don't look like version number will be removed.
123
+ *
124
+ * @param stdClass[] $tags Array of tag objects.
125
+ * @return stdClass[] Filtered array of tags sorted in descending order.
126
+ */
127
+ protected function sortTagsByVersion($tags) {
128
+ //Keep only those tags that look like version numbers.
129
+ $versionTags = array_filter($tags, array($this, 'isVersionTag'));
130
+ //Sort them in descending order.
131
+ usort($versionTags, array($this, 'compareTagNames'));
132
+
133
+ return $versionTags;
134
+ }
135
+
136
+ /**
137
+ * Compare two tags as if they were version number.
138
+ *
139
+ * @param stdClass $tag1 Tag object.
140
+ * @param stdClass $tag2 Another tag object.
141
+ * @return int
142
+ */
143
+ protected function compareTagNames($tag1, $tag2) {
144
+ $property = $this->tagNameProperty;
145
+ if ( !isset($tag1->$property) ) {
146
+ return 1;
147
+ }
148
+ if ( !isset($tag2->$property) ) {
149
+ return -1;
150
+ }
151
+ return -version_compare(ltrim($tag1->$property, 'v'), ltrim($tag2->$property, 'v'));
152
+ }
153
+
154
+ /**
155
+ * Get the contents of a file from a specific branch or tag.
156
+ *
157
+ * @param string $path File name.
158
+ * @param string $ref
159
+ * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error.
160
+ */
161
+ abstract public function getRemoteFile($path, $ref = 'master');
162
+
163
+ /**
164
+ * Get the timestamp of the latest commit that changed the specified branch or tag.
165
+ *
166
+ * @param string $ref Reference name (e.g. branch or tag).
167
+ * @return string|null
168
+ */
169
+ abstract public function getLatestCommitTime($ref);
170
+
171
+ /**
172
+ * Get the contents of the changelog file from the repository.
173
+ *
174
+ * @param string $ref
175
+ * @param string $localDirectory Full path to the local plugin or theme directory.
176
+ * @return null|string The HTML contents of the changelog.
177
+ */
178
+ public function getRemoteChangelog($ref, $localDirectory) {
179
+ $filename = $this->findChangelogName($localDirectory);
180
+ if ( empty($filename) ) {
181
+ return null;
182
+ }
183
+
184
+ $changelog = $this->getRemoteFile($filename, $ref);
185
+ if ( $changelog === null ) {
186
+ return null;
187
+ }
188
+
189
+ /** @noinspection PhpUndefinedClassInspection */
190
+ return Parsedown::instance()->text($changelog);
191
+ }
192
+
193
+ /**
194
+ * Guess the name of the changelog file.
195
+ *
196
+ * @param string $directory
197
+ * @return string|null
198
+ */
199
+ protected function findChangelogName($directory) {
200
+ if ( empty($directory) || !is_dir($directory) || ($directory === '.') ) {
201
+ return null;
202
+ }
203
+
204
+ $possibleNames = array('CHANGES.md', 'CHANGELOG.md', 'changes.md', 'changelog.md');
205
+ $files = scandir($directory);
206
+ $foundNames = array_intersect($possibleNames, $files);
207
+
208
+ if ( !empty($foundNames) ) {
209
+ return reset($foundNames);
210
+ }
211
+ return null;
212
+ }
213
+
214
+ /**
215
+ * Set authentication credentials.
216
+ *
217
+ * @param $credentials
218
+ */
219
+ public function setAuthentication($credentials) {
220
+ $this->credentials = $credentials;
221
+ }
222
+
223
+ public function isAuthenticationEnabled() {
224
+ return !empty($this->credentials);
225
+ }
226
+
227
+ /**
228
+ * @param string $url
229
+ * @return string
230
+ */
231
+ public function signDownloadUrl($url) {
232
+ return $url;
233
+ }
234
+
235
+ /**
236
+ * @param string $filterName
237
+ */
238
+ public function setHttpFilterName($filterName) {
239
+ $this->httpFilterName = $filterName;
240
+ }
241
+ }
242
+
243
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/BaseChecker.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !interface_exists('Puc_v4p1_Vcs_BaseChecker', false) ):
3
+
4
+ interface Puc_v4p1_Vcs_BaseChecker {
5
+ /**
6
+ * Set the repository branch to use for updates. Defaults to 'master'.
7
+ *
8
+ * @param string $branch
9
+ * @return $this
10
+ */
11
+ public function setBranch($branch);
12
+
13
+ /**
14
+ * Set authentication credentials.
15
+ *
16
+ * @param array|string $credentials
17
+ * @return $this
18
+ */
19
+ public function setAuthentication($credentials);
20
+ }
21
+
22
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/BitBucketApi.php ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Vcs_BitBucketApi', false) ):
3
+
4
+ class Puc_v4p1_Vcs_BitBucketApi extends Puc_v4p1_Vcs_Api {
5
+ /**
6
+ * @var Puc_v4p1_OAuthSignature
7
+ */
8
+ private $oauth = null;
9
+
10
+ /**
11
+ * @var string
12
+ */
13
+ private $username;
14
+
15
+ /**
16
+ * @var string
17
+ */
18
+ private $repository;
19
+
20
+ public function __construct($repositoryUrl, $credentials = array()) {
21
+ $path = @parse_url($repositoryUrl, PHP_URL_PATH);
22
+ if ( preg_match('@^/?(?P<username>[^/]+?)/(?P<repository>[^/#?&]+?)/?$@', $path, $matches) ) {
23
+ $this->username = $matches['username'];
24
+ $this->repository = $matches['repository'];
25
+ } else {
26
+ throw new InvalidArgumentException('Invalid BitBucket repository URL: "' . $repositoryUrl . '"');
27
+ }
28
+
29
+ parent::__construct($repositoryUrl, $credentials);
30
+ }
31
+
32
+ /**
33
+ * Figure out which reference (i.e tag or branch) contains the latest version.
34
+ *
35
+ * @param string $configBranch Start looking in this branch.
36
+ * @return null|Puc_v4p1_Vcs_Reference
37
+ */
38
+ public function chooseReference($configBranch) {
39
+ $updateSource = null;
40
+
41
+ //Check if there's a "Stable tag: 1.2.3" header that points to a valid tag.
42
+ $updateSource = $this->getStableTag($configBranch);
43
+
44
+ //Look for version-like tags.
45
+ if ( !$updateSource && ($configBranch === 'master') ) {
46
+ $updateSource = $this->getLatestTag();
47
+ }
48
+ //If all else fails, use the specified branch itself.
49
+ if ( !$updateSource ) {
50
+ $updateSource = $this->getBranch($configBranch);
51
+ }
52
+
53
+ return $updateSource;
54
+ }
55
+
56
+ public function getBranch($branchName) {
57
+ $branch = $this->api('/refs/branches/' . $branchName);
58
+ if ( is_wp_error($branch) || empty($branch) ) {
59
+ return null;
60
+ }
61
+
62
+ return new Puc_v4p1_Vcs_Reference(array(
63
+ 'name' => $branch->name,
64
+ 'updated' => $branch->target->date,
65
+ 'downloadUrl' => $this->getDownloadUrl($branch->name),
66
+ ));
67
+ }
68
+
69
+ /**
70
+ * Get a specific tag.
71
+ *
72
+ * @param string $tagName
73
+ * @return Puc_v4p1_Vcs_Reference|null
74
+ */
75
+ public function getTag($tagName) {
76
+ $tag = $this->api('/refs/tags/' . $tagName);
77
+ if ( is_wp_error($tag) || empty($tag) ) {
78
+ return null;
79
+ }
80
+
81
+ return new Puc_v4p1_Vcs_Reference(array(
82
+ 'name' => $tag->name,
83
+ 'version' => ltrim($tag->name, 'v'),
84
+ 'updated' => $tag->target->date,
85
+ 'downloadUrl' => $this->getDownloadUrl($tag->name),
86
+ ));
87
+ }
88
+
89
+ /**
90
+ * Get the tag that looks like the highest version number.
91
+ *
92
+ * @return Puc_v4p1_Vcs_Reference|null
93
+ */
94
+ public function getLatestTag() {
95
+ $tags = $this->api('/refs/tags?sort=-target.date');
96
+ if ( !isset($tags, $tags->values) || !is_array($tags->values) ) {
97
+ return null;
98
+ }
99
+
100
+ //Filter and sort the list of tags.
101
+ $versionTags = $this->sortTagsByVersion($tags->values);
102
+
103
+ //Return the first result.
104
+ if ( !empty($versionTags) ) {
105
+ $tag = $versionTags[0];
106
+ return new Puc_v4p1_Vcs_Reference(array(
107
+ 'name' => $tag->name,
108
+ 'version' => ltrim($tag->name, 'v'),
109
+ 'updated' => $tag->target->date,
110
+ 'downloadUrl' => $this->getDownloadUrl($tag->name),
111
+ ));
112
+ }
113
+ return null;
114
+ }
115
+
116
+ /**
117
+ * Get the tag/ref specified by the "Stable tag" header in the readme.txt of a given branch.
118
+ *
119
+ * @param string $branch
120
+ * @return null|Puc_v4p1_Vcs_Reference
121
+ */
122
+ protected function getStableTag($branch) {
123
+ $remoteReadme = $this->getRemoteReadme($branch);
124
+ if ( !empty($remoteReadme['stable_tag']) ) {
125
+ $tag = $remoteReadme['stable_tag'];
126
+
127
+ //You can explicitly opt out of using tags by setting "Stable tag" to
128
+ //"trunk" or the name of the current branch.
129
+ if ( ($tag === $branch) || ($tag === 'trunk') ) {
130
+ return $this->getBranch($branch);
131
+ }
132
+
133
+ return $this->getTag($tag);
134
+ }
135
+
136
+ return null;
137
+ }
138
+
139
+ /**
140
+ * @param string $ref
141
+ * @return string
142
+ */
143
+ protected function getDownloadUrl($ref) {
144
+ return sprintf(
145
+ 'https://bitbucket.org/%s/%s/get/%s.zip',
146
+ $this->username,
147
+ $this->repository,
148
+ $ref
149
+ );
150
+ }
151
+
152
+ /**
153
+ * Get the contents of a file from a specific branch or tag.
154
+ *
155
+ * @param string $path File name.
156
+ * @param string $ref
157
+ * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error.
158
+ */
159
+ public function getRemoteFile($path, $ref = 'master') {
160
+ $response = $this->api('src/' . $ref . '/' . ltrim($path), '1.0');
161
+ if ( is_wp_error($response) || !isset($response, $response->data) ) {
162
+ return null;
163
+ }
164
+ return $response->data;
165
+ }
166
+
167
+ /**
168
+ * Get the timestamp of the latest commit that changed the specified branch or tag.
169
+ *
170
+ * @param string $ref Reference name (e.g. branch or tag).
171
+ * @return string|null
172
+ */
173
+ public function getLatestCommitTime($ref) {
174
+ $response = $this->api('commits/' . $ref);
175
+ if ( isset($response->values, $response->values[0], $response->values[0]->date) ) {
176
+ return $response->values[0]->date;
177
+ }
178
+ return null;
179
+ }
180
+
181
+ /**
182
+ * Perform a BitBucket API 2.0 request.
183
+ *
184
+ * @param string $url
185
+ * @param string $version
186
+ * @return mixed|WP_Error
187
+ */
188
+ public function api($url, $version = '2.0') {
189
+ $url = implode('/', array(
190
+ 'https://api.bitbucket.org',
191
+ $version,
192
+ 'repositories',
193
+ $this->username,
194
+ $this->repository,
195
+ ltrim($url, '/')
196
+ ));
197
+
198
+ if ( $this->oauth ) {
199
+ $url = $this->oauth->sign($url,'GET');
200
+ }
201
+
202
+ $options = array('timeout' => 10);
203
+ if ( !empty($this->httpFilterName) ) {
204
+ $options = apply_filters($this->httpFilterName, $options);
205
+ }
206
+ $response = wp_remote_get($url, $options);
207
+ if ( is_wp_error($response) ) {
208
+ return $response;
209
+ }
210
+
211
+ $code = wp_remote_retrieve_response_code($response);
212
+ $body = wp_remote_retrieve_body($response);
213
+ if ( $code === 200 ) {
214
+ $document = json_decode($body);
215
+ return $document;
216
+ }
217
+
218
+ return new WP_Error(
219
+ 'puc-bitbucket-http-error',
220
+ 'BitBucket API error. HTTP status: ' . $code
221
+ );
222
+ }
223
+
224
+ /**
225
+ * @param array $credentials
226
+ */
227
+ public function setAuthentication($credentials) {
228
+ parent::setAuthentication($credentials);
229
+
230
+ if ( !empty($credentials) && !empty($credentials['consumer_key']) ) {
231
+ $this->oauth = new Puc_v4p1_OAuthSignature(
232
+ $credentials['consumer_key'],
233
+ $credentials['consumer_secret']
234
+ );
235
+ } else {
236
+ $this->oauth = null;
237
+ }
238
+ }
239
+
240
+ public function signDownloadUrl($url) {
241
+ //Add authentication data to download URLs. Since OAuth signatures incorporate
242
+ //timestamps, we have to do this immediately before inserting the update. Otherwise
243
+ //authentication could fail due to a stale timestamp.
244
+ if ( $this->oauth ) {
245
+ $url = $this->oauth->sign($url);
246
+ }
247
+ return $url;
248
+ }
249
+ }
250
+
251
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/GitHubApi.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_Vcs_GitHubApi', false) ):
4
+
5
+ class Puc_v4p1_Vcs_GitHubApi extends Puc_v4p1_Vcs_Api {
6
+ /**
7
+ * @var string GitHub username.
8
+ */
9
+ protected $userName;
10
+ /**
11
+ * @var string GitHub repository name.
12
+ */
13
+ protected $repositoryName;
14
+
15
+ /**
16
+ * @var string Either a fully qualified repository URL, or just "user/repo-name".
17
+ */
18
+ protected $repositoryUrl;
19
+
20
+ /**
21
+ * @var string GitHub authentication token. Optional.
22
+ */
23
+ protected $accessToken;
24
+
25
+ public function __construct($repositoryUrl, $accessToken = null) {
26
+ $path = @parse_url($repositoryUrl, PHP_URL_PATH);
27
+ if ( preg_match('@^/?(?P<username>[^/]+?)/(?P<repository>[^/#?&]+?)/?$@', $path, $matches) ) {
28
+ $this->userName = $matches['username'];
29
+ $this->repositoryName = $matches['repository'];
30
+ } else {
31
+ throw new InvalidArgumentException('Invalid GitHub repository URL: "' . $repositoryUrl . '"');
32
+ }
33
+
34
+ parent::__construct($repositoryUrl, $accessToken);
35
+ }
36
+
37
+ /**
38
+ * Get the latest release from GitHub.
39
+ *
40
+ * @return Puc_v4p1_Vcs_Reference|null
41
+ */
42
+ public function getLatestRelease() {
43
+ $release = $this->api('/repos/:user/:repo/releases/latest');
44
+ if ( is_wp_error($release) || !is_object($release) || !isset($release->tag_name) ) {
45
+ return null;
46
+ }
47
+
48
+ $reference = new Puc_v4p1_Vcs_Reference(array(
49
+ 'name' => $release->tag_name,
50
+ 'version' => ltrim($release->tag_name, 'v'), //Remove the "v" prefix from "v1.2.3".
51
+ 'downloadUrl' => $this->signDownloadUrl($release->zipball_url),
52
+ 'updated' => $release->created_at,
53
+ 'apiResponse' => $release,
54
+ ));
55
+
56
+ if ( !empty($release->body) ) {
57
+ /** @noinspection PhpUndefinedClassInspection */
58
+ $reference->changelog = Parsedown::instance()->text($release->body);
59
+ }
60
+ if ( isset($release->assets[0]) ) {
61
+ $reference->downloadCount = $release->assets[0]->download_count;
62
+ }
63
+
64
+ return $reference;
65
+ }
66
+
67
+ /**
68
+ * Get the tag that looks like the highest version number.
69
+ *
70
+ * @return Puc_v4p1_Vcs_Reference|null
71
+ */
72
+ public function getLatestTag() {
73
+ $tags = $this->api('/repos/:user/:repo/tags');
74
+
75
+ if ( is_wp_error($tags) || empty($tags) || !is_array($tags) ) {
76
+ return null;
77
+ }
78
+
79
+ $versionTags = $this->sortTagsByVersion($tags);
80
+ if ( empty($versionTags) ) {
81
+ return null;
82
+ }
83
+
84
+ $tag = $versionTags[0];
85
+ return new Puc_v4p1_Vcs_Reference(array(
86
+ 'name' => $tag->name,
87
+ 'version' => ltrim($tag->name, 'v'),
88
+ 'downloadUrl' => $this->signDownloadUrl($tag->zipball_url),
89
+ 'apiResponse' => $tag,
90
+ ));
91
+ }
92
+
93
+ /**
94
+ * Get a branch by name.
95
+ *
96
+ * @param string $branchName
97
+ * @return null|Puc_v4p1_Vcs_Reference
98
+ */
99
+ public function getBranch($branchName) {
100
+ $branch = $this->api('/repos/:user/:repo/branches/' . $branchName);
101
+ if ( is_wp_error($branch) || empty($branch) ) {
102
+ return null;
103
+ }
104
+
105
+ $reference = new Puc_v4p1_Vcs_Reference(array(
106
+ 'name' => $branch->name,
107
+ 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name),
108
+ 'apiResponse' => $branch,
109
+ ));
110
+
111
+ if ( isset($branch->commit, $branch->commit->commit, $branch->commit->commit->author->date) ) {
112
+ $reference->updated = $branch->commit->commit->author->date;
113
+ }
114
+
115
+ return $reference;
116
+ }
117
+
118
+ /**
119
+ * Get the latest commit that changed the specified file.
120
+ *
121
+ * @param string $filename
122
+ * @param string $ref Reference name (e.g. branch or tag).
123
+ * @return StdClass|null
124
+ */
125
+ public function getLatestCommit($filename, $ref = 'master') {
126
+ $commits = $this->api(
127
+ '/repos/:user/:repo/commits',
128
+ array(
129
+ 'path' => $filename,
130
+ 'sha' => $ref,
131
+ )
132
+ );
133
+ if ( !is_wp_error($commits) && is_array($commits) && isset($commits[0]) ) {
134
+ return $commits[0];
135
+ }
136
+ return null;
137
+ }
138
+
139
+ /**
140
+ * Get the timestamp of the latest commit that changed the specified branch or tag.
141
+ *
142
+ * @param string $ref Reference name (e.g. branch or tag).
143
+ * @return string|null
144
+ */
145
+ public function getLatestCommitTime($ref) {
146
+ $commits = $this->api('/repos/:user/:repo/commits', array('sha' => $ref));
147
+ if ( !is_wp_error($commits) && is_array($commits) && isset($commits[0]) ) {
148
+ return $commits[0]->commit->author->date;
149
+ }
150
+ return null;
151
+ }
152
+
153
+ /**
154
+ * Perform a GitHub API request.
155
+ *
156
+ * @param string $url
157
+ * @param array $queryParams
158
+ * @return mixed|WP_Error
159
+ */
160
+ protected function api($url, $queryParams = array()) {
161
+ $variables = array(
162
+ 'user' => $this->userName,
163
+ 'repo' => $this->repositoryName,
164
+ );
165
+ foreach ($variables as $name => $value) {
166
+ $url = str_replace('/:' . $name, '/' . urlencode($value), $url);
167
+ }
168
+ $url = 'https://api.github.com' . $url;
169
+
170
+ if ( !empty($this->accessToken) ) {
171
+ $queryParams['access_token'] = $this->accessToken;
172
+ }
173
+ if ( !empty($queryParams) ) {
174
+ $url = add_query_arg($queryParams, $url);
175
+ }
176
+
177
+ $options = array('timeout' => 10);
178
+ if ( !empty($this->httpFilterName) ) {
179
+ $options = apply_filters($this->httpFilterName, $options);
180
+ }
181
+ $response = wp_remote_get($url, $options);
182
+ if ( is_wp_error($response) ) {
183
+ return $response;
184
+ }
185
+
186
+ $code = wp_remote_retrieve_response_code($response);
187
+ $body = wp_remote_retrieve_body($response);
188
+ if ( $code === 200 ) {
189
+ $document = json_decode($body);
190
+ return $document;
191
+ }
192
+
193
+ return new WP_Error(
194
+ 'puc-github-http-error',
195
+ 'GitHub API error. HTTP status: ' . $code
196
+ );
197
+ }
198
+
199
+ /**
200
+ * Get the contents of a file from a specific branch or tag.
201
+ *
202
+ * @param string $path File name.
203
+ * @param string $ref
204
+ * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error.
205
+ */
206
+ public function getRemoteFile($path, $ref = 'master') {
207
+ $apiUrl = '/repos/:user/:repo/contents/' . $path;
208
+ $response = $this->api($apiUrl, array('ref' => $ref));
209
+
210
+ if ( is_wp_error($response) || !isset($response->content) || ($response->encoding !== 'base64') ) {
211
+ return null;
212
+ }
213
+ return base64_decode($response->content);
214
+ }
215
+
216
+ /**
217
+ * Generate a URL to download a ZIP archive of the specified branch/tag/etc.
218
+ *
219
+ * @param string $ref
220
+ * @return string
221
+ */
222
+ public function buildArchiveDownloadUrl($ref = 'master') {
223
+ $url = sprintf(
224
+ 'https://api.github.com/repos/%1$s/%2$s/zipball/%3$s',
225
+ urlencode($this->userName),
226
+ urlencode($this->repositoryName),
227
+ urlencode($ref)
228
+ );
229
+ if ( !empty($this->accessToken) ) {
230
+ $url = $this->signDownloadUrl($url);
231
+ }
232
+ return $url;
233
+ }
234
+
235
+ /**
236
+ * Get a specific tag.
237
+ *
238
+ * @param string $tagName
239
+ * @return Puc_v4p1_Vcs_Reference|null
240
+ */
241
+ public function getTag($tagName) {
242
+ //The current GitHub update checker doesn't use getTag, so I didn't bother to implement it.
243
+ throw new LogicException('The ' . __METHOD__ . ' method is not implemented and should not be used.');
244
+ }
245
+
246
+ public function setAuthentication($credentials) {
247
+ parent::setAuthentication($credentials);
248
+ $this->accessToken = is_string($credentials) ? $credentials : null;
249
+ }
250
+
251
+ /**
252
+ * Figure out which reference (i.e tag or branch) contains the latest version.
253
+ *
254
+ * @param string $configBranch Start looking in this branch.
255
+ * @return null|Puc_v4p1_Vcs_Reference
256
+ */
257
+ public function chooseReference($configBranch) {
258
+ $updateSource = null;
259
+
260
+ if ( $configBranch === 'master' ) {
261
+ //Use the latest release.
262
+ $updateSource = $this->getLatestRelease();
263
+ if ( $updateSource === null ) {
264
+ //Failing that, use the tag with the highest version number.
265
+ $updateSource = $this->getLatestTag();
266
+ }
267
+ }
268
+ //Alternatively, just use the branch itself.
269
+ if ( empty($updateSource) ) {
270
+ $updateSource = $this->getBranch($configBranch);
271
+ }
272
+
273
+ return $updateSource;
274
+ }
275
+
276
+ /**
277
+ * @param string $url
278
+ * @return string
279
+ */
280
+ public function signDownloadUrl($url) {
281
+ if ( empty($this->credentials) ) {
282
+ return $url;
283
+ }
284
+ return add_query_arg('access_token', $this->credentials, $url);
285
+ }
286
+
287
+ }
288
+
289
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/PluginUpdateChecker.php ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Vcs_PluginUpdateChecker') ):
3
+
4
+ class Puc_v4p1_Vcs_PluginUpdateChecker extends Puc_v4p1_Plugin_UpdateChecker implements Puc_v4p1_Vcs_BaseChecker {
5
+ /**
6
+ * @var string The branch where to look for updates. Defaults to "master".
7
+ */
8
+ protected $branch = 'master';
9
+
10
+ /**
11
+ * @var Puc_v4p1_Vcs_Api Repository API client.
12
+ */
13
+ protected $api = null;
14
+
15
+ /**
16
+ * Puc_v4p1_Vcs_PluginUpdateChecker constructor.
17
+ *
18
+ * @param Puc_v4p1_Vcs_Api $api
19
+ * @param string $pluginFile
20
+ * @param string $slug
21
+ * @param int $checkPeriod
22
+ * @param string $optionName
23
+ * @param string $muPluginFile
24
+ */
25
+ public function __construct($api, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') {
26
+ $this->api = $api;
27
+ $this->api->setHttpFilterName($this->getUniqueName('request_info_options'));
28
+
29
+ parent::__construct($api->getRepositoryUrl(), $pluginFile, $slug, $checkPeriod, $optionName, $muPluginFile);
30
+ }
31
+
32
+ public function requestInfo($unusedParameter = null) {
33
+ //We have to make several remote API requests to gather all the necessary info
34
+ //which can take a while on slow networks.
35
+ set_time_limit(60);
36
+
37
+ $api = $this->api;
38
+
39
+ $info = new Puc_v4p1_Plugin_Info();
40
+ $info->filename = $this->pluginFile;
41
+ $info->slug = $this->slug;
42
+
43
+ $this->setInfoFromHeader($this->getPluginHeader(), $info);
44
+
45
+ //Pick a branch or tag.
46
+ $updateSource = $api->chooseReference($this->branch);
47
+ if ( $updateSource ) {
48
+ $ref = $updateSource->name;
49
+ $info->version = $updateSource->version;
50
+ $info->last_updated = $updateSource->updated;
51
+ $info->download_url = $updateSource->downloadUrl;
52
+
53
+ if ( !empty($updateSource->changelog) ) {
54
+ $info->sections['changelog'] = $updateSource->changelog;
55
+ }
56
+ if ( isset($updateSource->downloadCount) ) {
57
+ $info->downloaded = $updateSource->downloadCount;
58
+ }
59
+ } else {
60
+ //There's probably a network problem or an authentication error.
61
+ return null;
62
+ }
63
+
64
+ //Get headers from the main plugin file in this branch/tag. Its "Version" header and other metadata
65
+ //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags.
66
+ $mainPluginFile = basename($this->pluginFile);
67
+ $remotePlugin = $api->getRemoteFile($mainPluginFile, $ref);
68
+ if ( !empty($remotePlugin) ) {
69
+ $remoteHeader = $this->getFileHeader($remotePlugin);
70
+ $this->setInfoFromHeader($remoteHeader, $info);
71
+ }
72
+
73
+ //Try parsing readme.txt. If it's formatted according to WordPress.org standards, it will contain
74
+ //a lot of useful information like the required/tested WP version, changelog, and so on.
75
+ if ( $this->readmeTxtExistsLocally() ) {
76
+ $this->setInfoFromRemoteReadme($ref, $info);
77
+ }
78
+
79
+ //The changelog might be in a separate file.
80
+ if ( empty($info->sections['changelog']) ) {
81
+ $info->sections['changelog'] = $api->getRemoteChangelog($ref, dirname($this->getAbsolutePath()));
82
+ if ( empty($info->sections['changelog']) ) {
83
+ $info->sections['changelog'] = __('There is no changelog available.', 'plugin-update-checker');
84
+ }
85
+ }
86
+
87
+ if ( empty($info->last_updated) ) {
88
+ //Fetch the latest commit that changed the tag or branch and use it as the "last_updated" date.
89
+ $latestCommitTime = $api->getLatestCommitTime($ref);
90
+ if ( $latestCommitTime !== null ) {
91
+ $info->last_updated = $latestCommitTime;
92
+ }
93
+ }
94
+
95
+ $info = apply_filters($this->getUniqueName('request_info_result'), $info, null);
96
+ return $info;
97
+ }
98
+
99
+ /**
100
+ * Check if the currently installed version has a readme.txt file.
101
+ *
102
+ * @return bool
103
+ */
104
+ protected function readmeTxtExistsLocally() {
105
+ $pluginDirectory = dirname($this->pluginAbsolutePath);
106
+ if ( empty($this->pluginAbsolutePath) || !is_dir($pluginDirectory) || ($pluginDirectory === '.') ) {
107
+ return false;
108
+ }
109
+ return is_file($pluginDirectory . '/readme.txt');
110
+ }
111
+
112
+ /**
113
+ * Copy plugin metadata from a file header to a Plugin Info object.
114
+ *
115
+ * @param array $fileHeader
116
+ * @param Puc_v4p1_Plugin_Info $pluginInfo
117
+ */
118
+ protected function setInfoFromHeader($fileHeader, $pluginInfo) {
119
+ $headerToPropertyMap = array(
120
+ 'Version' => 'version',
121
+ 'Name' => 'name',
122
+ 'PluginURI' => 'homepage',
123
+ 'Author' => 'author',
124
+ 'AuthorName' => 'author',
125
+ 'AuthorURI' => 'author_homepage',
126
+
127
+ 'Requires WP' => 'requires',
128
+ 'Tested WP' => 'tested',
129
+ 'Requires at least' => 'requires',
130
+ 'Tested up to' => 'tested',
131
+ );
132
+ foreach ($headerToPropertyMap as $headerName => $property) {
133
+ if ( isset($fileHeader[$headerName]) && !empty($fileHeader[$headerName]) ) {
134
+ $pluginInfo->$property = $fileHeader[$headerName];
135
+ }
136
+ }
137
+
138
+ if ( !empty($fileHeader['Description']) ) {
139
+ $pluginInfo->sections['description'] = $fileHeader['Description'];
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Copy plugin metadata from the remote readme.txt file.
145
+ *
146
+ * @param string $ref GitHub tag or branch where to look for the readme.
147
+ * @param Puc_v4p1_Plugin_Info $pluginInfo
148
+ */
149
+ protected function setInfoFromRemoteReadme($ref, $pluginInfo) {
150
+ $readme = $this->api->getRemoteReadme($ref);
151
+ if ( empty($readme) ) {
152
+ return;
153
+ }
154
+
155
+ if ( isset($readme['sections']) ) {
156
+ $pluginInfo->sections = array_merge($pluginInfo->sections, $readme['sections']);
157
+ }
158
+ if ( !empty($readme['tested_up_to']) ) {
159
+ $pluginInfo->tested = $readme['tested_up_to'];
160
+ }
161
+ if ( !empty($readme['requires_at_least']) ) {
162
+ $pluginInfo->requires = $readme['requires_at_least'];
163
+ }
164
+
165
+ if ( isset($readme['upgrade_notice'], $readme['upgrade_notice'][$pluginInfo->version]) ) {
166
+ $pluginInfo->upgrade_notice = $readme['upgrade_notice'][$pluginInfo->version];
167
+ }
168
+ }
169
+
170
+ public function setBranch($branch) {
171
+ $this->branch = $branch;
172
+ return $this;
173
+ }
174
+
175
+ public function setAuthentication($credentials) {
176
+ $this->api->setAuthentication($credentials);
177
+ return $this;
178
+ }
179
+
180
+ public function getUpdate() {
181
+ $update = parent::getUpdate();
182
+
183
+ if ( isset($update) && !empty($update->download_url) ) {
184
+ $update->download_url = $this->api->signDownloadUrl($update->download_url);
185
+ }
186
+
187
+ return $update;
188
+ }
189
+
190
+ public function onDisplayConfiguration($panel) {
191
+ parent::onDisplayConfiguration($panel);
192
+ $panel->row('Branch', $this->branch);
193
+ $panel->row('Authentication enabled', $this->api->isAuthenticationEnabled() ? 'Yes' : 'No');
194
+ $panel->row('API client', get_class($this->api));
195
+ }
196
+ }
197
+
198
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/Reference.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !class_exists('Puc_v4p1_Vcs_Reference', false) ):
3
+
4
+ /**
5
+ * This class represents a VCS branch or tag. It's intended as a read only, short-lived container
6
+ * that only exists to provide a limited degree of type checking.
7
+ *
8
+ * @property string $name
9
+ * @property string|null version
10
+ * @property string $downloadUrl
11
+ * @property string $updated
12
+ *
13
+ * @property string|null $changelog
14
+ * @property int|null $downloadCount
15
+ */
16
+ class Puc_v4p1_Vcs_Reference {
17
+ private $properties = array();
18
+
19
+ public function __construct($properties = array()) {
20
+ $this->properties = $properties;
21
+ }
22
+
23
+ /**
24
+ * @param string $name
25
+ * @return mixed|null
26
+ */
27
+ function __get($name) {
28
+ return array_key_exists($name, $this->properties) ? $this->properties[$name] : null;
29
+ }
30
+
31
+ /**
32
+ * @param string $name
33
+ * @param mixed $value
34
+ */
35
+ function __set($name, $value) {
36
+ $this->properties[$name] = $value;
37
+ }
38
+
39
+ /**
40
+ * @param string $name
41
+ * @return bool
42
+ */
43
+ function __isset($name) {
44
+ return isset($this->properties[$name]);
45
+ }
46
+
47
+ }
48
+
49
+ endif;
includes/ext/plugin-update-checker/Puc/v4p1/Vcs/ThemeUpdateChecker.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists('Puc_v4p1_Vcs_ThemeUpdateChecker', false) ):
4
+
5
+ class Puc_v4p1_Vcs_ThemeUpdateChecker extends Puc_v4p1_Theme_UpdateChecker implements Puc_v4p1_Vcs_BaseChecker {
6
+ /**
7
+ * @var string The branch where to look for updates. Defaults to "master".
8
+ */
9
+ protected $branch = 'master';
10
+
11
+ /**
12
+ * @var Puc_v4p1_Vcs_Api Repository API client.
13
+ */
14
+ protected $api = null;
15
+
16
+ /**
17
+ * Puc_v4p1_Vcs_ThemeUpdateChecker constructor.
18
+ *
19
+ * @param Puc_v4p1_Vcs_Api $api
20
+ * @param null $stylesheet
21
+ * @param null $customSlug
22
+ * @param int $checkPeriod
23
+ * @param string $optionName
24
+ */
25
+ public function __construct($api, $stylesheet = null, $customSlug = null, $checkPeriod = 12, $optionName = '') {
26
+ $this->api = $api;
27
+ $this->api->setHttpFilterName($this->getUniqueName('request_update_options'));
28
+
29
+ parent::__construct($api->getRepositoryUrl(), $stylesheet, $customSlug, $checkPeriod, $optionName);
30
+ }
31
+
32
+ public function requestUpdate() {
33
+ $api = $this->api;
34
+
35
+ $update = new Puc_v4p1_Theme_Update();
36
+ $update->slug = $this->slug;
37
+
38
+ //Figure out which reference (tag or branch) we'll use to get the latest version of the theme.
39
+ $updateSource = $api->chooseReference($this->branch);
40
+ if ( $updateSource ) {
41
+ $ref = $updateSource->name;
42
+ $update->download_url = $updateSource->downloadUrl;
43
+ } else {
44
+ $ref = $this->branch;
45
+ }
46
+
47
+ //Get headers from the main stylesheet in this branch/tag. Its "Version" header and other metadata
48
+ //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags.
49
+ $remoteHeader = $this->getFileHeader($api->getRemoteFile('style.css', $ref));
50
+ $update->version = Puc_v4p1_Utils::findNotEmpty(array(
51
+ $remoteHeader['Version'],
52
+ Puc_v4p1_Utils::get($updateSource, 'version'),
53
+ ));
54
+
55
+ //The details URL defaults to the Theme URI header or the repository URL.
56
+ $update->details_url = Puc_v4p1_Utils::findNotEmpty(array(
57
+ $remoteHeader['ThemeURI'],
58
+ $this->theme->get('ThemeURI'),
59
+ $this->metadataUrl,
60
+ ));
61
+
62
+ if ( empty($update->version) ) {
63
+ //It looks like we didn't find a valid update after all.
64
+ $update = null;
65
+ }
66
+
67
+ $update = $this->filterUpdateResult($update);
68
+ return $update;
69
+ }
70
+
71
+ //FIXME: This is duplicated code. Both theme and plugin subclasses that use VCS share these methods.
72
+
73
+ public function setBranch($branch) {
74
+ $this->branch = $branch;
75
+ return $this;
76
+ }
77
+
78
+ public function setAuthentication($credentials) {
79
+ $this->api->setAuthentication($credentials);
80
+ return $this;
81
+ }
82
+
83
+ public function getUpdate() {
84
+ $update = parent::getUpdate();
85
+
86
+ if ( isset($update) && !empty($update->download_url) ) {
87
+ $update->download_url = $this->api->signDownloadUrl($update->download_url);
88
+ }
89
+
90
+ return $update;
91
+ }
92
+
93
+ public function onDisplayConfiguration($panel) {
94
+ parent::onDisplayConfiguration($panel);
95
+ $panel->row('Branch', $this->branch);
96
+ $panel->row('Authentication enabled', $this->api->isAuthenticationEnabled() ? 'Yes' : 'No');
97
+ $panel->row('API client', get_class($this->api));
98
+ }
99
+ }
100
+
101
+ endif;
includes/ext/plugin-update-checker/plugin-update-checker.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Update Checker Library 4.1
4
+ * http://w-shadow.com/
5
+ *
6
+ * Copyright 2017 Janis Elsts
7
+ * Released under the MIT license. See license.txt for details.
8
+ */
9
+
10
+ require dirname(__FILE__) . '/Puc/v4/Factory.php';
11
+ require dirname(__FILE__) . '/Puc/v4p1/Autoloader.php';
12
+ new Puc_v4p1_Autoloader();
13
+
14
+ //Register classes defined in this file with the factory.
15
+ Puc_v4_Factory::addVersion('Plugin_UpdateChecker', 'Puc_v4p1_Plugin_UpdateChecker', '4.1');
16
+ Puc_v4_Factory::addVersion('Theme_UpdateChecker', 'Puc_v4p1_Theme_UpdateChecker', '4.1');
17
+
18
+ Puc_v4_Factory::addVersion('Vcs_PluginUpdateChecker', 'Puc_v4p1_Vcs_PluginUpdateChecker', '4.1');
19
+ Puc_v4_Factory::addVersion('Vcs_ThemeUpdateChecker', 'Puc_v4p1_Vcs_ThemeUpdateChecker', '4.1');
20
+
21
+ Puc_v4_Factory::addVersion('GitHubApi', 'Puc_v4p1_Vcs_GitHubApi', '4.1');
22
+ Puc_v4_Factory::addVersion('BitBucketApi', 'Puc_v4p1_Vcs_BitBucketApi', '4.1');
includes/ext/stopwords-json/README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # stopwords-json [![Build Status](https://travis-ci.org/6/stopwords-json.svg?branch=travis)](https://travis-ci.org/6/stopwords-json) [![npm](https://img.shields.io/npm/v/stopwords-json.svg?maxAge=3600)](https://www.npmjs.com/package/stopwords-json) [![Bower](https://img.shields.io/bower/v/stopwords-json.svg?maxAge=3600)](https://bower.io/)
2
+
3
+ Stopwords for various languages in JSON format. Per [Wikipedia](http://en.wikipedia.org/wiki/Stop_words):
4
+
5
+ > Stop words are words which are filtered out prior to, or after, processing of natural language data [...] these are some of the most common, short function words, such as *the*, *is*, *at*, *which*, and *on*.
6
+
7
+ You can use all stopwords with [stopwords-all.json](stopwords-all.json) (keyed by language ISO 639-1 code), or see the below table for individual language stopword files.
8
+
9
+ ## Languages
10
+ There are a total of 50 supported languages:
11
+
12
+ Language | Stopword count | Filename
13
+ --- | --- | ---
14
+ Afrikaans | 51 | [af.json](dist/af.json)
15
+ Arabic | 162 | [ar.json](dist/ar.json)
16
+ Armenian | 45 | [hy.json](dist/hy.json)
17
+ Basque | 98 | [eu.json](dist/eu.json)
18
+ Bengali | 116 | [bn.json](dist/bn.json)
19
+ Breton | 126 | [br.json](dist/br.json)
20
+ Bulgarian | 259 | [bg.json](dist/bg.json)
21
+ Catalan | 218 | [ca.json](dist/ca.json)
22
+ Chinese | 542 | [zh.json](dist/zh.json)
23
+ Croatian | 179 | [hr.json](dist/hr.json)
24
+ Czech | 346 | [cs.json](dist/cs.json)
25
+ Danish | 101 | [da.json](dist/da.json)
26
+ Dutch | 275 | [nl.json](dist/nl.json)
27
+ English | 570 | [en.json](dist/en.json)
28
+ Esperanto | 173 | [eo.json](dist/eo.json)
29
+ Estonian | 35 | [et.json](dist/et.json)
30
+ Finnish | 772 | [fi.json](dist/fi.json)
31
+ French | 606 | [fr.json](dist/fr.json)
32
+ Galician | 160 | [gl.json](dist/gl.json)
33
+ German | 596 | [de.json](dist/de.json)
34
+ Greek | 75 | [el.json](dist/el.json)
35
+ Hausa | 39 | [ha.json](dist/ha.json)
36
+ Hebrew | 194 | [he.json](dist/he.json)
37
+ Hindi | 225 | [hi.json](dist/hi.json)
38
+ Hungarian | 781 | [hu.json](dist/hu.json)
39
+ Indonesian | 355 | [id.json](dist/id.json)
40
+ Irish | 109 | [ga.json](dist/ga.json)
41
+ Italian | 619 | [it.json](dist/it.json)
42
+ Japanese | 109 | [ja.json](dist/ja.json)
43
+ Korean | 679 | [ko.json](dist/ko.json)
44
+ Latin | 49 | [la.json](dist/la.json)
45
+ Latvian | 161 | [lv.json](dist/lv.json)
46
+ Marathi | 99 | [mr.json](dist/mr.json)
47
+ Norwegian | 172 | [no.json](dist/no.json)
48
+ Persian | 332 | [fa.json](dist/fa.json)
49
+ Polish | 260 | [pl.json](dist/pl.json)
50
+ Portuguese | 408 | [pt.json](dist/pt.json)
51
+ Romanian | 282 | [ro.json](dist/ro.json)
52
+ Russian | 539 | [ru.json](dist/ru.json)
53
+ Slovak | 110 | [sk.json](dist/sk.json)
54
+ Slovenian | 446 | [sl.json](dist/sl.json)
55
+ Somalia | 30 | [so.json](dist/so.json)
56
+ Southern Sotho | 31 | [st.json](dist/st.json)
57
+ Spanish | 577 | [es.json](dist/es.json)
58
+ Swahili | 74 | [sw.json](dist/sw.json)
59
+ Swedish | 401 | [sv.json](dist/sv.json)
60
+ Thai | 115 | [th.json](dist/th.json)
61
+ Turkish | 279 | [tr.json](dist/tr.json)
62
+ Yoruba | 60 | [yo.json](dist/yo.json)
63
+ Zulu | 29 | [zu.json](dist/zu.json)
64
+
65
+
66
+ ## Sources
67
+
68
+ - [Apache Lucene](http://lucene.apache.org/) - [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)
69
+ - [Carrot2](https://github.com/carrot2/carrot2) - [License](http://project.carrot2.org/license.html)
70
+ - [cue.language](https://github.com/vcl/cue.language) - [Apache 2.0 License](https://github.com/vcl/cue.language/blob/master/license.txt)
71
+ - [Jacques Savoy](http://members.unine.ch/jacques.savoy/clef/index.html) - BSD License
72
+ - SMART Information Retrieval System: ftp://ftp.cs.cornell.edu/pub/smart/
73
+ - [ASP Stoplist Project](https://github.com/dohliam/more-stoplists) - CC-BY and Apache 2.0
74
+
75
+ ## License and Copyright
76
+ Copyright (c) 2017 Peter Graham, contributors.
77
+ Released under the Apache-2.0 license.
includes/ext/stopwords-json/dist/af.json ADDED
@@ -0,0 +1 @@
 
1
+ ["'n","aan","af","al","as","baie","by","daar","dag","dat","die","dit","een","ek","en","gaan","gesê","haar","het","hom","hulle","hy","in","is","jou","jy","kan","kom","ma","maar","met","my","na","nie","om","ons","op","saam","sal","se","sien","so","sy","te","toe","uit","van","vir","was","wat","ʼn"]
includes/ext/stopwords-json/dist/ar.json ADDED
@@ -0,0 +1 @@
 
1
+ ["،","أ","ا","اثر","اجل","احد","اخرى","اذا","اربعة","اطار","اعادة","اعلنت","اف","اكثر","اكد","الا","الاخيرة","الان","الاول","الاولى","التى","التي","الثاني","الثانية","الذاتي","الذى","الذي","الذين","السابق","الف","الماضي","المقبل","الوقت","الى","اليوم","اما","امام","امس","ان","انه","انها","او","اول","اي","ايار","ايام","ايضا","ب","باسم","بان","برس","بسبب","بشكل","بعد","بعض","بن","به","بها","بين","تم","ثلاثة","ثم","جميع","حاليا","حتى","حوالى","حول","حيث","حين","خلال","دون","ذلك","زيارة","سنة","سنوات","شخصا","صباح","صفر","ضد","ضمن","عام","عاما","عدة","عدد","عدم","عشر","عشرة","على","عليه","عليها","عن","عند","عندما","غدا","غير","ـ","ف","فان","فى","في","فيه","فيها","قال","قبل","قد","قوة","كان","كانت","كل","كلم","كما","لا","لدى","لقاء","لكن","للامم","لم","لن","له","لها","لوكالة","ما","مايو","مساء","مع","مقابل","مليار","مليون","من","منذ","منها","نحو","نفسه","نهاية","هذا","هذه","هناك","هو","هي","و","و6","واحد","واضاف","واضافت","واكد","وان","واوضح","وفي","وقال","وقالت","وقد","وقف","وكان","وكانت","ولا","ولم","ومن","وهو","وهي","يكون","يمكن","يوم"]
includes/ext/stopwords-json/dist/bg.json ADDED
@@ -0,0 +1 @@
 
1
+ ["а","автентичен","аз","ако","ала","бе","без","беше","би","бивш","бивша","бившо","бил","била","били","било","благодаря","близо","бъдат","бъде","бяха","в","вас","ваш","ваша","вероятно","вече","взема","ви","вие","винаги","внимава","време","все","всеки","всички","всичко","всяка","във","въпреки","върху","г","ги","главен","главна","главно","глас","го","година","години","годишен","д","да","дали","два","двама","двамата","две","двете","ден","днес","дни","до","добра","добре","добро","добър","докато","докога","дори","досега","доста","друг","друга","други","е","евтин","едва","един","една","еднаква","еднакви","еднакъв","едно","екип","ето","живот","за","забавям","зад","заедно","заради","засега","заспал","затова","защо","защото","и","из","или","им","има","имат","иска","й","каза","как","каква","какво","както","какъв","като","кога","когато","което","които","кой","който","колко","която","къде","където","към","лесен","лесно","ли","лош","м","май","малко","ме","между","мек","мен","месец","ми","много","мнозина","мога","могат","може","мокър","моля","момента","му","н","на","над","назад","най","направи","напред","например","нас","не","него","нещо","нея","ни","ние","никой","нито","нищо","но","нов","нова","нови","новина","някои","някой","няколко","няма","обаче","около","освен","особено","от","отгоре","отново","още","пак","по","повече","повечето","под","поне","поради","после","почти","прави","пред","преди","през","при","пък","първата","първи","първо","пъти","равен","равна","с","са","сам","само","се","сега","си","син","скоро","след","следващ","сме","смях","според","сред","срещу","сте","съм","със","също","т","т.н.","тази","така","такива","такъв","там","твой","те","тези","ти","то","това","тогава","този","той","толкова","точно","три","трябва","тук","тъй","тя","тях","у","утре","харесва","хиляди","ч","часа","че","често","чрез","ще","щом","юмрук","я","як"]
includes/ext/stopwords-json/dist/bn.json ADDED
@@ -0,0 +1 @@
 
1
+ ["অনেক","অন্য","অবশ্য","আগে","আছে","আজ","আবার","আমরা","আমাদের","আর","ই","উত্তর","উপর","উপরে","এ","এই","এক্","এখন","এত","এব","এমন","এমনি","এর","এস","এসে","ও","ওই","কমনে","করা","করে","কাছে","কাজ","কাজে","কারণ","কি","কিছু","কে","কেউ","কেখা","কেন","কোটি","কোনো","কয়েক","খুব","গিয়ে","গেল","চার","চালু","চেষ্টা","ছিল","জানা","জ্নজন","টি","তখন","তবে","তা","তাই","তো","থাকা","থেকে","দিন","দু","দুই","দেওয়া","ধামার","নতুন","না","নাগাদ","নিয়ে","নেওয়া","নয়","পর","পরে","পাচ","পি","পেয়্র্","প্রতি","প্রথম","প্রযন্ত","প্রাথমিক","প্রায়","বক্তব্য","বন","বলা","বলে","বলেন","বহু","বা","বি","বিভিন্ন","বেশ","বেশি","মতো","মধ্যে","মনে","যখন","যদি","যা","যাওয়া","যে","র","রকম","লক্ষ","শুধু","শুরু","সঙ্গে","সব","সহ","সাধারণ","সামনে","সি","সে","সেই","হতে","হাজার","হয়"]
includes/ext/stopwords-json/dist/br.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","ainda","alem","ambas","ambos","antes","ao","aonde","aos","apos","aquele","aqueles","as","assim","com","como","contra","contudo","cuja","cujas","cujo","cujos","da","das","de","dela","dele","deles","demais","depois","desde","desta","deste","dispoe","dispoem","diversa","diversas","diversos","do","dos","durante","e","ela","elas","ele","eles","em","entao","entre","essa","essas","esse","esses","esta","estas","este","estes","ha","isso","isto","logo","mais","mas","mediante","menos","mesma","mesmas","mesmo","mesmos","na","nao","nas","nem","nesse","neste","nos","o","os","ou","outra","outras","outro","outros","pelas","pelo","pelos","perante","pois","por","porque","portanto","propios","proprio","quais","qual","qualquer","quando","quanto","que","quem","quer","se","seja","sem","sendo","seu","seus","sob","sobre","sua","suas","tal","tambem","teu","teus","toda","todas","todo","todos","tua","tuas","tudo","um","uma","umas","uns"]
includes/ext/stopwords-json/dist/ca.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","abans","ací","ah","així","això","al","aleshores","algun","alguna","algunes","alguns","alhora","allà","allí","allò","als","altra","altre","altres","amb","ambdues","ambdós","apa","aquell","aquella","aquelles","aquells","aquest","aquesta","aquestes","aquests","aquí","baix","cada","cadascuna","cadascunes","cadascuns","cadascú","com","contra","d'un","d'una","d'unes","d'uns","dalt","de","del","dels","des","després","dins","dintre","donat","doncs","durant","e","eh","el","els","em","en","encara","ens","entre","eren","es","esta","estaven","esteu","està","estàvem","estàveu","et","etc","ets","fins","fora","gairebé","ha","han","has","havia","he","hem","heu","hi","ho","i","igual","iguals","ja","l'hi","la","les","li","li'n","llavors","m'he","ma","mal","malgrat","mateix","mateixa","mateixes","mateixos","me","mentre","meu","meus","meva","meves","molt","molta","moltes","molts","mon","mons","més","n'he","n'hi","ne","ni","no","nogensmenys","només","nosaltres","nostra","nostre","nostres","o","oh","oi","on","pas","pel","pels","per","perquè","però","poc","poca","pocs","poques","potser","propi","qual","quals","quan","quant","que","quelcom","qui","quin","quina","quines","quins","què","s'ha","s'han","sa","semblant","semblants","ses","seu","seus","seva","seves","si","sobre","sobretot","solament","sols","son","sons","sota","sou","sóc","són","t'ha","t'han","t'he","ta","tal","també","tampoc","tan","tant","tanta","tantes","teu","teus","teva","teves","ton","tons","tot","tota","totes","tots","un","una","unes","uns","us","va","vaig","vam","van","vas","veu","vosaltres","vostra","vostre","vostres","érem","éreu","és"]
includes/ext/stopwords-json/dist/cs.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","aby","ahoj","aj","ale","anebo","ani","ano","asi","aspoň","atd","atp","ačkoli","až","bez","beze","blízko","bohužel","brzo","bude","budem","budeme","budete","budeš","budou","budu","by","byl","byla","byli","bylo","byly","bys","být","během","chce","chceme","chcete","chceš","chci","chtít","chtějí","chut'","chuti","co","což","cz","daleko","další","den","deset","devatenáct","devět","dnes","do","dobrý","docela","dva","dvacet","dvanáct","dvě","dál","dále","děkovat","děkujeme","děkuji","ho","hodně","i","jak","jakmile","jako","jakož","jde","je","jeden","jedenáct","jedna","jedno","jednou","jedou","jeho","jehož","jej","jejich","její","jelikož","jemu","jen","jenom","jestli","jestliže","ještě","jež","ji","jich","jimi","jinak","jiné","již","jsem","jseš","jsi","jsme","jsou","jste","já","jí","jím","jíž","k","kam","kde","kdo","kdy","když","ke","kolik","kromě","kterou","která","které","který","kteří","kvůli","mají","mezi","mi","mne","mnou","mně","moc","mohl","mohou","moje","moji","možná","musí","my","má","málo","mám","máme","máte","máš","mé","mí","mít","mě","můj","může","na","nad","nade","napište","naproti","načež","naše","naši","ne","nebo","nebyl","nebyla","nebyli","nebyly","nedělají","nedělá","nedělám","neděláme","neděláte","neděláš","neg","nejsi","nejsou","nemají","nemáme","nemáte","neměl","není","nestačí","nevadí","než","nic","nich","nimi","nové","nový","nula","nám","námi","nás","náš","ním","ně","něco","nějak","někde","někdo","němu","němuž","o","od","ode","on","ona","oni","ono","ony","osm","osmnáct","pak","patnáct","po","pod","podle","pokud","potom","pouze","pozdě","pořád","pravé","pro","prostě","prosím","proti","proto","protože","proč","první","pta","pět","před","přes","přese","při","přičemž","re","rovně","s","se","sedm","sedmnáct","si","skoro","smí","smějí","snad","spolu","sta","sto","strana","sté","své","svých","svým","svými","ta","tady","tak","takhle","taky","také","takže","tam","tamhle","tamhleto","tamto","tato","tebe","tebou","ted'","tedy","ten","tento","teto","ti","tipy","tisíc","tisíce","to","tobě","tohle","toho","tohoto","tom","tomto","tomu","tomuto","toto","trošku","tu","tuto","tvoje","tvá","tvé","tvůj","ty","tyto","téma","tím","tímto","tě","těm","těmu","třeba","tři","třináct","u","určitě","už","v","vaše","vaši","ve","vedle","večer","vlastně","vy","vám","vámi","vás","váš","více","však","všechno","všichni","vůbec","vždy","z","za","zatímco","zač","zda","zde","ze","zprávy","zpět","čau","či","článku","články","čtrnáct","čtyři","šest","šestnáct","že"]
includes/ext/stopwords-json/dist/da.json ADDED
@@ -0,0 +1 @@
 
1
+ ["af","alle","andet","andre","at","begge","da","de","den","denne","der","deres","det","dette","dig","din","dog","du","ej","eller","en","end","ene","eneste","enhver","et","fem","fire","flere","fleste","for","fordi","forrige","fra","få","før","god","han","hans","har","hendes","her","hun","hvad","hvem","hver","hvilken","hvis","hvor","hvordan","hvorfor","hvornår","i","ikke","ind","ingen","intet","jeg","jeres","kan","kom","kommer","lav","lidt","lille","man","mand","mange","med","meget","men","mens","mere","mig","ned","ni","nogen","noget","ny","nyt","nær","næste","næsten","og","op","otte","over","på","se","seks","ses","som","stor","store","syv","ti","til","to","tre","ud","var"]
includes/ext/stopwords-json/dist/de.json ADDED
@@ -0,0 +1 @@
 
1
+ ["Ernst","Ordnung","Schluss","a","ab","aber","ach","acht","achte","achten","achter","achtes","ag","alle","allein","allem","allen","aller","allerdings","alles","allgemeinen","als","also","am","an","andere","anderen","andern","anders","au","auch","auf","aus","ausser","ausserdem","außer","außerdem","b","bald","bei","beide","beiden","beim","beispiel","bekannt","bereits","besonders","besser","besten","bin","bis","bisher","bist","c","d","d.h","da","dabei","dadurch","dafür","dagegen","daher","dahin","dahinter","damals","damit","danach","daneben","dank","dann","daran","darauf","daraus","darf","darfst","darin","darum","darunter","darüber","das","dasein","daselbst","dass","dasselbe","davon","davor","dazu","dazwischen","daß","dein","deine","deinem","deiner","dem","dementsprechend","demgegenüber","demgemäss","demgemäß","demselben","demzufolge","den","denen","denn","denselben","der","deren","derjenige","derjenigen","dermassen","dermaßen","derselbe","derselben","des","deshalb","desselben","dessen","deswegen","dich","die","diejenige","diejenigen","dies","diese","dieselbe","dieselben","diesem","diesen","dieser","dieses","dir","doch","dort","drei","drin","dritte","dritten","dritter","drittes","du","durch","durchaus","durfte","durften","dürfen","dürft","e","eben","ebenso","ehrlich","ei","ei,","eigen","eigene","eigenen","eigener","eigenes","ein","einander","eine","einem","einen","einer","eines","einige","einigen","einiger","einiges","einmal","eins","elf","en","ende","endlich","entweder","er","erst","erste","ersten","erster","erstes","es","etwa","etwas","euch","euer","eure","f","folgende","früher","fünf","fünfte","fünften","fünfter","fünftes","für","g","gab","ganz","ganze","ganzen","ganzer","ganzes","gar","gedurft","gegen","gegenüber","gehabt","gehen","geht","gekannt","gekonnt","gemacht","gemocht","gemusst","genug","gerade","gern","gesagt","geschweige","gewesen","gewollt","geworden","gibt","ging","gleich","gott","gross","grosse","grossen","grosser","grosses","groß","große","großen","großer","großes","gut","gute","guter","gutes","h","habe","haben","habt","hast","hat","hatte","hatten","hattest","hattet","heisst","her","heute","hier","hin","hinter","hoch","hätte","hätten","i","ich","ihm","ihn","ihnen","ihr","ihre","ihrem","ihren","ihrer","ihres","im","immer","in","indem","infolgedessen","ins","irgend","ist","j","ja","jahr","jahre","jahren","je","jede","jedem","jeden","jeder","jedermann","jedermanns","jedes","jedoch","jemand","jemandem","jemanden","jene","jenem","jenen","jener","jenes","jetzt","k","kam","kann","kannst","kaum","kein","keine","keinem","keinen","keiner","kleine","kleinen","kleiner","kleines","kommen","kommt","konnte","konnten","kurz","können","könnt","könnte","l","lang","lange","leicht","leide","lieber","los","m","machen","macht","machte","mag","magst","mahn","mal","man","manche","manchem","manchen","mancher","manches","mann","mehr","mein","meine","meinem","meinen","meiner","meines","mensch","menschen","mich","mir","mit","mittel","mochte","mochten","morgen","muss","musst","musste","mussten","muß","mußt","möchte","mögen","möglich","mögt","müssen","müsst","müßt","n","na","nach","nachdem","nahm","natürlich","neben","nein","neue","neuen","neun","neunte","neunten","neunter","neuntes","nicht","nichts","nie","niemand","niemandem","niemanden","noch","nun","nur","o","ob","oben","oder","offen","oft","ohne","p","q","r","recht","rechte","rechten","rechter","rechtes","richtig","rund","s","sa","sache","sagt","sagte","sah","satt","schlecht","schon","sechs","sechste","sechsten","sechster","sechstes","sehr","sei","seid","seien","sein","seine","seinem","seinen","seiner","seines","seit","seitdem","selbst","sich","sie","sieben","siebente","siebenten","siebenter","siebentes","sind","so","solang","solche","solchem","solchen","solcher","solches","soll","sollen","sollst","sollt","sollte","sollten","sondern","sonst","soweit","sowie","später","startseite","statt","steht","suche","t","tag","tage","tagen","tat","teil","tel","tritt","trotzdem","tun","u","uhr","um","und","und?","uns","unser","unsere","unserer","unter","v","vergangenen","viel","viele","vielem","vielen","vielleicht","vier","vierte","vierten","vierter","viertes","vom","von","vor","w","wahr?","wann","war","waren","wart","warum","was","wegen","weil","weit","weiter","weitere","weiteren","weiteres","welche","welchem","welchen","welcher","welches","wem","wen","wenig","wenige","weniger","weniges","wenigstens","wenn","wer","werde","werden","werdet","weshalb","wessen","wie","wieder","wieso","will","willst","wir","wird","wirklich","wirst","wissen","wo","wohl","wollen","wollt","wollte","wollten","worden","wurde","wurden","während","währenddem","währenddessen","wäre","würde","würden","x","y","z","z.b","zehn","zehnte","zehnten","zehnter","zehntes","zeit","zu","zuerst","zugleich","zum","zunächst","zur","zurück","zusammen","zwanzig","zwar","zwei","zweite","zweiten","zweiter","zweites","zwischen","zwölf","über","überhaupt","übrigens"]
includes/ext/stopwords-json/dist/el.json ADDED
@@ -0,0 +1 @@
 
1
+ ["αλλα","αν","αντι","απο","αυτα","αυτεσ","αυτη","αυτο","αυτοι","αυτοσ","αυτουσ","αυτων","για","δε","δεν","εαν","ειμαι","ειμαστε","ειναι","εισαι","ειστε","εκεινα","εκεινεσ","εκεινη","εκεινο","εκεινοι","εκεινοσ","εκεινουσ","εκεινων","ενω","επι","η","θα","ισωσ","κ","και","κατα","κι","μα","με","μετα","μη","μην","να","ο","οι","ομωσ","οπωσ","οσο","οτι","παρα","ποια","ποιεσ","ποιο","ποιοι","ποιοσ","ποιουσ","ποιων","που","προσ","πωσ","σε","στη","στην","στο","στον","τα","την","τησ","το","τον","τοτε","του","των","ωσ"]
includes/ext/stopwords-json/dist/en.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","a's","able","about","above","according","accordingly","across","actually","after","afterwards","again","against","ain't","all","allow","allows","almost","alone","along","already","also","although","always","am","among","amongst","an","and","another","any","anybody","anyhow","anyone","anything","anyway","anyways","anywhere","apart","appear","appreciate","appropriate","are","aren't","around","as","aside","ask","asking","associated","at","available","away","awfully","b","be","became","because","become","becomes","becoming","been","before","beforehand","behind","being","believe","below","beside","besides","best","better","between","beyond","both","brief","but","by","c","c'mon","c's","came","can","can't","cannot","cant","cause","causes","certain","certainly","changes","clearly","co","com","come","comes","concerning","consequently","consider","considering","contain","containing","contains","corresponding","could","couldn't","course","currently","d","definitely","described","despite","did","didn't","different","do","does","doesn't","doing","don't","done","down","downwards","during","e","each","edu","eg","eight","either","else","elsewhere","enough","entirely","especially","et","etc","even","ever","every","everybody","everyone","everything","everywhere","ex","exactly","example","except","f","far","few","fifth","first","five","followed","following","follows","for","former","formerly","forth","four","from","further","furthermore","g","get","gets","getting","given","gives","go","goes","going","gone","got","gotten","greetings","h","had","hadn't","happens","hardly","has","hasn't","have","haven't","having","he","he's","hello","help","hence","her","here","here's","hereafter","hereby","herein","hereupon","hers","herself","hi","him","himself","his","hither","hopefully","how","howbeit","however","i","i'd","i'll","i'm","i've","ie","if","ignored","immediate","in","inasmuch","inc","indeed","indicate","indicated","indicates","inner","insofar","instead","into","inward","is","isn't","it","it'd","it'll","it's","its","itself","j","just","k","keep","keeps","kept","know","known","knows","l","last","lately","later","latter","latterly","least","less","lest","let","let's","like","liked","likely","little","look","looking","looks","ltd","m","mainly","many","may","maybe","me","mean","meanwhile","merely","might","more","moreover","most","mostly","much","must","my","myself","n","name","namely","nd","near","nearly","necessary","need","needs","neither","never","nevertheless","new","next","nine","no","nobody","non","none","noone","nor","normally","not","nothing","novel","now","nowhere","o","obviously","of","off","often","oh","ok","okay","old","on","once","one","ones","only","onto","or","other","others","otherwise","ought","our","ours","ourselves","out","outside","over","overall","own","p","particular","particularly","per","perhaps","placed","please","plus","possible","presumably","probably","provides","q","que","quite","qv","r","rather","rd","re","really","reasonably","regarding","regardless","regards","relatively","respectively","right","s","said","same","saw","say","saying","says","second","secondly","see","seeing","seem","seemed","seeming","seems","seen","self","selves","sensible","sent","serious","seriously","seven","several","shall","she","should","shouldn't","since","six","so","some","somebody","somehow","someone","something","sometime","sometimes","somewhat","somewhere","soon","sorry","specified","specify","specifying","still","sub","such","sup","sure","t","t's","take","taken","tell","tends","th","than","thank","thanks","thanx","that","that's","thats","the","their","theirs","them","themselves","then","thence","there","there's","thereafter","thereby","therefore","therein","theres","thereupon","these","they","they'd","they'll","they're","they've","think","third","this","thorough","thoroughly","those","though","three","through","throughout","thru","thus","to","together","too","took","toward","towards","tried","tries","truly","try","trying","twice","two","u","un","under","unfortunately","unless","unlikely","until","unto","up","upon","us","use","used","useful","uses","using","usually","uucp","v","value","various","very","via","viz","vs","w","want","wants","was","wasn't","way","we","we'd","we'll","we're","we've","welcome","well","went","were","weren't","what","what's","whatever","when","whence","whenever","where","where's","whereafter","whereas","whereby","wherein","whereupon","wherever","whether","which","while","whither","who","who's","whoever","whole","whom","whose","why","will","willing","wish","with","within","without","won't","wonder","would","wouldn't","x","y","yes","yet","you","you'd","you'll","you're","you've","your","yours","yourself","yourselves","z","zero"]
includes/ext/stopwords-json/dist/eo.json ADDED
@@ -0,0 +1 @@
 
1
+ ["adiaŭ","ajn","al","ankoraŭ","antaŭ","aŭ","bonan","bonvole","bonvolu","bv","ci","cia","cian","cin","d-ro","da","de","dek","deka","do","doktor'","doktoro","du","dua","dum","eble","ekz","ekzemple","en","estas","estis","estos","estu","estus","eĉ","f-no","feliĉan","for","fraŭlino","ha","havas","havis","havos","havu","havus","he","ho","hu","ili","ilia","ilian","ilin","inter","io","ion","iu","iujn","iun","ja","jam","je","jes","k","kaj","ke","kio","kion","kiu","kiujn","kiun","kvankam","kvar","kvara","kvazaŭ","kvin","kvina","la","li","lia","lian","lin","malantaŭ","male","malgraŭ","mem","mi","mia","mian","min","minus","naŭ","naŭa","ne","nek","nenio","nenion","neniu","neniun","nepre","ni","nia","nian","nin","nu","nun","nur","ok","oka","oni","onia","onian","onin","plej","pli","plu","plus","por","post","preter","s-no","s-ro","se","sed","sep","sepa","ses","sesa","si","sia","sian","sin","sinjor'","sinjorino","sinjoro","sub","super","supren","sur","tamen","tio","tion","tiu","tiujn","tiun","tra","tri","tria","tuj","tute","unu","unua","ve","verŝajne","vi","via","vian","vin","ĉi","ĉio","ĉion","ĉiu","ĉiujn","ĉiun","ĉu","ĝi","ĝia","ĝian","ĝin","ĝis","ĵus","ŝi","ŝia","ŝin"]
includes/ext/stopwords-json/dist/es.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","actualmente","acuerdo","adelante","ademas","además","adrede","afirmó","agregó","ahi","ahora","ahí","al","algo","alguna","algunas","alguno","algunos","algún","alli","allí","alrededor","ambos","ampleamos","antano","antaño","ante","anterior","antes","apenas","aproximadamente","aquel","aquella","aquellas","aquello","aquellos","aqui","aquél","aquélla","aquéllas","aquéllos","aquí","arriba","arribaabajo","aseguró","asi","así","atras","aun","aunque","ayer","añadió","aún","b","bajo","bastante","bien","breve","buen","buena","buenas","bueno","buenos","c","cada","casi","cerca","cierta","ciertas","cierto","ciertos","cinco","claro","comentó","como","con","conmigo","conocer","conseguimos","conseguir","considera","consideró","consigo","consigue","consiguen","consigues","contigo","contra","cosas","creo","cual","cuales","cualquier","cuando","cuanta","cuantas","cuanto","cuantos","cuatro","cuenta","cuál","cuáles","cuándo","cuánta","cuántas","cuánto","cuántos","cómo","d","da","dado","dan","dar","de","debajo","debe","deben","debido","decir","dejó","del","delante","demasiado","demás","dentro","deprisa","desde","despacio","despues","después","detras","detrás","dia","dias","dice","dicen","dicho","dieron","diferente","diferentes","dijeron","dijo","dio","donde","dos","durante","día","días","dónde","e","ejemplo","el","ella","ellas","ello","ellos","embargo","empleais","emplean","emplear","empleas","empleo","en","encima","encuentra","enfrente","enseguida","entonces","entre","era","eramos","eran","eras","eres","es","esa","esas","ese","eso","esos","esta","estaba","estaban","estado","estados","estais","estamos","estan","estar","estará","estas","este","esto","estos","estoy","estuvo","está","están","ex","excepto","existe","existen","explicó","expresó","f","fin","final","fue","fuera","fueron","fui","fuimos","g","general","gran","grandes","gueno","h","ha","haber","habia","habla","hablan","habrá","había","habían","hace","haceis","hacemos","hacen","hacer","hacerlo","haces","hacia","haciendo","hago","han","hasta","hay","haya","he","hecho","hemos","hicieron","hizo","horas","hoy","hubo","i","igual","incluso","indicó","informo","informó","intenta","intentais","intentamos","intentan","intentar","intentas","intento","ir","j","junto","k","l","la","lado","largo","las","le","lejos","les","llegó","lleva","llevar","lo","los","luego","lugar","m","mal","manera","manifestó","mas","mayor","me","mediante","medio","mejor","mencionó","menos","menudo","mi","mia","mias","mientras","mio","mios","mis","misma","mismas","mismo","mismos","modo","momento","mucha","muchas","mucho","muchos","muy","más","mí","mía","mías","mío","míos","n","nada","nadie","ni","ninguna","ningunas","ninguno","ningunos","ningún","no","nos","nosotras","nosotros","nuestra","nuestras","nuestro","nuestros","nueva","nuevas","nuevo","nuevos","nunca","o","ocho","os","otra","otras","otro","otros","p","pais","para","parece","parte","partir","pasada","pasado","paìs","peor","pero","pesar","poca","pocas","poco","pocos","podeis","podemos","poder","podria","podriais","podriamos","podrian","podrias","podrá","podrán","podría","podrían","poner","por","porque","posible","primer","primera","primero","primeros","principalmente","pronto","propia","propias","propio","propios","proximo","próximo","próximos","pudo","pueda","puede","pueden","puedo","pues","q","qeu","que","quedó","queremos","quien","quienes","quiere","quiza","quizas","quizá","quizás","quién","quiénes","qué","r","raras","realizado","realizar","realizó","repente","respecto","s","sabe","sabeis","sabemos","saben","saber","sabes","salvo","se","sea","sean","segun","segunda","segundo","según","seis","ser","sera","será","serán","sería","señaló","si","sido","siempre","siendo","siete","sigue","siguiente","sin","sino","sobre","sois","sola","solamente","solas","solo","solos","somos","son","soy","soyos","su","supuesto","sus","suya","suyas","suyo","sé","sí","sólo","t","tal","tambien","también","tampoco","tan","tanto","tarde","te","temprano","tendrá","tendrán","teneis","tenemos","tener","tenga","tengo","tenido","tenía","tercera","ti","tiempo","tiene","tienen","toda","todas","todavia","todavía","todo","todos","total","trabaja","trabajais","trabajamos","trabajan","trabajar","trabajas","trabajo","tras","trata","través","tres","tu","tus","tuvo","tuya","tuyas","tuyo","tuyos","tú","u","ultimo","un","una","unas","uno","unos","usa","usais","usamos","usan","usar","usas","uso","usted","ustedes","v","va","vais","valor","vamos","van","varias","varios","vaya","veces","ver","verdad","verdadera","verdadero","vez","vosotras","vosotros","voy","vuestra","vuestras","vuestro","vuestros","w","x","y","ya","yo","z","él","ésa","ésas","ése","ésos","ésta","éstas","éste","éstos","última","últimas","último","últimos"]
includes/ext/stopwords-json/dist/et.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aga","ei","et","ja","jah","kas","kui","kõik","ma","me","mida","midagi","mind","minu","mis","mu","mul","mulle","nad","nii","oled","olen","oli","oma","on","pole","sa","seda","see","selle","siin","siis","ta","te","ära"]
includes/ext/stopwords-json/dist/eu.json ADDED
@@ -0,0 +1 @@
 
1
+ ["al","anitz","arabera","asko","baina","bat","batean","batek","bati","batzuei","batzuek","batzuetan","batzuk","bera","beraiek","berau","berauek","bere","berori","beroriek","beste","bezala","da","dago","dira","ditu","du","dute","edo","egin","ere","eta","eurak","ez","gainera","gu","gutxi","guzti","haiei","haiek","haietan","hainbeste","hala","han","handik","hango","hara","hari","hark","hartan","hau","hauei","hauek","hauetan","hemen","hemendik","hemengo","hi","hona","honek","honela","honetan","honi","hor","hori","horiei","horiek","horietan","horko","horra","horrek","horrela","horretan","horri","hortik","hura","izan","ni","noiz","nola","non","nondik","nongo","nor","nora","ze","zein","zen","zenbait","zenbat","zer","zergatik","ziren","zituen","zu","zuek","zuen","zuten"]
includes/ext/stopwords-json/dist/fa.json ADDED
@@ -0,0 +1 @@
 
1
+ ["آباد","آره","آری","آمد","آمده","آن","آنان","آنجا","آنكه","آنها","آنچه","آورد","آورده","آيد","آیا","اثرِ","از","است","استفاده","اش","اكنون","البته","البتّه","ام","اما","امروز","امسال","اند","انکه","او","اول","اي","ايشان","ايم","اين","اينكه","اگر","با","بار","بارة","باره","باشد","باشند","باشيم","بالا","بالایِ","بايد","بدون","بر","برابرِ","براساس","براي","برایِ","برخوردار","برخي","برداري","بروز","بسيار","بسياري","بعد","بعری","بعضي","بلكه","بله","بلکه","بلی","بنابراين","بندي","به","بهترين","بود","بودن","بودند","بوده","بي","بيست","بيش","بيشتر","بيشتري","بين","بی","بیرونِ","تا","تازه","تاكنون","تان","تحت","تر","ترين","تمام","تمامي","تنها","تواند","توانند","توسط","تولِ","تویِ","جا","جاي","جايي","جدا","جديد","جريان","جز","جلوگيري","جلویِ","حتي","حدودِ","حق","خارجِ","خدمات","خواست","خواهد","خواهند","خواهيم","خود","خويش","خیاه","داد","دادن","دادند","داده","دارد","دارند","داريم","داشت","داشتن","داشتند","داشته","دانست","دانند","در","درباره","دنبالِ","ده","دهد","دهند","دو","دوم","ديده","ديروز","ديگر","ديگران","ديگري","دیگر","را","راه","رفت","رفته","روب","روزهاي","روي","رویِ","ريزي","زياد","زير","زيرا","زیرِ","سابق","ساخته","سازي","سراسر","سریِ","سعي","سمتِ","سوم","سوي","سویِ","سپس","شان","شايد","شد","شدن","شدند","شده","شش","شما","شناسي","شود","شوند","صورت","ضدِّ","ضمن","طبقِ","طريق","طور","طي","عقبِ","علّتِ","عنوانِ","غير","فقط","فكر","فوق","قابل","قبل","قصدِ","كرد","كردم","كردن","كردند","كرده","كسي","كل","كمتر","كند","كنم","كنند","كنيد","كنيم","كه","لطفاً","ما","مان","مانند","مانندِ","مثل","مثلِ","مختلف","مدّتی","مردم","مرسی","مقابل","من","مورد","مي","ميليارد","ميليون","مگر","ناشي","نام","نبايد","نبود","نخست","نخستين","نخواهد","ندارد","ندارند","نداشته","نزديك","نزدِ","نزدیکِ","نشان","نشده","نظير","نكرده","نمايد","نمي","نه","نوعي","نيز","نيست","ها","هاي","هايي","هر","هرگز","هزار","هست","هستند","هستيم","هفت","هم","همان","همه","همواره","همين","همچنان","همچنين","همچون","همین","هنوز","هنگام","هنگامِ","هنگامی","هيچ","هیچ","و","وسطِ","وقتي","وقتیکه","ولی","وي","وگو","يا","يابد","يك","يكديگر","يكي","ّه","پاعینِ","پس","پنج","پيش","پیش","پیشِ","چرا","چطور","چند","چندین","چنين","چه","چهار","چون","چيزي","چگونه","چیز","چیزی","چیست","کجا","کجاست","کدام","کس","کسی","کنارِ","که","کَی","کی","گذاري","گذاشته","گردد","گرفت","گرفته","گروهي","گفت","گفته","گويد","گويند","گيرد","گيري","یا","یک"]
includes/ext/stopwords-json/dist/fi.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aiemmin","aika","aikaa","aikaan","aikaisemmin","aikaisin","aikajen","aikana","aikoina","aikoo","aikovat","aina","ainakaan","ainakin","ainoa","ainoat","aiomme","aion","aiotte","aist","aivan","ajan","alas","alemmas","alkuisin","alkuun","alla","alle","aloitamme","aloitan","aloitat","aloitatte","aloitattivat","aloitettava","aloitettevaksi","aloitettu","aloitimme","aloitin","aloitit","aloititte","aloittaa","aloittamatta","aloitti","aloittivat","alta","aluksi","alussa","alusta","annettavaksi","annetteva","annettu","ansiosta","antaa","antamatta","antoi","aoua","apu","asia","asiaa","asian","asiasta","asiat","asioiden","asioihin","asioita","asti","avuksi","avulla","avun","avutta","edelle","edelleen","edellä","edeltä","edemmäs","edes","edessä","edestä","ehkä","ei","eikä","eilen","eivät","eli","ellei","elleivät","ellemme","ellen","ellet","ellette","emme","en","enemmän","eniten","ennen","ensi","ensimmäinen","ensimmäiseksi","ensimmäisen","ensimmäisenä","ensimmäiset","ensimmäisiksi","ensimmäisinä","ensimmäisiä","ensimmäistä","ensin","entinen","entisen","entisiä","entisten","entistä","enää","eri","erittäin","erityisesti","eräiden","eräs","eräät","esi","esiin","esillä","esimerkiksi","et","eteen","etenkin","etessa","ette","ettei","että","haikki","halua","haluaa","haluamatta","haluamme","haluan","haluat","haluatte","haluavat","halunnut","halusi","halusimme","halusin","halusit","halusitte","halusivat","halutessa","haluton","he","hei","heidän","heihin","heille","heiltä","heissä","heistä","heitä","helposti","heti","hetkellä","hieman","hitaasti","hoikein","huolimatta","huomenna","hyvien","hyviin","hyviksi","hyville","hyviltä","hyvin","hyvinä","hyvissä","hyvistä","hyviä","hyvä","hyvät","hyvää","hän","häneen","hänelle","hänellä","häneltä","hänen","hänessä","hänestä","hänet","ihan","ilman","ilmeisesti","itse","itsensä","itseään","ja","jo","johon","joiden","joihin","joiksi","joilla","joille","joilta","joissa","joista","joita","joka","jokainen","jokin","joko","joku","jolla","jolle","jolloin","jolta","jompikumpi","jonka","jonkin","jonne","joo","jopa","jos","joskus","jossa","josta","jota","jotain","joten","jotenkin","jotenkuten","jotka","jotta","jouduimme","jouduin","jouduit","jouduitte","joudumme","joudun","joudutte","joukkoon","joukossa","joukosta","joutua","joutui","joutuivat","joutumaan","joutuu","joutuvat","juuri","jälkeen","jälleen","jää","kahdeksan","kahdeksannen","kahdella","kahdelle","kahdelta","kahden","kahdessa","kahdesta","kahta","kahteen","kai","kaiken","kaikille","kaikilta","kaikkea","kaikki","kaikkia","kaikkiaan","kaikkialla","kaikkialle","kaikkialta","kaikkien","kaikkin","kaksi","kannalta","kannattaa","kanssa","kanssaan","kanssamme","kanssani","kanssanne","kanssasi","kauan","kauemmas","kaukana","kautta","kehen","keiden","keihin","keiksi","keille","keillä","keiltä","keinä","keissä","keistä","keitten","keittä","keitä","keneen","keneksi","kenelle","kenellä","keneltä","kenen","kenenä","kenessä","kenestä","kenet","kenettä","kennessästä","kenties","kerran","kerta","kertaa","keskellä","kesken","keskimäärin","ketkä","ketä","kiitos","kohti","koko","kokonaan","kolmas","kolme","kolmen","kolmesti","koska","koskaan","kovin","kuin","kuinka","kuinkan","kuitenkaan","kuitenkin","kuka","kukaan","kukin","kukka","kumpainen","kumpainenkaan","kumpi","kumpikaan","kumpikin","kun","kuten","kuuden","kuusi","kuutta","kylliksi","kyllä","kymmenen","kyse","liian","liki","lisäksi","lisää","lla","luo","luona","lähekkäin","lähelle","lähellä","läheltä","lähemmäs","lähes","lähinnä","lähtien","läpi","mahdollisimman","mahdollista","me","meidän","meille","meillä","melkein","melko","menee","meneet","menemme","menen","menet","menette","menevät","meni","menimme","menin","menit","menivät","mennessä","mennyt","menossa","mihin","mikin","miksi","mikä","mikäli","mikään","milloin","milloinkan","minne","minun","minut","minä","missä","mistä","miten","mitä","mitään","moi","molemmat","mones","monesti","monet","moni","moniaalla","moniaalle","moniaalta","monta","muassa","muiden","muita","muka","mukaan","mukaansa","mukana","mutta","muu","muualla","muualle","muualta","muuanne","muulloin","muun","muut","muuta","muutama","muutaman","muuten","myöhemmin","myös","myöskin","myöskään","myötä","ne","neljä","neljän","neljää","niiden","niin","niistä","niitä","noin","nopeammin","nopeasti","nopeiten","nro","nuo","nyt","näiden","näin","näissä","näissähin","näissälle","näissältä","näissästä","näitä","nämä","ohi","oikea","oikealla","oikein","ole","olemme","olen","olet","olette","oleva","olevan","olevat","oli","olimme","olin","olisi","olisimme","olisin","olisit","olisitte","olisivat","olit","olitte","olivat","olla","olleet","olli","ollut","oma","omaa","omaan","omaksi","omalle","omalta","oman","omassa","omat","omia","omien","omiin","omiksi","omille","omilta","omissa","omista","on","onkin","onko","ovat","paikoittain","paitsi","pakosti","paljon","paremmin","parempi","parhaillaan","parhaiten","perusteella","peräti","pian","pieneen","pieneksi","pienelle","pienellä","pieneltä","pienempi","pienestä","pieni","pienin","puolesta","puolestaan","päälle","runsaasti","saakka","sadam","sama","samaa","samaan","samalla","samallalta","samallassa","samallasta","saman","samat","samoin","sata","sataa","satojen","se","seitsemän","sekä","sen","seuraavat","siellä","sieltä","siihen","siinä","siis","siitä","sijaan","siksi","silloin","sillä","silti","sinne","sinua","sinulle","sinulta","sinun","sinussa","sinusta","sinut","sinä","sisäkkäin","sisällä","siten","sitten","sitä","ssa","sta","suoraan","suuntaan","suuren","suuret","suuri","suuria","suurin","suurten","taa","taas","taemmas","tahansa","tai","takaa","takaisin","takana","takia","tapauksessa","tarpeeksi","tavalla","tavoitteena","te","tietysti","todella","toinen","toisaalla","toisaalle","toisaalta","toiseen","toiseksi","toisella","toiselle","toiselta","toisemme","toisen","toisensa","toisessa","toisesta","toista","toistaiseksi","toki","tosin","tuhannen","tuhat","tule","tulee","tulemme","tulen","tulet","tulette","tulevat","tulimme","tulin","tulisi","tulisimme","tulisin","tulisit","tulisitte","tulisivat","tulit","tulitte","tulivat","tulla","tulleet","tullut","tuntuu","tuo","tuolla","tuolloin","tuolta","tuonne","tuskin","tykö","tähän","tällä","tällöin","tämä","tämän","tänne","tänä","tänään","tässä","tästä","täten","tätä","täysin","täytyvät","täytyy","täällä","täältä","ulkopuolella","usea","useasti","useimmiten","usein","useita","uudeksi","uudelleen","uuden","uudet","uusi","uusia","uusien","uusinta","uuteen","uutta","vaan","vahemmän","vai","vaiheessa","vaikea","vaikean","vaikeat","vaikeilla","vaikeille","vaikeilta","vaikeissa","vaikeista","vaikka","vain","varmasti","varsin","varsinkin","varten","vasen","vasenmalla","vasta","vastaan","vastakkain","vastan","verran","vielä","vierekkäin","vieressä","vieri","viiden","viime","viimeinen","viimeisen","viimeksi","viisi","voi","voidaan","voimme","voin","voisi","voit","voitte","voivat","vuoden","vuoksi","vuosi","vuosien","vuosina","vuotta","vähemmän","vähintään","vähiten","vähän","välillä","yhdeksän","yhden","yhdessä","yhteen","yhteensä","yhteydessä","yhteyteen","yhtä","yhtäälle","yhtäällä","yhtäältä","yhtään","yhä","yksi","yksin","yksittäin","yleensä","ylemmäs","yli","ylös","ympäri","älköön","älä"]
includes/ext/stopwords-json/dist/fr.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","abord","absolument","afin","ah","ai","aie","ailleurs","ainsi","ait","allaient","allo","allons","allô","alors","anterieur","anterieure","anterieures","apres","après","as","assez","attendu","au","aucun","aucune","aujourd","aujourd'hui","aupres","auquel","aura","auraient","aurait","auront","aussi","autre","autrefois","autrement","autres","autrui","aux","auxquelles","auxquels","avaient","avais","avait","avant","avec","avoir","avons","ayant","b","bah","bas","basee","bat","beau","beaucoup","bien","bigre","boum","bravo","brrr","c","car","ce","ceci","cela","celle","celle-ci","celle-là","celles","celles-ci","celles-là","celui","celui-ci","celui-là","cent","cependant","certain","certaine","certaines","certains","certes","ces","cet","cette","ceux","ceux-ci","ceux-là","chacun","chacune","chaque","cher","chers","chez","chiche","chut","chère","chères","ci","cinq","cinquantaine","cinquante","cinquantième","cinquième","clac","clic","combien","comme","comment","comparable","comparables","compris","concernant","contre","couic","crac","d","da","dans","de","debout","dedans","dehors","deja","delà","depuis","dernier","derniere","derriere","derrière","des","desormais","desquelles","desquels","dessous","dessus","deux","deuxième","deuxièmement","devant","devers","devra","different","differentes","differents","différent","différente","différentes","différents","dire","directe","directement","dit","dite","dits","divers","diverse","diverses","dix","dix-huit","dix-neuf","dix-sept","dixième","doit","doivent","donc","dont","douze","douzième","dring","du","duquel","durant","dès","désormais","e","effet","egale","egalement","egales","eh","elle","elle-même","elles","elles-mêmes","en","encore","enfin","entre","envers","environ","es","est","et","etant","etc","etre","eu","euh","eux","eux-mêmes","exactement","excepté","extenso","exterieur","f","fais","faisaient","faisant","fait","façon","feront","fi","flac","floc","font","g","gens","h","ha","hein","hem","hep","hi","ho","holà","hop","hormis","hors","hou","houp","hue","hui","huit","huitième","hum","hurrah","hé","hélas","i","il","ils","importe","j","je","jusqu","jusque","juste","k","l","la","laisser","laquelle","las","le","lequel","les","lesquelles","lesquels","leur","leurs","longtemps","lors","lorsque","lui","lui-meme","lui-même","là","lès","m","ma","maint","maintenant","mais","malgre","malgré","maximale","me","meme","memes","merci","mes","mien","mienne","miennes","miens","mille","mince","minimale","moi","moi-meme","moi-même","moindres","moins","mon","moyennant","multiple","multiples","même","mêmes","n","na","naturel","naturelle","naturelles","ne","neanmoins","necessaire","necessairement","neuf","neuvième","ni","nombreuses","nombreux","non","nos","notamment","notre","nous","nous-mêmes","nouveau","nul","néanmoins","nôtre","nôtres","o","oh","ohé","ollé","olé","on","ont","onze","onzième","ore","ou","ouf","ouias","oust","ouste","outre","ouvert","ouverte","ouverts","o|","où","p","paf","pan","par","parce","parfois","parle","parlent","parler","parmi","parseme","partant","particulier","particulière","particulièrement","pas","passé","pendant","pense","permet","personne","peu","peut","peuvent","peux","pff","pfft","pfut","pif","pire","plein","plouf","plus","plusieurs","plutôt","possessif","possessifs","possible","possibles","pouah","pour","pourquoi","pourrais","pourrait","pouvait","prealable","precisement","premier","première","premièrement","pres","probable","probante","procedant","proche","près","psitt","pu","puis","puisque","pur","pure","q","qu","quand","quant","quant-à-soi","quanta","quarante","quatorze","quatre","quatre-vingt","quatrième","quatrièmement","que","quel","quelconque","quelle","quelles","quelqu'un","quelque","quelques","quels","qui","quiconque","quinze","quoi","quoique","r","rare","rarement","rares","relative","relativement","remarquable","rend","rendre","restant","reste","restent","restrictif","retour","revoici","revoilà","rien","s","sa","sacrebleu","sait","sans","sapristi","sauf","se","sein","seize","selon","semblable","semblaient","semble","semblent","sent","sept","septième","sera","seraient","serait","seront","ses","seul","seule","seulement","si","sien","sienne","siennes","siens","sinon","six","sixième","soi","soi-même","soit","soixante","son","sont","sous","souvent","specifique","specifiques","speculatif","stop","strictement","subtiles","suffisant","suffisante","suffit","suis","suit","suivant","suivante","suivantes","suivants","suivre","superpose","sur","surtout","t","ta","tac","tant","tardive","te","tel","telle","tellement","telles","tels","tenant","tend","tenir","tente","tes","tic","tien","tienne","tiennes","tiens","toc","toi","toi-même","ton","touchant","toujours","tous","tout","toute","toutefois","toutes","treize","trente","tres","trois","troisième","troisièmement","trop","très","tsoin","tsouin","tu","té","u","un","une","unes","uniformement","unique","uniques","uns","v","va","vais","vas","vers","via","vif","vifs","vingt","vivat","vive","vives","vlan","voici","voilà","vont","vos","votre","vous","vous-mêmes","vu","vé","vôtre","vôtres","w","x","y","z","zut","à","â","ça","ès","étaient","étais","était","étant","été","être","ô"]
includes/ext/stopwords-json/dist/ga.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","ach","ag","agus","an","aon","ar","arna","as","b'","ba","beirt","bhúr","caoga","ceathair","ceathrar","chomh","chtó","chuig","chun","cois","céad","cúig","cúigear","d'","daichead","dar","de","deich","deichniúr","den","dhá","do","don","dtí","dá","dár","dó","faoi","faoin","faoina","faoinár","fara","fiche","gach","gan","go","gur","haon","hocht","i","iad","idir","in","ina","ins","inár","is","le","leis","lena","lenár","m'","mar","mo","mé","na","nach","naoi","naonúr","ná","ní","níor","nó","nócha","ocht","ochtar","os","roimh","sa","seacht","seachtar","seachtó","seasca","seisear","siad","sibh","sinn","sna","sé","sí","tar","thar","thú","triúr","trí","trína","trínár","tríocha","tú","um","ár","é","éis","í","ó","ón","óna","ónár"]
includes/ext/stopwords-json/dist/gl.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","alí","ao","aos","aquel","aquela","aquelas","aqueles","aquilo","aquí","as","así","aínda","ben","cando","che","co","coa","coas","comigo","con","connosco","contigo","convosco","cos","cun","cunha","cunhas","cuns","da","dalgunha","dalgunhas","dalgún","dalgúns","das","de","del","dela","delas","deles","desde","deste","do","dos","dun","dunha","dunhas","duns","e","el","ela","elas","eles","en","era","eran","esa","esas","ese","eses","esta","estaba","estar","este","estes","estiven","estou","está","están","eu","facer","foi","foron","fun","había","hai","iso","isto","la","las","lle","lles","lo","los","mais","me","meu","meus","min","miña","miñas","moi","na","nas","neste","nin","no","non","nos","nosa","nosas","noso","nosos","nun","nunha","nunhas","nuns","nós","o","os","ou","para","pero","pode","pois","pola","polas","polo","polos","por","que","se","senón","ser","seu","seus","sexa","sido","sobre","súa","súas","tamén","tan","te","ten","ter","teu","teus","teñen","teño","ti","tido","tiven","tiña","túa","túas","un","unha","unhas","uns","vos","vosa","vosas","voso","vosos","vós","á","é","ó","ós"]
includes/ext/stopwords-json/dist/ha.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","amma","ba","ban","ce","cikin","da","don","ga","in","ina","ita","ji","ka","ko","kuma","lokacin","ma","mai","na","ne","ni","sai","shi","su","suka","sun","ta","tafi","take","tana","wani","wannan","wata","ya","yake","yana","yi","za"]
includes/ext/stopwords-json/dist/he.json ADDED
@@ -0,0 +1 @@
 
1
+ ["אבל","או","אולי","אותה","אותו","אותי","אותך","אותם","אותן","אותנו","אז","אחר","אחרות","אחרי","אחריכן","אחרים","אחרת","אי","איזה","איך","אין","איפה","איתה","איתו","איתי","איתך","איתכם","איתכן","איתם","איתן","איתנו","אך","אל","אלה","אלו","אם","אנחנו","אני","אס","אף","אצל","אשר","את","אתה","אתכם","אתכן","אתם","אתן","באיזומידה","באמצע","באמצעות","בגלל","בין","בלי","במידה","במקוםשבו","ברם","בשביל","בשעהש","בתוך","גם","דרך","הוא","היא","היה","היכן","היתה","היתי","הם","הן","הנה","הסיבהשבגללה","הרי","ואילו","ואת","זאת","זה","זות","יהיה","יוכל","יוכלו","יותרמדי","יכול","יכולה","יכולות","יכולים","יכל","יכלה","יכלו","יש","כאן","כאשר","כולם","כולן","כזה","כי","כיצד","כך","ככה","כל","כלל","כמו","כן","כפי","כש","לא","לאו","לאיזותכלית","לאן","לבין","לה","להיות","להם","להן","לו","לי","לכם","לכן","למה","למטה","למעלה","למקוםשבו","למרות","לנו","לעבר","לעיכן","לפיכך","לפני","מאד","מאחורי","מאיזוסיבה","מאין","מאיפה","מבלי","מבעד","מדוע","מה","מהיכן","מול","מחוץ","מי","מכאן","מכיוון","מלבד","מן","מנין","מסוגל","מעט","מעטים","מעל","מצד","מקוםבו","מתחת","מתי","נגד","נגר","נו","עד","עז","על","עלי","עליה","עליהם","עליהן","עליו","עליך","עליכם","עלינו","עם","עצמה","עצמהם","עצמהן","עצמו","עצמי","עצמם","עצמן","עצמנו","פה","רק","שוב","של","שלה","שלהם","שלהן","שלו","שלי","שלך","שלכה","שלכם","שלכן","שלנו","שם","תהיה","תחת"]
includes/ext/stopwords-json/dist/hi.json ADDED
@@ -0,0 +1 @@
 
1
+ ["अंदर","अत","अदि","अप","अपना","अपनि","अपनी","अपने","अभि","अभी","आदि","आप","इंहिं","इंहें","इंहों","इतयादि","इत्यादि","इन","इनका","इन्हीं","इन्हें","इन्हों","इस","इसका","इसकि","इसकी","इसके","इसमें","इसि","इसी","इसे","उंहिं","उंहें","उंहों","उन","उनका","उनकि","उनकी","उनके","उनको","उन्हीं","उन्हें","उन्हों","उस","उसके","उसि","उसी","उसे","एक","एवं","एस","एसे","ऐसे","ओर","और","कइ","कई","कर","करता","करते","करना","करने","करें","कहते","कहा","का","काफि","काफ़ी","कि","किंहें","किंहों","कितना","किन्हें","किन्हों","किया","किर","किस","किसि","किसी","किसे","की","कुछ","कुल","के","को","कोइ","कोई","कोन","कोनसा","कौन","कौनसा","गया","घर","जब","जहाँ","जहां","जा","जिंहें","जिंहों","जितना","जिधर","जिन","जिन्हें","जिन्हों","जिस","जिसे","जीधर","जेसा","जेसे","जैसा","जैसे","जो","तक","तब","तरह","तिंहें","तिंहों","तिन","तिन्हें","तिन्हों","तिस","तिसे","तो","था","थि","थी","थे","दबारा","दवारा","दिया","दुसरा","दुसरे","दूसरे","दो","द्वारा","न","नहिं","नहीं","ना","निचे","निहायत","नीचे","ने","पर","पहले","पुरा","पूरा","पे","फिर","बनि","बनी","बहि","बही","बहुत","बाद","बाला","बिलकुल","भि","भितर","भी","भीतर","मगर","मानो","मे","में","यदि","यह","यहाँ","यहां","यहि","यही","या","यिह","ये","रखें","रवासा","रहा","रहे","ऱ्वासा","लिए","लिये","लेकिन","व","वगेरह","वरग","वर्ग","वह","वहाँ","वहां","वहिं","वहीं","वाले","वुह","वे","वग़ैरह","संग","सकता","सकते","सबसे","सभि","सभी","साथ","साबुत","साभ","सारा","से","सो","हि","ही","हुअ","हुआ","हुइ","हुई","हुए","हे","हें","है","हैं","हो","होता","होति","होती","होते","होना","होने"]
includes/ext/stopwords-json/dist/hr.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","ako","ali","bi","bih","bila","bili","bilo","bio","bismo","biste","biti","bumo","da","do","duž","ga","hoće","hoćemo","hoćete","hoćeš","hoću","i","iako","ih","ili","iz","ja","je","jedna","jedne","jedno","jer","jesam","jesi","jesmo","jest","jeste","jesu","jim","joj","još","ju","kada","kako","kao","koja","koje","koji","kojima","koju","kroz","li","me","mene","meni","mi","mimo","moj","moja","moje","mu","na","nad","nakon","nam","nama","nas","naš","naša","naše","našeg","ne","nego","neka","neki","nekog","neku","nema","netko","neće","nećemo","nećete","nećeš","neću","nešto","ni","nije","nikoga","nikoje","nikoju","nisam","nisi","nismo","niste","nisu","njega","njegov","njegova","njegovo","njemu","njezin","njezina","njezino","njih","njihov","njihova","njihovo","njim","njima","njoj","nju","no","o","od","odmah","on","ona","oni","ono","ova","pa","pak","po","pod","pored","prije","s","sa","sam","samo","se","sebe","sebi","si","smo","ste","su","sve","svi","svog","svoj","svoja","svoje","svom","ta","tada","taj","tako","te","tebe","tebi","ti","to","toj","tome","tu","tvoj","tvoja","tvoje","u","uz","vam","vama","vas","vaš","vaša","vaše","već","vi","vrlo","za","zar","će","ćemo","ćete","ćeš","ću","što"]
includes/ext/stopwords-json/dist/hu.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","abba","abban","abból","addig","ahhoz","ahogy","ahol","aki","akik","akkor","akár","alapján","alatt","alatta","alattad","alattam","alattatok","alattuk","alattunk","alá","alád","alájuk","alám","alánk","alátok","alól","alóla","alólad","alólam","alólatok","alóluk","alólunk","amely","amelybol","amelyek","amelyekben","amelyeket","amelyet","amelyik","amelynek","ami","amikor","amit","amolyan","amott","amíg","annak","annál","arra","arról","attól","az","aznap","azok","azokat","azokba","azokban","azokból","azokhoz","azokig","azokkal","azokká","azoknak","azoknál","azokon","azokra","azokról","azoktól","azokért","azon","azonban","azonnal","azt","aztán","azután","azzal","azzá","azért","bal","balra","ban","be","belé","beléd","beléjük","belém","belénk","belétek","belül","belőle","belőled","belőlem","belőletek","belőlük","belőlünk","ben","benne","benned","bennem","bennetek","bennük","bennünk","bár","bárcsak","bármilyen","búcsú","cikk","cikkek","cikkeket","csak","csakhogy","csupán","de","dehogy","e","ebbe","ebben","ebből","eddig","egy","egyebek","egyebet","egyedül","egyelőre","egyes","egyet","egyetlen","egyik","egymás","egyre","egyszerre","egyéb","együtt","egész","egészen","ehhez","ekkor","el","eleinte","ellen","ellenes","elleni","ellenére","elmondta","első","elsők","elsősorban","elsőt","elé","eléd","elég","eléjük","elém","elénk","elétek","elő","előbb","elől","előle","előled","előlem","előletek","előlük","előlünk","először","előtt","előtte","előtted","előttem","előttetek","előttük","előttünk","előző","emilyen","engem","ennek","ennyi","ennél","enyém","erre","erről","esetben","ettől","ez","ezek","ezekbe","ezekben","ezekből","ezeken","ezeket","ezekhez","ezekig","ezekkel","ezekké","ezeknek","ezeknél","ezekre","ezekről","ezektől","ezekért","ezen","ezentúl","ezer","ezret","ezt","ezután","ezzel","ezzé","ezért","fel","fele","felek","felet","felett","felé","fent","fenti","fél","fölé","gyakran","ha","halló","hamar","hanem","harmadik","harmadikat","harminc","hat","hatodik","hatodikat","hatot","hatvan","helyett","hetedik","hetediket","hetet","hetven","hirtelen","hiszen","hiába","hogy","hogyan","hol","holnap","holnapot","honnan","hova","hozzá","hozzád","hozzájuk","hozzám","hozzánk","hozzátok","hurrá","huszadik","hány","hányszor","hármat","három","hát","hátha","hátulsó","hét","húsz","ide","ide-оda","idén","igazán","igen","ill","illetve","ilyen","ilyenkor","immár","inkább","is","ismét","ison","itt","jelenleg","jobban","jobbra","jó","jól","jólesik","jóval","jövőre","kell","kellene","kellett","kelljen","keressünk","keresztül","ketten","kettő","kettőt","kevés","ki","kiben","kiből","kicsit","kicsoda","kihez","kik","kikbe","kikben","kikből","kiken","kiket","kikhez","kikkel","kikké","kiknek","kiknél","kikre","kikről","kiktől","kikért","kilenc","kilencedik","kilencediket","kilencet","kilencven","kin","kinek","kinél","kire","kiről","kit","kitől","kivel","kivé","kié","kiért","korábban","képest","kérem","kérlek","kész","késő","később","későn","két","kétszer","kívül","körül","köszönhetően","köszönöm","közben","közel","közepesen","közepén","közé","között","közül","külön","különben","különböző","különbözőbb","különbözőek","lassan","le","legalább","legyen","lehet","lehetetlen","lehetett","lehetőleg","lehetőség","lenne","lenni","lennék","lennének","lesz","leszek","lesznek","leszünk","lett","lettek","lettem","lettünk","lévő","ma","maga","magad","magam","magatokat","magukat","magunkat","magát","mai","majd","majdnem","manapság","meg","megcsinál","megcsinálnak","megint","megvan","mellett","mellette","melletted","mellettem","mellettetek","mellettük","mellettünk","mellé","melléd","melléjük","mellém","mellénk","mellétek","mellől","mellőle","mellőled","mellőlem","mellőletek","mellőlük","mellőlünk","mely","melyek","melyik","mennyi","mert","mi","miatt","miatta","miattad","miattam","miattatok","miattuk","miattunk","mibe","miben","miből","mihez","mik","mikbe","mikben","mikből","miken","miket","mikhez","mikkel","mikké","miknek","miknél","mikor","mikre","mikről","miktől","mikért","milyen","min","mind","mindegyik","mindegyiket","minden","mindenesetre","mindenki","mindent","mindenütt","mindig","mindketten","minek","minket","mint","mintha","minél","mire","miről","mit","mitől","mivel","mivé","miért","mondta","most","mostanáig","már","más","másik","másikat","másnap","második","másodszor","mások","másokat","mást","még","mégis","míg","mögé","mögéd","mögéjük","mögém","mögénk","mögétek","mögött","mögötte","mögötted","mögöttem","mögöttetek","mögöttük","mögöttünk","mögül","mögüle","mögüled","mögülem","mögületek","mögülük","mögülünk","múltkor","múlva","na","nagy","nagyobb","nagyon","naponta","napot","ne","negyedik","negyediket","negyven","neked","nekem","neki","nekik","nektek","nekünk","nem","nemcsak","nemrég","nincs","nyolc","nyolcadik","nyolcadikat","nyolcat","nyolcvan","nála","nálad","nálam","nálatok","náluk","nálunk","négy","négyet","néha","néhány","nélkül","o","oda","ok","olyan","onnan","ott","pedig","persze","pár","például","rajta","rajtad","rajtam","rajtatok","rajtuk","rajtunk","rendben","rosszul","rá","rád","rájuk","rám","ránk","rátok","régen","régóta","részére","róla","rólad","rólam","rólatok","róluk","rólunk","rögtön","s","saját","se","sem","semmi","semmilyen","semmiség","senki","soha","sok","sokan","sokat","sokkal","sokszor","sokáig","során","stb.","szemben","szerbusz","szerint","szerinte","szerinted","szerintem","szerintetek","szerintük","szerintünk","szervusz","szinte","számára","száz","századik","százat","szépen","szét","szíves","szívesen","szíveskedjék","sőt","talán","tavaly","te","tegnap","tegnapelőtt","tehát","tele","teljes","tessék","ti","tied","titeket","tizedik","tizediket","tizenegy","tizenegyedik","tizenhat","tizenhárom","tizenhét","tizenkettedik","tizenkettő","tizenkilenc","tizenkét","tizennyolc","tizennégy","tizenöt","tizet","tovább","további","továbbá","távol","téged","tényleg","tíz","több","többi","többször","túl","tőle","tőled","tőlem","tőletek","tőlük","tőlünk","ugyanakkor","ugyanez","ugyanis","ugye","urak","uram","urat","utoljára","utolsó","után","utána","vagy","vagyis","vagyok","vagytok","vagyunk","vajon","valahol","valaki","valakit","valamelyik","valami","valamint","való","van","vannak","vele","veled","velem","veletek","velük","velünk","vissza","viszlát","viszont","viszontlátásra","volna","volnának","volnék","volt","voltak","voltam","voltunk","végre","végén","végül","által","általában","ám","át","éljen","én","éppen","érte","érted","értem","értetek","értük","értünk","és","év","évben","éve","évek","éves","évi","évvel","így","óta","ön","önbe","önben","önből","önhöz","önnek","önnel","önnél","önre","önről","önt","öntől","önért","önök","önökbe","önökben","önökből","önöket","önökhöz","önökkel","önöknek","önöknél","önökre","önökről","önöktől","önökért","önökön","önön","össze","öt","ötven","ötödik","ötödiket","ötöt","úgy","úgyis","úgynevezett","új","újabb","újra","úr","ő","ők","őket","őt"]
includes/ext/stopwords-json/dist/hy.json ADDED
@@ -0,0 +1 @@
 
1
+ ["այդ","այլ","այն","այս","դու","դուք","եմ","են","ենք","ես","եք","է","էի","էին","էինք","էիր","էիք","էր","ըստ","թ","ի","ին","իսկ","իր","կամ","համար","հետ","հետո","մենք","մեջ","մի","ն","նա","նաև","նրա","նրանք","որ","որը","որոնք","որպես","ու","ում","պիտի","վրա","և"]
includes/ext/stopwords-json/dist/id.json ADDED
@@ -0,0 +1 @@
 
1
+ ["ada","adalah","adanya","adapun","agak","agaknya","agar","akan","akankah","akhirnya","aku","akulah","amat","amatlah","anda","andalah","antar","antara","antaranya","apa","apaan","apabila","apakah","apalagi","apatah","atau","ataukah","ataupun","bagai","bagaikan","bagaimana","bagaimanakah","bagaimanapun","bagi","bahkan","bahwa","bahwasanya","banyak","beberapa","begini","beginian","beginikah","beginilah","begitu","begitukah","begitulah","begitupun","belum","belumlah","berapa","berapakah","berapalah","berapapun","bermacam","bersama","betulkah","biasa","biasanya","bila","bilakah","bisa","bisakah","boleh","bolehkah","bolehlah","buat","bukan","bukankah","bukanlah","bukannya","cuma","dahulu","dalam","dan","dapat","dari","daripada","dekat","demi","demikian","demikianlah","dengan","depan","di","dia","dialah","diantara","diantaranya","dikarenakan","dini","diri","dirinya","disini","disinilah","dong","dulu","enggak","enggaknya","entah","entahlah","hal","hampir","hanya","hanyalah","harus","haruslah","harusnya","hendak","hendaklah","hendaknya","hingga","ia","ialah","ibarat","ingin","inginkah","inginkan","ini","inikah","inilah","itu","itukah","itulah","jangan","jangankan","janganlah","jika","jikalau","juga","justru","kala","kalau","kalaulah","kalaupun","kalian","kami","kamilah","kamu","kamulah","kan","kapan","kapankah","kapanpun","karena","karenanya","ke","kecil","kemudian","kenapa","kepada","kepadanya","ketika","khususnya","kini","kinilah","kiranya","kita","kitalah","kok","lagi","lagian","lah","lain","lainnya","lalu","lama","lamanya","lebih","macam","maka","makanya","makin","malah","malahan","mampu","mampukah","mana","manakala","manalagi","masih","masihkah","masing","mau","maupun","melainkan","melalui","memang","mengapa","mereka","merekalah","merupakan","meski","meskipun","mungkin","mungkinkah","nah","namun","nanti","nantinya","nyaris","oleh","olehnya","pada","padahal","padanya","paling","pantas","para","pasti","pastilah","per","percuma","pernah","pula","pun","rupanya","saat","saatnya","saja","sajalah","saling","sama","sambil","sampai","sana","sangat","sangatlah","saya","sayalah","se","sebab","sebabnya","sebagai","sebagaimana","sebagainya","sebaliknya","sebanyak","sebegini","sebegitu","sebelum","sebelumnya","sebenarnya","seberapa","sebetulnya","sebisanya","sebuah","sedang","sedangkan","sedemikian","sedikit","sedikitnya","segala","segalanya","segera","seharusnya","sehingga","sejak","sejenak","sekali","sekalian","sekaligus","sekalipun","sekarang","seketika","sekiranya","sekitar","sekitarnya","sela","selagi","selain","selaku","selalu","selama","selamanya","seluruh","seluruhnya","semacam","semakin","semasih","semaunya","sementara","sempat","semua","semuanya","semula","sendiri","sendirinya","seolah","seorang","sepanjang","sepantasnya","sepantasnyalah","seperti","sepertinya","sering","seringnya","serta","serupa","sesaat","sesama","sesegera","sesekali","seseorang","sesuatu","sesuatunya","sesudah","sesudahnya","setelah","seterusnya","setiap","setidaknya","sewaktu","siapa","siapakah","siapapun","sini","sinilah","suatu","sudah","sudahkah","sudahlah","supaya","tadi","tadinya","tak","tanpa","tapi","telah","tentang","tentu","tentulah","tentunya","terdiri","terhadap","terhadapnya","terlalu","terlebih","tersebut","tersebutlah","tertentu","tetapi","tiap","tidak","tidakkah","tidaklah","toh","waduh","wah","wahai","walau","walaupun","wong","yaitu","yakni","yang"]
includes/ext/stopwords-json/dist/it.json ADDED
@@ -0,0 +1 @@
 
1
+ ["IE","a","abbastanza","abbia","abbiamo","abbiano","abbiate","accidenti","ad","adesso","affinche","agl","agli","ahime","ahimè","ai","al","alcuna","alcuni","alcuno","all","alla","alle","allo","allora","altri","altrimenti","altro","altrove","altrui","anche","ancora","anni","anno","ansa","anticipo","assai","attesa","attraverso","avanti","avemmo","avendo","avente","aver","avere","averlo","avesse","avessero","avessi","avessimo","aveste","avesti","avete","aveva","avevamo","avevano","avevate","avevi","avevo","avrai","avranno","avrebbe","avrebbero","avrei","avremmo","avremo","avreste","avresti","avrete","avrà","avrò","avuta","avute","avuti","avuto","basta","bene","benissimo","berlusconi","brava","bravo","c","casa","caso","cento","certa","certe","certi","certo","che","chi","chicchessia","chiunque","ci","ciascuna","ciascuno","cima","cio","cioe","cioè","circa","citta","città","ciò","co","codesta","codesti","codesto","cogli","coi","col","colei","coll","coloro","colui","come","cominci","comunque","con","concernente","conciliarsi","conclusione","consiglio","contro","cortesia","cos","cosa","cosi","così","cui","d","da","dagl","dagli","dai","dal","dall","dalla","dalle","dallo","dappertutto","davanti","degl","degli","dei","del","dell","della","delle","dello","dentro","detto","deve","di","dice","dietro","dire","dirimpetto","diventa","diventare","diventato","dopo","dov","dove","dovra","dovrà","dovunque","due","dunque","durante","e","ebbe","ebbero","ebbi","ecc","ecco","ed","effettivamente","egli","ella","entrambi","eppure","era","erano","eravamo","eravate","eri","ero","esempio","esse","essendo","esser","essere","essi","ex","fa","faccia","facciamo","facciano","facciate","faccio","facemmo","facendo","facesse","facessero","facessi","facessimo","faceste","facesti","faceva","facevamo","facevano","facevate","facevi","facevo","fai","fanno","farai","faranno","fare","farebbe","farebbero","farei","faremmo","faremo","fareste","faresti","farete","farà","farò","fatto","favore","fece","fecero","feci","fin","finalmente","finche","fine","fino","forse","forza","fosse","fossero","fossi","fossimo","foste","fosti","fra","frattempo","fu","fui","fummo","fuori","furono","futuro","generale","gia","giacche","giorni","giorno","già","gli","gliela","gliele","glieli","glielo","gliene","governo","grande","grazie","gruppo","ha","haha","hai","hanno","ho","i","ieri","il","improvviso","in","inc","infatti","inoltre","insieme","intanto","intorno","invece","io","l","la","lasciato","lato","lavoro","le","lei","li","lo","lontano","loro","lui","lungo","luogo","là","ma","macche","magari","maggior","mai","male","malgrado","malissimo","mancanza","marche","me","medesimo","mediante","meglio","meno","mentre","mesi","mezzo","mi","mia","mie","miei","mila","miliardi","milioni","minimi","ministro","mio","modo","molti","moltissimo","molto","momento","mondo","mosto","nazionale","ne","negl","negli","nei","nel","nell","nella","nelle","nello","nemmeno","neppure","nessun","nessuna","nessuno","niente","no","noi","non","nondimeno","nonostante","nonsia","nostra","nostre","nostri","nostro","novanta","nove","nulla","nuovo","o","od","oggi","ogni","ognuna","ognuno","oltre","oppure","ora","ore","osi","ossia","ottanta","otto","paese","parecchi","parecchie","parecchio","parte","partendo","peccato","peggio","per","perche","perchè","perché","percio","perciò","perfino","pero","persino","persone","però","piedi","pieno","piglia","piu","piuttosto","più","po","pochissimo","poco","poi","poiche","possa","possedere","posteriore","posto","potrebbe","preferibilmente","presa","press","prima","primo","principalmente","probabilmente","proprio","puo","pure","purtroppo","può","qualche","qualcosa","qualcuna","qualcuno","quale","quali","qualunque","quando","quanta","quante","quanti","quanto","quantunque","quasi","quattro","quel","quella","quelle","quelli","quello","quest","questa","queste","questi","questo","qui","quindi","realmente","recente","recentemente","registrazione","relativo","riecco","salvo","sara","sarai","saranno","sarebbe","sarebbero","sarei","saremmo","saremo","sareste","saresti","sarete","sarà","sarò","scola","scopo","scorso","se","secondo","seguente","seguito","sei","sembra","sembrare","sembrato","sembri","sempre","senza","sette","si","sia","siamo","siano","siate","siete","sig","solito","solo","soltanto","sono","sopra","sotto","spesso","srl","sta","stai","stando","stanno","starai","staranno","starebbe","starebbero","starei","staremmo","staremo","stareste","staresti","starete","starà","starò","stata","state","stati","stato","stava","stavamo","stavano","stavate","stavi","stavo","stemmo","stessa","stesse","stessero","stessi","stessimo","stesso","steste","stesti","stette","stettero","stetti","stia","stiamo","stiano","stiate","sto","su","sua","subito","successivamente","successivo","sue","sugl","sugli","sui","sul","sull","sulla","sulle","sullo","suo","suoi","tale","tali","talvolta","tanto","te","tempo","ti","titolo","torino","tra","tranne","tre","trenta","troppo","trovato","tu","tua","tue","tuo","tuoi","tutta","tuttavia","tutte","tutti","tutto","uguali","ulteriore","ultimo","un","una","uno","uomo","va","vale","vari","varia","varie","vario","verso","vi","via","vicino","visto","vita","voi","volta","volte","vostra","vostre","vostri","vostro","è"]
includes/ext/stopwords-json/dist/ja.json ADDED
@@ -0,0 +1 @@
 
1
+ ["あっ","あり","ある","い","いう","いる","う","うち","お","および","おり","か","かつて","から","が","き","ここ","こと","この","これ","これら","さ","さらに","し","しかし","する","ず","せ","せる","そして","その","その他","その後","それ","それぞれ","た","ただし","たち","ため","たり","だ","だっ","つ","て","で","でき","できる","です","では","でも","と","という","といった","とき","ところ","として","とともに","とも","と共に","な","ない","なお","なかっ","ながら","なく","なっ","など","なら","なり","なる","に","において","における","について","にて","によって","により","による","に対して","に対する","に関する","の","ので","のみ","は","ば","へ","ほか","ほとんど","ほど","ます","また","または","まで","も","もの","ものの","や","よう","より","ら","られ","られる","れ","れる","を","ん","及び","特に"]
includes/ext/stopwords-json/dist/ko.json ADDED
@@ -0,0 +1 @@
 
1
+ ["!","\"","$","%","&","'","(",")","*","+",",","-",".","...","0","1","2","3","4","5","6","7","8","9",";","<","=",">","?","@","\\","^","_","`","|","~","·","—","——","‘","’","“","”","…","、","。","〈","〉","《","》","가","가까스로","가령","각","각각","각자","각종","갖고말하자면","같다","같이","개의치않고","거니와","거바","거의","것","것과 같이","것들","게다가","게우다","겨우","견지에서","결과에 이르다","결국","결론을 낼 수 있다","겸사겸사","고려하면","고로","곧","공동으로","과","과연","관계가 있다","관계없이","관련이 있다","관하여","관한","관해서는","구","구체적으로","구토하다","그","그들","그때","그래","그래도","그래서","그러나","그러니","그러니까","그러면","그러므로","그러한즉","그런 까닭에","그런데","그런즉","그럼","그럼에도 불구하고","그렇게 함으로써","그렇지","그렇지 않다면","그렇지 않으면","그렇지만","그렇지않으면","그리고","그리하여","그만이다","그에 따르는","그위에","그저","그중에서","그치지 않다","근거로","근거하여","기대여","기점으로","기준으로","기타","까닭으로","까악","까지","까지 미치다","까지도","꽈당","끙끙","끼익","나","나머지는","남들","남짓","너","너희","너희들","네","넷","년","논하지 않다","놀라다","누가 알겠는가","누구","다른","다른 방면으로","다만","다섯","다소","다수","다시 말하자면","다시말하면","다음","다음에","다음으로","단지","답다","당신","당장","대로 하다","대하면","대하여","대해 말하자면","대해서","댕그","더구나","더군다나","더라도","더불어","더욱더","더욱이는","도달하다","도착하다","동시에","동안","된바에야","된이상","두번째로","둘","둥둥","뒤따라","뒤이어","든간에","들","등","등등","딩동","따라","따라서","따위","따지지 않다","딱","때","때가 되어","때문에","또","또한","뚝뚝","라 해도","령","로","로 인하여","로부터","로써","륙","를","마음대로","마저","마저도","마치","막론하고","만 못하다","만약","만약에","만은 아니다","만이 아니다","만일","만큼","말하자면","말할것도 없고","매","매번","메쓰겁다","몇","모","모두","무렵","무릎쓰고","무슨","무엇","무엇때문에","물론","및","바꾸어말하면","바꾸어말하자면","바꾸어서 말하면","바꾸어서 한다면","바꿔 말하면","바로","바와같이","밖에 안된다","반대로","반대로 말하자면","반드시","버금","보는데서","보다더","보드득","본대로","봐","봐라","부류의 사람들","부터","불구하고","불문하고","붕붕","비걱거리다","비교적","비길수 없다","비로소","비록","비슷하다","비추어 보아","비하면","뿐만 아니라","뿐만아니라","뿐이다","삐걱","삐걱거리다","사","삼","상대적으로 말하자면","생각한대로","설령","설마","설사","셋","소생","소인","솨","쉿","습니까","습니다","시각","시간","시작하여","시초에","시키다","실로","심지어","아","아니","아니나다를가","아니라면","아니면","아니었다면","아래윗","아무거나","아무도","아야","아울러","아이","아이고","아이구","아이야","아이쿠","아하","아홉","안 그러면","않기 위하여","않기 위해서","알 수 있다","알았어","앗","앞에서","앞의것","야","약간","양자","어","어기여차","어느","어느 년도","어느것","어느곳","어느때","어느쪽","어느해","어디","어때","어떠한","어떤","어떤것","어떤것들","어떻게","어떻해","어이","어째서","어쨋든","어쩔수 없다","어찌","어찌됏든","어찌됏어","어찌하든지","어찌하여","언제","언젠가","얼마","얼마 안 되는 것","얼마간","얼마나","얼마든지","얼마만큼","얼마큼","엉엉","에","에 가서","에 달려 있다","에 대해","에 있다","에 한하다","에게","에서","여","여기","여덟","여러분","여보시오","여부","여섯","여전히","여차","연관되다","연이서","영","영차","옆사람","예","예를 들면","예를 들자면","예컨대","예하면","오","오로지","오르다","오자마자","오직","오호","오히려","와","와 같은 사람들","와르르","와아","왜","왜냐하면","외에도","요만큼","요만한 것","요만한걸","요컨대","우르르","우리","우리들","우선","우에 종합한것과같이","운운","월","위에서 서술한바와같이","위하여","위해서","윙윙","육","으로","으로 인하여","으로서","으로써","을","응","응당","의","의거하여","의지하여","의해","의해되다","의해서","이","이 되다","이 때문에","이 밖에","이 외에","이 정도의","이것","이곳","이때","이라면","이래","이러이러하다","이러한","이런","이럴정도로","이렇게 많은 것","이렇게되면","이렇게말하자면","이렇구나","이로 인하여","이르기까지","이리하여","이만큼","이번","이봐","이상","이어서","이었다","이와 같다","이와 같은","이와 반대로","이와같다면","이외에도","이용하여","이유만으로","이젠","이지만","이쪽","이천구","이천육","이천칠","이천팔","인 듯하다","인젠","일","일것이다","일곱","일단","일때","일반적으로","일지라도","임에 틀림없다","입각하여","입장에서","잇따라","있다","자","자기","자기집","자마자","자신","잠깐","잠시","저","저것","저것만큼","저기","저쪽","저희","전부","전자","전후","점에서 보아","정도에 이르다","제","제각기","제외하고","조금","조차","조차도","졸졸","좀","좋아","좍좍","주룩주룩","주저하지 않고","줄은 몰랏다","줄은모른다","중에서","중의하나","즈음하여","즉","즉시","지든지","지만","지말고","진짜로","쪽으로","차라리","참","참나","첫번째로","쳇","총적으로","총적으로 말하면","총적으로 보면","칠","콸콸","쾅쾅","쿵","타다","타인","탕탕","토하다","통하여","툭","퉤","틈타","팍","팔","퍽","펄렁","하","하게될것이다","하게하다","하겠는가","하고 있다","하고있었다","하곤하였다","하구나","하기 때문에","하기 위하여","하기는한데","하기만 하면","하기보다는","하기에","하나","하느니","하는 김에","하는 편이 낫다","하는것도","하는것만 못하다","하는것이 낫다","하는바","하더라도","하도다","하도록시키다","하도록하다","하든지","하려고하다","하마터면","하면 할수록","하면된다","하면서","하물며","하여금","하여야","하자마자","하지 않는다면","하지 않도록","하지마","하지마라","하지만","하하","한 까닭에","한 이유는","한 후","한다면","한다면 몰라도","한데","한마디","한적이있다","한켠으로는","한항목","할 따름이다","할 생각이다","할 줄 안다","할 지경이다","할 힘이 있다","할때","할만하다","할망정","할뿐","할수있다","할수있어","할줄알다","할지라도","할지언정","함께","해도된다","해도좋다","해봐요","해서는 안된다","해야한다","해요","했어요","향하다","향하여","향해서","허","허걱","허허","헉","헉헉","헐떡헐떡","형식으로 쓰여","혹시","혹은","혼자","훨씬","휘익","휴","흐흐","흥","힘입어","︿","!","#","$","%","&","(",")","*","+",",","0","1","2","3","4","5","6","7","8","9",":",";","<",">","?","@","[","]","{","|","}","~","¥"]
includes/ext/stopwords-json/dist/la.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","ab","ac","ad","at","atque","aut","autem","cum","de","dum","e","erant","erat","est","et","etiam","ex","haec","hic","hoc","in","ita","me","nec","neque","non","per","qua","quae","quam","qui","quibus","quidem","quo","quod","re","rebus","rem","res","sed","si","sic","sunt","tamen","tandem","te","ut","vel"]
includes/ext/stopwords-json/dist/lv.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aiz","ap","apakš","apakšpus","ar","arī","augšpus","bet","bez","bija","biji","biju","bijām","bijāt","būs","būsi","būsiet","būsim","būt","būšu","caur","diemžēl","diezin","droši","dēļ","esam","esat","esi","esmu","gan","gar","iekam","iekams","iekām","iekāms","iekš","iekšpus","ik","ir","it","itin","iz","ja","jau","jeb","jebšu","jel","jo","jā","ka","kamēr","kaut","kolīdz","kopš","kā","kļuva","kļuvi","kļuvu","kļuvām","kļuvāt","kļūs","kļūsi","kļūsiet","kļūsim","kļūst","kļūstam","kļūstat","kļūsti","kļūstu","kļūt","kļūšu","labad","lai","lejpus","līdz","līdzko","ne","nebūt","nedz","nekā","nevis","nezin","no","nu","nē","otrpus","pa","par","pat","pie","pirms","pret","priekš","pār","pēc","starp","tad","tak","tapi","taps","tapsi","tapsiet","tapsim","tapt","tapāt","tapšu","taču","te","tiec","tiek","tiekam","tiekat","tieku","tik","tika","tikai","tiki","tikko","tiklab","tiklīdz","tiks","tiksiet","tiksim","tikt","tiku","tikvien","tikām","tikāt","tikšu","tomēr","topat","turpretim","turpretī","tā","tādēļ","tālab","tāpēc","un","uz","vai","var","varat","varēja","varēji","varēju","varējām","varējāt","varēs","varēsi","varēsiet","varēsim","varēt","varēšu","vien","virs","virspus","vis","viņpus","zem","ārpus","šaipus"]
includes/ext/stopwords-json/dist/mr.json ADDED
@@ -0,0 +1 @@
 
1
+ ["अधिक","अनेक","अशी","असलयाचे","असलेल्या","असा","असून","असे","आज","आणि","आता","आपल्या","आला","आली","आले","आहे","आहेत","एक","एका","कमी","करणयात","करून","का","काम","काय","काही","किवा","की","केला","केली","केले","कोटी","गेल्या","घेऊन","जात","झाला","झाली","झाले","झालेल्या","टा","डॉ","तर","तरी","तसेच","ता","ती","तीन","ते","तो","त्या","त्याचा","त्याची","त्याच्या","त्याना","त्यानी","त्यामुळे","त्री","दिली","दोन","न","नाही","निर्ण्य","पण","पम","परयतन","पाटील","म","मात्र","माहिती","मी","मुबी","म्हणजे","म्हणाले","म्हणून","या","याचा","याची","याच्या","याना","यानी","येणार","येत","येथील","येथे","लाख","व","व्यकत","सर्व","सागित्ले","सुरू","हजार","हा","ही","हे","होणार","होत","होता","होती","होते"]
includes/ext/stopwords-json/dist/nl.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aan","achte","achter","af","al","alle","alleen","alles","als","ander","anders","beetje","behalve","beide","beiden","ben","beneden","bent","bij","bijna","bijv","blijkbaar","blijken","boven","bv","daar","daardoor","daarin","daarna","daarom","daaruit","dan","dat","de","deden","deed","derde","derhalve","dertig","deze","dhr","die","dit","doe","doen","doet","door","drie","duizend","echter","een","eens","eerst","eerste","eigen","eigenlijk","elk","elke","en","enige","er","erg","ergens","etc","etcetera","even","geen","genoeg","geweest","haar","haarzelf","had","hadden","heb","hebben","hebt","hedden","heeft","heel","hem","hemzelf","hen","het","hetzelfde","hier","hierin","hierna","hierom","hij","hijzelf","hoe","honderd","hun","ieder","iedere","iedereen","iemand","iets","ik","in","inderdaad","intussen","is","ja","je","jij","jijzelf","jou","jouw","jullie","kan","kon","konden","kun","kunnen","kunt","laatst","later","lijken","lijkt","maak","maakt","maakte","maakten","maar","mag","maken","me","meer","meest","meestal","men","met","mevr","mij","mijn","minder","miss","misschien","missen","mits","mocht","mochten","moest","moesten","moet","moeten","mogen","mr","mrs","mw","na","naar","nam","namelijk","nee","neem","negen","nemen","nergens","niemand","niet","niets","niks","noch","nochtans","nog","nooit","nu","nv","of","om","omdat","ondanks","onder","ondertussen","ons","onze","onzeker","ooit","ook","op","over","overal","overige","paar","per","recent","redelijk","samen","sinds","steeds","te","tegen","tegenover","thans","tien","tiende","tijdens","tja","toch","toe","tot","totdat","tussen","twee","tweede","u","uit","uw","vaak","van","vanaf","veel","veertig","verder","verscheidene","verschillende","via","vier","vierde","vijf","vijfde","vijftig","volgend","volgens","voor","voordat","voorts","waar","waarom","waarschijnlijk","wanneer","waren","was","wat","we","wederom","weer","weinig","wel","welk","welke","werd","werden","werder","whatever","wie","wij","wijzelf","wil","wilden","willen","word","worden","wordt","zal","ze","zei","zeker","zelf","zelfde","zes","zeven","zich","zij","zijn","zijzelf","zo","zoals","zodat","zou","zouden","zulk","zullen"]
includes/ext/stopwords-json/dist/no.json ADDED
@@ -0,0 +1 @@
 
1
+ ["alle","at","av","bare","begge","ble","blei","bli","blir","blitt","både","båe","da","de","deg","dei","deim","deira","deires","dem","den","denne","der","dere","deres","det","dette","di","din","disse","ditt","du","dykk","dykkar","då","eg","ein","eit","eitt","eller","elles","en","enn","er","et","ett","etter","for","fordi","fra","før","ha","hadde","han","hans","har","hennar","henne","hennes","her","hjå","ho","hoe","honom","hoss","hossen","hun","hva","hvem","hver","hvilke","hvilken","hvis","hvor","hvordan","hvorfor","i","ikke","ikkje","ingen","ingi","inkje","inn","inni","ja","jeg","kan","kom","korleis","korso","kun","kunne","kva","kvar","kvarhelst","kven","kvi","kvifor","man","mange","me","med","medan","meg","meget","mellom","men","mi","min","mine","mitt","mot","mykje","ned","no","noe","noen","noka","noko","nokon","nokor","nokre","nå","når","og","også","om","opp","oss","over","på","samme","seg","selv","si","sia","sidan","siden","sin","sine","sitt","sjøl","skal","skulle","slik","so","som","somme","somt","så","sånn","til","um","upp","ut","uten","var","vart","varte","ved","vere","verte","vi","vil","ville","vore","vors","vort","vår","være","vært","å"]
includes/ext/stopwords-json/dist/pl.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aby","ach","aj","albo","ale","ani","aż","bardzo","bez","bo","bowiem","by","byli","bym","być","był","była","było","były","będzie","będą","chce","choć","ci","ciebie","cię","co","coraz","coś","czy","czyli","często","daleko","dla","dlaczego","dlatego","do","dobrze","dokąd","dość","dr","dużo","dwa","dwaj","dwie","dwoje","dzisiaj","dziś","gdy","gdyby","gdyż","gdzie","go","godz","hab","i","ich","ii","iii","ile","im","inne","inny","inż","iv","ix","iż","ja","jak","jakby","jaki","jakie","jako","je","jeden","jedna","jednak","jedno","jednym","jedynie","jego","jej","jemu","jest","jestem","jeszcze","jeśli","jeżeli","już","ją","każdy","kiedy","kierunku","kilku","kto","która","które","którego","której","który","których","którym","którzy","ku","lat","lecz","lub","ma","mają","mam","mamy","mgr","mi","miał","mimo","mnie","mną","mogą","moi","moja","moje","może","można","mu","musi","my","mój","na","nad","nam","nami","nas","nasi","nasz","nasza","nasze","natychmiast","nawet","nic","nich","nie","niego","niej","niemu","nigdy","nim","nimi","nią","niż","no","nowe","np","nr","o","o.o.","obok","od","ok","około","on","ona","one","oni","ono","oraz","owszem","pan","pl","po","pod","ponad","ponieważ","poza","prof","przed","przede","przedtem","przez","przy","raz","razie","roku","również","sam","sama","się","skąd","sobie","sposób","swoje","są","ta","tak","taki","takich","takie","także","tam","te","tego","tej","tel","temu","ten","teraz","też","to","tobie","tobą","trzeba","tu","tutaj","twoi","twoja","twoje","twój","ty","tych","tylko","tym","tys","tzw","tę","u","ul","vi","vii","viii","vol","w","wam","wami","was","wasi","wasz","wasza","wasze","we","wie","więc","wszystko","wtedy","www","wy","właśnie","wśród","xi","xii","xiii","xiv","xv","z","za","zawsze","zaś","ze","zł","żaden","że","żeby"]
includes/ext/stopwords-json/dist/pt.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","acerca","adeus","agora","ainda","algmas","algo","algumas","alguns","ali","além","ambos","ano","anos","antes","ao","aos","apenas","apoio","apontar","após","aquela","aquelas","aquele","aqueles","aqui","aquilo","as","assim","através","atrás","até","aí","baixo","bastante","bem","bom","breve","cada","caminho","catorze","cedo","cento","certamente","certeza","cima","cinco","coisa","com","como","comprido","conhecido","conselho","contra","corrente","custa","cá","da","daquela","daquele","dar","das","de","debaixo","demais","dentro","depois","desde","desligado","dessa","desse","desta","deste","deve","devem","deverá","dez","dezanove","dezasseis","dezassete","dezoito","dia","diante","direita","diz","dizem","dizer","do","dois","dos","doze","duas","dá","dão","dúvida","e","ela","elas","ele","eles","em","embora","enquanto","entre","então","era","essa","essas","esse","esses","esta","estado","estar","estará","estas","estava","este","estes","esteve","estive","estivemos","estiveram","estiveste","estivestes","estou","está","estás","estão","eu","exemplo","falta","fará","favor","faz","fazeis","fazem","fazemos","fazer","fazes","fazia","faço","fez","fim","final","foi","fomos","for","fora","foram","forma","foste","fostes","fui","geral","grande","grandes","grupo","hoje","horas","há","iniciar","inicio","ir","irá","isso","ista","iste","isto","já","lado","ligado","local","logo","longe","lugar","lá","maior","maioria","maiorias","mais","mal","mas","me","meio","menor","menos","meses","mesmo","meu","meus","mil","minha","minhas","momento","muito","muitos","máximo","mês","na","nada","naquela","naquele","nas","nem","nenhuma","nessa","nesse","nesta","neste","no","noite","nome","nos","nossa","nossas","nosso","nossos","nova","nove","novo","novos","num","numa","nunca","não","nível","nós","número","o","obra","obrigada","obrigado","oitava","oitavo","oito","onde","ontem","onze","os","ou","outra","outras","outro","outros","para","parece","parte","partir","pegar","pela","pelas","pelo","pelos","perto","pessoas","pode","podem","poder","poderá","podia","ponto","pontos","por","porque","porquê","posição","possivelmente","posso","possível","pouca","pouco","povo","primeira","primeiro","promeiro","próprio","próximo","puderam","pôde","põe","põem","qual","qualquer","quando","quanto","quarta","quarto","quatro","que","quem","quer","quero","questão","quieto","quinta","quinto","quinze","quê","relação","sabe","saber","se","segunda","segundo","sei","seis","sem","sempre","ser","seria","sete","seu","seus","sexta","sexto","sim","sistema","sob","sobre","sois","somente","somos","sou","sua","suas","são","sétima","sétimo","tal","talvez","também","tanto","tarde","te","tem","temos","tempo","tendes","tenho","tens","tentar","tentaram","tente","tentei","ter","terceira","terceiro","teu","teus","teve","tipo","tive","tivemos","tiveram","tiveste","tivestes","toda","todas","todo","todos","trabalhar","trabalho","treze","três","tu","tua","tuas","tudo","tão","têm","um","uma","umas","uns","usa","usar","vai","vais","valor","veja","vem","vens","ver","verdade","verdadeiro","vez","vezes","viagem","vindo","vinte","você","vocês","vos","vossa","vossas","vosso","vossos","vários","vão","vêm","vós","zero","à","às","área","é","és","último"]
includes/ext/stopwords-json/dist/ro.json ADDED
@@ -0,0 +1 @@
 
1
+ ["acea","aceasta","această","aceea","acei","aceia","acel","acela","acele","acelea","acest","acesta","aceste","acestea","aceşti","aceştia","acolo","acord","acum","ai","aia","aibă","aici","al","ale","alea","altceva","altcineva","am","ar","are","asemenea","asta","astea","astăzi","asupra","au","avea","avem","aveţi","azi","aş","aşadar","aţi","bine","bucur","bună","ca","care","caut","ce","cel","ceva","chiar","cinci","cine","cineva","contra","cu","cum","cumva","curând","curînd","când","cât","câte","câtva","câţi","cînd","cît","cîte","cîtva","cîţi","că","căci","cărei","căror","cărui","către","da","dacă","dar","datorită","dată","dau","de","deci","deja","deoarece","departe","deşi","din","dinaintea","dintr-","dintre","doi","doilea","două","drept","după","dă","ea","ei","el","ele","eram","este","eu","eşti","face","fata","fi","fie","fiecare","fii","fim","fiu","fiţi","frumos","fără","graţie","halbă","iar","ieri","la","le","li","lor","lui","lângă","lîngă","mai","mea","mei","mele","mereu","meu","mi","mie","mine","mult","multă","mulţi","mulţumesc","mâine","mîine","mă","ne","nevoie","nici","nicăieri","nimeni","nimeri","nimic","nişte","noastre","noastră","noi","noroc","nostru","nouă","noştri","nu","opt","ori","oricare","orice","oricine","oricum","oricând","oricât","oricînd","oricît","oriunde","patra","patru","patrulea","pe","pentru","peste","pic","poate","pot","prea","prima","primul","prin","printr-","puţin","puţina","puţină","până","pînă","rog","sa","sale","sau","se","spate","spre","sub","sunt","suntem","sunteţi","sută","sînt","sîntem","sînteţi","să","săi","său","ta","tale","te","timp","tine","toate","toată","tot","totuşi","toţi","trei","treia","treilea","tu","tăi","tău","un","una","unde","undeva","unei","uneia","unele","uneori","unii","unor","unora","unu","unui","unuia","unul","vi","voastre","voastră","voi","vostru","vouă","voştri","vreme","vreo","vreun","vă","zece","zero","zi","zice","îi","îl","îmi","împotriva","în","înainte","înaintea","încotro","încât","încît","între","întrucât","întrucît","îţi","ăla","ălea","ăsta","ăstea","ăştia","şapte","şase","şi","ştiu","ţi","ţie"]
includes/ext/stopwords-json/dist/ru.json ADDED
@@ -0,0 +1 @@
 
1
+ ["а","алло","без","белый","близко","более","больше","большой","будем","будет","будете","будешь","будто","буду","будут","будь","бы","бывает","бывь","был","была","были","было","быть","в","важная","важное","важные","важный","вам","вами","вас","ваш","ваша","ваше","ваши","вверх","вдали","вдруг","ведь","везде","вернуться","весь","вечер","взгляд","взять","вид","видеть","вместе","вниз","внизу","во","вода","война","вокруг","вон","вообще","вопрос","восемнадцатый","восемнадцать","восемь","восьмой","вот","впрочем","времени","время","все","всегда","всего","всем","всеми","всему","всех","всею","всю","всюду","вся","всё","второй","вы","выйти","г","где","главный","глаз","говорил","говорит","говорить","год","года","году","голова","голос","город","да","давать","давно","даже","далекий","далеко","дальше","даром","дать","два","двадцатый","двадцать","две","двенадцатый","двенадцать","дверь","двух","девятнадцатый","девятнадцать","девятый","девять","действительно","дел","делать","дело","день","деньги","десятый","десять","для","до","довольно","долго","должно","должный","дом","дорога","друг","другая","другие","других","друго","другое","другой","думать","душа","е","его","ее","ей","ему","если","есть","еще","ещё","ею","её","ж","ждать","же","жена","женщина","жизнь","жить","за","занят","занята","занято","заняты","затем","зато","зачем","здесь","земля","знать","значит","значить","и","идти","из","или","им","именно","иметь","ими","имя","иногда","их","к","каждая","каждое","каждые","каждый","кажется","казаться","как","какая","какой","кем","книга","когда","кого","ком","комната","кому","конец","конечно","которая","которого","которой","которые","который","которых","кроме","кругом","кто","куда","лежать","лет","ли","лицо","лишь","лучше","любить","люди","м","маленький","мало","мать","машина","между","меля","менее","меньше","меня","место","миллионов","мимо","минута","мир","мира","мне","много","многочисленная","многочисленное","многочисленные","многочисленный","мной","мною","мог","могут","мож","может","можно","можхо","мои","мой","мор","москва","мочь","моя","моё","мы","на","наверху","над","надо","назад","наиболее","найти","наконец","нам","нами","народ","нас","начала","начать","наш","наша","наше","наши","не","него","недавно","недалеко","нее","ней","некоторый","нельзя","нем","немного","нему","непрерывно","нередко","несколько","нет","нею","неё","ни","нибудь","ниже","низко","никакой","никогда","никто","никуда","ними","них","ничего","ничто","но","новый","нога","ночь","ну","нужно","нужный","нх","о","об","оба","обычно","один","одиннадцатый","одиннадцать","однажды","однако","одного","одной","оказаться","окно","около","он","она","они","оно","опять","особенно","остаться","от","ответить","отец","отовсюду","отсюда","очень","первый","перед","писать","плечо","по","под","подумать","пожалуйста","позже","пойти","пока","пол","получить","помнить","понимать","понять","пор","пора","после","последний","посмотреть","посреди","потом","потому","почему","почти","правда","прекрасно","при","про","просто","против","процентов","пятнадцатый","пятнадцать","пятый","пять","работа","работать","раз","разве","рано","раньше","ребенок","решить","россия","рука","русский","ряд","рядом","с","сам","сама","сами","самим","самими","самих","само","самого","самой","самом","самому","саму","самый","свет","свое","своего","своей","свои","своих","свой","свою","сделать","сеаой","себе","себя","сегодня","седьмой","сейчас","семнадцатый","семнадцать","семь","сидеть","сила","сих","сказал","сказала","сказать","сколько","слишком","слово","случай","смотреть","сначала","снова","со","собой","собою","советский","совсем","спасибо","спросить","сразу","стал","старый","стать","стол","сторона","стоять","страна","суть","считать","т","та","так","такая","также","таки","такие","такое","такой","там","твой","твоя","твоё","те","тебе","тебя","тем","теми","теперь","тех","то","тобой","тобою","товарищ","тогда","того","тоже","только","том","тому","тот","тою","третий","три","тринадцатый","тринадцать","ту","туда","тут","ты","тысяч","у","увидеть","уж","уже","улица","уметь","утро","хороший","хорошо","хотеть","хоть","хотя","хочешь","час","часто","часть","чаще","чего","человек","чем","чему","через","четвертый","четыре","четырнадцатый","четырнадцать","что","чтоб","чтобы","чуть","шестнадцатый","шестнадцать","шестой","шесть","эта","эти","этим","этими","этих","это","этого","этой","этом","этому","этот","эту","я"]
includes/ext/stopwords-json/dist/sk.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","aby","aj","ako","aký","ale","alebo","ani","avšak","ba","bez","buï","cez","do","ho","hoci","i","ich","im","ja","jeho","jej","jemu","ju","k","kam","kde","kedže","keï","kto","ktorý","ku","lebo","ma","mi","mne","mnou","mu","my","mòa","môj","na","nad","nami","neho","nej","nemu","nich","nielen","nim","no","nám","nás","náš","ním","o","od","on","ona","oni","ono","ony","po","pod","pre","pred","pri","s","sa","seba","sem","so","svoj","taký","tam","teba","tebe","tebou","tej","ten","ti","tie","to","toho","tomu","tou","tvoj","ty","tá","tým","v","vami","veï","vo","vy","vám","vás","váš","však","z","za","zo","a","èi","èo","èí","òom","òou","òu","že"]
includes/ext/stopwords-json/dist/sl.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","ali","april","avgust","b","bi","bil","bila","bile","bili","bilo","biti","blizu","bo","bodo","bojo","bolj","bom","bomo","boste","bova","boš","brez","c","cel","cela","celi","celo","d","da","daleč","dan","danes","datum","december","deset","deseta","deseti","deseto","devet","deveta","deveti","deveto","do","dober","dobra","dobri","dobro","dokler","dol","dolg","dolga","dolgi","dovolj","drug","druga","drugi","drugo","dva","dve","e","eden","en","ena","ene","eni","enkrat","eno","etc.","f","februar","g","g.","ga","ga.","gor","gospa","gospod","h","halo","i","idr.","ii","iii","in","iv","ix","iz","j","januar","jaz","je","ji","jih","jim","jo","julij","junij","jutri","k","kadarkoli","kaj","kajti","kako","kakor","kamor","kamorkoli","kar","karkoli","katerikoli","kdaj","kdo","kdorkoli","ker","ki","kje","kjer","kjerkoli","ko","koder","koderkoli","koga","komu","kot","kratek","kratka","kratke","kratki","l","lahka","lahke","lahki","lahko","le","lep","lepa","lepe","lepi","lepo","leto","m","maj","majhen","majhna","majhni","malce","malo","manj","marec","me","med","medtem","mene","mesec","mi","midva","midve","mnogo","moj","moja","moje","mora","morajo","moram","moramo","morate","moraš","morem","mu","n","na","nad","naj","najina","najino","najmanj","naju","največ","nam","narobe","nas","nato","nazaj","naš","naša","naše","ne","nedavno","nedelja","nek","neka","nekaj","nekatere","nekateri","nekatero","nekdo","neke","nekega","neki","nekje","neko","nekoga","nekoč","ni","nikamor","nikdar","nikjer","nikoli","nič","nje","njega","njegov","njegova","njegovo","njej","njemu","njen","njena","njeno","nji","njih","njihov","njihova","njihovo","njiju","njim","njo","njun","njuna","njuno","no","nocoj","november","npr.","o","ob","oba","obe","oboje","od","odprt","odprta","odprti","okoli","oktober","on","onadva","one","oni","onidve","osem","osma","osmi","osmo","oz.","p","pa","pet","peta","petek","peti","peto","po","pod","pogosto","poleg","poln","polna","polni","polno","ponavadi","ponedeljek","ponovno","potem","povsod","pozdravljen","pozdravljeni","prav","prava","prave","pravi","pravo","prazen","prazna","prazno","prbl.","precej","pred","prej","preko","pri","pribl.","približno","primer","pripravljen","pripravljena","pripravljeni","proti","prva","prvi","prvo","r","ravno","redko","res","reč","s","saj","sam","sama","same","sami","samo","se","sebe","sebi","sedaj","sedem","sedma","sedmi","sedmo","sem","september","seveda","si","sicer","skoraj","skozi","slab","smo","so","sobota","spet","sreda","srednja","srednji","sta","ste","stran","stvar","sva","t","ta","tak","taka","take","taki","tako","takoj","tam","te","tebe","tebi","tega","težak","težka","težki","težko","ti","tista","tiste","tisti","tisto","tj.","tja","to","toda","torek","tretja","tretje","tretji","tri","tu","tudi","tukaj","tvoj","tvoja","tvoje","u","v","vaju","vam","vas","vaš","vaša","vaše","ve","vedno","velik","velika","veliki","veliko","vendar","ves","več","vi","vidva","vii","viii","visok","visoka","visoke","visoki","vsa","vsaj","vsak","vsaka","vsakdo","vsake","vsaki","vsakomur","vse","vsega","vsi","vso","včasih","včeraj","x","z","za","zadaj","zadnji","zakaj","zaprta","zaprti","zaprto","zdaj","zelo","zunaj","č","če","često","četrta","četrtek","četrti","četrto","čez","čigav","š","šest","šesta","šesti","šesto","štiri","ž","že"]
includes/ext/stopwords-json/dist/so.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aad","albaabkii","atabo","ay","ayaa","ayee","ayuu","dhan","hadana","in","inuu","isku","jiray","jirtay","ka","kale","kasoo","ku","kuu","lakin","markii","oo","si","soo","uga","ugu","uu","waa","waxa","waxuu"]
includes/ext/stopwords-json/dist/st.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","ba","bane","bona","e","ea","eaba","empa","ena","ha","hae","hape","ho","hore","ka","ke","la","le","li","me","mo","moo","ne","o","oa","re","sa","se","tloha","tsa","tse"]
includes/ext/stopwords-json/dist/sv.json ADDED
@@ -0,0 +1 @@
 
1
+ ["aderton","adertonde","adjö","aldrig","alla","allas","allt","alltid","alltså","andra","andras","annan","annat","artonde","artonn","att","av","bakom","bara","behöva","behövas","behövde","behövt","beslut","beslutat","beslutit","bland","blev","bli","blir","blivit","bort","borta","bra","bäst","bättre","båda","bådas","dag","dagar","dagarna","dagen","de","del","delen","dem","den","denna","deras","dess","dessa","det","detta","dig","din","dina","dit","ditt","dock","du","där","därför","då","efter","eftersom","ej","elfte","eller","elva","en","enkel","enkelt","enkla","enligt","er","era","ert","ett","ettusen","fanns","fem","femte","femtio","femtionde","femton","femtonde","fick","fin","finnas","finns","fjorton","fjortonde","fjärde","fler","flera","flesta","fram","framför","från","fyra","fyrtio","fyrtionde","få","får","fått","följande","för","före","förlåt","förra","första","genast","genom","gick","gjorde","gjort","god","goda","godare","godast","gott","gälla","gäller","gällt","gärna","gå","går","gått","gör","göra","ha","hade","haft","han","hans","har","heller","hellre","helst","helt","henne","hennes","hit","hon","honom","hundra","hundraen","hundraett","hur","här","hög","höger","högre","högst","i","ibland","icke","idag","igen","igår","imorgon","in","inför","inga","ingen","ingenting","inget","innan","inne","inom","inte","inuti","ja","jag","ju","jämfört","kan","kanske","knappast","kom","komma","kommer","kommit","kr","kunde","kunna","kunnat","kvar","legat","ligga","ligger","lika","likställd","likställda","lilla","lite","liten","litet","länge","längre","längst","lätt","lättare","lättast","långsam","långsammare","långsammast","långsamt","långt","man","med","mellan","men","mer","mera","mest","mig","min","mina","mindre","minst","mitt","mittemot","mot","mycket","många","måste","möjlig","möjligen","möjligt","möjligtvis","ned","nederst","nedersta","nedre","nej","ner","ni","nio","nionde","nittio","nittionde","nitton","nittonde","nog","noll","nr","nu","nummer","när","nästa","någon","någonting","något","några","nödvändig","nödvändiga","nödvändigt","nödvändigtvis","och","också","ofta","oftast","olika","olikt","om","oss","på","rakt","redan","rätt","sade","sagt","samma","sedan","senare","senast","sent","sex","sextio","sextionde","sexton","sextonde","sig","sin","sina","sist","sista","siste","sitt","sitta","sju","sjunde","sjuttio","sjuttionde","sjutton","sjuttonde","själv","sjätte","ska","skall","skulle","slutligen","små","smått","snart","som","stor","stora","stort","större","störst","säga","säger","sämre","sämst","så","sådan","sådana","sådant","tack","tidig","tidigare","tidigast","tidigt","till","tills","tillsammans","tio","tionde","tjugo","tjugoen","tjugoett","tjugonde","tjugotre","tjugotvå","tjungo","tolfte","tolv","tre","tredje","trettio","trettionde","tretton","trettonde","två","tvåhundra","under","upp","ur","ursäkt","ut","utan","utanför","ute","vad","var","vara","varför","varifrån","varit","varje","varken","vars","varsågod","vart","vem","vems","verkligen","vi","vid","vidare","viktig","viktigare","viktigast","viktigt","vilka","vilkas","vilken","vilket","vill","vänster","vänstra","värre","vår","våra","vårt","än","ännu","är","även","åt","åtminstone","åtta","åttio","åttionde","åttonde","över","övermorgon","överst","övre"]
includes/ext/stopwords-json/dist/sw.json ADDED
@@ -0,0 +1 @@
 
1
+ ["akasema","alikuwa","alisema","baada","basi","bila","cha","chini","hadi","hapo","hata","hivyo","hiyo","huku","huo","ili","ilikuwa","juu","kama","karibu","katika","kila","kima","kisha","kubwa","kutoka","kuwa","kwa","kwamba","kwenda","kwenye","la","lakini","mara","mdogo","mimi","mkubwa","mmoja","moja","muda","mwenye","na","naye","ndani","ng","ni","nini","nonkungu","pamoja","pia","sana","sasa","sauti","tafadhali","tena","tu","vile","wa","wakati","wake","walikuwa","wao","watu","wengine","wote","ya","yake","yangu","yao","yeye","yule","za","zaidi","zake"]
includes/ext/stopwords-json/dist/th.json ADDED
@@ -0,0 +1 @@
 
1
+ ["กล่าว","กว่า","กัน","กับ","การ","ก็","ก่อน","ขณะ","ขอ","ของ","ขึ้น","คง","ครั้ง","ความ","คือ","จะ","จัด","จาก","จึง","ช่วง","ซึ่ง","ดัง","ด้วย","ด้าน","ตั้ง","ตั้งแต่","ตาม","ต่อ","ต่าง","ต่างๆ","ต้อง","ถึง","ถูก","ถ้า","ทั้ง","ทั้งนี้","ทาง","ที่","ที่สุด","ทุก","ทํา","ทําให้","นอกจาก","นัก","นั้น","นี้","น่า","นํา","บาง","ผล","ผ่าน","พบ","พร้อม","มา","มาก","มี","ยัง","รวม","ระหว่าง","รับ","ราย","ร่วม","ลง","วัน","ว่า","สุด","ส่ง","ส่วน","สําหรับ","หนึ่ง","หรือ","หลัง","หลังจาก","หลาย","หาก","อยาก","อยู่","อย่าง","ออก","อะไร","อาจ","อีก","เขา","เข้า","เคย","เฉพาะ","เช่น","เดียว","เดียวกัน","เนื่องจาก","เปิด","เปิดเผย","เป็น","เป็นการ","เพราะ","เพื่อ","เมื่อ","เรา","เริ่ม","เลย","เห็น","เอง","แต่","แบบ","แรก","และ","แล้ว","แห่ง","โดย","ใน","ให้","ได้","ไป","ไม่","ไว้"]
includes/ext/stopwords-json/dist/tr.json ADDED
@@ -0,0 +1 @@
 
1
+ ["acaba","acep","adeta","altmýþ","altmış","altý","altı","ama","ancak","arada","artýk","aslında","aynen","ayrıca","az","bana","bari","bazen","bazý","bazı","baţka","belki","ben","benden","beni","benim","beri","beþ","beş","beţ","bile","bin","bir","biraz","biri","birkaç","birkez","birçok","birþey","birþeyi","birşey","birşeyi","birţey","biz","bizden","bize","bizi","bizim","bu","buna","bunda","bundan","bunlar","bunları","bunların","bunu","bunun","burada","böyle","böylece","bütün","da","daha","dahi","dahil","daima","dair","dayanarak","de","defa","deđil","değil","diye","diđer","diğer","doksan","dokuz","dolayı","dolayısıyla","dört","edecek","eden","ederek","edilecek","ediliyor","edilmesi","ediyor","elli","en","etmesi","etti","ettiği","ettiğini","eđer","eğer","fakat","gibi","göre","halbuki","halen","hangi","hani","hariç","hatta","hele","hem","henüz","hep","hepsi","her","herhangi","herkes","herkesin","hiç","hiçbir","iken","iki","ila","ile","ilgili","ilk","illa","ise","itibaren","itibariyle","iyi","iyice","için","işte","iţte","kadar","kanýmca","karşın","katrilyon","kendi","kendilerine","kendini","kendisi","kendisine","kendisini","kere","kez","keţke","ki","kim","kimden","kime","kimi","kimse","kýrk","kýsaca","kırk","lakin","madem","međer","milyar","milyon","mu","mü","mý","mı","nasýl","nasıl","ne","neden","nedenle","nerde","nere","nerede","nereye","nitekim","niye","niçin","o","olan","olarak","oldu","olduklarını","olduğu","olduğunu","olmadı","olmadığı","olmak","olması","olmayan","olmaz","olsa","olsun","olup","olur","olursa","oluyor","on","ona","ondan","onlar","onlardan","onlari","onlarýn","onları","onların","onu","onun","otuz","oysa","pek","rağmen","sadece","sanki","sekiz","seksen","sen","senden","seni","senin","siz","sizden","sizi","sizin","sonra","tarafından","trilyon","tüm","var","vardı","ve","veya","veyahut","ya","yahut","yani","yapacak","yapmak","yaptı","yaptıkları","yaptığı","yaptığını","yapılan","yapılması","yapıyor","yedi","yerine","yetmiþ","yetmiş","yetmiţ","yine","yirmi","yoksa","yüz","zaten","çok","çünkü","öyle","üzere","üç","þey","þeyden","þeyi","þeyler","þu","þuna","þunda","þundan","þunu","şey","şeyden","şeyi","şeyler","şu","şuna","şunda","şundan","şunları","şunu","şöyle","ţayet","ţimdi","ţu","ţöyle"]
includes/ext/stopwords-json/dist/yo.json ADDED
@@ -0,0 +1 @@
 
1
+ ["a","an","bá","bí","bẹ̀rẹ̀","fún","fẹ́","gbogbo","inú","jù","jẹ","jẹ́","kan","kì","kí","kò","láti","lè","lọ","mi","mo","máa","mọ̀","ni","náà","ní","nígbà","nítorí","nǹkan","o","padà","pé","púpọ̀","pẹ̀lú","rẹ̀","sì","sí","sínú","ṣ","ti","tí","wà","wá","wọn","wọ́n","yìí","àti","àwọn","é","í","òun","ó","ń","ńlá","ṣe","ṣé","ṣùgbọ́n","ẹmọ́","ọjọ́","ọ̀pọ̀lọpọ̀"]
includes/ext/stopwords-json/dist/zh.json ADDED
@@ -0,0 +1 @@
 
1
+ ["、","。","〈","〉","《","》","一","一切","一则","一方面","一旦","一来","一样","一般","七","万一","三","上下","不仅","不但","不光","不单","不只","不如","不怕","不惟","不成","不拘","不比","不然","不特","不独","不管","不论","不过","不问","与","与其","与否","与此同时","且","两者","个","临","为","为了","为什么","为何","为着","乃","乃至","么","之","之一","之所以","之类","乌乎","乎","乘","九","也","也好","也罢","了","二","于","于是","于是乎","云云","五","人家","什么","什么样","从","从而","他","他人","他们","以","以便","以免","以及","以至","以至于","以致","们","任","任何","任凭","似的","但","但是","何","何况","何处","何时","作为","你","你们","使得","例如","依","依照","俺","俺们","倘","倘使","倘或","倘然","倘若","借","假使","假如","假若","像","八","六","兮","关于","其","其一","其中","其二","其他","其余","其它","其次","具体地说","具体说来","再者","再说","冒","冲","况且","几","几时","凭","凭借","则","别","别的","别说","到","前后","前者","加之","即","即令","即使","即便","即或","即若","又","及","及其","及至","反之","反过来","反过来说","另","另一方面","另外","只是","只有","只要","只限","叫","叮咚","可","可以","可是","可见","各","各个","各位","各种","各自","同","同时","向","向着","吓","吗","否则","吧","吧哒","吱","呀","呃","呕","呗","呜","呜呼","呢","呵","呸","呼哧","咋","和","咚","咦","咱","咱们","咳","哇","哈","哈哈","哉","哎","哎呀","哎哟","哗","哟","哦","哩","哪","哪个","哪些","哪儿","哪天","哪年","哪怕","哪样","哪边","哪里","哼","哼唷","唉","啊","啐","啥","啦","啪达","喂","喏","喔唷","嗡嗡","嗬","嗯","嗳","嘎","嘎登","嘘","嘛","嘻","嘿","四","因","因为","因此","因而","固然","在","在下","地","多","多少","她","她们","如","如上所述","如何","如其","如果","如此","如若","宁","宁可","宁愿","宁肯","它","它们","对","对于","将","尔后","尚且","就","就是","就是说","尽","尽管","岂但","己","并","并且","开外","开始","归","当","当着","彼","彼此","往","待","得","怎","怎么","怎么办","怎么样","怎样","总之","总的来看","总的来说","总的说来","总而言之","恰恰相反","您","慢说","我","我们","或","或是","或者","所","所以","打","把","抑或","拿","按","按照","换句话说","换言之","据","接着","故","故此","旁人","无宁","无论","既","既是","既然","时候","是","是的","替","有","有些","有关","有的","望","朝","朝着","本","本着","来","来着","极了","果然","果真","某","某个","某些","根据","正如","此","此外","此间","毋宁","每","每当","比","比如","比方","沿","沿着","漫说","焉","然则","然后","然而","照","照着","甚么","甚而","甚至","用","由","由于","由此可见","的","的话","相对而言","省得","着","着呢","矣","离","第","等","等等","管","紧接着","纵","纵令","纵使","纵然","经","经过","结果","给","继而","综上所述","罢了","者","而","而且","而况","而外","而已","而是","而言","能","腾","自","自个儿","自从","自各儿","自家","自己","自身","至","至于","若","若是","若非","莫若","虽","虽则","虽然","虽说","被","要","要不","要不是","要不然","要么","要是","让","论","设使","设若","该","诸位","谁","谁知","赶","起","起见","趁","趁着","越是","跟","较","较之","边","过","还是","还有","这","这个","这么","这么些","这么样","这么点儿","这些","这会儿","这儿","这就是说","这时","这样","这边","这里","进而","连","连同","通过","遵照","那","那个","那么","那么些","那么样","那些","那会儿","那儿","那时","那样","那边","那里","鄙人","鉴于","阿","除","除了","除此之外","除非","随","随着","零","非但","非徒","靠","顺","顺着","首先","︿","!","#","$","%","&","(",")","*","+",",","0","1","2","3","4","5","6","7","8","9",":",";","<",">","?","@","[","]","{","|","}","~","¥"]
includes/ext/stopwords-json/dist/zu.json ADDED
@@ -0,0 +1 @@
 
1
+ ["futhi","kahle","kakhulu","kanye","khona","kodwa","kungani","kusho","la","lakhe","lapho","mina","ngesikhathi","nje","phansi","phezulu","u","ukuba","ukuthi","ukuze","uma","wahamba","wakhe","wami","wase","wathi","yakhe","zakhe","zonke"]
includes/views/permalink-manager-pro-addons.php ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Display the page where the slugs could be regenerated or replaced
5
+ */
6
+ class Permalink_Manager_Pro_Addons extends Permalink_Manager_Class {
7
+
8
+ public function __construct() {
9
+ add_action('init', array($this, 'init'), 9);
10
+ }
11
+
12
+ public function init() {
13
+ if(Permalink_Manager_Admin_Functions::is_pro_active()) {
14
+ add_filter( 'permalink_manager_sections', array($this, 'add_admin_section'), 5 );
15
+
16
+ // Stop Words
17
+ add_action( 'admin_init', array($this, 'save_stop_words'), 9 );
18
+
19
+ add_filter( 'permalink_manager_tools_fields', array($this, 'filter_tools_fields'), 9, 2 );
20
+ add_filter( 'permalink_manager_permastructs_fields', array($this, 'filter_permastructure_fields'), 9 );
21
+ }
22
+
23
+ add_filter( 'permalink_manager_settings_fields', array($this, 'filter_settings_fields'), 9 );
24
+ }
25
+
26
+ /**
27
+ * Permastructures tab
28
+ */
29
+ public function filter_permastructure_fields($fields) {
30
+ global $permalink_manager_permastructs;
31
+
32
+ $taxonomies = Permalink_Manager_Helper_Functions::get_taxonomies_array('full');
33
+
34
+ foreach($taxonomies as $taxonomy) {
35
+ $taxonomy_name = $taxonomy['name'];
36
+
37
+ // Check if taxonomy exists
38
+ if(!taxonomy_exists($taxonomy_name)) { continue; }
39
+
40
+ $fields["taxonomies"]["fields"][$taxonomy_name] = array(
41
+ 'label' => $taxonomy['label'],
42
+ 'container' => 'row',
43
+ 'input_class' => 'permastruct-field',
44
+ 'taxonomy' => $taxonomy,
45
+ 'type' => 'permastruct'
46
+ );
47
+ }
48
+
49
+ // Separate WooCommerce CPT & custom taxonomies
50
+ if(class_exists('WooCommerce')) {
51
+ $woocommerce_fields = array('product' => 'post_types', 'product_tag' => 'taxonomies', 'product_cat' => 'taxonomies');
52
+
53
+ foreach($woocommerce_fields as $field => $field_type) {
54
+ if(empty($fields[$field_type]["fields"][$field])) { continue; }
55
+
56
+ $fields["woocommerce"]["fields"][$field] = $fields[$field_type]["fields"][$field];
57
+ $fields["woocommerce"]["fields"][$field]["name"] = "{$field_type}[{$field}]";
58
+ unset($fields[$field_type]["fields"][$field]);
59
+ }
60
+ }
61
+
62
+ // Remove alert from "Permalink Manager Lite" version
63
+ unset($fields["taxonomies"]['append_content']);
64
+ unset($fields["woocommerce"]['append_content']);
65
+
66
+ return $fields;
67
+ }
68
+
69
+ /**
70
+ * Tools tab
71
+ */
72
+ public function filter_tools_fields($fields, $subsection) {
73
+ unset($fields['content_type']['disabled']);
74
+ unset($fields['content_type']['pro']);
75
+ unset($fields['taxonomies']['pro']);
76
+ unset($fields['ids']['disabled']);
77
+ unset($fields['ids']['pro']);
78
+
79
+ return $fields;
80
+ }
81
+
82
+ /**
83
+ * Tax Editor & Import support
84
+ */
85
+ public function add_admin_section($admin_sections) {
86
+ // Add "Stop words" subsectio for "Tools"
87
+ $admin_sections['tools']['subsections']['stop_words']['function'] = array('class' => 'Permalink_Manager_Pro_Addons', 'method' => 'stop_words_output');
88
+
89
+ // Display Permalinks for all selected taxonomies
90
+ if(!empty($admin_sections['uri_editor']['subsections'])) {
91
+ foreach($admin_sections['uri_editor']['subsections'] as &$subsection) {
92
+ if(isset($subsection['pro'])) {
93
+ $subsection['function'] = array('class' => 'Permalink_Manager_Tax_Uri_Editor_Table', 'method' => 'display_admin_section');
94
+ unset($subsection['html']);
95
+ }
96
+ }
97
+ }
98
+
99
+ // Add "Support" section
100
+ $admin_sections['support'] = array(
101
+ 'name' => __('Support', 'permalink-manager'),
102
+ 'function' => array('class' => 'Permalink_Manager_Pro_Addons', 'method' => 'support_output')
103
+ );
104
+
105
+ // Import support
106
+ $admin_sections['tools']['subsections']['import']['function'] = array('class' => 'Permalink_Manager_Pro_Addons', 'method' => 'import_output');
107
+
108
+ return $admin_sections;
109
+ }
110
+
111
+ /**
112
+ * Settings tab
113
+ */
114
+ public function filter_settings_fields($fields) {
115
+ $expiration_info = Permalink_Manager_Pro_Functions::get_expiration_date();
116
+
117
+ // Network licence key (multisite)
118
+ if(is_multisite()) {
119
+ $licence_key = get_site_option('permalink-manager-licence-key');
120
+ }
121
+ // Single website licence key
122
+ else {
123
+ $licence_key = (!empty($permalink_manager_options['licence']['licence_key'])) ? $permalink_manager_options['licence']['licence_key'] : "";
124
+ }
125
+
126
+ // 1. licence key
127
+ $fields['licence'] = array(
128
+ 'section_name' => __('Licence', 'permalink-manager'),
129
+ 'container' => 'row',
130
+ 'fields' => array(
131
+ 'licence_key' => array(
132
+ 'type' => 'text',
133
+ 'value' => $licence_key,
134
+ 'label' => __('Licence key', 'permalink-manager'),
135
+ 'after_description' => sprintf('<p class="field-description description licence-info">%s</p><p class="field-description description"><a href="%s" id="pm_get_exp_date" class="mute">%s</a></p>', $expiration_info, "#", __('Check the expiration date.', 'permalink-manager'))
136
+ )
137
+ )
138
+ );
139
+
140
+ // 2. Unblock some fields
141
+ if(Permalink_Manager_Admin_Functions::is_pro_active()) {
142
+ unset($fields['seo']['fields']['setup_redirects']['pro']);
143
+ unset($fields['seo']['fields']['setup_redirects']['disabled']);
144
+ }
145
+
146
+ return $fields;
147
+ }
148
+
149
+ /**
150
+ * "Stop words" subsection
151
+ */
152
+ public function stop_words_output() {
153
+ global $permalink_manager_options;
154
+
155
+ // Fix the escaped quotes
156
+ $words_list = (!empty($permalink_manager_options['stop-words']['stop-words-list'])) ? stripslashes($permalink_manager_options['stop-words']['stop-words-list']) : "";
157
+
158
+ // Get stop-words languages
159
+ $languages = array_merge(array('' => __('-- Use predefined words list --', 'permalink-manager')), Permalink_Manager_Pro_Functions::load_stop_words_languages());
160
+
161
+ $buttons = "<table class=\"stop-words-buttons\"><tr>";
162
+ $buttons .= sprintf("<td><a href=\"#\" class=\"clear_all_words button button-small\">%s</a></td>", __("Remove all words", "permalink-manager"));
163
+ $buttons .= sprintf("<td>%s<td>", Permalink_Manager_Admin_Functions::generate_option_field("load_stop_words", array("type" => "select", "input_class" => "widefat small-select load_stop_words", "choices" => $languages)));
164
+ $buttons .= sprintf("<td>%s</td>", get_submit_button(__('Add the words from the list', 'permalink-manager'), 'button-small button-primary', 'load_stop_words_button', false));
165
+ $buttons .= "</tr></table>";
166
+
167
+ $fields = apply_filters('permalink_manager_tools_fields', array(
168
+ 'stop-words' => array(
169
+ 'container' => 'row',
170
+ 'fields' => array(
171
+ 'stop-words-enable' => array(
172
+ 'label' => __( 'Enable "stop words"', 'permalink-manager' ),
173
+ 'type' => 'single_checkbox',
174
+ 'container' => 'row',
175
+ 'input_class' => 'enable_stop_words'
176
+ ),
177
+ 'stop-words-list' => array(
178
+ 'label' => __( '"Stop words" list', 'permalink-manager' ),
179
+ 'type' => 'textarea',
180
+ 'container' => 'row',
181
+ 'value' => $words_list,
182
+ 'description' => __('Type comma to separate the words.', 'permalink-manager'),
183
+ 'input_class' => 'widefat stop_words',
184
+ 'after_description' => $buttons
185
+ )
186
+ )
187
+ )
188
+ ), 'stop_words');
189
+
190
+ $sidebar = '<h3>' . __('Instructions', 'permalink-manager') . '</h3>';
191
+ $sidebar .= wpautop(__('If enabled, all selected "stop words" will be automatically removed from default URIs.', 'permalink-manager'));
192
+ $sidebar .= wpautop(__('Each of the words can be removed and any new words can be added to the list. You can also use a predefined list (available in 21 languages).', 'permalink-manager'));
193
+
194
+ return Permalink_Manager_Admin_Functions::get_the_form($fields, '', array('text' => __('Save', 'permalink-manager'), 'class' => 'primary margin-top'), $sidebar, array('action' => 'permalink-manager', 'name' => 'save_stop_words'), true);
195
+ }
196
+
197
+ public function save_stop_words() {
198
+ if(isset($_POST['stop-words']) && wp_verify_nonce($_POST['save_stop_words'], 'permalink-manager')) {
199
+ Permalink_Manager_Actions::save_settings('stop-words', $_POST['stop-words']);
200
+ }
201
+ }
202
+
203
+ /**
204
+ * "Import" subsection
205
+ */
206
+ public function import_output() {
207
+ global $permalink_manager_options;
208
+
209
+ // Count custom permalinks URIs
210
+ $count_custom_permalinks = count(Permalink_Manager_Third_Parties::custom_permalinks_uris());
211
+
212
+ $fields = apply_filters('permalink_manager_tools_fields', array(
213
+ 'disable_custom_permalinks' => array(
214
+ 'label' => __( 'Custom Permalinks', 'permalink-manager' ),
215
+ 'checkbox_label' => __( 'Deactivate after import', 'permalink-manager' ),
216
+ 'type' => 'single_checkbox',
217
+ 'container' => 'row',
218
+ 'description' => __('If selected, "Custom Permalinks" plugin will be deactivated after its custom URIs are imported.', 'permalink-manager'),
219
+ 'input_class' => ''
220
+ )
221
+ ), 'regenerate');
222
+
223
+ $sidebar = '<h3>' . __('Instructions', 'permalink-manager') . '</h3>';
224
+ $sidebar .= wpautop(__('Please note that "Custom Permalinks" (if activated) may break the behavior of this plugin.', 'permalink-manager'));
225
+ $sidebar .= wpautop(__('Therefore, it is recommended to disable "Custom Permalink" and import old permalinks before using Permalink Manager Pro.', 'permalink-manager'));
226
+
227
+ // Show some additional info data
228
+ if($count_custom_permalinks > 0) {
229
+ $button = array(
230
+ 'text' => sprintf(__('Import %d URIs', 'permalink-manager'), $count_custom_permalinks),
231
+ 'class' => 'primary margin-top'
232
+ );
233
+ } else {
234
+ $button = array(
235
+ 'text' => __('No custom URIs to import', 'permalink-manager'),
236
+ 'class' => 'secondary margin-top',
237
+ 'attributes' => array('disabled' => 'disabled')
238
+ );
239
+ }
240
+
241
+ return Permalink_Manager_Admin_Functions::get_the_form($fields, 'columns-3', $button, $sidebar, array('action' => 'permalink-manager', 'name' => 'import'), true);
242
+ }
243
+
244
+ /**
245
+ * "Support" section
246
+ */
247
+ public function support_output() {
248
+ $output = sprintf("<h3>%s</h3>", __("Technical support", "permalink-manager"));
249
+ $output .= wpautop(sprintf(__('To find the answers on frequently asked questions and information about how to deal with the most common issues please go to the <strong>Knowledge Base</strong> using <a target="_blank" href="%s">this link</a>.', 'permalink-manager'), 'https://permalinkmanager.pro/knowledge-base/'));
250
+ $output .= wpautop(__('If you still did not find the answer to your question, please send us your question or a detailed description of your problem/issue to <a href="mailto:support@permalinkmanager.pro">support@permalinkmanager.pro</a>.', 'permalink-manager'));
251
+ $output .= wpautop(__('To reduce the response time, please attach your licence key and if possible also: URL address of your website and screenshots explaining the issue.', 'permalink-manager'));
252
+
253
+ $output .= sprintf("<h3>%s</h3>", __("Suggestions/feedback", "permalink-manager"));
254
+ $output .= wpautop(__('If you would like to suggest a new functionality or leave us feedback, we are open to all new ideas and would be grateful for all your comments!', 'permalink-manager'));
255
+ $output .= wpautop(__(' Please send your remarks to <a href="mailto:contact@permalinkmanager.pro">contact@permalinkmanager.pro</a>.', 'permalink-manager'));
256
+
257
+ return $output;
258
+ }
259
+
260
+ /**
261
+ * Custom Redirects Panel
262
+ */
263
+ public static function display_redirect_form($element_id) {
264
+ global $permalink_manager_redirects, $permalink_manager_external_redirects;
265
+
266
+ // 1. Extra redirects
267
+ $html = "<div class=\"single-section\">";
268
+
269
+ $html .= sprintf("<p><label for=\"auto_auri\" class=\"strong\">%s %s</label></p>",
270
+ __("Extra redirects (aliases)", "permalink-manager"),
271
+ Permalink_Manager_Admin_Functions::help_tooltip(__("All URIs specified below will redirect the visitors to the custom URI defined above in \"Current URI\" field.", "permalink-manager"))
272
+ );
273
+
274
+ $html .= "<table>";
275
+ // 1A. Sample row
276
+ $html .= sprintf("<tr class=\"sample-row\"><td>%s</td><td>%s</td></tr>",
277
+ Permalink_Manager_Admin_Functions::generate_option_field("permalink-manager-redirects", array("input_class" => "widefat", "value" => "", 'extra_atts' => "data-index=\"\"", "placeholder" => __('sample/custom-uri', 'permalink-manager'))),
278
+ "<a href=\"#\" class=\"remove-redirect\"><span class=\"dashicons dashicons-no\"></span></a>"
279
+ );
280
+
281
+ // 1B. Rows with redirects
282
+ if(!empty($permalink_manager_redirects[$element_id]) && is_array($permalink_manager_redirects[$element_id])) {
283
+ foreach($permalink_manager_redirects[$element_id] as $index => $redirect) {
284
+ $html .= sprintf("<tr><td>%s</td><td>%s</td></tr>",
285
+ Permalink_Manager_Admin_Functions::generate_option_field("permalink-manager-redirects[{$index}]", array("input_class" => "widefat", "value" => $redirect, 'extra_atts' => "data-index=\"{$index}\"")),
286
+ "<a href=\"#\" class=\"remove-redirect\"><span class=\"dashicons dashicons-no\"></span></a>"
287
+ );
288
+ }
289
+ }
290
+ $html .= "</table>";
291
+
292
+ // 1C. Add new redirect button
293
+ $html .= sprintf("<button type=\"button\" class=\"button button-small hide-if-no-js\" id=\"permalink-manager-new-redirect\">%s</button>",
294
+ __("Add new redirect", "permalink-manager")
295
+ );
296
+
297
+ // 1D. Description
298
+ $html .= "<div class=\"redirects-panel-description\">";
299
+ $html .= sprintf(wpautop(__("<strong>Please use URIs only!</strong><br />For instance, to set-up a redirect for <code>%s/old-uri</code> please use <code>old-uri</code>.", "permalink-manager")), home_url());
300
+ $html .= "</div>";
301
+
302
+ $html .= "</div>";
303
+
304
+ // 2. Extra redirects
305
+ $html .= "<div class=\"single-section\">";
306
+
307
+ $html .= sprintf("<p><label for=\"auto_auri\" class=\"strong\">%s %s</label></p>",
308
+ __("Redirect this page to external URL", "permalink-manager"),
309
+ Permalink_Manager_Admin_Functions::help_tooltip(__("If not empty, the visitors trying to access this page will be redirected to the URL specified below.", "permalink-manager"))
310
+ );
311
+
312
+ $external_redirect_url = (!empty($permalink_manager_external_redirects[$element_id])) ? $permalink_manager_external_redirects[$element_id] : "";
313
+ $html .= Permalink_Manager_Admin_Functions::generate_option_field("permalink-manager-external-redirect", array("input_class" => "widefat custom_uri", "value" => urldecode($external_redirect_url), "placeholder" => __("http://another-website.com/final-target-url", "permalink-manager")));
314
+
315
+ // 2B. Description
316
+ $html .= "<div class=\"redirects-panel-description\">";
317
+ $html .= wpautop(__("<strong>Please use full URLs!</strong><br />For instance, <code>http://another-website.com/final-target-url</code>.", "permalink-manager"));
318
+ $html .= "</div>";
319
+
320
+ $html .= "</div>";
321
+
322
+ return $html;
323
+ }
324
+
325
+ }
includes/views/permalink-manager-settings.php CHANGED
@@ -74,14 +74,6 @@ class Permalink_Manager_Settings extends Permalink_Manager_Class {
74
  __('This feature will be also used to redirect (old) original permalinks to (new) custom permalinks set with Permalink Manager.', 'permalink-manager')
75
  ),
76
  ),
77
- /*'endpoint_redirect' => array(
78
- 'type' => 'single_checkbox',
79
- 'label' => __('Redirect with endpoints', 'permalink-manager'),
80
- 'input_class' => '',
81
- 'description' => sprintf('%s',
82
- __('<strong>Please enable this option if you would like to copy the endpoint from source URL to the target URL during the canonical redirect.</strong>', 'permalink-manager')
83
- ),
84
- ),*/
85
  'old_slug_redirect' => array(
86
  'type' => 'single_checkbox',
87
  'label' => __('Old slug redirect', 'permalink-manager'),
@@ -148,28 +140,19 @@ class Permalink_Manager_Settings extends Permalink_Manager_Class {
148
  'type' => 'single_checkbox',
149
  'label' => __('WPML/Polylang language mismatch', 'permalink-manager'),
150
  'input_class' => '',
151
- 'class_exists' => array('SitePress', 'Polylang'),
152
  'description' => __('If enabled, the plugin will load the adjacent translation of post when the custom permalink is detected, but the language code in the URL does not match the language code assigned to the post/term.', 'permalink-manager')
153
  ),
154
- 'pmxi_support' => array(
155
  'type' => 'single_checkbox',
156
  'label' => __('WP All Import support', 'permalink-manager'),
157
  'input_class' => '',
158
- 'class_exists' => 'PMXI_Plugin',
159
- 'description' => __('If enabled, the custom permalinks will not be saved for the posts imported with WP All Import plugin.', 'permalink-manager')
160
- ),
161
- 'um_support' => array(
162
- 'type' => 'single_checkbox',
163
- 'label' => __('Ultimate Member support', 'permalink-manager'),
164
- 'input_class' => '',
165
- 'class_exists' => 'UM',
166
- 'description' => __('If enabled, Permalink Manager will detect the additional Ultimate Member pages (eg. "account" sections).', 'permalink-manager')
167
  ),
168
  'yoast_breadcrumbs' => array(
169
  'type' => 'single_checkbox',
170
  'label' => __('Breadcrumbs support', 'permalink-manager'),
171
  'input_class' => '',
172
- 'description' => __('If enabled, the HTML breadcrumbs will be filtered by Permalink Manager to mimic the current URL structure.<br />Works with: <strong>WooCommerce, Yoast SEO, RankMath and SEOPress</strong> breadcrumbs.', 'permalink-manager')
173
  ),
174
  'partial_disable' => array(
175
  'type' => 'checkbox',
74
  __('This feature will be also used to redirect (old) original permalinks to (new) custom permalinks set with Permalink Manager.', 'permalink-manager')
75
  ),
76
  ),
 
 
 
 
 
 
 
 
77
  'old_slug_redirect' => array(
78
  'type' => 'single_checkbox',
79
  'label' => __('Old slug redirect', 'permalink-manager'),
140
  'type' => 'single_checkbox',
141
  'label' => __('WPML/Polylang language mismatch', 'permalink-manager'),
142
  'input_class' => '',
 
143
  'description' => __('If enabled, the plugin will load the adjacent translation of post when the custom permalink is detected, but the language code in the URL does not match the language code assigned to the post/term.', 'permalink-manager')
144
  ),
145
+ 'pmxi_import_support' => array(
146
  'type' => 'single_checkbox',
147
  'label' => __('WP All Import support', 'permalink-manager'),
148
  'input_class' => '',
149
+ 'description' => __('If checked, the custom permalinks will not be saved for the posts imported with Wp All Import plugin.', 'permalink-manager')
 
 
 
 
 
 
 
 
150
  ),
151
  'yoast_breadcrumbs' => array(
152
  'type' => 'single_checkbox',
153
  'label' => __('Breadcrumbs support', 'permalink-manager'),
154
  'input_class' => '',
155
+ 'description' => __('If checked, the HTML breadcrumbs will be filtered by Permalink Manager to mimic the current URL structure.<br />Works with: <strong>WooCommerce, Yoast SEO, RankMath and SEOPress</strong> breadcrumbs.', 'permalink-manager')
156
  ),
157
  'partial_disable' => array(
158
  'type' => 'checkbox',
includes/views/permalink-manager-uri-editor-tax.php ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Permalink Manager Pro: Custom class for Permalink Editor for Terms
4
+ */
5
+ class Permalink_Manager_Tax_Uri_Editor_Table extends WP_List_Table {
6
+
7
+ public function __construct() {
8
+ global $status, $page;
9
+
10
+ parent::__construct(array(
11
+ 'singular' => 'slug',
12
+ 'plural' => 'slugs'
13
+ ));
14
+ }
15
+
16
+ /**
17
+ * Get the HTML output with the WP_List_Table
18
+ */
19
+ public function display_admin_section() {
20
+ global $wpdb;
21
+
22
+ $output = "<form id=\"permalinks-post-types-table\" class=\"slugs-table\" method=\"post\">";
23
+ $output .= wp_nonce_field('permalink-manager', 'uri_editor', true, true);
24
+ $output .= Permalink_Manager_Admin_Functions::generate_option_field('pm_session_id', array('value' => uniqid(), 'type' => 'hidden'));
25
+ $output .= Permalink_Manager_Admin_Functions::section_type_field('taxonomies');
26
+
27
+ // Bypass
28
+ ob_start();
29
+
30
+ $this->prepare_items();
31
+ $this->display();
32
+ $output .= ob_get_contents();
33
+
34
+ ob_end_clean();
35
+
36
+ $output .= "</form>";
37
+
38
+ return $output;
39
+ }
40
+
41
+ function get_table_classes() {
42
+ return array( 'widefat', 'striped', $this->_args['plural'] );
43
+ }
44
+
45
+ /**
46
+ * Override the parent columns method. Defines the columns to use in your listing table
47
+ */
48
+ public function get_columns() {
49
+ return apply_filters('permalink_manager_uri_editor_columns', array(
50
+ //'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
51
+ 'item_title' => __('Term title', 'permalink-manager'),
52
+ 'item_uri' => __('Full URI & Permalink', 'permalink-manager'),
53
+ 'count' => __('Count', 'permalink-manager'),
54
+ ));
55
+ }
56
+
57
+ /**
58
+ * Hidden columns
59
+ */
60
+ public function get_hidden_columns() {
61
+ return array('post_date_gmt');
62
+ }
63
+
64
+ /**
65
+ * Sortable columns
66
+ */
67
+ public function get_sortable_columns() {
68
+ return array(
69
+ 'item_title' => array('name', false)
70
+ );
71
+ }
72
+
73
+ /**
74
+ * Data inside the columns
75
+ */
76
+ public function column_default($item, $column_name) {
77
+ global $permalink_manager_options;
78
+
79
+ $uri = Permalink_Manager_URI_Functions_Tax::get_term_uri($item['term_id'], true);
80
+ $uri = (!empty($permalink_manager_options['general']['decode_uris'])) ? urldecode($uri) : $uri;
81
+
82
+ $field_args_base = array('type' => 'text', 'value' => $uri, 'without_label' => true, 'input_class' => 'custom_uri', 'extra_atts' => "data-element-id=\"tax-{$item['term_id']}\"");
83
+ $term = get_term($item['term_id']);
84
+ $permalink = get_term_link(intval($item['term_id']), $item['taxonomy']);
85
+ $all_terms_link = admin_url("edit.php?{$term->taxonomy}={$term->slug}");
86
+
87
+ $output = apply_filters('permalink_manager_uri_editor_column_content', '', $column_name, $term);
88
+ if(!empty($output)) { return $output; }
89
+
90
+ switch($column_name) {
91
+
92
+ case 'item_title':
93
+ $output = $item[ 'name' ];
94
+ $output .= '<div class="extra-info small">';
95
+ $output .= sprintf("<span><strong>%s:</strong> %s</span>", __("Slug", "permalink-manager"), urldecode($item['slug']));
96
+ $output .= apply_filters('permalink_manager_uri_editor_extra_info', '', $column_name, $term);
97
+ $output .= '</div>';
98
+
99
+ $output .= '<div class="row-actions">';
100
+ $output .= sprintf("<span class=\"edit\"><a href=\"%s\" title=\"%s\">%s</a> | </span>", esc_url(get_edit_tag_link($item['term_id'], $item['taxonomy'])), __('Edit', 'permalink-manager'), __('Edit', 'permalink-manager'));
101
+ $output .= '<span class="view"><a target="_blank" href="' . $permalink . '" title="' . __('View', 'permalink-manager') . ' ' . $item[ 'name' ] . '" rel="permalink">' . __('View', 'permalink-manager') . '</a> | </span>';
102
+ $output .= '<span class="id">#' . $item[ 'term_id' ] . '</span>';
103
+ $output .= '</div>';
104
+ return $output;
105
+
106
+ case 'item_uri':
107
+ $output .= '<div class="custom_uri_container">';
108
+ $output .= Permalink_Manager_Admin_Functions::generate_option_field("uri[tax-{$item['term_id']}]", $field_args_base);
109
+ $output .= "<span class=\"duplicated_uri_alert\"></span>";
110
+ $output .= sprintf("<a class=\"small post_permalink\" href=\"%s\" target=\"_blank\"><span class=\"dashicons dashicons-admin-links\"></span> %s</a>", $permalink, urldecode($permalink));
111
+ $output .= '</div>';
112
+ return $output;
113
+
114
+ case 'count':
115
+ return "<a href=\"{$all_terms_link}\">{$term->count}</a>";
116
+
117
+ default:
118
+ return $item[$column_name];
119
+ }
120
+ }
121
+
122
+ /**
123
+ * Sort the data
124
+ */
125
+ private function sort_data($a, $b) {
126
+ // Set defaults
127
+ $orderby = (!empty($_GET['orderby'])) ? $_GET['orderby'] : 'name';
128
+ $order = (!empty($_GET['order'])) ? $_GET['order'] : 'asc';
129
+ $result = strnatcasecmp( $a[$orderby], $b[$orderby] );
130
+
131
+ return ($order === 'asc') ? $result : -$result;
132
+ }
133
+
134
+ /**
135
+ * The button that allows to save updated slugs
136
+ */
137
+ function extra_tablenav($which) {
138
+ $button_top = __( 'Save all the URIs below', 'permalink-manager' );
139
+ $button_bottom = __( 'Save all the URIs above', 'permalink-manager' );
140
+
141
+ $html = '<div class="alignleft actions">';
142
+ $html .= get_submit_button( ${"button_$which"}, 'primary', "update_all_slugs[{$which}]", false, array( 'id' => 'doaction', 'value' => 'update_all_slugs' ) );
143
+ $html .= '</div>';
144
+
145
+ if($which == 'top') {
146
+ $html .= '<div class="alignleft">';
147
+ $html .= $this->search_box(__('Search', 'permalink-manager'), 'search-input');
148
+ $html .= '</div>';
149
+ }
150
+
151
+ echo $html;
152
+ }
153
+
154
+ /**
155
+ * Search box
156
+ */
157
+ public function search_box($text = '', $input_id = '') {
158
+ $search_query = (!empty($_REQUEST['s'])) ? esc_attr(wp_unslash($_REQUEST['s'])) : "";
159
+
160
+ $output = "<p class=\"search-box\">";
161
+ $output .= "<label class=\"screen-reader-text\" for=\"{$input_id}\">{$text}:</label>";
162
+ $output .= Permalink_Manager_Admin_Functions::generate_option_field('s', array('value' => $search_query, 'type' => 'search'));
163
+ $output .= get_submit_button($text, 'button', false, false, array('id' => 'search-submit', 'name' => 'search-submit'));
164
+ $output .= "</p>";
165
+
166
+ return $output;
167
+ }
168
+
169
+ /**
170
+ * Prepare the items for the table to process
171
+ */
172
+ public function prepare_items() {
173
+ global $wpdb, $permalink_manager_options, $permalink_manager_uris, $active_subsection, $current_admin_tax;
174
+
175
+ $columns = $this->get_columns();
176
+ $hidden = $this->get_hidden_columns();
177
+ $sortable = $this->get_sortable_columns();
178
+ $current_page = $this->get_pagenum();
179
+
180
+ // Get query variables
181
+ $per_page = $permalink_manager_options['screen-options']['per_page'];
182
+ $taxonomies_array = Permalink_Manager_Helper_Functions::get_taxonomies_array();
183
+ $taxonomies = ($active_subsection && $active_subsection == 'all_taxs') ? "'" . implode("', '", $taxonomies_array) . "'" : "'{$current_admin_tax}'";
184
+ $search_query = (!empty($_REQUEST['s'])) ? esc_sql($_REQUEST['s']) : "";
185
+
186
+ // SQL query parameters
187
+ $order = (isset($_REQUEST['order']) && in_array($_REQUEST['order'], array('asc', 'desc'))) ? $_REQUEST['order'] : 'desc';
188
+ $orderby = (isset($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 't.term_id';
189
+ $offset = ($current_page - 1) * $per_page;
190
+
191
+ // Grab terms from database
192
+ $sql_parts['start'] = "SELECT t.*, tt.taxonomy FROM {$wpdb->terms} AS t INNER JOIN {$wpdb->term_taxonomy} AS tt ON (tt.term_id = t.term_id) ";
193
+ if($search_query) {
194
+ $sql_parts['where'] = "WHERE (LOWER(t.name) LIKE LOWER('%{$search_query}%') ";
195
+
196
+ // Search in array with custom URIs
197
+ $found = Permalink_Manager_Helper_Functions::search_uri($search_query, 'taxonomies');
198
+ if($found) {
199
+ $sql_parts['where'] .= sprintf("OR t.term_id IN (%s) ", implode(',', (array) $found));
200
+ }
201
+ $sql_parts['where'] .= ") AND tt.taxonomy IN ({$taxonomies}) ";
202
+ } else {
203
+ $sql_parts['where'] = "WHERE tt.taxonomy IN ({$taxonomies}) ";
204
+ }
205
+ $sql_parts['end'] = "ORDER BY {$orderby} {$order}";
206
+
207
+ // Prepare the SQL query
208
+ $sql_query = implode("", $sql_parts);
209
+
210
+ // Count items
211
+ $count_query = preg_replace('/SELECT(.*)FROM/', 'SELECT COUNT(*) FROM', $sql_query);
212
+ $total_items = $wpdb->get_var($count_query);
213
+
214
+ // Pagination support
215
+ $sql_query .= sprintf(" LIMIT %d, %d", $offset, $per_page);
216
+
217
+ // Get items
218
+ $sql_query = apply_filters('permalink_manager_filter_uri_editor_query', $sql_query, $this, $sql_parts, $is_taxonomy = true);
219
+ $all_items = $wpdb->get_results($sql_query, ARRAY_A);
220
+
221
+ // Debug SQL query
222
+ if(isset($_REQUEST['debug_editor_sql'])) {
223
+ $debug_txt = "<textarea style=\"width:100%;height:300px\">{$sql_query} \n\nOffset: {$offset} \nPage: {$current_page}\nPer page: {$per_page} \nTotal: {$total_items}</textarea>";
224
+ wp_die($debug_txt);
225
+ }
226
+
227
+ $this->set_pagination_args( array(
228
+ 'total_items' => $total_items,
229
+ 'per_page' => $per_page
230
+ ));
231
+
232
+ $this->_column_headers = array($columns, $hidden, $sortable);
233
+ $this->items = $all_items;
234
+ }
235
+
236
+ }
languages/permalink-manager-ja.mo CHANGED
Binary file
languages/permalink-manager-ja.po CHANGED
@@ -2,19 +2,19 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Permalink Manager Lite\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2020-11-23 20:44+0000\n"
6
- "PO-Revision-Date: 2020-11-23 20:45+0000\n"
7
- "Last-Translator: admin\n"
8
- "Language-Team: Japanese\n"
9
  "Language: ja\n"
10
  "Plural-Forms: nplurals=1; plural=0;\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Content-Transfer-Encoding: 8bit\n"
14
  "X-Generator: Loco https://localise.biz/\n"
15
- "X-Loco-Version: 2.4.4; wp-5.5.3"
16
 
17
- #: permalink-manager.php:207
18
  #, php-format
19
  msgid ""
20
  "Get access to extra features: full taxonomy and WooCommerce support, "
@@ -26,32 +26,33 @@ msgstr ""
26
  "<strong>パーマリンク マネージャー Proの購入は<a href=\"%s\" target=\"_blank\">コチラ</a>! %s "
27
  "の割引 「%s」をご利用下さい。 </strong> %s まで!"
28
 
29
- #: includes/core/permalink-manager-third-parties.php:292
30
  msgid "\"Custom Permalinks\" URIs were imported!"
31
  msgstr "「カスタム パーマリンク」URIは、インポートされました!"
32
 
33
- #: includes/core/permalink-manager-third-parties.php:295
34
  msgid "No \"Custom Permalinks\" URIs were imported!"
35
  msgstr "「カスタム パーマリンク」 URIはインポートされませんでした!"
36
 
37
- #: includes/core/permalink-manager-third-parties.php:681
38
- #: includes/core/permalink-manager-gutenberg.php:26
39
- #: includes/core/permalink-manager-admin-functions.php:111
40
- #: includes/core/permalink-manager-admin-functions.php:111
41
- #: includes/core/permalink-manager-admin-functions.php:737
42
- #: includes/core/permalink-manager-admin-functions.php:818
43
- #: includes/core/permalink-manager-admin-functions.php:823
44
- #: includes/core/permalink-manager-admin-functions.php:824
 
45
  msgid "Permalink Manager"
46
  msgstr "Permalink Manager"
47
 
48
- #: includes/core/permalink-manager-third-parties.php:685
49
- #: includes/core/permalink-manager-uri-functions-tax.php:482
50
  #: includes/views/permalink-manager-tools.php:70
51
  msgid "Custom URI"
52
  msgstr "カスタム URI"
53
 
54
- #: includes/core/permalink-manager-third-parties.php:686
55
  #, php-format
56
  msgid ""
57
  "If empty, a default permalink based on your current <a href=\"%s\" "
@@ -60,51 +61,51 @@ msgstr ""
60
  "空の場合、現在の<a href=\"%s\" target=\"_blank\">パーマ構造 設定</a>"
61
  "に基づいたデフォルトのパーマリンクが適用されます。"
62
 
63
- #: includes/core/permalink-manager-uri-functions-tax.php:483
64
  msgid "Clear/leave the field empty to use the default permalink."
65
  msgstr "デフォルトのパーマリンクを使用するため、フィールドを空のままにする / クリアする"
66
 
67
- #: includes/core/permalink-manager-uri-functions-tax.php:515
68
- #: includes/core/permalink-manager-admin-functions.php:741
69
- #: includes/core/permalink-manager-admin-functions.php:841
70
- #: includes/core/permalink-manager-uri-functions-post.php:687
71
  msgid "Current URI"
72
  msgstr "現在のURI"
73
 
74
- #: includes/core/permalink-manager-admin-functions.php:135
75
  msgid "Are you sure? This action cannot be undone!"
76
  msgstr "本当によろしいですか?この操作は、元に戻せません!"
77
 
78
- #: includes/core/permalink-manager-admin-functions.php:156
79
  msgid "URI Editor"
80
  msgstr "URIエディター"
81
 
82
- #: includes/core/permalink-manager-admin-functions.php:157
83
  #: includes/views/permalink-manager-settings.php:14
84
  msgid "Settings"
85
  msgstr "設定"
86
 
87
- #: includes/core/permalink-manager-admin-functions.php:169
88
  msgid "Documentation"
89
  msgstr "ドキュメント"
90
 
91
- #: includes/core/permalink-manager-admin-functions.php:173
92
  msgid "Buy Permalink Manager Pro"
93
  msgstr "Permalink Manager Proを購入"
94
 
95
- #: includes/core/permalink-manager-admin-functions.php:280
96
  msgid "Select all"
97
  msgstr "全てを選択する"
98
 
99
- #: includes/core/permalink-manager-admin-functions.php:281
100
  msgid "Unselect all"
101
  msgstr "選択を全て解除する"
102
 
103
- #: includes/core/permalink-manager-admin-functions.php:396
104
  msgid "Permastructure translations"
105
  msgstr "パーマ構造 翻訳"
106
 
107
- #: includes/core/permalink-manager-admin-functions.php:397
108
  msgid ""
109
  "If you would like to translate the permastructures and set-up different "
110
  "permalink structure per language, please fill in the fields below. Otherwise "
@@ -114,118 +115,118 @@ msgstr ""
114
  "パーマ構造を翻訳し、言語ごとに異なるパーマリンク構造を設定する場合は、以下のフィールドに入力して下さい。 それ以外は、デフォルト言語のパーマ構造 "
115
  "セット(上記のフィールドを参照)が適用されます。"
116
 
117
- #: includes/core/permalink-manager-admin-functions.php:414
118
  msgid "Default permastructure"
119
  msgstr "デフォルト パーマ構造"
120
 
121
- #: includes/core/permalink-manager-admin-functions.php:415
122
  msgid "Restore default permastructure"
123
  msgstr "デフォルトのパーマ構造を復元する"
124
 
125
- #: includes/core/permalink-manager-admin-functions.php:421
126
- #: includes/core/permalink-manager-actions.php:409
127
- #: includes/core/permalink-manager-actions.php:413
128
  msgid "Permastructure settings"
129
  msgstr "パーマ構造 設定"
130
 
131
- #: includes/core/permalink-manager-admin-functions.php:422
132
  msgid "Do not automatically append the slug"
133
  msgstr "スラッグを自動的に追加しない"
134
 
135
- #: includes/core/permalink-manager-admin-functions.php:430
136
  msgid "Show additional settings"
137
  msgstr "追加設定を表示する"
138
 
139
- #: includes/core/permalink-manager-admin-functions.php:577
140
  msgid "Donate"
141
  msgstr "寄付"
142
 
143
- #: includes/core/permalink-manager-admin-functions.php:578
144
  msgid "by Maciej Bis"
145
  msgstr "by Maciej Bis"
146
 
147
- #: includes/core/permalink-manager-admin-functions.php:590
148
  msgid "Upgrade to PRO"
149
  msgstr "Pro版にアップグレード"
150
 
151
- #: includes/core/permalink-manager-admin-functions.php:657
152
- #: includes/core/permalink-manager-admin-functions.php:684
153
  msgid "Title"
154
  msgstr "タイトル"
155
 
156
- #: includes/core/permalink-manager-admin-functions.php:659
157
- #: includes/core/permalink-manager-admin-functions.php:686
158
  msgid "Old Slug"
159
  msgstr "古いスラッグ"
160
 
161
- #: includes/core/permalink-manager-admin-functions.php:660
162
- #: includes/core/permalink-manager-admin-functions.php:687
163
  msgid "New Slug"
164
  msgstr "新しいスラッグ"
165
 
166
- #: includes/core/permalink-manager-admin-functions.php:662
167
- #: includes/core/permalink-manager-admin-functions.php:689
168
  msgid "Old URI"
169
  msgstr "古いURI"
170
 
171
- #: includes/core/permalink-manager-admin-functions.php:663
172
- #: includes/core/permalink-manager-admin-functions.php:690
173
  msgid "New URI"
174
  msgstr "新しいURI"
175
 
176
- #: includes/core/permalink-manager-admin-functions.php:684
177
  msgid "Show more details"
178
  msgstr "さらなる詳細を表示する"
179
 
180
- #: includes/core/permalink-manager-admin-functions.php:697
181
  msgid "List of updated items"
182
  msgstr "更新済みのアイテムのリスト"
183
 
184
- #: includes/core/permalink-manager-admin-functions.php:710
185
  #, php-format
186
  msgid "<strong class=\"updated_count\">%d</strong> slug was updated!"
187
  msgid_plural "<strong class=\"updated_count\">%d</strong> slugs were updated!"
188
  msgstr[0] "<strong class=\"updated_count\">%d</strong> スラッグは、更新されました!"
189
  msgstr[1] ""
190
 
191
- #: includes/core/permalink-manager-admin-functions.php:711
192
  #, php-format
193
  msgid "<a %s>Click here</a> to go to the list of updated slugs"
194
  msgstr "更新されたスラッグのリストは、<a %s>ここをクリック</a> "
195
 
196
- #: includes/core/permalink-manager-admin-functions.php:715
197
  #: includes/core/permalink-manager-actions.php:115
198
  msgid "<strong>No slugs</strong> were updated!"
199
  msgstr "スラッグは、更新されませんでした。"
200
 
201
- #: includes/core/permalink-manager-admin-functions.php:804
202
- #: includes/core/permalink-manager-admin-functions.php:807
203
  msgid "Yes"
204
  msgstr "はい"
205
 
206
- #: includes/core/permalink-manager-admin-functions.php:804
207
- #: includes/core/permalink-manager-admin-functions.php:808
208
  msgid "No"
209
  msgstr "いいえ"
210
 
211
- #: includes/core/permalink-manager-admin-functions.php:806
212
  #, php-format
213
  msgid "Use global settings [%s]"
214
  msgstr "グローバル設定を使用する [%s]"
215
 
216
- #: includes/core/permalink-manager-admin-functions.php:809
217
  msgid "No (ignore this URI in bulk tools)"
218
  msgstr "いいえ(一括ツールでは、このURIを無視します。)"
219
 
220
- #: includes/core/permalink-manager-admin-functions.php:823
221
  msgid "Close: "
222
  msgstr "閉じる:"
223
 
224
- #: includes/core/permalink-manager-admin-functions.php:835
225
  msgid "The custom URI cannot be edited on frontpage."
226
  msgstr "カスタムURIは、フロントページでは編集不可です。"
227
 
228
- #: includes/core/permalink-manager-admin-functions.php:842
229
  msgid ""
230
  "If custom URI is not defined, a default URI will be set (see below). The "
231
  "custom URI can be edited only if 'Auto-update the URI' feature is not "
@@ -233,40 +234,40 @@ msgid ""
233
  msgstr ""
234
  "カスタムURIが定義されていない場合、デフォルトのURIが設定されます。(以下を参照)カスタムURIは、「URIの自動更新」機能が有効になっていない場合のみ編集できます。"
235
 
236
- #: includes/core/permalink-manager-admin-functions.php:851
237
  msgid "Native slug"
238
  msgstr "ネイティブ スラッグ"
239
 
240
- #: includes/core/permalink-manager-admin-functions.php:852
241
  msgid ""
242
  "The native slug is by default automatically used in native permalinks (when "
243
  "Permalink Manager is disabled)."
244
  msgstr ""
245
  "ネイティブ スラッグは、(Permalink Managerが無効になっている場合)デフォルトでは自動的にネイティブパーマリンクが使用されます。"
246
 
247
- #: includes/core/permalink-manager-admin-functions.php:862
248
  msgid "Auto-update the URI"
249
  msgstr "URIの自動更新"
250
 
251
- #: includes/core/permalink-manager-admin-functions.php:863
252
  msgid ""
253
  "If enabled, the 'Current URI' field will be automatically changed to "
254
  "'Default URI' (displayed below) after the post is saved or updated."
255
  msgstr "有効にすると、「現在のURI」項目は投稿が更新又は保存された後に、(下記に表示された)「デフォルトURI」に自動的に変更されます。"
256
 
257
- #: includes/core/permalink-manager-admin-functions.php:871
258
  msgid "Default URI"
259
  msgstr "デフォルト URI"
260
 
261
- #: includes/core/permalink-manager-admin-functions.php:872
262
  msgid "Restore Default URI"
263
  msgstr "デフォルトのURIを復元する"
264
 
265
- #: includes/core/permalink-manager-admin-functions.php:882
266
  msgid "Automatic redirect for native URI enabled:"
267
  msgstr "ネイティブURIの自動リダイレクトを有効にする:"
268
 
269
- #: includes/core/permalink-manager-admin-functions.php:893
270
  #, php-format
271
  msgid ""
272
  "<span><strong>Need more functionalities and dedicated support?</strong> Buy "
@@ -277,22 +278,23 @@ msgstr ""
277
  "Proを購入して10%割引の<a href=\"https://permalinkmanager.pro/buy-permalink-manager-"
278
  "pro/\">PMLITEクーポンコード</a>を適用してください。</a></span>"
279
 
280
- #: includes/core/permalink-manager-admin-functions.php:904
281
  msgid "Save permalink"
282
  msgstr "パーマリンクを保存する"
283
 
284
- #: includes/core/permalink-manager-admin-functions.php:931
285
  msgid "Manage redirects"
286
  msgstr "リダイレクトを管理"
287
 
288
- #: includes/core/permalink-manager-admin-functions.php:1049
289
  #, php-format
290
  msgid ""
291
  "This functionality is available only in <a href=\"%s\" target=\"_blank\">"
292
  "Permalink Manager Pro</a>."
293
  msgstr "この機能は、Permalink Manager Proのみ利用可能です。"
294
 
295
- #: includes/core/permalink-manager-pro-functions.php:126
 
296
  #, php-format
297
  msgid ""
298
  "Please paste the licence key to access all Permalink Manager Pro updates & "
@@ -301,11 +303,17 @@ msgstr ""
301
  "<a href=\"%s\" target=\"_blank\">コチラのページ</a>にて、ライセンスキーを設定して全てのPermalink "
302
  "Manager Pro のアップデート&機能をご利用下さい。"
303
 
304
- #: includes/core/permalink-manager-pro-functions.php:131
 
 
 
 
 
 
305
  msgid "Your Permalink Manager Pro licence key is invalid!"
306
  msgstr "あなたのライセンスキーは、無効です!"
307
 
308
- #: includes/core/permalink-manager-pro-functions.php:136
309
  #, php-format
310
  msgid ""
311
  "Your Permalink Manager Pro licence key expired! To restore access to plugin "
@@ -315,11 +323,11 @@ msgstr ""
315
  "あなたのライセンスキーは有効期限が切れました!プラグインのアップデートのアクセスやテクニカルサポートを受けたい場合は、<a href=\"%s\" "
316
  "target=\"_blank\">コチラのページ</a>にアクセスして、復元して下さい。"
317
 
318
- #: includes/core/permalink-manager-pro-functions.php:141
319
  msgid "You own a lifetime licence key."
320
  msgstr "あなたは、永久ライセンスキーをお持ちです。"
321
 
322
- #: includes/core/permalink-manager-pro-functions.php:146
323
  #, php-format
324
  msgid ""
325
  "Your licence key is valid until %s.<br />To prolong it please go to <a "
@@ -328,105 +336,99 @@ msgstr ""
328
  "あなたのライセンスキーは、%s まで有効です。<br />延長するには、<a href=\"%s\" target=\"_blank\">"
329
  "コチラのページ</a>にアクセスして詳細を確認して下さい。"
330
 
331
- #: includes/core/permalink-manager-pro-functions.php:151
332
- msgid ""
333
- "Expiration date could not be downloaded at this moment. Please try again in "
334
- "a few minutes."
335
- msgstr "現在、有効期限の情報をダウンロードできない可能性があります。数分後に、再度お試し下さい。"
336
-
337
- #: includes/core/permalink-manager-pro-functions.php:184
338
  msgid "Arabic"
339
  msgstr "アラビア語"
340
 
341
- #: includes/core/permalink-manager-pro-functions.php:185
342
  msgid "Chinese"
343
  msgstr "中国語"
344
 
345
- #: includes/core/permalink-manager-pro-functions.php:186
346
  msgid "Danish"
347
  msgstr "デンマーク語"
348
 
349
- #: includes/core/permalink-manager-pro-functions.php:187
350
  msgid "Dutch"
351
  msgstr "オランダ語"
352
 
353
- #: includes/core/permalink-manager-pro-functions.php:188
354
  msgid "English"
355
  msgstr "英語"
356
 
357
- #: includes/core/permalink-manager-pro-functions.php:189
358
  msgid "Finnish"
359
  msgstr "フィンランド語"
360
 
361
- #: includes/core/permalink-manager-pro-functions.php:190
362
  msgid "French"
363
  msgstr "フランス語"
364
 
365
- #: includes/core/permalink-manager-pro-functions.php:191
366
  msgid "German"
367
  msgstr "ドイツ語"
368
 
369
- #: includes/core/permalink-manager-pro-functions.php:192
370
  msgid "Hebrew"
371
  msgstr "ヘブライ語"
372
 
373
- #: includes/core/permalink-manager-pro-functions.php:193
374
  msgid "Hindi"
375
  msgstr "ヒンディー語"
376
 
377
- #: includes/core/permalink-manager-pro-functions.php:194
378
  msgid "Italian"
379
  msgstr "イタリア語"
380
 
381
- #: includes/core/permalink-manager-pro-functions.php:195
382
  msgid "Japanese"
383
  msgstr "日本語"
384
 
385
- #: includes/core/permalink-manager-pro-functions.php:196
386
  msgid "Korean"
387
  msgstr "韓国語"
388
 
389
- #: includes/core/permalink-manager-pro-functions.php:197
390
  msgid "Norwegian"
391
  msgstr "ノルウェー語"
392
 
393
- #: includes/core/permalink-manager-pro-functions.php:198
394
  msgid "Persian"
395
  msgstr "ペルシア語"
396
 
397
- #: includes/core/permalink-manager-pro-functions.php:199
398
  msgid "Polish"
399
  msgstr "ポーランド語"
400
 
401
- #: includes/core/permalink-manager-pro-functions.php:200
402
  msgid "Portuguese"
403
  msgstr "ポルトガル語"
404
 
405
- #: includes/core/permalink-manager-pro-functions.php:201
406
  msgid "Russian"
407
  msgstr "ロシア語"
408
 
409
- #: includes/core/permalink-manager-pro-functions.php:202
410
  msgid "Spanish"
411
  msgstr "スペイン語"
412
 
413
- #: includes/core/permalink-manager-pro-functions.php:203
414
  msgid "Swedish"
415
  msgstr "スウェーデン語"
416
 
417
- #: includes/core/permalink-manager-pro-functions.php:204
418
  msgid "Turkish"
419
  msgstr "トルコ語"
420
 
421
- #: includes/core/permalink-manager-pro-functions.php:486
422
  msgid "Coupon Link"
423
  msgstr "クーポンリンク"
424
 
425
- #: includes/core/permalink-manager-pro-functions.php:507
426
  msgid "Coupon URI"
427
  msgstr "クーポンURI"
428
 
429
- #: includes/core/permalink-manager-pro-functions.php:508
430
  msgid ""
431
  "The URIs are case-insensitive, eg. <strong>BLACKFRIDAY</strong> and <strong>"
432
  "blackfriday</strong> are equivalent."
@@ -434,7 +436,7 @@ msgstr ""
434
  "URIは、大文字・小文字は区別しません。例:<strong>BLACKFRIDAY</strong> と<strong>"
435
  "blackfriday</strong>は、同じです。"
436
 
437
- #: includes/core/permalink-manager-pro-functions.php:519
438
  msgid "Coupon Full URL"
439
  msgstr "クーポン フル URL"
440
 
@@ -442,58 +444,58 @@ msgstr "クーポン フル URL"
442
  msgid "The settings are saved!"
443
  msgstr "設定は、保存されました!"
444
 
445
- #: includes/core/permalink-manager-actions.php:377
446
  #, php-format
447
  msgid "%d Custom URIs and %d Custom Redirects were removed!"
448
  msgstr "%d カスタムURIと、%d カスタム リダイレクトは削除されました。"
449
 
450
- #: includes/core/permalink-manager-actions.php:379
451
  msgid "No Custom URIs or Custom Redirects were removed!"
452
  msgstr "カスタムURIもしくはカスタム リダイレクトは、削除されませんでした!"
453
 
454
- #: includes/core/permalink-manager-actions.php:391
455
  msgid "You are not allowed to remove Permalink Manager data!"
456
  msgstr "Permalink Manager データを削除できません!"
457
 
458
- #: includes/core/permalink-manager-actions.php:397
459
  msgid "Custom permalinks"
460
  msgstr "カスタム パーマリンク"
461
 
462
- #: includes/core/permalink-manager-actions.php:401
463
  msgid "Custom redirects"
464
  msgstr "カスタム リダイレクト"
465
 
466
- #: includes/core/permalink-manager-actions.php:405
467
  msgid "External redirects"
468
  msgstr "外部のリダイレクト"
469
 
470
- #: includes/core/permalink-manager-actions.php:424
471
  #, php-format
472
  msgid "%s were removed!"
473
  msgstr "%s は削除されました!"
474
 
475
- #: includes/core/permalink-manager-actions.php:565
476
  #, php-format
477
  msgid "URI \"%s\" was removed successfully!"
478
  msgstr "「%s」のURIは、無事削除されました!"
479
 
480
- #: includes/core/permalink-manager-actions.php:573
481
  msgid "Broken redirects were removed successfully!"
482
  msgstr "リンク切れリダイレクトは、無事削除されました!"
483
 
484
- #: includes/core/permalink-manager-actions.php:577
485
  msgid "URI and/or custom redirects does not exist or were already removed!"
486
  msgstr "URIもしくはカスタムリダイレクトは、実在しないか既に削除されています!"
487
 
488
- #: includes/core/permalink-manager-actions.php:597
489
  msgid "The redirect was removed successfully!"
490
  msgstr "リダイレクトは、無事削除されました!"
491
 
492
- #: includes/core/permalink-manager-actions.php:627
493
  msgid "URI is already in use, please select another one!"
494
  msgstr "URIは既に使用済みです。他をお選び下さい。"
495
 
496
- #: includes/core/permalink-manager-actions.php:659
497
  msgid "Sitemaps were updated!"
498
  msgstr "サイトマップは、更新されました!"
499
 
@@ -517,13 +519,13 @@ msgstr "タクソノミー"
517
  msgid "WooCommerce"
518
  msgstr "WooCommerce"
519
 
520
- #: includes/views/permalink-manager-permastructs.php:75
521
- #: includes/views/permalink-manager-pro-addons.php:190
522
- #: includes/views/permalink-manager-pro-addons.php:223
523
  msgid "Instructions"
524
  msgstr "手順"
525
 
526
- #: includes/views/permalink-manager-permastructs.php:76
527
  #, php-format
528
  msgid ""
529
  "The current permastructures settings will be applied <strong>only to the new "
@@ -535,11 +537,11 @@ msgstr ""
535
  "既存の投稿とタームに新規のパーマ構造</strong>を適用するには、<a href=\"%s\">コチラ</a>"
536
  "にてカスタムパーマリンクを再生成して下さい。"
537
 
538
- #: includes/views/permalink-manager-permastructs.php:78
539
  msgid "Permastructure tags"
540
  msgstr "パーマ構造 タグ"
541
 
542
- #: includes/views/permalink-manager-permastructs.php:79
543
  #, php-format
544
  msgid ""
545
  "All allowed <a href=\"%s\" target=\"_blank\">permastructure tags</a> are "
@@ -549,7 +551,7 @@ msgstr ""
549
  "以下は、全て使用可能な<a href=\"%s\" target=\"_blank\">パーマ構造 タグ</a>"
550
  "です。いくつかのタグは、特定の投稿タイプやタクソノミーでのみ使用可能ですので、ご注意下さい。"
551
 
552
- #: includes/views/permalink-manager-permastructs.php:82
553
  msgid "Save permastructures"
554
  msgstr "パーマ構造を保存する"
555
 
@@ -610,104 +612,104 @@ msgstr "全日付"
610
  msgid "Filter"
611
  msgstr "フィルター"
612
 
613
- #: includes/views/permalink-manager-pro-addons.php:101
614
  msgid "Support"
615
  msgstr "サポート"
616
 
617
- #: includes/views/permalink-manager-pro-addons.php:128
618
  msgid "Licence"
619
  msgstr "ライセンス"
620
 
621
- #: includes/views/permalink-manager-pro-addons.php:134
622
  msgid "Licence key"
623
  msgstr "ライセンスキー"
624
 
625
- #: includes/views/permalink-manager-pro-addons.php:135
626
  msgid "Check the expiration date."
627
  msgstr "有効期限を確認する"
628
 
629
- #: includes/views/permalink-manager-pro-addons.php:159
630
  msgid "-- Use predefined words list --"
631
  msgstr "-- 定義済みの単語リストを使用する --"
632
 
633
- #: includes/views/permalink-manager-pro-addons.php:162
634
  msgid "Remove all words"
635
  msgstr "全ての単語を削除する"
636
 
637
- #: includes/views/permalink-manager-pro-addons.php:164
638
  msgid "Add the words from the list"
639
  msgstr "リストから単語を追加する"
640
 
641
- #: includes/views/permalink-manager-pro-addons.php:172
642
  msgid "Enable \"stop words\""
643
  msgstr "「使用禁止の単語」を有効にする"
644
 
645
- #: includes/views/permalink-manager-pro-addons.php:178
646
  msgid "\"Stop words\" list"
647
  msgstr "「使用禁止の単語」リスト"
648
 
649
- #: includes/views/permalink-manager-pro-addons.php:182
650
  msgid "Type comma to separate the words."
651
  msgstr "単語の区切りにカンマを入力下さい。"
652
 
653
- #: includes/views/permalink-manager-pro-addons.php:191
654
  msgid ""
655
  "If enabled, all selected \"stop words\" will be automatically removed from "
656
  "default URIs."
657
  msgstr "有効にすると、選択された全ての「使用禁止の単語」はデフォルトのURIから、自動的に削除されます。"
658
 
659
- #: includes/views/permalink-manager-pro-addons.php:192
660
  msgid ""
661
  "Each of the words can be removed and any new words can be added to the list. "
662
  "You can also use a predefined list (available in 21 languages)."
663
  msgstr "各単語は、リストへ追加/削除できます。また、定義済みのリスト(21の言語)も使用可能です。"
664
 
665
- #: includes/views/permalink-manager-pro-addons.php:194
666
  msgid "Save"
667
  msgstr "保存する"
668
 
669
- #: includes/views/permalink-manager-pro-addons.php:214
670
  #: includes/views/permalink-manager-tools.php:34
671
  msgid "Custom Permalinks"
672
  msgstr "カスタム パーマリンク"
673
 
674
- #: includes/views/permalink-manager-pro-addons.php:215
675
  msgid "Deactivate after import"
676
  msgstr "インポート後、非アクティブにする"
677
 
678
- #: includes/views/permalink-manager-pro-addons.php:218
679
  msgid ""
680
  "If selected, \"Custom Permalinks\" plugin will be deactivated after its "
681
  "custom URIs are imported."
682
  msgstr "選択すると、カスタムURIのインポート後、「カスタムパーマリンク」プラグインが無効になります。"
683
 
684
- #: includes/views/permalink-manager-pro-addons.php:224
685
  msgid ""
686
  "Please note that \"Custom Permalinks\" (if activated) may break the behavior "
687
  "of this plugin."
688
  msgstr "「カスタム パーマリンク」(有効にしている場合)により、本プラグインの動作が損なわれる場合があります。"
689
 
690
- #: includes/views/permalink-manager-pro-addons.php:225
691
  msgid ""
692
  "Therefore, it is recommended to disable \"Custom Permalink\" and import old "
693
  "permalinks before using Permalink Manager Pro."
694
  msgstr ""
695
  "したがって、「カスタム パーマリンク」を無効にして、Permalink Manager Proを使用する前の古いパーマリンクのインポートを推奨します。"
696
 
697
- #: includes/views/permalink-manager-pro-addons.php:230
698
  #, php-format
699
  msgid "Import %d URIs"
700
  msgstr "%d URIをインポートする"
701
 
702
- #: includes/views/permalink-manager-pro-addons.php:235
703
  msgid "No custom URIs to import"
704
  msgstr "インポートするカスタムURIはありません"
705
 
706
- #: includes/views/permalink-manager-pro-addons.php:248
707
  msgid "Technical support"
708
  msgstr "技術的サポート"
709
 
710
- #: includes/views/permalink-manager-pro-addons.php:249
711
  #, php-format
712
  msgid ""
713
  "To find the answers on frequently asked questions and information about how "
@@ -717,7 +719,7 @@ msgstr ""
717
  "よくある質問と一般的な問題に対する対処方法についての情報は、 <a target=\"_blank\" href=\"%s\">コチラ</a>"
718
  "の<strong>Knowledge Base</strong> をご利用下さい。(英語のみ)"
719
 
720
- #: includes/views/permalink-manager-pro-addons.php:250
721
  msgid ""
722
  "If you still did not find the answer to your question, please send us your "
723
  "question or a detailed description of your problem/issue to <a href=\"mailto:"
@@ -726,24 +728,24 @@ msgstr ""
726
  "ご質問に対して答えが見つからない場合は、問題の詳細又はご質問を<a href=\"mailto:support@permalinkmanager."
727
  "pro\">support@permalinkmanager.pro</a>までお送り下さい。(英語のみ)"
728
 
729
- #: includes/views/permalink-manager-pro-addons.php:251
730
  msgid ""
731
  "To reduce the response time, please attach your licence key and if possible "
732
  "also: URL address of your website and screenshots explaining the issue."
733
  msgstr ""
734
  "ご返答までの時間を短縮するため、ライセンスキーを添付し、可能であればWebサイトのURLと問題箇所のスクリーンショットもお送り下さい。(英語のみ)"
735
 
736
- #: includes/views/permalink-manager-pro-addons.php:253
737
  msgid "Suggestions/feedback"
738
  msgstr "ご意見 / フィードバック"
739
 
740
- #: includes/views/permalink-manager-pro-addons.php:254
741
  msgid ""
742
  "If you would like to suggest a new functionality or leave us feedback, we "
743
  "are open to all new ideas and would be grateful for all your comments!"
744
  msgstr "新たな機能の提案やフィードバックをお送り下さい。あらゆる新しいアイデアは大歓迎であり、あなたのコメントをお送り頂ければ幸いです。"
745
 
746
- #: includes/views/permalink-manager-pro-addons.php:255
747
  msgid ""
748
  " Please send your remarks to <a href=\"mailto:contact@permalinkmanager.pro\">"
749
  "contact@permalinkmanager.pro</a>."
@@ -751,25 +753,25 @@ msgstr ""
751
  "<a href=\"mailto:contact@permalinkmanager.pro\">contact@permalinkmanager."
752
  "pro</a>まで、ご意見をお送り下さい。"
753
 
754
- #: includes/views/permalink-manager-pro-addons.php:270
755
  msgid "Extra redirects (aliases)"
756
  msgstr "追加のリダイレクト(エイリアス)"
757
 
758
- #: includes/views/permalink-manager-pro-addons.php:271
759
  msgid ""
760
  "All URIs specified below will redirect the visitors to the custom URI "
761
  "defined above in \"Current URI\" field."
762
  msgstr "以下で指定された全てのURIは、訪問者を上記の「現在のURI」フィールドで定義されたカスタムURIにリダイレクトします。"
763
 
764
- #: includes/views/permalink-manager-pro-addons.php:277
765
  msgid "sample/custom-uri"
766
  msgstr "sample/custom-uri"
767
 
768
- #: includes/views/permalink-manager-pro-addons.php:294
769
  msgid "Add new redirect"
770
  msgstr "新しいリダイレクトを追加する"
771
 
772
- #: includes/views/permalink-manager-pro-addons.php:299
773
  #, php-format
774
  msgid ""
775
  "<strong>Please use URIs only!</strong><br />For instance, to set-up a "
@@ -778,21 +780,21 @@ msgstr ""
778
  "<strong>URIのみご利用下さい!</strong><br />例えば、<code>%s/old-uri</code> "
779
  "のリダイレクトを設定する場合は、<code>old-uri</code> をお使い下さい。"
780
 
781
- #: includes/views/permalink-manager-pro-addons.php:308
782
  msgid "Redirect this page to external URL"
783
  msgstr "このページを外部URLにリダイレクトする"
784
 
785
- #: includes/views/permalink-manager-pro-addons.php:309
786
  msgid ""
787
  "If not empty, the visitors trying to access this page will be redirected to "
788
  "the URL specified below."
789
  msgstr "空白でない場合、このページにアクセスしようと試みた訪問者は、下記のURLにリダイレクトされます。"
790
 
791
- #: includes/views/permalink-manager-pro-addons.php:313
792
  msgid "http://another-website.com/final-target-url"
793
  msgstr "http://another-website.com/final-target-url"
794
 
795
- #: includes/views/permalink-manager-pro-addons.php:317
796
  msgid ""
797
  "<strong>Please use full URLs!</strong><br />For instance, <code>http:"
798
  "//another-website.com/final-target-url</code>."
@@ -940,11 +942,11 @@ msgstr ""
940
  "この機能は、(古い)オリジナルのパーマリンクをPermalink Managerで設定された(新しい)カスタム "
941
  "パーマリンクにリダイレクトするために使用されます。"
942
 
943
- #: includes/views/permalink-manager-settings.php:87
944
  msgid "Old slug redirect"
945
  msgstr "古いスラッグ リダイレクト"
946
 
947
- #: includes/views/permalink-manager-settings.php:90
948
  msgid ""
949
  "<strong>Old slug redirect is used by WordPress to provide a fallback for old "
950
  "version of slugs after they are changed.</strong>"
@@ -952,33 +954,33 @@ msgstr ""
952
  "<strong>古いスラッグ "
953
  "リダイレクトは、WordPressが古いバージョンのスラッグを変更した後の代替を提供するために使用されます。</strong>"
954
 
955
- #: includes/views/permalink-manager-settings.php:91
956
  msgid ""
957
  "If enabled, the visitors trying to access the URL with the old slug will be "
958
  "redirected to the canonical permalink."
959
  msgstr "有効にすると、古いスラッグでURLにアクセスした訪問者を、正規パーマリンクにリダイレクトします。"
960
 
961
- #: includes/views/permalink-manager-settings.php:97
962
  msgid "Enhanced redirect"
963
  msgstr "拡張 リダイレクト"
964
 
965
- #: includes/views/permalink-manager-settings.php:103
966
  msgid "Redirect mode"
967
  msgstr "リダイレクト モード"
968
 
969
- #: includes/views/permalink-manager-settings.php:105
970
  msgid "Disable (Permalink Manager redirect functions)"
971
  msgstr "無効(Permalink Manager リダイレクト 機能)"
972
 
973
- #: includes/views/permalink-manager-settings.php:105
974
  msgid "301 redirect"
975
  msgstr "301 リダイレクト"
976
 
977
- #: includes/views/permalink-manager-settings.php:105
978
  msgid "302 redirect"
979
  msgstr "302 リダイレクト"
980
 
981
- #: includes/views/permalink-manager-settings.php:107
982
  msgid ""
983
  "<strong>Permalink Manager includes a set of hooks that allow to extend the "
984
  "redirect functions used natively by WordPress to avoid 404 errors.</strong>"
@@ -986,24 +988,24 @@ msgstr ""
986
  "<strong>Permalink "
987
  "Managerには、404エラー回避のためにWordPressが従来使用するリダイレクト機能を拡張できる一連のフックが含まれています。</strong>"
988
 
989
- #: includes/views/permalink-manager-settings.php:108
990
  msgid ""
991
  "You can disable this feature if you do not want Permalink Manager to trigger "
992
  "any additional redirect functions at all."
993
  msgstr "Permalink Managerに、追加のリダイレクト機能を一切トリガーさせないようにする場合は、この機能を無効にします。"
994
 
995
- #: includes/views/permalink-manager-settings.php:113
996
  msgid "Old custom permalinks redirect"
997
  msgstr "古いカスタム パーマリンク リダイレクト"
998
 
999
- #: includes/views/permalink-manager-settings.php:118
1000
  msgid ""
1001
  "<strong>Permalink Manager can automatically set-up extra redirects after the "
1002
  "custom permalink is changed.</strong>"
1003
  msgstr ""
1004
  "<strong>Permalink Managerは、カスタム パーマリンクの変更後、自動的に追加のリダイレクトを設定できます。</strong>"
1005
 
1006
- #: includes/views/permalink-manager-settings.php:119
1007
  msgid ""
1008
  "If enabled, Permalink Manage will add redirect for earlier version of custom "
1009
  "permalink after you change it (eg. with URI Editor or Regenerate/reset tool)."
@@ -1011,17 +1013,17 @@ msgstr ""
1011
  "有効にすると、Permalink Managerは、変更後(例:URIエディターまたは再生成・リセットツールを使用)に、以前のバージョンのカスタム "
1012
  "パーマリンクのリダイレクトを追加します。"
1013
 
1014
- #: includes/views/permalink-manager-settings.php:120
1015
  msgid ""
1016
  "You can disable this feature if you use another plugin for redirects, eg. "
1017
  "Yoast SEO Premium or Redirection."
1018
  msgstr "Yoast SEO プレミアムやその他のリダイレクトプラグインを使用している場合は、この機能を無効にできます。"
1019
 
1020
- #: includes/views/permalink-manager-settings.php:125
1021
  msgid "Force HTTPS/WWW"
1022
  msgstr "HTTPS/WWW 強制"
1023
 
1024
- #: includes/views/permalink-manager-settings.php:128
1025
  msgid ""
1026
  "<strong>You can use Permalink Manager to force SSL or \"www\" prefix in "
1027
  "WordPress permalinks.</strong>"
@@ -1029,30 +1031,30 @@ msgstr ""
1029
  "<strong>Permalink "
1030
  "Managerを使って、WordPressのパーマリンク内にSSLもしくはwwwの接頭辞を強制的に付与できます。</strong>"
1031
 
1032
- #: includes/views/permalink-manager-settings.php:129
1033
  msgid "Please disable it if you encounter any redirect loop issues."
1034
  msgstr "リダイレクトのループ問題が発生した場合は、このオプションを無効にして下さい。"
1035
 
1036
- #: includes/views/permalink-manager-settings.php:134
1037
  msgid "Trailing slashes redirect"
1038
  msgstr "末尾のスラッシュリダイレクト"
1039
 
1040
- #: includes/views/permalink-manager-settings.php:137
1041
  msgid ""
1042
  "<strong>Permalink Manager can force the trailing slashes settings in the "
1043
  "custom permalinks with redirect.</strong>"
1044
  msgstr ""
1045
  "<strong>Permalink Managerは、リダイレクトのあるカスタム パーマリンクの末尾のスラッシュ設定を強制できます。</strong>"
1046
 
1047
- #: includes/views/permalink-manager-settings.php:143
1048
  msgid "Third party plugins"
1049
  msgstr "サードパーティー プラグイン"
1050
 
1051
- #: includes/views/permalink-manager-settings.php:149
1052
  msgid "WPML/Polylang language mismatch"
1053
  msgstr "WPML / Polylang 言語 不一致"
1054
 
1055
- #: includes/views/permalink-manager-settings.php:152
1056
  msgid ""
1057
  "If enabled, the plugin will load the adjacent translation of post when the "
1058
  "custom permalink is detected, but the language code in the URL does not "
@@ -1060,66 +1062,58 @@ msgid ""
1060
  msgstr ""
1061
  "有効にすると、本プラグインはカスタムパーマリンクを検出した際、投稿に用いた言語に近い翻訳を読み込みますが、投稿やタームに割当られた言語コードとURL内言語コードと一致しない場合は読み込みません。"
1062
 
1063
- #: includes/views/permalink-manager-settings.php:156
1064
  msgid "WP All Import support"
1065
  msgstr "WP All Import サポート"
1066
 
1067
- #: includes/views/permalink-manager-settings.php:159
1068
  msgid ""
1069
- "If enabled, the custom permalinks will not be saved for the posts imported "
1070
- "with WP All Import plugin."
1071
- msgstr ""
1072
-
1073
- #: includes/views/permalink-manager-settings.php:163
1074
- msgid "Ultimate Member support"
1075
- msgstr ""
1076
 
1077
- #: includes/views/permalink-manager-settings.php:166
1078
- msgid ""
1079
- "If enabled, Permalink Manager will detect the additional Ultimate Member "
1080
- "pages (eg. \"account\" sections)."
1081
- msgstr ""
1082
-
1083
- #: includes/views/permalink-manager-settings.php:170
1084
  msgid "Breadcrumbs support"
1085
  msgstr "パンくずリスト サポート"
1086
 
1087
- #: includes/views/permalink-manager-settings.php:172
1088
  msgid ""
1089
- "If enabled, the HTML breadcrumbs will be filtered by Permalink Manager to "
1090
  "mimic the current URL structure.<br />Works with: <strong>WooCommerce, Yoast "
1091
  "SEO, RankMath and SEOPress</strong> breadcrumbs."
1092
  msgstr ""
 
 
1093
 
1094
- #: includes/views/permalink-manager-settings.php:176
1095
  msgid "Excluded content types"
1096
  msgstr "除外する投稿タイプ"
1097
 
1098
- #: includes/views/permalink-manager-settings.php:178
1099
  msgid ""
1100
  "Permalink Manager will ignore and not filter the custom permalinks of all "
1101
  "selected above post types & taxonomies."
1102
  msgstr "Permalink Managerは、上記で選択した全ての投稿タイプとタクソノミーのカスタム パーマリンクを無視し、フィルタリングしません。"
1103
 
1104
- #: includes/views/permalink-manager-settings.php:183
1105
  msgid "Advanced settings"
1106
  msgstr "詳細設定"
1107
 
1108
- #: includes/views/permalink-manager-settings.php:189
1109
  msgid "Show \"Native slug\" field"
1110
  msgstr "「ネイティブ スラッグ」フィールドを表示する"
1111
 
1112
- #: includes/views/permalink-manager-settings.php:191
1113
  msgid ""
1114
  "If enabled, it would be possible to edit the native slug via URI Editor on "
1115
  "single post/term edit page."
1116
  msgstr "有効にすると、それぞれの投稿やタームの編集ページ上で、URIエディター経由にてネイティブ スラッグを編集できます。"
1117
 
1118
- #: includes/views/permalink-manager-settings.php:195
1119
  msgid "Force 404 on non-existing pagination pages"
1120
  msgstr "実在しないページネーションのページに404を強制表示する"
1121
 
1122
- #: includes/views/permalink-manager-settings.php:197
1123
  msgid ""
1124
  "If enabled, the non-existing pagination pages (for single posts) will return "
1125
  "404 (\"Not Found\") error.<br /><strong>Please disable it, if you encounter "
@@ -1129,61 +1123,61 @@ msgstr ""
1129
  "<strong>ページネーションのページ、もしくは独自のページネーション "
1130
  "システムをご利用で、なんらかの問題が生じた場合は、無効にしてください。</strong>"
1131
 
1132
- #: includes/views/permalink-manager-settings.php:201
1133
  msgid "Strip special characters"
1134
  msgstr "特殊文字を取り除く"
1135
 
1136
- #: includes/views/permalink-manager-settings.php:203
1137
- #: includes/views/permalink-manager-settings.php:210
1138
  msgid "Yes, use native settings"
1139
  msgstr "はい、ネイティブ 設定を使います。"
1140
 
1141
- #: includes/views/permalink-manager-settings.php:203
1142
  msgid "No, keep special characters (.,|_+) in the slugs"
1143
  msgstr "いいえ、スラッグに特殊文字(.,|_+)を保持します。"
1144
 
1145
- #: includes/views/permalink-manager-settings.php:204
1146
  msgid ""
1147
  "If enabled only alphanumeric characters, underscores and dashes will be "
1148
  "allowed for post/term slugs."
1149
  msgstr "英数字のみを有効にすると、投稿とターム スラッグにて下線とダッシュの使用が許可されます。"
1150
 
1151
- #: includes/views/permalink-manager-settings.php:208
1152
  msgid "Convert accented letters"
1153
  msgstr "アクセント付き文字の変換"
1154
 
1155
- #: includes/views/permalink-manager-settings.php:210
1156
  msgid "No, keep accented letters in the slugs"
1157
  msgstr "いいえ、スラッグにアクセント付き文字を保持します。"
1158
 
1159
- #: includes/views/permalink-manager-settings.php:211
1160
  msgid ""
1161
  "If enabled, all the accented letters will be replaced with their non-"
1162
  "accented equivalent (eg. Å => A, Æ => AE, Ø => O, Ć => C)."
1163
  msgstr ""
1164
  "有効にすると、全てのアクセント付きの文字が、アクセントなしの文字に置換されます。(例:Å => A, Æ => AE, Ø => O, Ć => C)"
1165
 
1166
- #: includes/views/permalink-manager-settings.php:215
1167
  msgid "URI Editor role capability"
1168
  msgstr "URIエディター 種類と権限"
1169
 
1170
- #: includes/views/permalink-manager-settings.php:216
1171
  msgid "Administrator (edit_theme_options)"
1172
  msgstr "管理者 (edit_theme_options)"
1173
 
1174
- #: includes/views/permalink-manager-settings.php:216
1175
  msgid "Editor (publish_pages)"
1176
  msgstr "編集者 (publish_pages)"
1177
 
1178
- #: includes/views/permalink-manager-settings.php:216
1179
  msgid "Author (publish_posts)"
1180
  msgstr "投稿者 (publish_posts)"
1181
 
1182
- #: includes/views/permalink-manager-settings.php:216
1183
  msgid "Contributor (edit_posts)"
1184
  msgstr "寄稿者 (edit_posts)"
1185
 
1186
- #: includes/views/permalink-manager-settings.php:217
1187
  #, php-format
1188
  msgid ""
1189
  "Only the users who have selected capability will be able to access URI "
@@ -1193,29 +1187,29 @@ msgstr ""
1193
  "権限を持つユーザーのみがURIエディターにアクセスできます。<br />権限のリストは<a href=\"%s\" target=\"_blank\">"
1194
  "コチラ</a>で確認できます。"
1195
 
1196
- #: includes/views/permalink-manager-settings.php:221
1197
  msgid "Automatically fix broken URIs"
1198
  msgstr "壊れたURIを自動的に修正する"
1199
 
1200
- #: includes/views/permalink-manager-settings.php:223
1201
  msgid "Disable"
1202
  msgstr "無効"
1203
 
1204
- #: includes/views/permalink-manager-settings.php:223
1205
  msgid "Fix URIs individually (during page load)"
1206
  msgstr "個々にURLを修正する(ページ読込時)"
1207
 
1208
- #: includes/views/permalink-manager-settings.php:223
1209
  msgid "Bulk fix all URIs (once a day, in the background)"
1210
  msgstr "全てのURIを一括修正する(1日1回、バックグラウンド)"
1211
 
1212
- #: includes/views/permalink-manager-settings.php:225
1213
  msgid ""
1214
  "Enable this option if you would like to automatically remove redundant "
1215
  "permalinks & duplicated redirects."
1216
  msgstr "冗長なパーマリンクと重複したリダイレクトを自動的に削除したい場合は、このオプションを有効にします。"
1217
 
1218
- #: includes/views/permalink-manager-settings.php:232
1219
  msgid "Save settings"
1220
  msgstr "設定を保存する"
1221
 
2
  msgstr ""
3
  "Project-Id-Version: Permalink Manager Lite\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2020-04-24 12:22+0000\n"
6
+ "PO-Revision-Date: 2020-04-24 15:28+0000\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: 日本語\n"
9
  "Language: ja\n"
10
  "Plural-Forms: nplurals=1; plural=0;\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Content-Transfer-Encoding: 8bit\n"
14
  "X-Generator: Loco https://localise.biz/\n"
15
+ "X-Loco-Version: 2.3.3; wp-5.4"
16
 
17
+ #: permalink-manager.php:206
18
  #, php-format
19
  msgid ""
20
  "Get access to extra features: full taxonomy and WooCommerce support, "
26
  "<strong>パーマリンク マネージャー Proの購入は<a href=\"%s\" target=\"_blank\">コチラ</a>! %s "
27
  "の割引 「%s」をご利用下さい。 </strong> %s まで!"
28
 
29
+ #: includes/core/permalink-manager-third-parties.php:231
30
  msgid "\"Custom Permalinks\" URIs were imported!"
31
  msgstr "「カスタム パーマリンク」URIは、インポートされました!"
32
 
33
+ #: includes/core/permalink-manager-third-parties.php:234
34
  msgid "No \"Custom Permalinks\" URIs were imported!"
35
  msgstr "「カスタム パーマリンク」 URIはインポートされませんでした!"
36
 
37
+ #. Name of the plugin
38
+ #: includes/core/permalink-manager-third-parties.php:513
39
+ #: includes/core/permalink-manager-gutenberg.php:14
40
+ #: includes/core/permalink-manager-admin-functions.php:110
41
+ #: includes/core/permalink-manager-admin-functions.php:110
42
+ #: includes/core/permalink-manager-admin-functions.php:715
43
+ #: includes/core/permalink-manager-admin-functions.php:796
44
+ #: includes/core/permalink-manager-admin-functions.php:801
45
+ #: includes/core/permalink-manager-admin-functions.php:802
46
  msgid "Permalink Manager"
47
  msgstr "Permalink Manager"
48
 
49
+ #: includes/core/permalink-manager-third-parties.php:517
50
+ #: includes/core/permalink-manager-uri-functions-tax.php:476
51
  #: includes/views/permalink-manager-tools.php:70
52
  msgid "Custom URI"
53
  msgstr "カスタム URI"
54
 
55
+ #: includes/core/permalink-manager-third-parties.php:518
56
  #, php-format
57
  msgid ""
58
  "If empty, a default permalink based on your current <a href=\"%s\" "
61
  "空の場合、現在の<a href=\"%s\" target=\"_blank\">パーマ構造 設定</a>"
62
  "に基づいたデフォルトのパーマリンクが適用されます。"
63
 
64
+ #: includes/core/permalink-manager-uri-functions-tax.php:477
65
  msgid "Clear/leave the field empty to use the default permalink."
66
  msgstr "デフォルトのパーマリンクを使用するため、フィールドを空のままにする / クリアする"
67
 
68
+ #: includes/core/permalink-manager-uri-functions-tax.php:509
69
+ #: includes/core/permalink-manager-admin-functions.php:719
70
+ #: includes/core/permalink-manager-admin-functions.php:819
71
+ #: includes/core/permalink-manager-uri-functions-post.php:665
72
  msgid "Current URI"
73
  msgstr "現在のURI"
74
 
75
+ #: includes/core/permalink-manager-admin-functions.php:134
76
  msgid "Are you sure? This action cannot be undone!"
77
  msgstr "本当によろしいですか?この操作は、元に戻せません!"
78
 
79
+ #: includes/core/permalink-manager-admin-functions.php:155
80
  msgid "URI Editor"
81
  msgstr "URIエディター"
82
 
83
+ #: includes/core/permalink-manager-admin-functions.php:156
84
  #: includes/views/permalink-manager-settings.php:14
85
  msgid "Settings"
86
  msgstr "設定"
87
 
88
+ #: includes/core/permalink-manager-admin-functions.php:168
89
  msgid "Documentation"
90
  msgstr "ドキュメント"
91
 
92
+ #: includes/core/permalink-manager-admin-functions.php:172
93
  msgid "Buy Permalink Manager Pro"
94
  msgstr "Permalink Manager Proを購入"
95
 
96
+ #: includes/core/permalink-manager-admin-functions.php:259
97
  msgid "Select all"
98
  msgstr "全てを選択する"
99
 
100
+ #: includes/core/permalink-manager-admin-functions.php:260
101
  msgid "Unselect all"
102
  msgstr "選択を全て解除する"
103
 
104
+ #: includes/core/permalink-manager-admin-functions.php:375
105
  msgid "Permastructure translations"
106
  msgstr "パーマ構造 翻訳"
107
 
108
+ #: includes/core/permalink-manager-admin-functions.php:376
109
  msgid ""
110
  "If you would like to translate the permastructures and set-up different "
111
  "permalink structure per language, please fill in the fields below. Otherwise "
115
  "パーマ構造を翻訳し、言語ごとに異なるパーマリンク構造を設定する場合は、以下のフィールドに入力して下さい。 それ以外は、デフォルト言語のパーマ構造 "
116
  "セット(上記のフィールドを参照)が適用されます。"
117
 
118
+ #: includes/core/permalink-manager-admin-functions.php:393
119
  msgid "Default permastructure"
120
  msgstr "デフォルト パーマ構造"
121
 
122
+ #: includes/core/permalink-manager-admin-functions.php:394
123
  msgid "Restore default permastructure"
124
  msgstr "デフォルトのパーマ構造を復元する"
125
 
126
+ #: includes/core/permalink-manager-admin-functions.php:400
127
+ #: includes/core/permalink-manager-actions.php:399
128
+ #: includes/core/permalink-manager-actions.php:403
129
  msgid "Permastructure settings"
130
  msgstr "パーマ構造 設定"
131
 
132
+ #: includes/core/permalink-manager-admin-functions.php:401
133
  msgid "Do not automatically append the slug"
134
  msgstr "スラッグを自動的に追加しない"
135
 
136
+ #: includes/core/permalink-manager-admin-functions.php:409
137
  msgid "Show additional settings"
138
  msgstr "追加設定を表示する"
139
 
140
+ #: includes/core/permalink-manager-admin-functions.php:555
141
  msgid "Donate"
142
  msgstr "寄付"
143
 
144
+ #: includes/core/permalink-manager-admin-functions.php:556
145
  msgid "by Maciej Bis"
146
  msgstr "by Maciej Bis"
147
 
148
+ #: includes/core/permalink-manager-admin-functions.php:568
149
  msgid "Upgrade to PRO"
150
  msgstr "Pro版にアップグレード"
151
 
152
+ #: includes/core/permalink-manager-admin-functions.php:635
153
+ #: includes/core/permalink-manager-admin-functions.php:662
154
  msgid "Title"
155
  msgstr "タイトル"
156
 
157
+ #: includes/core/permalink-manager-admin-functions.php:637
158
+ #: includes/core/permalink-manager-admin-functions.php:664
159
  msgid "Old Slug"
160
  msgstr "古いスラッグ"
161
 
162
+ #: includes/core/permalink-manager-admin-functions.php:638
163
+ #: includes/core/permalink-manager-admin-functions.php:665
164
  msgid "New Slug"
165
  msgstr "新しいスラッグ"
166
 
167
+ #: includes/core/permalink-manager-admin-functions.php:640
168
+ #: includes/core/permalink-manager-admin-functions.php:667
169
  msgid "Old URI"
170
  msgstr "古いURI"
171
 
172
+ #: includes/core/permalink-manager-admin-functions.php:641
173
+ #: includes/core/permalink-manager-admin-functions.php:668
174
  msgid "New URI"
175
  msgstr "新しいURI"
176
 
177
+ #: includes/core/permalink-manager-admin-functions.php:662
178
  msgid "Show more details"
179
  msgstr "さらなる詳細を表示する"
180
 
181
+ #: includes/core/permalink-manager-admin-functions.php:675
182
  msgid "List of updated items"
183
  msgstr "更新済みのアイテムのリスト"
184
 
185
+ #: includes/core/permalink-manager-admin-functions.php:688
186
  #, php-format
187
  msgid "<strong class=\"updated_count\">%d</strong> slug was updated!"
188
  msgid_plural "<strong class=\"updated_count\">%d</strong> slugs were updated!"
189
  msgstr[0] "<strong class=\"updated_count\">%d</strong> スラッグは、更新されました!"
190
  msgstr[1] ""
191
 
192
+ #: includes/core/permalink-manager-admin-functions.php:689
193
  #, php-format
194
  msgid "<a %s>Click here</a> to go to the list of updated slugs"
195
  msgstr "更新されたスラッグのリストは、<a %s>ここをクリック</a> "
196
 
197
+ #: includes/core/permalink-manager-admin-functions.php:693
198
  #: includes/core/permalink-manager-actions.php:115
199
  msgid "<strong>No slugs</strong> were updated!"
200
  msgstr "スラッグは、更新されませんでした。"
201
 
202
+ #: includes/core/permalink-manager-admin-functions.php:782
203
+ #: includes/core/permalink-manager-admin-functions.php:785
204
  msgid "Yes"
205
  msgstr "はい"
206
 
207
+ #: includes/core/permalink-manager-admin-functions.php:782
208
+ #: includes/core/permalink-manager-admin-functions.php:786
209
  msgid "No"
210
  msgstr "いいえ"
211
 
212
+ #: includes/core/permalink-manager-admin-functions.php:784
213
  #, php-format
214
  msgid "Use global settings [%s]"
215
  msgstr "グローバル設定を使用する [%s]"
216
 
217
+ #: includes/core/permalink-manager-admin-functions.php:787
218
  msgid "No (ignore this URI in bulk tools)"
219
  msgstr "いいえ(一括ツールでは、このURIを無視します。)"
220
 
221
+ #: includes/core/permalink-manager-admin-functions.php:801
222
  msgid "Close: "
223
  msgstr "閉じる:"
224
 
225
+ #: includes/core/permalink-manager-admin-functions.php:813
226
  msgid "The custom URI cannot be edited on frontpage."
227
  msgstr "カスタムURIは、フロントページでは編集不可です。"
228
 
229
+ #: includes/core/permalink-manager-admin-functions.php:820
230
  msgid ""
231
  "If custom URI is not defined, a default URI will be set (see below). The "
232
  "custom URI can be edited only if 'Auto-update the URI' feature is not "
234
  msgstr ""
235
  "カスタムURIが定義されていない場合、デフォルトのURIが設定されます。(以下を参照)カスタムURIは、「URIの自動更新」機能が有効になっていない場合のみ編集できます。"
236
 
237
+ #: includes/core/permalink-manager-admin-functions.php:829
238
  msgid "Native slug"
239
  msgstr "ネイティブ スラッグ"
240
 
241
+ #: includes/core/permalink-manager-admin-functions.php:830
242
  msgid ""
243
  "The native slug is by default automatically used in native permalinks (when "
244
  "Permalink Manager is disabled)."
245
  msgstr ""
246
  "ネイティブ スラッグは、(Permalink Managerが無効になっている場合)デフォルトでは自動的にネイティブパーマリンクが使用されます。"
247
 
248
+ #: includes/core/permalink-manager-admin-functions.php:840
249
  msgid "Auto-update the URI"
250
  msgstr "URIの自動更新"
251
 
252
+ #: includes/core/permalink-manager-admin-functions.php:841
253
  msgid ""
254
  "If enabled, the 'Current URI' field will be automatically changed to "
255
  "'Default URI' (displayed below) after the post is saved or updated."
256
  msgstr "有効にすると、「現在のURI」項目は投稿が更新又は保存された後に、(下記に表示された)「デフォルトURI」に自動的に変更されます。"
257
 
258
+ #: includes/core/permalink-manager-admin-functions.php:849
259
  msgid "Default URI"
260
  msgstr "デフォルト URI"
261
 
262
+ #: includes/core/permalink-manager-admin-functions.php:850
263
  msgid "Restore Default URI"
264
  msgstr "デフォルトのURIを復元する"
265
 
266
+ #: includes/core/permalink-manager-admin-functions.php:860
267
  msgid "Automatic redirect for native URI enabled:"
268
  msgstr "ネイティブURIの自動リダイレクトを有効にする:"
269
 
270
+ #: includes/core/permalink-manager-admin-functions.php:871
271
  #, php-format
272
  msgid ""
273
  "<span><strong>Need more functionalities and dedicated support?</strong> Buy "
278
  "Proを購入して10%割引の<a href=\"https://permalinkmanager.pro/buy-permalink-manager-"
279
  "pro/\">PMLITEクーポンコード</a>を適用してください。</a></span>"
280
 
281
+ #: includes/core/permalink-manager-admin-functions.php:882
282
  msgid "Save permalink"
283
  msgstr "パーマリンクを保存する"
284
 
285
+ #: includes/core/permalink-manager-admin-functions.php:909
286
  msgid "Manage redirects"
287
  msgstr "リダイレクトを管理"
288
 
289
+ #: includes/core/permalink-manager-admin-functions.php:1027
290
  #, php-format
291
  msgid ""
292
  "This functionality is available only in <a href=\"%s\" target=\"_blank\">"
293
  "Permalink Manager Pro</a>."
294
  msgstr "この機能は、Permalink Manager Proのみ利用可能です。"
295
 
296
+ #: includes/core/permalink-manager-pro-functions.php:127
297
+ #: includes/core/permalink-manager-pro-functions.php:153
298
  #, php-format
299
  msgid ""
300
  "Please paste the licence key to access all Permalink Manager Pro updates & "
303
  "<a href=\"%s\" target=\"_blank\">コチラのページ</a>にて、ライセンスキーを設定して全てのPermalink "
304
  "Manager Pro のアップデート&機能をご利用下さい。"
305
 
306
+ #: includes/core/permalink-manager-pro-functions.php:132
307
+ msgid ""
308
+ "Expiration date could not be downloaded at this moment. Please try again in "
309
+ "a few minutes."
310
+ msgstr "現在、有効期限の情報をダウンロードできない可能性があります。数分後に、再度お試し下さい。"
311
+
312
+ #: includes/core/permalink-manager-pro-functions.php:137
313
  msgid "Your Permalink Manager Pro licence key is invalid!"
314
  msgstr "あなたのライセンスキーは、無効です!"
315
 
316
+ #: includes/core/permalink-manager-pro-functions.php:142
317
  #, php-format
318
  msgid ""
319
  "Your Permalink Manager Pro licence key expired! To restore access to plugin "
323
  "あなたのライセンスキーは有効期限が切れました!プラグインのアップデートのアクセスやテクニカルサポートを受けたい場合は、<a href=\"%s\" "
324
  "target=\"_blank\">コチラのページ</a>にアクセスして、復元して下さい。"
325
 
326
+ #: includes/core/permalink-manager-pro-functions.php:147
327
  msgid "You own a lifetime licence key."
328
  msgstr "あなたは、永久ライセンスキーをお持ちです。"
329
 
330
+ #: includes/core/permalink-manager-pro-functions.php:150
331
  #, php-format
332
  msgid ""
333
  "Your licence key is valid until %s.<br />To prolong it please go to <a "
336
  "あなたのライセンスキーは、%s まで有効です。<br />延長するには、<a href=\"%s\" target=\"_blank\">"
337
  "コチラのページ</a>にアクセスして詳細を確認して下さい。"
338
 
339
+ #: includes/core/permalink-manager-pro-functions.php:186
 
 
 
 
 
 
340
  msgid "Arabic"
341
  msgstr "アラビア語"
342
 
343
+ #: includes/core/permalink-manager-pro-functions.php:187
344
  msgid "Chinese"
345
  msgstr "中国語"
346
 
347
+ #: includes/core/permalink-manager-pro-functions.php:188
348
  msgid "Danish"
349
  msgstr "デンマーク語"
350
 
351
+ #: includes/core/permalink-manager-pro-functions.php:189
352
  msgid "Dutch"
353
  msgstr "オランダ語"
354
 
355
+ #: includes/core/permalink-manager-pro-functions.php:190
356
  msgid "English"
357
  msgstr "英語"
358
 
359
+ #: includes/core/permalink-manager-pro-functions.php:191
360
  msgid "Finnish"
361
  msgstr "フィンランド語"
362
 
363
+ #: includes/core/permalink-manager-pro-functions.php:192
364
  msgid "French"
365
  msgstr "フランス語"
366
 
367
+ #: includes/core/permalink-manager-pro-functions.php:193
368
  msgid "German"
369
  msgstr "ドイツ語"
370
 
371
+ #: includes/core/permalink-manager-pro-functions.php:194
372
  msgid "Hebrew"
373
  msgstr "ヘブライ語"
374
 
375
+ #: includes/core/permalink-manager-pro-functions.php:195
376
  msgid "Hindi"
377
  msgstr "ヒンディー語"
378
 
379
+ #: includes/core/permalink-manager-pro-functions.php:196
380
  msgid "Italian"
381
  msgstr "イタリア語"
382
 
383
+ #: includes/core/permalink-manager-pro-functions.php:197
384
  msgid "Japanese"
385
  msgstr "日本語"
386
 
387
+ #: includes/core/permalink-manager-pro-functions.php:198
388
  msgid "Korean"
389
  msgstr "韓国語"
390
 
391
+ #: includes/core/permalink-manager-pro-functions.php:199
392
  msgid "Norwegian"
393
  msgstr "ノルウェー語"
394
 
395
+ #: includes/core/permalink-manager-pro-functions.php:200
396
  msgid "Persian"
397
  msgstr "ペルシア語"
398
 
399
+ #: includes/core/permalink-manager-pro-functions.php:201
400
  msgid "Polish"
401
  msgstr "ポーランド語"
402
 
403
+ #: includes/core/permalink-manager-pro-functions.php:202
404
  msgid "Portuguese"
405
  msgstr "ポルトガル語"
406
 
407
+ #: includes/core/permalink-manager-pro-functions.php:203
408
  msgid "Russian"
409
  msgstr "ロシア語"
410
 
411
+ #: includes/core/permalink-manager-pro-functions.php:204
412
  msgid "Spanish"
413
  msgstr "スペイン語"
414
 
415
+ #: includes/core/permalink-manager-pro-functions.php:205
416
  msgid "Swedish"
417
  msgstr "スウェーデン語"
418
 
419
+ #: includes/core/permalink-manager-pro-functions.php:206
420
  msgid "Turkish"
421
  msgstr "トルコ語"
422
 
423
+ #: includes/core/permalink-manager-pro-functions.php:488
424
  msgid "Coupon Link"
425
  msgstr "クーポンリンク"
426
 
427
+ #: includes/core/permalink-manager-pro-functions.php:509
428
  msgid "Coupon URI"
429
  msgstr "クーポンURI"
430
 
431
+ #: includes/core/permalink-manager-pro-functions.php:510
432
  msgid ""
433
  "The URIs are case-insensitive, eg. <strong>BLACKFRIDAY</strong> and <strong>"
434
  "blackfriday</strong> are equivalent."
436
  "URIは、大文字・小文字は区別しません。例:<strong>BLACKFRIDAY</strong> と<strong>"
437
  "blackfriday</strong>は、同じです。"
438
 
439
+ #: includes/core/permalink-manager-pro-functions.php:521
440
  msgid "Coupon Full URL"
441
  msgstr "クーポン フル URL"
442
 
444
  msgid "The settings are saved!"
445
  msgstr "設定は、保存されました!"
446
 
447
+ #: includes/core/permalink-manager-actions.php:367
448
  #, php-format
449
  msgid "%d Custom URIs and %d Custom Redirects were removed!"
450
  msgstr "%d カスタムURIと、%d カスタム リダイレクトは削除されました。"
451
 
452
+ #: includes/core/permalink-manager-actions.php:369
453
  msgid "No Custom URIs or Custom Redirects were removed!"
454
  msgstr "カスタムURIもしくはカスタム リダイレクトは、削除されませんでした!"
455
 
456
+ #: includes/core/permalink-manager-actions.php:381
457
  msgid "You are not allowed to remove Permalink Manager data!"
458
  msgstr "Permalink Manager データを削除できません!"
459
 
460
+ #: includes/core/permalink-manager-actions.php:387
461
  msgid "Custom permalinks"
462
  msgstr "カスタム パーマリンク"
463
 
464
+ #: includes/core/permalink-manager-actions.php:391
465
  msgid "Custom redirects"
466
  msgstr "カスタム リダイレクト"
467
 
468
+ #: includes/core/permalink-manager-actions.php:395
469
  msgid "External redirects"
470
  msgstr "外部のリダイレクト"
471
 
472
+ #: includes/core/permalink-manager-actions.php:414
473
  #, php-format
474
  msgid "%s were removed!"
475
  msgstr "%s は削除されました!"
476
 
477
+ #: includes/core/permalink-manager-actions.php:555
478
  #, php-format
479
  msgid "URI \"%s\" was removed successfully!"
480
  msgstr "「%s」のURIは、無事削除されました!"
481
 
482
+ #: includes/core/permalink-manager-actions.php:563
483
  msgid "Broken redirects were removed successfully!"
484
  msgstr "リンク切れリダイレクトは、無事削除されました!"
485
 
486
+ #: includes/core/permalink-manager-actions.php:567
487
  msgid "URI and/or custom redirects does not exist or were already removed!"
488
  msgstr "URIもしくはカスタムリダイレクトは、実在しないか既に削除されています!"
489
 
490
+ #: includes/core/permalink-manager-actions.php:587
491
  msgid "The redirect was removed successfully!"
492
  msgstr "リダイレクトは、無事削除されました!"
493
 
494
+ #: includes/core/permalink-manager-actions.php:617
495
  msgid "URI is already in use, please select another one!"
496
  msgstr "URIは既に使用済みです。他をお選び下さい。"
497
 
498
+ #: includes/core/permalink-manager-actions.php:649
499
  msgid "Sitemaps were updated!"
500
  msgstr "サイトマップは、更新されました!"
501
 
519
  msgid "WooCommerce"
520
  msgstr "WooCommerce"
521
 
522
+ #: includes/views/permalink-manager-permastructs.php:74
523
+ #: includes/views/permalink-manager-pro-addons.php:188
524
+ #: includes/views/permalink-manager-pro-addons.php:221
525
  msgid "Instructions"
526
  msgstr "手順"
527
 
528
+ #: includes/views/permalink-manager-permastructs.php:75
529
  #, php-format
530
  msgid ""
531
  "The current permastructures settings will be applied <strong>only to the new "
537
  "既存の投稿とタームに新規のパーマ構造</strong>を適用するには、<a href=\"%s\">コチラ</a>"
538
  "にてカスタムパーマリンクを再生成して下さい。"
539
 
540
+ #: includes/views/permalink-manager-permastructs.php:77
541
  msgid "Permastructure tags"
542
  msgstr "パーマ構造 タグ"
543
 
544
+ #: includes/views/permalink-manager-permastructs.php:78
545
  #, php-format
546
  msgid ""
547
  "All allowed <a href=\"%s\" target=\"_blank\">permastructure tags</a> are "
551
  "以下は、全て使用可能な<a href=\"%s\" target=\"_blank\">パーマ構造 タグ</a>"
552
  "です。いくつかのタグは、特定の投稿タイプやタクソノミーでのみ使用可能ですので、ご注意下さい。"
553
 
554
+ #: includes/views/permalink-manager-permastructs.php:81
555
  msgid "Save permastructures"
556
  msgstr "パーマ構造を保存する"
557
 
612
  msgid "Filter"
613
  msgstr "フィルター"
614
 
615
+ #: includes/views/permalink-manager-pro-addons.php:99
616
  msgid "Support"
617
  msgstr "サポート"
618
 
619
+ #: includes/views/permalink-manager-pro-addons.php:126
620
  msgid "Licence"
621
  msgstr "ライセンス"
622
 
623
+ #: includes/views/permalink-manager-pro-addons.php:132
624
  msgid "Licence key"
625
  msgstr "ライセンスキー"
626
 
627
+ #: includes/views/permalink-manager-pro-addons.php:133
628
  msgid "Check the expiration date."
629
  msgstr "有効期限を確認する"
630
 
631
+ #: includes/views/permalink-manager-pro-addons.php:157
632
  msgid "-- Use predefined words list --"
633
  msgstr "-- 定義済みの単語リストを使用する --"
634
 
635
+ #: includes/views/permalink-manager-pro-addons.php:160
636
  msgid "Remove all words"
637
  msgstr "全ての単語を削除する"
638
 
639
+ #: includes/views/permalink-manager-pro-addons.php:162
640
  msgid "Add the words from the list"
641
  msgstr "リストから単語を追加する"
642
 
643
+ #: includes/views/permalink-manager-pro-addons.php:170
644
  msgid "Enable \"stop words\""
645
  msgstr "「使用禁止の単語」を有効にする"
646
 
647
+ #: includes/views/permalink-manager-pro-addons.php:176
648
  msgid "\"Stop words\" list"
649
  msgstr "「使用禁止の単語」リスト"
650
 
651
+ #: includes/views/permalink-manager-pro-addons.php:180
652
  msgid "Type comma to separate the words."
653
  msgstr "単語の区切りにカンマを入力下さい。"
654
 
655
+ #: includes/views/permalink-manager-pro-addons.php:189
656
  msgid ""
657
  "If enabled, all selected \"stop words\" will be automatically removed from "
658
  "default URIs."
659
  msgstr "有効にすると、選択された全ての「使用禁止の単語」はデフォルトのURIから、自動的に削除されます。"
660
 
661
+ #: includes/views/permalink-manager-pro-addons.php:190
662
  msgid ""
663
  "Each of the words can be removed and any new words can be added to the list. "
664
  "You can also use a predefined list (available in 21 languages)."
665
  msgstr "各単語は、リストへ追加/削除できます。また、定義済みのリスト(21の言語)も使用可能です。"
666
 
667
+ #: includes/views/permalink-manager-pro-addons.php:192
668
  msgid "Save"
669
  msgstr "保存する"
670
 
671
+ #: includes/views/permalink-manager-pro-addons.php:212
672
  #: includes/views/permalink-manager-tools.php:34
673
  msgid "Custom Permalinks"
674
  msgstr "カスタム パーマリンク"
675
 
676
+ #: includes/views/permalink-manager-pro-addons.php:213
677
  msgid "Deactivate after import"
678
  msgstr "インポート後、非アクティブにする"
679
 
680
+ #: includes/views/permalink-manager-pro-addons.php:216
681
  msgid ""
682
  "If selected, \"Custom Permalinks\" plugin will be deactivated after its "
683
  "custom URIs are imported."
684
  msgstr "選択すると、カスタムURIのインポート後、「カスタムパーマリンク」プラグインが無効になります。"
685
 
686
+ #: includes/views/permalink-manager-pro-addons.php:222
687
  msgid ""
688
  "Please note that \"Custom Permalinks\" (if activated) may break the behavior "
689
  "of this plugin."
690
  msgstr "「カスタム パーマリンク」(有効にしている場合)により、本プラグインの動作が損なわれる場合があります。"
691
 
692
+ #: includes/views/permalink-manager-pro-addons.php:223
693
  msgid ""
694
  "Therefore, it is recommended to disable \"Custom Permalink\" and import old "
695
  "permalinks before using Permalink Manager Pro."
696
  msgstr ""
697
  "したがって、「カスタム パーマリンク」を無効にして、Permalink Manager Proを使用する前の古いパーマリンクのインポートを推奨します。"
698
 
699
+ #: includes/views/permalink-manager-pro-addons.php:228
700
  #, php-format
701
  msgid "Import %d URIs"
702
  msgstr "%d URIをインポートする"
703
 
704
+ #: includes/views/permalink-manager-pro-addons.php:233
705
  msgid "No custom URIs to import"
706
  msgstr "インポートするカスタムURIはありません"
707
 
708
+ #: includes/views/permalink-manager-pro-addons.php:246
709
  msgid "Technical support"
710
  msgstr "技術的サポート"
711
 
712
+ #: includes/views/permalink-manager-pro-addons.php:247
713
  #, php-format
714
  msgid ""
715
  "To find the answers on frequently asked questions and information about how "
719
  "よくある質問と一般的な問題に対する対処方法についての情報は、 <a target=\"_blank\" href=\"%s\">コチラ</a>"
720
  "の<strong>Knowledge Base</strong> をご利用下さい。(英語のみ)"
721
 
722
+ #: includes/views/permalink-manager-pro-addons.php:248
723
  msgid ""
724
  "If you still did not find the answer to your question, please send us your "
725
  "question or a detailed description of your problem/issue to <a href=\"mailto:"
728
  "ご質問に対して答えが見つからない場合は、問題の詳細又はご質問を<a href=\"mailto:support@permalinkmanager."
729
  "pro\">support@permalinkmanager.pro</a>までお送り下さい。(英語のみ)"
730
 
731
+ #: includes/views/permalink-manager-pro-addons.php:249
732
  msgid ""
733
  "To reduce the response time, please attach your licence key and if possible "
734
  "also: URL address of your website and screenshots explaining the issue."
735
  msgstr ""
736
  "ご返答までの時間を短縮するため、ライセンスキーを添付し、可能であればWebサイトのURLと問題箇所のスクリーンショットもお送り下さい。(英語のみ)"
737
 
738
+ #: includes/views/permalink-manager-pro-addons.php:251
739
  msgid "Suggestions/feedback"
740
  msgstr "ご意見 / フィードバック"
741
 
742
+ #: includes/views/permalink-manager-pro-addons.php:252
743
  msgid ""
744
  "If you would like to suggest a new functionality or leave us feedback, we "
745
  "are open to all new ideas and would be grateful for all your comments!"
746
  msgstr "新たな機能の提案やフィードバックをお送り下さい。あらゆる新しいアイデアは大歓迎であり、あなたのコメントをお送り頂ければ幸いです。"
747
 
748
+ #: includes/views/permalink-manager-pro-addons.php:253
749
  msgid ""
750
  " Please send your remarks to <a href=\"mailto:contact@permalinkmanager.pro\">"
751
  "contact@permalinkmanager.pro</a>."
753
  "<a href=\"mailto:contact@permalinkmanager.pro\">contact@permalinkmanager."
754
  "pro</a>まで、ご意見をお送り下さい。"
755
 
756
+ #: includes/views/permalink-manager-pro-addons.php:268
757
  msgid "Extra redirects (aliases)"
758
  msgstr "追加のリダイレクト(エイリアス)"
759
 
760
+ #: includes/views/permalink-manager-pro-addons.php:269
761
  msgid ""
762
  "All URIs specified below will redirect the visitors to the custom URI "
763
  "defined above in \"Current URI\" field."
764
  msgstr "以下で指定された全てのURIは、訪問者を上記の「現在のURI」フィールドで定義されたカスタムURIにリダイレクトします。"
765
 
766
+ #: includes/views/permalink-manager-pro-addons.php:275
767
  msgid "sample/custom-uri"
768
  msgstr "sample/custom-uri"
769
 
770
+ #: includes/views/permalink-manager-pro-addons.php:292
771
  msgid "Add new redirect"
772
  msgstr "新しいリダイレクトを追加する"
773
 
774
+ #: includes/views/permalink-manager-pro-addons.php:297
775
  #, php-format
776
  msgid ""
777
  "<strong>Please use URIs only!</strong><br />For instance, to set-up a "
780
  "<strong>URIのみご利用下さい!</strong><br />例えば、<code>%s/old-uri</code> "
781
  "のリダイレクトを設定する場合は、<code>old-uri</code> をお使い下さい。"
782
 
783
+ #: includes/views/permalink-manager-pro-addons.php:306
784
  msgid "Redirect this page to external URL"
785
  msgstr "このページを外部URLにリダイレクトする"
786
 
787
+ #: includes/views/permalink-manager-pro-addons.php:307
788
  msgid ""
789
  "If not empty, the visitors trying to access this page will be redirected to "
790
  "the URL specified below."
791
  msgstr "空白でない場合、このページにアクセスしようと試みた訪問者は、下記のURLにリダイレクトされます。"
792
 
793
+ #: includes/views/permalink-manager-pro-addons.php:311
794
  msgid "http://another-website.com/final-target-url"
795
  msgstr "http://another-website.com/final-target-url"
796
 
797
+ #: includes/views/permalink-manager-pro-addons.php:315
798
  msgid ""
799
  "<strong>Please use full URLs!</strong><br />For instance, <code>http:"
800
  "//another-website.com/final-target-url</code>."
942
  "この機能は、(古い)オリジナルのパーマリンクをPermalink Managerで設定された(新しい)カスタム "
943
  "パーマリンクにリダイレクトするために使用されます。"
944
 
945
+ #: includes/views/permalink-manager-settings.php:79
946
  msgid "Old slug redirect"
947
  msgstr "古いスラッグ リダイレクト"
948
 
949
+ #: includes/views/permalink-manager-settings.php:82
950
  msgid ""
951
  "<strong>Old slug redirect is used by WordPress to provide a fallback for old "
952
  "version of slugs after they are changed.</strong>"
954
  "<strong>古いスラッグ "
955
  "リダイレクトは、WordPressが古いバージョンのスラッグを変更した後の代替を提供するために使用されます。</strong>"
956
 
957
+ #: includes/views/permalink-manager-settings.php:83
958
  msgid ""
959
  "If enabled, the visitors trying to access the URL with the old slug will be "
960
  "redirected to the canonical permalink."
961
  msgstr "有効にすると、古いスラッグでURLにアクセスした訪問者を、正規パーマリンクにリダイレクトします。"
962
 
963
+ #: includes/views/permalink-manager-settings.php:89
964
  msgid "Enhanced redirect"
965
  msgstr "拡張 リダイレクト"
966
 
967
+ #: includes/views/permalink-manager-settings.php:95
968
  msgid "Redirect mode"
969
  msgstr "リダイレクト モード"
970
 
971
+ #: includes/views/permalink-manager-settings.php:97
972
  msgid "Disable (Permalink Manager redirect functions)"
973
  msgstr "無効(Permalink Manager リダイレクト 機能)"
974
 
975
+ #: includes/views/permalink-manager-settings.php:97
976
  msgid "301 redirect"
977
  msgstr "301 リダイレクト"
978
 
979
+ #: includes/views/permalink-manager-settings.php:97
980
  msgid "302 redirect"
981
  msgstr "302 リダイレクト"
982
 
983
+ #: includes/views/permalink-manager-settings.php:99
984
  msgid ""
985
  "<strong>Permalink Manager includes a set of hooks that allow to extend the "
986
  "redirect functions used natively by WordPress to avoid 404 errors.</strong>"
988
  "<strong>Permalink "
989
  "Managerには、404エラー回避のためにWordPressが従来使用するリダイレクト機能を拡張できる一連のフックが含まれています。</strong>"
990
 
991
+ #: includes/views/permalink-manager-settings.php:100
992
  msgid ""
993
  "You can disable this feature if you do not want Permalink Manager to trigger "
994
  "any additional redirect functions at all."
995
  msgstr "Permalink Managerに、追加のリダイレクト機能を一切トリガーさせないようにする場合は、この機能を無効にします。"
996
 
997
+ #: includes/views/permalink-manager-settings.php:105
998
  msgid "Old custom permalinks redirect"
999
  msgstr "古いカスタム パーマリンク リダイレクト"
1000
 
1001
+ #: includes/views/permalink-manager-settings.php:110
1002
  msgid ""
1003
  "<strong>Permalink Manager can automatically set-up extra redirects after the "
1004
  "custom permalink is changed.</strong>"
1005
  msgstr ""
1006
  "<strong>Permalink Managerは、カスタム パーマリンクの変更後、自動的に追加のリダイレクトを設定できます。</strong>"
1007
 
1008
+ #: includes/views/permalink-manager-settings.php:111
1009
  msgid ""
1010
  "If enabled, Permalink Manage will add redirect for earlier version of custom "
1011
  "permalink after you change it (eg. with URI Editor or Regenerate/reset tool)."
1013
  "有効にすると、Permalink Managerは、変更後(例:URIエディターまたは再生成・リセットツールを使用)に、以前のバージョンのカスタム "
1014
  "パーマリンクのリダイレクトを追加します。"
1015
 
1016
+ #: includes/views/permalink-manager-settings.php:112
1017
  msgid ""
1018
  "You can disable this feature if you use another plugin for redirects, eg. "
1019
  "Yoast SEO Premium or Redirection."
1020
  msgstr "Yoast SEO プレミアムやその他のリダイレクトプラグインを使用している場合は、この機能を無効にできます。"
1021
 
1022
+ #: includes/views/permalink-manager-settings.php:117
1023
  msgid "Force HTTPS/WWW"
1024
  msgstr "HTTPS/WWW 強制"
1025
 
1026
+ #: includes/views/permalink-manager-settings.php:120
1027
  msgid ""
1028
  "<strong>You can use Permalink Manager to force SSL or \"www\" prefix in "
1029
  "WordPress permalinks.</strong>"
1031
  "<strong>Permalink "
1032
  "Managerを使って、WordPressのパーマリンク内にSSLもしくはwwwの接頭辞を強制的に付与できます。</strong>"
1033
 
1034
+ #: includes/views/permalink-manager-settings.php:121
1035
  msgid "Please disable it if you encounter any redirect loop issues."
1036
  msgstr "リダイレクトのループ問題が発生した場合は、このオプションを無効にして下さい。"
1037
 
1038
+ #: includes/views/permalink-manager-settings.php:126
1039
  msgid "Trailing slashes redirect"
1040
  msgstr "末尾のスラッシュリダイレクト"
1041
 
1042
+ #: includes/views/permalink-manager-settings.php:129
1043
  msgid ""
1044
  "<strong>Permalink Manager can force the trailing slashes settings in the "
1045
  "custom permalinks with redirect.</strong>"
1046
  msgstr ""
1047
  "<strong>Permalink Managerは、リダイレクトのあるカスタム パーマリンクの末尾のスラッシュ設定を強制できます。</strong>"
1048
 
1049
+ #: includes/views/permalink-manager-settings.php:135
1050
  msgid "Third party plugins"
1051
  msgstr "サードパーティー プラグイン"
1052
 
1053
+ #: includes/views/permalink-manager-settings.php:141
1054
  msgid "WPML/Polylang language mismatch"
1055
  msgstr "WPML / Polylang 言語 不一致"
1056
 
1057
+ #: includes/views/permalink-manager-settings.php:143
1058
  msgid ""
1059
  "If enabled, the plugin will load the adjacent translation of post when the "
1060
  "custom permalink is detected, but the language code in the URL does not "
1062
  msgstr ""
1063
  "有効にすると、本プラグインはカスタムパーマリンクを検出した際、投稿に用いた言語に近い翻訳を読み込みますが、投稿やタームに割当られた言語コードとURL内言語コードと一致しない場合は読み込みません。"
1064
 
1065
+ #: includes/views/permalink-manager-settings.php:147
1066
  msgid "WP All Import support"
1067
  msgstr "WP All Import サポート"
1068
 
1069
+ #: includes/views/permalink-manager-settings.php:149
1070
  msgid ""
1071
+ "If checked, the custom permalinks will not be saved for the posts imported "
1072
+ "with Wp All Import plugin."
1073
+ msgstr "オンにすると、WP All Importプラグインでインポートされた投稿に対してカスタム パーマリンクは保存されません。"
 
 
 
 
1074
 
1075
+ #: includes/views/permalink-manager-settings.php:153
 
 
 
 
 
 
1076
  msgid "Breadcrumbs support"
1077
  msgstr "パンくずリスト サポート"
1078
 
1079
+ #: includes/views/permalink-manager-settings.php:155
1080
  msgid ""
1081
+ "If checked, the HTML breadcrumbs will be filtered by Permalink Manager to "
1082
  "mimic the current URL structure.<br />Works with: <strong>WooCommerce, Yoast "
1083
  "SEO, RankMath and SEOPress</strong> breadcrumbs."
1084
  msgstr ""
1085
+ "オンにすると、HTMLパンくずリストがPermalink Managerによってフィルタリングされ、現在のURL構造を模倣します。<br />"
1086
+ "連携:<strong> WooCommerce、Yoast SEO、RankMath、SEOPress </strong>パンくずリスト"
1087
 
1088
+ #: includes/views/permalink-manager-settings.php:159
1089
  msgid "Excluded content types"
1090
  msgstr "除外する投稿タイプ"
1091
 
1092
+ #: includes/views/permalink-manager-settings.php:161
1093
  msgid ""
1094
  "Permalink Manager will ignore and not filter the custom permalinks of all "
1095
  "selected above post types & taxonomies."
1096
  msgstr "Permalink Managerは、上記で選択した全ての投稿タイプとタクソノミーのカスタム パーマリンクを無視し、フィルタリングしません。"
1097
 
1098
+ #: includes/views/permalink-manager-settings.php:166
1099
  msgid "Advanced settings"
1100
  msgstr "詳細設定"
1101
 
1102
+ #: includes/views/permalink-manager-settings.php:172
1103
  msgid "Show \"Native slug\" field"
1104
  msgstr "「ネイティブ スラッグ」フィールドを表示する"
1105
 
1106
+ #: includes/views/permalink-manager-settings.php:174
1107
  msgid ""
1108
  "If enabled, it would be possible to edit the native slug via URI Editor on "
1109
  "single post/term edit page."
1110
  msgstr "有効にすると、それぞれの投稿やタームの編集ページ上で、URIエディター経由にてネイティブ スラッグを編集できます。"
1111
 
1112
+ #: includes/views/permalink-manager-settings.php:178
1113
  msgid "Force 404 on non-existing pagination pages"
1114
  msgstr "実在しないページネーションのページに404を強制表示する"
1115
 
1116
+ #: includes/views/permalink-manager-settings.php:180
1117
  msgid ""
1118
  "If enabled, the non-existing pagination pages (for single posts) will return "
1119
  "404 (\"Not Found\") error.<br /><strong>Please disable it, if you encounter "
1123
  "<strong>ページネーションのページ、もしくは独自のページネーション "
1124
  "システムをご利用で、なんらかの問題が生じた場合は、無効にしてください。</strong>"
1125
 
1126
+ #: includes/views/permalink-manager-settings.php:184
1127
  msgid "Strip special characters"
1128
  msgstr "特殊文字を取り除く"
1129
 
1130
+ #: includes/views/permalink-manager-settings.php:186
1131
+ #: includes/views/permalink-manager-settings.php:193
1132
  msgid "Yes, use native settings"
1133
  msgstr "はい、ネイティブ 設定を使います。"
1134
 
1135
+ #: includes/views/permalink-manager-settings.php:186
1136
  msgid "No, keep special characters (.,|_+) in the slugs"
1137
  msgstr "いいえ、スラッグに特殊文字(.,|_+)を保持します。"
1138
 
1139
+ #: includes/views/permalink-manager-settings.php:187
1140
  msgid ""
1141
  "If enabled only alphanumeric characters, underscores and dashes will be "
1142
  "allowed for post/term slugs."
1143
  msgstr "英数字のみを有効にすると、投稿とターム スラッグにて下線とダッシュの使用が許可されます。"
1144
 
1145
+ #: includes/views/permalink-manager-settings.php:191
1146
  msgid "Convert accented letters"
1147
  msgstr "アクセント付き文字の変換"
1148
 
1149
+ #: includes/views/permalink-manager-settings.php:193
1150
  msgid "No, keep accented letters in the slugs"
1151
  msgstr "いいえ、スラッグにアクセント付き文字を保持します。"
1152
 
1153
+ #: includes/views/permalink-manager-settings.php:194
1154
  msgid ""
1155
  "If enabled, all the accented letters will be replaced with their non-"
1156
  "accented equivalent (eg. Å => A, Æ => AE, Ø => O, Ć => C)."
1157
  msgstr ""
1158
  "有効にすると、全てのアクセント付きの文字が、アクセントなしの文字に置換されます。(例:Å => A, Æ => AE, Ø => O, Ć => C)"
1159
 
1160
+ #: includes/views/permalink-manager-settings.php:198
1161
  msgid "URI Editor role capability"
1162
  msgstr "URIエディター 種類と権限"
1163
 
1164
+ #: includes/views/permalink-manager-settings.php:199
1165
  msgid "Administrator (edit_theme_options)"
1166
  msgstr "管理者 (edit_theme_options)"
1167
 
1168
+ #: includes/views/permalink-manager-settings.php:199
1169
  msgid "Editor (publish_pages)"
1170
  msgstr "編集者 (publish_pages)"
1171
 
1172
+ #: includes/views/permalink-manager-settings.php:199
1173
  msgid "Author (publish_posts)"
1174
  msgstr "投稿者 (publish_posts)"
1175
 
1176
+ #: includes/views/permalink-manager-settings.php:199
1177
  msgid "Contributor (edit_posts)"
1178
  msgstr "寄稿者 (edit_posts)"
1179
 
1180
+ #: includes/views/permalink-manager-settings.php:200
1181
  #, php-format
1182
  msgid ""
1183
  "Only the users who have selected capability will be able to access URI "
1187
  "権限を持つユーザーのみがURIエディターにアクセスできます。<br />権限のリストは<a href=\"%s\" target=\"_blank\">"
1188
  "コチラ</a>で確認できます。"
1189
 
1190
+ #: includes/views/permalink-manager-settings.php:204
1191
  msgid "Automatically fix broken URIs"
1192
  msgstr "壊れたURIを自動的に修正する"
1193
 
1194
+ #: includes/views/permalink-manager-settings.php:206
1195
  msgid "Disable"
1196
  msgstr "無効"
1197
 
1198
+ #: includes/views/permalink-manager-settings.php:206
1199
  msgid "Fix URIs individually (during page load)"
1200
  msgstr "個々にURLを修正する(ページ読込時)"
1201
 
1202
+ #: includes/views/permalink-manager-settings.php:206
1203
  msgid "Bulk fix all URIs (once a day, in the background)"
1204
  msgstr "全てのURIを一括修正する(1日1回、バックグラウンド)"
1205
 
1206
+ #: includes/views/permalink-manager-settings.php:208
1207
  msgid ""
1208
  "Enable this option if you would like to automatically remove redundant "
1209
  "permalinks & duplicated redirects."
1210
  msgstr "冗長なパーマリンクと重複したリダイレクトを自動的に削除したい場合は、このオプションを有効にします。"
1211
 
1212
+ #: includes/views/permalink-manager-settings.php:215
1213
  msgid "Save settings"
1214
  msgstr "設定を保存する"
1215
 
languages/permalink-manager.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2020-11-23 20:44+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
@@ -14,7 +14,7 @@ msgstr ""
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/"
16
 
17
- #: permalink-manager.php:207
18
  #, php-format
19
  msgid ""
20
  "Get access to extra features: full taxonomy and WooCommerce support, "
@@ -23,83 +23,84 @@ msgid ""
23
  "and save %s using \"%s\" coupon code!</strong> Valid until %s!"
24
  msgstr ""
25
 
26
- #: includes/core/permalink-manager-third-parties.php:292
27
  msgid "\"Custom Permalinks\" URIs were imported!"
28
  msgstr ""
29
 
30
- #: includes/core/permalink-manager-third-parties.php:295
31
  msgid "No \"Custom Permalinks\" URIs were imported!"
32
  msgstr ""
33
 
34
- #: includes/core/permalink-manager-third-parties.php:681
35
- #: includes/core/permalink-manager-gutenberg.php:26
36
- #: includes/core/permalink-manager-admin-functions.php:111
37
- #: includes/core/permalink-manager-admin-functions.php:111
38
- #: includes/core/permalink-manager-admin-functions.php:737
39
- #: includes/core/permalink-manager-admin-functions.php:818
40
- #: includes/core/permalink-manager-admin-functions.php:823
41
- #: includes/core/permalink-manager-admin-functions.php:824
 
42
  msgid "Permalink Manager"
43
  msgstr ""
44
 
45
- #: includes/core/permalink-manager-third-parties.php:685
46
- #: includes/core/permalink-manager-uri-functions-tax.php:482
47
  #: includes/views/permalink-manager-tools.php:70
48
  msgid "Custom URI"
49
  msgstr ""
50
 
51
- #: includes/core/permalink-manager-third-parties.php:686
52
  #, php-format
53
  msgid ""
54
  "If empty, a default permalink based on your current <a href=\"%s\" "
55
  "target=\"_blank\">permastructure settings</a> will be used."
56
  msgstr ""
57
 
58
- #: includes/core/permalink-manager-uri-functions-tax.php:483
59
  msgid "Clear/leave the field empty to use the default permalink."
60
  msgstr ""
61
 
62
- #: includes/core/permalink-manager-uri-functions-tax.php:515
63
- #: includes/core/permalink-manager-admin-functions.php:741
64
- #: includes/core/permalink-manager-admin-functions.php:841
65
- #: includes/core/permalink-manager-uri-functions-post.php:687
66
  msgid "Current URI"
67
  msgstr ""
68
 
69
- #: includes/core/permalink-manager-admin-functions.php:135
70
  msgid "Are you sure? This action cannot be undone!"
71
  msgstr ""
72
 
73
- #: includes/core/permalink-manager-admin-functions.php:156
74
  msgid "URI Editor"
75
  msgstr ""
76
 
77
- #: includes/core/permalink-manager-admin-functions.php:157
78
  #: includes/views/permalink-manager-settings.php:14
79
  msgid "Settings"
80
  msgstr ""
81
 
82
- #: includes/core/permalink-manager-admin-functions.php:169
83
  msgid "Documentation"
84
  msgstr ""
85
 
86
- #: includes/core/permalink-manager-admin-functions.php:173
87
  msgid "Buy Permalink Manager Pro"
88
  msgstr ""
89
 
90
- #: includes/core/permalink-manager-admin-functions.php:280
91
  msgid "Select all"
92
  msgstr ""
93
 
94
- #: includes/core/permalink-manager-admin-functions.php:281
95
  msgid "Unselect all"
96
  msgstr ""
97
 
98
- #: includes/core/permalink-manager-admin-functions.php:396
99
  msgid "Permastructure translations"
100
  msgstr ""
101
 
102
- #: includes/core/permalink-manager-admin-functions.php:397
103
  msgid ""
104
  "If you would like to translate the permastructures and set-up different "
105
  "permalink structure per language, please fill in the fields below. Otherwise "
@@ -107,157 +108,157 @@ msgid ""
107
  "applied."
108
  msgstr ""
109
 
110
- #: includes/core/permalink-manager-admin-functions.php:414
111
  msgid "Default permastructure"
112
  msgstr ""
113
 
114
- #: includes/core/permalink-manager-admin-functions.php:415
115
  msgid "Restore default permastructure"
116
  msgstr ""
117
 
118
- #: includes/core/permalink-manager-admin-functions.php:421
119
- #: includes/core/permalink-manager-actions.php:409
120
- #: includes/core/permalink-manager-actions.php:413
121
  msgid "Permastructure settings"
122
  msgstr ""
123
 
124
- #: includes/core/permalink-manager-admin-functions.php:422
125
  msgid "Do not automatically append the slug"
126
  msgstr ""
127
 
128
- #: includes/core/permalink-manager-admin-functions.php:430
129
  msgid "Show additional settings"
130
  msgstr ""
131
 
132
- #: includes/core/permalink-manager-admin-functions.php:577
133
  msgid "Donate"
134
  msgstr ""
135
 
136
- #: includes/core/permalink-manager-admin-functions.php:578
137
  msgid "by Maciej Bis"
138
  msgstr ""
139
 
140
- #: includes/core/permalink-manager-admin-functions.php:590
141
  msgid "Upgrade to PRO"
142
  msgstr ""
143
 
144
- #: includes/core/permalink-manager-admin-functions.php:657
145
- #: includes/core/permalink-manager-admin-functions.php:684
146
  msgid "Title"
147
  msgstr ""
148
 
149
- #: includes/core/permalink-manager-admin-functions.php:659
150
- #: includes/core/permalink-manager-admin-functions.php:686
151
  msgid "Old Slug"
152
  msgstr ""
153
 
154
- #: includes/core/permalink-manager-admin-functions.php:660
155
- #: includes/core/permalink-manager-admin-functions.php:687
156
  msgid "New Slug"
157
  msgstr ""
158
 
159
- #: includes/core/permalink-manager-admin-functions.php:662
160
- #: includes/core/permalink-manager-admin-functions.php:689
161
  msgid "Old URI"
162
  msgstr ""
163
 
164
- #: includes/core/permalink-manager-admin-functions.php:663
165
- #: includes/core/permalink-manager-admin-functions.php:690
166
  msgid "New URI"
167
  msgstr ""
168
 
169
- #: includes/core/permalink-manager-admin-functions.php:684
170
  msgid "Show more details"
171
  msgstr ""
172
 
173
- #: includes/core/permalink-manager-admin-functions.php:697
174
  msgid "List of updated items"
175
  msgstr ""
176
 
177
- #: includes/core/permalink-manager-admin-functions.php:710
178
  #, php-format
179
  msgid "<strong class=\"updated_count\">%d</strong> slug was updated!"
180
  msgid_plural "<strong class=\"updated_count\">%d</strong> slugs were updated!"
181
  msgstr[0] ""
182
  msgstr[1] ""
183
 
184
- #: includes/core/permalink-manager-admin-functions.php:711
185
  #, php-format
186
  msgid "<a %s>Click here</a> to go to the list of updated slugs"
187
  msgstr ""
188
 
189
- #: includes/core/permalink-manager-admin-functions.php:715
190
  #: includes/core/permalink-manager-actions.php:115
191
  msgid "<strong>No slugs</strong> were updated!"
192
  msgstr ""
193
 
194
- #: includes/core/permalink-manager-admin-functions.php:804
195
- #: includes/core/permalink-manager-admin-functions.php:807
196
  msgid "Yes"
197
  msgstr ""
198
 
199
- #: includes/core/permalink-manager-admin-functions.php:804
200
- #: includes/core/permalink-manager-admin-functions.php:808
201
  msgid "No"
202
  msgstr ""
203
 
204
- #: includes/core/permalink-manager-admin-functions.php:806
205
  #, php-format
206
  msgid "Use global settings [%s]"
207
  msgstr ""
208
 
209
- #: includes/core/permalink-manager-admin-functions.php:809
210
  msgid "No (ignore this URI in bulk tools)"
211
  msgstr ""
212
 
213
- #: includes/core/permalink-manager-admin-functions.php:823
214
  msgid "Close: "
215
  msgstr ""
216
 
217
- #: includes/core/permalink-manager-admin-functions.php:835
218
  msgid "The custom URI cannot be edited on frontpage."
219
  msgstr ""
220
 
221
- #: includes/core/permalink-manager-admin-functions.php:842
222
  msgid ""
223
  "If custom URI is not defined, a default URI will be set (see below). The "
224
  "custom URI can be edited only if 'Auto-update the URI' feature is not "
225
  "enabled."
226
  msgstr ""
227
 
228
- #: includes/core/permalink-manager-admin-functions.php:851
229
  msgid "Native slug"
230
  msgstr ""
231
 
232
- #: includes/core/permalink-manager-admin-functions.php:852
233
  msgid ""
234
  "The native slug is by default automatically used in native permalinks (when "
235
  "Permalink Manager is disabled)."
236
  msgstr ""
237
 
238
- #: includes/core/permalink-manager-admin-functions.php:862
239
  msgid "Auto-update the URI"
240
  msgstr ""
241
 
242
- #: includes/core/permalink-manager-admin-functions.php:863
243
  msgid ""
244
  "If enabled, the 'Current URI' field will be automatically changed to "
245
  "'Default URI' (displayed below) after the post is saved or updated."
246
  msgstr ""
247
 
248
- #: includes/core/permalink-manager-admin-functions.php:871
249
  msgid "Default URI"
250
  msgstr ""
251
 
252
- #: includes/core/permalink-manager-admin-functions.php:872
253
  msgid "Restore Default URI"
254
  msgstr ""
255
 
256
- #: includes/core/permalink-manager-admin-functions.php:882
257
  msgid "Automatic redirect for native URI enabled:"
258
  msgstr ""
259
 
260
- #: includes/core/permalink-manager-admin-functions.php:893
261
  #, php-format
262
  msgid ""
263
  "<span><strong>Need more functionalities and dedicated support?</strong> Buy "
@@ -265,33 +266,40 @@ msgid ""
265
  "permalink-manager-pro/\">PMLITE coupon code</a> to get 10% off.</a></span>"
266
  msgstr ""
267
 
268
- #: includes/core/permalink-manager-admin-functions.php:904
269
  msgid "Save permalink"
270
  msgstr ""
271
 
272
- #: includes/core/permalink-manager-admin-functions.php:931
273
  msgid "Manage redirects"
274
  msgstr ""
275
 
276
- #: includes/core/permalink-manager-admin-functions.php:1049
277
  #, php-format
278
  msgid ""
279
  "This functionality is available only in <a href=\"%s\" target=\"_blank\">"
280
  "Permalink Manager Pro</a>."
281
  msgstr ""
282
 
283
- #: includes/core/permalink-manager-pro-functions.php:126
 
284
  #, php-format
285
  msgid ""
286
  "Please paste the licence key to access all Permalink Manager Pro updates & "
287
  "features <a href=\"%s\" target=\"_blank\">on this page</a>."
288
  msgstr ""
289
 
290
- #: includes/core/permalink-manager-pro-functions.php:131
 
 
 
 
 
 
291
  msgid "Your Permalink Manager Pro licence key is invalid!"
292
  msgstr ""
293
 
294
- #: includes/core/permalink-manager-pro-functions.php:136
295
  #, php-format
296
  msgid ""
297
  "Your Permalink Manager Pro licence key expired! To restore access to plugin "
@@ -299,122 +307,116 @@ msgid ""
299
  "this page</a>."
300
  msgstr ""
301
 
302
- #: includes/core/permalink-manager-pro-functions.php:141
303
  msgid "You own a lifetime licence key."
304
  msgstr ""
305
 
306
- #: includes/core/permalink-manager-pro-functions.php:146
307
  #, php-format
308
  msgid ""
309
  "Your licence key is valid until %s.<br />To prolong it please go to <a "
310
  "href=\"%s\" target=\"_blank\">this page</a> for more information."
311
  msgstr ""
312
 
313
- #: includes/core/permalink-manager-pro-functions.php:151
314
- msgid ""
315
- "Expiration date could not be downloaded at this moment. Please try again in "
316
- "a few minutes."
317
- msgstr ""
318
-
319
- #: includes/core/permalink-manager-pro-functions.php:184
320
  msgid "Arabic"
321
  msgstr ""
322
 
323
- #: includes/core/permalink-manager-pro-functions.php:185
324
  msgid "Chinese"
325
  msgstr ""
326
 
327
- #: includes/core/permalink-manager-pro-functions.php:186
328
  msgid "Danish"
329
  msgstr ""
330
 
331
- #: includes/core/permalink-manager-pro-functions.php:187
332
  msgid "Dutch"
333
  msgstr ""
334
 
335
- #: includes/core/permalink-manager-pro-functions.php:188
336
  msgid "English"
337
  msgstr ""
338
 
339
- #: includes/core/permalink-manager-pro-functions.php:189
340
  msgid "Finnish"
341
  msgstr ""
342
 
343
- #: includes/core/permalink-manager-pro-functions.php:190
344
  msgid "French"
345
  msgstr ""
346
 
347
- #: includes/core/permalink-manager-pro-functions.php:191
348
  msgid "German"
349
  msgstr ""
350
 
351
- #: includes/core/permalink-manager-pro-functions.php:192
352
  msgid "Hebrew"
353
  msgstr ""
354
 
355
- #: includes/core/permalink-manager-pro-functions.php:193
356
  msgid "Hindi"
357
  msgstr ""
358
 
359
- #: includes/core/permalink-manager-pro-functions.php:194
360
  msgid "Italian"
361
  msgstr ""
362
 
363
- #: includes/core/permalink-manager-pro-functions.php:195
364
  msgid "Japanese"
365
  msgstr ""
366
 
367
- #: includes/core/permalink-manager-pro-functions.php:196
368
  msgid "Korean"
369
  msgstr ""
370
 
371
- #: includes/core/permalink-manager-pro-functions.php:197
372
  msgid "Norwegian"
373
  msgstr ""
374
 
375
- #: includes/core/permalink-manager-pro-functions.php:198
376
  msgid "Persian"
377
  msgstr ""
378
 
379
- #: includes/core/permalink-manager-pro-functions.php:199
380
  msgid "Polish"
381
  msgstr ""
382
 
383
- #: includes/core/permalink-manager-pro-functions.php:200
384
  msgid "Portuguese"
385
  msgstr ""
386
 
387
- #: includes/core/permalink-manager-pro-functions.php:201
388
  msgid "Russian"
389
  msgstr ""
390
 
391
- #: includes/core/permalink-manager-pro-functions.php:202
392
  msgid "Spanish"
393
  msgstr ""
394
 
395
- #: includes/core/permalink-manager-pro-functions.php:203
396
  msgid "Swedish"
397
  msgstr ""
398
 
399
- #: includes/core/permalink-manager-pro-functions.php:204
400
  msgid "Turkish"
401
  msgstr ""
402
 
403
- #: includes/core/permalink-manager-pro-functions.php:486
404
  msgid "Coupon Link"
405
  msgstr ""
406
 
407
- #: includes/core/permalink-manager-pro-functions.php:507
408
  msgid "Coupon URI"
409
  msgstr ""
410
 
411
- #: includes/core/permalink-manager-pro-functions.php:508
412
  msgid ""
413
  "The URIs are case-insensitive, eg. <strong>BLACKFRIDAY</strong> and <strong>"
414
  "blackfriday</strong> are equivalent."
415
  msgstr ""
416
 
417
- #: includes/core/permalink-manager-pro-functions.php:519
418
  msgid "Coupon Full URL"
419
  msgstr ""
420
 
@@ -422,58 +424,58 @@ msgstr ""
422
  msgid "The settings are saved!"
423
  msgstr ""
424
 
425
- #: includes/core/permalink-manager-actions.php:377
426
  #, php-format
427
  msgid "%d Custom URIs and %d Custom Redirects were removed!"
428
  msgstr ""
429
 
430
- #: includes/core/permalink-manager-actions.php:379
431
  msgid "No Custom URIs or Custom Redirects were removed!"
432
  msgstr ""
433
 
434
- #: includes/core/permalink-manager-actions.php:391
435
  msgid "You are not allowed to remove Permalink Manager data!"
436
  msgstr ""
437
 
438
- #: includes/core/permalink-manager-actions.php:397
439
  msgid "Custom permalinks"
440
  msgstr ""
441
 
442
- #: includes/core/permalink-manager-actions.php:401
443
  msgid "Custom redirects"
444
  msgstr ""
445
 
446
- #: includes/core/permalink-manager-actions.php:405
447
  msgid "External redirects"
448
  msgstr ""
449
 
450
- #: includes/core/permalink-manager-actions.php:424
451
  #, php-format
452
  msgid "%s were removed!"
453
  msgstr ""
454
 
455
- #: includes/core/permalink-manager-actions.php:565
456
  #, php-format
457
  msgid "URI \"%s\" was removed successfully!"
458
  msgstr ""
459
 
460
- #: includes/core/permalink-manager-actions.php:573
461
  msgid "Broken redirects were removed successfully!"
462
  msgstr ""
463
 
464
- #: includes/core/permalink-manager-actions.php:577
465
  msgid "URI and/or custom redirects does not exist or were already removed!"
466
  msgstr ""
467
 
468
- #: includes/core/permalink-manager-actions.php:597
469
  msgid "The redirect was removed successfully!"
470
  msgstr ""
471
 
472
- #: includes/core/permalink-manager-actions.php:627
473
  msgid "URI is already in use, please select another one!"
474
  msgstr ""
475
 
476
- #: includes/core/permalink-manager-actions.php:659
477
  msgid "Sitemaps were updated!"
478
  msgstr ""
479
 
@@ -497,13 +499,13 @@ msgstr ""
497
  msgid "WooCommerce"
498
  msgstr ""
499
 
500
- #: includes/views/permalink-manager-permastructs.php:75
501
- #: includes/views/permalink-manager-pro-addons.php:190
502
- #: includes/views/permalink-manager-pro-addons.php:223
503
  msgid "Instructions"
504
  msgstr ""
505
 
506
- #: includes/views/permalink-manager-permastructs.php:76
507
  #, php-format
508
  msgid ""
509
  "The current permastructures settings will be applied <strong>only to the new "
@@ -512,11 +514,11 @@ msgid ""
512
  "href=\"%s\">here</a>."
513
  msgstr ""
514
 
515
- #: includes/views/permalink-manager-permastructs.php:78
516
  msgid "Permastructure tags"
517
  msgstr ""
518
 
519
- #: includes/views/permalink-manager-permastructs.php:79
520
  #, php-format
521
  msgid ""
522
  "All allowed <a href=\"%s\" target=\"_blank\">permastructure tags</a> are "
@@ -524,7 +526,7 @@ msgid ""
524
  "post types or taxonomies."
525
  msgstr ""
526
 
527
- #: includes/views/permalink-manager-permastructs.php:82
528
  msgid "Save permastructures"
529
  msgstr ""
530
 
@@ -585,103 +587,103 @@ msgstr ""
585
  msgid "Filter"
586
  msgstr ""
587
 
588
- #: includes/views/permalink-manager-pro-addons.php:101
589
  msgid "Support"
590
  msgstr ""
591
 
592
- #: includes/views/permalink-manager-pro-addons.php:128
593
  msgid "Licence"
594
  msgstr ""
595
 
596
- #: includes/views/permalink-manager-pro-addons.php:134
597
  msgid "Licence key"
598
  msgstr ""
599
 
600
- #: includes/views/permalink-manager-pro-addons.php:135
601
  msgid "Check the expiration date."
602
  msgstr ""
603
 
604
- #: includes/views/permalink-manager-pro-addons.php:159
605
  msgid "-- Use predefined words list --"
606
  msgstr ""
607
 
608
- #: includes/views/permalink-manager-pro-addons.php:162
609
  msgid "Remove all words"
610
  msgstr ""
611
 
612
- #: includes/views/permalink-manager-pro-addons.php:164
613
  msgid "Add the words from the list"
614
  msgstr ""
615
 
616
- #: includes/views/permalink-manager-pro-addons.php:172
617
  msgid "Enable \"stop words\""
618
  msgstr ""
619
 
620
- #: includes/views/permalink-manager-pro-addons.php:178
621
  msgid "\"Stop words\" list"
622
  msgstr ""
623
 
624
- #: includes/views/permalink-manager-pro-addons.php:182
625
  msgid "Type comma to separate the words."
626
  msgstr ""
627
 
628
- #: includes/views/permalink-manager-pro-addons.php:191
629
  msgid ""
630
  "If enabled, all selected \"stop words\" will be automatically removed from "
631
  "default URIs."
632
  msgstr ""
633
 
634
- #: includes/views/permalink-manager-pro-addons.php:192
635
  msgid ""
636
  "Each of the words can be removed and any new words can be added to the list. "
637
  "You can also use a predefined list (available in 21 languages)."
638
  msgstr ""
639
 
640
- #: includes/views/permalink-manager-pro-addons.php:194
641
  msgid "Save"
642
  msgstr ""
643
 
644
- #: includes/views/permalink-manager-pro-addons.php:214
645
  #: includes/views/permalink-manager-tools.php:34
646
  msgid "Custom Permalinks"
647
  msgstr ""
648
 
649
- #: includes/views/permalink-manager-pro-addons.php:215
650
  msgid "Deactivate after import"
651
  msgstr ""
652
 
653
- #: includes/views/permalink-manager-pro-addons.php:218
654
  msgid ""
655
  "If selected, \"Custom Permalinks\" plugin will be deactivated after its "
656
  "custom URIs are imported."
657
  msgstr ""
658
 
659
- #: includes/views/permalink-manager-pro-addons.php:224
660
  msgid ""
661
  "Please note that \"Custom Permalinks\" (if activated) may break the behavior "
662
  "of this plugin."
663
  msgstr ""
664
 
665
- #: includes/views/permalink-manager-pro-addons.php:225
666
  msgid ""
667
  "Therefore, it is recommended to disable \"Custom Permalink\" and import old "
668
  "permalinks before using Permalink Manager Pro."
669
  msgstr ""
670
 
671
- #: includes/views/permalink-manager-pro-addons.php:230
672
  #, php-format
673
  msgid "Import %d URIs"
674
  msgstr ""
675
 
676
- #: includes/views/permalink-manager-pro-addons.php:235
677
  msgid "No custom URIs to import"
678
  msgstr ""
679
 
680
- #: includes/views/permalink-manager-pro-addons.php:248
681
  msgid "Technical support"
682
  msgstr ""
683
 
684
- #: includes/views/permalink-manager-pro-addons.php:249
685
  #, php-format
686
  msgid ""
687
  "To find the answers on frequently asked questions and information about how "
@@ -689,75 +691,75 @@ msgid ""
689
  "Base</strong> using <a target=\"_blank\" href=\"%s\">this link</a>."
690
  msgstr ""
691
 
692
- #: includes/views/permalink-manager-pro-addons.php:250
693
  msgid ""
694
  "If you still did not find the answer to your question, please send us your "
695
  "question or a detailed description of your problem/issue to <a href=\"mailto:"
696
  "support@permalinkmanager.pro\">support@permalinkmanager.pro</a>."
697
  msgstr ""
698
 
699
- #: includes/views/permalink-manager-pro-addons.php:251
700
  msgid ""
701
  "To reduce the response time, please attach your licence key and if possible "
702
  "also: URL address of your website and screenshots explaining the issue."
703
  msgstr ""
704
 
705
- #: includes/views/permalink-manager-pro-addons.php:253
706
  msgid "Suggestions/feedback"
707
  msgstr ""
708
 
709
- #: includes/views/permalink-manager-pro-addons.php:254
710
  msgid ""
711
  "If you would like to suggest a new functionality or leave us feedback, we "
712
  "are open to all new ideas and would be grateful for all your comments!"
713
  msgstr ""
714
 
715
- #: includes/views/permalink-manager-pro-addons.php:255
716
  msgid ""
717
  " Please send your remarks to <a href=\"mailto:contact@permalinkmanager.pro\">"
718
  "contact@permalinkmanager.pro</a>."
719
  msgstr ""
720
 
721
- #: includes/views/permalink-manager-pro-addons.php:270
722
  msgid "Extra redirects (aliases)"
723
  msgstr ""
724
 
725
- #: includes/views/permalink-manager-pro-addons.php:271
726
  msgid ""
727
  "All URIs specified below will redirect the visitors to the custom URI "
728
  "defined above in \"Current URI\" field."
729
  msgstr ""
730
 
731
- #: includes/views/permalink-manager-pro-addons.php:277
732
  msgid "sample/custom-uri"
733
  msgstr ""
734
 
735
- #: includes/views/permalink-manager-pro-addons.php:294
736
  msgid "Add new redirect"
737
  msgstr ""
738
 
739
- #: includes/views/permalink-manager-pro-addons.php:299
740
  #, php-format
741
  msgid ""
742
  "<strong>Please use URIs only!</strong><br />For instance, to set-up a "
743
  "redirect for <code>%s/old-uri</code> please use <code>old-uri</code>."
744
  msgstr ""
745
 
746
- #: includes/views/permalink-manager-pro-addons.php:308
747
  msgid "Redirect this page to external URL"
748
  msgstr ""
749
 
750
- #: includes/views/permalink-manager-pro-addons.php:309
751
  msgid ""
752
  "If not empty, the visitors trying to access this page will be redirected to "
753
  "the URL specified below."
754
  msgstr ""
755
 
756
- #: includes/views/permalink-manager-pro-addons.php:313
757
  msgid "http://another-website.com/final-target-url"
758
  msgstr ""
759
 
760
- #: includes/views/permalink-manager-pro-addons.php:317
761
  msgid ""
762
  "<strong>Please use full URLs!</strong><br />For instance, <code>http:"
763
  "//another-website.com/final-target-url</code>."
@@ -891,235 +893,225 @@ msgid ""
891
  " custom permalinks set with Permalink Manager."
892
  msgstr ""
893
 
894
- #: includes/views/permalink-manager-settings.php:87
895
  msgid "Old slug redirect"
896
  msgstr ""
897
 
898
- #: includes/views/permalink-manager-settings.php:90
899
  msgid ""
900
  "<strong>Old slug redirect is used by WordPress to provide a fallback for old "
901
  "version of slugs after they are changed.</strong>"
902
  msgstr ""
903
 
904
- #: includes/views/permalink-manager-settings.php:91
905
  msgid ""
906
  "If enabled, the visitors trying to access the URL with the old slug will be "
907
  "redirected to the canonical permalink."
908
  msgstr ""
909
 
910
- #: includes/views/permalink-manager-settings.php:97
911
  msgid "Enhanced redirect"
912
  msgstr ""
913
 
914
- #: includes/views/permalink-manager-settings.php:103
915
  msgid "Redirect mode"
916
  msgstr ""
917
 
918
- #: includes/views/permalink-manager-settings.php:105
919
  msgid "Disable (Permalink Manager redirect functions)"
920
  msgstr ""
921
 
922
- #: includes/views/permalink-manager-settings.php:105
923
  msgid "301 redirect"
924
  msgstr ""
925
 
926
- #: includes/views/permalink-manager-settings.php:105
927
  msgid "302 redirect"
928
  msgstr ""
929
 
930
- #: includes/views/permalink-manager-settings.php:107
931
  msgid ""
932
  "<strong>Permalink Manager includes a set of hooks that allow to extend the "
933
  "redirect functions used natively by WordPress to avoid 404 errors.</strong>"
934
  msgstr ""
935
 
936
- #: includes/views/permalink-manager-settings.php:108
937
  msgid ""
938
  "You can disable this feature if you do not want Permalink Manager to trigger "
939
  "any additional redirect functions at all."
940
  msgstr ""
941
 
942
- #: includes/views/permalink-manager-settings.php:113
943
  msgid "Old custom permalinks redirect"
944
  msgstr ""
945
 
946
- #: includes/views/permalink-manager-settings.php:118
947
  msgid ""
948
  "<strong>Permalink Manager can automatically set-up extra redirects after the "
949
  "custom permalink is changed.</strong>"
950
  msgstr ""
951
 
952
- #: includes/views/permalink-manager-settings.php:119
953
  msgid ""
954
  "If enabled, Permalink Manage will add redirect for earlier version of custom "
955
  "permalink after you change it (eg. with URI Editor or Regenerate/reset tool)."
956
  msgstr ""
957
 
958
- #: includes/views/permalink-manager-settings.php:120
959
  msgid ""
960
  "You can disable this feature if you use another plugin for redirects, eg. "
961
  "Yoast SEO Premium or Redirection."
962
  msgstr ""
963
 
964
- #: includes/views/permalink-manager-settings.php:125
965
  msgid "Force HTTPS/WWW"
966
  msgstr ""
967
 
968
- #: includes/views/permalink-manager-settings.php:128
969
  msgid ""
970
  "<strong>You can use Permalink Manager to force SSL or \"www\" prefix in "
971
  "WordPress permalinks.</strong>"
972
  msgstr ""
973
 
974
- #: includes/views/permalink-manager-settings.php:129
975
  msgid "Please disable it if you encounter any redirect loop issues."
976
  msgstr ""
977
 
978
- #: includes/views/permalink-manager-settings.php:134
979
  msgid "Trailing slashes redirect"
980
  msgstr ""
981
 
982
- #: includes/views/permalink-manager-settings.php:137
983
  msgid ""
984
  "<strong>Permalink Manager can force the trailing slashes settings in the "
985
  "custom permalinks with redirect.</strong>"
986
  msgstr ""
987
 
988
- #: includes/views/permalink-manager-settings.php:143
989
  msgid "Third party plugins"
990
  msgstr ""
991
 
992
- #: includes/views/permalink-manager-settings.php:149
993
  msgid "WPML/Polylang language mismatch"
994
  msgstr ""
995
 
996
- #: includes/views/permalink-manager-settings.php:152
997
  msgid ""
998
  "If enabled, the plugin will load the adjacent translation of post when the "
999
  "custom permalink is detected, but the language code in the URL does not "
1000
  "match the language code assigned to the post/term."
1001
  msgstr ""
1002
 
1003
- #: includes/views/permalink-manager-settings.php:156
1004
  msgid "WP All Import support"
1005
  msgstr ""
1006
 
1007
- #: includes/views/permalink-manager-settings.php:159
1008
- msgid ""
1009
- "If enabled, the custom permalinks will not be saved for the posts imported "
1010
- "with WP All Import plugin."
1011
- msgstr ""
1012
-
1013
- #: includes/views/permalink-manager-settings.php:163
1014
- msgid "Ultimate Member support"
1015
- msgstr ""
1016
-
1017
- #: includes/views/permalink-manager-settings.php:166
1018
  msgid ""
1019
- "If enabled, Permalink Manager will detect the additional Ultimate Member "
1020
- "pages (eg. \"account\" sections)."
1021
  msgstr ""
1022
 
1023
- #: includes/views/permalink-manager-settings.php:170
1024
  msgid "Breadcrumbs support"
1025
  msgstr ""
1026
 
1027
- #: includes/views/permalink-manager-settings.php:172
1028
  msgid ""
1029
- "If enabled, the HTML breadcrumbs will be filtered by Permalink Manager to "
1030
  "mimic the current URL structure.<br />Works with: <strong>WooCommerce, Yoast "
1031
  "SEO, RankMath and SEOPress</strong> breadcrumbs."
1032
  msgstr ""
1033
 
1034
- #: includes/views/permalink-manager-settings.php:176
1035
  msgid "Excluded content types"
1036
  msgstr ""
1037
 
1038
- #: includes/views/permalink-manager-settings.php:178
1039
  msgid ""
1040
  "Permalink Manager will ignore and not filter the custom permalinks of all "
1041
  "selected above post types & taxonomies."
1042
  msgstr ""
1043
 
1044
- #: includes/views/permalink-manager-settings.php:183
1045
  msgid "Advanced settings"
1046
  msgstr ""
1047
 
1048
- #: includes/views/permalink-manager-settings.php:189
1049
  msgid "Show \"Native slug\" field"
1050
  msgstr ""
1051
 
1052
- #: includes/views/permalink-manager-settings.php:191
1053
  msgid ""
1054
  "If enabled, it would be possible to edit the native slug via URI Editor on "
1055
  "single post/term edit page."
1056
  msgstr ""
1057
 
1058
- #: includes/views/permalink-manager-settings.php:195
1059
  msgid "Force 404 on non-existing pagination pages"
1060
  msgstr ""
1061
 
1062
- #: includes/views/permalink-manager-settings.php:197
1063
  msgid ""
1064
  "If enabled, the non-existing pagination pages (for single posts) will return "
1065
  "404 (\"Not Found\") error.<br /><strong>Please disable it, if you encounter "
1066
  "any problems with pagination pages or use custom pagination system.</strong>"
1067
  msgstr ""
1068
 
1069
- #: includes/views/permalink-manager-settings.php:201
1070
  msgid "Strip special characters"
1071
  msgstr ""
1072
 
1073
- #: includes/views/permalink-manager-settings.php:203
1074
- #: includes/views/permalink-manager-settings.php:210
1075
  msgid "Yes, use native settings"
1076
  msgstr ""
1077
 
1078
- #: includes/views/permalink-manager-settings.php:203
1079
  msgid "No, keep special characters (.,|_+) in the slugs"
1080
  msgstr ""
1081
 
1082
- #: includes/views/permalink-manager-settings.php:204
1083
  msgid ""
1084
  "If enabled only alphanumeric characters, underscores and dashes will be "
1085
  "allowed for post/term slugs."
1086
  msgstr ""
1087
 
1088
- #: includes/views/permalink-manager-settings.php:208
1089
  msgid "Convert accented letters"
1090
  msgstr ""
1091
 
1092
- #: includes/views/permalink-manager-settings.php:210
1093
  msgid "No, keep accented letters in the slugs"
1094
  msgstr ""
1095
 
1096
- #: includes/views/permalink-manager-settings.php:211
1097
  msgid ""
1098
  "If enabled, all the accented letters will be replaced with their non-"
1099
  "accented equivalent (eg. Å => A, Æ => AE, Ø => O, Ć => C)."
1100
  msgstr ""
1101
 
1102
- #: includes/views/permalink-manager-settings.php:215
1103
  msgid "URI Editor role capability"
1104
  msgstr ""
1105
 
1106
- #: includes/views/permalink-manager-settings.php:216
1107
  msgid "Administrator (edit_theme_options)"
1108
  msgstr ""
1109
 
1110
- #: includes/views/permalink-manager-settings.php:216
1111
  msgid "Editor (publish_pages)"
1112
  msgstr ""
1113
 
1114
- #: includes/views/permalink-manager-settings.php:216
1115
  msgid "Author (publish_posts)"
1116
  msgstr ""
1117
 
1118
- #: includes/views/permalink-manager-settings.php:216
1119
  msgid "Contributor (edit_posts)"
1120
  msgstr ""
1121
 
1122
- #: includes/views/permalink-manager-settings.php:217
1123
  #, php-format
1124
  msgid ""
1125
  "Only the users who have selected capability will be able to access URI "
@@ -1127,29 +1119,29 @@ msgid ""
1127
  "be found here</a>."
1128
  msgstr ""
1129
 
1130
- #: includes/views/permalink-manager-settings.php:221
1131
  msgid "Automatically fix broken URIs"
1132
  msgstr ""
1133
 
1134
- #: includes/views/permalink-manager-settings.php:223
1135
  msgid "Disable"
1136
  msgstr ""
1137
 
1138
- #: includes/views/permalink-manager-settings.php:223
1139
  msgid "Fix URIs individually (during page load)"
1140
  msgstr ""
1141
 
1142
- #: includes/views/permalink-manager-settings.php:223
1143
  msgid "Bulk fix all URIs (once a day, in the background)"
1144
  msgstr ""
1145
 
1146
- #: includes/views/permalink-manager-settings.php:225
1147
  msgid ""
1148
  "Enable this option if you would like to automatically remove redundant "
1149
  "permalinks & duplicated redirects."
1150
  msgstr ""
1151
 
1152
- #: includes/views/permalink-manager-settings.php:232
1153
  msgid "Save settings"
1154
  msgstr ""
1155
 
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2020-04-24 12:22+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/"
16
 
17
+ #: permalink-manager.php:206
18
  #, php-format
19
  msgid ""
20
  "Get access to extra features: full taxonomy and WooCommerce support, "
23
  "and save %s using \"%s\" coupon code!</strong> Valid until %s!"
24
  msgstr ""
25
 
26
+ #: includes/core/permalink-manager-third-parties.php:231
27
  msgid "\"Custom Permalinks\" URIs were imported!"
28
  msgstr ""
29
 
30
+ #: includes/core/permalink-manager-third-parties.php:234
31
  msgid "No \"Custom Permalinks\" URIs were imported!"
32
  msgstr ""
33
 
34
+ #. Name of the plugin
35
+ #: includes/core/permalink-manager-third-parties.php:513
36
+ #: includes/core/permalink-manager-gutenberg.php:14
37
+ #: includes/core/permalink-manager-admin-functions.php:110
38
+ #: includes/core/permalink-manager-admin-functions.php:110
39
+ #: includes/core/permalink-manager-admin-functions.php:715
40
+ #: includes/core/permalink-manager-admin-functions.php:796
41
+ #: includes/core/permalink-manager-admin-functions.php:801
42
+ #: includes/core/permalink-manager-admin-functions.php:802
43
  msgid "Permalink Manager"
44
  msgstr ""
45
 
46
+ #: includes/core/permalink-manager-third-parties.php:517
47
+ #: includes/core/permalink-manager-uri-functions-tax.php:476
48
  #: includes/views/permalink-manager-tools.php:70
49
  msgid "Custom URI"
50
  msgstr ""
51
 
52
+ #: includes/core/permalink-manager-third-parties.php:518
53
  #, php-format
54
  msgid ""
55
  "If empty, a default permalink based on your current <a href=\"%s\" "
56
  "target=\"_blank\">permastructure settings</a> will be used."
57
  msgstr ""
58
 
59
+ #: includes/core/permalink-manager-uri-functions-tax.php:477
60
  msgid "Clear/leave the field empty to use the default permalink."
61
  msgstr ""
62
 
63
+ #: includes/core/permalink-manager-uri-functions-tax.php:509
64
+ #: includes/core/permalink-manager-admin-functions.php:719
65
+ #: includes/core/permalink-manager-admin-functions.php:819
66
+ #: includes/core/permalink-manager-uri-functions-post.php:665
67
  msgid "Current URI"
68
  msgstr ""
69
 
70
+ #: includes/core/permalink-manager-admin-functions.php:134
71
  msgid "Are you sure? This action cannot be undone!"
72
  msgstr ""
73
 
74
+ #: includes/core/permalink-manager-admin-functions.php:155
75
  msgid "URI Editor"
76
  msgstr ""
77
 
78
+ #: includes/core/permalink-manager-admin-functions.php:156
79
  #: includes/views/permalink-manager-settings.php:14
80
  msgid "Settings"
81
  msgstr ""
82
 
83
+ #: includes/core/permalink-manager-admin-functions.php:168
84
  msgid "Documentation"
85
  msgstr ""
86
 
87
+ #: includes/core/permalink-manager-admin-functions.php:172
88
  msgid "Buy Permalink Manager Pro"
89
  msgstr ""
90
 
91
+ #: includes/core/permalink-manager-admin-functions.php:259
92
  msgid "Select all"
93
  msgstr ""
94
 
95
+ #: includes/core/permalink-manager-admin-functions.php:260
96
  msgid "Unselect all"
97
  msgstr ""
98
 
99
+ #: includes/core/permalink-manager-admin-functions.php:375
100
  msgid "Permastructure translations"
101
  msgstr ""
102
 
103
+ #: includes/core/permalink-manager-admin-functions.php:376
104
  msgid ""
105
  "If you would like to translate the permastructures and set-up different "
106
  "permalink structure per language, please fill in the fields below. Otherwise "
108
  "applied."
109
  msgstr ""
110
 
111
+ #: includes/core/permalink-manager-admin-functions.php:393
112
  msgid "Default permastructure"
113
  msgstr ""
114
 
115
+ #: includes/core/permalink-manager-admin-functions.php:394
116
  msgid "Restore default permastructure"
117
  msgstr ""
118
 
119
+ #: includes/core/permalink-manager-admin-functions.php:400
120
+ #: includes/core/permalink-manager-actions.php:399
121
+ #: includes/core/permalink-manager-actions.php:403
122
  msgid "Permastructure settings"
123
  msgstr ""
124
 
125
+ #: includes/core/permalink-manager-admin-functions.php:401
126
  msgid "Do not automatically append the slug"
127
  msgstr ""
128
 
129
+ #: includes/core/permalink-manager-admin-functions.php:409
130
  msgid "Show additional settings"
131
  msgstr ""
132
 
133
+ #: includes/core/permalink-manager-admin-functions.php:555
134
  msgid "Donate"
135
  msgstr ""
136
 
137
+ #: includes/core/permalink-manager-admin-functions.php:556
138
  msgid "by Maciej Bis"
139
  msgstr ""
140
 
141
+ #: includes/core/permalink-manager-admin-functions.php:568
142
  msgid "Upgrade to PRO"
143
  msgstr ""
144
 
145
+ #: includes/core/permalink-manager-admin-functions.php:635
146
+ #: includes/core/permalink-manager-admin-functions.php:662
147
  msgid "Title"
148
  msgstr ""
149
 
150
+ #: includes/core/permalink-manager-admin-functions.php:637
151
+ #: includes/core/permalink-manager-admin-functions.php:664
152
  msgid "Old Slug"
153
  msgstr ""
154
 
155
+ #: includes/core/permalink-manager-admin-functions.php:638
156
+ #: includes/core/permalink-manager-admin-functions.php:665
157
  msgid "New Slug"
158
  msgstr ""
159
 
160
+ #: includes/core/permalink-manager-admin-functions.php:640
161
+ #: includes/core/permalink-manager-admin-functions.php:667
162
  msgid "Old URI"
163
  msgstr ""
164
 
165
+ #: includes/core/permalink-manager-admin-functions.php:641
166
+ #: includes/core/permalink-manager-admin-functions.php:668
167
  msgid "New URI"
168
  msgstr ""
169
 
170
+ #: includes/core/permalink-manager-admin-functions.php:662
171
  msgid "Show more details"
172
  msgstr ""
173
 
174
+ #: includes/core/permalink-manager-admin-functions.php:675
175
  msgid "List of updated items"
176
  msgstr ""
177
 
178
+ #: includes/core/permalink-manager-admin-functions.php:688
179
  #, php-format
180
  msgid "<strong class=\"updated_count\">%d</strong> slug was updated!"
181
  msgid_plural "<strong class=\"updated_count\">%d</strong> slugs were updated!"
182
  msgstr[0] ""
183
  msgstr[1] ""
184
 
185
+ #: includes/core/permalink-manager-admin-functions.php:689
186
  #, php-format
187
  msgid "<a %s>Click here</a> to go to the list of updated slugs"
188
  msgstr ""
189
 
190
+ #: includes/core/permalink-manager-admin-functions.php:693
191
  #: includes/core/permalink-manager-actions.php:115
192
  msgid "<strong>No slugs</strong> were updated!"
193
  msgstr ""
194
 
195
+ #: includes/core/permalink-manager-admin-functions.php:782
196
+ #: includes/core/permalink-manager-admin-functions.php:785
197
  msgid "Yes"
198
  msgstr ""
199
 
200
+ #: includes/core/permalink-manager-admin-functions.php:782
201
+ #: includes/core/permalink-manager-admin-functions.php:786
202
  msgid "No"
203
  msgstr ""
204
 
205
+ #: includes/core/permalink-manager-admin-functions.php:784
206
  #, php-format
207
  msgid "Use global settings [%s]"
208
  msgstr ""
209
 
210
+ #: includes/core/permalink-manager-admin-functions.php:787
211
  msgid "No (ignore this URI in bulk tools)"
212
  msgstr ""
213
 
214
+ #: includes/core/permalink-manager-admin-functions.php:801
215
  msgid "Close: "
216
  msgstr ""
217
 
218
+ #: includes/core/permalink-manager-admin-functions.php:813
219
  msgid "The custom URI cannot be edited on frontpage."
220
  msgstr ""
221
 
222
+ #: includes/core/permalink-manager-admin-functions.php:820
223
  msgid ""
224
  "If custom URI is not defined, a default URI will be set (see below). The "
225
  "custom URI can be edited only if 'Auto-update the URI' feature is not "
226
  "enabled."
227
  msgstr ""
228
 
229
+ #: includes/core/permalink-manager-admin-functions.php:829
230
  msgid "Native slug"
231
  msgstr ""
232
 
233
+ #: includes/core/permalink-manager-admin-functions.php:830
234
  msgid ""
235
  "The native slug is by default automatically used in native permalinks (when "
236
  "Permalink Manager is disabled)."
237
  msgstr ""
238
 
239
+ #: includes/core/permalink-manager-admin-functions.php:840
240
  msgid "Auto-update the URI"
241
  msgstr ""
242
 
243
+ #: includes/core/permalink-manager-admin-functions.php:841
244
  msgid ""
245
  "If enabled, the 'Current URI' field will be automatically changed to "
246
  "'Default URI' (displayed below) after the post is saved or updated."
247
  msgstr ""
248
 
249
+ #: includes/core/permalink-manager-admin-functions.php:849
250
  msgid "Default URI"
251
  msgstr ""
252
 
253
+ #: includes/core/permalink-manager-admin-functions.php:850
254
  msgid "Restore Default URI"
255
  msgstr ""
256
 
257
+ #: includes/core/permalink-manager-admin-functions.php:860
258
  msgid "Automatic redirect for native URI enabled:"
259
  msgstr ""
260
 
261
+ #: includes/core/permalink-manager-admin-functions.php:871
262
  #, php-format
263
  msgid ""
264
  "<span><strong>Need more functionalities and dedicated support?</strong> Buy "
266
  "permalink-manager-pro/\">PMLITE coupon code</a> to get 10% off.</a></span>"
267
  msgstr ""
268
 
269
+ #: includes/core/permalink-manager-admin-functions.php:882
270
  msgid "Save permalink"
271
  msgstr ""
272
 
273
+ #: includes/core/permalink-manager-admin-functions.php:909
274
  msgid "Manage redirects"
275
  msgstr ""
276
 
277
+ #: includes/core/permalink-manager-admin-functions.php:1027
278
  #, php-format
279
  msgid ""
280
  "This functionality is available only in <a href=\"%s\" target=\"_blank\">"
281
  "Permalink Manager Pro</a>."
282
  msgstr ""
283
 
284
+ #: includes/core/permalink-manager-pro-functions.php:127
285
+ #: includes/core/permalink-manager-pro-functions.php:153
286
  #, php-format
287
  msgid ""
288
  "Please paste the licence key to access all Permalink Manager Pro updates & "
289
  "features <a href=\"%s\" target=\"_blank\">on this page</a>."
290
  msgstr ""
291
 
292
+ #: includes/core/permalink-manager-pro-functions.php:132
293
+ msgid ""
294
+ "Expiration date could not be downloaded at this moment. Please try again in "
295
+ "a few minutes."
296
+ msgstr ""
297
+
298
+ #: includes/core/permalink-manager-pro-functions.php:137
299
  msgid "Your Permalink Manager Pro licence key is invalid!"
300
  msgstr ""
301
 
302
+ #: includes/core/permalink-manager-pro-functions.php:142
303
  #, php-format
304
  msgid ""
305
  "Your Permalink Manager Pro licence key expired! To restore access to plugin "
307
  "this page</a>."
308
  msgstr ""
309
 
310
+ #: includes/core/permalink-manager-pro-functions.php:147
311
  msgid "You own a lifetime licence key."
312
  msgstr ""
313
 
314
+ #: includes/core/permalink-manager-pro-functions.php:150
315
  #, php-format
316
  msgid ""
317
  "Your licence key is valid until %s.<br />To prolong it please go to <a "
318
  "href=\"%s\" target=\"_blank\">this page</a> for more information."
319
  msgstr ""
320
 
321
+ #: includes/core/permalink-manager-pro-functions.php:186
 
 
 
 
 
 
322
  msgid "Arabic"
323
  msgstr ""
324
 
325
+ #: includes/core/permalink-manager-pro-functions.php:187
326
  msgid "Chinese"
327
  msgstr ""
328
 
329
+ #: includes/core/permalink-manager-pro-functions.php:188
330
  msgid "Danish"
331
  msgstr ""
332
 
333
+ #: includes/core/permalink-manager-pro-functions.php:189
334
  msgid "Dutch"
335
  msgstr ""
336
 
337
+ #: includes/core/permalink-manager-pro-functions.php:190
338
  msgid "English"
339
  msgstr ""
340
 
341
+ #: includes/core/permalink-manager-pro-functions.php:191
342
  msgid "Finnish"
343
  msgstr ""
344
 
345
+ #: includes/core/permalink-manager-pro-functions.php:192
346
  msgid "French"
347
  msgstr ""
348
 
349
+ #: includes/core/permalink-manager-pro-functions.php:193
350
  msgid "German"
351
  msgstr ""
352
 
353
+ #: includes/core/permalink-manager-pro-functions.php:194
354
  msgid "Hebrew"
355
  msgstr ""
356
 
357
+ #: includes/core/permalink-manager-pro-functions.php:195
358
  msgid "Hindi"
359
  msgstr ""
360
 
361
+ #: includes/core/permalink-manager-pro-functions.php:196
362
  msgid "Italian"
363
  msgstr ""
364
 
365
+ #: includes/core/permalink-manager-pro-functions.php:197
366
  msgid "Japanese"
367
  msgstr ""
368
 
369
+ #: includes/core/permalink-manager-pro-functions.php:198
370
  msgid "Korean"
371
  msgstr ""
372
 
373
+ #: includes/core/permalink-manager-pro-functions.php:199
374
  msgid "Norwegian"
375
  msgstr ""
376
 
377
+ #: includes/core/permalink-manager-pro-functions.php:200
378
  msgid "Persian"
379
  msgstr ""
380
 
381
+ #: includes/core/permalink-manager-pro-functions.php:201
382
  msgid "Polish"
383
  msgstr ""
384
 
385
+ #: includes/core/permalink-manager-pro-functions.php:202
386
  msgid "Portuguese"
387
  msgstr ""
388
 
389
+ #: includes/core/permalink-manager-pro-functions.php:203
390
  msgid "Russian"
391
  msgstr ""
392
 
393
+ #: includes/core/permalink-manager-pro-functions.php:204
394
  msgid "Spanish"
395
  msgstr ""
396
 
397
+ #: includes/core/permalink-manager-pro-functions.php:205
398
  msgid "Swedish"
399
  msgstr ""
400
 
401
+ #: includes/core/permalink-manager-pro-functions.php:206
402
  msgid "Turkish"
403
  msgstr ""
404
 
405
+ #: includes/core/permalink-manager-pro-functions.php:488
406
  msgid "Coupon Link"
407
  msgstr ""
408
 
409
+ #: includes/core/permalink-manager-pro-functions.php:509
410
  msgid "Coupon URI"
411
  msgstr ""
412
 
413
+ #: includes/core/permalink-manager-pro-functions.php:510
414
  msgid ""
415
  "The URIs are case-insensitive, eg. <strong>BLACKFRIDAY</strong> and <strong>"
416
  "blackfriday</strong> are equivalent."
417
  msgstr ""
418
 
419
+ #: includes/core/permalink-manager-pro-functions.php:521
420
  msgid "Coupon Full URL"
421
  msgstr ""
422
 
424
  msgid "The settings are saved!"
425
  msgstr ""
426
 
427
+ #: includes/core/permalink-manager-actions.php:367
428
  #, php-format
429
  msgid "%d Custom URIs and %d Custom Redirects were removed!"
430
  msgstr ""
431
 
432
+ #: includes/core/permalink-manager-actions.php:369
433
  msgid "No Custom URIs or Custom Redirects were removed!"
434
  msgstr ""
435
 
436
+ #: includes/core/permalink-manager-actions.php:381
437
  msgid "You are not allowed to remove Permalink Manager data!"
438
  msgstr ""
439
 
440
+ #: includes/core/permalink-manager-actions.php:387
441
  msgid "Custom permalinks"
442
  msgstr ""
443
 
444
+ #: includes/core/permalink-manager-actions.php:391
445
  msgid "Custom redirects"
446
  msgstr ""
447
 
448
+ #: includes/core/permalink-manager-actions.php:395
449
  msgid "External redirects"
450
  msgstr ""
451
 
452
+ #: includes/core/permalink-manager-actions.php:414
453
  #, php-format
454
  msgid "%s were removed!"
455
  msgstr ""
456
 
457
+ #: includes/core/permalink-manager-actions.php:555
458
  #, php-format
459
  msgid "URI \"%s\" was removed successfully!"
460
  msgstr ""
461
 
462
+ #: includes/core/permalink-manager-actions.php:563
463
  msgid "Broken redirects were removed successfully!"
464
  msgstr ""
465
 
466
+ #: includes/core/permalink-manager-actions.php:567
467
  msgid "URI and/or custom redirects does not exist or were already removed!"
468
  msgstr ""
469
 
470
+ #: includes/core/permalink-manager-actions.php:587
471
  msgid "The redirect was removed successfully!"
472
  msgstr ""
473
 
474
+ #: includes/core/permalink-manager-actions.php:617
475
  msgid "URI is already in use, please select another one!"
476
  msgstr ""
477
 
478
+ #: includes/core/permalink-manager-actions.php:649
479
  msgid "Sitemaps were updated!"
480
  msgstr ""
481
 
499
  msgid "WooCommerce"
500
  msgstr ""
501
 
502
+ #: includes/views/permalink-manager-permastructs.php:74
503
+ #: includes/views/permalink-manager-pro-addons.php:188
504
+ #: includes/views/permalink-manager-pro-addons.php:221
505
  msgid "Instructions"
506
  msgstr ""
507
 
508
+ #: includes/views/permalink-manager-permastructs.php:75
509
  #, php-format
510
  msgid ""
511
  "The current permastructures settings will be applied <strong>only to the new "
514
  "href=\"%s\">here</a>."
515
  msgstr ""
516
 
517
+ #: includes/views/permalink-manager-permastructs.php:77
518
  msgid "Permastructure tags"
519
  msgstr ""
520
 
521
+ #: includes/views/permalink-manager-permastructs.php:78
522
  #, php-format
523
  msgid ""
524
  "All allowed <a href=\"%s\" target=\"_blank\">permastructure tags</a> are "
526
  "post types or taxonomies."
527
  msgstr ""
528
 
529
+ #: includes/views/permalink-manager-permastructs.php:81
530
  msgid "Save permastructures"
531
  msgstr ""
532
 
587
  msgid "Filter"
588
  msgstr ""
589
 
590
+ #: includes/views/permalink-manager-pro-addons.php:99
591
  msgid "Support"
592
  msgstr ""
593
 
594
+ #: includes/views/permalink-manager-pro-addons.php:126
595
  msgid "Licence"
596
  msgstr ""
597
 
598
+ #: includes/views/permalink-manager-pro-addons.php:132
599
  msgid "Licence key"
600
  msgstr ""
601
 
602
+ #: includes/views/permalink-manager-pro-addons.php:133
603
  msgid "Check the expiration date."
604
  msgstr ""
605
 
606
+ #: includes/views/permalink-manager-pro-addons.php:157
607
  msgid "-- Use predefined words list --"
608
  msgstr ""
609
 
610
+ #: includes/views/permalink-manager-pro-addons.php:160
611
  msgid "Remove all words"
612
  msgstr ""
613
 
614
+ #: includes/views/permalink-manager-pro-addons.php:162
615
  msgid "Add the words from the list"
616
  msgstr ""
617
 
618
+ #: includes/views/permalink-manager-pro-addons.php:170
619
  msgid "Enable \"stop words\""
620
  msgstr ""
621
 
622
+ #: includes/views/permalink-manager-pro-addons.php:176
623
  msgid "\"Stop words\" list"
624
  msgstr ""
625
 
626
+ #: includes/views/permalink-manager-pro-addons.php:180
627
  msgid "Type comma to separate the words."
628
  msgstr ""
629
 
630
+ #: includes/views/permalink-manager-pro-addons.php:189
631
  msgid ""
632
  "If enabled, all selected \"stop words\" will be automatically removed from "
633
  "default URIs."
634
  msgstr ""
635
 
636
+ #: includes/views/permalink-manager-pro-addons.php:190
637
  msgid ""
638
  "Each of the words can be removed and any new words can be added to the list. "
639
  "You can also use a predefined list (available in 21 languages)."
640
  msgstr ""
641
 
642
+ #: includes/views/permalink-manager-pro-addons.php:192
643
  msgid "Save"
644
  msgstr ""
645
 
646
+ #: includes/views/permalink-manager-pro-addons.php:212
647
  #: includes/views/permalink-manager-tools.php:34
648
  msgid "Custom Permalinks"
649
  msgstr ""
650
 
651
+ #: includes/views/permalink-manager-pro-addons.php:213
652
  msgid "Deactivate after import"
653
  msgstr ""
654
 
655
+ #: includes/views/permalink-manager-pro-addons.php:216
656
  msgid ""
657
  "If selected, \"Custom Permalinks\" plugin will be deactivated after its "
658
  "custom URIs are imported."
659
  msgstr ""
660
 
661
+ #: includes/views/permalink-manager-pro-addons.php:222
662
  msgid ""
663
  "Please note that \"Custom Permalinks\" (if activated) may break the behavior "
664
  "of this plugin."
665
  msgstr ""
666
 
667
+ #: includes/views/permalink-manager-pro-addons.php:223
668
  msgid ""
669
  "Therefore, it is recommended to disable \"Custom Permalink\" and import old "
670
  "permalinks before using Permalink Manager Pro."
671
  msgstr ""
672
 
673
+ #: includes/views/permalink-manager-pro-addons.php:228
674
  #, php-format
675
  msgid "Import %d URIs"
676
  msgstr ""
677
 
678
+ #: includes/views/permalink-manager-pro-addons.php:233
679
  msgid "No custom URIs to import"
680
  msgstr ""
681
 
682
+ #: includes/views/permalink-manager-pro-addons.php:246
683
  msgid "Technical support"
684
  msgstr ""
685
 
686
+ #: includes/views/permalink-manager-pro-addons.php:247
687
  #, php-format
688
  msgid ""
689
  "To find the answers on frequently asked questions and information about how "
691
  "Base</strong> using <a target=\"_blank\" href=\"%s\">this link</a>."
692
  msgstr ""
693
 
694
+ #: includes/views/permalink-manager-pro-addons.php:248
695
  msgid ""
696
  "If you still did not find the answer to your question, please send us your "
697
  "question or a detailed description of your problem/issue to <a href=\"mailto:"
698
  "support@permalinkmanager.pro\">support@permalinkmanager.pro</a>."
699
  msgstr ""
700
 
701
+ #: includes/views/permalink-manager-pro-addons.php:249
702
  msgid ""
703
  "To reduce the response time, please attach your licence key and if possible "
704
  "also: URL address of your website and screenshots explaining the issue."
705
  msgstr ""
706
 
707
+ #: includes/views/permalink-manager-pro-addons.php:251
708
  msgid "Suggestions/feedback"
709
  msgstr ""
710
 
711
+ #: includes/views/permalink-manager-pro-addons.php:252
712
  msgid ""
713
  "If you would like to suggest a new functionality or leave us feedback, we "
714
  "are open to all new ideas and would be grateful for all your comments!"
715
  msgstr ""
716
 
717
+ #: includes/views/permalink-manager-pro-addons.php:253
718
  msgid ""
719
  " Please send your remarks to <a href=\"mailto:contact@permalinkmanager.pro\">"
720
  "contact@permalinkmanager.pro</a>."
721
  msgstr ""
722
 
723
+ #: includes/views/permalink-manager-pro-addons.php:268
724
  msgid "Extra redirects (aliases)"
725
  msgstr ""
726
 
727
+ #: includes/views/permalink-manager-pro-addons.php:269
728
  msgid ""
729
  "All URIs specified below will redirect the visitors to the custom URI "
730
  "defined above in \"Current URI\" field."
731
  msgstr ""
732
 
733
+ #: includes/views/permalink-manager-pro-addons.php:275
734
  msgid "sample/custom-uri"
735
  msgstr ""
736
 
737
+ #: includes/views/permalink-manager-pro-addons.php:292
738
  msgid "Add new redirect"
739
  msgstr ""
740
 
741
+ #: includes/views/permalink-manager-pro-addons.php:297
742
  #, php-format
743
  msgid ""
744
  "<strong>Please use URIs only!</strong><br />For instance, to set-up a "
745
  "redirect for <code>%s/old-uri</code> please use <code>old-uri</code>."
746
  msgstr ""
747
 
748
+ #: includes/views/permalink-manager-pro-addons.php:306
749
  msgid "Redirect this page to external URL"
750
  msgstr ""
751
 
752
+ #: includes/views/permalink-manager-pro-addons.php:307
753
  msgid ""
754
  "If not empty, the visitors trying to access this page will be redirected to "
755
  "the URL specified below."
756
  msgstr ""
757
 
758
+ #: includes/views/permalink-manager-pro-addons.php:311
759
  msgid "http://another-website.com/final-target-url"
760
  msgstr ""
761
 
762
+ #: includes/views/permalink-manager-pro-addons.php:315
763
  msgid ""
764
  "<strong>Please use full URLs!</strong><br />For instance, <code>http:"
765
  "//another-website.com/final-target-url</code>."
893
  " custom permalinks set with Permalink Manager."
894
  msgstr ""
895
 
896
+ #: includes/views/permalink-manager-settings.php:79
897
  msgid "Old slug redirect"
898
  msgstr ""
899
 
900
+ #: includes/views/permalink-manager-settings.php:82
901
  msgid ""
902
  "<strong>Old slug redirect is used by WordPress to provide a fallback for old "
903
  "version of slugs after they are changed.</strong>"
904
  msgstr ""
905
 
906
+ #: includes/views/permalink-manager-settings.php:83
907
  msgid ""
908
  "If enabled, the visitors trying to access the URL with the old slug will be "
909
  "redirected to the canonical permalink."
910
  msgstr ""
911
 
912
+ #: includes/views/permalink-manager-settings.php:89
913
  msgid "Enhanced redirect"
914
  msgstr ""
915
 
916
+ #: includes/views/permalink-manager-settings.php:95
917
  msgid "Redirect mode"
918
  msgstr ""
919
 
920
+ #: includes/views/permalink-manager-settings.php:97
921
  msgid "Disable (Permalink Manager redirect functions)"
922
  msgstr ""
923
 
924
+ #: includes/views/permalink-manager-settings.php:97
925
  msgid "301 redirect"
926
  msgstr ""
927
 
928
+ #: includes/views/permalink-manager-settings.php:97
929
  msgid "302 redirect"
930
  msgstr ""
931
 
932
+ #: includes/views/permalink-manager-settings.php:99
933
  msgid ""
934
  "<strong>Permalink Manager includes a set of hooks that allow to extend the "
935
  "redirect functions used natively by WordPress to avoid 404 errors.</strong>"
936
  msgstr ""
937
 
938
+ #: includes/views/permalink-manager-settings.php:100
939
  msgid ""
940
  "You can disable this feature if you do not want Permalink Manager to trigger "
941
  "any additional redirect functions at all."
942
  msgstr ""
943
 
944
+ #: includes/views/permalink-manager-settings.php:105
945
  msgid "Old custom permalinks redirect"
946
  msgstr ""
947
 
948
+ #: includes/views/permalink-manager-settings.php:110
949
  msgid ""
950
  "<strong>Permalink Manager can automatically set-up extra redirects after the "
951
  "custom permalink is changed.</strong>"
952
  msgstr ""
953
 
954
+ #: includes/views/permalink-manager-settings.php:111
955
  msgid ""
956
  "If enabled, Permalink Manage will add redirect for earlier version of custom "
957
  "permalink after you change it (eg. with URI Editor or Regenerate/reset tool)."
958
  msgstr ""
959
 
960
+ #: includes/views/permalink-manager-settings.php:112
961
  msgid ""
962
  "You can disable this feature if you use another plugin for redirects, eg. "
963
  "Yoast SEO Premium or Redirection."
964
  msgstr ""
965
 
966
+ #: includes/views/permalink-manager-settings.php:117
967
  msgid "Force HTTPS/WWW"
968
  msgstr ""
969
 
970
+ #: includes/views/permalink-manager-settings.php:120
971
  msgid ""
972
  "<strong>You can use Permalink Manager to force SSL or \"www\" prefix in "
973
  "WordPress permalinks.</strong>"
974
  msgstr ""
975
 
976
+ #: includes/views/permalink-manager-settings.php:121
977
  msgid "Please disable it if you encounter any redirect loop issues."
978
  msgstr ""
979
 
980
+ #: includes/views/permalink-manager-settings.php:126
981
  msgid "Trailing slashes redirect"
982
  msgstr ""
983
 
984
+ #: includes/views/permalink-manager-settings.php:129
985
  msgid ""
986
  "<strong>Permalink Manager can force the trailing slashes settings in the "
987
  "custom permalinks with redirect.</strong>"
988
  msgstr ""
989
 
990
+ #: includes/views/permalink-manager-settings.php:135
991
  msgid "Third party plugins"
992
  msgstr ""
993
 
994
+ #: includes/views/permalink-manager-settings.php:141
995
  msgid "WPML/Polylang language mismatch"
996
  msgstr ""
997
 
998
+ #: includes/views/permalink-manager-settings.php:143
999
  msgid ""
1000
  "If enabled, the plugin will load the adjacent translation of post when the "
1001
  "custom permalink is detected, but the language code in the URL does not "
1002
  "match the language code assigned to the post/term."
1003
  msgstr ""
1004
 
1005
+ #: includes/views/permalink-manager-settings.php:147
1006
  msgid "WP All Import support"
1007
  msgstr ""
1008
 
1009
+ #: includes/views/permalink-manager-settings.php:149
 
 
 
 
 
 
 
 
 
 
1010
  msgid ""
1011
+ "If checked, the custom permalinks will not be saved for the posts imported "
1012
+ "with Wp All Import plugin."
1013
  msgstr ""
1014
 
1015
+ #: includes/views/permalink-manager-settings.php:153
1016
  msgid "Breadcrumbs support"
1017
  msgstr ""
1018
 
1019
+ #: includes/views/permalink-manager-settings.php:155
1020
  msgid ""
1021
+ "If checked, the HTML breadcrumbs will be filtered by Permalink Manager to "
1022
  "mimic the current URL structure.<br />Works with: <strong>WooCommerce, Yoast "
1023
  "SEO, RankMath and SEOPress</strong> breadcrumbs."
1024
  msgstr ""
1025
 
1026
+ #: includes/views/permalink-manager-settings.php:159
1027
  msgid "Excluded content types"
1028
  msgstr ""
1029
 
1030
+ #: includes/views/permalink-manager-settings.php:161
1031
  msgid ""
1032
  "Permalink Manager will ignore and not filter the custom permalinks of all "
1033
  "selected above post types & taxonomies."
1034
  msgstr ""
1035
 
1036
+ #: includes/views/permalink-manager-settings.php:166
1037
  msgid "Advanced settings"
1038
  msgstr ""
1039
 
1040
+ #: includes/views/permalink-manager-settings.php:172
1041
  msgid "Show \"Native slug\" field"
1042
  msgstr ""
1043
 
1044
+ #: includes/views/permalink-manager-settings.php:174
1045
  msgid ""
1046
  "If enabled, it would be possible to edit the native slug via URI Editor on "
1047
  "single post/term edit page."
1048
  msgstr ""
1049
 
1050
+ #: includes/views/permalink-manager-settings.php:178
1051
  msgid "Force 404 on non-existing pagination pages"
1052
  msgstr ""
1053
 
1054
+ #: includes/views/permalink-manager-settings.php:180
1055
  msgid ""
1056
  "If enabled, the non-existing pagination pages (for single posts) will return "
1057
  "404 (\"Not Found\") error.<br /><strong>Please disable it, if you encounter "
1058
  "any problems with pagination pages or use custom pagination system.</strong>"
1059
  msgstr ""
1060
 
1061
+ #: includes/views/permalink-manager-settings.php:184
1062
  msgid "Strip special characters"
1063
  msgstr ""
1064
 
1065
+ #: includes/views/permalink-manager-settings.php:186
1066
+ #: includes/views/permalink-manager-settings.php:193
1067
  msgid "Yes, use native settings"
1068
  msgstr ""
1069
 
1070
+ #: includes/views/permalink-manager-settings.php:186
1071
  msgid "No, keep special characters (.,|_+) in the slugs"
1072
  msgstr ""
1073
 
1074
+ #: includes/views/permalink-manager-settings.php:187
1075
  msgid ""
1076
  "If enabled only alphanumeric characters, underscores and dashes will be "
1077
  "allowed for post/term slugs."
1078
  msgstr ""
1079
 
1080
+ #: includes/views/permalink-manager-settings.php:191
1081
  msgid "Convert accented letters"
1082
  msgstr ""
1083
 
1084
+ #: includes/views/permalink-manager-settings.php:193
1085
  msgid "No, keep accented letters in the slugs"
1086
  msgstr ""
1087
 
1088
+ #: includes/views/permalink-manager-settings.php:194
1089
  msgid ""
1090
  "If enabled, all the accented letters will be replaced with their non-"
1091
  "accented equivalent (eg. Å => A, Æ => AE, Ø => O, Ć => C)."
1092
  msgstr ""
1093
 
1094
+ #: includes/views/permalink-manager-settings.php:198
1095
  msgid "URI Editor role capability"
1096
  msgstr ""
1097
 
1098
+ #: includes/views/permalink-manager-settings.php:199
1099
  msgid "Administrator (edit_theme_options)"
1100
  msgstr ""
1101
 
1102
+ #: includes/views/permalink-manager-settings.php:199
1103
  msgid "Editor (publish_pages)"
1104
  msgstr ""
1105
 
1106
+ #: includes/views/permalink-manager-settings.php:199
1107
  msgid "Author (publish_posts)"
1108
  msgstr ""
1109
 
1110
+ #: includes/views/permalink-manager-settings.php:199
1111
  msgid "Contributor (edit_posts)"
1112
  msgstr ""
1113
 
1114
+ #: includes/views/permalink-manager-settings.php:200
1115
  #, php-format
1116
  msgid ""
1117
  "Only the users who have selected capability will be able to access URI "
1119
  "be found here</a>."
1120
  msgstr ""
1121
 
1122
+ #: includes/views/permalink-manager-settings.php:204
1123
  msgid "Automatically fix broken URIs"
1124
  msgstr ""
1125
 
1126
+ #: includes/views/permalink-manager-settings.php:206
1127
  msgid "Disable"
1128
  msgstr ""
1129
 
1130
+ #: includes/views/permalink-manager-settings.php:206
1131
  msgid "Fix URIs individually (during page load)"
1132
  msgstr ""
1133
 
1134
+ #: includes/views/permalink-manager-settings.php:206
1135
  msgid "Bulk fix all URIs (once a day, in the background)"
1136
  msgstr ""
1137
 
1138
+ #: includes/views/permalink-manager-settings.php:208
1139
  msgid ""
1140
  "Enable this option if you would like to automatically remove redundant "
1141
  "permalinks & duplicated redirects."
1142
  msgstr ""
1143
 
1144
+ #: includes/views/permalink-manager-settings.php:215
1145
  msgid "Save settings"
1146
  msgstr ""
1147
 
permalink-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Permalink Manager Lite
5
  * Plugin URI: https://permalinkmanager.pro?utm_source=plugin
6
  * Description: Advanced plugin that allows to set-up custom permalinks (bulk editors included), slugs and permastructures (WooCommerce compatible).
7
- * Version: 2.2.9.2.1
8
  * Author: Maciej Bis
9
  * Author URI: http://maciejbis.net/
10
  * License: GPL-2.0+
@@ -12,7 +12,7 @@
12
  * Text Domain: permalink-manager
13
  * Domain Path: /languages
14
  * WC requires at least: 3.0.0
15
- * WC tested up to: 4.7.0
16
  */
17
 
18
  // If this file is called directly or plugin is already defined, abort.
@@ -25,7 +25,7 @@ if(!class_exists('Permalink_Manager_Class')) {
25
  // Define the directories used to load plugin files.
26
  define( 'PERMALINK_MANAGER_PLUGIN_NAME', 'Permalink Manager' );
27
  define( 'PERMALINK_MANAGER_PLUGIN_SLUG', 'permalink-manager' );
28
- define( 'PERMALINK_MANAGER_VERSION', '2.2.9.2.1' );
29
  define( 'PERMALINK_MANAGER_FILE', __FILE__ );
30
  define( 'PERMALINK_MANAGER_DIR', untrailingslashit(dirname(__FILE__)) );
31
  define( 'PERMALINK_MANAGER_BASENAME', plugin_basename(__FILE__));
@@ -170,8 +170,7 @@ if(!class_exists('Permalink_Manager_Class')) {
170
  'trailing_slash_redirect' => 0,
171
  'auto_remove_duplicates' => 1,
172
  'fix_language_mismatch' => 1,
173
- 'pmxi_support' => 1,
174
- 'um_support' => 1,
175
  'yoast_breadcrumbs' => 0,
176
  'force_custom_slugs' => 0,
177
  'disable_slug_sanitization' => 0,
@@ -202,18 +201,18 @@ if(!class_exists('Permalink_Manager_Class')) {
202
  */
203
  public function default_alerts($alerts) {
204
  $default_alerts = apply_filters('permalink_manager_default_alerts', array(
205
- 'jan20promo' => array(
206
  'txt' => sprintf(
207
  __("Get access to extra features: full taxonomy and WooCommerce support, possibility to use custom fields inside the permalinks and more!<br /><strong>Buy Permalink Manager Pro <a href=\"%s\" target=\"_blank\">here</a> and save %s using \"%s\" coupon code!</strong> Valid until %s!", "permalink-manager"),
208
  PERMALINK_MANAGER_WEBSITE . "&utm_campaign=discount_code",
209
- '20&#37;',
210
- 'JAN20',
211
- '30.01'
212
  ),
213
  'type' => 'notice-info',
214
  'show' => 'pro_hide',
215
  'plugin_only' => true,
216
- 'until' => '2020-01-31'
217
  )
218
  ));
219
 
@@ -247,20 +246,12 @@ if(!class_exists('Permalink_Manager_Class')) {
247
 
248
  // Separate "Trailing slashes" & "Trailing slashes redirect" setting fields
249
  if(!empty($permalink_manager_options['general']['trailing_slashes']) && $permalink_manager_options['general']['trailing_slashes'] >= 10) {
250
- $permalink_manager_unfiltered_options = (!empty($permalink_manager_unfiltered_options)) ? $permalink_manager_unfiltered_options : $permalink_manager_options;
251
 
252
  $permalink_manager_unfiltered_options['general']['trailing_slashes_redirect'] = 1;
253
  $permalink_manager_unfiltered_options['general']['trailing_slashes'] = ($permalink_manager_options['general']['trailing_slashes'] == 10) ? 1 : 2;
254
  }
255
 
256
- // Make WP All Import setting more logi
257
- if(isset($permalink_manager_options['general']['pmxi_import_support'])) {
258
- $permalink_manager_unfiltered_options = (!empty($permalink_manager_unfiltered_options)) ? $permalink_manager_unfiltered_options : $permalink_manager_options;
259
-
260
- $permalink_manager_unfiltered_options['general']['pmxi_support'] = (empty($permalink_manager_options['general']['pmxi_import_support'])) ? 1 : 0;
261
- unset($permalink_manager_unfiltered_options['general']['pmxi_import_support']);
262
- }
263
-
264
  // Save the settings in database
265
  if(!empty($permalink_manager_unfiltered_options)) {
266
  update_option('permalink-manager', $permalink_manager_unfiltered_options);
4
  * Plugin Name: Permalink Manager Lite
5
  * Plugin URI: https://permalinkmanager.pro?utm_source=plugin
6
  * Description: Advanced plugin that allows to set-up custom permalinks (bulk editors included), slugs and permastructures (WooCommerce compatible).
7
+ * Version: 2.2.9.2
8
  * Author: Maciej Bis
9
  * Author URI: http://maciejbis.net/
10
  * License: GPL-2.0+
12
  * Text Domain: permalink-manager
13
  * Domain Path: /languages
14
  * WC requires at least: 3.0.0
15
+ * WC tested up to: 4.6.2
16
  */
17
 
18
  // If this file is called directly or plugin is already defined, abort.
25
  // Define the directories used to load plugin files.
26
  define( 'PERMALINK_MANAGER_PLUGIN_NAME', 'Permalink Manager' );
27
  define( 'PERMALINK_MANAGER_PLUGIN_SLUG', 'permalink-manager' );
28
+ define( 'PERMALINK_MANAGER_VERSION', '2.2.9.2' );
29
  define( 'PERMALINK_MANAGER_FILE', __FILE__ );
30
  define( 'PERMALINK_MANAGER_DIR', untrailingslashit(dirname(__FILE__)) );
31
  define( 'PERMALINK_MANAGER_BASENAME', plugin_basename(__FILE__));
170
  'trailing_slash_redirect' => 0,
171
  'auto_remove_duplicates' => 1,
172
  'fix_language_mismatch' => 1,
173
+ 'pmxi_import_support' => 0,
 
174
  'yoast_breadcrumbs' => 0,
175
  'force_custom_slugs' => 0,
176
  'disable_slug_sanitization' => 0,
201
  */
202
  public function default_alerts($alerts) {
203
  $default_alerts = apply_filters('permalink_manager_default_alerts', array(
204
+ 'blackf20promo' => array(
205
  'txt' => sprintf(
206
  __("Get access to extra features: full taxonomy and WooCommerce support, possibility to use custom fields inside the permalinks and more!<br /><strong>Buy Permalink Manager Pro <a href=\"%s\" target=\"_blank\">here</a> and save %s using \"%s\" coupon code!</strong> Valid until %s!", "permalink-manager"),
207
  PERMALINK_MANAGER_WEBSITE . "&utm_campaign=discount_code",
208
+ '25&#37;',
209
+ 'BLACKF20',
210
+ '30.11'
211
  ),
212
  'type' => 'notice-info',
213
  'show' => 'pro_hide',
214
  'plugin_only' => true,
215
+ 'until' => '2020-11-30'
216
  )
217
  ));
218
 
246
 
247
  // Separate "Trailing slashes" & "Trailing slashes redirect" setting fields
248
  if(!empty($permalink_manager_options['general']['trailing_slashes']) && $permalink_manager_options['general']['trailing_slashes'] >= 10) {
249
+ $permalink_manager_unfiltered_options = $permalink_manager_options;
250
 
251
  $permalink_manager_unfiltered_options['general']['trailing_slashes_redirect'] = 1;
252
  $permalink_manager_unfiltered_options['general']['trailing_slashes'] = ($permalink_manager_options['general']['trailing_slashes'] == 10) ? 1 : 2;
253
  }
254
 
 
 
 
 
 
 
 
 
255
  // Save the settings in database
256
  if(!empty($permalink_manager_unfiltered_options)) {
257
  update_option('permalink-manager', $permalink_manager_unfiltered_options);