Version Description
- INFO Label for breadcrumbs in Elementor
- FIX Elementor content analysis
- FIX Display incorrect information from admin bar
- FIX Warning: Use of undefined constant SEOPRESS_PRO_VERSION
Download this release
Release Info
Developer | rainbowgeek |
Plugin | SEOPress |
Version | 4.1.2 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.1.2
- inc/admin/admin-metaboxes.php +1 -1
- inc/admin/adminbar.php +45 -43
- inc/admin/ajax.php +10 -3
- inc/admin/page-builders/elementor/assets/js/base.js +3 -0
- inc/admin/page-builders/elementor/inc/admin/class-document-settings-section.php +7 -2
- inc/admin/page-builders/elementor/inc/admin/class-seopress-meta-helper.php +1 -0
- readme.txt +6 -1
- seopress.php +2 -2
inc/admin/admin-metaboxes.php
CHANGED
@@ -182,7 +182,7 @@ function seopress_display_seo_metaboxe() {
|
|
182 |
|
183 |
//Tagify
|
184 |
wp_enqueue_script( 'seopress-tagify-js', plugins_url( 'assets/js/tagify.min.js', dirname( dirname( __FILE__ ) ) ), [ 'jquery' ], SEOPRESS_VERSION, true );
|
185 |
-
wp_register_style('seopress-tagify', plugins_url('assets/css/tagify.min.css', dirname( dirname( __FILE__ ) ) ), [],
|
186 |
wp_enqueue_style('seopress-tagify');
|
187 |
|
188 |
//Register Google Snippet Preview / Content Analysis JS
|
182 |
|
183 |
//Tagify
|
184 |
wp_enqueue_script( 'seopress-tagify-js', plugins_url( 'assets/js/tagify.min.js', dirname( dirname( __FILE__ ) ) ), [ 'jquery' ], SEOPRESS_VERSION, true );
|
185 |
+
wp_register_style('seopress-tagify', plugins_url('assets/css/tagify.min.css', dirname( dirname( __FILE__ ) ) ), [], SEOPRESS_VERSION);
|
186 |
wp_enqueue_style('seopress-tagify');
|
187 |
|
188 |
//Register Google Snippet Preview / Content Analysis JS
|
inc/admin/adminbar.php
CHANGED
@@ -66,53 +66,55 @@ function seopress_admin_bar_links() {
|
|
66 |
|
67 |
//noindex/nofollow per CPT
|
68 |
if (function_exists('get_current_screen') && get_current_screen() != NULL) {
|
69 |
-
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
if (get_current_screen()->taxonomy) {
|
74 |
-
$noindex = isset($options['seopress_titles_single_titles'][get_current_screen()->taxonomy]['noindex']);
|
75 |
-
$nofollow = isset($options['seopress_titles_single_titles'][get_current_screen()->taxonomy]['nofollow']);
|
76 |
-
} else {
|
77 |
-
$noindex = isset($options['seopress_titles_single_titles'][get_current_screen()->post_type]['noindex']);
|
78 |
-
$nofollow = isset($options['seopress_titles_single_titles'][get_current_screen()->post_type]['nofollow']);
|
79 |
-
}
|
80 |
-
|
81 |
-
if (get_current_screen()->taxonomy) {
|
82 |
-
$robots .= '<span class="wrap-seopress-cpt-seo">'.sprintf(__('SEO for "%s"','wp-seopress'), get_current_screen()->taxonomy).'</span>';
|
83 |
-
} else {
|
84 |
-
$robots .= '<span class="wrap-seopress-cpt-seo">'.sprintf(__('SEO for "%s"','wp-seopress'), get_current_screen()->post_type).'</span>';
|
85 |
-
}
|
86 |
-
$robots .= '<span class="wrap-seopress-cpt-noindex">';
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
116 |
}
|
117 |
|
118 |
$wp_admin_bar->add_menu( array(
|
66 |
|
67 |
//noindex/nofollow per CPT
|
68 |
if (function_exists('get_current_screen') && get_current_screen() != NULL) {
|
69 |
+
if (get_current_screen()->post_type || get_current_screen()->taxonomy) {
|
70 |
+
$robots = '';
|
71 |
|
72 |
+
$options = get_option( 'seopress_titles_option_name' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
if (get_current_screen()->taxonomy) {
|
75 |
+
$noindex = isset($options['seopress_titles_single_titles'][get_current_screen()->taxonomy]['noindex']);
|
76 |
+
$nofollow = isset($options['seopress_titles_single_titles'][get_current_screen()->taxonomy]['nofollow']);
|
77 |
+
} else {
|
78 |
+
$noindex = isset($options['seopress_titles_single_titles'][get_current_screen()->post_type]['noindex']);
|
79 |
+
$nofollow = isset($options['seopress_titles_single_titles'][get_current_screen()->post_type]['nofollow']);
|
80 |
+
}
|
81 |
+
|
82 |
+
if (get_current_screen()->taxonomy) {
|
83 |
+
$robots .= '<span class="wrap-seopress-cpt-seo">'.sprintf(__('SEO for "%s"','wp-seopress'), get_current_screen()->taxonomy).'</span>';
|
84 |
+
} else {
|
85 |
+
$robots .= '<span class="wrap-seopress-cpt-seo">'.sprintf(__('SEO for "%s"','wp-seopress'), get_current_screen()->post_type).'</span>';
|
86 |
+
}
|
87 |
+
$robots .= '<span class="wrap-seopress-cpt-noindex">';
|
88 |
+
|
89 |
+
if ($noindex === true) {
|
90 |
+
$robots .= '<span class="ab-icon dashicons dashicons-marker on"></span>';
|
91 |
+
$robots .= __('noindex is on!', 'wp-seopress');
|
92 |
+
} else {
|
93 |
+
$robots .= '<span class="ab-icon dashicons dashicons-marker off"></span>';
|
94 |
+
$robots .= __('noindex is off.', 'wp-seopress');
|
95 |
+
}
|
96 |
+
|
97 |
+
$robots .= '</span>';
|
98 |
|
99 |
+
$robots .= '<span class="wrap-seopress-cpt-nofollow">';
|
100 |
+
|
101 |
+
if ($nofollow === true) {
|
102 |
+
$robots .= '<span class="ab-icon dashicons dashicons-marker on"></span>';
|
103 |
+
$robots .= __('nofollow is on!', 'wp-seopress');
|
104 |
+
} else {
|
105 |
+
$robots .= '<span class="ab-icon dashicons dashicons-marker off"></span>';
|
106 |
+
$robots .= __('nofollow is off.', 'wp-seopress');
|
107 |
+
}
|
108 |
+
|
109 |
+
$robots .= '</span>';
|
110 |
|
111 |
+
$wp_admin_bar->add_menu( array(
|
112 |
+
'parent' => 'seopress_custom_top_level',
|
113 |
+
'id' => 'seopress_custom_sub_menu_meta_robots',
|
114 |
+
'title' => $robots,
|
115 |
+
'href' => admin_url( 'admin.php?page=seopress-titles' ),
|
116 |
+
));
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
$wp_admin_bar->add_menu( array(
|
inc/admin/ajax.php
CHANGED
@@ -62,9 +62,16 @@ function seopress_do_real_preview() {
|
|
62 |
$data = [];
|
63 |
|
64 |
//Save Target KWs
|
65 |
-
if(isset($_GET['
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
//DOM
|
62 |
$data = [];
|
63 |
|
64 |
//Save Target KWs
|
65 |
+
if (!isset($_GET['is_elementor'])) {
|
66 |
+
if(isset($_GET['seopress_analysis_target_kw'])) {
|
67 |
+
delete_post_meta($seopress_get_the_id, '_seopress_analysis_target_kw');
|
68 |
+
update_post_meta($seopress_get_the_id, '_seopress_analysis_target_kw', sanitize_text_field($_GET['seopress_analysis_target_kw']));
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
//Fix Elementor
|
73 |
+
if (isset($_GET['is_elementor']) && $_GET['is_elementor'] == true) {
|
74 |
+
$_GET['seopress_analysis_target_kw'] = get_post_meta($seopress_get_the_id,'_seopress_analysis_target_kw',true);
|
75 |
}
|
76 |
|
77 |
//DOM
|
inc/admin/page-builders/elementor/assets/js/base.js
CHANGED
@@ -13,6 +13,7 @@ function googlePreview() {
|
|
13 |
origin: seopressElementorBase.origin,
|
14 |
post_type: seopressElementorBase.post_type,
|
15 |
seopress_analysis_target_kw: seopressElementorBase.keywords,
|
|
|
16 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
17 |
},
|
18 |
success: function(t) {
|
@@ -49,6 +50,7 @@ function socialPreview() {
|
|
49 |
origin: seopressElementorBase.origin,
|
50 |
post_type: seopressElementorBase.post_type,
|
51 |
seopress_analysis_target_kw: seopressElementorBase.keywords,
|
|
|
52 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
53 |
},
|
54 |
success: socialPreviewFillData
|
@@ -161,6 +163,7 @@ function contentAnalysis() {
|
|
161 |
origin: seopressElementorBase.origin,
|
162 |
post_type: seopressElementorBase.post_type,
|
163 |
seopress_analysis_target_kw: seopressElementorBase.keywords,
|
|
|
164 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
165 |
},
|
166 |
beforeSend: function() {
|
13 |
origin: seopressElementorBase.origin,
|
14 |
post_type: seopressElementorBase.post_type,
|
15 |
seopress_analysis_target_kw: seopressElementorBase.keywords,
|
16 |
+
is_elementor: seopressElementorBase.is_elementor,
|
17 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
18 |
},
|
19 |
success: function(t) {
|
50 |
origin: seopressElementorBase.origin,
|
51 |
post_type: seopressElementorBase.post_type,
|
52 |
seopress_analysis_target_kw: seopressElementorBase.keywords,
|
53 |
+
is_elementor: seopressElementorBase.is_elementor,
|
54 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
55 |
},
|
56 |
success: socialPreviewFillData
|
163 |
origin: seopressElementorBase.origin,
|
164 |
post_type: seopressElementorBase.post_type,
|
165 |
seopress_analysis_target_kw: seopressElementorBase.keywords,
|
166 |
+
is_elementor: seopressElementorBase.is_elementor,
|
167 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
168 |
},
|
169 |
beforeSend: function() {
|
inc/admin/page-builders/elementor/inc/admin/class-document-settings-section.php
CHANGED
@@ -46,6 +46,9 @@ class Document_Settings_Section {
|
|
46 |
$post_type = $post->post_type;
|
47 |
$origin = 'post';
|
48 |
$keywords = get_post_meta( $post_id, '_seopress_analysis_target_kw', true );
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
$seopress_real_preview = array(
|
@@ -56,7 +59,8 @@ class Document_Settings_Section {
|
|
56 |
'post_type' => $post_type,
|
57 |
'post_tax' => $term,
|
58 |
'origin' => $origin,
|
59 |
-
'keywords' => $keywords
|
|
|
60 |
);
|
61 |
|
62 |
wp_localize_script( 'seopress-elementor-base-script', 'seopressElementorBase', $seopress_real_preview );
|
@@ -292,7 +296,8 @@ class Document_Settings_Section {
|
|
292 |
$document->add_control(
|
293 |
'_seopress_robots_breadcrumbs',
|
294 |
[
|
295 |
-
'label' => __( '
|
|
|
296 |
'type' => \Elementor\Controls_Manager::TEXT,
|
297 |
'label_block' => true,
|
298 |
'separator' => 'none',
|
46 |
$post_type = $post->post_type;
|
47 |
$origin = 'post';
|
48 |
$keywords = get_post_meta( $post_id, '_seopress_analysis_target_kw', true );
|
49 |
+
if ( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
|
50 |
+
$is_elementor = true;
|
51 |
+
}
|
52 |
}
|
53 |
|
54 |
$seopress_real_preview = array(
|
59 |
'post_type' => $post_type,
|
60 |
'post_tax' => $term,
|
61 |
'origin' => $origin,
|
62 |
+
'keywords' => $keywords,
|
63 |
+
'is_elementor' => $is_elementor
|
64 |
);
|
65 |
|
66 |
wp_localize_script( 'seopress-elementor-base-script', 'seopressElementorBase', $seopress_real_preview );
|
296 |
$document->add_control(
|
297 |
'_seopress_robots_breadcrumbs',
|
298 |
[
|
299 |
+
'label' => __( 'Custom breadcrumbs', 'wp-seopress' ),
|
300 |
+
'description' => __( 'Enter a custom value, useful if your title is too long', 'wp-seopress' ),
|
301 |
'type' => \Elementor\Controls_Manager::TEXT,
|
302 |
'label_block' => true,
|
303 |
'separator' => 'none',
|
inc/admin/page-builders/elementor/inc/admin/class-seopress-meta-helper.php
CHANGED
@@ -26,6 +26,7 @@ class Seopress_Meta_Helper {
|
|
26 |
'_seopress_redirections_type',
|
27 |
'_seopress_redirections_value',
|
28 |
'_seopress_analysis_target_kw',
|
|
|
29 |
];
|
30 |
}
|
31 |
}
|
26 |
'_seopress_redirections_type',
|
27 |
'_seopress_redirections_value',
|
28 |
'_seopress_analysis_target_kw',
|
29 |
+
'_seopress_analysis_data',
|
30 |
];
|
31 |
}
|
32 |
}
|
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.5
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.1.
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -308,6 +308,11 @@ You're theme is probably using a deprecated function to handle the title. <a hre
|
|
308 |
8. Installation Wizard
|
309 |
|
310 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
311 |
= 4.1.1 =
|
312 |
* NEW Add "Text alignment" option for cookie bar
|
313 |
* INFO Improved cookie bar design
|
6 |
Requires at least: 4.7+
|
7 |
Tested up to: 5.5
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.1.2
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
308 |
8. Installation Wizard
|
309 |
|
310 |
== Changelog ==
|
311 |
+
= 4.1.2 =
|
312 |
+
* INFO Label for breadcrumbs in Elementor
|
313 |
+
* FIX Elementor content analysis
|
314 |
+
* FIX Display incorrect information from admin bar
|
315 |
+
* FIX Warning: Use of undefined constant SEOPRESS_PRO_VERSION
|
316 |
= 4.1.1 =
|
317 |
* NEW Add "Text alignment" option for cookie bar
|
318 |
* INFO Improved cookie bar design
|
seopress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: SEOPress
|
4 |
Plugin URI: https://www.seopress.org/
|
5 |
Description: One of the best SEO plugins for WordPress.
|
6 |
-
Version: 4.1.
|
7 |
Author: SEOPress
|
8 |
Author URI: https://www.seopress.org/
|
9 |
License: GPLv2
|
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
|
|
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56 |
//Define
|
57 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
-
define( 'SEOPRESS_VERSION', '4.1.
|
59 |
define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
|
60 |
|
61 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
3 |
Plugin Name: SEOPress
|
4 |
Plugin URI: https://www.seopress.org/
|
5 |
Description: One of the best SEO plugins for WordPress.
|
6 |
+
Version: 4.1.2
|
7 |
Author: SEOPress
|
8 |
Author URI: https://www.seopress.org/
|
9 |
License: GPLv2
|
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56 |
//Define
|
57 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
define( 'SEOPRESS_VERSION', '4.1.2' );
|
59 |
define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
|
60 |
|
61 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|