SEOPress - Version 0.2

Version Description

  • INFO Improve SEOPress Metaboxe UI/UX
  • INFO CSS Cleaning
  • FIX Titles tag, meta description and meta robots
  • FIX Test site visibility in Reading Options before applying Titles & Metas settings
  • FIX Security Allowing Direct File Access to plugin files
  • FIX No more calling core loading files directly
  • FIX Import / Export Tool
Download this release

Release Info

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

Version 0.2

assets/css/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
assets/css/seopress.css ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*************************************************************************************************/
2
+ /* Metaboxe in CPT */
3
+ /*************************************************************************************************/
4
+ #seopress_cpt .ui-tabs .ui-tabs-nav {
5
+ display: inline-block;
6
+ height: 26px;
7
+ position: relative;
8
+ width: 100%;
9
+ z-index: 50;
10
+ margin: 0;
11
+ padding: 0;
12
+ }
13
+ #seopress_cpt .ui-helper-clearfix:after {
14
+ content:none;
15
+ }
16
+ #seopress_cpt .ui-tabs .ui-tabs-panel {
17
+ background: none repeat scroll 0 0 #FFFFFF;
18
+ border: 1px solid #DDDDDD;
19
+ border-radius: 0 3px 3px 3px;
20
+ display: inline-block;
21
+ padding: 1em 1.4em;
22
+ width: 100%;
23
+ box-sizing: border-box;
24
+ }
25
+ #seopress_cpt .ui-tabs .ui-tabs-nav li, #seopress_cpt .ui-tabs-anchor {
26
+ cursor:pointer !important;
27
+ }
28
+ #seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active {
29
+ background: none repeat scroll 0 0 #FFFFFF;
30
+ border-color: #DDDDDD #DDDDDD #FFFFFF;
31
+ border-image: none;
32
+ border-style: solid;
33
+ border-width: 1px;
34
+ position: relative;
35
+ z-index: 60;
36
+ cursor:pointer;
37
+ }
38
+ #seopress_cpt #tabs-1 label,
39
+ #seopress_cpt #tabs-2 label[for=seopress_robots_canonical_meta],
40
+ #seopress_cpt #tabs-3 label,
41
+ #seopress_cpt .subsection-title {
42
+ border-bottom: 1px solid #DDDDDD;
43
+ display: block;
44
+ margin: 20px 0 5px;
45
+ }
46
+ #seopress_cpt .wp-color-result {
47
+ margin:0;
48
+ }
49
+ #seopress_cpt #tabs-1 input,
50
+ #seopress_cpt #tabs-2 input[type=text],
51
+ #seopress_cpt #tabs-3 textarea,
52
+ #seopress_cpt #tabs-3 input[type=text] {
53
+ width:100%;
54
+ }
55
+ #seopress_cpt select {
56
+ width:300px;
57
+ }
58
+ #seopress_cpt .mandatory {
59
+ color: #cc0000;
60
+ }
61
+ #seopress_cpt .box-left {
62
+ float: left;
63
+ width: 49%;
64
+ margin-right: 1%;
65
+ }
66
+ #seopress_cpt .box-right {
67
+ float: left;
68
+ width: 49%;
69
+ margin-left: 1%;
70
+ }
71
+ #seopress_cpt .google-snippet-preview .snippet-title {
72
+ color: rgb(26, 13, 171);
73
+ font-family: arial,sans-serif;
74
+ font-size: 18px;
75
+ font-weight: 400;
76
+ line-height: 21.6px;
77
+ text-decoration: underline;
78
+ }
79
+ #seopress_cpt .google-snippet-preview .snippet-permalink {
80
+ color: rgb(0, 102, 33);
81
+ font-family: arial,sans-serif;
82
+ font-size: 14px;
83
+ font-style: normal;
84
+ font-weight: 400;
85
+ line-height: 16px;
86
+ }
87
+ #seopress_cpt .google-snippet-preview .snippet-description {
88
+ color: rgb(84, 84, 84);
89
+ font-family: arial,sans-serif;
90
+ font-size: 13px;
91
+ font-weight: 400;
92
+ line-height: 18.2px;
93
+ }
94
+
95
+ /*************************************************************************************************/
96
+ /* Admin - Tabs */
97
+ /*************************************************************************************************/
98
+ #seopress_cpt .ui-tabs {
99
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
100
+ padding: .2em;
101
+ }
102
+ #seopress_cpt .ui-tabs .ui-tabs-nav li {
103
+ list-style: none;
104
+ float: left;
105
+ position: relative;
106
+ top: 0;
107
+ margin: 1px .2em 0 0;
108
+ border-bottom-width: 0;
109
+ padding: 0;
110
+ white-space: nowrap;
111
+ }
112
+ #seopress_cpt .ui-tabs .ui-tabs-nav li a {
113
+ float: left;
114
+ padding: 0.38em 1em;
115
+ text-decoration: none;
116
+ }
117
+ #seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active {
118
+ margin-bottom: -1px;
119
+ padding-bottom: 1px;
120
+ }
121
+ #seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
122
+ #seopress_cpt .ui-tabs .ui-tabs-nav li.ui-state-disabled a,
123
+ #seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
124
+ cursor: text;
125
+ }
126
+ #seopress_cpt .ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
127
+ #seopress_cpt .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
128
+ cursor: pointer;
129
+ }
130
+ #seopress_cpt .ui-tabs-vertical { width: 55em; }
131
+ #seopress_cpt .ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; }
132
+ #seopress_cpt .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
133
+ #seopress_cpt .ui-tabs-vertical .ui-tabs-nav li a { display:block; }
134
+ #seopress_cpt .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
135
+ #seopress_cpt .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;}
136
+
137
+ /*************************************************************************************************/
138
+ /* Admin - Options panel */
139
+ /*************************************************************************************************/
140
+ #seopress-header {
141
+ margin: 0 10px 40px;
142
+ }
143
+ #seopress-header #seopress-admin h1 {
144
+ background: url("../img/logo-seopress.png") no-repeat scroll 0 0 / contain rgba(0, 0, 0, 0);
145
+ font-size: 20px;
146
+ font-weight: bold;
147
+ line-height: 80px;
148
+ margin: 30px 0;
149
+ height: 50px;
150
+ }
151
+ #seopress-header #seopress-admin h1 .seopress-info-version {
152
+ position: relative;
153
+ left: 270px;
154
+ top: -10px;
155
+ }
156
+ #seopress-header #seopress-admin .wpc-info-version {
157
+ font-size: 14px;
158
+ left: 310px;
159
+ position: absolute;
160
+ text-indent: 0;
161
+ top: 85px;
162
+ }
163
+ #seopress-header #seopress-admin #seopress-notice {
164
+ width: 63%;
165
+ }
166
+ #seopress-header #seopress-admin #seopress-notice p {
167
+ font-size: 16px;
168
+ }
169
+ #seopress-header #seopress-admin #seopress-notice .dashicons {
170
+ color: #444;
171
+ text-decoration: none;
172
+ }
173
+ #seopress-header #seopress-admin #seopress-notice p.small {
174
+ font-size: 13px;
175
+ display: inline;
176
+ }
177
+ #seopress-header #seopress-admin #seopress-notice .wporg-ratings {
178
+ display: inline;
179
+ }
180
+ .seopress-option .seopress-settings {
181
+ float: left;
182
+ max-width: 750px;
183
+ width: 100%;
184
+ }
185
+ .seopress-option #seopress-refresh,
186
+ .seopress-option #seopress-edd-license-btn {
187
+ float: left;
188
+ }
189
+ .wp-admin-ui_page_seopress-import-export .postbox {
190
+ margin-right: 20px;
191
+ }
192
+ .seopress-option #side-sortables .accordion-section-content {
193
+ padding: 0;
194
+ }
195
+ .seopress-option .seopress-settings label {
196
+ margin: 0 0 0 10px;
197
+ }
198
+ .seopress-tab {
199
+ display: none;
200
+ }
201
+ .seopress-tab.active {
202
+ display: block;
203
+ }
204
+ .seopress-option input[type="text"],
205
+ .seopress-option input[type="password"],
206
+ .seopress-option textarea {
207
+ min-width: 400px;
208
+ }
209
+ .seopress-option textarea {
210
+ min-height: 100px;
211
+ }
212
+ .seopress-option #side-sortables .highlight {
213
+ border: 1px dashed #ccc;
214
+ display: block;
215
+ width:382px;
216
+ height: 40px;
217
+ background: transparent;
218
+ }
219
+ .seopress-option #side-sortables .accordion-section {
220
+ margin-bottom: 9px;
221
+ width: 382px;
222
+ }
223
+ .seopress-option #side-sortables .accordion-section h3 {
224
+ cursor: move;
225
+ border: 1px solid #E5E5E5;
226
+ background: #FAFAFA;
227
+ }
228
+ .seopress-option #side-sortables .accordion-section .inside {
229
+ padding: 10px 10px 24px 10px;
230
+ border-width: 0 1px 1px;
231
+ border-style: solid;
232
+ box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.04);
233
+ border-color: rgb(229, 229, 229);
234
+ display: inline-block;
235
+ width: calc(100% - 22px);
236
+ height: 100%;
237
+ }
238
+ .seopress-option #side-sortables .accordion-section .inside ul {
239
+ padding-left: 10px;
240
+ margin-bottom: 0px;
241
+ padding-top: 2px;
242
+ padding-bottom: 2px;
243
+ }
244
+ .seopress-option #side-sortables .accordion-section .inside ul li {
245
+ border-left: 2px solid rgb(204, 204, 204);
246
+ padding-left: 10px;
247
+ margin-bottom: 10px;
248
+ }
249
+ .seopress-option #side-sortables .accordion-section .inside ul li:first-child {
250
+ border-bottom: 1px dotted #E5E5E5;
251
+ border-left: 0;
252
+ padding-bottom: 10px;
253
+ font-weight: bold;
254
+ margin-left:-15px;
255
+ margin-bottom: 10px;
256
+ }
257
+ .seopress-notice #message {
258
+ margin: 5px 10px 2px 0;
259
+ }
260
+ .seopress-page-list {
261
+ margin: 0 0 0 -16px;
262
+ }
263
+ .seopress-page-list .dashicons {
264
+ vertical-align: middle;
265
+ margin-right: 5px;
266
+ }
267
+ .seopress-page-list td {
268
+ vertical-align: top;
269
+ border: 1px solid #CCC;
270
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.25);
271
+ width: 25%;
272
+ max-width: 250px;
273
+ min-width: 200px;
274
+ }
275
+ .seopress-page-list td .img-tool {
276
+ height: 125px;
277
+ width: 100%;
278
+ background: #747474;
279
+ }
280
+ .seopress-page-list td .img-tool .dashicons {
281
+ color: #FFF;
282
+ font-size: 100px;
283
+ text-align: center;
284
+ vertical-align: middle;
285
+ width: 100%;
286
+ height: 130px;
287
+ line-height: 130px;
288
+ }
289
+ .seopress-page-list td .inner {
290
+ margin: 20px;
291
+ display: block;
292
+ }
293
+ .seopress-page-list td h4 {
294
+ margin: 0;
295
+ font-size: 16px;
296
+ font-weight: bold;
297
+ }
298
+ .seopress-page-list td h4 .dashicons {
299
+ font-size: 16px;
300
+ margin-left: 5px;
301
+ vertical-align: middle;
302
+ }
303
+ .seopress-page-list a {
304
+ color: #333;
305
+ text-decoration: none;
306
+ }
307
+ .seopress-page-list a:hover {
308
+ text-decoration: none;
309
+ color: #09C;
310
+ }
311
+ .seopress-option .seopress-table {
312
+ background: #FFF none repeat scroll 0% 0%;
313
+ border: 1px solid #ccc;
314
+ }
315
+ .seopress-option .seopress-table th {
316
+ padding: 15px 10px;
317
+ vertical-align: middle;
318
+ }
319
+ .wp-admin-ui_page_seopress-roles .seopress-option .seopress-table th {
320
+ min-width: 200px;
321
+ }
322
+ .seopress-option .seopress-table .seopress-settings-section {
323
+ background: #f1f1f1;
324
+ }
325
+ .seopress-option .seopress-table .seopress-table-head td {
326
+ border-bottom: 1px solid #ccc;
327
+ font-weight: bold;
328
+ background: #f1f1f1;
329
+ }
330
+ #seopress-admin .wpalacarte-banner {
331
+ position: absolute;
332
+ right: 28px;
333
+ top: 10px;
334
+ height: 200px;
335
+ width: auto;
336
+ }
337
+ .seopress-option input[type="text"].seopress-admin-menu-input {
338
+ min-width: inherit;
339
+ width: 100%;
340
+ }
assets/img/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
assets/img/logo-seopress.png ADDED
Binary file
assets/img/wpalacarte-300x250-EN@2x.png ADDED
Binary file
assets/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
assets/js/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
assets/js/seopress-media-uploader.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($){
2
+ var mediaUploader;
3
+
4
+ $('#seopress_social_fb_img_upload').click(function(e) {
5
+ e.preventDefault();
6
+ // If the uploader object has already been created, reopen the dialog
7
+ if (mediaUploader) {
8
+ mediaUploader.open();
9
+ return;
10
+ }
11
+ // Extend the wp.media object
12
+ mediaUploader = wp.media.frames.file_frame = wp.media({
13
+ title: 'Choose Image',
14
+ button: {
15
+ text: 'Choose Image'
16
+ }, multiple: false });
17
+
18
+ // When a file is selected, grab the URL and set it as the text field's value
19
+ mediaUploader.on('select', function() {
20
+ attachment = mediaUploader.state().get('selection').first().toJSON();
21
+ $('#seopress_social_fb_img_meta').val(attachment.url);
22
+ });
23
+
24
+ // Open the uploader dialog
25
+ mediaUploader.open();
26
+ });
27
+ });
28
+
29
+ jQuery(document).ready(function($){
30
+ var mediaUploader;
31
+ $('#seopress_social_twitter_img_upload').click(function(e) {
32
+ e.preventDefault();
33
+ // If the uploader object has already been created, reopen the dialog
34
+ if (mediaUploader) {
35
+ mediaUploader.open();
36
+ return;
37
+ }
38
+ // Extend the wp.media object
39
+ mediaUploader = wp.media.frames.file_frame = wp.media({
40
+ title: 'Choose Image',
41
+ button: {
42
+ text: 'Choose Image'
43
+ }, multiple: false });
44
+
45
+ // When a file is selected, grab the URL and set it as the text field's value
46
+ mediaUploader.on('select', function() {
47
+ attachment = mediaUploader.state().get('selection').first().toJSON();
48
+ $('#seopress_social_twitter_img_meta').val(attachment.url);
49
+ });
50
+ // Open the uploader dialog
51
+ mediaUploader.open();
52
+ });
53
+ });
54
+
55
+ jQuery(document).ready(function($){
56
+ var mediaUploader;
57
+ $('#seopress_social_knowledge_img_upload').click(function(e) {
58
+ e.preventDefault();
59
+ // If the uploader object has already been created, reopen the dialog
60
+ if (mediaUploader) {
61
+ mediaUploader.open();
62
+ return;
63
+ }
64
+ // Extend the wp.media object
65
+ mediaUploader = wp.media.frames.file_frame = wp.media({
66
+ title: 'Choose Image',
67
+ button: {
68
+ text: 'Choose Image'
69
+ }, multiple: false });
70
+
71
+ // When a file is selected, grab the URL and set it as the text field's value
72
+ mediaUploader.on('select', function() {
73
+ attachment = mediaUploader.state().get('selection').first().toJSON();
74
+ $('#seopress_social_knowledge_img_meta').val(attachment.url);
75
+ });
76
+ // Open the uploader dialog
77
+ mediaUploader.open();
78
+ });
79
+ });
assets/js/seopress-tabs.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ if(typeof sessionStorage!='undefined') {
3
+ var seopress_tab_session_storage = sessionStorage.getItem("seopress_titles_tab");
4
+ if (seopress_tab_session_storage) {
5
+ jQuery('#seopress-tabs').find('.nav-tab.nav-tab-active').removeClass("nav-tab-active");
6
+ jQuery('#seopress-tabs').find('.seopress-tab.active').removeClass("active");
7
+
8
+ jQuery('#'+seopress_tab_session_storage+'-tab').addClass("nav-tab-active");
9
+ jQuery('#'+seopress_tab_session_storage).addClass("active");
10
+ } else {
11
+ //Default TAB
12
+ jQuery('#tab_seopress_titles_home-tab').addClass("nav-tab-active");
13
+ jQuery('#tab_seopress_titles_home').addClass("active");
14
+ }
15
+ };
16
+ jQuery("#seopress-tabs").find("a.nav-tab").click(function(e){
17
+ e.preventDefault();
18
+ var hash = jQuery(this).attr('href').split('#tab=')[1];
19
+
20
+ jQuery('#seopress-tabs').find('.nav-tab.nav-tab-active').removeClass("nav-tab-active");
21
+ jQuery('#'+hash+'-tab').addClass("nav-tab-active");
22
+
23
+
24
+ sessionStorage.setItem("seopress_titles_tab", hash);
25
+
26
+ jQuery('#seopress-tabs').find('.seopress-tab.active').removeClass("active");
27
+ jQuery('#'+hash).addClass("active");
28
+ });
29
+ });
assets/js/seopress-tabs2.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ $("#seopress-tabs .hidden").removeClass('hidden');
3
+ $("#seopress-tabs").tabs();
4
+ });
assets/js/seopress-tabs3.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ if(typeof sessionStorage!='undefined') {
3
+ var seopress_tab_session_storage = sessionStorage.getItem("seopress_social_tab");
4
+ if (seopress_tab_session_storage) {
5
+ jQuery('#seopress-tabs').find('.nav-tab.nav-tab-active').removeClass("nav-tab-active");
6
+ jQuery('#seopress-tabs').find('.seopress-tab.active').removeClass("active");
7
+
8
+ jQuery('#'+seopress_tab_session_storage+'-tab').addClass("nav-tab-active");
9
+ jQuery('#'+seopress_tab_session_storage).addClass("active");
10
+ } else {
11
+ //Default TAB
12
+ jQuery('#tab_seopress_social_knowledge-tab').addClass("nav-tab-active");
13
+ jQuery('#tab_seopress_social_knowledge').addClass("active");
14
+ }
15
+ };
16
+ jQuery("#seopress-tabs").find("a.nav-tab").click(function(e){
17
+ e.preventDefault();
18
+ var hash = jQuery(this).attr('href').split('#tab=')[1];
19
+
20
+ jQuery('#seopress-tabs').find('.nav-tab.nav-tab-active').removeClass("nav-tab-active");
21
+ jQuery('#'+hash+'-tab').addClass("nav-tab-active");
22
+
23
+
24
+ sessionStorage.setItem("seopress_social_tab", hash);
25
+
26
+ jQuery('#seopress-tabs').find('.seopress-tab.active').removeClass("active");
27
+ jQuery('#'+hash).addClass("active");
28
+ });
29
+ });
assets/js/seopress-tabs4.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ if(typeof sessionStorage!='undefined') {
3
+ var seopress_tab_session_storage = sessionStorage.getItem("seopress_xml_sitemap_tab");
4
+ if (seopress_tab_session_storage) {
5
+ jQuery('#seopress-tabs').find('.nav-tab.nav-tab-active').removeClass("nav-tab-active");
6
+ jQuery('#seopress-tabs').find('.seopress-tab.active').removeClass("active");
7
+
8
+ jQuery('#'+seopress_tab_session_storage+'-tab').addClass("nav-tab-active");
9
+ jQuery('#'+seopress_tab_session_storage).addClass("active");
10
+ } else {
11
+ //Default TAB
12
+ jQuery('#tab_seopress_xml_sitemap_general-tab').addClass("nav-tab-active");
13
+ jQuery('#tab_seopress_xml_sitemap_general').addClass("active");
14
+ }
15
+ };
16
+ jQuery("#seopress-tabs").find("a.nav-tab").click(function(e){
17
+ e.preventDefault();
18
+ var hash = jQuery(this).attr('href').split('#tab=')[1];
19
+
20
+ jQuery('#seopress-tabs').find('.nav-tab.nav-tab-active').removeClass("nav-tab-active");
21
+ jQuery('#'+hash+'-tab').addClass("nav-tab-active");
22
+
23
+
24
+ sessionStorage.setItem("seopress_xml_sitemap_tab", hash);
25
+
26
+ jQuery('#seopress-tabs').find('.seopress-tab.active').removeClass("active");
27
+ jQuery('#'+hash).addClass("active");
28
+ });
29
+ });
contributors.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ Great people who contributed to this plugin :
2
+
3
+ Developers:
4
+ - Benjamin Denis: contact@seopress.org / @wpcloudy
inc/admin/admin-metaboxes.php ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ defined( 'ABSPATH' ) or die( 'Please don&rsquo;t call the plugin directly. Thanks :)' );
4
+
5
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
6
+ //Display metabox in Custom Post Type
7
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
8
+
9
+ add_action('add_meta_boxes','seopress_init_metabox');
10
+ function seopress_init_metabox(){
11
+ add_meta_box('seopress_cpt', __('SEOPress','seopress'), 'seopress_cpt', seopress_get_post_types(), 'advanced');
12
+ }
13
+
14
+ function seopress_cpt($post){
15
+ $seopress_titles_title = get_post_meta($post->ID,'_seopress_titles_title',true);
16
+ $seopress_titles_desc = get_post_meta($post->ID,'_seopress_titles_desc',true);
17
+ $seopress_robots_index = get_post_meta($post->ID,'_seopress_robots_index',true);
18
+ $seopress_robots_follow = get_post_meta($post->ID,'_seopress_robots_follow',true);
19
+ $seopress_robots_odp = get_post_meta($post->ID,'_seopress_robots_odp',true);
20
+ $seopress_robots_imageindex = get_post_meta($post->ID,'_seopress_robots_imageindex',true);
21
+ $seopress_robots_archive = get_post_meta($post->ID,'_seopress_robots_archive',true);
22
+ $seopress_robots_snippet = get_post_meta($post->ID,'_seopress_robots_snippet',true);
23
+ $seopress_robots_canonical = get_post_meta($post->ID,'_seopress_robots_canonical',true);
24
+ $seopress_social_fb_title = get_post_meta($post->ID,'_seopress_social_fb_title',true);
25
+ $seopress_social_fb_desc = get_post_meta($post->ID,'_seopress_social_fb_desc',true);
26
+ $seopress_social_fb_img = get_post_meta($post->ID,'_seopress_social_fb_img',true);
27
+ $seopress_social_twitter_title = get_post_meta($post->ID,'_seopress_social_twitter_title',true);
28
+ $seopress_social_twitter_desc = get_post_meta($post->ID,'_seopress_social_twitter_desc',true);
29
+ $seopress_social_twitter_img = get_post_meta($post->ID,'_seopress_social_twitter_img',true);
30
+
31
+ function seopress_titles_title($seopress_titles_title) {
32
+ if ($seopress_titles_title !='') {
33
+ return $seopress_titles_title;
34
+ } else {
35
+ return get_the_title();
36
+ }
37
+ }
38
+
39
+ function seopress_titles_desc($seopress_titles_desc) {
40
+ if ($seopress_titles_desc !='') {
41
+ return $seopress_titles_desc;
42
+ } else {
43
+ global $post;
44
+ return $post->post_content;
45
+ }
46
+ }
47
+
48
+ echo '<div id="seopress-tabs">
49
+ <ul>
50
+ <li><a href="#tabs-1"><span class="dashicons dashicons-editor-table"></span>'. __( 'Titles settings', 'seopress' ) .'</a></li>
51
+ <li><a href="#tabs-2"><span class="dashicons dashicons-admin-generic"></span>'. __( 'Advanced', 'seopress' ) .'</a></li>
52
+ <li><a href="#tabs-3"><span class="dashicons dashicons-share"></span>'. __( 'Social', 'seopress' ) .'</a></li>
53
+ </ul>
54
+
55
+ <div id="tabs-1">
56
+ <div class="box-left">
57
+ <p>
58
+ <label for="seopress_titles_title_meta">'. __( 'Title', 'seopress' ) .'</label>
59
+ <input id="seopress_titles_title_meta" type="text" name="seopress_titles_title" placeholder="'.__('Enter your title','seopress').'" value="'.$seopress_titles_title.'" />
60
+ </p>
61
+ <p>
62
+ <label for="seopress_titles_desc_meta">'. __( 'Meta description', 'seopress' ) .'</label>
63
+ <textarea id="seopress_titles_desc_meta" style="width:100%" name="seopress_titles_desc" placeholder="'.__('Enter your meta description','seopress').'" value="'.$seopress_titles_desc.'">'.$seopress_titles_desc.'</textarea>
64
+ </p>
65
+ </div>
66
+ <div class="box-right">
67
+ <div class="google-snippet-preview">
68
+ <h3>'.__('Google Snippet Preview','seopress').'</h3>
69
+ <p>'. __('This is what your page will look like in Google search results','seopress').'</p>
70
+ <div class="snippet-title">'.seopress_titles_title($seopress_titles_title).'</div>
71
+ <div class="snippet-permalink">'.get_permalink().'</div>
72
+ <div class="snippet-desc">'.seopress_titles_desc($seopress_titles_desc).'</div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ <div id="tabs-2">
77
+ <p>
78
+ <label for="seopress_robots_index_meta">
79
+ <input type="checkbox" name="seopress_robots_index" id="seopress_robots_index_meta" value="yes" '. checked( $seopress_robots_index, 'yes', false ) .' />
80
+ '. __( 'noindex', 'seopress' ) .'
81
+ </label>
82
+ </p>
83
+ <p>
84
+ <label for="seopress_robots_follow_meta">
85
+ <input type="checkbox" name="seopress_robots_follow" id="seopress_robots_follow_meta" value="yes" '. checked( $seopress_robots_follow, 'yes', false ) .' />
86
+ '. __( 'nofollow', 'seopress' ) .'
87
+ </label>
88
+ </p>
89
+ <p>
90
+ <label for="seopress_robots_odp_meta">
91
+ <input type="checkbox" name="seopress_robots_odp" id="seopress_robots_odp_meta" value="yes" '. checked( $seopress_robots_odp, 'yes', false ) .' />
92
+ '. __( 'noodp', 'seopress' ) .'
93
+ </label>
94
+ </p>
95
+ <p>
96
+ <label for="seopress_robots_imageindex_meta">
97
+ <input type="checkbox" name="seopress_robots_imageindex" id="seopress_robots_imageindex_meta" value="yes" '. checked( $seopress_robots_imageindex, 'yes', false ) .' />
98
+ '. __( 'noimageindex', 'seopress' ) .'
99
+ </label>
100
+ </p>
101
+ <p>
102
+ <label for="seopress_robots_archive_meta">
103
+ <input type="checkbox" name="seopress_robots_archive" id="seopress_robots_archive_meta" value="yes" '. checked( $seopress_robots_archive, 'yes', false ) .' />
104
+ '. __( 'noarchive', 'seopress' ) .'
105
+ </label>
106
+ </p>
107
+ <p>
108
+ <label for="seopress_robots_snippet_meta">
109
+ <input type="checkbox" name="seopress_robots_snippet" id="seopress_robots_snippet_meta" value="yes" '. checked( $seopress_robots_snippet, 'yes', false ) .' />
110
+ '. __( 'nosnippet', 'seopress' ) .'
111
+ </label>
112
+ </p>
113
+ <p>
114
+ <label for="seopress_robots_canonical_meta">'. __( 'Canonical URL', 'seopress' ) .'</label>
115
+ <input id="seopress_robots_canonical_meta" type="text" name="seopress_robots_canonical" placeholder="'.__('Enter your Canonical URL','seopress').'" value="'.$seopress_robots_canonical.'" />
116
+ </p>
117
+ </div>
118
+ <div id="tabs-3">
119
+ <span class="dashicons dashicons-facebook-alt"></span>
120
+ <p>
121
+ <label for="seopress_social_fb_title_meta">'. __( 'Facebook Title', 'seopress' ) .'</label>
122
+ <input id="seopress_social_fb_title_meta" type="text" name="seopress_social_fb_title" placeholder="'.__('Enter your Facebook title','seopress').'" value="'.$seopress_social_fb_title.'" />
123
+ </p>
124
+ <p>
125
+ <label for="seopress_social_fb_desc_meta">'. __( 'Facebook description', 'seopress' ) .'</label>
126
+ <textarea id="seopress_social_fb_desc_meta" name="seopress_social_fb_desc" placeholder="'.__('Enter your Facebook description','seopress').'" value="'.$seopress_social_fb_desc.'">'.$seopress_social_fb_desc.'</textarea>
127
+ </p>
128
+ <p>
129
+ <label for="seopress_social_fb_img_meta">'. __( 'Facebook Thumbnail', 'seopress' ) .'</label>
130
+ <input id="seopress_social_fb_img_meta" type="text" name="seopress_social_fb_img" placeholder="'.__('Select your default thumbnail','seopress').'" value="'.$seopress_social_fb_img.'" />
131
+ <input id="seopress_social_fb_img_upload" class="button" type="button" value="'.__('Upload an Image','seopress').'" />
132
+ </p>
133
+ <br/>
134
+ <span class="dashicons dashicons-twitter"></span>
135
+ <p>
136
+ <label for="seopress_social_twitter_title_meta">'. __( 'Twitter Title', 'seopress' ) .'</label>
137
+ <input id="seopress_social_twitter_title_meta" type="text" name="seopress_social_twitter_title" placeholder="'.__('Enter your Twitter title','seopress').'" value="'.$seopress_social_twitter_title.'" />
138
+ </p>
139
+ <p>
140
+ <label for="seopress_social_twitter_desc_meta">'. __( 'Twitter description', 'seopress' ) .'</label>
141
+ <textarea id="seopress_social_twitter_desc_meta" name="seopress_social_twitter_desc" placeholder="'.__('Enter your Twitter description','seopress').'" value="'.$seopress_social_twitter_desc.'">'.$seopress_social_twitter_desc.'</textarea>
142
+ </p>
143
+ <p>
144
+ <label for="seopress_social_twitter_img_meta">'. __( 'Twitter Thumbnail', 'seopress' ) .'</label>
145
+ <input id="seopress_social_twitter_img_meta" type="text" name="seopress_social_twitter_img" placeholder="'.__('Select your default thumbnail','seopress').'" value="'.$seopress_social_twitter_img.'" />
146
+ <input id="seopress_social_twitter_img_upload" class="button" type="button" value="'.__('Upload an Image','seopress').'" />
147
+ </p>
148
+ </div>
149
+ </div>
150
+ ';
151
+ }
152
+
153
+ add_action('save_post','seopress_save_metabox');
154
+ function seopress_save_metabox($post_id){
155
+ if ( 'attachment' !== get_post_type($post_id)) {
156
+ if(isset($_POST['seopress_titles_title'])){
157
+ update_post_meta($post_id, '_seopress_titles_title', esc_html($_POST['seopress_titles_title']));
158
+ }
159
+ if(isset($_POST['seopress_titles_desc'])){
160
+ update_post_meta($post_id, '_seopress_titles_desc', esc_html($_POST['seopress_titles_desc']));
161
+ }
162
+ if( isset( $_POST[ 'seopress_robots_index' ] ) ) {
163
+ update_post_meta( $post_id, '_seopress_robots_index', 'yes' );
164
+ } else {
165
+ delete_post_meta( $post_id, '_seopress_robots_index', '' );
166
+ }
167
+ if( isset( $_POST[ 'seopress_robots_follow' ] ) ) {
168
+ update_post_meta( $post_id, '_seopress_robots_follow', 'yes' );
169
+ } else {
170
+ delete_post_meta( $post_id, '_seopress_robots_follow', '' );
171
+ }
172
+ if( isset( $_POST[ 'seopress_robots_odp' ] ) ) {
173
+ update_post_meta( $post_id, '_seopress_robots_odp', 'yes' );
174
+ } else {
175
+ delete_post_meta( $post_id, '_seopress_robots_odp', '' );
176
+ }
177
+ if( isset( $_POST[ 'seopress_robots_imageindex' ] ) ) {
178
+ update_post_meta( $post_id, '_seopress_robots_imageindex', 'yes' );
179
+ } else {
180
+ delete_post_meta( $post_id, '_seopress_robots_imageindex', '' );
181
+ }
182
+ if( isset( $_POST[ 'seopress_robots_archive' ] ) ) {
183
+ update_post_meta( $post_id, '_seopress_robots_archive', 'yes' );
184
+ } else {
185
+ delete_post_meta( $post_id, '_seopress_robots_archive', '' );
186
+ }
187
+ if( isset( $_POST[ 'seopress_robots_snippet' ] ) ) {
188
+ update_post_meta( $post_id, '_seopress_robots_snippet', 'yes' );
189
+ } else {
190
+ delete_post_meta( $post_id, '_seopress_robots_snippet', '' );
191
+ }
192
+ if(isset($_POST['seopress_robots_canonical'])){
193
+ update_post_meta($post_id, '_seopress_robots_canonical', esc_html($_POST['seopress_robots_canonical']));
194
+ }
195
+ if(isset($_POST['seopress_social_fb_title'])){
196
+ update_post_meta($post_id, '_seopress_social_fb_title', esc_html($_POST['seopress_social_fb_title']));
197
+ }
198
+ if(isset($_POST['seopress_social_fb_desc'])){
199
+ update_post_meta($post_id, '_seopress_social_fb_desc', esc_html($_POST['seopress_social_fb_desc']));
200
+ }
201
+ if(isset($_POST['seopress_social_fb_img'])){
202
+ update_post_meta($post_id, '_seopress_social_fb_img', esc_html($_POST['seopress_social_fb_img']));
203
+ }
204
+ if(isset($_POST['seopress_social_twitter_title'])){
205
+ update_post_meta($post_id, '_seopress_social_twitter_title', esc_html($_POST['seopress_social_twitter_title']));
206
+ }
207
+ if(isset($_POST['seopress_social_twitter_desc'])){
208
+ update_post_meta($post_id, '_seopress_social_twitter_desc', esc_html($_POST['seopress_social_twitter_desc']));
209
+ }
210
+ if(isset($_POST['seopress_social_twitter_img'])){
211
+ update_post_meta($post_id, '_seopress_social_twitter_img', esc_html($_POST['seopress_social_twitter_img']));
212
+ }
213
+ }
214
+ }
215
+ ?>
inc/admin/admin.php ADDED
@@ -0,0 +1,1754 @@