SEOPress - Version 3.6.3

Version Description

  • INFO Improve code quality
  • INFO Improve security
  • FIX Notice: Undefined index: seopress_backlinks_majestic_key
  • FIX Notice: Undefined index: seopress_robots_file
  • FIX Notice: Undefined index: seopress_rss_before_html
  • FIX Notice: Undefined index: seopress_rss_after_html
  • FIX Saving FAQ manual schema
  • FIX Saving Service description manual schema
  • FIX Saving Recipe ingredients manual schema
  • FIX Saving Recipe instructions manual schema
  • FIX Pixels counter color
  • FIX Some CSS
  • FIX map_meta_cap was called incorrectly. The post type seopress_404 is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type.
  • FIX Undefined variable in installation wizard
Download this release

Release Info

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

Code changes from version 3.6.2.1 to 3.6.3

assets/js/seopress-counters.js CHANGED
@@ -1,201 +1,107 @@
1
- //Title tag counters / live preview
2
- (function($) {
3
- function sp_titles_counters(){
4
- $("#seopress_titles_title_counters").after("<div id=\"seopress_titles_title_counters_val\">/ 60</div>");
5
-
6
- //Init values
7
- if($('#seopress_titles_title_meta').val().length > 0) {
8
- $("#seopress_titles_title_counters").text($("#seopress_titles_title_meta").val().length);
9
- $("#seopress_titles_title_pixel").text(pixelTitle($("#seopress_titles_title_meta").val()));
10
- } else if($('#seopress_titles_title_meta').attr('placeholder').length) {
11
- $("#seopress_titles_title_counters").text($("#seopress_titles_title_meta").attr('placeholder').length);
12
- $("#seopress_titles_title_pixel").text(pixelTitle($("#seopress_titles_title_meta").attr('placeholder')));
13
- }
14
-
15
- if($('#seopress_titles_title_meta').val().length > 60){
16
- $('#seopress_titles_title_counters').css('color', 'red');
17
- } else if($('#seopress_titles_title_meta').attr('placeholder').length > 60) {
18
- $('#seopress_titles_title_counters').css('color', 'red');
19
- }
20
-
21
- //Pixels
22
- if(pixelTitle($('#seopress_titles_title_meta').val()) > 568){
23
- $('#seopress_titles_title_pixel').css('color', 'red');
24
- } else if(pixelTitle($('#seopress_titles_title_meta').attr('placeholder')) > 568) {
25
- $('#seopress_titles_title_pixel').css('color', 'red');
26
- }
27
-
28
- $("#seopress_titles_title_meta").keyup(function(event) {
29
- $('#seopress_titles_title_counters').css('color', 'inherit');
30
- $('#seopress_titles_title_pixel').css('color', 'inherit');
31
-
32
- if($(this).val().length > 60){
33
- $('#seopress_titles_title_counters').css('color', 'red');
34
- }
35
-
36
- if(pixelTitle($(this).val()) > 568){
37
- $('#seopress_titles_title_pixel').css('color', 'red');
38
- }
39
-
40
- if($('#seopress_titles_title_meta').val().length > 0) {
41
- $("#seopress_titles_title_counters").text($("#seopress_titles_title_meta").val().length);
42
- $("#seopress_titles_title_pixel").text(pixelTitle($("#seopress_titles_title_meta").val()));
43
- } else if($('#seopress_titles_title_meta').attr('placeholder').length) {
44
- $("#seopress_titles_title_counters").text($("#seopress_titles_title_meta").attr('placeholder').length);
45
- $("#seopress_titles_title_pixel").text(pixelTitle($("#seopress_titles_title_meta").attr('placeholder')));
46
- }
47
-
48
- if($(this).val().length > 0){
49
- $(".snippet-title-custom").text(event.target.value);
50
- $(".snippet-title").css('display', 'none');
51
- $(".snippet-title-custom").css('display', 'block');
52
- $(".snippet-title-default").css('display', 'none');
53
- } else if($(this).val().length == 0) {
54
- $(".snippet-title-default").css('display', 'block');
55
- $(".snippet-title-custom").css('display', 'none');
56
- $(".snippet-title").css('display', 'none');
57
- };
58
- });
59
- };
60
-
61
- //Meta description counters / live preview
62
- function sp_meta_desc_counters(){
63
- $("#seopress_titles_desc_counters").after("<div id=\"seopress_titles_desc_counters_val\">/ 160</div>");
64
-
65
- //Init values
66
- if($('#seopress_titles_desc_meta').val().length > 0) {
67
- $("#seopress_titles_desc_counters").text($("#seopress_titles_desc_meta").val().length);
68
- $("#seopress_titles_desc_pixel").text(pixelTitle($("#seopress_titles_desc_meta").val()));
69
- } else if($('#seopress_titles_desc_meta').attr('placeholder').length) {
70
- $("#seopress_titles_desc_counters").text($("#seopress_titles_desc_meta").attr('placeholder').length);
71
- $("#seopress_titles_desc_pixel").text(pixelTitle($("#seopress_titles_desc_meta").attr('placeholder')));
72
- }
73
-
74
- if($('#seopress_titles_desc_meta').val().length > 160){
75
- $('#seopress_titles_desc_counters').css('color', 'red');
76
- } else if($('#seopress_titles_desc_meta').attr('placeholder').length > 160) {
77
- $('#seopress_titles_desc_counters').css('color', 'red');
78
- }
79
-
80
- //Pixels
81
- if(pixelTitle($('#seopress_titles_desc_meta').val()) > 940){
82
- $('#seopress_titles_desc_pixel').css('color', 'red');
83
- } else if(pixelTitle($('#seopress_titles_desc_meta').attr('placeholder')) > 940) {
84
- $('#seopress_titles_desc_pixel').css('color', 'red');
85
- }
86
-
87
- $("#seopress_titles_desc_meta").keyup(function(event) {
88
- $('#seopress_titles_desc_counters').css('color', 'inherit');
89
- if($(this).val().length > 160){
90
- $('#seopress_titles_desc_counters').css('color', 'red');
91
- }
92
-
93
- if(pixelTitle($(this).val()) > 940){
94
- $('#seopress_titles_desc_pixel').css('color', 'red');
95
- }
96
-
97
- if($('#seopress_titles_desc_meta').val().length > 0) {
98
- $("#seopress_titles_desc_counters").text($("#seopress_titles_desc_meta").val().length);
99
- $("#seopress_titles_desc_pixel").text(pixelTitle($("#seopress_titles_desc_meta").val()));
100
- } else if($('#seopress_titles_desc_meta').attr('placeholder').length) {
101
- $("#seopress_titles_desc_counters").text($("#seopress_titles_desc_meta").attr('placeholder').length);
102
- $("#seopress_titles_desc_pixel").text(pixelTitle($("#seopress_titles_desc_meta").attr('placeholder')));
103
- }
104
-
105
- if($(this).val().length > 0){
106
- $(".snippet-description-custom").text(event.target.value);
107
- $(".snippet-description").css('display', 'none');
108
- $(".snippet-description-custom").css('display', 'inline');
109
- $(".snippet-description-default").css('display', 'none');
110
- } else if($(this).val().length == 0) {
111
- $(".snippet-description-default").css('display', 'inline');
112
- $(".snippet-description-custom").css('display', 'none');
113
- $(".snippet-description").css('display', 'none');
114
- };
115
- });
116
-
117
- $("#excerpt").keyup(function(event) {
118
- if($('#seopress_titles_desc_meta').val().length == 0){
119
- if ($(".snippet-description-custom").val().length == 0) {
120
- $(".snippet-description-custom").text(event.target.value);
121
- $(".snippet-description").css('display', 'none');
122
- $(".snippet-description-custom").css('display', 'inline');
123
- $(".snippet-description-default").css('display', 'none');
124
- }
125
- }
126
- });
127
- };
128
-
129
- /*
130
- Title / meta desc length in Pixels
131
- Credits: francois@gokam.co.uk + Benjamin Denis
132
- Note: the first character is a nonbreaking space
133
- */
134
- function pixelTitle(input) {
135
- var letter = ' ·˙・«»àô€ÀÈÊÉéèê !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuüvwxyz{|}~–\n\r‘’£';
136
- var pixel = [5,6,6,18,10,10,10,10,10,12,12,12,12,10,10,10,5,5,6,10,10,16,12,3,6,6,7,11,5,6,5,5,10,10,10,10,10,10,10,10,10,10,5,5,11,11,11,10,18,12,12,13,13,12,11,14,13,5,9,12,10,15,13,14,12,14,13,12,11,13,12,17,12,12,11,5,5,5,8,10,6,10,10,9,10,10,5,10,10,4,4,9,4,15,10,10,10,10,6,9,9,5,10,9,13,9,9,9,6,5,6,11,10,0,0,4,4,10]
137
- var total = 0;
138
- for (var i = 0; i < input.length; i++) {
139
- total = total + pixel[letter.indexOf(input.substring(i,i+1))];
140
- }
141
- return total;
142
- }
143
- })(jQuery);
144
-
145
- //Real Preview / Content Analysis
146
- jQuery(document).ready(function($) {
147
- //Tabs
148
- $("#seopress-analysis-tabs .hidden").removeClass('hidden');
149
- $("#seopress-analysis-tabs").tabs();
150
- //Real Preview
151
- function seopress_real_preview() {
152
- $.ajax({
153
- method : 'GET',
154
- url : seopressAjaxRealPreview.seopress_real_preview,
155
- data: {
156
- action: 'seopress_do_real_preview',
157
- post_id: $('#seopress-tabs').attr('data_id'),
158
- tax_name: $('#seopress-tabs').attr('data_tax'),
159
- origin: $('#seopress-tabs').attr('data_origin'),
160
- post_type: $('#seopress_launch_analysis').attr('data_post_type'),
161
- seopress_analysis_target_kw: $('#seopress_analysis_target_kw_meta').val(),
162
- _ajax_nonce: seopressAjaxRealPreview.seopress_nonce,
163
- },
164
- success : function( data ) {
165
- Object.keys(data.data).forEach(key => {
166
- let a = document.createElement('textarea');
167
- a.innerHTML = data.data[key];
168
- data.data[key] = a.textContent;
169
- });
170
-
171
- $( '#seopress_cpt .google-snippet-preview .snippet-title' ).html(data.data.title);
172
- $( '#seopress_cpt .google-snippet-preview .snippet-title-default' ).html(data.data.title);
173
- $( '#seopress_titles_title_meta' ).attr("placeholder", data.data.title);
174
- $( '#seopress_cpt .google-snippet-preview .snippet-description' ).html(data.data.meta_desc);
175
- $( '#seopress_cpt .google-snippet-preview .snippet-description-default' ).html(data.data.meta_desc);
176
- $( '#seopress_titles_desc_meta' ).attr("placeholder", data.data.meta_desc);
177
- $( '#seopress_cpt #seopress_social_fb_title_meta' ).attr("placeholder", data.data.og_title);
178
- $( '#seopress_cpt #seopress_social_fb_desc_meta' ).attr("placeholder", data.data.og_desc);
179
- $( '#seopress_cpt #seopress_social_fb_img_meta' ).attr("placeholder", data.data.og_img);
180
- $( '#seopress_cpt #seopress_social_twitter_title_meta' ).attr("placeholder", data.data.tw_title);
181
- $( '#seopress_cpt #seopress_social_twitter_desc_meta' ).attr("placeholder", data.data.tw_desc);
182
- $( '#seopress_cpt #seopress_social_twitter_img_meta' ).attr("placeholder", data.data.tw_img);
183
- $( '#seopress_cpt #seopress_robots_canonical_meta' ).attr("placeholder", data.data.canonical);
184
- $( '#seopress_analysis_results_state' ).fadeIn().css('display', 'inline-block');
185
- $( '#seopress_analysis_results_state' ).delay(3500).fadeOut();
186
- $( '#seopress-analysis-tabs-1' ).load(' #seopress-analysis-tabs-1');
187
- $( '#seopress-analysis-tabs-2' ).load(' #seopress-analysis-tabs-2');
188
- $( '#seopress-analysis-tabs-3' ).load(' #seopress-analysis-tabs-3');
189
- $( '#seopress-analysis-tabs-4' ).load(' #seopress-analysis-tabs-4');
190
- $(' #seopress_titles_title_counters_val' ).remove();
191
- $(' #seopress_titles_desc_counters_val' ).remove();
192
- sp_titles_counters();
193
- sp_meta_desc_counters();
194
- },
195
- });
196
- };
197
- seopress_real_preview();
198
- $('#seopress_launch_analysis').on('click', function() {
199
- seopress_real_preview();
200
- });
201
  });
1
+ function sp_titles_counters() {
2
+ jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),
3
+ jQuery("#seopress_titles_title_meta").val().length > 0 ? (jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length),
4
+ jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").val()))) : jQuery("#seopress_titles_title_meta").attr("placeholder").length && (jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").attr("placeholder").length),
5
+ jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")))),
6
+ jQuery("#seopress_titles_title_meta").val().length > 60 ? jQuery("#seopress_titles_title_counters").css("color", "red") : jQuery("#seopress_titles_title_meta").attr("placeholder").length > 60 && jQuery("#seopress_titles_title_counters").css("color", "red"),
7
+ pixelTitle(jQuery("#seopress_titles_title_meta").val()) > 568 ? jQuery("#seopress_titles_title_pixel").css("color", "red") : pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")) > 568 && jQuery("#seopress_titles_title_pixel").css("color", "red"),
8
+ jQuery("#seopress_titles_title_meta").keyup(function(e) {
9
+ jQuery("#seopress_titles_title_counters").css("color", "inherit"),
10
+ jQuery("#seopress_titles_title_pixel").css("color", "inherit"),
11
+ jQuery(this).val().length > 60 && jQuery("#seopress_titles_title_counters").css("color", "red"),
12
+ pixelTitle(jQuery(this).val()) > 568 && jQuery("#seopress_titles_title_pixel").css("color", "red"),
13
+ jQuery("#seopress_titles_title_meta").val().length > 0 ? (jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length),
14
+ jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").val()))) : jQuery("#seopress_titles_title_meta").attr("placeholder").length && (jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").attr("placeholder").length),
15
+ jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")))),
16
+ jQuery(this).val().length > 0 ? (jQuery(".snippet-title-custom").text(e.target.value),
17
+ jQuery(".snippet-title").css("display", "none"),
18
+ jQuery(".snippet-title-custom").css("display", "block"),
19
+ jQuery(".snippet-title-default").css("display", "none")) : 0 == jQuery(this).val().length && (jQuery(".snippet-title-default").css("display", "block"),
20
+ jQuery(".snippet-title-custom").css("display", "none"), jQuery(".snippet-title").css("display", "none"))
21
+ })
22
+ }
23
+
24
+ function sp_meta_desc_counters() {
25
+ jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),
26
+ jQuery("#seopress_titles_desc_meta").val().length > 0 ? (jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").val().length),
27
+ jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").val()))) : jQuery("#seopress_titles_desc_meta").attr("placeholder").length && (jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").attr("placeholder").length),
28
+ jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")))),
29
+ jQuery("#seopress_titles_desc_meta").val().length > 160 ? jQuery("#seopress_titles_desc_counters").css("color", "red") : jQuery("#seopress_titles_desc_meta").attr("placeholder").length > 160 && jQuery("#seopress_titles_desc_counters").css("color", "red"),
30
+ pixelTitle(jQuery("#seopress_titles_desc_meta").val()) > 940 ? jQuery("#seopress_titles_desc_pixel").css("color", "red") : pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")) > 940 && jQuery("#seopress_titles_desc_pixel").css("color", "red"),
31
+ jQuery("#seopress_titles_desc_meta").keyup(function(e) {
32
+ jQuery("#seopress_titles_desc_counters").css("color", "inherit"),
33
+ jQuery('#seopress_titles_desc_pixel').css('color', 'inherit'),
34
+ jQuery(this).val().length > 160 && jQuery("#seopress_titles_desc_counters").css("color", "red"),
35
+ pixelTitle(jQuery(this).val()) > 940 && jQuery("#seopress_titles_desc_pixel").css("color", "red"),
36
+ jQuery("#seopress_titles_desc_meta").val().length > 0 ? (jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").val().length),
37
+ jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").val()))) : jQuery("#seopress_titles_desc_meta").attr("placeholder").length && (jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").attr("placeholder").length),
38
+ jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")))), jQuery(this).val().length > 0 ? (jQuery(".snippet-description-custom").text(e.target.value),
39
+ jQuery(".snippet-description").css("display", "none"),
40
+ jQuery(".snippet-description-custom").css("display", "inline"),
41
+ jQuery(".snippet-description-default").css("display", "none")) : 0 == jQuery(this).val().length && (jQuery(".snippet-description-default").css("display", "inline"),
42
+ jQuery(".snippet-description-custom").css("display", "none"),
43
+ jQuery(".snippet-description").css("display", "none"))
44
+ }), jQuery("#excerpt").keyup(function(e) {
45
+ 0 == jQuery("#seopress_titles_desc_meta").val().length && 0 == jQuery(".snippet-description-custom").val().length && (jQuery(".snippet-description-custom").text(e.target.value),
46
+ jQuery(".snippet-description").css("display", "none"),
47
+ jQuery(".snippet-description-custom").css("display", "inline"),
48
+ jQuery(".snippet-description-default").css("display", "none"))
49
+ })
50
+ }
51
+
52
+ function pixelTitle(e) {
53
+ for (var s = [5, 6, 6, 18, 10, 10, 10, 10, 10, 12, 12, 12, 12, 10, 10, 10, 5, 5, 6, 10, 10, 16, 12, 3, 6, 6, 7, 11, 5, 6, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 5, 5, 11, 11, 11, 10, 18, 12, 12, 13, 13, 12, 11, 14, 13, 5, 9, 12, 10, 15, 13, 14, 12, 14, 13, 12, 11, 13, 12, 17, 12, 12, 11, 5, 5, 5, 8, 10, 6, 10, 10, 9, 10, 10, 5, 10, 10, 4, 4, 9, 4, 15, 10, 10, 10, 10, 6, 9, 9, 5, 10, 9, 13, 9, 9, 9, 6, 5, 6, 11, 10, 0, 0, 4, 4, 10], t = 0, l = 0; l < e.length; l++) t += s[" ·˙・«»àô€ÀÈÊÉéèê !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuüvwxyz{|}~–\n\r‘’£".indexOf(e.substring(l, l + 1))];
54
+ return t
55
+ }
56
+ jQuery(document).ready(function(e) {
57
+ function s() {
58
+ e.ajax({
59
+ method: "GET",
60
+ url: seopressAjaxRealPreview.seopress_real_preview,
61
+ data: {
62
+ action: "seopress_do_real_preview",
63
+ post_id: e("#seopress-tabs").attr("data_id"),
64
+ tax_name: e("#seopress-tabs").attr("data_tax"),
65
+ origin: e("#seopress-tabs").attr("data_origin"),
66
+ post_type: e("#seopress_launch_analysis").attr("data_post_type"),
67
+ seopress_analysis_target_kw: e("#seopress_analysis_target_kw_meta").val(),
68
+ _ajax_nonce: seopressAjaxRealPreview.seopress_nonce
69
+ },
70
+ success: function(s) {
71
+ Object.keys(s.data).forEach(e => {
72
+ let t = document.createElement("textarea");
73
+ t.innerHTML = s.data[e], s.data[e] = t.textContent
74
+ }),
75
+ e("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),
76
+ e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),
77
+ e("#seopress_titles_title_meta").attr("placeholder", s.data.title),
78
+ e("#seopress_cpt .google-snippet-preview .snippet-description").html(s.data.meta_desc),
79
+ e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(s.data.meta_desc),
80
+ e("#seopress_titles_desc_meta").attr("placeholder", s.data.meta_desc),
81
+ e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder", s.data.og_title),
82
+ e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder", s.data.og_desc),
83
+ e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder", s.data.og_img),
84
+ e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder", s.data.tw_title),
85
+ e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder", s.data.tw_desc),
86
+ e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder", s.data.tw_img),
87
+ e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder", s.data.canonical),
88
+ e("#seopress_analysis_results_state").fadeIn().css("display", "inline-block"),
89
+ e("#seopress_analysis_results_state").delay(3500).fadeOut(),
90
+ e("#seopress-analysis-tabs-1").load(" #seopress-analysis-tabs-1"),
91
+ e("#seopress-analysis-tabs-2").load(" #seopress-analysis-tabs-2"),
92
+ e("#seopress-analysis-tabs-3").load(" #seopress-analysis-tabs-3"),
93
+ e("#seopress-analysis-tabs-4").load(" #seopress-analysis-tabs-4"),
94
+ e(" #seopress_titles_title_counters_val").remove(),
95
+ e(" #seopress_titles_desc_counters_val").remove(),
96
+ sp_titles_counters(),
97
+ sp_meta_desc_counters()
98
+ }
99
+ })
100
+ }
101
+ e("#seopress-analysis-tabs .hidden").removeClass("hidden"),
102
+ e("#seopress-analysis-tabs").tabs(),
103
+ s(),
104
+ e("#seopress_launch_analysis").on("click", function() {
105
+ s()
106
+ })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  });
assets/js/seopress-counters.min.js CHANGED
@@ -1 +1 @@
1
- function sp_titles_counters(){jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),jQuery("#seopress_titles_title_meta").val().length>0?(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").val()))):jQuery("#seopress_titles_title_meta").attr("placeholder").length&&(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").attr("placeholder").length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")))),jQuery("#seopress_titles_title_meta").val().length>60?jQuery("#seopress_titles_title_counters").css("color","red"):jQuery("#seopress_titles_title_meta").attr("placeholder").length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(jQuery("#seopress_titles_title_meta").val())>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder"))>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),jQuery("#seopress_titles_title_meta").keyup(function(e){jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),jQuery(this).val().length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(jQuery(this).val())>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),jQuery("#seopress_titles_title_meta").val().length>0?(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").val()))):jQuery("#seopress_titles_title_meta").attr("placeholder").length&&(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").attr("placeholder").length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")))),jQuery(this).val().length>0?(jQuery(".snippet-title-custom").text(e.target.value),jQuery(".snippet-title").css("display","none"),jQuery(".snippet-title-custom").css("display","block"),jQuery(".snippet-title-default").css("display","none")):0==jQuery(this).val().length&&(jQuery(".snippet-title-default").css("display","block"),jQuery(".snippet-title-custom").css("display","none"),jQuery(".snippet-title").css("display","none"))})}function sp_meta_desc_counters(){jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),jQuery("#seopress_titles_desc_meta").val().length>0?(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").val().length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").val()))):jQuery("#seopress_titles_desc_meta").attr("placeholder").length&&(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").attr("placeholder").length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")))),jQuery("#seopress_titles_desc_meta").val().length>160?jQuery("#seopress_titles_desc_counters").css("color","red"):jQuery("#seopress_titles_desc_meta").attr("placeholder").length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelTitle(jQuery("#seopress_titles_desc_meta").val())>940?jQuery("#seopress_titles_desc_pixel").css("color","red"):pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder"))>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),jQuery("#seopress_titles_desc_meta").keyup(function(e){jQuery("#seopress_titles_desc_counters").css("color","inherit"),jQuery(this).val().length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelTitle(jQuery(this).val())>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),jQuery("#seopress_titles_desc_meta").val().length>0?(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").val().length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").val()))):jQuery("#seopress_titles_desc_meta").attr("placeholder").length&&(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").attr("placeholder").length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")))),jQuery(this).val().length>0?(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none")):0==jQuery(this).val().length&&(jQuery(".snippet-description-default").css("display","inline"),jQuery(".snippet-description-custom").css("display","none"),jQuery(".snippet-description").css("display","none"))}),jQuery("#excerpt").keyup(function(e){0==jQuery("#seopress_titles_desc_meta").val().length&&0==jQuery(".snippet-description-custom").val().length&&(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none"))})}function pixelTitle(e){for(var s=[5,6,6,18,10,10,10,10,10,12,12,12,12,10,10,10,5,5,6,10,10,16,12,3,6,6,7,11,5,6,5,5,10,10,10,10,10,10,10,10,10,10,5,5,11,11,11,10,18,12,12,13,13,12,11,14,13,5,9,12,10,15,13,14,12,14,13,12,11,13,12,17,12,12,11,5,5,5,8,10,6,10,10,9,10,10,5,10,10,4,4,9,4,15,10,10,10,10,6,9,9,5,10,9,13,9,9,9,6,5,6,11,10,0,0,4,4,10],t=0,l=0;l<e.length;l++)t+=s[" ·˙・«»àô€ÀÈÊÉéèê !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuüvwxyz{|}~–\n\r‘’£".indexOf(e.substring(l,l+1))];return t}jQuery(document).ready(function(e){function s(){e.ajax({method:"GET",url:seopressAjaxRealPreview.seopress_real_preview,data:{action:"seopress_do_real_preview",post_id:e("#seopress-tabs").attr("data_id"),tax_name:e("#seopress-tabs").attr("data_tax"),origin:e("#seopress-tabs").attr("data_origin"),post_type:e("#seopress_launch_analysis").attr("data_post_type"),seopress_analysis_target_kw:e("#seopress_analysis_target_kw_meta").val(),_ajax_nonce:seopressAjaxRealPreview.seopress_nonce},success:function(s){Object.keys(s.data).forEach(e=>{let t=document.createElement("textarea");t.innerHTML=s.data[e],s.data[e]=t.textContent}),e("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),e("#seopress_titles_title_meta").attr("placeholder",s.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(s.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(s.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",s.data.meta_desc),e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.data.og_title),e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.data.og_desc),e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.data.og_img),e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.data.tw_title),e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.data.tw_desc),e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.data.tw_img),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",s.data.canonical),e("#seopress_analysis_results_state").fadeIn().css("display","inline-block"),e("#seopress_analysis_results_state").delay(3500).fadeOut(),e("#seopress-analysis-tabs-1").load(" #seopress-analysis-tabs-1"),e("#seopress-analysis-tabs-2").load(" #seopress-analysis-tabs-2"),e("#seopress-analysis-tabs-3").load(" #seopress-analysis-tabs-3"),e("#seopress-analysis-tabs-4").load(" #seopress-analysis-tabs-4"),e(" #seopress_titles_title_counters_val").remove(),e(" #seopress_titles_desc_counters_val").remove(),sp_titles_counters(),sp_meta_desc_counters()}})}e("#seopress-analysis-tabs .hidden").removeClass("hidden"),e("#seopress-analysis-tabs").tabs(),s(),e("#seopress_launch_analysis").on("click",function(){s()})});
1
+ function sp_titles_counters(){jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),jQuery("#seopress_titles_title_meta").val().length>0?(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").val()))):jQuery("#seopress_titles_title_meta").attr("placeholder").length&&(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").attr("placeholder").length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")))),jQuery("#seopress_titles_title_meta").val().length>60?jQuery("#seopress_titles_title_counters").css("color","red"):jQuery("#seopress_titles_title_meta").attr("placeholder").length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(jQuery("#seopress_titles_title_meta").val())>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder"))>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),jQuery("#seopress_titles_title_meta").keyup(function(e){jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),jQuery(this).val().length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(jQuery(this).val())>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),jQuery("#seopress_titles_title_meta").val().length>0?(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").val()))):jQuery("#seopress_titles_title_meta").attr("placeholder").length&&(jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").attr("placeholder").length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(jQuery("#seopress_titles_title_meta").attr("placeholder")))),jQuery(this).val().length>0?(jQuery(".snippet-title-custom").text(e.target.value),jQuery(".snippet-title").css("display","none"),jQuery(".snippet-title-custom").css("display","block"),jQuery(".snippet-title-default").css("display","none")):0==jQuery(this).val().length&&(jQuery(".snippet-title-default").css("display","block"),jQuery(".snippet-title-custom").css("display","none"),jQuery(".snippet-title").css("display","none"))})}function sp_meta_desc_counters(){jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),jQuery("#seopress_titles_desc_meta").val().length>0?(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").val().length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").val()))):jQuery("#seopress_titles_desc_meta").attr("placeholder").length&&(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").attr("placeholder").length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")))),jQuery("#seopress_titles_desc_meta").val().length>160?jQuery("#seopress_titles_desc_counters").css("color","red"):jQuery("#seopress_titles_desc_meta").attr("placeholder").length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelTitle(jQuery("#seopress_titles_desc_meta").val())>940?jQuery("#seopress_titles_desc_pixel").css("color","red"):pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder"))>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),jQuery("#seopress_titles_desc_meta").keyup(function(e){jQuery("#seopress_titles_desc_counters").css("color","inherit"),jQuery("#seopress_titles_desc_pixel").css("color","inherit"),jQuery(this).val().length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelTitle(jQuery(this).val())>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),jQuery("#seopress_titles_desc_meta").val().length>0?(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").val().length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").val()))):jQuery("#seopress_titles_desc_meta").attr("placeholder").length&&(jQuery("#seopress_titles_desc_counters").text(jQuery("#seopress_titles_desc_meta").attr("placeholder").length),jQuery("#seopress_titles_desc_pixel").text(pixelTitle(jQuery("#seopress_titles_desc_meta").attr("placeholder")))),jQuery(this).val().length>0?(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none")):0==jQuery(this).val().length&&(jQuery(".snippet-description-default").css("display","inline"),jQuery(".snippet-description-custom").css("display","none"),jQuery(".snippet-description").css("display","none"))}),jQuery("#excerpt").keyup(function(e){0==jQuery("#seopress_titles_desc_meta").val().length&&0==jQuery(".snippet-description-custom").val().length&&(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none"))})}function pixelTitle(e){for(var s=[5,6,6,18,10,10,10,10,10,12,12,12,12,10,10,10,5,5,6,10,10,16,12,3,6,6,7,11,5,6,5,5,10,10,10,10,10,10,10,10,10,10,5,5,11,11,11,10,18,12,12,13,13,12,11,14,13,5,9,12,10,15,13,14,12,14,13,12,11,13,12,17,12,12,11,5,5,5,8,10,6,10,10,9,10,10,5,10,10,4,4,9,4,15,10,10,10,10,6,9,9,5,10,9,13,9,9,9,6,5,6,11,10,0,0,4,4,10],t=0,l=0;l<e.length;l++)t+=s[" ·˙・«»àô€ÀÈÊÉéèê !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuüvwxyz{|}~–\n\r‘’£".indexOf(e.substring(l,l+1))];return t}jQuery(document).ready(function(e){function s(){e.ajax({method:"GET",url:seopressAjaxRealPreview.seopress_real_preview,data:{action:"seopress_do_real_preview",post_id:e("#seopress-tabs").attr("data_id"),tax_name:e("#seopress-tabs").attr("data_tax"),origin:e("#seopress-tabs").attr("data_origin"),post_type:e("#seopress_launch_analysis").attr("data_post_type"),seopress_analysis_target_kw:e("#seopress_analysis_target_kw_meta").val(),_ajax_nonce:seopressAjaxRealPreview.seopress_nonce},success:function(s){Object.keys(s.data).forEach(e=>{let t=document.createElement("textarea");t.innerHTML=s.data[e],s.data[e]=t.textContent}),e("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),e("#seopress_titles_title_meta").attr("placeholder",s.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(s.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(s.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",s.data.meta_desc),e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.data.og_title),e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.data.og_desc),e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.data.og_img),e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.data.tw_title),e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.data.tw_desc),e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.data.tw_img),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",s.data.canonical),e("#seopress_analysis_results_state").fadeIn().css("display","inline-block"),e("#seopress_analysis_results_state").delay(3500).fadeOut(),e("#seopress-analysis-tabs-1").load(" #seopress-analysis-tabs-1"),e("#seopress-analysis-tabs-2").load(" #seopress-analysis-tabs-2"),e("#seopress-analysis-tabs-3").load(" #seopress-analysis-tabs-3"),e("#seopress-analysis-tabs-4").load(" #seopress-analysis-tabs-4"),e(" #seopress_titles_title_counters_val").remove(),e(" #seopress_titles_desc_counters_val").remove(),sp_titles_counters(),sp_meta_desc_counters()}})}e("#seopress-analysis-tabs .hidden").removeClass("hidden"),e("#seopress-analysis-tabs").tabs(),s(),e("#seopress_launch_analysis").on("click",function(){s()})});
inc/admin/admin-metaboxes.php CHANGED
@@ -168,6 +168,8 @@ function seopress_display_seo_metaboxe() {
168
  }
169
 
170
  function seopress_cpt($post){
 
 
171
  global $typenow;
172
 
173
  //init
@@ -280,8 +282,19 @@ function seopress_display_seo_metaboxe() {
280
  require_once ( dirname( __FILE__ ) . '/admin-metaboxes-form.php'); //Metaboxe HTML
281
  }
282
 
283
- add_action('save_post','seopress_save_metabox');
284
- function seopress_save_metabox($post_id){
 
 
 
 
 
 
 
 
 
 
 
285
  if ( 'attachment' !== get_post_type($post_id)) {
286
  if(isset($_POST['seopress_titles_title'])){
287
  update_post_meta($post_id, '_seopress_titles_title', esc_html($_POST['seopress_titles_title']));
@@ -404,6 +417,8 @@ function seopress_display_ca_metaboxe() {
404
  }
405
 
406
  function seopress_content_analysis($post) {
 
 
407
  wp_enqueue_script( 'seopress-cpt-counters-js', plugins_url( 'assets/js/seopress-counters.min.js', dirname(dirname( __FILE__ ))), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), SEOPRESS_VERSION );
408
  $seopress_real_preview = array(
409
  'seopress_nonce' => wp_create_nonce('seopress_real_preview_nonce'),
@@ -455,8 +470,19 @@ function seopress_display_ca_metaboxe() {
455
  require_once ( dirname( __FILE__ ) . '/admin-metaboxes-content-analysis-form.php'); //Metaboxe HTML
456
  }
457
 
458
- add_action('save_post','seopress_save_ca_metabox');
459
- function seopress_save_ca_metabox($post_id){
 
 
 
 
 
 
 
 
 
 
 
460
  if ( 'attachment' !== get_post_type($post_id)) {
461
  if(isset($_POST['seopress_analysis_target_kw'])){
462
  update_post_meta($post_id, '_seopress_analysis_target_kw', esc_html($_POST['seopress_analysis_target_kw']));
168
  }
169
 
170
  function seopress_cpt($post){
171
+ wp_nonce_field( plugin_basename( __FILE__ ), 'seopress_cpt_nonce' );
172
+
173
  global $typenow;
174
 
175
  //init
282
  require_once ( dirname( __FILE__ ) . '/admin-metaboxes-form.php'); //Metaboxe HTML
283
  }
284
 
285
+ add_action('save_post','seopress_save_metabox', 10, 2);
286
+ function seopress_save_metabox($post_id, $post){
287
+ //Nonce
288
+ if ( !isset( $_POST['seopress_cpt_nonce'] ) || !wp_verify_nonce( $_POST['seopress_cpt_nonce'], plugin_basename( __FILE__ ) ) )
289
+ return $post_id;
290
+
291
+ //Post type object
292
+ $post_type = get_post_type_object( $post->post_type );
293
+
294
+ //Check permission
295
+ if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
296
+ return $post_id;
297
+
298
  if ( 'attachment' !== get_post_type($post_id)) {
299
  if(isset($_POST['seopress_titles_title'])){
300
  update_post_meta($post_id, '_seopress_titles_title', esc_html($_POST['seopress_titles_title']));
417
  }
418
 
419
  function seopress_content_analysis($post) {
420
+ wp_nonce_field( plugin_basename( __FILE__ ), 'seopress_content_analysis_nonce' );
421
+
422
  wp_enqueue_script( 'seopress-cpt-counters-js', plugins_url( 'assets/js/seopress-counters.min.js', dirname(dirname( __FILE__ ))), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), SEOPRESS_VERSION );
423
  $seopress_real_preview = array(
424
  'seopress_nonce' => wp_create_nonce('seopress_real_preview_nonce'),
470
  require_once ( dirname( __FILE__ ) . '/admin-metaboxes-content-analysis-form.php'); //Metaboxe HTML
471
  }
472
 
473
+ add_action('save_post','seopress_save_ca_metabox', 10, 2);
474
+ function seopress_save_ca_metabox($post_id, $post){
475
+ //Nonce
476
+ if ( !isset( $_POST['seopress_content_analysis_nonce'] ) || !wp_verify_nonce( $_POST['seopress_content_analysis_nonce'], plugin_basename( __FILE__ ) ) )
477
+ return $post_id;
478
+
479
+ //Post type object
480
+ $post_type = get_post_type_object( $post->post_type );
481
+
482
+ //Check permission
483
+ if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
484
+ return $post_id;
485
+
486
  if ( 'attachment' !== get_post_type($post_id)) {
487
  if(isset($_POST['seopress_analysis_target_kw'])){
488
  update_post_meta($post_id, '_seopress_analysis_target_kw', esc_html($_POST['seopress_analysis_target_kw']));
inc/admin/admin-wizard.php CHANGED
@@ -814,7 +814,6 @@ class SEOPRESS_Admin_Setup_Wizard {
814
  </div>
815
  </li>
816
  </ul>
817
- <p class="next-steps-help-text"><?php echo wp_kses_post( $help_text ); ?></p>
818
  <?php
819
  }
820
  }
814
  </div>
815
  </li>
816
  </ul>
 
817
  <?php
818
  }
819
  }
inc/functions/options-advanced-admin.php CHANGED
@@ -373,6 +373,9 @@ if (seopress_advanced_appearance_title_col_option() !='' || seopress_advanced_ap
373
  case 'seopress_ps' :
374
  echo '<div class="seopress-request-page-speed seopress-button" data_permalink="'.get_the_permalink().'" title="'.__('Analyze this page with Google Page Speed','wp-seopress').'"><span class="dashicons dashicons-dashboard"></span></div>';
375
  break;
 
 
 
376
  }
377
  }
378
  }
@@ -778,7 +781,9 @@ function seopress_bulk_quick_edit_custom_box($column_name) {
778
  <span class="input-text-wrap"><input type="text" name="seopress_canonical" /></span>
779
  </label>
780
  <?php
781
- break;
 
 
782
  }
783
  ?>
784
  </div>
@@ -803,7 +808,7 @@ function seopress_bulk_quick_edit_save_post($post_id) {
803
  return $post_id;
804
  }
805
 
806
- if (!current_user_can('edit_post', $post_id)) {
807
  return;
808
  }
809
 
373
  case 'seopress_ps' :
374
  echo '<div class="seopress-request-page-speed seopress-button" data_permalink="'.get_the_permalink().'" title="'.__('Analyze this page with Google Page Speed','wp-seopress').'"><span class="dashicons dashicons-dashboard"></span></div>';
375
  break;
376
+
377
+ default :
378
+ break;
379
  }
380
  }
381
  }
781
  <span class="input-text-wrap"><input type="text" name="seopress_canonical" /></span>
782
  </label>
783
  <?php
784
+ break;
785
+ default :
786
+ break;
787
  }
788
  ?>
789
  </div>
808
  return $post_id;
809
  }
810
 
811
+ if (!current_user_can('edit_posts', $post_id)) {
812
  return;
813
  }
814
 
inc/functions/options-redirections.php CHANGED
@@ -45,10 +45,10 @@ function seopress_redirections_term_type() {
45
  function seopress_redirections_value() {
46
  global $post;
47
  if (is_singular() && get_post_meta($post->ID,'_seopress_redirections_value',true)) {
48
- $seopress_redirections_value = html_entity_decode(get_post_meta($post->ID,'_seopress_redirections_value',true));
49
  return $seopress_redirections_value;
50
  } elseif ((is_tax() || is_category() || is_tag()) && get_term_meta(get_queried_object_id(),'_seopress_redirections_value',true) !='') {
51
- $seopress_redirections_value = html_entity_decode(get_term_meta(get_queried_object_id(),'_seopress_redirections_value',true));
52
  return $seopress_redirections_value;
53
  } else {
54
  $seopress_redirections_value = basename(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
45
  function seopress_redirections_value() {
46
  global $post;
47
  if (is_singular() && get_post_meta($post->ID,'_seopress_redirections_value',true)) {
48
+ $seopress_redirections_value = html_entity_decode(esc_url(get_post_meta($post->ID,'_seopress_redirections_value',true)));
49
  return $seopress_redirections_value;
50
  } elseif ((is_tax() || is_category() || is_tag()) && get_term_meta(get_queried_object_id(),'_seopress_redirections_value',true) !='') {
51
+ $seopress_redirections_value = html_entity_decode(esc_url(get_term_meta(get_queried_object_id(),'_seopress_redirections_value',true)));
52
  return $seopress_redirections_value;
53
  } else {
54
  $seopress_redirections_value = basename(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
inc/functions/options-titles-metas.php CHANGED
@@ -474,9 +474,9 @@ function seopress_titles_the_description_content() {
474
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
475
  }
476
  } elseif ( is_home() && get_post_meta(get_option( 'page_for_posts' ),'_seopress_titles_desc',true) !=''){ //BLOG PAGE
477
- if (get_post_meta(get_option( 'page_for_posts' ),'_seopress_titles_desc',true)) { //IS METABOXE
478
- $seopress_titles_the_description_meta = get_post_meta(get_option( 'page_for_posts' ),'_seopress_titles_desc',true);
479
- $seopress_titles_the_description = esc_attr($seopress_titles_the_description_meta);
480
 
481
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
482
  }
474
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
475
  }
476
  } elseif ( is_home() && get_post_meta(get_option( 'page_for_posts' ),'_seopress_titles_desc',true) !=''){ //BLOG PAGE
477
+ if (get_post_meta(get_option( 'page_for_posts' ),'_seopress_titles_desc',true)) {
478
+ $seopress_titles_the_description_meta = esc_html(get_post_meta(get_option( 'page_for_posts' ),'_seopress_titles_desc',true));
479
+ $seopress_titles_the_description = $seopress_titles_the_description_meta;
480
 
481
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
482
  }
languages/wp-seopress.pot CHANGED
@@ -1,10 +1,9 @@
1
- #, fuzzy
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: SEOPress\n"
5
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
6
- "POT-Creation-Date: 2019-08-08 11:56+0200\n"
7
- "PO-Revision-Date: 2019-06-19 15:31+0200\n"
8
  "Last-Translator: \n"
9
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
10
  "Language: en_US\n"
@@ -182,7 +181,7 @@ msgstr ""
182
 
183
  #: inc/admin/admin-metaboxes-content-analysis-form.php:9
184
  #: inc/admin/admin-metaboxes-content-analysis-form.php:10
185
- #: inc/functions/options-advanced-admin.php:769
186
  msgid "Target keywords"
187
  msgstr ""
188
 
@@ -371,7 +370,7 @@ msgstr ""
371
  #: inc/admin/admin-wizard.php:311 inc/admin/admin.php:711
372
  #: inc/admin/admin.php:732 inc/admin/admin.php:751 inc/admin/admin.php:772
373
  #: inc/admin/admin.php:2121 inc/admin/admin.php:3572
374
- #: inc/functions/options-advanced-admin.php:761
375
  msgid "Meta description"
376
  msgstr ""
377
 
@@ -511,7 +510,7 @@ msgstr ""
511
 
512
  #: inc/admin/admin-metaboxes-form.php:48 inc/admin/admin-metaboxes.php:163
513
  #: inc/admin/admin-metaboxes.php:166 inc/admin/admin.php:183
514
- #: inc/admin/adminbar.php:12 inc/functions/options-advanced-admin.php:751
515
  msgid "SEO"
516
  msgstr ""
517
 
@@ -1004,7 +1003,7 @@ msgstr ""
1004
  msgid "Add video"
1005
  msgstr ""
1006
 
1007
- #: inc/admin/admin-metaboxes.php:400
1008
  msgid "Content analysis"
1009
  msgstr ""
1010
 
@@ -1922,7 +1921,7 @@ msgstr ""
1922
  msgid "Security"
1923
  msgstr ""
1924
 
1925
- #: inc/admin/admin.php:656 seopress.php:335
1926
  msgid "Settings"
1927
  msgstr ""
1928
 
@@ -3874,7 +3873,7 @@ msgid ""
3874
  msgstr ""
3875
 
3876
  #: inc/functions/options-advanced-admin.php:287
3877
- #: inc/functions/options-advanced-admin.php:753
3878
  msgid "Title tag"
3879
  msgstr ""
3880
 
@@ -3887,7 +3886,7 @@ msgid "Redirect?"
3887
  msgstr ""
3888
 
3889
  #: inc/functions/options-advanced-admin.php:299
3890
- #: inc/functions/options-advanced-admin.php:777
3891
  msgid "Canonical"
3892
  msgstr ""
3893
 
@@ -3923,35 +3922,35 @@ msgstr ""
3923
  msgid "Analyze this page with Google Page Speed"
3924
  msgstr ""
3925
 
3926
- #: inc/functions/options-advanced-admin.php:457
3927
  msgid "Enable noindex"
3928
  msgstr ""
3929
 
3930
- #: inc/functions/options-advanced-admin.php:510
3931
  msgid "Enable index"
3932
  msgstr ""
3933
 
3934
- #: inc/functions/options-advanced-admin.php:563
3935
  msgid "Enable nofollow"
3936
  msgstr ""
3937
 
3938
- #: inc/functions/options-advanced-admin.php:615
3939
  msgid "Enable follow"
3940
  msgstr ""
3941
 
3942
- #: inc/functions/options-advanced-admin.php:662
3943
  msgid "Enable redirection"
3944
  msgstr ""
3945
 
3946
- #: inc/functions/options-advanced-admin.php:701
3947
  msgid "Disable redirection"
3948
  msgstr ""
3949
 
3950
- #: inc/functions/options-advanced-admin.php:879
3951
  msgid "Description"
3952
  msgstr ""
3953
 
3954
- #: inc/functions/options-advanced-admin.php:888
3955
  msgid ""
3956
  "The description is not prominent by default; however, some themes may show "
3957
  "it."
@@ -4015,22 +4014,22 @@ msgstr ""
4015
  msgid "XML Sitemaps"
4016
  msgstr ""
4017
 
4018
- #: seopress.php:133
4019
  msgid "has been successfully updated!"
4020
  msgstr ""
4021
 
4022
- #: seopress.php:184
4023
  msgid "Migration completed!"
4024
  msgstr ""
4025
 
4026
- #: seopress.php:289
4027
  msgid "You like SEOPress? Don't forget to rate it 5 stars!"
4028
  msgstr ""
4029
 
4030
- #: seopress.php:336
4031
  msgid "SEOPress.org"
4032
  msgstr ""
4033
 
4034
- #: seopress.php:338
4035
  msgid "GO PRO!"
4036
  msgstr ""
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
+ "POT-Creation-Date: 2019-08-22 12:52+0200\n"
6
+ "PO-Revision-Date: 2019-08-22 12:52+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: en_US\n"
181
 
182
  #: inc/admin/admin-metaboxes-content-analysis-form.php:9
183
  #: inc/admin/admin-metaboxes-content-analysis-form.php:10
184
+ #: inc/functions/options-advanced-admin.php:772
185
  msgid "Target keywords"
186
  msgstr ""
187
 
370
  #: inc/admin/admin-wizard.php:311 inc/admin/admin.php:711
371
  #: inc/admin/admin.php:732 inc/admin/admin.php:751 inc/admin/admin.php:772
372
  #: inc/admin/admin.php:2121 inc/admin/admin.php:3572
373
+ #: inc/functions/options-advanced-admin.php:764
374
  msgid "Meta description"
375
  msgstr ""
376
 
510
 
511
  #: inc/admin/admin-metaboxes-form.php:48 inc/admin/admin-metaboxes.php:163
512
  #: inc/admin/admin-metaboxes.php:166 inc/admin/admin.php:183
513
+ #: inc/admin/adminbar.php:12 inc/functions/options-advanced-admin.php:754
514
  msgid "SEO"
515
  msgstr ""
516
 
1003
  msgid "Add video"
1004
  msgstr ""
1005
 
1006
+ #: inc/admin/admin-metaboxes.php:413
1007
  msgid "Content analysis"
1008
  msgstr ""
1009
 
1921
  msgid "Security"
1922
  msgstr ""
1923
 
1924
+ #: inc/admin/admin.php:656 seopress.php:337
1925
  msgid "Settings"
1926
  msgstr ""
1927
 
3873
  msgstr ""
3874
 
3875
  #: inc/functions/options-advanced-admin.php:287
3876
+ #: inc/functions/options-advanced-admin.php:756
3877
  msgid "Title tag"
3878
  msgstr ""
3879
 
3886
  msgstr ""
3887
 
3888
  #: inc/functions/options-advanced-admin.php:299
3889
+ #: inc/functions/options-advanced-admin.php:780
3890
  msgid "Canonical"
3891
  msgstr ""
3892
 
3922
  msgid "Analyze this page with Google Page Speed"
3923
  msgstr ""
3924
 
3925
+ #: inc/functions/options-advanced-admin.php:460
3926
  msgid "Enable noindex"
3927
  msgstr ""
3928
 
3929
+ #: inc/functions/options-advanced-admin.php:513
3930
  msgid "Enable index"
3931
  msgstr ""
3932
 
3933
+ #: inc/functions/options-advanced-admin.php:566
3934
  msgid "Enable nofollow"
3935
  msgstr ""
3936
 
3937
+ #: inc/functions/options-advanced-admin.php:618
3938
  msgid "Enable follow"
3939
  msgstr ""
3940
 
3941
+ #: inc/functions/options-advanced-admin.php:665
3942
  msgid "Enable redirection"
3943
  msgstr ""
3944
 
3945
+ #: inc/functions/options-advanced-admin.php:704
3946
  msgid "Disable redirection"
3947
  msgstr ""
3948
 
3949
+ #: inc/functions/options-advanced-admin.php:884
3950
  msgid "Description"
3951
  msgstr ""
3952
 
3953
+ #: inc/functions/options-advanced-admin.php:893
3954
  msgid ""
3955
  "The description is not prominent by default; however, some themes may show "
3956
  "it."
4014
  msgid "XML Sitemaps"
4015
  msgstr ""
4016
 
4017
+ #: seopress.php:135
4018
  msgid "has been successfully updated!"
4019
  msgstr ""
4020
 
4021
+ #: seopress.php:186
4022
  msgid "Migration completed!"
4023
  msgstr ""
4024
 
4025
+ #: seopress.php:291
4026
  msgid "You like SEOPress? Don't forget to rate it 5 stars!"
4027
  msgstr ""
4028
 
4029
+ #: seopress.php:338
4030
  msgid "SEOPress.org"
4031
  msgstr ""
4032
 
4033
+ #: seopress.php:340
4034
  msgid "GO PRO!"
4035
  msgstr ""
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
6
  Requires at least: 4.6+
7
  Tested up to: 5.2
8
  Requires PHP: 5.6
9
- Stable tag: 3.6.2.1
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -219,6 +219,21 @@ Any questions? Visit our website <a href="https://www.seopress.org?utm_source=w.
219
  60. Installation Wizard
220
 
221
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  = 3.6.2.1 =
223
  * FIX Video duration for manual edit (automatic schema)
224
  * FIX Notice: Undefined variable: seopress_excerpt_length
6
  Requires at least: 4.6+
7
  Tested up to: 5.2
8
  Requires PHP: 5.6
9
+ Stable tag: 3.6.3
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
219
  60. Installation Wizard
220
 
221
  == Changelog ==
222
+ = 3.6.3 =
223
+ * INFO Improve code quality
224
+ * INFO Improve security
225
+ * FIX Notice: Undefined index: seopress_backlinks_majestic_key
226
+ * FIX Notice: Undefined index: seopress_robots_file
227
+ * FIX Notice: Undefined index: seopress_rss_before_html
228
+ * FIX Notice: Undefined index: seopress_rss_after_html
229
+ * FIX Saving FAQ manual schema
230
+ * FIX Saving Service description manual schema
231
+ * FIX Saving Recipe ingredients manual schema
232
+ * FIX Saving Recipe instructions manual schema
233
+ * FIX Pixels counter color
234
+ * FIX Some CSS
235
+ * FIX map_meta_cap was called incorrectly. The post type seopress_404 is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type.
236
+ * FIX Undefined variable in installation wizard
237
  = 3.6.2.1 =
238
  * FIX Video duration for manual edit (automatic schema)
239
  * FIX Notice: Undefined variable: seopress_excerpt_length
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: 3.6.2.1
7
  Author: Benjamin Denis
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
@@ -53,7 +53,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
53
  ///////////////////////////////////////////////////////////////////////////////////////////////////
54
  //Define
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
- define( 'SEOPRESS_VERSION', '3.6.2.1' );
57
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
58
 
59
  ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -96,6 +96,8 @@ function seopress_init($hook) {
96
  case 'seopress-setup':
97
  include_once dirname( __FILE__ ) . '/inc/admin/admin-wizard.php';
98
  break;
 
 
99
  }
100
  }
101
  }
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
+ Version: 3.6.3
7
  Author: Benjamin Denis
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
53
  ///////////////////////////////////////////////////////////////////////////////////////////////////
54
  //Define
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
+ define( 'SEOPRESS_VERSION', '3.6.3' );
57
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
58
 
59
  ///////////////////////////////////////////////////////////////////////////////////////////////////
96
  case 'seopress-setup':
97
  include_once dirname( __FILE__ ) . '/inc/admin/admin-wizard.php';
98
  break;
99
+ default :
100
+ break;
101
  }
102
  }
103
  }