SEOPress - Version 3.8.7

Version Description

Read our blog post * NEW Import post and term metadata from Premium SEO Pack plugin (https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-premium-seo-pack-to-seopress/) * NEW Italian translation (by entersys.it) * NEW Custom breadcrumbs title for term taxonomy * NEW Custom og:image for custom post type archive * NEW 'seopress_remove_pro_settings_tabs' hook to hide specific SEOPress PRO settings tabs (https://www.seopress.org/support/hooks/hide-specific-pro-tabs-settings/) * NEW 'seopress_sitemaps_news_keywords_value' hook to filter keywords in News sitemap (https://www.seopress.org/support/hooks/filter-keywords-in-xml-news-sitemap/) * NEW Sol currency for schemas * INFO Redirections: import CSV file with comma or semicolon separator * INFO Improve compatibility with BeTheme WordPress theme * INFO Improve searchbox in Redirections CPT * INFO Improve compatibility with the Block Editor (Gutenberg) * INFO Add a warning indicator if the post is noindex on Advanced tab (SEO metabox) * INFO i18n translations * INFO "keywords in permalinks" verification removed for homepage (because no slug) * INFO Refactoring import tool * INFO Refactoring GA custom dimensions * INFO Display Video sitemap tab in SEO metabox only if Video sitemap option is enabled * INFO Update plugin updater * INFO Redirects are now priority over 404 if redirect identical to a 404 error from the list of redirects * FIX Product currency for automatic schema if manually set * FIX Trailing slash for News and Video XML sitemaps (no impact for SEO/Search Console) * FIX White label: "Remove "You like SEOPress? Don't forget to rate it 5 stars!" on SEOPress post type (Schemas, Redirections...) * FIX Display content before / after each post in RSS feeds if full text displayed * FIX Redirections with status "published" only are now redirected * FIX Import redirections from CSV whose URLs contains + signs

Download this release

Release Info

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

Code changes from version 3.8.6 to 3.8.7

assets/css/seopress.css CHANGED
@@ -236,6 +236,7 @@
236
  position: relative;
237
  }
238
 
 
239
  #seopress_content_analysis .gr-analysis-title .impact {
240
  position: absolute;
241
  left: 10px;
@@ -263,6 +264,7 @@
263
  box-shadow: 0 0 5px #e39f48;
264
  }
265
 
 
266
  #seopress_content_analysis .gr-analysis .impact.high {
267
  background: #e25950;
268
  box-shadow: 0 0 5px #e25950;
@@ -278,6 +280,14 @@
278
  font-weight: bold;
279
  }
280
 
 
 
 
 
 
 
 
 
281
  #seopress_content_analysis .gr-analysis-title button {
282
  background: #fff;
283
  border: 0;
@@ -838,7 +848,7 @@
838
  border-bottom: none;
839
  }
840
 
841
- #seopress_cpt .wrap-seopress-counters, #seopress_pro_cpt .wrap-seopress-counters {
842
  text-align: right;
843
  background: #e9ecef;
844
  padding: 2px 5px;
@@ -847,7 +857,7 @@
847
  justify-content: flex-end;
848
  border-radius: 0 0 .25rem .25rem;
849
  }
850
- #seopress_cpt .sp-progress, #seopress_pro_cpt .sp-progress {
851
  display: -ms-flexbox;
852
  display: flex;
853
  height: 1rem;
@@ -856,7 +866,7 @@
856
  background-color: #e9ecef;
857
  border-radius: .25rem .25rem 0 0;
858
  }
859
- #seopress_cpt .sp-progress-bar, #seopress_pro_cpt .sp-progress-bar {
860
  display: -ms-flexbox;
861
  display: flex;
862
  -ms-flex-direction: column;
236
  position: relative;
237
  }
238
 
239
+ #seopress_cpt .impact,
240
  #seopress_content_analysis .gr-analysis-title .impact {
241
  position: absolute;
242
  left: 10px;
264
  box-shadow: 0 0 5px #e39f48;
265
  }
266
 
267
+ #seopress_cpt .impact.high,
268
  #seopress_content_analysis .gr-analysis .impact.high {
269
  background: #e25950;
270
  box-shadow: 0 0 5px #e25950;
280
  font-weight: bold;
281
  }
282
 
283
+ #seopress_cpt .impact.high {
284
+ position: relative;
285
+ top: calc(50% - 18px);
286
+ display: inline-block;
287
+ left: inherit;
288
+ right: -10px;
289
+ }
290
+
291
  #seopress_content_analysis .gr-analysis-title button {
292
  background: #fff;
293
  border: 0;
848
  border-bottom: none;
849
  }
850
 
851
+ #seopress_cpt .wrap-seopress-counters, #seopress_pro_cpt .wrap-seopress-counters, .seopress-styles .wrap-seopress-counters, .seopress-setup .wrap-seopress-counters {
852
  text-align: right;
853
  background: #e9ecef;
854
  padding: 2px 5px;
857
  justify-content: flex-end;
858
  border-radius: 0 0 .25rem .25rem;
859
  }
860
+ #seopress_cpt .sp-progress, #seopress_pro_cpt .sp-progress, .seopress-styles .sp-progress, .seopress-setup .sp-progress {
861
  display: -ms-flexbox;
862
  display: flex;
863
  height: 1rem;
866
  background-color: #e9ecef;
867
  border-radius: .25rem .25rem 0 0;
868
  }
869
+ #seopress_cpt .sp-progress-bar, #seopress_pro_cpt .sp-progress-bar, .seopress-styles .sp-progress-bar, .seopress-setup .sp-progress-bar {
870
  display: -ms-flexbox;
871
  display: flex;
872
  -ms-flex-direction: column;
assets/css/seopress.min.css CHANGED
@@ -1 +1 @@
1
- #adminmenu div.wp-menu-image.dashicons-admin-seopress::before,#seopress-header #seopress-admin h1::before{content:"\e800";font-family:seopress!important;font-weight:700;font-size:12px;line-height:20px}#seopress-header #seopress-admin h1::before,.seopress-page-list .seopress-feature h3,.seopress-styles .seopress-option h1{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}@font-face{font-family:seopress;src:url(../fonts/seopress.eot?81521271);src:url(../fonts/seopress.eot?81521271#iefix) format('embedded-opentype'),url(../fonts/seopress.woff?81521271) format('woff2'),url(../fonts/seopress.woff?81521271) format('woff'),url(../fonts/seopress.ttf?81521271) format('truetype'),url(../fonts/seopress.svg?81521271#seopress) format('svg');font-weight:400;font-style:normal}[class*=" icon-seopress"],[class^=icon-seopress-]{font-family:seopress!important;font-size:14px!important;line-height:24px!important}#tab_seopress_titles_archives .form-table th:empty,#tab_seopress_titles_single .form-table th:empty,#tab_seopress_titles_tax .form-table th:empty{display:none}.icon-seopress-seopress:before{content:"\e800"}.sp-tooltip{position:relative;margin-left:5px;display:inline-block;cursor:help;vertical-align:bottom;text-align:center}.sp-tooltip .dashicons{color:#666}.sp-tooltip .sp-tooltiptext{visibility:hidden;position:absolute;z-index:999999999;width:300px;right:-303px;padding:20px;top:25px;font-weight:400;box-shadow:0 3px 30px rgba(25,30,35,.1);border:1px solid #e2e4e7;background:#fff;word-break:break-word}.sp-tooltip .sp-tooltiptext::before{border:8px solid #e2e4e7;top:-8px}.sp-tooltip .sp-tooltiptext::after{border:8px solid #fff;top:-6px}.sp-tooltip .sp-tooltiptext::after,.sp-tooltip .sp-tooltiptext::before{border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;margin-left:-10px;content:"";position:absolute;height:0;width:0;line-height:0;left:30px}.sp-tooltip:hover .sp-tooltiptext{visibility:visible}.sp-tooltip .sp-tooltip-headings{font-size:18px;font-weight:600;margin-bottom:20px;display:block}.sp-tooltip .sp-tooltip-desc{margin-bottom:20px;display:block;border-bottom:1px solid #e2e4e7;padding-bottom:20px;font-size:13px}.sp-tooltip .sp-tooltip-code{font-family:Menlo,Monaco,Andale Mono,Courier New,monospace;display:block;word-break:break-all;color:#42b72a;font-size:11px}.analysis-score .sp-tooltip{vertical-align:middle;font-size:.75em}#seopress_content_analysis a{color:#0073aa}#seopress_content_analysis .wrap-seopress-analysis{display:inline-block;width:100%}#seopress_content_analysis .col-left{width:calc(50% - 30px);float:left;margin-right:30px}#seopress_content_analysis .col-right{float:right;width:50%}#seopress_content_analysis #seopress_suggestions{display:inline-block;width:100%;margin:0;height:auto;padding:20px 0}#seopress_content_analysis #seopress_suggestions li{list-style:none;margin:5px;display:inline-block}#seopress_content_analysis .analysis-score{clear:both;border-top:1px solid #e2e4e7;display:flex;justify-content:space-between;align-items:center}.column-seopress_score .analysis-score{display:flex;align-content:center}#seopress_content_analysis .analysis-score p,.column-seopress_score .analysis-score p{font-weight:700;font-size:1.2em}#seopress_content_analysis .analysis-score svg,.column-seopress_score .analysis-score svg{display:inline-block;height:30px;width:30px;margin:0;border-radius:100%;position:relative;font-weight:600;shape-rendering:geometricprecision;font-size:.5rem;vertical-align:middle;margin-right:15px}.column-seopress_score .analysis-score p,.column-seopress_score .analysis-score svg{margin:0}@keyframes loadingPulse{0%{stroke:#adc5d2}50%{stroke:#00a0d2}100%{stroke:#adc5d2}}#seopress_content_analysis .analysis-score .loading #bar{stroke-dashoffset:0!important;stroke:#adc5d2!important;animation:loadingPulse 3s infinite ease-in-out}#seopress_content_analysis .analysis-score .good #bar,.column-seopress_score .analysis-score #bar.good{stroke:#46b450}#seopress_content_analysis .analysis-score .notgood #bar,.column-seopress_score .analysis-score #bar.notgood{stroke-dashoffset:565;stroke:#ffb900}#seopress_content_analysis .analysis-score svg circle,.column-seopress_score .analysis-score svg circle{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;stroke:#ccc;stroke-width:2em}#seopress_content_analysis .gr-analysis{clear:both}#seopress_content_analysis .gr-analysis-title{border-top:1px solid #e2e4e7;position:relative}#seopress_content_analysis .gr-analysis-title .impact{position:absolute;left:10px;top:calc(50% - 5px);width:10px;height:10px;border-radius:50px;padding:0;margin:0;border:1px solid #fff}#seopress_content_analysis .gr-analysis .impact.good{background:#46b450;box-shadow:0 0 5px #46b450}#seopress_content_analysis .gr-analysis .impact.low{background:#ffde24;box-shadow:0 0 5px #ffde24}#seopress_content_analysis .gr-analysis .impact.medium{background:#e39f48;box-shadow:0 0 5px #e39f48}#seopress_content_analysis .gr-analysis .impact.high{background:#e25950;box-shadow:0 0 5px #e25950}#seopress_content_analysis .gr-analysis-content .impact.high{background:#e25950;box-shadow:none;color:#fff;padding:2px 4px;margin-left:5px;border-radius:4px;font-weight:700}#seopress_content_analysis .gr-analysis-title button{background:#fff;border:0;cursor:pointer;display:block;margin:0;position:relative;text-align:left;width:100%;padding:15px 30px;align-items:center;transition:all .3s linear}#seopress_content_analysis .gr-analysis-title button:hover{background:#f3f4f5}#seopress_content_analysis .gr-analysis-title button:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-2px;outline:1px dotted #555d66}#seopress_content_analysis .gr-analysis-title button .sp-arrow::after{content:"\f343";font-family:Dashicons;position:absolute;right:10px;top:calc(50% - 7px)}#seopress_content_analysis .gr-analysis-title button.open .sp-arrow::after{content:"\f347"}#seopress_content_analysis .gr-analysis-content{padding:0 1rem .5rem 1rem;display:none;width:100%;border-top:1px solid #e2e4e7;box-sizing:border-box}#seopress_content_analysis h3{margin:0;font-size:1em}#seopress_content_analysis h4{border-bottom:1px solid #e2e4e7;padding-bottom:.5rem;text-transform:uppercase;font-size:.85em;position:-webkit-sticky;position:sticky;top:0;background:#fff}#seopress_content_analysis .wrap-analysis-img ul{display:flex;flex-wrap:wrap}#seopress_content_analysis .wrap-analysis-img ul li{padding:0;text-align:left;cursor:default}#seopress_content_analysis .wrap-analysis-img h4{border-bottom:1px solid #ddd;padding-bottom:10px}#seopress_content_analysis .wrap-analysis-img ul li img{max-width:150px;max-height:150px;object-fit:cover;border:1px solid #f3f4f5;cursor:default;padding:1px}#seopress_cpt .notice{padding:10px 14px}#seopress-analysis-tabs .dashicons,#seopress_cpt .dashicons{vertical-align:middle}#seopress-analysis-tabs{clear:both}#seopress_cpt .inside{margin:0;padding:0}#seopress_cpt .ui-tabs .ui-tabs-nav{display:inline-block;min-height:26px;position:relative;width:100%;z-index:10;margin:0;border-radius:0;padding:0;background:#f3f4f5;border:none}#seopress_cpt .ui-helper-clearfix:after{content:none}.seopress_page_seopress-titles #seopress-tabs .form-table td,.seopress_page_seopress-titles #seopress_content_analysis .form-table td{padding:0}#seopress_cpt .ui-tabs .ui-tabs-panel{background:#fff;border-radius:0;display:inline-block;padding:1em 1.4em;width:100%;box-sizing:border-box}#seopress_content_analysis .dashicons-info,#seopress_cpt .ui-tabs .ui-tabs-panel .dashicons-info,#seopress_pro_cpt .dashicons-info{font-size:16px;vertical-align:middle;height:16px;width:16px}#seopress_cpt .ui-tabs .ui-tabs-nav li,#seopress_cpt .ui-tabs-anchor{cursor:pointer!important}#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active{position:relative;z-index:60;cursor:pointer;border-radius:0;border-bottom:3px solid #0085ba}#seopress_content_analysis label,#seopress_cpt #tabs-1 label,#seopress_cpt #tabs-2 label[for=seopress_robots_breadcrumbs_meta],#seopress_cpt #tabs-2 label[for=seopress_robots_canonical_meta],#seopress_cpt #tabs-2 label[for=seopress_robots_primary_cat_meta],#seopress_cpt #tabs-3 label,#seopress_cpt #tabs-4 label,#seopress_cpt #tabs-5 label,#seopress_cpt #tabs-6 label,#seopress_cpt .subsection-title,#seopress_pro_cpt label{display:block;margin:20px 0 5px;font-weight:700}#seopress_cpt .wp-color-result{margin:0}#seopress_content_analysis input[type=text],#seopress_cpt #tabs-1 input,#seopress_cpt #tabs-2 input[type=text],#seopress_cpt #tabs-3 input[type=text],#seopress_cpt #tabs-3 textarea,#seopress_cpt #tabs-4 input[type=text],#seopress_cpt #tabs-5 input[type=text],#seopress_cpt #tabs-6 input[type=text],#seopress_cpt #tabs-6 textarea{width:100%;display:inline-block}#seopress_cpt #tabs-1 input{width:100%}#seopress_cpt #tabs-6 input[type=number]{width:30%;min-width:200px}#seopress_cpt #tabs-6 #wrap-videos .video:first-child .remove-video{display:none}#seopress_cpt select{width:300px}#seopress_cpt #tabs-4 select{width:250px;display:inline}#seopress_cpt #tabs-4 #seopress_redirections_value_meta{width:calc(100% - 258px);float:right}#seopress_cpt #tabs-6{padding:0}#seopress_cpt #tabs-6 #wrap-videos .video .accordion-section-content,#seopress_cpt #tabs-6>p{padding:0 1.4em}#seopress_cpt #tabs-6 #wrap-videos .video .accordion-section-content{padding:0 1.4em 1em}#seopress_cpt #tabs-6 #wrap-videos .video{border-top:1px solid #eee}#seopress_cpt #tabs-6 #wrap-videos .video .accordion-section-title{border-left:none;border-right:none;font-size:1em;padding:1em 1.4em}#seopress_cpt #tabs-6 #wrap-videos .video:last-child .accordion-section-content,#seopress_cpt #tabs-6 #wrap-videos .video:last-child .accordion-section-title{border-bottom:1px solid #eee}#seopress_cpt #tabs-6 #wrap-videos .video .inside{padding:0}#seopress_cpt #tabs-4 #seopress_redirections_enabled,#seopress_cpt #tabs-5 #seopress_news_disabled,#seopress_cpt #tabs-5 #seopress_news_standout,#seopress_cpt #tabs-6 #seopress_video_disabled,#seopress_cpt #tabs-6 .family-friendly label,#seopress_cpt #tabs-6 .internal_video label{font-weight:400}#seopress_cpt #tabs-6 #wrap-videos .video:nth-child(odd){background:#fdfdfd}#seopress_content_analysis .advise,#seopress_cpt .advise,#seopress_pro_cpt .advise,.seopress-option .advise{margin:5px;display:block;color:red;font-style:italic}#seopress_cpt #tabs-6 #wrap-videos .video .advise{color:#555}#seopress_content_analysis .mandatory,#seopress_cpt .mandatory{color:#c00}#seopress_cpt .box-left{float:left;width:49%;margin-right:1%}#seopress_cpt .box-right{float:left;width:49%;margin-left:1%}#seopress_cpt #tabs-3 .box-left{width:44%}#seopress_cpt #tabs-3 .box-right{width:54%}@media only screen and (max-width:1200px){#seopress_cpt .box-left,#seopress_cpt .box-right{float:none;width:100%;margin:0}}@media only screen and (max-width:1500px){#seopress_cpt #tabs-3 .box-left,#seopress_cpt #tabs-3 .box-right{float:none;width:100%;margin:0}}#edittag #seopress_cpt #tabs-3 .box-left,#edittag #seopress_cpt #tabs-3 .box-right{float:none;width:100%;margin:0}#seopress-tabs .seopress_media_upload,#seopress_pro_cpt .seopress_media_upload{margin-top:.5rem}#seopress_cpt .google-snippet-preview{font-family:arial,sans-serif;word-break:break-all}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-snippet{margin:0 0 10px 0;box-shadow:0 1px 6px rgba(32,33,36,.28);border-radius:8px;padding:12px 16px}#seopress_cpt .google-snippet-preview>p{word-break:normal}#seopress_cpt .google-snippet-preview .snippet-title,#seopress_cpt .google-snippet-preview .snippet-title-custom,#seopress_cpt .google-snippet-preview .snippet-title-default{color:#1a0dab;font-size:18px;font-weight:400;line-height:21.6px}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-title,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-title-custom,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-title-default{font-size:16px;line-height:20px;margin-bottom:12px}#seopress_cpt .google-snippet-preview .snippet-permalink{color:#006621;font-size:14px;font-style:normal;font-weight:400;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#seopress_cpt .google-snippet-preview .wrap-snippet .wrap-m-icon-permalink,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-permalink{display:none}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-m-icon-permalink{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:12px;display:flex}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-m-icon-permalink .snippet-permalink{display:block;color:#3c4043;font-size:12px}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-favicon{margin-right:12px;vertical-align:middle}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-favicon img{width:16px;height:16px;max-width:inherit}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-snippet .snippet-permalink:first-child{color:#3c4043;white-space:nowrap;font-size:12px;display:block}#seopress_cpt .google-snippet-preview .snippet-description,#seopress_cpt .google-snippet-preview .snippet-description-custom,#seopress_cpt .google-snippet-preview .snippet-description-default{color:#545454;font-size:14px;font-weight:400;line-height:18.2px;display:inline}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-description,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-description-custom,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-description-default{color:#3c4043;font-size:14px;line-height:20px}#seopress_cpt .google-snippet-preview .snippet-date{color:grey;display:inline}#seopress_cpt .facebook-snippet-box{color:#4b4f56;font-size:14px;width:524px}#seopress_cpt .facebook-snippet-box .notice,#seopress_cpt .twitter-snippet-box .notice{padding:10px 14px;margin:0 0 10px 0;box-sizing:border-box;width:100%}#seopress_cpt .facebook-snippet-box .notice span,#seopress_cpt .twitter-snippet-box .notice span{font-weight:700}#seopress_cpt .snippet-meta{display:flex;overflow:hidden;max-height:12px}#seopress_cpt .fb-by,#seopress_cpt .snippet-fb-site-name,#seopress_cpt .snippet-fb-url{color:#606770;font-size:12px;white-space:normal;line-height:11px;text-transform:uppercase;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis}#seopress_cpt .fb-sep{padding-left:5px;padding-right:5px;color:#606770;line-height:11px;font-size:12px}#seopress_cpt .facebook-snippet-box .facebook-snippet-text{border:1px solid #dadde1;background-color:#f2f3f5;padding:10px 12px}#seopress_cpt .facebook-snippet-box .title-desc{max-height:46px;overflow:hidden}#seopress_cpt .facebook-snippet-box .snippet-fb-title,#seopress_cpt .facebook-snippet-box .snippet-fb-title-custom,#seopress_cpt .facebook-snippet-box .snippet-fb-title-default{font-size:16px;line-height:20px;margin:3px 0 0;padding-top:2px;color:#1d2129;font-weight:700;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;word-break:break-word;max-height:22px}#seopress_cpt .facebook-snippet-box .snippet-fb-description,#seopress_cpt .facebook-snippet-box .snippet-fb-description-custom,#seopress_cpt .facebook-snippet-box .snippet-fb-description-default{color:#606770;font-size:14px;line-height:20px;word-break:break-word;font-family:Helvetica,Arial,sans-serif;max-height:80px;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;width:100%}#seopress_cpt .facebook-snippet-box img{display:block;height:274px;width:524px;object-fit:cover;background-color:#edeff0;text-align:center;border-bottom:none}#seopress_cpt .twitter-snippet-box{color:#4b4f56;font-size:14px;width:436px}#seopress_cpt .snippet-twitter-url{color:#8899a6;font-size:14px;white-space:normal;line-height:11px;text-transform:uppercase;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis}#seopress_cpt .twitter-snippet-box .twitter-snippet-text{border:1px solid #dadde1;background-color:#fff;padding:10px 12px;border-radius:0 0 10px 10px}#seopress_cpt .twitter-snippet-box .title-desc{max-height:46px;overflow:hidden}#seopress_cpt .twitter-snippet-box .snippet-twitter-img,#seopress_cpt .twitter-snippet-box .snippet-twitter-img-custom,#seopress_cpt .twitter-snippet-box .snippet-twitter-img-default{border-radius:10px 10px 0 0;overflow:hidden}#seopress_cpt .twitter-snippet-box .snippet-twitter-title,#seopress_cpt .twitter-snippet-box .snippet-twitter-title-custom,#seopress_cpt .twitter-snippet-box .snippet-twitter-title-default{font-size:1em;line-height:20px;margin-bottom:5px;max-height:1.3em;color:#000;font-weight:700;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;word-break:break-word}#seopress_cpt .twitter-snippet-box .snippet-twitter-description,#seopress_cpt .twitter-snippet-box .snippet-twitter-description-custom,#seopress_cpt .twitter-snippet-box .snippet-twitter-description-default{color:#000;font-size:14px;line-height:20px;word-break:break-word;font-family:Helvetica,Arial,sans-serif;max-height:80px;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;width:100%}#seopress_cpt .twitter-snippet-box img{display:block;height:200px;width:436px;object-fit:cover;background-color:#edeff0;text-align:center;border-bottom:none}#seopress_cpt .wrap-seopress-counters,#seopress_pro_cpt .wrap-seopress-counters{text-align:right;background:#e9ecef;padding:2px 5px;display:flex;font-size:12px;justify-content:flex-end;border-radius:0 0 .25rem .25rem}#seopress_cpt .sp-progress,#seopress_pro_cpt .sp-progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem .25rem 0 0}#seopress_cpt .sp-progress-bar,#seopress_pro_cpt .sp-progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#0085ba;transition:width .6s ease}#seopress_cpt #seopress_titles_desc_counters,#seopress_cpt #seopress_titles_title_counters,#seopress_pro_cpt #seopress_rich_snippets_articles_counters,#seopress_pro_cpt #seopress_rich_snippets_courses_counters{display:inline;margin-right:5px}#seopress_cpt #seopress_titles_desc_counters_val,#seopress_cpt #seopress_titles_title_counters_val,#seopress_pro_cpt #seopress_rich_snippets_articles_counters_val,#seopress_pro_cpt #seopress_rich_snippets_courses_counters_val{display:inline;font-weight:700}#term-seopress #seopress_cpt{width:95%}.fixed .column-seopress_ps,.fixed .column-seopress_score,.fixed .column-seopress_w3c,.fixed .column-seopress_words{width:6%}.fixed .column-seopress_nofollow,.fixed .column-seopress_noindex{width:8%}@media only screen and (max-width:1200px){.fixed .column-seopress_nofollow,.fixed .column-seopress_noindex,.fixed .column-seopress_ps,.fixed .column-seopress_score,.fixed .column-seopress_w3c,.fixed .column-seopress_words{width:10%}}#seopress_cpt .ui-tabs{position:relative;padding:0;border:none;font-family:inherit;font-size:inherit;display:inline-block;width:100%}#seopress_cpt .ui-tabs .ui-tabs-nav li{list-style:none;display:inline-block;position:relative;top:2px;padding:0 5px;white-space:nowrap;margin:0;border:none;background:0 0}#seopress_cpt .ui-tabs .ui-tabs-nav li a{display:inline-block;padding:5px 10px}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-nav li a,#seopress_cpt .ui-tabs-vertical .ui-tabs-nav li a{display:block}#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:2px;padding-bottom:1px}#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-state-disabled a,#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active a,#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-loading a{color:#191e23;font-weight:700}#seopress_cpt .ui-tabs .ui-tabs-nav li a,#seopress_cpt .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer;color:#191e23;text-decoration:none;height:40px;line-height:40px}#seopress_cpt .ui-tabs-vertical{width:55em}#seopress_cpt .ui-tabs-vertical .ui-tabs-nav{padding:.2em .1em .2em .2em;float:left;width:12em}#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}#seopress_cpt .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active{padding-bottom:0;padding-right:.1em;border-right-width:1px}#seopress_cpt .ui-tabs-vertical .ui-tabs-panel{padding:1em;float:right;width:40em}#seopress_cpt .ui-tabs .ui-tabs-nav li a .dashicons{margin-right:2px}#tab-panel-seopress_titles_help_tab li span{font-weight:700;margin-right:10px}#seopress_content_analysis .dashicons-no-alt,#seopress_content_analysis .dashicons-yes,#seopress_pro_cpt .dashicons-no-alt,#seopress_pro_cpt .dashicons-yes{color:#fff;background:#12bd10;border-radius:50px;margin-right:10px}#seopress_content_analysis .dashicons-no-alt,#seopress_pro_cpt .dashicons-no-alt{background:#e25950}body.seopress-styles{background:#f8fafd}#seopress-admin-tabs.ui-tabs{position:relative;padding:.2em;border:none;font-family:inherit;font-size:inherit}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:-1px .2em 0 0;padding:0;white-space:nowrap;border:none;background:0 0}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li a{float:left;padding:.38em 1em .75rem;outline:0;border-bottom:2px solid #fff}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-state-disabled a,#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active a,#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text;border-bottom:2px solid #23282d;color:#23282d}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li a,#seopress-admin-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer;color:#0073aa;text-decoration:none}#seopress-admin-tabs.ui-tabs-vertical{width:55em}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-nav{padding:.2em .1em .2em .2em;float:left;width:12em}#seopress-admin-tabs.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}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active{padding-bottom:0;padding-right:.1em;border-right-width:1px}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-panel{padding:1em;float:right;width:40em}.seopress-styles .seopress-option{margin:10px auto 0;max-width:90%;padding:1rem;background:#fff;box-shadow:0 15px 35px rgba(50,50,93,.1),0 5px 15px rgba(0,0,0,.1);border-radius:4px}.seopress-styles .seopress-option h1{font-size:16px;font-weight:700;color:#3297d3;text-transform:uppercase;z-index:100;border-bottom:1px solid #eee;padding-bottom:20px}.seopress-styles .seopress-option h1 .dashicons,.seopress-styles .seopress-option h2 .dashicons{margin:0 10px;font-size:40px;width:40px;height:40px;vertical-align:middle}.seopress-styles .seopress-option .link-archive{font-size:14px}.seopress-styles .seopress-option .link-archive .dashicons{font-size:18px;width:20px;height:20px;margin:inherit}.seopress-styles .seopress-option h1>.dashicons{font-size:30px;width:30px;height:30px;background:#c4f0ff;border-radius:6px;padding:10px;margin-left:10px;color:#0085ba}.seopress-styles .seopress-option .metabox-holder h2 .dashicons{font-size:16px}.seopress-option h1 .feature-state .dashicons{font-size:16px;width:16px;height:16px;vertical-align:middle;margin:0 10px 0 0}.seopress-styles .wrap{margin:20px 0 0 0;display:flex;position:relative}@media only screen and (max-width:1024px){.seopress-styles .wrap{display:inline-block;width:100%}}#seopress-admin-tabs.wrap{display:block;box-shadow:0 7px 14px 0 rgba(60,66,87,.12),0 3px 6px 0 rgba(0,0,0,.12);width:64rem;margin:0 auto}.seopress-styles .seopress-option .submit{background:#fff;text-align:center;border-top:1px solid #f1f1f1;padding-top:20px;padding-bottom:20px;margin:0}.seopress-styles .seopress-option #seopress-aio-migrate,.seopress-styles .seopress-option #seopress-rk-migrate,.seopress-styles .seopress-option #seopress-seo-framework-migrate,.seopress-styles .seopress-option #seopress-squirrly-migrate,.seopress-styles .seopress-option #seopress-yoast-migrate,.seopress-styles .seopress-option #submit{color:#fff;text-decoration:none;border:none;border-radius:4px;padding-right:20px;padding-left:20px;line-height:34px;text-transform:uppercase;min-height:34px;transition:all .3s linear;text-shadow:none;box-shadow:0 7px 14px rgba(50,50,93,.1),0 3px 6px rgba(0,0,0,.1);margin-right:15px;background:#6a7c94;position:relative;height:auto;z-index:10}.seopress-styles .seopress-option #seopress-aio-migrate:hover,.seopress-styles .seopress-option #seopress-rk-migrate:hover,.seopress-styles .seopress-option #seopress-seo-framework-migrate:hover,.seopress-styles .seopress-option #seopress-squirrly-migrate:hover,.seopress-styles .seopress-option #seopress-yoast-migrate:hover,.seopress-styles .seopress-option #submit:hover{text-decoration:none;color:#fff;background:#232323}.seopress-styles #wpcontent{padding-left:0}.seopress-styles pre{color:#42b72a;background:#f5f6f7;font-family:Menlo,Monaco,Andale Mono,Courier New,monospace;padding:7px}.seopress-styles #seopress-navbar{padding:10px .5rem;height:56px;margin:0 auto;width:64rem;box-sizing:border-box;position:relative}#seopress-header{margin:0 auto;position:relative;width:100%}#seopress-header #seopress-admin h1{line-height:40px;margin:0;display:inline-block;height:40px;width:40px;background-size:100%;background-repeat:no-repeat}#seopress-header #seopress-admin h1::before{font-size:14px;line-height:40px;position:absolute;border-radius:6px;font-weight:400;color:#fff;width:40px;height:40px;text-align:center;background:#3a4afb;background:-moz-linear-gradient(45deg,#3a4afb 0,#47bea5 100%);background:-webkit-linear-gradient(45deg,#3a4afb 0,#47bea5 100%);background:linear-gradient(45deg,#3a4afb 0,#47bea5 100%)}#seopress-header #seopress-admin h1:hover{cursor:pointer}#seopress-header #seopress-admin h1>a{text-decoration:none;color:inherit}#seopress-header #seopress-admin .seopress-quick-access{background:#fff;box-shadow:0 50px 100px rgba(50,50,93,.1),0 15px 35px rgba(50,50,93,.2),0 5px 15px rgba(0,0,0,.1);border-radius:4px;overflow:hidden;position:relative;font-size:17px;line-height:40px;white-space:nowrap;transform:rotate3d(1,1,0,-15deg);transform-origin:100% 0;opacity:0;will-change:transform,opacity;transition-property:transform,opacity;transition-duration:.25s;z-index:300;padding:0;display:block;width:64rem;top:0;visibility:hidden;cursor:auto;left:-.5rem}#seopress-header #seopress-admin h1:hover .seopress-quick-access{transform:none;opacity:1;pointer-events:auto;visibility:visible}#seopress-header #seopress-admin .seopress-quick-access>ul{padding:20px;margin:0;float:left;width:100%;box-sizing:border-box}#seopress-header #seopress-admin h1 .seopress-quick-access li{text-decoration:none;display:inline-block;width:50%;margin:0;float:left;padding:10px 0}#seopress-header #seopress-admin h1 .seopress-quick-access li .dashicons{vertical-align:middle;background:#b7e1f3;border-radius:50%;padding:5px;margin-right:15px}#seopress-header #seopress-admin h1 .seopress-quick-access li a{text-decoration:none;font-size:15px;line-height:30px;text-transform:uppercase;display:block;width:100%;transition:all .3s linear;color:#3297d3}#seopress-header #seopress-admin h1 .seopress-quick-access li a:hover{color:#647a88}#seopress-header #seopress-admin h1 .seopress-info-version{position:relative;left:50px;top:0;font-size:14px;width:100px;display:block}#seopress-header #seopress-admin .wpc-info-version{font-size:14px;left:310px;position:absolute;text-indent:0;top:85px}#seopress-header #seopress-notice{float:right;line-height:40px}#seopress-header #seopress-notice p{font-size:16px}#seopress-header #seopress-notice .dashicons{color:#6f8096;text-decoration:none;line-height:40px}#seopress-header #seopress-notice div.small{font-size:13px;display:inline}#seopress-footer-credits{font-style:italic}#seopress-footer-credits .wporg-ratings{display:inline}#seopress-footer-credits .wporg-ratings a{text-decoration:none}.seopress-option .seopress-settings{float:left;max-width:750px;width:100%}.seopress-option #seopress-edd-license-btn,.seopress-option #seopress-refresh{float:left}.wp-admin-ui_page_seopress-import-export .postbox{margin-right:20px}.seopress-option #side-sortables .accordion-section-content{padding:0}.seopress-option .seopress-settings label{margin:0 0 0 10px}.wrap-seopress-tab-content{position:relative;display:block;width:100%;max-width:64rem;margin:0 auto;box-sizing:border-box}#seopress-admin-tabs .seopress-tab{padding:1.5rem;visibility:hidden;overflow:hidden;opacity:0;transition:all .2s ease;transform:translateX(-15px);position:absolute;top:0;box-sizing:border-box}#seopress-admin-tabs .seopress-tab.active{visibility:visible;overflow:inherit;opacity:1;transform:translateX(0);display:inherit;position:relative}#seopress-tabs .seopress-tab{padding:0 1.5rem;width:calc(100% - 230px);display:none}@media only screen and (max-width:1024px){#seopress-tabs .seopress-tab{width:100%}}#seopress-tabs .seopress-tab.active{display:inline-block;border-left:1px solid #eee}@media only screen and (max-width:1024px){#seopress-tabs .seopress-tab.active{width:100%;padding:0;border-left:none;border-top:1px solid #eee}}.seopress-option input[type=password],.seopress-option input[type=text],.seopress-option textarea{min-width:485px}@media only screen and (max-width:1024px){.seopress-option input[type=password],.seopress-option input[type=text],.seopress-option textarea{min-width:inherit;width:100%}}#seopress_htaccess_file{width:100%}.seopress-option textarea{min-height:100px}.seopress-option #side-sortables .highlight{border:1px dashed #ccc;display:block;width:382px;height:40px;background:0 0}.seopress-option #side-sortables .accordion-section{margin-bottom:9px;width:382px}.seopress-option #side-sortables .accordion-section h3{cursor:move;border:1px solid #e5e5e5;background:#fafafa}.seopress-option #side-sortables .accordion-section .inside{padding:10px 10px 24px;border-width:0 1px 1px;border-style:solid;box-shadow:0 1px 1px rgba(0,0,0,.04);border-color:#e5e5e5;display:inline-block;width:calc(100% - 22px);height:100%}.seopress-option #side-sortables .accordion-section .inside ul{padding-left:10px;margin-bottom:0;padding-top:2px;padding-bottom:2px}.seopress-option #side-sortables .accordion-section .inside ul li{border-left:2px solid #ccc;padding-left:10px;margin-bottom:10px}.seopress-option #side-sortables .accordion-section .inside ul li:first-child{border-bottom:1px dotted #e5e5e5;border-left:0;padding-bottom:10px;font-weight:700;margin-left:-15px;margin-bottom:10px}.seopress-notice #message{margin:5px 10px 2px 0}#seopress-notice a{position:relative;text-decoration:none}#seopress-notice a .tooltip{white-space:pre;z-index:200;padding:2px 5px;font-weight:500;font-size:12px;color:#aab7c4;background:#fff;box-shadow:0 1px 2px 0 rgba(49,49,93,.1),0 0 1px 0 rgba(0,0,0,.1);border-radius:2px;position:absolute;opacity:0;top:30px;transition:opacity .2s ease;visibility:hidden;line-height:20px;left:-100%;overflow:hidden}#seopress-notice a:hover .tooltip{opacity:1;visibility:visible}.seopress-page-list{margin:1.5rem auto}.seopress-option .dashicons,.seopress-page-list .dashicons{vertical-align:middle;margin-right:5px;color:#6f8096}#seopress-admin-tabs .ui-tabs-nav,#seopress-notifications-center,.seopress-get-started,.seopress-page-list .seopress-feature,.seopress-useful-tools{margin:0 auto 20px;max-width:64rem;padding:2rem;width:100%;border-radius:0 0 4px 4px;box-sizing:border-box}.seopress-get-started{margin-top:20px;background:#fff url(../img/bg-hero-support.svg) no-repeat 95% 50%/contain;position:relative;box-sizing:border-box;box-shadow:0 7px 14px 0 rgba(60,66,87,.12),0 3px 6px 0 rgba(0,0,0,.12)}.seopress-get-started .inside{max-width:calc(100% - 380px)}.seopress-get-started .preheader{text-transform:uppercase;font-size:.8rem;font-weight:600}.seopress-get-started h2{font-size:1.85em;margin:15px 0 0 0;font-weight:400}.seopress-get-started p{margin-bottom:20px}.seopress-get-started a .dashicons{vertical-align:middle;text-decoration:none;color:#6a7c94}.seopress-get-started a.button-primary .dashicons{color:#fff}.seopress-get-started a.btn-link .dashicons{margin-right:5px}.seopress-get-started a.btn-link{margin:0 0 0 10px}#seopress-notifications-center,.seopress-useful-tools{background:#fff;padding:0}.seopress-page-list .seopress-feature{padding:0;position:relative;overflow:hidden;transition-duration:.15s;display:flex;margin:0;background:#fff;box-shadow:0 7px 14px 0 rgba(60,66,87,.12),0 3px 6px 0 rgba(0,0,0,.12);flex-wrap:wrap;border-radius:4px;width:100%;height:100%}.seopress-page-list .seopress-feature p{color:#6b7c93;font-size:14px;margin-bottom:30px}#seopress-notifications-center{margin-top:0}#seopress-admin-tabs .ui-tabs-nav{display:flex;padding-top:1rem;padding-bottom:0}.seopress-page-list .seopress-feature .img-tool{height:50px;width:50px;background:#c4f0ff;position:relative;border-radius:6px}.seopress-page-list .seopress-feature .img-tool .dashicons{color:#217ab7;font-size:30px;text-align:left;vertical-align:middle;width:100%;height:100%;position:absolute;top:calc(50% - 15px);left:calc(50% - 15px);margin:0}.seopress-page-list .seopress-feature .inner{margin:0;display:inline-block;padding:1.5rem;width:100%;height:100%;box-sizing:border-box}.seopress-page-list .seopress-feature h3{margin:1rem 0 0 0;font-size:16px;font-weight:700;color:#3297d3;text-transform:uppercase}.seopress-page-list .seopress-feature h3 .dashicons{font-size:16px;margin-left:5px;vertical-align:middle}#seopress-content .seopress-page-list .seopress-feature a,#seopress-notifications-center .seopress-alert .button-primary,.seopress-get-started .button-primary,.seopress-option .seopress-feature a,.seopress-useful-tools .widget .button-primary{color:#fff;text-decoration:none;border:none;border-radius:4px;padding-right:20px;padding-left:20px;line-height:34px;text-transform:uppercase;min-height:34px;transition:all .3s linear;text-shadow:none;box-shadow:0 7px 14px rgba(50,50,93,.1),0 3px 6px rgba(0,0,0,.1);background:#6a7c94;position:relative;height:auto;display:flex;flex-wrap:wrap}#seopress-content .seopress-page-list .seopress-feature a.button-secondary{padding-left:30px}#seopress-content .seopress-page-list .seopress-feature a.button-secondary::before,#seopress-notifications-center .seopress-alert .button-primary::after{content:"\f111";font-family:Dashicons;position:absolute;left:10px;top:1px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:16px}#seopress-content .seopress-page-list .wrap-btn{display:inline-flex;margin-bottom:2rem;flex-direction:column}#seopress-content .seopress-page-list .seopress-feature a.view-redirects,#seopress-notifications-center .seopress-alert .button-primary,.seopress-get-started .button,.seopress-option .button{color:#6a7c94;background:#fff;font-weight:500;transition:all .3s linear;text-shadow:none;text-transform:uppercase;padding-right:20px;padding-left:20px;line-height:34px;min-height:34px;margin:10px 0;border-radius:4px;box-shadow:transparent 0 0 0 0,transparent 0 0 0 0,rgba(0,0,0,.12) 0 1px 1px 0,rgba(60,66,87,.16) 0 0 0 1px,transparent 0 0 0 0,transparent 0 0 0 0,rgba(60,66,87,.12) 0 2px 5px 0;vertical-align:baseline;display:inline-flex;align-items:center;border:none;margin-right:.5rem;cursor:pointer}.seopress-get-started .button{color:#fff;background:#6259e6;box-shadow:none}.seopress-option .wp-picker-container button{box-shadow:none;border:1px solid #0071a1;border-radius:3px;background:#f3f5f6;text-transform:none}.seopress-option .wp-picker-container input[type=text].wp-color-picker{min-width:inherit}.seopress-option .wp-picker-container .wp-picker-clear{box-shadow:none;text-transform:none;border-radius:0;background:0 0}.seopress-option .wp-picker-container .wp-picker-clear:hover{background:0 0;text-decoration:currentColor;color:inherit}.seopress-option .button .dashicons{font-size:16px}#seopress-content .seopress-page-list .seopress-feature a.view-redirects{padding-left:30px}#seopress-notifications-center .seopress-alert .button-primary::after{content:"\f344";left:inherit;right:10px}#seopress-content .seopress-page-list .seopress-feature a.view-redirects::before{content:"\f177"}#seopress-content .seopress-page-list .seopress-feature a:hover,#seopress-notifications-center .seopress-alert .button-primary:hover,.seopress-get-started .button-primary:hover,.seopress-option .button:hover,.seopress-option .seopress-feature a:hover,.seopress-useful-tools .widget .button-primary:hover{text-decoration:none;color:#fff;background:#232323}.seopress-get-started .button .dashicons{transition:all .3s linear}.seopress-get-started .button:hover .dashicons{color:#fff}#seopress-content .seopress-page-list .seopress-feature .seopress-doc:focus,#seopress-content .seopress-page-list .seopress-feature a:focus,#seopress-content .seopress-page-list .seopress-feature a:focus.button-secondary,#seopress-content a:focus,#seopress-notifications-center .seopress-alert .button-primary:focus,.seopress-option #seopress-tabs .seopress-doc:focus,.seopress-option .seopress-feature a:focus,.seopress-styles .seopress-option #seopress-aio-migrate:focus,.seopress-styles .seopress-option #seopress-yoast-migrate:focus,.seopress-styles .seopress-option #submit:focus,.seopress-useful-tools .widget .button-primary:focus{box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;background:#008ec2;border-color:#006799;color:#fff}#seopress-admin-tabs .nav-tab-wrapper a.nav-tab-active:focus{color:inherit}#seopress-notifications-center .seopress-alert .button-primary{margin:5px 0;padding-right:30px}#seopress-notifications-center h2,.seopress-useful-tools h2{margin:5px 0 15px 5px;display:inline-block;width:100%}#seopress-notifications-center .dashicons,.seopress-useful-tools .dashicons{margin-right:10px}#seopress-notifications-center .seopress-alert{padding:1.5rem 2rem 1.2rem 1rem;border-bottom:1px solid #e6ebf1;width:calc(100% - 3rem);flex:1 1 auto;position:relative;transition:all 150ms ease;align-items:center;display:flex;justify-content:space-between}#seopress-notifications-center .seopress-alert:last-child{margin-bottom:0;border-bottom:none}#seopress-notifications-center .seopress-alert:hover{cursor:default}#seopress-notifications-center .dashicons{display:flex;align-self:normal;width:48px;height:48px;color:#d7dade;font-size:48px;padding:0 1rem}#seopress-notifications-center .seopress-alert p{margin:0}#seopress-notifications-center .notice-left{flex:1}#seopress-notifications-center .notice-left>p:first-child{color:#1a1f36;font-weight:500}#seopress-notifications-center .notice-right{padding:1rem 0 0 0;display:flex}#seopress-notifications-center .seopress-alert.impact::after{content:"";width:10px;height:10px;border-radius:50px;position:absolute;right:1rem;top:1rem}#seopress-notifications-center .seopress-alert.impact.low::after{background:#ffde24}#seopress-notifications-center .seopress-alert.impact.medium::after{background:#e39f48}#seopress-notifications-center .seopress-alert.impact.high::after{background:#e25950}#seopress-notifications-center .seopress-alert.impact.info::after{background:#0085ba}#seopress-notifications-center .seopress-alert.dashicons{color:#6f8096}#seopress-notifications-center .dashicons.remove-notice,.seopress-get-started .remove-notice{position:absolute;right:0;color:#6b7c93;font-size:20px;height:30px;width:30px;vertical-align:middle;top:1.2rem;line-height:30px;padding:5px;transition:all .3s linear;margin:0;display:block}.seopress-get-started .remove-notice{top:10px;right:10px}#seopress-notifications-center .dashicons.remove-notice:hover,.seopress-get-started .remove-notice:hover{color:#1a1f36;cursor:pointer}#seopress-content .seopress-page-list .seopress-feature .seopress-doc,.seopress-option #seopress-tabs .seopress-doc{background:0 0;padding:0;text-decoration:none;color:inherit;box-shadow:none;position:absolute;right:.5rem;top:1rem}#seopress-content .seopress-page-list .seopress-feature .seopress-doc:hover,.seopress-option #seopress-tabs .seopress-doc:hover{color:#747474;background:0 0}#seopress-content .seopress-page-list .seopress-feature .seopress-doc:hover .dashicons{color:#232323}.seopress-option .seopress-table{background:#fff;border:1px solid #ccc}.seopress-option .seopress-table th{padding:15px 10px;vertical-align:middle}.wp-admin-ui_page_seopress-roles .seopress-option .seopress-table th{min-width:200px}.seopress-option .seopress-table .seopress-settings-section{background:#f1f1f1}.seopress-option .seopress-table .seopress-table-head .seopress-feature{border-bottom:1px solid #ccc;font-weight:700;background:#f1f1f1}#seopress-content .feature-state,.seopress-option .feature-state{font-style:italic;font-size:10px;display:inline-block;background:rgba(0,140,135,.1);padding:2px 10px;border-radius:25px;color:#444;font-weight:400;text-transform:none;-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial}@media only screen and (max-width:768px){#seopress-content .feature-state,.seopress-option .feature-state{display:none}}.seopress-option .seopress_wrap_single_cpt .feature-state,.seopress-option .seopress_wrap_tax .feature-state{padding:2px 12px;margin:0 0 .5rem .5rem}.seopress-option #tab_seopress_titles_archives h2,.seopress-option #tab_seopress_titles_single h2,.seopress-option #tab_seopress_titles_tax h2{margin:2em 0 1em 0;border-top:1px solid #eee;padding:1em 0 0 0}.seopress-option #tab_seopress_titles_archives h2:first-child,.seopress-option #tab_seopress_titles_single h2:first-child,.seopress-option #tab_seopress_titles_tax h2:first-child{border-top:none;margin:0 0 1em 0}#seopress_cpt .tag-title,#seopress_pro_cpt .tag-title,.seopress-button,.seopress-option .tag-title{cursor:pointer;font-weight:500;border-radius:4px;transition:all .3s linear}#seopress-content .feature-state-on,#seopress-content .feature-state.feature-state-on,.seopress-option .feature-state-on,.seopress-option .feature-state.feature-state-on{display:inline-block}#seopress-content .feature-state-off,.seopress-option .feature-state-off{display:none}.seopress-option .postbox .inside li{list-style:square inside;padding-left:5px}#tab_seopress_page_speed .inside li{list-style:none;padding-left:0;word-break:break-word}.seopress-option .log{margin:0;text-transform:uppercase;display:inline-block;vertical-align:middle;padding:5px;color:#13bf11;font-style:italic}.seopress-option input[type=text].seopress-admin-menu-input{min-width:inherit;width:100%}.seopress_page_seopress-import-export .postbox{width:calc(100% - 20px)}#seopress_cpt .wrap-tags,#seopress_pro_cpt .wrap-tags,.seopress-option .wrap-tags{position:relative;display:inline-block;width:100%;margin-bottom:10px}#seopress_cpt .tag-title,#seopress_pro_cpt .tag-title,.seopress-option .tag-title{padding:4px 8px;position:relative;top:5px;left:0;font-size:11px;float:left;margin-right:5px;user-select:none;margin-bottom:5px;background:#fff;color:#6b7c93;box-shadow:0 0 0 .5px rgba(50,50,93,.17),0 2px 5px 0 rgba(50,50,93,.12),0 3px 9px 0 rgba(50,50,93,.08),0 1px 1.5px 0 rgba(0,0,0,.08),0 1px 2px 0 rgba(0,0,0,.08)}#seopress_cpt .tag-title:active,#seopress_cpt .tag-title:focus,#seopress_cpt .tag-title:hover,#seopress_pro_cpt .tag-title:active,#seopress_pro_cpt .tag-title:focus,#seopress_pro_cpt .tag-title:hover,.seopress-option .tag-title:active,.seopress-option .tag-title:focus,.seopress-option .tag-title:hover{background:#232323;color:#fff;user-select:none}#seopress_cpt .tag-title .dashicons,#seopress_pro_cpt .tag-title .dashicons,.seopress-option .tag-title .dashicons{padding:0;height:16px;width:16px;font-size:16px;margin-right:5px;vertical-align:middle}.seopress-button{text-transform:uppercase;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;display:inline-block;margin:0;outline:0;overflow:hidden;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:20px;padding:6px 8px 6px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.seopress-button:hover{border-color:#a8bece;color:#00a0d2}.seopress-button .dashicons{vertical-align:middle}#seopress-content #tab_seopress_seo_tools.seopress-useful-tools .widget{border-right:1px solid #e6ebf1;margin:0;padding:0 20px;width:calc(50% - 2px);box-sizing:border-box;display:inline-block;vertical-align:top}#seopress-content #tab_seopress_seo_tools.seopress-useful-tools .widget:first-child{width:100%;display:block;clear:both;border-right:none;border-bottom:1px solid #e6ebf1;padding-bottom:20px;margin-bottom:20px}#seopress-content #tab_seopress_seo_tools.seopress-useful-tools .widget:last-child{border-right:none}#seopress-content .seopress-useful-tools .widget-reverse ul{background:#fff}#seopress-content .seopress-useful-tools .widget-reverse li{padding:10px;margin:0;border-bottom:1px solid #e6ebf1}#seopress-content .seopress-useful-tools .widget-reverse li:hover{background:#f5f7fa}#seopress-content .seopress-useful-tools .widget-title{text-transform:uppercase;margin:0 0 10px;font-size:13px;padding:10px 0;color:#24b47e}#seopress-content .seopress-reverse label,#seopress-content .seopress-useful-tools .widget-whois ul li span{font-weight:700}#seopress-content #seopress-reverse-url{width:100%;margin:10px 0}#seopress-content .widget-reverse p{margin:0}.post-type-seopress_backlinks .wp-list-table .column-seopress_backlinks_url{width:35%}.post-type-seopress_backlinks .wp-list-table .column-seopress_backlinks_anchor_text{width:20%}.seopress-styles #screen-meta{margin:0;position:relative;background-color:#fff;border-bottom:0 solid #f2f2f2;border-top:none;-webkit-box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08);box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08);top:0}.seopress-styles #contextual-help-link-wrap,.seopress-styles #screen-options-link-wrap{float:right;height:28px;margin:0 0 0 6px;border:1px solid #f2f2f2;border-top:none;background:#fff;-webkit-box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08);box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08)}.seopress-styles #screen-meta-links .show-settings{box-shadow:none}.seopress-styles #screen-meta-links .screen-meta-toggle{position:relative;top:0;z-index:2000}.seopress-styles #contextual-help-back{background:#f8fafd}.seopress-styles .contextual-help-tabs .active{border-left:2px solid #3297d3;background:#f8fafd}#seopress-content input.toggle,#seopress_cpt input.toggle,.seopress-option input.toggle{max-height:0;max-width:0;opacity:0;position:relative}.seopress-feature input.toggle{display:block}.wrap-toggle-preview{position:relative}.wrap-toggle-preview p{font-weight:700;margin:0 0 1rem 0}#seopress_cpt input.toggle,.seopress_wrap_single_cpt input.toggle,.seopress_wrap_tax input.toggle{margin:0;border:none;min-width:0}#seopress_content_analysis span.label,#seopress_cpt span.label{outline:0;color:#fff;box-shadow:none;background:#555d66;padding:2px 4px;border-radius:4px;font-weight:700}#seopress-content input.toggle+label,#seopress_cpt #tabs-1 input.toggle+label,.seopress-option input.toggle+label{display:inline-block;position:relative;box-shadow:inset 0 0 0 1px #d5d5d5;text-indent:-5000px;height:20px;width:40px;border-radius:15px}#seopress_cpt #tabs-1 input.toggle+label{margin:0}.wrap-toggle-checkboxes input.toggle+label{float:left;margin-right:10px}#seopress-content input.toggle+label:before,#seopress_cpt input.toggle+label:before,.seopress-option input.toggle+label:before{content:"";position:absolute;display:block;height:20px;width:30px;top:0;left:0;border-radius:15px;background:rgba(19,191,17,0);-moz-transition:.25s ease-in-out;-webkit-transition:.25s ease-in-out;transition:.25s ease-in-out}#seopress-content input.toggle+label:after,#seopress_cpt input.toggle+label:after,.seopress-option input.toggle+label:after{content:"";position:absolute;display:block;height:20px;width:20px;top:0;left:0;border-radius:15px;background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 2px 4px rgba(0,0,0,.2);-moz-transition:.25s ease-in-out;-webkit-transition:.25s ease-in-out;transition:.25s ease-in-out}#seopress_cpt input.toggle+label,#seopress_cpt input.toggle+label:before,.seopress_wrap_single_cpt input.toggle+label,.seopress_wrap_single_cpt input.toggle+label:before,.seopress_wrap_tax input.toggle+label,.seopress_wrap_tax input.toggle+label:before{width:40px;height:20px}#seopress_cpt input.toggle+label:after,.seopress_wrap_single_cpt input.toggle+label:after,.seopress_wrap_tax input.toggle+label:after{width:20px;height:20px}#seopress-content input.toggle[data-toggle="1"]+label:before,#seopress_cpt input.toggle[data-toggle="1"]+label:before,.seopress-option input.toggle[data-toggle="1"]+label:before{width:40px;background:#3197d3}#seopress_cpt input.toggle[data-toggle="1"]+label:before,.seopress_wrap_single_cpt input.toggle[data-toggle="1"]+label:before,.seopress_wrap_tax input.toggle[data-toggle="1"]+label:before{width:40px;background:#3197d3}#seopress-content input.toggle[data-toggle="1"]+label:after,#seopress_cpt input.toggle[data-toggle="1"]+label:after,.seopress-option input.toggle[data-toggle="1"]+label:after{left:20px;box-shadow:inset 0 0 0 1px #3197d3,0 2px 4px rgba(0,0,0,.2)}#seopress_cpt input.toggle[data-toggle="1"]+label:after,.seopress_wrap_single_cpt input.toggle[data-toggle="1"]+label:after,.seopress_wrap_tax input.toggle[data-toggle="1"]+label:after{box-shadow:inset 0 0 0 1px #3197d3,0 2px 4px rgba(0,0,0,.2)}#seopress-content .seopress-page-list{position:relative;display:grid;max-width:64rem;grid-gap:20px 20px;grid-template-columns:repeat(3,1fr)}#seopress-notice-save{position:fixed;color:#fff;padding:15px 40px;font-size:.9rem;text-transform:uppercase;text-align:center;border-radius:0;background:rgba(74,184,102,.9);bottom:0;right:0;z-index:500;width:100%;font-weight:700}#seopress-notice-save .dashicons{color:#fff}.seopress_page_seopress-pro-page #wpcontent{background:#f4f7fa}.seopress-option .wrap div.nav-tab-wrapper{margin:0 0 0 -26px;padding:0 0 0 10px;line-height:inherit;width:230px;z-index:95;font-weight:400;display:block;border-bottom:none}@media only screen and (max-width:1024px){.seopress-option .wrap div.nav-tab-wrapper{width:100%;margin:0;padding:0}}#seopress-admin-tabs.wrap div.nav-tab-wrapper{margin:20px auto 0;max-width:64rem;width:100%;border-bottom:1px solid #e6ebf1;padding:0;line-height:inherit;position:-webkit-sticky;position:sticky;background:#f5f7fa;z-index:100;top:31px;border-radius:4px 4px 0 0;font-weight:400;overflow:hidden;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}#seopress-admin-tabs #tab_seopress_notifications.seopress-tab{background:0 0;padding:0;border-radius:0}.seopress-option .nav-tab{border:0 solid #ccc;background:0 0;opacity:.5;padding:6px 30px 6px 10px;transition:opacity .3s linear;color:#191e23;margin:0;float:none;display:inline-block;width:100%;text-align:left;font-weight:400;box-sizing:border-box;white-space:normal}#seopress-admin-tabs .nav-tab{border:0 solid #ccc;background:0 0;opacity:.5;padding:14px 20px;transition:opacity .3s linear;color:#191e23;margin:0;box-shadow:inset -1px 0 #e3e8ee;float:none;display:inline-block;text-align:center;font-weight:400}#seopress-admin-tabs .nav-tab{width:100%}#seopress-admin-tabs .nav-tab-active,#seopress-admin-tabs .nav-tab-active:hover,.seopress-option .about-wrap h2 .nav-tab-active,.seopress-option .nav-tab-active,.seopress-option .nav-tab-active:hover{background-color:#fff}#seopress-admin-tabs .nav-tab-active,#seopress-admin-tabs .nav-tab-active:focus,#seopress-admin-tabs .nav-tab-active:focus:active,#seopress-admin-tabs .nav-tab-active:hover,#seopress-admin-tabs .nav-tab:focus,.nav-tab-active:focus,.seopress-option .nav-tab-active,.seopress-option .nav-tab-active:focus:active,.seopress-option .nav-tab-active:hover,.seopress-option .nav-tab:focus{opacity:1;outline:0;font-weight:600;position:relative;color:#191e23;border-left:3px solid #0085ba;background:rgba(0,133,186,.1)}#seopress-admin-tabs .nav-tab-active,#seopress-admin-tabs .nav-tab-active:focus,#seopress-admin-tabs .nav-tab-active:focus:active,#seopress-admin-tabs .nav-tab-active:hover,#seopress-admin-tabs .nav-tab:focus{border-bottom:3px solid #3197d3;border-left:none;background:#fff}#seopress-admin-tabs .nav-tab:hover,.seopress-option .nav-tab:hover{opacity:1}#seopress-admin-tabs .nav-tab:focus,.seopress-option .nav-tab:focus{outline:0;box-shadow:none}.seopress-option .section-tool{border:none;box-shadow:none;background:0 0;position:relative}.seopress-option .section-tool::after{content:'';background:#dedede;height:1px;width:100%;display:block}.seopress-option .sp-section-header{border-bottom:1px solid #eee;margin:0 0 1rem 0;width:100%;display:flex;position:relative;align-items:center;padding-bottom:.5rem}.seopress-option .sp-section-header::after{position:absolute;content:'';background:#0085ba;height:2px;width:40px;bottom:0;left:0}.seopress-option .sp-section-header h2{font-size:1.5em}.seopress-option .sp-section-header>.dashicons{color:#0085ba;padding:10px;border-radius:6px;margin-right:10px;background:#c4f0ff}.seopress-option .sp-section-header .wrap-toggle-checkboxes{display:flex}.seopress-styles .wrap .notice{margin:5px 0 15px 15px}
1
+ #adminmenu div.wp-menu-image.dashicons-admin-seopress::before,#seopress-header #seopress-admin h1::before{content:"\e800";font-family:seopress!important;font-weight:700;font-size:12px;line-height:20px}#seopress-header #seopress-admin h1::before,.seopress-page-list .seopress-feature h3,.seopress-styles .seopress-option h1{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}@font-face{font-family:seopress;src:url(../fonts/seopress.eot?81521271);src:url(../fonts/seopress.eot?81521271#iefix) format('embedded-opentype'),url(../fonts/seopress.woff?81521271) format('woff2'),url(../fonts/seopress.woff?81521271) format('woff'),url(../fonts/seopress.ttf?81521271) format('truetype'),url(../fonts/seopress.svg?81521271#seopress) format('svg');font-weight:400;font-style:normal}[class*=" icon-seopress"],[class^=icon-seopress-]{font-family:seopress!important;font-size:14px!important;line-height:24px!important}#tab_seopress_titles_archives .form-table th:empty,#tab_seopress_titles_single .form-table th:empty,#tab_seopress_titles_tax .form-table th:empty{display:none}.icon-seopress-seopress:before{content:"\e800"}.sp-tooltip{position:relative;margin-left:5px;display:inline-block;cursor:help;vertical-align:bottom;text-align:left}.sp-tooltip .dashicons{color:#666}.sp-tooltip .sp-tooltiptext{visibility:hidden;position:absolute;z-index:999999999;width:300px;right:-303px;padding:20px;top:25px;font-weight:400;box-shadow:0 3px 30px rgba(25,30,35,.1);border:1px solid #e2e4e7;background:#fff;word-break:break-word}.sp-tooltip .sp-tooltiptext::before{border:8px solid #e2e4e7;top:-8px}.sp-tooltip .sp-tooltiptext::after{border:8px solid #fff;top:-6px}.sp-tooltip .sp-tooltiptext::after,.sp-tooltip .sp-tooltiptext::before{border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;margin-left:-10px;content:"";position:absolute;height:0;width:0;line-height:0;left:30px}.sp-tooltip:hover .sp-tooltiptext{visibility:visible}.sp-tooltip .sp-tooltip-headings{font-size:18px;font-weight:600;margin-bottom:20px;display:block}.sp-tooltip .sp-tooltip-desc{margin-bottom:20px;display:block;border-bottom:1px solid #e2e4e7;padding-bottom:20px;font-size:13px}.sp-tooltip .sp-tooltip-code{font-family:Menlo,Monaco,Andale Mono,Courier New,monospace;display:block;word-break:break-all;color:#42b72a;font-size:11px}.analysis-score .sp-tooltip{vertical-align:middle;font-size:.75em}#seopress_content_analysis a{color:#0073aa}#seopress_content_analysis .wrap-seopress-analysis{display:inline-block;width:100%}#seopress_content_analysis .col-left{width:calc(50% - 30px);float:left;margin-right:30px}#seopress_content_analysis .col-right{float:right;width:50%}#seopress_content_analysis #seopress_suggestions{display:inline-block;width:100%;margin:0;height:auto;padding:20px 0}#seopress_content_analysis #seopress_suggestions li{list-style:none;margin:5px;display:inline-block}#seopress_content_analysis .analysis-score{clear:both;border-top:1px solid #e2e4e7;display:flex;justify-content:space-between;align-items:center}.column-seopress_score .analysis-score{display:flex;align-content:center}#seopress_content_analysis .analysis-score p,.column-seopress_score .analysis-score p{font-weight:700;font-size:1.2em}#seopress_content_analysis .analysis-score svg,.column-seopress_score .analysis-score svg{display:inline-block;height:30px;width:30px;margin:0;border-radius:100%;position:relative;font-weight:600;shape-rendering:geometricprecision;font-size:.5rem;vertical-align:middle;margin-right:15px}.column-seopress_score .analysis-score p,.column-seopress_score .analysis-score svg{margin:0}@keyframes loadingPulse{0%{stroke:#adc5d2}50%{stroke:#00a0d2}100%{stroke:#adc5d2}}#seopress_content_analysis .analysis-score .loading #bar{stroke-dashoffset:0!important;stroke:#adc5d2!important;animation:loadingPulse 3s infinite ease-in-out}#seopress_content_analysis .analysis-score .good #bar,.column-seopress_score .analysis-score #bar.good{stroke:#46b450}#seopress_content_analysis .analysis-score .notgood #bar,.column-seopress_score .analysis-score #bar.notgood{stroke-dashoffset:565;stroke:#ffb900}#seopress_content_analysis .analysis-score svg circle,.column-seopress_score .analysis-score svg circle{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;stroke:#ccc;stroke-width:2em}#seopress_content_analysis .gr-analysis{clear:both}#seopress_content_analysis .gr-analysis-title{border-top:1px solid #e2e4e7;position:relative}#seopress_content_analysis .gr-analysis-title .impact,#seopress_cpt .impact{position:absolute;left:10px;top:calc(50% - 5px);width:10px;height:10px;border-radius:50px;padding:0;margin:0;border:1px solid #fff}#seopress_content_analysis .gr-analysis .impact.good{background:#46b450;box-shadow:0 0 5px #46b450}#seopress_content_analysis .gr-analysis .impact.low{background:#ffde24;box-shadow:0 0 5px #ffde24}#seopress_content_analysis .gr-analysis .impact.medium{background:#e39f48;box-shadow:0 0 5px #e39f48}#seopress_content_analysis .gr-analysis .impact.high,#seopress_cpt .impact.high{background:#e25950;box-shadow:0 0 5px #e25950}#seopress_content_analysis .gr-analysis-content .impact.high{background:#e25950;box-shadow:none;color:#fff;padding:2px 4px;margin-left:5px;border-radius:4px;font-weight:700}#seopress_cpt .impact.high{position:relative;top:calc(50% - 18px);display:inline-block;left:inherit;right:-10px}#seopress_content_analysis .gr-analysis-title button{background:#fff;border:0;cursor:pointer;display:block;margin:0;position:relative;text-align:left;width:100%;padding:15px 30px;align-items:center;transition:all .3s linear}#seopress_content_analysis .gr-analysis-title button:hover{background:#f3f4f5}#seopress_content_analysis .gr-analysis-title button:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-2px;outline:1px dotted #555d66}#seopress_content_analysis .gr-analysis-title button .sp-arrow::after{content:"\f343";font-family:Dashicons;position:absolute;right:10px;top:calc(50% - 7px)}#seopress_content_analysis .gr-analysis-title button.open .sp-arrow::after{content:"\f347"}#seopress_content_analysis .gr-analysis-content{padding:0 1rem .5rem 1rem;display:none;width:100%;border-top:1px solid #e2e4e7;box-sizing:border-box}#seopress_content_analysis h3{margin:0;font-size:1em}#seopress_content_analysis h4{border-bottom:1px solid #e2e4e7;padding-bottom:.5rem;text-transform:uppercase;font-size:.85em;position:-webkit-sticky;position:sticky;top:0;background:#fff}#seopress_content_analysis .wrap-analysis-img ul{display:flex;flex-wrap:wrap}#seopress_content_analysis .wrap-analysis-img ul li{padding:0;text-align:left;cursor:default}#seopress_content_analysis .wrap-analysis-img h4{border-bottom:1px solid #ddd;padding-bottom:10px}#seopress_content_analysis .wrap-analysis-img ul li img{max-width:150px;max-height:150px;object-fit:cover;border:1px solid #f3f4f5;cursor:default;padding:1px}#seopress_cpt .notice{padding:10px 14px}#seopress-analysis-tabs .dashicons,#seopress_cpt .dashicons{vertical-align:middle}#seopress-analysis-tabs{clear:both}#seopress_cpt .inside{margin:0;padding:0}#seopress_cpt .ui-tabs .ui-tabs-nav{display:inline-block;min-height:26px;position:relative;width:100%;z-index:10;margin:0;border-radius:0;padding:0;background:#f3f4f5;border:none}#seopress_cpt .ui-helper-clearfix:after{content:none}.seopress_page_seopress-titles #seopress-tabs .form-table td,.seopress_page_seopress-titles #seopress_content_analysis .form-table td{padding:0}#seopress_cpt .ui-tabs .ui-tabs-panel{background:#fff;border-radius:0;display:inline-block;padding:1em 1.4em;width:100%;box-sizing:border-box}#seopress_content_analysis .dashicons-info,#seopress_cpt .ui-tabs .ui-tabs-panel .dashicons-info,#seopress_pro_cpt .dashicons-info{font-size:16px;vertical-align:middle;height:16px;width:16px}#seopress_cpt .ui-tabs .ui-tabs-nav li,#seopress_cpt .ui-tabs-anchor{cursor:pointer!important}#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active{position:relative;z-index:60;cursor:pointer;border-radius:0;border-bottom:3px solid #0085ba}#seopress_content_analysis label,#seopress_cpt #tabs-1 label,#seopress_cpt #tabs-2 label[for=seopress_robots_breadcrumbs_meta],#seopress_cpt #tabs-2 label[for=seopress_robots_canonical_meta],#seopress_cpt #tabs-2 label[for=seopress_robots_primary_cat_meta],#seopress_cpt #tabs-3 label,#seopress_cpt #tabs-4 label,#seopress_cpt #tabs-5 label,#seopress_cpt #tabs-6 label,#seopress_cpt .subsection-title,#seopress_pro_cpt label{display:block;margin:20px 0 5px;font-weight:700}#seopress_cpt .wp-color-result{margin:0}#seopress_content_analysis input[type=text],#seopress_cpt #tabs-1 input,#seopress_cpt #tabs-2 input[type=text],#seopress_cpt #tabs-3 input[type=text],#seopress_cpt #tabs-3 textarea,#seopress_cpt #tabs-4 input[type=text],#seopress_cpt #tabs-5 input[type=text],#seopress_cpt #tabs-6 input[type=text],#seopress_cpt #tabs-6 textarea{width:100%;display:inline-block}#seopress_cpt #tabs-1 input{width:100%}#seopress_cpt #tabs-6 input[type=number]{width:30%;min-width:200px}#seopress_cpt #tabs-6 #wrap-videos .video:first-child .remove-video{display:none}#seopress_cpt select{width:300px}#seopress_cpt #tabs-4 select{width:250px;display:inline}#seopress_cpt #tabs-4 #seopress_redirections_value_meta{width:calc(100% - 258px);float:right}#seopress_cpt #tabs-6{padding:0}#seopress_cpt #tabs-6 #wrap-videos .video .accordion-section-content,#seopress_cpt #tabs-6>p{padding:0 1.4em}#seopress_cpt #tabs-6 #wrap-videos .video .accordion-section-content{padding:0 1.4em 1em}#seopress_cpt #tabs-6 #wrap-videos .video{border-top:1px solid #eee}#seopress_cpt #tabs-6 #wrap-videos .video .accordion-section-title{border-left:none;border-right:none;font-size:1em;padding:1em 1.4em}#seopress_cpt #tabs-6 #wrap-videos .video:last-child .accordion-section-content,#seopress_cpt #tabs-6 #wrap-videos .video:last-child .accordion-section-title{border-bottom:1px solid #eee}#seopress_cpt #tabs-6 #wrap-videos .video .inside{padding:0}#seopress_cpt #tabs-4 #seopress_redirections_enabled,#seopress_cpt #tabs-5 #seopress_news_disabled,#seopress_cpt #tabs-5 #seopress_news_standout,#seopress_cpt #tabs-6 #seopress_video_disabled,#seopress_cpt #tabs-6 .family-friendly label,#seopress_cpt #tabs-6 .internal_video label{font-weight:400}#seopress_cpt #tabs-6 #wrap-videos .video:nth-child(odd){background:#fdfdfd}#seopress_content_analysis .advise,#seopress_cpt .advise,#seopress_pro_cpt .advise,.seopress-option .advise{margin:5px;display:block;color:red;font-style:italic}#seopress_cpt #tabs-6 #wrap-videos .video .advise{color:#555}#seopress_content_analysis .mandatory,#seopress_cpt .mandatory{color:#c00}#seopress_cpt .box-left{float:left;width:49%;margin-right:1%}#seopress_cpt .box-right{float:left;width:49%;margin-left:1%}#seopress_cpt #tabs-3 .box-left{width:44%}#seopress_cpt #tabs-3 .box-right{width:54%}@media only screen and (max-width:1200px){#seopress_cpt .box-left,#seopress_cpt .box-right{float:none;width:100%;margin:0}}@media only screen and (max-width:1500px){#seopress_cpt #tabs-3 .box-left,#seopress_cpt #tabs-3 .box-right{float:none;width:100%;margin:0}}#edittag #seopress_cpt #tabs-3 .box-left,#edittag #seopress_cpt #tabs-3 .box-right{float:none;width:100%;margin:0}#seopress-tabs .seopress_media_upload,#seopress_pro_cpt .seopress_media_upload{margin-top:.5rem}#seopress_cpt .google-snippet-preview{font-family:arial,sans-serif;word-break:break-all}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-snippet{margin:0 0 10px 0;box-shadow:0 1px 6px rgba(32,33,36,.28);border-radius:8px;padding:12px 16px}#seopress_cpt .google-snippet-preview>p{word-break:normal}#seopress_cpt .google-snippet-preview .snippet-title,#seopress_cpt .google-snippet-preview .snippet-title-custom,#seopress_cpt .google-snippet-preview .snippet-title-default{color:#1a0dab;font-size:18px;font-weight:400;line-height:21.6px}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-title,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-title-custom,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-title-default{font-size:16px;line-height:20px;margin-bottom:12px}#seopress_cpt .google-snippet-preview .snippet-permalink{color:#006621;font-size:14px;font-style:normal;font-weight:400;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#seopress_cpt .google-snippet-preview .wrap-snippet .wrap-m-icon-permalink,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-permalink{display:none}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-m-icon-permalink{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:12px;display:flex}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-m-icon-permalink .snippet-permalink{display:block;color:#3c4043;font-size:12px}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-favicon{margin-right:12px;vertical-align:middle}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-favicon img{width:16px;height:16px;max-width:inherit}#seopress_cpt .google-snippet-preview.mobile-preview .wrap-snippet .snippet-permalink:first-child{color:#3c4043;white-space:nowrap;font-size:12px;display:block}#seopress_cpt .google-snippet-preview .snippet-description,#seopress_cpt .google-snippet-preview .snippet-description-custom,#seopress_cpt .google-snippet-preview .snippet-description-default{color:#545454;font-size:14px;font-weight:400;line-height:18.2px;display:inline}#seopress_cpt .google-snippet-preview.mobile-preview .snippet-description,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-description-custom,#seopress_cpt .google-snippet-preview.mobile-preview .snippet-description-default{color:#3c4043;font-size:14px;line-height:20px}#seopress_cpt .google-snippet-preview .snippet-date{color:grey;display:inline}#seopress_cpt .facebook-snippet-box{color:#4b4f56;font-size:14px;width:524px}#seopress_cpt .facebook-snippet-box .notice,#seopress_cpt .twitter-snippet-box .notice{padding:10px 14px;margin:0 0 10px 0;box-sizing:border-box;width:100%}#seopress_cpt .facebook-snippet-box .notice span,#seopress_cpt .twitter-snippet-box .notice span{font-weight:700}#seopress_cpt .snippet-meta{display:flex;overflow:hidden;max-height:12px}#seopress_cpt .fb-by,#seopress_cpt .snippet-fb-site-name,#seopress_cpt .snippet-fb-url{color:#606770;font-size:12px;white-space:normal;line-height:11px;text-transform:uppercase;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis}#seopress_cpt .fb-sep{padding-left:5px;padding-right:5px;color:#606770;line-height:11px;font-size:12px}#seopress_cpt .facebook-snippet-box .facebook-snippet-text{border:1px solid #dadde1;background-color:#f2f3f5;padding:10px 12px}#seopress_cpt .facebook-snippet-box .title-desc{max-height:46px;overflow:hidden}#seopress_cpt .facebook-snippet-box .snippet-fb-title,#seopress_cpt .facebook-snippet-box .snippet-fb-title-custom,#seopress_cpt .facebook-snippet-box .snippet-fb-title-default{font-size:16px;line-height:20px;margin:3px 0 0;padding-top:2px;color:#1d2129;font-weight:700;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;word-break:break-word;max-height:22px}#seopress_cpt .facebook-snippet-box .snippet-fb-description,#seopress_cpt .facebook-snippet-box .snippet-fb-description-custom,#seopress_cpt .facebook-snippet-box .snippet-fb-description-default{color:#606770;font-size:14px;line-height:20px;word-break:break-word;font-family:Helvetica,Arial,sans-serif;max-height:80px;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;width:100%}#seopress_cpt .facebook-snippet-box img{display:block;height:274px;width:524px;object-fit:cover;background-color:#edeff0;text-align:center;border-bottom:none}#seopress_cpt .twitter-snippet-box{color:#4b4f56;font-size:14px;width:436px}#seopress_cpt .snippet-twitter-url{color:#8899a6;font-size:14px;white-space:normal;line-height:11px;text-transform:uppercase;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis}#seopress_cpt .twitter-snippet-box .twitter-snippet-text{border:1px solid #dadde1;background-color:#fff;padding:10px 12px;border-radius:0 0 10px 10px}#seopress_cpt .twitter-snippet-box .title-desc{max-height:46px;overflow:hidden}#seopress_cpt .twitter-snippet-box .snippet-twitter-img,#seopress_cpt .twitter-snippet-box .snippet-twitter-img-custom,#seopress_cpt .twitter-snippet-box .snippet-twitter-img-default{border-radius:10px 10px 0 0;overflow:hidden}#seopress_cpt .twitter-snippet-box .snippet-twitter-title,#seopress_cpt .twitter-snippet-box .snippet-twitter-title-custom,#seopress_cpt .twitter-snippet-box .snippet-twitter-title-default{font-size:1em;line-height:20px;margin-bottom:5px;max-height:1.3em;color:#000;font-weight:700;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;word-break:break-word}#seopress_cpt .twitter-snippet-box .snippet-twitter-description,#seopress_cpt .twitter-snippet-box .snippet-twitter-description-custom,#seopress_cpt .twitter-snippet-box .snippet-twitter-description-default{color:#000;font-size:14px;line-height:20px;word-break:break-word;font-family:Helvetica,Arial,sans-serif;max-height:80px;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;white-space:normal;width:100%}#seopress_cpt .twitter-snippet-box img{display:block;height:200px;width:436px;object-fit:cover;background-color:#edeff0;text-align:center;border-bottom:none}#seopress_cpt .wrap-seopress-counters,#seopress_pro_cpt .wrap-seopress-counters,.seopress-setup .wrap-seopress-counters,.seopress-styles .wrap-seopress-counters{text-align:right;background:#e9ecef;padding:2px 5px;display:flex;font-size:12px;justify-content:flex-end;border-radius:0 0 .25rem .25rem}#seopress_cpt .sp-progress,#seopress_pro_cpt .sp-progress,.seopress-setup .sp-progress,.seopress-styles .sp-progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem .25rem 0 0}#seopress_cpt .sp-progress-bar,#seopress_pro_cpt .sp-progress-bar,.seopress-setup .sp-progress-bar,.seopress-styles .sp-progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#0085ba;transition:width .6s ease}#seopress_cpt #seopress_titles_desc_counters,#seopress_cpt #seopress_titles_title_counters,#seopress_pro_cpt #seopress_rich_snippets_articles_counters,#seopress_pro_cpt #seopress_rich_snippets_courses_counters{display:inline;margin-right:5px}#seopress_cpt #seopress_titles_desc_counters_val,#seopress_cpt #seopress_titles_title_counters_val,#seopress_pro_cpt #seopress_rich_snippets_articles_counters_val,#seopress_pro_cpt #seopress_rich_snippets_courses_counters_val{display:inline;font-weight:700}#term-seopress #seopress_cpt{width:95%}.fixed .column-seopress_ps,.fixed .column-seopress_score,.fixed .column-seopress_w3c,.fixed .column-seopress_words{width:6%}.fixed .column-seopress_nofollow,.fixed .column-seopress_noindex{width:8%}@media only screen and (max-width:1200px){.fixed .column-seopress_nofollow,.fixed .column-seopress_noindex,.fixed .column-seopress_ps,.fixed .column-seopress_score,.fixed .column-seopress_w3c,.fixed .column-seopress_words{width:10%}}#seopress_cpt .ui-tabs{position:relative;padding:0;border:none;font-family:inherit;font-size:inherit;display:inline-block;width:100%}#seopress_cpt .ui-tabs .ui-tabs-nav li{list-style:none;display:inline-block;position:relative;top:2px;padding:0 5px;white-space:nowrap;margin:0;border:none;background:0 0}#seopress_cpt .ui-tabs .ui-tabs-nav li a{display:inline-block;padding:5px 10px}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-nav li a,#seopress_cpt .ui-tabs-vertical .ui-tabs-nav li a{display:block}#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:2px;padding-bottom:1px}#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-state-disabled a,#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-active a,#seopress_cpt .ui-tabs .ui-tabs-nav li.ui-tabs-loading a{color:#191e23;font-weight:700}#seopress_cpt .ui-tabs .ui-tabs-nav li a,#seopress_cpt .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer;color:#191e23;text-decoration:none;height:40px;line-height:40px}#seopress_cpt .ui-tabs-vertical{width:55em}#seopress_cpt .ui-tabs-vertical .ui-tabs-nav{padding:.2em .1em .2em .2em;float:left;width:12em}#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}#seopress_cpt .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active{padding-bottom:0;padding-right:.1em;border-right-width:1px}#seopress_cpt .ui-tabs-vertical .ui-tabs-panel{padding:1em;float:right;width:40em}#seopress_cpt .ui-tabs .ui-tabs-nav li a .dashicons{margin-right:2px}#tab-panel-seopress_titles_help_tab li span{font-weight:700;margin-right:10px}#seopress_content_analysis .dashicons-no-alt,#seopress_content_analysis .dashicons-yes,#seopress_pro_cpt .dashicons-no-alt,#seopress_pro_cpt .dashicons-yes{color:#fff;background:#12bd10;border-radius:50px;margin-right:10px}#seopress_content_analysis .dashicons-no-alt,#seopress_pro_cpt .dashicons-no-alt{background:#e25950}body.seopress-styles{background:#f8fafd}#seopress-admin-tabs.ui-tabs{position:relative;padding:.2em;border:none;font-family:inherit;font-size:inherit}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:-1px .2em 0 0;padding:0;white-space:nowrap;border:none;background:0 0}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li a{float:left;padding:.38em 1em .75rem;outline:0;border-bottom:2px solid #fff}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-state-disabled a,#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active a,#seopress-admin-tabs.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text;border-bottom:2px solid #23282d;color:#23282d}#seopress-admin-tabs.ui-tabs .ui-tabs-nav li a,#seopress-admin-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer;color:#0073aa;text-decoration:none}#seopress-admin-tabs.ui-tabs-vertical{width:55em}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-nav{padding:.2em .1em .2em .2em;float:left;width:12em}#seopress-admin-tabs.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}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active{padding-bottom:0;padding-right:.1em;border-right-width:1px}#seopress-admin-tabs.ui-tabs-vertical .ui-tabs-panel{padding:1em;float:right;width:40em}.seopress-styles .seopress-option{margin:10px auto 0;max-width:90%;padding:1rem;background:#fff;box-shadow:0 15px 35px rgba(50,50,93,.1),0 5px 15px rgba(0,0,0,.1);border-radius:4px}.seopress-styles .seopress-option h1{font-size:16px;font-weight:700;color:#3297d3;text-transform:uppercase;z-index:100;border-bottom:1px solid #eee;padding-bottom:20px}.seopress-styles .seopress-option h1 .dashicons,.seopress-styles .seopress-option h2 .dashicons{margin:0 10px;font-size:40px;width:40px;height:40px;vertical-align:middle}.seopress-styles .seopress-option .link-archive{font-size:14px}.seopress-styles .seopress-option .link-archive .dashicons{font-size:18px;width:20px;height:20px;margin:inherit}.seopress-styles .seopress-option h1>.dashicons{font-size:30px;width:30px;height:30px;background:#c4f0ff;border-radius:6px;padding:10px;margin-left:10px;color:#0085ba}.seopress-styles .seopress-option .metabox-holder h2 .dashicons{font-size:16px}.seopress-option h1 .feature-state .dashicons{font-size:16px;width:16px;height:16px;vertical-align:middle;margin:0 10px 0 0}.seopress-styles .wrap{margin:20px 0 0 0;display:flex;position:relative}@media only screen and (max-width:1024px){.seopress-styles .wrap{display:inline-block;width:100%}}#seopress-admin-tabs.wrap{display:block;box-shadow:0 7px 14px 0 rgba(60,66,87,.12),0 3px 6px 0 rgba(0,0,0,.12);width:64rem;margin:0 auto}.seopress-styles .seopress-option .submit{background:#fff;text-align:center;border-top:1px solid #f1f1f1;padding-top:20px;padding-bottom:20px;margin:0}.seopress-styles .seopress-option #seopress-aio-migrate,.seopress-styles .seopress-option #seopress-rk-migrate,.seopress-styles .seopress-option #seopress-seo-framework-migrate,.seopress-styles .seopress-option #seopress-squirrly-migrate,.seopress-styles .seopress-option #seopress-yoast-migrate,.seopress-styles .seopress-option #submit{color:#fff;text-decoration:none;border:none;border-radius:4px;padding-right:20px;padding-left:20px;line-height:34px;text-transform:uppercase;min-height:34px;transition:all .3s linear;text-shadow:none;box-shadow:0 7px 14px rgba(50,50,93,.1),0 3px 6px rgba(0,0,0,.1);margin-right:15px;background:#6a7c94;position:relative;height:auto;z-index:10}.seopress-styles .seopress-option #seopress-aio-migrate:hover,.seopress-styles .seopress-option #seopress-rk-migrate:hover,.seopress-styles .seopress-option #seopress-seo-framework-migrate:hover,.seopress-styles .seopress-option #seopress-squirrly-migrate:hover,.seopress-styles .seopress-option #seopress-yoast-migrate:hover,.seopress-styles .seopress-option #submit:hover{text-decoration:none;color:#fff;background:#232323}.seopress-styles #wpcontent{padding-left:0}.seopress-styles pre{color:#42b72a;background:#f5f6f7;font-family:Menlo,Monaco,Andale Mono,Courier New,monospace;padding:7px}.seopress-styles #seopress-navbar{padding:10px .5rem;height:56px;margin:0 auto;width:64rem;box-sizing:border-box;position:relative}#seopress-header{margin:0 auto;position:relative;width:100%}#seopress-header #seopress-admin h1{line-height:40px;margin:0;display:inline-block;height:40px;width:40px;background-size:100%;background-repeat:no-repeat}#seopress-header #seopress-admin h1::before{font-size:14px;line-height:40px;position:absolute;border-radius:6px;font-weight:400;color:#fff;width:40px;height:40px;text-align:center;background:#3a4afb;background:-moz-linear-gradient(45deg,#3a4afb 0,#47bea5 100%);background:-webkit-linear-gradient(45deg,#3a4afb 0,#47bea5 100%);background:linear-gradient(45deg,#3a4afb 0,#47bea5 100%)}#seopress-header #seopress-admin h1:hover{cursor:pointer}#seopress-header #seopress-admin h1>a{text-decoration:none;color:inherit}#seopress-header #seopress-admin .seopress-quick-access{background:#fff;box-shadow:0 50px 100px rgba(50,50,93,.1),0 15px 35px rgba(50,50,93,.2),0 5px 15px rgba(0,0,0,.1);border-radius:4px;overflow:hidden;position:relative;font-size:17px;line-height:40px;white-space:nowrap;transform:rotate3d(1,1,0,-15deg);transform-origin:100% 0;opacity:0;will-change:transform,opacity;transition-property:transform,opacity;transition-duration:.25s;z-index:300;padding:0;display:block;width:64rem;top:0;visibility:hidden;cursor:auto;left:-.5rem}#seopress-header #seopress-admin h1:hover .seopress-quick-access{transform:none;opacity:1;pointer-events:auto;visibility:visible}#seopress-header #seopress-admin .seopress-quick-access>ul{padding:20px;margin:0;float:left;width:100%;box-sizing:border-box}#seopress-header #seopress-admin h1 .seopress-quick-access li{text-decoration:none;display:inline-block;width:50%;margin:0;float:left;padding:10px 0}#seopress-header #seopress-admin h1 .seopress-quick-access li .dashicons{vertical-align:middle;background:#b7e1f3;border-radius:50%;padding:5px;margin-right:15px}#seopress-header #seopress-admin h1 .seopress-quick-access li a{text-decoration:none;font-size:15px;line-height:30px;text-transform:uppercase;display:block;width:100%;transition:all .3s linear;color:#3297d3}#seopress-header #seopress-admin h1 .seopress-quick-access li a:hover{color:#647a88}#seopress-header #seopress-admin h1 .seopress-info-version{position:relative;left:50px;top:0;font-size:14px;width:100px;display:block}#seopress-header #seopress-admin .wpc-info-version{font-size:14px;left:310px;position:absolute;text-indent:0;top:85px}#seopress-header #seopress-notice{float:right;line-height:40px}#seopress-header #seopress-notice p{font-size:16px}#seopress-header #seopress-notice .dashicons{color:#6f8096;text-decoration:none;line-height:40px}#seopress-header #seopress-notice div.small{font-size:13px;display:inline}#seopress-footer-credits{font-style:italic}#seopress-footer-credits .wporg-ratings{display:inline}#seopress-footer-credits .wporg-ratings a{text-decoration:none}.seopress-option .seopress-settings{float:left;max-width:750px;width:100%}.seopress-option #seopress-edd-license-btn,.seopress-option #seopress-refresh{float:left}.wp-admin-ui_page_seopress-import-export .postbox{margin-right:20px}.seopress-option #side-sortables .accordion-section-content{padding:0}.seopress-option .seopress-settings label{margin:0 0 0 10px}.wrap-seopress-tab-content{position:relative;display:block;width:100%;max-width:64rem;margin:0 auto;box-sizing:border-box}#seopress-admin-tabs .seopress-tab{padding:1.5rem;visibility:hidden;overflow:hidden;opacity:0;transition:all .2s ease;transform:translateX(-15px);position:absolute;top:0;box-sizing:border-box}#seopress-admin-tabs .seopress-tab.active{visibility:visible;overflow:inherit;opacity:1;transform:translateX(0);display:inherit;position:relative}#seopress-tabs .seopress-tab{padding:0 1.5rem;width:calc(100% - 230px);display:none}@media only screen and (max-width:1024px){#seopress-tabs .seopress-tab{width:100%}}#seopress-tabs .seopress-tab.active{display:inline-block;border-left:1px solid #eee}@media only screen and (max-width:1024px){#seopress-tabs .seopress-tab.active{width:100%;padding:0;border-left:none;border-top:1px solid #eee}}.seopress-option input[type=password],.seopress-option input[type=text],.seopress-option textarea{min-width:485px}@media only screen and (max-width:1024px){.seopress-option input[type=password],.seopress-option input[type=text],.seopress-option textarea{min-width:inherit;width:100%}}#seopress_htaccess_file{width:100%}.seopress-option textarea{min-height:100px}.seopress-option #side-sortables .highlight{border:1px dashed #ccc;display:block;width:382px;height:40px;background:0 0}.seopress-option #side-sortables .accordion-section{margin-bottom:9px;width:382px}.seopress-option #side-sortables .accordion-section h3{cursor:move;border:1px solid #e5e5e5;background:#fafafa}.seopress-option #side-sortables .accordion-section .inside{padding:10px 10px 24px;border-width:0 1px 1px;border-style:solid;box-shadow:0 1px 1px rgba(0,0,0,.04);border-color:#e5e5e5;display:inline-block;width:calc(100% - 22px);height:100%}.seopress-option #side-sortables .accordion-section .inside ul{padding-left:10px;margin-bottom:0;padding-top:2px;padding-bottom:2px}.seopress-option #side-sortables .accordion-section .inside ul li{border-left:2px solid #ccc;padding-left:10px;margin-bottom:10px}.seopress-option #side-sortables .accordion-section .inside ul li:first-child{border-bottom:1px dotted #e5e5e5;border-left:0;padding-bottom:10px;font-weight:700;margin-left:-15px;margin-bottom:10px}.seopress-notice #message{margin:5px 10px 2px 0}#seopress-notice a{position:relative;text-decoration:none}#seopress-notice a .tooltip{white-space:pre;z-index:200;padding:2px 5px;font-weight:500;font-size:12px;color:#aab7c4;background:#fff;box-shadow:0 1px 2px 0 rgba(49,49,93,.1),0 0 1px 0 rgba(0,0,0,.1);border-radius:2px;position:absolute;opacity:0;top:30px;transition:opacity .2s ease;visibility:hidden;line-height:20px;left:-100%;overflow:hidden}#seopress-notice a:hover .tooltip{opacity:1;visibility:visible}.seopress-page-list{margin:1.5rem auto}.seopress-option .dashicons,.seopress-page-list .dashicons{vertical-align:middle;margin-right:5px;color:#6f8096}#seopress-admin-tabs .ui-tabs-nav,#seopress-notifications-center,.seopress-get-started,.seopress-page-list .seopress-feature,.seopress-useful-tools{margin:0 auto 20px;max-width:64rem;padding:2rem;width:100%;border-radius:0 0 4px 4px;box-sizing:border-box}.seopress-get-started{margin-top:20px;background:#fff url(../img/bg-hero-support.svg) no-repeat 95% 50%/contain;position:relative;box-sizing:border-box;box-shadow:0 7px 14px 0 rgba(60,66,87,.12),0 3px 6px 0 rgba(0,0,0,.12)}.seopress-get-started .inside{max-width:calc(100% - 380px)}.seopress-get-started .preheader{text-transform:uppercase;font-size:.8rem;font-weight:600}.seopress-get-started h2{font-size:1.85em;margin:15px 0 0 0;font-weight:400}.seopress-get-started p{margin-bottom:20px}.seopress-get-started a .dashicons{vertical-align:middle;text-decoration:none;color:#6a7c94}.seopress-get-started a.button-primary .dashicons{color:#fff}.seopress-get-started a.btn-link .dashicons{margin-right:5px}.seopress-get-started a.btn-link{margin:0 0 0 10px}#seopress-notifications-center,.seopress-useful-tools{background:#fff;padding:0}.seopress-page-list .seopress-feature{padding:0;position:relative;overflow:hidden;transition-duration:.15s;display:flex;margin:0;background:#fff;box-shadow:0 7px 14px 0 rgba(60,66,87,.12),0 3px 6px 0 rgba(0,0,0,.12);flex-wrap:wrap;border-radius:4px;width:100%;height:100%}.seopress-page-list .seopress-feature p{color:#6b7c93;font-size:14px;margin-bottom:30px}#seopress-notifications-center{margin-top:0}#seopress-admin-tabs .ui-tabs-nav{display:flex;padding-top:1rem;padding-bottom:0}.seopress-page-list .seopress-feature .img-tool{height:50px;width:50px;background:#c4f0ff;position:relative;border-radius:6px}.seopress-page-list .seopress-feature .img-tool .dashicons{color:#217ab7;font-size:30px;text-align:left;vertical-align:middle;width:100%;height:100%;position:absolute;top:calc(50% - 15px);left:calc(50% - 15px);margin:0}.seopress-page-list .seopress-feature .inner{margin:0;display:inline-block;padding:1.5rem;width:100%;height:100%;box-sizing:border-box}.seopress-page-list .seopress-feature h3{margin:1rem 0 0 0;font-size:16px;font-weight:700;color:#3297d3;text-transform:uppercase}.seopress-page-list .seopress-feature h3 .dashicons{font-size:16px;margin-left:5px;vertical-align:middle}#seopress-content .seopress-page-list .seopress-feature a,#seopress-notifications-center .seopress-alert .button-primary,.seopress-get-started .button-primary,.seopress-option .seopress-feature a,.seopress-useful-tools .widget .button-primary{color:#fff;text-decoration:none;border:none;border-radius:4px;padding-right:20px;padding-left:20px;line-height:34px;text-transform:uppercase;min-height:34px;transition:all .3s linear;text-shadow:none;box-shadow:0 7px 14px rgba(50,50,93,.1),0 3px 6px rgba(0,0,0,.1);background:#6a7c94;position:relative;height:auto;display:flex;flex-wrap:wrap}#seopress-content .seopress-page-list .seopress-feature a.button-secondary{padding-left:30px}#seopress-content .seopress-page-list .seopress-feature a.button-secondary::before,#seopress-notifications-center .seopress-alert .button-primary::after{content:"\f111";font-family:Dashicons;position:absolute;left:10px;top:1px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:16px}#seopress-content .seopress-page-list .wrap-btn{display:inline-flex;margin-bottom:2rem;flex-direction:column}#seopress-content .seopress-page-list .seopress-feature a.view-redirects,#seopress-notifications-center .seopress-alert .button-primary,.seopress-get-started .button,.seopress-option .button{color:#6a7c94;background:#fff;font-weight:500;transition:all .3s linear;text-shadow:none;text-transform:uppercase;padding-right:20px;padding-left:20px;line-height:34px;min-height:34px;margin:10px 0;border-radius:4px;box-shadow:transparent 0 0 0 0,transparent 0 0 0 0,rgba(0,0,0,.12) 0 1px 1px 0,rgba(60,66,87,.16) 0 0 0 1px,transparent 0 0 0 0,transparent 0 0 0 0,rgba(60,66,87,.12) 0 2px 5px 0;vertical-align:baseline;display:inline-flex;align-items:center;border:none;margin-right:.5rem;cursor:pointer}.seopress-get-started .button{color:#fff;background:#6259e6;box-shadow:none}.seopress-option .wp-picker-container button{box-shadow:none;border:1px solid #0071a1;border-radius:3px;background:#f3f5f6;text-transform:none}.seopress-option .wp-picker-container input[type=text].wp-color-picker{min-width:inherit}.seopress-option .wp-picker-container .wp-picker-clear{box-shadow:none;text-transform:none;border-radius:0;background:0 0}.seopress-option .wp-picker-container .wp-picker-clear:hover{background:0 0;text-decoration:currentColor;color:inherit}.seopress-option .button .dashicons{font-size:16px}#seopress-content .seopress-page-list .seopress-feature a.view-redirects{padding-left:30px}#seopress-notifications-center .seopress-alert .button-primary::after{content:"\f344";left:inherit;right:10px}#seopress-content .seopress-page-list .seopress-feature a.view-redirects::before{content:"\f177"}#seopress-content .seopress-page-list .seopress-feature a:hover,#seopress-notifications-center .seopress-alert .button-primary:hover,.seopress-get-started .button-primary:hover,.seopress-option .button:hover,.seopress-option .seopress-feature a:hover,.seopress-useful-tools .widget .button-primary:hover{text-decoration:none;color:#fff;background:#232323}.seopress-get-started .button .dashicons{transition:all .3s linear}.seopress-get-started .button:hover .dashicons{color:#fff}#seopress-content .seopress-page-list .seopress-feature .seopress-doc:focus,#seopress-content .seopress-page-list .seopress-feature a:focus,#seopress-content .seopress-page-list .seopress-feature a:focus.button-secondary,#seopress-content a:focus,#seopress-notifications-center .seopress-alert .button-primary:focus,.seopress-option #seopress-tabs .seopress-doc:focus,.seopress-option .seopress-feature a:focus,.seopress-styles .seopress-option #seopress-aio-migrate:focus,.seopress-styles .seopress-option #seopress-yoast-migrate:focus,.seopress-styles .seopress-option #submit:focus,.seopress-useful-tools .widget .button-primary:focus{box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;background:#008ec2;border-color:#006799;color:#fff}#seopress-admin-tabs .nav-tab-wrapper a.nav-tab-active:focus{color:inherit}#seopress-notifications-center .seopress-alert .button-primary{margin:5px 0;padding-right:30px}#seopress-notifications-center h2,.seopress-useful-tools h2{margin:5px 0 15px 5px;display:inline-block;width:100%}#seopress-notifications-center .dashicons,.seopress-useful-tools .dashicons{margin-right:10px}#seopress-notifications-center .seopress-alert{padding:1.5rem 2rem 1.2rem 1rem;border-bottom:1px solid #e6ebf1;width:calc(100% - 3rem);flex:1 1 auto;position:relative;transition:all 150ms ease;align-items:center;display:flex;justify-content:space-between}#seopress-notifications-center .seopress-alert:last-child{margin-bottom:0;border-bottom:none}#seopress-notifications-center .seopress-alert:hover{cursor:default}#seopress-notifications-center .dashicons{display:flex;align-self:normal;width:48px;height:48px;color:#d7dade;font-size:48px;padding:0 1rem}#seopress-notifications-center .seopress-alert p{margin:0}#seopress-notifications-center .notice-left{flex:1}#seopress-notifications-center .notice-left>p:first-child{color:#1a1f36;font-weight:500}#seopress-notifications-center .notice-right{padding:1rem 0 0 0;display:flex}#seopress-notifications-center .seopress-alert.impact::after{content:"";width:10px;height:10px;border-radius:50px;position:absolute;right:1rem;top:1rem}#seopress-notifications-center .seopress-alert.impact.low::after{background:#ffde24}#seopress-notifications-center .seopress-alert.impact.medium::after{background:#e39f48}#seopress-notifications-center .seopress-alert.impact.high::after{background:#e25950}#seopress-notifications-center .seopress-alert.impact.info::after{background:#0085ba}#seopress-notifications-center .seopress-alert.dashicons{color:#6f8096}#seopress-notifications-center .dashicons.remove-notice,.seopress-get-started .remove-notice{position:absolute;right:0;color:#6b7c93;font-size:20px;height:30px;width:30px;vertical-align:middle;top:1.2rem;line-height:30px;padding:5px;transition:all .3s linear;margin:0;display:block}.seopress-get-started .remove-notice{top:10px;right:10px}#seopress-notifications-center .dashicons.remove-notice:hover,.seopress-get-started .remove-notice:hover{color:#1a1f36;cursor:pointer}#seopress-content .seopress-page-list .seopress-feature .seopress-doc,.seopress-option #seopress-tabs .seopress-doc{background:0 0;padding:0;text-decoration:none;color:inherit;box-shadow:none;position:absolute;right:.5rem;top:1rem}#seopress-content .seopress-page-list .seopress-feature .seopress-doc:hover,.seopress-option #seopress-tabs .seopress-doc:hover{color:#747474;background:0 0}#seopress-content .seopress-page-list .seopress-feature .seopress-doc:hover .dashicons{color:#232323}.seopress-option .seopress-table{background:#fff;border:1px solid #ccc}.seopress-option .seopress-table th{padding:15px 10px;vertical-align:middle}.wp-admin-ui_page_seopress-roles .seopress-option .seopress-table th{min-width:200px}.seopress-option .seopress-table .seopress-settings-section{background:#f1f1f1}.seopress-option .seopress-table .seopress-table-head .seopress-feature{border-bottom:1px solid #ccc;font-weight:700;background:#f1f1f1}#seopress-content .feature-state,.seopress-option .feature-state{font-style:italic;font-size:10px;display:inline-block;background:rgba(0,140,135,.1);padding:2px 10px;border-radius:25px;color:#444;font-weight:400;text-transform:none;-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial}@media only screen and (max-width:768px){#seopress-content .feature-state,.seopress-option .feature-state{display:none}}.seopress-option .seopress_wrap_single_cpt .feature-state,.seopress-option .seopress_wrap_tax .feature-state{padding:2px 12px;margin:0 0 .5rem .5rem}.seopress-option #tab_seopress_titles_archives h2,.seopress-option #tab_seopress_titles_single h2,.seopress-option #tab_seopress_titles_tax h2{margin:2em 0 1em 0;border-top:1px solid #eee;padding:1em 0 0 0}.seopress-option #tab_seopress_titles_archives h2:first-child,.seopress-option #tab_seopress_titles_single h2:first-child,.seopress-option #tab_seopress_titles_tax h2:first-child{border-top:none;margin:0 0 1em 0}#seopress_cpt .tag-title,#seopress_pro_cpt .tag-title,.seopress-button,.seopress-option .tag-title{cursor:pointer;font-weight:500;border-radius:4px;transition:all .3s linear}#seopress-content .feature-state-on,#seopress-content .feature-state.feature-state-on,.seopress-option .feature-state-on,.seopress-option .feature-state.feature-state-on{display:inline-block}#seopress-content .feature-state-off,.seopress-option .feature-state-off{display:none}.seopress-option .postbox .inside li{list-style:square inside;padding-left:5px}#tab_seopress_page_speed .inside li{list-style:none;padding-left:0;word-break:break-word}.seopress-option .log{margin:0;text-transform:uppercase;display:inline-block;vertical-align:middle;padding:5px;color:#13bf11;font-style:italic}.seopress-option input[type=text].seopress-admin-menu-input{min-width:inherit;width:100%}.seopress_page_seopress-import-export .postbox{width:calc(100% - 20px)}#seopress_cpt .wrap-tags,#seopress_pro_cpt .wrap-tags,.seopress-option .wrap-tags{position:relative;display:inline-block;width:100%;margin-bottom:10px}#seopress_cpt .tag-title,#seopress_pro_cpt .tag-title,.seopress-option .tag-title{padding:4px 8px;position:relative;top:5px;left:0;font-size:11px;float:left;margin-right:5px;user-select:none;margin-bottom:5px;background:#fff;color:#6b7c93;box-shadow:0 0 0 .5px rgba(50,50,93,.17),0 2px 5px 0 rgba(50,50,93,.12),0 3px 9px 0 rgba(50,50,93,.08),0 1px 1.5px 0 rgba(0,0,0,.08),0 1px 2px 0 rgba(0,0,0,.08)}#seopress_cpt .tag-title:active,#seopress_cpt .tag-title:focus,#seopress_cpt .tag-title:hover,#seopress_pro_cpt .tag-title:active,#seopress_pro_cpt .tag-title:focus,#seopress_pro_cpt .tag-title:hover,.seopress-option .tag-title:active,.seopress-option .tag-title:focus,.seopress-option .tag-title:hover{background:#232323;color:#fff;user-select:none}#seopress_cpt .tag-title .dashicons,#seopress_pro_cpt .tag-title .dashicons,.seopress-option .tag-title .dashicons{padding:0;height:16px;width:16px;font-size:16px;margin-right:5px;vertical-align:middle}.seopress-button{text-transform:uppercase;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;display:inline-block;margin:0;outline:0;overflow:hidden;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:20px;padding:6px 8px 6px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.seopress-button:hover{border-color:#a8bece;color:#00a0d2}.seopress-button .dashicons{vertical-align:middle}#seopress-content #tab_seopress_seo_tools.seopress-useful-tools .widget{border-right:1px solid #e6ebf1;margin:0;padding:0 20px;width:calc(50% - 2px);box-sizing:border-box;display:inline-block;vertical-align:top}#seopress-content #tab_seopress_seo_tools.seopress-useful-tools .widget:first-child{width:100%;display:block;clear:both;border-right:none;border-bottom:1px solid #e6ebf1;padding-bottom:20px;margin-bottom:20px}#seopress-content #tab_seopress_seo_tools.seopress-useful-tools .widget:last-child{border-right:none}#seopress-content .seopress-useful-tools .widget-reverse ul{background:#fff}#seopress-content .seopress-useful-tools .widget-reverse li{padding:10px;margin:0;border-bottom:1px solid #e6ebf1}#seopress-content .seopress-useful-tools .widget-reverse li:hover{background:#f5f7fa}#seopress-content .seopress-useful-tools .widget-title{text-transform:uppercase;margin:0 0 10px;font-size:13px;padding:10px 0;color:#24b47e}#seopress-content .seopress-reverse label,#seopress-content .seopress-useful-tools .widget-whois ul li span{font-weight:700}#seopress-content #seopress-reverse-url{width:100%;margin:10px 0}#seopress-content .widget-reverse p{margin:0}.post-type-seopress_backlinks .wp-list-table .column-seopress_backlinks_url{width:35%}.post-type-seopress_backlinks .wp-list-table .column-seopress_backlinks_anchor_text{width:20%}.seopress-styles #screen-meta{margin:0;position:relative;background-color:#fff;border-bottom:0 solid #f2f2f2;border-top:none;-webkit-box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08);box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08);top:0}.seopress-styles #contextual-help-link-wrap,.seopress-styles #screen-options-link-wrap{float:right;height:28px;margin:0 0 0 6px;border:1px solid #f2f2f2;border-top:none;background:#fff;-webkit-box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08);box-shadow:0 0 0 1px rgba(136,152,170,.1),0 15px 35px 0 rgba(49,49,93,.1),0 5px 15px 0 rgba(0,0,0,.08)}.seopress-styles #screen-meta-links .show-settings{box-shadow:none}.seopress-styles #screen-meta-links .screen-meta-toggle{position:relative;top:0;z-index:2000}.seopress-styles #contextual-help-back{background:#f8fafd}.seopress-styles .contextual-help-tabs .active{border-left:2px solid #3297d3;background:#f8fafd}#seopress-content input.toggle,#seopress_cpt input.toggle,.seopress-option input.toggle{max-height:0;max-width:0;opacity:0;position:relative}.seopress-feature input.toggle{display:block}.wrap-toggle-preview{position:relative}.wrap-toggle-preview p{font-weight:700;margin:0 0 1rem 0}#seopress_cpt input.toggle,.seopress_wrap_single_cpt input.toggle,.seopress_wrap_tax input.toggle{margin:0;border:none;min-width:0}#seopress_content_analysis span.label,#seopress_cpt span.label{outline:0;color:#fff;box-shadow:none;background:#555d66;padding:2px 4px;border-radius:4px;font-weight:700}#seopress-content input.toggle+label,#seopress_cpt #tabs-1 input.toggle+label,.seopress-option input.toggle+label{display:inline-block;position:relative;box-shadow:inset 0 0 0 1px #d5d5d5;text-indent:-5000px;height:20px;width:40px;border-radius:15px}#seopress_cpt #tabs-1 input.toggle+label{margin:0}.wrap-toggle-checkboxes input.toggle+label{float:left;margin-right:10px}#seopress-content input.toggle+label:before,#seopress_cpt input.toggle+label:before,.seopress-option input.toggle+label:before{content:"";position:absolute;display:block;height:20px;width:30px;top:0;left:0;border-radius:15px;background:rgba(19,191,17,0);-moz-transition:.25s ease-in-out;-webkit-transition:.25s ease-in-out;transition:.25s ease-in-out}#seopress-content input.toggle+label:after,#seopress_cpt input.toggle+label:after,.seopress-option input.toggle+label:after{content:"";position:absolute;display:block;height:20px;width:20px;top:0;left:0;border-radius:15px;background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 2px 4px rgba(0,0,0,.2);-moz-transition:.25s ease-in-out;-webkit-transition:.25s ease-in-out;transition:.25s ease-in-out}#seopress_cpt input.toggle+label,#seopress_cpt input.toggle+label:before,.seopress_wrap_single_cpt input.toggle+label,.seopress_wrap_single_cpt input.toggle+label:before,.seopress_wrap_tax input.toggle+label,.seopress_wrap_tax input.toggle+label:before{width:40px;height:20px}#seopress_cpt input.toggle+label:after,.seopress_wrap_single_cpt input.toggle+label:after,.seopress_wrap_tax input.toggle+label:after{width:20px;height:20px}#seopress-content input.toggle[data-toggle="1"]+label:before,#seopress_cpt input.toggle[data-toggle="1"]+label:before,.seopress-option input.toggle[data-toggle="1"]+label:before{width:40px;background:#3197d3}#seopress_cpt input.toggle[data-toggle="1"]+label:before,.seopress_wrap_single_cpt input.toggle[data-toggle="1"]+label:before,.seopress_wrap_tax input.toggle[data-toggle="1"]+label:before{width:40px;background:#3197d3}#seopress-content input.toggle[data-toggle="1"]+label:after,#seopress_cpt input.toggle[data-toggle="1"]+label:after,.seopress-option input.toggle[data-toggle="1"]+label:after{left:20px;box-shadow:inset 0 0 0 1px #3197d3,0 2px 4px rgba(0,0,0,.2)}#seopress_cpt input.toggle[data-toggle="1"]+label:after,.seopress_wrap_single_cpt input.toggle[data-toggle="1"]+label:after,.seopress_wrap_tax input.toggle[data-toggle="1"]+label:after{box-shadow:inset 0 0 0 1px #3197d3,0 2px 4px rgba(0,0,0,.2)}#seopress-content .seopress-page-list{position:relative;display:grid;max-width:64rem;grid-gap:20px 20px;grid-template-columns:repeat(3,1fr)}#seopress-notice-save{position:fixed;color:#fff;padding:15px 40px;font-size:.9rem;text-transform:uppercase;text-align:center;border-radius:0;background:rgba(74,184,102,.9);bottom:0;right:0;z-index:500;width:100%;font-weight:700}#seopress-notice-save .dashicons{color:#fff}.seopress_page_seopress-pro-page #wpcontent{background:#f4f7fa}.seopress-option .wrap div.nav-tab-wrapper{margin:0 0 0 -26px;padding:0 0 0 10px;line-height:inherit;width:230px;z-index:95;font-weight:400;display:block;border-bottom:none}@media only screen and (max-width:1024px){.seopress-option .wrap div.nav-tab-wrapper{width:100%;margin:0;padding:0}}#seopress-admin-tabs.wrap div.nav-tab-wrapper{margin:20px auto 0;max-width:64rem;width:100%;border-bottom:1px solid #e6ebf1;padding:0;line-height:inherit;position:-webkit-sticky;position:sticky;background:#f5f7fa;z-index:100;top:31px;border-radius:4px 4px 0 0;font-weight:400;overflow:hidden;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}#seopress-admin-tabs #tab_seopress_notifications.seopress-tab{background:0 0;padding:0;border-radius:0}.seopress-option .nav-tab{border:0 solid #ccc;background:0 0;opacity:.5;padding:6px 30px 6px 10px;transition:opacity .3s linear;color:#191e23;margin:0;float:none;display:inline-block;width:100%;text-align:left;font-weight:400;box-sizing:border-box;white-space:normal}#seopress-admin-tabs .nav-tab{border:0 solid #ccc;background:0 0;opacity:.5;padding:14px 20px;transition:opacity .3s linear;color:#191e23;margin:0;box-shadow:inset -1px 0 #e3e8ee;float:none;display:inline-block;text-align:center;font-weight:400}#seopress-admin-tabs .nav-tab{width:100%}#seopress-admin-tabs .nav-tab-active,#seopress-admin-tabs .nav-tab-active:hover,.seopress-option .about-wrap h2 .nav-tab-active,.seopress-option .nav-tab-active,.seopress-option .nav-tab-active:hover{background-color:#fff}#seopress-admin-tabs .nav-tab-active,#seopress-admin-tabs .nav-tab-active:focus,#seopress-admin-tabs .nav-tab-active:focus:active,#seopress-admin-tabs .nav-tab-active:hover,#seopress-admin-tabs .nav-tab:focus,.nav-tab-active:focus,.seopress-option .nav-tab-active,.seopress-option .nav-tab-active:focus:active,.seopress-option .nav-tab-active:hover,.seopress-option .nav-tab:focus{opacity:1;outline:0;font-weight:600;position:relative;color:#191e23;border-left:3px solid #0085ba;background:rgba(0,133,186,.1)}#seopress-admin-tabs .nav-tab-active,#seopress-admin-tabs .nav-tab-active:focus,#seopress-admin-tabs .nav-tab-active:focus:active,#seopress-admin-tabs .nav-tab-active:hover,#seopress-admin-tabs .nav-tab:focus{border-bottom:3px solid #3197d3;border-left:none;background:#fff}#seopress-admin-tabs .nav-tab:hover,.seopress-option .nav-tab:hover{opacity:1}#seopress-admin-tabs .nav-tab:focus,.seopress-option .nav-tab:focus{outline:0;box-shadow:none}.seopress-option .section-tool{border:none;box-shadow:none;background:0 0;position:relative}.seopress-option .section-tool::after{content:'';background:#dedede;height:1px;width:100%;display:block}.seopress-option .sp-section-header{border-bottom:1px solid #eee;margin:0 0 1rem 0;width:100%;display:flex;position:relative;align-items:center;padding-bottom:.5rem}.seopress-option .sp-section-header::after{position:absolute;content:'';background:#0085ba;height:2px;width:40px;bottom:0;left:0}.seopress-option .sp-section-header h2{font-size:1.5em}.seopress-option .sp-section-header>.dashicons{color:#0085ba;padding:10px;border-radius:6px;margin-right:10px;background:#c4f0ff}.seopress-option .sp-section-header .wrap-toggle-checkboxes{display:flex}.seopress-styles .wrap .notice{margin:5px 0 15px 15px}
assets/js/seopress-block-editor.js CHANGED
@@ -1,16 +1,15 @@
1
  //Retrieve title / meta-desc from source code
2
  jQuery(document).ready(function($) {
3
-
4
-
5
-
6
  const { subscribe, select } = wp.data;
7
  let hasSaved = false;
8
 
9
  subscribe( () => {
10
- var isSavingPost = wp.data.select('core/editor').isSavingPost();
11
  var isAutosavingPost = wp.data.select('core/editor').isAutosavingPost();
 
 
12
 
13
- if (isSavingPost && !isAutosavingPost && !hasSaved) {
14
 
15
  $.ajax({
16
  method : 'GET',
@@ -37,6 +36,7 @@ let hasSaved = false;
37
  typeof s.data.tw_title ==="undefined" ? tw_title = "" : tw_title = s.data.tw_title.values;
38
  typeof s.data.tw_desc ==="undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
39
  typeof s.data.tw_img ==="undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
 
40
 
41
  var data_arr = {og_title : og_title,
42
  og_desc : og_desc,
@@ -58,6 +58,17 @@ let hasSaved = false;
58
  }
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
 
61
  // Google Preview
62
  $("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),
63
  $("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),
@@ -116,6 +127,6 @@ let hasSaved = false;
116
  },
117
  });
118
  }
119
- hasSaved = !! isSavingPost;
120
  });
121
  });
1
  //Retrieve title / meta-desc from source code
2
  jQuery(document).ready(function($) {
 
 
 
3
  const { subscribe, select } = wp.data;
4
  let hasSaved = false;
5
 
6
  subscribe( () => {
7
+ //var isSavingPost = wp.data.select('core/editor').isSavingPost();
8
  var isAutosavingPost = wp.data.select('core/editor').isAutosavingPost();
9
+ var isSavingMetaBoxes = wp.data.select('core/edit-post').isSavingMetaBoxes();
10
+
11
 
12
+ if (isSavingMetaBoxes && !isAutosavingPost && !hasSaved) {
13
 
14
  $.ajax({
15
  method : 'GET',
36
  typeof s.data.tw_title ==="undefined" ? tw_title = "" : tw_title = s.data.tw_title.values;
37
  typeof s.data.tw_desc ==="undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
38
  typeof s.data.tw_img ==="undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
39
+ typeof s.data.meta_robots ==="undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
40
 
41
  var data_arr = {og_title : og_title,
42
  og_desc : og_desc,
58
  }
59
  }
60
 
61
+ // Meta Robots
62
+ meta_robots = meta_robots.toString();
63
+
64
+ $("#sp-advanced-alert").empty();
65
+
66
+ var if_noindex = new RegExp('noindex');
67
+
68
+ if(if_noindex.test(meta_robots)){
69
+ $("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>');
70
+ }
71
+
72
  // Google Preview
73
  $("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),
74
  $("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),
127
  },
128
  });
129
  }
130
+ hasSaved = !! isSavingMetaBoxes; //isSavingPost != 0;
131
  });
132
  });
assets/js/seopress-block-editor.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){const{subscribe:t,select:s}=wp.data;let i=!1;t(()=>{var t=wp.data.select("core/editor").isSavingPost(),s=wp.data.select("core/editor").isAutosavingPost();!t||s||i||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},beforeSend:function(){e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),e(".analysis-score p").addClass("loading")},success:function(t){void 0===t.data.og_title?og_title="":og_title=t.data.og_title.values,void 0===t.data.og_desc?og_desc="":og_desc=t.data.og_desc.values,void 0===t.data.og_img?og_img="":og_img=t.data.og_img.values,void 0===t.data.og_url?og_url="":og_url=t.data.og_url.host,void 0===t.data.og_site_name?og_site_name="":og_site_name=t.data.og_site_name.values,void 0===t.data.tw_title?tw_title="":tw_title=t.data.tw_title.values,void 0===t.data.tw_desc?tw_desc="":tw_desc=t.data.tw_desc.values,void 0===t.data.tw_img?tw_img="":tw_img=t.data.tw_img.values;var s={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img};for(var i in s)s.length&&(i=s[i].length>1?s[i].slice(-1)[0]:s[i][0]);e("#seopress_cpt .google-snippet-preview .snippet-title").html(t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(t.data.title),e("#seopress_titles_title_meta").attr("placeholder",t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(t.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(t.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",t.data.meta_desc),s.og_title&&(e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title").html(s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title-default").html(s.og_title[0])),s.og_desc&&(e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description").html(s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description-default").html(s.og_desc[0])),s.og_img&&(e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img img").attr("src",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src",s.og_img[0])),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(s.og_url),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(s.og_site_name),s.tw_title&&(e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title").html(s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title-default").html(s.tw_title[0])),s.tw_desc&&(e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description").html(s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description-default").html(s.tw_desc[0])),s.tw_img&&(e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img img").attr("src",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img-default img").attr("src",s.tw_img[0])),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(s.og_url),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",t.data.canonical),e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1","",sp_ca_toggle),e(".analysis-score p").removeClass("loading")}}),i=!!t})});
1
+ jQuery(document).ready(function(e){const{subscribe:t,select:s}=wp.data;let a=!1;t(()=>{var t=wp.data.select("core/editor").isAutosavingPost(),s=wp.data.select("core/edit-post").isSavingMetaBoxes();!s||t||a||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},beforeSend:function(){e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),e(".analysis-score p").addClass("loading")},success:function(t){void 0===t.data.og_title?og_title="":og_title=t.data.og_title.values,void 0===t.data.og_desc?og_desc="":og_desc=t.data.og_desc.values,void 0===t.data.og_img?og_img="":og_img=t.data.og_img.values,void 0===t.data.og_url?og_url="":og_url=t.data.og_url.host,void 0===t.data.og_site_name?og_site_name="":og_site_name=t.data.og_site_name.values,void 0===t.data.tw_title?tw_title="":tw_title=t.data.tw_title.values,void 0===t.data.tw_desc?tw_desc="":tw_desc=t.data.tw_desc.values,void 0===t.data.tw_img?tw_img="":tw_img=t.data.tw_img.values,void 0===t.data.meta_robots?meta_robots="":meta_robots=t.data.meta_robots[0];var s={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img};for(var a in s)s.length&&(a=s[a].length>1?s[a].slice(-1)[0]:s[a][0]);meta_robots=meta_robots.toString(),e("#sp-advanced-alert").empty(),new RegExp("noindex").test(meta_robots)&&e("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>'),e("#seopress_cpt .google-snippet-preview .snippet-title").html(t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(t.data.title),e("#seopress_titles_title_meta").attr("placeholder",t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(t.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(t.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",t.data.meta_desc),s.og_title&&(e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title").html(s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title-default").html(s.og_title[0])),s.og_desc&&(e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description").html(s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description-default").html(s.og_desc[0])),s.og_img&&(e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img img").attr("src",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src",s.og_img[0])),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(s.og_url),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(s.og_site_name),s.tw_title&&(e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title").html(s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title-default").html(s.tw_title[0])),s.tw_desc&&(e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description").html(s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description-default").html(s.tw_desc[0])),s.tw_img&&(e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img img").attr("src",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img-default img").attr("src",s.tw_img[0])),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(s.og_url),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",t.data.canonical),e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1","",sp_ca_toggle),e(".analysis-score p").removeClass("loading")}}),a=!!s})});
assets/js/seopress-counters.js CHANGED
@@ -62,7 +62,7 @@ function sp_titles_counters() {
62
  jQuery('#seopress_titles_title_counters_progress').attr('aria-valuenow',progress),
63
  jQuery('#seopress_titles_title_counters_progress').text(progress +'%'),
64
  jQuery('#seopress_titles_title_counters_progress').css('width',progress +'%')
65
- })
66
  }
67
 
68
  function sp_meta_desc_counters() {
@@ -130,7 +130,7 @@ function sp_meta_desc_counters() {
130
  jQuery('#seopress_titles_desc_counters_progress').text(progress +'%'),
131
  jQuery('#seopress_titles_desc_counters_progress').css('width',progress +'%')
132
 
133
- }), jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function(e) {
134
  var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
135
  var meta_desc_placeholder = jQuery("#seopress_titles_desc_meta").attr("placeholder");
136
 
@@ -151,43 +151,38 @@ function sp_meta_desc_counters() {
151
  jQuery('#seopress_titles_desc_counters_progress').attr('aria-valuenow',progress),
152
  jQuery('#seopress_titles_desc_counters_progress').text(progress +'%'),
153
  jQuery('#seopress_titles_desc_counters_progress').css('width',progress +'%')
154
- })
155
  }
156
 
157
  function pixelTitle(e) {
158
- inputText = e;
159
- font = "18px Arial";
160
-
161
- canvas = document.createElement("canvas");
162
- context = canvas.getContext("2d");
163
- context.font = font;
164
- width = context.measureText(inputText).width;
165
- formattedWidth = Math.ceil(width);
166
-
167
- return formattedWidth;
168
  }
169
 
170
  function pixelDesc(e) {
171
- inputText = e;
172
- font = "14px Arial";
173
-
174
- canvas = document.createElement("canvas");
175
- context = canvas.getContext("2d");
176
- context.font = font;
177
- width = context.measureText(inputText).width;
178
- formattedWidth = Math.ceil(width);
179
-
180
- return formattedWidth;
181
  }
182
 
183
- function sp_is_valid_url(str) {
184
- var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
185
- '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
186
- '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
187
- '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
188
- '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
189
- '(\\#[-a-z\\d_]*)?$','i'); // fragment locator
190
- return !!pattern.test(str);
191
  }
192
 
193
  function sp_social_img(social_slug) {
@@ -244,7 +239,7 @@ function sp_social_img(social_slug) {
244
  });
245
  }
246
  } else {
247
- jQuery(".snippet-"+social_slug+"-img-alert.alert3").css("display", "block");
248
  }
249
  }
250
 
@@ -334,64 +329,76 @@ jQuery(document).ready(function(e) {
334
  } else {
335
  jQuery("#seopress_cpt .google-snippet-preview").removeClass("mobile-preview");
336
  }
337
- jQuery('#toggle-preview').on('click', function() {
338
  jQuery('#toggle-preview').attr('data-toggle', jQuery('#toggle-preview').attr('data-toggle') == '1' ? '0' : '1');
339
- jQuery("#seopress_cpt .google-snippet-preview").toggleClass("mobile-preview");
340
- });
341
- function s() {
342
- e.ajax({
343
- method: "GET",
344
- url: seopressAjaxRealPreview.seopress_real_preview,
345
- data: {
346
- action: "seopress_do_real_preview",
347
- post_id: e("#seopress-tabs").attr("data_id"),
348
- tax_name: e("#seopress-tabs").attr("data_tax"),
349
- origin: e("#seopress-tabs").attr("data_origin"),
350
- post_type: e("#seopress_launch_analysis").attr("data_post_type"),
351
- seopress_analysis_target_kw: e("#seopress_analysis_target_kw_meta").val(),
352
- _ajax_nonce: seopressAjaxRealPreview.seopress_nonce
353
  },
354
  beforeSend: function() {
355
  e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),
356
  e(".analysis-score p").addClass('loading')
357
  },
358
  success: function(s) {
359
- typeof s.data.og_title ==="undefined" ? og_title = "" : og_title = s.data.og_title.values;
360
- typeof s.data.og_desc ==="undefined" ? og_desc = "" : og_desc = s.data.og_desc.values;
361
- typeof s.data.og_img ==="undefined" ? og_img = "" : og_img = s.data.og_img.values;
362
- typeof s.data.og_url ==="undefined" ? og_url = "" : og_url = s.data.og_url.host;
363
- typeof s.data.og_site_name ==="undefined" ? og_site_name = "" : og_site_name = s.data.og_site_name.values;
364
- typeof s.data.tw_title ==="undefined" ? tw_title = "" : tw_title = s.data.tw_title.values;
365
- typeof s.data.tw_desc ==="undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
366
- typeof s.data.tw_img ==="undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
367
-
368
- var data_arr = {og_title : og_title,
369
- og_desc : og_desc,
370
- og_img : og_img,
371
- og_url : og_url,
372
- og_site_name : og_site_name,
373
- tw_title : tw_title,
374
- tw_desc : tw_desc,
375
- tw_img : tw_img
376
- };
377
-
378
- for (var key in data_arr) {
379
- if (data_arr.length) {
380
- if (data_arr[key].length > 1) {
381
- key = data_arr[key].slice(-1)[0];
382
- } else {
383
- key = data_arr[key][0];
384
- }
385
- }
386
- }
 
 
 
 
 
 
 
 
 
 
 
 
387
 
388
  // Google Preview
389
- e("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),
390
- e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),
391
- e("#seopress_titles_title_meta").attr("placeholder", s.data.title),
392
- e("#seopress_cpt .google-snippet-preview .snippet-description").html(s.data.meta_desc),
393
- e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(s.data.meta_desc),
394
- e("#seopress_titles_desc_meta").attr("placeholder", s.data.meta_desc)
395
 
396
  // Facebook Preview
397
  if (data_arr.og_title) {
@@ -412,8 +419,8 @@ jQuery(document).ready(function(e) {
412
  e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src", data_arr.og_img[0])
413
  }
414
 
415
- e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(data_arr.og_url),
416
- e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(data_arr.og_site_name)
417
 
418
  // Twitter Preview
419
  if (data_arr.tw_title) {
@@ -436,7 +443,7 @@ jQuery(document).ready(function(e) {
436
 
437
  e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(data_arr.og_url),
438
 
439
- e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder", s.data.canonical),
440
 
441
  e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1", '', sp_ca_toggle),
442
  e(".analysis-score p").removeClass('loading'),
@@ -446,12 +453,12 @@ jQuery(document).ready(function(e) {
446
  sp_titles_counters(),
447
  sp_meta_desc_counters(),
448
  sp_social()
449
- }
450
- })
451
- }
452
  s(),
453
  e("#seopress_launch_analysis").on("click", function() {
454
- s()
455
  }),
456
  sp_ca_toggle()
457
  });
62
  jQuery('#seopress_titles_title_counters_progress').attr('aria-valuenow',progress),
63
  jQuery('#seopress_titles_title_counters_progress').text(progress +'%'),
64
  jQuery('#seopress_titles_title_counters_progress').css('width',progress +'%')
65
+ })
66
  }
67
 
68
  function sp_meta_desc_counters() {
130
  jQuery('#seopress_titles_desc_counters_progress').text(progress +'%'),
131
  jQuery('#seopress_titles_desc_counters_progress').css('width',progress +'%')
132
 
133
+ }), jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function(e) {
134
  var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
135
  var meta_desc_placeholder = jQuery("#seopress_titles_desc_meta").attr("placeholder");
136
 
151
  jQuery('#seopress_titles_desc_counters_progress').attr('aria-valuenow',progress),
152
  jQuery('#seopress_titles_desc_counters_progress').text(progress +'%'),
153
  jQuery('#seopress_titles_desc_counters_progress').css('width',progress +'%')
154
+ })
155
  }
156
 
157
  function pixelTitle(e) {
158
+ inputText = e;
159
+ font = "18px Arial";
160
+
161
+ canvas = document.createElement("canvas");
162
+ context = canvas.getContext("2d");
163
+ context.font = font;
164
+ width = context.measureText(inputText).width;
165
+ formattedWidth = Math.ceil(width);
166
+
167
+ return formattedWidth;
168
  }
169
 
170
  function pixelDesc(e) {
171
+ inputText = e;
172
+ font = "14px Arial";
173
+
174
+ canvas = document.createElement("canvas");
175
+ context = canvas.getContext("2d");
176
+ context.font = font;
177
+ width = context.measureText(inputText).width;
178
+ formattedWidth = Math.ceil(width);
179
+
180
+ return formattedWidth;
181
  }
182
 
183
+ function sp_is_valid_url(string) {
184
+ var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
185
+ return (res !== null)
 
 
 
 
 
186
  }
187
 
188
  function sp_social_img(social_slug) {
239
  });
240
  }
241
  } else {
242
+ jQuery(".snippet-"+social_slug+"-img-alert.alert5").css("display", "block");
243
  }
244
  }
245
 
329
  } else {
330
  jQuery("#seopress_cpt .google-snippet-preview").removeClass("mobile-preview");
331
  }
332
+ jQuery('#toggle-preview').on('click', function() {
333
  jQuery('#toggle-preview').attr('data-toggle', jQuery('#toggle-preview').attr('data-toggle') == '1' ? '0' : '1');
334
+ jQuery("#seopress_cpt .google-snippet-preview").toggleClass("mobile-preview");
335
+ });
336
+ function s() {
337
+ e.ajax({
338
+ method: "GET",
339
+ url: seopressAjaxRealPreview.seopress_real_preview,
340
+ data: {
341
+ action: "seopress_do_real_preview",
342
+ post_id: e("#seopress-tabs").attr("data_id"),
343
+ tax_name: e("#seopress-tabs").attr("data_tax"),
344
+ origin: e("#seopress-tabs").attr("data_origin"),
345
+ post_type: e("#seopress_launch_analysis").attr("data_post_type"),
346
+ seopress_analysis_target_kw: e("#seopress_analysis_target_kw_meta").val(),
347
+ _ajax_nonce: seopressAjaxRealPreview.seopress_nonce
348
  },
349
  beforeSend: function() {
350
  e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),
351
  e(".analysis-score p").addClass('loading')
352
  },
353
  success: function(s) {
354
+ typeof s.data.og_title ==="undefined" ? og_title = "" : og_title = s.data.og_title.values;
355
+ typeof s.data.og_desc ==="undefined" ? og_desc = "" : og_desc = s.data.og_desc.values;
356
+ typeof s.data.og_img ==="undefined" ? og_img = "" : og_img = s.data.og_img.values;
357
+ typeof s.data.og_url ==="undefined" ? og_url = "" : og_url = s.data.og_url.host;
358
+ typeof s.data.og_site_name ==="undefined" ? og_site_name = "" : og_site_name = s.data.og_site_name.values;
359
+ typeof s.data.tw_title ==="undefined" ? tw_title = "" : tw_title = s.data.tw_title.values;
360
+ typeof s.data.tw_desc ==="undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
361
+ typeof s.data.tw_img ==="undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
362
+ typeof s.data.meta_robots ==="undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
363
+
364
+ var data_arr = {og_title : og_title,
365
+ og_desc : og_desc,
366
+ og_img : og_img,
367
+ og_url : og_url,
368
+ og_site_name : og_site_name,
369
+ tw_title : tw_title,
370
+ tw_desc : tw_desc,
371
+ tw_img : tw_img
372
+ };
373
+
374
+ for (var key in data_arr) {
375
+ if (data_arr.length) {
376
+ if (data_arr[key].length > 1) {
377
+ key = data_arr[key].slice(-1)[0];
378
+ } else {
379
+ key = data_arr[key][0];
380
+ }
381
+ }
382
+ }
383
+
384
+ // Meta Robots
385
+ meta_robots = meta_robots.toString();
386
+
387
+ e("#sp-advanced-alert").empty();
388
+
389
+ var if_noindex = new RegExp('noindex');
390
+
391
+ if(if_noindex.test(meta_robots)){
392
+ e("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>');
393
+ }
394
 
395
  // Google Preview
396
+ e("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),
397
+ e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),
398
+ e("#seopress_titles_title_meta").attr("placeholder", s.data.title),
399
+ e("#seopress_cpt .google-snippet-preview .snippet-description").html(s.data.meta_desc),
400
+ e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(s.data.meta_desc),
401
+ e("#seopress_titles_desc_meta").attr("placeholder", s.data.meta_desc)
402
 
403
  // Facebook Preview
404
  if (data_arr.og_title) {
419
  e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src", data_arr.og_img[0])
420
  }
421
 
422
+ e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(data_arr.og_url),
423
+ e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(data_arr.og_site_name)
424
 
425
  // Twitter Preview
426
  if (data_arr.tw_title) {
443
 
444
  e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(data_arr.og_url),
445
 
446
+ e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder", s.data.canonical),
447
 
448
  e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1", '', sp_ca_toggle),
449
  e(".analysis-score p").removeClass('loading'),
453
  sp_titles_counters(),
454
  sp_meta_desc_counters(),
455
  sp_social()
456
+ }
457
+ })
458
+ }
459
  s(),
460
  e("#seopress_launch_analysis").on("click", function() {
461
+ s()
462
  }),
463
  sp_ca_toggle()
464
  });
assets/js/seopress-counters.min.js CHANGED
@@ -1 +1 @@
1
- function sp_titles_counters(){var e=jQuery("#seopress_titles_title_meta").val(),t=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),e.length>0?(jQuery("#seopress_titles_title_counters").text(e.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(e))):t.length&&(jQuery("#seopress_titles_title_counters").text(t.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(t))),e.length>60?jQuery("#seopress_titles_title_counters").css("color","red"):t.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(e)>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(t)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),e.length)var s=Math.round(pixelTitle(e)/568*100);else s=Math.round(pixelTitle(t)/568*100);s>=100&&(s=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",s),jQuery("#seopress_titles_title_counters_progress").text(s+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",s+"%"),jQuery("#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(e){var t=jQuery("#seopress_titles_title_meta").val(),s=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),t.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(t)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),0==t.length&&(s.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568&&jQuery("#seopress_titles_title_pixel").css("color","red")),t.length>0?(jQuery("#seopress_titles_title_counters").text(t.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(t))):s.length&&(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))),t.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==t.length&&(jQuery(".snippet-title-default").css("display","block"),jQuery(".snippet-title-custom").css("display","none"),jQuery(".snippet-title").css("display","none")),t.length)var i=Math.round(pixelTitle(t)/568*100);else i=Math.round(pixelTitle(s)/568*100);i>=100&&(i=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_title_counters_progress").text(i+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",i+"%")})}function sp_meta_desc_counters(){var e=jQuery("#seopress_titles_desc_meta").val(),t=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),e.length>0?(jQuery("#seopress_titles_desc_counters").text(e.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(e))):t.length&&(jQuery("#seopress_titles_desc_counters").text(t.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(t))),e.length>160?jQuery("#seopress_titles_desc_counters").css("color","red"):t.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(e)>940?jQuery("#seopress_titles_desc_pixel").css("color","red"):pixelDesc(t)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),e.length)var s=Math.round(pixelDesc(e)/940*100);else s=Math.round(pixelDesc(t)/940*100);s>=100&&(s=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",s),jQuery("#seopress_titles_desc_counters_progress").text(s+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",s+"%"),jQuery("#seopress_titles_desc_meta, #seopress-tag-single-excerpt").on("keyup paste change click",function(e){var t=jQuery("#seopress_titles_desc_meta").val(),s=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").css("color","inherit"),jQuery("#seopress_titles_desc_pixel").css("color","inherit"),t.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(t)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),0==t.length&&(s.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(s)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red")),t.length>0?(jQuery("#seopress_titles_desc_counters").text(t.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(t))):s.length&&(jQuery("#seopress_titles_desc_counters").text(s.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(s))),t.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==t.length&&(jQuery(".snippet-description-default").css("display","inline"),jQuery(".snippet-description-custom").css("display","none"),jQuery(".snippet-description").css("display","none")),t.length)var i=Math.round(pixelDesc(t)/940*100);else i=Math.round(pixelDesc(s)/940*100);i>=100&&(i=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_desc_counters_progress").text(i+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",i+"%")}),jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function(e){var t=jQuery("#seopress_titles_desc_meta").val(),s=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(0==t.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")),t.length)var i=t.length;else i=s.length;i>=100&&(i=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_desc_counters_progress").text(i+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",i+"%")})}function pixelTitle(e){return inputText=e,font="18px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function pixelDesc(e){return inputText=e,font="14px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function sp_is_valid_url(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}function sp_social_img(e){if(jQuery(".snippet-"+e+"-img-alert").css("display","none"),""==(t=jQuery("#seopress_social_"+e+"_img_meta").val()))var t=jQuery("#seopress_social_"+e+"_img_meta").attr("placeholder");!0===sp_is_valid_url(t)?(t.length>0?(jQuery(".snippet-"+e+"-img-custom img").attr("src",t),jQuery(".snippet-"+e+"-img").css("display","none"),jQuery(".snippet-"+e+"-img-custom").css("display","block"),jQuery(".snippet-"+e+"-img-default").css("display","none")):0==t.length&&(jQuery(".snippet-"+e+"-img-default").css("display","block"),jQuery(".snippet-"+e+"-img-custom").css("display","none"),jQuery(".snippet-"+e+"-img").css("display","none")),t.length>0&&jQuery.get(t).done(function(){var s=t.split(/\#|\?/)[0].split(".").pop().trim();if(-1==["jpg","jpeg","gif","png"].indexOf(s))jQuery(".snippet-"+e+"-img-alert.alert1").css("display","block");else{var i=new Image;i.src=t,jQuery(i).one("load",function(){pic_real_width=parseInt(i.width),pic_real_height=parseInt(i.height),"fb"==e?(min_width=200,min_height=200):(min_width=144,min_height=144),(pic_real_width<min_width||pic_real_height<min_height)&&jQuery(".snippet-"+e+"-img-alert.alert2").css("display","block"),ratio_img=(pic_real_width/pic_real_height).toFixed(2),jQuery(".snippet-"+e+"-img-alert.alert4").css("display","block"),jQuery(".snippet-"+e+"-img-alert.alert4 span").text(ratio_img)})}}).fail(function(){jQuery(".snippet-"+e+"-img-alert.alert3").css("display","block")})):jQuery(".snippet-"+e+"-img-alert.alert3").css("display","block")}function sp_social(){jQuery("#seopress_social_fb_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_fb_title_meta").val();t.length>0?(jQuery(".snippet-fb-title-custom").text(e.target.value),jQuery(".snippet-fb-title").css("display","none"),jQuery(".snippet-fb-title-custom").css("display","block"),jQuery(".snippet-fb-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-fb-title-default").css("display","block"),jQuery(".snippet-fb-title-custom").css("display","none"),jQuery(".snippet-fb-title").css("display","none"))}),jQuery("#seopress_social_fb_desc_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_fb_desc_meta").val();t.length>0?(jQuery(".snippet-fb-description-custom").text(e.target.value),jQuery(".snippet-fb-description").css("display","none"),jQuery(".snippet-fb-description-custom").css("display","block"),jQuery(".snippet-fb-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-fb-description-default").css("display","block"),jQuery(".snippet-fb-description-custom").css("display","none"),jQuery(".snippet-fb-description").css("display","none"))}),sp_social_img("fb"),jQuery("#seopress_social_fb_img_meta").on("keyup paste change click",function(){sp_social_img("fb")}),jQuery("#seopress_social_twitter_title_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_twitter_title_meta").val();t.length>0?(jQuery(".snippet-twitter-title-custom").text(e.target.value),jQuery(".snippet-twitter-title").css("display","none"),jQuery(".snippet-twitter-title-custom").css("display","block"),jQuery(".snippet-twitter-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-twitter-title-default").css("display","block"),jQuery(".snippet-twitter-title-custom").css("display","none"),jQuery(".snippet-twitter-title").css("display","none"))}),jQuery("#seopress_social_twitter_desc_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_twitter_desc_meta").val();t.length>0?(jQuery(".snippet-twitter-description-custom").text(e.target.value),jQuery(".snippet-twitter-description").css("display","none"),jQuery(".snippet-twitter-description-custom").css("display","block"),jQuery(".snippet-twitter-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-twitter-description-default").css("display","block"),jQuery(".snippet-twitter-description-custom").css("display","none"),jQuery(".snippet-twitter-description").css("display","none"))}),sp_social_img("twitter"),jQuery("#seopress_social_twitter_img_meta").on("keyup paste change click",function(){sp_social_img("twitter")})}function sp_ca_toggle(){var e=!1;jQuery(".gr-analysis-title .btn-toggle").on("click",function(t){e&&(event.stopImmediatePropagation(),event.preventDefault(),e=!1),jQuery(this).toggleClass("open"),jQuery(this).parent().parent().next(".gr-analysis-content").toggle()}),jQuery("#expand-all").on("click",function(e){e.preventDefault(),jQuery(".gr-analysis-content").show()}),jQuery("#close-all").on("click",function(e){e.preventDefault(),jQuery(".gr-analysis-content").hide()})}jQuery(document).ready(function(e){function t(){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},beforeSend:function(){e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),e(".analysis-score p").addClass("loading")},success:function(t){void 0===t.data.og_title?og_title="":og_title=t.data.og_title.values,void 0===t.data.og_desc?og_desc="":og_desc=t.data.og_desc.values,void 0===t.data.og_img?og_img="":og_img=t.data.og_img.values,void 0===t.data.og_url?og_url="":og_url=t.data.og_url.host,void 0===t.data.og_site_name?og_site_name="":og_site_name=t.data.og_site_name.values,void 0===t.data.tw_title?tw_title="":tw_title=t.data.tw_title.values,void 0===t.data.tw_desc?tw_desc="":tw_desc=t.data.tw_desc.values,void 0===t.data.tw_img?tw_img="":tw_img=t.data.tw_img.values;var s={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img};for(var i in s)s.length&&(i=s[i].length>1?s[i].slice(-1)[0]:s[i][0]);e("#seopress_cpt .google-snippet-preview .snippet-title").html(t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(t.data.title),e("#seopress_titles_title_meta").attr("placeholder",t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(t.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(t.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",t.data.meta_desc),s.og_title&&(e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title").html(s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title-default").html(s.og_title[0])),s.og_desc&&(e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description").html(s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description-default").html(s.og_desc[0])),s.og_img&&(e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img img").attr("src",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src",s.og_img[0])),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(s.og_url),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(s.og_site_name),s.tw_title&&(e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title").html(s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title-default").html(s.tw_title[0])),s.tw_desc&&(e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description").html(s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description-default").html(s.tw_desc[0])),s.tw_img&&(e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img img").attr("src",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img-default img").attr("src",s.tw_img[0])),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(s.og_url),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",t.data.canonical),e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1","",sp_ca_toggle),e(".analysis-score p").removeClass("loading"),e(" #seopress_titles_title_counters_val").remove(),e(" #seopress_titles_desc_counters_val").remove(),sp_titles_counters(),sp_meta_desc_counters(),sp_social()}})}"1"==jQuery("#toggle-preview").attr("data-toggle")?jQuery("#seopress_cpt .google-snippet-preview").addClass("mobile-preview"):jQuery("#seopress_cpt .google-snippet-preview").removeClass("mobile-preview"),jQuery("#toggle-preview").on("click",function(){jQuery("#toggle-preview").attr("data-toggle","1"==jQuery("#toggle-preview").attr("data-toggle")?"0":"1"),jQuery("#seopress_cpt .google-snippet-preview").toggleClass("mobile-preview")}),t(),e("#seopress_launch_analysis").on("click",function(){t()}),sp_ca_toggle()});
1
+ function sp_titles_counters(){var e=jQuery("#seopress_titles_title_meta").val(),t=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),e.length>0?(jQuery("#seopress_titles_title_counters").text(e.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(e))):t.length&&(jQuery("#seopress_titles_title_counters").text(t.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(t))),e.length>60?jQuery("#seopress_titles_title_counters").css("color","red"):t.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(e)>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(t)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),e.length)var s=Math.round(pixelTitle(e)/568*100);else s=Math.round(pixelTitle(t)/568*100);s>=100&&(s=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",s),jQuery("#seopress_titles_title_counters_progress").text(s+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",s+"%"),jQuery("#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(e){var t=jQuery("#seopress_titles_title_meta").val(),s=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),t.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(t)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),0==t.length&&(s.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568&&jQuery("#seopress_titles_title_pixel").css("color","red")),t.length>0?(jQuery("#seopress_titles_title_counters").text(t.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(t))):s.length&&(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))),t.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==t.length&&(jQuery(".snippet-title-default").css("display","block"),jQuery(".snippet-title-custom").css("display","none"),jQuery(".snippet-title").css("display","none")),t.length)var i=Math.round(pixelTitle(t)/568*100);else i=Math.round(pixelTitle(s)/568*100);i>=100&&(i=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_title_counters_progress").text(i+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",i+"%")})}function sp_meta_desc_counters(){var e=jQuery("#seopress_titles_desc_meta").val(),t=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),e.length>0?(jQuery("#seopress_titles_desc_counters").text(e.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(e))):t.length&&(jQuery("#seopress_titles_desc_counters").text(t.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(t))),e.length>160?jQuery("#seopress_titles_desc_counters").css("color","red"):t.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(e)>940?jQuery("#seopress_titles_desc_pixel").css("color","red"):pixelDesc(t)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),e.length)var s=Math.round(pixelDesc(e)/940*100);else s=Math.round(pixelDesc(t)/940*100);s>=100&&(s=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",s),jQuery("#seopress_titles_desc_counters_progress").text(s+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",s+"%"),jQuery("#seopress_titles_desc_meta, #seopress-tag-single-excerpt").on("keyup paste change click",function(e){var t=jQuery("#seopress_titles_desc_meta").val(),s=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").css("color","inherit"),jQuery("#seopress_titles_desc_pixel").css("color","inherit"),t.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(t)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),0==t.length&&(s.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(s)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red")),t.length>0?(jQuery("#seopress_titles_desc_counters").text(t.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(t))):s.length&&(jQuery("#seopress_titles_desc_counters").text(s.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(s))),t.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==t.length&&(jQuery(".snippet-description-default").css("display","inline"),jQuery(".snippet-description-custom").css("display","none"),jQuery(".snippet-description").css("display","none")),t.length)var i=Math.round(pixelDesc(t)/940*100);else i=Math.round(pixelDesc(s)/940*100);i>=100&&(i=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_desc_counters_progress").text(i+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",i+"%")}),jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function(e){var t=jQuery("#seopress_titles_desc_meta").val(),s=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(0==t.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")),t.length)var i=t.length;else i=s.length;i>=100&&(i=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_desc_counters_progress").text(i+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",i+"%")})}function pixelTitle(e){return inputText=e,font="18px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function pixelDesc(e){return inputText=e,font="14px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function sp_is_valid_url(e){return null!==e.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}function sp_social_img(e){if(jQuery(".snippet-"+e+"-img-alert").css("display","none"),""==(t=jQuery("#seopress_social_"+e+"_img_meta").val()))var t=jQuery("#seopress_social_"+e+"_img_meta").attr("placeholder");!0===sp_is_valid_url(t)?(t.length>0?(jQuery(".snippet-"+e+"-img-custom img").attr("src",t),jQuery(".snippet-"+e+"-img").css("display","none"),jQuery(".snippet-"+e+"-img-custom").css("display","block"),jQuery(".snippet-"+e+"-img-default").css("display","none")):0==t.length&&(jQuery(".snippet-"+e+"-img-default").css("display","block"),jQuery(".snippet-"+e+"-img-custom").css("display","none"),jQuery(".snippet-"+e+"-img").css("display","none")),t.length>0&&jQuery.get(t).done(function(){var s=t.split(/\#|\?/)[0].split(".").pop().trim();if(-1==["jpg","jpeg","gif","png"].indexOf(s))jQuery(".snippet-"+e+"-img-alert.alert1").css("display","block");else{var i=new Image;i.src=t,jQuery(i).one("load",function(){pic_real_width=parseInt(i.width),pic_real_height=parseInt(i.height),"fb"==e?(min_width=200,min_height=200):(min_width=144,min_height=144),(pic_real_width<min_width||pic_real_height<min_height)&&jQuery(".snippet-"+e+"-img-alert.alert2").css("display","block"),ratio_img=(pic_real_width/pic_real_height).toFixed(2),jQuery(".snippet-"+e+"-img-alert.alert4").css("display","block"),jQuery(".snippet-"+e+"-img-alert.alert4 span").text(ratio_img)})}}).fail(function(){jQuery(".snippet-"+e+"-img-alert.alert3").css("display","block")})):jQuery(".snippet-"+e+"-img-alert.alert5").css("display","block")}function sp_social(){jQuery("#seopress_social_fb_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_fb_title_meta").val();t.length>0?(jQuery(".snippet-fb-title-custom").text(e.target.value),jQuery(".snippet-fb-title").css("display","none"),jQuery(".snippet-fb-title-custom").css("display","block"),jQuery(".snippet-fb-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-fb-title-default").css("display","block"),jQuery(".snippet-fb-title-custom").css("display","none"),jQuery(".snippet-fb-title").css("display","none"))}),jQuery("#seopress_social_fb_desc_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_fb_desc_meta").val();t.length>0?(jQuery(".snippet-fb-description-custom").text(e.target.value),jQuery(".snippet-fb-description").css("display","none"),jQuery(".snippet-fb-description-custom").css("display","block"),jQuery(".snippet-fb-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-fb-description-default").css("display","block"),jQuery(".snippet-fb-description-custom").css("display","none"),jQuery(".snippet-fb-description").css("display","none"))}),sp_social_img("fb"),jQuery("#seopress_social_fb_img_meta").on("keyup paste change click",function(){sp_social_img("fb")}),jQuery("#seopress_social_twitter_title_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_twitter_title_meta").val();t.length>0?(jQuery(".snippet-twitter-title-custom").text(e.target.value),jQuery(".snippet-twitter-title").css("display","none"),jQuery(".snippet-twitter-title-custom").css("display","block"),jQuery(".snippet-twitter-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-twitter-title-default").css("display","block"),jQuery(".snippet-twitter-title-custom").css("display","none"),jQuery(".snippet-twitter-title").css("display","none"))}),jQuery("#seopress_social_twitter_desc_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_twitter_desc_meta").val();t.length>0?(jQuery(".snippet-twitter-description-custom").text(e.target.value),jQuery(".snippet-twitter-description").css("display","none"),jQuery(".snippet-twitter-description-custom").css("display","block"),jQuery(".snippet-twitter-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-twitter-description-default").css("display","block"),jQuery(".snippet-twitter-description-custom").css("display","none"),jQuery(".snippet-twitter-description").css("display","none"))}),sp_social_img("twitter"),jQuery("#seopress_social_twitter_img_meta").on("keyup paste change click",function(){sp_social_img("twitter")})}function sp_ca_toggle(){var e=!1;jQuery(".gr-analysis-title .btn-toggle").on("click",function(t){e&&(event.stopImmediatePropagation(),event.preventDefault(),e=!1),jQuery(this).toggleClass("open"),jQuery(this).parent().parent().next(".gr-analysis-content").toggle()}),jQuery("#expand-all").on("click",function(e){e.preventDefault(),jQuery(".gr-analysis-content").show()}),jQuery("#close-all").on("click",function(e){e.preventDefault(),jQuery(".gr-analysis-content").hide()})}jQuery(document).ready(function(e){function t(){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},beforeSend:function(){e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),e(".analysis-score p").addClass("loading")},success:function(t){void 0===t.data.og_title?og_title="":og_title=t.data.og_title.values,void 0===t.data.og_desc?og_desc="":og_desc=t.data.og_desc.values,void 0===t.data.og_img?og_img="":og_img=t.data.og_img.values,void 0===t.data.og_url?og_url="":og_url=t.data.og_url.host,void 0===t.data.og_site_name?og_site_name="":og_site_name=t.data.og_site_name.values,void 0===t.data.tw_title?tw_title="":tw_title=t.data.tw_title.values,void 0===t.data.tw_desc?tw_desc="":tw_desc=t.data.tw_desc.values,void 0===t.data.tw_img?tw_img="":tw_img=t.data.tw_img.values,void 0===t.data.meta_robots?meta_robots="":meta_robots=t.data.meta_robots[0];var s={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img};for(var i in s)s.length&&(i=s[i].length>1?s[i].slice(-1)[0]:s[i][0]);meta_robots=meta_robots.toString(),e("#sp-advanced-alert").empty(),new RegExp("noindex").test(meta_robots)&&e("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>'),e("#seopress_cpt .google-snippet-preview .snippet-title").html(t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(t.data.title),e("#seopress_titles_title_meta").attr("placeholder",t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(t.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(t.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",t.data.meta_desc),s.og_title&&(e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title").html(s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title-default").html(s.og_title[0])),s.og_desc&&(e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description").html(s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description-default").html(s.og_desc[0])),s.og_img&&(e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img img").attr("src",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src",s.og_img[0])),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(s.og_url),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(s.og_site_name),s.tw_title&&(e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title").html(s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title-default").html(s.tw_title[0])),s.tw_desc&&(e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description").html(s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description-default").html(s.tw_desc[0])),s.tw_img&&(e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img img").attr("src",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img-default img").attr("src",s.tw_img[0])),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(s.og_url),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",t.data.canonical),e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1","",sp_ca_toggle),e(".analysis-score p").removeClass("loading"),e(" #seopress_titles_title_counters_val").remove(),e(" #seopress_titles_desc_counters_val").remove(),sp_titles_counters(),sp_meta_desc_counters(),sp_social()}})}"1"==jQuery("#toggle-preview").attr("data-toggle")?jQuery("#seopress_cpt .google-snippet-preview").addClass("mobile-preview"):jQuery("#seopress_cpt .google-snippet-preview").removeClass("mobile-preview"),jQuery("#toggle-preview").on("click",function(){jQuery("#toggle-preview").attr("data-toggle","1"==jQuery("#toggle-preview").attr("data-toggle")?"0":"1"),jQuery("#seopress_cpt .google-snippet-preview").toggleClass("mobile-preview")}),t(),e("#seopress_launch_analysis").on("click",function(){t()}),sp_ca_toggle()});
assets/js/seopress-media-uploader.js CHANGED
@@ -1,31 +1,57 @@
1
  jQuery(document).ready(function($){
2
- const array = ["#seopress_social_knowledge_img", "#seopress_social_twitter_img", "#seopress_social_fb_img"]
3
- array.forEach(function (item) {
4
- var mediaUploader;
5
- $(item + '_upload').click(function(e) {
6
- e.preventDefault();
7
- // If the uploader object has already been created, reopen the dialog
8
- if (mediaUploader) {
9
- mediaUploader.open();
10
- return;
11
- }
12
- // Extend the wp.media object
13
- mediaUploader = wp.media.frames.file_frame = wp.media({
14
- title: 'Choose Image',
15
- button: {
16
- text: 'Choose Image'
17
- }, multiple: false });
18
-
19
- // When a file is selected, grab the URL and set it as the text field's value
20
- mediaUploader.on('select', function() {
21
- attachment = mediaUploader.state().get('selection').first().toJSON();
22
- $(item + '_meta').val(attachment.url);
23
- if(item == '#seopress_social_fb_img') { sp_social_img('fb'); }
24
- if(item == '#seopress_social_twitter_img') { sp_social_img('twitter'); }
25
- });
26
-
27
- // Open the uploader dialog
28
- mediaUploader.open();
29
- });
30
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  });
1
  jQuery(document).ready(function($){
2
+ var mediaUploader;
3
+ $('.button.seopress_social_facebook_img_cpt').click(function(e) {
4
+ e.preventDefault();
5
+
6
+ var url_field = $(this).parent().find('input[type=text]');
7
+ // Extend the wp.media object
8
+ mediaUploader = wp.media.frames.file_frame = wp.media({
9
+ title: 'Choose Image',
10
+ button: {
11
+ text: 'Choose Image'
12
+ }, multiple: false });
13
+
14
+ // When a file is selected, grab the URL and set it as the text field's value
15
+ mediaUploader.on('select', function() {
16
+ attachment = mediaUploader.state().get('selection').first().toJSON();
17
+ $(url_field).val(attachment.url);
18
+ });
19
+ // Open the uploader dialog
20
+ mediaUploader.open();
21
+ });
22
+
23
+ const array = [
24
+ "#seopress_social_knowledge_img",
25
+ "#seopress_social_twitter_img",
26
+ "#seopress_social_fb_img"
27
+ ]
28
+
29
+ array.forEach(function (item) {
30
+ var mediaUploader;
31
+ $(item + '_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
+ $(item + '_meta').val(attachment.url);
49
+ if(item == '#seopress_social_fb_img') { sp_social_img('fb'); }
50
+ if(item == '#seopress_social_twitter_img') { sp_social_img('twitter'); }
51
+ });
52
+
53
+ // Open the uploader dialog
54
+ mediaUploader.open();
55
+ });
56
+ });
57
  });
assets/js/seopress-media-uploader.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){["#seopress_social_knowledge_img","#seopress_social_twitter_img","#seopress_social_fb_img"].forEach(function(t){var s;e(t+"_upload").click(function(o){o.preventDefault(),s?s.open():((s=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1})).on("select",function(){attachment=s.state().get("selection").first().toJSON(),e(t+"_meta").val(attachment.url),"#seopress_social_fb_img"==t&&sp_social_img("fb"),"#seopress_social_twitter_img"==t&&sp_social_img("twitter")}),s.open())})})});
1
+ jQuery(document).ready(function(e){var t;e(".button.seopress_social_facebook_img_cpt").click(function(o){o.preventDefault();var i=e(this).parent().find("input[type=text]");(t=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1})).on("select",function(){attachment=t.state().get("selection").first().toJSON(),e(i).val(attachment.url)}),t.open()});["#seopress_social_knowledge_img","#seopress_social_twitter_img","#seopress_social_fb_img"].forEach(function(t){var o;e(t+"_upload").click(function(i){i.preventDefault(),o?o.open():((o=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1})).on("select",function(){attachment=o.state().get("selection").first().toJSON(),e(t+"_meta").val(attachment.url),"#seopress_social_fb_img"==t&&sp_social_img("fb"),"#seopress_social_twitter_img"==t&&sp_social_img("twitter")}),o.open())})})});
assets/js/seopress-migrate.js CHANGED
@@ -22,267 +22,97 @@ jQuery(document).ready(function($) {
22
  }
23
  }).trigger('change');
24
 
25
- //Yoast SEO
26
- $('#seopress-yoast-migrate').on('click', function(e) {
27
- e.preventDefault();
28
- self.process_offset( 0, self );
29
- });
30
- process_offset = function( offset, self ) {
31
- $.ajax({
32
- method : 'POST',
33
- url : seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration,
34
- data : {
35
- action: 'seopress_yoast_migration',
36
- offset: offset,
37
- _ajax_nonce: seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce,
38
- },
39
- success : function( data ) {
40
- if( 'done' == data.data.offset ) {
41
- $('#seopress-yoast-migrate').removeAttr("disabled");
42
- $( '.spinner' ).css( "visibility", "hidden" );
43
- $( '#yoast-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
44
- } else {
45
- self.process_offset( parseInt( data.data.offset ), self );
46
- }
47
- },
48
- });
49
- };
50
- $('#seopress-yoast-migrate').on('click', function() {
51
- $(this).attr("disabled", "disabled");
52
- $( '#yoast-migration-tool .spinner' ).css( "visibility", "visible" );
53
- $( '#yoast-migration-tool .spinner' ).css( "float", "none" );
54
- $( '#yoast-migration-tool .log' ).html('');
55
- });
56
-
57
- //All In One
58
- $('#seopress-aio-migrate').on('click', function(e2) {
59
- e2.preventDefault();
60
- self.process_offset2( 0, self );
61
- });
62
- process_offset2 = function( offset2, self ) {
63
- $.ajax({
64
- method : 'POST',
65
- url : seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration,
66
- data : {
67
- action: 'seopress_aio_migration',
68
- offset2: offset2,
69
- _ajax_nonce: seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce,
70
- },
71
- success : function( data ) {
72
- if( 'done' == data.data.offset2 ) {
73
- $('#seopress-aio-migrate').removeAttr("disabled");
74
- $( '.spinner' ).css( "visibility", "hidden" );
75
- $( '#aio-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
76
- } else {
77
- self.process_offset2( parseInt( data.data.offset2 ), self );
78
- }
79
- },
80
- });
81
- };
82
-
83
- $('#seopress-aio-migrate').on('click', function() {
84
- $(this).attr("disabled", "disabled");
85
- $( '#aio-migration-tool .spinner' ).css( "visibility", "visible" );
86
- $( '#aio-migration-tool .spinner' ).css( "float", "none" );
87
- $( '#aio-migration-tool .log' ).html('');
88
- });
89
-
90
- //SEO Framework
91
- $('#seopress-seo-framework-migrate').on('click', function(e3) {
92
- e3.preventDefault();
93
- self.process_offset3( 0, self );
94
- });
95
- process_offset3 = function( offset3, self ) {
96
- $.ajax({
97
- method : 'POST',
98
- url : seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_seo_framework_migration,
99
- data : {
100
- action: 'seopress_seo_framework_migration',
101
- offset3: offset3,
102
- _ajax_nonce: seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_nonce,
103
- },
104
- success : function( data ) {
105
- if( 'done' == data.data.offset3 ) {
106
- $('#seopress-seo-framework-migrate').removeAttr("disabled");
107
- $( '.spinner' ).css( "visibility", "hidden" );
108
- $( '#seo-framework-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
109
- } else {
110
- self.process_offset3( parseInt( data.data.offset3 ), self );
111
- }
112
- },
113
  });
114
- };
115
-
116
- $('#seopress-seo-framework-migrate').on('click', function() {
117
- $(this).attr("disabled", "disabled");
118
- $( '#seo-framework-migration-tool .spinner' ).css( "visibility", "visible" );
119
- $( '#seo-framework-migration-tool .spinner' ).css( "float", "none" );
120
- $( '#seo-framework-migration-tool .log' ).html('');
121
- });
122
 
123
- //RK
124
- $('#seopress-rk-migrate').on('click', function(e4) {
125
- e4.preventDefault();
126
- self.process_offset4( 0, self );
127
- });
128
- process_offset4 = function( offset4, self ) {
129
- $.ajax({
130
- method : 'POST',
131
- url : seopressAjaxMigrate.seopress_rk_migrate.seopress_rk_migration,
132
- data : {
133
- action: 'seopress_rk_migration',
134
- offset4: offset4,
135
- _ajax_nonce: seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce,
136
- },
137
- success : function( data ) {
138
- if( 'done' == data.data.offset4 ) {
139
- $('#seopress-rk-migrate').removeAttr("disabled");
140
- $( '.spinner' ).css( "visibility", "hidden" );
141
- $( '#rk-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
142
- } else {
143
- self.process_offset4( parseInt( data.data.offset4 ), self );
144
- }
145
- },
146
- });
147
- };
148
-
149
- $('#seopress-rk-migrate').on('click', function() {
150
- $(this).attr("disabled", "disabled");
151
- $( '#rk-migration-tool .spinner' ).css( "visibility", "visible" );
152
- $( '#rk-migration-tool .spinner' ).css( "float", "none" );
153
- $( '#rk-migration-tool .log' ).html('');
154
- });
155
-
156
- //Squirrly
157
- $('#seopress-squirrly-migrate').on('click', function(e5) {
158
- e5.preventDefault();
159
- self.process_offset5( 0, self );
160
- });
161
- process_offset5 = function( offset5, self ) {
162
- $.ajax({
163
- method : 'POST',
164
- url : seopressAjaxMigrate.seopress_squirrly_migrate.seopress_squirrly_migration,
165
- data : {
166
- action: 'seopress_squirrly_migration',
167
- offset5: offset5,
168
- _ajax_nonce: seopressAjaxMigrate.seopress_squirrly_migrate.seopress_nonce,
169
- },
170
- success : function( data ) {
171
- if( 'done' == data.data.offset5 ) {
172
- $('#seopress-squirrly-migrate').removeAttr("disabled");
173
- $( '.spinner' ).css( "visibility", "hidden" );
174
- $( '#squirrly-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
175
- } else {
176
- self.process_offset5( parseInt( data.data.offset5 ), self );
177
- }
178
- },
179
- });
180
- };
181
-
182
- $('#seopress-squirrly-migrate').on('click', function() {
183
- $(this).attr("disabled", "disabled");
184
- $( '#squirrly-migration-tool .spinner' ).css( "visibility", "visible" );
185
- $( '#squirrly-migration-tool .spinner' ).css( "float", "none" );
186
- $( '#squirrly-migration-tool .log' ).html('');
187
- });
188
-
189
- //SEO Ultimate
190
- $('#seopress-seo-ultimate-migrate').on('click', function(e7) {
191
- e7.preventDefault();
192
- self.process_offset7( 0, self );
193
- });
194
- process_offset7 = function( offset7, self ) {
195
- $.ajax({
196
- method : 'POST',
197
- url : seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_seo_ultimate_migration,
198
- data : {
199
- action: 'seopress_seo_ultimate_migration',
200
- offset7: offset7,
201
- _ajax_nonce: seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_nonce,
202
- },
203
- success : function( data ) {
204
- if( 'done' == data.data.offset7 ) {
205
- $('#seopress-seo-ultimate-migrate').removeAttr("disabled");
206
- $( '.spinner' ).css( "visibility", "hidden" );
207
- $( '#seo-ultimate-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
208
- } else {
209
- self.process_offset7( parseInt( data.data.offset7 ), self );
210
- }
211
- },
212
- });
213
- };
214
-
215
- $('#seopress-seo-ultimate-migrate').on('click', function() {
216
- $(this).attr("disabled", "disabled");
217
- $( '#seo-ultimate-migration-tool .spinner' ).css( "visibility", "visible" );
218
- $( '#seo-ultimate-migration-tool .spinner' ).css( "float", "none" );
219
- $( '#seo-ultimate-migration-tool .log' ).html('');
220
- });
221
-
222
- //WP Meta SEO
223
- $('#seopress-wp-meta-seo-migrate').on('click', function(e8) {
224
- e8.preventDefault();
225
- self.process_offset8( 0, self );
226
- });
227
- process_offset8 = function( offset8, self ) {
228
- $.ajax({
229
- method : 'POST',
230
- url : seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_wp_meta_seo_migration,
231
- data : {
232
- action: 'seopress_wp_meta_seo_migration',
233
- offset8: offset8,
234
- _ajax_nonce: seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_nonce,
235
- },
236
- success : function( data ) {
237
- if( 'done' == data.data.offset8 ) {
238
- $('#seopress-wp-meta-seo-migrate').removeAttr("disabled");
239
- $( '.spinner' ).css( "visibility", "hidden" );
240
- $( '#wp-meta-seo-migration-tool .log' ).html(seopressAjaxMigrate.i18n.migration);
241
- } else {
242
- self.process_offset8( parseInt( data.data.offset8 ), self );
243
- }
244
- },
245
- });
246
- };
247
-
248
- $('#seopress-wp-meta-seo-migrate').on('click', function() {
249
- $(this).attr("disabled", "disabled");
250
- $( '#wp-meta-seo-migration-tool .spinner' ).css( "visibility", "visible" );
251
- $( '#wp-meta-seo-migration-tool .spinner' ).css( "float", "none" );
252
- $( '#wp-meta-seo-migration-tool .log' ).html('');
253
- });
254
-
255
- //Export metadata to CSV
256
- $('#seopress-metadata-export').on('click', function(e6) {
257
- e6.preventDefault();
258
- self.process_offset6( 0, self );
259
- });
260
- process_offset6 = function( offset6, self ) {
261
- $.ajax({
262
- method : 'POST',
263
- url : seopressAjaxMigrate.seopress_metadata_csv.seopress_metadata_export,
264
- data : {
265
- action: 'seopress_metadata_export',
266
- offset6: offset6,
267
- _ajax_nonce: seopressAjaxMigrate.seopress_metadata_csv.seopress_nonce,
268
- },
269
- success : function( data ) {
270
- if( 'done' == data.data.offset6 && data.data.url !='' ) {
271
- $('#seopress-metadata-export').removeAttr("disabled");
272
- $( '.spinner' ).css( "visibility", "hidden" );
273
- $( '#seopress-metadata-tool .log' ).html(seopressAjaxMigrate.i18n.export);
274
- $(location).attr('href',data.data.url);
275
- } else {
276
- self.process_offset6( parseInt( data.data.offset6 ), self );
277
- }
278
- },
279
  });
280
- };
281
-
282
- $('#seopress-metadata-export').on('click', function() {
283
- $(this).attr("disabled", "disabled");
284
- $( '#seopress-metadata-tool .spinner' ).css( "visibility", "visible" );
285
- $( '#seopress-metadata-tool .spinner' ).css( "float", "none" );
286
- $( '#seopress-metadata-tool .log' ).html('');
287
  });
288
  });
22
  }
23
  }).trigger('change');
24
 
25
+ //Import from SEO plugins
26
+ const seo_plugins = ["yoast","aio","seo-framework","rk","squirrly","seo-ultimate","wp-meta-seo","premium-seo-pack","metadata"]
27
+ seo_plugins.forEach(function (item) {
28
+ $('#seopress-'+item+'-migrate').on('click', function(e) {
29
+ e.preventDefault();
30
+ id = item;
31
+ switch (e.srcElement.id) {
32
+ case 'seopress-yoast-migrate':
33
+ url = seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration;
34
+ action = 'seopress_yoast_migration';
35
+ _ajax_nonce = seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce;
36
+ break;
37
+ case 'seopress-aio-migrate':
38
+ url = seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration;
39
+ action = 'seopress_aio_migration';
40
+ _ajax_nonce = seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce;
41
+ break;
42
+ case 'seopress-seo-framework-migrate':
43
+ url = seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_seo_framework_migration;
44
+ action = 'seopress_seo_framework_migration';
45
+ _ajax_nonce = seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_nonce;
46
+ break;
47
+ case 'seopress-rk-migrate':
48
+ url = seopressAjaxMigrate.seopress_rk_migrate.seopress_rk_migration;
49
+ action = 'seopress_rk_migration';
50
+ _ajax_nonce = seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce;
51
+ break;
52
+ case 'seopress-squirrly-migrate':
53
+ url = seopressAjaxMigrate.seopress_squirrly_migrate.seopress_squirrly_migration;
54
+ action = 'seopress_squirrly_migration';
55
+ _ajax_nonce = seopressAjaxMigrate.seopress_squirrly_migrate.seopress_nonce;
56
+ break;
57
+ case 'seopress-seo-ultimate-migrate':
58
+ url = seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_seo_ultimate_migration;
59
+ action = 'seopress_seo_ultimate_migration';
60
+ _ajax_nonce = seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_nonce;
61
+ break;
62
+ case 'seopress-wp-meta-seo-migrate':
63
+ url = seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_wp_meta_seo_migration;
64
+ action = 'seopress_wp_meta_seo_migration';
65
+ _ajax_nonce = seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_nonce;
66
+ break;
67
+ case 'seopress-premium-seo-pack-migrate':
68
+ url = seopressAjaxMigrate.seopress_premium_seo_pack_migrate.seopress_premium_seo_pack_migration;
69
+ action = 'seopress_premium_seo_pack_migration';
70
+ _ajax_nonce = seopressAjaxMigrate.seopress_premium_seo_pack_migrate.seopress_nonce;
71
+ break;
72
+ case 'seopress-metadata-migrate':
73
+ url = seopressAjaxMigrate.seopress_metadata_csv.seopress_metadata_export;
74
+ action = 'seopress_metadata_export';
75
+ _ajax_nonce = seopressAjaxMigrate.seopress_metadata_csv.seopress_nonce;
76
+ break;
77
+ default:
78
+ }
79
+ self.process_offset( 0, self, url, action, _ajax_nonce, id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  });
 
 
 
 
 
 
 
 
81
 
82
+ process_offset = function( offset, self, url, action, _ajax_nonce, id ) {
83
+
84
+ i18n = seopressAjaxMigrate.i18n.migration;
85
+ if (id =='metadata') {
86
+ i18n = seopressAjaxMigrate.i18n.export;
87
+ }
88
+ $.ajax({
89
+ method : 'POST',
90
+ url : url,
91
+ data : {
92
+ action: action,
93
+ offset: offset,
94
+ _ajax_nonce: _ajax_nonce,
95
+ },
96
+ success : function( data ) {
97
+ if ('done' == data.data.offset) {
98
+ $('#seopress-'+id+'-migrate').removeAttr("disabled");
99
+ $( '.spinner' ).css( "visibility", "hidden" );
100
+ $( '#'+id+'-migration-tool .log' ).html(i18n);
101
+
102
+ if (data.data.url !='') {
103
+ $(location).attr('href',data.data.url);
104
+ }
105
+ } else {
106
+ self.process_offset( parseInt( data.data.offset ), self, url, action, _ajax_nonce, id );
107
+ }
108
+ },
109
+ });
110
+ };
111
+ $('#seopress-'+item+'-migrate').on('click', function() {
112
+ $(this).attr("disabled", "disabled");
113
+ $( '#'+item+'-migration-tool .spinner' ).css( "visibility", "visible" );
114
+ $( '#'+item+'-migration-tool .spinner' ).css( "float", "none" );
115
+ $( '#'+item+'-migration-tool .log' ).html('');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  });
 
 
 
 
 
 
 
117
  });
118
  });
assets/js/seopress-migrate.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){e("#select-wizard-redirects, #select-wizard-import").change(function(s){s.preventDefault(),"none"==e(this).val()?e("#select-wizard-redirects option, #select-wizard-import option").each(function(){var s=e(this).val();e("#"+s).hide()}):(e("#select-wizard-redirects option:selected, #select-wizard-import option:selected").each(function(){var s=e(this).val();e("#"+s).show()}),e("#select-wizard-redirects option:not(:selected), #select-wizard-import option:not(:selected)").each(function(){var s=e(this).val();e("#"+s).hide()}))}).trigger("change"),e("#seopress-yoast-migrate").on("click",function(e){e.preventDefault(),self.process_offset(0,self)}),process_offset=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration,data:{action:"seopress_yoast_migration",offset:s,_ajax_nonce:seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce},success:function(s){"done"==s.data.offset?(e("#seopress-yoast-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#yoast-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset(parseInt(s.data.offset),o)}})},e("#seopress-yoast-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#yoast-migration-tool .spinner").css("visibility","visible"),e("#yoast-migration-tool .spinner").css("float","none"),e("#yoast-migration-tool .log").html("")}),e("#seopress-aio-migrate").on("click",function(e){e.preventDefault(),self.process_offset2(0,self)}),process_offset2=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration,data:{action:"seopress_aio_migration",offset2:s,_ajax_nonce:seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce},success:function(s){"done"==s.data.offset2?(e("#seopress-aio-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#aio-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset2(parseInt(s.data.offset2),o)}})},e("#seopress-aio-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#aio-migration-tool .spinner").css("visibility","visible"),e("#aio-migration-tool .spinner").css("float","none"),e("#aio-migration-tool .log").html("")}),e("#seopress-seo-framework-migrate").on("click",function(e){e.preventDefault(),self.process_offset3(0,self)}),process_offset3=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_seo_framework_migration,data:{action:"seopress_seo_framework_migration",offset3:s,_ajax_nonce:seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_nonce},success:function(s){"done"==s.data.offset3?(e("#seopress-seo-framework-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#seo-framework-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset3(parseInt(s.data.offset3),o)}})},e("#seopress-seo-framework-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#seo-framework-migration-tool .spinner").css("visibility","visible"),e("#seo-framework-migration-tool .spinner").css("float","none"),e("#seo-framework-migration-tool .log").html("")}),e("#seopress-rk-migrate").on("click",function(e){e.preventDefault(),self.process_offset4(0,self)}),process_offset4=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_rk_migrate.seopress_rk_migration,data:{action:"seopress_rk_migration",offset4:s,_ajax_nonce:seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce},success:function(s){"done"==s.data.offset4?(e("#seopress-rk-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#rk-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset4(parseInt(s.data.offset4),o)}})},e("#seopress-rk-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#rk-migration-tool .spinner").css("visibility","visible"),e("#rk-migration-tool .spinner").css("float","none"),e("#rk-migration-tool .log").html("")}),e("#seopress-squirrly-migrate").on("click",function(e){e.preventDefault(),self.process_offset5(0,self)}),process_offset5=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_squirrly_migrate.seopress_squirrly_migration,data:{action:"seopress_squirrly_migration",offset5:s,_ajax_nonce:seopressAjaxMigrate.seopress_squirrly_migrate.seopress_nonce},success:function(s){"done"==s.data.offset5?(e("#seopress-squirrly-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#squirrly-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset5(parseInt(s.data.offset5),o)}})},e("#seopress-squirrly-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#squirrly-migration-tool .spinner").css("visibility","visible"),e("#squirrly-migration-tool .spinner").css("float","none"),e("#squirrly-migration-tool .log").html("")}),e("#seopress-seo-ultimate-migrate").on("click",function(e){e.preventDefault(),self.process_offset7(0,self)}),process_offset7=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_seo_ultimate_migration,data:{action:"seopress_seo_ultimate_migration",offset7:s,_ajax_nonce:seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_nonce},success:function(s){"done"==s.data.offset7?(e("#seopress-seo-ultimate-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#seo-ultimate-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset7(parseInt(s.data.offset7),o)}})},e("#seopress-seo-ultimate-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#seo-ultimate-migration-tool .spinner").css("visibility","visible"),e("#seo-ultimate-migration-tool .spinner").css("float","none"),e("#seo-ultimate-migration-tool .log").html("")}),e("#seopress-wp-meta-seo-migrate").on("click",function(e){e.preventDefault(),self.process_offset8(0,self)}),process_offset8=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_wp_meta_seo_migration,data:{action:"seopress_wp_meta_seo_migration",offset8:s,_ajax_nonce:seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_nonce},success:function(s){"done"==s.data.offset8?(e("#seopress-wp-meta-seo-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#wp-meta-seo-migration-tool .log").html(seopressAjaxMigrate.i18n.migration)):o.process_offset8(parseInt(s.data.offset8),o)}})},e("#seopress-wp-meta-seo-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#wp-meta-seo-migration-tool .spinner").css("visibility","visible"),e("#wp-meta-seo-migration-tool .spinner").css("float","none"),e("#wp-meta-seo-migration-tool .log").html("")}),e("#seopress-metadata-export").on("click",function(e){e.preventDefault(),self.process_offset6(0,self)}),process_offset6=function(s,o){e.ajax({method:"POST",url:seopressAjaxMigrate.seopress_metadata_csv.seopress_metadata_export,data:{action:"seopress_metadata_export",offset6:s,_ajax_nonce:seopressAjaxMigrate.seopress_metadata_csv.seopress_nonce},success:function(s){"done"==s.data.offset6&&""!=s.data.url?(e("#seopress-metadata-export").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#seopress-metadata-tool .log").html(seopressAjaxMigrate.i18n.export),e(location).attr("href",s.data.url)):o.process_offset6(parseInt(s.data.offset6),o)}})},e("#seopress-metadata-export").on("click",function(){e(this).attr("disabled","disabled"),e("#seopress-metadata-tool .spinner").css("visibility","visible"),e("#seopress-metadata-tool .spinner").css("float","none"),e("#seopress-metadata-tool .log").html("")})});
1
+ jQuery(document).ready(function(e){e("#select-wizard-redirects, #select-wizard-import").change(function(s){s.preventDefault(),"none"==e(this).val()?e("#select-wizard-redirects option, #select-wizard-import option").each(function(){var s=e(this).val();e("#"+s).hide()}):(e("#select-wizard-redirects option:selected, #select-wizard-import option:selected").each(function(){var s=e(this).val();e("#"+s).show()}),e("#select-wizard-redirects option:not(:selected), #select-wizard-import option:not(:selected)").each(function(){var s=e(this).val();e("#"+s).hide()}))}).trigger("change");["yoast","aio","seo-framework","rk","squirrly","seo-ultimate","wp-meta-seo","premium-seo-pack","metadata"].forEach(function(s){e("#seopress-"+s+"-migrate").on("click",function(e){switch(e.preventDefault(),id=s,e.srcElement.id){case"seopress-yoast-migrate":url=seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration,action="seopress_yoast_migration",_ajax_nonce=seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce;break;case"seopress-aio-migrate":url=seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration,action="seopress_aio_migration",_ajax_nonce=seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce;break;case"seopress-seo-framework-migrate":url=seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_seo_framework_migration,action="seopress_seo_framework_migration",_ajax_nonce=seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_nonce;break;case"seopress-rk-migrate":url=seopressAjaxMigrate.seopress_rk_migrate.seopress_rk_migration,action="seopress_rk_migration",_ajax_nonce=seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce;break;case"seopress-squirrly-migrate":url=seopressAjaxMigrate.seopress_squirrly_migrate.seopress_squirrly_migration,action="seopress_squirrly_migration",_ajax_nonce=seopressAjaxMigrate.seopress_squirrly_migrate.seopress_nonce;break;case"seopress-seo-ultimate-migrate":url=seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_seo_ultimate_migration,action="seopress_seo_ultimate_migration",_ajax_nonce=seopressAjaxMigrate.seopress_seo_ultimate_migrate.seopress_nonce;break;case"seopress-wp-meta-seo-migrate":url=seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_wp_meta_seo_migration,action="seopress_wp_meta_seo_migration",_ajax_nonce=seopressAjaxMigrate.seopress_wp_meta_seo_migrate.seopress_nonce;break;case"seopress-premium-seo-pack-migrate":url=seopressAjaxMigrate.seopress_premium_seo_pack_migrate.seopress_premium_seo_pack_migration,action="seopress_premium_seo_pack_migration",_ajax_nonce=seopressAjaxMigrate.seopress_premium_seo_pack_migrate.seopress_nonce;break;case"seopress-metadata-migrate":url=seopressAjaxMigrate.seopress_metadata_csv.seopress_metadata_export,action="seopress_metadata_export",_ajax_nonce=seopressAjaxMigrate.seopress_metadata_csv.seopress_nonce}self.process_offset(0,self,url,action,_ajax_nonce,id)}),process_offset=function(s,r,a,o,t,i){i18n=seopressAjaxMigrate.i18n.migration,"metadata"==i&&(i18n=seopressAjaxMigrate.i18n.export),e.ajax({method:"POST",url:a,data:{action:o,offset:s,_ajax_nonce:t},success:function(s){"done"==s.data.offset?(e("#seopress-"+i+"-migrate").removeAttr("disabled"),e(".spinner").css("visibility","hidden"),e("#"+i+"-migration-tool .log").html(i18n),""!=s.data.url&&e(location).attr("href",s.data.url)):r.process_offset(parseInt(s.data.offset),r,a,o,t,i)}})},e("#seopress-"+s+"-migrate").on("click",function(){e(this).attr("disabled","disabled"),e("#"+s+"-migration-tool .spinner").css("visibility","visible"),e("#"+s+"-migration-tool .spinner").css("float","none"),e("#"+s+"-migration-tool .log").html("")})})});
contributors.txt CHANGED
@@ -3,9 +3,11 @@ Great people who contributed to this plugin :
3
  Developers:
4
  - Benjamin Denis: contact@seopress.org / @wp_seopress
5
  - Julio Potier: @juliobox
 
6
 
7
  SEO consultant:
8
  - Alan Cladx: @cladxxx
 
9
 
10
  A11Y:
11
  - Thierry Pigot: @thierrypigot
@@ -18,8 +20,9 @@ Beta testers / feedbacks:
18
  - Sébastien Serre: @sebastienserre
19
  - Ludovic Riaudel: @lriaudel
20
  - Philippe Fronzes: @novaldi64
 
21
 
22
- Integrations:
23
  - The Admin Columns PRO team
24
  - The Polylang team
25
  - The WPML team
@@ -34,11 +37,11 @@ Translators:
34
  - Japan: WP-Translations
35
  - Hindi: WP-Translations
36
  - Dutch: WP-Translations
37
- - Italian: Déborah Donnier @deborahdonnier
38
  - Vietnamese: Anh
39
  - Russian: WP-Translations
40
  - Tamil: Sankar Srinivasan
41
- - Brazilian Portuguese: Daniel Pechmann
42
  - Telugu: Manoj Kumar
43
  - Indonesian: Tomtom
44
  - Bulgarian: @ilivanov
3
  Developers:
4
  - Benjamin Denis: contact@seopress.org / @wp_seopress
5
  - Julio Potier: @juliobox
6
+ - Mickael Gris: @mgris
7
 
8
  SEO consultant:
9
  - Alan Cladx: @cladxxx
10
+ - Neil McCarthy: @GoodnessNeil
11
 
12
  A11Y:
13
  - Thierry Pigot: @thierrypigot
20
  - Sébastien Serre: @sebastienserre
21
  - Ludovic Riaudel: @lriaudel
22
  - Philippe Fronzes: @novaldi64
23
+ - Déborah Donnier @deborahdonnier
24
 
25
+ Integrations (https://www.seopress.org/integrations/):
26
  - The Admin Columns PRO team
27
  - The Polylang team
28
  - The WPML team
37
  - Japan: WP-Translations
38
  - Hindi: WP-Translations
39
  - Dutch: WP-Translations
40
+ - Italian: entersys.it
41
  - Vietnamese: Anh
42
  - Russian: WP-Translations
43
  - Tamil: Sankar Srinivasan
44
+ - Brazilian Portuguese: WP-Translations
45
  - Telugu: Manoj Kumar
46
  - Indonesian: Tomtom
47
  - Bulgarian: @ilivanov
inc/admin/admin-features-list.php CHANGED
@@ -90,7 +90,7 @@
90
  'title' => __('Insights','wp-seopress'),
91
  'desc' => __('Track your keyword positions and backlinks directly in your WordPress.', 'wp-seopress'),
92
  'btn_secondary' => [
93
- admin_url( 'admin.php?page=seopress-insights#tab=tab_seopress_insights_settings' ) => __('Manage','wp-seopress')
94
  ],
95
  'help' => [
96
  'en' => 'https://www.seopress.org/insights/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress',
@@ -293,19 +293,6 @@
293
  ],
294
  'filter' => 'seopress_remove_feature_bot'
295
  ];
296
- $features['backlinks'] = [
297
- 'icon' => 'dashicons-admin-links',
298
- 'title' => __('Backlinks','wp-seopress'),
299
- 'desc' => __('Check your backlinks with Majestic API.', 'wp-seopress'),
300
- 'btn_primary' => [
301
- admin_url( 'edit.php?post_type=seopress_backlinks' ) => __('See backlinks','wp-seopress')
302
- ],
303
- 'btn_secondary' => [
304
- admin_url( 'admin.php?page=seopress-pro-page#tab=tab_seopress_backlinks' ) => __('Manage','wp-seopress')
305
- ],
306
- 'filter' => 'seopress_remove_feature_backlinks',
307
- 'toggle' => false
308
- ];
309
  $features['rewrite'] = [
310
  'icon' => 'dashicons-admin-links',
311
  'title' => __('URL Rewriting','wp-seopress'),
90
  'title' => __('Insights','wp-seopress'),
91
  'desc' => __('Track your keyword positions and backlinks directly in your WordPress.', 'wp-seopress'),
92
  'btn_secondary' => [
93
+ admin_url( 'admin.php?page=seopress-insights' ) => __('Manage','wp-seopress')
94
  ],
95
  'help' => [
96
  'en' => 'https://www.seopress.org/insights/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress',
293
  ],
294
  'filter' => 'seopress_remove_feature_bot'
295
  ];
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  $features['rewrite'] = [
297
  'icon' => 'dashicons-admin-links',
298
  'title' => __('URL Rewriting','wp-seopress'),
inc/admin/admin-header.php CHANGED
@@ -63,7 +63,7 @@ function seopress_admin_header() { ?>
63
  <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
64
  if ( is_plugin_active( 'wp-seopress-insights/seopress-insights.php' ) ) { ?>
65
  <li>
66
- <a href="<?php echo admin_url( 'admin.php?page=seopress-insights#tab=tab_seopress_insights_settings' ); ?>">
67
  <span class="dashicons dashicons-chart-bar"></span>
68
  <?php _e( 'Insights', 'wp-seopress' ); ?>
69
  </a>
@@ -139,12 +139,6 @@ function seopress_admin_header() { ?>
139
  <?php _e( 'Broken links', 'wp-seopress' ); ?>
140
  </a>
141
  </li>
142
- <li>
143
- <a href="<?php echo admin_url( 'edit.php?post_type=seopress_backlinks' ); ?>">
144
- <span class="dashicons dashicons-admin-links"></span>
145
- <?php _e( 'Backlinks', 'wp-seopress' ); ?>
146
- </a>
147
- </li>
148
  <li>
149
  <a href="<?php echo admin_url( 'admin.php?page=seopress-pro-page#tab=tab_seopress_rewrite' ); ?>">
150
  <span class="dashicons dashicons-admin-links"></span>
63
  <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
64
  if ( is_plugin_active( 'wp-seopress-insights/seopress-insights.php' ) ) { ?>
65
  <li>
66
+ <a href="<?php echo admin_url( 'admin.php?page=seopress-insights' ); ?>">
67
  <span class="dashicons dashicons-chart-bar"></span>
68
  <?php _e( 'Insights', 'wp-seopress' ); ?>
69
  </a>
139
  <?php _e( 'Broken links', 'wp-seopress' ); ?>
140
  </a>
141
  </li>
 
 
 
 
 
 
142
  <li>
143
  <a href="<?php echo admin_url( 'admin.php?page=seopress-pro-page#tab=tab_seopress_rewrite' ); ?>">
144
  <span class="dashicons dashicons-admin-links"></span>
inc/admin/admin-metaboxes-content-analysis-form.php CHANGED
@@ -1,184 +1,183 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'Please don&rsquo;t call the plugin directly. Thanks :)' );
3
  echo '<div class="wrap-seopress-analysis">
4
- <p>
5
- '.__('Enter a few keywords for analysis to help you write optimized content.','wp-seopress').'
6
- </p>
7
- <p>
8
- <span class="label">Did you know?</span> '.__('Writing content for your users is the most important thing! If it doesn‘t feel natural, your visitors will leave your site, Google will know it and your ranking will be affected.','wp-seopress').'
9
- </p>
10
- <div class="col-left">
11
- <p>
12
- <label for="seopress_analysis_target_kw_meta">'. __( 'Target keywords', 'wp-seopress' ) .'
13
- '. seopress_tooltip(__('Target keywords','wp-seopress'), __('Separate target keywords with commas. Do not use spaces after the commas, unless you want to include them','wp-seopress'), esc_html('my super keyword,another keyword,keyword')).'
14
- </label>
15
- <input id="seopress_analysis_target_kw_meta" type="text" name="seopress_analysis_target_kw" placeholder="'.esc_html__('Enter your target keywords','wp-seopress').'" aria-label="'.__('Target keywords','wp-seopress').'" value="'.esc_attr($seopress_analysis_target_kw).'" />
16
- </p>';
17
- if (empty($seopress_analysis_data)) {
18
- echo '<div id="seopress_launch_analysis" class="button" data_id="'.get_the_ID().'" data_post_type="'.get_current_screen()->post_type.'">'.__('Analyze my content','wp-seopress').'</div>';
19
- } else {
20
- echo '<div id="seopress_launch_analysis" class="button" data_id="'.get_the_ID().'" data_post_type="'.get_current_screen()->post_type.'">'.__('Refresh analysis','wp-seopress').'</div>';
21
- }
22
-
23
- echo '<br><p><span class="howto">'.__('To get the most accurate analysis, save your post first.','wp-seopress').'</span></p>';
24
  echo '</div>';
25
  if ( is_plugin_active( 'wp-seopress-pro/seopress-pro.php' ) ) {
26
- echo '<div class="col-right">
27
- <p>
28
- <label for="seopress_google_suggest_kw_meta">'. __( 'Google suggestions', 'wp-seopress' ) .'
29
- '. seopress_tooltip(__('Google suggestions','wp-seopress'), __('Enter a keyword, or a phrase, to find the top 10 Google suggestions instantly. This is useful if you want to work with the long tail technique.','wp-seopress'), esc_html('my super keyword,another keyword,keyword')).'
30
- </label>
31
- <input id="seopress_google_suggest_kw_meta" type="text" name="seopress_google_suggest_kw" placeholder="Get suggestions from Google" aria-label="Google suggestions" value="">
32
- </p>
33
- <button id="seopress_get_suggestions" type="button" class="button">'.__('Get suggestions!','wp-seopress').'</button>
34
- ';
35
- echo "<ul id='seopress_suggestions'></ul>";
36
-
37
-
38
- if (get_locale() !='') {
39
- $locale = substr(get_locale(), 0, 2);
40
- $country_code = substr(get_locale(), -2);
41
- } else {
42
- $locale = 'en';
43
- $country_code = 'US';
44
- }
45
-
46
- echo "<script>
47
- function seopress_google_suggest(data){
48
- var raw_suggestions = String(data);
49
-
50
- var suggestions_array = raw_suggestions.split(',');
51
-
52
- var i;
53
- for (i = 0; i < 10; i++) {
54
- document.getElementById('seopress_suggestions').innerHTML += '<li><a href=\"#\" class=\"sp-suggest-btn button button-small\">'+suggestions_array[i]+'</a></li>';
55
- }
56
-
57
- jQuery('.sp-suggest-btn').click(function(e) {
58
- e.preventDefault();
59
- if(jQuery('#seopress_analysis_target_kw_meta').val().length == 0){
60
- jQuery('#seopress_analysis_target_kw_meta').val(jQuery(this).text() + ',');
61
- } else {
62
- str = jQuery('#seopress_analysis_target_kw_meta').val();
63
- str = str.replace(/,\s*$/, '');
64
- jQuery('#seopress_analysis_target_kw_meta').val(str+','+jQuery(this).text());
65
- }
66
- });
67
- }
68
- jQuery('#seopress_get_suggestions').on('click', function(data) {
69
- data.preventDefault();
70
-
71
- document.getElementById('seopress_suggestions').innerHTML = '';
72
-
73
- var kws = jQuery('#seopress_google_suggest_kw_meta').val();
74
-
75
- if (kws) {
76
- var script = document.createElement('script');
77
- script.src = 'https://www.google.com/complete/search?client=firefox&hl=".$locale."&q='+kws+'&gl=".$country_code."&callback=seopress_google_suggest';
78
- document.body.appendChild(script);
79
- }
80
- });
81
- </script>
82
- </div>";
83
  }
84
 
85
  //Analyzes
86
  $analyzes = array(
87
- 'schemas'=> array(
88
- 'title' => __('Structured data types','wp-seopress-pro'),
89
- 'impact' => 'good',
90
- 'desc' => NULL
91
- ),
92
- 'old_post'=> array(
93
- 'title' => __('Last modified date','wp-seopress-pro'),
94
- 'impact' => 'good',
95
- 'desc' => NULL
96
- ),
97
- 'words_counter'=> array(
98
- 'title' => __('Words counter','wp-seopress-pro'),
99
- 'impact' => 'good',
100
- 'desc' => NULL
101
- ),
102
- 'keywords_density'=> array(
103
- 'title' => __('Keywords density','wp-seopress-pro'),
104
- 'impact' => NULL,
105
- 'desc' => NULL
106
- ),
107
- 'keywords_permalink'=> array(
108
- 'title' => __('Keywords in permalink','wp-seopress-pro'),
109
- 'impact' => NULL,
110
- 'desc' => NULL
111
- ),
112
- 'headings'=> array(
113
- 'title' => __('Headings','wp-seopress-pro'),
114
- 'impact' => 'good',
115
- 'desc' => NULL
116
- ),
117
- 'meta_title'=> array(
118
- 'title' => __('Meta title','wp-seopress-pro'),
119
- 'impact' => NULL,
120
- 'desc' => NULL
121
- ),
122
- 'meta_desc'=> array(
123
- 'title' => __('Meta description','wp-seopress-pro'),
124
- 'impact' => NULL,
125
- 'desc' => NULL
126
- ),
127
- 'social'=> array(
128
- 'title' => __('Social meta tags','wp-seopress-pro'),
129
- 'impact' => 'good',
130
- 'desc' => NULL
131
- ),
132
- 'robots'=> array(
133
- 'title' => __('Meta robots','wp-seopress-pro'),
134
- 'impact' => 'good',
135
- 'desc' => NULL
136
- ),
137
- 'img_alt'=> array(
138
- 'title' => __('Alternative texts of images','wp-seopress-pro'),
139
- 'impact' => 'good',
140
- 'desc' => NULL
141
- ),
142
- 'nofollow_links'=> array(
143
- 'title' => __('NoFollow Links','wp-seopress-pro'),
144
- 'impact' => 'good',
145
- 'desc' => NULL
146
- ),
147
- 'outbound_links'=> array(
148
- 'title' => __('Outbound Links','wp-seopress-pro'),
149
- 'impact' => 'good',
150
- 'desc' => NULL
151
- ),
152
  );
153
 
154
  //Schemas
155
  if (!empty($seopress_analysis_data['json']) || isset($seopress_analysis_data['json'])) {
156
- $desc = '<p>'.__('We found these schemas in the source code of this page:','wp-seopress').'</p>';
157
-
158
- $desc .= '<ul>';
159
- $json_ld = array_filter($seopress_analysis_data['json']);
160
- foreach(array_count_values($json_ld) as $key => $value) {
161
- $html = NULL;
162
- if ($value > 1) {
163
- $html = '<span class="impact high">'.__('duplicated schema - x','wp-seopress').$value.'</span>';
164
- $analyzes['schemas']['impact'] = 'high';
165
- }
166
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$key.$html.'</li>';
167
- }
168
- $desc .= '</ul>';
169
- $analyzes['schemas']['desc'] = $desc;
170
  } else {
171
- $analyzes['schemas']['impact'] = 'medium';
172
- $analyzes['schemas']['desc'] = '<p>'.__('No schemas found in the source code of this page.','wp-seopress').'</p>';
173
  }
174
 
175
  //Old post
176
  $desc = NULL;
177
  if( strtotime( $post->post_modified ) < strtotime('-365 days') ) {
178
- $analyzes['old_post']['impact'] = 'medium';
179
- $desc = '<p><span class="dashicons dashicons-no-alt"></span>'.__('This post is a little old!','wp-seopress').'</p>';
180
  } else {
181
- $desc = '<p><span class="dashicons dashicons-yes"></span>'.__('The last modified date of this article is less than 1 year. Cool!','wp-seopress').'</p>';
182
  }
183
  $desc .= '<p>'.__('Search engines love fresh content. Regularly update your articles without having to rewrite your content entirely and give them a boost in search rankings. SEOPress takes care of the technical part.','wp-seopress').'</p>';
184
  $analyzes['old_post']['desc'] = $desc;
@@ -186,214 +185,221 @@ $analyzes['old_post']['desc'] = $desc;
186
  //Word counters
187
  $desc = NULL;
188
  if (isset($seopress_analysis_data['words_counter']) || isset($seopress_analysis_data['words_counter_unique'])) {
189
- $desc = '<p>'.__('Words counter is not a direct ranking factor. But, your content must be as qualitative as possible, with relevant and unique information. To fulfill these conditions, your article requires a minimum of paragraphs, so words.','wp-seopress').'</p>
190
- <ul>
191
- <li>'.$seopress_analysis_data['words_counter'].' '.__('words found.','wp-seopress').'</li>
192
- <li>'.$seopress_analysis_data['words_counter_unique'].' '.__('unique words found.','wp-seopress').'</li>';
193
-
194
- if ($seopress_analysis_data['words_counter'] >= 299) {
195
- $desc .= '<li><span class="dashicons dashicons-yes"></span>'.__('Your content is composed of more than 300 words, which is the minimum for a post.','wp-seopress').'</li>';
196
- } else {
197
- $desc .= '<li><span class="dashicons dashicons-no-alt"></span>'.__('Your content is too short. Add a few more paragraphs!','wp-seopress').'</li>';
198
- $analyzes['words_counter']['impact'] = 'medium';
199
- }
200
- $desc .= '</ul>';
201
-
202
- $analyzes['words_counter']['desc'] = $desc;
203
  } else {
204
- $analyzes['words_counter']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('No content? Add a few more paragraphs!','wp-seopress').'</p>';
205
- $analyzes['words_counter']['impact'] = 'high';
206
  }
207
 
208
  //Keywords density
209
  if (!empty($seopress_analysis_data['kws_density']['matches']) && isset($seopress_analysis_data['words_counter'])) {
210
- $target_kws_density = $seopress_analysis_data['kws_density']['matches'];
211
-
212
- $desc = '<ul>';
213
- foreach ($target_kws_density as $key => $value) {
214
- foreach ($value as $_key => $_value) {
215
- $kw_count = count($_value);
216
- }
217
- $kw_name = $key;
218
- $kw_density = round($kw_count/$seopress_analysis_data['words_counter']*100, 2);
219
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times in your content, a keyword density of %s%%','wp-seopress'), $kw_name, $kw_count, $kw_density).'</li>';
220
- }
221
- $desc .= '</ul>';
222
- $desc .= '<p class="description">'.__('Learn more about <a href="https://www.youtube.com/watch?v=Rk4qgQdp2UA" target="_blank">keywords stuffing</a>.','wp-seopress').'</p>';
223
- $analyzes['keywords_density']['impact'] = 'good';
224
- $analyzes['keywords_density']['desc'] = $desc;
225
  } else {
226
- $analyzes['keywords_density']['desc'] = '<p>'.__('We were unable to calculate the density of your keywords. You probably haven‘t added any content or your target keywords were not find in your post content.','wp-seopress').'</p>';
227
- $analyzes['keywords_density']['impact'] = 'high';
228
  }
229
 
230
  //Keywords in permalink
231
  if (!empty($seopress_analysis_data['kws_permalink']['matches'])) {
232
- $desc = '<p><span class="dashicons dashicons-yes"></span>'.__('Cool, one of your target keyword is used in your permalink.','wp-seopress').'</p>';
233
-
234
- $target_kws_permalink = $seopress_analysis_data['kws_permalink']['matches'];
235
-
236
- $desc .= '<ul>';
237
- foreach ($target_kws_permalink as $key => $value) {
238
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$key.'</li>';
239
- }
240
- $desc .= '</ul>';
241
- $analyzes['keywords_permalink']['desc'] = $desc;
242
- $analyzes['keywords_permalink']['impact'] = 'good';
243
  } else {
244
- $analyzes['keywords_permalink']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('You should add one of your target keyword in your permalink.','wp-seopress').'</p>';
245
- $analyzes['keywords_permalink']['impact'] = 'medium';
 
 
 
 
 
 
246
  }
247
 
 
248
  //Headings
249
  //H1
250
  $desc = NULL;
251
  if (!empty($seopress_analysis_data['h1']['matches'])) {
252
- $desc .= '<h4>'.__('H1 (Heading 1)','wp-seopress').'</h4>';
253
-
254
- $count = $seopress_analysis_data['h1']['nomatches']['count'];
255
-
256
- $target_kws_h1 = $seopress_analysis_data['h1']['matches'];
257
-
258
- $all_h1 = $seopress_analysis_data['h1']['values'];
259
-
260
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in Heading 1 (H1).','wp-seopress').'</p>';
261
-
262
- $desc .= '<ul>';
263
-
264
- foreach ($target_kws_h1 as $key => $value) {
265
- foreach ($value as $_key => $_value) {
266
- $kw_count = count($value);
267
- }
268
- $kw_name = $key;
269
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
270
- }
271
-
272
- $desc .= '</ul>';
273
- if ($count > 1) {
274
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d Heading 1 (H1) in your content.','wp-seopress'), $count).'</p>';
275
- $desc .= '<p>'.__('You should not use more than one H1 heading in your post content. The rule is simple: only one H1 for each web page. It is better for both SEO and accessibility. Below, the list:','wp-seopress').'</p>';
276
- $analyzes['headings']['impact'] = 'high';
277
- }
278
-
279
- if (!empty($all_h1)) {
280
- $desc .= '<ul>';
281
- foreach($all_h1 as $h1) {
282
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$h1.'</li>';
283
- }
284
- $desc .= '</ul>';
285
- }
286
  }
287
 
288
  //H2
289
  $desc .= '<h4>'.__('H2 (Heading 2)','wp-seopress').'</h4>';
290
  if (!empty($seopress_analysis_data['h2']['matches'])) {
291
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in Heading 2 (H2).','wp-seopress').'</p>';
292
- $desc .= '<ul>';
293
- $target_kws_h2 = $seopress_analysis_data['h2']['matches'];
294
- foreach ($target_kws_h2 as $key => $value) {
295
- foreach ($value as $_key => $_value) {
296
- $kw_count = count($value);
297
- }
298
- $kw_name = $key;
299
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
300
- }
301
- $desc .= '</ul>';
302
  } else {
303
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in Heading 2 (H2).','wp-seopress').'</p>';
304
- if ($analyzes['headings']['impact'] != 'high') {
305
- $analyzes['headings']['impact'] = 'medium';
306
- }
307
  }
308
 
309
  //H3
310
  $desc .= '<h4>'.__('H3 (Heading 3)','wp-seopress').'</h4>';
311
  if (!empty($seopress_analysis_data['h3']['matches'])) {
312
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in Heading 3 (H3).','wp-seopress').'</p>';
313
- $desc .= '<ul>';
314
- $target_kws_h3 = $seopress_analysis_data['h3']['matches'];
315
- foreach ($target_kws_h3 as $key => $value) {
316
- foreach ($value as $_key => $_value) {
317
- $kw_count = count($value);
318
- }
319
- $kw_name = $key;
320
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
321
- }
322
- $desc .= '</ul>';
323
  } else {
324
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in Heading 3 (H3).','wp-seopress').'</p>';
325
- if ($analyzes['headings']['impact'] != 'high') {
326
- $analyzes['headings']['impact'] = 'medium';
327
- }
328
  }
329
  $analyzes['headings']['desc'] = $desc;
330
 
331
  //Meta Title
332
  if ($seopress_titles_title !='') {
333
- $desc = NULL;
334
- if (!empty($seopress_analysis_data['meta_title']['matches'])) {
335
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in the Meta Title.','wp-seopress').'</p>';
336
- $desc .= '<ul>';
337
- $target_kws_title = $seopress_analysis_data['meta_title']['matches'];
338
- foreach ($target_kws_title as $key => $value) {
339
- foreach ($value as $_key => $_value) {
340
- $kw_count = count($_value);
341
- }
342
- $kw_name = $key;
343
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
344
- }
345
- $desc .= '</ul>';
346
- $analyzes['meta_title']['impact'] = 'good';
347
- } else {
348
- $analyzes['meta_title']['impact'] = 'medium';
349
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in the Meta Title.','wp-seopress').'</p>';
350
- }
351
-
352
- if (mb_strlen($seopress_titles_title) > 65 ) {
353
- $analyzes['meta_title']['impact'] = 'medium';
354
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your custom title is too long.','wp-seopress').'</p>';
355
- } else {
356
- $analyzes['meta_title']['impact'] = 'good';
357
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('The length of your title is correct','wp-seopress').'</p>';
358
- }
359
- $analyzes['meta_title']['desc'] = $desc;
360
  } else {
361
- $analyzes['meta_title']['impact'] = 'medium';
362
- $analyzes['meta_title']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('No custom title is set for this post. If the global meta title suits you, you can ignore this recommendation.','wp-seopress').'</p>';
363
  }
364
 
365
  //Meta description
366
  if ($seopress_titles_desc !='') {
367
- $desc = NULL;
368
- if (!empty($seopress_analysis_data['meta_description']['matches'])) {
369
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in the Meta description.','wp-seopress').'</p>';
370
- $desc .= '<ul>';
371
- $target_kws_desc = $seopress_analysis_data['meta_description']['matches'];
372
- foreach ($target_kws_desc as $key => $value) {
373
- foreach ($value as $_key => $_value) {
374
- $kw_count = count($_value);
375
- }
376
- $kw_name = $key;
377
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
378
- }
379
- $desc .= '</ul>';
380
- $analyzes['meta_desc']['impact'] = 'good';
381
- } else {
382
- $analyzes['meta_desc']['impact'] = 'medium';
383
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in the Meta description.','wp-seopress').'</p>';
384
- }
385
-
386
- if (mb_strlen($seopress_titles_desc) > 160 ) {
387
- $analyzes['meta_desc']['impact'] = 'medium';
388
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('You custom meta description is too long.','wp-seopress').'</p>';
389
- } else {
390
- $analyzes['meta_desc']['impact'] = 'good';
391
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('The length of your meta description is correct','wp-seopress').'</p>';
392
- }
393
- $analyzes['meta_desc']['desc'] = $desc;
394
  } else {
395
- $analyzes['meta_desc']['impact'] = 'medium';
396
- $analyzes['meta_desc']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('No custom meta description is set for this post. If the global meta description suits you, you can ignore this recommendation.','wp-seopress').'</p>';
397
  }
398
 
399
  //Social tags
@@ -403,28 +409,28 @@ $desc = NULL;
403
  $desc .= '<h4>'.__('Open Graph Title','wp-seopress').'</h4>';
404
 
405
  if (!empty($seopress_analysis_data['og_title']['count'])) {
406
- $count = $seopress_analysis_data['og_title']['count'];
407
-
408
- $all_og_title = $seopress_analysis_data['og_title']['values'];
409
-
410
- if ($count > 1) {
411
- $analyzes['social']['impact'] = 'high';
412
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:title in your content.','wp-seopress'), $count).'</p>';
413
- $desc .= '<p>'.__('You should not use more than one og:title in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:title tag from your source code. Below, the list:','wp-seopress').'</p>';
414
- } else {
415
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph Title tag in your source code.','wp-seopress').'</p>';
416
- }
417
-
418
- if (!empty($all_og_title)) {
419
- $desc .= '<ul>';
420
- foreach($all_og_title as $og_title) {
421
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_title.'</li>';
422
- }
423
- $desc .= '</ul>';
424
- }
425
  } else {
426
- $analyzes['social']['impact'] = 'high';
427
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Title is missing!','wp-seopress').'</p>';
428
  }
429
 
430
  //og:description
@@ -432,28 +438,28 @@ $desc .= '<h4>'.__('Open Graph Description','wp-seopress').'</h4>';
432
 
433
  if (!empty($seopress_analysis_data['og_desc']['count'])) {
434
 
435
- $count = $seopress_analysis_data['og_desc']['count'];
436
-
437
- $all_og_desc = $seopress_analysis_data['og_desc']['values'];
438
-
439
- if ($count > 1) {
440
- $analyzes['social']['impact'] = 'high';
441
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:description in your content.','wp-seopress'), $count).'</p>';
442
- $desc .= '<p>'.__('You should not use more than one og:description in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:description tag from your source code. Below, the list:','wp-seopress').'</p>';
443
- } else {
444
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph Description tag in your source code.','wp-seopress').'</p>';
445
- }
446
-
447
- if (!empty($all_og_desc)) {
448
- $desc .= '<ul>';
449
- foreach($all_og_desc as $og_desc) {
450
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_desc.'</li>';
451
- }
452
- $desc .= '</ul>';
453
- }
454
  } else {
455
- $analyzes['social']['impact'] = 'high';
456
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Description is missing!','wp-seopress').'</p>';
457
  }
458
 
459
  //og:image
@@ -461,24 +467,24 @@ $desc .= '<h4>'.__('Open Graph Image','wp-seopress').'</h4>';
461
 
462
  if (!empty($seopress_analysis_data['og_img']['count'])) {
463
 
464
- $count = $seopress_analysis_data['og_img']['count'];
465
 
466
- $all_og_img = $seopress_analysis_data['og_img']['values'];
467
 
468
- if ($count > 0) {
469
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.sprintf(esc_html__('We found %d og:image in your content.','wp-seopress'), $count).'</p>';
470
- }
471
 
472
- if (!empty($all_og_img)) {
473
- $desc .= '<ul>';
474
- foreach($all_og_img as $og_img) {
475
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_img.'</li>';
476
- }
477
- $desc .= '</ul>';
478
- }
479
  } else {
480
- $analyzes['social']['impact'] = 'high';
481
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Image is missing!','wp-seopress').'</p>';
482
  }
483
 
484
  //og:url
@@ -486,28 +492,28 @@ $desc .= '<h4>'.__('Open Graph URL','wp-seopress').'</h4>';
486
 
487
  if (!empty($seopress_analysis_data['og_url']['count'])) {
488
 
489
- $count = $seopress_analysis_data['og_url']['count'];
490
-
491
- $all_og_url = $seopress_analysis_data['og_url']['values'];
492
-
493
- if ($count > 1) {
494
- $analyzes['social']['impact'] = 'high';
495
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:url in your content.','wp-seopress'), $count).'</p>';
496
- $desc .= '<p>'.__('You should not use more than one og:url in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:url tag from your source code. Below, the list:','wp-seopress').'</p>';
497
- } else {
498
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph URL tag in your source code.','wp-seopress').'</p>';
499
- }
500
-
501
- if (!empty($all_og_url)) {
502
- $desc .= '<ul>';
503
- foreach($all_og_url as $og_url) {
504
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_url.'</li>';
505
- }
506
- $desc .= '</ul>';
507
- }
508
  } else {
509
- $analyzes['social']['impact'] = 'high';
510
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph URL is missing!','wp-seopress').'</p>';
511
  }
512
 
513
  //og:site_name
@@ -515,28 +521,28 @@ $desc .= '<h4>'.__('Open Graph Site Name','wp-seopress').'</h4>';
515
 
516
  if (!empty($seopress_analysis_data['og_site_name']['count'])) {
517
 
518
- $count = $seopress_analysis_data['og_site_name']['count'];
519
-
520
- $all_og_site_name = $seopress_analysis_data['og_site_name']['values'];
521
-
522
- if ($count > 1) {
523
- $analyzes['social']['impact'] = 'high';
524
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:site_name in your content.','wp-seopress'), $count).'</p>';
525
- $desc .= '<p>'.__('You should not use more than one og:site_name in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:site_name tag from your source code. Below, the list:','wp-seopress').'</p>';
526
- } else {
527
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph Site Name tag in your source code.','wp-seopress').'</p>';
528
- }
529
-
530
- if (!empty($all_og_site_name)) {
531
- $desc .= '<ul>';
532
- foreach($all_og_site_name as $og_site_name) {
533
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_site_name.'</li>';
534
- }
535
- $desc .= '</ul>';
536
- }
537
  } else {
538
- $analyzes['social']['impact'] = 'high';
539
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Site Name is missing!','wp-seopress').'</p>';
540
  }
541
 
542
  //twitter:title
@@ -544,28 +550,28 @@ $desc .= '<h4>'.__('Twitter Title','wp-seopress').'</h4>';
544
 
545
  if (!empty($seopress_analysis_data['tw_title']['count'])) {
546
 
547
- $count = $seopress_analysis_data['tw_title']['count'];
548
-
549
- $all_tw_title = $seopress_analysis_data['tw_title']['values'];
550
-
551
- if ($count > 1) {
552
- $analyzes['social']['impact'] = 'high';
553
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d twitter:title in your content.','wp-seopress'), $count).'</p>';
554
- $desc .= '<p>'.__('You should not use more than one twitter:title in your post content to avoid conflicts when sharing on social networks. Twitter will take the last twitter:title tag from your source code. Below, the list:','wp-seopress').'</p>';
555
- } else {
556
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found a Twitter Title Tag in your source code.','wp-seopress').'</p>';
557
- }
558
-
559
- if (!empty($all_tw_title)) {
560
- $desc .= '<ul>';
561
- foreach($all_tw_title as $tw_title) {
562
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$tw_title.'</li>';
563
- }
564
- $desc .= '</ul>';
565
- }
566
  } else {
567
- $analyzes['social']['impact'] = 'high';
568
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Twitter Title is missing!','wp-seopress').'</p>';
569
  }
570
 
571
  //twitter:description
@@ -573,28 +579,28 @@ $desc .= '<h4>'.__('Twitter Description','wp-seopress').'</h4>';
573
 
574
  if (!empty($seopress_analysis_data['tw_desc']['count'])) {
575
 
576
- $count = $seopress_analysis_data['tw_desc']['count'];
577
-
578
- $all_tw_desc = $seopress_analysis_data['tw_desc']['values'];
579
-
580
- if ($count > 1) {
581
- $analyzes['social']['impact'] = 'high';
582
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d twitter:description in your content.','wp-seopress'), $count).'</p>';
583
- $desc .= '<p>'.__('You should not use more than one twitter:description in your post content to avoid conflicts when sharing on social networks. Twitter will take the last twitter:description tag from your source code. Below, the list:','wp-seopress').'</p>';
584
- } else {
585
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found a Twitter Description tag in your source code.','wp-seopress').'</p>';
586
- }
587
-
588
- if (!empty($all_tw_desc)) {
589
- $desc .= '<ul>';
590
- foreach($all_tw_desc as $tw_desc) {
591
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$tw_desc.'</li>';
592
- }
593
- $desc .= '</ul>';
594
- }
595
  } else {
596
- $analyzes['social']['impact'] = 'high';
597
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Twitter Description is missing!','wp-seopress').'</p>';
598
  }
599
 
600
  //twitter:image
@@ -602,24 +608,24 @@ $desc .= '<h4>'.__('Twitter Image','wp-seopress').'</h4>';
602
 
603
  if (!empty($seopress_analysis_data['tw_img']['count'])) {
604
 
605
- $count = $seopress_analysis_data['tw_img']['count'];
606
 
607
- $all_tw_img = $seopress_analysis_data['tw_img']['values'];
608
 
609
- if ($count > 0) {
610
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.sprintf(esc_html__('We found %d twitter:image in your content.','wp-seopress'), $count).'</p>';
611
- }
612
 
613
- if (!empty($all_tw_img)) {
614
- $desc .= '<ul>';
615
- foreach($all_tw_img as $tw_img) {
616
- $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$tw_img.'</li>';
617
- }
618
- $desc .= '</ul>';
619
- }
620
  } else {
621
- $analyzes['social']['impact'] = 'high';
622
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Twitter Image is missing!','wp-seopress').'</p>';
623
  }
624
  $analyzes['social']['desc'] = $desc;
625
 
@@ -627,208 +633,208 @@ $analyzes['social']['desc'] = $desc;
627
  $desc = NULL;
628
  if (!empty($seopress_analysis_data['meta_robots'])) {
629
 
630
- $meta_robots = $seopress_analysis_data['meta_robots'];
631
-
632
- if (count($seopress_analysis_data['meta_robots']) > 1) {
633
- $analyzes['robots']['impact'] = 'high';
634
-
635
- $count_meta_robots = count($seopress_analysis_data['meta_robots']);
636
-
637
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %s meta robots in your page. There is probably something wrong with your theme!','wp-seopress'), $count_meta_robots).'</p>';
638
- }
639
-
640
- if (preg_match('/noindex/', json_encode($meta_robots))) {
641
- $analyzes['robots']['impact'] = 'high';
642
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('noindex is on! Search engines can\'t index this page.','wp-seopress').'</p>';
643
- } else {
644
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noindex is off. Search engines will index this page.','wp-seopress').'</p>';
645
- }
646
-
647
- if (preg_match('/nofollow/', json_encode($meta_robots))) {
648
- $analyzes['robots']['impact'] = 'high';
649
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('nofollow is on! Search engines can\'t follow your links on this page.','wp-seopress').'</p>';
650
- } else {
651
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nofollow is off. Search engines will follow links on this page.','wp-seopress').'</p>';
652
- }
653
-
654
- if (preg_match('/noarchive/', json_encode($meta_robots))) {
655
- if ($analyzes['robots']['impact'] != 'high') {
656
- $analyzes['robots']['impact'] = 'medium';
657
- }
658
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('noarchive is on! Search engines will not cache your page.','wp-seopress').'</p>';
659
- } else {
660
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noarchive is off. Search engines will probably cache your page.','wp-seopress').'</p>';
661
- }
662
-
663
- if (preg_match('/nosnippet/', json_encode($meta_robots))) {
664
- if ($analyzes['robots']['impact'] != 'high') {
665
- $analyzes['robots']['impact'] = 'medium';
666
- }
667
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('nosnippet is on! Search engines will not display a snippet of this page in search results.','wp-seopress').'</p>';
668
- } else {
669
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nosnippet is off. Search engines will display a snippet of this page in search results.','wp-seopress').'</p>';
670
- }
671
  } else {
672
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found no meta robots on this page. It means, your page is index,follow. Search engines will index it, and follow links. ','wp-seopress').'</p>';
673
  }
674
 
675
  //Meta Google
676
  if (!empty($seopress_analysis_data['meta_google'])) {
677
- $meta_google = $seopress_analysis_data['meta_google'];
678
-
679
- if (preg_match('/noimageindex/', json_encode($meta_google))) {
680
- $analyzes['robots']['impact'] = 'high';
681
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('noimageindex is on! Google will not index your images on this page (but if someone makes a direct link to one of your image in this page, it will be indexed).','wp-seopress').'</p>';
682
- } else {
683
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noimageindex is off. Google will index the images on this page.','wp-seopress').'</p>';
684
- }
685
-
686
- if (preg_match('/nositelinkssearchbox/', json_encode($meta_google))) {
687
- if ($analyzes['robots']['impact'] != 'high') {
688
- $analyzes['robots']['impact'] = 'medium';
689
- }
690
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('nositelinkssearchbox is on! Google will not display a sitelinks searchbox in search results.','wp-seopress').'</p>';
691
- } else {
692
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nositelinkssearchbox is off. Google will probably display a sitelinks searchbox in search results.','wp-seopress').'</p>';
693
- }
694
  } else {
695
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noimageindex is off. Google will index the images on this page.','wp-seopress').'</p>';
696
-
697
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nositelinkssearchbox is off. Google will probably display a sitelinks searchbox in search results.','wp-seopress').'</p>';
698
  }
699
 
700
  $analyzes['robots']['desc'] = $desc;
701
 
702
  //Img alt
703
  if (!empty($seopress_analysis_data['img'])) {
704
- $images = isset($seopress_analysis_data['img']['images']) ? $seopress_analysis_data['img']['images'] : NULL;
705
-
706
- $desc = '<div class="wrap-analysis-img">';
707
-
708
- if (!empty($images)) {
709
- $analyzes['img_alt']['impact'] = 'high';
710
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('No alternative text found for these images. Alt tags are important for both SEO and accessibility. Edit your images using the media library or your favorite page builder and fill in alternative text fields.','wp-seopress').'</p>';
711
-
712
- //Standard images & galleries
713
- if (!empty($images)) {
714
- $desc .= '<ul class="attachments">';
715
- foreach($images as $img) {
716
- $desc .= '<li class="attachment"><img src="'.$img.'"/></li>';
717
- }
718
- $desc .= '</ul>';
719
- }
720
- } else {
721
- $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('All alternative tags are filled in. Good work!','wp-seopress').'</p>';
722
- }
723
- $desc .= '</div>';
724
-
725
- $analyzes['img_alt']['desc'] = $desc;
726
  } else {
727
- $analyzes['img_alt']['impact'] = 'medium';
728
- $analyzes['img_alt']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('We could not find any image in your content. Content with media is a plus for your SEO.','wp-seopress').'</p>';
729
  }
730
 
731
  //Nofollow links
732
  if (!empty($seopress_analysis_data['nofollow_links'])) {
733
- $count = count($seopress_analysis_data['nofollow_links']);
734
-
735
- $desc = '<p>'.sprintf( esc_html__( 'We found %d links with nofollow attribute in your page. Do not overuse nofollow attribute in links. Below, the list:', 'wp-seopress' ), $count ).'</p>';
736
- $desc .= '<ul>';
737
- foreach ($seopress_analysis_data['nofollow_links'] as $links) {
738
- foreach ($links as $href => $link) {
739
- $desc .= '<li><span class="dashicons dashicons-minus"></span><a href="'.$href.'" target="_blank">'.$link.'</a><span class="dashicons dashicons-external"></span></li>';
740
- }
741
- }
742
- $desc .= '</ul>';
743
- $analyzes['nofollow_links']['impact'] = 'low';
744
- $analyzes['nofollow_links']['desc'] = $desc;
745
  } else {
746
- $analyzes['nofollow_links']['desc'] = '<p><span class="dashicons dashicons-yes"></span>'.__('This page doesn\'t have any nofollow links.','wp-seopress').'</p>';
747
  }
748
 
749
  //Outbound links
750
  $desc = '<p>'.__('Internet is built on the principle of hyperlink. It is therefore perfectly normal to make links between different websites. However, avoid making links to low quality sites, SPAM... If you are not sure about the quality of a site, add the attribute "nofollow" to your link.').'</p>';
751
  if (!empty($seopress_analysis_data['outbound_links'])) {
752
- $count = count($seopress_analysis_data['outbound_links']);
753
-
754
- $desc .= '<p>'.sprintf( __('We found %s outbound links in your page. Below, the list:', 'wp-seopress'), $count ).'</p>';
755
- $desc .= '<ul>';
756
- foreach ($seopress_analysis_data['outbound_links'] as $links) {
757
- foreach ($links as $href => $link) {
758
- $desc .= '<li><span class="dashicons dashicons-minus"></span><a href="'.$href.'" target="_blank">'.$link.'</a><span class="dashicons dashicons-external"></span></li>';
759
- }
760
- }
761
- $desc .= '</ul>';
762
  } else {
763
- $analyzes['outbound_links']['impact'] = 'medium';
764
- $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('This page doesn\'t have any outbound links.','wp-seopress').'</p>';
765
  }
766
  $analyzes['outbound_links']['desc'] = $desc;
767
 
768
- echo '<div id="seopress-analysis-tabs">
769
- <div id="seopress-analysis-tabs-1">';
770
- echo '<div class="analysis-score">';
771
- $impact = array_unique(array_values(wp_list_pluck($analyzes, 'impact')));
772
- $svg = '<svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
773
- <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
774
- <circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0" style="stroke-dashoffset: 101.788px;"></circle>
775
- </svg>';
776
- $tooltip = '<span class="sp-tooltip">
777
- <span class="dashicons dashicons-editor-help"></span>
778
- <span class="sp-tooltiptext">'.__('<strong>Should be improved:</strong> red or orange dots <br> <strong>Good:</strong> yellow or green dots','wp-seopress').'</span>
779
- </span>';
780
-
781
- if (!empty($impact)) {
782
- if (in_array('medium', $impact) || in_array('high', $impact)) {
783
- echo '<p class="notgood">'.$svg.'<span>'.__('Should be improved','wp-seopress').$tooltip.'</span></p>';
784
- $score = false;
785
- } else {
786
- echo '<p class="good">'.$svg.'<span>'.__('Good','wp-seopress').$tooltip.'</span></p>';
787
- $score = true;
788
- }
789
- } else {
790
- $score = false;
791
- }
792
-
793
- if (!empty($seopress_analysis_data)) {
794
- $seopress_analysis_data['score'] = $score;
795
- update_post_meta(get_the_ID(), '_seopress_analysis_data', $seopress_analysis_data);
796
- }
797
- echo '<span><a href="#" id="expand-all">'.__('Expand','wp-seopress').'</a> / <a href="#" id="close-all">'.__('Close','wp-seopress').'</a></span>';
798
- echo '</div>';
799
-
800
- if(!empty($analyzes)) {
801
- $order = array('1'=>'high','2'=>'medium','3'=>'low','4'=>'good');
802
-
803
- usort($analyzes, function ($a, $b) use ($order) {
804
- $pos_a = array_search($a['impact'], $order);
805
- $pos_b = array_search($b['impact'], $order);
806
- return $pos_a - $pos_b;
807
- });
808
-
809
- foreach($analyzes as $key => $value) {
810
- echo '<div class="gr-analysis">';
811
- if (isset($value['title'])) {
812
- echo '<div class="gr-analysis-title">
813
- <h3>
814
- <button type="button" aria-expanded="true" class="btn-toggle">';
815
- if (isset($value['impact'])) {
816
- echo '<span class="impact '.$value['impact'].'" aria-hidden="true"></span>';
817
- }
818
- echo '<span class="sp-arrow" aria-hidden="true"></span>
819
- '.$value['title'].'
820
- </button>
821
- </h3>
822
- </div>';
823
- }
824
- if (isset($value['desc'])) {
825
- echo '<div class="gr-analysis-content">';
826
- echo $value['desc'];
827
- echo '</div>';
828
- }
829
- echo '</div>';
830
- }
831
- }
832
- echo '</div>';
833
- echo '</div>
834
- </div>';
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'Please don&rsquo;t call the plugin directly. Thanks :)' );
3
  echo '<div class="wrap-seopress-analysis">
4
+ <p>
5
+ '.__('Enter a few keywords for analysis to help you write optimized content.','wp-seopress').'
6
+ </p>
7
+ <p>
8
+ <span class="label">'.__('Did you know?','wp-seopress').'</span> '.__('Writing content for your users is the most important thing! If it doesn‘t feel natural, your visitors will leave your site, Google will know it and your ranking will be affected.','wp-seopress').'
9
+ </p>
10
+ <div class="col-left">
11
+ <p>
12
+ <label for="seopress_analysis_target_kw_meta">'. __( 'Target keywords', 'wp-seopress' ) .'
13
+ '. seopress_tooltip(__('Target keywords','wp-seopress'), __('Separate target keywords with commas. Do not use spaces after the commas, unless you want to include them','wp-seopress'), esc_html('my super keyword,another keyword,keyword')).'
14
+ </label>
15
+ <input id="seopress_analysis_target_kw_meta" type="text" name="seopress_analysis_target_kw" placeholder="'.esc_html__('Enter your target keywords','wp-seopress').'" aria-label="'.__('Target keywords','wp-seopress').'" value="'.esc_attr($seopress_analysis_target_kw).'" />
16
+ </p>';
17
+ if (empty($seopress_analysis_data)) {
18
+ echo '<div id="seopress_launch_analysis" class="button" data_id="'.get_the_ID().'" data_post_type="'.get_current_screen()->post_type.'">'.__('Analyze my content','wp-seopress').'</div>';
19
+ } else {
20
+ echo '<div id="seopress_launch_analysis" class="button" data_id="'.get_the_ID().'" data_post_type="'.get_current_screen()->post_type.'">'.__('Refresh analysis','wp-seopress').'</div>';
21
+ }
22
+
23
+ echo '<br><p><span class="howto">'.__('To get the most accurate analysis, save your post first.','wp-seopress').'</span></p>';
24
  echo '</div>';
25
  if ( is_plugin_active( 'wp-seopress-pro/seopress-pro.php' ) ) {
26
+ echo '<div class="col-right">
27
+ <p>
28
+ <label for="seopress_google_suggest_kw_meta">'. __( 'Google suggestions', 'wp-seopress' ) .'
29
+ '. seopress_tooltip(__('Google suggestions','wp-seopress'), __('Enter a keyword, or a phrase, to find the top 10 Google suggestions instantly. This is useful if you want to work with the long tail technique.','wp-seopress'), esc_html('my super keyword,another keyword,keyword')).'
30
+ </label>
31
+ <input id="seopress_google_suggest_kw_meta" type="text" name="seopress_google_suggest_kw" placeholder="'.__('Get suggestions from Google','wp-seopress').'" aria-label="Google suggestions" value="">
32
+ </p>
33
+ <button id="seopress_get_suggestions" type="button" class="button">'.__('Get suggestions!','wp-seopress').'</button>';
34
+
35
+ echo "<ul id='seopress_suggestions'></ul>";
36
+
37
+ if (get_locale() !='') {
38
+ $locale = substr(get_locale(), 0, 2);
39
+ $country_code = substr(get_locale(), -2);
40
+ } else {
41
+ $locale = 'en';
42
+ $country_code = 'US';
43
+ }
44
+
45
+ echo "<script>
46
+ function seopress_google_suggest(data){
47
+ var raw_suggestions = String(data);
48
+
49
+ var suggestions_array = raw_suggestions.split(',');
50
+
51
+ var i;
52
+ for (i = 0; i < 10; i++) {
53
+ document.getElementById('seopress_suggestions').innerHTML += '<li><a href=\"#\" class=\"sp-suggest-btn button button-small\">'+suggestions_array[i]+'</a></li>';
54
+ }
55
+
56
+ jQuery('.sp-suggest-btn').click(function(e) {
57
+ e.preventDefault();
58
+ if(jQuery('#seopress_analysis_target_kw_meta').val().length == 0){
59
+ jQuery('#seopress_analysis_target_kw_meta').val(jQuery(this).text() + ',');
60
+ } else {
61
+ str = jQuery('#seopress_analysis_target_kw_meta').val();
62
+ str = str.replace(/,\s*$/, '');
63
+ jQuery('#seopress_analysis_target_kw_meta').val(str+','+jQuery(this).text());
64
+ }
65
+ });
66
+ }
67
+ jQuery('#seopress_get_suggestions').on('click', function(data) {
68
+ data.preventDefault();
69
+
70
+ document.getElementById('seopress_suggestions').innerHTML = '';
71
+
72
+ var kws = jQuery('#seopress_google_suggest_kw_meta').val();
73
+
74
+ if (kws) {
75
+ var script = document.createElement('script');
76
+ script.src = 'https://www.google.com/complete/search?client=firefox&hl=".$locale."&q='+kws+'&gl=".$country_code."&callback=seopress_google_suggest';
77
+ document.body.appendChild(script);
78
+ }
79
+ });
80
+ </script>
81
+ </div>";
 
82
  }
83
 
84
  //Analyzes
85
  $analyzes = array(
86
+ 'schemas'=> array(
87
+ 'title' => __('Structured data types','wp-seopress-pro'),
88
+ 'impact' => 'good',
89
+ 'desc' => NULL
90
+ ),
91
+ 'old_post'=> array(
92
+ 'title' => __('Last modified date','wp-seopress-pro'),
93
+ 'impact' => 'good',
94
+ 'desc' => NULL
95
+ ),
96
+ 'words_counter'=> array(
97
+ 'title' => __('Words counter','wp-seopress-pro'),
98
+ 'impact' => 'good',
99
+ 'desc' => NULL
100
+ ),
101
+ 'keywords_density'=> array(
102
+ 'title' => __('Keywords density','wp-seopress-pro'),
103
+ 'impact' => NULL,
104
+ 'desc' => NULL
105
+ ),
106
+ 'keywords_permalink'=> array(
107
+ 'title' => __('Keywords in permalink','wp-seopress-pro'),
108
+ 'impact' => NULL,
109
+ 'desc' => NULL
110
+ ),
111
+ 'headings'=> array(
112
+ 'title' => __('Headings','wp-seopress-pro'),
113
+ 'impact' => 'good',
114
+ 'desc' => NULL
115
+ ),
116
+ 'meta_title'=> array(
117
+ 'title' => __('Meta title','wp-seopress-pro'),
118
+ 'impact' => NULL,
119
+ 'desc' => NULL
120
+ ),
121
+ 'meta_desc'=> array(
122
+ 'title' => __('Meta description','wp-seopress-pro'),
123
+ 'impact' => NULL,
124
+ 'desc' => NULL
125
+ ),
126
+ 'social'=> array(
127
+ 'title' => __('Social meta tags','wp-seopress-pro'),
128
+ 'impact' => 'good',
129
+ 'desc' => NULL
130
+ ),
131
+ 'robots'=> array(
132
+ 'title' => __('Meta robots','wp-seopress-pro'),
133
+ 'impact' => 'good',
134
+ 'desc' => NULL
135
+ ),
136
+ 'img_alt'=> array(
137
+ 'title' => __('Alternative texts of images','wp-seopress-pro'),
138
+ 'impact' => 'good',
139
+ 'desc' => NULL
140
+ ),
141
+ 'nofollow_links'=> array(
142
+ 'title' => __('NoFollow Links','wp-seopress-pro'),
143
+ 'impact' => 'good',
144
+ 'desc' => NULL
145
+ ),
146
+ 'outbound_links'=> array(
147
+ 'title' => __('Outbound Links','wp-seopress-pro'),
148
+ 'impact' => 'good',
149
+ 'desc' => NULL
150
+ ),
151
  );
152
 
153
  //Schemas
154
  if (!empty($seopress_analysis_data['json']) || isset($seopress_analysis_data['json'])) {
155
+ $desc = '<p>'.__('We found these schemas in the source code of this page:','wp-seopress').'</p>';
156
+
157
+ $desc .= '<ul>';
158
+ $json_ld = array_filter($seopress_analysis_data['json']);
159
+ foreach(array_count_values($json_ld) as $key => $value) {
160
+ $html = NULL;
161
+ if ($value > 1) {
162
+ $html = '<span class="impact high">'.__('duplicated schema - x','wp-seopress').$value.'</span>';
163
+ $analyzes['schemas']['impact'] = 'high';
164
+ }
165
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$key.$html.'</li>';
166
+ }
167
+ $desc .= '</ul>';
168
+ $analyzes['schemas']['desc'] = $desc;
169
  } else {
170
+ $analyzes['schemas']['impact'] = 'medium';
171
+ $analyzes['schemas']['desc'] = '<p>'.__('No schemas found in the source code of this page.','wp-seopress').'</p>';
172
  }
173
 
174
  //Old post
175
  $desc = NULL;
176
  if( strtotime( $post->post_modified ) < strtotime('-365 days') ) {
177
+ $analyzes['old_post']['impact'] = 'medium';
178
+ $desc = '<p><span class="dashicons dashicons-no-alt"></span>'.__('This post is a little old!','wp-seopress').'</p>';
179
  } else {
180
+ $desc = '<p><span class="dashicons dashicons-yes"></span>'.__('The last modified date of this article is less than 1 year. Cool!','wp-seopress').'</p>';
181
  }
182
  $desc .= '<p>'.__('Search engines love fresh content. Regularly update your articles without having to rewrite your content entirely and give them a boost in search rankings. SEOPress takes care of the technical part.','wp-seopress').'</p>';
183
  $analyzes['old_post']['desc'] = $desc;
185
  //Word counters
186
  $desc = NULL;
187
  if (isset($seopress_analysis_data['words_counter']) || isset($seopress_analysis_data['words_counter_unique'])) {
188
+ $desc = '<p>'.__('Words counter is not a direct ranking factor. But, your content must be as qualitative as possible, with relevant and unique information. To fulfill these conditions, your article requires a minimum of paragraphs, so words.','wp-seopress').'</p>
189
+ <ul>
190
+ <li>'.$seopress_analysis_data['words_counter'].' '.__('words found.','wp-seopress').'</li>
191
+ <li>'.$seopress_analysis_data['words_counter_unique'].' '.__('unique words found.','wp-seopress').'</li>';
192
+
193
+ if ($seopress_analysis_data['words_counter'] >= 299) {
194
+ $desc .= '<li><span class="dashicons dashicons-yes"></span>'.__('Your content is composed of more than 300 words, which is the minimum for a post.','wp-seopress').'</li>';
195
+ } else {
196
+ $desc .= '<li><span class="dashicons dashicons-no-alt"></span>'.__('Your content is too short. Add a few more paragraphs!','wp-seopress').'</li>';
197
+ $analyzes['words_counter']['impact'] = 'medium';
198
+ }
199
+ $desc .= '</ul>';
200
+
201
+ $analyzes['words_counter']['desc'] = $desc;
202
  } else {
203
+ $analyzes['words_counter']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('No content? Add a few more paragraphs!','wp-seopress').'</p>';
204
+ $analyzes['words_counter']['impact'] = 'high';
205
  }
206
 
207
  //Keywords density
208
  if (!empty($seopress_analysis_data['kws_density']['matches']) && isset($seopress_analysis_data['words_counter'])) {
209
+ $target_kws_density = $seopress_analysis_data['kws_density']['matches'];
210
+
211
+ $desc = '<ul>';
212
+ foreach ($target_kws_density as $key => $value) {
213
+ foreach ($value as $_key => $_value) {
214
+ $kw_count = count($_value);
215
+ }
216
+ $kw_name = $key;
217
+ $kw_density = round($kw_count/$seopress_analysis_data['words_counter']*100, 2);
218
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times in your content, a keyword density of %s%%','wp-seopress'), $kw_name, $kw_count, $kw_density).'</li>';
219
+ }
220
+ $desc .= '</ul>';
221
+ $desc .= '<p class="description">'.__('Learn more about <a href="https://www.youtube.com/watch?v=Rk4qgQdp2UA" target="_blank">keywords stuffing</a>.','wp-seopress').'</p>';
222
+ $analyzes['keywords_density']['impact'] = 'good';
223
+ $analyzes['keywords_density']['desc'] = $desc;
224
  } else {
225
+ $analyzes['keywords_density']['desc'] = '<p>'.__('We were unable to calculate the density of your keywords. You probably haven‘t added any content or your target keywords were not find in your post content.','wp-seopress').'</p>';
226
+ $analyzes['keywords_density']['impact'] = 'high';
227
  }
228
 
229
  //Keywords in permalink
230
  if (!empty($seopress_analysis_data['kws_permalink']['matches'])) {
231
+ $desc = '<p><span class="dashicons dashicons-yes"></span>'.__('Cool, one of your target keyword is used in your permalink.','wp-seopress').'</p>';
232
+
233
+ $target_kws_permalink = $seopress_analysis_data['kws_permalink']['matches'];
234
+
235
+ $desc .= '<ul>';
236
+ foreach ($target_kws_permalink as $key => $value) {
237
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$key.'</li>';
238
+ }
239
+ $desc .= '</ul>';
240
+ $analyzes['keywords_permalink']['desc'] = $desc;
241
+ $analyzes['keywords_permalink']['impact'] = 'good';
242
  } else {
243
+ global $post;
244
+ if (get_option( 'page_on_front' ) == $post->ID) {
245
+ $analyzes['keywords_permalink']['desc'] = '<p><span class="dashicons dashicons-yes"></span>'.__('This is your homepage. This check doesn\'t apply here because there is no slug.','wp-seopress').'</p>';
246
+ $analyzes['keywords_permalink']['impact'] = 'good';
247
+ } else {
248
+ $analyzes['keywords_permalink']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('You should add one of your target keyword in your permalink.','wp-seopress').'</p>';
249
+ $analyzes['keywords_permalink']['impact'] = 'medium';
250
+ }
251
  }
252
 
253
+
254
  //Headings
255
  //H1
256
  $desc = NULL;
257
  if (!empty($seopress_analysis_data['h1']['matches'])) {
258
+ $desc .= '<h4>'.__('H1 (Heading 1)','wp-seopress').'</h4>';
259
+
260
+ $count = $seopress_analysis_data['h1']['nomatches']['count'];
261
+
262
+ $target_kws_h1 = $seopress_analysis_data['h1']['matches'];
263
+
264
+ $all_h1 = $seopress_analysis_data['h1']['values'];
265
+
266
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in Heading 1 (H1).','wp-seopress').'</p>';
267
+
268
+ $desc .= '<ul>';
269
+
270
+ foreach ($target_kws_h1 as $key => $value) {
271
+ foreach ($value as $_key => $_value) {
272
+ $kw_count = count($value);
273
+ }
274
+ $kw_name = $key;
275
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
276
+ }
277
+
278
+ $desc .= '</ul>';
279
+ if ($count > 1) {
280
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d Heading 1 (H1) in your content.','wp-seopress'), $count).'</p>';
281
+ $desc .= '<p>'.__('You should not use more than one H1 heading in your post content. The rule is simple: only one H1 for each web page. It is better for both SEO and accessibility. Below, the list:','wp-seopress').'</p>';
282
+ $analyzes['headings']['impact'] = 'high';
283
+ }
284
+
285
+ if (!empty($all_h1)) {
286
+ $desc .= '<ul>';
287
+ foreach($all_h1 as $h1) {
288
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$h1.'</li>';
289
+ }
290
+ $desc .= '</ul>';
291
+ }
292
  }
293
 
294
  //H2
295
  $desc .= '<h4>'.__('H2 (Heading 2)','wp-seopress').'</h4>';
296
  if (!empty($seopress_analysis_data['h2']['matches'])) {
297
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in Heading 2 (H2).','wp-seopress').'</p>';
298
+ $desc .= '<ul>';
299
+ $target_kws_h2 = $seopress_analysis_data['h2']['matches'];
300
+ foreach ($target_kws_h2 as $key => $value) {
301
+ foreach ($value as $_key => $_value) {
302
+ $kw_count = count($value);
303
+ }
304
+ $kw_name = $key;
305
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
306
+ }
307
+ $desc .= '</ul>';
308
  } else {
309
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in Heading 2 (H2).','wp-seopress').'</p>';
310
+ if ($analyzes['headings']['impact'] != 'high') {
311
+ $analyzes['headings']['impact'] = 'medium';
312
+ }
313
  }
314
 
315
  //H3
316
  $desc .= '<h4>'.__('H3 (Heading 3)','wp-seopress').'</h4>';
317
  if (!empty($seopress_analysis_data['h3']['matches'])) {
318
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in Heading 3 (H3).','wp-seopress').'</p>';
319
+ $desc .= '<ul>';
320
+ $target_kws_h3 = $seopress_analysis_data['h3']['matches'];
321
+ foreach ($target_kws_h3 as $key => $value) {
322
+ foreach ($value as $_key => $_value) {
323
+ $kw_count = count($value);
324
+ }
325
+ $kw_name = $key;
326
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
327
+ }
328
+ $desc .= '</ul>';
329
  } else {
330
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in Heading 3 (H3).','wp-seopress').'</p>';
331
+ if ($analyzes['headings']['impact'] != 'high') {
332
+ $analyzes['headings']['impact'] = 'medium';
333
+ }
334
  }
335
  $analyzes['headings']['desc'] = $desc;
336
 
337
  //Meta Title
338
  if ($seopress_titles_title !='') {
339
+ $desc = NULL;
340
+ if (!empty($seopress_analysis_data['meta_title']['matches'])) {
341
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in the Meta Title.','wp-seopress').'</p>';
342
+ $desc .= '<ul>';
343
+ $target_kws_title = $seopress_analysis_data['meta_title']['matches'];
344
+ foreach ($target_kws_title as $key => $value) {
345
+ foreach ($value as $_key => $_value) {
346
+ $kw_count = count($_value);
347
+ }
348
+ $kw_name = $key;
349
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
350
+ }
351
+ $desc .= '</ul>';
352
+ $analyzes['meta_title']['impact'] = 'good';
353
+ } else {
354
+ $analyzes['meta_title']['impact'] = 'medium';
355
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in the Meta Title.','wp-seopress').'</p>';
356
+ }
357
+
358
+ if (mb_strlen($seopress_titles_title) > 65 ) {
359
+ $analyzes['meta_title']['impact'] = 'medium';
360
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your custom title is too long.','wp-seopress').'</p>';
361
+ } else {
362
+ $analyzes['meta_title']['impact'] = 'good';
363
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('The length of your title is correct','wp-seopress').'</p>';
364
+ }
365
+ $analyzes['meta_title']['desc'] = $desc;
366
  } else {
367
+ $analyzes['meta_title']['impact'] = 'medium';
368
+ $analyzes['meta_title']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('No custom title is set for this post. If the global meta title suits you, you can ignore this recommendation.','wp-seopress').'</p>';
369
  }
370
 
371
  //Meta description
372
  if ($seopress_titles_desc !='') {
373
+ $desc = NULL;
374
+ if (!empty($seopress_analysis_data['meta_description']['matches'])) {
375
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('Target keywords were found in the Meta description.','wp-seopress').'</p>';
376
+ $desc .= '<ul>';
377
+ $target_kws_desc = $seopress_analysis_data['meta_description']['matches'];
378
+ foreach ($target_kws_desc as $key => $value) {
379
+ foreach ($value as $_key => $_value) {
380
+ $kw_count = count($_value);
381
+ }
382
+ $kw_name = $key;
383
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.sprintf(esc_html__('%s was found %d times.','wp-seopress'), $kw_name, $kw_count).'</li>';
384
+ }
385
+ $desc .= '</ul>';
386
+ $analyzes['meta_desc']['impact'] = 'good';
387
+ } else {
388
+ $analyzes['meta_desc']['impact'] = 'medium';
389
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('None of your target keywords were found in the Meta description.','wp-seopress').'</p>';
390
+ }
391
+
392
+ if (mb_strlen($seopress_titles_desc) > 160 ) {
393
+ $analyzes['meta_desc']['impact'] = 'medium';
394
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('You custom meta description is too long.','wp-seopress').'</p>';
395
+ } else {
396
+ $analyzes['meta_desc']['impact'] = 'good';
397
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('The length of your meta description is correct','wp-seopress').'</p>';
398
+ }
399
+ $analyzes['meta_desc']['desc'] = $desc;
400
  } else {
401
+ $analyzes['meta_desc']['impact'] = 'medium';
402
+ $analyzes['meta_desc']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('No custom meta description is set for this post. If the global meta description suits you, you can ignore this recommendation.','wp-seopress').'</p>';
403
  }
404
 
405
  //Social tags
409
  $desc .= '<h4>'.__('Open Graph Title','wp-seopress').'</h4>';
410
 
411
  if (!empty($seopress_analysis_data['og_title']['count'])) {
412
+ $count = $seopress_analysis_data['og_title']['count'];
413
+
414
+ $all_og_title = $seopress_analysis_data['og_title']['values'];
415
+
416
+ if ($count > 1) {
417
+ $analyzes['social']['impact'] = 'high';
418
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:title in your content.','wp-seopress'), $count).'</p>';
419
+ $desc .= '<p>'.__('You should not use more than one og:title in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:title tag from your source code. Below, the list:','wp-seopress').'</p>';
420
+ } else {
421
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph Title tag in your source code.','wp-seopress').'</p>';
422
+ }
423
+
424
+ if (!empty($all_og_title)) {
425
+ $desc .= '<ul>';
426
+ foreach($all_og_title as $og_title) {
427
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_title.'</li>';
428
+ }
429
+ $desc .= '</ul>';
430
+ }
431
  } else {
432
+ $analyzes['social']['impact'] = 'high';
433
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Title is missing!','wp-seopress').'</p>';
434
  }
435
 
436
  //og:description
438
 
439
  if (!empty($seopress_analysis_data['og_desc']['count'])) {
440
 
441
+ $count = $seopress_analysis_data['og_desc']['count'];
442
+
443
+ $all_og_desc = $seopress_analysis_data['og_desc']['values'];
444
+
445
+ if ($count > 1) {
446
+ $analyzes['social']['impact'] = 'high';
447
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:description in your content.','wp-seopress'), $count).'</p>';
448
+ $desc .= '<p>'.__('You should not use more than one og:description in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:description tag from your source code. Below, the list:','wp-seopress').'</p>';
449
+ } else {
450
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph Description tag in your source code.','wp-seopress').'</p>';
451
+ }
452
+
453
+ if (!empty($all_og_desc)) {
454
+ $desc .= '<ul>';
455
+ foreach($all_og_desc as $og_desc) {
456
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_desc.'</li>';
457
+ }
458
+ $desc .= '</ul>';
459
+ }
460
  } else {
461
+ $analyzes['social']['impact'] = 'high';
462
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Description is missing!','wp-seopress').'</p>';
463
  }
464
 
465
  //og:image
467
 
468
  if (!empty($seopress_analysis_data['og_img']['count'])) {
469
 
470
+ $count = $seopress_analysis_data['og_img']['count'];
471
 
472
+ $all_og_img = $seopress_analysis_data['og_img']['values'];
473
 
474
+ if ($count > 0) {
475
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.sprintf(esc_html__('We found %d og:image in your content.','wp-seopress'), $count).'</p>';
476
+ }
477
 
478
+ if (!empty($all_og_img)) {
479
+ $desc .= '<ul>';
480
+ foreach($all_og_img as $og_img) {
481
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_img.'</li>';
482
+ }
483
+ $desc .= '</ul>';
484
+ }
485
  } else {
486
+ $analyzes['social']['impact'] = 'high';
487
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Image is missing!','wp-seopress').'</p>';
488
  }
489
 
490
  //og:url
492
 
493
  if (!empty($seopress_analysis_data['og_url']['count'])) {
494
 
495
+ $count = $seopress_analysis_data['og_url']['count'];
496
+
497
+ $all_og_url = $seopress_analysis_data['og_url']['values'];
498
+
499
+ if ($count > 1) {
500
+ $analyzes['social']['impact'] = 'high';
501
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:url in your content.','wp-seopress'), $count).'</p>';
502
+ $desc .= '<p>'.__('You should not use more than one og:url in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:url tag from your source code. Below, the list:','wp-seopress').'</p>';
503
+ } else {
504
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph URL tag in your source code.','wp-seopress').'</p>';
505
+ }
506
+
507
+ if (!empty($all_og_url)) {
508
+ $desc .= '<ul>';
509
+ foreach($all_og_url as $og_url) {
510
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_url.'</li>';
511
+ }
512
+ $desc .= '</ul>';
513
+ }
514
  } else {
515
+ $analyzes['social']['impact'] = 'high';
516
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph URL is missing!','wp-seopress').'</p>';
517
  }
518
 
519
  //og:site_name
521
 
522
  if (!empty($seopress_analysis_data['og_site_name']['count'])) {
523
 
524
+ $count = $seopress_analysis_data['og_site_name']['count'];
525
+
526
+ $all_og_site_name = $seopress_analysis_data['og_site_name']['values'];
527
+
528
+ if ($count > 1) {
529
+ $analyzes['social']['impact'] = 'high';
530
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d og:site_name in your content.','wp-seopress'), $count).'</p>';
531
+ $desc .= '<p>'.__('You should not use more than one og:site_name in your post content to avoid conflicts when sharing on social networks. Facebook will take the last og:site_name tag from your source code. Below, the list:','wp-seopress').'</p>';
532
+ } else {
533
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found an Open Graph Site Name tag in your source code.','wp-seopress').'</p>';
534
+ }
535
+
536
+ if (!empty($all_og_site_name)) {
537
+ $desc .= '<ul>';
538
+ foreach($all_og_site_name as $og_site_name) {
539
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$og_site_name.'</li>';
540
+ }
541
+ $desc .= '</ul>';
542
+ }
543
  } else {
544
+ $analyzes['social']['impact'] = 'high';
545
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Open Graph Site Name is missing!','wp-seopress').'</p>';
546
  }
547
 
548
  //twitter:title
550
 
551
  if (!empty($seopress_analysis_data['tw_title']['count'])) {
552
 
553
+ $count = $seopress_analysis_data['tw_title']['count'];
554
+
555
+ $all_tw_title = $seopress_analysis_data['tw_title']['values'];
556
+
557
+ if ($count > 1) {
558
+ $analyzes['social']['impact'] = 'high';
559
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d twitter:title in your content.','wp-seopress'), $count).'</p>';
560
+ $desc .= '<p>'.__('You should not use more than one twitter:title in your post content to avoid conflicts when sharing on social networks. Twitter will take the last twitter:title tag from your source code. Below, the list:','wp-seopress').'</p>';
561
+ } else {
562
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found a Twitter Title Tag in your source code.','wp-seopress').'</p>';
563
+ }
564
+
565
+ if (!empty($all_tw_title)) {
566
+ $desc .= '<ul>';
567
+ foreach($all_tw_title as $tw_title) {
568
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$tw_title.'</li>';
569
+ }
570
+ $desc .= '</ul>';
571
+ }
572
  } else {
573
+ $analyzes['social']['impact'] = 'high';
574
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Twitter Title is missing!','wp-seopress').'</p>';
575
  }
576
 
577
  //twitter:description
579
 
580
  if (!empty($seopress_analysis_data['tw_desc']['count'])) {
581
 
582
+ $count = $seopress_analysis_data['tw_desc']['count'];
583
+
584
+ $all_tw_desc = $seopress_analysis_data['tw_desc']['values'];
585
+
586
+ if ($count > 1) {
587
+ $analyzes['social']['impact'] = 'high';
588
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %d twitter:description in your content.','wp-seopress'), $count).'</p>';
589
+ $desc .= '<p>'.__('You should not use more than one twitter:description in your post content to avoid conflicts when sharing on social networks. Twitter will take the last twitter:description tag from your source code. Below, the list:','wp-seopress').'</p>';
590
+ } else {
591
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found a Twitter Description tag in your source code.','wp-seopress').'</p>';
592
+ }
593
+
594
+ if (!empty($all_tw_desc)) {
595
+ $desc .= '<ul>';
596
+ foreach($all_tw_desc as $tw_desc) {
597
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$tw_desc.'</li>';
598
+ }
599
+ $desc .= '</ul>';
600
+ }
601
  } else {
602
+ $analyzes['social']['impact'] = 'high';
603
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Twitter Description is missing!','wp-seopress').'</p>';
604
  }
605
 
606
  //twitter:image
608
 
609
  if (!empty($seopress_analysis_data['tw_img']['count'])) {
610
 
611
+ $count = $seopress_analysis_data['tw_img']['count'];
612
 
613
+ $all_tw_img = $seopress_analysis_data['tw_img']['values'];
614
 
615
+ if ($count > 0) {
616
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.sprintf(esc_html__('We found %d twitter:image in your content.','wp-seopress'), $count).'</p>';
617
+ }
618
 
619
+ if (!empty($all_tw_img)) {
620
+ $desc .= '<ul>';
621
+ foreach($all_tw_img as $tw_img) {
622
+ $desc .= '<li><span class="dashicons dashicons-minus"></span>'.$tw_img.'</li>';
623
+ }
624
+ $desc .= '</ul>';
625
+ }
626
  } else {
627
+ $analyzes['social']['impact'] = 'high';
628
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('Your Twitter Image is missing!','wp-seopress').'</p>';
629
  }
630
  $analyzes['social']['desc'] = $desc;
631
 
633
  $desc = NULL;
634
  if (!empty($seopress_analysis_data['meta_robots'])) {
635
 
636
+ $meta_robots = $seopress_analysis_data['meta_robots'];
637
+
638
+ if (count($seopress_analysis_data['meta_robots']) > 1) {
639
+ $analyzes['robots']['impact'] = 'high';
640
+
641
+ $count_meta_robots = count($seopress_analysis_data['meta_robots']);
642
+
643
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.sprintf(esc_html__('We found %s meta robots in your page. There is probably something wrong with your theme!','wp-seopress'), $count_meta_robots).'</p>';
644
+ }
645
+
646
+ if (preg_match('/noindex/', json_encode($meta_robots))) {
647
+ $analyzes['robots']['impact'] = 'high';
648
+ $desc .= '<p data-robots="noindex"><span class="dashicons dashicons-no-alt"></span>'.__('noindex is on! Search engines can\'t index this page.','wp-seopress').'</p>';
649
+ } else {
650
+ $desc .= '<p data-robots="index"><span class="dashicons dashicons-yes"></span>'.__('noindex is off. Search engines will index this page.','wp-seopress').'</p>';
651
+ }
652
+
653
+ if (preg_match('/nofollow/', json_encode($meta_robots))) {
654
+ $analyzes['robots']['impact'] = 'high';
655
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('nofollow is on! Search engines can\'t follow your links on this page.','wp-seopress').'</p>';
656
+ } else {
657
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nofollow is off. Search engines will follow links on this page.','wp-seopress').'</p>';
658
+ }
659
+
660
+ if (preg_match('/noarchive/', json_encode($meta_robots))) {
661
+ if ($analyzes['robots']['impact'] != 'high') {
662
+ $analyzes['robots']['impact'] = 'medium';
663
+ }
664
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('noarchive is on! Search engines will not cache your page.','wp-seopress').'</p>';
665
+ } else {
666
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noarchive is off. Search engines will probably cache your page.','wp-seopress').'</p>';
667
+ }
668
+
669
+ if (preg_match('/nosnippet/', json_encode($meta_robots))) {
670
+ if ($analyzes['robots']['impact'] != 'high') {
671
+ $analyzes['robots']['impact'] = 'medium';
672
+ }
673
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('nosnippet is on! Search engines will not display a snippet of this page in search results.','wp-seopress').'</p>';
674
+ } else {
675
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nosnippet is off. Search engines will display a snippet of this page in search results.','wp-seopress').'</p>';
676
+ }
677
  } else {
678
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('We found no meta robots on this page. It means, your page is index,follow. Search engines will index it, and follow links. ','wp-seopress').'</p>';
679
  }
680
 
681
  //Meta Google
682
  if (!empty($seopress_analysis_data['meta_google'])) {
683
+ $meta_google = $seopress_analysis_data['meta_google'];
684
+
685
+ if (preg_match('/noimageindex/', json_encode($meta_google))) {
686
+ $analyzes['robots']['impact'] = 'high';
687
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('noimageindex is on! Google will not index your images on this page (but if someone makes a direct link to one of your image in this page, it will be indexed).','wp-seopress').'</p>';
688
+ } else {
689
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noimageindex is off. Google will index the images on this page.','wp-seopress').'</p>';
690
+ }
691
+
692
+ if (preg_match('/nositelinkssearchbox/', json_encode($meta_google))) {
693
+ if ($analyzes['robots']['impact'] != 'high') {
694
+ $analyzes['robots']['impact'] = 'medium';
695
+ }
696
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('nositelinkssearchbox is on! Google will not display a sitelinks searchbox in search results.','wp-seopress').'</p>';
697
+ } else {
698
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nositelinkssearchbox is off. Google will probably display a sitelinks searchbox in search results.','wp-seopress').'</p>';
699
+ }
700
  } else {
701
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('noimageindex is off. Google will index the images on this page.','wp-seopress').'</p>';
702
+
703
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('nositelinkssearchbox is off. Google will probably display a sitelinks searchbox in search results.','wp-seopress').'</p>';
704
  }
705
 
706
  $analyzes['robots']['desc'] = $desc;
707
 
708
  //Img alt
709
  if (!empty($seopress_analysis_data['img'])) {
710
+ $images = isset($seopress_analysis_data['img']['images']) ? $seopress_analysis_data['img']['images'] : NULL;
711
+
712
+ $desc = '<div class="wrap-analysis-img">';
713
+
714
+ if (!empty($images)) {
715
+ $analyzes['img_alt']['impact'] = 'high';
716
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('No alternative text found for these images. Alt tags are important for both SEO and accessibility. Edit your images using the media library or your favorite page builder and fill in alternative text fields.','wp-seopress').'</p>';
717
+
718
+ //Standard images & galleries
719
+ if (!empty($images)) {
720
+ $desc .= '<ul class="attachments">';
721
+ foreach($images as $img) {
722
+ $desc .= '<li class="attachment"><img src="'.$img.'"/></li>';
723
+ }
724
+ $desc .= '</ul>';
725
+ }
726
+ } else {
727
+ $desc .= '<p><span class="dashicons dashicons-yes"></span>'.__('All alternative tags are filled in. Good work!','wp-seopress').'</p>';
728
+ }
729
+ $desc .= '</div>';
730
+
731
+ $analyzes['img_alt']['desc'] = $desc;
732
  } else {
733
+ $analyzes['img_alt']['impact'] = 'medium';
734
+ $analyzes['img_alt']['desc'] = '<p><span class="dashicons dashicons-no-alt"></span>'.__('We could not find any image in your content. Content with media is a plus for your SEO.','wp-seopress').'</p>';
735
  }
736
 
737
  //Nofollow links
738
  if (!empty($seopress_analysis_data['nofollow_links'])) {
739
+ $count = count($seopress_analysis_data['nofollow_links']);
740
+
741
+ $desc = '<p>'.sprintf( esc_html__( 'We found %d links with nofollow attribute in your page. Do not overuse nofollow attribute in links. Below, the list:', 'wp-seopress' ), $count ).'</p>';
742
+ $desc .= '<ul>';
743
+ foreach ($seopress_analysis_data['nofollow_links'] as $links) {
744
+ foreach ($links as $href => $link) {
745
+ $desc .= '<li><span class="dashicons dashicons-minus"></span><a href="'.$href.'" target="_blank">'.$link.'</a><span class="dashicons dashicons-external"></span></li>';
746
+ }
747
+ }
748
+ $desc .= '</ul>';
749
+ $analyzes['nofollow_links']['impact'] = 'low';
750
+ $analyzes['nofollow_links']['desc'] = $desc;
751
  } else {
752
+ $analyzes['nofollow_links']['desc'] = '<p><span class="dashicons dashicons-yes"></span>'.__('This page doesn\'t have any nofollow links.','wp-seopress').'</p>';
753
  }
754
 
755
  //Outbound links
756
  $desc = '<p>'.__('Internet is built on the principle of hyperlink. It is therefore perfectly normal to make links between different websites. However, avoid making links to low quality sites, SPAM... If you are not sure about the quality of a site, add the attribute "nofollow" to your link.').'</p>';
757
  if (!empty($seopress_analysis_data['outbound_links'])) {
758
+ $count = count($seopress_analysis_data['outbound_links']);
759
+
760
+ $desc .= '<p>'.sprintf( __('We found %s outbound links in your page. Below, the list:', 'wp-seopress'), $count ).'</p>';
761
+ $desc .= '<ul>';
762
+ foreach ($seopress_analysis_data['outbound_links'] as $links) {
763
+ foreach ($links as $href => $link) {
764
+ $desc .= '<li><span class="dashicons dashicons-minus"></span><a href="'.$href.'" target="_blank">'.$link.'</a><span class="dashicons dashicons-external"></span></li>';
765
+ }
766
+ }
767
+ $desc .= '</ul>';
768
  } else {
769
+ $analyzes['outbound_links']['impact'] = 'medium';
770
+ $desc .= '<p><span class="dashicons dashicons-no-alt"></span>'.__('This page doesn\'t have any outbound links.','wp-seopress').'</p>';
771
  }
772
  $analyzes['outbound_links']['desc'] = $desc;
773
 
774
+ echo '<div id="seopress-analysis-tabs">
775
+ <div id="seopress-analysis-tabs-1">';
776
+ echo '<div class="analysis-score">';
777
+ $impact = array_unique(array_values(wp_list_pluck($analyzes, 'impact')));
778
+ $svg = '<svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
779
+ <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
780
+ <circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0" style="stroke-dashoffset: 101.788px;"></circle>
781
+ </svg>';
782
+ $tooltip = '<span class="sp-tooltip">
783
+ <span class="dashicons dashicons-editor-help"></span>
784
+ <span class="sp-tooltiptext">'.__('<strong>Should be improved:</strong> red or orange dots <br> <strong>Good:</strong> yellow or green dots','wp-seopress').'</span>
785
+ </span>';
786
+
787
+ if (!empty($impact)) {
788
+ if (in_array('medium', $impact) || in_array('high', $impact)) {
789
+ echo '<p class="notgood">'.$svg.'<span>'.__('Should be improved','wp-seopress').$tooltip.'</span></p>';
790
+ $score = false;
791
+ } else {
792
+ echo '<p class="good">'.$svg.'<span>'.__('Good','wp-seopress').$tooltip.'</span></p>';
793
+ $score = true;
794
+ }
795
+ } else {
796
+ $score = false;
797
+ }
798
+
799
+ if (!empty($seopress_analysis_data)) {
800
+ $seopress_analysis_data['score'] = $score;
801
+ update_post_meta(get_the_ID(), '_seopress_analysis_data', $seopress_analysis_data);
802
+ }
803
+ echo '<span><a href="#" id="expand-all">'.__('Expand','wp-seopress').'</a> / <a href="#" id="close-all">'.__('Close','wp-seopress').'</a></span>';
804
+ echo '</div>';
805
+
806
+ if(!empty($analyzes)) {
807
+ $order = array('1'=>'high','2'=>'medium','3'=>'low','4'=>'good');
808
+
809
+ usort($analyzes, function ($a, $b) use ($order) {
810
+ $pos_a = array_search($a['impact'], $order);
811
+ $pos_b = array_search($b['impact'], $order);
812
+ return $pos_a - $pos_b;
813
+ });
814
+
815
+ foreach($analyzes as $key => $value) {
816
+ echo '<div class="gr-analysis">';
817
+ if (isset($value['title'])) {
818
+ echo '<div class="gr-analysis-title">
819
+ <h3>
820
+ <button type="button" aria-expanded="true" class="btn-toggle">';
821
+ if (isset($value['impact'])) {
822
+ echo '<span class="impact '.$value['impact'].'" aria-hidden="true"></span>';
823
+ }
824
+ echo '<span class="sp-arrow" aria-hidden="true"></span>
825
+ '.$value['title'].'
826
+ </button>
827
+ </h3>
828
+ </div>';
829
+ }
830
+ if (isset($value['desc'])) {
831
+ echo '<div class="gr-analysis-content">';
832
+ echo $value['desc'];
833
+ echo '</div>';
834
+ }
835
+ echo '</div>';
836
+ }
837
+ }
838
+ echo '</div>';
839
+ echo '</div>
840
+ </div>';
inc/admin/admin-metaboxes-form.php CHANGED
@@ -9,6 +9,7 @@ $data_tax = '';
9
  if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
10
  $current_id = get_the_id();
11
  $origin = 'post';
 
12
 
13
  function seopress_titles_single_cpt_date_option() {
14
  global $post;
@@ -34,6 +35,7 @@ if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
34
  $current_id = $tag->term_id;
35
  $origin = 'term';
36
  $data_tax = $tag->taxonomy;
 
37
  }
38
 
39
  function seopress_redirections_value($seopress_redirections_value) {
@@ -55,7 +57,7 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
55
 
56
  if ("seopress_404" != $typenow) {
57
  $seo_tabs['title-tab'] = '<li><a href="#tabs-1"><span class="dashicons dashicons-editor-table"></span>'. __( 'Titles settings', 'wp-seopress' ) .'</a></li>';
58
- $seo_tabs['advanced-tab'] = '<li><a href="#tabs-2"><span class="dashicons dashicons-admin-generic"></span>'. __( 'Advanced', 'wp-seopress' ) .'</a></li>';
59
  $seo_tabs['social-tab'] = '<li><a href="#tabs-3"><span class="dashicons dashicons-share"></span>'. __( 'Social', 'wp-seopress' ) .'</a></li>';
60
  }
61
 
@@ -69,7 +71,7 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
69
  }
70
  }
71
  }
72
- if (function_exists('seopress_get_toggle_option') && seopress_get_toggle_option('xml-sitemap') =='1') {
73
  if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
74
  if ("seopress_404" != $typenow) {
75
  $seo_tabs['video-tab'] = '<li><a href="#tabs-6"><span class="dashicons dashicons-format-video"></span>'. __( 'Video Sitemap', 'wp-seopress' ) .'</a></li>';
@@ -288,16 +290,14 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
288
  </p>';
289
  }
290
 
291
- if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
292
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
293
- echo '<p>
294
- <label for="seopress_robots_breadcrumbs_meta">'. __( 'Custom breadcrumbs', 'wp-seopress' ) .'</label>
295
- <span class="description">'.__('Enter a custom value, useful if your title is too long','wp-seopress').'</span>
296
- </p>
297
- <p>
298
- <input id="seopress_robots_breadcrumbs_meta" type="text" name="seopress_robots_breadcrumbs" placeholder="'.esc_html(sprintf(__('Current breadcrumbs: %s','wp-seopress'),get_the_title($post))).'" aria-label="'.__('Custom breadcrumbs','wp-seopress').'" value="'.$seopress_robots_breadcrumbs.'" />
299
- </p>';
300
- }
301
  }
302
  echo '</div>';
303
  }
@@ -329,13 +329,14 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
329
  if(seopress_get_toggle_option('social')=='1') {
330
  echo '<p>'.__('This is what your post will look like in Facebook. You have to publish your post to get the Facebook Preview.','wp-seopress').'</p>';
331
  } else {
332
- echo '<p><span class="dashicons dashicons-warning"></span>'.__('The Social Networks feature is disabled. Still seing informations from the FB Preview? You probably have social tags added by your theme or a plugin.','wp-seopress').'</p>';
333
  }
334
  echo '<div class="facebook-snippet-box">
335
  <div class="snippet-fb-img-alert alert1" style="display:none"><p class="notice notice-error">'.__('File type not supported by Facebook. Please choose another image.', 'wp-seopress').'</p></div>
336
  <div class="snippet-fb-img-alert alert2" style="display:none"><p class="notice notice-error">'.__('Minimun size for Facebook is <strong>200x200px</strong>. Please choose another image.', 'wp-seopress').'</p></div>
337
  <div class="snippet-fb-img-alert alert3" style="display:none"><p class="notice notice-error">'.__('File error. Please choose another image.', 'wp-seopress').'</p></div>
338
  <div class="snippet-fb-img-alert alert4" style="display:none"><p class="notice notice-info">'.__('Your image ratio is: ', 'wp-seopress').'<span></span>. '.__('The closer to 1.91 the better.','wp-seopress').'</p></div>
 
339
  <div class="snippet-fb-img"><img src="" width="524" height="274" alt="" aria-label=""/></div>
340
  <div class="snippet-fb-img-custom" style="display:none"><img src="" width="524" height="274" alt="" aria-label=""/></div>
341
  <div class="snippet-fb-img-default" style="display:none"><img src="" width="524" height="274" alt="" aria-label=""/></div>
@@ -398,6 +399,7 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
398
  <div class="snippet-twitter-img-alert alert2" style="display:none"><p class="notice notice-error">'.__('Minimun size for Twitter is <strong>144x144px</strong>. Please choose another image.', 'wp-seopress').'</p></div>
399
  <div class="snippet-twitter-img-alert alert3" style="display:none"><p class="notice notice-error">'.__('File error. Please choose another image.', 'wp-seopress').'</p></div>
400
  <div class="snippet-twitter-img-alert alert4" style="display:none"><p class="notice notice-info">'.__('Your image ratio is: ', 'wp-seopress').'<span></span>. '.__('The closer to 1 the better (with large card, 2 is better).','wp-seopress').'</p></div>
 
401
  <div class="snippet-twitter-img"><img src="" width="524" height="274" alt="" aria-label=""/></div>
402
  <div class="snippet-twitter-img-custom" style="display:none"><img src="" width="600" height="314" alt="" aria-label=""/></div>
403
  <div class="snippet-twitter-img-default" style="display:none"><img src="" width="600" height="314" alt="" aria-label=""/></div>
@@ -456,7 +458,7 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
456
  <option ' . selected( 'with_ignored_param', $seopress_redirections_param, false ) . ' value="with_ignored_param">'. __( 'Exclude all parameters and pass them to the redirection', 'wp-seopress' ) .'</option>
457
  </select></p>';
458
  }
459
- echo '<p>';
460
  if ($seopress_redirections_enabled =='yes') {
461
  $status_code = array('410','451');
462
  if ($seopress_redirections_value !='' || in_array($seopress_redirections_type, $status_code)) {
@@ -505,7 +507,7 @@ echo '<div id="seopress-tabs" data_id="'.$current_id.'" data_origin="'.$origin.'
505
  }
506
  }
507
  }
508
- if (function_exists('seopress_get_toggle_option') && seopress_get_toggle_option('xml-sitemap') =='1') {
509
  if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
510
  if ("seopress_404" != $typenow) {
511
 
9
  if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
10
  $current_id = get_the_id();
11
  $origin = 'post';
12
+ $title = get_the_title($current_id);
13
 
14
  function seopress_titles_single_cpt_date_option() {
15
  global $post;
35
  $current_id = $tag->term_id;
36
  $origin = 'term';
37
  $data_tax = $tag->taxonomy;
38
+ $title = $tag->name;
39
  }
40
 
41
  function seopress_redirections_value($seopress_redirections_value) {
57
 
58
  if ("seopress_404" != $typenow) {
59
  $seo_tabs['title-tab'] = '<li><a href="#tabs-1"><span class="dashicons dashicons-editor-table"></span>'. __( 'Titles settings', 'wp-seopress' ) .'</a></li>';
60
+ $seo_tabs['advanced-tab'] = '<li><a href="#tabs-2"><span class="dashicons dashicons-admin-generic"></span>'. __( 'Advanced', 'wp-seopress' ) .'<span id="sp-advanced-alert"></span></a></li>';
61
  $seo_tabs['social-tab'] = '<li><a href="#tabs-3"><span class="dashicons dashicons-share"></span>'. __( 'Social', 'wp-seopress' ) .'</a></li>';
62
  }
63
 
71
  }
72
  }
73
  }
74
+ if (function_exists('seopress_get_toggle_option') && seopress_get_toggle_option('xml-sitemap') =='1' && seopress_xml_sitemap_video_enable_option() =='1') {
75
  if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
76
  if ("seopress_404" != $typenow) {
77
  $seo_tabs['video-tab'] = '<li><a href="#tabs-6"><span class="dashicons dashicons-format-video"></span>'. __( 'Video Sitemap', 'wp-seopress' ) .'</a></li>';
290
  </p>';
291
  }
292
 
293
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
294
+ echo '<p>
295
+ <label for="seopress_robots_breadcrumbs_meta">'. __( 'Custom breadcrumbs', 'wp-seopress' ) .'</label>
296
+ <span class="description">'.__('Enter a custom value, useful if your title is too long','wp-seopress').'</span>
297
+ </p>
298
+ <p>
299
+ <input id="seopress_robots_breadcrumbs_meta" type="text" name="seopress_robots_breadcrumbs" placeholder="'.esc_html(sprintf(__('Current breadcrumbs: %s','wp-seopress'),$title)).'" aria-label="'.__('Custom breadcrumbs','wp-seopress').'" value="'.$seopress_robots_breadcrumbs.'" />
300
+ </p>';
 
 
301
  }
302
  echo '</div>';
303
  }
329
  if(seopress_get_toggle_option('social')=='1') {
330
  echo '<p>'.__('This is what your post will look like in Facebook. You have to publish your post to get the Facebook Preview.','wp-seopress').'</p>';
331
  } else {
332
+ echo '<p class="notice notice-error" style="margin: 0 0 1rem 0">'.__('The Social Networks feature is disabled. Still seing informations from the FB Preview? You probably have social tags added by your theme or a plugin.','wp-seopress').'</p>';
333
  }
334
  echo '<div class="facebook-snippet-box">
335
  <div class="snippet-fb-img-alert alert1" style="display:none"><p class="notice notice-error">'.__('File type not supported by Facebook. Please choose another image.', 'wp-seopress').'</p></div>
336
  <div class="snippet-fb-img-alert alert2" style="display:none"><p class="notice notice-error">'.__('Minimun size for Facebook is <strong>200x200px</strong>. Please choose another image.', 'wp-seopress').'</p></div>
337
  <div class="snippet-fb-img-alert alert3" style="display:none"><p class="notice notice-error">'.__('File error. Please choose another image.', 'wp-seopress').'</p></div>
338
  <div class="snippet-fb-img-alert alert4" style="display:none"><p class="notice notice-info">'.__('Your image ratio is: ', 'wp-seopress').'<span></span>. '.__('The closer to 1.91 the better.','wp-seopress').'</p></div>
339
+ <div class="snippet-fb-img-alert alert5" style="display:none"><p class="notice notice-error">'.__('File URL is not valid.', 'wp-seopress').'</p></div>
340
  <div class="snippet-fb-img"><img src="" width="524" height="274" alt="" aria-label=""/></div>
341
  <div class="snippet-fb-img-custom" style="display:none"><img src="" width="524" height="274" alt="" aria-label=""/></div>
342
  <div class="snippet-fb-img-default" style="display:none"><img src="" width="524" height="274" alt="" aria-label=""/></div>
399
  <div class="snippet-twitter-img-alert alert2" style="display:none"><p class="notice notice-error">'.__('Minimun size for Twitter is <strong>144x144px</strong>. Please choose another image.', 'wp-seopress').'</p></div>
400
  <div class="snippet-twitter-img-alert alert3" style="display:none"><p class="notice notice-error">'.__('File error. Please choose another image.', 'wp-seopress').'</p></div>
401
  <div class="snippet-twitter-img-alert alert4" style="display:none"><p class="notice notice-info">'.__('Your image ratio is: ', 'wp-seopress').'<span></span>. '.__('The closer to 1 the better (with large card, 2 is better).','wp-seopress').'</p></div>
402
+ <div class="snippet-twitter-img-alert alert5" style="display:none"><p class="notice notice-error">'.__('File URL is not valid.', 'wp-seopress').'</p></div>
403
  <div class="snippet-twitter-img"><img src="" width="524" height="274" alt="" aria-label=""/></div>
404
  <div class="snippet-twitter-img-custom" style="display:none"><img src="" width="600" height="314" alt="" aria-label=""/></div>
405
  <div class="snippet-twitter-img-default" style="display:none"><img src="" width="600" height="314" alt="" aria-label=""/></div>
458
  <option ' . selected( 'with_ignored_param', $seopress_redirections_param, false ) . ' value="with_ignored_param">'. __( 'Exclude all parameters and pass them to the redirection', 'wp-seopress' ) .'</option>
459
  </select></p>';
460
  }
461
+ echo '<p>';
462
  if ($seopress_redirections_enabled =='yes') {
463
  $status_code = array('410','451');
464
  if ($seopress_redirections_value !='' || in_array($seopress_redirections_type, $status_code)) {
507
  }
508
  }
509
  }
510
+ if (function_exists('seopress_get_toggle_option') && seopress_get_toggle_option('xml-sitemap') =='1' && seopress_xml_sitemap_video_enable_option() =='1') {
511
  if ( $pagenow == 'post-new.php' || $pagenow == 'post.php' ) {
512
  if ("seopress_404" != $typenow) {
513
 
inc/admin/admin-notifications-center.php CHANGED
@@ -179,6 +179,7 @@
179
  'seo-by-rank-math/rank-math.php' => 'Rank Math',
180
  'seo-ultimate/seo-ultimate.php' => 'SEO Ultimate',
181
  'wp-meta-seo/wp-meta-seo.php' => 'WP Meta SEO',
 
182
  );
183
 
184
  foreach($seo_plugins as $key => $value) {
@@ -233,7 +234,7 @@
233
  'low' => __('Low impact','wp-seopress')
234
  ],
235
  'link' => [
236
- 'en' => 'https://www.namecheap.com/?aff=105841',
237
  'title' => __('Buy an SSL!','wp-seopress'),
238
  'external' => true
239
  ],
179
  'seo-by-rank-math/rank-math.php' => 'Rank Math',
180
  'seo-ultimate/seo-ultimate.php' => 'SEO Ultimate',
181
  'wp-meta-seo/wp-meta-seo.php' => 'WP Meta SEO',
182
+ 'premium-seo-pack/plugin.php' => 'Premium SEO Pack',
183
  );
184
 
185
  foreach($seo_plugins as $key => $value) {
234
  'low' => __('Low impact','wp-seopress')
235
  ],
236
  'link' => [
237
+ 'en' => 'https://www.seopress.org/go/namecheap',
238
  'title' => __('Buy an SSL!','wp-seopress'),
239
  'external' => true
240
  ],
inc/admin/admin-term-metaboxes.php CHANGED
@@ -262,6 +262,9 @@ function seopress_display_seo_term_metaboxe() {
262
  }
263
 
264
  $seopress_robots_canonical = get_term_meta($term->term_id,'_seopress_robots_canonical',true);
 
 
 
265
  $seopress_social_fb_title = get_term_meta($term->term_id,'_seopress_social_fb_title',true);
266
  $seopress_social_fb_desc = get_term_meta($term->term_id,'_seopress_social_fb_desc',true);
267
  $seopress_social_fb_img = get_term_meta($term->term_id,'_seopress_social_fb_img',true);
@@ -329,6 +332,11 @@ function seopress_display_seo_term_metaboxe() {
329
  } else {
330
  delete_term_meta( $term_id, '_seopress_robots_snippet', '' );
331
  }
 
 
 
 
 
332
  if(isset($_POST['seopress_robots_canonical'])){
333
  update_term_meta($term_id, '_seopress_robots_canonical', esc_html($_POST['seopress_robots_canonical']));
334
  }
262
  }
263
 
264
  $seopress_robots_canonical = get_term_meta($term->term_id,'_seopress_robots_canonical',true);
265
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
266
+ $seopress_robots_breadcrumbs = get_term_meta($term->term_id,'_seopress_robots_breadcrumbs',true);
267
+ }
268
  $seopress_social_fb_title = get_term_meta($term->term_id,'_seopress_social_fb_title',true);
269
  $seopress_social_fb_desc = get_term_meta($term->term_id,'_seopress_social_fb_desc',true);
270
  $seopress_social_fb_img = get_term_meta($term->term_id,'_seopress_social_fb_img',true);
332
  } else {
333
  delete_term_meta( $term_id, '_seopress_robots_snippet', '' );
334
  }
335
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
336
+ if(isset($_POST['seopress_robots_breadcrumbs'])){
337
+ update_term_meta($term_id, '_seopress_robots_breadcrumbs', esc_html($_POST['seopress_robots_breadcrumbs']));
338
+ }
339
+ }
340
  if(isset($_POST['seopress_robots_canonical'])){
341
  update_term_meta($term_id, '_seopress_robots_canonical', esc_html($_POST['seopress_robots_canonical']));
342
  }
inc/admin/admin-wizard.php CHANGED
@@ -88,6 +88,10 @@ class SEOPRESS_Admin_Setup_Wizard {
88
  'seopress_nonce' => wp_create_nonce('seopress_meta_seo_migrate_nonce'),
89
  'seopress_wp_meta_seo_migration' => admin_url( 'admin-ajax.php'),
90
  ],
 
 
 
 
91
  'seopress_metadata_csv' => [
92
  'seopress_nonce' => wp_create_nonce('seopress_export_csv_metadata_nonce'),
93
  'seopress_metadata_export' => admin_url( 'admin-ajax.php'),
@@ -409,6 +413,24 @@ class SEOPRESS_Admin_Setup_Wizard {
409
  <span class="spinner"></span>
410
  <div class="log"></div>
411
  </div><!-- .postbox -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  </div>
413
 
414
  <p class="seopress-setup-actions step">
88
  'seopress_nonce' => wp_create_nonce('seopress_meta_seo_migrate_nonce'),
89
  'seopress_wp_meta_seo_migration' => admin_url( 'admin-ajax.php'),
90
  ],
91
+ 'seopress_premium_seo_pack_migrate' => [
92
+ 'seopress_nonce' => wp_create_nonce('seopress_premium_seo_pack_migrate_nonce'),
93
+ 'seopress_premium_seo_pack_migration' => admin_url( 'admin-ajax.php'),
94
+ ],
95
  'seopress_metadata_csv' => [
96
  'seopress_nonce' => wp_create_nonce('seopress_export_csv_metadata_nonce'),
97
  'seopress_metadata_export' => admin_url( 'admin-ajax.php'),
413
  <span class="spinner"></span>
414
  <div class="log"></div>
415
  </div><!-- .postbox -->
416
+
417
+ <!-- Premium SEO Pack import tool -->
418
+ <div id="premium-seo-pack-migration-tool" class="postbox section-tool seopress-wizard-services">
419
+ <h3><span><?php _e( 'Import posts and terms metadata from Premium SEO Pack', 'wp-seopress' ); ?></span></h3>
420
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
421
+ <ul>
422
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
423
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
424
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
425
+ <li><?php _e('Meta Robots (noindex, nofollow)','wp-seopress'); ?></li>
426
+ <li><?php _e('Canonical URL','wp-seopress'); ?></li>
427
+ <li><?php _e('Focus keywords','wp-seopress'); ?></li>
428
+ </ul>
429
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any Premium SEO Pack data.', 'wp-seopress' ); ?></p>
430
+ <button id="seopress-premium-seo-pack-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
431
+ <span class="spinner"></span>
432
+ <div class="log"></div>
433
+ </div><!-- .postbox -->
434
  </div>
435
 
436
  <p class="seopress-setup-actions step">
inc/admin/admin.php CHANGED
@@ -4,6418 +4,6213 @@ defined( 'ABSPATH' ) or die( 'Please don&rsquo;t call the plugin directly. Thank
4
 
5
  class seopress_options
6
  {
7
- /**
8
- * Holds the values to be used in the fields callbacks
9
- */
10
- private $options;
11
-
12
- /**
13
- * Start up
14
- */
15
- public function __construct() {
16
- add_action( 'admin_menu', array( $this, 'add_plugin_page' ), 10 );
17
- add_action( 'admin_init', array( $this, 'set_default_values' ), 10 );
18
- add_action( 'admin_init', array( $this, 'page_init' ) );
19
- }
20
-
21
- public function activate() {
22
- update_option($this->seopress_options, $this->data);
23
- }
24
-
25
- public function deactivate() {
26
- delete_option($this->seopress_options);
27
- }
28
-
29
- public function set_default_values() {
30
-
31
- //Enable features==========================================================================
32
- $seopress_toggle_options = get_option('seopress_toggle');
33
-
34
- $seopress_toggle_options['toggle-titles'] = '1';
35
- $seopress_toggle_options['toggle-xml-sitemap'] = '1';
36
- $seopress_toggle_options['toggle-social'] = '1';
37
- $seopress_toggle_options['toggle-google-analytics'] = '1';
38
- $seopress_toggle_options['toggle-advanced'] = '1';
39
- if ( is_plugin_active( 'woocommerce/woocommerce.php' )) {
40
- $seopress_toggle_options['toggle-woocommerce'] = '1';
41
- }
42
- $seopress_toggle_options['toggle-dublin-core'] = '1';
43
- $seopress_toggle_options['toggle-local-business'] = '1';
44
- $seopress_toggle_options['toggle-rich-snippets'] = '1';
45
- $seopress_toggle_options['toggle-breadcrumbs'] = '1';
46
- $seopress_toggle_options['toggle-robots'] = '1';
47
- $seopress_toggle_options['toggle-404'] = '1';
48
- $seopress_toggle_options['toggle-bot'] = '1';
49
-
50
- add_option('seopress_toggle', $seopress_toggle_options);
51
-
52
- //Titles & metas===========================================================================
53
- $seopress_titles_options = get_option('seopress_titles_option_name');
54
-
55
- //Site Title
56
- $seopress_titles_options['seopress_titles_home_site_title'] = '%%sitetitle%%';
57
-
58
- //Meta Description
59
- $seopress_titles_options['seopress_titles_home_site_desc'] = '%%tagline%%';
60
-
61
- //Post Types
62
- if (function_exists('seopress_get_post_types') && !empty(seopress_get_post_types())) {
63
- foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
64
- $seopress_titles_options['seopress_titles_single_titles'][$seopress_cpt_key]['title'] = '%%post_title%% %%sep%% %%sitetitle%%';
65
- $seopress_titles_options['seopress_titles_single_titles'][$seopress_cpt_key]['description'] = '%%post_excerpt%%';
66
- }
67
- }
68
-
69
- //Taxonomies
70
- if (function_exists('seopress_get_taxonomies') && !empty(seopress_get_taxonomies())) {
71
- foreach (seopress_get_taxonomies() as $seopress_tax_key => $seopress_tax_value) {
72
- //Title
73
- if ($seopress_tax_key =='category') {
74
- $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] = '%%_category_title%% %%current_pagination%% %%sep%% %%sitetitle%%';
75
- } elseif ($seopress_tax_key =='post_tag') {
76
- $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] = '%%tag_title%% %%current_pagination%% %%sep%% %%sitetitle%%';
77
- } else {
78
- $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] = '%%term_title%% %%current_pagination%% %%sep%% %%sitetitle%%';
79
- }
80
-
81
- //Desc
82
- if ($seopress_tax_key =='category') {
83
- $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] = '%%_category_description%%';
84
- } elseif ($seopress_tax_key =='post_tag') {
85
- $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] = '%%tag_description%%';
86
- } else {
87
- $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] = '%%term_description%%';
88
- }
89
- }
90
- }
91
-
92
- //Archives
93
- if (function_exists('seopress_get_post_types') && !empty(seopress_get_post_types())) {
94
- foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
95
- $seopress_titles_options['seopress_titles_archive_titles'][$seopress_cpt_key]['title'] = '%%cpt_plural%% %%current_pagination%% %%sep%% %%sitetitle%%';
96
- }
97
- }
98
-
99
- //Author
100
- $seopress_titles_options['seopress_titles_archives_author_title'] = '%%post_author%% %%sep%% %%sitetitle%%';
101
- $seopress_titles_options['seopress_titles_archives_author_noindex'] = '1';
102
-
103
- //Date
104
- $seopress_titles_options['seopress_titles_archives_date_title'] = '%%archive_date%% %%sep%% %%sitetitle%%';
105
- $seopress_titles_options['seopress_titles_archives_date_noindex'] = '1';
106
-
107
- //Search
108
- $seopress_titles_options['seopress_titles_archives_search_title'] = '%%search_keywords%% %%sep%% %%sitetitle%%';
109
-
110
- //404
111
- $seopress_titles_options['seopress_titles_archives_404_title'] = __('404 - Page not found','wp-seopress').' %%sep%% %%sitetitle%%';
112
-
113
- //Link rel prev/next
114
- $seopress_titles_options['seopress_titles_paged_rel'] = '1';
115
-
116
- add_option('seopress_titles_option_name', $seopress_titles_options);
117
-
118
- //XML Sitemap==============================================================================
119
- $seopress_xml_sitemap_options = get_option('seopress_xml_sitemap_option_name');
120
-
121
- $seopress_xml_sitemap_options['seopress_xml_sitemap_general_enable'] = '1';
122
- $seopress_xml_sitemap_options['seopress_xml_sitemap_img_enable'] = '1';
123
 
124
- global $wp_post_types;
125
-
126
- $args = array(
127
- 'show_ui' => true,
128
- );
129
-
130
- $output = 'objects'; // names or objects, note names is the default
131
- $operator = 'and'; // 'and' or 'or'
132
-
133
- $post_types = get_post_types( $args, $output, $operator );
134
-
135
- foreach ($post_types as $seopress_cpt_key => $seopress_cpt_value) {
136
- if ($seopress_cpt_key =='post' || $seopress_cpt_key =='page' || $seopress_cpt_key =='product') {
137
- $seopress_xml_sitemap_options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include'] = '1';
138
- }
139
- }
140
-
141
- $args = array(
142
- 'show_ui' => true,
143
- 'public' => true,
144
-
145
- );
146
- $output = 'objects'; // or objects
147
- $operator = 'and'; // 'and' or 'or'
148
- $taxonomies = get_taxonomies( $args, $output, $operator );
149
-
150
- foreach ($taxonomies as $seopress_tax_key => $seopress_tax_value) {
151
- if ($seopress_tax_key =='category' || $seopress_tax_key =='post_tag') {
152
- $seopress_xml_sitemap_options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include'] = '1';
153
- }
154
- }
155
-
156
- add_option('seopress_xml_sitemap_option_name', $seopress_xml_sitemap_options);
157
-
158
- //Social===================================================================================
159
- $seopress_social_options = get_option('seopress_social_option_name');
160
-
161
- $seopress_social_options['seopress_social_facebook_og'] = '1';
162
- $seopress_social_options['seopress_social_twitter_card'] = '1';
163
-
164
- add_option('seopress_social_option_name', $seopress_social_options);
165
-
166
- //Advanced=================================================================================
167
- $seopress_advanced_option_name = get_option('seopress_advanced_option_name');
168
-
169
- $seopress_advanced_option_name['seopress_advanced_advanced_attachments'] = '1';
170
- $seopress_advanced_option_name['seopress_advanced_advanced_tax_desc_editor'] = '1';
171
- $seopress_advanced_option_name['seopress_advanced_appearance_title_col'] = '1';
172
- $seopress_advanced_option_name['seopress_advanced_appearance_meta_desc_col'] = '1';
173
-
174
- add_option('seopress_advanced_option_name', $seopress_advanced_option_name);
175
- }
176
-
177
- /**
178
- * Add options page
179
- */
180
- public function add_plugin_page()
181
- {
182
- if (has_filter('seopress_seo_admin_menu')) {
183
- $sp_seo_admin_menu['icon'] = '';
184
- $sp_seo_admin_menu['icon'] = apply_filters('seopress_seo_admin_menu', $sp_seo_admin_menu['icon']);
185
- } else {
186
- $sp_seo_admin_menu['icon'] = 'dashicons-admin-seopress';
187
- }
188
-
189
- add_menu_page('SEOPress Option Page', __('SEO','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-option', array( $this, 'create_admin_page' ), $sp_seo_admin_menu['icon'], 90);
190
- add_submenu_page('seopress-option', __('Dashboard','wp-seopress'), __('Dashboard','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-option', array( $this, 'create_admin_page' ));
191
- $seopress_titles_help_tab = add_submenu_page('seopress-option', __('Titles & Metas','wp-seopress'), __('Titles & Metas','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-titles', array( $this, 'seopress_titles_page' ));
192
- add_submenu_page('seopress-option', __('XML / Image / Video / HTML Sitemap','wp-seopress'), __('XML / HTML Sitemap','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-xml-sitemap', array( $this, 'seopress_xml_sitemap_page' ));
193
- add_submenu_page('seopress-option', __('Social Networks','wp-seopress'), __('Social Networks','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-social', array( $this, 'seopress_social_page' ));
194
- $seopress_google_analytics_help_tab = add_submenu_page('seopress-option', __('Analytics','wp-seopress'), __('Analytics','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-google-analytics', array( $this, 'seopress_google_analytics_page' ));
195
- add_submenu_page('seopress-option', __('Advanced','wp-seopress'), __('Advanced','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-advanced', array( $this, 'seopress_advanced_page' ));
196
- add_submenu_page('seopress-option', __('Tools','wp-seopress'), __('Tools','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-import-export', array( $this,'seopress_import_export_page'));
197
-
198
- function seopress_titles_help_tab() {
199
- $screen = get_current_screen();
200
-
201
- $seopress_titles_help_tab_content = '
202
- <ul>
203
- <li><span>'.__('%%sep%%','wp-seopress').'</span>'.__('Separator (eg: - )','wp-seopress').'</li>
204
- <li><span>'.__('%%sitetitle%% (alias: %%sitename%%)','wp-seopress').'</span>'.__('Site Title','wp-seopress').'</li>
205
- <li><span>'.__('%%tagline%% (alias %%sitedesc%%)','wp-seopress').'</span>'.__('Tagline','wp-seopress').'</li>
206
- <li><span>'.__('%%post_title%% (alias %%title%%)','wp-seopress').'</span>'.__('Post Title (post, page, custom post type)','wp-seopress').'</li>
207
- <li><span>'.__('%%post_excerpt%% (alias %%excerpt%%)','wp-seopress').'</span>'.__('Post excerpt','wp-seopress').'</li>
208
- <li><span>'.__('%%post_content%%','wp-seopress').'</span>'.__('Post content / product long description','wp-seopress').'</li>
209
- <li><span>'.__('%%post_thumbnail_url%%','wp-seopress').'</span>'.__('Post thumbnail URL','wp-seopress').'</li>
210
- <li><span>'.__('%%post_date%% (alias %%date%%)','wp-seopress').'</span>'.__('Post date','wp-seopress').'</li>
211
- <li><span>'.__('%%post_modified_date%%','wp-seopress').'</span>'.__('Last modified post date','wp-seopress').'</li>
212
- <li><span>'.__('%%post_author%%','wp-seopress').'</span>'.__('Post author','wp-seopress').'</li>
213
- <li><span>'.__('%%post_category%%','wp-seopress').'</span>'.__('Post category','wp-seopress').'</li>
214
- <li><span>'.__('%%post_tag%%','wp-seopress').'</span>'.__('Post tag','wp-seopress').'</li>
215
- <li><span>'.__('%%_category_title%%','wp-seopress').'</span>'.__('Category title','wp-seopress').'</li>
216
- <li><span>'.__('%%_category_description%%','wp-seopress').'</span>'.__('Category description','wp-seopress').'</li>
217
- <li><span>'.__('%%tag_title%%','wp-seopress').'</span>'.__('Tag title','wp-seopress').'</li>
218
- <li><span>'.__('%%tag_description%%','wp-seopress').'</span>'.__('Tag description','wp-seopress').'</li>
219
- <li><span>'.__('%%term_title%%','wp-seopress').'</span>'.__('Term title','wp-seopress').'</li>
220
- <li><span>'.__('%%term_description%%','wp-seopress').'</span>'.__('Term description','wp-seopress').'</li>
221
- <li><span>'.__('%%search_keywords%%','wp-seopress').'</span>'.__('Search keywords','wp-seopress').'</li>
222
- <li><span>'.__('%%current_pagination%%','wp-seopress').'</span>'.__('Current number page','wp-seopress').'</li>
223
- <li><span>'.__('%%page%%','wp-seopress').'</span>'.__('Current page number with context (i.e. page 1 of 3)','wp-seopress').'</li>
224
- <li><span>'.__('%%cpt_plural%%','wp-seopress').'</span>'.__('Plural Post Type Archive name','wp-seopress').'</li>
225
- <li><span>'.__('%%archive_title%%','wp-seopress').'</span>'.__('Archive title','wp-seopress').'</li>
226
- <li><span>'.__('%%archive_date%%','wp-seopress').'</span>'.__('Date Archive','wp-seopress').'</li>
227
- <li><span>'.__('%%archive_date_day%%','wp-seopress').'</span>'.__('Day Archive date','wp-seopress').'</li>
228
- <li><span>'.__('%%archive_date_month%%','wp-seopress').'</span>'.__('Month Archive title','wp-seopress').'</li>
229
- <li><span>'.__('%%archive_date_year%%','wp-seopress').'</span>'.__('Year Archive title','wp-seopress').'</li>
230
- <li><span>'.__('%%_cf_your_custom_field_name%%','wp-seopress').'</span>'.__('Custom fields from post, page or post type (replace <span style="color:red;margin:0">your_custom_field_name</span> with your custom field name)','wp-seopress').'</li>
231
- <li><span>'.__('%%_ct_your_custom_taxonomy_slug%%','wp-seopress').'</span>'.__('Custom term taxonomy from post, page or post type (replace <span style="color:red;margin:0">your_custom_taxonomy_slug</span> with your custom taxonomy slug)','wp-seopress').'</li>
232
- <li><span>'.__('%%wc_single_cat%%','wp-seopress').'</span>'.__('Single product category','wp-seopress').'</li>
233
- <li><span>'.__('%%wc_single_tag%%','wp-seopress').'</span>'.__('Single product tag','wp-seopress').'</li>
234
- <li><span>'.__('%%wc_single_short_desc%%','wp-seopress').'</span>'.__('Single product short description','wp-seopress').'</li>
235
- <li><span>'.__('%%wc_single_price%%','wp-seopress').'</span>'.__('Single product price','wp-seopress').'</li>
236
- <li><span>'.__('%%wc_single_price_exc_tax%%','wp-seopress').'</span>'.__('Single product price taxes excluded','wp-seopress').'</li>
237
- <li><span>'.__('%%wc_sku%%','wp-seopress').'</span>'.__('Single SKU product','wp-seopress').'</li>
238
- <li><span>'.__('%%currentday%%','wp-seopress').'</span>'.__('Current day','wp-seopress').'</li>
239
- <li><span>'.__('%%currentmonth%%','wp-seopress').'</span>'.__('Current month','wp-seopress').'</li>
240
- <li><span>'.__('%%currentmonth_short%%','wp-seopress').'</span>'.__('Current month in 3 letters, eg: "Jan" for "January"','wp-seopress').'</li>
241
- <li><span>'.__('%%currentyear%%','wp-seopress').'</span>'.__('Current year','wp-seopress').'</li>
242
- <li><span>'.__('%%currentdate%%','wp-seopress').'</span>'.__('Current date','wp-seopress').'</li>
243
- <li><span>'.__('%%currenttime%%','wp-seopress').'</span>'.__('Current time','wp-seopress').'</li>
244
- <li><span>'.__('%%author_bio%%','wp-seopress').'</span>'.__('Author bio, meta desc only','wp-seopress').'</li>
245
- </ul>
246
- '.wp_oembed_get('https://www.youtube.com/watch?v=HEa8m9u4mOk', array('width'=>530));
247
-
248
- $screen->add_help_tab( array(
249
- 'id' => 'seopress_titles_help_tab',
250
- 'title' => __('Templates variables'),
251
- 'content' => $seopress_titles_help_tab_content,
252
- ));
253
-
254
- if (function_exists('seopress_get_locale')) {
255
- if (seopress_get_locale() =='fr') {
256
- $screen->set_help_sidebar(
257
- '<ul>
258
- <li><a href="https://www.seopress.org/fr/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Browse our guides","wp-seopress").'</a></li>
259
- <li><a href="https://www.seopress.org/fr/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our FAQ","wp-seopress").'</a></li>
260
- <li><a href="https://www.seopress.org/fr/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Check our website","wp-seopress").'</a></li>
261
- </ul>'
262
- );
263
- } else {
264
- $screen->set_help_sidebar(
265
- '<ul>
266
- <li><a href="https://www.seopress.org/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Browse our guides","wp-seopress").'</a></li>
267
- <li><a href="https://www.seopress.org/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our FAQ","wp-seopress").'</a></li>
268
- <li><a href="https://www.seopress.org/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Check our website","wp-seopress").'</a></li>
269
- </ul>'
270
- );
271
- }
272
- }
273
- }
274
- add_action('load-'.$seopress_titles_help_tab, 'seopress_titles_help_tab');
275
-
276
- function seopress_google_analytics_help_tab() {
277
- $screen = get_current_screen();
278
-
279
- $seopress_google_analytics_help_tab_content = '
280
- <p>'.__('Watch our video to learn how to connect your WordPress site with Google Analytics and get statistics right in your dashboard (PRO only).','wp-seopress').'</p>
281
- '.wp_oembed_get('https://www.youtube.com/watch?v=NKvjb9Z571c', array('width'=>530));
282
-
283
- $screen->add_help_tab( array(
284
- 'id' => 'seopress_google_analytics_help_tab',
285
- 'title' => __('How-to'),
286
- 'content' => $seopress_google_analytics_help_tab_content,
287
- ));
288
-
289
- if (function_exists('seopress_get_locale')) {
290
- if (seopress_get_locale() =='fr') {
291
- $screen->set_help_sidebar(
292
- '<ul>
293
- <li><a href="https://www.seopress.org/fr/support/guides/connectez-site-wordpress-a-google-analytics/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our guide","wp-seopress").'</a></li>
294
- </ul>'
295
- );
296
- } else {
297
- $screen->set_help_sidebar(
298
- '<ul>
299
- <li><a href="https://www.seopress.org/support/guides/connect-wordpress-site-google-analytics/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our guide","wp-seopress").'</a></li>
300
- </ul>'
301
- );
302
- }
303
- }
304
- }
305
- add_action('load-'.$seopress_google_analytics_help_tab, 'seopress_google_analytics_help_tab');
306
- }
307
-
308
-
309
- function seopress_titles_page(){
310
- $this->options = get_option( 'seopress_titles_option_name' );
311
- if (function_exists('seopress_admin_header')) {
312
- echo seopress_admin_header();
313
- }
314
- ?>
315
- <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
316
- <?php
317
- global $wp_version, $title;
318
- $current_tab = '';
319
- $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
320
- echo '<'.$tag.'><span class="dashicons dashicons-editor-table"></span>'.$title;
321
-
322
- if(seopress_get_toggle_option('titles')=='1') {
323
- $seopress_get_toggle_titles_option = '"1"';
324
- } else {
325
- $seopress_get_toggle_titles_option = '"0"';
326
- }
327
- ?>
328
-
329
- <input type="checkbox" name="toggle-titles" id="toggle-titles" class="toggle" data-toggle=<?php echo $seopress_get_toggle_titles_option; ?>>
330
- <label for="toggle-titles"></label>
331
-
332
- <?php
333
- if(seopress_get_toggle_option('titles')=='1') {
334
- echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
335
- echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
336
- } else {
337
- echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
338
- echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
339
- }
340
-
341
- echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
342
-
343
- echo '</'.$tag.'>';
344
-
345
- settings_fields( 'seopress_titles_option_group' );
346
- ?>
347
-
348
- <div id="seopress-tabs" class="wrap">
349
- <?php
350
-
351
- $plugin_settings_tabs = array(
352
- 'tab_seopress_titles_home' => __( "Home", "wp-seopress" ),
353
- 'tab_seopress_titles_single' => __( "Single Post Types", "wp-seopress" ),
354
- 'tab_seopress_titles_archives' => __( "Archives", "wp-seopress" ),
355
- 'tab_seopress_titles_tax' => __( "Taxonomies", "wp-seopress" ),
356
- 'tab_seopress_titles_advanced' => __( "Advanced", "wp-seopress" ),
357
- );
358
-
359
- echo '<div class="nav-tab-wrapper">';
360
- foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
361
- echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-titles#tab=' . $tab_key . '">' . $tab_caption . '</a>';
362
- }
363
- echo '</div>';
364
- ?>
365
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_home') { echo 'active'; } ?>" id="tab_seopress_titles_home"><?php do_settings_sections( 'seopress-settings-admin-titles-home' ); ?></div>
366
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_single') { echo 'active'; } ?>" id="tab_seopress_titles_single"><?php do_settings_sections( 'seopress-settings-admin-titles-single' ); ?></div>
367
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_archives') { echo 'active'; } ?>" id="tab_seopress_titles_archives"><?php do_settings_sections( 'seopress-settings-admin-titles-archives' ); ?></div>
368
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_tax') { echo 'active'; } ?>" id="tab_seopress_titles_tax"><?php do_settings_sections( 'seopress-settings-admin-titles-tax' ); ?></div>
369
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_advanced') { echo 'active'; } ?>" id="tab_seopress_titles_advanced"><?php do_settings_sections( 'seopress-settings-admin-titles-advanced' ); ?></div>
370
- </div>
371
-
372
- <?php submit_button(); ?>
373
- </form>
374
- <?php
375
- }
376
-
377
- function seopress_xml_sitemap_page(){
378
- $this->options = get_option( 'seopress_xml_sitemap_option_name' );
379
- if (function_exists('seopress_admin_header')) {
380
- echo seopress_admin_header();
381
- }
382
- ?>
383
- <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option" name="seopress-flush">
384
- <?php
385
- global $wp_version, $title;
386
- $current_tab = '';
387
- $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
388
- echo '<'.$tag.'><span class="dashicons dashicons-media-spreadsheet"></span>'.$title;
389
-
390
- if(seopress_get_toggle_option('xml-sitemap')=='1') {
391
- $seopress_get_toggle_xml_sitemap_option = '"1"';
392
- } else {
393
- $seopress_get_toggle_xml_sitemap_option = '"0"';
394
- } ?>
395
-
396
- <input type="checkbox" name="toggle-xml-sitemap" id="toggle-xml-sitemap" class="toggle" data-toggle=<?php echo $seopress_get_toggle_xml_sitemap_option; ?>>
397
-
398
- <label for="toggle-xml-sitemap"></label>
399
-
400
- <?php if(seopress_get_toggle_option('xml-sitemap')=='1') {
401
- echo '<span id="xml-sitemap-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
402
- echo '<span id="xml-sitemap-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
403
- } else {
404
- echo '<span id="xml-sitemap-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
405
- echo '<span id="xml-sitemap-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
406
- }
407
-
408
- echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
409
-
410
- echo '</'.$tag.'>';
411
-
412
- settings_fields( 'seopress_xml_sitemap_option_group' );
413
- ?>
414
-
415
- <div id="seopress-tabs" class="wrap">
416
- <?php
417
-
418
- $plugin_settings_tabs = array(
419
- 'tab_seopress_xml_sitemap_general' => __( "General", "wp-seopress" ),
420
- 'tab_seopress_xml_sitemap_post_types' => __( "Post Types", "wp-seopress" ),
421
- 'tab_seopress_xml_sitemap_taxonomies' => __( "Taxonomies", "wp-seopress" ),
422
- 'tab_seopress_html_sitemap' => __( "HTML Sitemap", "wp-seopress" ),
423
- );
424
-
425
- echo '<div class="nav-tab-wrapper">';
426
- foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
427
- echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-xml-sitemap#tab=' . $tab_key . '">' . $tab_caption . '</a>';
428
- }
429
- echo '</div>';
430
- ?>
431
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_xml_sitemap_general') { echo 'active'; } ?>" id="tab_seopress_xml_sitemap_general"><?php do_settings_sections( 'seopress-settings-admin-xml-sitemap-general' ); ?></div>
432
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_xml_sitemap_post_types') { echo 'active'; } ?>" id="tab_seopress_xml_sitemap_post_types"><?php do_settings_sections( 'seopress-settings-admin-xml-sitemap-post-types' ); ?></div>
433
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_xml_sitemap_taxonomies') { echo 'active'; } ?>" id="tab_seopress_xml_sitemap_taxonomies"><?php do_settings_sections( 'seopress-settings-admin-xml-sitemap-taxonomies' ); ?></div>
434
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_html_sitemap') { echo 'active'; } ?>" id="tab_seopress_html_sitemap"><?php do_settings_sections( 'seopress-settings-admin-html-sitemap' ); ?></div>
435
- </div>
436
- <?php submit_button(); ?>
437
- </form>
438
- <?php
439
- }
440
-
441
- function seopress_social_page(){
442
- $this->options = get_option( 'seopress_social_option_name' );
443
- if (function_exists('seopress_admin_header')) {
444
- echo seopress_admin_header();
445
- }
446
- ?>
447
- <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
448
- <?php
449
- global $wp_version, $title;
450
- $current_tab = '';
451
- $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
452
- echo '<'.$tag.'><span class="dashicons dashicons-share"></span>'.$title;
453
-
454
- if(seopress_get_toggle_option('social')=='1') {
455
- $seopress_get_toggle_social_option = '"1"';
456
- } else {
457
- $seopress_get_toggle_social_option = '"0"';
458
- }
459
- ?>
460
-
461
- <input type="checkbox" name="toggle-social" id="toggle-social" class="toggle" data-toggle=<?php echo $seopress_get_toggle_social_option; ?>>
462
- <label for="toggle-social"></label>
463
-
464
- <?php
465
- if(seopress_get_toggle_option('social')=='1') {
466
- echo '<span id="social-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
467
- echo '<span id="social-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
468
- } else {
469
- echo '<span id="social-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
470
- echo '<span id="social-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
471
- }
472
-
473
- echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
474
-
475
- echo '</'.$tag.'>';
476
-
477
- settings_fields( 'seopress_social_option_group' );
478
- ?>
479
-
480
- <div id="seopress-tabs" class="wrap">
481
- <?php
482
-
483
- $plugin_settings_tabs = array(
484
- 'tab_seopress_social_knowledge' => __( "Knowledge Graph", "wp-seopress" ),
485
- 'tab_seopress_social_accounts' => __( "Your social accounts", "wp-seopress" ),
486
- 'tab_seopress_social_facebook' => __( "Facebook (Open Graph)", "wp-seopress" ),
487
- 'tab_seopress_social_twitter' => __( "Twitter (Twitter card)", "wp-seopress" ),
488
- );
489
-
490
- echo '<div class="nav-tab-wrapper">';
491
- foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
492
- echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-social#tab=' . $tab_key . '">' . $tab_caption . '</a>';
493
- }
494
- echo '</div>';
495
- ?>
496
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_knowledge') { echo 'active'; } ?>" id="tab_seopress_social_knowledge"><?php do_settings_sections( 'seopress-settings-admin-social-knowledge' ); ?></div>
497
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_accounts') { echo 'active'; } ?>" id="tab_seopress_social_accounts"><?php do_settings_sections( 'seopress-settings-admin-social-accounts' ); ?></div>
498
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_facebook') { echo 'active'; } ?>" id="tab_seopress_social_facebook"><?php do_settings_sections( 'seopress-settings-admin-social-facebook' ); ?></div>
499
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_twitter') { echo 'active'; } ?>" id="tab_seopress_social_twitter"><?php do_settings_sections( 'seopress-settings-admin-social-twitter' ); ?></div>
500
- </div>
501
-
502
- <?php submit_button(); ?>
503
- </form>
504
- <?php
505
- }
506
-
507
- function seopress_google_analytics_page(){
508
- $this->options = get_option( 'seopress_google_analytics_option_name' );
509
- if (function_exists('seopress_admin_header')) {
510
- echo seopress_admin_header();
511
- }
512
- ?>
513
- <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
514
- <?php
515
- global $wp_version, $title;
516
- $current_tab = '';
517
- $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
518
- echo '<'.$tag.'><span class="dashicons dashicons-chart-area"></span>'.$title;
519
-
520
- if(seopress_get_toggle_option('google-analytics')=='1') {
521
- $seopress_get_toggle_google_analytics_option = '"1"';
522
- } else {
523
- $seopress_get_toggle_google_analytics_option = '"0"';
524
- }
525
- ?>
526
-
527
- <input type="checkbox" name="toggle-google-analytics" id="toggle-google-analytics" class="toggle" data-toggle=<?php echo $seopress_get_toggle_google_analytics_option; ?>>
528
-
529
- <label for="toggle-google-analytics"></label>
530
-
531
- <?php
532
- if(seopress_get_toggle_option('google-analytics')=='1') {
533
- echo '<span id="google-analytics-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
534
- echo '<span id="google-analytics-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
535
- } else {
536
- echo '<span id="google-analytics-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
537
- echo '<span id="google-analytics-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
538
- }
539
-
540
- echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
541
-
542
- echo '</'.$tag.'>';
543
-
544
- settings_fields( 'seopress_google_analytics_option_group' );
545
- ?>
546
-
547
- <div id="seopress-tabs" class="wrap">
548
- <?php
549
-
550
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
551
- $plugin_settings_tabs = [
552
- 'tab_seopress_google_analytics_enable' => __( "General", "wp-seopress" ),
553
- 'tab_seopress_google_analytics_features' => __( "Tracking", "wp-seopress" ),
554
- 'tab_seopress_google_analytics_events' => __( "Events", "wp-seopress" ),
555
- 'tab_seopress_google_analytics_custom_dimensions' => __( "Custom Dimensions", "wp-seopress" ),
556
- 'tab_seopress_google_analytics_dashboard' => __( "Stats in Dashboard", "wp-seopress" ),
557
- 'tab_seopress_google_analytics_gdpr' => __( "Cookie bar / GDPR", "wp-seopress" ),
558
- 'tab_seopress_google_analytics_matomo' => __( "Matomo", "wp-seopress" ),
559
- ];
560
- } else {
561
- $plugin_settings_tabs = [
562
- 'tab_seopress_google_analytics_enable' => __( "General", "wp-seopress" ),
563
- 'tab_seopress_google_analytics_features' => __( "Tracking", "wp-seopress" ),
564
- 'tab_seopress_google_analytics_events' => __( "Events", "wp-seopress" ),
565
- 'tab_seopress_google_analytics_custom_dimensions' => __( "Custom Dimensions", "wp-seopress" ),
566
- 'tab_seopress_google_analytics_gdpr' => __( "Cookie bar / GDPR", "wp-seopress" ),
567
- 'tab_seopress_google_analytics_matomo' => __( "Matomo", "wp-seopress" ),
568
- ];
569
- }
570
-
571
- echo '<div class="nav-tab-wrapper">';
572
- foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
573
- echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-google-analytics#tab=' . $tab_key . '">' . $tab_caption . '</a>';
574
- }
575
- echo '</div>';
576
- ?>
577
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_enable') { echo 'active'; } ?>" id="tab_seopress_google_analytics_enable"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-enable' ); ?></div>
578
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_features') { echo 'active'; } ?>" id="tab_seopress_google_analytics_features"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-features' ); ?></div><div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_events') { echo 'active'; } ?>" id="tab_seopress_google_analytics_events"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-events' ); ?></div>
579
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_custom_dimensions') { echo 'active'; } ?>" id="tab_seopress_google_analytics_custom_dimensions"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-custom-dimensions' ); ?></div>
580
- <?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
581
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_dashboard') { echo 'active'; } ?>" id="tab_seopress_google_analytics_dashboard"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-dashboard' ); ?></div>
582
- <?php } ?>
583
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_gdpr') { echo 'active'; } ?>" id="tab_seopress_google_analytics_gdpr"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-gdpr' ); ?></div>
584
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_matomo') { echo 'active'; } ?>" id="tab_seopress_google_analytics_matomo"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-matomo' ); ?></div>
585
- </div>
586
-
587
- <?php submit_button(); ?>
588
- </form>
589
- <?php
590
- }
591
-
592
- function seopress_advanced_page(){
593
- $this->options = get_option( 'seopress_advanced_option_name' );
594
- if (function_exists('seopress_admin_header')) {
595
- echo seopress_admin_header();
596
- }
597
- ?>
598
- <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
599
- <?php
600
-
601
- global $wp_version, $title;
602
- $current_tab = '';
603
- $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
604
- echo '<'.$tag.'><span class="dashicons dashicons-admin-tools"></span>'.$title;
605
-
606
- if(seopress_get_toggle_option('advanced')=='1') {
607
- $seopress_get_toggle_advanced_option = '"1"';
608
- } else {
609
- $seopress_get_toggle_advanced_option = '"0"';
610
- }
611
- ?>
612
-
613
- <input type="checkbox" name="toggle-advanced" id="toggle-advanced" class="toggle" data-toggle=<?php echo $seopress_get_toggle_advanced_option; ?>>
614
- <label for="toggle-advanced"></label>
615
-
616
- <?php
617
- if(seopress_get_toggle_option('advanced')=='1') {
618
- echo '<span id="advanced-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
619
- echo '<span id="advanced-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
620
- } else {
621
- echo '<span id="advanced-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
622
- echo '<span id="advanced-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
623
- }
624
-
625
- echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
626
-
627
- echo '</'.$tag.'>';
628
-
629
- settings_fields( 'seopress_advanced_option_group' );
630
- ?>
631
-
632
- <div id="seopress-tabs" class="wrap">
633
- <?php
634
-
635
- $plugin_settings_tabs = array(
636
- 'tab_seopress_advanced_advanced' => __( "Advanced", "wp-seopress" ),
637
- 'tab_seopress_advanced_appearance' => __( "Appearance", "wp-seopress" ),
638
- 'tab_seopress_advanced_security' => __( "Security", "wp-seopress" ),
639
- );
640
-
641
- echo '<div class="nav-tab-wrapper">';
642
- foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
643
- echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-advanced#tab=' . $tab_key . '">' . $tab_caption . '</a>';
644
- }
645
- echo '</div>';
646
- ?>
647
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_advanced_advanced') { echo 'active'; } ?>" id="tab_seopress_advanced_advanced"><?php do_settings_sections( 'seopress-settings-admin-advanced-advanced' ); ?></div>
648
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_advanced_appearance') { echo 'active'; } ?>" id="tab_seopress_advanced_appearance"><?php do_settings_sections( 'seopress-settings-admin-advanced-appearance' ); ?></div>
649
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_advanced_security') { echo 'active'; } ?>" id="tab_seopress_advanced_security"><?php do_settings_sections( 'seopress-settings-admin-advanced-security' ); ?></div>
650
- </div>
651
-
652
- <?php submit_button(); ?>
653
- </form>
654
- <?php
655
- }
656
-
657
- function seopress_import_export_page(){
658
- $this->options = get_option( 'seopress_import_export_option_name' );
659
- if (function_exists('seopress_admin_header')) {
660
- echo seopress_admin_header();
661
- }
662
- ?>
663
- <div class="seopress-option">
664
- <?php global $wp_version, $title;
665
- $current_tab = '';
666
- $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
667
- echo '<'.$tag.'><span class="dashicons dashicons-admin-settings"></span>'.$title.'</'.$tag.'>';
668
- ?>
669
- <div id="seopress-tabs" class="wrap">
670
- <?php
671
- $plugin_settings_tabs = array(
672
- 'tab_seopress_tool_data' => __( "Data", "wp-seopress" ),
673
- 'tab_seopress_tool_settings' => __( "Settings", "wp-seopress" ),
674
- 'tab_seopress_tool_plugins' => __( "Plugins", "wp-seopress" ),
675
- 'tab_seopress_tool_redirects' => __( "Redirections", "wp-seopress" ),
676
- 'tab_seopress_tool_reset' => __( "Reset", "wp-seopress" ),
677
- );
678
-
679
- if (!is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
680
- unset($plugin_settings_tabs['tab_seopress_tool_data']);
681
- unset($plugin_settings_tabs['tab_seopress_tool_redirects']);
682
- }
683
-
684
- echo '<div class="nav-tab-wrapper">';
685
- foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
686
- echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-import-export#tab=' . $tab_key . '">' . $tab_caption . '</a>';
687
- }
688
- echo '</div>';
689
- ?>
690
- <?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
691
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_data') { echo 'active'; } ?>" id="tab_seopress_tool_data">
692
- <div class="postbox section-tool">
693
- <div class="inside">
694
- <h3><span><?php _e( 'Import data from a CSV', 'wp-seopress' ); ?></span></h3>
695
- <p><?php _e( 'Import your title, meta description, meta robots, social metas from a CSV file with our import tool.', 'wp-seopress' ); ?></p>
696
- <a class="button" href="<?php echo admin_url( 'admin.php?page=seopress_csv_importer' ); ?>"><?php _e('Run the importer','wp-seopress'); ?></a>
697
- </div><!-- .inside -->
698
- </div><!-- .postbox -->
699
- <div id="seopress-metadata-tool" class="postbox section-tool">
700
- <div class="inside">
701
- <h3><span><?php _e( 'Export metadata to a CSV', 'wp-seopress' ); ?></span></h3>
702
- <p><?php _e( 'Export your SEOPress metadata for this site as a .csv file.', 'wp-seopress' ); ?></p>
703
- <form method="post">
704
- <p><input type="hidden" name="seopress_action" value="export_csv_metadata" /></p>
705
- <p>
706
- <?php wp_nonce_field( 'seopress_export_csv_metadata_nonce', 'seopress_export_csv_metadata_nonce' ); ?>
707
- <button id="seopress-metadata-export" type="button" class="button"><?php _e('Export','wp-seopress'); ?></button>
708
- <span class="spinner"></span>
709
- <div class="log"></div>
710
- </p>
711
- </form>
712
- </div><!-- .inside -->
713
- </div><!-- .postbox -->
714
- </div>
715
- <?php } ?>
716
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_settings') { echo 'active'; } ?>" id="tab_seopress_tool_settings">
717
- <div class="postbox section-tool">
718
- <div class="inside">
719
- <h3><span><?php _e( 'Export plugin settings', 'wp-seopress' ); ?></span></h3>
720
- <p><?php _e( 'Export the plugin settings for this site as a .json file. This allows you to easily import the configuration into another site.', 'wp-seopress' ); ?></p>
721
- <form method="post">
722
- <p><input type="hidden" name="seopress_action" value="export_settings" /></p>
723
- <p>
724
- <?php wp_nonce_field( 'seopress_export_nonce', 'seopress_export_nonce' ); ?>
725
- <?php submit_button( __( 'Export', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
726
- </p>
727
- </form>
728
- </div><!-- .inside -->
729
- </div><!-- .postbox -->
730
-
731
- <div class="postbox section-tool">
732
- <div class="inside">
733
- <h3><span><?php _e( 'Import plugin settings', 'wp-seopress' ); ?></span></h3>
734
- <p><?php _e( 'Import the plugin settings from a .json file. This file can be obtained by exporting the settings on another site using the form above.', 'wp-seopress' ); ?></p>
735
- <form method="post" enctype="multipart/form-data">
736
- <p>
737
- <input type="file" name="import_file"/>
738
- </p>
739
- <p>
740
- <input type="hidden" name="seopress_action" value="import_settings" />
741
- <?php wp_nonce_field( 'seopress_import_nonce', 'seopress_import_nonce' ); ?>
742
- <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
743
- <?php if(!empty($_GET["success"]) && htmlspecialchars($_GET["success"]) =='true') {
744
- echo '<div class="log">'.__('Import completed!','wp-seopress').'</div>';
745
- }; ?>
746
- </p>
747
- </form>
748
- </div><!-- .inside -->
749
- </div><!-- .postbox -->
750
- </div>
751
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_plugins') { echo 'active'; } ?>" id="tab_seopress_tool_plugins">
752
- <div class="postbox section-tool">
753
- <h3><span><?php _e('Import posts and terms metadata from','wp-seopress'); ?></span></h3>
754
- <select id="select-wizard-import" name="select-wizard-import">
755
- <option value="none"><?php _e('Select an option','wp-seopress'); ?></option>
756
- <option value="yoast-migration-tool"><?php _e('Yoast SEO','wp-seopress'); ?></option>
757
- <option value="aio-migration-tool"><?php _e('All In One SEO','wp-seopress'); ?></option>
758
- <option value="seo-framework-migration-tool"><?php _e('The SEO Framework','wp-seopress'); ?></option>
759
- <option value="rk-migration-tool"><?php _e('Rank Math','wp-seopress'); ?></option>
760
- <option value="squirrly-migration-tool"><?php _e('Squirrly SEO','wp-seopress'); ?></option>
761
- <option value="seo-ultimate-migration-tool"><?php _e('SEO Ultimate','wp-seopress'); ?></option>
762
- <option value="wp-meta-seo-migration-tool"><?php _e('WP Meta SEO','wp-seopress'); ?></option>
763
- </select>
764
- <br><br>
765
- </div>
766
- <!-- Yoast import tool -->
767
- <div id="yoast-migration-tool" class="postbox section-tool">
768
- <div class="inside">
769
- <h3><span><?php _e( 'Import posts and terms metadata from Yoast', 'wp-seopress' ); ?></span></h3>
770
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
771
- <ul>
772
- <li><?php _e('Title tags','wp-seopress'); ?></li>
773
- <li><?php _e('Meta description','wp-seopress'); ?></li>
774
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
775
- <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
776
- <li><?php _e('Meta Robots (noindex, nofollow...)','wp-seopress'); ?></li>
777
- <li><?php _e('Canonical URL','wp-seopress'); ?></li>
778
- <li><?php _e('Focus keywords','wp-seopress'); ?></li>
779
- </ul>
780
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will delete / update all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any Yoast data.', 'wp-seopress' ); ?></p>
781
- <button id="seopress-yoast-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
782
- <span class="spinner"></span>
783
- <div class="log"></div>
784
- </div><!-- .inside -->
785
- </div><!-- .postbox -->
786
-
787
- <!-- All In One import tool -->
788
- <div id="aio-migration-tool" class="postbox section-tool">
789
- <div class="inside">
790
- <h3><span><?php _e( 'Import posts and terms metadata from All In One SEO', 'wp-seopress' ); ?></span></h3>
791
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
792
- <ul>
793
- <li><?php _e('Title tags','wp-seopress'); ?></li>
794
- <li><?php _e('Meta description','wp-seopress'); ?></li>
795
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
796
- <li><?php _e('Twitter image thumbnail','wp-seopress'); ?></li>
797
- <li><?php _e('Meta Robots (noindex, nofollow)','wp-seopress'); ?></li>
798
- </ul>
799
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update/delete all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any AIO data.', 'wp-seopress' ); ?></p>
800
- <button id="seopress-aio-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
801
- <span class="spinner"></span>
802
- <div class="log"></div>
803
- </div><!-- .inside -->
804
- </div><!-- .postbox -->
805
-
806
- <!-- SEO Framework import tool -->
807
- <div id="seo-framework-migration-tool" class="postbox section-tool">
808
- <div class="inside">
809
- <h3><span><?php _e( 'Import posts and terms metadata from The SEO Framework', 'wp-seopress' ); ?></span></h3>
810
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
811
- <ul>
812
- <li><?php _e('Title tags','wp-seopress'); ?></li>
813
- <li><?php _e('Meta description','wp-seopress'); ?></li>
814
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
815
- <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
816
- <li><?php _e('Meta Robots (noindex, nofollow, noarchive)','wp-seopress'); ?></li>
817
- <li><?php _e('Canonical URL','wp-seopress'); ?></li>
818
- <li><?php _e('Redirect URL','wp-seopress'); ?></li>
819
- </ul>
820
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any SEO Framework data.', 'wp-seopress' ); ?></p>
821
- <button id="seopress-seo-framework-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
822
- <span class="spinner"></span>
823
- <div class="log"></div>
824
- </div><!-- .inside -->
825
- </div><!-- .postbox -->
826
-
827
- <!-- RK import tool -->
828
- <div id="rk-migration-tool" class="postbox section-tool">
829
- <div class="inside">
830
- <h3><span><?php _e( 'Import posts and terms metadata from Rank Math', 'wp-seopress' ); ?></span></h3>
831
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
832
- <ul>
833
- <li><?php _e('Title tags','wp-seopress'); ?></li>
834
- <li><?php _e('Meta description','wp-seopress'); ?></li>
835
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
836
- <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
837
- <li><?php _e('Meta Robots (noindex, nofollow, noarchive, noimageindex)','wp-seopress'); ?></li>
838
- <li><?php _e('Canonical URL','wp-seopress'); ?></li>
839
- <li><?php _e('Focus keywords','wp-seopress'); ?></li>
840
- </ul>
841
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any Rank Math data.', 'wp-seopress' ); ?></p>
842
- <button id="seopress-rk-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
843
- <span class="spinner"></span>
844
- <div class="log"></div>
845
- </div><!-- .inside -->
846
- </div><!-- .postbox -->
847
-
848
- <!-- Squirrly import tool -->
849
- <div id="squirrly-migration-tool" class="postbox section-tool">
850
- <div class="inside">
851
- <h3><span><?php _e( 'Import posts metadata from Squirrly SEO', 'wp-seopress' ); ?></span></h3>
852
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
853
- <ul>
854
- <li><?php _e('Title tags','wp-seopress'); ?></li>
855
- <li><?php _e('Meta description','wp-seopress'); ?></li>
856
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
857
- <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
858
- <li><?php _e('Meta Robots (noindex or nofollow)','wp-seopress'); ?></li>
859
- <li><?php _e('Canonical URL','wp-seopress'); ?></li>
860
- </ul>
861
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update/delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any Squirrly SEO data.', 'wp-seopress' ); ?></p>
862
- <button id="seopress-squirrly-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
863
- <span class="spinner"></span>
864
- <div class="log"></div>
865
- </div><!-- .inside -->
866
- </div><!-- .postbox -->
867
-
868
- <!-- SEO Ultimate import tool -->
869
- <div id="seo-ultimate-migration-tool" class="postbox section-tool">
870
- <div class="inside">
871
- <h3><span><?php _e( 'Import posts metadata from SEO Ultimate', 'wp-seopress' ); ?></span></h3>
872
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
873
- <ul>
874
- <li><?php _e('Title tags','wp-seopress'); ?></li>
875
- <li><?php _e('Meta description','wp-seopress'); ?></li>
876
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
877
- <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
878
- <li><?php _e('Meta Robots (noindex or nofollow)','wp-seopress'); ?></li>
879
- </ul>
880
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any SEO Ultimate data.', 'wp-seopress' ); ?></p>
881
- <button id="seopress-seo-ultimate-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
882
- <span class="spinner"></span>
883
- <div class="log"></div>
884
- </div><!-- .inside -->
885
- </div><!-- .postbox -->
886
-
887
- <!-- WP Meta SEO import tool -->
888
- <div id="wp-meta-seo-migration-tool" class="postbox section-tool">
889
- <div class="inside">
890
- <h3><span><?php _e( 'Import posts and terms metadata from WP Meta SEO', 'wp-seopress' ); ?></span></h3>
891
- <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
892
- <ul>
893
- <li><?php _e('Title tags','wp-seopress'); ?></li>
894
- <li><?php _e('Meta description','wp-seopress'); ?></li>
895
- <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
896
- <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
897
- </ul>
898
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any WP Meta SEO data.', 'wp-seopress' ); ?></p>
899
- <button id="seopress-wp-meta-seo-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
900
- <span class="spinner"></span>
901
- <div class="log"></div>
902
- </div><!-- .inside -->
903
- </div><!-- .postbox -->
904
- </div>
905
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_redirects') { echo 'active'; } ?>" id="tab_seopress_tool_redirects">
906
- <?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
907
- <?php if(seopress_get_toggle_option('404')=='1') { ?>
908
- <div class="postbox section-tool">
909
- <h3><span><?php _e('Import your redirections','wp-seopress'); ?></span></h3>
910
- <select id="select-wizard-redirects" name="select-wizard-redirects">
911
- <option value="none"><?php _e('Select an option','wp-seopress'); ?></option>
912
- <option value="section-import-redirects"><?php _e('CSV file (must match the template)','wp-seopress'); ?></option>
913
- <option value="section-import-redirects-plugin"><?php _e('Redirections plugin (JSON - WordPress Redirects)','wp-seopress'); ?></option>
914
- <option value="section-import-yoast-redirects"><?php _e('Yoast Premium plugin (CSV)','wp-seopress'); ?></option>
915
- <option value="section-import-rk-redirects"><?php _e('Rank Math plugin (TXT)','wp-seopress'); ?></option>
916
- </select>
917
- <br><br>
918
- </div>
919
- <div id="section-import-redirects" class="postbox section-tool">
920
- <div class="inside">
921
- <h3><span><?php _e( 'Import Redirections', 'wp-seopress' ); ?></span></h3>
922
- <p><?php _e( 'Import your own redirections from a .csv file (separator ";"). You must have 6 columns in this order:','wp-seopress'); ?>
923
- <ul>
924
- <li><?php _e( 'URL to match (without your domain name)', 'wp-seopress'); ?></li>
925
- <li><?php _e( 'URL to redirect in absolute,','wp-seopress'); ?></li>
926
- <li><?php _e( 'type of redirection (301, 302 or 307),','wp-seopress'); ?></li>
927
- <li><?php _e( 'Yes to enable the redirect (leave it empty to disable the redirect)','wp-seopress'); ?></li>
928
- <li><?php _e( 'the query parameter ("exact_match" = Exact match with all parameters, "without_param" = Exclude all parameters or "with_ignored_param" = Exclude all parameters and pass them to the redirection),', 'wp-seopress' ); ?>
929
- <li><?php _e( 'and, the last parameter, the counter (optional).','wp-seopress'); ?></li>
930
- </ul>
931
- </p>
932
- <p>
933
- <a href="https://www.seopress.org/wp-content/uploads/csv/seopress-redirections-example.csv" target="_blank">
934
- <?php _e('Download a CSV example','wp-seopress'); ?>
935
- </a>
936
- </p>
937
- <form method="post" enctype="multipart/form-data">
938
- <p>
939
- <input type="file" name="import_file"/>
940
- </p>
941
- <p>
942
- <input type="hidden" name="seopress_action" value="import_redirections_settings" />
943
- <?php wp_nonce_field( 'seopress_import_redirections_nonce', 'seopress_import_redirections_nonce' ); ?>
944
- <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
945
- </p>
946
- </form>
947
- </div><!-- .inside -->
948
- </div><!-- .postbox -->
949
- <div id="section-import-redirects-plugin" class="postbox section-tool">
950
- <div class="inside">
951
- <h3><span><?php _e( 'Import Redirections from the Redirections plugin', 'wp-seopress' ); ?></span></h3>
952
- <p><?php _e( 'Import your own redirections from a .json file generated by the Redirections plugin (make sure to select <strong>"WordPress redirects"</strong> when you export your file). Note that we do not support certain options, like regex. To avoid conflicts, make sure there are no duplicates between your file and existing redirects.', 'wp-seopress' ); ?></p>
953
- <form method="post" enctype="multipart/form-data">
954
- <p>
955
- <input type="file" name="import_file"/>
956
- </p>
957
- <p>
958
- <input type="hidden" name="seopress_action" value="import_redirections_plugin_settings" />
959
- <?php wp_nonce_field( 'seopress_import_redirections_plugin_nonce', 'seopress_import_redirections_plugin_nonce' ); ?>
960
- <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
961
- </p>
962
- </form>
963
- </div><!-- .inside -->
964
- </div><!-- .postbox -->
965
- <div id="section-import-yoast-redirects" class="postbox section-tool">
966
- <div class="inside">
967
- <h3><span><?php _e( 'Import Redirections from Yoast Premium', 'wp-seopress' ); ?></span></h3>
968
- <p><?php _e( 'Import your own redirections from a .csv file generated by Yoast Premium. Note that we don\'t support certain options, like regex. To avoid conflicts, make sure there are no duplicates between your file and existing redirects.', 'wp-seopress' ); ?></p>
969
- <form method="post" enctype="multipart/form-data">
970
- <p>
971
- <input type="file" name="import_file"/>
972
- </p>
973
- <p>
974
- <input type="hidden" name="seopress_action" value="import_yoast_redirections" />
975
- <?php wp_nonce_field( 'seopress_import_yoast_redirections_nonce', 'seopress_import_yoast_redirections_nonce' ); ?>
976
- <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
977
- </p>
978
- </form>
979
- </div><!-- .inside -->
980
- </div><!-- .postbox -->
981
- <div id="section-import-rk-redirects" class="postbox section-tool">
982
- <div class="inside">
983
- <h3><span><?php _e( 'Import Redirections from Rank Math', 'wp-seopress' ); ?></span></h3>
984
- <p><?php _e( 'Import your own redirections from a .txt file generated by Rank Math. Note that we don\'t support certain options, like regex. To avoid conflicts, make sure there are no duplicates between your file and existing redirects.', 'wp-seopress' ); ?></p>
985
- <form method="post" enctype="multipart/form-data">
986
- <p>
987
- <input type="file" name="import_file"/>
988
- </p>
989
- <p>
990
- <input type="hidden" name="seopress_action" value="import_rk_redirections" />
991
- <?php wp_nonce_field( 'seopress_import_rk_redirections_nonce', 'seopress_import_rk_redirections_nonce' ); ?>
992
- <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
993
- </p>
994
- </form>
995
- </div><!-- .inside -->
996
- </div><!-- .postbox -->
997
- <div id="section-export-redirects" class="postbox section-tool">
998
- <div class="inside">
999
- <h3><span><?php _e( 'Export Redirections', 'wp-seopress' ); ?></span></h3>
1000
- <p><?php _e( 'Export all redirections for this site as a .csv file. This allows you to easily import the redirections into another site, to Excel / Google Sheets...', 'wp-seopress' ); ?></p>
1001
- <form method="post">
1002
- <p><input type="hidden" name="seopress_action" value="export_redirections" /></p>
1003
- <p>
1004
- <?php wp_nonce_field( 'seopress_export_redirections_nonce', 'seopress_export_redirections_nonce' ); ?>
1005
- <?php submit_button( __( 'Export', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1006
- </p>
1007
- </form>
1008
- </div><!-- .inside -->
1009
- </div><!-- .postbox -->
1010
- <div id="section-clean-404" class="postbox section-tool">
1011
- <div class="inside">
1012
- <h3><span><?php _e( 'Clean your 404', 'wp-seopress' ); ?></span></h3>
1013
- <p><?php _e( 'Delete all your 404 errors. We dont delete any redirects.', 'wp-seopress' ); ?></p>
1014
- <p><?php echo sprintf(__( 'Make sure you have enabled 404 cleaning from SEO, PRO, <a href="%s">404/301</a> tab to be able to delete all your 404 errors.', 'wp-seopress' ), admin_url( 'admin.php?page=seopress-pro-page' )); ?></p>
1015
- <p><?php
1016
- if (function_exists('seopress_get_locale')) {
1017
- if (seopress_get_locale() =='fr') {
1018
- $seopress_docs_link['support']['redirects']['query'] = 'https://www.seopress.org/fr/support/guides/nettoyez-vos-erreurs-404-a-laide-dune-requete-mysql/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
1019
- } else {
1020
- $seopress_docs_link['support']['redirects']['query'] = 'https://www.seopress.org/support/guides/delete-your-404-errors-with-a-mysql-query/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
1021
- }
1022
- }
1023
- echo sprintf(__('You can also use <span class="dashicons dashicons-external"></span><a href="%s" target="_blank">this MySQL query</a> if necessary.','wp-seopress'),$seopress_docs_link['support']['redirects']['query']); ?></p>
1024
- <form method="post">
1025
- <p><input type="hidden" name="seopress_action" value="clean_404" /></p>
1026
- <p>
1027
- <?php wp_nonce_field( 'seopress_clean_404_nonce', 'seopress_clean_404_nonce' ); ?>
1028
- <?php submit_button( __( 'Delete all 404', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1029
- </p>
1030
- </form>
1031
- </div><!-- .inside -->
1032
- </div><!-- .postbox -->
1033
- <?php } else { ?>
1034
- <p><?php _e('Redirections feature is disabled. Please activate it from the PRO page.','wp-seopress'); ?></p>
1035
- <a href="<?php echo admin_url( 'admin.php?page=seopress-pro-page' ); ?>"><?php _e('Activate Redirections','wp-seopress'); ?></a>
1036
- <?php } ?>
1037
- <?php } ?>
1038
- </div>
1039
- <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_reset') { echo 'active'; } ?>" id="tab_seopress_tool_reset">
1040
- <div class="postbox section-tool">
1041
- <div class="inside">
1042
- <h3><span><?php _e( 'Reset All Notices From Notifications Center', 'wp-seopress' ); ?></span></h3>
1043
- <p><?php _e( 'By clicking Reset Notices, all notices in the notifications center will be set to their initial status.', 'wp-seopress' ); ?></p>
1044
- <form method="post" enctype="multipart/form-data">
1045
- <p>
1046
- <input type="hidden" name="seopress_action" value="reset_notices_settings" />
1047
- <?php wp_nonce_field( 'seopress_reset_notices_nonce', 'seopress_reset_notices_nonce' ); ?>
1048
- <?php submit_button( __( 'Reset notices', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1049
- </p>
1050
- </form>
1051
- </div><!-- .inside -->
1052
- </div><!-- .postbox -->
1053
-
1054
- <div class="postbox section-tool">
1055
- <div class="inside">
1056
- <h3><span><?php _e( 'Reset All Settings', 'wp-seopress' ); ?></span></h3>
1057
- <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Delete all options related to SEOPress in your database AND set settings to their default values.', 'wp-seopress' ); ?></p>
1058
- <form method="post" enctype="multipart/form-data">
1059
- <p>
1060
- <input type="hidden" name="seopress_action" value="reset_settings" />
1061
- <?php wp_nonce_field( 'seopress_reset_nonce', 'seopress_reset_nonce' ); ?>
1062
- <?php submit_button( __( 'Reset settings', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1063
- </p>
1064
- </form>
1065
- </div><!-- .inside -->
1066
- </div><!-- .postbox -->
1067
- </div>
1068
- </div>
1069
- </div>
1070
- <?php
1071
- }
1072
-
1073
- /**
1074
- * Options page callback
1075
- */
1076
- public function create_admin_page()
1077
- {
1078
- // Set class property
1079
- $this->options = get_option( 'seopress_option_name' );
1080
- $current_tab ='';
1081
- if (function_exists('seopress_admin_header')) {
1082
- echo seopress_admin_header();
1083
- }
1084
- ?>
1085
- <div id="seopress-content">
1086
- <!--Get started-->
1087
- <?php
1088
- function seopress_get_hidden_notices_get_started_option() {
1089
- $seopress_get_hidden_notices_get_started_option = get_option("seopress_notices");
1090
- if ( ! empty ( $seopress_get_hidden_notices_get_started_option ) ) {
1091
- foreach ($seopress_get_hidden_notices_get_started_option as $key => $seopress_get_hidden_notices_get_started_value)
1092
- $options[$key] = $seopress_get_hidden_notices_get_started_value;
1093
- if (isset($seopress_get_hidden_notices_get_started_option['notice-get-started'])) {
1094
- return $seopress_get_hidden_notices_get_started_option['notice-get-started'];
1095
- }
1096
- }
1097
- }
1098
- if(seopress_get_hidden_notices_get_started_option() !='1') {
1099
- if (function_exists('seopress_get_toggle_white_label_option') && seopress_get_toggle_white_label_option() =='1') {
1100
- //do nothing
1101
- } else {
1102
- include_once(dirname( __FILE__ ).'/admin-get-started.php');
1103
- }
1104
- }
1105
- ?>
1106
-
1107
- <!--Notifications Center-->
1108
- <?php include_once(dirname( __FILE__ ).'/admin-notifications-center.php'); ?>
1109
-
1110
- <!--Features list-->
1111
- <?php include_once(dirname( __FILE__ ).'/admin-features-list.php'); ?>
1112
- </div>
1113
- <?php
1114
- }
1115
-
1116
- /**
1117
- * Register and add settings
1118
- */
1119
- public function page_init()
1120
- {
1121
- register_setting(
1122
- 'seopress_option_group', // Option group
1123
- 'seopress_option_name', // Option name
1124
- array( $this, 'sanitize' ) // Sanitize
1125
- );
1126
-
1127
- register_setting(
1128
- 'seopress_titles_option_group', // Option group
1129
- 'seopress_titles_option_name', // Option name
1130
- array( $this, 'sanitize' ) // Sanitize
1131
- );
1132
-
1133
- register_setting(
1134
- 'seopress_xml_sitemap_option_group', // Option group
1135
- 'seopress_xml_sitemap_option_name', // Option name
1136
- array( $this, 'sanitize' ) // Sanitize
1137
- );
1138
-
1139
- register_setting(
1140
- 'seopress_social_option_group', // Option group
1141
- 'seopress_social_option_name', // Option name
1142
- array( $this, 'sanitize' ) // Sanitize
1143
- );
1144
-
1145
- register_setting(
1146
- 'seopress_google_analytics_option_group', // Option group
1147
- 'seopress_google_analytics_option_name', // Option name
1148
- array( $this, 'sanitize' ) // Sanitize
1149
- );
1150
-
1151
- register_setting(
1152
- 'seopress_advanced_option_group', // Option group
1153
- 'seopress_advanced_option_name', // Option name
1154
- array( $this, 'sanitize' ) // Sanitize
1155
- );
1156
-
1157
- register_setting(
1158
- 'seopress_import_export_option_group', // Option group
1159
- 'seopress_import_export_option_name', // Option name
1160
- array( $this, 'sanitize' ) // Sanitize
1161
- );
1162
-
1163
- //Titles & metas SECTION===================================================================
1164
- add_settings_section(
1165
- 'seopress_setting_section_titles_home', // ID
1166
- '',
1167
- //__("Home","wp-seopress"), // Title
1168
- array( $this, 'print_section_info_titles' ), // Callback
1169
- 'seopress-settings-admin-titles-home' // Page
1170
- );
1171
-
1172
- add_settings_field(
1173
- 'seopress_titles_sep', // ID
1174
- __("Separator","wp-seopress"), // Title
1175
- array( $this, 'seopress_titles_sep_callback' ), // Callback
1176
- 'seopress-settings-admin-titles-home', // Page
1177
- 'seopress_setting_section_titles_home' // Section
1178
- );
1179
-
1180
- add_settings_field(
1181
- 'seopress_titles_home_site_title', // ID
1182
- __("Site title","wp-seopress"), // Title
1183
- array( $this, 'seopress_titles_home_site_title_callback' ), // Callback
1184
- 'seopress-settings-admin-titles-home', // Page
1185
- 'seopress_setting_section_titles_home' // Section
1186
- );
1187
-
1188
- add_settings_field(
1189
- 'seopress_titles_home_site_desc', // ID
1190
- __("Meta description","wp-seopress"), // Title
1191
- array( $this, 'seopress_titles_home_site_desc_callback' ), // Callback
1192
- 'seopress-settings-admin-titles-home', // Page
1193
- 'seopress_setting_section_titles_home' // Section
1194
- );
1195
-
1196
- //Single Post Types SECTION================================================================
1197
- add_settings_section(
1198
- 'seopress_setting_section_titles_single', // ID
1199
- '',
1200
- //__("Single Post Types","wp-seopress"), // Title
1201
- array( $this, 'print_section_info_single' ), // Callback
1202
- 'seopress-settings-admin-titles-single' // Page
1203
- );
1204
-
1205
- add_settings_field(
1206
- 'seopress_titles_single_titles', // ID
1207
- '',
1208
- array( $this, 'seopress_titles_single_titles_callback' ), // Callback
1209
- 'seopress-settings-admin-titles-single', // Page
1210
- 'seopress_setting_section_titles_single' // Section
1211
- );
1212
-
1213
- //Archives SECTION=========================================================================
1214
- add_settings_section(
1215
- 'seopress_setting_section_titles_archives', // ID
1216
- '',
1217
- //__("Archives","wp-seopress"), // Title
1218
- array( $this, 'print_section_info_archives' ), // Callback
1219
- 'seopress-settings-admin-titles-archives' // Page
1220
- );
1221
-
1222
- add_settings_field(
1223
- 'seopress_titles_archives_titles', // ID
1224
- '',
1225
- array( $this, 'seopress_titles_archives_titles_callback' ), // Callback
1226
- 'seopress-settings-admin-titles-archives', // Page
1227
- 'seopress_setting_section_titles_archives' // Section
1228
- );
1229
-
1230
- add_settings_field(
1231
- 'seopress_titles_archives_author_title', // ID
1232
- '',
1233
- //__('Title template','wp-seopress'),
1234
- array( $this, 'seopress_titles_archives_author_title_callback' ), // Callback
1235
- 'seopress-settings-admin-titles-archives', // Page
1236
- 'seopress_setting_section_titles_archives' // Section
1237
- );
1238
-
1239
- add_settings_field(
1240
- 'seopress_titles_archives_author_desc', // ID
1241
- '',
1242
- //__('Meta description template','wp-seopress'),
1243
- array( $this, 'seopress_titles_archives_author_desc_callback' ), // Callback
1244
- 'seopress-settings-admin-titles-archives', // Page
1245
- 'seopress_setting_section_titles_archives' // Section
1246
- );
1247
-
1248
- add_settings_field(
1249
- 'seopress_titles_archives_author_noindex', // ID
1250
- '',
1251
- //__("noindex","wp-seopress"), // Title
1252
- array( $this, 'seopress_titles_archives_author_noindex_callback' ), // Callback
1253
- 'seopress-settings-admin-titles-archives', // Page
1254
- 'seopress_setting_section_titles_archives' // Section
1255
- );
1256
-
1257
- add_settings_field(
1258
- 'seopress_titles_archives_author_disable', // ID
1259
- '',
1260
- //__("disable","wp-seopress"), // Title
1261
- array( $this, 'seopress_titles_archives_author_disable_callback' ), // Callback
1262
- 'seopress-settings-admin-titles-archives', // Page
1263
- 'seopress_setting_section_titles_archives' // Section
1264
- );
1265
-
1266
- add_settings_field(
1267
- 'seopress_titles_archives_date_title', // ID
1268
- '',
1269
- //__('Title template','wp-seopress'),
1270
- array( $this, 'seopress_titles_archives_date_title_callback' ), // Callback
1271
- 'seopress-settings-admin-titles-archives', // Page
1272
- 'seopress_setting_section_titles_archives' // Section
1273
- );
1274
-
1275
- add_settings_field(
1276
- 'seopress_titles_archives_date_desc', // ID
1277
- '',
1278
- //__('Meta description template','wp-seopress'),
1279
- array( $this, 'seopress_titles_archives_date_desc_callback' ), // Callback
1280
- 'seopress-settings-admin-titles-archives', // Page
1281
- 'seopress_setting_section_titles_archives' // Section
1282
- );
1283
-
1284
- add_settings_field(
1285
- 'seopress_titles_archives_date_noindex', // ID
1286
- '',
1287
- //__("noindex","wp-seopress"), // Title
1288
- array( $this, 'seopress_titles_archives_date_noindex_callback' ), // Callback
1289
- 'seopress-settings-admin-titles-archives', // Page
1290
- 'seopress_setting_section_titles_archives' // Section
1291
- );
1292
-
1293
- add_settings_field(
1294
- 'seopress_titles_archives_date_disable', // ID
1295
- '',
1296
- //__("disable","wp-seopress"), // Title
1297
- array( $this, 'seopress_titles_archives_date_disable_callback' ), // Callback
1298
- 'seopress-settings-admin-titles-archives', // Page
1299
- 'seopress_setting_section_titles_archives' // Section
1300
- );
1301
-
1302
- add_settings_field(
1303
- 'seopress_titles_archives_search_title', // ID
1304
- '',
1305
- //__('Title template','wp-seopress'),
1306
- array( $this, 'seopress_titles_archives_search_title_callback' ), // Callback
1307
- 'seopress-settings-admin-titles-archives', // Page
1308
- 'seopress_setting_section_titles_archives' // Section
1309
- );
1310
-
1311
- add_settings_field(
1312
- 'seopress_titles_archives_search_desc', // ID
1313
- '',
1314
- //__('Meta description template','wp-seopress'),
1315
- array( $this, 'seopress_titles_archives_search_desc_callback' ), // Callback
1316
- 'seopress-settings-admin-titles-archives', // Page
1317
- 'seopress_setting_section_titles_archives' // Section
1318
- );
1319
-
1320
- add_settings_field(
1321
- 'seopress_titles_archives_search_title_noindex', // ID
1322
- '',
1323
- //__('noindex','wp-seopress'),
1324
- array( $this, 'seopress_titles_archives_search_title_noindex_callback' ), // Callback
1325
- 'seopress-settings-admin-titles-archives', // Page
1326
- 'seopress_setting_section_titles_archives' // Section
1327
- );
1328
-
1329
- add_settings_field(
1330
- 'seopress_titles_archives_404_title', // ID
1331
- '',
1332
- //__('Title template','wp-seopress'),
1333
- array( $this, 'seopress_titles_archives_404_title_callback' ), // Callback
1334
- 'seopress-settings-admin-titles-archives', // Page
1335
- 'seopress_setting_section_titles_archives' // Section
1336
- );
1337
-
1338
- add_settings_field(
1339
- 'seopress_titles_archives_404_desc', // ID
1340
- '',
1341
- //__('Meta description template','wp-seopress'),
1342
- array( $this, 'seopress_titles_archives_404_desc_callback' ), // Callback
1343
- 'seopress-settings-admin-titles-archives', // Page
1344
- 'seopress_setting_section_titles_archives' // Section
1345
- );
1346
-
1347
- //Taxonomies SECTION=======================================================================
1348
- add_settings_section(
1349
- 'seopress_setting_section_titles_tax', // ID
1350
- '',
1351
- //__("Taxonomies","wp-seopress"), // Title
1352
- array( $this, 'print_section_info_tax' ), // Callback
1353
- 'seopress-settings-admin-titles-tax' // Page
1354
- );
1355
-
1356
- add_settings_field(
1357
- 'seopress_titles_tax_titles', // ID
1358
- '',
1359
- array( $this, 'seopress_titles_tax_titles_callback' ), // Callback
1360
- 'seopress-settings-admin-titles-tax', // Page
1361
- 'seopress_setting_section_titles_tax' // Section
1362
- );
1363
-
1364
- //Advanced SECTION=========================================================================
1365
- add_settings_section(
1366
- 'seopress_setting_section_titles_advanced', // ID
1367
- '',
1368
- //__("Advanced","wp-seopress"), // Title
1369
- array( $this, 'print_section_info_advanced' ), // Callback
1370
- 'seopress-settings-admin-titles-advanced' // Page
1371
- );
1372
-
1373
- add_settings_field(
1374
- 'seopress_titles_noindex', // ID
1375
- __("noindex","wp-seopress"), // Title
1376
- array( $this, 'seopress_titles_noindex_callback' ), // Callback
1377
- 'seopress-settings-admin-titles-advanced', // Page
1378
- 'seopress_setting_section_titles_advanced' // Section
1379
- );
1380
-
1381
- add_settings_field(
1382
- 'seopress_titles_nofollow', // ID
1383
- __("nofollow","wp-seopress"), // Title
1384
- array( $this, 'seopress_titles_nofollow_callback' ), // Callback
1385
- 'seopress-settings-admin-titles-advanced', // Page
1386
- 'seopress_setting_section_titles_advanced' // Section
1387
- );
1388
-
1389
- add_settings_field(
1390
- 'seopress_titles_noodp', // ID
1391
- __("noodp","wp-seopress"), // Title
1392
- array( $this, 'seopress_titles_noodp_callback' ), // Callback
1393
- 'seopress-settings-admin-titles-advanced', // Page
1394
- 'seopress_setting_section_titles_advanced' // Section
1395
- );
1396
-
1397
- add_settings_field(
1398
- 'seopress_titles_noimageindex', // ID
1399
- __("noimageindex","wp-seopress"), // Title
1400
- array( $this, 'seopress_titles_noimageindex_callback' ), // Callback
1401
- 'seopress-settings-admin-titles-advanced', // Page
1402
- 'seopress_setting_section_titles_advanced' // Section
1403
- );
1404
-
1405
- add_settings_field(
1406
- 'seopress_titles_noarchive', // ID
1407
- __("noarchive","wp-seopress"), // Title
1408
- array( $this, 'seopress_titles_noarchive_callback' ), // Callback
1409
- 'seopress-settings-admin-titles-advanced', // Page
1410
- 'seopress_setting_section_titles_advanced' // Section
1411
- );
1412
-
1413
- add_settings_field(
1414
- 'seopress_titles_nosnippet', // ID
1415
- __("nosnippet","wp-seopress"), // Title
1416
- array( $this, 'seopress_titles_nosnippet_callback' ), // Callback
1417
- 'seopress-settings-admin-titles-advanced', // Page
1418
- 'seopress_setting_section_titles_advanced' // Section
1419
- );
1420
-
1421
- add_settings_field(
1422
- 'seopress_titles_nositelinkssearchbox', // ID
1423
- __("nositelinkssearchbox","wp-seopress"), // Title
1424
- array( $this, 'seopress_titles_nositelinkssearchbox_callback' ), // Callback
1425
- 'seopress-settings-admin-titles-advanced', // Page
1426
- 'seopress_setting_section_titles_advanced' // Section
1427
- );
1428
-
1429
- add_settings_field(
1430
- 'seopress_titles_paged_rel', // ID
1431
- __("Indicate paginated content to Google","wp-seopress"), // Title
1432
- array( $this, 'seopress_titles_paged_rel_callback' ), // Callback
1433
- 'seopress-settings-admin-titles-advanced', // Page
1434
- 'seopress_setting_section_titles_advanced' // Section
1435
- );
1436
-
1437
- //XML Sitemap SECTION======================================================================
1438
- add_settings_section(
1439
- 'seopress_setting_section_xml_sitemap_general', // ID
1440
- '',
1441
- //__("General","wp-seopress"), // Title
1442
- array( $this, 'print_section_info_xml_sitemap_general' ), // Callback
1443
- 'seopress-settings-admin-xml-sitemap-general' // Page
1444
- );
1445
-
1446
- add_settings_field(
1447
- 'seopress_xml_sitemap_general_enable', // ID
1448
- __("Enable XML Sitemap","wp-seopress"), // Title
1449
- array( $this, 'seopress_xml_sitemap_general_enable_callback' ), // Callback
1450
- 'seopress-settings-admin-xml-sitemap-general', // Page
1451
- 'seopress_setting_section_xml_sitemap_general' // Section
1452
- );
1453
-
1454
- add_settings_field(
1455
- 'seopress_xml_sitemap_img_enable', // ID
1456
- __("Enable XML Image Sitemaps","wp-seopress"), // Title
1457
- array( $this, 'seopress_xml_sitemap_img_enable_callback' ), // Callback
1458
- 'seopress-settings-admin-xml-sitemap-general', // Page
1459
- 'seopress_setting_section_xml_sitemap_general' // Section
1460
- );
1461
-
1462
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
1463
- add_settings_field(
1464
- 'seopress_xml_sitemap_video_enable_callback', // ID
1465
- __("Enable XML Video Sitemaps","wp-seopress"), // Title
1466
- array( $this, 'seopress_xml_sitemap_video_enable_callback' ), // Callback
1467
- 'seopress-settings-admin-xml-sitemap-general', // Page
1468
- 'seopress_setting_section_xml_sitemap_general' // Section
1469
- );
1470
- }
1471
-
1472
- add_settings_field(
1473
- 'seopress_xml_sitemap_author_enable', // ID
1474
- __("Enable Author Sitemap","wp-seopress"), // Title
1475
- array( $this, 'seopress_xml_sitemap_author_enable_callback' ), // Callback
1476
- 'seopress-settings-admin-xml-sitemap-general', // Page
1477
- 'seopress_setting_section_xml_sitemap_general' // Section
1478
- );
1479
-
1480
- add_settings_field(
1481
- 'seopress_xml_sitemap_html_enable', // ID
1482
- __("Enable HTML Sitemap","wp-seopress"), // Title
1483
- array( $this, 'seopress_xml_sitemap_html_enable_callback' ), // Callback
1484
- 'seopress-settings-admin-xml-sitemap-general', // Page
1485
- 'seopress_setting_section_xml_sitemap_general' // Section
1486
- );
1487
-
1488
- add_settings_section(
1489
- 'seopress_setting_section_xml_sitemap_post_types', // ID
1490
- '',
1491
- //__("Post Types","wp-seopress"), // Title
1492
- array( $this, 'print_section_info_xml_sitemap_post_types' ), // Callback
1493
- 'seopress-settings-admin-xml-sitemap-post-types' // Page
1494
- );
1495
-
1496
- add_settings_field(
1497
- 'seopress_xml_sitemap_post_types_list', // ID
1498
- __("Check to INCLUDE Post Types","wp-seopress"), // Title
1499
- array( $this, 'seopress_xml_sitemap_post_types_list_callback' ), // Callback
1500
- 'seopress-settings-admin-xml-sitemap-post-types', // Page
1501
- 'seopress_setting_section_xml_sitemap_post_types' // Section
1502
- );
1503
-
1504
- add_settings_section(
1505
- 'seopress_setting_section_xml_sitemap_taxonomies', // ID
1506
- '',
1507
- //__("Taxonomies","wp-seopress"), // Title
1508
- array( $this, 'print_section_info_xml_sitemap_taxonomies' ), // Callback
1509
- 'seopress-settings-admin-xml-sitemap-taxonomies' // Page
1510
- );
1511
-
1512
- add_settings_field(
1513
- 'seopress_xml_sitemap_taxonomies_list', // ID
1514
- __("Check to INCLUDE Taxonomies","wp-seopress"), // Title
1515
- array( $this, 'seopress_xml_sitemap_taxonomies_list_callback' ), // Callback
1516
- 'seopress-settings-admin-xml-sitemap-taxonomies', // Page
1517
- 'seopress_setting_section_xml_sitemap_taxonomies' // Section
1518
- );
1519
-
1520
- add_settings_section(
1521
- 'seopress_setting_section_html_sitemap', // ID
1522
- '',
1523
- //__("HTML Sitemap","wp-seopress"), // Title
1524
- array( $this, 'print_section_info_html_sitemap' ), // Callback
1525
- 'seopress-settings-admin-html-sitemap' // Page
1526
- );
1527
-
1528
- add_settings_field(
1529
- 'seopress_xml_sitemap_html_mapping', // ID
1530
- __("Enter a post, page or custom post type ID(s) to display the sitemap","wp-seopress"), // Title
1531
- array( $this, 'seopress_xml_sitemap_html_mapping_callback' ), // Callback
1532
- 'seopress-settings-admin-html-sitemap', // Page
1533
- 'seopress_setting_section_html_sitemap' // Section
1534
- );
1535
-
1536
- add_settings_field(
1537
- 'seopress_xml_sitemap_html_exclude', // ID
1538
- __("Exclude some Posts, Pages, Custom Post Types or Terms IDs","wp-seopress"), // Title
1539
- array( $this, 'seopress_xml_sitemap_html_exclude_callback' ), // Callback
1540
- 'seopress-settings-admin-html-sitemap', // Page
1541
- 'seopress_setting_section_html_sitemap' // Section
1542
- );
1543
-
1544
- add_settings_field(
1545
- 'seopress_xml_sitemap_html_order', // ID
1546
- __("Sort order","wp-seopress"), // Title
1547
- array( $this, 'seopress_xml_sitemap_html_order_callback' ), // Callback
1548
- 'seopress-settings-admin-html-sitemap', // Page
1549
- 'seopress_setting_section_html_sitemap' // Section
1550
- );
1551
-
1552
- add_settings_field(
1553
- 'seopress_xml_sitemap_html_orderby', // ID
1554
- __("Order posts by","wp-seopress"), // Title
1555
- array( $this, 'seopress_xml_sitemap_html_orderby_callback' ), // Callback
1556
- 'seopress-settings-admin-html-sitemap', // Page
1557
- 'seopress_setting_section_html_sitemap' // Section
1558
- );
1559
-
1560
- add_settings_field(
1561
- 'seopress_xml_sitemap_html_date', // ID
1562
- __("Disable the display of the publication date","wp-seopress"), // Title
1563
- array( $this, 'seopress_xml_sitemap_html_date_callback' ), // Callback
1564
- 'seopress-settings-admin-html-sitemap', // Page
1565
- 'seopress_setting_section_html_sitemap' // Section
1566
- );
1567
-
1568
- //Knowledge graph SECTION======================================================================
1569
- add_settings_section(
1570
- 'seopress_setting_section_social_knowledge', // ID
1571
- '',
1572
- //__("Knowledge graph","wp-seopress"), // Title
1573
- array( $this, 'print_section_info_social_knowledge' ), // Callback
1574
- 'seopress-settings-admin-social-knowledge' // Page
1575
- );
1576
-
1577
- add_settings_field(
1578
- 'seopress_social_knowledge_type', // ID
1579
- __("Person or organization","wp-seopress"), // Title
1580
- array( $this, 'seopress_social_knowledge_type_callback' ), // Callback
1581
- 'seopress-settings-admin-social-knowledge', // Page
1582
- 'seopress_setting_section_social_knowledge' // Section
1583
- );
1584
-
1585
- add_settings_field(
1586
- 'seopress_social_knowledge_name', // ID
1587
- __("Your name/organization","wp-seopress"), // Title
1588
- array( $this, 'seopress_social_knowledge_name_callback' ), // Callback
1589
- 'seopress-settings-admin-social-knowledge', // Page
1590
- 'seopress_setting_section_social_knowledge' // Section
1591
- );
1592
-
1593
- add_settings_field(
1594
- 'seopress_social_knowledge_img', // ID
1595
- __("Your photo/organization logo","wp-seopress"), // Title
1596
- array( $this, 'seopress_social_knowledge_img_callback' ), // Callback
1597
- 'seopress-settings-admin-social-knowledge', // Page
1598
- 'seopress_setting_section_social_knowledge' // Section
1599
- );
1600
-
1601
- add_settings_field(
1602
- 'seopress_social_knowledge_phone', // ID
1603
- __("Organization's phone number (only for Organizations)","wp-seopress"), // Title
1604
- array( $this, 'seopress_social_knowledge_phone_callback' ), // Callback
1605
- 'seopress-settings-admin-social-knowledge', // Page
1606
- 'seopress_setting_section_social_knowledge' // Section
1607
- );
1608
-
1609
- add_settings_field(
1610
- 'seopress_social_knowledge_contact_type', // ID
1611
- __("Contact type (only for Organizations)","wp-seopress"), // Title
1612
- array( $this, 'seopress_social_knowledge_contact_type_callback' ), // Callback
1613
- 'seopress-settings-admin-social-knowledge', // Page
1614
- 'seopress_setting_section_social_knowledge' // Section
1615
- );
1616
-
1617
- add_settings_field(
1618
- 'seopress_social_knowledge_contact_option', // ID
1619
- __("Contact option (only for Organizations)","wp-seopress"), // Title
1620
- array( $this, 'seopress_social_knowledge_contact_option_callback' ), // Callback
1621
- 'seopress-settings-admin-social-knowledge', // Page
1622
- 'seopress_setting_section_social_knowledge' // Section
1623
- );
1624
-
1625
- //Social SECTION=====================================================================================
1626
- add_settings_section(
1627
- 'seopress_setting_section_social_accounts', // ID
1628
- '',
1629
- //__("Social","wp-seopress"), // Title
1630
- array( $this, 'print_section_info_social_accounts' ), // Callback
1631
- 'seopress-settings-admin-social-accounts' // Page
1632
- );
1633
-
1634
- add_settings_field(
1635
- 'seopress_social_accounts_facebook', // ID
1636
- __("Facebook Page URL","wp-seopress"), // Title
1637
- array( $this, 'seopress_social_accounts_facebook_callback' ), // Callback
1638
- 'seopress-settings-admin-social-accounts', // Page
1639
- 'seopress_setting_section_social_accounts' // Section
1640
- );
1641
-
1642
- add_settings_field(
1643
- 'seopress_social_accounts_twitter', // ID
1644
- __("Twitter Username","wp-seopress"), // Title
1645
- array( $this, 'seopress_social_accounts_twitter_callback' ), // Callback
1646
- 'seopress-settings-admin-social-accounts', // Page
1647
- 'seopress_setting_section_social_accounts' // Section
1648
- );
1649
-
1650
- add_settings_field(
1651
- 'seopress_social_accounts_pinterest', // ID
1652
- __("Pinterest URL","wp-seopress"), // Title
1653
- array( $this, 'seopress_social_accounts_pinterest_callback' ), // Callback
1654
- 'seopress-settings-admin-social-accounts', // Page
1655
- 'seopress_setting_section_social_accounts' // Section
1656
- );
1657
-
1658
- add_settings_field(
1659
- 'seopress_social_accounts_instagram', // ID
1660
- __("Instagram URL","wp-seopress"), // Title
1661
- array( $this, 'seopress_social_accounts_instagram_callback' ), // Callback
1662
- 'seopress-settings-admin-social-accounts', // Page
1663
- 'seopress_setting_section_social_accounts' // Section
1664
- );
1665
-
1666
- add_settings_field(
1667
- 'seopress_social_accounts_youtube', // ID
1668
- __("YouTube URL","wp-seopress"), // Title
1669
- array( $this, 'seopress_social_accounts_youtube_callback' ), // Callback
1670
- 'seopress-settings-admin-social-accounts', // Page
1671
- 'seopress_setting_section_social_accounts' // Section
1672
- );
1673
-
1674
- add_settings_field(
1675
- 'seopress_social_accounts_linkedin', // ID
1676
- __("LinkedIn URL","wp-seopress"), // Title
1677
- array( $this, 'seopress_social_accounts_linkedin_callback' ), // Callback
1678
- 'seopress-settings-admin-social-accounts', // Page
1679
- 'seopress_setting_section_social_accounts' // Section
1680
- );
1681
-
1682
- add_settings_field(
1683
- 'seopress_social_accounts_myspace', // ID
1684
- __("MySpace URL","wp-seopress"), // Title
1685
- array( $this, 'seopress_social_accounts_myspace_callback' ), // Callback
1686
- 'seopress-settings-admin-social-accounts', // Page
1687
- 'seopress_setting_section_social_accounts' // Section
1688
- );
1689
-
1690
- add_settings_field(
1691
- 'seopress_social_accounts_soundcloud', // ID
1692
- __("Soundcloud URL","wp-seopress"), // Title
1693
- array( $this, 'seopress_social_accounts_soundcloud_callback' ), // Callback
1694
- 'seopress-settings-admin-social-accounts', // Page
1695
- 'seopress_setting_section_social_accounts' // Section
1696
- );
1697
-
1698
- add_settings_field(
1699
- 'seopress_social_accounts_tumblr', // ID
1700
- __("Tumblr URL","wp-seopress"), // Title
1701
- array( $this, 'seopress_social_accounts_tumblr_callback' ), // Callback
1702
- 'seopress-settings-admin-social-accounts', // Page
1703
- 'seopress_setting_section_social_accounts' // Section
1704
- );
1705
-
1706
- //Facebook SECTION=========================================================================
1707
- add_settings_section(
1708
- 'seopress_setting_section_social_facebook', // ID
1709
- '',
1710
- //__("Facebook","wp-seopress"), // Title
1711
- array( $this, 'print_section_info_social_facebook' ), // Callback
1712
- 'seopress-settings-admin-social-facebook' // Page
1713
- );
1714
-
1715
- add_settings_field(
1716
- 'seopress_social_facebook_og', // ID
1717
- __("Enable Open Graph Data","wp-seopress"), // Title
1718
- array( $this, 'seopress_social_facebook_og_callback' ), // Callback
1719
- 'seopress-settings-admin-social-facebook', // Page
1720
- 'seopress_setting_section_social_facebook' // Section
1721
- );
1722
-
1723
- add_settings_field(
1724
- 'seopress_social_facebook_img', // ID
1725
- __("Select a default image","wp-seopress"), // Title
1726
- array( $this, 'seopress_social_facebook_img_callback' ), // Callback
1727
- 'seopress-settings-admin-social-facebook', // Page
1728
- 'seopress_setting_section_social_facebook' // Section
1729
- );
1730
-
1731
- add_settings_field(
1732
- 'seopress_social_facebook_img_default', // ID
1733
- __("Apply this image to all your og:image tag","wp-seopress"), // Title
1734
- array( $this, 'seopress_social_facebook_img_default_callback' ), // Callback
1735
- 'seopress-settings-admin-social-facebook', // Page
1736
- 'seopress_setting_section_social_facebook' // Section
1737
- );
1738
-
1739
- add_settings_field(
1740
- 'seopress_social_facebook_link_ownership_id', // ID
1741
- __("Facebook Link Ownership ID","wp-seopress"), // Title
1742
- array( $this, 'seopress_social_facebook_link_ownership_id_callback' ), // Callback
1743
- 'seopress-settings-admin-social-facebook', // Page
1744
- 'seopress_setting_section_social_facebook' // Section
1745
- );
1746
-
1747
- add_settings_field(
1748
- 'seopress_social_facebook_admin_id', // ID
1749
- __("Facebook Admin ID","wp-seopress"), // Title
1750
- array( $this, 'seopress_social_facebook_admin_id_callback' ), // Callback
1751
- 'seopress-settings-admin-social-facebook', // Page
1752
- 'seopress_setting_section_social_facebook' // Section
1753
- );
1754
-
1755
- add_settings_field(
1756
- 'seopress_social_facebook_app_id', // ID
1757
- __("Facebook App ID","wp-seopress"), // Title
1758
- array( $this, 'seopress_social_facebook_app_id_callback' ), // Callback
1759
- 'seopress-settings-admin-social-facebook', // Page
1760
- 'seopress_setting_section_social_facebook' // Section
1761
- );
1762
-
1763
- //Twitter SECTION==========================================================================
1764
- add_settings_section(
1765
- 'seopress_setting_section_social_twitter', // ID
1766
- '',
1767
- //__("Twitter","wp-seopress"), // Title
1768
- array( $this, 'print_section_info_social_twitter' ), // Callback
1769
- 'seopress-settings-admin-social-twitter' // Page
1770
- );
1771
-
1772
- add_settings_field(
1773
- 'seopress_social_twitter_card', // ID
1774
- __("Enable Twitter Card","wp-seopress"), // Title
1775
- array( $this, 'seopress_social_twitter_card_callback' ), // Callback
1776
- 'seopress-settings-admin-social-twitter', // Page
1777
- 'seopress_setting_section_social_twitter' // Section
1778
- );
1779
-
1780
- add_settings_field(
1781
- 'seopress_social_twitter_card_og', // ID
1782
- __("Use Open Graph if no Twitter Card is filled","wp-seopress"), // Title
1783
- array( $this, 'seopress_social_twitter_card_og_callback' ), // Callback
1784
- 'seopress-settings-admin-social-twitter', // Page
1785
- 'seopress_setting_section_social_twitter' // Section
1786
- );
1787
-
1788
- add_settings_field(
1789
- 'seopress_social_twitter_card_img', // ID
1790
- __("Default Twitter Image","wp-seopress"), // Title
1791
- array( $this, 'seopress_social_twitter_card_img_callback' ), // Callback
1792
- 'seopress-settings-admin-social-twitter', // Page
1793
- 'seopress_setting_section_social_twitter' // Section
1794
- );
1795
-
1796
- add_settings_field(
1797
- 'seopress_social_twitter_card_img_size', // ID
1798
- __("Image size for Twitter Summary card","wp-seopress"), // Title
1799
- array( $this, 'seopress_social_twitter_card_img_size_callback' ), // Callback
1800
- 'seopress-settings-admin-social-twitter', // Page
1801
- 'seopress_setting_section_social_twitter' // Section
1802
- );
1803
-
1804
- //Google Analytics Enable SECTION==========================================================
1805
- add_settings_section(
1806
- 'seopress_setting_section_google_analytics_enable', // ID
1807
- '',
1808
- //__("Google Analytics","wp-seopress"), // Title
1809
- array( $this, 'print_section_info_google_analytics_enable' ), // Callback
1810
- 'seopress-settings-admin-google-analytics-enable' // Page
1811
- );
1812
-
1813
- add_settings_field(
1814
- 'seopress_google_analytics_enable', // ID
1815
- __("Enable Google Analytics tracking","wp-seopress"), // Title
1816
- array( $this, 'seopress_google_analytics_enable_callback' ), // Callback
1817
- 'seopress-settings-admin-google-analytics-enable', // Page
1818
- 'seopress_setting_section_google_analytics_enable' // Section
1819
- );
1820
-
1821
- add_settings_field(
1822
- 'seopress_google_analytics_ua', // ID
1823
- __("Enter your tracking ID","wp-seopress"), // Title
1824
- array( $this, 'seopress_google_analytics_ua_callback' ), // Callback
1825
- 'seopress-settings-admin-google-analytics-enable', // Page
1826
- 'seopress_setting_section_google_analytics_enable' // Section
1827
- );
1828
-
1829
- add_settings_field(
1830
- 'seopress_google_analytics_roles', // ID
1831
- __("Exclude user roles from tracking","wp-seopress"), // Title
1832
- array( $this, 'seopress_google_analytics_roles_callback' ), // Callback
1833
- 'seopress-settings-admin-google-analytics-enable', // Page
1834
- 'seopress_setting_section_google_analytics_enable' // Section
1835
- );
1836
-
1837
- //Cookie bar / GDPR SECTION================================================================
1838
- add_settings_section(
1839
- 'seopress_setting_section_google_analytics_gdpr', // ID
1840
- '',
1841
- //__("Google Analytics","wp-seopress"), // Title
1842
- array( $this, 'print_section_info_google_analytics_gdpr' ), // Callback
1843
- 'seopress-settings-admin-google-analytics-gdpr' // Page
1844
- );
1845
-
1846
- add_settings_field(
1847
- 'seopress_google_analytics_disable', // ID
1848
- __("Analytics tracking opt-in","wp-seopress"), // Title
1849
- array( $this, 'seopress_google_analytics_disable_callback' ), // Callback
1850
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1851
- 'seopress_setting_section_google_analytics_gdpr' // Section
1852
- );
1853
-
1854
- add_settings_field(
1855
- 'seopress_google_analytics_half_disable', // ID
1856
- '', // Title
1857
- array( $this, 'seopress_google_analytics_half_disable_callback' ), // Callback
1858
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1859
- 'seopress_setting_section_google_analytics_gdpr' // Section
1860
- );
1861
-
1862
- add_settings_field(
1863
- 'seopress_google_analytics_opt_out_msg', // ID
1864
- __("Consent message for user tracking","wp-seopress"), // Title
1865
- array( $this, 'seopress_google_analytics_opt_out_msg_callback' ), // Callback
1866
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1867
- 'seopress_setting_section_google_analytics_gdpr' // Section
1868
- );
1869
-
1870
- add_settings_field(
1871
- 'seopress_google_analytics_opt_out_msg_ok', // ID
1872
- __("Accept button for user tracking","wp-seopress"), // Title
1873
- array( $this, 'seopress_google_analytics_opt_out_msg_ok_callback' ), // Callback
1874
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1875
- 'seopress_setting_section_google_analytics_gdpr' // Section
1876
- );
1877
-
1878
- add_settings_field(
1879
- 'seopress_google_analytics_opt_out_msg_close', // ID
1880
- __("Close button","wp-seopress"), // Title
1881
- array( $this, 'seopress_google_analytics_opt_out_msg_close_callback' ), // Callback
1882
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1883
- 'seopress_setting_section_google_analytics_gdpr' // Section
1884
- );
1885
-
1886
- add_settings_field(
1887
- 'seopress_google_analytics_cb_pos', // ID
1888
- __("Cookie bar position","wp-seopress"), // Title
1889
- array( $this, 'seopress_google_analytics_cb_pos_callback' ), // Callback
1890
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1891
- 'seopress_setting_section_google_analytics_gdpr' // Section
1892
- );
1893
-
1894
- add_settings_field(
1895
- 'seopress_google_analytics_cb_bg', // ID
1896
- __("Cookie bar background color","wp-seopress"), // Title
1897
- array( $this, 'seopress_google_analytics_cb_bg_callback' ), // Callback
1898
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1899
- 'seopress_setting_section_google_analytics_gdpr' // Section
1900
- );
1901
-
1902
- add_settings_field(
1903
- 'seopress_google_analytics_cb_txt_col', // ID
1904
- __("Cookie bar text color","wp-seopress"), // Title
1905
- array( $this, 'seopress_google_analytics_cb_txt_col_callback' ), // Callback
1906
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1907
- 'seopress_setting_section_google_analytics_gdpr' // Section
1908
- );
1909
-
1910
- add_settings_field(
1911
- 'seopress_google_analytics_cb_lk_col', // ID
1912
- __("Cookie bar link color","wp-seopress"), // Title
1913
- array( $this, 'seopress_google_analytics_cb_lk_col_callback' ), // Callback
1914
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1915
- 'seopress_setting_section_google_analytics_gdpr' // Section
1916
- );
1917
-
1918
- add_settings_field(
1919
- 'seopress_google_analytics_cb_btn_bg', // ID
1920
- __("Cookie bar button background color","wp-seopress"), // Title
1921
- array( $this, 'seopress_google_analytics_cb_btn_bg_callback' ), // Callback
1922
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1923
- 'seopress_setting_section_google_analytics_gdpr' // Section
1924
- );
1925
-
1926
- add_settings_field(
1927
- 'seopress_google_analytics_cb_btn_col', // ID
1928
- __("Cookie bar button color","wp-seopress"), // Title
1929
- array( $this, 'seopress_google_analytics_cb_btn_col_callback' ), // Callback
1930
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1931
- 'seopress_setting_section_google_analytics_gdpr' // Section
1932
- );
1933
-
1934
- add_settings_field(
1935
- 'seopress_google_analytics_cb_btn_bg_hov', // ID
1936
- __("Cookie bar button hover background color","wp-seopress"), // Title
1937
- array( $this, 'seopress_google_analytics_cb_btn_bg_hov_callback' ), // Callback
1938
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1939
- 'seopress_setting_section_google_analytics_gdpr' // Section
1940
- );
1941
-
1942
- add_settings_field(
1943
- 'seopress_google_analytics_cb_btn_col_hov', // ID
1944
- __("Cookie bar button hover color","wp-seopress"), // Title
1945
- array( $this, 'seopress_google_analytics_cb_btn_col_hov_callback' ), // Callback
1946
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1947
- 'seopress_setting_section_google_analytics_gdpr' // Section
1948
- );
1949
-
1950
- add_settings_field(
1951
- 'seopress_google_analytics_cb_btn_sec_bg', // ID
1952
- __("Cookie bar secondary button background color","wp-seopress"), // Title
1953
- array( $this, 'seopress_google_analytics_cb_btn_sec_bg_callback' ), // Callback
1954
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1955
- 'seopress_setting_section_google_analytics_gdpr' // Section
1956
- );
1957
-
1958
- add_settings_field(
1959
- 'seopress_google_analytics_cb_btn_sec_col', // ID
1960
- __("Cookie bar secondary button color","wp-seopress"), // Title
1961
- array( $this, 'seopress_google_analytics_cb_btn_sec_col_callback' ), // Callback
1962
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1963
- 'seopress_setting_section_google_analytics_gdpr' // Section
1964
- );
1965
-
1966
- add_settings_field(
1967
- 'seopress_google_analytics_cb_btn_sec_bg_hov', // ID
1968
- __("Cookie bar secondary button hover background color","wp-seopress"), // Title
1969
- array( $this, 'seopress_google_analytics_cb_btn_sec_bg_hov_callback' ), // Callback
1970
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1971
- 'seopress_setting_section_google_analytics_gdpr' // Section
1972
- );
1973
-
1974
- add_settings_field(
1975
- 'seopress_google_analytics_cb_btn_sec_col_hov', // ID
1976
- __("Cookie bar secondary button hover color","wp-seopress"), // Title
1977
- array( $this, 'seopress_google_analytics_cb_btn_sec_col_hov_callback' ), // Callback
1978
- 'seopress-settings-admin-google-analytics-gdpr', // Page
1979
- 'seopress_setting_section_google_analytics_gdpr' // Section
1980
- );
1981
-
1982
- //Google Analytics Tracking SECTION========================================================
1983
-
1984
- add_settings_section(
1985
- 'seopress_setting_section_google_analytics_features', // ID
1986
- '',
1987
- //__("Google Analytics","wp-seopress"), // Title
1988
- array( $this, 'print_section_info_google_analytics_features' ), // Callback
1989
- 'seopress-settings-admin-google-analytics-features' // Page
1990
- );
1991
-
1992
- add_settings_field(
1993
- 'seopress_google_analytics_optimize', // ID
1994
- __("Enable Google Optimize","wp-seopress"), // Title
1995
- array( $this, 'seopress_google_analytics_optimize_callback' ), // Callback
1996
- 'seopress-settings-admin-google-analytics-features', // Page
1997
- 'seopress_setting_section_google_analytics_features' // Section
1998
- );
1999
-
2000
- add_settings_field(
2001
- 'seopress_google_analytics_ads', // ID
2002
- __("Enable Google Ads","wp-seopress"), // Title
2003
- array( $this, 'seopress_google_analytics_ads_callback' ), // Callback
2004
- 'seopress-settings-admin-google-analytics-features', // Page
2005
- 'seopress_setting_section_google_analytics_features' // Section
2006
- );
2007
-
2008
- add_settings_field(
2009
- 'seopress_google_analytics_other_tracking', // ID
2010
- __("Add an additional tracking code (like Facebook Pixel, Hotjar...)","wp-seopress"), // Title
2011
- array( $this, 'seopress_google_analytics_other_tracking_callback' ), // Callback
2012
- 'seopress-settings-admin-google-analytics-features', // Page
2013
- 'seopress_setting_section_google_analytics_features' // Section
2014
- );
2015
-
2016
- add_settings_field(
2017
- 'seopress_google_analytics_other_tracking_body', // ID
2018
- __("[BODY] Add an additional tracking code (like Google Tag Manager...)","wp-seopress"), // Title
2019
- array( $this, 'seopress_google_analytics_other_tracking_body_callback' ), // Callback
2020
- 'seopress-settings-admin-google-analytics-features', // Page
2021
- 'seopress_setting_section_google_analytics_features' // Section
2022
- );
2023
-
2024
- add_settings_field(
2025
- 'seopress_google_analytics_other_tracking_footer', // ID
2026
- __("[BODY (FOOTER)] Add an additional tracking code (like Google Tag Manager...)","wp-seopress"), // Title
2027
- array( $this, 'seopress_google_analytics_other_tracking_footer_callback' ), // Callback
2028
- 'seopress-settings-admin-google-analytics-features', // Page
2029
- 'seopress_setting_section_google_analytics_features' // Section
2030
- );
2031
-
2032
- add_settings_field(
2033
- 'seopress_google_analytics_remarketing', // ID
2034
- __("Enable remarketing, demographics, and interests reporting","wp-seopress"), // Title
2035
- array( $this, 'seopress_google_analytics_remarketing_callback' ), // Callback
2036
- 'seopress-settings-admin-google-analytics-features', // Page
2037
- 'seopress_setting_section_google_analytics_features' // Section
2038
- );
2039
-
2040
- add_settings_field(
2041
- 'seopress_google_analytics_ip_anonymization', // ID
2042
- __("Enable IP Anonymization","wp-seopress"), // Title
2043
- array( $this, 'seopress_google_analytics_ip_anonymization_callback' ), // Callback
2044
- 'seopress-settings-admin-google-analytics-features', // Page
2045
- 'seopress_setting_section_google_analytics_features' // Section
2046
- );
2047
-
2048
- add_settings_field(
2049
- 'seopress_google_analytics_link_attribution', // ID
2050
- __("Enhanced Link Attribution","wp-seopress"), // Title
2051
- array( $this, 'seopress_google_analytics_link_attribution_callback' ), // Callback
2052
- 'seopress-settings-admin-google-analytics-features', // Page
2053
- 'seopress_setting_section_google_analytics_features' // Section
2054
- );
2055
-
2056
- add_settings_field(
2057
- 'seopress_google_analytics_cross_domain_enable', // ID
2058
- __("Enable cross-domain tracking","wp-seopress"), // Title
2059
- array( $this, 'seopress_google_analytics_cross_enable_callback' ), // Callback
2060
- 'seopress-settings-admin-google-analytics-features', // Page
2061
- 'seopress_setting_section_google_analytics_features' // Section
2062
- );
2063
-
2064
- add_settings_field(
2065
- 'seopress_google_analytics_cross_domain', // ID
2066
- __("Cross domains","wp-seopress"), // Title
2067
- array( $this, 'seopress_google_analytics_cross_domain_callback' ), // Callback
2068
- 'seopress-settings-admin-google-analytics-features', // Page
2069
- 'seopress_setting_section_google_analytics_features' // Section
2070
- );
2071
-
2072
- //Google Analytics Events SECTION==========================================================
2073
-
2074
- add_settings_section(
2075
- 'seopress_setting_section_google_analytics_events', // ID
2076
- '',
2077
- //__("Google Analytics","wp-seopress"), // Title
2078
- array( $this, 'print_section_info_google_analytics_events' ), // Callback
2079
- 'seopress-settings-admin-google-analytics-events' // Page
2080
- );
2081
-
2082
- add_settings_field(
2083
- 'seopress_google_analytics_link_tracking_enable', // ID
2084
- __("Enable external links tracking","wp-seopress"), // Title
2085
- array( $this, 'seopress_google_analytics_link_tracking_enable_callback' ), // Callback
2086
- 'seopress-settings-admin-google-analytics-events', // Page
2087
- 'seopress_setting_section_google_analytics_events' // Section
2088
- );
2089
-
2090
- add_settings_field(
2091
- 'seopress_google_analytics_download_tracking_enable', // ID
2092
- __("Enable downloads tracking (eg: PDF, XLSX, DOCX...)","wp-seopress"), // Title
2093
- array( $this, 'seopress_google_analytics_download_tracking_enable_callback' ), // Callback
2094
- 'seopress-settings-admin-google-analytics-events', // Page
2095
- 'seopress_setting_section_google_analytics_events' // Section
2096
- );
2097
-
2098
- add_settings_field(
2099
- 'seopress_google_analytics_download_tracking', // ID
2100
- __("Track downloads' clicks","wp-seopress"), // Title
2101
- array( $this, 'seopress_google_analytics_download_tracking_callback' ), // Callback
2102
- 'seopress-settings-admin-google-analytics-events', // Page
2103
- 'seopress_setting_section_google_analytics_events' // Section
2104
- );
2105
-
2106
- add_settings_field(
2107
- 'seopress_google_analytics_affiliate_tracking_enable', // ID
2108
- __("Enable affiliate/outbound links tracking (eg: aff, go, out, recommends)","wp-seopress"), // Title
2109
- array( $this, 'seopress_google_analytics_affiliate_tracking_enable_callback' ), // Callback
2110
- 'seopress-settings-admin-google-analytics-events', // Page
2111
- 'seopress_setting_section_google_analytics_events' // Section
2112
- );
2113
-
2114
- add_settings_field(
2115
- 'seopress_google_analytics_affiliate_tracking', // ID
2116
- __("Track affiliate/outbound links","wp-seopress"), // Title
2117
- array( $this, 'seopress_google_analytics_affiliate_tracking_callback' ), // Callback
2118
- 'seopress-settings-admin-google-analytics-events', // Page
2119
- 'seopress_setting_section_google_analytics_events' // Section
2120
- );
2121
-
2122
- //Google Analytics Custom Dimensions SECTION===============================================
2123
-
2124
- add_settings_section(
2125
- 'seopress_setting_section_google_analytics_custom_dimensions', // ID
2126
- '',
2127
- //__("Google Analytics","wp-seopress"), // Title
2128
- array( $this, 'print_section_info_google_analytics_custom_dimensions' ), // Callback
2129
- 'seopress-settings-admin-google-analytics-custom-dimensions' // Page
2130
- );
2131
-
2132
- add_settings_field(
2133
- 'seopress_google_analytics_cd_author', // ID
2134
- __("Track Authors","wp-seopress"), // Title
2135
- array( $this, 'seopress_google_analytics_cd_author_callback' ), // Callback
2136
- 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2137
- 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2138
- );
2139
-
2140
- add_settings_field(
2141
- 'seopress_google_analytics_cd_category', // ID
2142
- __("Track Categories","wp-seopress"), // Title
2143
- array( $this, 'seopress_google_analytics_cd_category_callback' ), // Callback
2144
- 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2145
- 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2146
- );
2147
-
2148
- add_settings_field(
2149
- 'seopress_google_analytics_cd_tag', // ID
2150
- __("Track Tags","wp-seopress"), // Title
2151
- array( $this, 'seopress_google_analytics_cd_tag_callback' ), // Callback
2152
- 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2153
- 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2154
- );
2155
-
2156
- add_settings_field(
2157
- 'seopress_google_analytics_cd_post_type', // ID
2158
- __("Track Post Types","wp-seopress"), // Title
2159
- array( $this, 'seopress_google_analytics_cd_post_type_callback' ), // Callback
2160
- 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2161
- 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2162
- );
2163
-
2164
- add_settings_field(
2165
- 'seopress_google_analytics_cd_logged_in_user', // ID
2166
- __("Track Logged In Users","wp-seopress"), // Title
2167
- array( $this, 'seopress_google_analytics_cd_logged_in_user_callback' ), // Callback
2168
- 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2169
- 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2170
- );
2171
-
2172
- //Matomo SECTION===========================================================================
2173
- add_settings_section(
2174
- 'seopress_setting_section_google_analytics_matomo', // ID
2175
- '',
2176
- //__("Google Analytics","wp-seopress"), // Title
2177
- array( $this, 'print_section_info_google_analytics_matomo' ), // Callback
2178
- 'seopress-settings-admin-google-analytics-matomo' // Page
2179
- );
2180
-
2181
- add_settings_field(
2182
- 'seopress_google_analytics_matomo_enable', // ID
2183
- __("Enable Matomo tracking","wp-seopress"), // Title
2184
- array( $this, 'seopress_google_analytics_matomo_enable_callback' ), // Callback
2185
- 'seopress-settings-admin-google-analytics-matomo', // Page
2186
- 'seopress_setting_section_google_analytics_matomo' // Section
2187
- );
2188
-
2189
- add_settings_field(
2190
- 'seopress_google_analytics_matomo_id', // ID
2191
- __("Enter your tracking ID","wp-seopress"), // Title
2192
- array( $this, 'seopress_google_analytics_matomo_id_callback' ), // Callback
2193
- 'seopress-settings-admin-google-analytics-matomo', // Page
2194
- 'seopress_setting_section_google_analytics_matomo' // Section
2195
- );
2196
-
2197
- add_settings_field(
2198
- 'seopress_google_analytics_matomo_site_id', // ID
2199
- __("Enter your site ID","wp-seopress"), // Title
2200
- array( $this, 'seopress_google_analytics_matomo_site_id_callback' ), // Callback
2201
- 'seopress-settings-admin-google-analytics-matomo', // Page
2202
- 'seopress_setting_section_google_analytics_matomo' // Section
2203
- );
2204
-
2205
- add_settings_field(
2206
- 'seopress_google_analytics_matomo_subdomains', // ID
2207
- __("Track visitors across all subdomains","wp-seopress"), // Title
2208
- array( $this, 'seopress_google_analytics_matomo_subdomains_callback' ), // Callback
2209
- 'seopress-settings-admin-google-analytics-matomo', // Page
2210
- 'seopress_setting_section_google_analytics_matomo' // Section
2211
- );
2212
-
2213
- add_settings_field(
2214
- 'seopress_google_analytics_matomo_site_domain', // ID
2215
- __("Prepend the site domain","wp-seopress"), // Title
2216
- array( $this, 'seopress_google_analytics_matomo_site_domain_callback' ), // Callback
2217
- 'seopress-settings-admin-google-analytics-matomo', // Page
2218
- 'seopress_setting_section_google_analytics_matomo' // Section
2219
- );
2220
-
2221
- add_settings_field(
2222
- 'seopress_google_analytics_matomo_no_js', // ID
2223
- __("Track users with JavaScript disabled","wp-seopress"), // Title
2224
- array( $this, 'seopress_google_analytics_matomo_no_js_callback' ), // Callback
2225
- 'seopress-settings-admin-google-analytics-matomo', // Page
2226
- 'seopress_setting_section_google_analytics_matomo' // Section
2227
- );
2228
-
2229
- add_settings_field(
2230
- 'seopress_google_analytics_matomo_cross_domain', // ID
2231
- __("Enables cross domain linking","wp-seopress"), // Title
2232
- array( $this, 'seopress_google_analytics_matomo_cross_domain_callback' ), // Callback
2233
- 'seopress-settings-admin-google-analytics-matomo', // Page
2234
- 'seopress_setting_section_google_analytics_matomo' // Section
2235
- );
2236
-
2237
- add_settings_field(
2238
- 'seopress_google_analytics_matomo_cross_domain_sites', // ID
2239
- __("Cross domain","wp-seopress"), // Title
2240
- array( $this, 'seopress_google_analytics_matomo_cross_domain_sites_callback' ), // Callback
2241
- 'seopress-settings-admin-google-analytics-matomo', // Page
2242
- 'seopress_setting_section_google_analytics_matomo' // Section
2243
- );
2244
- add_settings_field(
2245
- 'seopress_google_analytics_matomo_dnt', // ID
2246
- __("Enable DoNotTrack detection","wp-seopress"), // Title
2247
- array( $this, 'seopress_google_analytics_matomo_dnt_callback' ), // Callback
2248
- 'seopress-settings-admin-google-analytics-matomo', // Page
2249
- 'seopress_setting_section_google_analytics_matomo' // Section
2250
- );
2251
-
2252
- add_settings_field(
2253
- 'seopress_google_analytics_matomo_no_cookies', // ID
2254
- __("Disable all tracking cookies","wp-seopress"), // Title
2255
- array( $this, 'seopress_google_analytics_matomo_no_cookies_callback' ), // Callback
2256
- 'seopress-settings-admin-google-analytics-matomo', // Page
2257
- 'seopress_setting_section_google_analytics_matomo' // Section
2258
- );
2259
-
2260
- add_settings_field(
2261
- 'seopress_google_analytics_matomo_link_tracking', // ID
2262
- __("Download & Outlink tracking","wp-seopress"), // Title
2263
- array( $this, 'seopress_google_analytics_matomo_link_tracking_callback' ), // Callback
2264
- 'seopress-settings-admin-google-analytics-matomo', // Page
2265
- 'seopress_setting_section_google_analytics_matomo' // Section
2266
- );
2267
-
2268
- //Advanced SECTION=========================================================================
2269
- add_settings_section(
2270
- 'seopress_setting_section_advanced_advanced', // ID
2271
- '',
2272
- //__("Advanced","wp-seopress"), // Title
2273
- array( $this, 'print_section_info_advanced_advanced' ), // Callback
2274
- 'seopress-settings-admin-advanced-advanced' // Page
2275
- );
2276
-
2277
- add_settings_field(
2278
- 'seopress_advanced_advanced_attachments', // ID
2279
- __("Redirect attachment pages to post parent","wp-seopress"), // Title
2280
- array( $this, 'seopress_advanced_advanced_attachments_callback' ), // Callback
2281
- 'seopress-settings-admin-advanced-advanced', // Page
2282
- 'seopress_setting_section_advanced_advanced' // Section
2283
- );
2284
-
2285
- add_settings_field(
2286
- 'seopress_advanced_advanced_attachments_file', // ID
2287
- __("Redirect attachment pages to their file URL","wp-seopress"), // Title
2288
- array( $this, 'seopress_advanced_advanced_attachments_file_callback' ), // Callback
2289
- 'seopress-settings-admin-advanced-advanced', // Page
2290
- 'seopress_setting_section_advanced_advanced' // Section
2291
- );
2292
-
2293
- add_settings_field(
2294
- 'seopress_advanced_advanced_replytocom', // ID
2295
- __("Remove ?replytocom link to avoid duplicate content","wp-seopress"), // Title
2296
- array( $this, 'seopress_advanced_advanced_replytocom_callback' ), // Callback
2297
- 'seopress-settings-admin-advanced-advanced', // Page
2298
- 'seopress_setting_section_advanced_advanced' // Section
2299
- );
2300
-
2301
- add_settings_field(
2302
- 'seopress_advanced_advanced_image_auto_title_editor', // ID
2303
- __("Automatically set the image Title","wp-seopress"), // Title
2304
- array( $this, 'seopress_advanced_advanced_image_auto_title_editor_callback' ), // Callback
2305
- 'seopress-settings-admin-advanced-advanced', // Page
2306
- 'seopress_setting_section_advanced_advanced' // Section
2307
- );
2308
-
2309
- add_settings_field(
2310
- 'seopress_advanced_advanced_image_auto_alt_editor', // ID
2311
- __("Automatically set the image Alt text","wp-seopress"), // Title
2312
- array( $this, 'seopress_advanced_advanced_image_auto_alt_editor_callback' ), // Callback
2313
- 'seopress-settings-admin-advanced-advanced', // Page
2314
- 'seopress_setting_section_advanced_advanced' // Section
2315
- );
2316
-
2317
- add_settings_field(
2318
- 'seopress_advanced_advanced_image_auto_caption_editor', // ID
2319
- __("Automatically set the image Caption","wp-seopress"), // Title
2320
- array( $this, 'seopress_advanced_advanced_image_auto_caption_editor_callback' ), // Callback
2321
- 'seopress-settings-admin-advanced-advanced', // Page
2322
- 'seopress_setting_section_advanced_advanced' // Section
2323
- );
2324
-
2325
- add_settings_field(
2326
- 'seopress_advanced_advanced_image_auto_desc_editor', // ID
2327
- __("Automatically set the image Description","wp-seopress"), // Title
2328
- array( $this, 'seopress_advanced_advanced_image_auto_desc_editor_callback' ), // Callback
2329
- 'seopress-settings-admin-advanced-advanced', // Page
2330
- 'seopress_setting_section_advanced_advanced' // Section
2331
- );
2332
-
2333
- add_settings_field(
2334
- 'seopress_advanced_advanced_tax_desc_editor', // ID
2335
- __("Add WP Editor to taxonomy description textarea","wp-seopress"), // Title
2336
- array( $this, 'seopress_advanced_advanced_tax_desc_editor_callback' ), // Callback
2337
- 'seopress-settings-admin-advanced-advanced', // Page
2338
- 'seopress_setting_section_advanced_advanced' // Section
2339
- );
2340
-
2341
- add_settings_field(
2342
- 'seopress_advanced_advanced_category_url', // ID
2343
- __("Remove /category/ in URL","wp-seopress"), // Title
2344
- array( $this, 'seopress_advanced_advanced_category_url_callback' ), // Callback
2345
- 'seopress-settings-admin-advanced-advanced', // Page
2346
- 'seopress_setting_section_advanced_advanced' // Section
2347
- );
2348
-
2349
- add_settings_field(
2350
- 'seopress_advanced_advanced_trailingslash', // ID
2351
- __("Disable trailing slash for metas","wp-seopress"), // Title
2352
- array( $this, 'seopress_advanced_advanced_trailingslash_callback' ), // Callback
2353
- 'seopress-settings-admin-advanced-advanced', // Page
2354
- 'seopress_setting_section_advanced_advanced' // Section
2355
- );
2356
-
2357
- add_settings_field(
2358
- 'seopress_advanced_advanced_wp_generator', // ID
2359
- __("Remove WordPress generator meta tag","wp-seopress"), // Title
2360
- array( $this, 'seopress_advanced_advanced_wp_generator_callback' ), // Callback
2361
- 'seopress-settings-admin-advanced-advanced', // Page
2362
- 'seopress_setting_section_advanced_advanced' // Section
2363
- );
2364
-
2365
- add_settings_field(
2366
- 'seopress_advanced_advanced_hentry', // ID
2367
- __("Remove hentry post class","wp-seopress"), // Title
2368
- array( $this, 'seopress_advanced_advanced_hentry_callback' ), // Callback
2369
- 'seopress-settings-admin-advanced-advanced', // Page
2370
- 'seopress_setting_section_advanced_advanced' // Section
2371
- );
2372
-
2373
- add_settings_field(
2374
- 'seopress_advanced_advanced_comments_author_url', // ID
2375
- __("Remove author URL","wp-seopress"), // Title
2376
- array( $this, 'seopress_advanced_advanced_comments_author_url_callback' ), // Callback
2377
- 'seopress-settings-admin-advanced-advanced', // Page
2378
- 'seopress_setting_section_advanced_advanced' // Section
2379
- );
2380
-
2381
- add_settings_field(
2382
- 'seopress_advanced_advanced_comments_website', // ID
2383
- __("Remove website field in comment form","wp-seopress"), // Title
2384
- array( $this, 'seopress_advanced_advanced_comments_website_callback' ), // Callback
2385
- 'seopress-settings-admin-advanced-advanced', // Page
2386
- 'seopress_setting_section_advanced_advanced' // Section
2387
- );
2388
-
2389
- add_settings_field(
2390
- 'seopress_advanced_advanced_wp_shortlink', // ID
2391
- __("Remove WordPress shortlink meta tag","wp-seopress"), // Title
2392
- array( $this, 'seopress_advanced_advanced_wp_shortlink_callback' ), // Callback
2393
- 'seopress-settings-admin-advanced-advanced', // Page
2394
- 'seopress_setting_section_advanced_advanced' // Section
2395
- );
2396
-
2397
- add_settings_field(
2398
- 'seopress_advanced_advanced_wp_wlw', // ID
2399
- __("Remove Windows Live Writer meta tag","wp-seopress"), // Title
2400
- array( $this, 'seopress_advanced_advanced_wp_wlw_callback' ), // Callback
2401
- 'seopress-settings-admin-advanced-advanced', // Page
2402
- 'seopress_setting_section_advanced_advanced' // Section
2403
- );
2404
-
2405
- add_settings_field(
2406
- 'seopress_advanced_advanced_wp_rsd', // ID
2407
- __("Remove RSD meta tag","wp-seopress"), // Title
2408
- array( $this, 'seopress_advanced_advanced_wp_rsd_callback' ), // Callback
2409
- 'seopress-settings-admin-advanced-advanced', // Page
2410
- 'seopress_setting_section_advanced_advanced' // Section
2411
- );
2412
-
2413
- add_settings_field(
2414
- 'seopress_advanced_advanced_google', // ID
2415
- __("Google site verification","wp-seopress"), // Title
2416
- array( $this, 'seopress_advanced_advanced_google_callback' ), // Callback
2417
- 'seopress-settings-admin-advanced-advanced', // Page
2418
- 'seopress_setting_section_advanced_advanced' // Section
2419
- );
2420
-
2421
- add_settings_field(
2422
- 'seopress_advanced_advanced_bing', // ID
2423
- __("Bing site verification","wp-seopress"), // Title
2424
- array( $this, 'seopress_advanced_advanced_bing_callback' ), // Callback
2425
- 'seopress-settings-admin-advanced-advanced', // Page
2426
- 'seopress_setting_section_advanced_advanced' // Section
2427
- );
2428
-
2429
- add_settings_field(
2430
- 'seopress_advanced_advanced_pinterest', // ID
2431
- __("Pinterest site verification","wp-seopress"), // Title
2432
- array( $this, 'seopress_advanced_advanced_pinterest_callback' ), // Callback
2433
- 'seopress-settings-admin-advanced-advanced', // Page
2434
- 'seopress_setting_section_advanced_advanced' // Section
2435
- );
2436
-
2437
- add_settings_field(
2438
- 'seopress_advanced_advanced_yandex', // ID
2439
- __("Yandex site verification","wp-seopress"), // Title
2440
- array( $this, 'seopress_advanced_advanced_yandex_callback' ), // Callback
2441
- 'seopress-settings-admin-advanced-advanced', // Page
2442
- 'seopress_setting_section_advanced_advanced' // Section
2443
- );
2444
-
2445
- //Appearance SECTION=======================================================================
2446
- add_settings_section(
2447
- 'seopress_setting_section_advanced_appearance', // ID
2448
- '',
2449
- //__("Appearance","wp-seopress"), // Title
2450
- array( $this, 'print_section_info_advanced_appearance' ), // Callback
2451
- 'seopress-settings-admin-advanced-appearance' // Page
2452
- );
2453
-
2454
- add_settings_field(
2455
- 'seopress_advanced_appearance_adminbar', // ID
2456
- __("SEOPress in admin bar","wp-seopress"), // Title
2457
- array( $this, 'seopress_advanced_appearance_adminbar_callback' ), // Callback
2458
- 'seopress-settings-admin-advanced-appearance', // Page
2459
- 'seopress_setting_section_advanced_appearance' // Section
2460
- );
2461
-
2462
- add_settings_field(
2463
- 'seopress_advanced_appearance_metabox_position', // ID
2464
- __("Move SEOPress metabox's position","wp-seopress"), // Title
2465
- array( $this, 'seopress_advanced_appearance_metaboxe_position_callback' ), // Callback
2466
- 'seopress-settings-admin-advanced-appearance', // Page
2467
- 'seopress_setting_section_advanced_appearance' // Section
2468
- );
2469
-
2470
- add_settings_field(
2471
- 'seopress_advanced_appearance_schema_default_tab', // ID
2472
- __("Set default tab for Structured data metabox","wp-seopress"), // Title
2473
- array( $this, 'seopress_advanced_appearance_schema_default_tab_callback' ), // Callback
2474
- 'seopress-settings-admin-advanced-appearance', // Page
2475
- 'seopress_setting_section_advanced_appearance' // Section
2476
- );
2477
-
2478
- add_settings_field(
2479
- 'seopress_advanced_appearance_notifications', // ID
2480
- __("Hide Notifications Center","wp-seopress"), // Title
2481
- array( $this, 'seopress_advanced_appearance_notifications_callback' ), // Callback
2482
- 'seopress-settings-admin-advanced-appearance', // Page
2483
- 'seopress_setting_section_advanced_appearance' // Section
2484
- );
2485
-
2486
- add_settings_field(
2487
- 'seopress_advanced_appearance_seo_tools', // ID
2488
- __("Hide SEO tools","wp-seopress"), // Title
2489
- array( $this, 'seopress_advanced_appearance_seo_tools_callback' ), // Callback
2490
- 'seopress-settings-admin-advanced-appearance', // Page
2491
- 'seopress_setting_section_advanced_appearance' // Section
2492
- );
2493
-
2494
- add_settings_field(
2495
- 'seopress_advanced_appearance_useful_links', // ID
2496
- __("Hide Useful Links","wp-seopress"), // Title
2497
- array( $this, 'seopress_advanced_appearance_useful_links_callback' ), // Callback
2498
- 'seopress-settings-admin-advanced-appearance', // Page
2499
- 'seopress_setting_section_advanced_appearance' // Section
2500
- );
2501
-
2502
- add_settings_field(
2503
- 'seopress_advanced_appearance_title_col', // ID
2504
- __("Show Title tag column in post types","wp-seopress"), // Title
2505
- array( $this, 'seopress_advanced_appearance_title_col_callback' ), // Callback
2506
- 'seopress-settings-admin-advanced-appearance', // Page
2507
- 'seopress_setting_section_advanced_appearance' // Section
2508
- );
2509
-
2510
- add_settings_field(
2511
- 'seopress_advanced_appearance_meta_desc_col', // ID
2512
- __("Show Meta description column in post types","wp-seopress"), // Title
2513
- array( $this, 'seopress_advanced_appearance_meta_desc_col_callback' ), // Callback
2514
- 'seopress-settings-admin-advanced-appearance', // Page
2515
- 'seopress_setting_section_advanced_appearance' // Section
2516
- );
2517
-
2518
- add_settings_field(
2519
- 'seopress_advanced_appearance_redirect_enable_col', // ID
2520
- __("Show Redirection Enable column in post types","wp-seopress"), // Title
2521
- array( $this, 'seopress_advanced_appearance_redirect_enable_col_callback' ), // Callback
2522
- 'seopress-settings-admin-advanced-appearance', // Page
2523
- 'seopress_setting_section_advanced_appearance' // Section
2524
- );
2525
-
2526
- add_settings_field(
2527
- 'seopress_advanced_appearance_redirect_url_col', // ID
2528
- __("Show Redirect URL column in post types","wp-seopress"), // Title
2529
- array( $this, 'seopress_advanced_appearance_redirect_url_col_callback' ), // Callback
2530
- 'seopress-settings-admin-advanced-appearance', // Page
2531
- 'seopress_setting_section_advanced_appearance' // Section
2532
- );
2533
-
2534
- add_settings_field(
2535
- 'seopress_advanced_appearance_canonical', // ID
2536
- __("Show canonical URL column in post types","wp-seopress"), // Title
2537
- array( $this, 'seopress_advanced_appearance_canonical_callback' ), // Callback
2538
- 'seopress-settings-admin-advanced-appearance', // Page
2539
- 'seopress_setting_section_advanced_appearance' // Section
2540
- );
2541
-
2542
- add_settings_field(
2543
- 'seopress_advanced_appearance_target_kw_col', // ID
2544
- __("Show Target Keyword column in post types","wp-seopress"), // Title
2545
- array( $this, 'seopress_advanced_appearance_target_kw_col_callback' ), // Callback
2546
- 'seopress-settings-admin-advanced-appearance', // Page
2547
- 'seopress_setting_section_advanced_appearance' // Section
2548
- );
2549
-
2550
- add_settings_field(
2551
- 'seopress_advanced_appearance_noindex_col', // ID
2552
- __("Show noindex column in post types","wp-seopress"), // Title
2553
- array( $this, 'seopress_advanced_appearance_noindex_col_callback' ), // Callback
2554
- 'seopress-settings-admin-advanced-appearance', // Page
2555
- 'seopress_setting_section_advanced_appearance' // Section
2556
- );
2557
-
2558
- add_settings_field(
2559
- 'seopress_advanced_appearance_nofollow_col', // ID
2560
- __("Show nofollow column in post types","wp-seopress"), // Title
2561
- array( $this, 'seopress_advanced_appearance_nofollow_col_callback' ), // Callback
2562
- 'seopress-settings-admin-advanced-appearance', // Page
2563
- 'seopress_setting_section_advanced_appearance' // Section
2564
- );
2565
-
2566
- add_settings_field(
2567
- 'seopress_advanced_appearance_words_col', // ID
2568
- __("Show total number of words column in post types","wp-seopress"), // Title
2569
- array( $this, 'seopress_advanced_appearance_words_col_callback' ), // Callback
2570
- 'seopress-settings-admin-advanced-appearance', // Page
2571
- 'seopress_setting_section_advanced_appearance' // Section
2572
- );
2573
-
2574
- add_settings_field(
2575
- 'seopress_advanced_appearance_w3c_col', // ID
2576
- __("Show W3C validator column in post types","wp-seopress"), // Title
2577
- array( $this, 'seopress_advanced_appearance_w3c_col_callback' ), // Callback
2578
- 'seopress-settings-admin-advanced-appearance', // Page
2579
- 'seopress_setting_section_advanced_appearance' // Section
2580
- );
2581
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
2582
- add_settings_field(
2583
- 'seopress_advanced_appearance_ps_col', // ID
2584
- __("Show Google Page Speed column in post types","wp-seopress"), // Title
2585
- array( $this, 'seopress_advanced_appearance_ps_col_callback' ), // Callback
2586
- 'seopress-settings-admin-advanced-appearance', // Page
2587
- 'seopress_setting_section_advanced_appearance' // Section
2588
- );
2589
- }
2590
-
2591
- add_settings_field(
2592
- 'seopress_advanced_appearance_score_col', // ID
2593
- __("Show content analysis score column in post types","wp-seopress"), // Title
2594
- array( $this, 'seopress_advanced_appearance_score_col_callback' ), // Callback
2595
- 'seopress-settings-admin-advanced-appearance', // Page
2596
- 'seopress_setting_section_advanced_appearance' // Section
2597
- );
2598
-
2599
- add_settings_field(
2600
- 'seopress_advanced_appearance_genesis_seo_metaboxe', // ID
2601
- __("Hide Genesis SEO Metabox","wp-seopress"), // Title
2602
- array( $this, 'seopress_advanced_appearance_genesis_seo_metaboxe_callback' ), // Callback
2603
- 'seopress-settings-admin-advanced-appearance', // Page
2604
- 'seopress_setting_section_advanced_appearance' // Section
2605
- );
2606
-
2607
- add_settings_field(
2608
- 'seopress_advanced_appearance_genesis_seo_menu', // ID
2609
- __("Hide Genesis SEO Settings link","wp-seopress"), // Title
2610
- array( $this, 'seopress_advanced_appearance_genesis_seo_menu_callback' ), // Callback
2611
- 'seopress-settings-admin-advanced-appearance', // Page
2612
- 'seopress_setting_section_advanced_appearance' // Section
2613
- );
2614
-
2615
- add_settings_field(
2616
- 'seopress_advanced_appearance_advice_schema', // ID
2617
- __("Hide advice in Structured Data Types metabox","wp-seopress"), // Title
2618
- array( $this, 'seopress_advanced_appearance_advice_schema_callback' ), // Callback
2619
- 'seopress-settings-admin-advanced-appearance', // Page
2620
- 'seopress_setting_section_advanced_appearance' // Section
2621
- );
2622
-
2623
- //Security SECTION=======================================================================
2624
- add_settings_section(
2625
- 'seopress_setting_section_advanced_security', // ID
2626
- '',
2627
- //__("Security","wp-seopress"), // Title
2628
- array( $this, 'print_section_info_advanced_security' ), // Callback
2629
- 'seopress-settings-admin-advanced-security' // Page
2630
- );
2631
-
2632
- add_settings_field(
2633
- 'seopress_advanced_security_metaboxe_role', // ID
2634
- __("Block SEO metabox to user roles","wp-seopress"), // Title
2635
- array( $this, 'seopress_advanced_security_metaboxe_role_callback' ), // Callback
2636
- 'seopress-settings-admin-advanced-security', // Page
2637
- 'seopress_setting_section_advanced_security' // Section
2638
- );
2639
-
2640
- add_settings_field(
2641
- 'seopress_advanced_security_metaboxe_ca_role', // ID
2642
- __("Block Content analysis metabox to user roles","wp-seopress-pro"), // Title
2643
- array( $this, 'seopress_advanced_security_metaboxe_ca_role_callback' ), // Callback
2644
- 'seopress-settings-admin-advanced-security', // Page
2645
- 'seopress_setting_section_advanced_security' // Section
2646
- );
2647
- }
2648
-
2649
- /**
2650
- * Sanitize each setting field as needed
2651
- *
2652
- * @param array $input Contains all settings fields as array keys
2653
- */
2654
- public function sanitize( $input )
2655
- {
2656
- $seopress_sanitize_fields = [
2657
- 'seopress_titles_sep',
2658
- 'seopress_titles_home_site_title',
2659
- 'seopress_titles_home_site_desc',
2660
- 'seopress_titles_archives_author_title',
2661
- 'seopress_titles_archives_author_desc',
2662
- 'seopress_titles_archives_date_title',
2663
- 'seopress_titles_archives_date_desc',
2664
- 'seopress_titles_archives_search_title',
2665
- 'seopress_titles_archives_search_desc',
2666
- 'seopress_titles_archives_404_title',
2667
- 'seopress_titles_archives_404_desc',
2668
- 'seopress_xml_sitemap_html_exclude',
2669
- 'seopress_social_knowledge_name',
2670
- 'seopress_social_knowledge_img',
2671
- 'seopress_social_knowledge_phone',
2672
- 'seopress_social_accounts_facebook',
2673
- 'seopress_social_accounts_twitter',
2674
- 'seopress_social_accounts_pinterest',
2675
- 'seopress_social_accounts_instagram',
2676
- 'seopress_social_accounts_youtube',
2677
- 'seopress_social_accounts_linkedin',
2678
- 'seopress_social_accounts_myspace',
2679
- 'seopress_social_accounts_soundcloud',
2680
- 'seopress_social_accounts_tumblr',
2681
- 'seopress_social_facebook_link_ownership_id',
2682
- 'seopress_social_facebook_admin_id',
2683
- 'seopress_social_facebook_app_id',
2684
- 'seopress_google_analytics_ua',
2685
- 'seopress_google_analytics_download_tracking',
2686
- 'seopress_google_analytics_opt_out_msg',
2687
- 'seopress_google_analytics_opt_out_msg_ok',
2688
- 'seopress_google_analytics_other_tracking',
2689
- 'seopress_google_analytics_other_tracking_body',
2690
- 'seopress_google_analytics_optimize',
2691
- 'seopress_google_analytics_ads',
2692
- 'seopress_google_analytics_cross_domain',
2693
- 'seopress_google_analytics_matomo_id',
2694
- 'seopress_google_analytics_matomo_site_id',
2695
- 'seopress_google_analytics_matomo_cross_domain_sites'
2696
- ];
2697
-
2698
- $seopress_sanitize_site_verification = [
2699
- 'seopress_advanced_advanced_google',
2700
- 'seopress_advanced_advanced_bing',
2701
- 'seopress_advanced_advanced_pinterest',
2702
- 'seopress_advanced_advanced_yandex'
2703
- ];
2704
-
2705
- foreach ($seopress_sanitize_fields as $value) {
2706
- if (!empty( $input['seopress_google_analytics_opt_out_msg'] ) && $value =='seopress_google_analytics_opt_out_msg') {
2707
- $args = [
2708
- 'strong' => [],
2709
- 'em' => [],
2710
- 'br' => [],
2711
- 'a' => [
2712
- 'href' => [],
2713
- 'target' => []
2714
- ]
2715
- ];
2716
- $input[$value] = wp_kses($input[$value], $args);
2717
- } elseif ((!empty( $input['seopress_google_analytics_other_tracking'] ) && $value =='seopress_google_analytics_other_tracking') || (!empty( $input['seopress_google_analytics_other_tracking_body'] ) && $value =='seopress_google_analytics_other_tracking_body') || (!empty( $input['seopress_google_analytics_other_tracking_footer'] ) && $value =='seopress_google_analytics_other_tracking_footer')) {
2718
- $input[$value] = $input[$value]; //No sanitization for this field
2719
- } elseif( !empty( $input[$value] ) ) {
2720
- $input[$value] = sanitize_text_field( $input[$value] );
2721
- }
2722
- }
2723
-
2724
- foreach ($seopress_sanitize_site_verification as $value) {
2725
- if( !empty( $input[$value] ) ) {
2726
- if (preg_match('#content=\'([^"]+)\'#', $input[$value], $m)) {
2727
- $input[$value] = $m[1];
2728
- } elseif (preg_match('#content="([^"]+)"#', $input[$value], $m)) {
2729
- $input[$value] = $m[1];
2730
- }
2731
- }
2732
- }
2733
-
2734
- return $input;
2735
- }
2736
-
2737
- /**
2738
- * Print the Section text
2739
- */
2740
-
2741
- public function print_section_info_titles() {
2742
- print __('<p>Customize your title & meta description for homepage</p>', 'wp-seopress');
2743
- }
2744
-
2745
- public function print_section_info_single() {
2746
- print __('<p>Customize your titles & metas for Single Custom Post Types</p>', 'wp-seopress');
2747
- }
2748
-
2749
- public function print_section_info_advanced() {
2750
- print __('<p>Customize your metas for all pages</p>', 'wp-seopress');
2751
- }
2752
-
2753
- public function print_section_info_tax() {
2754
- print __('<p>Customize your metas for all taxonomies archives</p>', 'wp-seopress');
2755
- }
2756
-
2757
- public function print_section_info_archives() {
2758
- print __('<p>Customize your metas for all archives</p>', 'wp-seopress');
2759
- }
2760
-
2761
- public function print_section_info_xml_sitemap_general() {
2762
- if (get_option('permalink_structure') =='') {
2763
- echo '<div class="error notice is-dismissable">';
2764
- echo '<p>'. __('Your permalinks are not SEO Friendly! Enable pretty permalinks to fix this.','wp-seopress');
2765
- echo ' <a href="'.admin_url("options-permalink.php").'">'.__('Change this settings','wp-seopress').'</a></p>';
2766
- echo '</div>';
2767
- }
2768
- echo '<p>'.__('To view your sitemap, enable permalinks (not default one), and save settings to flush them.', 'wp-seopress').'</p>';
2769
-
2770
- if ( isset( $_SERVER['SERVER_SOFTWARE'] )) {
2771
- $server_software = explode('/', $_SERVER['SERVER_SOFTWARE']);
2772
- reset($server_software);
2773
- if (current($server_software) =='nginx' ) { //IF NGINX
2774
- echo '<p>'.__('Your server uses NGINX. If XML Sitemaps doesn\'t work properly, you need to add this rule to your configuration:', 'wp-seopress').'</p><br>';
2775
- echo '<pre style="margin:0;padding:10px;font-weight: bold;background:#F3F3F3;display:inline-block;width: 100%">
2776
- location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
2777
- ## SEOPress
2778
- rewrite ^/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
2779
- rewrite ^/sitemaps/news.xml$ /index.php?seopress_news=$1 last;
2780
- rewrite ^/sitemaps/video.xml$ /index.php?seopress_video=$1 last;
2781
- rewrite ^/sitemaps/author.xml$ /index.php?seopress_author=$1 last;
2782
- rewrite ^/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
2783
- rewrite ^/sitemaps/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?seopress_cpt=$1&seopress_paged=$2 last;
2784
- }
2785
- </pre>';
2786
- }
2787
- }
2788
- echo '<p>'.__('Noindex content will not be displayed in Sitemaps.', 'wp-seopress').'</p>';
2789
-
2790
- if (function_exists('seopress_get_locale')) {
2791
- if (seopress_get_locale() =='fr') {
2792
- $seopress_docs_link['sitemaps']['error']['blank'] = 'https://www.seopress.org/fr/support/guides/xml-sitemap-page-blanche/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2793
- $seopress_docs_link['sitemaps']['error']['404'] = 'https://www.seopress.org/fr/support/guides/plan-de-site-xml-retourne-erreur-404/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2794
- } else {
2795
- $seopress_docs_link['sitemaps']['error']['blank'] = 'https://www.seopress.org/support/guides/xml-sitemap-blank-page/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2796
- $seopress_docs_link['sitemaps']['error']['404'] = 'https://www.seopress.org/support/guides/xml-sitemap-returns-404-error/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2797
- }
2798
- }
2799
-
2800
- echo '<p><span class="dashicons dashicons-external"></span><a href="'.$seopress_docs_link['sitemaps']['error']['blank'].'" target="_blank">'.__('Blank sitemap?', 'wp-seopress').'</a> - ';
2801
- echo '<span class="dashicons dashicons-external"></span><a href="'.$seopress_docs_link['sitemaps']['error']['404'].'" target="_blank">'.__('404 error?', 'wp-seopress').'</a></p><br>';
2802
-
2803
- echo '<a href="'.get_option( 'home' ).'/sitemaps.xml" target="_blank" class="button"><span class="dashicons dashicons-visibility"></span>'.__('View your sitemap','wp-seopress').'</a>';
2804
- echo '&nbsp;';
2805
- echo '<a href="https://www.google.com/ping?sitemap='.get_option( 'home' ).'/sitemaps.xml/" target="_blank" class="button"><span class="dashicons dashicons-share-alt2"></span>'.__('Ping Google manually','wp-seopress').'</a>';
2806
- echo '&nbsp;';
2807
- echo '<button type="button" id="seopress-flush-permalinks" class="button"><span class="dashicons dashicons-admin-links"></span>'.__('Flush permalinks','wp-seopress').'</button>';
2808
- echo '<span class="spinner"></span>';
2809
- }
2810
-
2811
- public function print_section_info_html_sitemap() {
2812
- print __('<p>Create an HTML Sitemap for your visitors and boost your SEO.</p>', 'wp-seopress');
2813
-
2814
- if (function_exists('seopress_get_locale')) {
2815
- if (seopress_get_locale() =='fr') {
2816
- $seopress_docs_link['sitemaps']['html'] = 'https://www.seopress.org/fr/support/guides/activer-plan-de-site-html/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2817
- } else {
2818
- $seopress_docs_link['sitemaps']['html'] = 'https://www.seopress.org/support/guides/enable-html-sitemap/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2819
- }
2820
- }
2821
-
2822
- echo '<a class="seopress-doc" href="'.$seopress_docs_link['sitemaps']['html'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable a HTML Sitemap - new window','wp-seopress').'</span></a></p>';
2823
- }
2824
-
2825
- public function print_section_info_xml_sitemap_post_types() {
2826
- print __('<p>Include/Exclude Post Types.</p>', 'wp-seopress');
2827
- }
2828
-
2829
- public function print_section_info_xml_sitemap_taxonomies() {
2830
- print __('<p>Include/Exclude Taxonomies.</p>', 'wp-seopress');
2831
- }
2832
-
2833
- public function print_section_info_social_knowledge() {
2834
- print __('<p>Configure Google Knowledge Graph.</p>', 'wp-seopress');
2835
- echo '<p><span class="dashicons dashicons-external"></span><a href="https://developers.google.com/search/docs/guides/enhance-site" target="_blank">'.__('Learn more on Google official website.','wp-seopress').'</a></p>';
2836
- }
2837
-
2838
- public function print_section_info_social_accounts() {
2839
- print __('<p>Link your site with your social accounts. Use markup on your website to add your social profile information to a Google Knowledge panel. Knowledge panels prominently display your social profile information in some Google Search results. Filling in these fields does not guarantee the display of this data in search results. It may take a long time to see these social-network links.</p>', 'wp-seopress');
2840
- }
2841
-
2842
- public function print_section_info_social_facebook() {
2843
- print __('<p>Manage Open Graph data.</p>', 'wp-seopress');
2844
-
2845
- echo __('<p>We generate the <strong>og:image</strong> meta in this order:</p>','wp-seopress');
2846
-
2847
- echo '
2848
- <ol>
2849
- <li>'.__('Custom OG Image from SEO metabox','wp-seopress').'</li>
2850
- <li>'.__('Post thumbnail','wp-seopress').'</li>
2851
- <li>'.__('First image of your post content','wp-seopress').'</li>
2852
- <li>'.__('Global OG Image set in SEO > Social > Open Graph','wp-seopress').'</li>
2853
- </ol>';
2854
- }
2855
-
2856
- public function print_section_info_social_twitter() {
2857
- print __('<p>Manage your Twitter card.</p>', 'wp-seopress');
2858
-
2859
- echo __('<p>We generate the <strong>twitter:image</strong> meta in this order:</p>','wp-seopress');
2860
-
2861
- echo '
2862
- <ol>
2863
- <li>'.__('Custom Twitter image from SEO metabox','wp-seopress').'</li>
2864
- <li>'.__('Post thumbnail','wp-seopress').'</li>
2865
- <li>'.__('First image of your post content','wp-seopress').'</li>
2866
- <li>'.__('Global Twitter:image set in SEO > Social > Twitter Card','wp-seopress').'</li>
2867
- </ol>';
2868
- }
2869
-
2870
- public function print_section_info_google_analytics_enable() {
2871
- print __('<p>Link your Google Analytics to your website. The tracking code will be automatically added to your site.</p>', 'wp-seopress');
2872
- }
2873
-
2874
- public function print_section_info_google_analytics_gdpr() {
2875
- print __('<p>Manage user consent for GDPR and customize your cookie bar easily.</p>', 'wp-seopress');
2876
- }
2877
-
2878
- public function print_section_info_google_analytics_features() {
2879
- print __('<p>Configure your Google Analytics tracking code.</p>', 'wp-seopress');
2880
- }
2881
-
2882
- public function print_section_info_google_analytics_events() {
2883
- print __('<p>Track events in Google Analytics.</p>', 'wp-seopress');
2884
- }
2885
-
2886
- public function print_section_info_google_analytics_custom_dimensions() {
2887
- print __('<p>Configure your Google Analytics custom dimensions. <br>Custom dimensions and custom metrics in SEOPress are like the default dimensions and metrics in your Analytics account, except you create them yourself.<br> Use them to collect and analyze data that Analytics doesn\'t automatically track.<br> Please note that you also have to setup your custom dimensions in your Google Analytics account. More info by clicking on the help icon.', 'wp-seopress');
2888
-
2889
- echo '<p>'.__('Custom dimensions also work with <strong>Matomo</strong> tracking code.','wp-seopress').'</p>';
2890
-
2891
- if (function_exists('seopress_get_locale')) {
2892
- if (seopress_get_locale() =='fr') {
2893
- $seopress_docs_link['support']['analytics']['custom_dimensions'] = 'https://www.seopress.org/fr/support/guides/creer-dimensions-personnalisees-google-analytics/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2894
- } else {
2895
- $seopress_docs_link['support']['analytics']['custom_dimensions'] = 'https://www.seopress.org/support/guides/create-custom-dimension-google-analytics/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2896
- }
2897
- }
2898
-
2899
- echo '<a class="seopress-doc" href="'.$seopress_docs_link['support']['analytics']['custom_dimensions'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to create custom dimensions in Google Analytics - new window','wp-seopress').'</span></a></p>';
2900
- }
2901
-
2902
- public function print_section_info_google_analytics_matomo() {
2903
- print __('<p>Use Matomo to track your users with privacy in mind.</p>', 'wp-seopress');
2904
-
2905
- echo '<p>'.__('Your <strong>Custom Dimensions</strong> will also work with Matomo tracking code','wp-seopress').'</p>';
2906
- }
2907
-
2908
- public function print_section_info_advanced_advanced() {
2909
- print __('<p>Advanced SEO options.</p>', 'wp-seopress');
2910
- }
2911
-
2912
- public function print_section_info_advanced_appearance() {
2913
- print __('<p>Customize SEOPress to fit your needs.</p>', 'wp-seopress');
2914
- }
2915
-
2916
- public function print_section_info_advanced_security() {
2917
- print __('<p>Manage security.</p>', 'wp-seopress');
2918
- }
2919
-
2920
- /**
2921
- * Get the settings option array and print one of its values
2922
- */
2923
-
2924
- //Titles & metas
2925
- public function seopress_titles_sep_callback()
2926
- {
2927
- $check = isset($this->options['seopress_titles_sep']) ? $this->options['seopress_titles_sep'] : NULL;
2928
-
2929
- printf(
2930
- '<input type="text" id="seopress_titles_sep" name="seopress_titles_option_name[seopress_titles_sep]" placeholder="'.esc_html__('Enter your separator, eg: "-"','wp-seopress').'" aria-label="'.__('Separator','wp-seopress').'" value="%s"/>',
2931
- esc_html( $check )
2932
- );
2933
-
2934
- echo '<p class="description">'.__('Use this separator with %%sep%% in your title and meta description.','wp-seopress').'</p>';
2935
- }
2936
-
2937
- public function seopress_titles_home_site_title_callback()
2938
- {
2939
- printf(
2940
- '<input type="text" id="seopress_titles_home_site_title" name="seopress_titles_option_name[seopress_titles_home_site_title]" placeholder="'.esc_html__('My awesome website','wp-seopress').'" aria-label="'.__('Site title','wp-seopress').'" value="%s"/>',
2941
- esc_html( $this->options['seopress_titles_home_site_title'])
2942
- );
2943
- echo '<div class="wrap-tags"><span id="seopress-tag-site-title" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
2944
- echo '<span id="seopress-tag-site-sep" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
2945
- echo '<span id="seopress-tag-site-desc" data-tag="%%tagline%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tagline','wp-seopress').'</span>';
2946
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
2947
- }
2948
-
2949
- public function seopress_titles_home_site_desc_callback()
2950
- {
2951
- printf(
2952
- '<textarea id="seopress_titles_home_site_desc" name="seopress_titles_option_name[seopress_titles_home_site_desc]" placeholder="'.esc_html__('This is a cool website about Wookiees','wp-seopress').'" aria-label="'.__('Meta description','wp-seopress').'">%s</textarea>',
2953
- esc_html( $this->options['seopress_titles_home_site_desc'])
2954
-
2955
- );
2956
- echo '<div class="wrap-tags"><span id="seopress-tag-meta-desc" data-tag="%%tagline%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tagline','wp-seopress').'</span>';
2957
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
2958
-
2959
- if (get_option( 'page_for_posts' )) {
2960
- echo '<p><a href="'.admin_url('post.php?post='.get_option( 'page_for_posts' ).'&action=edit').'">'.__('Looking to edit your blog page?','wp-seopress').'</a></p>';
2961
- }
2962
- }
2963
-
2964
- //Single CPT
2965
- public function seopress_titles_single_titles_callback()
2966
- {
2967
- foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
2968
- echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em></h2>';
2969
-
2970
- //Single on/off CPT
2971
- echo '<div class="seopress_wrap_single_cpt">';
2972
-
2973
- $options = get_option( 'seopress_titles_option_name' );
2974
-
2975
- $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['enable']) ? $options['seopress_titles_single_titles'][$seopress_cpt_key]['enable'] : NULL;
2976
-
2977
- echo '<input id="seopress_titles_single_cpt_enable['.$seopress_cpt_key.']" data-id='.$seopress_cpt_key.' name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][enable]" class="toggle" type="checkbox"';
2978
- if ('1' == $check) {
2979
- echo 'checked="yes" data-toggle="0"';
2980
- } else {
2981
- echo 'data-toggle="1"';
2982
- };
2983
- echo ' value="1"/>';
2984
-
2985
- echo '<label for="seopress_titles_single_cpt_enable['.$seopress_cpt_key.']">'. __( 'Click to hide any SEO metaboxes for this post type', 'wp-seopress' ) .'</label>';
2986
-
2987
- if ('1' == $check) {
2988
- echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
2989
- echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
2990
- } else {
2991
- echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
2992
- echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
2993
- }
2994
-
2995
- $toggle_txt_on = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to display any SEO metaboxes for this post type','wp-seopress');
2996
- $toggle_txt_off = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to hide any SEO metaboxes for this post type','wp-seopress');
2997
-
2998
- echo "<script>
2999
- jQuery(document).ready(function($) {
3000
- $('input[data-id=".$seopress_cpt_key."]').on('click', function() {
3001
- $(this).attr('data-toggle', $(this).attr('data-toggle') == '1' ? '0' : '1');
3002
- if ($(this).attr('data-toggle') == '1') {
3003
- $(this).next().next('.feature-state').html('".$toggle_txt_off."');
3004
- } else {
3005
- $(this).next().next('.feature-state').html('".$toggle_txt_on."');
3006
- }
3007
- });
3008
- });
3009
- </script>";
3010
-
3011
- if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['enable'])) {
3012
- esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['enable']);
3013
- }
3014
-
3015
- echo '</div>';
3016
-
3017
- //Single Title CPT
3018
- echo '<div class="seopress_wrap_single_cpt">';
3019
-
3020
- _e('Title template','wp-seopress');
3021
-
3022
- $check = isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['title']) ? $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['title'] : NULL;
3023
-
3024
- echo "<br/>";
3025
-
3026
- echo "<script>
3027
- jQuery(document).ready(function($) {
3028
- $('#seopress-tag-single-title-".$seopress_cpt_key."').click(function() {
3029
- $('#seopress_titles_single_titles_".$seopress_cpt_key."').val($('#seopress_titles_single_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-single-title-".$seopress_cpt_key."').attr('data-tag'));
3030
- });
3031
- $('#seopress-tag-sep-".$seopress_cpt_key."').click(function() {
3032
- $('#seopress_titles_single_titles_".$seopress_cpt_key."').val($('#seopress_titles_single_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-sep-".$seopress_cpt_key."').attr('data-tag'));
3033
- });
3034
- $('#seopress-tag-single-sitetitle-".$seopress_cpt_key."').click(function() {
3035
- $('#seopress_titles_single_titles_".$seopress_cpt_key."').val($('#seopress_titles_single_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-single-sitetitle-".$seopress_cpt_key."').attr('data-tag'));
3036
- });
3037
- });
3038
- </script>";
3039
-
3040
- printf(
3041
- '<input type="text" id="seopress_titles_single_titles_'.$seopress_cpt_key.'" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][title]" value="%s"/>',
3042
- esc_html( $check )
3043
- );
3044
-
3045
- echo '<div class="wrap-tags"><span id="seopress-tag-single-title-'.$seopress_cpt_key.'" data-tag="%%post_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Post Title','wp-seopress').'</span>';
3046
-
3047
- echo '<span id="seopress-tag-sep-'.$seopress_cpt_key.'" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3048
-
3049
- echo '<span id="seopress-tag-single-sitetitle-'.$seopress_cpt_key.'" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3050
-
3051
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3052
-
3053
- echo '</div>';
3054
-
3055
- //Single Meta Description CPT
3056
- echo '<div class="seopress_wrap_single_cpt">';
3057
-
3058
- _e('Meta description template','wp-seopress');
3059
- echo "<br/>";
3060
-
3061
- $check = isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['description']) ? $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['description'] : NULL;
3062
-
3063
- printf(
3064
- '<textarea name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][description]">%s</textarea>',
3065
- esc_html( $check )
3066
- );
3067
-
3068
- echo '</div>';
3069
-
3070
- //Single No-Index CPT
3071
- echo '<div class="seopress_wrap_single_cpt">';
3072
-
3073
- $options = get_option( 'seopress_titles_option_name' );
3074
-
3075
- $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex']);
3076
-
3077
- echo '<input id="seopress_titles_single_cpt_noindex['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][noindex]" type="checkbox"';
3078
- if ('1' == $check) echo 'checked="yes"';
3079
- echo ' value="1"/>';
3080
-
3081
- echo '<label for="seopress_titles_single_cpt_noindex['.$seopress_cpt_key.']">'. __( 'Do not display this single post type in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3082
-
3083
- if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex'])) {
3084
- esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex']);
3085
- }
3086
-
3087
- echo '</div>';
3088
-
3089
- //Single No-Follow CPT
3090
- echo '<div class="seopress_wrap_single_cpt">';
3091
-
3092
- $options = get_option( 'seopress_titles_option_name' );
3093
-
3094
- $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['nofollow']);
3095
-
3096
- echo '<input id="seopress_titles_single_cpt_nofollow['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][nofollow]" type="checkbox"';
3097
- if ('1' == $check) echo 'checked="yes"';
3098
- echo ' value="1"/>';
3099
-
3100
- echo '<label for="seopress_titles_single_cpt_nofollow['.$seopress_cpt_key.']">'. __( 'Do not follow links for this single post type <strong>(nofollow)</strong>', 'wp-seopress' ) .'</label>';
3101
-
3102
- if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['nofollow'])) {
3103
- esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['nofollow']);
3104
- }
3105
-
3106
- echo '</div>';
3107
-
3108
- //Single Published / modified date CPT
3109
- echo '<div class="seopress_wrap_single_cpt">';
3110
-
3111
- $options = get_option( 'seopress_titles_option_name' );
3112
-
3113
- $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['date']);
3114
-
3115
- echo '<input id="seopress_titles_single_cpt_date['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][date]" type="checkbox"';
3116
- if ('1' == $check) echo 'checked="yes"';
3117
- echo ' value="1"/>';
3118
-
3119
- echo '<label for="seopress_titles_single_cpt_date['.$seopress_cpt_key.']">'. __( 'Display date in Google search results?', 'wp-seopress' ) .'</label>';
3120
-
3121
- if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date'])) {
3122
- esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date']);
3123
- }
3124
-
3125
- echo '</div>';
3126
-
3127
- //Single meta thumbnail CPT
3128
- echo '<div class="seopress_wrap_single_cpt">';
3129
-
3130
- $options = get_option( 'seopress_titles_option_name' );
3131
-
3132
- $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['thumb_gcs']);
3133
-
3134
- echo '<input id="seopress_titles_single_cpt_thumb_gcs['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][thumb_gcs]" type="checkbox"';
3135
- if ('1' == $check) echo 'checked="yes"';
3136
- echo ' value="1"/>';
3137
-
3138
- echo '<label for="seopress_titles_single_cpt_thumb_gcs['.$seopress_cpt_key.']">'. __( 'Display post thumbnail in Google Custom Search results?', 'wp-seopress' ) .'</label>';
3139
-
3140
- if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['thumb_gcs'])) {
3141
- esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['thumb_gcs']);
3142
- }
3143
-
3144
- echo '</div>';
3145
- }
3146
- }
3147
-
3148
- //Taxonomies
3149
- public function seopress_titles_tax_titles_callback()
3150
- {
3151
- foreach (seopress_get_taxonomies() as $seopress_tax_key => $seopress_tax_value) {
3152
-
3153
- echo '<h2>'.$seopress_tax_value->labels->name.' <em><small>['.$seopress_tax_value->name.']</small></em></h2>';
3154
-
3155
- //Single on/off Tax
3156
- echo '<div class="seopress_wrap_tax">';
3157
-
3158
- $options = get_option( 'seopress_titles_option_name' );
3159
-
3160
- $check = isset($options['seopress_titles_tax_titles'][$seopress_tax_key]['enable']) ? $options['seopress_titles_tax_titles'][$seopress_tax_key]['enable'] : NULL;
3161
-
3162
- echo '<input id="seopress_titles_tax_titles_enable['.$seopress_tax_key.']" data-id='.$seopress_tax_key.' name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][enable]" class="toggle" type="checkbox"';
3163
- if ('1' == $check) {
3164
- echo 'checked="yes" data-toggle="0"';
3165
- } else {
3166
- echo 'data-toggle="1"';
3167
- };
3168
- echo ' value="1"/>';
3169
-
3170
- echo '<label for="seopress_titles_tax_titles_enable['.$seopress_tax_key.']">'. __( 'Click to hide any SEO metaboxes for this taxonomy', 'wp-seopress' ) .'</label>';
3171
-
3172
- if ('1' == $check) {
3173
- echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3174
- echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3175
- } else {
3176
- echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3177
- echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3178
- }
3179
-
3180
- $toggle_txt_on = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to display any SEO metaboxes for this taxonomy','wp-seopress');
3181
- $toggle_txt_off = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to hide any SEO metaboxes for this taxonomy','wp-seopress');
3182
-
3183
- echo "<script>
3184
- jQuery(document).ready(function($) {
3185
- $('input[data-id=".$seopress_tax_key."]').on('click', function() {
3186
- $(this).attr('data-toggle', $(this).attr('data-toggle') == '1' ? '0' : '1');
3187
- if ($(this).attr('data-toggle') == '1') {
3188
- $(this).next().next('.feature-state').html('".$toggle_txt_off."');
3189
- } else {
3190
- $(this).next().next('.feature-state').html('".$toggle_txt_on."');
3191
- }
3192
- });
3193
- });
3194
- </script>";
3195
-
3196
- if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['enable'])) {
3197
- esc_attr( $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['enable']);
3198
- }
3199
-
3200
- echo '</div>';
3201
-
3202
- //Tax Title
3203
- $check = isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['title']) ? $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] : NULL;
3204
-
3205
- echo '<div class="seopress_wrap_tax">';
3206
-
3207
- _e('Title template','wp-seopress');
3208
- echo "<br/>";
3209
-
3210
- echo "<script>
3211
- jQuery(document).ready(function($) {
3212
- $('#seopress-tag-tax-title-".$seopress_tax_key."').click(function() {
3213
- $('#seopress_titles_tax_titles_".$seopress_tax_key."').val($('#seopress_titles_tax_titles_".$seopress_tax_key."').val() + ' ' + $('#seopress-tag-tax-title-".$seopress_tax_key."').attr('data-tag'));
3214
- });
3215
- $('#seopress-tag-sep-".$seopress_tax_key."').click(function() {
3216
- $('#seopress_titles_tax_titles_".$seopress_tax_key."').val($('#seopress_titles_tax_titles_".$seopress_tax_key."').val() + ' ' + $('#seopress-tag-sep-".$seopress_tax_key."').attr('data-tag'));
3217
- });
3218
- $('#seopress-tag-tax-sitetitle-".$seopress_tax_key."').click(function() {
3219
- $('#seopress_titles_tax_titles_".$seopress_tax_key."').val($('#seopress_titles_tax_titles_".$seopress_tax_key."').val() + ' ' + $('#seopress-tag-tax-sitetitle-".$seopress_tax_key."').attr('data-tag'));
3220
- });
3221
- });
3222
- </script>";
3223
-
3224
- printf(
3225
- '<input type="text" id="seopress_titles_tax_titles_'.$seopress_tax_key.'" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][title]" value="%s"/>',
3226
- esc_html($check)
3227
- );
3228
-
3229
- if ($seopress_tax_key =='category') {
3230
- echo '<div class="wrap-tags"><span id="seopress-tag-tax-title-'.$seopress_tax_key.'" data-tag="%%_category_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Category Title','wp-seopress').'</span>';
3231
- } elseif ($seopress_tax_key =='post_tag') {
3232
- echo '<div class="wrap-tags"><span id="seopress-tag-tax-title-'.$seopress_tax_key.'" data-tag="%%tag_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tag Title','wp-seopress').'</span>';
3233
- } else {
3234
- echo '<div class="wrap-tags"><span id="seopress-tag-tax-title-'.$seopress_tax_key.'" data-tag="%%term_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Term Title','wp-seopress').'</span>';
3235
- }
3236
-
3237
- echo '<span id="seopress-tag-sep-'.$seopress_tax_key.'" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3238
-
3239
- echo '<span id="seopress-tag-tax-sitetitle-'.$seopress_tax_key.'" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3240
-
3241
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3242
-
3243
- echo '</div>';
3244
-
3245
- //Tax Meta Description
3246
- echo '<div class="seopress_wrap_tax">';
3247
-
3248
- $check2 = isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['description']) ? $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] : NULL;
3249
-
3250
- _e('Meta description template','wp-seopress');
3251
- echo "<br/>";
3252
-
3253
- echo "<script>
3254
- jQuery(document).ready(function($) {
3255
- jQuery('#seopress-tag-tax-desc-".$seopress_tax_key."').click(function() {
3256
- jQuery('#seopress_titles_tax_desc_".$seopress_tax_key."').val(jQuery('#seopress_titles_tax_desc_".$seopress_tax_key."').val() + ' ' + jQuery('#seopress-tag-tax-desc-".$seopress_tax_key."').attr('data-tag'));
3257
- });
3258
- });
3259
- </script>";
3260
-
3261
- printf(
3262
- '<textarea id="seopress_titles_tax_desc_'.$seopress_tax_key.'" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][description]">%s</textarea>',
3263
- esc_html($check2)
3264
- );
3265
-
3266
- if ($seopress_tax_key =='category') {
3267
- echo '<div class="wrap-tags"><span id="seopress-tag-tax-desc-'.$seopress_tax_key.'" data-tag="%%_category_description%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Category Description','wp-seopress').'</span>';
3268
- } elseif ($seopress_tax_key =='post_tag') {
3269
- echo '<div class="wrap-tags"><span id="seopress-tag-tax-desc-'.$seopress_tax_key.'" data-tag="%%tag_description%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tag Description','wp-seopress').'</span>';
3270
- } else {
3271
- echo '<div class="wrap-tags"><span id="seopress-tag-tax-desc-'.$seopress_tax_key.'" data-tag="%%term_description%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Term Description','wp-seopress').'</span>';
3272
- }
3273
-
3274
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3275
-
3276
- echo '</div>';
3277
-
3278
- //Tax No-Index
3279
- echo '<div class="seopress_wrap_tax">';
3280
-
3281
- $options = get_option( 'seopress_titles_option_name' );
3282
-
3283
- $check = isset($options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex']);
3284
-
3285
- echo '<input id="seopress_titles_tax_noindex['.$seopress_tax_key.']" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][noindex]" type="checkbox"';
3286
- if ('1' == $check) echo 'checked="yes"';
3287
- echo ' value="1"/>';
3288
-
3289
- echo '<label for="seopress_titles_tax_noindex['.$seopress_tax_key.']">'. __( 'Do not display this taxonomy archive in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3290
-
3291
- if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex'])) {
3292
- esc_attr( $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex']);
3293
- }
3294
-
3295
- echo '</div>';
3296
-
3297
- //Tax No-Follow
3298
- echo '<div class="seopress_wrap_tax">';
3299
-
3300
- $options = get_option( 'seopress_titles_option_name' );
3301
-
3302
- $check = isset($options['seopress_titles_tax_titles'][$seopress_tax_key]['nofollow']);
3303
-
3304
- echo '<input id="seopress_titles_tax_nofollow['.$seopress_tax_key.']" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][nofollow]" type="checkbox"';
3305
- if ('1' == $check) echo 'checked="yes"';
3306
- echo ' value="1"/>';
3307
-
3308
- echo '<label for="seopress_titles_tax_nofollow['.$seopress_tax_key.']">'. __( 'Do not follow links for this taxonomy archive <strong>(nofollow)</strong>', 'wp-seopress' ) .'</label>';
3309
-
3310
- if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['nofollow'])) {
3311
- esc_attr( $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['nofollow']);
3312
- }
3313
-
3314
- echo '</div>';
3315
- }
3316
- }
3317
-
3318
- //Archives
3319
- public function seopress_titles_archives_titles_callback()
3320
- {
3321
- foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
3322
- if (!in_array($seopress_cpt_key, array('post','page'))) {
3323
-
3324
- $check = isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['title']) ? $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['title'] : NULL;
3325
- echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em> ';
3326
-
3327
- if (get_post_type_archive_link($seopress_cpt_value->name)) {
3328
- echo '<span class="link-archive"><span class="dashicons dashicons-external"></span><a href="'.get_post_type_archive_link($seopress_cpt_value->name).'" target="_blank">'.__('See archive','wp-seopress').'</a></span>';
3329
- }
3330
-
3331
- echo '</h2>';
3332
-
3333
- //Archive Title CPT
3334
- echo '<div class="seopress_wrap_archive_cpt">';
3335
-
3336
- _e('Title template','wp-seopress');
3337
- echo "<br/>";
3338
-
3339
- echo "<script>
3340
- jQuery(document).ready(function($) {
3341
- $('#seopress-tag-archive-title-".$seopress_cpt_key."').click(function() {
3342
- $('#seopress_titles_archive_titles_".$seopress_cpt_key."').val($('#seopress_titles_archive_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-archive-title-".$seopress_cpt_key."').attr('data-tag'));
3343
- });
3344
- $('#seopress-tag-archive-sep-".$seopress_cpt_key."').click(function() {
3345
- $('#seopress_titles_archive_titles_".$seopress_cpt_key."').val($('#seopress_titles_archive_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-archive-sep-".$seopress_cpt_key."').attr('data-tag'));
3346
- });
3347
- $('#seopress-tag-archive-sitetitle-".$seopress_cpt_key."').click(function() {
3348
- $('#seopress_titles_archive_titles_".$seopress_cpt_key."').val($('#seopress_titles_archive_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-archive-sitetitle-".$seopress_cpt_key."').attr('data-tag'));
3349
- });
3350
- });
3351
- </script>";
3352
-
3353
- printf(
3354
- '<input type="text" id="seopress_titles_archive_titles_'.$seopress_cpt_key.'" name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][title]" value="%s"/>',
3355
- esc_html($check)
3356
- );
3357
-
3358
- echo '<div class="wrap-tags"><span id="seopress-tag-archive-title-'.$seopress_cpt_key.'" data-tag="%%cpt_plural%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Post Type Archive Name','wp-seopress').'</span>';
3359
-
3360
- echo '<span id="seopress-tag-archive-sep-'.$seopress_cpt_key.'" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3361
-
3362
- echo '<span id="seopress-tag-archive-sitetitle-'.$seopress_cpt_key.'" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3363
-
3364
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3365
-
3366
- echo '</div>';
3367
-
3368
- //Archive Meta Description CPT
3369
- echo '<div class="seopress_wrap_archive_cpt">';
3370
-
3371
- _e('Meta description template','wp-seopress');
3372
- echo "<br/>";
3373
-
3374
- $check = isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['description']) ? $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['description'] : NULL;
3375
-
3376
- printf(
3377
- '<textarea name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][description]">%s</textarea>',
3378
- esc_html( $check )
3379
- );
3380
-
3381
- echo '</div>';
3382
-
3383
- //Archive No-Index CPT
3384
- echo '<div class="seopress_wrap_archive_cpt">';
3385
-
3386
- $options = get_option( 'seopress_titles_option_name' );
3387
-
3388
- $check = isset($options['seopress_titles_archive_titles'][$seopress_cpt_key]['noindex']);
3389
-
3390
- echo '<input id="seopress_titles_archive_cpt_noindex['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][noindex]" type="checkbox"';
3391
- if ('1' == $check) echo 'checked="yes"';
3392
- echo ' value="1"/>';
3393
-
3394
- echo '<label for="seopress_titles_archive_cpt_noindex['.$seopress_cpt_key.']">'. __( 'Do not display this post type archive in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3395
-
3396
- if (isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['noindex'])) {
3397
- esc_attr( $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['noindex']);
3398
- }
3399
-
3400
- echo '</div>';
3401
-
3402
- //Archive No-Follow CPT
3403
- echo '<div class="seopress_wrap_archive_cpt">';
3404
-
3405
- $options = get_option( 'seopress_titles_option_name' );
3406
-
3407
- $check = isset($options['seopress_titles_archive_titles'][$seopress_cpt_key]['nofollow']);
3408
-
3409
- echo '<input id="seopress_titles_archive_cpt_nofollow['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][nofollow]" type="checkbox"';
3410
- if ('1' == $check) echo 'checked="yes"';
3411
- echo ' value="1"/>';
3412
-
3413
- echo '<label for="seopress_titles_archive_cpt_nofollow['.$seopress_cpt_key.']">'. __( 'Do not follow links for this post type archive <strong>(nofollow)</strong>', 'wp-seopress' ) .'</label>';
3414
-
3415
- if (isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['nofollow'])) {
3416
- esc_attr( $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['nofollow']);
3417
- }
3418
-
3419
- echo '</div>';
3420
- }
3421
- }
3422
- }
3423
-
3424
-
3425
- public function seopress_titles_archives_author_title_callback()
3426
- {
3427
- echo '<h2>'.__('Author archives','wp-seopress').'</h2>';
3428
-
3429
- _e('Title template','wp-seopress');
3430
- echo "<br/>";
3431
-
3432
- printf(
3433
- '<input id="seopress_titles_archive_post_author" type="text" name="seopress_titles_option_name[seopress_titles_archives_author_title]" value="%s"/>',
3434
- esc_html( $this->options['seopress_titles_archives_author_title'])
3435
-
3436
- );
3437
-
3438
- echo '<div class="wrap-tags"><span id="seopress-tag-post-author" data-tag="%%post_author%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Post author','wp-seopress').'</span>';
3439
- echo '<span id="seopress-tag-sep-author" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3440
- echo '<span id="seopress-tag-site-title-author" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3441
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3442
-
3443
- }
3444
-
3445
- public function seopress_titles_archives_author_desc_callback()
3446
- {
3447
- _e('Meta description template','wp-seopress');
3448
- echo "<br/>";
3449
-
3450
- $check = isset($this->options['seopress_titles_archives_author_desc']) ? $this->options['seopress_titles_archives_author_desc'] : NULL;
3451
-
3452
- printf(
3453
- '<textarea name="seopress_titles_option_name[seopress_titles_archives_author_desc]">%s</textarea>',
3454
- esc_html( $check )
3455
-
3456
- );
3457
-
3458
- }
3459
-
3460
- public function seopress_titles_archives_author_noindex_callback()
3461
- {
3462
-
3463
- $options = get_option( 'seopress_titles_option_name' );
3464
-
3465
- $check = isset($options['seopress_titles_archives_author_noindex']);
3466
-
3467
- echo '<input id="seopress_titles_archives_author_noindex" name="seopress_titles_option_name[seopress_titles_archives_author_noindex]" type="checkbox"';
3468
- if ('1' == $check) echo 'checked="yes"';
3469
- echo ' value="1"/>';
3470
-
3471
- echo '<label for="seopress_titles_archives_author_noindex">'. __( 'Do not display author archives in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3472
-
3473
- if (isset($this->options['seopress_titles_archives_author_noindex'])) {
3474
- esc_attr( $this->options['seopress_titles_archives_author_noindex']);
3475
- }
3476
- }
3477
-
3478
- public function seopress_titles_archives_author_disable_callback()
3479
- {
3480
-
3481
- $options = get_option( 'seopress_titles_option_name' );
3482
-
3483
- $check = isset($options['seopress_titles_archives_author_disable']);
3484
-
3485
- echo '<input id="seopress_titles_archives_author_disable" name="seopress_titles_option_name[seopress_titles_archives_author_disable]" type="checkbox"';
3486
- if ('1' == $check) echo 'checked="yes"';
3487
- echo ' value="1"/>';
3488
-
3489
- echo '<label for="seopress_titles_archives_author_disable">'. __( 'Disable author archives', 'wp-seopress' ) .'</label>';
3490
-
3491
- if (isset($this->options['seopress_titles_archives_author_disable'])) {
3492
- esc_attr( $this->options['seopress_titles_archives_author_disable']);
3493
- }
3494
- }
3495
-
3496
- public function seopress_titles_archives_date_title_callback()
3497
- {
3498
- echo '<h2>'.__('Date archives','wp-seopress').'</h2>';
3499
-
3500
- _e('Title template','wp-seopress');
3501
- echo "<br/>";
3502
-
3503
- printf(
3504
- '<input id="seopress_titles_archives_date_title" type="text" name="seopress_titles_option_name[seopress_titles_archives_date_title]" value="%s"/>',
3505
- esc_html( $this->options['seopress_titles_archives_date_title'])
3506
-
3507
- );
3508
-
3509
- echo '<div class="wrap-tags"><span id="seopress-tag-archive-date" data-tag="%%archive_date%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Date archives','wp-seopress').'</span>';
3510
- echo '<span id="seopress-tag-sep-date" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3511
- echo '<span id="seopress-tag-site-title-date" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3512
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3513
-
3514
- }
3515
-
3516
- public function seopress_titles_archives_date_desc_callback()
3517
- {
3518
- _e('Meta description template','wp-seopress');
3519
- echo "<br/>";
3520
-
3521
- $check = isset($this->options['seopress_titles_archives_date_desc']) ? $this->options['seopress_titles_archives_date_desc'] : NULL;
3522
-
3523
- printf(
3524
- '<textarea name="seopress_titles_option_name[seopress_titles_archives_date_desc]">%s</textarea>',
3525
- esc_html( $check )
3526
-
3527
- );
3528
- }
3529
-
3530
- public function seopress_titles_archives_date_noindex_callback()
3531
- {
3532
-
3533
- $options = get_option( 'seopress_titles_option_name' );
3534
-
3535
- $check = isset($options['seopress_titles_archives_date_noindex']);
3536
-
3537
- echo '<input id="seopress_titles_archives_date_noindex" name="seopress_titles_option_name[seopress_titles_archives_date_noindex]" type="checkbox"';
3538
- if ('1' == $check) echo 'checked="yes"';
3539
- echo ' value="1"/>';
3540
-
3541
- echo '<label for="seopress_titles_archives_date_noindex">'. __( 'Do not display date archives in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3542
-
3543
- if (isset($this->options['seopress_titles_archives_date_noindex'])) {
3544
- esc_attr( $this->options['seopress_titles_archives_date_noindex']);
3545
- }
3546
- }
3547
-
3548
- public function seopress_titles_archives_date_disable_callback()
3549
- {
3550
-
3551
- $options = get_option( 'seopress_titles_option_name' );
3552
-
3553
- $check = isset($options['seopress_titles_archives_date_disable']);
3554
-
3555
- echo '<input id="seopress_titles_archives_date_disable" name="seopress_titles_option_name[seopress_titles_archives_date_disable]" type="checkbox"';
3556
- if ('1' == $check) echo 'checked="yes"';
3557
- echo ' value="1"/>';
3558
-
3559
- echo '<label for="seopress_titles_archives_date_disable">'. __( 'Disable date archives', 'wp-seopress' ) .'</label>';
3560
-
3561
- if (isset($this->options['seopress_titles_archives_date_disable'])) {
3562
- esc_attr( $this->options['seopress_titles_archives_date_disable']);
3563
- }
3564
- }
3565
-
3566
- public function seopress_titles_archives_search_title_callback()
3567
- {
3568
- echo '<h2>'.__('Search archives','wp-seopress').'</h2>';
3569
-
3570
- _e('Title template','wp-seopress');
3571
- echo "<br/>";
3572
-
3573
- printf(
3574
- '<input id="seopress_titles_archives_search_title" type="text" name="seopress_titles_option_name[seopress_titles_archives_search_title]" value="%s"/>',
3575
- esc_html( $this->options['seopress_titles_archives_search_title'])
3576
-
3577
- );
3578
-
3579
- echo '<div class="wrap-tags"><span id="seopress-tag-search-keywords" data-tag="%%search_keywords%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Search Keywords','wp-seopress').'</span>';
3580
- echo '<span id="seopress-tag-sep-search" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3581
- echo '<span id="seopress-tag-site-title-search" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3582
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3583
-
3584
- }
3585
-
3586
- public function seopress_titles_archives_search_desc_callback()
3587
- {
3588
- _e('Meta description template','wp-seopress');
3589
- echo "<br/>";
3590
-
3591
- $check = isset($this->options['seopress_titles_archives_search_desc']) ? $this->options['seopress_titles_archives_search_desc'] : NULL;
3592
-
3593
- printf(
3594
- '<textarea name="seopress_titles_option_name[seopress_titles_archives_search_desc]">%s</textarea>',
3595
- esc_html( $check )
3596
-
3597
- );
3598
-
3599
- }
3600
-
3601
- public function seopress_titles_archives_search_title_noindex_callback()
3602
- {
3603
-
3604
- $options = get_option( 'seopress_titles_option_name' );
3605
-
3606
- $check = isset($options['seopress_titles_archives_search_title_noindex']);
3607
-
3608
- echo '<input id="seopress_titles_archives_search_title_noindex" name="seopress_titles_option_name[seopress_titles_archives_search_title_noindex]" type="checkbox"';
3609
- if ('1' == $check) echo 'checked="yes"';
3610
- echo ' value="1"/>';
3611
-
3612
- echo '<label for="seopress_titles_archives_search_title_noindex">'. __( 'Do not display search archives in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3613
-
3614
- if (isset($this->options['seopress_titles_archives_search_title_noindex'])) {
3615
- esc_attr( $this->options['seopress_titles_archives_search_title_noindex']);
3616
- }
3617
- }
3618
-
3619
- public function seopress_titles_archives_404_title_callback()
3620
- {
3621
- echo '<h2>'.__('404 archives','wp-seopress').'</h2>';
3622
-
3623
- _e('Title template','wp-seopress');
3624
- echo "<br/>";
3625
-
3626
- printf(
3627
- '<input id="seopress_titles_archives_404_title" type="text" name="seopress_titles_option_name[seopress_titles_archives_404_title]" value="%s"/>',
3628
- esc_html( $this->options['seopress_titles_archives_404_title'])
3629
-
3630
- );
3631
- echo '<div class="wrap-tags"><span id="seopress-tag-site-title-404" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3632
- echo '<span id="seopress-tag-sep-404" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3633
- echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3634
- }
3635
-
3636
- public function seopress_titles_archives_404_desc_callback()
3637
- {
3638
- _e('Meta description template','wp-seopress');
3639
- echo "<br/>";
3640
-
3641
- $check = isset($this->options['seopress_titles_archives_404_desc']) ? $this->options['seopress_titles_archives_404_desc'] : NULL;
3642
-
3643
- printf(
3644
- '<textarea name="seopress_titles_option_name[seopress_titles_archives_404_desc]">%s</textarea>',
3645
- esc_html( $check )
3646
-
3647
- );
3648
-
3649
- }
3650
-
3651
- //Advanced
3652
- public function seopress_titles_noindex_callback()
3653
- {
3654
- $options = get_option( 'seopress_titles_option_name' );
3655
-
3656
- $check = isset($options['seopress_titles_noindex']);
3657
-
3658
- echo '<input id="seopress_titles_noindex" name="seopress_titles_option_name[seopress_titles_noindex]" type="checkbox"';
3659
- if ('1' == $check) echo 'checked="yes"';
3660
- echo ' value="1"/>';
3661
-
3662
- echo '<label for="seopress_titles_noindex">'. __( 'noindex', 'wp-seopress' ) .'</label>';
3663
-
3664
- echo '<p class="description">'.__('Do not display all pages of the site in Google search results and do not display "Cached" links in search results.','wp-seopress').'</p>';
3665
-
3666
- if (isset($this->options['seopress_titles_noindex'])) {
3667
- esc_attr( $this->options['seopress_titles_noindex']);
3668
- }
3669
- }
3670
-
3671
- public function seopress_titles_nofollow_callback()
3672
- {
3673
- $options = get_option( 'seopress_titles_option_name' );
3674
-
3675
- $check = isset($options['seopress_titles_nofollow']);
3676
-
3677
- echo '<input id="seopress_titles_nofollow" name="seopress_titles_option_name[seopress_titles_nofollow]" type="checkbox"';
3678
- if ('1' == $check) echo 'checked="yes"';
3679
- echo ' value="1"/>';
3680
-
3681
- echo '<label for="seopress_titles_nofollow">'. __( 'nofollow', 'wp-seopress' ) .'</label>';
3682
-
3683
- echo '<p class="description">'.__('Do not follow links for all pages.','wp-seopress').'</p>';
3684
-
3685
- if (isset($this->options['seopress_titles_nofollow'])) {
3686
- esc_attr( $this->options['seopress_titles_nofollow']);
3687
- }
3688
- }
3689
-
3690
- public function seopress_titles_noodp_callback()
3691
- {
3692
- $options = get_option( 'seopress_titles_option_name' );
3693
-
3694
- $check = isset($options['seopress_titles_noodp']);
3695
-
3696
- echo '<input id="seopress_titles_noodp" name="seopress_titles_option_name[seopress_titles_noodp]" type="checkbox"';
3697
- if ('1' == $check) echo 'checked="yes"';
3698
- echo ' value="1"/>';
3699
-
3700
- echo '<label for="seopress_titles_noodp">'. __( 'noodp', 'wp-seopress' ) .'</label>';
3701
-
3702
- echo '<p class="description">'.__('Do not use Open Directory project metadata for titles or excerpts for all pages.','wp-seopress').'</p>';
3703
-
3704
- if (isset($this->options['seopress_titles_noodp'])) {
3705
- esc_attr( $this->options['seopress_titles_noodp']);
3706
- }
3707
- }
3708
-
3709
- public function seopress_titles_noimageindex_callback()
3710
- {
3711
- $options = get_option( 'seopress_titles_option_name' );
3712
-
3713
- $check = isset($options['seopress_titles_noimageindex']);
3714
-
3715
- echo '<input id="seopress_titles_noimageindex" name="seopress_titles_option_name[seopress_titles_noimageindex]" type="checkbox"';
3716
- if ('1' == $check) echo 'checked="yes"';
3717
- echo ' value="1"/>';
3718
-
3719
- echo '<label for="seopress_titles_noimageindex">'. __( 'noimageindex', 'wp-seopress' ) .'</label>';
3720
-
3721
- echo '<p class="description">'.__('Do not index images from the entire site.','wp-seopress').'</p>';
3722
-
3723
- if (isset($this->options['seopress_titles_noimageindex'])) {
3724
- esc_attr( $this->options['seopress_titles_noimageindex']);
3725
- }
3726
- }
3727
-
3728
- public function seopress_titles_noarchive_callback()
3729
- {
3730
- $options = get_option( 'seopress_titles_option_name' );
3731
-
3732
- $check = isset($options['seopress_titles_noarchive']);
3733
-
3734
- echo '<input id="seopress_titles_noarchive" name="seopress_titles_option_name[seopress_titles_noarchive]" type="checkbox"';
3735
- if ('1' == $check) echo 'checked="yes"';
3736
- echo ' value="1"/>';
3737
-
3738
- echo '<label for="seopress_titles_noarchive">'. __( 'noarchive', 'wp-seopress' ) .'</label>';
3739
-
3740
- echo '<p class="description">'.__('Do not display a "Cached" link in the Google search results.','wp-seopress').'</p>';
3741
-
3742
- if (isset($this->options['seopress_titles_noarchive'])) {
3743
- esc_attr( $this->options['seopress_titles_noarchive']);
3744
- }
3745
- }
3746
-
3747
- public function seopress_titles_nosnippet_callback()
3748
- {
3749
- $options = get_option( 'seopress_titles_option_name' );
3750
-
3751
- $check = isset($options['seopress_titles_nosnippet']);
3752
-
3753
- echo '<input id="seopress_titles_nosnippet" name="seopress_titles_option_name[seopress_titles_nosnippet]" type="checkbox"';
3754
- if ('1' == $check) echo 'checked="yes"';
3755
- echo ' value="1"/>';
3756
-
3757
- echo '<label for="seopress_titles_nosnippet">'. __( 'nosnippet', 'wp-seopress' ) .'</label>';
3758
-
3759
- echo '<p class="description">'.__('Do not display a description in the Google search results for all pages.','wp-seopress').'</p>';
3760
-
3761
- if (isset($this->options['seopress_titles_nosnippet'])) {
3762
- esc_attr( $this->options['seopress_titles_nosnippet']);
3763
- }
3764
- }
3765
-
3766
- public function seopress_titles_nositelinkssearchbox_callback()
3767
- {
3768
- $options = get_option( 'seopress_titles_option_name' );
3769
-
3770
- $check = isset($options['seopress_titles_nositelinkssearchbox']);
3771
-
3772
- echo '<input id="seopress_titles_nositelinkssearchbox" name="seopress_titles_option_name[seopress_titles_nositelinkssearchbox]" type="checkbox"';
3773
- if ('1' == $check) echo 'checked="yes"';
3774
- echo ' value="1"/>';
3775
-
3776
- echo '<label for="seopress_titles_nositelinkssearchbox">'. __( 'nositelinkssearchbox', 'wp-seopress' ) .'</label>';
3777
-
3778
- echo '<p class="description">'.__('Prevents Google to display a sitelinks searchbox in search results. Enable this option will remove the "Website" schema from your source code.','wp-seopress').'</p>';
3779
-
3780
- if (isset($this->options['seopress_titles_nositelinkssearchbox'])) {
3781
- esc_attr( $this->options['seopress_titles_nositelinkssearchbox']);
3782
- }
3783
- }
3784
-
3785
- public function seopress_titles_paged_rel_callback()
3786
- {
3787
- $options = get_option( 'seopress_titles_option_name' );
3788
-
3789
- $check = isset($options['seopress_titles_paged_rel']);
3790
-
3791
- echo '<input id="seopress_titles_paged_rel" name="seopress_titles_option_name[seopress_titles_paged_rel]" type="checkbox"';
3792
- if ('1' == $check) echo 'checked="yes"';
3793
- echo ' value="1"/>';
3794
-
3795
- echo '<label for="seopress_titles_paged_rel">'. __( 'Add rel next/prev link in head of paginated archive pages', 'wp-seopress' ) .'</label>';
3796
-
3797
- echo '<p class="description"><span class="dashicons dashicons-external"></span><a href="https://support.google.com/webmasters/answer/1663744?hl=en" target="_blank">'.__('Learn more on Google website','wp-seopress').'</p>';
3798
-
3799
- if (isset($this->options['seopress_titles_paged_rel'])) {
3800
- esc_attr( $this->options['seopress_titles_paged_rel']);
3801
- }
3802
- }
3803
-
3804
- public function seopress_xml_sitemap_general_enable_callback()
3805
- {
3806
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3807
-
3808
- $check = isset($options['seopress_xml_sitemap_general_enable']);
3809
-
3810
- echo '<input id="seopress_xml_sitemap_general_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_general_enable]" type="checkbox"';
3811
- if ('1' == $check) echo 'checked="yes"';
3812
- echo ' value="1"/>';
3813
-
3814
- echo '<label for="seopress_xml_sitemap_general_enable">'. __( 'Enable XML Sitemap', 'wp-seopress' ) .'</label>';
3815
-
3816
- if (function_exists('seopress_get_locale')) {
3817
- if (seopress_get_locale() =='fr') {
3818
- $seopress_docs_link['support']['sitemaps'] = 'https://www.seopress.org/fr/support/guides/activer-sitemap-xml/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3819
- } else {
3820
- $seopress_docs_link['support']['sitemaps'] = 'https://www.seopress.org/support/guides/enable-xml-sitemaps/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3821
- }
3822
- }
3823
-
3824
- echo '<a href="'.$seopress_docs_link['support']['sitemaps'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable XML Sitemaps - new window','wp-seopress').'</span></a>';
3825
-
3826
- if (isset($this->options['seopress_xml_sitemap_general_enable'])) {
3827
- esc_attr( $this->options['seopress_xml_sitemap_general_enable']);
3828
- }
3829
- }
3830
-
3831
- public function seopress_xml_sitemap_img_enable_callback()
3832
- {
3833
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3834
-
3835
- $check = isset($options['seopress_xml_sitemap_img_enable']);
3836
-
3837
- echo '<input id="seopress_xml_sitemap_img_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_img_enable]" type="checkbox"';
3838
- if ('1' == $check) echo 'checked="yes"';
3839
- echo ' value="1"/>';
3840
-
3841
- echo '<label for="seopress_xml_sitemap_img_enable">'. __( 'Enable Image Sitemaps (standard images, image galleries, featured image, WooCommerce product images)', 'wp-seopress' ) .'</label>';
3842
-
3843
- echo '<p class="description">'.__('Images in XML sitemaps are visible only from the source code.','wp-seopress').'</p>';
3844
-
3845
- if (function_exists('seopress_get_locale')) {
3846
- if (seopress_get_locale() =='fr') {
3847
- $seopress_docs_link['support']['sitemaps']['image'] = 'https://www.seopress.org/fr/support/guides/activer-sitemap-xml-images/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3848
- } else {
3849
- $seopress_docs_link['support']['sitemaps']['image'] = 'https://www.seopress.org/support/guides/enable-xml-image-sitemaps/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3850
- }
3851
- }
3852
-
3853
- echo '<a href="'.$seopress_docs_link['support']['sitemaps']['image'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable XML image sitemaps - new window','wp-seopress').'</span></a>';
3854
-
3855
- if (isset($this->options['seopress_xml_sitemap_img_enable'])) {
3856
- esc_attr( $this->options['seopress_xml_sitemap_img_enable']);
3857
- }
3858
- }
3859
-
3860
- public function seopress_xml_sitemap_video_enable_callback()
3861
- {
3862
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
3863
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3864
-
3865
- $check = isset($options['seopress_xml_sitemap_video_enable']);
3866
-
3867
- echo '<input id="seopress_xml_sitemap_video_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_video_enable]" type="checkbox"';
3868
- if ('1' == $check) echo 'checked="yes"';
3869
- echo ' value="1"/>';
3870
-
3871
- echo '<label for="seopress_xml_sitemap_video_enable">'. __( 'Enable Video Sitemaps', 'wp-seopress' ) .'</label>';
3872
-
3873
- if (function_exists('seopress_get_locale')) {
3874
- if (seopress_get_locale() =='fr') {
3875
- $seopress_docs_link['support']['sitemaps']['video'] = 'https://www.seopress.org/fr/support/guides/plan-de-site-xml-video/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3876
- } else {
3877
- $seopress_docs_link['support']['sitemaps']['video'] = 'https://www.seopress.org/support/guides/enable-video-xml-sitemap/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3878
- }
3879
- }
3880
-
3881
- printf('<p class="description">'.__('Your video sitemap is empty? Read our guide to learn more about <a href="%s" target="_blank">adding videos to your sitemap.</a>','wp-seopress').'</p>', $seopress_docs_link['support']['sitemaps']['video']);
3882
-
3883
- echo '<a href="'.$seopress_docs_link['support']['sitemaps']['video'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable XML video sitemaps - new window','wp-seopress').'</span></a>';
3884
-
3885
- if (isset($this->options['seopress_xml_sitemap_video_enable'])) {
3886
- esc_attr( $this->options['seopress_xml_sitemap_video_enable']);
3887
- }
3888
- }
3889
- }
3890
-
3891
- public function seopress_xml_sitemap_author_enable_callback()
3892
- {
3893
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3894
-
3895
- $check = isset($options['seopress_xml_sitemap_author_enable']);
3896
-
3897
- echo '<input id="seopress_xml_sitemap_author_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_author_enable]" type="checkbox"';
3898
- if ('1' == $check) echo 'checked="yes"';
3899
- echo ' value="1"/>';
3900
-
3901
- echo '<label for="seopress_xml_sitemap_author_enable">'. __( 'Enable Author Sitemap', 'wp-seopress' ) .'</label>';
3902
-
3903
- echo '<p class="description">'.__('Make sure to enable author archive from SEO, titles and metas, archives tab.</a>','wp-seopress').'</p>';
3904
-
3905
- if (isset($this->options['seopress_xml_sitemap_author_enable'])) {
3906
- esc_attr( $this->options['seopress_xml_sitemap_author_enable']);
3907
- }
3908
- }
3909
-
3910
- public function seopress_xml_sitemap_html_enable_callback()
3911
- {
3912
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3913
-
3914
- $check = isset($options['seopress_xml_sitemap_html_enable']);
3915
-
3916
- echo '<input id="seopress_xml_sitemap_html_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_enable]" type="checkbox"';
3917
- if ('1' == $check) echo 'checked="yes"';
3918
- echo ' value="1"/>';
3919
-
3920
- echo '<label for="seopress_xml_sitemap_html_enable">'. __( 'Enable HTML Sitemap', 'wp-seopress' ) .'</label>';
3921
-
3922
- if (function_exists('seopress_get_locale')) {
3923
- if (seopress_get_locale() =='fr') {
3924
- $seopress_docs_link['support']['sitemaps']['html'] = 'https://www.seopress.org/fr/support/guides/activer-plan-de-site-html/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3925
- } else {
3926
- $seopress_docs_link['support']['sitemaps']['html'] = 'https://www.seopress.org/support/guides/enable-html-sitemap/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3927
- }
3928
- }
3929
-
3930
- echo '<a href="'.$seopress_docs_link['support']['sitemaps']['html'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable a HTML Sitemap - new window','wp-seopress').'</span></a>';
3931
-
3932
- if (isset($this->options['seopress_xml_sitemap_html_enable'])) {
3933
- esc_attr( $this->options['seopress_xml_sitemap_html_enable']);
3934
- }
3935
- }
3936
-
3937
- public function seopress_xml_sitemap_post_types_list_callback()
3938
- {
3939
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3940
-
3941
- $check = isset($options['seopress_xml_sitemap_post_types_list']);
3942
-
3943
- global $wp_post_types;
3944
-
3945
- $args = array(
3946
- 'show_ui' => true,
3947
- 'public' => true,
3948
- );
3949
-
3950
- $output = 'objects'; // names or objects, note names is the default
3951
- $operator = 'and'; // 'and' or 'or'
3952
-
3953
- $post_types = get_post_types( $args, $output, $operator );
3954
-
3955
- foreach ($post_types as $seopress_cpt_key => $seopress_cpt_value) {
3956
-
3957
- echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em></h2>';
3958
-
3959
- //List all post types
3960
- echo '<div class="seopress_wrap_single_cpt">';
3961
-
3962
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3963
-
3964
- $check = isset($options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include']);
3965
-
3966
- echo '<input id="seopress_xml_sitemap_post_types_list_include['.$seopress_cpt_key.']" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_post_types_list]['.$seopress_cpt_key.'][include]" type="checkbox"';
3967
- if ('1' == $check) echo 'checked="yes"';
3968
- echo ' value="1"/>';
3969
-
3970
- echo '<label for="seopress_xml_sitemap_post_types_list_include['.$seopress_cpt_key.']">'. __( 'Include', 'wp-seopress' ) .'</label>';
3971
-
3972
- if ($seopress_cpt_value->name == 'attachment') {
3973
- echo '<p class="description">'.__('You should never include attachment post type in your sitemap. Be careful if you checked this.','wp-seopress').'</p>';
3974
- }
3975
-
3976
- if (isset($this->options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include'])) {
3977
- esc_attr( $this->options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include']);
3978
- }
3979
-
3980
- echo '</div>';
3981
- }
3982
- }
3983
-
3984
- public function seopress_xml_sitemap_taxonomies_list_callback()
3985
- {
3986
- $options = get_option( 'seopress_xml_sitemap_option_name' );
3987
-
3988
- $check = isset($options['seopress_xml_sitemap_taxonomies_list']);
3989
-
3990
- $args = array(
3991
- 'show_ui' => true,
3992
- 'public' => true,
3993
-
3994
- );
3995
- $output = 'objects'; // or objects
3996
- $operator = 'and'; // 'and' or 'or'
3997
- $taxonomies = get_taxonomies( $args, $output, $operator );
3998
-
3999
- foreach ($taxonomies as $seopress_tax_key => $seopress_tax_value) {
4000
-
4001
- echo '<h2>'.$seopress_tax_value->labels->name.' <em><small>['.$seopress_tax_value->name.']</small></em></h2>';
4002
-
4003
- //List all taxonomies
4004
- echo '<div class="seopress_wrap_single_tax">';
4005
-
4006
- $options = get_option( 'seopress_xml_sitemap_option_name' );
4007
-
4008
- $check = isset($options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include']);
4009
-
4010
- echo '<input id="seopress_xml_sitemap_taxonomies_list_include['.$seopress_tax_key.']" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_taxonomies_list]['.$seopress_tax_key.'][include]" type="checkbox"';
4011
- if ('1' == $check) echo 'checked="yes"';
4012
- echo ' value="1"/>';
4013
-
4014
- echo '<label for="seopress_xml_sitemap_taxonomies_list_include['.$seopress_tax_key.']">'. __( 'Include', 'wp-seopress' ) .'</label>';
4015
-
4016
- if (isset($this->options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include'])) {
4017
- esc_attr( $this->options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include']);
4018
- }
4019
-
4020
- echo '</div>';
4021
- }
4022
- }
4023
-
4024
- public function seopress_xml_sitemap_html_mapping_callback()
4025
- {
4026
- $check = isset($this->options['seopress_xml_sitemap_html_mapping']) ? $this->options['seopress_xml_sitemap_html_mapping'] : NULL;
4027
-
4028
- printf(
4029
- '<input type="text" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_mapping]" placeholder="'.esc_html__('eg: 2, 28, 68','wp-seopress').'" aria-label="'.__('Enter a post, page or custom post type ID(s) to display the sitemap','wp-seopress').'" value="%s"/>',
4030
- esc_html( $check )
4031
- );
4032
-
4033
- echo '<br><br><p>'.__('You can also use this shortcode:','wp-seopress').'</p>';
4034
-
4035
- echo '<pre>[seopress_html_sitemap]</pre>';
4036
- }
4037
-
4038
- public function seopress_xml_sitemap_html_exclude_callback()
4039
- {
4040
- $check = isset($this->options['seopress_xml_sitemap_html_exclude']) ? $this->options['seopress_xml_sitemap_html_exclude'] : NULL;
4041
-
4042
- printf(
4043
- '<input type="text" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_exclude]" placeholder="'.esc_html__('eg: 13, 8, 38','wp-seopress').'" aria-label="'.__('Exclude some Posts, Pages, Custom Post Types or Terms IDs','wp-seopress').'" value="%s"/>',
4044
- esc_html( $check )
4045
- );
4046
- }
4047
-
4048
- public function seopress_xml_sitemap_html_order_callback()
4049
- {
4050
- $options = get_option( 'seopress_xml_sitemap_option_name' );
4051
-
4052
- $selected = isset($options['seopress_xml_sitemap_html_order']) ? $options['seopress_xml_sitemap_html_order'] : NULL;
4053
-
4054
- echo '<select id="seopress_xml_sitemap_html_order" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_order]">';
4055
- echo ' <option ';
4056
- if ('DESC' == $selected) echo 'selected="selected"';
4057
- echo ' value="DESC">'. __("DESC (descending order from highest to lowest values (3, 2, 1; c, b, a))","wp-seopress") .'</option>';
4058
- echo ' <option ';
4059
- if ('ASC' == $selected) echo 'selected="selected"';
4060
- echo ' value="ASC">'. __("ASC (ascending order from lowest to highest values (1, 2, 3; a, b, c))","wp-seopress") .'</option>';
4061
- echo '</select>';
4062
-
4063
- if (isset($this->options['seopress_xml_sitemap_html_order'])) {
4064
- esc_attr( $this->options['seopress_xml_sitemap_html_order']);
4065
- }
4066
- }
4067
-
4068
- public function seopress_xml_sitemap_html_orderby_callback()
4069
- {
4070
- $options = get_option( 'seopress_xml_sitemap_option_name' );
4071
-
4072
- $selected = isset($options['seopress_xml_sitemap_html_orderby']) ? $options['seopress_xml_sitemap_html_orderby'] : NULL;
4073
-
4074
- echo '<select id="seopress_xml_sitemap_html_orderby" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_orderby]">';
4075
- echo ' <option ';
4076
- if ('date' == $selected) echo 'selected="selected"';
4077
- echo ' value="date">'. __("Default (date)","wp-seopress") .'</option>';
4078
- echo ' <option ';
4079
- if ('title' == $selected) echo 'selected="selected"';
4080
- echo ' value="title">'. __("Post Title","wp-seopress") .'</option>';
4081
- echo '<option ';
4082
- if ('modified' == $selected) echo 'selected="selected"';
4083
- echo ' value="modified">'. __("Modified date","wp-seopress") .'</option>';
4084
- echo '<option ';
4085
- if ('ID' == $selected) echo 'selected="selected"';
4086
- echo ' value="ID">'. __("Post ID","wp-seopress") .'</option>';
4087
- echo '<option ';
4088
- if ('menu_order' == $selected) echo 'selected="selected"';
4089
- echo ' value="menu_order">'. __("Menu order","wp-seopress") .'</option>';
4090
- echo '</select>';
4091
-
4092
- if (isset($this->options['seopress_xml_sitemap_html_orderby'])) {
4093
- esc_attr( $this->options['seopress_xml_sitemap_html_orderby']);
4094
- }
4095
- }
4096
-
4097
- public function seopress_xml_sitemap_html_date_callback()
4098
- {
4099
- $options = get_option( 'seopress_xml_sitemap_option_name' );
4100
-
4101
- $check = isset($options['seopress_xml_sitemap_html_date']);
4102
-
4103
- echo '<input id="seopress_xml_sitemap_html_date" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_date]" type="checkbox"';
4104
- if ('1' == $check) echo 'checked="yes"';
4105
- echo ' value="1"/>';
4106
-
4107
- echo '<label for="seopress_xml_sitemap_html_date">'. __( 'Disable date after each post, page, post type?', 'wp-seopress' ) .'</label>';
4108
-
4109
- if (isset($this->options['seopress_xml_sitemap_html_date'])) {
4110
- esc_attr( $this->options['seopress_xml_sitemap_html_date']);
4111
- }
4112
- }
4113
-
4114
- public function seopress_social_knowledge_type_callback()
4115
- {
4116
- $options = get_option( 'seopress_social_option_name' );
4117
-
4118
- $selected = isset($options['seopress_social_knowledge_type']) ? $options['seopress_social_knowledge_type'] : NULL;
4119
-
4120
- echo '<select id="seopress_social_knowledge_type" name="seopress_social_option_name[seopress_social_knowledge_type]">';
4121
- echo ' <option ';
4122
- if ('None' == $selected) echo 'selected="selected"';
4123
- echo ' value="none">'. __("None (will disable this feature)","wp-seopress") .'</option>';
4124
- echo ' <option ';
4125
- if ('Person' == $selected) echo 'selected="selected"';
4126
- echo ' value="Person">'. __("Person","wp-seopress") .'</option>';
4127
- echo '<option ';
4128
- if ('Organization' == $selected) echo 'selected="selected"';
4129
- echo ' value="Organization">'. __("Organization","wp-seopress") .'</option>';
4130
- echo '</select>';
4131
-
4132
- if (isset($this->options['seopress_social_knowledge_type'])) {
4133
- esc_attr( $this->options['seopress_social_knowledge_type']);
4134
- }
4135
- }
4136
-
4137
- public function seopress_social_knowledge_name_callback()
4138
- {
4139
- $check = isset($this->options['seopress_social_knowledge_name']) ? $this->options['seopress_social_knowledge_name'] : NULL;
4140
-
4141
- printf(
4142
- '<input type="text" name="seopress_social_option_name[seopress_social_knowledge_name]" placeholder="'.esc_html__('eg: SEOPress','wp-seopress').'" aria-label="'.__('Your name/organization','wp-seopress').'" value="%s"/>',
4143
- esc_html( $check )
4144
- );
4145
- }
4146
-
4147
- public function seopress_social_knowledge_img_callback()
4148
- {
4149
- $options = get_option( 'seopress_social_option_name' );
4150
-
4151
- $options_set = isset($options['seopress_social_knowledge_img']) ? esc_attr($options['seopress_social_knowledge_img']) : NULL;
4152
-
4153
- $check = isset($options['seopress_social_knowledge_img']);
4154
-
4155
- echo '<input id="seopress_social_knowledge_img_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_knowledge_img]" aria-label="'.__('Your photo/organization logo','wp-seopress').'" placeholder="'.esc_html__('Select your logo','wp-seopress').'" />
4156
-
4157
- <input id="seopress_social_knowledge_img_upload" class="button" type="button" value="'.__('Upload an Image','wp-seopress').'" />';
4158
-
4159
- echo '<p class="description">'.__('JPG, PNG, and GIF allowed.', 'wp-seopress').'</p>';
4160
-
4161
- if (isset($this->options['seopress_social_knowledge_img'])) {
4162
- esc_attr( $this->options['seopress_social_knowledge_img']);
4163
- }
4164
-
4165
- function seopress_social_knowledge_img_option() {
4166
- $seopress_social_knowledge_img_option = get_option("seopress_social_option_name");
4167
- if ( ! empty ( $seopress_social_knowledge_img_option ) ) {
4168
- foreach ($seopress_social_knowledge_img_option as $key => $seopress_social_knowledge_img_value)
4169
- $options[$key] = $seopress_social_knowledge_img_value;
4170
- if (isset($seopress_social_knowledge_img_option['seopress_social_knowledge_img'])) {
4171
- return $seopress_social_knowledge_img_option['seopress_social_knowledge_img'];
4172
- }
4173
- }
4174
- }
4175
- echo '<br>';
4176
- echo '<br>';
4177
- echo '<img style="width:200px;max-height:300px;" src="'.esc_attr(seopress_social_knowledge_img_option()).'"/>';
4178
- }
4179
-
4180
- public function seopress_social_knowledge_phone_callback()
4181
- {
4182
- $check = isset($this->options['seopress_social_knowledge_phone']) ? $this->options['seopress_social_knowledge_phone'] : NULL;
4183
-
4184
- printf(
4185
- '<input type="text" name="seopress_social_option_name[seopress_social_knowledge_phone]" placeholder="'.esc_html__('eg: +33123456789 (internationalized version required)','wp-seopress').'" aria-label="'.__('Organization\'s phone number (only for Organizations)','wp-seopress').'" value="%s"/>',
4186
- esc_html( $check )
4187
- );
4188
-
4189
- }
4190
-
4191
- public function seopress_social_knowledge_contact_type_callback()
4192
- {
4193
- $options = get_option( 'seopress_social_option_name' );
4194
-
4195
- $selected = isset($options['seopress_social_knowledge_contact_type']) ? $options['seopress_social_knowledge_contact_type'] : NULL;
4196
-
4197
- echo '<select id="seopress_social_knowledge_contact_type" name="seopress_social_option_name[seopress_social_knowledge_contact_type]">';
4198
- echo ' <option ';
4199
- if ('customer support' == $selected) echo 'selected="selected"';
4200
- echo ' value="customer support">'. __("Customer support","wp-seopress") .'</option>';
4201
- echo '<option ';
4202
- if ('technical support' == $selected) echo 'selected="selected"';
4203
- echo ' value="technical support">'. __("Technical support","wp-seopress") .'</option>';
4204
- echo '<option ';
4205
- if ('billing support' == $selected) echo 'selected="selected"';
4206
- echo ' value="billing support">'. __("Billing support","wp-seopress") .'</option>';
4207
- echo '<option ';
4208
- if ('bill payment' == $selected) echo 'selected="selected"';
4209
- echo ' value="bill payment">'. __("Bill payment","wp-seopress") .'</option>';
4210
- echo '<option ';
4211
- if ('sales' == $selected) echo 'selected="selected"';
4212
- echo ' value="sales">'. __("Sales","wp-seopress") .'</option>';
4213
- echo '<option ';
4214
- if ('credit card support' == $selected) echo 'selected="selected"';
4215
- echo ' value="credit card support">'. __("Credit card support","wp-seopress") .'</option>';
4216
- echo '<option ';
4217
- if ('emergency' == $selected) echo 'selected="selected"';
4218
- echo ' value="emergency">'. __("Emergency","wp-seopress") .'</option>';
4219
- echo '<option ';
4220
- if ('baggage tracking' == $selected) echo 'selected="selected"';
4221
- echo ' value="baggage tracking">'. __("Baggage tracking","wp-seopress") .'</option>';
4222
- echo '<option ';
4223
- if ('roadside assistance' == $selected) echo 'selected="selected"';
4224
- echo ' value="roadside assistance">'. __("Roadside assistance","wp-seopress") .'</option>';
4225
- echo '<option ';
4226
- if ('package tracking' == $selected) echo 'selected="selected"';
4227
- echo ' value="package tracking">'. __("Package tracking","wp-seopress") .'</option>';
4228
- echo '</select>';
4229
-
4230
- if (isset($this->options['seopress_social_knowledge_contact_type'])) {
4231
- esc_attr( $this->options['seopress_social_knowledge_contact_type']);
4232
- }
4233
- }
4234
-
4235
- public function seopress_social_knowledge_contact_option_callback()
4236
- {
4237
- $options = get_option( 'seopress_social_option_name' );
4238
-
4239
- $selected = isset($options['seopress_social_knowledge_contact_option']) ? $options['seopress_social_knowledge_contact_option'] : NULL;
4240
-
4241
- echo '<select id="seopress_social_knowledge_contact_option" name="seopress_social_option_name[seopress_social_knowledge_contact_option]">';
4242
- echo ' <option ';
4243
- if ('None' == $selected) echo 'selected="selected"';
4244
- echo ' value="None">'. __("None","wp-seopress") .'</option>';
4245
- echo ' <option ';
4246
- if ('TollFree' == $selected) echo 'selected="selected"';
4247
- echo ' value="TollFree">'. __("Toll Free","wp-seopress") .'</option>';
4248
- echo '<option ';
4249
- if ('HearingImpairedSupported' == $selected) echo 'selected="selected"';
4250
- echo ' value="HearingImpairedSupported">'. __("Hearing impaired supported","wp-seopress") .'</option>';
4251
- echo '</select>';
4252
-
4253
- if (isset($this->options['seopress_social_knowledge_contact_option'])) {
4254
- esc_attr( $this->options['seopress_social_knowledge_contact_option']);
4255
- }
4256
- }
4257
-
4258
- public function seopress_social_accounts_facebook_callback()
4259
- {
4260
- $check = isset($this->options['seopress_social_accounts_facebook']) ? $this->options['seopress_social_accounts_facebook'] : NULL;
4261
-
4262
- printf(
4263
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_facebook]" placeholder="'.esc_html__('eg: https://facebook.com/my-page-url','wp-seopress').'" aria-label="'.__('Facebook Page URL','wp-seopress').'" value="%s"/>',
4264
- esc_html( $check )
4265
-
4266
- );
4267
-
4268
- }
4269
-
4270
- public function seopress_social_accounts_twitter_callback()
4271
- {
4272
-
4273
- $check = isset($this->options['seopress_social_accounts_twitter']) ? $this->options['seopress_social_accounts_twitter'] : NULL;
4274
-
4275
- printf(
4276
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_twitter]" placeholder="'.esc_html__('eg: @my_twitter_account','wp-seopress').'" aria-label="'.__('Twitter Page URL','wp-seopress').'" value="%s"/>',
4277
- esc_html( $check )
4278
-
4279
- );
4280
-
4281
- }
4282
-
4283
- public function seopress_social_accounts_pinterest_callback()
4284
- {
4285
- $check = isset($this->options['seopress_social_accounts_pinterest']) ? $this->options['seopress_social_accounts_pinterest'] : NULL;
4286
-
4287
- printf(
4288
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_pinterest]" placeholder="'.esc_html__('eg: https://pinterest.com/my-page-url/','wp-seopress').'" aria-label="'.__('Pinterest URL','wp-seopress').'" value="%s"/>',
4289
- esc_html( $check )
4290
-
4291
- );
4292
-
4293
- }
4294
-
4295
- public function seopress_social_accounts_instagram_callback()
4296
- {
4297
- $check = isset($this->options['seopress_social_accounts_instagram']) ? $this->options['seopress_social_accounts_instagram'] : NULL;
4298
-
4299
- printf(
4300
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_instagram]" placeholder="'.esc_html__('eg: https://www.instagram.com/my-page-url/','wp-seopress').'" aria-label="'.__('Instagram URL','wp-seopress').'" value="%s"/>',
4301
- esc_html( $check )
4302
-
4303
- );
4304
-
4305
- }
4306
-
4307
- public function seopress_social_accounts_youtube_callback()
4308
- {
4309
- $check = isset($this->options['seopress_social_accounts_youtube']) ? $this->options['seopress_social_accounts_youtube'] : NULL;
4310
-
4311
- printf(
4312
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_youtube]" placeholder="'.esc_html__('eg: https://www.youtube.com/my-channel-url','wp-seopress').'" aria-label="'.__('YouTube URL','wp-seopress').'" value="%s"/>',
4313
- esc_html( $check )
4314
-
4315
- );
4316
-
4317
- }
4318
-
4319
- public function seopress_social_accounts_linkedin_callback()
4320
- {
4321
- $check = isset($this->options['seopress_social_accounts_linkedin']) ? $this->options['seopress_social_accounts_linkedin'] : NULL;
4322
-
4323
- printf(
4324
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_linkedin]" placeholder="'.esc_html__('eg: http://linkedin.com/company/my-company-url/','wp-seopress').'" aria-label="'.__('LinkedIn URL','wp-seopress').'" value="%s"/>',
4325
- esc_html( $check )
4326
-
4327
- );
4328
-
4329
- }
4330
-
4331
- public function seopress_social_accounts_myspace_callback()
4332
- {
4333
- $check = isset($this->options['seopress_social_accounts_myspace']) ? $this->options['seopress_social_accounts_myspace'] : NULL;
4334
-
4335
- printf(
4336
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_myspace]" aria-label="'.__('MySpace URL','wp-seopress').'" placeholder="'.esc_html__('eg: https://myspace.com/my-page-url','wp-seopress').'" value="%s"/>',
4337
- esc_html( $check )
4338
-
4339
- );
4340
-
4341
- }
4342
-
4343
- public function seopress_social_accounts_soundcloud_callback()
4344
- {
4345
- $check = isset($this->options['seopress_social_accounts_soundcloud']) ? $this->options['seopress_social_accounts_soundcloud'] : NULL;
4346
-
4347
- printf(
4348
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_soundcloud]" aria-label="'.__('Soundcloud URL','wp-seopress').'" placeholder="'.esc_html__('eg: https://soundcloud.com/my-page-url','wp-seopress').'" value="%s"/>',
4349
- esc_html( $check )
4350
-
4351
- );
4352
-
4353
- }
4354
-
4355
- public function seopress_social_accounts_tumblr_callback()
4356
- {
4357
- $check = isset($this->options['seopress_social_accounts_tumblr']) ? $this->options['seopress_social_accounts_tumblr'] : NULL;
4358
-
4359
- printf(
4360
- '<input type="text" name="seopress_social_option_name[seopress_social_accounts_tumblr]" placeholder="'.esc_html__('eg: https://your-site.tumblr.com','wp-seopress').'" aria-label="'.__('Tumblr URL','wp-seopress').'" value="%s"/>',
4361
- esc_html( $check )
4362
-
4363
- );
4364
-
4365
- }
4366
-
4367
- public function seopress_social_facebook_og_callback()
4368
- {
4369
- $options = get_option( 'seopress_social_option_name' );
4370
-
4371
- $check = isset($options['seopress_social_facebook_og']);
4372
-
4373
- echo '<input id="seopress_social_facebook_og" name="seopress_social_option_name[seopress_social_facebook_og]" type="checkbox"';
4374
- if ('1' == $check) echo 'checked="yes"';
4375
- echo ' value="1"/>';
4376
-
4377
- echo '<label for="seopress_social_facebook_og">'. __( 'Enable OG data', 'wp-seopress' ) .'</label>';
4378
-
4379
- if (isset($this->options['seopress_social_facebook_og'])) {
4380
- esc_attr( $this->options['seopress_social_facebook_og']);
4381
- }
4382
- }
4383
-
4384
- public function seopress_social_facebook_img_callback()
4385
- {
4386
- $options = get_option( 'seopress_social_option_name' );
4387
-
4388
- $options_set = isset($options['seopress_social_facebook_img']) ? esc_attr($options['seopress_social_facebook_img']) : NULL;
4389
-
4390
- $check = isset($options['seopress_social_facebook_img']);
4391
-
4392
- echo '<input id="seopress_social_fb_img_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_facebook_img]" aria-label="'.__('Select a default image','wp-seopress').'" placeholder="'.esc_html__('Select your default thumbnail','wp-seopress').'" />
4393
-
4394
- <input id="seopress_social_fb_img_upload" class="button" type="button" value="'.__('Upload an Image','wp-seopress').'" />';
4395
-
4396
- echo '<p class="description">'.__('Minimum size: 200x200px, ideal ratio 1.91:1, 8Mb max. (eg: 1640x856px or 3280x1712px for retina screens)', 'wp-seopress').'</p>';
4397
-
4398
- if (isset($this->options['seopress_social_facebook_img'])) {
4399
- esc_attr( $this->options['seopress_social_facebook_img']);
4400
- }
4401
- }
4402
-
4403
- public function seopress_social_facebook_img_default_callback()
4404
- {
4405
- $options = get_option( 'seopress_social_option_name' );
4406
-
4407
- $check = isset($options['seopress_social_facebook_img_default']);
4408
-
4409
- echo '<input id="seopress_social_facebook_img_default" name="seopress_social_option_name[seopress_social_facebook_img_default]" type="checkbox"';
4410
- if ('1' == $check) echo 'checked="yes"';
4411
- echo ' value="1"/>';
4412
-
4413
- echo '<label for="seopress_social_facebook_img_default">'. __( 'Override every <strong>og:image</strong> tag with this default image (except if a custom og:image has already been set from the SEO metabox).', 'wp-seopress' ) .'</label>';
4414
-
4415
- echo '<p class="description">'.__('This setting doesn‘t apply for the homepage.','wp-seopress').'</p>';
4416
-
4417
- if (isset($this->options['seopress_social_facebook_img_default'])) {
4418
- esc_attr( $this->options['seopress_social_facebook_img_default']);
4419
- }
4420
- }
4421
-
4422
- public function seopress_social_facebook_link_ownership_id_callback()
4423
- {
4424
- $check = isset($this->options['seopress_social_facebook_link_ownership_id']) ? $this->options['seopress_social_facebook_link_ownership_id'] : NULL;
4425
-
4426
- printf('<input type="text" name="seopress_social_option_name[seopress_social_facebook_link_ownership_id]" value="%s"/>',
4427
- esc_html( $check ));
4428
-
4429
- echo '<p class="description">'.__('One or more Facebook Page IDs that are associated with a URL in order to enable link editing and instant article publishing.', 'wp-seopress').'</p>';
4430
-
4431
- echo '<pre>&lt;meta property="fb:pages" content="page ID"/&gt;</pre>';
4432
-
4433
- echo '<br><span class="dashicons dashicons-external"></span><a href="https://www.facebook.com/help/1503421039731588" target="_blank">'.__('How do I find my Facebook Page ID?','wp-seopress').'</a>';
4434
- }
4435
-
4436
- public function seopress_social_facebook_admin_id_callback()
4437
- {
4438
- $check = isset($this->options['seopress_social_facebook_admin_id']) ? $this->options['seopress_social_facebook_admin_id'] : NULL;
4439
-
4440
- printf('<input type="text" name="seopress_social_option_name[seopress_social_facebook_admin_id]" value="%s"/>',
4441
- esc_html( $check ));
4442
-
4443
- echo '<p class="description">'.__('The ID (or comma-separated list for properties that can accept multiple IDs) of an app, person using the app, or Page Graph API object.', 'wp-seopress').'</p>';
4444
-
4445
- echo '<pre>&lt;meta property="fb:admins" content="admins ID"/&gt;</pre>';
4446
- }
4447
-
4448
- public function seopress_social_facebook_app_id_callback()
4449
- {
4450
- $check = isset($this->options['seopress_social_facebook_app_id']) ? $this->options['seopress_social_facebook_app_id'] : NULL;
4451
-
4452
- printf('<input type="text" name="seopress_social_option_name[seopress_social_facebook_app_id]" value="%s"/>',
4453
- esc_html( $check ));
4454
-
4455
- echo '<p class="description">'.__('The Facebook app ID of the site\'s app. In order to use Facebook Insights you must add the app ID to your page. Insights lets you view analytics for traffic to your site from Facebook. Find the app ID in your App Dashboard. <a href="https://developers.facebook.com/apps/redirect/dashboard" target="_blank">More info here</a> <span class="dashicons dashicons-external"></span>', 'wp-seopress').'</p>';
4456
-
4457
- echo '<pre>&lt;meta property="fb:app_id" content="app ID"/&gt;</pre>';
4458
-
4459
- echo '<br><span class="dashicons dashicons-external"></span><a href="https://developers.facebook.com/docs/apps/register" target="_blank">'.__('How to create a Facebook App ID','wp-seopress').'</a>';
4460
- }
4461
-
4462
- public function seopress_social_twitter_card_callback()
4463
- {
4464
- $options = get_option( 'seopress_social_option_name' );
4465
-
4466
- $check = isset($options['seopress_social_twitter_card']);
4467
-
4468
- echo '<input id="seopress_social_twitter_card" name="seopress_social_option_name[seopress_social_twitter_card]" type="checkbox"';
4469
- if ('1' == $check) echo 'checked="yes"';
4470
- echo ' value="1"/>';
4471
-
4472
- echo '<label for="seopress_social_twitter_card">'. __( 'Enable Twitter card', 'wp-seopress' ) .'</label>';
4473
-
4474
- if (isset($this->options['seopress_social_twitter_card'])) {
4475
- esc_attr( $this->options['seopress_social_twitter_card']);
4476
- }
4477
- }
4478
-
4479
- public function seopress_social_twitter_card_og_callback()
4480
- {
4481
- $options = get_option( 'seopress_social_option_name' );
4482
-
4483
- $check = isset($options['seopress_social_twitter_card_og']);
4484
-
4485
- echo '<input id="seopress_social_twitter_card_og" name="seopress_social_option_name[seopress_social_twitter_card_og]" type="checkbox"';
4486
- if ('1' == $check) echo 'checked="yes"';
4487
- echo ' value="1"/>';
4488
-
4489
- echo '<label for="seopress_social_twitter_card_og">'. __( 'Use OG if no Twitter Cards', 'wp-seopress' ) .'</label>';
4490
-
4491
- if (isset($this->options['seopress_social_twitter_card_og'])) {
4492
- esc_attr( $this->options['seopress_social_twitter_card_og']);
4493
- }
4494
- }
4495
-
4496
- public function seopress_social_twitter_card_img_callback()
4497
- {
4498
- $options = get_option( 'seopress_social_option_name' );
4499
-
4500
- $options_set = isset($options['seopress_social_twitter_card_img']) ? esc_attr($options['seopress_social_twitter_card_img']) : NULL;
4501
-
4502
- $check = isset($options['seopress_social_twitter_card_img']);
4503
-
4504
- echo '<input id="seopress_social_twitter_img_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_twitter_card_img]" aria-label="'.__('Default Twitter Image','wp-seopress').'" placeholder="'.esc_html__('Select your default thumbnail','wp-seopress').'" />
4505
-
4506
- <input id="seopress_social_twitter_img_upload" class="button" type="button" value="'.__('Upload an Image','wp-seopress').'" />';
4507
-
4508
- echo '<p class="description">'.__('Minimum size: 144x144px (300x157px with large card enabled), ideal ratio 1:1 (2:1 with large card), 5Mb max.', 'wp-seopress').'</p>';
4509
-
4510
- if (isset($this->options['seopress_social_twitter_card_img'])) {
4511
- esc_attr( $this->options['seopress_social_twitter_card_img']);
4512
- }
4513
- }
4514
-
4515
- public function seopress_social_twitter_card_img_size_callback()
4516
- {
4517
- $options = get_option( 'seopress_social_option_name' );
4518
-
4519
- $selected = isset($options['seopress_social_twitter_card_img_size']) ? $options['seopress_social_twitter_card_img_size'] : NULL;
4520
-
4521
- echo '<select id="seopress_social_twitter_card_img_size" name="seopress_social_option_name[seopress_social_twitter_card_img_size]">';
4522
- echo ' <option ';
4523
- if ('default' == $selected) echo 'selected="selected"';
4524
- echo ' value="default">'. __("Default","wp-seopress") .'</option>';
4525
- echo '<option ';
4526
- if ('large' == $selected) echo 'selected="selected"';
4527
- echo ' value="large">'. __("Large","wp-seopress") .'</option>';
4528
- echo '</select>';
4529
-
4530
- if (isset($this->options['seopress_social_twitter_card_img_size'])) {
4531
- esc_attr( $this->options['seopress_social_twitter_card_img_size']);
4532
- }
4533
- }
4534
-
4535
- public function seopress_google_analytics_enable_callback()
4536
- {
4537
- $options = get_option( 'seopress_google_analytics_option_name' );
4538
-
4539
- $check = isset($options['seopress_google_analytics_enable']);
4540
-
4541
- echo '<input id="seopress_google_analytics_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_enable]" type="checkbox"';
4542
- if ('1' == $check) echo 'checked="yes"';
4543
- echo ' value="1"/>';
4544
-
4545
- echo '<label for="seopress_google_analytics_enable">'. __( 'Enable Google Analytics tracking (Global Site Tag: gtag.js)', 'wp-seopress' ) .'</label>';
4546
-
4547
- if (isset($this->options['seopress_google_analytics_enable'])) {
4548
- esc_attr( $this->options['seopress_google_analytics_enable']);
4549
- }
4550
- }
4551
-
4552
- public function seopress_google_analytics_ua_callback()
4553
- {
4554
- $check = isset($this->options['seopress_google_analytics_ua']) ? $this->options['seopress_google_analytics_ua'] : NULL;
4555
-
4556
- printf(
4557
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_ua]" placeholder="'.esc_html__('Enter your Tracking ID (UA-XXXX-XX)','wp-seopress').'" aria-label="'.__('Enter your tracking ID','wp-seopress').'" value="%s"/>',
4558
- esc_html( $check )
4559
- );
4560
-
4561
- echo '<p class="description"><span class="dashicons dashicons-external"></span><a href="https://support.google.com/analytics/answer/1032385?hl=en" target="_blank">'.__('Find your tracking ID','wp-seopress').'</a></p>';
4562
-
4563
- }
4564
-
4565
- public function seopress_google_analytics_disable_callback()
4566
- {
4567
- $options = get_option( 'seopress_google_analytics_option_name' );
4568
-
4569
- $check = isset($options['seopress_google_analytics_disable']);
4570
-
4571
- echo '<input id="seopress_google_analytics_disable" name="seopress_google_analytics_option_name[seopress_google_analytics_disable]" type="checkbox"';
4572
- if ('1' == $check) echo 'checked="yes"';
4573
- echo ' value="1"/>';
4574
-
4575
- echo '<label for="seopress_google_analytics_disable">'. __( 'Request user\'s consent for analytics tracking (required by GDPR)', 'wp-seopress' ) .'</label>';
4576
-
4577
- echo '<p class="advise" style="margin:10px 0 0 0">'.__('<strong>The user must click the Accept button to allow tracking.</strong>','wp-seopress').'</p>';
4578
-
4579
- echo '<p class="description">'.__('User roles excluded from tracking will not see the consent message.<br> If you use a caching plugin, you have to exclude this JS file in your settings: <br><strong>/wp-content/plugins/wp-seopress/assets/js/seopress-cookies-ajax.js</strong> <br>and this cookie <strong>seopress-user-consent-accept</strong>','wp-seopress').'</p>';
4580
-
4581
- if (function_exists('seopress_get_locale')) {
4582
- if (seopress_get_locale() =='fr') {
4583
- $seopress_docs_link['support']['analytics']['custom_tracking'] = 'https://www.seopress.org/fr/support/hooks/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4584
- } else {
4585
- $seopress_docs_link['support']['analytics']['custom_tracking'] = 'https://www.seopress.org/support/hooks/add-custom-tracking-code-with-user-consent/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4586
- }
4587
- }
4588
-
4589
- echo '<a class="seopress-doc" href="'.$seopress_docs_link['support']['analytics']['custom_tracking'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Hook to add custom tracking code with user consent - new window','wp-seopress').'</span></a></p>';
4590
-
4591
- if (isset($this->options['seopress_google_analytics_disable'])) {
4592
- esc_attr( $this->options['seopress_google_analytics_disable']);
4593
- }
4594
- }
4595
-
4596
- public function seopress_google_analytics_half_disable_callback()
4597
- {
4598
- $options = get_option( 'seopress_google_analytics_option_name' );
4599
-
4600
- $check = isset($options['seopress_google_analytics_half_disable']);
4601
-
4602
- echo '<input id="seopress_google_analytics_half_disable" name="seopress_google_analytics_option_name[seopress_google_analytics_half_disable]" type="checkbox"';
4603
- if ('1' == $check) echo 'checked="yes"';
4604
- echo ' value="1"/>';
4605
-
4606
- echo '<label for="seopress_google_analytics_half_disable">'. __( 'Display and automatically accept the user‘s consent on page load (not fully GDPR)', 'wp-seopress' ) .'</label>';
4607
-
4608
- echo '<p class="description">'.__('The previous option must be checked to use this.','wp-seopress').'</p>';
4609
-
4610
- if (isset($this->options['seopress_google_analytics_half_disable'])) {
4611
- esc_attr( $this->options['seopress_google_analytics_half_disable']);
4612
- }
4613
- }
4614
-
4615
- public function seopress_google_analytics_opt_out_msg_callback()
4616
- {
4617
- $options = get_option( 'seopress_google_analytics_option_name' );
4618
- $check = isset($options['seopress_google_analytics_opt_out_msg']) ? $options['seopress_google_analytics_opt_out_msg'] : NULL;
4619
-
4620
- printf(
4621
- '<textarea id="seopress_google_analytics_opt_out_msg" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg]" rows="4" placeholder="'.esc_html__('Enter your message (HTML allowed)','wp-seopress').'" aria-label="'.__('This message will only appear if request user\'s consent is enabled.','wp-seopress').'">%s</textarea>',
4622
- esc_html( $check ));
4623
-
4624
- if (function_exists('seopress_get_locale')) {
4625
- if (seopress_get_locale() =='fr') {
4626
- $seopress_docs_link['support']['analytics']['consent_msg'] = 'https://www.seopress.org/fr/support/hooks/filtrer-le-message-du-consentement-utilisateur/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4627
- } else {
4628
- $seopress_docs_link['support']['analytics']['consent_msg'] = 'https://www.seopress.org/support/hooks/filter-user-consent-message/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4629
- }
4630
- }
4631
-
4632
- echo '<a class="seopress-doc" href="'.$seopress_docs_link['support']['analytics']['consent_msg'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Hook to filter user consent message - new window','wp-seopress').'</span></a></p>';
4633
-
4634
- echo '<p class="description">'.__('HTML tags allowed: strong, em, br, a href / target','wp-seopress').'</p>';
4635
- echo '<p class="description">'.__('Shortcode allowed to get the privacy page set in WordPress settings: [seopress_privacy_page]','wp-seopress').'</p>';
4636
- }
4637
-
4638
- public function seopress_google_analytics_opt_out_msg_ok_callback()
4639
- {
4640
- $check = isset($this->options['seopress_google_analytics_opt_out_msg_ok']) ? $this->options['seopress_google_analytics_opt_out_msg_ok'] : NULL;
4641
-
4642
- printf(
4643
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg_ok]" placeholder="'.esc_html__('Accept','wp-seopress').'" aria-label="'.__('Change the button value','wp-seopress').'" value="%s"/>',
4644
- esc_html( $check )
4645
- );
4646
- }
4647
-
4648
- public function seopress_google_analytics_opt_out_msg_close_callback()
4649
- {
4650
- $check = isset($this->options['seopress_google_analytics_opt_out_msg_close']) ? $this->options['seopress_google_analytics_opt_out_msg_close'] : NULL;
4651
-
4652
- printf(
4653
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg_close]" placeholder="'.esc_html__('default: X','wp-seopress').'" aria-label="'.__('Change the close button value','wp-seopress').'" value="%s"/>',
4654
- esc_html( $check )
4655
- );
4656
- }
4657
-
4658
- public function seopress_google_analytics_cb_pos_callback()
4659
- {
4660
- $options = get_option( 'seopress_google_analytics_option_name' );
4661
-
4662
- $selected = isset($options['seopress_google_analytics_cb_pos']) ? $options['seopress_google_analytics_cb_pos'] : NULL;
4663
-
4664
- echo '<select id="seopress_google_analytics_cb_pos" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_pos]">';
4665
- echo ' <option ';
4666
- if ('bottom' == $selected) echo 'selected="selected"';
4667
- echo ' value="bottom">'. __("Bottom (default)","wp-seopress") .'</option>';
4668
- echo ' <option ';
4669
- if ('top' == $selected) echo 'selected="selected"';
4670
- echo ' value="top">'. __("Top","wp-seopress") .'</option>';
4671
- echo '</select>';
4672
-
4673
- if (isset($this->options['seopress_google_analytics_cb_pos'])) {
4674
- esc_attr( $this->options['seopress_google_analytics_cb_pos']);
4675
- }
4676
- }
4677
-
4678
- public function seopress_google_analytics_cb_bg_callback()
4679
- {
4680
- $check = isset($this->options['seopress_google_analytics_cb_bg']) ? $this->options['seopress_google_analytics_cb_bg'] : NULL;
4681
-
4682
- printf(
4683
- '<input type="text" data-default-color="#F1F1F1" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_bg]" aria-label="'.__('Change the color of the cookie bar background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4684
- esc_html( $check )
4685
- );
4686
- }
4687
-
4688
- public function seopress_google_analytics_cb_txt_col_callback()
4689
- {
4690
- $check = isset($this->options['seopress_google_analytics_cb_txt_col']) ? $this->options['seopress_google_analytics_cb_txt_col'] : NULL;
4691
-
4692
- printf(
4693
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_txt_col]" aria-label="'.__('Change the color of the cookie bar text','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4694
- esc_html( $check )
4695
- );
4696
- }
4697
-
4698
- public function seopress_google_analytics_cb_lk_col_callback()
4699
- {
4700
- $check = isset($this->options['seopress_google_analytics_cb_lk_col']) ? $this->options['seopress_google_analytics_cb_lk_col'] : NULL;
4701
-
4702
- printf(
4703
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_lk_col]" aria-label="'.__('Change the color of the cookie bar link','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4704
- esc_html( $check )
4705
- );
4706
- }
4707
-
4708
- public function seopress_google_analytics_cb_btn_bg_callback()
4709
- {
4710
- $check = isset($this->options['seopress_google_analytics_cb_btn_bg']) ? $this->options['seopress_google_analytics_cb_btn_bg'] : NULL;
4711
-
4712
- printf(
4713
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_bg]" aria-label="'.__('Change the color of the cookie bar button background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4714
- esc_html( $check )
4715
- );
4716
- }
4717
-
4718
- public function seopress_google_analytics_cb_btn_bg_hov_callback()
4719
- {
4720
- $check = isset($this->options['seopress_google_analytics_cb_btn_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_bg_hov'] : NULL;
4721
-
4722
- printf(
4723
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_bg_hov]" aria-label="'.__('Change the color of the cookie bar button hover background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4724
- esc_html( $check )
4725
- );
4726
- }
4727
-
4728
- public function seopress_google_analytics_cb_btn_col_callback()
4729
- {
4730
- $check = isset($this->options['seopress_google_analytics_cb_btn_col']) ? $this->options['seopress_google_analytics_cb_btn_col'] : NULL;
4731
-
4732
- printf(
4733
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_col]" aria-label="'.__('Change the color of the cookie bar button','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4734
- esc_html( $check )
4735
- );
4736
- }
4737
-
4738
- public function seopress_google_analytics_cb_btn_col_hov_callback()
4739
- {
4740
- $check = isset($this->options['seopress_google_analytics_cb_btn_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_col_hov'] : NULL;
4741
-
4742
- printf(
4743
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_col_hov]" aria-label="'.__('Change the color of the cookie bar button hover','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4744
- esc_html( $check )
4745
- );
4746
- }
4747
-
4748
- public function seopress_google_analytics_cb_btn_sec_bg_callback()
4749
- {
4750
- $check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg'] : NULL;
4751
-
4752
- printf(
4753
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_bg]" aria-label="'.__('Change the color of the cookie bar secondary button background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4754
- esc_html( $check )
4755
- );
4756
- }
4757
-
4758
- public function seopress_google_analytics_cb_btn_sec_col_callback()
4759
- {
4760
- $check = isset($this->options['seopress_google_analytics_cb_btn_sec_col']) ? $this->options['seopress_google_analytics_cb_btn_sec_col'] : NULL;
4761
-
4762
- printf(
4763
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_col]" aria-label="'.__('Change the color of the cookie bar secondary button hover background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4764
- esc_html( $check )
4765
- );
4766
- }
4767
-
4768
- public function seopress_google_analytics_cb_btn_sec_bg_hov_callback()
4769
- {
4770
- $check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg_hov'] : NULL;
4771
-
4772
- printf(
4773
- '<input type="text" data-default-color="#222222" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_bg_hov]" aria-label="'.__('Change the color of the cookie bar secondary button','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4774
- esc_html( $check )
4775
- );
4776
- }
4777
-
4778
- public function seopress_google_analytics_cb_btn_sec_col_hov_callback()
4779
- {
4780
- $check = isset($this->options['seopress_google_analytics_cb_btn_sec_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_col_hov'] : NULL;
4781
-
4782
- printf(
4783
- '<input type="text" data-default-color="#FFFFFF" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_col_hov]" aria-label="'.__('Change the color of the cookie bar secondary button hover','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4784
- esc_html( $check )
4785
- );
4786
- }
4787
-
4788
- public function seopress_google_analytics_roles_callback()
4789
- {
4790
- $options = get_option( 'seopress_google_analytics_option_name' );
4791
-
4792
- global $wp_roles;
4793
-
4794
- if ( ! isset( $wp_roles ) )
4795
- $wp_roles = new WP_Roles();
4796
-
4797
- foreach ($wp_roles->get_names() as $key => $value) {
4798
-
4799
- $check = isset($options['seopress_google_analytics_roles'][$key]);
4800
-
4801
- echo '<input id="seopress_google_analytics_roles_'.$key.'" name="seopress_google_analytics_option_name[seopress_google_analytics_roles]['.$key.']" type="checkbox"';
4802
- if ('1' == $check) echo 'checked="yes"';
4803
- echo ' value="1"/>';
4804
-
4805
- echo '<label for="seopress_google_analytics_roles_'.$key.'">'. $value .'</label><br/>';
4806
-
4807
- if (isset($this->options['seopress_google_analytics_roles'][$key])) {
4808
- esc_attr( $this->options['seopress_google_analytics_roles'][$key]);
4809
- }
4810
- }
4811
- }
4812
-
4813
- public function seopress_google_analytics_optimize_callback()
4814
- {
4815
- $check = isset($this->options['seopress_google_analytics_optimize']) ? $this->options['seopress_google_analytics_optimize'] : NULL;
4816
-
4817
- printf(
4818
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_optimize]" placeholder="'.esc_html__('Enter your Google Optimize container ID','wp-seopress').'" value="%s" aria-label="'.__('GTM-XXXXXXX','wp-seopress').'"/>',
4819
- esc_html($check));
4820
-
4821
- echo '<p class="description">'.__('Google Optimize offers A/B testing, website testing & personalization tools.','wp-seopress').' <a href="https://marketingplatform.google.com/about/optimize/" target="_blank">'.__('Learn more','wp-seopress').'</a><span class="dashicons dashicons-external"></span></p>';
4822
- }
4823
-
4824
- public function seopress_google_analytics_ads_callback()
4825
- {
4826
- $check = isset($this->options['seopress_google_analytics_ads']) ? $this->options['seopress_google_analytics_ads'] : NULL;
4827
-
4828
- printf(
4829
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_ads]" placeholder="'.esc_html__('Enter your Google Ads conversion ID (eg: AW-123456789)','wp-seopress').'" value="%s" aria-label="'.__('AW-XXXXXXXXX','wp-seopress').'"/>',
4830
- esc_html($check));
4831
- }
4832
-
4833
- public function seopress_google_analytics_other_tracking_callback()
4834
- {
4835
- $check = isset($this->options['seopress_google_analytics_other_tracking']) ? $this->options['seopress_google_analytics_other_tracking'] : NULL;
4836
-
4837
- printf(
4838
- '<textarea id="seopress_google_analytics_other_tracking" name="seopress_google_analytics_option_name[seopress_google_analytics_other_tracking]" rows="16" placeholder="'.esc_html__('Paste your tracking code here like Google Tag Manager (head)','wp-seopress').'" aria-label="'.__('Additional tracking code field','wp-seopress').'">%s</textarea>',
4839
- esc_textarea($check));
4840
-
4841
- echo '<p class="description">'.__('This code will be added in the head section of your page.','wp-seopress').'</p>';
4842
- }
4843
-
4844
- public function seopress_google_analytics_other_tracking_body_callback()
4845
- {
4846
- $check = isset($this->options['seopress_google_analytics_other_tracking_body']) ? $this->options['seopress_google_analytics_other_tracking_body'] : NULL;
4847
-
4848
- printf(
4849
- '<textarea id="seopress_google_analytics_other_tracking_body" name="seopress_google_analytics_option_name[seopress_google_analytics_other_tracking_body]" rows="16" placeholder="'.esc_html__('Paste your tracking code here like Google Tag Manager (body)','wp-seopress').'" aria-label="'.__('Additional tracking code field added to body','wp-seopress').'">%s</textarea>',
4850
- esc_textarea($check));
4851
-
4852
- echo '<p class="description">'.__('This code will be added just after the opening body tag of your page.','wp-seopress').'</p>';
4853
- echo '<p class="description">'.__('You don‘t see your code? Make sure to call <strong>wp_body_open();</strong> just after the opening body tag in your theme.','wp-seopress').'</p>';
4854
-
4855
- if (function_exists('seopress_get_locale')) {
4856
- if (seopress_get_locale() =='fr') {
4857
- $seopress_docs_link['support']['analytics']['gtm'] = 'https://www.seopress.org/fr/support/guides/google-tag-manager-site-wordpress-seopress/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4858
- } else {
4859
- $seopress_docs_link['support']['analytics']['gtm'] = 'https://www.seopress.org/support/guides/google-tag-manager-wordpress-seopress/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4860
- }
4861
- }
4862
-
4863
- echo '<a href="'.$seopress_docs_link['support']['analytics']['gtm'].'" target="_blank">'. __('Learn more','wp-seopress').'</span></a><span class="dashicons dashicons-external"></span></p>';
4864
- }
4865
-
4866
- public function seopress_google_analytics_other_tracking_footer_callback()
4867
- {
4868
- $check = isset($this->options['seopress_google_analytics_other_tracking_footer']) ? $this->options['seopress_google_analytics_other_tracking_footer'] : NULL;
4869
-
4870
- printf(
4871
- '<textarea id="seopress_google_analytics_other_tracking_footer" name="seopress_google_analytics_option_name[seopress_google_analytics_other_tracking_footer]" rows="16" placeholder="'.esc_html__('Paste your tracking code here (body footer)','wp-seopress').'" aria-label="'.__('Additional tracking code field added to body footer','wp-seopress').'">%s</textarea>',
4872
- esc_textarea($check));
4873
-
4874
- echo '<p class="description">'.__('This code will be added just after the closing body tag of your page.','wp-seopress').'</p>';
4875
- }
4876
-
4877
- public function seopress_google_analytics_remarketing_callback()
4878
- {
4879
- $options = get_option( 'seopress_google_analytics_option_name' );
4880
-
4881
- $check = isset($options['seopress_google_analytics_remarketing']);
4882
-
4883
- echo '<input id="seopress_google_analytics_remarketing" name="seopress_google_analytics_option_name[seopress_google_analytics_remarketing]" type="checkbox"';
4884
- if ('1' == $check) echo 'checked="yes"';
4885
- echo ' value="1"/>';
4886
-
4887
- echo '<label for="seopress_google_analytics_remarketing">'. __( 'Enable remarketing, demographics, and interests reporting', 'wp-seopress' ) .'</label>';
4888
-
4889
- echo '<p class="description">'. __('A remarketing audience is a list of cookies or mobile-advertising IDs that represents a group of users you want to re-engage because of their likelihood to convert.','wp-seopress').'
4890
- <a href="https://support.google.com/analytics/answer/2611268?hl=en" target="_blank">'.__('Learn more','wp-seopress').'</a>
4891
- <span class="dashicons dashicons-external"></span>
4892
- </p>';
4893
-
4894
- if (isset($this->options['seopress_google_analytics_remarketing'])) {
4895
- esc_attr( $this->options['seopress_google_analytics_remarketing']);
4896
- }
4897
- }
4898
-
4899
- public function seopress_google_analytics_ip_anonymization_callback()
4900
- {
4901
- $options = get_option( 'seopress_google_analytics_option_name' );
4902
-
4903
- $check = isset($options['seopress_google_analytics_ip_anonymization']);
4904
-
4905
- echo '<input id="seopress_google_analytics_ip_anonymization" name="seopress_google_analytics_option_name[seopress_google_analytics_ip_anonymization]" type="checkbox"';
4906
- if ('1' == $check) echo 'checked="yes"';
4907
- echo ' value="1"/>';
4908
-
4909
- echo '<label for="seopress_google_analytics_ip_anonymization">'. __( 'Enable IP Anonymization', 'wp-seopress' ) .'</label>';
4910
-
4911
- echo '<p class="description">'. __('When a customer of Analytics requests IP address anonymization, Analytics anonymizes the address as soon as technically feasible at the earliest possible stage of the collection network.','wp-seopress').'
4912
- <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization" target="_blank">'.__('Learn more','wp-seopress').'</a>
4913
- <span class="dashicons dashicons-external"></span>
4914
- </p>';
4915
-
4916
- if (isset($this->options['seopress_google_analytics_ip_anonymization'])) {
4917
- esc_attr( $this->options['seopress_google_analytics_ip_anonymization']);
4918
- }
4919
- }
4920
-
4921
- public function seopress_google_analytics_link_attribution_callback()
4922
- {
4923
- $options = get_option( 'seopress_google_analytics_option_name' );
4924
-
4925
- $check = isset($options['seopress_google_analytics_link_attribution']);
4926
-
4927
- echo '<input id="seopress_google_analytics_link_attribution" name="seopress_google_analytics_option_name[seopress_google_analytics_link_attribution]" type="checkbox"';
4928
- if ('1' == $check) echo 'checked="yes"';
4929
- echo ' value="1"/>';
4930
-
4931
- echo '<label for="seopress_google_analytics_link_attribution">'. __( 'Enhanced Link Attribution', 'wp-seopress' ) .'</label>';
4932
-
4933
- echo '<p class="description">'. __('Enhanced Link Attribution improves the accuracy of your In-Page Analytics report by automatically differentiating between multiple links to the same URL on a single page by using link element IDs.','wp-seopress').'
4934
- <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-link-attribution" target="_blank">'.__('Learn more','wp-seopress').'</a>
4935
- <span class="dashicons dashicons-external"></span>
4936
- </p>';
4937
-
4938
- if (isset($this->options['seopress_google_analytics_link_attribution'])) {
4939
- esc_attr( $this->options['seopress_google_analytics_link_attribution']);
4940
- }
4941
- }
4942
-
4943
- public function seopress_google_analytics_cross_enable_callback()
4944
- {
4945
- $options = get_option( 'seopress_google_analytics_option_name' );
4946
-
4947
- $check = isset($options['seopress_google_analytics_cross_enable']);
4948
-
4949
- echo '<input id="seopress_google_analytics_cross_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_cross_enable]" type="checkbox"';
4950
- if ('1' == $check) echo 'checked="yes"';
4951
- echo ' value="1"/>';
4952
-
4953
- echo '<label for="seopress_google_analytics_cross_enable">'. __( 'Enable cross-domain tracking', 'wp-seopress' ) .'</label>';
4954
-
4955
- echo '<p class="description">'. __('Cross domain tracking makes it possible for Analytics to see sessions on two related sites (such as an ecommerce site and a separate shopping cart site) as a single session. This is sometimes called site linking.','wp-seopress').'
4956
- <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain" target="_blank">'.__('Learn more','wp-seopress').'</a>
4957
- <span class="dashicons dashicons-external"></span>
4958
- </p>';
4959
-
4960
- if (isset($this->options['seopress_google_analytics_cross_enable'])) {
4961
- esc_attr( $this->options['seopress_google_analytics_cross_enable']);
4962
- }
4963
- }
4964
-
4965
- public function seopress_google_analytics_cross_domain_callback()
4966
- {
4967
- $check = isset($this->options['seopress_google_analytics_cross_domain']) ? $this->options['seopress_google_analytics_cross_domain'] : NULL;
4968
-
4969
- printf(
4970
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cross_domain]" placeholder="'.esc_html__('Enter your domains: seopress.org,sub.seopress.org,sub2.seopress.org','wp-seopress').'" value="%s" aria-label="'.__('Cross domains','wp-seopress').'"/>',
4971
- esc_html($check)
4972
-
4973
- );
4974
-
4975
- }
4976
-
4977
- public function seopress_google_analytics_link_tracking_enable_callback()
4978
- {
4979
- $options = get_option( 'seopress_google_analytics_option_name' );
4980
-
4981
- $check = isset($options['seopress_google_analytics_link_tracking_enable']);
4982
-
4983
- echo '<input id="seopress_google_analytics_link_tracking_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_link_tracking_enable]" type="checkbox"';
4984
- if ('1' == $check) echo 'checked="yes"';
4985
- echo ' value="1"/>';
4986
-
4987
- echo '<label for="seopress_google_analytics_link_tracking_enable">'. __( 'Enable external links tracking', 'wp-seopress' ) .'</label>';
4988
-
4989
- if (isset($this->options['seopress_google_analytics_link_tracking_enable'])) {
4990
- esc_attr( $this->options['seopress_google_analytics_link_tracking_enable']);
4991
- }
4992
- }
4993
-
4994
- public function seopress_google_analytics_download_tracking_enable_callback()
4995
- {
4996
- $options = get_option( 'seopress_google_analytics_option_name' );
4997
-
4998
- $check = isset($options['seopress_google_analytics_download_tracking_enable']);
4999
-
5000
- echo '<input id="seopress_google_analytics_download_tracking_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_download_tracking_enable]" type="checkbox"';
5001
- if ('1' == $check) echo 'checked="yes"';
5002
- echo ' value="1"/>';
5003
-
5004
- echo '<label for="seopress_google_analytics_download_tracking_enable">'. __( 'Enable download tracking', 'wp-seopress' ) .'</label>';
5005
-
5006
- if (isset($this->options['seopress_google_analytics_download_tracking_enable'])) {
5007
- esc_attr( $this->options['seopress_google_analytics_download_tracking_enable']);
5008
- }
5009
- }
5010
-
5011
- public function seopress_google_analytics_download_tracking_callback()
5012
- {
5013
- $check = isset($this->options['seopress_google_analytics_download_tracking']) ? $this->options['seopress_google_analytics_download_tracking'] : NULL;
5014
-
5015
- printf(
5016
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_download_tracking]" placeholder="'.esc_html__('pdf|docx|pptx|zip','wp-seopress').'" aria-label="'.__('Track downloads\' clicks','wp-seopress').'" value="%s"/>',
5017
- esc_html( $check )
5018
- );
5019
-
5020
- echo '<p class="description">'. __('Separate each file type extensions with a pipe "|"','wp-seopress').'</a>
5021
- </p>';
5022
-
5023
- }
5024
-
5025
- public function seopress_google_analytics_affiliate_tracking_enable_callback()
5026
- {
5027
- $options = get_option( 'seopress_google_analytics_option_name' );
5028
-
5029
- $check = isset($options['seopress_google_analytics_affiliate_tracking_enable']);
5030
-
5031
- echo '<input id="seopress_google_analytics_affiliate_tracking_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_affiliate_tracking_enable]" type="checkbox"';
5032
- if ('1' == $check) echo 'checked="yes"';
5033
- echo ' value="1"/>';
5034
-
5035
- echo '<label for="seopress_google_analytics_affiliate_tracking_enable">'. __( 'Enable affiliate/outbound tracking', 'wp-seopress' ) .'</label>';
5036
-
5037
- if (isset($this->options['seopress_google_analytics_affiliate_tracking_enable'])) {
5038
- esc_attr( $this->options['seopress_google_analytics_affiliate_tracking_enable']);
5039
- }
5040
- }
5041
-
5042
- public function seopress_google_analytics_affiliate_tracking_callback()
5043
- {
5044
- $check = isset($this->options['seopress_google_analytics_affiliate_tracking']) ? $this->options['seopress_google_analytics_affiliate_tracking'] : NULL;
5045
-
5046
- printf(
5047
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_affiliate_tracking]" placeholder="'.esc_html__('aff|go|out','wp-seopress').'" aria-label="'.__('Track affiliate/outbound links','wp-seopress').'" value="%s"/>',
5048
- esc_html( $check )
5049
- );
5050
-
5051
- echo '<p class="description">'. __('Separate each keyword with a pipe "|"','wp-seopress').'</a>
5052
- </p>';
5053
-
5054
- }
5055
-
5056
- public function seopress_google_analytics_cd_author_callback()
5057
- {
5058
- $options = get_option( 'seopress_google_analytics_option_name' );
5059
-
5060
- $selected = isset($options['seopress_google_analytics_cd_author']) ? $options['seopress_google_analytics_cd_author'] : NULL;
5061
-
5062
- echo '<select id="seopress_google_analytics_cd_author" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_author]">';
5063
- echo ' <option ';
5064
- if ('none' == $selected) echo 'selected="selected"';
5065
- echo ' value="none">'. __("None","wp-seopress") .'</option>';
5066
- echo ' <option ';
5067
- if ('dimension1' == $selected) echo 'selected="selected"';
5068
- echo ' value="dimension1">'. __("Custom Dimension #1","wp-seopress") .'</option>';
5069
- echo '<option ';
5070
- if ('dimension2' == $selected) echo 'selected="selected"';
5071
- echo ' value="dimension2">'. __("Custom Dimension #2","wp-seopress") .'</option>';
5072
- echo '<option ';
5073
- if ('dimension3' == $selected) echo 'selected="selected"';
5074
- echo ' value="dimension3">'. __("Custom Dimension #3","wp-seopress") .'</option>';
5075
- echo '<option ';
5076
- if ('dimension4' == $selected) echo 'selected="selected"';
5077
- echo ' value="dimension4">'. __("Custom Dimension #4","wp-seopress") .'</option>';
5078
- echo '<option ';
5079
- if ('dimension5' == $selected) echo 'selected="selected"';
5080
- echo ' value="dimension5">'. __("Custom Dimension #5","wp-seopress") .'</option>';
5081
- echo '<option ';
5082
- if ('dimension6' == $selected) echo 'selected="selected"';
5083
- echo ' value="dimension6">'. __("Custom Dimension #6","wp-seopress") .'</option>';
5084
- echo '<option ';
5085
- if ('dimension7' == $selected) echo 'selected="selected"';
5086
- echo ' value="dimension7">'. __("Custom Dimension #7","wp-seopress") .'</option>';
5087
- echo '<option ';
5088
- if ('dimension8' == $selected) echo 'selected="selected"';
5089
- echo ' value="dimension8">'. __("Custom Dimension #8","wp-seopress") .'</option>';
5090
- echo '<option ';
5091
- if ('dimension9' == $selected) echo 'selected="selected"';
5092
- echo ' value="dimension9">'. __("Custom Dimension #9","wp-seopress") .'</option>';
5093
- echo '<option ';
5094
- if ('dimension10' == $selected) echo 'selected="selected"';
5095
- echo ' value="dimension10">'. __("Custom Dimension #10","wp-seopress") .'</option>';
5096
- echo '<option ';
5097
- if ('dimension11' == $selected) echo 'selected="selected"';
5098
- echo ' value="dimension11">'. __("Custom Dimension #11","wp-seopress") .'</option>';
5099
- echo '<option ';
5100
- if ('dimension12' == $selected) echo 'selected="selected"';
5101
- echo ' value="dimension12">'. __("Custom Dimension #12","wp-seopress") .'</option>';
5102
- echo '<option ';
5103
- if ('dimension13' == $selected) echo 'selected="selected"';
5104
- echo ' value="dimension13">'. __("Custom Dimension #13","wp-seopress") .'</option>';
5105
- echo '<option ';
5106
- if ('dimension14' == $selected) echo 'selected="selected"';
5107
- echo ' value="dimension14">'. __("Custom Dimension #14","wp-seopress") .'</option>';
5108
- echo '<option ';
5109
- if ('dimension15' == $selected) echo 'selected="selected"';
5110
- echo ' value="dimension15">'. __("Custom Dimension #15","wp-seopress") .'</option>';
5111
- echo '<option ';
5112
- if ('dimension16' == $selected) echo 'selected="selected"';
5113
- echo ' value="dimension16">'. __("Custom Dimension #16","wp-seopress") .'</option>';
5114
- echo '<option ';
5115
- if ('dimension17' == $selected) echo 'selected="selected"';
5116
- echo ' value="dimension17">'. __("Custom Dimension #17","wp-seopress") .'</option>';
5117
- echo '<option ';
5118
- if ('dimension18' == $selected) echo 'selected="selected"';
5119
- echo ' value="dimension18">'. __("Custom Dimension #18","wp-seopress") .'</option>';
5120
- echo '<option ';
5121
- if ('dimension19' == $selected) echo 'selected="selected"';
5122
- echo ' value="dimension19">'. __("Custom Dimension #19","wp-seopress") .'</option>';
5123
- echo '<option ';
5124
- if ('dimension20' == $selected) echo 'selected="selected"';
5125
- echo ' value="dimension20">'. __("Custom Dimension #20","wp-seopress") .'</option>';
5126
- echo '</select>';
5127
-
5128
- if (isset($this->options['seopress_google_analytics_cd_author'])) {
5129
- esc_attr( $this->options['seopress_google_analytics_cd_author']);
5130
- }
5131
- }
5132
-
5133
- public function seopress_google_analytics_cd_category_callback()
5134
- {
5135
- $options = get_option( 'seopress_google_analytics_option_name' );
5136
-
5137
- $selected = isset($options['seopress_google_analytics_cd_category']) ? $options['seopress_google_analytics_cd_category'] : NULL;
5138
-
5139
- echo '<select id="seopress_google_analytics_cd_category" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_category]">';
5140
- echo ' <option ';
5141
- if ('none' == $selected) echo 'selected="selected"';
5142
- echo ' value="none">'. __("None","wp-seopress") .'</option>';
5143
- echo ' <option ';
5144
- if ('dimension1' == $selected) echo 'selected="selected"';
5145
- echo ' value="dimension1">'. __("Custom Dimension #1","wp-seopress") .'</option>';
5146
- echo '<option ';
5147
- if ('dimension2' == $selected) echo 'selected="selected"';
5148
- echo ' value="dimension2">'. __("Custom Dimension #2","wp-seopress") .'</option>';
5149
- echo '<option ';
5150
- if ('dimension3' == $selected) echo 'selected="selected"';
5151
- echo ' value="dimension3">'. __("Custom Dimension #3","wp-seopress") .'</option>';
5152
- echo '<option ';
5153
- if ('dimension4' == $selected) echo 'selected="selected"';
5154
- echo ' value="dimension4">'. __("Custom Dimension #4","wp-seopress") .'</option>';
5155
- echo '<option ';
5156
- if ('dimension5' == $selected) echo 'selected="selected"';
5157
- echo ' value="dimension5">'. __("Custom Dimension #5","wp-seopress") .'</option>';
5158
- echo '<option ';
5159
- if ('dimension6' == $selected) echo 'selected="selected"';
5160
- echo ' value="dimension6">'. __("Custom Dimension #6","wp-seopress") .'</option>';
5161
- echo '<option ';
5162
- if ('dimension7' == $selected) echo 'selected="selected"';
5163
- echo ' value="dimension7">'. __("Custom Dimension #7","wp-seopress") .'</option>';
5164
- echo '<option ';
5165
- if ('dimension8' == $selected) echo 'selected="selected"';
5166
- echo ' value="dimension8">'. __("Custom Dimension #8","wp-seopress") .'</option>';
5167
- echo '<option ';
5168
- if ('dimension9' == $selected) echo 'selected="selected"';
5169
- echo ' value="dimension9">'. __("Custom Dimension #9","wp-seopress") .'</option>';
5170
- echo '<option ';
5171
- if ('dimension10' == $selected) echo 'selected="selected"';
5172
- echo ' value="dimension10">'. __("Custom Dimension #10","wp-seopress") .'</option>';
5173
- echo '<option ';
5174
- if ('dimension11' == $selected) echo 'selected="selected"';
5175
- echo ' value="dimension11">'. __("Custom Dimension #11","wp-seopress") .'</option>';
5176
- echo '<option ';
5177
- if ('dimension12' == $selected) echo 'selected="selected"';
5178
- echo ' value="dimension12">'. __("Custom Dimension #12","wp-seopress") .'</option>';
5179
- echo '<option ';
5180
- if ('dimension13' == $selected) echo 'selected="selected"';
5181
- echo ' value="dimension13">'. __("Custom Dimension #13","wp-seopress") .'</option>';
5182
- echo '<option ';
5183
- if ('dimension14' == $selected) echo 'selected="selected"';
5184
- echo ' value="dimension14">'. __("Custom Dimension #14","wp-seopress") .'</option>';
5185
- echo '<option ';
5186
- if ('dimension15' == $selected) echo 'selected="selected"';
5187
- echo ' value="dimension15">'. __("Custom Dimension #15","wp-seopress") .'</option>';
5188
- echo '<option ';
5189
- if ('dimension16' == $selected) echo 'selected="selected"';
5190
- echo ' value="dimension16">'. __("Custom Dimension #16","wp-seopress") .'</option>';
5191
- echo '<option ';
5192
- if ('dimension17' == $selected) echo 'selected="selected"';
5193
- echo ' value="dimension17">'. __("Custom Dimension #17","wp-seopress") .'</option>';
5194
- echo '<option ';
5195
- if ('dimension18' == $selected) echo 'selected="selected"';
5196
- echo ' value="dimension18">'. __("Custom Dimension #18","wp-seopress") .'</option>';
5197
- echo '<option ';
5198
- if ('dimension19' == $selected) echo 'selected="selected"';
5199
- echo ' value="dimension19">'. __("Custom Dimension #19","wp-seopress") .'</option>';
5200
- echo '<option ';
5201
- if ('dimension20' == $selected) echo 'selected="selected"';
5202
- echo ' value="dimension20">'. __("Custom Dimension #20","wp-seopress") .'</option>';
5203
- echo '</select>';
5204
-
5205
- if (isset($this->options['seopress_google_analytics_cd_category'])) {
5206
- esc_attr( $this->options['seopress_google_analytics_cd_category']);
5207
- }
5208
- }
5209
-
5210
- public function seopress_google_analytics_cd_tag_callback()
5211
- {
5212
- $options = get_option( 'seopress_google_analytics_option_name' );
5213
-
5214
- $selected = isset($options['seopress_google_analytics_cd_tag']) ? $options['seopress_google_analytics_cd_tag'] : NULL;
5215
-
5216
- echo '<select id="seopress_google_analytics_cd_tag" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_tag]">';
5217
- echo ' <option ';
5218
- if ('none' == $selected) echo 'selected="selected"';
5219
- echo ' value="none">'. __("None","wp-seopress") .'</option>';
5220
- echo ' <option ';
5221
- if ('dimension1' == $selected) echo 'selected="selected"';
5222
- echo ' value="dimension1">'. __("Custom Dimension #1","wp-seopress") .'</option>';
5223
- echo '<option ';
5224
- if ('dimension2' == $selected) echo 'selected="selected"';
5225
- echo ' value="dimension2">'. __("Custom Dimension #2","wp-seopress") .'</option>';
5226
- echo '<option ';
5227
- if ('dimension3' == $selected) echo 'selected="selected"';
5228
- echo ' value="dimension3">'. __("Custom Dimension #3","wp-seopress") .'</option>';
5229
- echo '<option ';
5230
- if ('dimension4' == $selected) echo 'selected="selected"';
5231
- echo ' value="dimension4">'. __("Custom Dimension #4","wp-seopress") .'</option>';
5232
- echo '<option ';
5233
- if ('dimension5' == $selected) echo 'selected="selected"';
5234
- echo ' value="dimension5">'. __("Custom Dimension #5","wp-seopress") .'</option>';
5235
- echo '<option ';
5236
- if ('dimension6' == $selected) echo 'selected="selected"';
5237
- echo ' value="dimension6">'. __("Custom Dimension #6","wp-seopress") .'</option>';
5238
- echo '<option ';
5239
- if ('dimension7' == $selected) echo 'selected="selected"';
5240
- echo ' value="dimension7">'. __("Custom Dimension #7","wp-seopress") .'</option>';
5241
- echo '<option ';
5242
- if ('dimension8' == $selected) echo 'selected="selected"';
5243
- echo ' value="dimension8">'. __("Custom Dimension #8","wp-seopress") .'</option>';
5244
- echo '<option ';
5245
- if ('dimension9' == $selected) echo 'selected="selected"';
5246
- echo ' value="dimension9">'. __("Custom Dimension #9","wp-seopress") .'</option>';
5247
- echo '<option ';
5248
- if ('dimension10' == $selected) echo 'selected="selected"';
5249
- echo ' value="dimension10">'. __("Custom Dimension #10","wp-seopress") .'</option>';
5250
- echo '<option ';
5251
- if ('dimension11' == $selected) echo 'selected="selected"';
5252
- echo ' value="dimension11">'. __("Custom Dimension #11","wp-seopress") .'</option>';
5253
- echo '<option ';
5254
- if ('dimension12' == $selected) echo 'selected="selected"';
5255
- echo ' value="dimension12">'. __("Custom Dimension #12","wp-seopress") .'</option>';
5256
- echo '<option ';
5257
- if ('dimension13' == $selected) echo 'selected="selected"';
5258
- echo ' value="dimension13">'. __("Custom Dimension #13","wp-seopress") .'</option>';
5259
- echo '<option ';
5260
- if ('dimension14' == $selected) echo 'selected="selected"';
5261
- echo ' value="dimension14">'. __("Custom Dimension #14","wp-seopress") .'</option>';
5262
- echo '<option ';
5263
- if ('dimension15' == $selected) echo 'selected="selected"';
5264
- echo ' value="dimension15">'. __("Custom Dimension #15","wp-seopress") .'</option>';
5265
- echo '<option ';
5266
- if ('dimension16' == $selected) echo 'selected="selected"';
5267
- echo ' value="dimension16">'. __("Custom Dimension #16","wp-seopress") .'</option>';
5268
- echo '<option ';
5269
- if ('dimension17' == $selected) echo 'selected="selected"';
5270
- echo ' value="dimension17">'. __("Custom Dimension #17","wp-seopress") .'</option>';
5271
- echo '<option ';
5272
- if ('dimension18' == $selected) echo 'selected="selected"';
5273
- echo ' value="dimension18">'. __("Custom Dimension #18","wp-seopress") .'</option>';
5274
- echo '<option ';
5275
- if ('dimension19' == $selected) echo 'selected="selected"';
5276
- echo ' value="dimension19">'. __("Custom Dimension #19","wp-seopress") .'</option>';
5277
- echo '<option ';
5278
- if ('dimension20' == $selected) echo 'selected="selected"';
5279
- echo ' value="dimension20">'. __("Custom Dimension #20","wp-seopress") .'</option>';
5280
- echo '</select>';
5281
-
5282
- if (isset($this->options['seopress_google_analytics_cd_tag'])) {
5283
- esc_attr( $this->options['seopress_google_analytics_cd_tag']);
5284
- }
5285
- }
5286
-
5287
- public function seopress_google_analytics_cd_post_type_callback()
5288
- {
5289
- $options = get_option( 'seopress_google_analytics_option_name' );
5290
-
5291
- $selected = isset($options['seopress_google_analytics_cd_post_type']) ? $options['seopress_google_analytics_cd_post_type'] : NULL;
5292
-
5293
- echo '<select id="seopress_google_analytics_cd_post_type" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_post_type]">';
5294
- echo ' <option ';
5295
- if ('none' == $selected) echo 'selected="selected"';
5296
- echo ' value="none">'. __("None","wp-seopress") .'</option>';
5297
- echo ' <option ';
5298
- if ('dimension1' == $selected) echo 'selected="selected"';
5299
- echo ' value="dimension1">'. __("Custom Dimension #1","wp-seopress") .'</option>';
5300
- echo '<option ';
5301
- if ('dimension2' == $selected) echo 'selected="selected"';
5302
- echo ' value="dimension2">'. __("Custom Dimension #2","wp-seopress") .'</option>';
5303
- echo '<option ';
5304
- if ('dimension3' == $selected) echo 'selected="selected"';
5305
- echo ' value="dimension3">'. __("Custom Dimension #3","wp-seopress") .'</option>';
5306
- echo '<option ';
5307
- if ('dimension4' == $selected) echo 'selected="selected"';
5308
- echo ' value="dimension4">'. __("Custom Dimension #4","wp-seopress") .'</option>';
5309
- echo '<option ';
5310
- if ('dimension5' == $selected) echo 'selected="selected"';
5311
- echo ' value="dimension5">'. __("Custom Dimension #5","wp-seopress") .'</option>';
5312
- echo '<option ';
5313
- if ('dimension6' == $selected) echo 'selected="selected"';
5314
- echo ' value="dimension6">'. __("Custom Dimension #6","wp-seopress") .'</option>';
5315
- echo '<option ';
5316
- if ('dimension7' == $selected) echo 'selected="selected"';
5317
- echo ' value="dimension7">'. __("Custom Dimension #7","wp-seopress") .'</option>';
5318
- echo '<option ';
5319
- if ('dimension8' == $selected) echo 'selected="selected"';
5320
- echo ' value="dimension8">'. __("Custom Dimension #8","wp-seopress") .'</option>';
5321
- echo '<option ';
5322
- if ('dimension9' == $selected) echo 'selected="selected"';
5323
- echo ' value="dimension9">'. __("Custom Dimension #9","wp-seopress") .'</option>';
5324
- echo '<option ';
5325
- if ('dimension10' == $selected) echo 'selected="selected"';
5326
- echo ' value="dimension10">'. __("Custom Dimension #10","wp-seopress") .'</option>';
5327
- echo '<option ';
5328
- if ('dimension11' == $selected) echo 'selected="selected"';
5329
- echo ' value="dimension11">'. __("Custom Dimension #11","wp-seopress") .'</option>';
5330
- echo '<option ';
5331
- if ('dimension12' == $selected) echo 'selected="selected"';
5332
- echo ' value="dimension12">'. __("Custom Dimension #12","wp-seopress") .'</option>';
5333
- echo '<option ';
5334
- if ('dimension13' == $selected) echo 'selected="selected"';
5335
- echo ' value="dimension13">'. __("Custom Dimension #13","wp-seopress") .'</option>';
5336
- echo '<option ';
5337
- if ('dimension14' == $selected) echo 'selected="selected"';
5338
- echo ' value="dimension14">'. __("Custom Dimension #14","wp-seopress") .'</option>';
5339
- echo '<option ';
5340
- if ('dimension15' == $selected) echo 'selected="selected"';
5341
- echo ' value="dimension15">'. __("Custom Dimension #15","wp-seopress") .'</option>';
5342
- echo '<option ';
5343
- if ('dimension16' == $selected) echo 'selected="selected"';
5344
- echo ' value="dimension16">'. __("Custom Dimension #16","wp-seopress") .'</option>';
5345
- echo '<option ';
5346
- if ('dimension17' == $selected) echo 'selected="selected"';
5347
- echo ' value="dimension17">'. __("Custom Dimension #17","wp-seopress") .'</option>';
5348
- echo '<option ';
5349
- if ('dimension18' == $selected) echo 'selected="selected"';
5350
- echo ' value="dimension18">'. __("Custom Dimension #18","wp-seopress") .'</option>';
5351
- echo '<option ';
5352
- if ('dimension19' == $selected) echo 'selected="selected"';
5353
- echo ' value="dimension19">'. __("Custom Dimension #19","wp-seopress") .'</option>';
5354
- echo '<option ';
5355
- if ('dimension20' == $selected) echo 'selected="selected"';
5356
- echo ' value="dimension20">'. __("Custom Dimension #20","wp-seopress") .'</option>';
5357
- echo '</select>';
5358
-
5359
- if (isset($this->options['seopress_google_analytics_cd_post_type'])) {
5360
- esc_attr( $this->options['seopress_google_analytics_cd_post_type']);
5361
- }
5362
- }
5363
-
5364
- public function seopress_google_analytics_cd_logged_in_user_callback()
5365
- {
5366
- $options = get_option( 'seopress_google_analytics_option_name' );
5367
-
5368
- $selected = isset($options['seopress_google_analytics_cd_logged_in_user']) ? $options['seopress_google_analytics_cd_logged_in_user'] : NULL;
5369
-
5370
- echo '<select id="seopress_google_analytics_cd_logged_in_user" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_logged_in_user]">';
5371
- echo ' <option ';
5372
- if ('none' == $selected) echo 'selected="selected"';
5373
- echo ' value="none">'. __("None","wp-seopress") .'</option>';
5374
- echo ' <option ';
5375
- if ('dimension1' == $selected) echo 'selected="selected"';
5376
- echo ' value="dimension1">'. __("Custom Dimension #1","wp-seopress") .'</option>';
5377
- echo '<option ';
5378
- if ('dimension2' == $selected) echo 'selected="selected"';
5379
- echo ' value="dimension2">'. __("Custom Dimension #2","wp-seopress") .'</option>';
5380
- echo '<option ';
5381
- if ('dimension3' == $selected) echo 'selected="selected"';
5382
- echo ' value="dimension3">'. __("Custom Dimension #3","wp-seopress") .'</option>';
5383
- echo '<option ';
5384
- if ('dimension4' == $selected) echo 'selected="selected"';
5385
- echo ' value="dimension4">'. __("Custom Dimension #4","wp-seopress") .'</option>';
5386
- echo '<option ';
5387
- if ('dimension5' == $selected) echo 'selected="selected"';
5388
- echo ' value="dimension5">'. __("Custom Dimension #5","wp-seopress") .'</option>';
5389
- echo '<option ';
5390
- if ('dimension6' == $selected) echo 'selected="selected"';
5391
- echo ' value="dimension6">'. __("Custom Dimension #6","wp-seopress") .'</option>';
5392
- echo '<option ';
5393
- if ('dimension7' == $selected) echo 'selected="selected"';
5394
- echo ' value="dimension7">'. __("Custom Dimension #7","wp-seopress") .'</option>';
5395
- echo '<option ';
5396
- if ('dimension8' == $selected) echo 'selected="selected"';
5397
- echo ' value="dimension8">'. __("Custom Dimension #8","wp-seopress") .'</option>';
5398
- echo '<option ';
5399
- if ('dimension9' == $selected) echo 'selected="selected"';
5400
- echo ' value="dimension9">'. __("Custom Dimension #9","wp-seopress") .'</option>';
5401
- echo '<option ';
5402
- if ('dimension10' == $selected) echo 'selected="selected"';
5403
- echo ' value="dimension10">'. __("Custom Dimension #10","wp-seopress") .'</option>';
5404
- echo '<option ';
5405
- if ('dimension11' == $selected) echo 'selected="selected"';
5406
- echo ' value="dimension11">'. __("Custom Dimension #11","wp-seopress") .'</option>';
5407
- echo '<option ';
5408
- if ('dimension12' == $selected) echo 'selected="selected"';
5409
- echo ' value="dimension12">'. __("Custom Dimension #12","wp-seopress") .'</option>';
5410
- echo '<option ';
5411
- if ('dimension13' == $selected) echo 'selected="selected"';
5412
- echo ' value="dimension13">'. __("Custom Dimension #13","wp-seopress") .'</option>';
5413
- echo '<option ';
5414
- if ('dimension14' == $selected) echo 'selected="selected"';
5415
- echo ' value="dimension14">'. __("Custom Dimension #14","wp-seopress") .'</option>';
5416
- echo '<option ';
5417
- if ('dimension15' == $selected) echo 'selected="selected"';
5418
- echo ' value="dimension15">'. __("Custom Dimension #15","wp-seopress") .'</option>';
5419
- echo '<option ';
5420
- if ('dimension16' == $selected) echo 'selected="selected"';
5421
- echo ' value="dimension16">'. __("Custom Dimension #16","wp-seopress") .'</option>';
5422
- echo '<option ';
5423
- if ('dimension17' == $selected) echo 'selected="selected"';
5424
- echo ' value="dimension17">'. __("Custom Dimension #17","wp-seopress") .'</option>';
5425
- echo '<option ';
5426
- if ('dimension18' == $selected) echo 'selected="selected"';
5427
- echo ' value="dimension18">'. __("Custom Dimension #18","wp-seopress") .'</option>';
5428
- echo '<option ';
5429
- if ('dimension19' == $selected) echo 'selected="selected"';
5430
- echo ' value="dimension19">'. __("Custom Dimension #19","wp-seopress") .'</option>';
5431
- echo '<option ';
5432
- if ('dimension20' == $selected) echo 'selected="selected"';
5433
- echo ' value="dimension20">'. __("Custom Dimension #20","wp-seopress") .'</option>';
5434
- echo '</select>';
5435
-
5436
- if (isset($this->options['seopress_google_analytics_cd_logged_in_user'])) {
5437
- esc_attr( $this->options['seopress_google_analytics_cd_logged_in_user']);
5438
- }
5439
- }
5440
-
5441
- public function seopress_google_analytics_matomo_enable_callback()
5442
- {
5443
- $options = get_option( 'seopress_google_analytics_option_name' );
5444
-
5445
- $check = isset($options['seopress_google_analytics_matomo_enable']);
5446
-
5447
- echo '<input id="seopress_google_analytics_matomo_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_enable]" type="checkbox"';
5448
- if ('1' == $check) echo 'checked="yes"';
5449
- echo ' value="1"/>';
5450
-
5451
- echo '<label for="seopress_google_analytics_matomo_enable">'. __( 'Enable Matomo tracking (Matomo account required)', 'wp-seopress' ) .'</label>';
5452
-
5453
- if (isset($this->options['seopress_google_analytics_matomo_enable'])) {
5454
- esc_attr( $this->options['seopress_google_analytics_matomo_enable']);
5455
- }
5456
- }
5457
-
5458
- public function seopress_google_analytics_matomo_id_callback()
5459
- {
5460
- $check = isset($this->options['seopress_google_analytics_matomo_id']) ? $this->options['seopress_google_analytics_matomo_id'] : NULL;
5461
-
5462
- printf(
5463
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_id]" placeholder="'.esc_html__('Enter "example" if you Matomo account URL is "example.matomo.cloud"','wp-seopress').'" value="%s" aria-label="'.__('Matomo Cloud URL','wp-seopress').'"/>',
5464
- esc_html($check)
5465
-
5466
- );
5467
-
5468
- echo '<p class="description">'.__('Enter only the <strong>host</strong> like this example.matomo.cloud').'</p>';
5469
-
5470
- }
5471
-
5472
- public function seopress_google_analytics_matomo_site_id_callback()
5473
- {
5474
- $check = isset($this->options['seopress_google_analytics_matomo_site_id']) ? $this->options['seopress_google_analytics_matomo_site_id'] : NULL;
5475
-
5476
- printf(
5477
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_site_id]" placeholder="'.esc_html__('Enter your site ID here','wp-seopress').'" value="%s" aria-label="'.__('Matomo Site ID','wp-seopress').'"/>',
5478
- esc_html($check)
5479
-
5480
- );
5481
-
5482
- echo '<p class="description">'.__('To find your site ID, go to your <strong>Matomo Cloud account, Websites, Manage page</strong>. Look at "Site ID" on the right part.','wp-seopress').'</p>';
5483
-
5484
- }
5485
-
5486
- public function seopress_google_analytics_matomo_subdomains_callback()
5487
- {
5488
- $options = get_option( 'seopress_google_analytics_option_name' );
5489
-
5490
- $check = isset($options['seopress_google_analytics_matomo_subdomains']);
5491
-
5492
- echo '<input id="seopress_google_analytics_matomo_subdomains" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_subdomains]" type="checkbox"';
5493
- if ('1' == $check) echo 'checked="yes"';
5494
- echo ' value="1"/>';
5495
-
5496
- echo '<label for="seopress_google_analytics_matomo_subdomains">'. __( 'Tracking one domain and its subdomains in the same website', 'wp-seopress' ) .'</label>';
5497
-
5498
- echo '<p class="description">'.__( 'If one visitor visits x.example.com and y.example.com, they will be counted as a unique visitor.', 'wp-seopress' ).'</p>';
5499
-
5500
- if (isset($this->options['seopress_google_analytics_matomo_subdomains'])) {
5501
- esc_attr( $this->options['seopress_google_analytics_matomo_subdomains']);
5502
- }
5503
- }
5504
-
5505
- public function seopress_google_analytics_matomo_site_domain_callback()
5506
- {
5507
- $options = get_option( 'seopress_google_analytics_option_name' );
5508
-
5509
- $check = isset($options['seopress_google_analytics_matomo_site_domain']);
5510
-
5511
- echo '<input id="seopress_google_analytics_matomo_site_domain" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_site_domain]" type="checkbox"';
5512
- if ('1' == $check) echo 'checked="yes"';
5513
- echo ' value="1"/>';
5514
-
5515
- echo '<label for="seopress_google_analytics_matomo_site_domain">'. __( 'Prepend the site domain to the page title when tracking', 'wp-seopress' ) .'</label>';
5516
-
5517
- echo '<p class="description">'.__( 'If someone visits the \'About\' page on blog.example.com it will be recorded as \'blog / About\'. This is the easiest way to get an overview of your traffic by sub-domain.', 'wp-seopress' ).'</p>';
5518
-
5519
- if (isset($this->options['seopress_google_analytics_matomo_site_domain'])) {
5520
- esc_attr( $this->options['seopress_google_analytics_matomo_site_domain']);
5521
- }
5522
- }
5523
-
5524
- public function seopress_google_analytics_matomo_no_js_callback()
5525
- {
5526
- $options = get_option( 'seopress_google_analytics_option_name' );
5527
-
5528
- $check = isset($options['seopress_google_analytics_matomo_no_js']);
5529
-
5530
- echo '<input id="seopress_google_analytics_matomo_no_js" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_no_js]" type="checkbox"';
5531
- if ('1' == $check) echo 'checked="yes"';
5532
- echo ' value="1"/>';
5533
-
5534
- echo '<label for="seopress_google_analytics_matomo_no_js">'. __( 'Track users with JavaScript disabled', 'wp-seopress' ) .'</label>';
5535
-
5536
- if (isset($this->options['seopress_google_analytics_matomo_no_js'])) {
5537
- esc_attr( $this->options['seopress_google_analytics_matomo_no_js']);
5538
- }
5539
- }
5540
-
5541
- public function seopress_google_analytics_matomo_cross_domain_callback()
5542
- {
5543
- $options = get_option( 'seopress_google_analytics_option_name' );
5544
-
5545
- $check = isset($options['seopress_google_analytics_matomo_cross_domain']);
5546
-
5547
- echo '<input id="seopress_google_analytics_matomo_cross_domain" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_cross_domain]" type="checkbox"';
5548
- if ('1' == $check) echo 'checked="yes"';
5549
- echo ' value="1"/>';
5550
-
5551
- echo '<label for="seopress_google_analytics_matomo_cross_domain">'. __( 'Enables cross domain linking', 'wp-seopress' ) .'</label>';
5552
-
5553
- echo '<p class="description">'.__( 'By default, the visitor ID that identifies a unique visitor is stored in the browser\'s first party cookies which can only be accessed by pages on the same domain. Enabling cross domain linking lets you track all the actions and pageviews of a specific visitor into the same visit even when they view pages on several domains. Whenever a user clicks on a link to one of your website\'s alias URLs, it will append a URL parameter pk_vid forwarding the Visitor ID.','wp-seopress' ).'</p>';
5554
-
5555
- if (isset($this->options['seopress_google_analytics_matomo_cross_domain'])) {
5556
- esc_attr( $this->options['seopress_google_analytics_matomo_cross_domain']);
5557
- }
5558
- }
5559
-
5560
- public function seopress_google_analytics_matomo_cross_domain_sites_callback()
5561
- {
5562
- $check = isset($this->options['seopress_google_analytics_matomo_cross_domain_sites']) ? $this->options['seopress_google_analytics_matomo_cross_domain_sites'] : NULL;
5563
-
5564
- printf(
5565
- '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_cross_domain_sites]" placeholder="'.esc_html__('Enter your domains: seopress.org,sub.seopress.org,sub2.seopress.org','wp-seopress').'" value="%s" aria-label="'.__('Cross domains','wp-seopress').'"/>',
5566
- esc_html($check)
5567
-
5568
- );
5569
-
5570
- }
5571
-
5572
- public function seopress_google_analytics_matomo_dnt_callback()
5573
- {
5574
- $options = get_option( 'seopress_google_analytics_option_name' );
5575
-
5576
- $check = isset($options['seopress_google_analytics_matomo_dnt']);
5577
-
5578
- echo '<input id="seopress_google_analytics_matomo_dnt" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_dnt]" type="checkbox"';
5579
- if ('1' == $check) echo 'checked="yes"';
5580
- echo ' value="1"/>';
5581
-
5582
- echo '<label for="seopress_google_analytics_matomo_dnt">'. __( 'Enable client side DoNotTrack detection', 'wp-seopress' ) .'</label>';
5583
-
5584
- echo '<p class="description">'.__( 'Tracking requests will not be sent if visitors do not wish to be tracked.','wp-seopress' ).'</p>';
5585
-
5586
- if (isset($this->options['seopress_google_analytics_matomo_dnt'])) {
5587
- esc_attr( $this->options['seopress_google_analytics_matomo_dnt']);
5588
- }
5589
- }
5590
-
5591
- public function seopress_google_analytics_matomo_no_cookies_callback()
5592
- {
5593
- $options = get_option( 'seopress_google_analytics_option_name' );
5594
-
5595
- $check = isset($options['seopress_google_analytics_matomo_no_cookies']);
5596
-
5597
- echo '<input id="seopress_google_analytics_matomo_no_cookies" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_no_cookies]" type="checkbox"';
5598
- if ('1' == $check) echo 'checked="yes"';
5599
- echo ' value="1"/>';
5600
-
5601
- echo '<label for="seopress_google_analytics_matomo_no_cookies">'. __( 'Disables all first party cookies. Existing Matomo cookies for this website will be deleted on the next page view.', 'wp-seopress' ) .'</label>';
5602
-
5603
- if (isset($this->options['seopress_google_analytics_matomo_no_cookies'])) {
5604
- esc_attr( $this->options['seopress_google_analytics_matomo_no_cookies']);
5605
- }
5606
- }
5607
-
5608
- public function seopress_google_analytics_matomo_link_tracking_callback()
5609
- {
5610
- $options = get_option( 'seopress_google_analytics_option_name' );
5611
-
5612
- $check = isset($options['seopress_google_analytics_matomo_link_tracking']);
5613
-
5614
- echo '<input id="seopress_google_analytics_matomo_link_tracking" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_link_tracking]" type="checkbox"';
5615
- if ('1' == $check) echo 'checked="yes"';
5616
- echo ' value="1"/>';
5617
-
5618
- echo '<label for="seopress_google_analytics_matomo_link_tracking">'. __( 'Enabling Download & Outlink tracking', 'wp-seopress' ) .'</label>';
5619
-
5620
- echo '<p class="description">'.__( 'By default, any file ending with one of these extensions will be considered a "download" in the Matomo interface: 7z|aac|arc|arj|apk|asf|asx|avi|bin|bz|bz2|csv|deb|dmg|doc|
5621
- exe|flv|gif|gz|gzip|hqx|jar|jpg|jpeg|js|mp2|mp3|mp4|mpg|
5622
- mpeg|mov|movie|msi|msp|odb|odf|odg|odp|ods|odt|ogg|ogv|
5623
- pdf|phps|png|ppt|qt|qtm|ra|ram|rar|rpm|sea|sit|tar|
5624
- tbz|tbz2|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip','wp-seopress' ).'</p>';
5625
-
5626
- if (isset($this->options['seopress_google_analytics_matomo_link_tracking'])) {
5627
- esc_attr( $this->options['seopress_google_analytics_matomo_link_tracking']);
5628
- }
5629
- }
5630
-
5631
- public function seopress_advanced_advanced_attachments_callback()
5632
- {
5633
- $options = get_option( 'seopress_advanced_option_name' );
5634
-
5635
- $check = isset($options['seopress_advanced_advanced_attachments']);
5636
-
5637
- echo '<input id="seopress_advanced_advanced_attachments" name="seopress_advanced_option_name[seopress_advanced_advanced_attachments]" type="checkbox"';
5638
- if ('1' == $check) echo 'checked="yes"';
5639
- echo ' value="1"/>';
5640
-
5641
- echo '<label for="seopress_advanced_advanced_attachments">'. __( 'Redirect attachment pages to post parent (or homepage if none)', 'wp-seopress' ) .'</label>';
5642
-
5643
- if (isset($this->options['seopress_advanced_advanced_attachments'])) {
5644
- esc_attr( $this->options['seopress_advanced_advanced_attachments']);
5645
- }
5646
- }
5647
-
5648
- public function seopress_advanced_advanced_attachments_file_callback()
5649
- {
5650
- $options = get_option( 'seopress_advanced_option_name' );
5651
-
5652
- $check = isset($options['seopress_advanced_advanced_attachments_file']);
5653
-
5654
- echo '<input id="seopress_advanced_advanced_attachments_file" name="seopress_advanced_option_name[seopress_advanced_advanced_attachments_file]" type="checkbox"';
5655
- if ('1' == $check) echo 'checked="yes"';
5656
- echo ' value="1"/>';
5657
-
5658
- echo '<label for="seopress_advanced_advanced_attachments_file">'. __( 'Redirect attachment pages to their file URL (https://www.example.com/my-image-file.jpg)', 'wp-seopress' ) .'</label>';
5659
-
5660
- echo '<p class="description">'.__('If this option is checked, it will take precedence over the redirection of attachments to the post\'s parent.','wp-seopress').'</p>';
5661
-
5662
- if (isset($this->options['seopress_advanced_advanced_attachments_file'])) {
5663
- esc_attr( $this->options['seopress_advanced_advanced_attachments_file']);
5664
- }
5665
- }
5666
-
5667
- public function seopress_advanced_advanced_replytocom_callback()
5668
- {
5669
- $options = get_option( 'seopress_advanced_option_name' );
5670
-
5671
- $check = isset($options['seopress_advanced_advanced_replytocom']);
5672
-
5673
- echo '<input id="seopress_advanced_advanced_replytocom" name="seopress_advanced_option_name[seopress_advanced_advanced_replytocom]" type="checkbox"';
5674
- if ('1' == $check) echo 'checked="yes"';
5675
- echo ' value="1"/>';
5676
-
5677
- echo '<label for="seopress_advanced_advanced_replytocom">'. __( 'Remove ?replytocom link in source code', 'wp-seopress' ) .'</label>';
5678
-
5679
- if (isset($this->options['seopress_advanced_advanced_replytocom'])) {
5680
- esc_attr( $this->options['seopress_advanced_advanced_replytocom']);
5681
- }
5682
- }
5683
-
5684
- public function seopress_advanced_advanced_image_auto_title_editor_callback()
5685
- {
5686
- $options = get_option( 'seopress_advanced_option_name' );
5687
-
5688
- $check = isset($options['seopress_advanced_advanced_image_auto_title_editor']);
5689
-
5690
- echo '<input id="seopress_advanced_advanced_image_auto_title_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_title_editor]" type="checkbox"';
5691
- if ('1' == $check) echo 'checked="yes"';
5692
- echo ' value="1"/>';
5693
-
5694
- echo '<label for="seopress_advanced_advanced_image_auto_title_editor">'. __( 'When sending an image file, automatically set the title based on the filename', 'wp-seopress' ) .'</label>';
5695
-
5696
- if (isset($this->options['seopress_advanced_advanced_image_auto_title_editor'])) {
5697
- esc_attr( $this->options['seopress_advanced_advanced_image_auto_title_editor']);
5698
- }
5699
- }
5700
-
5701
- public function seopress_advanced_advanced_image_auto_alt_editor_callback()
5702
- {
5703
- $options = get_option( 'seopress_advanced_option_name' );
5704
-
5705
- $check = isset($options['seopress_advanced_advanced_image_auto_alt_editor']);
5706
-
5707
- echo '<input id="seopress_advanced_advanced_image_auto_alt_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_alt_editor]" type="checkbox"';
5708
- if ('1' == $check) echo 'checked="yes"';
5709
- echo ' value="1"/>';
5710
-
5711
- echo '<label for="seopress_advanced_advanced_image_auto_alt_editor">'. __( 'When sending an image file, automatically set the alternative text based on the filename', 'wp-seopress' ) .'</label>';
5712
-
5713
- if ( !is_plugin_active( 'imageseo/imageseo.php' )) {
5714
- echo '<p class="description"><a href="https://imageseo.io?_from=seopress" target="_blank">'.__('We recommend Image SEO plugin to optimize your image ALT texts and names for Search Engines using AI and Machine Learning. Starting from just €4.99.','wp-seopress-pro').'</a><span class="dashicons dashicons-external"></span></p>';
5715
- }
5716
-
5717
- if (isset($this->options['seopress_advanced_advanced_image_auto_alt_editor'])) {
5718
- esc_attr( $this->options['seopress_advanced_advanced_image_auto_alt_editor']);
5719
- }
5720
- }
5721
-
5722
- public function seopress_advanced_advanced_image_auto_caption_editor_callback()
5723
- {
5724
- $options = get_option( 'seopress_advanced_option_name' );
5725
-
5726
- $check = isset($options['seopress_advanced_advanced_image_auto_caption_editor']);
5727
-
5728
- echo '<input id="seopress_advanced_advanced_image_auto_caption_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_caption_editor]" type="checkbox"';
5729
- if ('1' == $check) echo 'checked="yes"';
5730
- echo ' value="1"/>';
5731
-
5732
- echo '<label for="seopress_advanced_advanced_image_auto_caption_editor">'. __( 'When sending an image file, automatically set the caption based on the filename', 'wp-seopress' ) .'</label>';
5733
-
5734
- if (isset($this->options['seopress_advanced_advanced_image_auto_caption_editor'])) {
5735
- esc_attr( $this->options['seopress_advanced_advanced_image_auto_caption_editor']);
5736
- }
5737
- }
5738
-
5739
- public function seopress_advanced_advanced_image_auto_desc_editor_callback()
5740
- {
5741
- $options = get_option( 'seopress_advanced_option_name' );
5742
-
5743
- $check = isset($options['seopress_advanced_advanced_image_auto_desc_editor']);
5744
-
5745
- echo '<input id="seopress_advanced_advanced_image_auto_desc_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_desc_editor]" type="checkbox"';
5746
- if ('1' == $check) echo 'checked="yes"';
5747
- echo ' value="1"/>';
5748
-
5749
- echo '<label for="seopress_advanced_advanced_image_auto_desc_editor">'. __( 'When sending an image file, automatically set the description based on the filename', 'wp-seopress' ) .'</label>';
5750
-
5751
- if (isset($this->options['seopress_advanced_advanced_image_auto_desc_editor'])) {
5752
- esc_attr( $this->options['seopress_advanced_advanced_image_auto_desc_editor']);
5753
- }
5754
- }
5755
-
5756
- public function seopress_advanced_advanced_tax_desc_editor_callback()
5757
- {
5758
- $options = get_option( 'seopress_advanced_option_name' );
5759
-
5760
- $check = isset($options['seopress_advanced_advanced_tax_desc_editor']);
5761
-
5762
- echo '<input id="seopress_advanced_advanced_tax_desc_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_tax_desc_editor]" type="checkbox"';
5763
- if ('1' == $check) echo 'checked="yes"';
5764
- echo ' value="1"/>';
5765
-
5766
- echo '<label for="seopress_advanced_advanced_tax_desc_editor">'. __( 'Add TINYMCE editor to term description', 'wp-seopress' ) .'</label>';
5767
-
5768
- if (isset($this->options['seopress_advanced_advanced_tax_desc_editor'])) {
5769
- esc_attr( $this->options['seopress_advanced_advanced_tax_desc_editor']);
5770
- }
5771
- }
5772
-
5773
- public function seopress_advanced_advanced_category_url_callback()
5774
- {
5775
- $options = get_option( 'seopress_advanced_option_name' );
5776
-
5777
- $check = isset($options['seopress_advanced_advanced_category_url']);
5778
-
5779
- echo '<input id="seopress_advanced_advanced_category_url" name="seopress_advanced_option_name[seopress_advanced_advanced_category_url]" type="checkbox"';
5780
- if ('1' == $check) echo 'checked="yes"';
5781
- echo ' value="1"/>';
5782
-
5783
- echo '<label for="seopress_advanced_advanced_category_url">'. __( 'Remove /category/ in your permalinks', 'wp-seopress' ) .'</label><span class="dashicons dashicons-info" title="'.__('You have to flush your permalinks each time you change this settings','wp-seopress').'"></span>';
5784
-
5785
- if (isset($this->options['seopress_advanced_advanced_category_url'])) {
5786
- esc_attr( $this->options['seopress_advanced_advanced_category_url']);
5787
- }
5788
- }
5789
-
5790
- public function seopress_advanced_advanced_trailingslash_callback()
5791
- {
5792
- $options = get_option( 'seopress_advanced_option_name' );
5793
-
5794
- $check = isset($options['seopress_advanced_advanced_trailingslash']);
5795
-
5796
- echo '<input id="seopress_advanced_advanced_trailingslash" name="seopress_advanced_option_name[seopress_advanced_advanced_trailingslash]" type="checkbox"';
5797
- if ('1' == $check) echo 'checked="yes"';
5798
- echo ' value="1"/>';
5799
-
5800
- echo '<label for="seopress_advanced_advanced_trailingslash">'. __( 'Disable trailing slash for metas', 'wp-seopress' ) .'</label><span class="dashicons dashicons-info" title="'.__('You must check this box if the structure of your permalinks DOES NOT contain a slash at the end (eg: /%postname%)','wp-seopress').'"></span>';
5801
-
5802
- if (isset($this->options['seopress_advanced_advanced_trailingslash'])) {
5803
- esc_attr( $this->options['seopress_advanced_advanced_trailingslash']);
5804
- }
5805
- }
5806
-
5807
- public function seopress_advanced_advanced_wp_generator_callback()
5808
- {
5809
- $options = get_option( 'seopress_advanced_option_name' );
5810
-
5811
- $check = isset($options['seopress_advanced_advanced_wp_generator']);
5812
-
5813
- echo '<input id="seopress_advanced_advanced_wp_generator" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_generator]" type="checkbox"';
5814
- if ('1' == $check) echo 'checked="yes"';
5815
- echo ' value="1"/>';
5816
-
5817
- echo '<label for="seopress_advanced_advanced_wp_generator">'. __( 'Remove WordPress meta generator in source code', 'wp-seopress' ) .'</label>';
5818
-
5819
- if (isset($this->options['seopress_advanced_advanced_wp_generator'])) {
5820
- esc_attr( $this->options['seopress_advanced_advanced_wp_generator']);
5821
- }
5822
- }
5823
-
5824
- public function seopress_advanced_advanced_hentry_callback()
5825
- {
5826
- $options = get_option( 'seopress_advanced_option_name' );
5827
-
5828
- $check = isset($options['seopress_advanced_advanced_hentry']);
5829
-
5830
- echo '<input id="seopress_advanced_advanced_hentry" name="seopress_advanced_option_name[seopress_advanced_advanced_hentry]" type="checkbox"';
5831
- if ('1' == $check) echo 'checked="yes"';
5832
- echo ' value="1"/>';
5833
-
5834
- echo '<label for="seopress_advanced_advanced_hentry">'. __( 'Remove hentry post class to prevent Google from seeing this as structured data (schema)', 'wp-seopress' ) .'</label>';
5835
-
5836
- if (isset($this->options['seopress_advanced_advanced_hentry'])) {
5837
- esc_attr( $this->options['seopress_advanced_advanced_hentry']);
5838
- }
5839
- }
5840
-
5841
- public function seopress_advanced_advanced_comments_author_url_callback()
5842
- {
5843
- $options = get_option( 'seopress_advanced_option_name' );
5844
-
5845
- $check = isset($options['seopress_advanced_advanced_comments_author_url']);
5846
-
5847
- echo '<input id="seopress_advanced_advanced_comments_author_url" name="seopress_advanced_option_name[seopress_advanced_advanced_comments_author_url]" type="checkbox"';
5848
- if ('1' == $check) echo 'checked="yes"';
5849
- echo ' value="1"/>';
5850
-
5851
- echo '<label for="seopress_advanced_advanced_comments_author_url">'. __( 'Remove comment author URL in comments if the website is filled from profile page', 'wp-seopress' ) .'</label>';
5852
-
5853
- if (isset($this->options['seopress_advanced_advanced_comments_author_url'])) {
5854
- esc_attr( $this->options['seopress_advanced_advanced_comments_author_url']);
5855
- }
5856
- }
5857
-
5858
- public function seopress_advanced_advanced_comments_website_callback()
5859
- {
5860
- $options = get_option( 'seopress_advanced_option_name' );
5861
-
5862
- $check = isset($options['seopress_advanced_advanced_comments_website']);
5863
-
5864
- echo '<input id="seopress_advanced_advanced_comments_website" name="seopress_advanced_option_name[seopress_advanced_advanced_comments_website]" type="checkbox"';
5865
- if ('1' == $check) echo 'checked="yes"';
5866
- echo ' value="1"/>';
5867
-
5868
- echo '<label for="seopress_advanced_advanced_comments_website">'. __( 'Remove website field from comment form to reduce spam', 'wp-seopress' ) .'</label>';
5869
-
5870
- if (isset($this->options['seopress_advanced_advanced_comments_website'])) {
5871
- esc_attr( $this->options['seopress_advanced_advanced_comments_website']);
5872
- }
5873
- }
5874
-
5875
- public function seopress_advanced_advanced_wp_shortlink_callback()
5876
- {
5877
- $options = get_option( 'seopress_advanced_option_name' );
5878
-
5879
- $check = isset($options['seopress_advanced_advanced_wp_shortlink']);
5880
-
5881
- echo '<input id="seopress_advanced_advanced_wp_shortlink" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_shortlink]" type="checkbox"';
5882
- if ('1' == $check) echo 'checked="yes"';
5883
- echo ' value="1"/>';
5884
-
5885
- echo '<label for="seopress_advanced_advanced_wp_shortlink">'. __( 'Remove WordPress shortlink meta tag in source code (eg:', 'wp-seopress' ) .'<em>'.esc_attr('<link rel="shortlink" href="https://www.seopress.org/"/>').'</em>)</label>';
5886
-
5887
- if (isset($this->options['seopress_advanced_advanced_wp_shortlink'])) {
5888
- esc_attr( $this->options['seopress_advanced_advanced_wp_shortlink']);
5889
- }
5890
- }
5891
-
5892
- public function seopress_advanced_advanced_wp_wlw_callback()
5893
- {
5894
- $options = get_option( 'seopress_advanced_option_name' );
5895
-
5896
- $check = isset($options['seopress_advanced_advanced_wp_wlw']);
5897
-
5898
- echo '<input id="seopress_advanced_advanced_wp_wlw" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_wlw]" type="checkbox"';
5899
- if ('1' == $check) echo 'checked="yes"';
5900
- echo ' value="1"/>';
5901
-
5902
- echo '<label for="seopress_advanced_advanced_wp_wlw">'. __( 'Remove Windows Live Writer meta tag in source code (eg:', 'wp-seopress' ) .'<em>'.esc_attr('<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://www.seopress.org/wp-includes/wlwmanifest.xml" />').'</em>)</label>';
5903
-
5904
- if (isset($this->options['seopress_advanced_advanced_wp_wlw'])) {
5905
- esc_attr( $this->options['seopress_advanced_advanced_wp_wlw']);
5906
- }
5907
- }
5908
-
5909
- public function seopress_advanced_advanced_wp_rsd_callback()
5910
- {
5911
- $options = get_option( 'seopress_advanced_option_name' );
5912
-
5913
- $check = isset($options['seopress_advanced_advanced_wp_rsd']);
5914
-
5915
- echo '<input id="seopress_advanced_advanced_wp_rsd" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_rsd]" type="checkbox"';
5916
- if ('1' == $check) echo 'checked="yes"';
5917
- echo ' value="1"/>';
5918
-
5919
- echo '<label for="seopress_advanced_advanced_wp_rsd">'. __( 'Remove Really Simple Discovery meta tag in source code (eg:', 'wp-seopress' ) .'<em>'.esc_attr('<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.seopress.dev/xmlrpc.php?rsd" />').'</em>)</label>';
5920
-
5921
- if (isset($this->options['seopress_advanced_advanced_wp_rsd'])) {
5922
- esc_attr( $this->options['seopress_advanced_advanced_wp_rsd']);
5923
- }
5924
- }
5925
-
5926
- public function seopress_advanced_advanced_google_callback()
5927
- {
5928
- $check = isset($this->options['seopress_advanced_advanced_google']) ? $this->options['seopress_advanced_advanced_google'] : NULL;
5929
-
5930
- printf(
5931
- '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_google]" placeholder="'.esc_html__('Enter Google meta value site verification','wp-seopress').'" aria-label="'.__('Google site verification','wp-seopress').'" value="%s"/>',
5932
- esc_html( $check )
5933
-
5934
- );
5935
-
5936
- echo '<p class="description">'.__('If your site is already verified in <strong>Google Search Console</strong>, you can leave this field empty.','wp-seopress').'</p>';
5937
-
5938
- }
5939
-
5940
- public function seopress_advanced_advanced_bing_callback()
5941
- {
5942
- $check = isset($this->options['seopress_advanced_advanced_bing']) ? $this->options['seopress_advanced_advanced_bing'] : NULL;
5943
-
5944
- printf(
5945
- '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_bing]" placeholder="'.esc_html__('Enter Bing meta value site verification','wp-seopress').'" aria-label="'.__('Bing site verification','wp-seopress').'" value="%s"/>',
5946
- esc_html( $check )
5947
-
5948
- );
5949
- echo '<p class="description">'.__('If your site is already verified in <strong>Bing Webmaster tools</strong>, you can leave this field empty.','wp-seopress').'</p>';
5950
-
5951
- }
5952
-
5953
- public function seopress_advanced_advanced_pinterest_callback()
5954
- {
5955
- $check = isset($this->options['seopress_advanced_advanced_pinterest']) ? $this->options['seopress_advanced_advanced_pinterest'] : NULL;
5956
-
5957
- printf(
5958
- '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_pinterest]" placeholder="'.esc_html__('Enter Pinterest meta value site verification','wp-seopress').'" aria-label="'.__('Pinterest site verification','wp-seopress').'" value="%s"/>',
5959
- esc_html( $check )
5960
-
5961
- );
5962
-
5963
- }
5964
-
5965
- public function seopress_advanced_advanced_yandex_callback()
5966
- {
5967
- $check = isset($this->options['seopress_advanced_advanced_yandex']) ? $this->options['seopress_advanced_advanced_yandex'] : NULL;
5968
-
5969
- printf(
5970
- '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_yandex]" aria-label="'.__('Yandex site verification','wp-seopress').'" placeholder="'.esc_html__('Enter Yandex meta value site verification','wp-seopress').'" value="%s"/>',
5971
- esc_html( $check )
5972
-
5973
- );
5974
-
5975
- }
5976
-
5977
- public function seopress_advanced_appearance_adminbar_callback()
5978
- {
5979
- $options = get_option( 'seopress_advanced_option_name' );
5980
-
5981
- $check = isset($options['seopress_advanced_appearance_adminbar']);
5982
-
5983
- echo '<input id="seopress_advanced_appearance_adminbar" name="seopress_advanced_option_name[seopress_advanced_appearance_adminbar]" type="checkbox"';
5984
- if ('1' == $check) echo 'checked="yes"';
5985
- echo ' value="1"/>';
5986
-
5987
- echo '<label for="seopress_advanced_appearance_adminbar">'. __( 'Remove SEOPress from Admin Bar in backend and frontend', 'wp-seopress' ) .'</label>';
5988
-
5989
- if (isset($this->options['seopress_advanced_appearance_adminbar'])) {
5990
- esc_attr( $this->options['seopress_advanced_appearance_adminbar']);
5991
- }
5992
- }
5993
-
5994
- public function seopress_advanced_appearance_metaboxe_position_callback()
5995
- {
5996
- $options = get_option( 'seopress_advanced_option_name' );
5997
-
5998
- $selected = isset($options['seopress_advanced_appearance_metaboxe_position']) ? $options['seopress_advanced_appearance_metaboxe_position'] : NULL;
5999
-
6000
- echo '<select id="seopress_advanced_appearance_metaboxe_position" name="seopress_advanced_option_name[seopress_advanced_appearance_metaboxe_position]">';
6001
- echo ' <option ';
6002
- if ('high' == $selected) echo 'selected="selected"';
6003
- echo ' value="high">'. __("High priority (top)","wp-seopress") .'</option>';
6004
- echo '<option ';
6005
- if ('default' == $selected) echo 'selected="selected"';
6006
- echo ' value="default">'. __("Normal priority (default)","wp-seopress") .'</option>';
6007
- echo '<option ';
6008
- if ('low' == $selected) echo 'selected="selected"';
6009
- echo ' value="low">'. __("Low priority","wp-seopress") .'</option>';
6010
- echo '</select>';
6011
-
6012
- if (isset($this->options['seopress_advanced_appearance_metaboxe_position'])) {
6013
- esc_attr( $this->options['seopress_advanced_appearance_metaboxe_position']);
6014
- }
6015
- }
6016
-
6017
- public function seopress_advanced_appearance_schema_default_tab_callback()
6018
- {
6019
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
6020
- $options = get_option( 'seopress_advanced_option_name' );
6021
-
6022
- $selected = isset($options['seopress_advanced_appearance_schema_default_tab']) ? $options['seopress_advanced_appearance_schema_default_tab'] : NULL;
6023
-
6024
- echo '<select id="seopress_advanced_appearance_schema_default_tab" name="seopress_advanced_option_name[seopress_advanced_appearance_schema_default_tab]">';
6025
- echo '<option ';
6026
- if ('automatic' == $selected) echo 'selected="selected"';
6027
- echo ' value="automatic">'. __("Automatic tab (default)","wp-seopress") .'</option>';
6028
- echo ' <option ';
6029
- if ('manual' == $selected) echo 'selected="selected"';
6030
- echo ' value="manual">'. __("Manual tab","wp-seopress") .'</option>';
6031
- echo '</select>';
6032
-
6033
- if (isset($this->options['seopress_advanced_appearance_schema_default_tab'])) {
6034
- esc_attr( $this->options['seopress_advanced_appearance_schema_default_tab']);
6035
- }
6036
- }
6037
- }
6038
-
6039
- public function seopress_advanced_appearance_notifications_callback()
6040
- {
6041
- $options = get_option( 'seopress_advanced_option_name' );
6042
-
6043
- $check = isset($options['seopress_advanced_appearance_notifications']);
6044
-
6045
- echo '<input id="seopress_advanced_appearance_notifications" name="seopress_advanced_option_name[seopress_advanced_appearance_notifications]" type="checkbox"';
6046
- if ('1' == $check) echo 'checked="yes"';
6047
- echo ' value="1"/>';
6048
-
6049
- echo '<label for="seopress_advanced_appearance_notifications">'. __( 'Hide Notifications Center in SEOPress Dashboard page', 'wp-seopress' ) .'</label>';
6050
-
6051
- if (isset($this->options['seopress_advanced_appearance_notifications'])) {
6052
- esc_attr( $this->options['seopress_advanced_appearance_notifications']);
6053
- }
6054
- }
6055
-
6056
- public function seopress_advanced_appearance_seo_tools_callback()
6057
- {
6058
- $options = get_option( 'seopress_advanced_option_name' );
6059
-
6060
- $check = isset($options['seopress_advanced_appearance_seo_tools']);
6061
-
6062
- echo '<input id="seopress_advanced_appearance_seo_tools" name="seopress_advanced_option_name[seopress_advanced_appearance_seo_tools]" type="checkbox"';
6063
- if ('1' == $check) echo 'checked="yes"';
6064
- echo ' value="1"/>';
6065
-
6066
- echo '<label for="seopress_advanced_appearance_seo_tools">'. __( 'Hide SEO tools in SEOPress Dashboard page', 'wp-seopress' ) .'</label>';
6067
-
6068
- if (isset($this->options['seopress_advanced_appearance_seo_tools'])) {
6069
- esc_attr( $this->options['seopress_advanced_appearance_seo_tools']);
6070
- }
6071
- }
6072
-
6073
- public function seopress_advanced_appearance_useful_links_callback()
6074
- {
6075
- $options = get_option( 'seopress_advanced_option_name' );
6076
-
6077
- $check = isset($options['seopress_advanced_appearance_useful_links']);
6078
-
6079
- echo '<input id="seopress_advanced_appearance_useful_links" name="seopress_advanced_option_name[seopress_advanced_appearance_useful_links]" type="checkbox"';
6080
- if ('1' == $check) echo 'checked="yes"';
6081
- echo ' value="1"/>';
6082
-
6083
- echo '<label for="seopress_advanced_appearance_useful_links">'. __( 'Hide Useful Links in SEOPress dashboard page', 'wp-seopress' ) .'</label>';
6084
-
6085
- if (isset($this->options['seopress_advanced_appearance_useful_links'])) {
6086
- esc_attr( $this->options['seopress_advanced_appearance_useful_links']);
6087
- }
6088
- }
6089
-
6090
- public function seopress_advanced_appearance_title_col_callback()
6091
- {
6092
- $options = get_option( 'seopress_advanced_option_name' );
6093
-
6094
- $check = isset($options['seopress_advanced_appearance_title_col']);
6095
-
6096
- echo '<input id="seopress_advanced_appearance_title_col" name="seopress_advanced_option_name[seopress_advanced_appearance_title_col]" type="checkbox"';
6097
- if ('1' == $check) echo 'checked="yes"';
6098
- echo ' value="1"/>';
6099
-
6100
- echo '<label for="seopress_advanced_appearance_title_col">'. __( 'Add title column', 'wp-seopress' ) .'</label>';
6101
-
6102
- if (isset($this->options['seopress_advanced_appearance_title_col'])) {
6103
- esc_attr( $this->options['seopress_advanced_appearance_title_col']);
6104
- }
6105
- }
6106
-
6107
- public function seopress_advanced_appearance_meta_desc_col_callback()
6108
- {
6109
- $options = get_option( 'seopress_advanced_option_name' );
6110
-
6111
- $check = isset($options['seopress_advanced_appearance_meta_desc_col']);
6112
-
6113
- echo '<input id="seopress_advanced_appearance_meta_desc_col" name="seopress_advanced_option_name[seopress_advanced_appearance_meta_desc_col]" type="checkbox"';
6114
- if ('1' == $check) echo 'checked="yes"';
6115
- echo ' value="1"/>';
6116
-
6117
- echo '<label for="seopress_advanced_appearance_meta_desc_col">'. __( 'Add meta description column', 'wp-seopress' ) .'</label>';
6118
-
6119
- if (isset($this->options['seopress_advanced_appearance_meta_desc_col'])) {
6120
- esc_attr( $this->options['seopress_advanced_appearance_meta_desc_col']);
6121
- }
6122
- }
6123
-
6124
- public function seopress_advanced_appearance_redirect_enable_col_callback()
6125
- {
6126
- $options = get_option( 'seopress_advanced_option_name' );
6127
-
6128
- $check = isset($options['seopress_advanced_appearance_redirect_enable_col']);
6129
-
6130
- echo '<input id="seopress_advanced_appearance_redirect_enable_col" name="seopress_advanced_option_name[seopress_advanced_appearance_redirect_enable_col]" type="checkbox"';
6131
- if ('1' == $check) echo 'checked="yes"';
6132
- echo ' value="1"/>';
6133
-
6134
- echo '<label for="seopress_advanced_appearance_redirect_enable_col">'. __( 'Add redirection enable column', 'wp-seopress' ) .'</label>';
6135
-
6136
- if (isset($this->options['seopress_advanced_appearance_redirect_enable_col'])) {
6137
- esc_attr( $this->options['seopress_advanced_appearance_redirect_enable_col']);
6138
- }
6139
- }
6140
-
6141
- public function seopress_advanced_appearance_redirect_url_col_callback()
6142
- {
6143
- $options = get_option( 'seopress_advanced_option_name' );
6144
-
6145
- $check = isset($options['seopress_advanced_appearance_redirect_url_col']);
6146
-
6147
- echo '<input id="seopress_advanced_appearance_redirect_url_col" name="seopress_advanced_option_name[seopress_advanced_appearance_redirect_url_col]" type="checkbox"';
6148
- if ('1' == $check) echo 'checked="yes"';
6149
- echo ' value="1"/>';
6150
-
6151
- echo '<label for="seopress_advanced_appearance_redirect_url_col">'. __( 'Add redirection URL column', 'wp-seopress' ) .'</label>';
6152
-
6153
- if (isset($this->options['seopress_advanced_appearance_redirect_url_col'])) {
6154
- esc_attr( $this->options['seopress_advanced_appearance_redirect_url_col']);
6155
- }
6156
- }
6157
-
6158
- public function seopress_advanced_appearance_canonical_callback()
6159
- {
6160
- $options = get_option( 'seopress_advanced_option_name' );
6161
-
6162
- $check = isset($options['seopress_advanced_appearance_canonical']);
6163
-
6164
- echo '<input id="seopress_advanced_appearance_canonical" name="seopress_advanced_option_name[seopress_advanced_appearance_canonical]" type="checkbox"';
6165
- if ('1' == $check) echo 'checked="yes"';
6166
- echo ' value="1"/>';
6167
-
6168
- echo '<label for="seopress_advanced_appearance_canonical">'. __( 'Add canonical URL column', 'wp-seopress' ) .'</label>';
6169
-
6170
- if (isset($this->options['seopress_advanced_appearance_canonical'])) {
6171
- esc_attr( $this->options['seopress_advanced_appearance_canonical']);
6172
- }
6173
- }
6174
-
6175
- public function seopress_advanced_appearance_target_kw_col_callback()
6176
- {
6177
- $options = get_option( 'seopress_advanced_option_name' );
6178
-
6179
- $check = isset($options['seopress_advanced_appearance_target_kw_col']);
6180
-
6181
- echo '<input id="seopress_advanced_appearance_target_kw_col" name="seopress_advanced_option_name[seopress_advanced_appearance_target_kw_col]" type="checkbox"';
6182
- if ('1' == $check) echo 'checked="yes"';
6183
- echo ' value="1"/>';
6184
-
6185
- echo '<label for="seopress_advanced_appearance_target_kw_col">'. __( 'Add target keyword column', 'wp-seopress' ) .'</label>';
6186
-
6187
- if (isset($this->options['seopress_advanced_appearance_target_kw_col'])) {
6188
- esc_attr( $this->options['seopress_advanced_appearance_target_kw_col']);
6189
- }
6190
- }
6191
-
6192
- public function seopress_advanced_appearance_noindex_col_callback()
6193
- {
6194
- $options = get_option( 'seopress_advanced_option_name' );
6195
-
6196
- $check = isset($options['seopress_advanced_appearance_noindex_col']);
6197
-
6198
- echo '<input id="seopress_advanced_appearance_noindex_col" name="seopress_advanced_option_name[seopress_advanced_appearance_noindex_col]" type="checkbox"';
6199
- if ('1' == $check) echo 'checked="yes"';
6200
- echo ' value="1"/>';
6201
-
6202
- echo '<label for="seopress_advanced_appearance_noindex_col">'. __( 'Display noindex status', 'wp-seopress' ) .'</label>';
6203
-
6204
- if (isset($this->options['seopress_advanced_appearance_noindex_col'])) {
6205
- esc_attr( $this->options['seopress_advanced_appearance_noindex_col']);
6206
- }
6207
- }
6208
-
6209
- public function seopress_advanced_appearance_nofollow_col_callback()
6210
- {
6211
- $options = get_option( 'seopress_advanced_option_name' );
6212
-
6213
- $check = isset($options['seopress_advanced_appearance_nofollow_col']);
6214
-
6215
- echo '<input id="seopress_advanced_appearance_nofollow_col" name="seopress_advanced_option_name[seopress_advanced_appearance_nofollow_col]" type="checkbox"';
6216
- if ('1' == $check) echo 'checked="yes"';
6217
- echo ' value="1"/>';
6218
-
6219
- echo '<label for="seopress_advanced_appearance_nofollow_col">'. __( 'Display nofollow status', 'wp-seopress' ) .'</label>';
6220
-
6221
- if (isset($this->options['seopress_advanced_appearance_nofollow_col'])) {
6222
- esc_attr( $this->options['seopress_advanced_appearance_nofollow_col']);
6223
- }
6224
- }
6225
-
6226
- public function seopress_advanced_appearance_words_col_callback()
6227
- {
6228
- $options = get_option( 'seopress_advanced_option_name' );
6229
-
6230
- $check = isset($options['seopress_advanced_appearance_words_col']);
6231
-
6232
- echo '<input id="seopress_advanced_appearance_words_col" name="seopress_advanced_option_name[seopress_advanced_appearance_words_col]" type="checkbox"';
6233
- if ('1' == $check) echo 'checked="yes"';
6234
- echo ' value="1"/>';
6235
-
6236
- echo '<label for="seopress_advanced_appearance_words_col">'. __( 'Display total number of words in content', 'wp-seopress' ) .'</label>';
6237
-
6238
- if (isset($this->options['seopress_advanced_appearance_words_col'])) {
6239
- esc_attr( $this->options['seopress_advanced_appearance_words_col']);
6240
- }
6241
- }
6242
-
6243
- public function seopress_advanced_appearance_w3c_col_callback()
6244
- {
6245
- $options = get_option( 'seopress_advanced_option_name' );
6246
-
6247
- $check = isset($options['seopress_advanced_appearance_w3c_col']);
6248
-
6249
- echo '<input id="seopress_advanced_appearance_w3c_col" name="seopress_advanced_option_name[seopress_advanced_appearance_w3c_col]" type="checkbox"';
6250
- if ('1' == $check) echo 'checked="yes"';
6251
- echo ' value="1"/>';
6252
-
6253
- echo '<label for="seopress_advanced_appearance_w3c_col">'. __( 'Display W3C column to check code quality', 'wp-seopress' ) .'</label>';
6254
-
6255
- if (isset($this->options['seopress_advanced_appearance_w3c_col'])) {
6256
- esc_attr( $this->options['seopress_advanced_appearance_w3c_col']);
6257
- }
6258
- }
6259
-
6260
- public function seopress_advanced_appearance_ps_col_callback()
6261
- {
6262
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
6263
- $options = get_option( 'seopress_advanced_option_name' );
6264
-
6265
- $check = isset($options['seopress_advanced_appearance_ps_col']);
6266
-
6267
- echo '<input id="seopress_advanced_appearance_ps_col" name="seopress_advanced_option_name[seopress_advanced_appearance_ps_col]" type="checkbox"';
6268
- if ('1' == $check) echo 'checked="yes"';
6269
- echo ' value="1"/>';
6270
-
6271
- echo '<label for="seopress_advanced_appearance_ps_col">'. __( 'Display Page Speed column to check performances', 'wp-seopress' ) .'</label>';
6272
-
6273
- if (isset($this->options['seopress_advanced_appearance_ps_col'])) {
6274
- esc_attr( $this->options['seopress_advanced_appearance_ps_col']);
6275
- }
6276
- }
6277
- }
6278
-
6279
- public function seopress_advanced_appearance_score_col_callback()
6280
- {
6281
- if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
6282
- $options = get_option( 'seopress_advanced_option_name' );
6283
-
6284
- $check = isset($options['seopress_advanced_appearance_score_col']);
6285
-
6286
- echo '<input id="seopress_advanced_appearance_score_col" name="seopress_advanced_option_name[seopress_advanced_appearance_score_col]" type="checkbox"';
6287
- if ('1' == $check) echo 'checked="yes"';
6288
- echo ' value="1"/>';
6289
-
6290
- echo '<label for="seopress_advanced_appearance_score_col">'. __( 'Display Content Analysis results column ("Good" or "Should be improved")', 'wp-seopress' ) .'</label>';
6291
-
6292
- if (isset($this->options['seopress_advanced_appearance_score_col'])) {
6293
- esc_attr( $this->options['seopress_advanced_appearance_score_col']);
6294
- }
6295
- }
6296
- }
6297
-
6298
- public function seopress_advanced_appearance_genesis_seo_metaboxe_callback()
6299
- {
6300
- $options = get_option( 'seopress_advanced_option_name' );
6301
-
6302
- $check = isset($options['seopress_advanced_appearance_genesis_seo_metaboxe']);
6303
-
6304
- echo '<input id="seopress_advanced_appearance_genesis_seo_metaboxe" name="seopress_advanced_option_name[seopress_advanced_appearance_genesis_seo_metaboxe]" type="checkbox"';
6305
- if ('1' == $check) echo 'checked="yes"';
6306
- echo ' value="1"/>';
6307
-
6308
- echo '<label for="seopress_advanced_appearance_genesis_seo_metaboxe">'. __( 'Remove Genesis SEO Metabox', 'wp-seopress' ) .'</label>';
6309
-
6310
- if (isset($this->options['seopress_advanced_appearance_genesis_seo_metaboxe'])) {
6311
- esc_attr( $this->options['seopress_advanced_appearance_genesis_seo_metaboxe']);
6312
- }
6313
- }
6314
-
6315
- public function seopress_advanced_appearance_genesis_seo_menu_callback()
6316
- {
6317
- $options = get_option( 'seopress_advanced_option_name' );
6318
-
6319
- $check = isset($options['seopress_advanced_appearance_genesis_seo_menu']);
6320
-
6321
- echo '<input id="seopress_advanced_appearance_genesis_seo_menu" name="seopress_advanced_option_name[seopress_advanced_appearance_genesis_seo_menu]" type="checkbox"';
6322
- if ('1' == $check) echo 'checked="yes"';
6323
- echo ' value="1"/>';
6324
-
6325
- echo '<label for="seopress_advanced_appearance_genesis_seo_menu">'. __( 'Remove Genesis SEO link in WP Admin Menu', 'wp-seopress' ) .'</label>';
6326
-
6327
- if (isset($this->options['seopress_advanced_appearance_genesis_seo_menu'])) {
6328
- esc_attr( $this->options['seopress_advanced_appearance_genesis_seo_menu']);
6329
- }
6330
- }
6331
-
6332
- public function seopress_advanced_appearance_advice_schema_callback()
6333
- {
6334
- $options = get_option( 'seopress_advanced_option_name' );
6335
-
6336
- $check = isset($options['seopress_advanced_appearance_advice_schema']);
6337
-
6338
- echo '<input id="seopress_advanced_appearance_advice_schema" name="seopress_advanced_option_name[seopress_advanced_appearance_advice_schema]" type="checkbox"';
6339
- if ('1' == $check) echo 'checked="yes"';
6340
- echo ' value="1"/>';
6341
-
6342
- echo '<label for="seopress_advanced_appearance_advice_schema">'. __( 'Remove the advice if None schema selected', 'wp-seopress' ) .'</label>';
6343
-
6344
- if (isset($this->options['seopress_advanced_appearance_advice_schema'])) {
6345
- esc_attr( $this->options['seopress_advanced_appearance_advice_schema']);
6346
- }
6347
- }
6348
-
6349
- public function seopress_advanced_security_metaboxe_role_callback()
6350
- {
6351
- $options = get_option( 'seopress_advanced_option_name' );
6352
-
6353
- global $wp_roles;
6354
-
6355
- if ( ! isset( $wp_roles ) )
6356
- $wp_roles = new WP_Roles();
6357
-
6358
- foreach ($wp_roles->get_names() as $key => $value) {
6359
-
6360
- $check = isset($options['seopress_advanced_security_metaboxe_role'][$key]);
6361
-
6362
- echo '<input id="seopress_advanced_security_metaboxe_role_'.$key.'" name="seopress_advanced_option_name[seopress_advanced_security_metaboxe_role]['.$key.']" type="checkbox"';
6363
- if ('1' == $check) echo 'checked="yes"';
6364
- echo ' value="1"/>';
6365
-
6366
- echo '<label for="seopress_advanced_security_metaboxe_role_'.$key.'">'. $value .'</label><br/>';
6367
-
6368
- if (isset($this->options['seopress_advanced_security_metaboxe_role'][$key])) {
6369
- esc_attr( $this->options['seopress_advanced_security_metaboxe_role'][$key]);
6370
- }
6371
- }
6372
- if (function_exists('seopress_get_locale')) {
6373
- if (seopress_get_locale() =='fr') {
6374
- $seopress_docs_link['support']['security']['metaboxe_seo'] = 'https://www.seopress.org/fr/support/hooks/filtrer-lappel-de-la-metaboxe-seo-par-types-de-contenu/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6375
- } else {
6376
- $seopress_docs_link['support']['security']['metaboxe_seo'] = 'https://www.seopress.org/support/hooks/filter-seo-metaboxe-call-by-post-type/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6377
- }
6378
- }
6379
- ?>
6380
- <a href="<?php echo $seopress_docs_link['support']['security']['metaboxe_seo']; ?>" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text"><?php _e('Hook to filter structured data types metabox call by post type - new window','wp-seopress'); ?></span></a>
6381
- <?php
6382
- }
6383
-
6384
- public function seopress_advanced_security_metaboxe_ca_role_callback()
6385
- {
6386
- $options = get_option( 'seopress_advanced_option_name' );
6387
-
6388
- global $wp_roles;
6389
-
6390
- if ( ! isset( $wp_roles ) )
6391
- $wp_roles = new WP_Roles();
6392
-
6393
- foreach ($wp_roles->get_names() as $key => $value) {
6394
-
6395
- $check = isset($options['seopress_advanced_security_metaboxe_ca_role'][$key]);
6396
-
6397
- echo '<input id="seopress_advanced_security_metaboxe_ca_role_'.$key.'" name="seopress_advanced_option_name[seopress_advanced_security_metaboxe_ca_role]['.$key.']" type="checkbox"';
6398
- if ('1' == $check) echo 'checked="yes"';
6399
- echo ' value="1"/>';
6400
-
6401
- echo '<label for="seopress_advanced_security_metaboxe_ca_role_'.$key.'">'. $value .'</label><br/>';
6402
-
6403
- if (isset($this->options['seopress_advanced_security_metaboxe_ca_role'][$key])) {
6404
- esc_attr( $this->options['seopress_advanced_security_metaboxe_ca_role'][$key]);
6405
- }
6406
- }
6407
- if (function_exists('seopress_get_locale')) {
6408
- if (seopress_get_locale() =='fr') {
6409
- $seopress_docs_link['support']['security']['metaboxe_ca'] = 'https://www.seopress.org/fr/support/hooks/filtrer-lappel-de-la-metaboxe-danalyse-de-contenu-par-types-de-contenu/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6410
- } else {
6411
- $seopress_docs_link['support']['security']['metaboxe_ca'] = 'https://www.seopress.org/support/hooks/filter-content-analysis-metaboxe-call-by-post-type/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6412
- }
6413
- }
6414
- ?>
6415
- <a href="<?php echo $seopress_docs_link['support']['security']['metaboxe_ca']; ?>" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text"><?php _e('Hook to filter structured data types metabox call by post type - new window','wp-seopress'); ?></span></a>
6416
- <?php
6417
- }
6418
  }
6419
-
6420
  if( is_admin() )
6421
- $my_settings_page = new seopress_options();
4
 
5
  class seopress_options
6
  {
7
+ /**
8
+ * Holds the values to be used in the fields callbacks
9
+ */
10
+ private $options;
11
+
12
+ /**
13
+ * Start up
14
+ */
15
+ public function __construct() {
16
+ add_action( 'admin_menu', array( $this, 'add_plugin_page' ), 10 );
17
+ add_action( 'admin_init', array( $this, 'set_default_values' ), 10 );
18
+ add_action( 'admin_init', array( $this, 'page_init' ) );
19
+ }
20
+
21
+ public function activate() {
22
+ update_option($this->seopress_options, $this->data);
23
+ }
24
+
25
+ public function deactivate() {
26
+ delete_option($this->seopress_options);
27
+ }
28
+
29
+ public function set_default_values() {
30
+
31
+ //Enable features==========================================================================
32
+ $seopress_toggle_options = get_option('seopress_toggle');
33
+
34
+ $seopress_toggle_options['toggle-titles'] = '1';
35
+ $seopress_toggle_options['toggle-xml-sitemap'] = '1';
36
+ $seopress_toggle_options['toggle-social'] = '1';
37
+ $seopress_toggle_options['toggle-google-analytics'] = '1';
38
+ $seopress_toggle_options['toggle-advanced'] = '1';
39
+ if ( is_plugin_active( 'woocommerce/woocommerce.php' )) {
40
+ $seopress_toggle_options['toggle-woocommerce'] = '1';
41
+ }
42
+ $seopress_toggle_options['toggle-dublin-core'] = '1';
43
+ $seopress_toggle_options['toggle-local-business'] = '1';
44
+ $seopress_toggle_options['toggle-rich-snippets'] = '1';
45
+ $seopress_toggle_options['toggle-breadcrumbs'] = '1';
46
+ $seopress_toggle_options['toggle-robots'] = '1';
47
+ $seopress_toggle_options['toggle-404'] = '1';
48
+ $seopress_toggle_options['toggle-bot'] = '1';
49
+
50
+ add_option('seopress_toggle', $seopress_toggle_options);
51
+
52
+ //Titles & metas===========================================================================
53
+ $seopress_titles_options = get_option('seopress_titles_option_name');
54
+
55
+ //Site Title
56
+ $seopress_titles_options['seopress_titles_home_site_title'] = '%%sitetitle%%';
57
+
58
+ //Meta Description
59
+ $seopress_titles_options['seopress_titles_home_site_desc'] = '%%tagline%%';
60
+
61
+ //Post Types
62
+ if (function_exists('seopress_get_post_types') && !empty(seopress_get_post_types())) {
63
+ foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
64
+ $seopress_titles_options['seopress_titles_single_titles'][$seopress_cpt_key]['title'] = '%%post_title%% %%sep%% %%sitetitle%%';
65
+ $seopress_titles_options['seopress_titles_single_titles'][$seopress_cpt_key]['description'] = '%%post_excerpt%%';
66
+ }
67
+ }
68
+
69
+ //Taxonomies
70
+ if (function_exists('seopress_get_taxonomies') && !empty(seopress_get_taxonomies())) {
71
+ foreach (seopress_get_taxonomies() as $seopress_tax_key => $seopress_tax_value) {
72
+ //Title
73
+ if ($seopress_tax_key =='category') {
74
+ $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] = '%%_category_title%% %%current_pagination%% %%sep%% %%sitetitle%%';
75
+ } elseif ($seopress_tax_key =='post_tag') {
76
+ $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] = '%%tag_title%% %%current_pagination%% %%sep%% %%sitetitle%%';
77
+ } else {
78
+ $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] = '%%term_title%% %%current_pagination%% %%sep%% %%sitetitle%%';
79
+ }
80
+
81
+ //Desc
82
+ if ($seopress_tax_key =='category') {
83
+ $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] = '%%_category_description%%';
84
+ } elseif ($seopress_tax_key =='post_tag') {
85
+ $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] = '%%tag_description%%';
86
+ } else {
87
+ $seopress_titles_options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] = '%%term_description%%';
88
+ }
89
+ }
90
+ }
91
+
92
+ //Archives
93
+ if (function_exists('seopress_get_post_types') && !empty(seopress_get_post_types())) {
94
+ foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
95
+ $seopress_titles_options['seopress_titles_archive_titles'][$seopress_cpt_key]['title'] = '%%cpt_plural%% %%current_pagination%% %%sep%% %%sitetitle%%';
96
+ }
97
+ }
98
+
99
+ //Author
100
+ $seopress_titles_options['seopress_titles_archives_author_title'] = '%%post_author%% %%sep%% %%sitetitle%%';
101
+ $seopress_titles_options['seopress_titles_archives_author_noindex'] = '1';
102
+
103
+ //Date
104
+ $seopress_titles_options['seopress_titles_archives_date_title'] = '%%archive_date%% %%sep%% %%sitetitle%%';
105
+ $seopress_titles_options['seopress_titles_archives_date_noindex'] = '1';
106
+
107
+ //Search
108
+ $seopress_titles_options['seopress_titles_archives_search_title'] = '%%search_keywords%% %%sep%% %%sitetitle%%';
109
+
110
+ //404
111
+ $seopress_titles_options['seopress_titles_archives_404_title'] = __('404 - Page not found','wp-seopress').' %%sep%% %%sitetitle%%';
112
+
113
+ //Link rel prev/next
114
+ $seopress_titles_options['seopress_titles_paged_rel'] = '1';
115
+
116
+ add_option('seopress_titles_option_name', $seopress_titles_options);
117
+
118
+ //XML Sitemap==============================================================================
119
+ $seopress_xml_sitemap_options = get_option('seopress_xml_sitemap_option_name');
120
+
121
+ $seopress_xml_sitemap_options['seopress_xml_sitemap_general_enable'] = '1';
122
+ $seopress_xml_sitemap_options['seopress_xml_sitemap_img_enable'] = '1';
123
 
124
+ global $wp_post_types;
125
+
126
+ $args = array(
127
+ 'show_ui' => true,
128
+ );
129
+
130
+ $output = 'objects'; // names or objects, note names is the default
131
+ $operator = 'and'; // 'and' or 'or'
132
+
133
+ $post_types = get_post_types( $args, $output, $operator );
134
+
135
+ foreach ($post_types as $seopress_cpt_key => $seopress_cpt_value) {
136
+ if ($seopress_cpt_key =='post' || $seopress_cpt_key =='page' || $seopress_cpt_key =='product') {
137
+ $seopress_xml_sitemap_options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include'] = '1';
138
+ }
139
+ }
140
+
141
+ $args = array(
142
+ 'show_ui' => true,
143
+ 'public' => true,
144
+
145
+ );
146
+ $output = 'objects'; // or objects
147
+ $operator = 'and'; // 'and' or 'or'
148
+ $taxonomies = get_taxonomies( $args, $output, $operator );
149
+
150
+ foreach ($taxonomies as $seopress_tax_key => $seopress_tax_value) {
151
+ if ($seopress_tax_key =='category' || $seopress_tax_key =='post_tag') {
152
+ $seopress_xml_sitemap_options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include'] = '1';
153
+ }
154
+ }
155
+
156
+ add_option('seopress_xml_sitemap_option_name', $seopress_xml_sitemap_options);
157
+
158
+ //Social===================================================================================
159
+ $seopress_social_options = get_option('seopress_social_option_name');
160
+
161
+ $seopress_social_options['seopress_social_facebook_og'] = '1';
162
+ $seopress_social_options['seopress_social_twitter_card'] = '1';
163
+
164
+ add_option('seopress_social_option_name', $seopress_social_options);
165
+
166
+ //Advanced=================================================================================
167
+ $seopress_advanced_option_name = get_option('seopress_advanced_option_name');
168
+
169
+ $seopress_advanced_option_name['seopress_advanced_advanced_attachments'] = '1';
170
+ $seopress_advanced_option_name['seopress_advanced_advanced_tax_desc_editor'] = '1';
171
+ $seopress_advanced_option_name['seopress_advanced_appearance_title_col'] = '1';
172
+ $seopress_advanced_option_name['seopress_advanced_appearance_meta_desc_col'] = '1';
173
+
174
+ add_option('seopress_advanced_option_name', $seopress_advanced_option_name);
175
+ }
176
+
177
+ /**
178
+ * Add options page
179
+ */
180
+ public function add_plugin_page()
181
+ {
182
+ if (has_filter('seopress_seo_admin_menu')) {
183
+ $sp_seo_admin_menu['icon'] = '';
184
+ $sp_seo_admin_menu['icon'] = apply_filters('seopress_seo_admin_menu', $sp_seo_admin_menu['icon']);
185
+ } else {
186
+ $sp_seo_admin_menu['icon'] = 'dashicons-admin-seopress';
187
+ }
188
+
189
+ add_menu_page('SEOPress Option Page', __('SEO','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-option', array( $this, 'create_admin_page' ), $sp_seo_admin_menu['icon'], 90);
190
+ add_submenu_page('seopress-option', __('Dashboard','wp-seopress'), __('Dashboard','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-option', array( $this, 'create_admin_page' ));
191
+ $seopress_titles_help_tab = add_submenu_page('seopress-option', __('Titles & Metas','wp-seopress'), __('Titles & Metas','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-titles', array( $this, 'seopress_titles_page' ));
192
+ add_submenu_page('seopress-option', __('XML / Image / Video / HTML Sitemap','wp-seopress'), __('XML / HTML Sitemap','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-xml-sitemap', array( $this, 'seopress_xml_sitemap_page' ));
193
+ add_submenu_page('seopress-option', __('Social Networks','wp-seopress'), __('Social Networks','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-social', array( $this, 'seopress_social_page' ));
194
+ $seopress_google_analytics_help_tab = add_submenu_page('seopress-option', __('Analytics','wp-seopress'), __('Analytics','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-google-analytics', array( $this, 'seopress_google_analytics_page' ));
195
+ add_submenu_page('seopress-option', __('Advanced','wp-seopress'), __('Advanced','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-advanced', array( $this, 'seopress_advanced_page' ));
196
+ add_submenu_page('seopress-option', __('Tools','wp-seopress'), __('Tools','wp-seopress'), seopress_capability( 'manage_options', 'menu' ), 'seopress-import-export', array( $this,'seopress_import_export_page'));
197
+
198
+ function seopress_titles_help_tab() {
199
+ $screen = get_current_screen();
200
+
201
+ $seopress_titles_help_tab_content = '
202
+ <ul>
203
+ <li><span>'.__('%%sep%%','wp-seopress').'</span>'.__('Separator (eg: - )','wp-seopress').'</li>
204
+ <li><span>'.__('%%sitetitle%% (alias: %%sitename%%)','wp-seopress').'</span>'.__('Site Title','wp-seopress').'</li>
205
+ <li><span>'.__('%%tagline%% (alias %%sitedesc%%)','wp-seopress').'</span>'.__('Tagline','wp-seopress').'</li>
206
+ <li><span>'.__('%%post_title%% (alias %%title%%)','wp-seopress').'</span>'.__('Post Title (post, page, custom post type)','wp-seopress').'</li>
207
+ <li><span>'.__('%%post_excerpt%% (alias %%excerpt%%)','wp-seopress').'</span>'.__('Post excerpt','wp-seopress').'</li>
208
+ <li><span>'.__('%%post_content%%','wp-seopress').'</span>'.__('Post content / product long description','wp-seopress').'</li>
209
+ <li><span>'.__('%%post_thumbnail_url%%','wp-seopress').'</span>'.__('Post thumbnail URL','wp-seopress').'</li>
210
+ <li><span>'.__('%%post_date%% (alias %%date%%)','wp-seopress').'</span>'.__('Post date','wp-seopress').'</li>
211
+ <li><span>'.__('%%post_modified_date%%','wp-seopress').'</span>'.__('Last modified post date','wp-seopress').'</li>
212
+ <li><span>'.__('%%post_author%%','wp-seopress').'</span>'.__('Post author','wp-seopress').'</li>
213
+ <li><span>'.__('%%post_category%%','wp-seopress').'</span>'.__('Post category','wp-seopress').'</li>
214
+ <li><span>'.__('%%post_tag%%','wp-seopress').'</span>'.__('Post tag','wp-seopress').'</li>
215
+ <li><span>'.__('%%_category_title%%','wp-seopress').'</span>'.__('Category title','wp-seopress').'</li>
216
+ <li><span>'.__('%%_category_description%%','wp-seopress').'</span>'.__('Category description','wp-seopress').'</li>
217
+ <li><span>'.__('%%tag_title%%','wp-seopress').'</span>'.__('Tag title','wp-seopress').'</li>
218
+ <li><span>'.__('%%tag_description%%','wp-seopress').'</span>'.__('Tag description','wp-seopress').'</li>
219
+ <li><span>'.__('%%term_title%%','wp-seopress').'</span>'.__('Term title','wp-seopress').'</li>
220
+ <li><span>'.__('%%term_description%%','wp-seopress').'</span>'.__('Term description','wp-seopress').'</li>
221
+ <li><span>'.__('%%search_keywords%%','wp-seopress').'</span>'.__('Search keywords','wp-seopress').'</li>
222
+ <li><span>'.__('%%current_pagination%%','wp-seopress').'</span>'.__('Current number page','wp-seopress').'</li>
223
+ <li><span>'.__('%%page%%','wp-seopress').'</span>'.__('Current page number with context (i.e. page 1 of 3)','wp-seopress').'</li>
224
+ <li><span>'.__('%%cpt_plural%%','wp-seopress').'</span>'.__('Plural Post Type Archive name','wp-seopress').'</li>
225
+ <li><span>'.__('%%archive_title%%','wp-seopress').'</span>'.__('Archive title','wp-seopress').'</li>
226
+ <li><span>'.__('%%archive_date%%','wp-seopress').'</span>'.__('Date Archive','wp-seopress').'</li>
227
+ <li><span>'.__('%%archive_date_day%%','wp-seopress').'</span>'.__('Day Archive date','wp-seopress').'</li>
228
+ <li><span>'.__('%%archive_date_month%%','wp-seopress').'</span>'.__('Month Archive title','wp-seopress').'</li>
229
+ <li><span>'.__('%%archive_date_year%%','wp-seopress').'</span>'.__('Year Archive title','wp-seopress').'</li>
230
+ <li><span>'.__('%%_cf_your_custom_field_name%%','wp-seopress').'</span>'.__('Custom fields from post, page or post type (replace <span style="color:red;margin:0">your_custom_field_name</span> with your custom field name)','wp-seopress').'</li>
231
+ <li><span>'.__('%%_ct_your_custom_taxonomy_slug%%','wp-seopress').'</span>'.__('Custom term taxonomy from post, page or post type (replace <span style="color:red;margin:0">your_custom_taxonomy_slug</span> with your custom taxonomy slug)','wp-seopress').'</li>
232
+ <li><span>'.__('%%wc_single_cat%%','wp-seopress').'</span>'.__('Single product category','wp-seopress').'</li>
233
+ <li><span>'.__('%%wc_single_tag%%','wp-seopress').'</span>'.__('Single product tag','wp-seopress').'</li>
234
+ <li><span>'.__('%%wc_single_short_desc%%','wp-seopress').'</span>'.__('Single product short description','wp-seopress').'</li>
235
+ <li><span>'.__('%%wc_single_price%%','wp-seopress').'</span>'.__('Single product price','wp-seopress').'</li>
236
+ <li><span>'.__('%%wc_single_price_exc_tax%%','wp-seopress').'</span>'.__('Single product price taxes excluded','wp-seopress').'</li>
237
+ <li><span>'.__('%%wc_sku%%','wp-seopress').'</span>'.__('Single SKU product','wp-seopress').'</li>
238
+ <li><span>'.__('%%currentday%%','wp-seopress').'</span>'.__('Current day','wp-seopress').'</li>
239
+ <li><span>'.__('%%currentmonth%%','wp-seopress').'</span>'.__('Current month','wp-seopress').'</li>
240
+ <li><span>'.__('%%currentmonth_short%%','wp-seopress').'</span>'.__('Current month in 3 letters, eg: "Jan" for "January"','wp-seopress').'</li>
241
+ <li><span>'.__('%%currentyear%%','wp-seopress').'</span>'.__('Current year','wp-seopress').'</li>
242
+ <li><span>'.__('%%currentdate%%','wp-seopress').'</span>'.__('Current date','wp-seopress').'</li>
243
+ <li><span>'.__('%%currenttime%%','wp-seopress').'</span>'.__('Current time','wp-seopress').'</li>
244
+ <li><span>'.__('%%author_bio%%','wp-seopress').'</span>'.__('Author bio, meta desc only','wp-seopress').'</li>
245
+ </ul>
246
+ '.wp_oembed_get('https://www.youtube.com/watch?v=HEa8m9u4mOk', array('width'=>530));
247
+
248
+ $screen->add_help_tab( array(
249
+ 'id' => 'seopress_titles_help_tab',
250
+ 'title' => __('Templates variables'),
251
+ 'content' => $seopress_titles_help_tab_content,
252
+ ));
253
+
254
+ if (function_exists('seopress_get_locale')) {
255
+ if (seopress_get_locale() =='fr') {
256
+ $screen->set_help_sidebar(
257
+ '<ul>
258
+ <li><a href="https://www.seopress.org/fr/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Browse our guides","wp-seopress").'</a></li>
259
+ <li><a href="https://www.seopress.org/fr/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our FAQ","wp-seopress").'</a></li>
260
+ <li><a href="https://www.seopress.org/fr/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Check our website","wp-seopress").'</a></li>
261
+ </ul>'
262
+ );
263
+ } else {
264
+ $screen->set_help_sidebar(
265
+ '<ul>
266
+ <li><a href="https://www.seopress.org/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Browse our guides","wp-seopress").'</a></li>
267
+ <li><a href="https://www.seopress.org/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our FAQ","wp-seopress").'</a></li>
268
+ <li><a href="https://www.seopress.org/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Check our website","wp-seopress").'</a></li>
269
+ </ul>'
270
+ );
271
+ }
272
+ }
273
+ }
274
+ add_action('load-'.$seopress_titles_help_tab, 'seopress_titles_help_tab');
275
+
276
+ function seopress_google_analytics_help_tab() {
277
+ $screen = get_current_screen();
278
+
279
+ $seopress_google_analytics_help_tab_content = '
280
+ <p>'.__('Watch our video to learn how to connect your WordPress site with Google Analytics and get statistics right in your dashboard (PRO only).','wp-seopress').'</p>
281
+ '.wp_oembed_get('https://www.youtube.com/watch?v=NKvjb9Z571c', array('width'=>530));
282
+
283
+ $screen->add_help_tab( array(
284
+ 'id' => 'seopress_google_analytics_help_tab',
285
+ 'title' => __('How-to'),
286
+ 'content' => $seopress_google_analytics_help_tab_content,
287
+ ));
288
+
289
+ if (function_exists('seopress_get_locale')) {
290
+ if (seopress_get_locale() =='fr') {
291
+ $screen->set_help_sidebar(
292
+ '<ul>
293
+ <li><a href="https://www.seopress.org/fr/support/guides/connectez-site-wordpress-a-google-analytics/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our guide","wp-seopress").'</a></li>
294
+ </ul>'
295
+ );
296
+ } else {
297
+ $screen->set_help_sidebar(
298
+ '<ul>
299
+ <li><a href="https://www.seopress.org/support/guides/connect-wordpress-site-google-analytics/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">'.__("Read our guide","wp-seopress").'</a></li>
300
+ </ul>'
301
+ );
302
+ }
303
+ }
304
+ }
305
+ add_action('load-'.$seopress_google_analytics_help_tab, 'seopress_google_analytics_help_tab');
306
+ }
307
+
308
+
309
+ function seopress_titles_page(){
310
+ $this->options = get_option( 'seopress_titles_option_name' );
311
+ if (function_exists('seopress_admin_header')) {
312
+ echo seopress_admin_header();
313
+ }
314
+ ?>
315
+ <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
316
+ <?php
317
+ global $wp_version, $title;
318
+ $current_tab = '';
319
+ $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
320
+ echo '<'.$tag.'><span class="dashicons dashicons-editor-table"></span>'.$title;
321
+
322
+ if(seopress_get_toggle_option('titles')=='1') {
323
+ $seopress_get_toggle_titles_option = '"1"';
324
+ } else {
325
+ $seopress_get_toggle_titles_option = '"0"';
326
+ }
327
+ ?>
328
+
329
+ <input type="checkbox" name="toggle-titles" id="toggle-titles" class="toggle" data-toggle=<?php echo $seopress_get_toggle_titles_option; ?>>
330
+ <label for="toggle-titles"></label>
331
+
332
+ <?php
333
+ if(seopress_get_toggle_option('titles')=='1') {
334
+ echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
335
+ echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
336
+ } else {
337
+ echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
338
+ echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
339
+ }
340
+
341
+ echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
342
+
343
+ echo '</'.$tag.'>';
344
+
345
+ settings_fields( 'seopress_titles_option_group' );
346
+ ?>
347
+
348
+ <div id="seopress-tabs" class="wrap">
349
+ <?php
350
+
351
+ $plugin_settings_tabs = array(
352
+ 'tab_seopress_titles_home' => __( "Home", "wp-seopress" ),
353
+ 'tab_seopress_titles_single' => __( "Single Post Types", "wp-seopress" ),
354
+ 'tab_seopress_titles_archives' => __( "Archives", "wp-seopress" ),
355
+ 'tab_seopress_titles_tax' => __( "Taxonomies", "wp-seopress" ),
356
+ 'tab_seopress_titles_advanced' => __( "Advanced", "wp-seopress" ),
357
+ );
358
+
359
+ echo '<div class="nav-tab-wrapper">';
360
+ foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
361
+ echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-titles#tab=' . $tab_key . '">' . $tab_caption . '</a>';
362
+ }
363
+ echo '</div>';
364
+ ?>
365
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_home') { echo 'active'; } ?>" id="tab_seopress_titles_home"><?php do_settings_sections( 'seopress-settings-admin-titles-home' ); ?></div>
366
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_single') { echo 'active'; } ?>" id="tab_seopress_titles_single"><?php do_settings_sections( 'seopress-settings-admin-titles-single' ); ?></div>
367
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_archives') { echo 'active'; } ?>" id="tab_seopress_titles_archives"><?php do_settings_sections( 'seopress-settings-admin-titles-archives' ); ?></div>
368
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_tax') { echo 'active'; } ?>" id="tab_seopress_titles_tax"><?php do_settings_sections( 'seopress-settings-admin-titles-tax' ); ?></div>
369
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_titles_advanced') { echo 'active'; } ?>" id="tab_seopress_titles_advanced"><?php do_settings_sections( 'seopress-settings-admin-titles-advanced' ); ?></div>
370
+ </div>
371
+
372
+ <?php submit_button(); ?>
373
+ </form>
374
+ <?php
375
+ }
376
+
377
+ function seopress_xml_sitemap_page(){
378
+ $this->options = get_option( 'seopress_xml_sitemap_option_name' );
379
+ if (function_exists('seopress_admin_header')) {
380
+ echo seopress_admin_header();
381
+ }
382
+ ?>
383
+ <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option" name="seopress-flush">
384
+ <?php
385
+ global $wp_version, $title;
386
+ $current_tab = '';
387
+ $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
388
+ echo '<'.$tag.'><span class="dashicons dashicons-media-spreadsheet"></span>'.$title;
389
+
390
+ if(seopress_get_toggle_option('xml-sitemap')=='1') {
391
+ $seopress_get_toggle_xml_sitemap_option = '"1"';
392
+ } else {
393
+ $seopress_get_toggle_xml_sitemap_option = '"0"';
394
+ } ?>
395
+
396
+ <input type="checkbox" name="toggle-xml-sitemap" id="toggle-xml-sitemap" class="toggle" data-toggle=<?php echo $seopress_get_toggle_xml_sitemap_option; ?>>
397
+
398
+ <label for="toggle-xml-sitemap"></label>
399
+
400
+ <?php if(seopress_get_toggle_option('xml-sitemap')=='1') {
401
+ echo '<span id="xml-sitemap-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
402
+ echo '<span id="xml-sitemap-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
403
+ } else {
404
+ echo '<span id="xml-sitemap-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
405
+ echo '<span id="xml-sitemap-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
406
+ }
407
+
408
+ echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
409
+
410
+ echo '</'.$tag.'>';
411
+
412
+ settings_fields( 'seopress_xml_sitemap_option_group' );
413
+ ?>
414
+
415
+ <div id="seopress-tabs" class="wrap">
416
+ <?php
417
+
418
+ $plugin_settings_tabs = array(
419
+ 'tab_seopress_xml_sitemap_general' => __( "General", "wp-seopress" ),
420
+ 'tab_seopress_xml_sitemap_post_types' => __( "Post Types", "wp-seopress" ),
421
+ 'tab_seopress_xml_sitemap_taxonomies' => __( "Taxonomies", "wp-seopress" ),
422
+ 'tab_seopress_html_sitemap' => __( "HTML Sitemap", "wp-seopress" ),
423
+ );
424
+
425
+ echo '<div class="nav-tab-wrapper">';
426
+ foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
427
+ echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-xml-sitemap#tab=' . $tab_key . '">' . $tab_caption . '</a>';
428
+ }
429
+ echo '</div>';
430
+ ?>
431
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_xml_sitemap_general') { echo 'active'; } ?>" id="tab_seopress_xml_sitemap_general"><?php do_settings_sections( 'seopress-settings-admin-xml-sitemap-general' ); ?></div>
432
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_xml_sitemap_post_types') { echo 'active'; } ?>" id="tab_seopress_xml_sitemap_post_types"><?php do_settings_sections( 'seopress-settings-admin-xml-sitemap-post-types' ); ?></div>
433
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_xml_sitemap_taxonomies') { echo 'active'; } ?>" id="tab_seopress_xml_sitemap_taxonomies"><?php do_settings_sections( 'seopress-settings-admin-xml-sitemap-taxonomies' ); ?></div>
434
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_html_sitemap') { echo 'active'; } ?>" id="tab_seopress_html_sitemap"><?php do_settings_sections( 'seopress-settings-admin-html-sitemap' ); ?></div>
435
+ </div>
436
+ <?php submit_button(); ?>
437
+ </form>
438
+ <?php
439
+ }
440
+
441
+ function seopress_social_page(){
442
+ $this->options = get_option( 'seopress_social_option_name' );
443
+ if (function_exists('seopress_admin_header')) {
444
+ echo seopress_admin_header();
445
+ }
446
+ ?>
447
+ <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
448
+ <?php
449
+ global $wp_version, $title;
450
+ $current_tab = '';
451
+ $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
452
+ echo '<'.$tag.'><span class="dashicons dashicons-share"></span>'.$title;
453
+
454
+ if(seopress_get_toggle_option('social')=='1') {
455
+ $seopress_get_toggle_social_option = '"1"';
456
+ } else {
457
+ $seopress_get_toggle_social_option = '"0"';
458
+ }
459
+ ?>
460
+
461
+ <input type="checkbox" name="toggle-social" id="toggle-social" class="toggle" data-toggle=<?php echo $seopress_get_toggle_social_option; ?>>
462
+ <label for="toggle-social"></label>
463
+
464
+ <?php
465
+ if(seopress_get_toggle_option('social')=='1') {
466
+ echo '<span id="social-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
467
+ echo '<span id="social-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
468
+ } else {
469
+ echo '<span id="social-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
470
+ echo '<span id="social-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
471
+ }
472
+
473
+ echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
474
+
475
+ echo '</'.$tag.'>';
476
+
477
+ settings_fields( 'seopress_social_option_group' );
478
+ ?>
479
+
480
+ <div id="seopress-tabs" class="wrap">
481
+ <?php
482
+
483
+ $plugin_settings_tabs = array(
484
+ 'tab_seopress_social_knowledge' => __( "Knowledge Graph", "wp-seopress" ),
485
+ 'tab_seopress_social_accounts' => __( "Your social accounts", "wp-seopress" ),
486
+ 'tab_seopress_social_facebook' => __( "Facebook (Open Graph)", "wp-seopress" ),
487
+ 'tab_seopress_social_twitter' => __( "Twitter (Twitter card)", "wp-seopress" ),
488
+ );
489
+
490
+ echo '<div class="nav-tab-wrapper">';
491
+ foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
492
+ echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-social#tab=' . $tab_key . '">' . $tab_caption . '</a>';
493
+ }
494
+ echo '</div>';
495
+ ?>
496
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_knowledge') { echo 'active'; } ?>" id="tab_seopress_social_knowledge"><?php do_settings_sections( 'seopress-settings-admin-social-knowledge' ); ?></div>
497
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_accounts') { echo 'active'; } ?>" id="tab_seopress_social_accounts"><?php do_settings_sections( 'seopress-settings-admin-social-accounts' ); ?></div>
498
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_facebook') { echo 'active'; } ?>" id="tab_seopress_social_facebook"><?php do_settings_sections( 'seopress-settings-admin-social-facebook' ); ?></div>
499
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_social_twitter') { echo 'active'; } ?>" id="tab_seopress_social_twitter"><?php do_settings_sections( 'seopress-settings-admin-social-twitter' ); ?></div>
500
+ </div>
501
+
502
+ <?php submit_button(); ?>
503
+ </form>
504
+ <?php
505
+ }
506
+
507
+ function seopress_google_analytics_page(){
508
+ $this->options = get_option( 'seopress_google_analytics_option_name' );
509
+ if (function_exists('seopress_admin_header')) {
510
+ echo seopress_admin_header();
511
+ }
512
+ ?>
513
+ <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
514
+ <?php
515
+ global $wp_version, $title;
516
+ $current_tab = '';
517
+ $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
518
+ echo '<'.$tag.'><span class="dashicons dashicons-chart-area"></span>'.$title;
519
+
520
+ if(seopress_get_toggle_option('google-analytics')=='1') {
521
+ $seopress_get_toggle_google_analytics_option = '"1"';
522
+ } else {
523
+ $seopress_get_toggle_google_analytics_option = '"0"';
524
+ }
525
+ ?>
526
+
527
+ <input type="checkbox" name="toggle-google-analytics" id="toggle-google-analytics" class="toggle" data-toggle=<?php echo $seopress_get_toggle_google_analytics_option; ?>>
528
+
529
+ <label for="toggle-google-analytics"></label>
530
+
531
+ <?php
532
+ if(seopress_get_toggle_option('google-analytics')=='1') {
533
+ echo '<span id="google-analytics-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
534
+ echo '<span id="google-analytics-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
535
+ } else {
536
+ echo '<span id="google-analytics-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
537
+ echo '<span id="google-analytics-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
538
+ }
539
+
540
+ echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
541
+
542
+ echo '</'.$tag.'>';
543
+
544
+ settings_fields( 'seopress_google_analytics_option_group' );
545
+ ?>
546
+
547
+ <div id="seopress-tabs" class="wrap">
548
+ <?php
549
+
550
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
551
+ $plugin_settings_tabs = [
552
+ 'tab_seopress_google_analytics_enable' => __( "General", "wp-seopress" ),
553
+ 'tab_seopress_google_analytics_features' => __( "Tracking", "wp-seopress" ),
554
+ 'tab_seopress_google_analytics_events' => __( "Events", "wp-seopress" ),
555
+ 'tab_seopress_google_analytics_custom_dimensions' => __( "Custom Dimensions", "wp-seopress" ),
556
+ 'tab_seopress_google_analytics_dashboard' => __( "Stats in Dashboard", "wp-seopress" ),
557
+ 'tab_seopress_google_analytics_gdpr' => __( "Cookie bar / GDPR", "wp-seopress" ),
558
+ 'tab_seopress_google_analytics_matomo' => __( "Matomo", "wp-seopress" ),
559
+ ];
560
+ } else {
561
+ $plugin_settings_tabs = [
562
+ 'tab_seopress_google_analytics_enable' => __( "General", "wp-seopress" ),
563
+ 'tab_seopress_google_analytics_features' => __( "Tracking", "wp-seopress" ),
564
+ 'tab_seopress_google_analytics_events' => __( "Events", "wp-seopress" ),
565
+ 'tab_seopress_google_analytics_custom_dimensions' => __( "Custom Dimensions", "wp-seopress" ),
566
+ 'tab_seopress_google_analytics_gdpr' => __( "Cookie bar / GDPR", "wp-seopress" ),
567
+ 'tab_seopress_google_analytics_matomo' => __( "Matomo", "wp-seopress" ),
568
+ ];
569
+ }
570
+
571
+ echo '<div class="nav-tab-wrapper">';
572
+ foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
573
+ echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-google-analytics#tab=' . $tab_key . '">' . $tab_caption . '</a>';
574
+ }
575
+ echo '</div>';
576
+ ?>
577
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_enable') { echo 'active'; } ?>" id="tab_seopress_google_analytics_enable"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-enable' ); ?></div>
578
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_features') { echo 'active'; } ?>" id="tab_seopress_google_analytics_features"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-features' ); ?></div><div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_events') { echo 'active'; } ?>" id="tab_seopress_google_analytics_events"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-events' ); ?></div>
579
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_custom_dimensions') { echo 'active'; } ?>" id="tab_seopress_google_analytics_custom_dimensions"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-custom-dimensions' ); ?></div>
580
+ <?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
581
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_dashboard') { echo 'active'; } ?>" id="tab_seopress_google_analytics_dashboard"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-dashboard' ); ?></div>
582
+ <?php } ?>
583
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_gdpr') { echo 'active'; } ?>" id="tab_seopress_google_analytics_gdpr"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-gdpr' ); ?></div>
584
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_google_analytics_matomo') { echo 'active'; } ?>" id="tab_seopress_google_analytics_matomo"><?php do_settings_sections( 'seopress-settings-admin-google-analytics-matomo' ); ?></div>
585
+ </div>
586
+
587
+ <?php submit_button(); ?>
588
+ </form>
589
+ <?php
590
+ }
591
+
592
+ function seopress_advanced_page(){
593
+ $this->options = get_option( 'seopress_advanced_option_name' );
594
+ if (function_exists('seopress_admin_header')) {
595
+ echo seopress_admin_header();
596
+ }
597
+ ?>
598
+ <form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
599
+ <?php
600
+
601
+ global $wp_version, $title;
602
+ $current_tab = '';
603
+ $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
604
+ echo '<'.$tag.'><span class="dashicons dashicons-admin-tools"></span>'.$title;
605
+
606
+ if(seopress_get_toggle_option('advanced')=='1') {
607
+ $seopress_get_toggle_advanced_option = '"1"';
608
+ } else {
609
+ $seopress_get_toggle_advanced_option = '"0"';
610
+ }
611
+ ?>
612
+
613
+ <input type="checkbox" name="toggle-advanced" id="toggle-advanced" class="toggle" data-toggle=<?php echo $seopress_get_toggle_advanced_option; ?>>
614
+ <label for="toggle-advanced"></label>
615
+
616
+ <?php
617
+ if(seopress_get_toggle_option('advanced')=='1') {
618
+ echo '<span id="advanced-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
619
+ echo '<span id="advanced-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
620
+ } else {
621
+ echo '<span id="advanced-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to enable this feature','wp-seopress').'</span>';
622
+ echo '<span id="advanced-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to disable this feature','wp-seopress').'</span>';
623
+ }
624
+
625
+ echo '<div id="seopress-notice-save" style="display: none"><span class="dashicons dashicons-yes"></span><span class="html"></span></div>';
626
+
627
+ echo '</'.$tag.'>';
628
+
629
+ settings_fields( 'seopress_advanced_option_group' );
630
+ ?>
631
+
632
+ <div id="seopress-tabs" class="wrap">
633
+ <?php
634
+
635
+ $plugin_settings_tabs = array(
636
+ 'tab_seopress_advanced_advanced' => __( "Advanced", "wp-seopress" ),
637
+ 'tab_seopress_advanced_appearance' => __( "Appearance", "wp-seopress" ),
638
+ 'tab_seopress_advanced_security' => __( "Security", "wp-seopress" ),
639
+ );
640
+
641
+ echo '<div class="nav-tab-wrapper">';
642
+ foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
643
+ echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-advanced#tab=' . $tab_key . '">' . $tab_caption . '</a>';
644
+ }
645
+ echo '</div>';
646
+ ?>
647
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_advanced_advanced') { echo 'active'; } ?>" id="tab_seopress_advanced_advanced"><?php do_settings_sections( 'seopress-settings-admin-advanced-advanced' ); ?></div>
648
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_advanced_appearance') { echo 'active'; } ?>" id="tab_seopress_advanced_appearance"><?php do_settings_sections( 'seopress-settings-admin-advanced-appearance' ); ?></div>
649
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_advanced_security') { echo 'active'; } ?>" id="tab_seopress_advanced_security"><?php do_settings_sections( 'seopress-settings-admin-advanced-security' ); ?></div>
650
+ </div>
651
+
652
+ <?php submit_button(); ?>
653
+ </form>
654
+ <?php
655
+ }
656
+
657
+ function seopress_import_export_page(){
658
+ $this->options = get_option( 'seopress_import_export_option_name' );
659
+ if (function_exists('seopress_admin_header')) {
660
+ echo seopress_admin_header();
661
+ }
662
+ ?>
663
+ <div class="seopress-option">
664
+ <?php global $wp_version, $title;
665
+ $current_tab = '';
666
+ $tag = version_compare( $wp_version, '4.4' ) >= 0 ? 'h1' : 'h2';
667
+ echo '<'.$tag.'><span class="dashicons dashicons-admin-settings"></span>'.$title.'</'.$tag.'>';
668
+ ?>
669
+ <div id="seopress-tabs" class="wrap">
670
+ <?php
671
+ $plugin_settings_tabs = array(
672
+ 'tab_seopress_tool_data' => __( "Data", "wp-seopress" ),
673
+ 'tab_seopress_tool_settings' => __( "Settings", "wp-seopress" ),
674
+ 'tab_seopress_tool_plugins' => __( "Plugins", "wp-seopress" ),
675
+ 'tab_seopress_tool_redirects' => __( "Redirections", "wp-seopress" ),
676
+ 'tab_seopress_tool_reset' => __( "Reset", "wp-seopress" ),
677
+ );
678
+
679
+ if (!is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
680
+ unset($plugin_settings_tabs['tab_seopress_tool_data']);
681
+ unset($plugin_settings_tabs['tab_seopress_tool_redirects']);
682
+ }
683
+
684
+ echo '<div class="nav-tab-wrapper">';
685
+ foreach ( $plugin_settings_tabs as $tab_key => $tab_caption ) {
686
+ echo '<a id="'. $tab_key .'-tab" class="nav-tab" href="?page=seopress-import-export#tab=' . $tab_key . '">' . $tab_caption . '</a>';
687
+ }
688
+ echo '</div>';
689
+ ?>
690
+ <?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
691
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_data') { echo 'active'; } ?>" id="tab_seopress_tool_data">
692
+ <div class="postbox section-tool">
693
+ <div class="inside">
694
+ <h3><span><?php _e( 'Import data from a CSV', 'wp-seopress' ); ?></span></h3>
695
+ <p><?php _e( 'Import your title, meta description, meta robots, social metas from a CSV file with our import tool.', 'wp-seopress' ); ?></p>
696
+ <a class="button" href="<?php echo admin_url( 'admin.php?page=seopress_csv_importer' ); ?>"><?php _e('Run the importer','wp-seopress'); ?></a>
697
+ </div><!-- .inside -->
698
+ </div><!-- .postbox -->
699
+ <div id="metadata-migration-tool" class="postbox section-tool">
700
+ <div class="inside">
701
+ <h3><span><?php _e( 'Export metadata to a CSV', 'wp-seopress' ); ?></span></h3>
702
+ <p><?php _e( 'Export your SEOPress metadata for this site as a .csv file.', 'wp-seopress' ); ?></p>
703
+ <form method="post">
704
+ <p><input type="hidden" name="seopress_action" value="export_csv_metadata" /></p>
705
+ <p>
706
+ <?php wp_nonce_field( 'seopress_export_csv_metadata_nonce', 'seopress_export_csv_metadata_nonce' ); ?>
707
+ <button id="seopress-metadata-migrate" type="button" class="button"><?php _e('Export','wp-seopress'); ?></button>
708
+ <span class="spinner"></span>
709
+ <div class="log"></div>
710
+ </p>
711
+ </form>
712
+ </div><!-- .inside -->
713
+ </div><!-- .postbox -->
714
+ </div>
715
+ <?php } ?>
716
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_settings') { echo 'active'; } ?>" id="tab_seopress_tool_settings">
717
+ <div class="postbox section-tool">
718
+ <div class="inside">
719
+ <h3><span><?php _e( 'Export plugin settings', 'wp-seopress' ); ?></span></h3>
720
+ <p><?php _e( 'Export the plugin settings for this site as a .json file. This allows you to easily import the configuration into another site.', 'wp-seopress' ); ?></p>
721
+ <form method="post">
722
+ <p><input type="hidden" name="seopress_action" value="export_settings" /></p>
723
+ <p>
724
+ <?php wp_nonce_field( 'seopress_export_nonce', 'seopress_export_nonce' ); ?>
725
+ <?php submit_button( __( 'Export', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
726
+ </p>
727
+ </form>
728
+ </div><!-- .inside -->
729
+ </div><!-- .postbox -->
730
+
731
+ <div class="postbox section-tool">
732
+ <div class="inside">
733
+ <h3><span><?php _e( 'Import plugin settings', 'wp-seopress' ); ?></span></h3>
734
+ <p><?php _e( 'Import the plugin settings from a .json file. This file can be obtained by exporting the settings on another site using the form above.', 'wp-seopress' ); ?></p>
735
+ <form method="post" enctype="multipart/form-data">
736
+ <p>
737
+ <input type="file" name="import_file"/>
738
+ </p>
739
+ <p>
740
+ <input type="hidden" name="seopress_action" value="import_settings" />
741
+ <?php wp_nonce_field( 'seopress_import_nonce', 'seopress_import_nonce' ); ?>
742
+ <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
743
+ <?php if(!empty($_GET["success"]) && htmlspecialchars($_GET["success"]) =='true') {
744
+ echo '<div class="log">'.__('Import completed!','wp-seopress').'</div>';
745
+ }; ?>
746
+ </p>
747
+ </form>
748
+ </div><!-- .inside -->
749
+ </div><!-- .postbox -->
750
+ </div>
751
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_plugins') { echo 'active'; } ?>" id="tab_seopress_tool_plugins">
752
+ <div class="postbox section-tool">
753
+ <h3><span><?php _e('Import posts and terms metadata from','wp-seopress'); ?></span></h3>
754
+ <select id="select-wizard-import" name="select-wizard-import">
755
+ <option value="none"><?php _e('Select an option','wp-seopress'); ?></option>
756
+ <option value="yoast-migration-tool"><?php _e('Yoast SEO','wp-seopress'); ?></option>
757
+ <option value="aio-migration-tool"><?php _e('All In One SEO','wp-seopress'); ?></option>
758
+ <option value="seo-framework-migration-tool"><?php _e('The SEO Framework','wp-seopress'); ?></option>
759
+ <option value="rk-migration-tool"><?php _e('Rank Math','wp-seopress'); ?></option>
760
+ <option value="squirrly-migration-tool"><?php _e('Squirrly SEO','wp-seopress'); ?></option>
761
+ <option value="seo-ultimate-migration-tool"><?php _e('SEO Ultimate','wp-seopress'); ?></option>
762
+ <option value="wp-meta-seo-migration-tool"><?php _e('WP Meta SEO','wp-seopress'); ?></option>
763
+ <option value="premium-seo-pack-migration-tool"><?php _e('Premium SEO Pack','wp-seopress'); ?></option>
764
+ </select>
765
+ <br><br>
766
+ </div>
767
+ <!-- Yoast import tool -->
768
+ <div id="yoast-migration-tool" class="postbox section-tool">
769
+ <div class="inside">
770
+ <h3><span><?php _e( 'Import posts and terms metadata from Yoast', 'wp-seopress' ); ?></span></h3>
771
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
772
+ <ul>
773
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
774
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
775
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
776
+ <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
777
+ <li><?php _e('Meta Robots (noindex, nofollow...)','wp-seopress'); ?></li>
778
+ <li><?php _e('Canonical URL','wp-seopress'); ?></li>
779
+ <li><?php _e('Focus keywords','wp-seopress'); ?></li>
780
+ </ul>
781
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will delete / update all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any Yoast data.', 'wp-seopress' ); ?></p>
782
+ <button id="seopress-yoast-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
783
+ <span class="spinner"></span>
784
+ <div class="log"></div>
785
+ </div><!-- .inside -->
786
+ </div><!-- .postbox -->
787
+
788
+ <!-- All In One import tool -->
789
+ <div id="aio-migration-tool" class="postbox section-tool">
790
+ <div class="inside">
791
+ <h3><span><?php _e( 'Import posts and terms metadata from All In One SEO', 'wp-seopress' ); ?></span></h3>
792
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
793
+ <ul>
794
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
795
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
796
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
797
+ <li><?php _e('Twitter image thumbnail','wp-seopress'); ?></li>
798
+ <li><?php _e('Meta Robots (noindex, nofollow)','wp-seopress'); ?></li>
799
+ </ul>
800
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update/delete all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any AIO data.', 'wp-seopress' ); ?></p>
801
+ <button id="seopress-aio-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
802
+ <span class="spinner"></span>
803
+ <div class="log"></div>
804
+ </div><!-- .inside -->
805
+ </div><!-- .postbox -->
806
+
807
+ <!-- SEO Framework import tool -->
808
+ <div id="seo-framework-migration-tool" class="postbox section-tool">
809
+ <div class="inside">
810
+ <h3><span><?php _e( 'Import posts and terms metadata from The SEO Framework', 'wp-seopress' ); ?></span></h3>
811
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
812
+ <ul>
813
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
814
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
815
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
816
+ <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
817
+ <li><?php _e('Meta Robots (noindex, nofollow, noarchive)','wp-seopress'); ?></li>
818
+ <li><?php _e('Canonical URL','wp-seopress'); ?></li>
819
+ <li><?php _e('Redirect URL','wp-seopress'); ?></li>
820
+ </ul>
821
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any SEO Framework data.', 'wp-seopress' ); ?></p>
822
+ <button id="seopress-seo-framework-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
823
+ <span class="spinner"></span>
824
+ <div class="log"></div>
825
+ </div><!-- .inside -->
826
+ </div><!-- .postbox -->
827
+
828
+ <!-- RK import tool -->
829
+ <div id="rk-migration-tool" class="postbox section-tool">
830
+ <div class="inside">
831
+ <h3><span><?php _e( 'Import posts and terms metadata from Rank Math', 'wp-seopress' ); ?></span></h3>
832
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
833
+ <ul>
834
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
835
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
836
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
837
+ <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
838
+ <li><?php _e('Meta Robots (noindex, nofollow, noarchive, noimageindex)','wp-seopress'); ?></li>
839
+ <li><?php _e('Canonical URL','wp-seopress'); ?></li>
840
+ <li><?php _e('Focus keywords','wp-seopress'); ?></li>
841
+ </ul>
842
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts and terms metadata. Some dynamic variables will not be interpreted. We do NOT delete any Rank Math data.', 'wp-seopress' ); ?></p>
843
+ <button id="seopress-rk-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
844
+ <span class="spinner"></span>
845
+ <div class="log"></div>
846
+ </div><!-- .inside -->
847
+ </div><!-- .postbox -->
848
+
849
+ <!-- Squirrly import tool -->
850
+ <div id="squirrly-migration-tool" class="postbox section-tool">
851
+ <div class="inside">
852
+ <h3><span><?php _e( 'Import posts metadata from Squirrly SEO', 'wp-seopress' ); ?></span></h3>
853
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
854
+ <ul>
855
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
856
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
857
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
858
+ <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
859
+ <li><?php _e('Meta Robots (noindex or nofollow)','wp-seopress'); ?></li>
860
+ <li><?php _e('Canonical URL','wp-seopress'); ?></li>
861
+ </ul>
862
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update/delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any Squirrly SEO data.', 'wp-seopress' ); ?></p>
863
+ <button id="seopress-squirrly-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
864
+ <span class="spinner"></span>
865
+ <div class="log"></div>
866
+ </div><!-- .inside -->
867
+ </div><!-- .postbox -->
868
+
869
+ <!-- SEO Ultimate import tool -->
870
+ <div id="seo-ultimate-migration-tool" class="postbox section-tool">
871
+ <div class="inside">
872
+ <h3><span><?php _e( 'Import posts metadata from SEO Ultimate', 'wp-seopress' ); ?></span></h3>
873
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
874
+ <ul>
875
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
876
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
877
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
878
+ <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
879
+ <li><?php _e('Meta Robots (noindex or nofollow)','wp-seopress'); ?></li>
880
+ </ul>
881
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any SEO Ultimate data.', 'wp-seopress' ); ?></p>
882
+ <button id="seopress-seo-ultimate-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
883
+ <span class="spinner"></span>
884
+ <div class="log"></div>
885
+ </div><!-- .inside -->
886
+ </div><!-- .postbox -->
887
+
888
+ <!-- WP Meta SEO import tool -->
889
+ <div id="wp-meta-seo-migration-tool" class="postbox section-tool">
890
+ <div class="inside">
891
+ <h3><span><?php _e( 'Import posts and terms metadata from WP Meta SEO', 'wp-seopress' ); ?></span></h3>
892
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
893
+ <ul>
894
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
895
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
896
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
897
+ <li><?php _e('Twitter tags (title, description and image thumbnail)','wp-seopress'); ?></li>
898
+ </ul>
899
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any WP Meta SEO data.', 'wp-seopress' ); ?></p>
900
+ <button id="seopress-wp-meta-seo-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
901
+ <span class="spinner"></span>
902
+ <div class="log"></div>
903
+ </div><!-- .inside -->
904
+ </div><!-- .postbox -->
905
+
906
+ <!-- Premium SEO Pack import tool -->
907
+ <div id="premium-seo-pack-migration-tool" class="postbox section-tool">
908
+ <div class="inside">
909
+ <h3><span><?php _e( 'Import posts and terms metadata from Premium SEO Pack', 'wp-seopress' ); ?></span></h3>
910
+ <p><?php _e( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ); ?></p>
911
+ <ul>
912
+ <li><?php _e('Title tags','wp-seopress'); ?></li>
913
+ <li><?php _e('Meta description','wp-seopress'); ?></li>
914
+ <li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)','wp-seopress'); ?></li>
915
+ <li><?php _e('Meta Robots (noindex, nofollow)','wp-seopress'); ?></li>
916
+ <li><?php _e('Canonical URL','wp-seopress'); ?></li>
917
+ <li><?php _e('Focus keywords','wp-seopress'); ?></li>
918
+ </ul>
919
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Migration will update / delete all SEOPress posts metadata. Some dynamic variables will not be interpreted. We do NOT delete any Premium SEO Pack data.', 'wp-seopress' ); ?></p>
920
+ <button id="seopress-premium-seo-pack-migrate" type="button" class="button"><?php _e('Migrate now','wp-seopress'); ?></button>
921
+ <span class="spinner"></span>
922
+ <div class="log"></div>
923
+ </div><!-- .inside -->
924
+ </div><!-- .postbox -->
925
+ </div>
926
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_redirects') { echo 'active'; } ?>" id="tab_seopress_tool_redirects">
927
+ <?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
928
+ <?php if(seopress_get_toggle_option('404')=='1') { ?>
929
+ <div class="postbox section-tool">
930
+ <h3><span><?php _e('Import your redirections','wp-seopress'); ?></span></h3>
931
+ <select id="select-wizard-redirects" name="select-wizard-redirects">
932
+ <option value="none"><?php _e('Select an option','wp-seopress'); ?></option>
933
+ <option value="section-import-redirects"><?php _e('CSV file (must match the template)','wp-seopress'); ?></option>
934
+ <option value="section-import-redirects-plugin"><?php _e('Redirections plugin (JSON - WordPress Redirects)','wp-seopress'); ?></option>
935
+ <option value="section-import-yoast-redirects"><?php _e('Yoast Premium plugin (CSV)','wp-seopress'); ?></option>
936
+ <option value="section-import-rk-redirects"><?php _e('Rank Math plugin (TXT)','wp-seopress'); ?></option>
937
+ </select>
938
+ <br><br>
939
+ </div>
940
+ <div id="section-import-redirects" class="postbox section-tool">
941
+ <div class="inside">
942
+ <h3><span><?php _e( 'Import Redirections', 'wp-seopress' ); ?></span></h3>
943
+ <p><?php _e( 'Import your own redirections from a .csv file (separator ";"). You must have 6 columns in this order:','wp-seopress'); ?>
944
+ <ul>
945
+ <li><?php _e( 'URL to match (without your domain name)', 'wp-seopress'); ?></li>
946
+ <li><?php _e( 'URL to redirect in absolute,','wp-seopress'); ?></li>
947
+ <li><?php _e( 'type of redirection (301, 302 or 307),','wp-seopress'); ?></li>
948
+ <li><?php _e( 'Yes to enable the redirect (leave it empty to disable the redirect)','wp-seopress'); ?></li>
949
+ <li><?php _e( 'the query parameter without the quotes ("exact_match" = Exact match with all parameters, "without_param" = Exclude all parameters or "with_ignored_param" = Exclude all parameters and pass them to the redirection),', 'wp-seopress' ); ?>
950
+ <li><?php _e( 'and, the last parameter, the counter (optional).','wp-seopress'); ?></li>
951
+ </ul>
952
+ </p>
953
+ <p>
954
+ <a href="https://www.seopress.org/wp-content/uploads/csv/seopress-redirections-example.csv" target="_blank">
955
+ <?php _e('Download a CSV example','wp-seopress'); ?>
956
+ </a>
957
+ </p>
958
+ <form method="post" enctype="multipart/form-data">
959
+ <p>
960
+ <input id="import_sep_comma" name="import_sep" type="radio" value="comma"/>
961
+ <label for="import_sep_comma"><?php _e( 'Comma separator: "<strong>,</strong>"', 'wp-seopress' ); ?></label>
962
+ </p>
963
+ <p>
964
+ <input id="import_sep_semicolon" name="import_sep" type="radio" value="semicolon"/>
965
+ <label for="import_sep_semicolon"><?php _e( 'Semicolon separator: "<strong>;</strong>"', 'wp-seopress' ); ?></label>
966
+ </p>
967
+ <p>
968
+ <input type="file" name="import_file"/>
969
+ </p>
970
+ <p>
971
+ <input type="hidden" name="seopress_action" value="import_redirections_settings" />
972
+ <?php wp_nonce_field( 'seopress_import_redirections_nonce', 'seopress_import_redirections_nonce' ); ?>
973
+ <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
974
+ </p>
975
+ </form>
976
+ </div><!-- .inside -->
977
+ </div><!-- .postbox -->
978
+ <div id="section-import-redirects-plugin" class="postbox section-tool">
979
+ <div class="inside">
980
+ <h3><span><?php _e( 'Import Redirections from the Redirections plugin', 'wp-seopress' ); ?></span></h3>
981
+ <p><?php _e( 'Import your own redirections from a .json file generated by the Redirections plugin (make sure to select <strong>"WordPress redirects"</strong> when you export your file). Note that we do not support certain options, like regex. To avoid conflicts, make sure there are no duplicates between your file and existing redirects.', 'wp-seopress' ); ?></p>
982
+ <form method="post" enctype="multipart/form-data">
983
+ <p>
984
+ <input type="file" name="import_file"/>
985
+ </p>
986
+ <p>
987
+ <input type="hidden" name="seopress_action" value="import_redirections_plugin_settings" />
988
+ <?php wp_nonce_field( 'seopress_import_redirections_plugin_nonce', 'seopress_import_redirections_plugin_nonce' ); ?>
989
+ <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
990
+ </p>
991
+ </form>
992
+ </div><!-- .inside -->
993
+ </div><!-- .postbox -->
994
+ <div id="section-import-yoast-redirects" class="postbox section-tool">
995
+ <div class="inside">
996
+ <h3><span><?php _e( 'Import Redirections from Yoast Premium', 'wp-seopress' ); ?></span></h3>
997
+ <p><?php _e( 'Import your own redirections from a .csv file generated by Yoast Premium. Note that we don\'t support certain options, like regex. To avoid conflicts, make sure there are no duplicates between your file and existing redirects.', 'wp-seopress' ); ?></p>
998
+ <form method="post" enctype="multipart/form-data">
999
+ <p>
1000
+ <input type="file" name="import_file"/>
1001
+ </p>
1002
+ <p>
1003
+ <input type="hidden" name="seopress_action" value="import_yoast_redirections" />
1004
+ <?php wp_nonce_field( 'seopress_import_yoast_redirections_nonce', 'seopress_import_yoast_redirections_nonce' ); ?>
1005
+ <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1006
+ </p>
1007
+ </form>
1008
+ </div><!-- .inside -->
1009
+ </div><!-- .postbox -->
1010
+ <div id="section-import-rk-redirects" class="postbox section-tool">
1011
+ <div class="inside">
1012
+ <h3><span><?php _e( 'Import Redirections from Rank Math', 'wp-seopress' ); ?></span></h3>
1013
+ <p><?php _e( 'Import your own redirections from a .txt file generated by Rank Math. Note that we don\'t support certain options, like regex. To avoid conflicts, make sure there are no duplicates between your file and existing redirects.', 'wp-seopress' ); ?></p>
1014
+ <form method="post" enctype="multipart/form-data">
1015
+ <p>
1016
+ <input type="file" name="import_file"/>
1017
+ </p>
1018
+ <p>
1019
+ <input type="hidden" name="seopress_action" value="import_rk_redirections" />
1020
+ <?php wp_nonce_field( 'seopress_import_rk_redirections_nonce', 'seopress_import_rk_redirections_nonce' ); ?>
1021
+ <?php submit_button( __( 'Import', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1022
+ </p>
1023
+ </form>
1024
+ </div><!-- .inside -->
1025
+ </div><!-- .postbox -->
1026
+ <div id="section-export-redirects" class="postbox section-tool">
1027
+ <div class="inside">
1028
+ <h3><span><?php _e( 'Export Redirections', 'wp-seopress' ); ?></span></h3>
1029
+ <p><?php _e( 'Export all redirections for this site as a .csv file. This allows you to easily import the redirections into another site, to Excel / Google Sheets...', 'wp-seopress' ); ?></p>
1030
+ <form method="post">
1031
+ <p><input type="hidden" name="seopress_action" value="export_redirections" /></p>
1032
+ <p>
1033
+ <?php wp_nonce_field( 'seopress_export_redirections_nonce', 'seopress_export_redirections_nonce' ); ?>
1034
+ <?php submit_button( __( 'Export', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1035
+ </p>
1036
+ </form>
1037
+ </div><!-- .inside -->
1038
+ </div><!-- .postbox -->
1039
+ <div id="section-clean-404" class="postbox section-tool">
1040
+ <div class="inside">
1041
+ <h3><span><?php _e( 'Clean your 404', 'wp-seopress' ); ?></span></h3>
1042
+ <p><?php _e( 'Delete all your 404 errors. We don‘t delete any redirects.', 'wp-seopress' ); ?></p>
1043
+ <p><?php echo sprintf(__( 'Make sure you have enabled 404 cleaning from SEO, PRO, <a href="%s">404/301</a> tab to be able to delete all your 404 errors.', 'wp-seopress' ), admin_url( 'admin.php?page=seopress-pro-page#tab=tab_seopress_404' )); ?></p>
1044
+ <p><?php
1045
+ if (function_exists('seopress_get_locale')) {
1046
+ if (seopress_get_locale() =='fr') {
1047
+ $seopress_docs_link['support']['redirects']['query'] = 'https://www.seopress.org/fr/support/guides/nettoyez-vos-erreurs-404-a-laide-dune-requete-mysql/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
1048
+ } else {
1049
+ $seopress_docs_link['support']['redirects']['query'] = 'https://www.seopress.org/support/guides/delete-your-404-errors-with-a-mysql-query/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
1050
+ }
1051
+ }
1052
+ echo sprintf(__('You can also use <span class="dashicons dashicons-external"></span><a href="%s" target="_blank">this MySQL query</a> if necessary.','wp-seopress'),$seopress_docs_link['support']['redirects']['query']); ?></p>
1053
+ <form method="post">
1054
+ <p><input type="hidden" name="seopress_action" value="clean_404" /></p>
1055
+ <p>
1056
+ <?php wp_nonce_field( 'seopress_clean_404_nonce', 'seopress_clean_404_nonce' ); ?>
1057
+ <?php submit_button( __( 'Delete all 404', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1058
+ </p>
1059
+ </form>
1060
+ </div><!-- .inside -->
1061
+ </div><!-- .postbox -->
1062
+ <?php } else { ?>
1063
+ <p><?php _e('Redirections feature is disabled. Please activate it from the PRO page.','wp-seopress'); ?></p>
1064
+ <a href="<?php echo admin_url( 'admin.php?page=seopress-pro-page' ); ?>"><?php _e('Activate Redirections','wp-seopress'); ?></a>
1065
+ <?php } ?>
1066
+ <?php } ?>
1067
+ </div>
1068
+ <div class="seopress-tab <?php if ($current_tab == 'tab_seopress_tool_reset') { echo 'active'; } ?>" id="tab_seopress_tool_reset">
1069
+ <div class="postbox section-tool">
1070
+ <div class="inside">
1071
+ <h3><span><?php _e( 'Reset All Notices From Notifications Center', 'wp-seopress' ); ?></span></h3>
1072
+ <p><?php _e( 'By clicking Reset Notices, all notices in the notifications center will be set to their initial status.', 'wp-seopress' ); ?></p>
1073
+ <form method="post" enctype="multipart/form-data">
1074
+ <p>
1075
+ <input type="hidden" name="seopress_action" value="reset_notices_settings" />
1076
+ <?php wp_nonce_field( 'seopress_reset_notices_nonce', 'seopress_reset_notices_nonce' ); ?>
1077
+ <?php submit_button( __( 'Reset notices', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1078
+ </p>
1079
+ </form>
1080
+ </div><!-- .inside -->
1081
+ </div><!-- .postbox -->
1082
+
1083
+ <div class="postbox section-tool">
1084
+ <div class="inside">
1085
+ <h3><span><?php _e( 'Reset All Settings', 'wp-seopress' ); ?></span></h3>
1086
+ <p style="color:red"><span class="dashicons dashicons-info"></span> <?php _e( '<strong>WARNING:</strong> Delete all options related to SEOPress in your database AND set settings to their default values.', 'wp-seopress' ); ?></p>
1087
+ <form method="post" enctype="multipart/form-data">
1088
+ <p>
1089
+ <input type="hidden" name="seopress_action" value="reset_settings" />
1090
+ <?php wp_nonce_field( 'seopress_reset_nonce', 'seopress_reset_nonce' ); ?>
1091
+ <?php submit_button( __( 'Reset settings', 'wp-seopress' ), 'secondary', 'submit', false ); ?>
1092
+ </p>
1093
+ </form>
1094
+ </div><!-- .inside -->
1095
+ </div><!-- .postbox -->
1096
+ </div>
1097
+ </div>
1098
+ </div>
1099
+ <?php
1100
+ }
1101
+
1102
+ /**
1103
+ * Options page callback
1104
+ */
1105
+ public function create_admin_page()
1106
+ {
1107
+ // Set class property
1108
+ $this->options = get_option( 'seopress_option_name' );
1109
+ $current_tab ='';
1110
+ if (function_exists('seopress_admin_header')) {
1111
+ echo seopress_admin_header();
1112
+ }
1113
+ ?>
1114
+ <div id="seopress-content">
1115
+ <!--Get started-->
1116
+ <?php
1117
+ function seopress_get_hidden_notices_get_started_option() {
1118
+ $seopress_get_hidden_notices_get_started_option = get_option("seopress_notices");
1119
+ if ( ! empty ( $seopress_get_hidden_notices_get_started_option ) ) {
1120
+ foreach ($seopress_get_hidden_notices_get_started_option as $key => $seopress_get_hidden_notices_get_started_value)
1121
+ $options[$key] = $seopress_get_hidden_notices_get_started_value;
1122
+ if (isset($seopress_get_hidden_notices_get_started_option['notice-get-started'])) {
1123
+ return $seopress_get_hidden_notices_get_started_option['notice-get-started'];
1124
+ }
1125
+ }
1126
+ }
1127
+ if(seopress_get_hidden_notices_get_started_option() !='1') {
1128
+ if (function_exists('seopress_get_toggle_white_label_option') && seopress_get_toggle_white_label_option() =='1') {
1129
+ //do nothing
1130
+ } else {
1131
+ include_once(dirname( __FILE__ ).'/admin-get-started.php');
1132
+ }
1133
+ }
1134
+ ?>
1135
+
1136
+ <!--Notifications Center-->
1137
+ <?php include_once(dirname( __FILE__ ).'/admin-notifications-center.php'); ?>
1138
+
1139
+ <!--Features list-->
1140
+ <?php include_once(dirname( __FILE__ ).'/admin-features-list.php'); ?>
1141
+ </div>
1142
+ <?php
1143
+ }
1144
+
1145
+ /**
1146
+ * Register and add settings
1147
+ */
1148
+ public function page_init()
1149
+ {
1150
+ register_setting(
1151
+ 'seopress_option_group', // Option group
1152
+ 'seopress_option_name', // Option name
1153
+ array( $this, 'sanitize' ) // Sanitize
1154
+ );
1155
+
1156
+ register_setting(
1157
+ 'seopress_titles_option_group', // Option group
1158
+ 'seopress_titles_option_name', // Option name
1159
+ array( $this, 'sanitize' ) // Sanitize
1160
+ );
1161
+
1162
+ register_setting(
1163
+ 'seopress_xml_sitemap_option_group', // Option group
1164
+ 'seopress_xml_sitemap_option_name', // Option name
1165
+ array( $this, 'sanitize' ) // Sanitize
1166
+ );
1167
+
1168
+ register_setting(
1169
+ 'seopress_social_option_group', // Option group
1170
+ 'seopress_social_option_name', // Option name
1171
+ array( $this, 'sanitize' ) // Sanitize
1172
+ );
1173
+
1174
+ register_setting(
1175
+ 'seopress_google_analytics_option_group', // Option group
1176
+ 'seopress_google_analytics_option_name', // Option name
1177
+ array( $this, 'sanitize' ) // Sanitize
1178
+ );
1179
+
1180
+ register_setting(
1181
+ 'seopress_advanced_option_group', // Option group
1182
+ 'seopress_advanced_option_name', // Option name
1183
+ array( $this, 'sanitize' ) // Sanitize
1184
+ );
1185
+
1186
+ register_setting(
1187
+ 'seopress_import_export_option_group', // Option group
1188
+ 'seopress_import_export_option_name', // Option name
1189
+ array( $this, 'sanitize' ) // Sanitize
1190
+ );
1191
+
1192
+ //Titles & metas SECTION===================================================================
1193
+ add_settings_section(
1194
+ 'seopress_setting_section_titles_home', // ID
1195
+ '',
1196
+ //__("Home","wp-seopress"), // Title
1197
+ array( $this, 'print_section_info_titles' ), // Callback
1198
+ 'seopress-settings-admin-titles-home' // Page
1199
+ );
1200
+
1201
+ add_settings_field(
1202
+ 'seopress_titles_sep', // ID
1203
+ __("Separator","wp-seopress"), // Title
1204
+ array( $this, 'seopress_titles_sep_callback' ), // Callback
1205
+ 'seopress-settings-admin-titles-home', // Page
1206
+ 'seopress_setting_section_titles_home' // Section
1207
+ );
1208
+
1209
+ add_settings_field(
1210
+ 'seopress_titles_home_site_title', // ID
1211
+ __("Site title","wp-seopress"), // Title
1212
+ array( $this, 'seopress_titles_home_site_title_callback' ), // Callback
1213
+ 'seopress-settings-admin-titles-home', // Page
1214
+ 'seopress_setting_section_titles_home' // Section
1215
+ );
1216
+
1217
+ add_settings_field(
1218
+ 'seopress_titles_home_site_desc', // ID
1219
+ __("Meta description","wp-seopress"), // Title
1220
+ array( $this, 'seopress_titles_home_site_desc_callback' ), // Callback
1221
+ 'seopress-settings-admin-titles-home', // Page
1222
+ 'seopress_setting_section_titles_home' // Section
1223
+ );
1224
+
1225
+ //Single Post Types SECTION================================================================
1226
+ add_settings_section(
1227
+ 'seopress_setting_section_titles_single', // ID
1228
+ '',
1229
+ //__("Single Post Types","wp-seopress"), // Title
1230
+ array( $this, 'print_section_info_single' ), // Callback
1231
+ 'seopress-settings-admin-titles-single' // Page
1232
+ );
1233
+
1234
+ add_settings_field(
1235
+ 'seopress_titles_single_titles', // ID
1236
+ '',
1237
+ array( $this, 'seopress_titles_single_titles_callback' ), // Callback
1238
+ 'seopress-settings-admin-titles-single', // Page
1239
+ 'seopress_setting_section_titles_single' // Section
1240
+ );
1241
+
1242
+ //Archives SECTION=========================================================================
1243
+ add_settings_section(
1244
+ 'seopress_setting_section_titles_archives', // ID
1245
+ '',
1246
+ //__("Archives","wp-seopress"), // Title
1247
+ array( $this, 'print_section_info_archives' ), // Callback
1248
+ 'seopress-settings-admin-titles-archives' // Page
1249
+ );
1250
+
1251
+ add_settings_field(
1252
+ 'seopress_titles_archives_titles', // ID
1253
+ '',
1254
+ array( $this, 'seopress_titles_archives_titles_callback' ), // Callback
1255
+ 'seopress-settings-admin-titles-archives', // Page
1256
+ 'seopress_setting_section_titles_archives' // Section
1257
+ );
1258
+
1259
+ add_settings_field(
1260
+ 'seopress_titles_archives_author_title', // ID
1261
+ '',
1262
+ //__('Title template','wp-seopress'),
1263
+ array( $this, 'seopress_titles_archives_author_title_callback' ), // Callback
1264
+ 'seopress-settings-admin-titles-archives', // Page
1265
+ 'seopress_setting_section_titles_archives' // Section
1266
+ );
1267
+
1268
+ add_settings_field(
1269
+ 'seopress_titles_archives_author_desc', // ID
1270
+ '',
1271
+ //__('Meta description template','wp-seopress'),
1272
+ array( $this, 'seopress_titles_archives_author_desc_callback' ), // Callback
1273
+ 'seopress-settings-admin-titles-archives', // Page
1274
+ 'seopress_setting_section_titles_archives' // Section
1275
+ );
1276
+
1277
+ add_settings_field(
1278
+ 'seopress_titles_archives_author_noindex', // ID
1279
+ '',
1280
+ //__("noindex","wp-seopress"), // Title
1281
+ array( $this, 'seopress_titles_archives_author_noindex_callback' ), // Callback
1282
+ 'seopress-settings-admin-titles-archives', // Page
1283
+ 'seopress_setting_section_titles_archives' // Section
1284
+ );
1285
+
1286
+ add_settings_field(
1287
+ 'seopress_titles_archives_author_disable', // ID
1288
+ '',
1289
+ //__("disable","wp-seopress"), // Title
1290
+ array( $this, 'seopress_titles_archives_author_disable_callback' ), // Callback
1291
+ 'seopress-settings-admin-titles-archives', // Page
1292
+ 'seopress_setting_section_titles_archives' // Section
1293
+ );
1294
+
1295
+ add_settings_field(
1296
+ 'seopress_titles_archives_date_title', // ID
1297
+ '',
1298
+ //__('Title template','wp-seopress'),
1299
+ array( $this, 'seopress_titles_archives_date_title_callback' ), // Callback
1300
+ 'seopress-settings-admin-titles-archives', // Page
1301
+ 'seopress_setting_section_titles_archives' // Section
1302
+ );
1303
+
1304
+ add_settings_field(
1305
+ 'seopress_titles_archives_date_desc', // ID
1306
+ '',
1307
+ //__('Meta description template','wp-seopress'),
1308
+ array( $this, 'seopress_titles_archives_date_desc_callback' ), // Callback
1309
+ 'seopress-settings-admin-titles-archives', // Page
1310
+ 'seopress_setting_section_titles_archives' // Section
1311
+ );
1312
+
1313
+ add_settings_field(
1314
+ 'seopress_titles_archives_date_noindex', // ID
1315
+ '',
1316
+ //__("noindex","wp-seopress"), // Title
1317
+ array( $this, 'seopress_titles_archives_date_noindex_callback' ), // Callback
1318
+ 'seopress-settings-admin-titles-archives', // Page
1319
+ 'seopress_setting_section_titles_archives' // Section
1320
+ );
1321
+
1322
+ add_settings_field(
1323
+ 'seopress_titles_archives_date_disable', // ID
1324
+ '',
1325
+ //__("disable","wp-seopress"), // Title
1326
+ array( $this, 'seopress_titles_archives_date_disable_callback' ), // Callback
1327
+ 'seopress-settings-admin-titles-archives', // Page
1328
+ 'seopress_setting_section_titles_archives' // Section
1329
+ );
1330
+
1331
+ add_settings_field(
1332
+ 'seopress_titles_archives_search_title', // ID
1333
+ '',
1334
+ //__('Title template','wp-seopress'),
1335
+ array( $this, 'seopress_titles_archives_search_title_callback' ), // Callback
1336
+ 'seopress-settings-admin-titles-archives', // Page
1337
+ 'seopress_setting_section_titles_archives' // Section
1338
+ );
1339
+
1340
+ add_settings_field(
1341
+ 'seopress_titles_archives_search_desc', // ID
1342
+ '',
1343
+ //__('Meta description template','wp-seopress'),
1344
+ array( $this, 'seopress_titles_archives_search_desc_callback' ), // Callback
1345
+ 'seopress-settings-admin-titles-archives', // Page
1346
+ 'seopress_setting_section_titles_archives' // Section
1347
+ );
1348
+
1349
+ add_settings_field(
1350
+ 'seopress_titles_archives_search_title_noindex', // ID
1351
+ '',
1352
+ //__('noindex','wp-seopress'),
1353
+ array( $this, 'seopress_titles_archives_search_title_noindex_callback' ), // Callback
1354
+ 'seopress-settings-admin-titles-archives', // Page
1355
+ 'seopress_setting_section_titles_archives' // Section
1356
+ );
1357
+
1358
+ add_settings_field(
1359
+ 'seopress_titles_archives_404_title', // ID
1360
+ '',
1361
+ //__('Title template','wp-seopress'),
1362
+ array( $this, 'seopress_titles_archives_404_title_callback' ), // Callback
1363
+ 'seopress-settings-admin-titles-archives', // Page
1364
+ 'seopress_setting_section_titles_archives' // Section
1365
+ );
1366
+
1367
+ add_settings_field(
1368
+ 'seopress_titles_archives_404_desc', // ID
1369
+ '',
1370
+ //__('Meta description template','wp-seopress'),
1371
+ array( $this, 'seopress_titles_archives_404_desc_callback' ), // Callback
1372
+ 'seopress-settings-admin-titles-archives', // Page
1373
+ 'seopress_setting_section_titles_archives' // Section
1374
+ );
1375
+
1376
+ //Taxonomies SECTION=======================================================================
1377
+ add_settings_section(
1378
+ 'seopress_setting_section_titles_tax', // ID
1379
+ '',
1380
+ //__("Taxonomies","wp-seopress"), // Title
1381
+ array( $this, 'print_section_info_tax' ), // Callback
1382
+ 'seopress-settings-admin-titles-tax' // Page
1383
+ );
1384
+
1385
+ add_settings_field(
1386
+ 'seopress_titles_tax_titles', // ID
1387
+ '',
1388
+ array( $this, 'seopress_titles_tax_titles_callback' ), // Callback
1389
+ 'seopress-settings-admin-titles-tax', // Page
1390
+ 'seopress_setting_section_titles_tax' // Section
1391
+ );
1392
+
1393
+ //Advanced SECTION=========================================================================
1394
+ add_settings_section(
1395
+ 'seopress_setting_section_titles_advanced', // ID
1396
+ '',
1397
+ //__("Advanced","wp-seopress"), // Title
1398
+ array( $this, 'print_section_info_advanced' ), // Callback
1399
+ 'seopress-settings-admin-titles-advanced' // Page
1400
+ );
1401
+
1402
+ add_settings_field(
1403
+ 'seopress_titles_noindex', // ID
1404
+ __("noindex","wp-seopress"), // Title
1405
+ array( $this, 'seopress_titles_noindex_callback' ), // Callback
1406
+ 'seopress-settings-admin-titles-advanced', // Page
1407
+ 'seopress_setting_section_titles_advanced' // Section
1408
+ );
1409
+
1410
+ add_settings_field(
1411
+ 'seopress_titles_nofollow', // ID
1412
+ __("nofollow","wp-seopress"), // Title
1413
+ array( $this, 'seopress_titles_nofollow_callback' ), // Callback
1414
+ 'seopress-settings-admin-titles-advanced', // Page
1415
+ 'seopress_setting_section_titles_advanced' // Section
1416
+ );
1417
+
1418
+ add_settings_field(
1419
+ 'seopress_titles_noodp', // ID
1420
+ __("noodp","wp-seopress"), // Title
1421
+ array( $this, 'seopress_titles_noodp_callback' ), // Callback
1422
+ 'seopress-settings-admin-titles-advanced', // Page
1423
+ 'seopress_setting_section_titles_advanced' // Section
1424
+ );
1425
+
1426
+ add_settings_field(
1427
+ 'seopress_titles_noimageindex', // ID
1428
+ __("noimageindex","wp-seopress"), // Title
1429
+ array( $this, 'seopress_titles_noimageindex_callback' ), // Callback
1430
+ 'seopress-settings-admin-titles-advanced', // Page
1431
+ 'seopress_setting_section_titles_advanced' // Section
1432
+ );
1433
+
1434
+ add_settings_field(
1435
+ 'seopress_titles_noarchive', // ID
1436
+ __("noarchive","wp-seopress"), // Title
1437
+ array( $this, 'seopress_titles_noarchive_callback' ), // Callback
1438
+ 'seopress-settings-admin-titles-advanced', // Page
1439
+ 'seopress_setting_section_titles_advanced' // Section
1440
+ );
1441
+
1442
+ add_settings_field(
1443
+ 'seopress_titles_nosnippet', // ID
1444
+ __("nosnippet","wp-seopress"), // Title
1445
+ array( $this, 'seopress_titles_nosnippet_callback' ), // Callback
1446
+ 'seopress-settings-admin-titles-advanced', // Page
1447
+ 'seopress_setting_section_titles_advanced' // Section
1448
+ );
1449
+
1450
+ add_settings_field(
1451
+ 'seopress_titles_nositelinkssearchbox', // ID
1452
+ __("nositelinkssearchbox","wp-seopress"), // Title
1453
+ array( $this, 'seopress_titles_nositelinkssearchbox_callback' ), // Callback
1454
+ 'seopress-settings-admin-titles-advanced', // Page
1455
+ 'seopress_setting_section_titles_advanced' // Section
1456
+ );
1457
+
1458
+ add_settings_field(
1459
+ 'seopress_titles_paged_rel', // ID
1460
+ __("Indicate paginated content to Google","wp-seopress"), // Title
1461
+ array( $this, 'seopress_titles_paged_rel_callback' ), // Callback
1462
+ 'seopress-settings-admin-titles-advanced', // Page
1463
+ 'seopress_setting_section_titles_advanced' // Section
1464
+ );
1465
+
1466
+ //XML Sitemap SECTION======================================================================
1467
+ add_settings_section(
1468
+ 'seopress_setting_section_xml_sitemap_general', // ID
1469
+ '',
1470
+ //__("General","wp-seopress"), // Title
1471
+ array( $this, 'print_section_info_xml_sitemap_general' ), // Callback
1472
+ 'seopress-settings-admin-xml-sitemap-general' // Page
1473
+ );
1474
+
1475
+ add_settings_field(
1476
+ 'seopress_xml_sitemap_general_enable', // ID
1477
+ __("Enable XML Sitemap","wp-seopress"), // Title
1478
+ array( $this, 'seopress_xml_sitemap_general_enable_callback' ), // Callback
1479
+ 'seopress-settings-admin-xml-sitemap-general', // Page
1480
+ 'seopress_setting_section_xml_sitemap_general' // Section
1481
+ );
1482
+
1483
+ add_settings_field(
1484
+ 'seopress_xml_sitemap_img_enable', // ID
1485
+ __("Enable XML Image Sitemaps","wp-seopress"), // Title
1486
+ array( $this, 'seopress_xml_sitemap_img_enable_callback' ), // Callback
1487
+ 'seopress-settings-admin-xml-sitemap-general', // Page
1488
+ 'seopress_setting_section_xml_sitemap_general' // Section
1489
+ );
1490
+
1491
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
1492
+ add_settings_field(
1493
+ 'seopress_xml_sitemap_video_enable_callback', // ID
1494
+ __("Enable XML Video Sitemaps","wp-seopress"), // Title
1495
+ array( $this, 'seopress_xml_sitemap_video_enable_callback' ), // Callback
1496
+ 'seopress-settings-admin-xml-sitemap-general', // Page
1497
+ 'seopress_setting_section_xml_sitemap_general' // Section
1498
+ );
1499
+ }
1500
+
1501
+ add_settings_field(
1502
+ 'seopress_xml_sitemap_author_enable', // ID
1503
+ __("Enable Author Sitemap","wp-seopress"), // Title
1504
+ array( $this, 'seopress_xml_sitemap_author_enable_callback' ), // Callback
1505
+ 'seopress-settings-admin-xml-sitemap-general', // Page
1506
+ 'seopress_setting_section_xml_sitemap_general' // Section
1507
+ );
1508
+
1509
+ add_settings_field(
1510
+ 'seopress_xml_sitemap_html_enable', // ID
1511
+ __("Enable HTML Sitemap","wp-seopress"), // Title
1512
+ array( $this, 'seopress_xml_sitemap_html_enable_callback' ), // Callback
1513
+ 'seopress-settings-admin-xml-sitemap-general', // Page
1514
+ 'seopress_setting_section_xml_sitemap_general' // Section
1515
+ );
1516
+
1517
+ add_settings_section(
1518
+ 'seopress_setting_section_xml_sitemap_post_types', // ID
1519
+ '',
1520
+ //__("Post Types","wp-seopress"), // Title
1521
+ array( $this, 'print_section_info_xml_sitemap_post_types' ), // Callback
1522
+ 'seopress-settings-admin-xml-sitemap-post-types' // Page
1523
+ );
1524
+
1525
+ add_settings_field(
1526
+ 'seopress_xml_sitemap_post_types_list', // ID
1527
+ __("Check to INCLUDE Post Types","wp-seopress"), // Title
1528
+ array( $this, 'seopress_xml_sitemap_post_types_list_callback' ), // Callback
1529
+ 'seopress-settings-admin-xml-sitemap-post-types', // Page
1530
+ 'seopress_setting_section_xml_sitemap_post_types' // Section
1531
+ );
1532
+
1533
+ add_settings_section(
1534
+ 'seopress_setting_section_xml_sitemap_taxonomies', // ID
1535
+ '',
1536
+ //__("Taxonomies","wp-seopress"), // Title
1537
+ array( $this, 'print_section_info_xml_sitemap_taxonomies' ), // Callback
1538
+ 'seopress-settings-admin-xml-sitemap-taxonomies' // Page
1539
+ );
1540
+
1541
+ add_settings_field(
1542
+ 'seopress_xml_sitemap_taxonomies_list', // ID
1543
+ __("Check to INCLUDE Taxonomies","wp-seopress"), // Title
1544
+ array( $this, 'seopress_xml_sitemap_taxonomies_list_callback' ), // Callback
1545
+ 'seopress-settings-admin-xml-sitemap-taxonomies', // Page
1546
+ 'seopress_setting_section_xml_sitemap_taxonomies' // Section
1547
+ );
1548
+
1549
+ add_settings_section(
1550
+ 'seopress_setting_section_html_sitemap', // ID
1551
+ '',
1552
+ //__("HTML Sitemap","wp-seopress"), // Title
1553
+ array( $this, 'print_section_info_html_sitemap' ), // Callback
1554
+ 'seopress-settings-admin-html-sitemap' // Page
1555
+ );
1556
+
1557
+ add_settings_field(
1558
+ 'seopress_xml_sitemap_html_mapping', // ID
1559
+ __("Enter a post, page or custom post type ID(s) to display the sitemap","wp-seopress"), // Title
1560
+ array( $this, 'seopress_xml_sitemap_html_mapping_callback' ), // Callback
1561
+ 'seopress-settings-admin-html-sitemap', // Page
1562
+ 'seopress_setting_section_html_sitemap' // Section
1563
+ );
1564
+
1565
+ add_settings_field(
1566
+ 'seopress_xml_sitemap_html_exclude', // ID
1567
+ __("Exclude some Posts, Pages, Custom Post Types or Terms IDs","wp-seopress"), // Title
1568
+ array( $this, 'seopress_xml_sitemap_html_exclude_callback' ), // Callback
1569
+ 'seopress-settings-admin-html-sitemap', // Page
1570
+ 'seopress_setting_section_html_sitemap' // Section
1571
+ );
1572
+
1573
+ add_settings_field(
1574
+ 'seopress_xml_sitemap_html_order', // ID
1575
+ __("Sort order","wp-seopress"), // Title
1576
+ array( $this, 'seopress_xml_sitemap_html_order_callback' ), // Callback
1577
+ 'seopress-settings-admin-html-sitemap', // Page
1578
+ 'seopress_setting_section_html_sitemap' // Section
1579
+ );
1580
+
1581
+ add_settings_field(
1582
+ 'seopress_xml_sitemap_html_orderby', // ID
1583
+ __("Order posts by","wp-seopress"), // Title
1584
+ array( $this, 'seopress_xml_sitemap_html_orderby_callback' ), // Callback
1585
+ 'seopress-settings-admin-html-sitemap', // Page
1586
+ 'seopress_setting_section_html_sitemap' // Section
1587
+ );
1588
+
1589
+ add_settings_field(
1590
+ 'seopress_xml_sitemap_html_date', // ID
1591
+ __("Disable the display of the publication date","wp-seopress"), // Title
1592
+ array( $this, 'seopress_xml_sitemap_html_date_callback' ), // Callback
1593
+ 'seopress-settings-admin-html-sitemap', // Page
1594
+ 'seopress_setting_section_html_sitemap' // Section
1595
+ );
1596
+
1597
+ //Knowledge graph SECTION======================================================================
1598
+ add_settings_section(
1599
+ 'seopress_setting_section_social_knowledge', // ID
1600
+ '',
1601
+ //__("Knowledge graph","wp-seopress"), // Title
1602
+ array( $this, 'print_section_info_social_knowledge' ), // Callback
1603
+ 'seopress-settings-admin-social-knowledge' // Page
1604
+ );
1605
+
1606
+ add_settings_field(
1607
+ 'seopress_social_knowledge_type', // ID
1608
+ __("Person or organization","wp-seopress"), // Title
1609
+ array( $this, 'seopress_social_knowledge_type_callback' ), // Callback
1610
+ 'seopress-settings-admin-social-knowledge', // Page
1611
+ 'seopress_setting_section_social_knowledge' // Section
1612
+ );
1613
+
1614
+ add_settings_field(
1615
+ 'seopress_social_knowledge_name', // ID
1616
+ __("Your name/organization","wp-seopress"), // Title
1617
+ array( $this, 'seopress_social_knowledge_name_callback' ), // Callback
1618
+ 'seopress-settings-admin-social-knowledge', // Page
1619
+ 'seopress_setting_section_social_knowledge' // Section
1620
+ );
1621
+
1622
+ add_settings_field(
1623
+ 'seopress_social_knowledge_img', // ID
1624
+ __("Your photo/organization logo","wp-seopress"), // Title
1625
+ array( $this, 'seopress_social_knowledge_img_callback' ), // Callback
1626
+ 'seopress-settings-admin-social-knowledge', // Page
1627
+ 'seopress_setting_section_social_knowledge' // Section
1628
+ );
1629
+
1630
+ add_settings_field(
1631
+ 'seopress_social_knowledge_phone', // ID
1632
+ __("Organization's phone number (only for Organizations)","wp-seopress"), // Title
1633
+ array( $this, 'seopress_social_knowledge_phone_callback' ), // Callback
1634
+ 'seopress-settings-admin-social-knowledge', // Page
1635
+ 'seopress_setting_section_social_knowledge' // Section
1636
+ );
1637
+
1638
+ add_settings_field(
1639
+ 'seopress_social_knowledge_contact_type', // ID
1640
+ __("Contact type (only for Organizations)","wp-seopress"), // Title
1641
+ array( $this, 'seopress_social_knowledge_contact_type_callback' ), // Callback
1642
+ 'seopress-settings-admin-social-knowledge', // Page
1643
+ 'seopress_setting_section_social_knowledge' // Section
1644
+ );
1645
+
1646
+ add_settings_field(
1647
+ 'seopress_social_knowledge_contact_option', // ID
1648
+ __("Contact option (only for Organizations)","wp-seopress"), // Title
1649
+ array( $this, 'seopress_social_knowledge_contact_option_callback' ), // Callback
1650
+ 'seopress-settings-admin-social-knowledge', // Page
1651
+ 'seopress_setting_section_social_knowledge' // Section
1652
+ );
1653
+
1654
+ //Social SECTION=====================================================================================
1655
+ add_settings_section(
1656
+ 'seopress_setting_section_social_accounts', // ID
1657
+ '',
1658
+ //__("Social","wp-seopress"), // Title
1659
+ array( $this, 'print_section_info_social_accounts' ), // Callback
1660
+ 'seopress-settings-admin-social-accounts' // Page
1661
+ );
1662
+
1663
+ add_settings_field(
1664
+ 'seopress_social_accounts_facebook', // ID
1665
+ __("Facebook Page URL","wp-seopress"), // Title
1666
+ array( $this, 'seopress_social_accounts_facebook_callback' ), // Callback
1667
+ 'seopress-settings-admin-social-accounts', // Page
1668
+ 'seopress_setting_section_social_accounts' // Section
1669
+ );
1670
+
1671
+ add_settings_field(
1672
+ 'seopress_social_accounts_twitter', // ID
1673
+ __("Twitter Username","wp-seopress"), // Title
1674
+ array( $this, 'seopress_social_accounts_twitter_callback' ), // Callback
1675
+ 'seopress-settings-admin-social-accounts', // Page
1676
+ 'seopress_setting_section_social_accounts' // Section
1677
+ );
1678
+
1679
+ add_settings_field(
1680
+ 'seopress_social_accounts_pinterest', // ID
1681
+ __("Pinterest URL","wp-seopress"), // Title
1682
+ array( $this, 'seopress_social_accounts_pinterest_callback' ), // Callback
1683
+ 'seopress-settings-admin-social-accounts', // Page
1684
+ 'seopress_setting_section_social_accounts' // Section
1685
+ );
1686
+
1687
+ add_settings_field(
1688
+ 'seopress_social_accounts_instagram', // ID
1689
+ __("Instagram URL","wp-seopress"), // Title
1690
+ array( $this, 'seopress_social_accounts_instagram_callback' ), // Callback
1691
+ 'seopress-settings-admin-social-accounts', // Page
1692
+ 'seopress_setting_section_social_accounts' // Section
1693
+ );
1694
+
1695
+ add_settings_field(
1696
+ 'seopress_social_accounts_youtube', // ID
1697
+ __("YouTube URL","wp-seopress"), // Title
1698
+ array( $this, 'seopress_social_accounts_youtube_callback' ), // Callback
1699
+ 'seopress-settings-admin-social-accounts', // Page
1700
+ 'seopress_setting_section_social_accounts' // Section
1701
+ );
1702
+
1703
+ add_settings_field(
1704
+ 'seopress_social_accounts_linkedin', // ID
1705
+ __("LinkedIn URL","wp-seopress"), // Title
1706
+ array( $this, 'seopress_social_accounts_linkedin_callback' ), // Callback
1707
+ 'seopress-settings-admin-social-accounts', // Page
1708
+ 'seopress_setting_section_social_accounts' // Section
1709
+ );
1710
+
1711
+ add_settings_field(
1712
+ 'seopress_social_accounts_myspace', // ID
1713
+ __("MySpace URL","wp-seopress"), // Title
1714
+ array( $this, 'seopress_social_accounts_myspace_callback' ), // Callback
1715
+ 'seopress-settings-admin-social-accounts', // Page
1716
+ 'seopress_setting_section_social_accounts' // Section
1717
+ );
1718
+
1719
+ add_settings_field(
1720
+ 'seopress_social_accounts_soundcloud', // ID
1721
+ __("Soundcloud URL","wp-seopress"), // Title
1722
+ array( $this, 'seopress_social_accounts_soundcloud_callback' ), // Callback
1723
+ 'seopress-settings-admin-social-accounts', // Page
1724
+ 'seopress_setting_section_social_accounts' // Section
1725
+ );
1726
+
1727
+ add_settings_field(
1728
+ 'seopress_social_accounts_tumblr', // ID
1729
+ __("Tumblr URL","wp-seopress"), // Title
1730
+ array( $this, 'seopress_social_accounts_tumblr_callback' ), // Callback
1731
+ 'seopress-settings-admin-social-accounts', // Page
1732
+ 'seopress_setting_section_social_accounts' // Section
1733
+ );
1734
+
1735
+ //Facebook SECTION=========================================================================
1736
+ add_settings_section(
1737
+ 'seopress_setting_section_social_facebook', // ID
1738
+ '',
1739
+ //__("Facebook","wp-seopress"), // Title
1740
+ array( $this, 'print_section_info_social_facebook' ), // Callback
1741
+ 'seopress-settings-admin-social-facebook' // Page
1742
+ );
1743
+
1744
+ add_settings_field(
1745
+ 'seopress_social_facebook_og', // ID
1746
+ __("Enable Open Graph Data","wp-seopress"), // Title
1747
+ array( $this, 'seopress_social_facebook_og_callback' ), // Callback
1748
+ 'seopress-settings-admin-social-facebook', // Page
1749
+ 'seopress_setting_section_social_facebook' // Section
1750
+ );
1751
+
1752
+ add_settings_field(
1753
+ 'seopress_social_facebook_img', // ID
1754
+ __("Select a default image","wp-seopress"), // Title
1755
+ array( $this, 'seopress_social_facebook_img_callback' ), // Callback
1756
+ 'seopress-settings-admin-social-facebook', // Page
1757
+ 'seopress_setting_section_social_facebook' // Section
1758
+ );
1759
+
1760
+ add_settings_field(
1761
+ 'seopress_social_facebook_img_default', // ID
1762
+ __("Apply this image to all your og:image tag","wp-seopress"), // Title
1763
+ array( $this, 'seopress_social_facebook_img_default_callback' ), // Callback
1764
+ 'seopress-settings-admin-social-facebook', // Page
1765
+ 'seopress_setting_section_social_facebook' // Section
1766
+ );
1767
+
1768
+ add_settings_field(
1769
+ 'seopress_social_facebook_img_cpt', // ID
1770
+ __("Define custom og:image tag for post type archive pages","wp-seopress"), // Title
1771
+ array( $this, 'seopress_social_facebook_img_cpt_callback' ), // Callback
1772
+ 'seopress-settings-admin-social-facebook', // Page
1773
+ 'seopress_setting_section_social_facebook' // Section
1774
+ );
1775
+
1776
+ add_settings_field(
1777
+ 'seopress_social_facebook_link_ownership_id', // ID
1778
+ __("Facebook Link Ownership ID","wp-seopress"), // Title
1779
+ array( $this, 'seopress_social_facebook_link_ownership_id_callback' ), // Callback
1780
+ 'seopress-settings-admin-social-facebook', // Page
1781
+ 'seopress_setting_section_social_facebook' // Section
1782
+ );
1783
+
1784
+ add_settings_field(
1785
+ 'seopress_social_facebook_admin_id', // ID
1786
+ __("Facebook Admin ID","wp-seopress"), // Title
1787
+ array( $this, 'seopress_social_facebook_admin_id_callback' ), // Callback
1788
+ 'seopress-settings-admin-social-facebook', // Page
1789
+ 'seopress_setting_section_social_facebook' // Section
1790
+ );
1791
+
1792
+ add_settings_field(
1793
+ 'seopress_social_facebook_app_id', // ID
1794
+ __("Facebook App ID","wp-seopress"), // Title
1795
+ array( $this, 'seopress_social_facebook_app_id_callback' ), // Callback
1796
+ 'seopress-settings-admin-social-facebook', // Page
1797
+ 'seopress_setting_section_social_facebook' // Section
1798
+ );
1799
+
1800
+ //Twitter SECTION==========================================================================
1801
+ add_settings_section(
1802
+ 'seopress_setting_section_social_twitter', // ID
1803
+ '',
1804
+ //__("Twitter","wp-seopress"), // Title
1805
+ array( $this, 'print_section_info_social_twitter' ), // Callback
1806
+ 'seopress-settings-admin-social-twitter' // Page
1807
+ );
1808
+
1809
+ add_settings_field(
1810
+ 'seopress_social_twitter_card', // ID
1811
+ __("Enable Twitter Card","wp-seopress"), // Title
1812
+ array( $this, 'seopress_social_twitter_card_callback' ), // Callback
1813
+ 'seopress-settings-admin-social-twitter', // Page
1814
+ 'seopress_setting_section_social_twitter' // Section
1815
+ );
1816
+
1817
+ add_settings_field(
1818
+ 'seopress_social_twitter_card_og', // ID
1819
+ __("Use Open Graph if no Twitter Card is filled","wp-seopress"), // Title
1820
+ array( $this, 'seopress_social_twitter_card_og_callback' ), // Callback
1821
+ 'seopress-settings-admin-social-twitter', // Page
1822
+ 'seopress_setting_section_social_twitter' // Section
1823
+ );
1824
+
1825
+ add_settings_field(
1826
+ 'seopress_social_twitter_card_img', // ID
1827
+ __("Default Twitter Image","wp-seopress"), // Title
1828
+ array( $this, 'seopress_social_twitter_card_img_callback' ), // Callback
1829
+ 'seopress-settings-admin-social-twitter', // Page
1830
+ 'seopress_setting_section_social_twitter' // Section
1831
+ );
1832
+
1833
+ add_settings_field(
1834
+ 'seopress_social_twitter_card_img_size', // ID
1835
+ __("Image size for Twitter Summary card","wp-seopress"), // Title
1836
+ array( $this, 'seopress_social_twitter_card_img_size_callback' ), // Callback
1837
+ 'seopress-settings-admin-social-twitter', // Page
1838
+ 'seopress_setting_section_social_twitter' // Section
1839
+ );
1840
+
1841
+ //Google Analytics Enable SECTION==========================================================
1842
+ add_settings_section(
1843
+ 'seopress_setting_section_google_analytics_enable', // ID
1844
+ '',
1845
+ //__("Google Analytics","wp-seopress"), // Title
1846
+ array( $this, 'print_section_info_google_analytics_enable' ), // Callback
1847
+ 'seopress-settings-admin-google-analytics-enable' // Page
1848
+ );
1849
+
1850
+ add_settings_field(
1851
+ 'seopress_google_analytics_enable', // ID
1852
+ __("Enable Google Analytics tracking","wp-seopress"), // Title
1853
+ array( $this, 'seopress_google_analytics_enable_callback' ), // Callback
1854
+ 'seopress-settings-admin-google-analytics-enable', // Page
1855
+ 'seopress_setting_section_google_analytics_enable' // Section
1856
+ );
1857
+
1858
+ add_settings_field(
1859
+ 'seopress_google_analytics_ua', // ID
1860
+ __("Enter your tracking ID","wp-seopress"), // Title
1861
+ array( $this, 'seopress_google_analytics_ua_callback' ), // Callback
1862
+ 'seopress-settings-admin-google-analytics-enable', // Page
1863
+ 'seopress_setting_section_google_analytics_enable' // Section
1864
+ );
1865
+
1866
+ add_settings_field(
1867
+ 'seopress_google_analytics_roles', // ID
1868
+ __("Exclude user roles from tracking","wp-seopress"), // Title
1869
+ array( $this, 'seopress_google_analytics_roles_callback' ), // Callback
1870
+ 'seopress-settings-admin-google-analytics-enable', // Page
1871
+ 'seopress_setting_section_google_analytics_enable' // Section
1872
+ );
1873
+
1874
+ //Cookie bar / GDPR SECTION================================================================
1875
+ add_settings_section(
1876
+ 'seopress_setting_section_google_analytics_gdpr', // ID
1877
+ '',
1878
+ //__("Google Analytics","wp-seopress"), // Title
1879
+ array( $this, 'print_section_info_google_analytics_gdpr' ), // Callback
1880
+ 'seopress-settings-admin-google-analytics-gdpr' // Page
1881
+ );
1882
+
1883
+ add_settings_field(
1884
+ 'seopress_google_analytics_disable', // ID
1885
+ __("Analytics tracking opt-in","wp-seopress"), // Title
1886
+ array( $this, 'seopress_google_analytics_disable_callback' ), // Callback
1887
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1888
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1889
+ );
1890
+
1891
+ add_settings_field(
1892
+ 'seopress_google_analytics_half_disable', // ID
1893
+ '', // Title
1894
+ array( $this, 'seopress_google_analytics_half_disable_callback' ), // Callback
1895
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1896
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1897
+ );
1898
+
1899
+ add_settings_field(
1900
+ 'seopress_google_analytics_opt_out_msg', // ID
1901
+ __("Consent message for user tracking","wp-seopress"), // Title
1902
+ array( $this, 'seopress_google_analytics_opt_out_msg_callback' ), // Callback
1903
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1904
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1905
+ );
1906
+
1907
+ add_settings_field(
1908
+ 'seopress_google_analytics_opt_out_msg_ok', // ID
1909
+ __("Accept button for user tracking","wp-seopress"), // Title
1910
+ array( $this, 'seopress_google_analytics_opt_out_msg_ok_callback' ), // Callback
1911
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1912
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1913
+ );
1914
+
1915
+ add_settings_field(
1916
+ 'seopress_google_analytics_opt_out_msg_close', // ID
1917
+ __("Close button","wp-seopress"), // Title
1918
+ array( $this, 'seopress_google_analytics_opt_out_msg_close_callback' ), // Callback
1919
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1920
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1921
+ );
1922
+
1923
+ add_settings_field(
1924
+ 'seopress_google_analytics_cb_pos', // ID
1925
+ __("Cookie bar position","wp-seopress"), // Title
1926
+ array( $this, 'seopress_google_analytics_cb_pos_callback' ), // Callback
1927
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1928
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1929
+ );
1930
+
1931
+ add_settings_field(
1932
+ 'seopress_google_analytics_cb_bg', // ID
1933
+ __("Cookie bar background color","wp-seopress"), // Title
1934
+ array( $this, 'seopress_google_analytics_cb_bg_callback' ), // Callback
1935
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1936
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1937
+ );
1938
+
1939
+ add_settings_field(
1940
+ 'seopress_google_analytics_cb_txt_col', // ID
1941
+ __("Cookie bar text color","wp-seopress"), // Title
1942
+ array( $this, 'seopress_google_analytics_cb_txt_col_callback' ), // Callback
1943
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1944
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1945
+ );
1946
+
1947
+ add_settings_field(
1948
+ 'seopress_google_analytics_cb_lk_col', // ID
1949
+ __("Cookie bar link color","wp-seopress"), // Title
1950
+ array( $this, 'seopress_google_analytics_cb_lk_col_callback' ), // Callback
1951
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1952
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1953
+ );
1954
+
1955
+ add_settings_field(
1956
+ 'seopress_google_analytics_cb_btn_bg', // ID
1957
+ __("Cookie bar button background color","wp-seopress"), // Title
1958
+ array( $this, 'seopress_google_analytics_cb_btn_bg_callback' ), // Callback
1959
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1960
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1961
+ );
1962
+
1963
+ add_settings_field(
1964
+ 'seopress_google_analytics_cb_btn_col', // ID
1965
+ __("Cookie bar button color","wp-seopress"), // Title
1966
+ array( $this, 'seopress_google_analytics_cb_btn_col_callback' ), // Callback
1967
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1968
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1969
+ );
1970
+
1971
+ add_settings_field(
1972
+ 'seopress_google_analytics_cb_btn_bg_hov', // ID
1973
+ __("Cookie bar button hover background color","wp-seopress"), // Title
1974
+ array( $this, 'seopress_google_analytics_cb_btn_bg_hov_callback' ), // Callback
1975
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1976
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1977
+ );
1978
+
1979
+ add_settings_field(
1980
+ 'seopress_google_analytics_cb_btn_col_hov', // ID
1981
+ __("Cookie bar button hover color","wp-seopress"), // Title
1982
+ array( $this, 'seopress_google_analytics_cb_btn_col_hov_callback' ), // Callback
1983
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1984
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1985
+ );
1986
+
1987
+ add_settings_field(
1988
+ 'seopress_google_analytics_cb_btn_sec_bg', // ID
1989
+ __("Cookie bar secondary button background color","wp-seopress"), // Title
1990
+ array( $this, 'seopress_google_analytics_cb_btn_sec_bg_callback' ), // Callback
1991
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
1992
+ 'seopress_setting_section_google_analytics_gdpr' // Section
1993
+ );
1994
+
1995
+ add_settings_field(
1996
+ 'seopress_google_analytics_cb_btn_sec_col', // ID
1997
+ __("Cookie bar secondary button color","wp-seopress"), // Title
1998
+ array( $this, 'seopress_google_analytics_cb_btn_sec_col_callback' ), // Callback
1999
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
2000
+ 'seopress_setting_section_google_analytics_gdpr' // Section
2001
+ );
2002
+
2003
+ add_settings_field(
2004
+ 'seopress_google_analytics_cb_btn_sec_bg_hov', // ID
2005
+ __("Cookie bar secondary button hover background color","wp-seopress"), // Title
2006
+ array( $this, 'seopress_google_analytics_cb_btn_sec_bg_hov_callback' ), // Callback
2007
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
2008
+ 'seopress_setting_section_google_analytics_gdpr' // Section
2009
+ );
2010
+
2011
+ add_settings_field(
2012
+ 'seopress_google_analytics_cb_btn_sec_col_hov', // ID
2013
+ __("Cookie bar secondary button hover color","wp-seopress"), // Title
2014
+ array( $this, 'seopress_google_analytics_cb_btn_sec_col_hov_callback' ), // Callback
2015
+ 'seopress-settings-admin-google-analytics-gdpr', // Page
2016
+ 'seopress_setting_section_google_analytics_gdpr' // Section
2017
+ );
2018
+
2019
+ //Google Analytics Tracking SECTION========================================================
2020
+
2021
+ add_settings_section(
2022
+ 'seopress_setting_section_google_analytics_features', // ID
2023
+ '',
2024
+ //__("Google Analytics","wp-seopress"), // Title
2025
+ array( $this, 'print_section_info_google_analytics_features' ), // Callback
2026
+ 'seopress-settings-admin-google-analytics-features' // Page
2027
+ );
2028
+
2029
+ add_settings_field(
2030
+ 'seopress_google_analytics_optimize', // ID
2031
+ __("Enable Google Optimize","wp-seopress"), // Title
2032
+ array( $this, 'seopress_google_analytics_optimize_callback' ), // Callback
2033
+ 'seopress-settings-admin-google-analytics-features', // Page
2034
+ 'seopress_setting_section_google_analytics_features' // Section
2035
+ );
2036
+
2037
+ add_settings_field(
2038
+ 'seopress_google_analytics_ads', // ID
2039
+ __("Enable Google Ads","wp-seopress"), // Title
2040
+ array( $this, 'seopress_google_analytics_ads_callback' ), // Callback
2041
+ 'seopress-settings-admin-google-analytics-features', // Page
2042
+ 'seopress_setting_section_google_analytics_features' // Section
2043
+ );
2044
+
2045
+ add_settings_field(
2046
+ 'seopress_google_analytics_other_tracking', // ID
2047
+ __("Add an additional tracking code (like Facebook Pixel, Hotjar...)","wp-seopress"), // Title
2048
+ array( $this, 'seopress_google_analytics_other_tracking_callback' ), // Callback
2049
+ 'seopress-settings-admin-google-analytics-features', // Page
2050
+ 'seopress_setting_section_google_analytics_features' // Section
2051
+ );
2052
+
2053
+ add_settings_field(
2054
+ 'seopress_google_analytics_other_tracking_body', // ID
2055
+ __("[BODY] Add an additional tracking code (like Google Tag Manager...)","wp-seopress"), // Title
2056
+ array( $this, 'seopress_google_analytics_other_tracking_body_callback' ), // Callback
2057
+ 'seopress-settings-admin-google-analytics-features', // Page
2058
+ 'seopress_setting_section_google_analytics_features' // Section
2059
+ );
2060
+
2061
+ add_settings_field(
2062
+ 'seopress_google_analytics_other_tracking_footer', // ID
2063
+ __("[BODY (FOOTER)] Add an additional tracking code (like Google Tag Manager...)","wp-seopress"), // Title
2064
+ array( $this, 'seopress_google_analytics_other_tracking_footer_callback' ), // Callback
2065
+ 'seopress-settings-admin-google-analytics-features', // Page
2066
+ 'seopress_setting_section_google_analytics_features' // Section
2067
+ );
2068
+
2069
+ add_settings_field(
2070
+ 'seopress_google_analytics_remarketing', // ID
2071
+ __("Enable remarketing, demographics, and interests reporting","wp-seopress"), // Title
2072
+ array( $this, 'seopress_google_analytics_remarketing_callback' ), // Callback
2073
+ 'seopress-settings-admin-google-analytics-features', // Page
2074
+ 'seopress_setting_section_google_analytics_features' // Section
2075
+ );
2076
+
2077
+ add_settings_field(
2078
+ 'seopress_google_analytics_ip_anonymization', // ID
2079
+ __("Enable IP Anonymization","wp-seopress"), // Title
2080
+ array( $this, 'seopress_google_analytics_ip_anonymization_callback' ), // Callback
2081
+ 'seopress-settings-admin-google-analytics-features', // Page
2082
+ 'seopress_setting_section_google_analytics_features' // Section
2083
+ );
2084
+
2085
+ add_settings_field(
2086
+ 'seopress_google_analytics_link_attribution', // ID
2087
+ __("Enhanced Link Attribution","wp-seopress"), // Title
2088
+ array( $this, 'seopress_google_analytics_link_attribution_callback' ), // Callback
2089
+ 'seopress-settings-admin-google-analytics-features', // Page
2090
+ 'seopress_setting_section_google_analytics_features' // Section
2091
+ );
2092
+
2093
+ add_settings_field(
2094
+ 'seopress_google_analytics_cross_domain_enable', // ID
2095
+ __("Enable cross-domain tracking","wp-seopress"), // Title
2096
+ array( $this, 'seopress_google_analytics_cross_enable_callback' ), // Callback
2097
+ 'seopress-settings-admin-google-analytics-features', // Page
2098
+ 'seopress_setting_section_google_analytics_features' // Section
2099
+ );
2100
+
2101
+ add_settings_field(
2102
+ 'seopress_google_analytics_cross_domain', // ID
2103
+ __("Cross domains","wp-seopress"), // Title
2104
+ array( $this, 'seopress_google_analytics_cross_domain_callback' ), // Callback
2105
+ 'seopress-settings-admin-google-analytics-features', // Page
2106
+ 'seopress_setting_section_google_analytics_features' // Section
2107
+ );
2108
+
2109
+ //Google Analytics Events SECTION==========================================================
2110
+
2111
+ add_settings_section(
2112
+ 'seopress_setting_section_google_analytics_events', // ID
2113
+ '',
2114
+ //__("Google Analytics","wp-seopress"), // Title
2115
+ array( $this, 'print_section_info_google_analytics_events' ), // Callback
2116
+ 'seopress-settings-admin-google-analytics-events' // Page
2117
+ );
2118
+
2119
+ add_settings_field(
2120
+ 'seopress_google_analytics_link_tracking_enable', // ID
2121
+ __("Enable external links tracking","wp-seopress"), // Title
2122
+ array( $this, 'seopress_google_analytics_link_tracking_enable_callback' ), // Callback
2123
+ 'seopress-settings-admin-google-analytics-events', // Page
2124
+ 'seopress_setting_section_google_analytics_events' // Section
2125
+ );
2126
+
2127
+ add_settings_field(
2128
+ 'seopress_google_analytics_download_tracking_enable', // ID
2129
+ __("Enable downloads tracking (eg: PDF, XLSX, DOCX...)","wp-seopress"), // Title
2130
+ array( $this, 'seopress_google_analytics_download_tracking_enable_callback' ), // Callback
2131
+ 'seopress-settings-admin-google-analytics-events', // Page
2132
+ 'seopress_setting_section_google_analytics_events' // Section
2133
+ );
2134
+
2135
+ add_settings_field(
2136
+ 'seopress_google_analytics_download_tracking', // ID
2137
+ __("Track downloads' clicks","wp-seopress"), // Title
2138
+ array( $this, 'seopress_google_analytics_download_tracking_callback' ), // Callback
2139
+ 'seopress-settings-admin-google-analytics-events', // Page
2140
+ 'seopress_setting_section_google_analytics_events' // Section
2141
+ );
2142
+
2143
+ add_settings_field(
2144
+ 'seopress_google_analytics_affiliate_tracking_enable', // ID
2145
+ __("Enable affiliate/outbound links tracking (eg: aff, go, out, recommends)","wp-seopress"), // Title
2146
+ array( $this, 'seopress_google_analytics_affiliate_tracking_enable_callback' ), // Callback
2147
+ 'seopress-settings-admin-google-analytics-events', // Page
2148
+ 'seopress_setting_section_google_analytics_events' // Section
2149
+ );
2150
+
2151
+ add_settings_field(
2152
+ 'seopress_google_analytics_affiliate_tracking', // ID
2153
+ __("Track affiliate/outbound links","wp-seopress"), // Title
2154
+ array( $this, 'seopress_google_analytics_affiliate_tracking_callback' ), // Callback
2155
+ 'seopress-settings-admin-google-analytics-events', // Page
2156
+ 'seopress_setting_section_google_analytics_events' // Section
2157
+ );
2158
+
2159
+ //Google Analytics Custom Dimensions SECTION===============================================
2160
+
2161
+ add_settings_section(
2162
+ 'seopress_setting_section_google_analytics_custom_dimensions', // ID
2163
+ '',
2164
+ //__("Google Analytics","wp-seopress"), // Title
2165
+ array( $this, 'print_section_info_google_analytics_custom_dimensions' ), // Callback
2166
+ 'seopress-settings-admin-google-analytics-custom-dimensions' // Page
2167
+ );
2168
+
2169
+ add_settings_field(
2170
+ 'seopress_google_analytics_cd_author', // ID
2171
+ __("Track Authors","wp-seopress"), // Title
2172
+ array( $this, 'seopress_google_analytics_cd_author_callback' ), // Callback
2173
+ 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2174
+ 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2175
+ );
2176
+
2177
+ add_settings_field(
2178
+ 'seopress_google_analytics_cd_category', // ID
2179
+ __("Track Categories","wp-seopress"), // Title
2180
+ array( $this, 'seopress_google_analytics_cd_category_callback' ), // Callback
2181
+ 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2182
+ 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2183
+ );
2184
+
2185
+ add_settings_field(
2186
+ 'seopress_google_analytics_cd_tag', // ID
2187
+ __("Track Tags","wp-seopress"), // Title
2188
+ array( $this, 'seopress_google_analytics_cd_tag_callback' ), // Callback
2189
+ 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2190
+ 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2191
+ );
2192
+
2193
+ add_settings_field(
2194
+ 'seopress_google_analytics_cd_post_type', // ID
2195
+ __("Track Post Types","wp-seopress"), // Title
2196
+ array( $this, 'seopress_google_analytics_cd_post_type_callback' ), // Callback
2197
+ 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2198
+ 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2199
+ );
2200
+
2201
+ add_settings_field(
2202
+ 'seopress_google_analytics_cd_logged_in_user', // ID
2203
+ __("Track Logged In Users","wp-seopress"), // Title
2204
+ array( $this, 'seopress_google_analytics_cd_logged_in_user_callback' ), // Callback
2205
+ 'seopress-settings-admin-google-analytics-custom-dimensions', // Page
2206
+ 'seopress_setting_section_google_analytics_custom_dimensions' // Section
2207
+ );
2208
+
2209
+ //Matomo SECTION===========================================================================
2210
+ add_settings_section(
2211
+ 'seopress_setting_section_google_analytics_matomo', // ID
2212
+ '',
2213
+ //__("Google Analytics","wp-seopress"), // Title
2214
+ array( $this, 'print_section_info_google_analytics_matomo' ), // Callback
2215
+ 'seopress-settings-admin-google-analytics-matomo' // Page
2216
+ );
2217
+
2218
+ add_settings_field(
2219
+ 'seopress_google_analytics_matomo_enable', // ID
2220
+ __("Enable Matomo tracking","wp-seopress"), // Title
2221
+ array( $this, 'seopress_google_analytics_matomo_enable_callback' ), // Callback
2222
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2223
+ 'seopress_setting_section_google_analytics_matomo' // Section
2224
+ );
2225
+
2226
+ add_settings_field(
2227
+ 'seopress_google_analytics_matomo_id', // ID
2228
+ __("Enter your tracking ID","wp-seopress"), // Title
2229
+ array( $this, 'seopress_google_analytics_matomo_id_callback' ), // Callback
2230
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2231
+ 'seopress_setting_section_google_analytics_matomo' // Section
2232
+ );
2233
+
2234
+ add_settings_field(
2235
+ 'seopress_google_analytics_matomo_site_id', // ID
2236
+ __("Enter your site ID","wp-seopress"), // Title
2237
+ array( $this, 'seopress_google_analytics_matomo_site_id_callback' ), // Callback
2238
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2239
+ 'seopress_setting_section_google_analytics_matomo' // Section
2240
+ );
2241
+
2242
+ add_settings_field(
2243
+ 'seopress_google_analytics_matomo_subdomains', // ID
2244
+ __("Track visitors across all subdomains","wp-seopress"), // Title
2245
+ array( $this, 'seopress_google_analytics_matomo_subdomains_callback' ), // Callback
2246
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2247
+ 'seopress_setting_section_google_analytics_matomo' // Section
2248
+ );
2249
+
2250
+ add_settings_field(
2251
+ 'seopress_google_analytics_matomo_site_domain', // ID
2252
+ __("Prepend the site domain","wp-seopress"), // Title
2253
+ array( $this, 'seopress_google_analytics_matomo_site_domain_callback' ), // Callback
2254
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2255
+ 'seopress_setting_section_google_analytics_matomo' // Section
2256
+ );
2257
+
2258
+ add_settings_field(
2259
+ 'seopress_google_analytics_matomo_no_js', // ID
2260
+ __("Track users with JavaScript disabled","wp-seopress"), // Title
2261
+ array( $this, 'seopress_google_analytics_matomo_no_js_callback' ), // Callback
2262
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2263
+ 'seopress_setting_section_google_analytics_matomo' // Section
2264
+ );
2265
+
2266
+ add_settings_field(
2267
+ 'seopress_google_analytics_matomo_cross_domain', // ID
2268
+ __("Enables cross domain linking","wp-seopress"), // Title
2269
+ array( $this, 'seopress_google_analytics_matomo_cross_domain_callback' ), // Callback
2270
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2271
+ 'seopress_setting_section_google_analytics_matomo' // Section
2272
+ );
2273
+
2274
+ add_settings_field(
2275
+ 'seopress_google_analytics_matomo_cross_domain_sites', // ID
2276
+ __("Cross domain","wp-seopress"), // Title
2277
+ array( $this, 'seopress_google_analytics_matomo_cross_domain_sites_callback' ), // Callback
2278
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2279
+ 'seopress_setting_section_google_analytics_matomo' // Section
2280
+ );
2281
+ add_settings_field(
2282
+ 'seopress_google_analytics_matomo_dnt', // ID
2283
+ __("Enable DoNotTrack detection","wp-seopress"), // Title
2284
+ array( $this, 'seopress_google_analytics_matomo_dnt_callback' ), // Callback
2285
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2286
+ 'seopress_setting_section_google_analytics_matomo' // Section
2287
+ );
2288
+
2289
+ add_settings_field(
2290
+ 'seopress_google_analytics_matomo_no_cookies', // ID
2291
+ __("Disable all tracking cookies","wp-seopress"), // Title
2292
+ array( $this, 'seopress_google_analytics_matomo_no_cookies_callback' ), // Callback
2293
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2294
+ 'seopress_setting_section_google_analytics_matomo' // Section
2295
+ );
2296
+
2297
+ add_settings_field(
2298
+ 'seopress_google_analytics_matomo_link_tracking', // ID
2299
+ __("Download & Outlink tracking","wp-seopress"), // Title
2300
+ array( $this, 'seopress_google_analytics_matomo_link_tracking_callback' ), // Callback
2301
+ 'seopress-settings-admin-google-analytics-matomo', // Page
2302
+ 'seopress_setting_section_google_analytics_matomo' // Section
2303
+ );
2304
+
2305
+ //Advanced SECTION=========================================================================
2306
+ add_settings_section(
2307
+ 'seopress_setting_section_advanced_advanced', // ID
2308
+ '',
2309
+ //__("Advanced","wp-seopress"), // Title
2310
+ array( $this, 'print_section_info_advanced_advanced' ), // Callback
2311
+ 'seopress-settings-admin-advanced-advanced' // Page
2312
+ );
2313
+
2314
+ add_settings_field(
2315
+ 'seopress_advanced_advanced_attachments', // ID
2316
+ __("Redirect attachment pages to post parent","wp-seopress"), // Title
2317
+ array( $this, 'seopress_advanced_advanced_attachments_callback' ), // Callback
2318
+ 'seopress-settings-admin-advanced-advanced', // Page
2319
+ 'seopress_setting_section_advanced_advanced' // Section
2320
+ );
2321
+
2322
+ add_settings_field(
2323
+ 'seopress_advanced_advanced_attachments_file', // ID
2324
+ __("Redirect attachment pages to their file URL","wp-seopress"), // Title
2325
+ array( $this, 'seopress_advanced_advanced_attachments_file_callback' ), // Callback
2326
+ 'seopress-settings-admin-advanced-advanced', // Page
2327
+ 'seopress_setting_section_advanced_advanced' // Section
2328
+ );
2329
+
2330
+ add_settings_field(
2331
+ 'seopress_advanced_advanced_replytocom', // ID
2332
+ __("Remove ?replytocom link to avoid duplicate content","wp-seopress"), // Title
2333
+ array( $this, 'seopress_advanced_advanced_replytocom_callback' ), // Callback
2334
+ 'seopress-settings-admin-advanced-advanced', // Page
2335
+ 'seopress_setting_section_advanced_advanced' // Section
2336
+ );
2337
+
2338
+ add_settings_field(
2339
+ 'seopress_advanced_advanced_image_auto_title_editor', // ID
2340
+ __("Automatically set the image Title","wp-seopress"), // Title
2341
+ array( $this, 'seopress_advanced_advanced_image_auto_title_editor_callback' ), // Callback
2342
+ 'seopress-settings-admin-advanced-advanced', // Page
2343
+ 'seopress_setting_section_advanced_advanced' // Section
2344
+ );
2345
+
2346
+ add_settings_field(
2347
+ 'seopress_advanced_advanced_image_auto_alt_editor', // ID
2348
+ __("Automatically set the image Alt text","wp-seopress"), // Title
2349
+ array( $this, 'seopress_advanced_advanced_image_auto_alt_editor_callback' ), // Callback
2350
+ 'seopress-settings-admin-advanced-advanced', // Page
2351
+ 'seopress_setting_section_advanced_advanced' // Section
2352
+ );
2353
+
2354
+ add_settings_field(
2355
+ 'seopress_advanced_advanced_image_auto_caption_editor', // ID
2356
+ __("Automatically set the image Caption","wp-seopress"), // Title
2357
+ array( $this, 'seopress_advanced_advanced_image_auto_caption_editor_callback' ), // Callback
2358
+ 'seopress-settings-admin-advanced-advanced', // Page
2359
+ 'seopress_setting_section_advanced_advanced' // Section
2360
+ );
2361
+
2362
+ add_settings_field(
2363
+ 'seopress_advanced_advanced_image_auto_desc_editor', // ID
2364
+ __("Automatically set the image Description","wp-seopress"), // Title
2365
+ array( $this, 'seopress_advanced_advanced_image_auto_desc_editor_callback' ), // Callback
2366
+ 'seopress-settings-admin-advanced-advanced', // Page
2367
+ 'seopress_setting_section_advanced_advanced' // Section
2368
+ );
2369
+
2370
+ add_settings_field(
2371
+ 'seopress_advanced_advanced_tax_desc_editor', // ID
2372
+ __("Add WP Editor to taxonomy description textarea","wp-seopress"), // Title
2373
+ array( $this, 'seopress_advanced_advanced_tax_desc_editor_callback' ), // Callback
2374
+ 'seopress-settings-admin-advanced-advanced', // Page
2375
+ 'seopress_setting_section_advanced_advanced' // Section
2376
+ );
2377
+
2378
+ add_settings_field(
2379
+ 'seopress_advanced_advanced_category_url', // ID
2380
+ __("Remove /category/ in URL","wp-seopress"), // Title
2381
+ array( $this, 'seopress_advanced_advanced_category_url_callback' ), // Callback
2382
+ 'seopress-settings-admin-advanced-advanced', // Page
2383
+ 'seopress_setting_section_advanced_advanced' // Section
2384
+ );
2385
+
2386
+ add_settings_field(
2387
+ 'seopress_advanced_advanced_trailingslash', // ID
2388
+ __("Disable trailing slash for metas","wp-seopress"), // Title
2389
+ array( $this, 'seopress_advanced_advanced_trailingslash_callback' ), // Callback
2390
+ 'seopress-settings-admin-advanced-advanced', // Page
2391
+ 'seopress_setting_section_advanced_advanced' // Section
2392
+ );
2393
+
2394
+ add_settings_field(
2395
+ 'seopress_advanced_advanced_wp_generator', // ID
2396
+ __("Remove WordPress generator meta tag","wp-seopress"), // Title
2397
+ array( $this, 'seopress_advanced_advanced_wp_generator_callback' ), // Callback
2398
+ 'seopress-settings-admin-advanced-advanced', // Page
2399
+ 'seopress_setting_section_advanced_advanced' // Section
2400
+ );
2401
+
2402
+ add_settings_field(
2403
+ 'seopress_advanced_advanced_hentry', // ID
2404
+ __("Remove hentry post class","wp-seopress"), // Title
2405
+ array( $this, 'seopress_advanced_advanced_hentry_callback' ), // Callback
2406
+ 'seopress-settings-admin-advanced-advanced', // Page
2407
+ 'seopress_setting_section_advanced_advanced' // Section
2408
+ );
2409
+
2410
+ add_settings_field(
2411
+ 'seopress_advanced_advanced_comments_author_url', // ID
2412
+ __("Remove author URL","wp-seopress"), // Title
2413
+ array( $this, 'seopress_advanced_advanced_comments_author_url_callback' ), // Callback
2414
+ 'seopress-settings-admin-advanced-advanced', // Page
2415
+ 'seopress_setting_section_advanced_advanced' // Section
2416
+ );
2417
+
2418
+ add_settings_field(
2419
+ 'seopress_advanced_advanced_comments_website', // ID
2420
+ __("Remove website field in comment form","wp-seopress"), // Title
2421
+ array( $this, 'seopress_advanced_advanced_comments_website_callback' ), // Callback
2422
+ 'seopress-settings-admin-advanced-advanced', // Page
2423
+ 'seopress_setting_section_advanced_advanced' // Section
2424
+ );
2425
+
2426
+ add_settings_field(
2427
+ 'seopress_advanced_advanced_wp_shortlink', // ID
2428
+ __("Remove WordPress shortlink meta tag","wp-seopress"), // Title
2429
+ array( $this, 'seopress_advanced_advanced_wp_shortlink_callback' ), // Callback
2430
+ 'seopress-settings-admin-advanced-advanced', // Page
2431
+ 'seopress_setting_section_advanced_advanced' // Section
2432
+ );
2433
+
2434
+ add_settings_field(
2435
+ 'seopress_advanced_advanced_wp_wlw', // ID
2436
+ __("Remove Windows Live Writer meta tag","wp-seopress"), // Title
2437
+ array( $this, 'seopress_advanced_advanced_wp_wlw_callback' ), // Callback
2438
+ 'seopress-settings-admin-advanced-advanced', // Page
2439
+ 'seopress_setting_section_advanced_advanced' // Section
2440
+ );
2441
+
2442
+ add_settings_field(
2443
+ 'seopress_advanced_advanced_wp_rsd', // ID
2444
+ __("Remove RSD meta tag","wp-seopress"), // Title
2445
+ array( $this, 'seopress_advanced_advanced_wp_rsd_callback' ), // Callback
2446
+ 'seopress-settings-admin-advanced-advanced', // Page
2447
+ 'seopress_setting_section_advanced_advanced' // Section
2448
+ );
2449
+
2450
+ add_settings_field(
2451
+ 'seopress_advanced_advanced_google', // ID
2452
+ __("Google site verification","wp-seopress"), // Title
2453
+ array( $this, 'seopress_advanced_advanced_google_callback' ), // Callback
2454
+ 'seopress-settings-admin-advanced-advanced', // Page
2455
+ 'seopress_setting_section_advanced_advanced' // Section
2456
+ );
2457
+
2458
+ add_settings_field(
2459
+ 'seopress_advanced_advanced_bing', // ID
2460
+ __("Bing site verification","wp-seopress"), // Title
2461
+ array( $this, 'seopress_advanced_advanced_bing_callback' ), // Callback
2462
+ 'seopress-settings-admin-advanced-advanced', // Page
2463
+ 'seopress_setting_section_advanced_advanced' // Section
2464
+ );
2465
+
2466
+ add_settings_field(
2467
+ 'seopress_advanced_advanced_pinterest', // ID
2468
+ __("Pinterest site verification","wp-seopress"), // Title
2469
+ array( $this, 'seopress_advanced_advanced_pinterest_callback' ), // Callback
2470
+ 'seopress-settings-admin-advanced-advanced', // Page
2471
+ 'seopress_setting_section_advanced_advanced' // Section
2472
+ );
2473
+
2474
+ add_settings_field(
2475
+ 'seopress_advanced_advanced_yandex', // ID
2476
+ __("Yandex site verification","wp-seopress"), // Title
2477
+ array( $this, 'seopress_advanced_advanced_yandex_callback' ), // Callback
2478
+ 'seopress-settings-admin-advanced-advanced', // Page
2479
+ 'seopress_setting_section_advanced_advanced' // Section
2480
+ );
2481
+
2482
+ //Appearance SECTION=======================================================================
2483
+ add_settings_section(
2484
+ 'seopress_setting_section_advanced_appearance', // ID
2485
+ '',
2486
+ //__("Appearance","wp-seopress"), // Title
2487
+ array( $this, 'print_section_info_advanced_appearance' ), // Callback
2488
+ 'seopress-settings-admin-advanced-appearance' // Page
2489
+ );
2490
+
2491
+ add_settings_field(
2492
+ 'seopress_advanced_appearance_adminbar', // ID
2493
+ __("SEOPress in admin bar","wp-seopress"), // Title
2494
+ array( $this, 'seopress_advanced_appearance_adminbar_callback' ), // Callback
2495
+ 'seopress-settings-admin-advanced-appearance', // Page
2496
+ 'seopress_setting_section_advanced_appearance' // Section
2497
+ );
2498
+
2499
+ add_settings_field(
2500
+ 'seopress_advanced_appearance_metabox_position', // ID
2501
+ __("Move SEOPress metabox's position","wp-seopress"), // Title
2502
+ array( $this, 'seopress_advanced_appearance_metaboxe_position_callback' ), // Callback
2503
+ 'seopress-settings-admin-advanced-appearance', // Page
2504
+ 'seopress_setting_section_advanced_appearance' // Section
2505
+ );
2506
+
2507
+ add_settings_field(
2508
+ 'seopress_advanced_appearance_schema_default_tab', // ID
2509
+ __("Set default tab for Structured data metabox","wp-seopress"), // Title
2510
+ array( $this, 'seopress_advanced_appearance_schema_default_tab_callback' ), // Callback
2511
+ 'seopress-settings-admin-advanced-appearance', // Page
2512
+ 'seopress_setting_section_advanced_appearance' // Section
2513
+ );
2514
+
2515
+ add_settings_field(
2516
+ 'seopress_advanced_appearance_notifications', // ID
2517
+ __("Hide Notifications Center","wp-seopress"), // Title
2518
+ array( $this, 'seopress_advanced_appearance_notifications_callback' ), // Callback
2519
+ 'seopress-settings-admin-advanced-appearance', // Page
2520
+ 'seopress_setting_section_advanced_appearance' // Section
2521
+ );
2522
+
2523
+ add_settings_field(
2524
+ 'seopress_advanced_appearance_seo_tools', // ID
2525
+ __("Hide SEO tools","wp-seopress"), // Title
2526
+ array( $this, 'seopress_advanced_appearance_seo_tools_callback' ), // Callback
2527
+ 'seopress-settings-admin-advanced-appearance', // Page
2528
+ 'seopress_setting_section_advanced_appearance' // Section
2529
+ );
2530
+
2531
+ add_settings_field(
2532
+ 'seopress_advanced_appearance_useful_links', // ID
2533
+ __("Hide Useful Links","wp-seopress"), // Title
2534
+ array( $this, 'seopress_advanced_appearance_useful_links_callback' ), // Callback
2535
+ 'seopress-settings-admin-advanced-appearance', // Page
2536
+ 'seopress_setting_section_advanced_appearance' // Section
2537
+ );
2538
+
2539
+ add_settings_field(
2540
+ 'seopress_advanced_appearance_title_col', // ID
2541
+ __("Show Title tag column in post types","wp-seopress"), // Title
2542
+ array( $this, 'seopress_advanced_appearance_title_col_callback' ), // Callback
2543
+ 'seopress-settings-admin-advanced-appearance', // Page
2544
+ 'seopress_setting_section_advanced_appearance' // Section
2545
+ );
2546
+
2547
+ add_settings_field(
2548
+ 'seopress_advanced_appearance_meta_desc_col', // ID
2549
+ __("Show Meta description column in post types","wp-seopress"), // Title
2550
+ array( $this, 'seopress_advanced_appearance_meta_desc_col_callback' ), // Callback
2551
+ 'seopress-settings-admin-advanced-appearance', // Page
2552
+ 'seopress_setting_section_advanced_appearance' // Section
2553
+ );
2554
+
2555
+ add_settings_field(
2556
+ 'seopress_advanced_appearance_redirect_enable_col', // ID
2557
+ __("Show Redirection Enable column in post types","wp-seopress"), // Title
2558
+ array( $this, 'seopress_advanced_appearance_redirect_enable_col_callback' ), // Callback
2559
+ 'seopress-settings-admin-advanced-appearance', // Page
2560
+ 'seopress_setting_section_advanced_appearance' // Section
2561
+ );
2562
+
2563
+ add_settings_field(
2564
+ 'seopress_advanced_appearance_redirect_url_col', // ID
2565
+ __("Show Redirect URL column in post types","wp-seopress"), // Title
2566
+ array( $this, 'seopress_advanced_appearance_redirect_url_col_callback' ), // Callback
2567
+ 'seopress-settings-admin-advanced-appearance', // Page
2568
+ 'seopress_setting_section_advanced_appearance' // Section
2569
+ );
2570
+
2571
+ add_settings_field(
2572
+ 'seopress_advanced_appearance_canonical', // ID
2573
+ __("Show canonical URL column in post types","wp-seopress"), // Title
2574
+ array( $this, 'seopress_advanced_appearance_canonical_callback' ), // Callback
2575
+ 'seopress-settings-admin-advanced-appearance', // Page
2576
+ 'seopress_setting_section_advanced_appearance' // Section
2577
+ );
2578
+
2579
+ add_settings_field(
2580
+ 'seopress_advanced_appearance_target_kw_col', // ID
2581
+ __("Show Target Keyword column in post types","wp-seopress"), // Title
2582
+ array( $this, 'seopress_advanced_appearance_target_kw_col_callback' ), // Callback
2583
+ 'seopress-settings-admin-advanced-appearance', // Page
2584
+ 'seopress_setting_section_advanced_appearance' // Section
2585
+ );
2586
+
2587
+ add_settings_field(
2588
+ 'seopress_advanced_appearance_noindex_col', // ID
2589
+ __("Show noindex column in post types","wp-seopress"), // Title
2590
+ array( $this, 'seopress_advanced_appearance_noindex_col_callback' ), // Callback
2591
+ 'seopress-settings-admin-advanced-appearance', // Page
2592
+ 'seopress_setting_section_advanced_appearance' // Section
2593
+ );
2594
+
2595
+ add_settings_field(
2596
+ 'seopress_advanced_appearance_nofollow_col', // ID
2597
+ __("Show nofollow column in post types","wp-seopress"), // Title
2598
+ array( $this, 'seopress_advanced_appearance_nofollow_col_callback' ), // Callback
2599
+ 'seopress-settings-admin-advanced-appearance', // Page
2600
+ 'seopress_setting_section_advanced_appearance' // Section
2601
+ );
2602
+
2603
+ add_settings_field(
2604
+ 'seopress_advanced_appearance_words_col', // ID
2605
+ __("Show total number of words column in post types","wp-seopress"), // Title
2606
+ array( $this, 'seopress_advanced_appearance_words_col_callback' ), // Callback
2607
+ 'seopress-settings-admin-advanced-appearance', // Page
2608
+ 'seopress_setting_section_advanced_appearance' // Section
2609
+ );
2610
+
2611
+ add_settings_field(
2612
+ 'seopress_advanced_appearance_w3c_col', // ID
2613
+ __("Show W3C validator column in post types","wp-seopress"), // Title
2614
+ array( $this, 'seopress_advanced_appearance_w3c_col_callback' ), // Callback
2615
+ 'seopress-settings-admin-advanced-appearance', // Page
2616
+ 'seopress_setting_section_advanced_appearance' // Section
2617
+ );
2618
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
2619
+ add_settings_field(
2620
+ 'seopress_advanced_appearance_ps_col', // ID
2621
+ __("Show Google Page Speed column in post types","wp-seopress"), // Title
2622
+ array( $this, 'seopress_advanced_appearance_ps_col_callback' ), // Callback
2623
+ 'seopress-settings-admin-advanced-appearance', // Page
2624
+ 'seopress_setting_section_advanced_appearance' // Section
2625
+ );
2626
+ }
2627
+
2628
+ add_settings_field(
2629
+ 'seopress_advanced_appearance_score_col', // ID
2630
+ __("Show content analysis score column in post types","wp-seopress"), // Title
2631
+ array( $this, 'seopress_advanced_appearance_score_col_callback' ), // Callback
2632
+ 'seopress-settings-admin-advanced-appearance', // Page
2633
+ 'seopress_setting_section_advanced_appearance' // Section
2634
+ );
2635
+
2636
+ add_settings_field(
2637
+ 'seopress_advanced_appearance_genesis_seo_metaboxe', // ID
2638
+ __("Hide Genesis SEO Metabox","wp-seopress"), // Title
2639
+ array( $this, 'seopress_advanced_appearance_genesis_seo_metaboxe_callback' ), // Callback
2640
+ 'seopress-settings-admin-advanced-appearance', // Page
2641
+ 'seopress_setting_section_advanced_appearance' // Section
2642
+ );
2643
+
2644
+ add_settings_field(
2645
+ 'seopress_advanced_appearance_genesis_seo_menu', // ID
2646
+ __("Hide Genesis SEO Settings link","wp-seopress"), // Title
2647
+ array( $this, 'seopress_advanced_appearance_genesis_seo_menu_callback' ), // Callback
2648
+ 'seopress-settings-admin-advanced-appearance', // Page
2649
+ 'seopress_setting_section_advanced_appearance' // Section
2650
+ );
2651
+
2652
+ add_settings_field(
2653
+ 'seopress_advanced_appearance_advice_schema', // ID
2654
+ __("Hide advice in Structured Data Types metabox","wp-seopress"), // Title
2655
+ array( $this, 'seopress_advanced_appearance_advice_schema_callback' ), // Callback
2656
+ 'seopress-settings-admin-advanced-appearance', // Page
2657
+ 'seopress_setting_section_advanced_appearance' // Section
2658
+ );
2659
+
2660
+ //Security SECTION=======================================================================
2661
+ add_settings_section(
2662
+ 'seopress_setting_section_advanced_security', // ID
2663
+ '',
2664
+ //__("Security","wp-seopress"), // Title
2665
+ array( $this, 'print_section_info_advanced_security' ), // Callback
2666
+ 'seopress-settings-admin-advanced-security' // Page
2667
+ );
2668
+
2669
+ add_settings_field(
2670
+ 'seopress_advanced_security_metaboxe_role', // ID
2671
+ __("Block SEO metabox to user roles","wp-seopress"), // Title
2672
+ array( $this, 'seopress_advanced_security_metaboxe_role_callback' ), // Callback
2673
+ 'seopress-settings-admin-advanced-security', // Page
2674
+ 'seopress_setting_section_advanced_security' // Section
2675
+ );
2676
+
2677
+ add_settings_field(
2678
+ 'seopress_advanced_security_metaboxe_ca_role', // ID
2679
+ __("Block Content analysis metabox to user roles","wp-seopress-pro"), // Title
2680
+ array( $this, 'seopress_advanced_security_metaboxe_ca_role_callback' ), // Callback
2681
+ 'seopress-settings-admin-advanced-security', // Page
2682
+ 'seopress_setting_section_advanced_security' // Section
2683
+ );
2684
+ }
2685
+
2686
+ /**
2687
+ * Sanitize each setting field as needed
2688
+ *
2689
+ * @param array $input Contains all settings fields as array keys
2690
+ */
2691
+ public function sanitize( $input )
2692
+ {
2693
+ $seopress_sanitize_fields = [
2694
+ 'seopress_titles_sep',
2695
+ 'seopress_titles_home_site_title',
2696
+ 'seopress_titles_home_site_desc',
2697
+ 'seopress_titles_archives_author_title',
2698
+ 'seopress_titles_archives_author_desc',
2699
+ 'seopress_titles_archives_date_title',
2700
+ 'seopress_titles_archives_date_desc',
2701
+ 'seopress_titles_archives_search_title',
2702
+ 'seopress_titles_archives_search_desc',
2703
+ 'seopress_titles_archives_404_title',
2704
+ 'seopress_titles_archives_404_desc',
2705
+ 'seopress_xml_sitemap_html_exclude',
2706
+ 'seopress_social_knowledge_name',
2707
+ 'seopress_social_knowledge_img',
2708
+ 'seopress_social_knowledge_phone',
2709
+ 'seopress_social_accounts_facebook',
2710
+ 'seopress_social_accounts_twitter',
2711
+ 'seopress_social_accounts_pinterest',
2712
+ 'seopress_social_accounts_instagram',
2713
+ 'seopress_social_accounts_youtube',
2714
+ 'seopress_social_accounts_linkedin',
2715
+ 'seopress_social_accounts_myspace',
2716
+ 'seopress_social_accounts_soundcloud',
2717
+ 'seopress_social_accounts_tumblr',
2718
+ 'seopress_social_facebook_link_ownership_id',
2719
+ 'seopress_social_facebook_admin_id',
2720
+ 'seopress_social_facebook_app_id',
2721
+ 'seopress_google_analytics_ua',
2722
+ 'seopress_google_analytics_download_tracking',
2723
+ 'seopress_google_analytics_opt_out_msg',
2724
+ 'seopress_google_analytics_opt_out_msg_ok',
2725
+ 'seopress_google_analytics_other_tracking',
2726
+ 'seopress_google_analytics_other_tracking_body',
2727
+ 'seopress_google_analytics_optimize',
2728
+ 'seopress_google_analytics_ads',
2729
+ 'seopress_google_analytics_cross_domain',
2730
+ 'seopress_google_analytics_matomo_id',
2731
+ 'seopress_google_analytics_matomo_site_id',
2732
+ 'seopress_google_analytics_matomo_cross_domain_sites'
2733
+ ];
2734
+
2735
+ $seopress_sanitize_site_verification = [
2736
+ 'seopress_advanced_advanced_google',
2737
+ 'seopress_advanced_advanced_bing',
2738
+ 'seopress_advanced_advanced_pinterest',
2739
+ 'seopress_advanced_advanced_yandex'
2740
+ ];
2741
+
2742
+ foreach ($seopress_sanitize_fields as $value) {
2743
+ if (!empty( $input['seopress_google_analytics_opt_out_msg'] ) && $value =='seopress_google_analytics_opt_out_msg') {
2744
+ $args = [
2745
+ 'strong' => [],
2746
+ 'em' => [],
2747
+ 'br' => [],
2748
+ 'a' => [
2749
+ 'href' => [],
2750
+ 'target' => []
2751
+ ]
2752
+ ];
2753
+ $input[$value] = wp_kses($input[$value], $args);
2754
+ } elseif ((!empty( $input['seopress_google_analytics_other_tracking'] ) && $value =='seopress_google_analytics_other_tracking') || (!empty( $input['seopress_google_analytics_other_tracking_body'] ) && $value =='seopress_google_analytics_other_tracking_body') || (!empty( $input['seopress_google_analytics_other_tracking_footer'] ) && $value =='seopress_google_analytics_other_tracking_footer')) {
2755
+ $input[$value] = $input[$value]; //No sanitization for this field
2756
+ } elseif( !empty( $input[$value] ) ) {
2757
+ $input[$value] = sanitize_text_field( $input[$value] );
2758
+ }
2759
+ }
2760
+
2761
+ foreach ($seopress_sanitize_site_verification as $value) {
2762
+ if( !empty( $input[$value] ) ) {
2763
+ if (preg_match('#content=\'([^"]+)\'#', $input[$value], $m)) {
2764
+ $input[$value] = $m[1];
2765
+ } elseif (preg_match('#content="([^"]+)"#', $input[$value], $m)) {
2766
+ $input[$value] = $m[1];
2767
+ }
2768
+ }
2769
+ }
2770
+
2771
+ return $input;
2772
+ }
2773
+
2774
+ /**
2775
+ * Print the Section text
2776
+ */
2777
+
2778
+ public function print_section_info_titles() {
2779
+ print __('<p>Customize your title & meta description for homepage</p>', 'wp-seopress');
2780
+ }
2781
+
2782
+ public function print_section_info_single() {
2783
+ print __('<p>Customize your titles & metas for Single Custom Post Types</p>', 'wp-seopress');
2784
+ }
2785
+
2786
+ public function print_section_info_advanced() {
2787
+ print __('<p>Customize your metas for all pages</p>', 'wp-seopress');
2788
+ }
2789
+
2790
+ public function print_section_info_tax() {
2791
+ print __('<p>Customize your metas for all taxonomies archives</p>', 'wp-seopress');
2792
+ }
2793
+
2794
+ public function print_section_info_archives() {
2795
+ print __('<p>Customize your metas for all archives</p>', 'wp-seopress');
2796
+ }
2797
+
2798
+ public function print_section_info_xml_sitemap_general() {
2799
+ if (get_option('permalink_structure') =='') {
2800
+ echo '<div class="error notice is-dismissable">';
2801
+ echo '<p>'. __('Your permalinks are not SEO Friendly! Enable pretty permalinks to fix this.','wp-seopress');
2802
+ echo ' <a href="'.admin_url("options-permalink.php").'">'.__('Change this settings','wp-seopress').'</a></p>';
2803
+ echo '</div>';
2804
+ }
2805
+ echo '<p>'.__('To view your sitemap, enable permalinks (not default one), and save settings to flush them.', 'wp-seopress').'</p>';
2806
+
2807
+ if ( isset( $_SERVER['SERVER_SOFTWARE'] )) {
2808
+ $server_software = explode('/', $_SERVER['SERVER_SOFTWARE']);
2809
+ reset($server_software);
2810
+ if (current($server_software) =='nginx' ) { //IF NGINX
2811
+ echo '<p>'.__('Your server uses NGINX. If XML Sitemaps doesn\'t work properly, you need to add this rule to your configuration:', 'wp-seopress').'</p><br>';
2812
+ echo '<pre style="margin:0;padding:10px;font-weight: bold;background:#F3F3F3;display:inline-block;width: 100%">
2813
+ location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
2814
+ ## SEOPress
2815
+ rewrite ^/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
2816
+ rewrite ^/sitemaps/news.xml$ /index.php?seopress_news=$1 last;
2817
+ rewrite ^/sitemaps/video.xml$ /index.php?seopress_video=$1 last;
2818
+ rewrite ^/sitemaps/author.xml$ /index.php?seopress_author=$1 last;
2819
+ rewrite ^/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
2820
+ rewrite ^/sitemaps/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?seopress_cpt=$1&seopress_paged=$2 last;
2821
+ }
2822
+ </pre>';
2823
+ }
2824
+ }
2825
+ echo '<p>'.__('Noindex content will not be displayed in Sitemaps.', 'wp-seopress').'</p>';
2826
+
2827
+ if (function_exists('seopress_get_locale')) {
2828
+ if (seopress_get_locale() =='fr') {
2829
+ $seopress_docs_link['sitemaps']['error']['blank'] = 'https://www.seopress.org/fr/support/guides/xml-sitemap-page-blanche/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2830
+ $seopress_docs_link['sitemaps']['error']['404'] = 'https://www.seopress.org/fr/support/guides/plan-de-site-xml-retourne-erreur-404/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2831
+ } else {
2832
+ $seopress_docs_link['sitemaps']['error']['blank'] = 'https://www.seopress.org/support/guides/xml-sitemap-blank-page/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2833
+ $seopress_docs_link['sitemaps']['error']['404'] = 'https://www.seopress.org/support/guides/xml-sitemap-returns-404-error/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2834
+ }
2835
+ }
2836
+
2837
+ echo '<p><span class="dashicons dashicons-external"></span><a href="'.$seopress_docs_link['sitemaps']['error']['blank'].'" target="_blank">'.__('Blank sitemap?', 'wp-seopress').'</a> - ';
2838
+ echo '<span class="dashicons dashicons-external"></span><a href="'.$seopress_docs_link['sitemaps']['error']['404'].'" target="_blank">'.__('404 error?', 'wp-seopress').'</a></p><br>';
2839
+
2840
+ echo '<a href="'.get_option( 'home' ).'/sitemaps.xml" target="_blank" class="button"><span class="dashicons dashicons-visibility"></span>'.__('View your sitemap','wp-seopress').'</a>';
2841
+ echo '&nbsp;';
2842
+ echo '<a href="https://www.google.com/ping?sitemap='.get_option( 'home' ).'/sitemaps.xml/" target="_blank" class="button"><span class="dashicons dashicons-share-alt2"></span>'.__('Ping Google manually','wp-seopress').'</a>';
2843
+ echo '&nbsp;';
2844
+ echo '<button type="button" id="seopress-flush-permalinks" class="button"><span class="dashicons dashicons-admin-links"></span>'.__('Flush permalinks','wp-seopress').'</button>';
2845
+ echo '<span class="spinner"></span>';
2846
+ }
2847
+
2848
+ public function print_section_info_html_sitemap() {
2849
+ print __('<p>Create an HTML Sitemap for your visitors and boost your SEO.</p>', 'wp-seopress');
2850
+
2851
+ if (function_exists('seopress_get_locale')) {
2852
+ if (seopress_get_locale() =='fr') {
2853
+ $seopress_docs_link['sitemaps']['html'] = 'https://www.seopress.org/fr/support/guides/activer-plan-de-site-html/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2854
+ } else {
2855
+ $seopress_docs_link['sitemaps']['html'] = 'https://www.seopress.org/support/guides/enable-html-sitemap/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2856
+ }
2857
+ }
2858
+
2859
+ echo '<a class="seopress-doc" href="'.$seopress_docs_link['sitemaps']['html'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable a HTML Sitemap - new window','wp-seopress').'</span></a></p>';
2860
+ }
2861
+
2862
+ public function print_section_info_xml_sitemap_post_types() {
2863
+ print __('<p>Include/Exclude Post Types.</p>', 'wp-seopress');
2864
+ }
2865
+
2866
+ public function print_section_info_xml_sitemap_taxonomies() {
2867
+ print __('<p>Include/Exclude Taxonomies.</p>', 'wp-seopress');
2868
+ }
2869
+
2870
+ public function print_section_info_social_knowledge() {
2871
+ print __('<p>Configure Google Knowledge Graph.</p>', 'wp-seopress');
2872
+ echo '<p><span class="dashicons dashicons-external"></span><a href="https://developers.google.com/search/docs/guides/enhance-site" target="_blank">'.__('Learn more on Google official website.','wp-seopress').'</a></p>';
2873
+ }
2874
+
2875
+ public function print_section_info_social_accounts() {
2876
+ print __('<p>Link your site with your social accounts. Use markup on your website to add your social profile information to a Google Knowledge panel. Knowledge panels prominently display your social profile information in some Google Search results. Filling in these fields does not guarantee the display of this data in search results. It may take a long time to see these social-network links.</p>', 'wp-seopress');
2877
+ }
2878
+
2879
+ public function print_section_info_social_facebook() {
2880
+ print __('<p>Manage Open Graph data.</p>', 'wp-seopress');
2881
+
2882
+ echo __('<p>We generate the <strong>og:image</strong> meta in this order:</p>','wp-seopress');
2883
+
2884
+ echo '
2885
+ <ol>
2886
+ <li>'.__('Custom OG Image from SEO metabox','wp-seopress').'</li>
2887
+ <li>'.__('Post thumbnail','wp-seopress').'</li>
2888
+ <li>'.__('First image of your post content','wp-seopress').'</li>
2889
+ <li>'.__('Global OG Image set in SEO > Social > Open Graph','wp-seopress').'</li>
2890
+ </ol>';
2891
+ }
2892
+
2893
+ public function print_section_info_social_twitter() {
2894
+ print __('<p>Manage your Twitter card.</p>', 'wp-seopress');
2895
+
2896
+ echo __('<p>We generate the <strong>twitter:image</strong> meta in this order:</p>','wp-seopress');
2897
+
2898
+ echo '
2899
+ <ol>
2900
+ <li>'.__('Custom Twitter image from SEO metabox','wp-seopress').'</li>
2901
+ <li>'.__('Post thumbnail','wp-seopress').'</li>
2902
+ <li>'.__('First image of your post content','wp-seopress').'</li>
2903
+ <li>'.__('Global Twitter:image set in SEO > Social > Twitter Card','wp-seopress').'</li>
2904
+ </ol>';
2905
+ }
2906
+
2907
+ public function print_section_info_google_analytics_enable() {
2908
+ print __('<p>Link your Google Analytics to your website. The tracking code will be automatically added to your site.</p>', 'wp-seopress');
2909
+ }
2910
+
2911
+ public function print_section_info_google_analytics_gdpr() {
2912
+ print __('<p>Manage user consent for GDPR and customize your cookie bar easily.</p>', 'wp-seopress');
2913
+ }
2914
+
2915
+ public function print_section_info_google_analytics_features() {
2916
+ print __('<p>Configure your Google Analytics tracking code.</p>', 'wp-seopress');
2917
+ }
2918
+
2919
+ public function print_section_info_google_analytics_events() {
2920
+ print __('<p>Track events in Google Analytics.</p>', 'wp-seopress');
2921
+ }
2922
+
2923
+ public function print_section_info_google_analytics_custom_dimensions() {
2924
+ print __('<p>Configure your Google Analytics custom dimensions. <br>Custom dimensions and custom metrics in SEOPress are like the default dimensions and metrics in your Analytics account, except you create them yourself.<br> Use them to collect and analyze data that Analytics doesn\'t automatically track.<br> Please note that you also have to setup your custom dimensions in your Google Analytics account. More info by clicking on the help icon.', 'wp-seopress');
2925
+
2926
+ echo '<p>'.__('Custom dimensions also work with <strong>Matomo</strong> tracking code.','wp-seopress').'</p>';
2927
+
2928
+ if (function_exists('seopress_get_locale')) {
2929
+ if (seopress_get_locale() =='fr') {
2930
+ $seopress_docs_link['support']['analytics']['custom_dimensions'] = 'https://www.seopress.org/fr/support/guides/creer-dimensions-personnalisees-google-analytics/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2931
+ } else {
2932
+ $seopress_docs_link['support']['analytics']['custom_dimensions'] = 'https://www.seopress.org/support/guides/create-custom-dimension-google-analytics/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
2933
+ }
2934
+ }
2935
+
2936
+ echo '<a class="seopress-doc" href="'.$seopress_docs_link['support']['analytics']['custom_dimensions'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to create custom dimensions in Google Analytics - new window','wp-seopress').'</span></a></p>';
2937
+ }
2938
+
2939
+ public function print_section_info_google_analytics_matomo() {
2940
+ print __('<p>Use Matomo to track your users with privacy in mind.</p>', 'wp-seopress');
2941
+
2942
+ echo '<p>'.__('Your <strong>Custom Dimensions</strong> will also work with Matomo tracking code','wp-seopress').'</p>';
2943
+ }
2944
+
2945
+ public function print_section_info_advanced_advanced() {
2946
+ print __('<p>Advanced SEO options.</p>', 'wp-seopress');
2947
+ }
2948
+
2949
+ public function print_section_info_advanced_appearance() {
2950
+ print __('<p>Customize SEOPress to fit your needs.</p>', 'wp-seopress');
2951
+ }
2952
+
2953
+ public function print_section_info_advanced_security() {
2954
+ print __('<p>Manage security.</p>', 'wp-seopress');
2955
+ }
2956
+
2957
+ /**
2958
+ * Get the settings option array and print one of its values
2959
+ */
2960
+
2961
+ //Titles & metas
2962
+ public function seopress_titles_sep_callback()
2963
+ {
2964
+ $check = isset($this->options['seopress_titles_sep']) ? $this->options['seopress_titles_sep'] : NULL;
2965
+
2966
+ printf(
2967
+ '<input type="text" id="seopress_titles_sep" name="seopress_titles_option_name[seopress_titles_sep]" placeholder="'.esc_html__('Enter your separator, eg: "-"','wp-seopress').'" aria-label="'.__('Separator','wp-seopress').'" value="%s"/>',
2968
+ esc_html( $check )
2969
+ );
2970
+
2971
+ echo '<p class="description">'.__('Use this separator with %%sep%% in your title and meta description.','wp-seopress').'</p>';
2972
+ }
2973
+
2974
+ public function seopress_titles_home_site_title_callback()
2975
+ {
2976
+ printf(
2977
+ '<input type="text" id="seopress_titles_home_site_title" name="seopress_titles_option_name[seopress_titles_home_site_title]" placeholder="'.esc_html__('My awesome website','wp-seopress').'" aria-label="'.__('Site title','wp-seopress').'" value="%s"/>',
2978
+ esc_html( $this->options['seopress_titles_home_site_title'])
2979
+ );
2980
+ echo '<div class="wrap-tags"><span id="seopress-tag-site-title" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
2981
+ echo '<span id="seopress-tag-site-sep" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
2982
+ echo '<span id="seopress-tag-site-desc" data-tag="%%tagline%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tagline','wp-seopress').'</span>';
2983
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
2984
+ }
2985
+
2986
+ public function seopress_titles_home_site_desc_callback()
2987
+ {
2988
+ printf(
2989
+ '<textarea id="seopress_titles_home_site_desc" name="seopress_titles_option_name[seopress_titles_home_site_desc]" placeholder="'.esc_html__('This is a cool website about Wookiees','wp-seopress').'" aria-label="'.__('Meta description','wp-seopress').'">%s</textarea>',
2990
+ esc_html( $this->options['seopress_titles_home_site_desc'])
2991
+
2992
+ );
2993
+ echo '<div class="wrap-tags"><span id="seopress-tag-meta-desc" data-tag="%%tagline%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tagline','wp-seopress').'</span>';
2994
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
2995
+
2996
+ if (get_option( 'page_for_posts' )) {
2997
+ echo '<p><a href="'.admin_url('post.php?post='.get_option( 'page_for_posts' ).'&action=edit').'">'.__('Looking to edit your blog page?','wp-seopress').'</a></p>';
2998
+ }
2999
+ }
3000
+
3001
+ //Single CPT
3002
+ public function seopress_titles_single_titles_callback()
3003
+ {
3004
+ foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
3005
+ echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em></h2>';
3006
+
3007
+ //Single on/off CPT
3008
+ echo '<div class="seopress_wrap_single_cpt">';
3009
+
3010
+ $options = get_option( 'seopress_titles_option_name' );
3011
+
3012
+ $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['enable']) ? $options['seopress_titles_single_titles'][$seopress_cpt_key]['enable'] : NULL;
3013
+
3014
+ echo '<input id="seopress_titles_single_cpt_enable['.$seopress_cpt_key.']" data-id='.$seopress_cpt_key.' name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][enable]" class="toggle" type="checkbox"';
3015
+ if ('1' == $check) {
3016
+ echo 'checked="yes" data-toggle="0"';
3017
+ } else {
3018
+ echo 'data-toggle="1"';
3019
+ };
3020
+ echo ' value="1"/>';
3021
+
3022
+ echo '<label for="seopress_titles_single_cpt_enable['.$seopress_cpt_key.']">'. __( 'Click to hide any SEO metaboxes for this post type', 'wp-seopress' ) .'</label>';
3023
+
3024
+ if ('1' == $check) {
3025
+ echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
3026
+ echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
3027
+ } else {
3028
+ echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
3029
+ echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this post type', 'wp-seopress') .'</span>';
3030
+ }
3031
+
3032
+ $toggle_txt_on = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to display any SEO metaboxes for this post type','wp-seopress');
3033
+ $toggle_txt_off = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to hide any SEO metaboxes for this post type','wp-seopress');
3034
+
3035
+ echo "<script>
3036
+ jQuery(document).ready(function($) {
3037
+ $('input[data-id=".$seopress_cpt_key."]').on('click', function() {
3038
+ $(this).attr('data-toggle', $(this).attr('data-toggle') == '1' ? '0' : '1');
3039
+ if ($(this).attr('data-toggle') == '1') {
3040
+ $(this).next().next('.feature-state').html('".$toggle_txt_off."');
3041
+ } else {
3042
+ $(this).next().next('.feature-state').html('".$toggle_txt_on."');
3043
+ }
3044
+ });
3045
+ });
3046
+ </script>";
3047
+
3048
+ if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['enable'])) {
3049
+ esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['enable']);
3050
+ }
3051
+
3052
+ echo '</div>';
3053
+
3054
+ //Single Title CPT
3055
+ echo '<div class="seopress_wrap_single_cpt">';
3056
+
3057
+ _e('Title template','wp-seopress');
3058
+
3059
+ $check = isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['title']) ? $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['title'] : NULL;
3060
+
3061
+ echo "<br/>";
3062
+
3063
+ echo "<script>
3064
+ jQuery(document).ready(function($) {
3065
+ $('#seopress-tag-single-title-".$seopress_cpt_key."').click(function() {
3066
+ $('#seopress_titles_single_titles_".$seopress_cpt_key."').val($('#seopress_titles_single_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-single-title-".$seopress_cpt_key."').attr('data-tag'));
3067
+ });
3068
+ $('#seopress-tag-sep-".$seopress_cpt_key."').click(function() {
3069
+ $('#seopress_titles_single_titles_".$seopress_cpt_key."').val($('#seopress_titles_single_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-sep-".$seopress_cpt_key."').attr('data-tag'));
3070
+ });
3071
+ $('#seopress-tag-single-sitetitle-".$seopress_cpt_key."').click(function() {
3072
+ $('#seopress_titles_single_titles_".$seopress_cpt_key."').val($('#seopress_titles_single_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-single-sitetitle-".$seopress_cpt_key."').attr('data-tag'));
3073
+ });
3074
+ });
3075
+ </script>";
3076
+
3077
+ printf(
3078
+ '<input type="text" id="seopress_titles_single_titles_'.$seopress_cpt_key.'" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][title]" value="%s"/>',
3079
+ esc_html( $check )
3080
+ );
3081
+
3082
+ echo '<div class="wrap-tags"><span id="seopress-tag-single-title-'.$seopress_cpt_key.'" data-tag="%%post_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Post Title','wp-seopress').'</span>';
3083
+
3084
+ echo '<span id="seopress-tag-sep-'.$seopress_cpt_key.'" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3085
+
3086
+ echo '<span id="seopress-tag-single-sitetitle-'.$seopress_cpt_key.'" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3087
+
3088
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3089
+
3090
+ echo '</div>';
3091
+
3092
+ //Single Meta Description CPT
3093
+ echo '<div class="seopress_wrap_single_cpt">';
3094
+
3095
+ _e('Meta description template','wp-seopress');
3096
+ echo "<br/>";
3097
+
3098
+ $check = isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['description']) ? $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['description'] : NULL;
3099
+
3100
+ printf(
3101
+ '<textarea name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][description]">%s</textarea>',
3102
+ esc_html( $check )
3103
+ );
3104
+
3105
+ echo '</div>';
3106
+
3107
+ //Single No-Index CPT
3108
+ echo '<div class="seopress_wrap_single_cpt">';
3109
+
3110
+ $options = get_option( 'seopress_titles_option_name' );
3111
+
3112
+ $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex']);
3113
+
3114
+ echo '<input id="seopress_titles_single_cpt_noindex['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][noindex]" type="checkbox"';
3115
+ if ('1' == $check) echo 'checked="yes"';
3116
+ echo ' value="1"/>';
3117
+
3118
+ echo '<label for="seopress_titles_single_cpt_noindex['.$seopress_cpt_key.']">'. __( 'Do not display this single post type in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3119
+
3120
+ if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex'])) {
3121
+ esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex']);
3122
+ }
3123
+
3124
+ echo '</div>';
3125
+
3126
+ //Single No-Follow CPT
3127
+ echo '<div class="seopress_wrap_single_cpt">';
3128
+
3129
+ $options = get_option( 'seopress_titles_option_name' );
3130
+
3131
+ $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['nofollow']);
3132
+
3133
+ echo '<input id="seopress_titles_single_cpt_nofollow['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][nofollow]" type="checkbox"';
3134
+ if ('1' == $check) echo 'checked="yes"';
3135
+ echo ' value="1"/>';
3136
+
3137
+ echo '<label for="seopress_titles_single_cpt_nofollow['.$seopress_cpt_key.']">'. __( 'Do not follow links for this single post type <strong>(nofollow)</strong>', 'wp-seopress' ) .'</label>';
3138
+
3139
+ if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['nofollow'])) {
3140
+ esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['nofollow']);
3141
+ }
3142
+
3143
+ echo '</div>';
3144
+
3145
+ //Single Published / modified date CPT
3146
+ echo '<div class="seopress_wrap_single_cpt">';
3147
+
3148
+ $options = get_option( 'seopress_titles_option_name' );
3149
+
3150
+ $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['date']);
3151
+
3152
+ echo '<input id="seopress_titles_single_cpt_date['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][date]" type="checkbox"';
3153
+ if ('1' == $check) echo 'checked="yes"';
3154
+ echo ' value="1"/>';
3155
+
3156
+ echo '<label for="seopress_titles_single_cpt_date['.$seopress_cpt_key.']">'. __( 'Display date in Google search results?', 'wp-seopress' ) .'</label>';
3157
+
3158
+ if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date'])) {
3159
+ esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date']);
3160
+ }
3161
+
3162
+ echo '</div>';
3163
+
3164
+ //Single meta thumbnail CPT
3165
+ echo '<div class="seopress_wrap_single_cpt">';
3166
+
3167
+ $options = get_option( 'seopress_titles_option_name' );
3168
+
3169
+ $check = isset($options['seopress_titles_single_titles'][$seopress_cpt_key]['thumb_gcs']);
3170
+
3171
+ echo '<input id="seopress_titles_single_cpt_thumb_gcs['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_single_titles]['.$seopress_cpt_key.'][thumb_gcs]" type="checkbox"';
3172
+ if ('1' == $check) echo 'checked="yes"';
3173
+ echo ' value="1"/>';
3174
+
3175
+ echo '<label for="seopress_titles_single_cpt_thumb_gcs['.$seopress_cpt_key.']">'. __( 'Display post thumbnail in Google Custom Search results?', 'wp-seopress' ) .'</label>';
3176
+
3177
+ if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['thumb_gcs'])) {
3178
+ esc_attr( $this->options['seopress_titles_single_titles'][$seopress_cpt_key]['thumb_gcs']);
3179
+ }
3180
+
3181
+ echo '</div>';
3182
+ }
3183
+ }
3184
+
3185
+ //Taxonomies
3186
+ public function seopress_titles_tax_titles_callback()
3187
+ {
3188
+ foreach (seopress_get_taxonomies() as $seopress_tax_key => $seopress_tax_value) {
3189
+
3190
+ echo '<h2>'.$seopress_tax_value->labels->name.' <em><small>['.$seopress_tax_value->name.']</small></em></h2>';
3191
+
3192
+ //Single on/off Tax
3193
+ echo '<div class="seopress_wrap_tax">';
3194
+
3195
+ $options = get_option( 'seopress_titles_option_name' );
3196
+
3197
+ $check = isset($options['seopress_titles_tax_titles'][$seopress_tax_key]['enable']) ? $options['seopress_titles_tax_titles'][$seopress_tax_key]['enable'] : NULL;
3198
+
3199
+ echo '<input id="seopress_titles_tax_titles_enable['.$seopress_tax_key.']" data-id='.$seopress_tax_key.' name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][enable]" class="toggle" type="checkbox"';
3200
+ if ('1' == $check) {
3201
+ echo 'checked="yes" data-toggle="0"';
3202
+ } else {
3203
+ echo 'data-toggle="1"';
3204
+ };
3205
+ echo ' value="1"/>';
3206
+
3207
+ echo '<label for="seopress_titles_tax_titles_enable['.$seopress_tax_key.']">'. __( 'Click to hide any SEO metaboxes for this taxonomy', 'wp-seopress' ) .'</label>';
3208
+
3209
+ if ('1' == $check) {
3210
+ echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3211
+ echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3212
+ } else {
3213
+ echo '<span id="titles-state-default" class="feature-state"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to hide any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3214
+ echo '<span id="titles-state" class="feature-state feature-state-off"><span class="dashicons dashicons-arrow-left-alt"></span>'.__( 'Click to display any SEO metaboxes for this taxonomy', 'wp-seopress') .'</span>';
3215
+ }
3216
+
3217
+ $toggle_txt_on = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to display any SEO metaboxes for this taxonomy','wp-seopress');
3218
+ $toggle_txt_off = '<span class="dashicons dashicons-arrow-left-alt"></span>'.__('Click to hide any SEO metaboxes for this taxonomy','wp-seopress');
3219
+
3220
+ echo "<script>
3221
+ jQuery(document).ready(function($) {
3222
+ $('input[data-id=".$seopress_tax_key."]').on('click', function() {
3223
+ $(this).attr('data-toggle', $(this).attr('data-toggle') == '1' ? '0' : '1');
3224
+ if ($(this).attr('data-toggle') == '1') {
3225
+ $(this).next().next('.feature-state').html('".$toggle_txt_off."');
3226
+ } else {
3227
+ $(this).next().next('.feature-state').html('".$toggle_txt_on."');
3228
+ }
3229
+ });
3230
+ });
3231
+ </script>";
3232
+
3233
+ if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['enable'])) {
3234
+ esc_attr( $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['enable']);
3235
+ }
3236
+
3237
+ echo '</div>';
3238
+
3239
+ //Tax Title
3240
+ $check = isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['title']) ? $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['title'] : NULL;
3241
+
3242
+ echo '<div class="seopress_wrap_tax">';
3243
+
3244
+ _e('Title template','wp-seopress');
3245
+ echo "<br/>";
3246
+
3247
+ echo "<script>
3248
+ jQuery(document).ready(function($) {
3249
+ $('#seopress-tag-tax-title-".$seopress_tax_key."').click(function() {
3250
+ $('#seopress_titles_tax_titles_".$seopress_tax_key."').val($('#seopress_titles_tax_titles_".$seopress_tax_key."').val() + ' ' + $('#seopress-tag-tax-title-".$seopress_tax_key."').attr('data-tag'));
3251
+ });
3252
+ $('#seopress-tag-sep-".$seopress_tax_key."').click(function() {
3253
+ $('#seopress_titles_tax_titles_".$seopress_tax_key."').val($('#seopress_titles_tax_titles_".$seopress_tax_key."').val() + ' ' + $('#seopress-tag-sep-".$seopress_tax_key."').attr('data-tag'));
3254
+ });
3255
+ $('#seopress-tag-tax-sitetitle-".$seopress_tax_key."').click(function() {
3256
+ $('#seopress_titles_tax_titles_".$seopress_tax_key."').val($('#seopress_titles_tax_titles_".$seopress_tax_key."').val() + ' ' + $('#seopress-tag-tax-sitetitle-".$seopress_tax_key."').attr('data-tag'));
3257
+ });
3258
+ });
3259
+ </script>";
3260
+
3261
+ printf(
3262
+ '<input type="text" id="seopress_titles_tax_titles_'.$seopress_tax_key.'" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][title]" value="%s"/>',
3263
+ esc_html($check)
3264
+ );
3265
+
3266
+ if ($seopress_tax_key =='category') {
3267
+ echo '<div class="wrap-tags"><span id="seopress-tag-tax-title-'.$seopress_tax_key.'" data-tag="%%_category_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Category Title','wp-seopress').'</span>';
3268
+ } elseif ($seopress_tax_key =='post_tag') {
3269
+ echo '<div class="wrap-tags"><span id="seopress-tag-tax-title-'.$seopress_tax_key.'" data-tag="%%tag_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tag Title','wp-seopress').'</span>';
3270
+ } else {
3271
+ echo '<div class="wrap-tags"><span id="seopress-tag-tax-title-'.$seopress_tax_key.'" data-tag="%%term_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Term Title','wp-seopress').'</span>';
3272
+ }
3273
+
3274
+ echo '<span id="seopress-tag-sep-'.$seopress_tax_key.'" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3275
+
3276
+ echo '<span id="seopress-tag-tax-sitetitle-'.$seopress_tax_key.'" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3277
+
3278
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3279
+
3280
+ echo '</div>';
3281
+
3282
+ //Tax Meta Description
3283
+ echo '<div class="seopress_wrap_tax">';
3284
+
3285
+ $check2 = isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['description']) ? $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['description'] : NULL;
3286
+
3287
+ _e('Meta description template','wp-seopress');
3288
+ echo "<br/>";
3289
+
3290
+ echo "<script>
3291
+ jQuery(document).ready(function($) {
3292
+ jQuery('#seopress-tag-tax-desc-".$seopress_tax_key."').click(function() {
3293
+ jQuery('#seopress_titles_tax_desc_".$seopress_tax_key."').val(jQuery('#seopress_titles_tax_desc_".$seopress_tax_key."').val() + ' ' + jQuery('#seopress-tag-tax-desc-".$seopress_tax_key."').attr('data-tag'));
3294
+ });
3295
+ });
3296
+ </script>";
3297
+
3298
+ printf(
3299
+ '<textarea id="seopress_titles_tax_desc_'.$seopress_tax_key.'" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][description]">%s</textarea>',
3300
+ esc_html($check2)
3301
+ );
3302
+
3303
+ if ($seopress_tax_key =='category') {
3304
+ echo '<div class="wrap-tags"><span id="seopress-tag-tax-desc-'.$seopress_tax_key.'" data-tag="%%_category_description%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Category Description','wp-seopress').'</span>';
3305
+ } elseif ($seopress_tax_key =='post_tag') {
3306
+ echo '<div class="wrap-tags"><span id="seopress-tag-tax-desc-'.$seopress_tax_key.'" data-tag="%%tag_description%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Tag Description','wp-seopress').'</span>';
3307
+ } else {
3308
+ echo '<div class="wrap-tags"><span id="seopress-tag-tax-desc-'.$seopress_tax_key.'" data-tag="%%term_description%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Term Description','wp-seopress').'</span>';
3309
+ }
3310
+
3311
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3312
+
3313
+ echo '</div>';
3314
+
3315
+ //Tax No-Index
3316
+ echo '<div class="seopress_wrap_tax">';
3317
+
3318
+ $options = get_option( 'seopress_titles_option_name' );
3319
+
3320
+ $check = isset($options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex']);
3321
+
3322
+ echo '<input id="seopress_titles_tax_noindex['.$seopress_tax_key.']" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][noindex]" type="checkbox"';
3323
+ if ('1' == $check) echo 'checked="yes"';
3324
+ echo ' value="1"/>';
3325
+
3326
+ echo '<label for="seopress_titles_tax_noindex['.$seopress_tax_key.']">'. __( 'Do not display this taxonomy archive in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3327
+
3328
+ if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex'])) {
3329
+ esc_attr( $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex']);
3330
+ }
3331
+
3332
+ echo '</div>';
3333
+
3334
+ //Tax No-Follow
3335
+ echo '<div class="seopress_wrap_tax">';
3336
+
3337
+ $options = get_option( 'seopress_titles_option_name' );
3338
+
3339
+ $check = isset($options['seopress_titles_tax_titles'][$seopress_tax_key]['nofollow']);
3340
+
3341
+ echo '<input id="seopress_titles_tax_nofollow['.$seopress_tax_key.']" name="seopress_titles_option_name[seopress_titles_tax_titles]['.$seopress_tax_key.'][nofollow]" type="checkbox"';
3342
+ if ('1' == $check) echo 'checked="yes"';
3343
+ echo ' value="1"/>';
3344
+
3345
+ echo '<label for="seopress_titles_tax_nofollow['.$seopress_tax_key.']">'. __( 'Do not follow links for this taxonomy archive <strong>(nofollow)</strong>', 'wp-seopress' ) .'</label>';
3346
+
3347
+ if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['nofollow'])) {
3348
+ esc_attr( $this->options['seopress_titles_tax_titles'][$seopress_tax_key]['nofollow']);
3349
+ }
3350
+
3351
+ echo '</div>';
3352
+ }
3353
+ }
3354
+
3355
+ //Archives
3356
+ public function seopress_titles_archives_titles_callback()
3357
+ {
3358
+ foreach (seopress_get_post_types() as $seopress_cpt_key => $seopress_cpt_value) {
3359
+ if (!in_array($seopress_cpt_key, array('post','page'))) {
3360
+
3361
+ $check = isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['title']) ? $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['title'] : NULL;
3362
+ echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em> ';
3363
+
3364
+ if (get_post_type_archive_link($seopress_cpt_value->name)) {
3365
+ echo '<span class="link-archive"><span class="dashicons dashicons-external"></span><a href="'.get_post_type_archive_link($seopress_cpt_value->name).'" target="_blank">'.__('See archive','wp-seopress').'</a></span>';
3366
+ }
3367
+
3368
+ echo '</h2>';
3369
+
3370
+ //Archive Title CPT
3371
+ echo '<div class="seopress_wrap_archive_cpt">';
3372
+
3373
+ _e('Title template','wp-seopress');
3374
+ echo "<br/>";
3375
+
3376
+ echo "<script>
3377
+ jQuery(document).ready(function($) {
3378
+ $('#seopress-tag-archive-title-".$seopress_cpt_key."').click(function() {
3379
+ $('#seopress_titles_archive_titles_".$seopress_cpt_key."').val($('#seopress_titles_archive_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-archive-title-".$seopress_cpt_key."').attr('data-tag'));
3380
+ });
3381
+ $('#seopress-tag-archive-sep-".$seopress_cpt_key."').click(function() {
3382
+ $('#seopress_titles_archive_titles_".$seopress_cpt_key."').val($('#seopress_titles_archive_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-archive-sep-".$seopress_cpt_key."').attr('data-tag'));
3383
+ });
3384
+ $('#seopress-tag-archive-sitetitle-".$seopress_cpt_key."').click(function() {
3385
+ $('#seopress_titles_archive_titles_".$seopress_cpt_key."').val($('#seopress_titles_archive_titles_".$seopress_cpt_key."').val() + ' ' + $('#seopress-tag-archive-sitetitle-".$seopress_cpt_key."').attr('data-tag'));
3386
+ });
3387
+ });
3388
+ </script>";
3389
+
3390
+ printf(
3391
+ '<input type="text" id="seopress_titles_archive_titles_'.$seopress_cpt_key.'" name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][title]" value="%s"/>',
3392
+ esc_html($check)
3393
+ );
3394
+
3395
+ echo '<div class="wrap-tags"><span id="seopress-tag-archive-title-'.$seopress_cpt_key.'" data-tag="%%cpt_plural%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Post Type Archive Name','wp-seopress').'</span>';
3396
+
3397
+ echo '<span id="seopress-tag-archive-sep-'.$seopress_cpt_key.'" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3398
+
3399
+ echo '<span id="seopress-tag-archive-sitetitle-'.$seopress_cpt_key.'" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3400
+
3401
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3402
+
3403
+ echo '</div>';
3404
+
3405
+ //Archive Meta Description CPT
3406
+ echo '<div class="seopress_wrap_archive_cpt">';
3407
+
3408
+ _e('Meta description template','wp-seopress');
3409
+ echo "<br/>";
3410
+
3411
+ $check = isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['description']) ? $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['description'] : NULL;
3412
+
3413
+ printf(
3414
+ '<textarea name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][description]">%s</textarea>',
3415
+ esc_html( $check )
3416
+ );
3417
+
3418
+ echo '</div>';
3419
+
3420
+ //Archive No-Index CPT
3421
+ echo '<div class="seopress_wrap_archive_cpt">';
3422
+
3423
+ $options = get_option( 'seopress_titles_option_name' );
3424
+
3425
+ $check = isset($options['seopress_titles_archive_titles'][$seopress_cpt_key]['noindex']);
3426
+
3427
+ echo '<input id="seopress_titles_archive_cpt_noindex['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][noindex]" type="checkbox"';
3428
+ if ('1' == $check) echo 'checked="yes"';
3429
+ echo ' value="1"/>';
3430
+
3431
+ echo '<label for="seopress_titles_archive_cpt_noindex['.$seopress_cpt_key.']">'. __( 'Do not display this post type archive in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3432
+
3433
+ if (isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['noindex'])) {
3434
+ esc_attr( $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['noindex']);
3435
+ }
3436
+
3437
+ echo '</div>';
3438
+
3439
+ //Archive No-Follow CPT
3440
+ echo '<div class="seopress_wrap_archive_cpt">';
3441
+
3442
+ $options = get_option( 'seopress_titles_option_name' );
3443
+
3444
+ $check = isset($options['seopress_titles_archive_titles'][$seopress_cpt_key]['nofollow']);
3445
+
3446
+ echo '<input id="seopress_titles_archive_cpt_nofollow['.$seopress_cpt_key.']" name="seopress_titles_option_name[seopress_titles_archive_titles]['.$seopress_cpt_key.'][nofollow]" type="checkbox"';
3447
+ if ('1' == $check) echo 'checked="yes"';
3448
+ echo ' value="1"/>';
3449
+
3450
+ echo '<label for="seopress_titles_archive_cpt_nofollow['.$seopress_cpt_key.']">'. __( 'Do not follow links for this post type archive <strong>(nofollow)</strong>', 'wp-seopress' ) .'</label>';
3451
+
3452
+ if (isset($this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['nofollow'])) {
3453
+ esc_attr( $this->options['seopress_titles_archive_titles'][$seopress_cpt_key]['nofollow']);
3454
+ }
3455
+
3456
+ echo '</div>';
3457
+ }
3458
+ }
3459
+ }
3460
+
3461
+
3462
+ public function seopress_titles_archives_author_title_callback()
3463
+ {
3464
+ echo '<h2>'.__('Author archives','wp-seopress').'</h2>';
3465
+
3466
+ _e('Title template','wp-seopress');
3467
+ echo "<br/>";
3468
+
3469
+ printf(
3470
+ '<input id="seopress_titles_archive_post_author" type="text" name="seopress_titles_option_name[seopress_titles_archives_author_title]" value="%s"/>',
3471
+ esc_html( $this->options['seopress_titles_archives_author_title'])
3472
+
3473
+ );
3474
+
3475
+ echo '<div class="wrap-tags"><span id="seopress-tag-post-author" data-tag="%%post_author%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Post author','wp-seopress').'</span>';
3476
+ echo '<span id="seopress-tag-sep-author" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3477
+ echo '<span id="seopress-tag-site-title-author" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3478
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3479
+
3480
+ }
3481
+
3482
+ public function seopress_titles_archives_author_desc_callback()
3483
+ {
3484
+ _e('Meta description template','wp-seopress');
3485
+ echo "<br/>";
3486
+
3487
+ $check = isset($this->options['seopress_titles_archives_author_desc']) ? $this->options['seopress_titles_archives_author_desc'] : NULL;
3488
+
3489
+ printf(
3490
+ '<textarea name="seopress_titles_option_name[seopress_titles_archives_author_desc]">%s</textarea>',
3491
+ esc_html( $check )
3492
+
3493
+ );
3494
+
3495
+ }
3496
+
3497
+ public function seopress_titles_archives_author_noindex_callback()
3498
+ {
3499
+
3500
+ $options = get_option( 'seopress_titles_option_name' );
3501
+
3502
+ $check = isset($options['seopress_titles_archives_author_noindex']);
3503
+
3504
+ echo '<input id="seopress_titles_archives_author_noindex" name="seopress_titles_option_name[seopress_titles_archives_author_noindex]" type="checkbox"';
3505
+ if ('1' == $check) echo 'checked="yes"';
3506
+ echo ' value="1"/>';
3507
+
3508
+ echo '<label for="seopress_titles_archives_author_noindex">'. __( 'Do not display author archives in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3509
+
3510
+ if (isset($this->options['seopress_titles_archives_author_noindex'])) {
3511
+ esc_attr( $this->options['seopress_titles_archives_author_noindex']);
3512
+ }
3513
+ }
3514
+
3515
+ public function seopress_titles_archives_author_disable_callback()
3516
+ {
3517
+
3518
+ $options = get_option( 'seopress_titles_option_name' );
3519
+
3520
+ $check = isset($options['seopress_titles_archives_author_disable']);
3521
+
3522
+ echo '<input id="seopress_titles_archives_author_disable" name="seopress_titles_option_name[seopress_titles_archives_author_disable]" type="checkbox"';
3523
+ if ('1' == $check) echo 'checked="yes"';
3524
+ echo ' value="1"/>';
3525
+
3526
+ echo '<label for="seopress_titles_archives_author_disable">'. __( 'Disable author archives', 'wp-seopress' ) .'</label>';
3527
+
3528
+ if (isset($this->options['seopress_titles_archives_author_disable'])) {
3529
+ esc_attr( $this->options['seopress_titles_archives_author_disable']);
3530
+ }
3531
+ }
3532
+
3533
+ public function seopress_titles_archives_date_title_callback()
3534
+ {
3535
+ echo '<h2>'.__('Date archives','wp-seopress').'</h2>';
3536
+
3537
+ _e('Title template','wp-seopress');
3538
+ echo "<br/>";
3539
+
3540
+ printf(
3541
+ '<input id="seopress_titles_archives_date_title" type="text" name="seopress_titles_option_name[seopress_titles_archives_date_title]" value="%s"/>',
3542
+ esc_html( $this->options['seopress_titles_archives_date_title'])
3543
+
3544
+ );
3545
+
3546
+ echo '<div class="wrap-tags"><span id="seopress-tag-archive-date" data-tag="%%archive_date%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Date archives','wp-seopress').'</span>';
3547
+ echo '<span id="seopress-tag-sep-date" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3548
+ echo '<span id="seopress-tag-site-title-date" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3549
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3550
+
3551
+ }
3552
+
3553
+ public function seopress_titles_archives_date_desc_callback()
3554
+ {
3555
+ _e('Meta description template','wp-seopress');
3556
+ echo "<br/>";
3557
+
3558
+ $check = isset($this->options['seopress_titles_archives_date_desc']) ? $this->options['seopress_titles_archives_date_desc'] : NULL;
3559
+
3560
+ printf(
3561
+ '<textarea name="seopress_titles_option_name[seopress_titles_archives_date_desc]">%s</textarea>',
3562
+ esc_html( $check )
3563
+
3564
+ );
3565
+ }
3566
+
3567
+ public function seopress_titles_archives_date_noindex_callback()
3568
+ {
3569
+
3570
+ $options = get_option( 'seopress_titles_option_name' );
3571
+
3572
+ $check = isset($options['seopress_titles_archives_date_noindex']);
3573
+
3574
+ echo '<input id="seopress_titles_archives_date_noindex" name="seopress_titles_option_name[seopress_titles_archives_date_noindex]" type="checkbox"';
3575
+ if ('1' == $check) echo 'checked="yes"';
3576
+ echo ' value="1"/>';
3577
+
3578
+ echo '<label for="seopress_titles_archives_date_noindex">'. __( 'Do not display date archives in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3579
+
3580
+ if (isset($this->options['seopress_titles_archives_date_noindex'])) {
3581
+ esc_attr( $this->options['seopress_titles_archives_date_noindex']);
3582
+ }
3583
+ }
3584
+
3585
+ public function seopress_titles_archives_date_disable_callback()
3586
+ {
3587
+
3588
+ $options = get_option( 'seopress_titles_option_name' );
3589
+
3590
+ $check = isset($options['seopress_titles_archives_date_disable']);
3591
+
3592
+ echo '<input id="seopress_titles_archives_date_disable" name="seopress_titles_option_name[seopress_titles_archives_date_disable]" type="checkbox"';
3593
+ if ('1' == $check) echo 'checked="yes"';
3594
+ echo ' value="1"/>';
3595
+
3596
+ echo '<label for="seopress_titles_archives_date_disable">'. __( 'Disable date archives', 'wp-seopress' ) .'</label>';
3597
+
3598
+ if (isset($this->options['seopress_titles_archives_date_disable'])) {
3599
+ esc_attr( $this->options['seopress_titles_archives_date_disable']);
3600
+ }
3601
+ }
3602
+
3603
+ public function seopress_titles_archives_search_title_callback()
3604
+ {
3605
+ echo '<h2>'.__('Search archives','wp-seopress').'</h2>';
3606
+
3607
+ _e('Title template','wp-seopress');
3608
+ echo "<br/>";
3609
+
3610
+ printf(
3611
+ '<input id="seopress_titles_archives_search_title" type="text" name="seopress_titles_option_name[seopress_titles_archives_search_title]" value="%s"/>',
3612
+ esc_html( $this->options['seopress_titles_archives_search_title'])
3613
+
3614
+ );
3615
+
3616
+ echo '<div class="wrap-tags"><span id="seopress-tag-search-keywords" data-tag="%%search_keywords%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Search Keywords','wp-seopress').'</span>';
3617
+ echo '<span id="seopress-tag-sep-search" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3618
+ echo '<span id="seopress-tag-site-title-search" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3619
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3620
+
3621
+ }
3622
+
3623
+ public function seopress_titles_archives_search_desc_callback()
3624
+ {
3625
+ _e('Meta description template','wp-seopress');
3626
+ echo "<br/>";
3627
+
3628
+ $check = isset($this->options['seopress_titles_archives_search_desc']) ? $this->options['seopress_titles_archives_search_desc'] : NULL;
3629
+
3630
+ printf(
3631
+ '<textarea name="seopress_titles_option_name[seopress_titles_archives_search_desc]">%s</textarea>',
3632
+ esc_html( $check )
3633
+
3634
+ );
3635
+
3636
+ }
3637
+
3638
+ public function seopress_titles_archives_search_title_noindex_callback()
3639
+ {
3640
+
3641
+ $options = get_option( 'seopress_titles_option_name' );
3642
+
3643
+ $check = isset($options['seopress_titles_archives_search_title_noindex']);
3644
+
3645
+ echo '<input id="seopress_titles_archives_search_title_noindex" name="seopress_titles_option_name[seopress_titles_archives_search_title_noindex]" type="checkbox"';
3646
+ if ('1' == $check) echo 'checked="yes"';
3647
+ echo ' value="1"/>';
3648
+
3649
+ echo '<label for="seopress_titles_archives_search_title_noindex">'. __( 'Do not display search archives in search engine results <strong>(noindex)</strong>', 'wp-seopress' ) .'</label>';
3650
+
3651
+ if (isset($this->options['seopress_titles_archives_search_title_noindex'])) {
3652
+ esc_attr( $this->options['seopress_titles_archives_search_title_noindex']);
3653
+ }
3654
+ }
3655
+
3656
+ public function seopress_titles_archives_404_title_callback()
3657
+ {
3658
+ echo '<h2>'.__('404 archives','wp-seopress').'</h2>';
3659
+
3660
+ _e('Title template','wp-seopress');
3661
+ echo "<br/>";
3662
+
3663
+ printf(
3664
+ '<input id="seopress_titles_archives_404_title" type="text" name="seopress_titles_option_name[seopress_titles_archives_404_title]" value="%s"/>',
3665
+ esc_html( $this->options['seopress_titles_archives_404_title'])
3666
+
3667
+ );
3668
+ echo '<div class="wrap-tags"><span id="seopress-tag-site-title-404" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Site Title','wp-seopress').'</span>';
3669
+ echo '<span id="seopress-tag-sep-404" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>'.__('Separator','wp-seopress').'</span>';
3670
+ echo '<span id="seopress-quick-help" class="tag-title more-tags"><span class="dashicons dashicons-menu"></span>'.__('More tags','wp-seopress').'</span></div>';
3671
+ }
3672
+
3673
+ public function seopress_titles_archives_404_desc_callback()
3674
+ {
3675
+ _e('Meta description template','wp-seopress');
3676
+ echo "<br/>";
3677
+
3678
+ $check = isset($this->options['seopress_titles_archives_404_desc']) ? $this->options['seopress_titles_archives_404_desc'] : NULL;
3679
+
3680
+ printf(
3681
+ '<textarea name="seopress_titles_option_name[seopress_titles_archives_404_desc]">%s</textarea>',
3682
+ esc_html( $check )
3683
+
3684
+ );
3685
+
3686
+ }
3687
+
3688
+ //Advanced
3689
+ public function seopress_titles_noindex_callback()
3690
+ {
3691
+ $options = get_option( 'seopress_titles_option_name' );
3692
+
3693
+ $check = isset($options['seopress_titles_noindex']);
3694
+
3695
+ echo '<input id="seopress_titles_noindex" name="seopress_titles_option_name[seopress_titles_noindex]" type="checkbox"';
3696
+ if ('1' == $check) echo 'checked="yes"';
3697
+ echo ' value="1"/>';
3698
+
3699
+ echo '<label for="seopress_titles_noindex">'. __( 'noindex', 'wp-seopress' ) .'</label>';
3700
+
3701
+ echo '<p class="description">'.__('Do not display all pages of the site in Google search results and do not display "Cached" links in search results.','wp-seopress').'</p>';
3702
+
3703
+ if (isset($this->options['seopress_titles_noindex'])) {
3704
+ esc_attr( $this->options['seopress_titles_noindex']);
3705
+ }
3706
+ }
3707
+
3708
+ public function seopress_titles_nofollow_callback()
3709
+ {
3710
+ $options = get_option( 'seopress_titles_option_name' );
3711
+
3712
+ $check = isset($options['seopress_titles_nofollow']);
3713
+
3714
+ echo '<input id="seopress_titles_nofollow" name="seopress_titles_option_name[seopress_titles_nofollow]" type="checkbox"';
3715
+ if ('1' == $check) echo 'checked="yes"';
3716
+ echo ' value="1"/>';
3717
+
3718
+ echo '<label for="seopress_titles_nofollow">'. __( 'nofollow', 'wp-seopress' ) .'</label>';
3719
+
3720
+ echo '<p class="description">'.__('Do not follow links for all pages.','wp-seopress').'</p>';
3721
+
3722
+ if (isset($this->options['seopress_titles_nofollow'])) {
3723
+ esc_attr( $this->options['seopress_titles_nofollow']);
3724
+ }
3725
+ }
3726
+
3727
+ public function seopress_titles_noodp_callback()
3728
+ {
3729
+ $options = get_option( 'seopress_titles_option_name' );
3730
+
3731
+ $check = isset($options['seopress_titles_noodp']);
3732
+
3733
+ echo '<input id="seopress_titles_noodp" name="seopress_titles_option_name[seopress_titles_noodp]" type="checkbox"';
3734
+ if ('1' == $check) echo 'checked="yes"';
3735
+ echo ' value="1"/>';
3736
+
3737
+ echo '<label for="seopress_titles_noodp">'. __( 'noodp', 'wp-seopress' ) .'</label>';
3738
+
3739
+ echo '<p class="description">'.__('Do not use Open Directory project metadata for titles or excerpts for all pages.','wp-seopress').'</p>';
3740
+
3741
+ if (isset($this->options['seopress_titles_noodp'])) {
3742
+ esc_attr( $this->options['seopress_titles_noodp']);
3743
+ }
3744
+ }
3745
+
3746
+ public function seopress_titles_noimageindex_callback()
3747
+ {
3748
+ $options = get_option( 'seopress_titles_option_name' );
3749
+
3750
+ $check = isset($options['seopress_titles_noimageindex']);
3751
+
3752
+ echo '<input id="seopress_titles_noimageindex" name="seopress_titles_option_name[seopress_titles_noimageindex]" type="checkbox"';
3753
+ if ('1' == $check) echo 'checked="yes"';
3754
+ echo ' value="1"/>';
3755
+
3756
+ echo '<label for="seopress_titles_noimageindex">'. __( 'noimageindex', 'wp-seopress' ) .'</label>';
3757
+
3758
+ echo '<p class="description">'.__('Do not index images from the entire site.','wp-seopress').'</p>';
3759
+
3760
+ if (isset($this->options['seopress_titles_noimageindex'])) {
3761
+ esc_attr( $this->options['seopress_titles_noimageindex']);
3762
+ }
3763
+ }
3764
+
3765
+ public function seopress_titles_noarchive_callback()
3766
+ {
3767
+ $options = get_option( 'seopress_titles_option_name' );
3768
+
3769
+ $check = isset($options['seopress_titles_noarchive']);
3770
+
3771
+ echo '<input id="seopress_titles_noarchive" name="seopress_titles_option_name[seopress_titles_noarchive]" type="checkbox"';
3772
+ if ('1' == $check) echo 'checked="yes"';
3773
+ echo ' value="1"/>';
3774
+
3775
+ echo '<label for="seopress_titles_noarchive">'. __( 'noarchive', 'wp-seopress' ) .'</label>';
3776
+
3777
+ echo '<p class="description">'.__('Do not display a "Cached" link in the Google search results.','wp-seopress').'</p>';
3778
+
3779
+ if (isset($this->options['seopress_titles_noarchive'])) {
3780
+ esc_attr( $this->options['seopress_titles_noarchive']);
3781
+ }
3782
+ }
3783
+
3784
+ public function seopress_titles_nosnippet_callback()
3785
+ {
3786
+ $options = get_option( 'seopress_titles_option_name' );
3787
+
3788
+ $check = isset($options['seopress_titles_nosnippet']);
3789
+
3790
+ echo '<input id="seopress_titles_nosnippet" name="seopress_titles_option_name[seopress_titles_nosnippet]" type="checkbox"';
3791
+ if ('1' == $check) echo 'checked="yes"';
3792
+ echo ' value="1"/>';
3793
+
3794
+ echo '<label for="seopress_titles_nosnippet">'. __( 'nosnippet', 'wp-seopress' ) .'</label>';
3795
+
3796
+ echo '<p class="description">'.__('Do not display a description in the Google search results for all pages.','wp-seopress').'</p>';
3797
+
3798
+ if (isset($this->options['seopress_titles_nosnippet'])) {
3799
+ esc_attr( $this->options['seopress_titles_nosnippet']);
3800
+ }
3801
+ }
3802
+
3803
+ public function seopress_titles_nositelinkssearchbox_callback()
3804
+ {
3805
+ $options = get_option( 'seopress_titles_option_name' );
3806
+
3807
+ $check = isset($options['seopress_titles_nositelinkssearchbox']);
3808
+
3809
+ echo '<input id="seopress_titles_nositelinkssearchbox" name="seopress_titles_option_name[seopress_titles_nositelinkssearchbox]" type="checkbox"';
3810
+ if ('1' == $check) echo 'checked="yes"';
3811
+ echo ' value="1"/>';
3812
+
3813
+ echo '<label for="seopress_titles_nositelinkssearchbox">'. __( 'nositelinkssearchbox', 'wp-seopress' ) .'</label>';
3814
+
3815
+ echo '<p class="description">'.__('Prevents Google to display a sitelinks searchbox in search results. Enable this option will remove the "Website" schema from your source code.','wp-seopress').'</p>';
3816
+
3817
+ if (isset($this->options['seopress_titles_nositelinkssearchbox'])) {
3818
+ esc_attr( $this->options['seopress_titles_nositelinkssearchbox']);
3819
+ }
3820
+ }
3821
+
3822
+ public function seopress_titles_paged_rel_callback()
3823
+ {
3824
+ $options = get_option( 'seopress_titles_option_name' );
3825
+
3826
+ $check = isset($options['seopress_titles_paged_rel']);
3827
+
3828
+ echo '<input id="seopress_titles_paged_rel" name="seopress_titles_option_name[seopress_titles_paged_rel]" type="checkbox"';
3829
+ if ('1' == $check) echo 'checked="yes"';
3830
+ echo ' value="1"/>';
3831
+
3832
+ echo '<label for="seopress_titles_paged_rel">'. __( 'Add rel next/prev link in head of paginated archive pages', 'wp-seopress' ) .'</label>';
3833
+
3834
+ echo '<p class="description"><span class="dashicons dashicons-external"></span><a href="https://support.google.com/webmasters/answer/1663744?hl=en" target="_blank">'.__('Learn more on Google website','wp-seopress').'</p>';
3835
+
3836
+ if (isset($this->options['seopress_titles_paged_rel'])) {
3837
+ esc_attr( $this->options['seopress_titles_paged_rel']);
3838
+ }
3839
+ }
3840
+
3841
+ public function seopress_xml_sitemap_general_enable_callback()
3842
+ {
3843
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
3844
+
3845
+ $check = isset($options['seopress_xml_sitemap_general_enable']);
3846
+
3847
+ echo '<input id="seopress_xml_sitemap_general_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_general_enable]" type="checkbox"';
3848
+ if ('1' == $check) echo 'checked="yes"';
3849
+ echo ' value="1"/>';
3850
+
3851
+ echo '<label for="seopress_xml_sitemap_general_enable">'. __( 'Enable XML Sitemap', 'wp-seopress' ) .'</label>';
3852
+
3853
+ if (function_exists('seopress_get_locale')) {
3854
+ if (seopress_get_locale() =='fr') {
3855
+ $seopress_docs_link['support']['sitemaps'] = 'https://www.seopress.org/fr/support/guides/activer-sitemap-xml/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3856
+ } else {
3857
+ $seopress_docs_link['support']['sitemaps'] = 'https://www.seopress.org/support/guides/enable-xml-sitemaps/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3858
+ }
3859
+ }
3860
+
3861
+ echo '<a href="'.$seopress_docs_link['support']['sitemaps'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable XML Sitemaps - new window','wp-seopress').'</span></a>';
3862
+
3863
+ if (isset($this->options['seopress_xml_sitemap_general_enable'])) {
3864
+ esc_attr( $this->options['seopress_xml_sitemap_general_enable']);
3865
+ }
3866
+ }
3867
+
3868
+ public function seopress_xml_sitemap_img_enable_callback()
3869
+ {
3870
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
3871
+
3872
+ $check = isset($options['seopress_xml_sitemap_img_enable']);
3873
+
3874
+ echo '<input id="seopress_xml_sitemap_img_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_img_enable]" type="checkbox"';
3875
+ if ('1' == $check) echo 'checked="yes"';
3876
+ echo ' value="1"/>';
3877
+
3878
+ echo '<label for="seopress_xml_sitemap_img_enable">'. __( 'Enable Image Sitemaps (standard images, image galleries, featured image, WooCommerce product images)', 'wp-seopress' ) .'</label>';
3879
+
3880
+ echo '<p class="description">'.__('Images in XML sitemaps are visible only from the source code.','wp-seopress').'</p>';
3881
+
3882
+ if (function_exists('seopress_get_locale')) {
3883
+ if (seopress_get_locale() =='fr') {
3884
+ $seopress_docs_link['support']['sitemaps']['image'] = 'https://www.seopress.org/fr/support/guides/activer-sitemap-xml-images/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3885
+ } else {
3886
+ $seopress_docs_link['support']['sitemaps']['image'] = 'https://www.seopress.org/support/guides/enable-xml-image-sitemaps/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3887
+ }
3888
+ }
3889
+
3890
+ echo '<a href="'.$seopress_docs_link['support']['sitemaps']['image'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable XML image sitemaps - new window','wp-seopress').'</span></a>';
3891
+
3892
+ if (isset($this->options['seopress_xml_sitemap_img_enable'])) {
3893
+ esc_attr( $this->options['seopress_xml_sitemap_img_enable']);
3894
+ }
3895
+ }
3896
+
3897
+ public function seopress_xml_sitemap_video_enable_callback()
3898
+ {
3899
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
3900
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
3901
+
3902
+ $check = isset($options['seopress_xml_sitemap_video_enable']);
3903
+
3904
+ echo '<input id="seopress_xml_sitemap_video_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_video_enable]" type="checkbox"';
3905
+ if ('1' == $check) echo 'checked="yes"';
3906
+ echo ' value="1"/>';
3907
+
3908
+ echo '<label for="seopress_xml_sitemap_video_enable">'. __( 'Enable Video Sitemaps', 'wp-seopress' ) .'</label>';
3909
+
3910
+ if (function_exists('seopress_get_locale')) {
3911
+ if (seopress_get_locale() =='fr') {
3912
+ $seopress_docs_link['support']['sitemaps']['video'] = 'https://www.seopress.org/fr/support/guides/plan-de-site-xml-video/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3913
+ } else {
3914
+ $seopress_docs_link['support']['sitemaps']['video'] = 'https://www.seopress.org/support/guides/enable-video-xml-sitemap/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3915
+ }
3916
+ }
3917
+
3918
+ printf('<p class="description">'.__('Your video sitemap is empty? Read our guide to learn more about <a href="%s" target="_blank">adding videos to your sitemap.</a>','wp-seopress').'</p>', $seopress_docs_link['support']['sitemaps']['video']);
3919
+
3920
+ echo '<a href="'.$seopress_docs_link['support']['sitemaps']['video'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable XML video sitemaps - new window','wp-seopress').'</span></a>';
3921
+
3922
+ if (isset($this->options['seopress_xml_sitemap_video_enable'])) {
3923
+ esc_attr( $this->options['seopress_xml_sitemap_video_enable']);
3924
+ }
3925
+ }
3926
+ }
3927
+
3928
+ public function seopress_xml_sitemap_author_enable_callback()
3929
+ {
3930
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
3931
+
3932
+ $check = isset($options['seopress_xml_sitemap_author_enable']);
3933
+
3934
+ echo '<input id="seopress_xml_sitemap_author_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_author_enable]" type="checkbox"';
3935
+ if ('1' == $check) echo 'checked="yes"';
3936
+ echo ' value="1"/>';
3937
+
3938
+ echo '<label for="seopress_xml_sitemap_author_enable">'. __( 'Enable Author Sitemap', 'wp-seopress' ) .'</label>';
3939
+
3940
+ echo '<p class="description">'.__('Make sure to enable author archive from SEO, titles and metas, archives tab.</a>','wp-seopress').'</p>';
3941
+
3942
+ if (isset($this->options['seopress_xml_sitemap_author_enable'])) {
3943
+ esc_attr( $this->options['seopress_xml_sitemap_author_enable']);
3944
+ }
3945
+ }
3946
+
3947
+ public function seopress_xml_sitemap_html_enable_callback()
3948
+ {
3949
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
3950
+
3951
+ $check = isset($options['seopress_xml_sitemap_html_enable']);
3952
+
3953
+ echo '<input id="seopress_xml_sitemap_html_enable" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_enable]" type="checkbox"';
3954
+ if ('1' == $check) echo 'checked="yes"';
3955
+ echo ' value="1"/>';
3956
+
3957
+ echo '<label for="seopress_xml_sitemap_html_enable">'. __( 'Enable HTML Sitemap', 'wp-seopress' ) .'</label>';
3958
+
3959
+ if (function_exists('seopress_get_locale')) {
3960
+ if (seopress_get_locale() =='fr') {
3961
+ $seopress_docs_link['support']['sitemaps']['html'] = 'https://www.seopress.org/fr/support/guides/activer-plan-de-site-html/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3962
+ } else {
3963
+ $seopress_docs_link['support']['sitemaps']['html'] = 'https://www.seopress.org/support/guides/enable-html-sitemap/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
3964
+ }
3965
+ }
3966
+
3967
+ echo '<a href="'.$seopress_docs_link['support']['sitemaps']['html'].'" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Guide to enable a HTML Sitemap - new window','wp-seopress').'</span></a>';
3968
+
3969
+ if (isset($this->options['seopress_xml_sitemap_html_enable'])) {
3970
+ esc_attr( $this->options['seopress_xml_sitemap_html_enable']);
3971
+ }
3972
+ }
3973
+
3974
+ public function seopress_xml_sitemap_post_types_list_callback()
3975
+ {
3976
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
3977
+
3978
+ $check = isset($options['seopress_xml_sitemap_post_types_list']);
3979
+
3980
+ global $wp_post_types;
3981
+
3982
+ $args = array(
3983
+ 'show_ui' => true,
3984
+ 'public' => true,
3985
+ );
3986
+
3987
+ $output = 'objects'; // names or objects, note names is the default
3988
+ $operator = 'and'; // 'and' or 'or'
3989
+
3990
+ $post_types = get_post_types( $args, $output, $operator );
3991
+
3992
+ foreach ($post_types as $seopress_cpt_key => $seopress_cpt_value) {
3993
+
3994
+ echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em></h2>';
3995
+
3996
+ //List all post types
3997
+ echo '<div class="seopress_wrap_single_cpt">';
3998
+
3999
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
4000
+
4001
+ $check = isset($options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include']);
4002
+
4003
+ echo '<input id="seopress_xml_sitemap_post_types_list_include['.$seopress_cpt_key.']" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_post_types_list]['.$seopress_cpt_key.'][include]" type="checkbox"';
4004
+ if ('1' == $check) echo 'checked="yes"';
4005
+ echo ' value="1"/>';
4006
+
4007
+ echo '<label for="seopress_xml_sitemap_post_types_list_include['.$seopress_cpt_key.']">'. __( 'Include', 'wp-seopress' ) .'</label>';
4008
+
4009
+ if ($seopress_cpt_value->name == 'attachment') {
4010
+ echo '<p class="description">'.__('You should never include attachment post type in your sitemap. Be careful if you checked this.','wp-seopress').'</p>';
4011
+ }
4012
+
4013
+ if (isset($this->options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include'])) {
4014
+ esc_attr( $this->options['seopress_xml_sitemap_post_types_list'][$seopress_cpt_key]['include']);
4015
+ }
4016
+
4017
+ echo '</div>';
4018
+ }
4019
+ }
4020
+
4021
+ public function seopress_xml_sitemap_taxonomies_list_callback()
4022
+ {
4023
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
4024
+
4025
+ $check = isset($options['seopress_xml_sitemap_taxonomies_list']);
4026
+
4027
+ $args = array(
4028
+ 'show_ui' => true,
4029
+ 'public' => true,
4030
+
4031
+ );
4032
+ $output = 'objects'; // or objects
4033
+ $operator = 'and'; // 'and' or 'or'
4034
+ $taxonomies = get_taxonomies( $args, $output, $operator );
4035
+
4036
+ foreach ($taxonomies as $seopress_tax_key => $seopress_tax_value) {
4037
+
4038
+ echo '<h2>'.$seopress_tax_value->labels->name.' <em><small>['.$seopress_tax_value->name.']</small></em></h2>';
4039
+
4040
+ //List all taxonomies
4041
+ echo '<div class="seopress_wrap_single_tax">';
4042
+
4043
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
4044
+
4045
+ $check = isset($options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include']);
4046
+
4047
+ echo '<input id="seopress_xml_sitemap_taxonomies_list_include['.$seopress_tax_key.']" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_taxonomies_list]['.$seopress_tax_key.'][include]" type="checkbox"';
4048
+ if ('1' == $check) echo 'checked="yes"';
4049
+ echo ' value="1"/>';
4050
+
4051
+ echo '<label for="seopress_xml_sitemap_taxonomies_list_include['.$seopress_tax_key.']">'. __( 'Include', 'wp-seopress' ) .'</label>';
4052
+
4053
+ if (isset($this->options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include'])) {
4054
+ esc_attr( $this->options['seopress_xml_sitemap_taxonomies_list'][$seopress_tax_key]['include']);
4055
+ }
4056
+
4057
+ echo '</div>';
4058
+ }
4059
+ }
4060
+
4061
+ public function seopress_xml_sitemap_html_mapping_callback()
4062
+ {
4063
+ $check = isset($this->options['seopress_xml_sitemap_html_mapping']) ? $this->options['seopress_xml_sitemap_html_mapping'] : NULL;
4064
+
4065
+ printf(
4066
+ '<input type="text" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_mapping]" placeholder="'.esc_html__('eg: 2, 28, 68','wp-seopress').'" aria-label="'.__('Enter a post, page or custom post type ID(s) to display the sitemap','wp-seopress').'" value="%s"/>',
4067
+ esc_html( $check )
4068
+ );
4069
+
4070
+ echo '<br><br><p>'.__('You can also use this shortcode:','wp-seopress').'</p>';
4071
+
4072
+ echo '<pre>[seopress_html_sitemap]</pre>';
4073
+ }
4074
+
4075
+ public function seopress_xml_sitemap_html_exclude_callback()
4076
+ {
4077
+ $check = isset($this->options['seopress_xml_sitemap_html_exclude']) ? $this->options['seopress_xml_sitemap_html_exclude'] : NULL;
4078
+
4079
+ printf(
4080
+ '<input type="text" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_exclude]" placeholder="'.esc_html__('eg: 13, 8, 38','wp-seopress').'" aria-label="'.__('Exclude some Posts, Pages, Custom Post Types or Terms IDs','wp-seopress').'" value="%s"/>',
4081
+ esc_html( $check )
4082
+ );
4083
+ }
4084
+
4085
+ public function seopress_xml_sitemap_html_order_callback()
4086
+ {
4087
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
4088
+
4089
+ $selected = isset($options['seopress_xml_sitemap_html_order']) ? $options['seopress_xml_sitemap_html_order'] : NULL;
4090
+
4091
+ echo '<select id="seopress_xml_sitemap_html_order" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_order]">';
4092
+ echo ' <option ';
4093
+ if ('DESC' == $selected) echo 'selected="selected"';
4094
+ echo ' value="DESC">'. __("DESC (descending order from highest to lowest values (3, 2, 1; c, b, a))","wp-seopress") .'</option>';
4095
+ echo ' <option ';
4096
+ if ('ASC' == $selected) echo 'selected="selected"';
4097
+ echo ' value="ASC">'. __("ASC (ascending order from lowest to highest values (1, 2, 3; a, b, c))","wp-seopress") .'</option>';
4098
+ echo '</select>';
4099
+
4100
+ if (isset($this->options['seopress_xml_sitemap_html_order'])) {
4101
+ esc_attr( $this->options['seopress_xml_sitemap_html_order']);
4102
+ }
4103
+ }
4104
+
4105
+ public function seopress_xml_sitemap_html_orderby_callback()
4106
+ {
4107
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
4108
+
4109
+ $selected = isset($options['seopress_xml_sitemap_html_orderby']) ? $options['seopress_xml_sitemap_html_orderby'] : NULL;
4110
+
4111
+ echo '<select id="seopress_xml_sitemap_html_orderby" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_orderby]">';
4112
+ echo ' <option ';
4113
+ if ('date' == $selected) echo 'selected="selected"';
4114
+ echo ' value="date">'. __("Default (date)","wp-seopress") .'</option>';
4115
+ echo ' <option ';
4116
+ if ('title' == $selected) echo 'selected="selected"';
4117
+ echo ' value="title">'. __("Post Title","wp-seopress") .'</option>';
4118
+ echo '<option ';
4119
+ if ('modified' == $selected) echo 'selected="selected"';
4120
+ echo ' value="modified">'. __("Modified date","wp-seopress") .'</option>';
4121
+ echo '<option ';
4122
+ if ('ID' == $selected) echo 'selected="selected"';
4123
+ echo ' value="ID">'. __("Post ID","wp-seopress") .'</option>';
4124
+ echo '<option ';
4125
+ if ('menu_order' == $selected) echo 'selected="selected"';
4126
+ echo ' value="menu_order">'. __("Menu order","wp-seopress") .'</option>';
4127
+ echo '</select>';
4128
+
4129
+ if (isset($this->options['seopress_xml_sitemap_html_orderby'])) {
4130
+ esc_attr( $this->options['seopress_xml_sitemap_html_orderby']);
4131
+ }
4132
+ }
4133
+
4134
+ public function seopress_xml_sitemap_html_date_callback()
4135
+ {
4136
+ $options = get_option( 'seopress_xml_sitemap_option_name' );
4137
+
4138
+ $check = isset($options['seopress_xml_sitemap_html_date']);
4139
+
4140
+ echo '<input id="seopress_xml_sitemap_html_date" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_date]" type="checkbox"';
4141
+ if ('1' == $check) echo 'checked="yes"';
4142
+ echo ' value="1"/>';
4143
+
4144
+ echo '<label for="seopress_xml_sitemap_html_date">'. __( 'Disable date after each post, page, post type?', 'wp-seopress' ) .'</label>';
4145
+
4146
+ if (isset($this->options['seopress_xml_sitemap_html_date'])) {
4147
+ esc_attr( $this->options['seopress_xml_sitemap_html_date']);
4148
+ }
4149
+ }
4150
+
4151
+ public function seopress_social_knowledge_type_callback()
4152
+ {
4153
+ $options = get_option( 'seopress_social_option_name' );
4154
+
4155
+ $selected = isset($options['seopress_social_knowledge_type']) ? $options['seopress_social_knowledge_type'] : NULL;
4156
+
4157
+ echo '<select id="seopress_social_knowledge_type" name="seopress_social_option_name[seopress_social_knowledge_type]">';
4158
+ echo ' <option ';
4159
+ if ('None' == $selected) echo 'selected="selected"';
4160
+ echo ' value="none">'. __("None (will disable this feature)","wp-seopress") .'</option>';
4161
+ echo ' <option ';
4162
+ if ('Person' == $selected) echo 'selected="selected"';
4163
+ echo ' value="Person">'. __("Person","wp-seopress") .'</option>';
4164
+ echo '<option ';
4165
+ if ('Organization' == $selected) echo 'selected="selected"';
4166
+ echo ' value="Organization">'. __("Organization","wp-seopress") .'</option>';
4167
+ echo '</select>';
4168
+
4169
+ if (isset($this->options['seopress_social_knowledge_type'])) {
4170
+ esc_attr( $this->options['seopress_social_knowledge_type']);
4171
+ }
4172
+ }
4173
+
4174
+ public function seopress_social_knowledge_name_callback()
4175
+ {
4176
+ $check = isset($this->options['seopress_social_knowledge_name']) ? $this->options['seopress_social_knowledge_name'] : NULL;
4177
+
4178
+ printf(
4179
+ '<input type="text" name="seopress_social_option_name[seopress_social_knowledge_name]" placeholder="'.esc_html__('eg: SEOPress','wp-seopress').'" aria-label="'.__('Your name/organization','wp-seopress').'" value="%s"/>',
4180
+ esc_html( $check )
4181
+ );
4182
+ }
4183
+
4184
+ public function seopress_social_knowledge_img_callback()
4185
+ {
4186
+ $options = get_option( 'seopress_social_option_name' );
4187
+
4188
+ $options_set = isset($options['seopress_social_knowledge_img']) ? esc_attr($options['seopress_social_knowledge_img']) : NULL;
4189
+
4190
+ $check = isset($options['seopress_social_knowledge_img']);
4191
+
4192
+ echo '<input id="seopress_social_knowledge_img_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_knowledge_img]" aria-label="'.__('Your photo/organization logo','wp-seopress').'" placeholder="'.esc_html__('Select your logo','wp-seopress').'" />
4193
+
4194
+ <input id="seopress_social_knowledge_img_upload" class="button" type="button" value="'.__('Upload an Image','wp-seopress').'" />';
4195
+
4196
+ echo '<p class="description">'.__('JPG, PNG, and GIF allowed.', 'wp-seopress').'</p>';
4197
+
4198
+ if (isset($this->options['seopress_social_knowledge_img'])) {
4199
+ esc_attr( $this->options['seopress_social_knowledge_img']);
4200
+ }
4201
+
4202
+ function seopress_social_knowledge_img_option() {
4203
+ $seopress_social_knowledge_img_option = get_option("seopress_social_option_name");
4204
+ if ( ! empty ( $seopress_social_knowledge_img_option ) ) {
4205
+ foreach ($seopress_social_knowledge_img_option as $key => $seopress_social_knowledge_img_value)
4206
+ $options[$key] = $seopress_social_knowledge_img_value;
4207
+ if (isset($seopress_social_knowledge_img_option['seopress_social_knowledge_img'])) {
4208
+ return $seopress_social_knowledge_img_option['seopress_social_knowledge_img'];
4209
+ }
4210
+ }
4211
+ }
4212
+ echo '<br>';
4213
+ echo '<br>';
4214
+ echo '<img style="width:200px;max-height:300px;" src="'.esc_attr(seopress_social_knowledge_img_option()).'"/>';
4215
+ }
4216
+
4217
+ public function seopress_social_knowledge_phone_callback()
4218
+ {
4219
+ $check = isset($this->options['seopress_social_knowledge_phone']) ? $this->options['seopress_social_knowledge_phone'] : NULL;
4220
+
4221
+ printf(
4222
+ '<input type="text" name="seopress_social_option_name[seopress_social_knowledge_phone]" placeholder="'.esc_html__('eg: +33123456789 (internationalized version required)','wp-seopress').'" aria-label="'.__('Organization\'s phone number (only for Organizations)','wp-seopress').'" value="%s"/>',
4223
+ esc_html( $check )
4224
+ );
4225
+
4226
+ }
4227
+
4228
+ public function seopress_social_knowledge_contact_type_callback()
4229
+ {
4230
+ $options = get_option( 'seopress_social_option_name' );
4231
+
4232
+ $selected = isset($options['seopress_social_knowledge_contact_type']) ? $options['seopress_social_knowledge_contact_type'] : NULL;
4233
+
4234
+ echo '<select id="seopress_social_knowledge_contact_type" name="seopress_social_option_name[seopress_social_knowledge_contact_type]">';
4235
+ echo ' <option ';
4236
+ if ('customer support' == $selected) echo 'selected="selected"';
4237
+ echo ' value="customer support">'. __("Customer support","wp-seopress") .'</option>';
4238
+ echo '<option ';
4239
+ if ('technical support' == $selected) echo 'selected="selected"';
4240
+ echo ' value="technical support">'. __("Technical support","wp-seopress") .'</option>';
4241
+ echo '<option ';
4242
+ if ('billing support' == $selected) echo 'selected="selected"';
4243
+ echo ' value="billing support">'. __("Billing support","wp-seopress") .'</option>';
4244
+ echo '<option ';
4245
+ if ('bill payment' == $selected) echo 'selected="selected"';
4246
+ echo ' value="bill payment">'. __("Bill payment","wp-seopress") .'</option>';
4247
+ echo '<option ';
4248
+ if ('sales' == $selected) echo 'selected="selected"';
4249
+ echo ' value="sales">'. __("Sales","wp-seopress") .'</option>';
4250
+ echo '<option ';
4251
+ if ('credit card support' == $selected) echo 'selected="selected"';
4252
+ echo ' value="credit card support">'. __("Credit card support","wp-seopress") .'</option>';
4253
+ echo '<option ';
4254
+ if ('emergency' == $selected) echo 'selected="selected"';
4255
+ echo ' value="emergency">'. __("Emergency","wp-seopress") .'</option>';
4256
+ echo '<option ';
4257
+ if ('baggage tracking' == $selected) echo 'selected="selected"';
4258
+ echo ' value="baggage tracking">'. __("Baggage tracking","wp-seopress") .'</option>';
4259
+ echo '<option ';
4260
+ if ('roadside assistance' == $selected) echo 'selected="selected"';
4261
+ echo ' value="roadside assistance">'. __("Roadside assistance","wp-seopress") .'</option>';
4262
+ echo '<option ';
4263
+ if ('package tracking' == $selected) echo 'selected="selected"';
4264
+ echo ' value="package tracking">'. __("Package tracking","wp-seopress") .'</option>';
4265
+ echo '</select>';
4266
+
4267
+ if (isset($this->options['seopress_social_knowledge_contact_type'])) {
4268
+ esc_attr( $this->options['seopress_social_knowledge_contact_type']);
4269
+ }
4270
+ }
4271
+
4272
+ public function seopress_social_knowledge_contact_option_callback()
4273
+ {
4274
+ $options = get_option( 'seopress_social_option_name' );
4275
+
4276
+ $selected = isset($options['seopress_social_knowledge_contact_option']) ? $options['seopress_social_knowledge_contact_option'] : NULL;
4277
+
4278
+ echo '<select id="seopress_social_knowledge_contact_option" name="seopress_social_option_name[seopress_social_knowledge_contact_option]">';
4279
+ echo ' <option ';
4280
+ if ('None' == $selected) echo 'selected="selected"';
4281
+ echo ' value="None">'. __("None","wp-seopress") .'</option>';
4282
+ echo ' <option ';
4283
+ if ('TollFree' == $selected) echo 'selected="selected"';
4284
+ echo ' value="TollFree">'. __("Toll Free","wp-seopress") .'</option>';
4285
+ echo '<option ';
4286
+ if ('HearingImpairedSupported' == $selected) echo 'selected="selected"';
4287
+ echo ' value="HearingImpairedSupported">'. __("Hearing impaired supported","wp-seopress") .'</option>';
4288
+ echo '</select>';
4289
+
4290
+ if (isset($this->options['seopress_social_knowledge_contact_option'])) {
4291
+ esc_attr( $this->options['seopress_social_knowledge_contact_option']);
4292
+ }
4293
+ }
4294
+
4295
+ public function seopress_social_accounts_facebook_callback()
4296
+ {
4297
+ $check = isset($this->options['seopress_social_accounts_facebook']) ? $this->options['seopress_social_accounts_facebook'] : NULL;
4298
+
4299
+ printf(
4300
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_facebook]" placeholder="'.esc_html__('eg: https://facebook.com/my-page-url','wp-seopress').'" aria-label="'.__('Facebook Page URL','wp-seopress').'" value="%s"/>',
4301
+ esc_html( $check )
4302
+
4303
+ );
4304
+
4305
+ }
4306
+
4307
+ public function seopress_social_accounts_twitter_callback()
4308
+ {
4309
+
4310
+ $check = isset($this->options['seopress_social_accounts_twitter']) ? $this->options['seopress_social_accounts_twitter'] : NULL;
4311
+
4312
+ printf(
4313
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_twitter]" placeholder="'.esc_html__('eg: @my_twitter_account','wp-seopress').'" aria-label="'.__('Twitter Page URL','wp-seopress').'" value="%s"/>',
4314
+ esc_html( $check )
4315
+
4316
+ );
4317
+
4318
+ }
4319
+
4320
+ public function seopress_social_accounts_pinterest_callback()
4321
+ {
4322
+ $check = isset($this->options['seopress_social_accounts_pinterest']) ? $this->options['seopress_social_accounts_pinterest'] : NULL;
4323
+
4324
+ printf(
4325
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_pinterest]" placeholder="'.esc_html__('eg: https://pinterest.com/my-page-url/','wp-seopress').'" aria-label="'.__('Pinterest URL','wp-seopress').'" value="%s"/>',
4326
+ esc_html( $check )
4327
+
4328
+ );
4329
+
4330
+ }
4331
+
4332
+ public function seopress_social_accounts_instagram_callback()
4333
+ {
4334
+ $check = isset($this->options['seopress_social_accounts_instagram']) ? $this->options['seopress_social_accounts_instagram'] : NULL;
4335
+
4336
+ printf(
4337
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_instagram]" placeholder="'.esc_html__('eg: https://www.instagram.com/my-page-url/','wp-seopress').'" aria-label="'.__('Instagram URL','wp-seopress').'" value="%s"/>',
4338
+ esc_html( $check )
4339
+
4340
+ );
4341
+
4342
+ }
4343
+
4344
+ public function seopress_social_accounts_youtube_callback()
4345
+ {
4346
+ $check = isset($this->options['seopress_social_accounts_youtube']) ? $this->options['seopress_social_accounts_youtube'] : NULL;
4347
+
4348
+ printf(
4349
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_youtube]" placeholder="'.esc_html__('eg: https://www.youtube.com/my-channel-url','wp-seopress').'" aria-label="'.__('YouTube URL','wp-seopress').'" value="%s"/>',
4350
+ esc_html( $check )
4351
+
4352
+ );
4353
+
4354
+ }
4355
+
4356
+ public function seopress_social_accounts_linkedin_callback()
4357
+ {
4358
+ $check = isset($this->options['seopress_social_accounts_linkedin']) ? $this->options['seopress_social_accounts_linkedin'] : NULL;
4359
+
4360
+ printf(
4361
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_linkedin]" placeholder="'.esc_html__('eg: http://linkedin.com/company/my-company-url/','wp-seopress').'" aria-label="'.__('LinkedIn URL','wp-seopress').'" value="%s"/>',
4362
+ esc_html( $check )
4363
+
4364
+ );
4365
+
4366
+ }
4367
+
4368
+ public function seopress_social_accounts_myspace_callback()
4369
+ {
4370
+ $check = isset($this->options['seopress_social_accounts_myspace']) ? $this->options['seopress_social_accounts_myspace'] : NULL;
4371
+
4372
+ printf(
4373
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_myspace]" aria-label="'.__('MySpace URL','wp-seopress').'" placeholder="'.esc_html__('eg: https://myspace.com/my-page-url','wp-seopress').'" value="%s"/>',
4374
+ esc_html( $check )
4375
+
4376
+ );
4377
+
4378
+ }
4379
+
4380
+ public function seopress_social_accounts_soundcloud_callback()
4381
+ {
4382
+ $check = isset($this->options['seopress_social_accounts_soundcloud']) ? $this->options['seopress_social_accounts_soundcloud'] : NULL;
4383
+
4384
+ printf(
4385
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_soundcloud]" aria-label="'.__('Soundcloud URL','wp-seopress').'" placeholder="'.esc_html__('eg: https://soundcloud.com/my-page-url','wp-seopress').'" value="%s"/>',
4386
+ esc_html( $check )
4387
+
4388
+ );
4389
+
4390
+ }
4391
+
4392
+ public function seopress_social_accounts_tumblr_callback()
4393
+ {
4394
+ $check = isset($this->options['seopress_social_accounts_tumblr']) ? $this->options['seopress_social_accounts_tumblr'] : NULL;
4395
+
4396
+ printf(
4397
+ '<input type="text" name="seopress_social_option_name[seopress_social_accounts_tumblr]" placeholder="'.esc_html__('eg: https://your-site.tumblr.com','wp-seopress').'" aria-label="'.__('Tumblr URL','wp-seopress').'" value="%s"/>',
4398
+ esc_html( $check )
4399
+
4400
+ );
4401
+
4402
+ }
4403
+
4404
+ public function seopress_social_facebook_og_callback()
4405
+ {
4406
+ $options = get_option( 'seopress_social_option_name' );
4407
+
4408
+ $check = isset($options['seopress_social_facebook_og']);
4409
+
4410
+ echo '<input id="seopress_social_facebook_og" name="seopress_social_option_name[seopress_social_facebook_og]" type="checkbox"';
4411
+ if ('1' == $check) echo 'checked="yes"';
4412
+ echo ' value="1"/>';
4413
+
4414
+ echo '<label for="seopress_social_facebook_og">'. __( 'Enable OG data', 'wp-seopress' ) .'</label>';
4415
+
4416
+ if (isset($this->options['seopress_social_facebook_og'])) {
4417
+ esc_attr( $this->options['seopress_social_facebook_og']);
4418
+ }
4419
+ }
4420
+
4421
+ public function seopress_social_facebook_img_callback()
4422
+ {
4423
+ $options = get_option( 'seopress_social_option_name' );
4424
+
4425
+ $options_set = isset($options['seopress_social_facebook_img']) ? esc_attr($options['seopress_social_facebook_img']) : NULL;
4426
+
4427
+ echo '<input id="seopress_social_fb_img_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_facebook_img]" aria-label="'.__('Select a default image','wp-seopress').'" placeholder="'.esc_html__('Select your default thumbnail','wp-seopress').'" />
4428
+
4429
+ <input id="seopress_social_fb_img_upload" class="button" type="button" value="'.__('Upload an Image','wp-seopress').'" />';
4430
+
4431
+ echo '<p class="description">'.__('Minimum size: 200x200px, ideal ratio 1.91:1, 8Mb max. (eg: 1640x856px or 3280x1712px for retina screens)', 'wp-seopress').'</p>';
4432
+
4433
+ if (isset($this->options['seopress_social_facebook_img'])) {
4434
+ esc_attr( $this->options['seopress_social_facebook_img']);
4435
+ }
4436
+ }
4437
+
4438
+ public function seopress_social_facebook_img_default_callback()
4439
+ {
4440
+ $options = get_option( 'seopress_social_option_name' );
4441
+
4442
+ $check = isset($options['seopress_social_facebook_img_default']);
4443
+
4444
+ echo '<input id="seopress_social_facebook_img_default" name="seopress_social_option_name[seopress_social_facebook_img_default]" type="checkbox"';
4445
+ if ('1' == $check) echo 'checked="yes"';
4446
+ echo ' value="1"/>';
4447
+
4448
+ echo '<label for="seopress_social_facebook_img_default">'. __( 'Override every <strong>og:image</strong> tag with this default image (except if a custom og:image has already been set from the SEO metabox).', 'wp-seopress' ) .'</label>';
4449
+
4450
+ echo '<p class="description">'.__('This setting doesn‘t apply for the homepage.','wp-seopress').'</p>';
4451
+
4452
+ if (isset($this->options['seopress_social_facebook_img_default'])) {
4453
+ esc_attr( $this->options['seopress_social_facebook_img_default']);
4454
+ }
4455
+ }
4456
+
4457
+ public function seopress_social_facebook_img_cpt_callback()
4458
+ {
4459
+ if (!empty( seopress_get_post_types() ) ) {
4460
+ $post_types = seopress_get_post_types();
4461
+ unset($post_types['post'], $post_types['page']);
4462
+
4463
+ if (!empty( $post_types ) ) {
4464
+ foreach ($post_types as $seopress_cpt_key => $seopress_cpt_value) {
4465
+ echo '<h2>'.$seopress_cpt_value->labels->name.' <em><small>['.$seopress_cpt_value->name.']</small></em></h2>';
4466
+
4467
+ $options = get_option( 'seopress_social_option_name' );
4468
+
4469
+ $options_set = isset($options['seopress_social_facebook_img_cpt'][$seopress_cpt_key]['url']) ? esc_attr($options['seopress_social_facebook_img_cpt'][$seopress_cpt_key]['url']) : NULL;
4470
+
4471
+ echo '<p>
4472
+ <input id="seopress_social_facebook_img_cpt_meta['.$seopress_cpt_key.']" class="seopress_social_facebook_img_cpt_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_facebook_img_cpt]['.$seopress_cpt_key.'][url]" aria-label="'.__('Select a default image','wp-seopress').'" placeholder="'.esc_html__('Select your default thumbnail','wp-seopress').'" />
4473
+
4474
+ <input id="seopress_social_facebook_img_cpt['.$seopress_cpt_key.']" class="seopress_social_facebook_img_cpt button" type="button" value="'.__('Upload an Image','wp-seopress').'" />
4475
+ </p>';
4476
+
4477
+ if (isset($this->options['seopress_social_facebook_img_cpt'][$seopress_cpt_key]['url'])) {
4478
+ esc_attr( $this->options['seopress_social_facebook_img_cpt'][$seopress_cpt_key]['url']);
4479
+ }
4480
+ }
4481
+ } else {
4482
+ echo '<p>'.__('No custom post type to configure.','wp-seopress').'</p>';
4483
+ }
4484
+ }
4485
+ }
4486
+
4487
+ public function seopress_social_facebook_link_ownership_id_callback()
4488
+ {
4489
+ $check = isset($this->options['seopress_social_facebook_link_ownership_id']) ? $this->options['seopress_social_facebook_link_ownership_id'] : NULL;
4490
+
4491
+ printf('<input type="text" name="seopress_social_option_name[seopress_social_facebook_link_ownership_id]" value="%s"/>',
4492
+ esc_html( $check ));
4493
+
4494
+ echo '<p class="description">'.__('One or more Facebook Page IDs that are associated with a URL in order to enable link editing and instant article publishing.', 'wp-seopress').'</p>';
4495
+
4496
+ echo '<pre>&lt;meta property="fb:pages" content="page ID"/&gt;</pre>';
4497
+
4498
+ echo '<br><span class="dashicons dashicons-external"></span><a href="https://www.facebook.com/help/1503421039731588" target="_blank">'.__('How do I find my Facebook Page ID?','wp-seopress').'</a>';
4499
+ }
4500
+
4501
+ public function seopress_social_facebook_admin_id_callback()
4502
+ {
4503
+ $check = isset($this->options['seopress_social_facebook_admin_id']) ? $this->options['seopress_social_facebook_admin_id'] : NULL;
4504
+
4505
+ printf('<input type="text" name="seopress_social_option_name[seopress_social_facebook_admin_id]" value="%s"/>',
4506
+ esc_html( $check ));
4507
+
4508
+ echo '<p class="description">'.__('The ID (or comma-separated list for properties that can accept multiple IDs) of an app, person using the app, or Page Graph API object.', 'wp-seopress').'</p>';
4509
+
4510
+ echo '<pre>&lt;meta property="fb:admins" content="admins ID"/&gt;</pre>';
4511
+ }
4512
+
4513
+ public function seopress_social_facebook_app_id_callback()
4514
+ {
4515
+ $check = isset($this->options['seopress_social_facebook_app_id']) ? $this->options['seopress_social_facebook_app_id'] : NULL;
4516
+
4517
+ printf('<input type="text" name="seopress_social_option_name[seopress_social_facebook_app_id]" value="%s"/>',
4518
+ esc_html( $check ));
4519
+
4520
+ echo '<p class="description">'.__('The Facebook app ID of the site\'s app. In order to use Facebook Insights you must add the app ID to your page. Insights lets you view analytics for traffic to your site from Facebook. Find the app ID in your App Dashboard. <a href="https://developers.facebook.com/apps/redirect/dashboard" target="_blank">More info here</a> <span class="dashicons dashicons-external"></span>', 'wp-seopress').'</p>';
4521
+
4522
+ echo '<pre>&lt;meta property="fb:app_id" content="app ID"/&gt;</pre>';
4523
+
4524
+ echo '<br><span class="dashicons dashicons-external"></span><a href="https://developers.facebook.com/docs/apps/register" target="_blank">'.__('How to create a Facebook App ID','wp-seopress').'</a>';
4525
+ }
4526
+
4527
+ public function seopress_social_twitter_card_callback()
4528
+ {
4529
+ $options = get_option( 'seopress_social_option_name' );
4530
+
4531
+ $check = isset($options['seopress_social_twitter_card']);
4532
+
4533
+ echo '<input id="seopress_social_twitter_card" name="seopress_social_option_name[seopress_social_twitter_card]" type="checkbox"';
4534
+ if ('1' == $check) echo 'checked="yes"';
4535
+ echo ' value="1"/>';
4536
+
4537
+ echo '<label for="seopress_social_twitter_card">'. __( 'Enable Twitter card', 'wp-seopress' ) .'</label>';
4538
+
4539
+ if (isset($this->options['seopress_social_twitter_card'])) {
4540
+ esc_attr( $this->options['seopress_social_twitter_card']);
4541
+ }
4542
+ }
4543
+
4544
+ public function seopress_social_twitter_card_og_callback()
4545
+ {
4546
+ $options = get_option( 'seopress_social_option_name' );
4547
+
4548
+ $check = isset($options['seopress_social_twitter_card_og']);
4549
+
4550
+ echo '<input id="seopress_social_twitter_card_og" name="seopress_social_option_name[seopress_social_twitter_card_og]" type="checkbox"';
4551
+ if ('1' == $check) echo 'checked="yes"';
4552
+ echo ' value="1"/>';
4553
+
4554
+ echo '<label for="seopress_social_twitter_card_og">'. __( 'Use OG if no Twitter Cards', 'wp-seopress' ) .'</label>';
4555
+
4556
+ if (isset($this->options['seopress_social_twitter_card_og'])) {
4557
+ esc_attr( $this->options['seopress_social_twitter_card_og']);
4558
+ }
4559
+ }
4560
+
4561
+ public function seopress_social_twitter_card_img_callback()
4562
+ {
4563
+ $options = get_option( 'seopress_social_option_name' );
4564
+
4565
+ $options_set = isset($options['seopress_social_twitter_card_img']) ? esc_attr($options['seopress_social_twitter_card_img']) : NULL;
4566
+
4567
+ $check = isset($options['seopress_social_twitter_card_img']);
4568
+
4569
+ echo '<input id="seopress_social_twitter_img_meta" type="text" value="'.$options_set.'" name="seopress_social_option_name[seopress_social_twitter_card_img]" aria-label="'.__('Default Twitter Image','wp-seopress').'" placeholder="'.esc_html__('Select your default thumbnail','wp-seopress').'" />
4570
+
4571
+ <input id="seopress_social_twitter_img_upload" class="button" type="button" value="'.__('Upload an Image','wp-seopress').'" />';
4572
+
4573
+ echo '<p class="description">'.__('Minimum size: 144x144px (300x157px with large card enabled), ideal ratio 1:1 (2:1 with large card), 5Mb max.', 'wp-seopress').'</p>';
4574
+
4575
+ if (isset($this->options['seopress_social_twitter_card_img'])) {
4576
+ esc_attr( $this->options['seopress_social_twitter_card_img']);
4577
+ }
4578
+ }
4579
+
4580
+ public function seopress_social_twitter_card_img_size_callback()
4581
+ {
4582
+ $options = get_option( 'seopress_social_option_name' );
4583
+
4584
+ $selected = isset($options['seopress_social_twitter_card_img_size']) ? $options['seopress_social_twitter_card_img_size'] : NULL;
4585
+
4586
+ echo '<select id="seopress_social_twitter_card_img_size" name="seopress_social_option_name[seopress_social_twitter_card_img_size]">';
4587
+ echo ' <option ';
4588
+ if ('default' == $selected) echo 'selected="selected"';
4589
+ echo ' value="default">'. __("Default","wp-seopress") .'</option>';
4590
+ echo '<option ';
4591
+ if ('large' == $selected) echo 'selected="selected"';
4592
+ echo ' value="large">'. __("Large","wp-seopress") .'</option>';
4593
+ echo '</select>';
4594
+
4595
+ if (isset($this->options['seopress_social_twitter_card_img_size'])) {
4596
+ esc_attr( $this->options['seopress_social_twitter_card_img_size']);
4597
+ }
4598
+ }
4599
+
4600
+ public function seopress_google_analytics_enable_callback()
4601
+ {
4602
+ $options = get_option( 'seopress_google_analytics_option_name' );
4603
+
4604
+ $check = isset($options['seopress_google_analytics_enable']);
4605
+
4606
+ echo '<input id="seopress_google_analytics_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_enable]" type="checkbox"';
4607
+ if ('1' == $check) echo 'checked="yes"';
4608
+ echo ' value="1"/>';
4609
+
4610
+ echo '<label for="seopress_google_analytics_enable">'. __( 'Enable Google Analytics tracking (Global Site Tag: gtag.js)', 'wp-seopress' ) .'</label>';
4611
+
4612
+ if (isset($this->options['seopress_google_analytics_enable'])) {
4613
+ esc_attr( $this->options['seopress_google_analytics_enable']);
4614
+ }
4615
+ }
4616
+
4617
+ public function seopress_google_analytics_ua_callback()
4618
+ {
4619
+ $check = isset($this->options['seopress_google_analytics_ua']) ? $this->options['seopress_google_analytics_ua'] : NULL;
4620
+
4621
+ printf(
4622
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_ua]" placeholder="'.esc_html__('Enter your Tracking ID (UA-XXXX-XX)','wp-seopress').'" aria-label="'.__('Enter your tracking ID','wp-seopress').'" value="%s"/>',
4623
+ esc_html( $check )
4624
+ );
4625
+
4626
+ echo '<p class="description"><span class="dashicons dashicons-external"></span><a href="https://support.google.com/analytics/answer/1032385?hl=en" target="_blank">'.__('Find your tracking ID','wp-seopress').'</a></p>';
4627
+
4628
+ }
4629
+
4630
+ public function seopress_google_analytics_disable_callback()
4631
+ {
4632
+ $options = get_option( 'seopress_google_analytics_option_name' );
4633
+
4634
+ $check = isset($options['seopress_google_analytics_disable']);
4635
+
4636
+ echo '<input id="seopress_google_analytics_disable" name="seopress_google_analytics_option_name[seopress_google_analytics_disable]" type="checkbox"';
4637
+ if ('1' == $check) echo 'checked="yes"';
4638
+ echo ' value="1"/>';
4639
+
4640
+ echo '<label for="seopress_google_analytics_disable">'. __( 'Request user\'s consent for analytics tracking (required by GDPR)', 'wp-seopress' ) .'</label>';
4641
+
4642
+ echo '<p class="advise" style="margin:10px 0 0 0">'.__('<strong>The user must click the Accept button to allow tracking.</strong>','wp-seopress').'</p>';
4643
+
4644
+ echo '<p class="description">'.__('User roles excluded from tracking will not see the consent message.<br> If you use a caching plugin, you have to exclude this JS file in your settings: <br><strong>/wp-content/plugins/wp-seopress/assets/js/seopress-cookies-ajax.js</strong> <br>and this cookie <strong>seopress-user-consent-accept</strong>','wp-seopress').'</p>';
4645
+
4646
+ if (function_exists('seopress_get_locale')) {
4647
+ if (seopress_get_locale() =='fr') {
4648
+ $seopress_docs_link['support']['analytics']['custom_tracking'] = 'https://www.seopress.org/fr/support/hooks/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4649
+ } else {
4650
+ $seopress_docs_link['support']['analytics']['custom_tracking'] = 'https://www.seopress.org/support/hooks/add-custom-tracking-code-with-user-consent/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4651
+ }
4652
+ }
4653
+
4654
+ echo '<a class="seopress-doc" href="'.$seopress_docs_link['support']['analytics']['custom_tracking'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Hook to add custom tracking code with user consent - new window','wp-seopress').'</span></a></p>';
4655
+
4656
+ if (isset($this->options['seopress_google_analytics_disable'])) {
4657
+ esc_attr( $this->options['seopress_google_analytics_disable']);
4658
+ }
4659
+ }
4660
+
4661
+ public function seopress_google_analytics_half_disable_callback()
4662
+ {
4663
+ $options = get_option( 'seopress_google_analytics_option_name' );
4664
+
4665
+ $check = isset($options['seopress_google_analytics_half_disable']);
4666
+
4667
+ echo '<input id="seopress_google_analytics_half_disable" name="seopress_google_analytics_option_name[seopress_google_analytics_half_disable]" type="checkbox"';
4668
+ if ('1' == $check) echo 'checked="yes"';
4669
+ echo ' value="1"/>';
4670
+
4671
+ echo '<label for="seopress_google_analytics_half_disable">'. __( 'Display and automatically accept the user‘s consent on page load (not fully GDPR)', 'wp-seopress' ) .'</label>';
4672
+
4673
+ echo '<p class="description">'.__('The previous option must be checked to use this.','wp-seopress').'</p>';
4674
+
4675
+ if (isset($this->options['seopress_google_analytics_half_disable'])) {
4676
+ esc_attr( $this->options['seopress_google_analytics_half_disable']);
4677
+ }
4678
+ }
4679
+
4680
+ public function seopress_google_analytics_opt_out_msg_callback()
4681
+ {
4682
+ $options = get_option( 'seopress_google_analytics_option_name' );
4683
+ $check = isset($options['seopress_google_analytics_opt_out_msg']) ? $options['seopress_google_analytics_opt_out_msg'] : NULL;
4684
+
4685
+ printf(
4686
+ '<textarea id="seopress_google_analytics_opt_out_msg" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg]" rows="4" placeholder="'.esc_html__('Enter your message (HTML allowed)','wp-seopress').'" aria-label="'.__('This message will only appear if request user\'s consent is enabled.','wp-seopress').'">%s</textarea>',
4687
+ esc_html( $check ));
4688
+
4689
+ if (function_exists('seopress_get_locale')) {
4690
+ if (seopress_get_locale() =='fr') {
4691
+ $seopress_docs_link['support']['analytics']['consent_msg'] = 'https://www.seopress.org/fr/support/hooks/filtrer-le-message-du-consentement-utilisateur/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4692
+ } else {
4693
+ $seopress_docs_link['support']['analytics']['consent_msg'] = 'https://www.seopress.org/support/hooks/filter-user-consent-message/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4694
+ }
4695
+ }
4696
+
4697
+ echo '<a class="seopress-doc" href="'.$seopress_docs_link['support']['analytics']['consent_msg'].'" target="_blank"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text">'. __('Hook to filter user consent message - new window','wp-seopress').'</span></a></p>';
4698
+
4699
+ echo '<p class="description">'.__('HTML tags allowed: strong, em, br, a href / target','wp-seopress').'</p>';
4700
+ echo '<p class="description">'.__('Shortcode allowed to get the privacy page set in WordPress settings: [seopress_privacy_page]','wp-seopress').'</p>';
4701
+ }
4702
+
4703
+ public function seopress_google_analytics_opt_out_msg_ok_callback()
4704
+ {
4705
+ $check = isset($this->options['seopress_google_analytics_opt_out_msg_ok']) ? $this->options['seopress_google_analytics_opt_out_msg_ok'] : NULL;
4706
+
4707
+ printf(
4708
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg_ok]" placeholder="'.esc_html__('Accept','wp-seopress').'" aria-label="'.__('Change the button value','wp-seopress').'" value="%s"/>',
4709
+ esc_html( $check )
4710
+ );
4711
+ }
4712
+
4713
+ public function seopress_google_analytics_opt_out_msg_close_callback()
4714
+ {
4715
+ $check = isset($this->options['seopress_google_analytics_opt_out_msg_close']) ? $this->options['seopress_google_analytics_opt_out_msg_close'] : NULL;
4716
+
4717
+ printf(
4718
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg_close]" placeholder="'.esc_html__('default: X','wp-seopress').'" aria-label="'.__('Change the close button value','wp-seopress').'" value="%s"/>',
4719
+ esc_html( $check )
4720
+ );
4721
+ }
4722
+
4723
+ public function seopress_google_analytics_cb_pos_callback()
4724
+ {
4725
+ $options = get_option( 'seopress_google_analytics_option_name' );
4726
+
4727
+ $selected = isset($options['seopress_google_analytics_cb_pos']) ? $options['seopress_google_analytics_cb_pos'] : NULL;
4728
+
4729
+ echo '<select id="seopress_google_analytics_cb_pos" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_pos]">';
4730
+ echo ' <option ';
4731
+ if ('bottom' == $selected) echo 'selected="selected"';
4732
+ echo ' value="bottom">'. __("Bottom (default)","wp-seopress") .'</option>';
4733
+ echo ' <option ';
4734
+ if ('top' == $selected) echo 'selected="selected"';
4735
+ echo ' value="top">'. __("Top","wp-seopress") .'</option>';
4736
+ echo '</select>';
4737
+
4738
+ if (isset($this->options['seopress_google_analytics_cb_pos'])) {
4739
+ esc_attr( $this->options['seopress_google_analytics_cb_pos']);
4740
+ }
4741
+ }
4742
+
4743
+ public function seopress_google_analytics_cb_bg_callback()
4744
+ {
4745
+ $check = isset($this->options['seopress_google_analytics_cb_bg']) ? $this->options['seopress_google_analytics_cb_bg'] : NULL;
4746
+
4747
+ printf(
4748
+ '<input type="text" data-default-color="#F1F1F1" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_bg]" aria-label="'.__('Change the color of the cookie bar background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4749
+ esc_html( $check )
4750
+ );
4751
+ }
4752
+
4753
+ public function seopress_google_analytics_cb_txt_col_callback()
4754
+ {
4755
+ $check = isset($this->options['seopress_google_analytics_cb_txt_col']) ? $this->options['seopress_google_analytics_cb_txt_col'] : NULL;
4756
+
4757
+ printf(
4758
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_txt_col]" aria-label="'.__('Change the color of the cookie bar text','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4759
+ esc_html( $check )
4760
+ );
4761
+ }
4762
+
4763
+ public function seopress_google_analytics_cb_lk_col_callback()
4764
+ {
4765
+ $check = isset($this->options['seopress_google_analytics_cb_lk_col']) ? $this->options['seopress_google_analytics_cb_lk_col'] : NULL;
4766
+
4767
+ printf(
4768
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_lk_col]" aria-label="'.__('Change the color of the cookie bar link','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4769
+ esc_html( $check )
4770
+ );
4771
+ }
4772
+
4773
+ public function seopress_google_analytics_cb_btn_bg_callback()
4774
+ {
4775
+ $check = isset($this->options['seopress_google_analytics_cb_btn_bg']) ? $this->options['seopress_google_analytics_cb_btn_bg'] : NULL;
4776
+
4777
+ printf(
4778
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_bg]" aria-label="'.__('Change the color of the cookie bar button background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4779
+ esc_html( $check )
4780
+ );
4781
+ }
4782
+
4783
+ public function seopress_google_analytics_cb_btn_bg_hov_callback()
4784
+ {
4785
+ $check = isset($this->options['seopress_google_analytics_cb_btn_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_bg_hov'] : NULL;
4786
+
4787
+ printf(
4788
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_bg_hov]" aria-label="'.__('Change the color of the cookie bar button hover background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4789
+ esc_html( $check )
4790
+ );
4791
+ }
4792
+
4793
+ public function seopress_google_analytics_cb_btn_col_callback()
4794
+ {
4795
+ $check = isset($this->options['seopress_google_analytics_cb_btn_col']) ? $this->options['seopress_google_analytics_cb_btn_col'] : NULL;
4796
+
4797
+ printf(
4798
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_col]" aria-label="'.__('Change the color of the cookie bar button','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4799
+ esc_html( $check )
4800
+ );
4801
+ }
4802
+
4803
+ public function seopress_google_analytics_cb_btn_col_hov_callback()
4804
+ {
4805
+ $check = isset($this->options['seopress_google_analytics_cb_btn_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_col_hov'] : NULL;
4806
+
4807
+ printf(
4808
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_col_hov]" aria-label="'.__('Change the color of the cookie bar button hover','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4809
+ esc_html( $check )
4810
+ );
4811
+ }
4812
+
4813
+ public function seopress_google_analytics_cb_btn_sec_bg_callback()
4814
+ {
4815
+ $check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg'] : NULL;
4816
+
4817
+ printf(
4818
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_bg]" aria-label="'.__('Change the color of the cookie bar secondary button background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4819
+ esc_html( $check )
4820
+ );
4821
+ }
4822
+
4823
+ public function seopress_google_analytics_cb_btn_sec_col_callback()
4824
+ {
4825
+ $check = isset($this->options['seopress_google_analytics_cb_btn_sec_col']) ? $this->options['seopress_google_analytics_cb_btn_sec_col'] : NULL;
4826
+
4827
+ printf(
4828
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_col]" aria-label="'.__('Change the color of the cookie bar secondary button hover background','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4829
+ esc_html( $check )
4830
+ );
4831
+ }
4832
+
4833
+ public function seopress_google_analytics_cb_btn_sec_bg_hov_callback()
4834
+ {
4835
+ $check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg_hov'] : NULL;
4836
+
4837
+ printf(
4838
+ '<input type="text" data-default-color="#222222" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_bg_hov]" aria-label="'.__('Change the color of the cookie bar secondary button','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4839
+ esc_html( $check )
4840
+ );
4841
+ }
4842
+
4843
+ public function seopress_google_analytics_cb_btn_sec_col_hov_callback()
4844
+ {
4845
+ $check = isset($this->options['seopress_google_analytics_cb_btn_sec_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_col_hov'] : NULL;
4846
+
4847
+ printf(
4848
+ '<input type="text" data-default-color="#FFFFFF" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_btn_sec_col_hov]" aria-label="'.__('Change the color of the cookie bar secondary button hover','wp-seopress').'" value="%s" class="seopress_admin_color_picker"/>',
4849
+ esc_html( $check )
4850
+ );
4851
+ }
4852
+
4853
+ public function seopress_google_analytics_roles_callback()
4854
+ {
4855
+ $options = get_option( 'seopress_google_analytics_option_name' );
4856
+
4857
+ global $wp_roles;
4858
+
4859
+ if ( ! isset( $wp_roles ) )
4860
+ $wp_roles = new WP_Roles();
4861
+
4862
+ foreach ($wp_roles->get_names() as $key => $value) {
4863
+
4864
+ $check = isset($options['seopress_google_analytics_roles'][$key]);
4865
+
4866
+ echo '<input id="seopress_google_analytics_roles_'.$key.'" name="seopress_google_analytics_option_name[seopress_google_analytics_roles]['.$key.']" type="checkbox"';
4867
+ if ('1' == $check) echo 'checked="yes"';
4868
+ echo ' value="1"/>';
4869
+
4870
+ echo '<label for="seopress_google_analytics_roles_'.$key.'">'. $value .'</label><br/>';
4871
+
4872
+ if (isset($this->options['seopress_google_analytics_roles'][$key])) {
4873
+ esc_attr( $this->options['seopress_google_analytics_roles'][$key]);
4874
+ }
4875
+ }
4876
+ }
4877
+
4878
+ public function seopress_google_analytics_optimize_callback()
4879
+ {
4880
+ $check = isset($this->options['seopress_google_analytics_optimize']) ? $this->options['seopress_google_analytics_optimize'] : NULL;
4881
+
4882
+ printf(
4883
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_optimize]" placeholder="'.esc_html__('Enter your Google Optimize container ID','wp-seopress').'" value="%s" aria-label="'.__('GTM-XXXXXXX','wp-seopress').'"/>',
4884
+ esc_html($check));
4885
+
4886
+ echo '<p class="description">'.__('Google Optimize offers A/B testing, website testing & personalization tools.','wp-seopress').' <a href="https://marketingplatform.google.com/about/optimize/" target="_blank">'.__('Learn more','wp-seopress').'</a><span class="dashicons dashicons-external"></span></p>';
4887
+ }
4888
+
4889
+ public function seopress_google_analytics_ads_callback()
4890
+ {
4891
+ $check = isset($this->options['seopress_google_analytics_ads']) ? $this->options['seopress_google_analytics_ads'] : NULL;
4892
+
4893
+ printf(
4894
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_ads]" placeholder="'.esc_html__('Enter your Google Ads conversion ID (eg: AW-123456789)','wp-seopress').'" value="%s" aria-label="'.__('AW-XXXXXXXXX','wp-seopress').'"/>',
4895
+ esc_html($check));
4896
+ }
4897
+
4898
+ public function seopress_google_analytics_other_tracking_callback()
4899
+ {
4900
+ $check = isset($this->options['seopress_google_analytics_other_tracking']) ? $this->options['seopress_google_analytics_other_tracking'] : NULL;
4901
+
4902
+ printf(
4903
+ '<textarea id="seopress_google_analytics_other_tracking" name="seopress_google_analytics_option_name[seopress_google_analytics_other_tracking]" rows="16" placeholder="'.esc_html__('Paste your tracking code here like Google Tag Manager (head)','wp-seopress').'" aria-label="'.__('Additional tracking code field','wp-seopress').'">%s</textarea>',
4904
+ esc_textarea($check));
4905
+
4906
+ echo '<p class="description">'.__('This code will be added in the head section of your page.','wp-seopress').'</p>';
4907
+ }
4908
+
4909
+ public function seopress_google_analytics_other_tracking_body_callback()
4910
+ {
4911
+ $check = isset($this->options['seopress_google_analytics_other_tracking_body']) ? $this->options['seopress_google_analytics_other_tracking_body'] : NULL;
4912
+
4913
+ printf(
4914
+ '<textarea id="seopress_google_analytics_other_tracking_body" name="seopress_google_analytics_option_name[seopress_google_analytics_other_tracking_body]" rows="16" placeholder="'.esc_html__('Paste your tracking code here like Google Tag Manager (body)','wp-seopress').'" aria-label="'.__('Additional tracking code field added to body','wp-seopress').'">%s</textarea>',
4915
+ esc_textarea($check));
4916
+
4917
+ echo '<p class="description">'.__('This code will be added just after the opening body tag of your page.','wp-seopress').'</p>';
4918
+ echo '<p class="description">'.__('You don‘t see your code? Make sure to call <strong>wp_body_open();</strong> just after the opening body tag in your theme.','wp-seopress').'</p>';
4919
+
4920
+ if (function_exists('seopress_get_locale')) {
4921
+ if (seopress_get_locale() =='fr') {
4922
+ $seopress_docs_link['support']['analytics']['gtm'] = 'https://www.seopress.org/fr/support/guides/google-tag-manager-site-wordpress-seopress/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4923
+ } else {
4924
+ $seopress_docs_link['support']['analytics']['gtm'] = 'https://www.seopress.org/support/guides/google-tag-manager-wordpress-seopress/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
4925
+ }
4926
+ }
4927
+
4928
+ echo '<a href="'.$seopress_docs_link['support']['analytics']['gtm'].'" target="_blank">'. __('Learn more','wp-seopress').'</span></a><span class="dashicons dashicons-external"></span></p>';
4929
+ }
4930
+
4931
+ public function seopress_google_analytics_other_tracking_footer_callback()
4932
+ {
4933
+ $check = isset($this->options['seopress_google_analytics_other_tracking_footer']) ? $this->options['seopress_google_analytics_other_tracking_footer'] : NULL;
4934
+
4935
+ printf(
4936
+ '<textarea id="seopress_google_analytics_other_tracking_footer" name="seopress_google_analytics_option_name[seopress_google_analytics_other_tracking_footer]" rows="16" placeholder="'.esc_html__('Paste your tracking code here (body footer)','wp-seopress').'" aria-label="'.__('Additional tracking code field added to body footer','wp-seopress').'">%s</textarea>',
4937
+ esc_textarea($check));
4938
+
4939
+ echo '<p class="description">'.__('This code will be added just after the closing body tag of your page.','wp-seopress').'</p>';
4940
+ }
4941
+
4942
+ public function seopress_google_analytics_remarketing_callback()
4943
+ {
4944
+ $options = get_option( 'seopress_google_analytics_option_name' );
4945
+
4946
+ $check = isset($options['seopress_google_analytics_remarketing']);
4947
+
4948
+ echo '<input id="seopress_google_analytics_remarketing" name="seopress_google_analytics_option_name[seopress_google_analytics_remarketing]" type="checkbox"';
4949
+ if ('1' == $check) echo 'checked="yes"';
4950
+ echo ' value="1"/>';
4951
+
4952
+ echo '<label for="seopress_google_analytics_remarketing">'. __( 'Enable remarketing, demographics, and interests reporting', 'wp-seopress' ) .'</label>';
4953
+
4954
+ echo '<p class="description">'. __('A remarketing audience is a list of cookies or mobile-advertising IDs that represents a group of users you want to re-engage because of their likelihood to convert.','wp-seopress').'
4955
+ <a href="https://support.google.com/analytics/answer/2611268?hl=en" target="_blank">'.__('Learn more','wp-seopress').'</a>
4956
+ <span class="dashicons dashicons-external"></span>
4957
+ </p>';
4958
+
4959
+ if (isset($this->options['seopress_google_analytics_remarketing'])) {
4960
+ esc_attr( $this->options['seopress_google_analytics_remarketing']);
4961
+ }
4962
+ }
4963
+
4964
+ public function seopress_google_analytics_ip_anonymization_callback()
4965
+ {
4966
+ $options = get_option( 'seopress_google_analytics_option_name' );
4967
+
4968
+ $check = isset($options['seopress_google_analytics_ip_anonymization']);
4969
+
4970
+ echo '<input id="seopress_google_analytics_ip_anonymization" name="seopress_google_analytics_option_name[seopress_google_analytics_ip_anonymization]" type="checkbox"';
4971
+ if ('1' == $check) echo 'checked="yes"';
4972
+ echo ' value="1"/>';
4973
+
4974
+ echo '<label for="seopress_google_analytics_ip_anonymization">'. __( 'Enable IP Anonymization', 'wp-seopress' ) .'</label>';
4975
+
4976
+ echo '<p class="description">'. __('When a customer of Analytics requests IP address anonymization, Analytics anonymizes the address as soon as technically feasible at the earliest possible stage of the collection network.','wp-seopress').'
4977
+ <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization" target="_blank">'.__('Learn more','wp-seopress').'</a>
4978
+ <span class="dashicons dashicons-external"></span>
4979
+ </p>';
4980
+
4981
+ if (isset($this->options['seopress_google_analytics_ip_anonymization'])) {
4982
+ esc_attr( $this->options['seopress_google_analytics_ip_anonymization']);
4983
+ }
4984
+ }
4985
+
4986
+ public function seopress_google_analytics_link_attribution_callback()
4987
+ {
4988
+ $options = get_option( 'seopress_google_analytics_option_name' );
4989
+
4990
+ $check = isset($options['seopress_google_analytics_link_attribution']);
4991
+
4992
+ echo '<input id="seopress_google_analytics_link_attribution" name="seopress_google_analytics_option_name[seopress_google_analytics_link_attribution]" type="checkbox"';
4993
+ if ('1' == $check) echo 'checked="yes"';
4994
+ echo ' value="1"/>';
4995
+
4996
+ echo '<label for="seopress_google_analytics_link_attribution">'. __( 'Enhanced Link Attribution', 'wp-seopress' ) .'</label>';
4997
+
4998
+ echo '<p class="description">'. __('Enhanced Link Attribution improves the accuracy of your In-Page Analytics report by automatically differentiating between multiple links to the same URL on a single page by using link element IDs.','wp-seopress').'
4999
+ <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-link-attribution" target="_blank">'.__('Learn more','wp-seopress').'</a>
5000
+ <span class="dashicons dashicons-external"></span>
5001
+ </p>';
5002
+
5003
+ if (isset($this->options['seopress_google_analytics_link_attribution'])) {
5004
+ esc_attr( $this->options['seopress_google_analytics_link_attribution']);
5005
+ }
5006
+ }
5007
+
5008
+ public function seopress_google_analytics_cross_enable_callback()
5009
+ {
5010
+ $options = get_option( 'seopress_google_analytics_option_name' );
5011
+
5012
+ $check = isset($options['seopress_google_analytics_cross_enable']);
5013
+
5014
+ echo '<input id="seopress_google_analytics_cross_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_cross_enable]" type="checkbox"';
5015
+ if ('1' == $check) echo 'checked="yes"';
5016
+ echo ' value="1"/>';
5017
+
5018
+ echo '<label for="seopress_google_analytics_cross_enable">'. __( 'Enable cross-domain tracking', 'wp-seopress' ) .'</label>';
5019
+
5020
+ echo '<p class="description">'. __('Cross domain tracking makes it possible for Analytics to see sessions on two related sites (such as an ecommerce site and a separate shopping cart site) as a single session. This is sometimes called site linking.','wp-seopress').'
5021
+ <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain" target="_blank">'.__('Learn more','wp-seopress').'</a>
5022
+ <span class="dashicons dashicons-external"></span>
5023
+ </p>';
5024
+
5025
+ if (isset($this->options['seopress_google_analytics_cross_enable'])) {
5026
+ esc_attr( $this->options['seopress_google_analytics_cross_enable']);
5027
+ }
5028
+ }
5029
+
5030
+ public function seopress_google_analytics_cross_domain_callback()
5031
+ {
5032
+ $check = isset($this->options['seopress_google_analytics_cross_domain']) ? $this->options['seopress_google_analytics_cross_domain'] : NULL;
5033
+
5034
+ printf(
5035
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_cross_domain]" placeholder="'.esc_html__('Enter your domains: seopress.org,sub.seopress.org,sub2.seopress.org','wp-seopress').'" value="%s" aria-label="'.__('Cross domains','wp-seopress').'"/>',
5036
+ esc_html($check)
5037
+
5038
+ );
5039
+
5040
+ }
5041
+
5042
+ public function seopress_google_analytics_link_tracking_enable_callback()
5043
+ {
5044
+ $options = get_option( 'seopress_google_analytics_option_name' );
5045
+
5046
+ $check = isset($options['seopress_google_analytics_link_tracking_enable']);
5047
+
5048
+ echo '<input id="seopress_google_analytics_link_tracking_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_link_tracking_enable]" type="checkbox"';
5049
+ if ('1' == $check) echo 'checked="yes"';
5050
+ echo ' value="1"/>';
5051
+
5052
+ echo '<label for="seopress_google_analytics_link_tracking_enable">'. __( 'Enable external links tracking', 'wp-seopress' ) .'</label>';
5053
+
5054
+ if (isset($this->options['seopress_google_analytics_link_tracking_enable'])) {
5055
+ esc_attr( $this->options['seopress_google_analytics_link_tracking_enable']);
5056
+ }
5057
+ }
5058
+
5059
+ public function seopress_google_analytics_download_tracking_enable_callback()
5060
+ {
5061
+ $options = get_option( 'seopress_google_analytics_option_name' );
5062
+
5063
+ $check = isset($options['seopress_google_analytics_download_tracking_enable']);
5064
+
5065
+ echo '<input id="seopress_google_analytics_download_tracking_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_download_tracking_enable]" type="checkbox"';
5066
+ if ('1' == $check) echo 'checked="yes"';
5067
+ echo ' value="1"/>';
5068
+
5069
+ echo '<label for="seopress_google_analytics_download_tracking_enable">'. __( 'Enable download tracking', 'wp-seopress' ) .'</label>';
5070
+
5071
+ if (isset($this->options['seopress_google_analytics_download_tracking_enable'])) {
5072
+ esc_attr( $this->options['seopress_google_analytics_download_tracking_enable']);
5073
+ }
5074
+ }
5075
+
5076
+ public function seopress_google_analytics_download_tracking_callback()
5077
+ {
5078
+ $check = isset($this->options['seopress_google_analytics_download_tracking']) ? $this->options['seopress_google_analytics_download_tracking'] : NULL;
5079
+
5080
+ printf(
5081
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_download_tracking]" placeholder="'.esc_html__('pdf|docx|pptx|zip','wp-seopress').'" aria-label="'.__('Track downloads\' clicks','wp-seopress').'" value="%s"/>',
5082
+ esc_html( $check )
5083
+ );
5084
+
5085
+ echo '<p class="description">'. __('Separate each file type extensions with a pipe "|"','wp-seopress').'</a>
5086
+ </p>';
5087
+
5088
+ }
5089
+
5090
+ public function seopress_google_analytics_affiliate_tracking_enable_callback()
5091
+ {
5092
+ $options = get_option( 'seopress_google_analytics_option_name' );
5093
+
5094
+ $check = isset($options['seopress_google_analytics_affiliate_tracking_enable']);
5095
+
5096
+ echo '<input id="seopress_google_analytics_affiliate_tracking_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_affiliate_tracking_enable]" type="checkbox"';
5097
+ if ('1' == $check) echo 'checked="yes"';
5098
+ echo ' value="1"/>';
5099
+
5100
+ echo '<label for="seopress_google_analytics_affiliate_tracking_enable">'. __( 'Enable affiliate/outbound tracking', 'wp-seopress' ) .'</label>';
5101
+
5102
+ if (isset($this->options['seopress_google_analytics_affiliate_tracking_enable'])) {
5103
+ esc_attr( $this->options['seopress_google_analytics_affiliate_tracking_enable']);
5104
+ }
5105
+ }
5106
+
5107
+ public function seopress_google_analytics_affiliate_tracking_callback()
5108
+ {
5109
+ $check = isset($this->options['seopress_google_analytics_affiliate_tracking']) ? $this->options['seopress_google_analytics_affiliate_tracking'] : NULL;
5110
+
5111
+ printf(
5112
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_affiliate_tracking]" placeholder="'.esc_html__('aff|go|out','wp-seopress').'" aria-label="'.__('Track affiliate/outbound links','wp-seopress').'" value="%s"/>',
5113
+ esc_html( $check )
5114
+ );
5115
+
5116
+ echo '<p class="description">'. __('Separate each keyword with a pipe "|"','wp-seopress').'</a>
5117
+ </p>';
5118
+
5119
+ }
5120
+
5121
+ public function seopress_google_analytics_cd_author_callback()
5122
+ {
5123
+ $options = get_option( 'seopress_google_analytics_option_name' );
5124
+
5125
+ $selected = isset($options['seopress_google_analytics_cd_author']) ? $options['seopress_google_analytics_cd_author'] : NULL;
5126
+
5127
+ echo '<select id="seopress_google_analytics_cd_author" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_author]">';
5128
+ echo ' <option ';
5129
+ if ('none' == $selected) echo 'selected="selected"';
5130
+ echo ' value="none">'. __("None","wp-seopress") .'</option>';
5131
+
5132
+ for ($i=1; $i <= 20 ; $i++) {
5133
+ echo ' <option ';
5134
+ if ('dimension'.$i.'' == $selected) echo 'selected="selected"';
5135
+ echo ' value="dimension'.$i.'">'. sprintf(__("Custom Dimension #%d","wp-seopress"), $i) .'</option>';
5136
+ }
5137
+ echo '</select>';
5138
+
5139
+ if (isset($this->options['seopress_google_analytics_cd_author'])) {
5140
+ esc_attr( $this->options['seopress_google_analytics_cd_author']);
5141
+ }
5142
+ }
5143
+
5144
+ public function seopress_google_analytics_cd_category_callback()
5145
+ {
5146
+ $options = get_option( 'seopress_google_analytics_option_name' );
5147
+
5148
+ $selected = isset($options['seopress_google_analytics_cd_category']) ? $options['seopress_google_analytics_cd_category'] : NULL;
5149
+
5150
+ echo '<select id="seopress_google_analytics_cd_category" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_category]">';
5151
+ echo ' <option ';
5152
+ if ('none' == $selected) echo 'selected="selected"';
5153
+ echo ' value="none">'. __("None","wp-seopress") .'</option>';
5154
+
5155
+ for ($i=1; $i <= 20 ; $i++) {
5156
+ echo ' <option ';
5157
+ if ('dimension'.$i.'' == $selected) echo 'selected="selected"';
5158
+ echo ' value="dimension'.$i.'">'. sprintf(__("Custom Dimension #%d","wp-seopress"), $i) .'</option>';
5159
+ }
5160
+ echo '</select>';
5161
+
5162
+ if (isset($this->options['seopress_google_analytics_cd_category'])) {
5163
+ esc_attr( $this->options['seopress_google_analytics_cd_category']);
5164
+ }
5165
+ }
5166
+
5167
+ public function seopress_google_analytics_cd_tag_callback()
5168
+ {
5169
+ $options = get_option( 'seopress_google_analytics_option_name' );
5170
+
5171
+ $selected = isset($options['seopress_google_analytics_cd_tag']) ? $options['seopress_google_analytics_cd_tag'] : NULL;
5172
+
5173
+ echo '<select id="seopress_google_analytics_cd_tag" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_tag]">';
5174
+ echo ' <option ';
5175
+ if ('none' == $selected) echo 'selected="selected"';
5176
+ echo ' value="none">'. __("None","wp-seopress") .'</option>';
5177
+
5178
+ for ($i=1; $i <= 20 ; $i++) {
5179
+ echo ' <option ';
5180
+ if ('dimension'.$i.'' == $selected) echo 'selected="selected"';
5181
+ echo ' value="dimension'.$i.'">'. sprintf(__("Custom Dimension #%d","wp-seopress"), $i) .'</option>';
5182
+ }
5183
+ echo '</select>';
5184
+
5185
+ if (isset($this->options['seopress_google_analytics_cd_tag'])) {
5186
+ esc_attr( $this->options['seopress_google_analytics_cd_tag']);
5187
+ }
5188
+ }
5189
+
5190
+ public function seopress_google_analytics_cd_post_type_callback()
5191
+ {
5192
+ $options = get_option( 'seopress_google_analytics_option_name' );
5193
+
5194
+ $selected = isset($options['seopress_google_analytics_cd_post_type']) ? $options['seopress_google_analytics_cd_post_type'] : NULL;
5195
+
5196
+ echo '<select id="seopress_google_analytics_cd_post_type" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_post_type]">';
5197
+ echo ' <option ';
5198
+ if ('none' == $selected) echo 'selected="selected"';
5199
+ echo ' value="none">'. __("None","wp-seopress") .'</option>';
5200
+
5201
+ for ($i=1; $i <= 20 ; $i++) {
5202
+ echo ' <option ';
5203
+ if ('dimension'.$i.'' == $selected) echo 'selected="selected"';
5204
+ echo ' value="dimension'.$i.'">'. sprintf(__("Custom Dimension #%d","wp-seopress"), $i) .'</option>';
5205
+ }
5206
+ echo '</select>';
5207
+
5208
+ if (isset($this->options['seopress_google_analytics_cd_post_type'])) {
5209
+ esc_attr( $this->options['seopress_google_analytics_cd_post_type']);
5210
+ }
5211
+ }
5212
+
5213
+ public function seopress_google_analytics_cd_logged_in_user_callback()
5214
+ {
5215
+ $options = get_option( 'seopress_google_analytics_option_name' );
5216
+
5217
+ $selected = isset($options['seopress_google_analytics_cd_logged_in_user']) ? $options['seopress_google_analytics_cd_logged_in_user'] : NULL;
5218
+
5219
+ echo '<select id="seopress_google_analytics_cd_logged_in_user" name="seopress_google_analytics_option_name[seopress_google_analytics_cd_logged_in_user]">';
5220
+ echo ' <option ';
5221
+ if ('none' == $selected) echo 'selected="selected"';
5222
+ echo ' value="none">'. __("None","wp-seopress") .'</option>';
5223
+
5224
+ for ($i=1; $i <= 20 ; $i++) {
5225
+ echo ' <option ';
5226
+ if ('dimension'.$i.'' == $selected) echo 'selected="selected"';
5227
+ echo ' value="dimension'.$i.'">'. sprintf(__("Custom Dimension #%d","wp-seopress"), $i) .'</option>';
5228
+ }
5229
+ echo '</select>';
5230
+
5231
+ if (isset($this->options['seopress_google_analytics_cd_logged_in_user'])) {
5232
+ esc_attr( $this->options['seopress_google_analytics_cd_logged_in_user']);
5233
+ }
5234
+ }
5235
+
5236
+ public function seopress_google_analytics_matomo_enable_callback()
5237
+ {
5238
+ $options = get_option( 'seopress_google_analytics_option_name' );
5239
+
5240
+ $check = isset($options['seopress_google_analytics_matomo_enable']);
5241
+
5242
+ echo '<input id="seopress_google_analytics_matomo_enable" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_enable]" type="checkbox"';
5243
+ if ('1' == $check) echo 'checked="yes"';
5244
+ echo ' value="1"/>';
5245
+
5246
+ echo '<label for="seopress_google_analytics_matomo_enable">'. __( 'Enable Matomo tracking (Matomo account required)', 'wp-seopress' ) .'</label>';
5247
+
5248
+ if (isset($this->options['seopress_google_analytics_matomo_enable'])) {
5249
+ esc_attr( $this->options['seopress_google_analytics_matomo_enable']);
5250
+ }
5251
+ }
5252
+
5253
+ public function seopress_google_analytics_matomo_id_callback()
5254
+ {
5255
+ $check = isset($this->options['seopress_google_analytics_matomo_id']) ? $this->options['seopress_google_analytics_matomo_id'] : NULL;
5256
+
5257
+ printf(
5258
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_id]" placeholder="'.esc_html__('Enter "example" if you Matomo account URL is "example.matomo.cloud"','wp-seopress').'" value="%s" aria-label="'.__('Matomo Cloud URL','wp-seopress').'"/>',
5259
+ esc_html($check)
5260
+
5261
+ );
5262
+
5263
+ echo '<p class="description">'.__('Enter only the <strong>host</strong> like this example.matomo.cloud').'</p>';
5264
+
5265
+ }
5266
+
5267
+ public function seopress_google_analytics_matomo_site_id_callback()
5268
+ {
5269
+ $check = isset($this->options['seopress_google_analytics_matomo_site_id']) ? $this->options['seopress_google_analytics_matomo_site_id'] : NULL;
5270
+
5271
+ printf(
5272
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_site_id]" placeholder="'.esc_html__('Enter your site ID here','wp-seopress').'" value="%s" aria-label="'.__('Matomo Site ID','wp-seopress').'"/>',
5273
+ esc_html($check)
5274
+
5275
+ );
5276
+
5277
+ echo '<p class="description">'.__('To find your site ID, go to your <strong>Matomo Cloud account, Websites, Manage page</strong>. Look at "Site ID" on the right part.','wp-seopress').'</p>';
5278
+
5279
+ }
5280
+
5281
+ public function seopress_google_analytics_matomo_subdomains_callback()
5282
+ {
5283
+ $options = get_option( 'seopress_google_analytics_option_name' );
5284
+
5285
+ $check = isset($options['seopress_google_analytics_matomo_subdomains']);
5286
+
5287
+ echo '<input id="seopress_google_analytics_matomo_subdomains" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_subdomains]" type="checkbox"';
5288
+ if ('1' == $check) echo 'checked="yes"';
5289
+ echo ' value="1"/>';
5290
+
5291
+ echo '<label for="seopress_google_analytics_matomo_subdomains">'. __( 'Tracking one domain and its subdomains in the same website', 'wp-seopress' ) .'</label>';
5292
+
5293
+ echo '<p class="description">'.__( 'If one visitor visits x.example.com and y.example.com, they will be counted as a unique visitor.', 'wp-seopress' ).'</p>';
5294
+
5295
+ if (isset($this->options['seopress_google_analytics_matomo_subdomains'])) {
5296
+ esc_attr( $this->options['seopress_google_analytics_matomo_subdomains']);
5297
+ }
5298
+ }
5299
+
5300
+ public function seopress_google_analytics_matomo_site_domain_callback()
5301
+ {
5302
+ $options = get_option( 'seopress_google_analytics_option_name' );
5303
+
5304
+ $check = isset($options['seopress_google_analytics_matomo_site_domain']);
5305
+
5306
+ echo '<input id="seopress_google_analytics_matomo_site_domain" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_site_domain]" type="checkbox"';
5307
+ if ('1' == $check) echo 'checked="yes"';
5308
+ echo ' value="1"/>';
5309
+
5310
+ echo '<label for="seopress_google_analytics_matomo_site_domain">'. __( 'Prepend the site domain to the page title when tracking', 'wp-seopress' ) .'</label>';
5311
+
5312
+ echo '<p class="description">'.__( 'If someone visits the \'About\' page on blog.example.com it will be recorded as \'blog / About\'. This is the easiest way to get an overview of your traffic by sub-domain.', 'wp-seopress' ).'</p>';
5313
+
5314
+ if (isset($this->options['seopress_google_analytics_matomo_site_domain'])) {
5315
+ esc_attr( $this->options['seopress_google_analytics_matomo_site_domain']);
5316
+ }
5317
+ }
5318
+
5319
+ public function seopress_google_analytics_matomo_no_js_callback()
5320
+ {
5321
+ $options = get_option( 'seopress_google_analytics_option_name' );
5322
+
5323
+ $check = isset($options['seopress_google_analytics_matomo_no_js']);
5324
+
5325
+ echo '<input id="seopress_google_analytics_matomo_no_js" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_no_js]" type="checkbox"';
5326
+ if ('1' == $check) echo 'checked="yes"';
5327
+ echo ' value="1"/>';
5328
+
5329
+ echo '<label for="seopress_google_analytics_matomo_no_js">'. __( 'Track users with JavaScript disabled', 'wp-seopress' ) .'</label>';
5330
+
5331
+ if (isset($this->options['seopress_google_analytics_matomo_no_js'])) {
5332
+ esc_attr( $this->options['seopress_google_analytics_matomo_no_js']);
5333
+ }
5334
+ }
5335
+
5336
+ public function seopress_google_analytics_matomo_cross_domain_callback()
5337
+ {
5338
+ $options = get_option( 'seopress_google_analytics_option_name' );
5339
+
5340
+ $check = isset($options['seopress_google_analytics_matomo_cross_domain']);
5341
+
5342
+ echo '<input id="seopress_google_analytics_matomo_cross_domain" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_cross_domain]" type="checkbox"';
5343
+ if ('1' == $check) echo 'checked="yes"';
5344
+ echo ' value="1"/>';
5345
+
5346
+ echo '<label for="seopress_google_analytics_matomo_cross_domain">'. __( 'Enables cross domain linking', 'wp-seopress' ) .'</label>';
5347
+
5348
+ echo '<p class="description">'.__( 'By default, the visitor ID that identifies a unique visitor is stored in the browser\'s first party cookies which can only be accessed by pages on the same domain. Enabling cross domain linking lets you track all the actions and pageviews of a specific visitor into the same visit even when they view pages on several domains. Whenever a user clicks on a link to one of your website\'s alias URLs, it will append a URL parameter pk_vid forwarding the Visitor ID.','wp-seopress' ).'</p>';
5349
+
5350
+ if (isset($this->options['seopress_google_analytics_matomo_cross_domain'])) {
5351
+ esc_attr( $this->options['seopress_google_analytics_matomo_cross_domain']);
5352
+ }
5353
+ }
5354
+
5355
+ public function seopress_google_analytics_matomo_cross_domain_sites_callback()
5356
+ {
5357
+ $check = isset($this->options['seopress_google_analytics_matomo_cross_domain_sites']) ? $this->options['seopress_google_analytics_matomo_cross_domain_sites'] : NULL;
5358
+
5359
+ printf(
5360
+ '<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_cross_domain_sites]" placeholder="'.esc_html__('Enter your domains: seopress.org,sub.seopress.org,sub2.seopress.org','wp-seopress').'" value="%s" aria-label="'.__('Cross domains','wp-seopress').'"/>',
5361
+ esc_html($check)
5362
+
5363
+ );
5364
+
5365
+ }
5366
+
5367
+ public function seopress_google_analytics_matomo_dnt_callback()
5368
+ {
5369
+ $options = get_option( 'seopress_google_analytics_option_name' );
5370
+
5371
+ $check = isset($options['seopress_google_analytics_matomo_dnt']);
5372
+
5373
+ echo '<input id="seopress_google_analytics_matomo_dnt" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_dnt]" type="checkbox"';
5374
+ if ('1' == $check) echo 'checked="yes"';
5375
+ echo ' value="1"/>';
5376
+
5377
+ echo '<label for="seopress_google_analytics_matomo_dnt">'. __( 'Enable client side DoNotTrack detection', 'wp-seopress' ) .'</label>';
5378
+
5379
+ echo '<p class="description">'.__( 'Tracking requests will not be sent if visitors do not wish to be tracked.','wp-seopress' ).'</p>';
5380
+
5381
+ if (isset($this->options['seopress_google_analytics_matomo_dnt'])) {
5382
+ esc_attr( $this->options['seopress_google_analytics_matomo_dnt']);
5383
+ }
5384
+ }
5385
+
5386
+ public function seopress_google_analytics_matomo_no_cookies_callback()
5387
+ {
5388
+ $options = get_option( 'seopress_google_analytics_option_name' );
5389
+
5390
+ $check = isset($options['seopress_google_analytics_matomo_no_cookies']);
5391
+
5392
+ echo '<input id="seopress_google_analytics_matomo_no_cookies" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_no_cookies]" type="checkbox"';
5393
+ if ('1' == $check) echo 'checked="yes"';
5394
+ echo ' value="1"/>';
5395
+
5396
+ echo '<label for="seopress_google_analytics_matomo_no_cookies">'. __( 'Disables all first party cookies. Existing Matomo cookies for this website will be deleted on the next page view.', 'wp-seopress' ) .'</label>';
5397
+
5398
+ if (isset($this->options['seopress_google_analytics_matomo_no_cookies'])) {
5399
+ esc_attr( $this->options['seopress_google_analytics_matomo_no_cookies']);
5400
+ }
5401
+ }
5402
+
5403
+ public function seopress_google_analytics_matomo_link_tracking_callback()
5404
+ {
5405
+ $options = get_option( 'seopress_google_analytics_option_name' );
5406
+
5407
+ $check = isset($options['seopress_google_analytics_matomo_link_tracking']);
5408
+
5409
+ echo '<input id="seopress_google_analytics_matomo_link_tracking" name="seopress_google_analytics_option_name[seopress_google_analytics_matomo_link_tracking]" type="checkbox"';
5410
+ if ('1' == $check) echo 'checked="yes"';
5411
+ echo ' value="1"/>';
5412
+
5413
+ echo '<label for="seopress_google_analytics_matomo_link_tracking">'. __( 'Enabling Download & Outlink tracking', 'wp-seopress' ) .'</label>';
5414
+
5415
+ echo '<p class="description">'.__( 'By default, any file ending with one of these extensions will be considered a "download" in the Matomo interface: 7z|aac|arc|arj|apk|asf|asx|avi|bin|bz|bz2|csv|deb|dmg|doc|
5416
+ exe|flv|gif|gz|gzip|hqx|jar|jpg|jpeg|js|mp2|mp3|mp4|mpg|
5417
+ mpeg|mov|movie|msi|msp|odb|odf|odg|odp|ods|odt|ogg|ogv|
5418
+ pdf|phps|png|ppt|qt|qtm|ra|ram|rar|rpm|sea|sit|tar|
5419
+ tbz|tbz2|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip','wp-seopress' ).'</p>';
5420
+
5421
+ if (isset($this->options['seopress_google_analytics_matomo_link_tracking'])) {
5422
+ esc_attr( $this->options['seopress_google_analytics_matomo_link_tracking']);
5423
+ }
5424
+ }
5425
+
5426
+ public function seopress_advanced_advanced_attachments_callback()
5427
+ {
5428
+ $options = get_option( 'seopress_advanced_option_name' );
5429
+
5430
+ $check = isset($options['seopress_advanced_advanced_attachments']);
5431
+
5432
+ echo '<input id="seopress_advanced_advanced_attachments" name="seopress_advanced_option_name[seopress_advanced_advanced_attachments]" type="checkbox"';
5433
+ if ('1' == $check) echo 'checked="yes"';
5434
+ echo ' value="1"/>';
5435
+
5436
+ echo '<label for="seopress_advanced_advanced_attachments">'. __( 'Redirect attachment pages to post parent (or homepage if none)', 'wp-seopress' ) .'</label>';
5437
+
5438
+ if (isset($this->options['seopress_advanced_advanced_attachments'])) {
5439
+ esc_attr( $this->options['seopress_advanced_advanced_attachments']);
5440
+ }
5441
+ }
5442
+
5443
+ public function seopress_advanced_advanced_attachments_file_callback()
5444
+ {
5445
+ $options = get_option( 'seopress_advanced_option_name' );
5446
+
5447
+ $check = isset($options['seopress_advanced_advanced_attachments_file']);
5448
+
5449
+ echo '<input id="seopress_advanced_advanced_attachments_file" name="seopress_advanced_option_name[seopress_advanced_advanced_attachments_file]" type="checkbox"';
5450
+ if ('1' == $check) echo 'checked="yes"';
5451
+ echo ' value="1"/>';
5452
+
5453
+ echo '<label for="seopress_advanced_advanced_attachments_file">'. __( 'Redirect attachment pages to their file URL (https://www.example.com/my-image-file.jpg)', 'wp-seopress' ) .'</label>';
5454
+
5455
+ echo '<p class="description">'.__('If this option is checked, it will take precedence over the redirection of attachments to the post\'s parent.','wp-seopress').'</p>';
5456
+
5457
+ if (isset($this->options['seopress_advanced_advanced_attachments_file'])) {
5458
+ esc_attr( $this->options['seopress_advanced_advanced_attachments_file']);
5459
+ }
5460
+ }
5461
+
5462
+ public function seopress_advanced_advanced_replytocom_callback()
5463
+ {
5464
+ $options = get_option( 'seopress_advanced_option_name' );
5465
+
5466
+ $check = isset($options['seopress_advanced_advanced_replytocom']);
5467
+
5468
+ echo '<input id="seopress_advanced_advanced_replytocom" name="seopress_advanced_option_name[seopress_advanced_advanced_replytocom]" type="checkbox"';
5469
+ if ('1' == $check) echo 'checked="yes"';
5470
+ echo ' value="1"/>';
5471
+
5472
+ echo '<label for="seopress_advanced_advanced_replytocom">'. __( 'Remove ?replytocom link in source code', 'wp-seopress' ) .'</label>';
5473
+
5474
+ if (isset($this->options['seopress_advanced_advanced_replytocom'])) {
5475
+ esc_attr( $this->options['seopress_advanced_advanced_replytocom']);
5476
+ }
5477
+ }
5478
+
5479
+ public function seopress_advanced_advanced_image_auto_title_editor_callback()
5480
+ {
5481
+ $options = get_option( 'seopress_advanced_option_name' );
5482
+
5483
+ $check = isset($options['seopress_advanced_advanced_image_auto_title_editor']);
5484
+
5485
+ echo '<input id="seopress_advanced_advanced_image_auto_title_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_title_editor]" type="checkbox"';
5486
+ if ('1' == $check) echo 'checked="yes"';
5487
+ echo ' value="1"/>';
5488
+
5489
+ echo '<label for="seopress_advanced_advanced_image_auto_title_editor">'. __( 'When sending an image file, automatically set the title based on the filename', 'wp-seopress' ) .'</label>';
5490
+
5491
+ if (isset($this->options['seopress_advanced_advanced_image_auto_title_editor'])) {
5492
+ esc_attr( $this->options['seopress_advanced_advanced_image_auto_title_editor']);
5493
+ }
5494
+ }
5495
+
5496
+ public function seopress_advanced_advanced_image_auto_alt_editor_callback()
5497
+ {
5498
+ $options = get_option( 'seopress_advanced_option_name' );
5499
+
5500
+ $check = isset($options['seopress_advanced_advanced_image_auto_alt_editor']);
5501
+
5502
+ echo '<input id="seopress_advanced_advanced_image_auto_alt_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_alt_editor]" type="checkbox"';
5503
+ if ('1' == $check) echo 'checked="yes"';
5504
+ echo ' value="1"/>';
5505
+
5506
+ echo '<label for="seopress_advanced_advanced_image_auto_alt_editor">'. __( 'When sending an image file, automatically set the alternative text based on the filename', 'wp-seopress' ) .'</label>';
5507
+
5508
+ if ( !is_plugin_active( 'imageseo/imageseo.php' )) {
5509
+ echo '<p class="description"><a href="https://imageseo.io?_from=seopress" target="_blank">'.__('We recommend Image SEO plugin to optimize your image ALT texts and names for Search Engines using AI and Machine Learning. Starting from just €4.99.','wp-seopress-pro').'</a><span class="dashicons dashicons-external"></span></p>';
5510
+ }
5511
+
5512
+ if (isset($this->options['seopress_advanced_advanced_image_auto_alt_editor'])) {
5513
+ esc_attr( $this->options['seopress_advanced_advanced_image_auto_alt_editor']);
5514
+ }
5515
+ }
5516
+
5517
+ public function seopress_advanced_advanced_image_auto_caption_editor_callback()
5518
+ {
5519
+ $options = get_option( 'seopress_advanced_option_name' );
5520
+
5521
+ $check = isset($options['seopress_advanced_advanced_image_auto_caption_editor']);
5522
+
5523
+ echo '<input id="seopress_advanced_advanced_image_auto_caption_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_caption_editor]" type="checkbox"';
5524
+ if ('1' == $check) echo 'checked="yes"';
5525
+ echo ' value="1"/>';
5526
+
5527
+ echo '<label for="seopress_advanced_advanced_image_auto_caption_editor">'. __( 'When sending an image file, automatically set the caption based on the filename', 'wp-seopress' ) .'</label>';
5528
+
5529
+ if (isset($this->options['seopress_advanced_advanced_image_auto_caption_editor'])) {
5530
+ esc_attr( $this->options['seopress_advanced_advanced_image_auto_caption_editor']);
5531
+ }
5532
+ }
5533
+
5534
+ public function seopress_advanced_advanced_image_auto_desc_editor_callback()
5535
+ {
5536
+ $options = get_option( 'seopress_advanced_option_name' );
5537
+
5538
+ $check = isset($options['seopress_advanced_advanced_image_auto_desc_editor']);
5539
+
5540
+ echo '<input id="seopress_advanced_advanced_image_auto_desc_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_image_auto_desc_editor]" type="checkbox"';
5541
+ if ('1' == $check) echo 'checked="yes"';
5542
+ echo ' value="1"/>';
5543
+
5544
+ echo '<label for="seopress_advanced_advanced_image_auto_desc_editor">'. __( 'When sending an image file, automatically set the description based on the filename', 'wp-seopress' ) .'</label>';
5545
+
5546
+ if (isset($this->options['seopress_advanced_advanced_image_auto_desc_editor'])) {
5547
+ esc_attr( $this->options['seopress_advanced_advanced_image_auto_desc_editor']);
5548
+ }
5549
+ }
5550
+
5551
+ public function seopress_advanced_advanced_tax_desc_editor_callback()
5552
+ {
5553
+ $options = get_option( 'seopress_advanced_option_name' );
5554
+
5555
+ $check = isset($options['seopress_advanced_advanced_tax_desc_editor']);
5556
+
5557
+ echo '<input id="seopress_advanced_advanced_tax_desc_editor" name="seopress_advanced_option_name[seopress_advanced_advanced_tax_desc_editor]" type="checkbox"';
5558
+ if ('1' == $check) echo 'checked="yes"';
5559
+ echo ' value="1"/>';
5560
+
5561
+ echo '<label for="seopress_advanced_advanced_tax_desc_editor">'. __( 'Add TINYMCE editor to term description', 'wp-seopress' ) .'</label>';
5562
+
5563
+ if (isset($this->options['seopress_advanced_advanced_tax_desc_editor'])) {
5564
+ esc_attr( $this->options['seopress_advanced_advanced_tax_desc_editor']);
5565
+ }
5566
+ }
5567
+
5568
+ public function seopress_advanced_advanced_category_url_callback()
5569
+ {
5570
+ $options = get_option( 'seopress_advanced_option_name' );
5571
+
5572
+ $check = isset($options['seopress_advanced_advanced_category_url']);
5573
+
5574
+ echo '<input id="seopress_advanced_advanced_category_url" name="seopress_advanced_option_name[seopress_advanced_advanced_category_url]" type="checkbox"';
5575
+ if ('1' == $check) echo 'checked="yes"';
5576
+ echo ' value="1"/>';
5577
+
5578
+ echo '<label for="seopress_advanced_advanced_category_url">'. __( 'Remove /category/ in your permalinks', 'wp-seopress' ) .'</label><span class="dashicons dashicons-info" title="'.__('You have to flush your permalinks each time you change this settings','wp-seopress').'"></span>';
5579
+
5580
+ if (isset($this->options['seopress_advanced_advanced_category_url'])) {
5581
+ esc_attr( $this->options['seopress_advanced_advanced_category_url']);
5582
+ }
5583
+ }
5584
+
5585
+ public function seopress_advanced_advanced_trailingslash_callback()
5586
+ {
5587
+ $options = get_option( 'seopress_advanced_option_name' );
5588
+
5589
+ $check = isset($options['seopress_advanced_advanced_trailingslash']);
5590
+
5591
+ echo '<input id="seopress_advanced_advanced_trailingslash" name="seopress_advanced_option_name[seopress_advanced_advanced_trailingslash]" type="checkbox"';
5592
+ if ('1' == $check) echo 'checked="yes"';
5593
+ echo ' value="1"/>';
5594
+
5595
+ echo '<label for="seopress_advanced_advanced_trailingslash">'. __( 'Disable trailing slash for metas', 'wp-seopress' ) .'</label><span class="dashicons dashicons-info" title="'.__('You must check this box if the structure of your permalinks DOES NOT contain a slash at the end (eg: /%postname%)','wp-seopress').'"></span>';
5596
+
5597
+ if (isset($this->options['seopress_advanced_advanced_trailingslash'])) {
5598
+ esc_attr( $this->options['seopress_advanced_advanced_trailingslash']);
5599
+ }
5600
+ }
5601
+
5602
+ public function seopress_advanced_advanced_wp_generator_callback()
5603
+ {
5604
+ $options = get_option( 'seopress_advanced_option_name' );
5605
+
5606
+ $check = isset($options['seopress_advanced_advanced_wp_generator']);
5607
+
5608
+ echo '<input id="seopress_advanced_advanced_wp_generator" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_generator]" type="checkbox"';
5609
+ if ('1' == $check) echo 'checked="yes"';
5610
+ echo ' value="1"/>';
5611
+
5612
+ echo '<label for="seopress_advanced_advanced_wp_generator">'. __( 'Remove WordPress meta generator in source code', 'wp-seopress' ) .'</label>';
5613
+
5614
+ if (isset($this->options['seopress_advanced_advanced_wp_generator'])) {
5615
+ esc_attr( $this->options['seopress_advanced_advanced_wp_generator']);
5616
+ }
5617
+ }
5618
+
5619
+ public function seopress_advanced_advanced_hentry_callback()
5620
+ {
5621
+ $options = get_option( 'seopress_advanced_option_name' );
5622
+
5623
+ $check = isset($options['seopress_advanced_advanced_hentry']);
5624
+
5625
+ echo '<input id="seopress_advanced_advanced_hentry" name="seopress_advanced_option_name[seopress_advanced_advanced_hentry]" type="checkbox"';
5626
+ if ('1' == $check) echo 'checked="yes"';
5627
+ echo ' value="1"/>';
5628
+
5629
+ echo '<label for="seopress_advanced_advanced_hentry">'. __( 'Remove hentry post class to prevent Google from seeing this as structured data (schema)', 'wp-seopress' ) .'</label>';
5630
+
5631
+ if (isset($this->options['seopress_advanced_advanced_hentry'])) {
5632
+ esc_attr( $this->options['seopress_advanced_advanced_hentry']);
5633
+ }
5634
+ }
5635
+
5636
+ public function seopress_advanced_advanced_comments_author_url_callback()
5637
+ {
5638
+ $options = get_option( 'seopress_advanced_option_name' );
5639
+
5640
+ $check = isset($options['seopress_advanced_advanced_comments_author_url']);
5641
+
5642
+ echo '<input id="seopress_advanced_advanced_comments_author_url" name="seopress_advanced_option_name[seopress_advanced_advanced_comments_author_url]" type="checkbox"';
5643
+ if ('1' == $check) echo 'checked="yes"';
5644
+ echo ' value="1"/>';
5645
+
5646
+ echo '<label for="seopress_advanced_advanced_comments_author_url">'. __( 'Remove comment author URL in comments if the website is filled from profile page', 'wp-seopress' ) .'</label>';
5647
+
5648
+ if (isset($this->options['seopress_advanced_advanced_comments_author_url'])) {
5649
+ esc_attr( $this->options['seopress_advanced_advanced_comments_author_url']);
5650
+ }
5651
+ }
5652
+
5653
+ public function seopress_advanced_advanced_comments_website_callback()
5654
+ {
5655
+ $options = get_option( 'seopress_advanced_option_name' );
5656
+
5657
+ $check = isset($options['seopress_advanced_advanced_comments_website']);
5658
+
5659
+ echo '<input id="seopress_advanced_advanced_comments_website" name="seopress_advanced_option_name[seopress_advanced_advanced_comments_website]" type="checkbox"';
5660
+ if ('1' == $check) echo 'checked="yes"';
5661
+ echo ' value="1"/>';
5662
+
5663
+ echo '<label for="seopress_advanced_advanced_comments_website">'. __( 'Remove website field from comment form to reduce spam', 'wp-seopress' ) .'</label>';
5664
+
5665
+ if (isset($this->options['seopress_advanced_advanced_comments_website'])) {
5666
+ esc_attr( $this->options['seopress_advanced_advanced_comments_website']);
5667
+ }
5668
+ }
5669
+
5670
+ public function seopress_advanced_advanced_wp_shortlink_callback()
5671
+ {
5672
+ $options = get_option( 'seopress_advanced_option_name' );
5673
+
5674
+ $check = isset($options['seopress_advanced_advanced_wp_shortlink']);
5675
+
5676
+ echo '<input id="seopress_advanced_advanced_wp_shortlink" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_shortlink]" type="checkbox"';
5677
+ if ('1' == $check) echo 'checked="yes"';
5678
+ echo ' value="1"/>';
5679
+
5680
+ echo '<label for="seopress_advanced_advanced_wp_shortlink">'. __( 'Remove WordPress shortlink meta tag in source code (eg:', 'wp-seopress' ) .'<em>'.esc_attr('<link rel="shortlink" href="https://www.seopress.org/"/>').'</em>)</label>';
5681
+
5682
+ if (isset($this->options['seopress_advanced_advanced_wp_shortlink'])) {
5683
+ esc_attr( $this->options['seopress_advanced_advanced_wp_shortlink']);
5684
+ }
5685
+ }
5686
+
5687
+ public function seopress_advanced_advanced_wp_wlw_callback()
5688
+ {
5689
+ $options = get_option( 'seopress_advanced_option_name' );
5690
+
5691
+ $check = isset($options['seopress_advanced_advanced_wp_wlw']);
5692
+
5693
+ echo '<input id="seopress_advanced_advanced_wp_wlw" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_wlw]" type="checkbox"';
5694
+ if ('1' == $check) echo 'checked="yes"';
5695
+ echo ' value="1"/>';
5696
+
5697
+ echo '<label for="seopress_advanced_advanced_wp_wlw">'. __( 'Remove Windows Live Writer meta tag in source code (eg:', 'wp-seopress' ) .'<em>'.esc_attr('<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://www.seopress.org/wp-includes/wlwmanifest.xml" />').'</em>)</label>';
5698
+
5699
+ if (isset($this->options['seopress_advanced_advanced_wp_wlw'])) {
5700
+ esc_attr( $this->options['seopress_advanced_advanced_wp_wlw']);
5701
+ }
5702
+ }
5703
+
5704
+ public function seopress_advanced_advanced_wp_rsd_callback()
5705
+ {
5706
+ $options = get_option( 'seopress_advanced_option_name' );
5707
+
5708
+ $check = isset($options['seopress_advanced_advanced_wp_rsd']);
5709
+
5710
+ echo '<input id="seopress_advanced_advanced_wp_rsd" name="seopress_advanced_option_name[seopress_advanced_advanced_wp_rsd]" type="checkbox"';
5711
+ if ('1' == $check) echo 'checked="yes"';
5712
+ echo ' value="1"/>';
5713
+
5714
+ echo '<label for="seopress_advanced_advanced_wp_rsd">'. __( 'Remove Really Simple Discovery meta tag in source code (eg:', 'wp-seopress' ) .'<em>'.esc_attr('<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.seopress.dev/xmlrpc.php?rsd" />').'</em>)</label>';
5715
+
5716
+ if (isset($this->options['seopress_advanced_advanced_wp_rsd'])) {
5717
+ esc_attr( $this->options['seopress_advanced_advanced_wp_rsd']);
5718
+ }
5719
+ }
5720
+
5721
+ public function seopress_advanced_advanced_google_callback()
5722
+ {
5723
+ $check = isset($this->options['seopress_advanced_advanced_google']) ? $this->options['seopress_advanced_advanced_google'] : NULL;
5724
+
5725
+ printf(
5726
+ '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_google]" placeholder="'.esc_html__('Enter Google meta value site verification','wp-seopress').'" aria-label="'.__('Google site verification','wp-seopress').'" value="%s"/>',
5727
+ esc_html( $check )
5728
+
5729
+ );
5730
+
5731
+ echo '<p class="description">'.__('If your site is already verified in <strong>Google Search Console</strong>, you can leave this field empty.','wp-seopress').'</p>';
5732
+
5733
+ }
5734
+
5735
+ public function seopress_advanced_advanced_bing_callback()
5736
+ {
5737
+ $check = isset($this->options['seopress_advanced_advanced_bing']) ? $this->options['seopress_advanced_advanced_bing'] : NULL;
5738
+
5739
+ printf(
5740
+ '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_bing]" placeholder="'.esc_html__('Enter Bing meta value site verification','wp-seopress').'" aria-label="'.__('Bing site verification','wp-seopress').'" value="%s"/>',
5741
+ esc_html( $check )
5742
+
5743
+ );
5744
+ echo '<p class="description">'.__('If your site is already verified in <strong>Bing Webmaster tools</strong>, you can leave this field empty.','wp-seopress').'</p>';
5745
+
5746
+ }
5747
+
5748
+ public function seopress_advanced_advanced_pinterest_callback()
5749
+ {
5750
+ $check = isset($this->options['seopress_advanced_advanced_pinterest']) ? $this->options['seopress_advanced_advanced_pinterest'] : NULL;
5751
+
5752
+ printf(
5753
+ '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_pinterest]" placeholder="'.esc_html__('Enter Pinterest meta value site verification','wp-seopress').'" aria-label="'.__('Pinterest site verification','wp-seopress').'" value="%s"/>',
5754
+ esc_html( $check )
5755
+
5756
+ );
5757
+
5758
+ }
5759
+
5760
+ public function seopress_advanced_advanced_yandex_callback()
5761
+ {
5762
+ $check = isset($this->options['seopress_advanced_advanced_yandex']) ? $this->options['seopress_advanced_advanced_yandex'] : NULL;
5763
+
5764
+ printf(
5765
+ '<input type="text" name="seopress_advanced_option_name[seopress_advanced_advanced_yandex]" aria-label="'.__('Yandex site verification','wp-seopress').'" placeholder="'.esc_html__('Enter Yandex meta value site verification','wp-seopress').'" value="%s"/>',
5766
+ esc_html( $check )
5767
+
5768
+ );
5769
+
5770
+ }
5771
+
5772
+ public function seopress_advanced_appearance_adminbar_callback()
5773
+ {
5774
+ $options = get_option( 'seopress_advanced_option_name' );
5775
+
5776
+ $check = isset($options['seopress_advanced_appearance_adminbar']);
5777
+
5778
+ echo '<input id="seopress_advanced_appearance_adminbar" name="seopress_advanced_option_name[seopress_advanced_appearance_adminbar]" type="checkbox"';
5779
+ if ('1' == $check) echo 'checked="yes"';
5780
+ echo ' value="1"/>';
5781
+
5782
+ echo '<label for="seopress_advanced_appearance_adminbar">'. __( 'Remove SEOPress from Admin Bar in backend and frontend', 'wp-seopress' ) .'</label>';
5783
+
5784
+ if (isset($this->options['seopress_advanced_appearance_adminbar'])) {
5785
+ esc_attr( $this->options['seopress_advanced_appearance_adminbar']);
5786
+ }
5787
+ }
5788
+
5789
+ public function seopress_advanced_appearance_metaboxe_position_callback()
5790
+ {
5791
+ $options = get_option( 'seopress_advanced_option_name' );
5792
+
5793
+ $selected = isset($options['seopress_advanced_appearance_metaboxe_position']) ? $options['seopress_advanced_appearance_metaboxe_position'] : NULL;
5794
+
5795
+ echo '<select id="seopress_advanced_appearance_metaboxe_position" name="seopress_advanced_option_name[seopress_advanced_appearance_metaboxe_position]">';
5796
+ echo ' <option ';
5797
+ if ('high' == $selected) echo 'selected="selected"';
5798
+ echo ' value="high">'. __("High priority (top)","wp-seopress") .'</option>';
5799
+ echo '<option ';
5800
+ if ('default' == $selected) echo 'selected="selected"';
5801
+ echo ' value="default">'. __("Normal priority (default)","wp-seopress") .'</option>';
5802
+ echo '<option ';
5803
+ if ('low' == $selected) echo 'selected="selected"';
5804
+ echo ' value="low">'. __("Low priority","wp-seopress") .'</option>';
5805
+ echo '</select>';
5806
+
5807
+ if (isset($this->options['seopress_advanced_appearance_metaboxe_position'])) {
5808
+ esc_attr( $this->options['seopress_advanced_appearance_metaboxe_position']);
5809
+ }
5810
+ }
5811
+
5812
+ public function seopress_advanced_appearance_schema_default_tab_callback()
5813
+ {
5814
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
5815
+ $options = get_option( 'seopress_advanced_option_name' );
5816
+
5817
+ $selected = isset($options['seopress_advanced_appearance_schema_default_tab']) ? $options['seopress_advanced_appearance_schema_default_tab'] : NULL;
5818
+
5819
+ echo '<select id="seopress_advanced_appearance_schema_default_tab" name="seopress_advanced_option_name[seopress_advanced_appearance_schema_default_tab]">';
5820
+ echo '<option ';
5821
+ if ('automatic' == $selected) echo 'selected="selected"';
5822
+ echo ' value="automatic">'. __("Automatic tab (default)","wp-seopress") .'</option>';
5823
+ echo ' <option ';
5824
+ if ('manual' == $selected) echo 'selected="selected"';
5825
+ echo ' value="manual">'. __("Manual tab","wp-seopress") .'</option>';
5826
+ echo '</select>';
5827
+
5828
+ if (isset($this->options['seopress_advanced_appearance_schema_default_tab'])) {
5829
+ esc_attr( $this->options['seopress_advanced_appearance_schema_default_tab']);
5830
+ }
5831
+ }
5832
+ }
5833
+
5834
+ public function seopress_advanced_appearance_notifications_callback()
5835
+ {
5836
+ $options = get_option( 'seopress_advanced_option_name' );
5837
+
5838
+ $check = isset($options['seopress_advanced_appearance_notifications']);
5839
+
5840
+ echo '<input id="seopress_advanced_appearance_notifications" name="seopress_advanced_option_name[seopress_advanced_appearance_notifications]" type="checkbox"';
5841
+ if ('1' == $check) echo 'checked="yes"';
5842
+ echo ' value="1"/>';
5843
+
5844
+ echo '<label for="seopress_advanced_appearance_notifications">'. __( 'Hide Notifications Center in SEOPress Dashboard page', 'wp-seopress' ) .'</label>';
5845
+
5846
+ if (isset($this->options['seopress_advanced_appearance_notifications'])) {
5847
+ esc_attr( $this->options['seopress_advanced_appearance_notifications']);
5848
+ }
5849
+ }
5850
+
5851
+ public function seopress_advanced_appearance_seo_tools_callback()
5852
+ {
5853
+ $options = get_option( 'seopress_advanced_option_name' );
5854
+
5855
+ $check = isset($options['seopress_advanced_appearance_seo_tools']);
5856
+
5857
+ echo '<input id="seopress_advanced_appearance_seo_tools" name="seopress_advanced_option_name[seopress_advanced_appearance_seo_tools]" type="checkbox"';
5858
+ if ('1' == $check) echo 'checked="yes"';
5859
+ echo ' value="1"/>';
5860
+
5861
+ echo '<label for="seopress_advanced_appearance_seo_tools">'. __( 'Hide SEO tools in SEOPress Dashboard page', 'wp-seopress' ) .'</label>';
5862
+
5863
+ if (isset($this->options['seopress_advanced_appearance_seo_tools'])) {
5864
+ esc_attr( $this->options['seopress_advanced_appearance_seo_tools']);
5865
+ }
5866
+ }
5867
+
5868
+ public function seopress_advanced_appearance_useful_links_callback()
5869
+ {
5870
+ $options = get_option( 'seopress_advanced_option_name' );
5871
+
5872
+ $check = isset($options['seopress_advanced_appearance_useful_links']);
5873
+
5874
+ echo '<input id="seopress_advanced_appearance_useful_links" name="seopress_advanced_option_name[seopress_advanced_appearance_useful_links]" type="checkbox"';
5875
+ if ('1' == $check) echo 'checked="yes"';
5876
+ echo ' value="1"/>';
5877
+
5878
+ echo '<label for="seopress_advanced_appearance_useful_links">'. __( 'Hide Useful Links in SEOPress dashboard page', 'wp-seopress' ) .'</label>';
5879
+
5880
+ if (isset($this->options['seopress_advanced_appearance_useful_links'])) {
5881
+ esc_attr( $this->options['seopress_advanced_appearance_useful_links']);
5882
+ }
5883
+ }
5884
+
5885
+ public function seopress_advanced_appearance_title_col_callback()
5886
+ {
5887
+ $options = get_option( 'seopress_advanced_option_name' );
5888
+
5889
+ $check = isset($options['seopress_advanced_appearance_title_col']);
5890
+
5891
+ echo '<input id="seopress_advanced_appearance_title_col" name="seopress_advanced_option_name[seopress_advanced_appearance_title_col]" type="checkbox"';
5892
+ if ('1' == $check) echo 'checked="yes"';
5893
+ echo ' value="1"/>';
5894
+
5895
+ echo '<label for="seopress_advanced_appearance_title_col">'. __( 'Add title column', 'wp-seopress' ) .'</label>';
5896
+
5897
+ if (isset($this->options['seopress_advanced_appearance_title_col'])) {
5898
+ esc_attr( $this->options['seopress_advanced_appearance_title_col']);
5899
+ }
5900
+ }
5901
+
5902
+ public function seopress_advanced_appearance_meta_desc_col_callback()
5903
+ {
5904
+ $options = get_option( 'seopress_advanced_option_name' );
5905
+
5906
+ $check = isset($options['seopress_advanced_appearance_meta_desc_col']);
5907
+
5908
+ echo '<input id="seopress_advanced_appearance_meta_desc_col" name="seopress_advanced_option_name[seopress_advanced_appearance_meta_desc_col]" type="checkbox"';
5909
+ if ('1' == $check) echo 'checked="yes"';
5910
+ echo ' value="1"/>';
5911
+
5912
+ echo '<label for="seopress_advanced_appearance_meta_desc_col">'. __( 'Add meta description column', 'wp-seopress' ) .'</label>';
5913
+
5914
+ if (isset($this->options['seopress_advanced_appearance_meta_desc_col'])) {
5915
+ esc_attr( $this->options['seopress_advanced_appearance_meta_desc_col']);
5916
+ }
5917
+ }
5918
+
5919
+ public function seopress_advanced_appearance_redirect_enable_col_callback()
5920
+ {
5921
+ $options = get_option( 'seopress_advanced_option_name' );
5922
+
5923
+ $check = isset($options['seopress_advanced_appearance_redirect_enable_col']);
5924
+
5925
+ echo '<input id="seopress_advanced_appearance_redirect_enable_col" name="seopress_advanced_option_name[seopress_advanced_appearance_redirect_enable_col]" type="checkbox"';
5926
+ if ('1' == $check) echo 'checked="yes"';
5927
+ echo ' value="1"/>';
5928
+
5929
+ echo '<label for="seopress_advanced_appearance_redirect_enable_col">'. __( 'Add redirection enable column', 'wp-seopress' ) .'</label>';
5930
+
5931
+ if (isset($this->options['seopress_advanced_appearance_redirect_enable_col'])) {
5932
+ esc_attr( $this->options['seopress_advanced_appearance_redirect_enable_col']);
5933
+ }
5934
+ }
5935
+
5936
+ public function seopress_advanced_appearance_redirect_url_col_callback()
5937
+ {
5938
+ $options = get_option( 'seopress_advanced_option_name' );
5939
+
5940
+ $check = isset($options['seopress_advanced_appearance_redirect_url_col']);
5941
+
5942
+ echo '<input id="seopress_advanced_appearance_redirect_url_col" name="seopress_advanced_option_name[seopress_advanced_appearance_redirect_url_col]" type="checkbox"';
5943
+ if ('1' == $check) echo 'checked="yes"';
5944
+ echo ' value="1"/>';
5945
+
5946
+ echo '<label for="seopress_advanced_appearance_redirect_url_col">'. __( 'Add redirection URL column', 'wp-seopress' ) .'</label>';
5947
+
5948
+ if (isset($this->options['seopress_advanced_appearance_redirect_url_col'])) {
5949
+ esc_attr( $this->options['seopress_advanced_appearance_redirect_url_col']);
5950
+ }
5951
+ }
5952
+
5953
+ public function seopress_advanced_appearance_canonical_callback()
5954
+ {
5955
+ $options = get_option( 'seopress_advanced_option_name' );
5956
+
5957
+ $check = isset($options['seopress_advanced_appearance_canonical']);
5958
+
5959
+ echo '<input id="seopress_advanced_appearance_canonical" name="seopress_advanced_option_name[seopress_advanced_appearance_canonical]" type="checkbox"';
5960
+ if ('1' == $check) echo 'checked="yes"';
5961
+ echo ' value="1"/>';
5962
+
5963
+ echo '<label for="seopress_advanced_appearance_canonical">'. __( 'Add canonical URL column', 'wp-seopress' ) .'</label>';
5964
+
5965
+ if (isset($this->options['seopress_advanced_appearance_canonical'])) {
5966
+ esc_attr( $this->options['seopress_advanced_appearance_canonical']);
5967
+ }
5968
+ }
5969
+
5970
+ public function seopress_advanced_appearance_target_kw_col_callback()
5971
+ {
5972
+ $options = get_option( 'seopress_advanced_option_name' );
5973
+
5974
+ $check = isset($options['seopress_advanced_appearance_target_kw_col']);
5975
+
5976
+ echo '<input id="seopress_advanced_appearance_target_kw_col" name="seopress_advanced_option_name[seopress_advanced_appearance_target_kw_col]" type="checkbox"';
5977
+ if ('1' == $check) echo 'checked="yes"';
5978
+ echo ' value="1"/>';
5979
+
5980
+ echo '<label for="seopress_advanced_appearance_target_kw_col">'. __( 'Add target keyword column', 'wp-seopress' ) .'</label>';
5981
+
5982
+ if (isset($this->options['seopress_advanced_appearance_target_kw_col'])) {
5983
+ esc_attr( $this->options['seopress_advanced_appearance_target_kw_col']);
5984
+ }
5985
+ }
5986
+
5987
+ public function seopress_advanced_appearance_noindex_col_callback()
5988
+ {
5989
+ $options = get_option( 'seopress_advanced_option_name' );
5990
+
5991
+ $check = isset($options['seopress_advanced_appearance_noindex_col']);
5992
+
5993
+ echo '<input id="seopress_advanced_appearance_noindex_col" name="seopress_advanced_option_name[seopress_advanced_appearance_noindex_col]" type="checkbox"';
5994
+ if ('1' == $check) echo 'checked="yes"';
5995
+ echo ' value="1"/>';
5996
+
5997
+ echo '<label for="seopress_advanced_appearance_noindex_col">'. __( 'Display noindex status', 'wp-seopress' ) .'</label>';
5998
+
5999
+ if (isset($this->options['seopress_advanced_appearance_noindex_col'])) {
6000
+ esc_attr( $this->options['seopress_advanced_appearance_noindex_col']);
6001
+ }
6002
+ }
6003
+
6004
+ public function seopress_advanced_appearance_nofollow_col_callback()
6005
+ {
6006
+ $options = get_option( 'seopress_advanced_option_name' );
6007
+
6008
+ $check = isset($options['seopress_advanced_appearance_nofollow_col']);
6009
+
6010
+ echo '<input id="seopress_advanced_appearance_nofollow_col" name="seopress_advanced_option_name[seopress_advanced_appearance_nofollow_col]" type="checkbox"';
6011
+ if ('1' == $check) echo 'checked="yes"';
6012
+ echo ' value="1"/>';
6013
+
6014
+ echo '<label for="seopress_advanced_appearance_nofollow_col">'. __( 'Display nofollow status', 'wp-seopress' ) .'</label>';
6015
+
6016
+ if (isset($this->options['seopress_advanced_appearance_nofollow_col'])) {
6017
+ esc_attr( $this->options['seopress_advanced_appearance_nofollow_col']);
6018
+ }
6019
+ }
6020
+
6021
+ public function seopress_advanced_appearance_words_col_callback()
6022
+ {
6023
+ $options = get_option( 'seopress_advanced_option_name' );
6024
+
6025
+ $check = isset($options['seopress_advanced_appearance_words_col']);
6026
+
6027
+ echo '<input id="seopress_advanced_appearance_words_col" name="seopress_advanced_option_name[seopress_advanced_appearance_words_col]" type="checkbox"';
6028
+ if ('1' == $check) echo 'checked="yes"';
6029
+ echo ' value="1"/>';
6030
+
6031
+ echo '<label for="seopress_advanced_appearance_words_col">'. __( 'Display total number of words in content', 'wp-seopress' ) .'</label>';
6032
+
6033
+ if (isset($this->options['seopress_advanced_appearance_words_col'])) {
6034
+ esc_attr( $this->options['seopress_advanced_appearance_words_col']);
6035
+ }
6036
+ }
6037
+
6038
+ public function seopress_advanced_appearance_w3c_col_callback()
6039
+ {
6040
+ $options = get_option( 'seopress_advanced_option_name' );
6041
+
6042
+ $check = isset($options['seopress_advanced_appearance_w3c_col']);
6043
+
6044
+ echo '<input id="seopress_advanced_appearance_w3c_col" name="seopress_advanced_option_name[seopress_advanced_appearance_w3c_col]" type="checkbox"';
6045
+ if ('1' == $check) echo 'checked="yes"';
6046
+ echo ' value="1"/>';
6047
+
6048
+ echo '<label for="seopress_advanced_appearance_w3c_col">'. __( 'Display W3C column to check code quality', 'wp-seopress' ) .'</label>';
6049
+
6050
+ if (isset($this->options['seopress_advanced_appearance_w3c_col'])) {
6051
+ esc_attr( $this->options['seopress_advanced_appearance_w3c_col']);
6052
+ }
6053
+ }
6054
+
6055
+ public function seopress_advanced_appearance_ps_col_callback()
6056
+ {
6057
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
6058
+ $options = get_option( 'seopress_advanced_option_name' );
6059
+
6060
+ $check = isset($options['seopress_advanced_appearance_ps_col']);
6061
+
6062
+ echo '<input id="seopress_advanced_appearance_ps_col" name="seopress_advanced_option_name[seopress_advanced_appearance_ps_col]" type="checkbox"';
6063
+ if ('1' == $check) echo 'checked="yes"';
6064
+ echo ' value="1"/>';
6065
+
6066
+ echo '<label for="seopress_advanced_appearance_ps_col">'. __( 'Display Page Speed column to check performances', 'wp-seopress' ) .'</label>';
6067
+
6068
+ if (isset($this->options['seopress_advanced_appearance_ps_col'])) {
6069
+ esc_attr( $this->options['seopress_advanced_appearance_ps_col']);
6070
+ }
6071
+ }
6072
+ }
6073
+
6074
+ public function seopress_advanced_appearance_score_col_callback()
6075
+ {
6076
+ if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
6077
+ $options = get_option( 'seopress_advanced_option_name' );
6078
+
6079
+ $check = isset($options['seopress_advanced_appearance_score_col']);
6080
+
6081
+ echo '<input id="seopress_advanced_appearance_score_col" name="seopress_advanced_option_name[seopress_advanced_appearance_score_col]" type="checkbox"';
6082
+ if ('1' == $check) echo 'checked="yes"';
6083
+ echo ' value="1"/>';
6084
+
6085
+ echo '<label for="seopress_advanced_appearance_score_col">'. __( 'Display Content Analysis results column ("Good" or "Should be improved")', 'wp-seopress' ) .'</label>';
6086
+
6087
+ if (isset($this->options['seopress_advanced_appearance_score_col'])) {
6088
+ esc_attr( $this->options['seopress_advanced_appearance_score_col']);
6089
+ }
6090
+ }
6091
+ }
6092
+
6093
+ public function seopress_advanced_appearance_genesis_seo_metaboxe_callback()
6094
+ {
6095
+ $options = get_option( 'seopress_advanced_option_name' );
6096
+
6097
+ $check = isset($options['seopress_advanced_appearance_genesis_seo_metaboxe']);
6098
+
6099
+ echo '<input id="seopress_advanced_appearance_genesis_seo_metaboxe" name="seopress_advanced_option_name[seopress_advanced_appearance_genesis_seo_metaboxe]" type="checkbox"';
6100
+ if ('1' == $check) echo 'checked="yes"';
6101
+ echo ' value="1"/>';
6102
+
6103
+ echo '<label for="seopress_advanced_appearance_genesis_seo_metaboxe">'. __( 'Remove Genesis SEO Metabox', 'wp-seopress' ) .'</label>';
6104
+
6105
+ if (isset($this->options['seopress_advanced_appearance_genesis_seo_metaboxe'])) {
6106
+ esc_attr( $this->options['seopress_advanced_appearance_genesis_seo_metaboxe']);
6107
+ }
6108
+ }
6109
+
6110
+ public function seopress_advanced_appearance_genesis_seo_menu_callback()
6111
+ {
6112
+ $options = get_option( 'seopress_advanced_option_name' );
6113
+
6114
+ $check = isset($options['seopress_advanced_appearance_genesis_seo_menu']);
6115
+
6116
+ echo '<input id="seopress_advanced_appearance_genesis_seo_menu" name="seopress_advanced_option_name[seopress_advanced_appearance_genesis_seo_menu]" type="checkbox"';
6117
+ if ('1' == $check) echo 'checked="yes"';
6118
+ echo ' value="1"/>';
6119
+
6120
+ echo '<label for="seopress_advanced_appearance_genesis_seo_menu">'. __( 'Remove Genesis SEO link in WP Admin Menu', 'wp-seopress' ) .'</label>';
6121
+
6122
+ if (isset($this->options['seopress_advanced_appearance_genesis_seo_menu'])) {
6123
+ esc_attr( $this->options['seopress_advanced_appearance_genesis_seo_menu']);
6124
+ }
6125
+ }
6126
+
6127
+ public function seopress_advanced_appearance_advice_schema_callback()
6128
+ {
6129
+ $options = get_option( 'seopress_advanced_option_name' );
6130
+
6131
+ $check = isset($options['seopress_advanced_appearance_advice_schema']);
6132
+
6133
+ echo '<input id="seopress_advanced_appearance_advice_schema" name="seopress_advanced_option_name[seopress_advanced_appearance_advice_schema]" type="checkbox"';
6134
+ if ('1' == $check) echo 'checked="yes"';
6135
+ echo ' value="1"/>';
6136
+
6137
+ echo '<label for="seopress_advanced_appearance_advice_schema">'. __( 'Remove the advice if None schema selected', 'wp-seopress' ) .'</label>';
6138
+
6139
+ if (isset($this->options['seopress_advanced_appearance_advice_schema'])) {
6140
+ esc_attr( $this->options['seopress_advanced_appearance_advice_schema']);
6141
+ }
6142
+ }
6143
+
6144
+ public function seopress_advanced_security_metaboxe_role_callback()
6145
+ {
6146
+ $options = get_option( 'seopress_advanced_option_name' );
6147
+
6148
+ global $wp_roles;
6149
+
6150
+ if ( ! isset( $wp_roles ) )
6151
+ $wp_roles = new WP_Roles();
6152
+
6153
+ foreach ($wp_roles->get_names() as $key => $value) {
6154
+
6155
+ $check = isset($options['seopress_advanced_security_metaboxe_role'][$key]);
6156
+
6157
+ echo '<input id="seopress_advanced_security_metaboxe_role_'.$key.'" name="seopress_advanced_option_name[seopress_advanced_security_metaboxe_role]['.$key.']" type="checkbox"';
6158
+ if ('1' == $check) echo 'checked="yes"';
6159
+ echo ' value="1"/>';
6160
+
6161
+ echo '<label for="seopress_advanced_security_metaboxe_role_'.$key.'">'. $value .'</label><br/>';
6162
+
6163
+ if (isset($this->options['seopress_advanced_security_metaboxe_role'][$key])) {
6164
+ esc_attr( $this->options['seopress_advanced_security_metaboxe_role'][$key]);
6165
+ }
6166
+ }
6167
+ if (function_exists('seopress_get_locale')) {
6168
+ if (seopress_get_locale() =='fr') {
6169
+ $seopress_docs_link['support']['security']['metaboxe_seo'] = 'https://www.seopress.org/fr/support/hooks/filtrer-lappel-de-la-metaboxe-seo-par-types-de-contenu/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6170
+ } else {
6171
+ $seopress_docs_link['support']['security']['metaboxe_seo'] = 'https://www.seopress.org/support/hooks/filter-seo-metaboxe-call-by-post-type/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6172
+ }
6173
+ }
6174
+ ?>
6175
+ <a href="<?php echo $seopress_docs_link['support']['security']['metaboxe_seo']; ?>" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text"><?php _e('Hook to filter structured data types metabox call by post type - new window','wp-seopress'); ?></span></a>
6176
+ <?php
6177
+ }
6178
+
6179
+ public function seopress_advanced_security_metaboxe_ca_role_callback()
6180
+ {
6181
+ $options = get_option( 'seopress_advanced_option_name' );
6182
+
6183
+ global $wp_roles;
6184
+
6185
+ if ( ! isset( $wp_roles ) )
6186
+ $wp_roles = new WP_Roles();
6187
+
6188
+ foreach ($wp_roles->get_names() as $key => $value) {
6189
+
6190
+ $check = isset($options['seopress_advanced_security_metaboxe_ca_role'][$key]);
6191
+
6192
+ echo '<input id="seopress_advanced_security_metaboxe_ca_role_'.$key.'" name="seopress_advanced_option_name[seopress_advanced_security_metaboxe_ca_role]['.$key.']" type="checkbox"';
6193
+ if ('1' == $check) echo 'checked="yes"';
6194
+ echo ' value="1"/>';
6195
+
6196
+ echo '<label for="seopress_advanced_security_metaboxe_ca_role_'.$key.'">'. $value .'</label><br/>';
6197
+
6198
+ if (isset($this->options['seopress_advanced_security_metaboxe_ca_role'][$key])) {
6199
+ esc_attr( $this->options['seopress_advanced_security_metaboxe_ca_role'][$key]);
6200
+ }
6201
+ }
6202
+ if (function_exists('seopress_get_locale')) {
6203
+ if (seopress_get_locale() =='fr') {
6204
+ $seopress_docs_link['support']['security']['metaboxe_ca'] = 'https://www.seopress.org/fr/support/hooks/filtrer-lappel-de-la-metaboxe-danalyse-de-contenu-par-types-de-contenu/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6205
+ } else {
6206
+ $seopress_docs_link['support']['security']['metaboxe_ca'] = 'https://www.seopress.org/support/hooks/filter-content-analysis-metaboxe-call-by-post-type/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
6207
+ }
6208
+ }
6209
+ ?>
6210
+ <a href="<?php echo $seopress_docs_link['support']['security']['metaboxe_ca']; ?>" target="_blank" class="seopress-doc"><span class="dashicons dashicons-editor-help"></span><span class="screen-reader-text"><?php _e('Hook to filter structured data types metabox call by post type - new window','wp-seopress'); ?></span></a>
6211
+ <?php
6212
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6213
  }
6214
+
6215
  if( is_admin() )
6216
+ $my_settings_page = new seopress_options();
inc/admin/adminbar.php CHANGED
@@ -110,12 +110,6 @@ function seopress_admin_bar_links() {
110
  'href' => admin_url( 'edit.php?post_type=seopress_bot' ),
111
  ));
112
  }
113
- $wp_admin_bar->add_menu( array(
114
- 'parent' => 'seopress_custom_top_level',
115
- 'id' => 'seopress_custom_sub_menu_backlinks',
116
- 'title' => __( 'Backlinks', 'wp-seopress' ),
117
- 'href' => admin_url( 'edit.php?post_type=seopress_backlinks' ),
118
- ));
119
  }
120
  $wp_admin_bar->add_menu( array(
121
  'parent' => 'seopress_custom_top_level',
110
  'href' => admin_url( 'edit.php?post_type=seopress_bot' ),
111
  ));
112
  }
 
 
 
 
 
 
113
  }
114
  $wp_admin_bar->add_menu( array(
115
  'parent' => 'seopress_custom_top_level',
inc/admin/ajax.php CHANGED
@@ -117,6 +117,12 @@ function seopress_do_real_preview() {
117
  $seopress_get_the_content = get_post_field('post_content', $seopress_get_the_id);
118
  }
119
 
 
 
 
 
 
 
120
  $seopress_get_the_content = apply_filters('seopress_content_analysis_content', $seopress_get_the_content, $seopress_get_the_id);
121
 
122
  //Get Target Keywords
@@ -641,8 +647,8 @@ function seopress_aio_migration() {
641
 
642
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
643
 
644
- if ( isset( $_POST['offset2']) && isset( $_POST['offset2'] )) {
645
- $offset2 = absint($_POST['offset2']);
646
  }
647
 
648
  global $wpdb;
@@ -651,13 +657,13 @@ function seopress_aio_migration() {
651
  $increment = 200;
652
  global $post;
653
 
654
- if ($offset2 > $total_count_posts) {
655
  wp_reset_query();
656
 
657
  $args = array(
658
  //'number' => $increment,
659
  'hide_empty' => false,
660
- //'offset' => $offset2,
661
  'fields' => 'ids',
662
  );
663
  $aio_query_terms = get_terms($args);
@@ -704,14 +710,14 @@ function seopress_aio_migration() {
704
  }
705
  }
706
  }
707
- $offset2 = 'done';
708
  wp_reset_query();
709
  } else {
710
  $args = array(
711
  'posts_per_page' => $increment,
712
  'post_type' => 'any',
713
  'post_status' => 'any',
714
- 'offset' => $offset2,
715
  );
716
 
717
  $aio_query = get_posts( $args );
@@ -758,10 +764,10 @@ function seopress_aio_migration() {
758
  }
759
  }
760
  }
761
- $offset2 += $increment;
762
  }
763
  $data = array();
764
- $data['offset2'] = $offset2;
765
  wp_send_json_success($data);
766
  die();
767
  }
@@ -776,8 +782,8 @@ function seopress_seo_framework_migration() {
776
 
777
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
778
 
779
- if ( isset( $_POST['offset3']) && isset( $_POST['offset3'] )) {
780
- $offset3 = absint($_POST['offset3']);
781
  }
782
 
783
  global $wpdb;
@@ -786,13 +792,13 @@ function seopress_seo_framework_migration() {
786
  $increment = 200;
787
  global $post;
788
 
789
- if ($offset3 > $total_count_posts) {
790
  wp_reset_query();
791
 
792
  $args = array(
793
  //'number' => $increment,
794
  'hide_empty' => false,
795
- //'offset' => $offset3,
796
  'fields' => 'ids',
797
  );
798
  $seo_framework_query_terms = get_terms($args);
@@ -820,14 +826,14 @@ function seopress_seo_framework_migration() {
820
  }
821
  }
822
  }
823
- $offset3 = 'done';
824
  wp_reset_query();
825
  } else {
826
  $args = array(
827
  'posts_per_page' => $increment,
828
  'post_type' => 'any',
829
  'post_status' => 'any',
830
- 'offset' => $offset3,
831
  );
832
 
833
  $seo_framework_query = get_posts( $args );
@@ -877,10 +883,10 @@ function seopress_seo_framework_migration() {
877
  }
878
  }
879
  }
880
- $offset3 += $increment;
881
  }
882
  $data = array();
883
- $data['offset3'] = $offset3;
884
  wp_send_json_success($data);
885
  die();
886
  }
@@ -895,8 +901,8 @@ function seopress_rk_migration() {
895
 
896
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
897
 
898
- if ( isset( $_POST['offset4']) && isset( $_POST['offset4'] )) {
899
- $offset4 = absint($_POST['offset4']);
900
  }
901
 
902
  global $wpdb;
@@ -905,7 +911,7 @@ function seopress_rk_migration() {
905
  $increment = 200;
906
  global $post;
907
 
908
- if ($offset4 > $total_count_posts) {
909
  wp_reset_query();
910
 
911
  $args = array(
@@ -972,14 +978,14 @@ function seopress_rk_migration() {
972
 
973
  }
974
  }
975
- $offset4 = 'done';
976
  wp_reset_query();
977
  } else {
978
  $args = array(
979
  'posts_per_page' => $increment,
980
  'post_type' => 'any',
981
  'post_status' => 'any',
982
- 'offset' => $offset4,
983
  );
984
 
985
  $rk_query = get_posts( $args );
@@ -1040,10 +1046,10 @@ function seopress_rk_migration() {
1040
  }
1041
  }
1042
  }
1043
- $offset4 += $increment;
1044
  }
1045
  $data = array();
1046
- $data['offset4'] = $offset4;
1047
  wp_send_json_success($data);
1048
  die();
1049
  }
@@ -1058,8 +1064,8 @@ function seopress_squirrly_migration() {
1058
 
1059
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1060
 
1061
- if ( isset( $_POST['offset5']) && isset( $_POST['offset5'] )) {
1062
- $offset5 = absint($_POST['offset5']);
1063
  }
1064
 
1065
  global $wpdb;
@@ -1110,10 +1116,10 @@ function seopress_squirrly_migration() {
1110
  }
1111
  }
1112
  }
1113
- $offset5 = 'done';
1114
  }
1115
  $data = array();
1116
- $data['offset5'] = $offset5;
1117
  wp_send_json_success($data);
1118
  die();
1119
  }
@@ -1131,8 +1137,8 @@ function seopress_seo_ultimate_migration() {
1131
 
1132
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1133
 
1134
- if ( isset( $_POST['offset7']) && isset( $_POST['offset7'] )) {
1135
- $offset7 = absint($_POST['offset7']);
1136
  }
1137
 
1138
  global $wpdb;
@@ -1142,15 +1148,15 @@ function seopress_seo_ultimate_migration() {
1142
  $increment = 200;
1143
  global $post;
1144
 
1145
- if ($offset7 > $total_count_posts) {
1146
- $offset7 = 'done';
1147
  wp_reset_query();
1148
  } else {
1149
  $args = array(
1150
  'posts_per_page' => $increment,
1151
  'post_type' => 'any',
1152
  'post_status' => 'any',
1153
- 'offset' => $offset7,
1154
  );
1155
 
1156
  $su_query = get_posts( $args );
@@ -1180,10 +1186,10 @@ function seopress_seo_ultimate_migration() {
1180
  }
1181
  }
1182
  }
1183
- $offset7 += $increment;
1184
  }
1185
  $data = array();
1186
- $data['offset7'] = $offset7;
1187
  wp_send_json_success($data);
1188
  die();
1189
  }
@@ -1201,8 +1207,8 @@ function seopress_wp_meta_seo_migration() {
1201
 
1202
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1203
 
1204
- if ( isset( $_POST['offset8']) && isset( $_POST['offset8'] )) {
1205
- $offset8 = absint($_POST['offset8']);
1206
  }
1207
 
1208
  global $wpdb;
@@ -1211,7 +1217,7 @@ function seopress_wp_meta_seo_migration() {
1211
  $increment = 200;
1212
  global $post;
1213
 
1214
- if ($offset8 > $total_count_posts) {
1215
  wp_reset_query();
1216
 
1217
  $args = array(
@@ -1230,14 +1236,14 @@ function seopress_wp_meta_seo_migration() {
1230
  }
1231
  }
1232
  }
1233
- $offset8 = 'done';
1234
  wp_reset_query();
1235
  } else {
1236
  $args = array(
1237
  'posts_per_page' => $increment,
1238
  'post_type' => 'any',
1239
  'post_status' => 'any',
1240
- 'offset' => $offset8,
1241
  );
1242
 
1243
  $wp_meta_seo_query = get_posts( $args );
@@ -1270,16 +1276,133 @@ function seopress_wp_meta_seo_migration() {
1270
  }
1271
  }
1272
  }
1273
- $offset8 += $increment;
1274
  }
1275
  $data = array();
1276
- $data['offset8'] = $offset8;
1277
  wp_send_json_success($data);
1278
  die();
1279
  }
1280
  }
1281
  add_action('wp_ajax_seopress_wp_meta_seo_migration', 'seopress_wp_meta_seo_migration');
1282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1283
  ///////////////////////////////////////////////////////////////////////////////////////////////////
1284
  //Export SEOPress metadata to CSV
1285
  ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1288,8 +1411,8 @@ function seopress_metadata_export() {
1288
 
1289
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1290
 
1291
- if ( isset( $_POST['offset6']) && isset( $_POST['offset6'] )) {
1292
- $offset6 = absint($_POST['offset6']);
1293
  }
1294
 
1295
  $seopress_get_post_types = array();
@@ -1328,7 +1451,7 @@ function seopress_metadata_export() {
1328
  $settings["canonical_url"] = array();
1329
  $settings["target_kw"] = array();
1330
 
1331
- if ($offset6 > $total_count_posts) {
1332
  wp_reset_query();
1333
 
1334
  update_option('seopress_metadata_csv', $csv);
@@ -1341,17 +1464,17 @@ function seopress_metadata_export() {
1341
 
1342
  $download_url = add_query_arg( $args, admin_url('admin.php') );
1343
 
1344
- $offset6 = 'done';
1345
  } else {
1346
  $args = array(
1347
  'post_type' => $seopress_get_post_types,
1348
  'posts_per_page' => $increment,
1349
- 'offset' => $offset6,
1350
  'post_status' => 'any',
1351
  'order' => 'DESC',
1352
  'orderby' => 'date',
1353
  );
1354
- $args = apply_filters( 'seopress_metadata_query_args', $args, $seopress_get_post_types, $increment, $offset6 );
1355
  $meta_query = get_posts( $args );
1356
 
1357
  if ($meta_query) {
@@ -1420,12 +1543,12 @@ function seopress_metadata_export() {
1420
 
1421
  }
1422
  }
1423
- $offset6 += $increment;
1424
  update_option('seopress_metadata_csv', $csv);
1425
  }
1426
 
1427
  $data = array();
1428
- $data['offset6'] = $offset6;
1429
  $data['url'] = $download_url;
1430
  wp_send_json_success($data);
1431
 
117
  $seopress_get_the_content = get_post_field('post_content', $seopress_get_the_id);
118
  }
119
 
120
+ //BeTheme is activated
121
+ $theme = wp_get_theme();
122
+ if ( 'betheme' == $theme->template || 'Betheme' == $theme->parent_theme ) {
123
+ $seopress_get_the_content = $seopress_get_the_content.get_post_meta($seopress_get_the_id, 'mfn-page-items-seo', true);
124
+ }
125
+
126
  $seopress_get_the_content = apply_filters('seopress_content_analysis_content', $seopress_get_the_content, $seopress_get_the_id);
127
 
128
  //Get Target Keywords
647
 
648
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
649
 
650
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
651
+ $offset = absint($_POST['offset']);
652
  }
653
 
654
  global $wpdb;
657
  $increment = 200;
658
  global $post;
659
 
660
+ if ($offset > $total_count_posts) {
661
  wp_reset_query();
662
 
663
  $args = array(
664
  //'number' => $increment,
665
  'hide_empty' => false,
666
+ //'offset' => $offset,
667
  'fields' => 'ids',
668
  );
669
  $aio_query_terms = get_terms($args);
710
  }
711
  }
712
  }
713
+ $offset = 'done';
714
  wp_reset_query();
715
  } else {
716
  $args = array(
717
  'posts_per_page' => $increment,
718
  'post_type' => 'any',
719
  'post_status' => 'any',
720
+ 'offset' => $offset,
721
  );
722
 
723
  $aio_query = get_posts( $args );
764
  }
765
  }
766
  }
767
+ $offset += $increment;
768
  }
769
  $data = array();
770
+ $data['offset'] = $offset;
771
  wp_send_json_success($data);
772
  die();
773
  }
782
 
783
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
784
 
785
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
786
+ $offset = absint($_POST['offset']);
787
  }
788
 
789
  global $wpdb;
792
  $increment = 200;
793
  global $post;
794
 
795
+ if ($offset > $total_count_posts) {
796
  wp_reset_query();
797
 
798
  $args = array(
799
  //'number' => $increment,
800
  'hide_empty' => false,
801
+ //'offset' => $offset,
802
  'fields' => 'ids',
803
  );
804
  $seo_framework_query_terms = get_terms($args);
826
  }
827
  }
828
  }
829
+ $offset = 'done';
830
  wp_reset_query();
831
  } else {
832
  $args = array(
833
  'posts_per_page' => $increment,
834
  'post_type' => 'any',
835
  'post_status' => 'any',
836
+ 'offset' => $offset,
837
  );
838
 
839
  $seo_framework_query = get_posts( $args );
883
  }
884
  }
885
  }
886
+ $offset += $increment;
887
  }
888
  $data = array();
889
+ $data['offset'] = $offset;
890
  wp_send_json_success($data);
891
  die();
892
  }
901
 
902
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
903
 
904
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
905
+ $offset = absint($_POST['offset']);
906
  }
907
 
908
  global $wpdb;
911
  $increment = 200;
912
  global $post;
913
 
914
+ if ($offset > $total_count_posts) {
915
  wp_reset_query();
916
 
917
  $args = array(
978
 
979
  }
980
  }
981
+ $offset = 'done';
982
  wp_reset_query();
983
  } else {
984
  $args = array(
985
  'posts_per_page' => $increment,
986
  'post_type' => 'any',
987
  'post_status' => 'any',
988
+ 'offset' => $offset,
989
  );
990
 
991
  $rk_query = get_posts( $args );
1046
  }
1047
  }
1048
  }
1049
+ $offset += $increment;
1050
  }
1051
  $data = array();
1052
+ $data['offset'] = $offset;
1053
  wp_send_json_success($data);
1054
  die();
1055
  }
1064
 
1065
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1066
 
1067
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
1068
+ $offset = absint($_POST['offset']);
1069
  }
1070
 
1071
  global $wpdb;
1116
  }
1117
  }
1118
  }
1119
+ $offset = 'done';
1120
  }
1121
  $data = array();
1122
+ $data['offset'] = $offset;
1123
  wp_send_json_success($data);
1124
  die();
1125
  }
1137
 
1138
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1139
 
1140
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
1141
+ $offset = absint($_POST['offset']);
1142
  }
1143
 
1144
  global $wpdb;
1148
  $increment = 200;
1149
  global $post;
1150
 
1151
+ if ($offset > $total_count_posts) {
1152
+ $offset = 'done';
1153
  wp_reset_query();
1154
  } else {
1155
  $args = array(
1156
  'posts_per_page' => $increment,
1157
  'post_type' => 'any',
1158
  'post_status' => 'any',
1159
+ 'offset' => $offset,
1160
  );
1161
 
1162
  $su_query = get_posts( $args );
1186
  }
1187
  }
1188
  }
1189
+ $offset += $increment;
1190
  }
1191
  $data = array();
1192
+ $data['offset'] = $offset;
1193
  wp_send_json_success($data);
1194
  die();
1195
  }
1207
 
1208
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1209
 
1210
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
1211
+ $offset = absint($_POST['offset']);
1212
  }
1213
 
1214
  global $wpdb;
1217
  $increment = 200;
1218
  global $post;
1219
 
1220
+ if ($offset > $total_count_posts) {
1221
  wp_reset_query();
1222
 
1223
  $args = array(
1236
  }
1237
  }
1238
  }
1239
+ $offset = 'done';
1240
  wp_reset_query();
1241
  } else {
1242
  $args = array(
1243
  'posts_per_page' => $increment,
1244
  'post_type' => 'any',
1245
  'post_status' => 'any',
1246
+ 'offset' => $offset,
1247
  );
1248
 
1249
  $wp_meta_seo_query = get_posts( $args );
1276
  }
1277
  }
1278
  }
1279
+ $offset += $increment;
1280
  }
1281
  $data = array();
1282
+ $data['offset'] = $offset;
1283
  wp_send_json_success($data);
1284
  die();
1285
  }
1286
  }
1287
  add_action('wp_ajax_seopress_wp_meta_seo_migration', 'seopress_wp_meta_seo_migration');
1288
 
1289
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
1290
+ /* Premium SEO Pack migration
1291
+ * @since 3.8.7
1292
+ * @author Benjamin Denis
1293
+ */
1294
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
1295
+ function seopress_premium_seo_pack_migration() {
1296
+ check_ajax_referer( 'seopress_premium_seo_pack_migrate_nonce', $_POST['_ajax_nonce'], true );
1297
+
1298
+ if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1299
+
1300
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
1301
+ $offset = absint($_POST['offset']);
1302
+ }
1303
+
1304
+ global $wpdb;
1305
+
1306
+ $total_count_posts = (int)$wpdb->get_var( "SELECT count(*) FROM {$wpdb->posts}" );
1307
+
1308
+ $increment = 200;
1309
+ global $post;
1310
+
1311
+ if ($offset > $total_count_posts) {
1312
+ wp_reset_query();
1313
+
1314
+ $premium_query_terms = get_option('psp_taxonomy_seo');
1315
+
1316
+ if ($premium_query_terms) {
1317
+
1318
+ foreach ($premium_query_terms as $taxonomies => $taxonomie) {
1319
+ foreach ($taxonomie as $term_id => $term_value) {
1320
+ if ($term_value['psp_meta']['title'] !='') { //Import title tag
1321
+ update_term_meta($term_id, '_seopress_titles_title', $term_value['psp_meta']['title']);
1322
+ }
1323
+ if ($term_value['psp_meta']['description'] !='') { //Import meta desc
1324
+ update_term_meta($term_id, '_seopress_titles_desc', $term_value['psp_meta']['description']);
1325
+ }
1326
+ if ($term_value['psp_meta']['facebook_titlu'] !='') { //Import Facebook Title
1327
+ update_term_meta($term_id, '_seopress_social_fb_title', $term_value['psp_meta']['facebook_titlu']);
1328
+ }
1329
+ if ($term_value['psp_meta']['facebook_desc'] !='') { //Import Facebook Desc
1330
+ update_term_meta($term_id, '_seopress_social_fb_desc', $term_value['psp_meta']['facebook_desc']);
1331
+ }
1332
+ if ($term_value['psp_meta']['facebook_image'] !='') { //Import Facebook Image
1333
+ update_term_meta($term_id, '_seopress_social_fb_img', $term_value['psp_meta']['facebook_image']);
1334
+ }
1335
+ if ($term_value['psp_meta']['robots_index'] =='noindex') { //Import Robots NoIndex
1336
+ update_term_meta($term_id, '_seopress_robots_index', "yes");
1337
+ }
1338
+ if ($term_value['psp_meta']['robots_follow'] =='nofollow') { //Import Robots NoFollow
1339
+ update_term_meta($term_id, '_seopress_robots_follow', "yes");
1340
+ }
1341
+ if ($term_value['psp_meta']['canonical'] !='') { //Import Canonical URL
1342
+ update_term_meta($term_id, '_seopress_robots_canonical', $term_value['psp_meta']['canonical']);
1343
+ }
1344
+ }
1345
+ }
1346
+ }
1347
+ $offset = 'done';
1348
+ wp_reset_query();
1349
+ } else {
1350
+ $args = array(
1351
+ 'posts_per_page' => $increment,
1352
+ 'post_type' => 'any',
1353
+ 'post_status' => 'any',
1354
+ 'offset' => $offset,
1355
+ );
1356
+
1357
+ $premium_query = get_posts( $args );
1358
+
1359
+ if ($premium_query) {
1360
+ foreach ($premium_query as $post) {
1361
+ $psp_meta = get_post_meta($post->ID, 'psp_meta', true);
1362
+
1363
+ if (!empty($psp_meta)) {
1364
+ if (!empty($psp_meta['title'])) { //Import title tag
1365
+ update_post_meta($post->ID, '_seopress_titles_title', $psp_meta['title']);
1366
+ }
1367
+ if (!empty($psp_meta['description'])) { //Import meta desc
1368
+ update_post_meta($post->ID, '_seopress_titles_desc', $psp_meta['description']);
1369
+ }
1370
+ if (!empty($psp_meta['facebook_titlu'])) { //Import Facebook Title
1371
+ update_post_meta($post->ID, '_seopress_social_fb_title', $psp_meta['facebook_titlu']);
1372
+ }
1373
+ if (!empty($psp_meta['facebook_desc'])) { //Import Facebook Desc
1374
+ update_post_meta($post->ID, '_seopress_social_fb_desc', $psp_meta['facebook_desc']);
1375
+ }
1376
+ if (!empty($psp_meta['facebook_image'])) { //Import Facebook Image
1377
+ update_post_meta($post->ID, '_seopress_social_fb_img', $psp_meta['facebook_image']);
1378
+ }
1379
+ if ($psp_meta['robots_index'] == 'noindex') { //Import Robots NoIndex
1380
+ update_post_meta($post->ID, '_seopress_robots_index', "yes");
1381
+ }
1382
+ if ($psp_meta['robots_follow'] == 'nofollow') { //Import Robots NoIndex
1383
+ update_post_meta($post->ID, '_seopress_robots_follow', "yes");
1384
+ }
1385
+ if (!empty($psp_meta['canonical'])) { //Import Canonical URL
1386
+ update_post_meta($post->ID, '_seopress_robots_canonical', $psp_meta['canonical']);
1387
+ }
1388
+ if (!empty($psp_meta['mfocus_keyword'])) { //Import Focus Keywords
1389
+ $target_kw = preg_split('/\r\n|\r|\n/', $psp_meta['mfocus_keyword']);
1390
+
1391
+ update_post_meta($post->ID, '_seopress_analysis_target_kw', implode(',',$target_kw));
1392
+ }
1393
+ }
1394
+ }
1395
+ }
1396
+ $offset += $increment;
1397
+ }
1398
+ $data = array();
1399
+ $data['offset'] = $offset;
1400
+ wp_send_json_success($data);
1401
+ die();
1402
+ }
1403
+ }
1404
+ add_action('wp_ajax_seopress_premium_seo_pack_migration', 'seopress_premium_seo_pack_migration');
1405
+
1406
  ///////////////////////////////////////////////////////////////////////////////////////////////////
1407
  //Export SEOPress metadata to CSV
1408
  ///////////////////////////////////////////////////////////////////////////////////////////////////
1411
 
1412
  if ( current_user_can( seopress_capability( 'manage_options', 'migration' ) && is_admin() ) ) {
1413
 
1414
+ if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
1415
+ $offset = absint($_POST['offset']);
1416
  }
1417
 
1418
  $seopress_get_post_types = array();
1451
  $settings["canonical_url"] = array();
1452
  $settings["target_kw"] = array();
1453
 
1454
+ if ($offset > $total_count_posts) {
1455
  wp_reset_query();
1456
 
1457
  update_option('seopress_metadata_csv', $csv);
1464
 
1465
  $download_url = add_query_arg( $args, admin_url('admin.php') );
1466
 
1467
+ $offset = 'done';
1468
  } else {
1469
  $args = array(
1470
  'post_type' => $seopress_get_post_types,
1471
  'posts_per_page' => $increment,
1472
+ 'offset' => $offset,
1473
  'post_status' => 'any',
1474
  'order' => 'DESC',
1475
  'orderby' => 'date',
1476
  );
1477
+ $args = apply_filters( 'seopress_metadata_query_args', $args, $seopress_get_post_types, $increment, $offset );
1478
  $meta_query = get_posts( $args );
1479
 
1480
  if ($meta_query) {
1543
 
1544
  }
1545
  }
1546
+ $offset += $increment;
1547
  update_option('seopress_metadata_csv', $csv);
1548
  }
1549
 
1550
  $data = array();
1551
+ $data['offset'] = $offset;
1552
  $data['url'] = $download_url;
1553
  wp_send_json_success($data);
1554
 
inc/functions/options-advanced-admin.php CHANGED
@@ -10,6 +10,7 @@ global $pagenow;
10
  //=================================================================================================
11
  //License notice
12
  if ( current_user_can( seopress_capability( 'manage_options', 'notice' ) ) && is_seopress_page() ) {
 
13
  if (get_option( 'seopress_pro_license_status' ) !='valid' && is_plugin_active('wp-seopress-pro/seopress-pro.php') && !is_multisite()) {
14
  function seopress_notice_license() {
15
  $screen_id = get_current_screen();
@@ -30,6 +31,28 @@ if ( current_user_can( seopress_capability( 'manage_options', 'notice' ) ) && is
30
  }
31
  add_action( 'seopress_admin_notices', 'seopress_notice_license' );
32
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  //Permalinks notice
10
  //=================================================================================================
11
  //License notice
12
  if ( current_user_can( seopress_capability( 'manage_options', 'notice' ) ) && is_seopress_page() ) {
13
+ //PRO
14
  if (get_option( 'seopress_pro_license_status' ) !='valid' && is_plugin_active('wp-seopress-pro/seopress-pro.php') && !is_multisite()) {
15
  function seopress_notice_license() {
16
  $screen_id = get_current_screen();
31
  }
32
  add_action( 'seopress_admin_notices', 'seopress_notice_license' );
33
  }
34
+
35
+ //INSIGHTS
36
+ if (get_option( 'seopress_insights_license_status' ) !='valid' && is_plugin_active('wp-seopress-insights/seopress-insights.php') && !is_multisite()) {
37
+ function seopress_notice_insights_license() {
38
+ $screen_id = get_current_screen();
39
+ if ($screen_id->parent_base ==='seopress-option') {
40
+ $class = 'notice notice-error';
41
+ $message = '<strong>'.__( 'Welcome to SEOPress Insights!', 'wp-seopress' ).'</strong>';
42
+ $message .= '<p>'.__( 'Please activate your license to get access to our API (rankings and backlinks), receive automatic updates and get premium support.', 'wp-seopress' ).'</p>';
43
+ $message .= '<a class="button button-primary" href="'.admin_url( 'admin.php?page=seopress-insights#tab=tab_seopress_insights_license' ).'">'.__('Activate License', 'wp-seopress').'</a>';
44
+ if (seopress_get_locale() =='fr') {
45
+ $sp_license_guide = 'https://www.seopress.org/fr/support/guides/activer-licence-seopress-pro/';
46
+ } else {
47
+ $sp_license_guide = 'https://www.seopress.org/support/guides/activate-seopress-pro-license/';
48
+ }
49
+ $message .= '<a href="'.$sp_license_guide.'" target="_blank" style="vertical-align: middle;line-height: 28px;margin: 0 0 0 5px;">'.__('Need help?', 'wp-seopress').'</a>';
50
+
51
+ printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
52
+ }
53
+ }
54
+ add_action( 'seopress_admin_notices', 'seopress_notice_insights_license' );
55
+ }
56
  }
57
 
58
  //Permalinks notice
inc/functions/options-import-export.php CHANGED
@@ -6,356 +6,375 @@ defined( 'ABSPATH' ) or die( 'Please don&rsquo;t call the plugin directly. Thank
6
  ///////////////////////////////////////////////////////////////////////////////////////////////////
7
  //Export SEOPress Settings to JSON
8
  function seopress_export_settings() {
9
- if( empty( $_POST['seopress_action'] ) || 'export_settings' != $_POST['seopress_action'] ) {
10
- return;
11
- }
12
- if( ! wp_verify_nonce( $_POST['seopress_export_nonce'], 'seopress_export_nonce' ) ) {
13
- return;
14
- }
15
- if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
16
- return;
17
- }
18
-
19
- $settings["seopress_activated"] = get_option( 'seopress_activated' );
20
- $settings["seopress_titles_option_name"] = get_option( 'seopress_titles_option_name' );
21
- $settings["seopress_social_option_name"] = get_option( 'seopress_social_option_name' );
22
- $settings["seopress_google_analytics_option_name"] = get_option( 'seopress_google_analytics_option_name' );
23
- $settings["seopress_advanced_option_name"] = get_option( 'seopress_advanced_option_name' );
24
- $settings["seopress_xml_sitemap_option_name"] = get_option( 'seopress_xml_sitemap_option_name' );
25
- $settings["seopress_pro_option_name"] = get_option( 'seopress_pro_option_name' );
26
- $settings["seopress_pro_mu_option_name"] = get_option( 'seopress_pro_mu_option_name' );
27
- $settings["seopress_pro_license_key"] = get_option( 'seopress_pro_license_key' );
28
- $settings["seopress_pro_license_status"] = get_option( 'seopress_pro_license_status' );
29
- $settings["seopress_bot_option_name"] = get_option( 'seopress_bot_option_name' );
30
- $settings["seopress_toggle"] = get_option( 'seopress_toggle' );
31
- $settings["seopress_google_analytics_lock_option_name"] = get_option( 'seopress_google_analytics_lock_option_name' );
32
-
33
- ignore_user_abort( true );
34
- nocache_headers();
35
- header( 'Content-Type: application/json; charset=utf-8' );
36
- header( 'Content-Disposition: attachment; filename=seopress-settings-export-' . date( 'm-d-Y' ) . '.json' );
37
- header( "Expires: 0" );
38
- echo json_encode( $settings );
39
- exit;
40
  }
41
  add_action( 'admin_init', 'seopress_export_settings' );
42
 
43
  //Import SEOPress Settings from JSON
44
  function seopress_import_settings() {
45
- if( empty( $_POST['seopress_action'] ) || 'import_settings' != $_POST['seopress_action'] ) {
46
- return;
47
- }
48
- if( ! wp_verify_nonce( $_POST['seopress_import_nonce'], 'seopress_import_nonce' ) ) {
49
- return;
50
- }
51
- if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
52
- return;
53
- }
54
-
55
- $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
56
-
57
- if( $extension != 'json' ) {
58
- wp_die( __( 'Please upload a valid .json file' ) );
59
- }
60
- $import_file = $_FILES['import_file']['tmp_name'];
61
-
62
- if( empty( $import_file ) ) {
63
- wp_die( __( 'Please upload a file to import' ) );
64
- }
65
-
66
- $settings = (array)json_decode( seopress_remove_utf8_bom(file_get_contents( $import_file )), true );
67
-
68
- if ( $settings["seopress_activated"] !==false ) {
69
- update_option( 'seopress_activated', $settings["seopress_activated"] );
70
- }
71
- if ( $settings["seopress_titles_option_name"] !==false ) {
72
- update_option( 'seopress_titles_option_name', $settings["seopress_titles_option_name"] );
73
- }
74
- if ( $settings["seopress_social_option_name"] !==false ) {
75
- update_option( 'seopress_social_option_name', $settings["seopress_social_option_name"] );
76
- }
77
- if ( $settings["seopress_google_analytics_option_name"] !==false ) {
78
- update_option( 'seopress_google_analytics_option_name', $settings["seopress_google_analytics_option_name"] );
79
- }
80
- if ( $settings["seopress_advanced_option_name"] !==false ) {
81
- update_option( 'seopress_advanced_option_name', $settings["seopress_advanced_option_name"] );
82
- }
83
- if ( $settings["seopress_xml_sitemap_option_name"] !==false ) {
84
- update_option( 'seopress_xml_sitemap_option_name', $settings["seopress_xml_sitemap_option_name"] );
85
- }
86
- if ( $settings["seopress_pro_option_name"] !==false ) {
87
- update_option( 'seopress_pro_option_name', $settings["seopress_pro_option_name"] );
88
- }
89
- if ( $settings["seopress_pro_mu_option_name"] !==false ) {
90
- update_option( 'seopress_pro_mu_option_name', $settings["seopress_pro_mu_option_name"] );
91
- }
92
- if ( $settings["seopress_pro_license_key"] !==false ) {
93
- update_option( 'seopress_pro_license_key', $settings["seopress_pro_license_key"] );
94
- }
95
- if ( $settings["seopress_pro_license_status"] !==false ) {
96
- update_option( 'seopress_pro_license_status', $settings["seopress_pro_license_status"] );
97
- }
98
- if ( $settings["seopress_bot_option_name"] !==false ) {
99
- update_option( 'seopress_bot_option_name', $settings["seopress_bot_option_name"] );
100
- }
101
- if ( $settings["seopress_toggle"] !==false ) {
102
- update_option( 'seopress_toggle', $settings["seopress_toggle"] );
103
- }
104
- if ( $settings["seopress_google_analytics_lock_option_name"] !==false ) {
105
- update_option( 'seopress_google_analytics_lock_option_name', $settings["seopress_google_analytics_lock_option_name"] );
106
- }
107
-
108
- wp_safe_redirect( admin_url( 'admin.php?page=seopress-import-export&success=true' ) );
109
- exit;
110
  }
111
  add_action( 'admin_init', 'seopress_import_settings' );
112
 
113
  //Import Redirections from CSV
114
  function seopress_import_redirections_settings() {
115
- if( empty( $_POST['seopress_action'] ) || 'import_redirections_settings' != $_POST['seopress_action'] ) {
116
- return;
117
- }
118
- if( ! wp_verify_nonce( $_POST['seopress_import_redirections_nonce'], 'seopress_import_redirections_nonce' ) ) {
119
- return;
120
- }
121
- if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
122
- return;
123
- }
124
-
125
- $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
126
-
127
- if( $extension != 'csv' ) {
128
- wp_die( __( 'Please upload a valid .csv file' ) );
129
- }
130
- $import_file = $_FILES['import_file']['tmp_name'];
131
- if( empty( $import_file ) ) {
132
- wp_die( __( 'Please upload a file to import' ) );
133
- }
134
-
135
- $csv = array_map('str_getcsv', file($import_file));
136
-
137
- foreach ($csv as $key => $value) {
138
- foreach ($value as $_key => $_value) {
139
- $csv_line = explode ( ';', $_value );
140
-
141
- //Third column: redirections type
142
- if ($csv_line[2] =='301' || $csv_line[2] =='302' || $csv_line[2]=='307' || $csv_line[2]=='410' || $csv_line[2]=='451') {
143
- $csv_type_redirects[2] = $csv_line[2];
144
- }
145
-
146
- //Fourth column: redirections enabled
147
- if ($csv_line[3] =='yes') {
148
- $csv_type_redirects[3] = $csv_line[3];
149
- } else {
150
- $csv_type_redirects[3] = '';
151
- }
152
-
153
- //Fifth column: redirections query param
154
- if ($csv_line[4] =='exact_match' || $csv_line[4] =='with_ignored_param' || $csv_line[4] =='without_param') {
155
- $csv_type_redirects[4] = $csv_line[4];
156
- } else {
157
- $csv_type_redirects[4] = 'exact_match';
158
- }
159
-
160
- if (!empty($csv_line[0])) {
161
- $id = wp_insert_post([
162
- 'post_title' => urldecode($csv_line[0]),
163
- 'post_type' => 'seopress_404',
164
- 'post_status' => 'publish',
165
- 'meta_input' => [
166
- '_seopress_redirections_value' => urldecode($csv_line[1]),
167
- '_seopress_redirections_type' => $csv_type_redirects[2],
168
- '_seopress_redirections_enabled' => $csv_type_redirects[3],
169
- '_seopress_redirections_param' => $csv_type_redirects[4],
170
- 'seopress_404_count' => $csv_line[5]
171
- ]
172
- ]
173
- );
174
- }
175
- }
176
- }
177
-
178
- wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
179
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
  add_action( 'admin_init', 'seopress_import_redirections_settings' );
182
 
183
  //Import Redirections from Yoast Premium (CSV)
184
  function seopress_import_yoast_redirections() {
185
- if( empty( $_POST['seopress_action'] ) || 'import_yoast_redirections' != $_POST['seopress_action'] ) {
186
- return;
187
- }
188
- if( ! wp_verify_nonce( $_POST['seopress_import_yoast_redirections_nonce'], 'seopress_import_yoast_redirections_nonce' ) ) {
189
- return;
190
- }
191
- if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
192
- return;
193
- }
194
-
195
- $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
196
-
197
- if( $extension != 'csv' ) {
198
- wp_die( __( 'Please upload a valid .csv file' ) );
199
- }
200
- $import_file = $_FILES['import_file']['tmp_name'];
201
- if( empty( $import_file ) ) {
202
- wp_die( __( 'Please upload a file to import' ) );
203
- }
204
-
205
- $csv = array_map('str_getcsv', file($import_file));
206
-
207
- foreach (array_slice($csv,1) as $_key => $_value) {
208
- $csv_line = $_value;
209
-
210
- //Third column: redirections type
211
- if ($csv_line[2] =='301' || $csv_line[2] =='302' || $csv_line[2]=='307' || $csv_line[2]=='410' || $csv_line[2]=='451') {
212
- $csv_type_redirects[2] = $csv_line[2];
213
- }
214
-
215
- //Fourth column: redirections enabled
216
- $csv_type_redirects[3] = 'yes';
217
-
218
- //Fifth column: redirections query param
219
- $csv_type_redirects[4] = 'exact_match';
220
-
221
- if (!empty($csv_line[0])) {
222
- $csv_line[0] = substr($csv_line[0], 1);
223
- if (!empty($csv_line[1])) {
224
- if ($csv_line[1] ==='//') {
225
- $csv_line[1] = '/';
226
- } else {
227
- $csv_line[1] = home_url().$csv_line[1];
228
- }
229
- }
230
- $id = wp_insert_post([
231
- 'post_title' => urldecode($csv_line[0]),
232
- 'post_type' => 'seopress_404',
233
- 'post_status' => 'publish',
234
- 'meta_input' => [
235
- '_seopress_redirections_value' => urldecode($csv_line[1]),
236
- '_seopress_redirections_type' => $csv_type_redirects[2],
237
- '_seopress_redirections_enabled' => $csv_type_redirects[3],
238
- '_seopress_redirections_param' => $csv_type_redirects[4]
239
- ]
240
- ]);
241
- }
242
- }
243
- wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
244
- exit;
245
  }
246
  add_action( 'admin_init', 'seopress_import_yoast_redirections' );
247
 
248
  //Export Redirections to CSV file
249
  function seopress_export_redirections_settings() {
250
- if( empty( $_POST['seopress_action'] ) || 'export_redirections' != $_POST['seopress_action'] ) {
251
- return;
252
- }
253
- if( ! wp_verify_nonce( $_POST['seopress_export_redirections_nonce'], 'seopress_export_redirections_nonce' ) ) {
254
- return;
255
- }
256
- if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
257
- return;
258
- }
259
-
260
- //Init
261
- $redirects_html = '';
262
-
263
- $args = array(
264
- 'post_type' => 'seopress_404',
265
- 'posts_per_page' => '-1',
266
- 'meta_query' => array(
267
- array(
268
- 'key' => '_seopress_redirections_type',
269
- 'value' => array('301','302','307','410','451'),
270
- 'compare' => 'IN',
271
- ),
272
- ),
273
- );
274
- $seopress_redirects_query = new WP_Query( $args );
275
-
276
- if ( $seopress_redirects_query->have_posts() ) {
277
- while ( $seopress_redirects_query->have_posts() ) {
278
- $seopress_redirects_query->the_post();
279
- $redirects_html .= '"'.urldecode(urlencode(esc_attr(wp_filter_nohtml_kses(get_the_title())))).'"';
280
- $redirects_html .= ';';
281
- $redirects_html .= '"'.urldecode(urlencode(esc_attr(wp_filter_nohtml_kses(get_post_meta(get_the_ID(),'_seopress_redirections_value',true))))).'"';
282
- $redirects_html .= ';';
283
- $redirects_html .= get_post_meta(get_the_ID(),'_seopress_redirections_type',true);
284
- $redirects_html .= ';';
285
- $redirects_html .= get_post_meta(get_the_ID(),'_seopress_redirections_enabled',true);
286
- $redirects_html .= ';';
287
- $redirects_html .= get_post_meta(get_the_ID(),'_seopress_redirections_param',true);
288
- $redirects_html .= ';';
289
- $redirects_html .= get_post_meta(get_the_ID(),'seopress_404_count',true);
290
- $redirects_html .= "\n";
291
- }
292
- wp_reset_postdata();
293
- }
294
-
295
- ignore_user_abort( true );
296
- nocache_headers();
297
- header( 'Content-Type: application/csv; charset=utf-8' );
298
- header( 'Content-Disposition: attachment; filename=seopress-redirections-export-' . date( 'm-d-Y' ) . '.csv' );
299
- header( "Expires: 0" );
300
- echo $redirects_html;
301
- exit;
302
  }
303
  add_action( 'admin_init', 'seopress_export_redirections_settings' );
304
 
305
  //Import Redirections from Redirections plugin JSON file
306
  function seopress_import_redirections_plugin_settings() {
307
- if( empty( $_POST['seopress_action'] ) || 'import_redirections_plugin_settings' != $_POST['seopress_action'] ) {
308
- return;
309
- }
310
- if( ! wp_verify_nonce( $_POST['seopress_import_redirections_plugin_nonce'], 'seopress_import_redirections_plugin_nonce' ) ) {
311
- return;
312
- }
313
- if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
314
- return;
315
- }
316
-
317
- $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
318
-
319
- if( $extension != 'json' ) {
320
- wp_die( __( 'Please upload a valid .json file' ) );
321
- }
322
- $import_file = $_FILES['import_file']['tmp_name'];
323
- if( empty( $import_file ) ) {
324
- wp_die( __( 'Please upload a file to import' ) );
325
- }
326
-
327
- $settings = (array) json_decode( file_get_contents( $import_file ), true );
328
-
329
- foreach ($settings['redirects'] as $redirect_key => $redirect_value) {
330
- $type = '';
331
- if (!empty($redirect_value['action_code'])) {
332
- $type = $redirect_value['action_code'];
333
- } else {
334
- $type = '301';
335
- }
336
-
337
- $param = '';
338
- if (!empty($redirect_value['match_data']['source']['flag_query'])) {
339
- $flag_query = $redirect_value['match_data']['source']['flag_query'];
340
- if ($flag_query =='pass') {
341
- $param = 'with_ignored_param';
342
- } elseif ($flag_query =='ignore') {
343
- $param = 'without_param';
344
- } else {
345
- $param = 'exact_match';
346
- }
347
- }
348
-
349
- $enabled ='';
350
- if (!empty($redirect_value['enabled'] ==true)) {
351
- $enabled ='yes';
352
- }
353
-
354
- wp_insert_post(array('post_title' => ltrim(urldecode($redirect_value['url']), '/'), 'post_type' => 'seopress_404', 'post_status' => 'publish', 'meta_input' => array( '_seopress_redirections_value' => urldecode($redirect_value['action_data']['url']), '_seopress_redirections_type' => $type, '_seopress_redirections_enabled' => $enabled, '_seopress_redirections_param' => $param)));
355
- }
356
-
357
- wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
358
- exit;
359
  }
360
  add_action( 'admin_init', 'seopress_import_redirections_plugin_settings' );
361
 
@@ -363,388 +382,282 @@ add_action( 'admin_init', 'seopress_import_redirections_plugin_settings' );
363
  //@since 3.8.2
364
  //@author Benjamin Denis
365
  function seopress_import_rk_redirections() {
366
- if( empty( $_POST['seopress_action'] ) || 'import_rk_redirections' != $_POST['seopress_action'] )
367
- return;
368
- if( ! wp_verify_nonce( $_POST['seopress_import_rk_redirections_nonce'], 'seopress_import_rk_redirections_nonce' ) )
369
- return;
370
- if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) )
371
- return;
372
-
373
- $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
374
-
375
- if( $extension != 'txt' ) {
376
- wp_die( __( 'Please upload a valid .txt file' ) );
377
- }
378
- $import_file = $_FILES['import_file']['tmp_name'];
379
- if( empty( $import_file ) ) {
380
- wp_die( __( 'Please upload a file to import' ) );
381
- }
382
-
383
- $settings = (array) json_decode( file_get_contents( $import_file ), true );
384
-
385
- foreach ($settings['redirections'] as $redirect_key => $redirect_value) {
386
- $type = '';
387
- if (!empty($redirect_value['header_code'])) {
388
- $type = $redirect_value['header_code'];
389
- }
390
-
391
- $source = '';
392
- if (!empty($redirect_value['sources'])) {
393
- $source = maybe_unserialize($redirect_value['sources']);
394
- $source = ltrim(urldecode($source[0]['pattern']), '/');
395
- }
396
-
397
- $param = 'exact_match';
398
-
399
- $enabled ='';
400
- if (!empty($redirect_value['status'] =="active")) {
401
- $enabled ='yes';
402
- }
403
-
404
- $redirect ='';
405
- if (!empty($redirect_value['url_to'])) {
406
- $redirect = urldecode($redirect_value['url_to']);
407
- }
408
-
409
- $count ='';
410
- if (!empty($redirect_value['hits'])) {
411
- $count = $redirect_value['hits'];
412
- }
413
-
414
- wp_insert_post(
415
- array(
416
- 'post_title' => $source,
417
- 'post_type' => 'seopress_404',
418
- 'post_status' => 'publish',
419
- 'meta_input' => array(
420
- '_seopress_redirections_value' => $redirect,
421
- '_seopress_redirections_type' => $type,
422
- '_seopress_redirections_enabled' => $enabled,
423
- 'seopress_404_count' => $count,
424
- '_seopress_redirections_param' => $param
425
- )
426
- )
427
- );
428
- }
429
-
430
- wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) ); exit;
431
  }
432
  add_action( 'admin_init', 'seopress_import_rk_redirections' );
433
 
434
  //Clean all 404
435
  function seopress_clean_404_query_hook($args) {
436
- unset($args['date_query']);
437
- return $args;
438
  }
439
 
440
 
441
  function seopress_clean_404() {
442
- if( empty( $_POST['seopress_action'] ) || 'clean_404' != $_POST['seopress_action'] ) {
443
- return;
444
- }
445
- if( ! wp_verify_nonce( $_POST['seopress_clean_404_nonce'], 'seopress_clean_404_nonce' ) ) {
446
- return;
447
- }
448
- if( ! current_user_can( seopress_capability( 'manage_options', '404' ) ) ) {
449
- return;
450
- }
451
-
452
- add_filter('seopress_404_cleaning_query', 'seopress_clean_404_query_hook');
453
- do_action('seopress_404_cron_cleaning');
454
- wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
455
- exit;
456
  }
457
  add_action( 'admin_init', 'seopress_clean_404' );
458
 
459
  //Reset SEOPress Notices Settings
460
  function seopress_reset_notices_settings() {
461
- if( empty( $_POST['seopress_action'] ) || 'reset_notices_settings' != $_POST['seopress_action'] ) {
462
- return;
463
- }
464
- if( ! wp_verify_nonce( $_POST['seopress_reset_notices_nonce'], 'seopress_reset_notices_nonce' ) ) {
465
- return;
466
- }
467
- if( ! current_user_can( seopress_capability( 'manage_options', 'reset_settings' ) ) ) {
468
- return;
469
- }
470
-
471
- global $wpdb;
472
-
473
- $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'seopress_notices' ");
474
-
475
- wp_safe_redirect( admin_url( 'admin.php?page=seopress-import-export' ) );
476
- exit;
477
  }
478
  add_action( 'admin_init', 'seopress_reset_notices_settings' );
479
 
480
  //Reset SEOPress Settings
481
  function seopress_reset_settings() {
482
- if( empty( $_POST['seopress_action'] ) || 'reset_settings' != $_POST['seopress_action'] ) {
483
- return;
484
- }
485
- if( ! wp_verify_nonce( $_POST['seopress_reset_nonce'], 'seopress_reset_nonce' ) ) {
486
- return;
487
- }
488
- if( ! current_user_can( seopress_capability( 'manage_options', 'reset_settings' ) ) ) {
489
- return;
490
- }
491
-
492
- global $wpdb;
493
-
494
- $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'seopress_%' ");
495
-
496
- wp_safe_redirect( admin_url( 'admin.php?page=seopress-import-export' ) );
497
- exit;
498
  }
499
  add_action( 'admin_init', 'seopress_reset_settings' );
500
 
501
  //Export SEOPress BOT Links to CSV
502
  function seopress_bot_links_export_settings() {
503
- if( empty( $_POST['seopress_action'] ) || 'export_csv_links_settings' != $_POST['seopress_action'] ) {
504
- return;
505
- }
506
- if( ! wp_verify_nonce( $_POST['seopress_export_csv_links_nonce'], 'seopress_export_csv_links_nonce' ) ) {
507
- return;
508
- }
509
- if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
510
- return;
511
- }
512
- $args = array(
513
- 'post_type' => 'seopress_bot',
514
- 'posts_per_page' => 1000,
515
- 'post_status' => 'publish',
516
- 'order' => 'DESC',
517
- 'orderby' => 'date',
518
- );
519
- $the_query = new WP_Query( $args );
520
-
521
- $settings["URL"] = array();
522
- $settings["Source"] = array();
523
- $settings["Source_Url"] = array();
524
- $settings["Status"] = array();
525
- $settings["Type"] = array();
526
-
527
- $csv_fields = array();
528
- $csv_fields[] = 'URL';
529
- $csv_fields[] = 'Source';
530
- $csv_fields[] = 'Source URL';
531
- $csv_fields[] = 'Status';
532
- $csv_fields[] = 'Type';
533
-
534
- $output_handle = @fopen( 'php://output', 'w' );
535
-
536
- //Insert header row
537
- fputcsv( $output_handle, $csv_fields );
538
-
539
- //Header
540
- ignore_user_abort( true );
541
- nocache_headers();
542
- header( 'Content-Type: text/csv; charset=utf-8' );
543
- header( 'Content-Disposition: attachment; filename=seopress-links-export-' . date( 'm-d-Y' ) . '.csv' );
544
- header( 'Expires: 0' );
545
- header( 'Pragma: public' );
546
-
547
- // The Loop
548
- if ( $the_query->have_posts() ) {
549
- while ( $the_query->have_posts() ) {
550
- $the_query->the_post();
551
-
552
- array_push($settings["URL"], get_the_title());
553
-
554
- array_push($settings["Source"], get_post_meta( get_the_ID(), 'seopress_bot_source_title', true ));
555
-
556
- array_push($settings["Source_Url"], get_post_meta( get_the_ID(), 'seopress_bot_source_url', true ));
557
-
558
- array_push($settings["Status"], get_post_meta( get_the_ID(), 'seopress_bot_status', true ));
559
-
560
- array_push($settings["Type"], get_post_meta( get_the_ID(), 'seopress_bot_type', true ));
561
-
562
- fputcsv( $output_handle, array_merge($settings["URL"], $settings["Source"], $settings["Source_Url"], $settings["Status"], $settings["Type"]));
563
-
564
- //Clean arrays
565
- $settings["URL"] = array();
566
- $settings["Source"] = array();
567
- $settings["Source_Url"] = array();
568
- $settings["Status"] = array();
569
- $settings["Type"] = array();
570
-
571
- }
572
- wp_reset_postdata();
573
- }
574
-
575
- // Close output file stream
576
- fclose( $output_handle );
577
-
578
- exit;
579
  }
580
  add_action( 'admin_init', 'seopress_bot_links_export_settings' );
581
 
582
- //Export SEOPress Backlinks to CSV
583
- function seopress_backlinks_export_settings() {
584
- if( empty( $_POST['seopress_action'] ) || 'export_backlinks_settings' != $_POST['seopress_action'] ) {
585
- return;
586
- }
587
- if( ! wp_verify_nonce( $_POST['seopress_export_backlinks_nonce'], 'seopress_export_backlinks_nonce' ) ) {
588
- return;
589
- }
590
- if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
591
- return;
592
- }
593
- $args = array(
594
- 'post_type' => 'seopress_backlinks',
595
- 'posts_per_page' => 1000,
596
- 'post_status' => 'publish',
597
- 'order' => 'DESC',
598
- 'orderby' => 'date',
599
- );
600
- $the_query = new WP_Query( $args );
601
-
602
- $settings["URL"] = array();
603
- $settings["Anchor_text"] = array();
604
- $settings["Source_citation_flow"] = array();
605
- $settings["Source_trust_flow"] = array();
606
- $settings["Target_citation_flow"] = array();
607
- $settings["Target_trust_flow"] = array();
608
- $settings["Found_date"] = array();
609
- $settings["Last_update"] = array();
610
-
611
- $csv_fields = array();
612
- $csv_fields[] = 'URL';
613
- $csv_fields[] = 'Anchor Text';
614
- $csv_fields[] = 'Source Citation Flow';
615
- $csv_fields[] = 'Source Trust Flow';
616
- $csv_fields[] = 'Target Citation Flow';
617
- $csv_fields[] = 'Target Trust Flow';
618
- $csv_fields[] = 'First indexed';
619
- $csv_fields[] = 'Last Update';
620
-
621
- $output_handle = @fopen( 'php://output', 'w' );
622
-
623
- //Insert header row
624
- fputcsv( $output_handle, $csv_fields );
625
-
626
- //Header
627
- ignore_user_abort( true );
628
- nocache_headers();
629
- header( 'Content-Type: text/csv; charset=utf-8' );
630
- header( 'Content-Disposition: attachment; filename=seopress-backlinks-export-' . date( 'm-d-Y' ) . '.csv' );
631
- header( 'Expires: 0' );
632
- header( 'Pragma: public' );
633
-
634
- // The Loop
635
- if ( $the_query->have_posts() ) {
636
- while ( $the_query->have_posts() ) {
637
- $the_query->the_post();
638
-
639
- array_push($settings["URL"], get_the_title());
640
-
641
- array_push($settings["Anchor_text"], get_post_meta( get_the_ID(), 'seopress_backlinks_anchor_text', true ));
642
-
643
- array_push($settings["Source_citation_flow"], get_post_meta( get_the_ID(), 'seopress_backlinks_source_citation_flow', true ));
644
-
645
- array_push($settings["Source_trust_flow"], get_post_meta( get_the_ID(), 'seopress_backlinks_source_trust_flow', true ));
646
-
647
- array_push($settings["Target_citation_flow"], get_post_meta( get_the_ID(), 'seopress_backlinks_target_citation_flow', true ));
648
-
649
- array_push($settings["Target_trust_flow"], get_post_meta( get_the_ID(), 'seopress_backlinks_target_trust_flow', true ));
650
-
651
- array_push($settings["Found_date"], get_post_meta( get_the_ID(), 'seopress_backlinks_found_date', true ));
652
-
653
- array_push($settings["Last_update"], get_post_meta( get_the_ID(), 'seopress_backlinks_last_update', true ));
654
-
655
- fputcsv( $output_handle, array_merge(
656
- $settings["URL"],
657
- $settings["Anchor_text"],
658
- $settings["Source_citation_flow"],
659
- $settings["Source_trust_flow"],
660
- $settings["Target_citation_flow"],
661
- $settings["Target_trust_flow"],
662
- $settings["Found_date"],
663
- $settings["Last_update"]
664
- )
665
- );
666
-
667
- //Clean arrays
668
- $settings["URL"] = array();
669
- $settings["Anchor_text"] = array();
670
- $settings["Source_citation_flow"] = array();
671
- $settings["Source_trust_flow"] = array();
672
- $settings["Target_citation_flow"] = array();
673
- $settings["Target_trust_flow"] = array();
674
- $settings["Found_date"] = array();
675
- $settings["Last_update"] = array();
676
-
677
- }
678
- wp_reset_postdata();
679
- }
680
-
681
- // Close output file stream
682
- fclose( $output_handle );
683
-
684
- exit;
685
- }
686
- add_action( 'admin_init', 'seopress_backlinks_export_settings' );
687
-
688
  //Export metadata
689
  function seopress_download_batch_export() {
690
- if( empty( $_GET['seopress_action'] ) || 'seopress_download_batch_export' != $_GET['seopress_action'] ) {
691
- return;
692
- }
693
- if( ! wp_verify_nonce( $_GET['nonce'], 'seopress_csv_batch_export_nonce' ) ) {
694
- return;
695
- }
696
- if ( current_user_can( seopress_capability( 'manage_options', 'export_settings' ) && is_admin() ) ) {
697
-
698
- if (get_option('seopress_metadata_csv') !='') {
699
- $csv = get_option('seopress_metadata_csv');
700
-
701
- $csv_fields = array();
702
- $csv_fields[] = 'id';
703
- $csv_fields[] = 'post_title';
704
- $csv_fields[] = 'url';
705
- $csv_fields[] = 'meta_title';
706
- $csv_fields[] = 'meta_desc';
707
- $csv_fields[] = 'fb_title';
708
- $csv_fields[] = 'fb_desc';
709
- $csv_fields[] = 'fb_img';
710
- $csv_fields[] = 'tw_title';
711
- $csv_fields[] = 'tw_desc';
712
- $csv_fields[] = 'tw_img';
713
- $csv_fields[] = 'noindex';
714
- $csv_fields[] = 'nofollow';
715
- $csv_fields[] = 'noodp';
716
- $csv_fields[] = 'noimageindex';
717
- $csv_fields[] = 'noarchive';
718
- $csv_fields[] = 'nosnippet';
719
- $csv_fields[] = 'canonical_url';
720
- $csv_fields[] = 'target_kw';
721
- ob_start();
722
- $output_handle = @fopen( 'php://output', 'w' );
723
-
724
- //Insert header row
725
- fputcsv( $output_handle, $csv_fields, ';' );
726
-
727
- //Header
728
- ignore_user_abort( true );
729
- nocache_headers();
730
- header( 'Content-Type: text/csv; charset=utf-8' );
731
- header( 'Content-Disposition: attachment; filename=seopress-metadata-export-' . date( 'm-d-Y' ) . '.csv' );
732
- header( 'Expires: 0' );
733
- header( 'Pragma: public' );
734
-
735
- if (!empty($csv)) {
736
- foreach($csv as $value) {
737
- fputcsv( $output_handle, $value, ';');
738
- }
739
- }
740
-
741
- // Close output file stream
742
- fclose( $output_handle );
743
-
744
- //Clean database
745
- delete_option('seopress_metadata_csv');
746
- exit;
747
- }
748
- }
749
  }
750
  add_action( 'admin_init', 'seopress_download_batch_export' );
6
  ///////////////////////////////////////////////////////////////////////////////////////////////////
7
  //Export SEOPress Settings to JSON
8
  function seopress_export_settings() {
9
+ if( empty( $_POST['seopress_action'] ) || 'export_settings' != $_POST['seopress_action'] ) {
10
+ return;
11
+ }
12
+ if( ! wp_verify_nonce( $_POST['seopress_export_nonce'], 'seopress_export_nonce' ) ) {
13
+ return;
14
+ }
15
+ if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
16
+ return;
17
+ }
18
+
19
+ $settings["seopress_activated"] = get_option( 'seopress_activated' );
20
+ $settings["seopress_titles_option_name"] = get_option( 'seopress_titles_option_name' );
21
+ $settings["seopress_social_option_name"] = get_option( 'seopress_social_option_name' );
22
+ $settings["seopress_google_analytics_option_name"] = get_option( 'seopress_google_analytics_option_name' );
23
+ $settings["seopress_advanced_option_name"] = get_option( 'seopress_advanced_option_name' );
24
+ $settings["seopress_xml_sitemap_option_name"] = get_option( 'seopress_xml_sitemap_option_name' );
25
+ $settings["seopress_pro_option_name"] = get_option( 'seopress_pro_option_name' );
26
+ $settings["seopress_pro_mu_option_name"] = get_option( 'seopress_pro_mu_option_name' );
27
+ $settings["seopress_pro_license_key"] = get_option( 'seopress_pro_license_key' );
28
+ $settings["seopress_pro_license_status"] = get_option( 'seopress_pro_license_status' );
29
+ $settings["seopress_bot_option_name"] = get_option( 'seopress_bot_option_name' );
30
+ $settings["seopress_toggle"] = get_option( 'seopress_toggle' );
31
+ $settings["seopress_google_analytics_lock_option_name"] = get_option( 'seopress_google_analytics_lock_option_name' );
32
+
33
+ ignore_user_abort( true );
34
+ nocache_headers();
35
+ header( 'Content-Type: application/json; charset=utf-8' );
36
+ header( 'Content-Disposition: attachment; filename=seopress-settings-export-' . date( 'm-d-Y' ) . '.json' );
37
+ header( "Expires: 0" );
38
+ echo json_encode( $settings );
39
+ exit;
40
  }
41
  add_action( 'admin_init', 'seopress_export_settings' );
42
 
43
  //Import SEOPress Settings from JSON
44
  function seopress_import_settings() {
45
+ if( empty( $_POST['seopress_action'] ) || 'import_settings' != $_POST['seopress_action'] ) {
46
+ return;
47
+ }
48
+ if( ! wp_verify_nonce( $_POST['seopress_import_nonce'], 'seopress_import_nonce' ) ) {
49
+ return;
50
+ }
51
+ if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
52
+ return;
53
+ }
54
+
55
+ $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
56
+
57
+ if( $extension != 'json' ) {
58
+ wp_die( __( 'Please upload a valid .json file', 'wp-seopress' ) );
59
+ }
60
+ $import_file = $_FILES['import_file']['tmp_name'];
61
+
62
+ if( empty( $import_file ) ) {
63
+ wp_die( __( 'Please upload a file to import', 'wp-seopress' ) );
64
+ }
65
+
66
+ $settings = (array)json_decode( seopress_remove_utf8_bom(file_get_contents( $import_file )), true );
67
+
68
+ if ( $settings["seopress_activated"] !==false ) {
69
+ update_option( 'seopress_activated', $settings["seopress_activated"] );
70
+ }
71
+ if ( $settings["seopress_titles_option_name"] !==false ) {
72
+ update_option( 'seopress_titles_option_name', $settings["seopress_titles_option_name"] );
73
+ }
74
+ if ( $settings["seopress_social_option_name"] !==false ) {
75
+ update_option( 'seopress_social_option_name', $settings["seopress_social_option_name"] );
76
+ }
77
+ if ( $settings["seopress_google_analytics_option_name"] !==false ) {
78
+ update_option( 'seopress_google_analytics_option_name', $settings["seopress_google_analytics_option_name"] );
79
+ }
80
+ if ( $settings["seopress_advanced_option_name"] !==false ) {
81
+ update_option( 'seopress_advanced_option_name', $settings["seopress_advanced_option_name"] );
82
+ }
83
+ if ( $settings["seopress_xml_sitemap_option_name"] !==false ) {
84
+ update_option( 'seopress_xml_sitemap_option_name', $settings["seopress_xml_sitemap_option_name"] );
85
+ }
86
+ if ( $settings["seopress_pro_option_name"] !==false ) {
87
+ update_option( 'seopress_pro_option_name', $settings["seopress_pro_option_name"] );
88
+ }
89
+ if ( $settings["seopress_pro_mu_option_name"] !==false ) {
90
+ update_option( 'seopress_pro_mu_option_name', $settings["seopress_pro_mu_option_name"] );
91
+ }
92
+ if ( $settings["seopress_pro_license_key"] !==false ) {
93
+ update_option( 'seopress_pro_license_key', $settings["seopress_pro_license_key"] );
94
+ }
95
+ if ( $settings["seopress_pro_license_status"] !==false ) {
96
+ update_option( 'seopress_pro_license_status', $settings["seopress_pro_license_status"] );
97
+ }
98
+ if ( $settings["seopress_bot_option_name"] !==false ) {
99
+ update_option( 'seopress_bot_option_name', $settings["seopress_bot_option_name"] );
100
+ }
101
+ if ( $settings["seopress_toggle"] !==false ) {
102
+ update_option( 'seopress_toggle', $settings["seopress_toggle"] );
103
+ }
104
+ if ( $settings["seopress_google_analytics_lock_option_name"] !==false ) {
105
+ update_option( 'seopress_google_analytics_lock_option_name', $settings["seopress_google_analytics_lock_option_name"] );
106
+ }
107
+
108
+ wp_safe_redirect( admin_url( 'admin.php?page=seopress-import-export&success=true' ) );
109
+ exit;
110
  }
111
  add_action( 'admin_init', 'seopress_import_settings' );
112
 
113
  //Import Redirections from CSV
114
  function seopress_import_redirections_settings() {
115
+ if( empty( $_POST['seopress_action'] ) || 'import_redirections_settings' != $_POST['seopress_action'] ) {
116
+ return;
117
+ }
118
+ if( ! wp_verify_nonce( $_POST['seopress_import_redirections_nonce'], 'seopress_import_redirections_nonce' ) ) {
119
+ return;
120
+ }
121
+ if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
122
+ return;
123
+ }
124
+
125
+ $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
126
+
127
+ if( $extension != 'csv' ) {
128
+ wp_die( __( 'Please upload a valid .csv file', 'wp-seopress' ) );
129
+ }
130
+ $import_file = $_FILES['import_file']['tmp_name'];
131
+ if( empty( $import_file ) ) {
132
+ wp_die( __( 'Please upload a file to import', 'wp-seopress' ) );
133
+ }
134
+
135
+ if ( !$_POST['import_sep'] ) {
136
+ wp_die( __( 'Please choose a separator', 'wp-seopress' ) );
137
+ }
138
+
139
+ $csv = array_map( function( $v ) {
140
+ if ($_POST['import_sep'] =='comma') {
141
+ $sep = ",";
142
+ } elseif ($_POST['import_sep'] =='semicolon') {
143
+ $sep = ";";
144
+ } else {
145
+ wp_die( __( 'Invalid separator' ) );
146
+ }
147
+
148
+ return str_getcsv( $v, $sep, '\"' );
149
+ }, file( $import_file,FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES ) );
150
+
151
+ foreach ($csv as $key => $value) {
152
+ $csv_line = $value;
153
+
154
+ //Third column: redirections type
155
+ if ($csv_line[2] =='301' || $csv_line[2] =='302' || $csv_line[2]=='307' || $csv_line[2]=='410' || $csv_line[2]=='451') {
156
+ $csv_type_redirects[2] = $csv_line[2];
157
+ }
158
+
159
+ //Fourth column: redirections enabled
160
+ $csv_line[3] = strtolower($csv_line[3]);
161
+ if ($csv_line[3] =='yes') {
162
+ $csv_type_redirects[3] = $csv_line[3];
163
+ } else {
164
+ $csv_type_redirects[3] = '';
165
+ }
166
+
167
+ //Fifth column: redirections query param
168
+ if (!empty($csv_line[4])) {
169
+ if ($csv_line[4] =='exact_match' || $csv_line[4] =='with_ignored_param' || $csv_line[4] =='without_param') {
170
+ $csv_type_redirects[4] = $csv_line[4];
171
+ } else {
172
+ $csv_type_redirects[4] = 'exact_match';
173
+ }
174
+ }
175
+
176
+ if (!empty($csv_line[0])) {
177
+ $count = NULL;
178
+ if (!empty($csv_line[5])) {
179
+ $count = $csv_line[5];
180
+ }
181
+ $id = wp_insert_post([
182
+ 'post_title' => rawurldecode($csv_line[0]),
183
+ 'post_type' => 'seopress_404',
184
+ 'post_status' => 'publish',
185
+ 'meta_input' => [
186
+ '_seopress_redirections_value' => rawurldecode($csv_line[1]),
187
+ '_seopress_redirections_type' => $csv_type_redirects[2],
188
+ '_seopress_redirections_enabled' => $csv_type_redirects[3],
189
+ '_seopress_redirections_param' => $csv_type_redirects[4],
190
+ 'seopress_404_count' => $count
191
+ ]
192
+ ]
193
+ );
194
+ }
195
+ }
196
+
197
+ wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
198
+ exit;
199
  }
200
  add_action( 'admin_init', 'seopress_import_redirections_settings' );
201
 
202
  //Import Redirections from Yoast Premium (CSV)
203
  function seopress_import_yoast_redirections() {
204
+ if( empty( $_POST['seopress_action'] ) || 'import_yoast_redirections' != $_POST['seopress_action'] ) {
205
+ return;
206
+ }
207
+ if( ! wp_verify_nonce( $_POST['seopress_import_yoast_redirections_nonce'], 'seopress_import_yoast_redirections_nonce' ) ) {
208
+ return;
209
+ }
210
+ if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
211
+ return;
212
+ }
213
+
214
+ $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
215
+
216
+ if( $extension != 'csv' ) {
217
+ wp_die( __( 'Please upload a valid .csv file' ) );
218
+ }
219
+ $import_file = $_FILES['import_file']['tmp_name'];
220
+ if( empty( $import_file ) ) {
221
+ wp_die( __( 'Please upload a file to import' ) );
222
+ }
223
+
224
+ $csv = array_map('str_getcsv', file($import_file));
225
+
226
+ foreach (array_slice($csv,1) as $_key => $_value) {
227
+ $csv_line = $_value;
228
+
229
+ //Third column: redirections type
230
+ if ($csv_line[2] =='301' || $csv_line[2] =='302' || $csv_line[2]=='307' || $csv_line[2]=='410' || $csv_line[2]=='451') {
231
+ $csv_type_redirects[2] = $csv_line[2];
232
+ }
233
+
234
+ //Fourth column: redirections enabled
235
+ $csv_type_redirects[3] = 'yes';
236
+
237
+ //Fifth column: redirections query param
238
+ $csv_type_redirects[4] = 'exact_match';
239
+
240
+ if (!empty($csv_line[0])) {
241
+ $csv_line[0] = substr($csv_line[0], 1);
242
+ if (!empty($csv_line[1])) {
243
+ if ($csv_line[1] ==='//') {
244
+ $csv_line[1] = '/';
245
+ } else {
246
+ $csv_line[1] = home_url().$csv_line[1];
247
+ }
248
+ }
249
+ $id = wp_insert_post([
250
+ 'post_title' => urldecode($csv_line[0]),
251
+ 'post_type' => 'seopress_404',
252
+ 'post_status' => 'publish',
253
+ 'meta_input' => [
254
+ '_seopress_redirections_value' => urldecode($csv_line[1]),
255
+ '_seopress_redirections_type' => $csv_type_redirects[2],
256
+ '_seopress_redirections_enabled' => $csv_type_redirects[3],
257
+ '_seopress_redirections_param' => $csv_type_redirects[4]
258
+ ]
259
+ ]);
260
+ }
261
+ }
262
+ wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
263
+ exit;
264
  }
265
  add_action( 'admin_init', 'seopress_import_yoast_redirections' );
266
 
267
  //Export Redirections to CSV file
268
  function seopress_export_redirections_settings() {
269
+ if( empty( $_POST['seopress_action'] ) || 'export_redirections' != $_POST['seopress_action'] ) {
270
+ return;
271
+ }
272
+ if( ! wp_verify_nonce( $_POST['seopress_export_redirections_nonce'], 'seopress_export_redirections_nonce' ) ) {
273
+ return;
274
+ }
275
+ if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
276
+ return;
277
+ }
278
+
279
+ //Init
280
+ $redirects_html = '';
281
+
282
+ $args = array(
283
+ 'post_type' => 'seopress_404',
284
+ 'posts_per_page' => '-1',
285
+ 'meta_query' => array(
286
+ array(
287
+ 'key' => '_seopress_redirections_type',
288
+ 'value' => array('301','302','307','410','451'),
289
+ 'compare' => 'IN',
290
+ ),
291
+ ),
292
+ );
293
+ $seopress_redirects_query = new WP_Query( $args );
294
+
295
+ if ( $seopress_redirects_query->have_posts() ) {
296
+ while ( $seopress_redirects_query->have_posts() ) {
297
+ $seopress_redirects_query->the_post();
298
+ $redirects_html .= '"'.urldecode(urlencode(esc_attr(wp_filter_nohtml_kses(get_the_title())))).'"';
299
+ $redirects_html .= ';';
300
+ $redirects_html .= '"'.urldecode(urlencode(esc_attr(wp_filter_nohtml_kses(get_post_meta(get_the_ID(),'_seopress_redirections_value',true))))).'"';
301
+ $redirects_html .= ';';
302
+ $redirects_html .= get_post_meta(get_the_ID(),'_seopress_redirections_type',true);
303
+ $redirects_html .= ';';
304
+ $redirects_html .= get_post_meta(get_the_ID(),'_seopress_redirections_enabled',true);
305
+ $redirects_html .= ';';
306
+ $redirects_html .= get_post_meta(get_the_ID(),'_seopress_redirections_param',true);
307
+ $redirects_html .= ';';
308
+ $redirects_html .= get_post_meta(get_the_ID(),'seopress_404_count',true);
309
+ $redirects_html .= "\n";
310
+ }
311
+ wp_reset_postdata();
312
+ }
313
+
314
+ ignore_user_abort( true );
315
+ nocache_headers();
316
+ header( 'Content-Type: application/csv; charset=utf-8' );
317
+ header( 'Content-Disposition: attachment; filename=seopress-redirections-export-' . date( 'm-d-Y' ) . '.csv' );
318
+ header( "Expires: 0" );
319
+ echo $redirects_html;
320
+ exit;
321
  }
322
  add_action( 'admin_init', 'seopress_export_redirections_settings' );
323
 
324
  //Import Redirections from Redirections plugin JSON file
325
  function seopress_import_redirections_plugin_settings() {
326
+ if( empty( $_POST['seopress_action'] ) || 'import_redirections_plugin_settings' != $_POST['seopress_action'] ) {
327
+ return;
328
+ }
329
+ if( ! wp_verify_nonce( $_POST['seopress_import_redirections_plugin_nonce'], 'seopress_import_redirections_plugin_nonce' ) ) {
330
+ return;
331
+ }
332
+ if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) ) {
333
+ return;
334
+ }
335
+
336
+ $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
337
+
338
+ if( $extension != 'json' ) {
339
+ wp_die( __( 'Please upload a valid .json file' ) );
340
+ }
341
+ $import_file = $_FILES['import_file']['tmp_name'];
342
+ if( empty( $import_file ) ) {
343
+ wp_die( __( 'Please upload a file to import' ) );
344
+ }
345
+
346
+ $settings = (array) json_decode( file_get_contents( $import_file ), true );
347
+
348
+ foreach ($settings['redirects'] as $redirect_key => $redirect_value) {
349
+ $type = '';
350
+ if (!empty($redirect_value['action_code'])) {
351
+ $type = $redirect_value['action_code'];
352
+ } else {
353
+ $type = '301';
354
+ }
355
+
356
+ $param = '';
357
+ if (!empty($redirect_value['match_data']['source']['flag_query'])) {
358
+ $flag_query = $redirect_value['match_data']['source']['flag_query'];
359
+ if ($flag_query =='pass') {
360
+ $param = 'with_ignored_param';
361
+ } elseif ($flag_query =='ignore') {
362
+ $param = 'without_param';
363
+ } else {
364
+ $param = 'exact_match';
365
+ }
366
+ }
367
+
368
+ $enabled ='';
369
+ if (!empty($redirect_value['enabled'] ==true)) {
370
+ $enabled ='yes';
371
+ }
372
+
373
+ wp_insert_post(array('post_title' => ltrim(urldecode($redirect_value['url']), '/'), 'post_type' => 'seopress_404', 'post_status' => 'publish', 'meta_input' => array( '_seopress_redirections_value' => urldecode($redirect_value['action_data']['url']), '_seopress_redirections_type' => $type, '_seopress_redirections_enabled' => $enabled, '_seopress_redirections_param' => $param)));
374
+ }
375
+
376
+ wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
377
+ exit;
378
  }
379
  add_action( 'admin_init', 'seopress_import_redirections_plugin_settings' );
380
 
382
  //@since 3.8.2
383
  //@author Benjamin Denis
384
  function seopress_import_rk_redirections() {
385
+ if( empty( $_POST['seopress_action'] ) || 'import_rk_redirections' != $_POST['seopress_action'] )
386
+ return;
387
+ if( ! wp_verify_nonce( $_POST['seopress_import_rk_redirections_nonce'], 'seopress_import_rk_redirections_nonce' ) )
388
+ return;
389
+ if( ! current_user_can( seopress_capability( 'manage_options', 'import_settings' ) ) )
390
+ return;
391
+
392
+ $extension = pathinfo( $_FILES['import_file']['name'], PATHINFO_EXTENSION );
393
+
394
+ if( $extension != 'txt' ) {
395
+ wp_die( __( 'Please upload a valid .txt file' ) );
396
+ }
397
+ $import_file = $_FILES['import_file']['tmp_name'];
398
+ if( empty( $import_file ) ) {
399
+ wp_die( __( 'Please upload a file to import' ) );
400
+ }
401
+
402
+ $settings = (array) json_decode( file_get_contents( $import_file ), true );
403
+
404
+ foreach ($settings['redirections'] as $redirect_key => $redirect_value) {
405
+ $type = '';
406
+ if (!empty($redirect_value['header_code'])) {
407
+ $type = $redirect_value['header_code'];
408
+ }
409
+
410
+ $source = '';
411
+ if (!empty($redirect_value['sources'])) {
412
+ $source = maybe_unserialize($redirect_value['sources']);
413
+ $source = ltrim(urldecode($source[0]['pattern']), '/');
414
+ }
415
+
416
+ $param = 'exact_match';
417
+
418
+ $enabled ='';
419
+ if (!empty($redirect_value['status'] =="active")) {
420
+ $enabled ='yes';
421
+ }
422
+
423
+ $redirect ='';
424
+ if (!empty($redirect_value['url_to'])) {
425
+ $redirect = urldecode($redirect_value['url_to']);
426
+ }
427
+
428
+ $count ='';
429
+ if (!empty($redirect_value['hits'])) {
430
+ $count = $redirect_value['hits'];
431
+ }
432
+
433
+ wp_insert_post(
434
+ array(
435
+ 'post_title' => $source,
436
+ 'post_type' => 'seopress_404',
437
+ 'post_status' => 'publish',
438
+ 'meta_input' => array(
439
+ '_seopress_redirections_value' => $redirect,
440
+ '_seopress_redirections_type' => $type,
441
+ '_seopress_redirections_enabled' => $enabled,
442
+ 'seopress_404_count' => $count,
443
+ '_seopress_redirections_param' => $param
444
+ )
445
+ )
446
+ );
447
+ }
448
+
449
+ wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) ); exit;
450
  }
451
  add_action( 'admin_init', 'seopress_import_rk_redirections' );
452
 
453
  //Clean all 404
454
  function seopress_clean_404_query_hook($args) {
455
+ unset($args['date_query']);
456
+ return $args;
457
  }
458
 
459
 
460
  function seopress_clean_404() {
461
+ if( empty( $_POST['seopress_action'] ) || 'clean_404' != $_POST['seopress_action'] ) {
462
+ return;
463
+ }
464
+ if( ! wp_verify_nonce( $_POST['seopress_clean_404_nonce'], 'seopress_clean_404_nonce' ) ) {
465
+ return;
466
+ }
467
+ if( ! current_user_can( seopress_capability( 'manage_options', '404' ) ) ) {
468
+ return;
469
+ }
470
+
471
+ add_filter('seopress_404_cleaning_query', 'seopress_clean_404_query_hook');
472
+ do_action('seopress_404_cron_cleaning');
473
+ wp_safe_redirect( admin_url( 'edit.php?post_type=seopress_404' ) );
474
+ exit;
475
  }
476
  add_action( 'admin_init', 'seopress_clean_404' );
477
 
478
  //Reset SEOPress Notices Settings
479
  function seopress_reset_notices_settings() {
480
+ if( empty( $_POST['seopress_action'] ) || 'reset_notices_settings' != $_POST['seopress_action'] ) {
481
+ return;
482
+ }
483
+ if( ! wp_verify_nonce( $_POST['seopress_reset_notices_nonce'], 'seopress_reset_notices_nonce' ) ) {
484
+ return;
485
+ }
486
+ if( ! current_user_can( seopress_capability( 'manage_options', 'reset_settings' ) ) ) {
487
+ return;
488
+ }
489
+
490
+ global $wpdb;
491
+
492
+ $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'seopress_notices' ");
493
+
494
+ wp_safe_redirect( admin_url( 'admin.php?page=seopress-import-export' ) );
495
+ exit;
496
  }
497
  add_action( 'admin_init', 'seopress_reset_notices_settings' );
498
 
499
  //Reset SEOPress Settings
500
  function seopress_reset_settings() {
501
+ if( empty( $_POST['seopress_action'] ) || 'reset_settings' != $_POST['seopress_action'] ) {
502
+ return;
503
+ }
504
+ if( ! wp_verify_nonce( $_POST['seopress_reset_nonce'], 'seopress_reset_nonce' ) ) {
505
+ return;
506
+ }
507
+ if( ! current_user_can( seopress_capability( 'manage_options', 'reset_settings' ) ) ) {
508
+ return;
509
+ }
510
+
511
+ global $wpdb;
512
+
513
+ $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'seopress_%' ");
514
+
515
+ wp_safe_redirect( admin_url( 'admin.php?page=seopress-import-export' ) );
516
+ exit;
517
  }
518
  add_action( 'admin_init', 'seopress_reset_settings' );
519
 
520
  //Export SEOPress BOT Links to CSV
521
  function seopress_bot_links_export_settings() {
522
+ if( empty( $_POST['seopress_action'] ) || 'export_csv_links_settings' != $_POST['seopress_action'] ) {
523
+ return;
524
+ }
525
+ if( ! wp_verify_nonce( $_POST['seopress_export_csv_links_nonce'], 'seopress_export_csv_links_nonce' ) ) {
526
+ return;
527
+ }
528
+ if( ! current_user_can( seopress_capability( 'manage_options', 'export_settings' ) ) ) {
529
+ return;
530
+ }
531
+ $args = array(
532
+ 'post_type' => 'seopress_bot',
533
+ 'posts_per_page' => 1000,
534
+ 'post_status' => 'publish',
535
+ 'order' => 'DESC',
536
+ 'orderby' => 'date',
537
+ );
538
+ $the_query = new WP_Query( $args );
539
+
540
+ $settings["URL"] = array();
541
+ $settings["Source"] = array();
542
+ $settings["Source_Url"] = array();
543
+ $settings["Status"] = array();
544
+ $settings["Type"] = array();
545
+
546
+ $csv_fields = array();
547
+ $csv_fields[] = 'URL';
548
+ $csv_fields[] = 'Source';
549
+ $csv_fields[] = 'Source URL';
550
+ $csv_fields[] = 'Status';
551
+ $csv_fields[] = 'Type';
552
+
553
+ $output_handle = @fopen( 'php://output', 'w' );
554
+
555
+ //Insert header row
556
+ fputcsv( $output_handle, $csv_fields );
557
+
558
+ //Header
559
+ ignore_user_abort( true );
560
+ nocache_headers();
561
+ header( 'Content-Type: text/csv; charset=utf-8' );
562
+ header( 'Content-Disposition: attachment; filename=seopress-links-export-' . date( 'm-d-Y' ) . '.csv' );
563
+ header( 'Expires: 0' );
564
+ header( 'Pragma: public' );
565
+
566
+ // The Loop
567
+ if ( $the_query->have_posts() ) {
568
+ while ( $the_query->have_posts() ) {
569
+ $the_query->the_post();
570
+
571
+ array_push($settings["URL"], get_the_title());
572
+
573
+ array_push($settings["Source"], get_post_meta( get_the_ID(), 'seopress_bot_source_title', true ));
574
+
575
+ array_push($settings["Source_Url"], get_post_meta( get_the_ID(), 'seopress_bot_source_url', true ));
576
+
577
+ array_push($settings["Status"], get_post_meta( get_the_ID(), 'seopress_bot_status', true ));
578
+
579
+ array_push($settings["Type"], get_post_meta( get_the_ID(), 'seopress_bot_type', true ));
580
+
581
+ fputcsv( $output_handle, array_merge($settings["URL"], $settings["Source"], $settings["Source_Url"], $settings["Status"], $settings["Type"]));
582
+
583
+ //Clean arrays
584
+ $settings["URL"] = array();
585
+ $settings["Source"] = array();
586
+ $settings["Source_Url"] = array();
587
+ $settings["Status"] = array();
588
+ $settings["Type"] = array();
589
+
590
+ }
591
+ wp_reset_postdata();
592
+ }
593
+
594
+ // Close output file stream
595
+ fclose( $output_handle );
596
+
597
+ exit;
598
  }
599
  add_action( 'admin_init', 'seopress_bot_links_export_settings' );
600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
  //Export metadata
602
  function seopress_download_batch_export() {
603
+ if( empty( $_GET['seopress_action'] ) || 'seopress_download_batch_export' != $_GET['seopress_action'] ) {
604
+ return;
605
+ }
606
+ if( ! wp_verify_nonce( $_GET['nonce'], 'seopress_csv_batch_export_nonce' ) ) {
607
+ return;
608
+ }
609
+ if ( current_user_can( seopress_capability( 'manage_options', 'export_settings' ) && is_admin() ) ) {
610
+
611
+ if (get_option('seopress_metadata_csv') !='') {
612
+ $csv = get_option('seopress_metadata_csv');
613
+
614
+ $csv_fields = array();
615
+ $csv_fields[] = 'id';
616
+ $csv_fields[] = 'post_title';
617
+ $csv_fields[] = 'url';
618
+ $csv_fields[] = 'meta_title';
619
+ $csv_fields[] = 'meta_desc';
620
+ $csv_fields[] = 'fb_title';
621
+ $csv_fields[] = 'fb_desc';
622
+ $csv_fields[] = 'fb_img';
623
+ $csv_fields[] = 'tw_title';
624
+ $csv_fields[] = 'tw_desc';
625
+ $csv_fields[] = 'tw_img';
626
+ $csv_fields[] = 'noindex';
627
+ $csv_fields[] = 'nofollow';
628
+ $csv_fields[] = 'noodp';
629
+ $csv_fields[] = 'noimageindex';
630
+ $csv_fields[] = 'noarchive';
631
+ $csv_fields[] = 'nosnippet';
632
+ $csv_fields[] = 'canonical_url';
633
+ $csv_fields[] = 'target_kw';
634
+ ob_start();
635
+ $output_handle = @fopen( 'php://output', 'w' );
636
+
637
+ //Insert header row
638
+ fputcsv( $output_handle, $csv_fields, ';' );
639
+
640
+ //Header
641
+ ignore_user_abort( true );
642
+ nocache_headers();
643
+ header( 'Content-Type: text/csv; charset=utf-8' );
644
+ header( 'Content-Disposition: attachment; filename=seopress-metadata-export-' . date( 'm-d-Y' ) . '.csv' );
645
+ header( 'Expires: 0' );
646
+ header( 'Pragma: public' );
647
+
648
+ if (!empty($csv)) {
649
+ foreach($csv as $value) {
650
+ fputcsv( $output_handle, $value, ';');
651
+ }
652
+ }
653
+
654
+ // Close output file stream
655
+ fclose( $output_handle );
656
+
657
+ //Clean database
658
+ delete_option('seopress_metadata_csv');
659
+ exit;
660
+ }
661
+ }
662
  }
663
  add_action( 'admin_init', 'seopress_download_batch_export' );
inc/functions/options-sitemap.php CHANGED
@@ -123,15 +123,15 @@ if (seopress_xml_sitemap_html_enable_option() =='1') {
123
  if($_cpt_value =='1') {
124
  $args = array(
125
  'posts_per_page' => 1000,
126
- 'order'=> $seopress_xml_sitemap_html_order_option,
127
- 'orderby' => $seopress_xml_sitemap_html_orderby_option,
128
- 'post_type' => $cpt_key,
129
- 'post_status' => 'publish',
130
- 'meta_query' => array( array( 'key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS' ) ),
131
- 'fields' => 'ids',
132
- 'exclude' => $seopress_xml_sitemap_html_exclude_option,
133
- 'suppress_filters' => false
134
- );
135
  if ($cpt_key =='post') {
136
 
137
  if (get_post_type_archive_link($cpt_key) && get_option( 'page_for_posts' ) !=0) {
@@ -143,7 +143,7 @@ if (seopress_xml_sitemap_html_enable_option() =='1') {
143
  $args_cat_query = array(
144
  'orderby' => 'name',
145
  'order' => 'ASC',
146
- 'meta_query' => array( array( 'key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS' ) ),
123
  if($_cpt_value =='1') {
124
  $args = array(
125
  'posts_per_page' => 1000,
126
+ 'order'=> $seopress_xml_sitemap_html_order_option,
127
+ 'orderby' => $seopress_xml_sitemap_html_orderby_option,
128
+ 'post_type' => $cpt_key,
129
+ 'post_status' => 'publish',
130
+ 'meta_query' => array( array( 'key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS' ) ),
131
+ 'fields' => 'ids',
132
+ 'exclude' => $seopress_xml_sitemap_html_exclude_option,
133
+ 'suppress_filters' => false
134
+ );
135
  if ($cpt_key =='post') {
136
 
137
  if (get_post_type_archive_link($cpt_key) && get_option( 'page_for_posts' ) !=0) {
143
  $args_cat_query = array(
144
  'orderby' => 'name',
145
  'order' => 'ASC',
146
+