SEOPress - Version 4.6.0.2

Version Description

  • FIX Custom capabilities
  • FIX WC undefined function in specific cases
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 4.6.0.2
Comparing to
See all releases

Code changes from version 4.6 to 4.6.0.2

readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
6
  Requires at least: 4.7+
7
  Tested up to: 5.7
8
  Requires PHP: 5.6
9
- Stable tag: 4.6.0
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -324,6 +324,11 @@ You're theme is probably using a deprecated function to handle the title. <a hre
324
  9. Schemas metabox
325
 
326
  == Changelog ==
 
 
 
 
 
327
  = 4.6 (29/04/2021) - https://www.seopress.org/blog/seopress-4-6/ =
328
  * NEW Custom capabilities 🎉 (SEO, Advanced, Security)
329
  * NEW Bricks compatibility with our content analysis feature
@@ -337,9 +342,9 @@ You're theme is probably using a deprecated function to handle the title. <a hre
337
  * NEW Add og:locale and og:locale:alternate support for WPML
338
  * NEW Option to disable content analysis metabox (SEO, Advanced, Advanced tab)
339
  * NEW "seopress_remove_category_base" hook to filter /category/ slug
340
- * NEW Hooks to filter manual schemas:
341
- * seopress_get_json_data_organization
342
- * seopress_get_json_data_image
343
  * seopress_get_json_data_contact_point
344
  * seopress_pro_get_json_data_author
345
  * seopress_pro_get_json_data_article
6
  Requires at least: 4.7+
7
  Tested up to: 5.7
8
  Requires PHP: 5.6
9
+ Stable tag: 4.6.0.2
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
324
  9. Schemas metabox
325
 
326
  == Changelog ==
327
+ = 4.6.0.2 =
328
+ * FIX Custom capabilities
329
+ * FIX WC undefined function in specific cases
330
+ = 4.6.0.1 =
331
+ * FIX Fatal error
332
  = 4.6 (29/04/2021) - https://www.seopress.org/blog/seopress-4-6/ =
333
  * NEW Custom capabilities 🎉 (SEO, Advanced, Security)
334
  * NEW Bricks compatibility with our content analysis feature
342
  * NEW Add og:locale and og:locale:alternate support for WPML
343
  * NEW Option to disable content analysis metabox (SEO, Advanced, Advanced tab)
344
  * NEW "seopress_remove_category_base" hook to filter /category/ slug
345
+ * NEW Hooks to filter manual schemas:
346
+ * seopress_get_json_data_organization
347
+ * seopress_get_json_data_image
348
  * seopress_get_json_data_contact_point
349
  * seopress_pro_get_json_data_author
350
  * seopress_pro_get_json_data_article
seopress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
  Author: SEOPress
7
- Version: 4.6.0
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
10
  Text Domain: wp-seopress
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
- define('SEOPRESS_VERSION', '4.6.0');
59
  define('SEOPRESS_AUTHOR', 'Benjamin Denis');
60
  define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
61
  define('SEOPRESS_TEMPLATE_DIR', SEOPRESS_PLUGIN_DIR_PATH . 'templates');
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
  Author: SEOPress
7
+ Version: 4.6.0.2
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
10
  Text Domain: wp-seopress
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
+ define('SEOPRESS_VERSION', '4.6.0.2');
59
  define('SEOPRESS_AUTHOR', 'Benjamin Denis');
60
  define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
61
  define('SEOPRESS_TEMPLATE_DIR', SEOPRESS_PLUGIN_DIR_PATH . 'templates');
src/Helpers/PagesAdmin.php CHANGED
@@ -52,25 +52,21 @@ abstract class PagesAdmin {
52
  */
53
  public static function getCapabilityByPage($page) {
54
  switch ($page) {
55
- case 'titles-metas':
56
  return self::TITLE_METAS;
57
- case 'xml-html-sitemap':
58
  return self::XML_HTML_SITEMAP;
59
- case 'social-networks':
60
  return self::SOCIAL_NETWORKS;
61
- case 'analytics':
62
  return self::ANALYTICS;
63
- case 'tools':
64
  return self::TOOLS;
65
- case 'pro':
66
  return self::PRO;
67
- case 'advanced':
68
  return self::ADVANCED;
69
- case 'schemas':
70
- return self::SCHEMAS;
71
- case 'license':
72
- return self::LICENSE;
73
- case 'bot':
74
  return self::BOT;
75
  default:
76
  return apply_filters('seopress_get_capability_by_page', null);
@@ -87,25 +83,21 @@ abstract class PagesAdmin {
87
  public static function getPageByCapability($capability) {
88
  switch ($capability) {
89
  case self::TITLE_METAS:
90
- return 'titles-metas';
91
  case self::XML_HTML_SITEMAP:
92
- return 'xml-html-sitemap';
93
  case self::SOCIAL_NETWORKS:
94
- return 'social-networks';
95
  case self::ANALYTICS:
96
- return 'analytics';
97
  case self::TOOLS:
98
- return 'tools';
99
  case self::PRO:
100
- return 'pro';
101
  case self::ADVANCED:
102
- return 'advanced';
103
- case self::SCHEMAS:
104
- return 'schemas';
105
- case self::LICENSE:
106
- return 'license';
107
  case self::BOT:
108
- return 'bot';
109
  default:
110
  return apply_filters('seopress_get_page_by_capability', null);
111
  }
52
  */
53
  public static function getCapabilityByPage($page) {
54
  switch ($page) {
55
+ case 'seopress-titles':
56
  return self::TITLE_METAS;
57
+ case 'seopress-xml-sitemap':
58
  return self::XML_HTML_SITEMAP;
59
+ case 'seopress-social':
60
  return self::SOCIAL_NETWORKS;
61
+ case 'seopress-google-analytics':
62
  return self::ANALYTICS;
63
+ case 'seopress-import-export':
64
  return self::TOOLS;
65
+ case 'seopress-pro-page':
66
  return self::PRO;
67
+ case 'seopress-advanced':
68
  return self::ADVANCED;
69
+ case 'seopress-bot-batch':
 
 
 
 
70
  return self::BOT;
71
  default:
72
  return apply_filters('seopress_get_capability_by_page', null);
83
  public static function getPageByCapability($capability) {
84
  switch ($capability) {
85
  case self::TITLE_METAS:
86
+ return 'seopress-titles';
87
  case self::XML_HTML_SITEMAP:
88
+ return 'seopress-xml-sitemap';
89
  case self::SOCIAL_NETWORKS:
90
+ return 'seopress-social';
91
  case self::ANALYTICS:
92
+ return 'seopress-google-analytics';
93
  case self::TOOLS:
94
+ return 'seopress-import-export';
95
  case self::PRO:
96
+ return 'seopress-pro-page';
97
  case self::ADVANCED:
98
+ return 'seopress-advanced';
 
 
 
 
99
  case self::BOT:
100
+ return 'seopress-bot-batch';
101
  default:
102
  return apply_filters('seopress_get_page_by_capability', null);
103
  }
src/Services/Settings/Roles/SectionPagesSEOPress.php CHANGED
@@ -31,8 +31,8 @@ class SectionPagesSEOPress {
31
  $nameKey = \sprintf('%s_%s', 'seopress_advanced_security_metaboxe', $keySettings);
32
  $dataOptions = isset($options[$nameKey]) ? $options[$nameKey] : [];
33
 
34
- if ($uniqueKey ==='titles-metas_editor') { ?>
35
- <p class="description"><?php _e('Check a user role to authorized it to edit a specific SEO page.','wp-seopress'); ?></p><br>
36
  <?php } ?>
37
 
38
  <div>
@@ -83,8 +83,13 @@ class SectionPagesSEOPress {
83
  $menus = $submenu['seopress-option'];
84
 
85
  foreach ($menus as $key => $item) {
86
- $keyClean = sanitize_title($item[0]);
87
- if (in_array($keyClean, ['dashboard', 'license', 'schemas', 'redirections', 'broken-links'])) {
 
 
 
 
 
88
  continue;
89
  }
90
 
31
  $nameKey = \sprintf('%s_%s', 'seopress_advanced_security_metaboxe', $keySettings);
32
  $dataOptions = isset($options[$nameKey]) ? $options[$nameKey] : [];
33
 
34
+ if ('titles-metas_editor' === $uniqueKey) { ?>
35
+ <p class="description"><?php _e('Check a user role to authorized it to edit a specific SEO page.', 'wp-seopress'); ?></p><br>
36
  <?php } ?>
37
 
38
  <div>
83
  $menus = $submenu['seopress-option'];
84
 
85
  foreach ($menus as $key => $item) {
86
+ $keyClean = $item[2];
87
+ if (in_array($item[2], [
88
+ 'seopress-option', // dashboard
89
+ 'seopress-license',
90
+ 'edit.php?post_type=seopress_schemas',
91
+ 'edit.php?post_type=seopress_404',
92
+ 'edit.php?post_type=seopress_bot', ])) {
93
  continue;
94
  }
95
 
vendor/composer/InstalledVersions.php CHANGED
@@ -29,7 +29,7 @@ private static $installed = array (
29
  'aliases' =>
30
  array (
31
  ),
32
- 'reference' => 'bac938ec140774dc85619653326f0113c7489f1b',
33
  'name' => 'wp-seopress/wp-seopress',
34
  ),
35
  'versions' =>
@@ -41,7 +41,7 @@ private static $installed = array (
41
  'aliases' =>
42
  array (
43
  ),
44
- 'reference' => 'bac938ec140774dc85619653326f0113c7489f1b',
45
  ),
46
  ),
47
  );
29
  'aliases' =>
30
  array (
31
  ),
32
+ 'reference' => '34b18a17d6e9e3834b81cbe95984b8963a75bd5b',
33
  'name' => 'wp-seopress/wp-seopress',
34
  ),
35
  'versions' =>
41
  'aliases' =>
42
  array (
43
  ),
44
+ 'reference' => '34b18a17d6e9e3834b81cbe95984b8963a75bd5b',
45
  ),
46
  ),
47
  );
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => 'bac938ec140774dc85619653326f0113c7489f1b',
10
  'name' => 'wp-seopress/wp-seopress',
11
  ),
12
  'versions' =>
@@ -18,7 +18,7 @@
18
  'aliases' =>
19
  array (
20
  ),
21
- 'reference' => 'bac938ec140774dc85619653326f0113c7489f1b',
22
  ),
23
  ),
24
  );
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => '34b18a17d6e9e3834b81cbe95984b8963a75bd5b',
10
  'name' => 'wp-seopress/wp-seopress',
11
  ),
12
  'versions' =>
18
  'aliases' =>
19
  array (
20
  ),
21
+ 'reference' => '34b18a17d6e9e3834b81cbe95984b8963a75bd5b',
22
  ),
23
  ),
24
  );