Version Description
(25/03/2021) https://www.seopress.org/blog/seopress-4-5/ = * NEW HTML sitemap enhancements: add HTML classes * NEW HTML sitemap enhancements: new option to remove links from archive pages * NEW HTML sitemap enhancements: new shortcode attribute to request specific custom post types * NEW Dynamic variable: %%target_keyword%% * NEW Import tools: Platinum SEO Pack, SmartCrawl and SEOPressor * NEW Allow user to change its choice about cookies (SEO, Analytics, Cookie bar tab to enable the option) * NEW Compatibility center (SEO, Tools) for better integration with other plugins (eg: Page Builders) without adding code * NEW Add our dynamic variables dropdown to global meta title / meta description settings page * NEW Add heading 1 (H1) check to Content Analysis feature * NEW Add Inbound links / Orphaned pages check to Content Analysis feature * NEW Use dynamic variables in social metadata (Open Graph and Twitter cards) * NEW Multiple opening hours (morning / afternoon) for global Local Business schema (PRO) * NEW 'seopress_resize_panel_elementor' hook to prevent SEOPress resizes the Elementor Panel (https://www.seopress.org/support/hooks/disable-automatic-resizing-of-elementor-panel/) * NEW 'seopress_titles_robots_attrs' hook to add meta robots attributes (https://www.seopress.org/support/hooks/filter-meta-robots-attributes/) * NEW 'seopress_sitemaps_no_archive_link' hook to remove archive links in XML sitemaps (https://www.seopress.org/support/hooks/filter-custom-post-type-archive-link-in-xml-single-sitemaps/) * NEW 'seopress_breadcrumbs_force_archive_name' hook to force archive name display on CPT with no archive (https://www.seopress.org/support/hooks/force-the-display-of-the-custom-post-type-archive-page-even-if-it-does-not-exist-in-breadcrumbs/) * NEW 'seopress_sitemaps_html_remove_archive' hook to filter archive names in HTML sitemap (https://www.seopress.org/support/hooks/remove-archive-links-per-post-type-in-html-sitemap/) * NEW 'seopress_auto_image_alt_target_kw' hook to use target keywords for the alternative texts of the images (https://www.seopress.org/support/hooks/filter-automatic-image-alt-tag-with-target-keywords/) * NEW 'seopress_export_redirections_query' hook to filter export redirections query (https://www.seopress.org/support/hooks/filter-export-redirections-query/) * NEW 'seopress_gtag_ec_status' hook to change status of WC orders sent to Google Analytics Enhanced Ecommerce (https://www.seopress.org/support/hooks/filter-woocommerce-order-status-sent-to-google-analytics-enhanced-ecommerce/) * INFO Improve accessibility for cookie bar * INFO Improve SEO columns display for posts, pages, custom post type lists * INFO Improve UI to warn users if some content are set to noindex and still included in XML sitemaps * INFO Improve UI / i18n for Google Analytics widget * INFO Improve UI if error on license activation * INFO Improve UI for BlogPosting schema * INFO Improve UI for global LocalBusiness schema * INFO Automatically add custom fields created with Toolset plugin to our Schema feature * INFO SEO and Content Analysis metaboxes are now completely independent (and prevent a lot of errors / warnings) * INFO Strengthening security * FIX Quick edit JS errors if noindex/nofollow columns are blocked (props to @mbis) * FIX i18n for Type of Employment on non English languages * FIX Webarx graph conflict * FIX Broken link checker error with 404 links * FIX PHP 8 errors with DIVI * FIX PHP 8 error with Google Preview for terms taxonomy * FIX Product variable price sent to Add to cart GA Enhanced Ecommerce event * FIX Elementor synchronization when duplicating posts * FIX Attachment XML sitemaps * FIX Oxygen content analysis in specific cases * FIX AIO import tool
View our complete changelog
Release Info
Developer | rainbowgeek |
Plugin | SEOPress |
Version | 4.5 |
Comparing to | |
See all releases |
Code changes from version 4.4.0.7 to 4.5
- assets/css/seopress.css +70 -19
- assets/css/seopress.min.css +1 -1
- assets/js/seopress-block-editor.js +30 -9
- assets/js/seopress-block-editor.min.js +1 -1
- assets/js/seopress-cookies-ajax.js +38 -33
- assets/js/seopress-cookies-ajax.min.js +1 -1
- assets/js/seopress-counters.js +537 -508
- assets/js/seopress-counters.min.js +1 -1
- assets/js/seopress-migrate.js +229 -121
- assets/js/seopress-migrate.min.js +1 -1
- assets/js/seopress-quick-edit.js +59 -59
- assets/js/seopress-quick-edit.min.js +1 -1
- assets/js/seopress-tabs.js +138 -102
- assets/js/seopress-tabs.min.js +1 -1
- assets/js/seopress-yoast-migrate.js +0 -132
- assets/js/seopress-yoast-migrate.min.js +0 -1
- inc/admin/admin-dyn-variables-helper.php +1 -0
- inc/admin/admin-metaboxes-content-analysis-form.php +5 -1
- inc/admin/admin-metaboxes-form.php +26 -44
- inc/admin/admin-metaboxes.php +148 -0
- inc/admin/admin-notifications-center.php +68 -58
- inc/admin/admin-term-metaboxes.php +154 -145
- inc/admin/admin-wizard.php +86 -3
- inc/admin/admin.php +478 -129
- inc/admin/ajax.php +632 -63
- inc/admin/page-builders/elementor/assets/js/base.js +80 -79
- inc/admin/page-builders/elementor/assets/js/content-analysis.js +12 -7
- inc/admin/page-builders/elementor/assets/js/social-preview.js +145 -83
- inc/admin/page-builders/elementor/assets/js/text-letter-counter.js +7 -2
- inc/admin/page-builders/elementor/inc/controls/class-google-suggestions-control.php +36 -35
- inc/admin/page-builders/elementor/inc/controls/class-social-preview-control.php +38 -34
- inc/functions/options-advanced-admin.php +12 -8
- inc/functions/options-advanced.php +4 -0
- inc/functions/options-google-analytics.php +74 -17
- inc/functions/options-google-ecommerce.php +5 -1
- inc/functions/options-import-export.php +3 -0
- inc/functions/options-sitemap.php +206 -149
- inc/functions/options-social.php +41 -1
- inc/functions/options-titles-metas.php +6 -0
- inc/functions/options-tools.php +173 -0
- inc/functions/options.php +672 -644
- inc/functions/sitemap/template-html-sitemap.php +52 -47
- inc/functions/sitemap/template-xml-sitemaps-single-term.php +86 -86
- inc/functions/sitemap/template-xml-sitemaps-single.php +4 -0
- inc/functions/variables/dynamic-variables.php +7 -0
- readme.txt +47 -83
- seopress.php +32 -9
- src/Actions/Front/Schemas/PrintHeadJsonSchema.php +33 -0
- src/Compose/UseJsonSchema.php +150 -0
- src/Compose/UseTags.php +16 -4
- src/Constants/Options.php +14 -0
- src/Core/Kernel.php +6 -0
- src/Helpers/ContentAnalysis.php +5 -0
- src/Helpers/OpeningHoursHelper.php +29 -0
- src/JsonSchemas/ContactPoint.php +31 -0
- src/JsonSchemas/Organization.php +67 -0
- src/Models/GetJsonData.php +11 -0
- src/Models/GetJsonFromFile.php +13 -0
- src/Models/JsonSchemaValue.php +74 -0
- src/Services/ContentAnalysis/GetContent.php +53 -10
- src/Services/JsonSchemaGenerator.php +84 -0
- src/Services/Options/SocialOption.php +120 -0
- src/Services/Options/ToggleOption.php +49 -0
- src/Services/TagsToString.php +41 -2
- src/Services/VariablesToString.php +103 -0
- src/Tags/PostContent.php +5 -1
- src/Tags/PostTitle.php +1 -1
- src/Tags/Schema/KnowledgeType.php +32 -0
- src/Tags/Schema/SiteUrl.php +17 -0
- src/Tags/Schema/SocialAccount/Facebook.php +28 -0
- src/Tags/Schema/SocialAccount/Instagram.php +28 -0
- src/Tags/Schema/SocialAccount/Linkedin.php +28 -0
- src/Tags/Schema/SocialAccount/Pinterest.php +28 -0
- src/Tags/Schema/SocialAccount/Twitter.php +31 -0
- src/Tags/Schema/SocialAccount/Youtube.php +28 -0
- src/Tags/Schema/SocialKnowledgeContactOption.php +31 -0
- src/Tags/Schema/SocialKnowledgeContactType.php +28 -0
- src/Tags/Schema/SocialKnowledgeImage.php +28 -0
- src/Tags/Schema/SocialKnowledgeName.php +33 -0
- src/Tags/Schema/SocialPhoneNumber.php +28 -0
- src/Thirds/RankMath/Tags.php +1 -1
- src/Thirds/WooCommerce/WooCommerceAnalyticsService.php +18 -3
- templates/json-schemas/contact-point.json +6 -0
- templates/json-schemas/organization.json +15 -0
- templates/sitemap/single.php +18 -11
- vendor/composer/InstalledVersions.php +6 -6
- vendor/composer/installed.php +6 -6
@@ -250,6 +250,11 @@
|
|
250 |
color: #0073aa;
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
253 |
#seopress_content_analysis .wrap-seopress-analysis {
|
254 |
display: inline-block;
|
255 |
width: 100%;
|
@@ -1106,25 +1111,56 @@ table.wp-list-table .manage_column.column-seopress_insights {
|
|
1106 |
width: 95%;
|
1107 |
}
|
1108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1109 |
.fixed .column-seopress_w3c,
|
1110 |
.fixed .column-seopress_words,
|
1111 |
-
.fixed .column-seopress_ps
|
1112 |
-
.fixed .column-seopress_score {
|
1113 |
width: 6%;
|
1114 |
}
|
1115 |
|
|
|
|
|
|
|
|
|
1116 |
table.fixed thead .column-seopress_nofollow,
|
1117 |
table.fixed thead .column-seopress_noindex {
|
1118 |
-
width:
|
1119 |
}
|
|
|
1120 |
@media only screen and (max-width: 1200px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1121 |
table.fixed thead .column-seopress_nofollow,
|
1122 |
table.fixed thead .column-seopress_noindex,
|
|
|
1123 |
table.fixed thead .column-seopress_w3c,
|
1124 |
table.fixed thead .column-seopress_words,
|
1125 |
-
table.fixed thead .column-seopress_ps
|
1126 |
-
|
1127 |
width: 10%;
|
|
|
|
|
|
|
1128 |
}
|
1129 |
}
|
1130 |
|
@@ -2401,7 +2437,8 @@ body.seopress-styles {
|
|
2401 |
.seopress-button,
|
2402 |
.seopress-option .tag-title,
|
2403 |
#seopress_pro_cpt .tag-title,
|
2404 |
-
#seopress_cpt .seopress-tag-dropdown
|
|
|
2405 |
cursor: pointer;
|
2406 |
font-weight: 500;
|
2407 |
border-radius: 4px;
|
@@ -2460,14 +2497,16 @@ body.seopress-styles {
|
|
2460 |
}
|
2461 |
|
2462 |
#seopress_cpt .sp-wrap-tag-variables-list,
|
2463 |
-
#seopress_pro_cpt .sp-wrap-tag-variables-list
|
|
|
2464 |
position: relative;
|
2465 |
float: left;
|
2466 |
display: none;
|
2467 |
}
|
2468 |
|
2469 |
#seopress_cpt .sp-tag-variables-list,
|
2470 |
-
#seopress_pro_cpt .sp-tag-variables-list
|
|
|
2471 |
background: #fff;
|
2472 |
position: absolute;
|
2473 |
left: -42px;
|
@@ -2489,24 +2528,29 @@ body.seopress-styles {
|
|
2489 |
}
|
2490 |
|
2491 |
#seopress_cpt .sp-wrap-tag-variables-list.open,
|
2492 |
-
#seopress_pro_cpt .sp-wrap-tag-variables-list.open
|
|
|
2493 |
display: block;
|
2494 |
}
|
2495 |
|
2496 |
#seopress_cpt .seopress-tag-single-all.tag-title .dashicons,
|
2497 |
#seopress_cpt .seopress-tag-single-all.seopress-tag-dropdown .dashicons,
|
2498 |
-
#seopress_pro_cpt .seopress-tag-single-all.tag-title .dashicons
|
|
|
|
|
2499 |
margin: 0;
|
2500 |
transition: all 150ms linear;
|
2501 |
}
|
2502 |
|
2503 |
#seopress_cpt .seopress-tag-single-all.open .dashicons,
|
2504 |
-
#seopress_pro_cpt .seopress-tag-single-all.open .dashicons
|
|
|
2505 |
transform: rotateX(180deg);
|
2506 |
}
|
2507 |
|
2508 |
#seopress_cpt .sp-tag-variables-list li,
|
2509 |
-
#seopress_pro_cpt .sp-tag-variables-list li
|
|
|
2510 |
padding: 8px 12px;
|
2511 |
cursor: pointer;
|
2512 |
margin: 0;
|
@@ -2514,7 +2558,8 @@ body.seopress-styles {
|
|
2514 |
}
|
2515 |
|
2516 |
#seopress_cpt .sp-tag-variables-list li span,
|
2517 |
-
#seopress_pro_cpt .sp-tag-variables-list li span
|
|
|
2518 |
display: block;
|
2519 |
font-weight: bold;
|
2520 |
font-size: 12px;
|
@@ -2522,13 +2567,15 @@ body.seopress-styles {
|
|
2522 |
}
|
2523 |
|
2524 |
#seopress_cpt .sp-tag-variables-list li:hover,
|
2525 |
-
#seopress_pro_cpt .sp-tag-variables-list li:hover
|
|
|
2526 |
background: #0385ba;
|
2527 |
color: #fff;
|
2528 |
}
|
2529 |
|
2530 |
#seopress_cpt .sp-tag-variables-list li::after,
|
2531 |
-
#seopress_pro_cpt .sp-tag-variables-list li::after
|
|
|
2532 |
content: attr(data-value);
|
2533 |
display: inline-block;
|
2534 |
background: #e9ecef;
|
@@ -2542,7 +2589,8 @@ body.seopress-styles {
|
|
2542 |
#seopress_cpt .tag-title .dashicons,
|
2543 |
.seopress-option .tag-title .dashicons,
|
2544 |
#seopress_pro_cpt .tag-title .dashicons,
|
2545 |
-
#seopress_cpt .seopress-tag-dropdown .dashicons
|
|
|
2546 |
padding: 0;
|
2547 |
height: 16px;
|
2548 |
width: 16px;
|
@@ -2554,7 +2602,6 @@ body.seopress-styles {
|
|
2554 |
.seopress-overlay-tag-dropdown {
|
2555 |
position: absolute;
|
2556 |
display: none;
|
2557 |
-
|
2558 |
top: 0;
|
2559 |
left: 0;
|
2560 |
width: 100%;
|
@@ -2569,7 +2616,8 @@ body.seopress-styles {
|
|
2569 |
#seopress_cpt .tag-title,
|
2570 |
.seopress-option .tag-title,
|
2571 |
#seopress_pro_cpt .tag-title,
|
2572 |
-
#seopress_cpt .seopress-tag-dropdown
|
|
|
2573 |
padding: 4px 8px;
|
2574 |
position: relative;
|
2575 |
top: 5px;
|
@@ -2597,7 +2645,10 @@ body.seopress-styles {
|
|
2597 |
.seopress-tag-dropdown:hover,
|
2598 |
#seopress_cpt .seopress-tag-dropdown .tag-title:active,
|
2599 |
#seopress_cpt-option .seopress-tag-dropdown .tag-title:focus,
|
2600 |
-
#seopress_cpt-option .seopress-tag-dropdown .tag-title:hover
|
|
|
|
|
|
|
2601 |
background: #232323;
|
2602 |
color: #fff;
|
2603 |
user-select: none;
|
250 |
color: #0073aa;
|
251 |
}
|
252 |
|
253 |
+
#seopress_content_analysis a.nounderline,
|
254 |
+
#seopress_content_analysis a.nounderline:hover {
|
255 |
+
text-decoration: none;
|
256 |
+
}
|
257 |
+
|
258 |
#seopress_content_analysis .wrap-seopress-analysis {
|
259 |
display: inline-block;
|
260 |
width: 100%;
|
1111 |
width: 95%;
|
1112 |
}
|
1113 |
|
1114 |
+
table.fixed thead .column-seopress_title,
|
1115 |
+
table.fixed thead .column-seopress_desc {
|
1116 |
+
width: 8%;
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
table.fixed thead .column-seopress_redirect_enable,
|
1120 |
+
table.fixed thead .column-seopress_redirect_url,
|
1121 |
+
table.fixed thead .column-seopress_canonical,
|
1122 |
+
table.fixed thead .column-seopress_tkw,
|
1123 |
.fixed .column-seopress_w3c,
|
1124 |
.fixed .column-seopress_words,
|
1125 |
+
.fixed .column-seopress_ps {
|
|
|
1126 |
width: 6%;
|
1127 |
}
|
1128 |
|
1129 |
+
.fixed .column-seopress_score {
|
1130 |
+
width: 50px;
|
1131 |
+
}
|
1132 |
+
|
1133 |
table.fixed thead .column-seopress_nofollow,
|
1134 |
table.fixed thead .column-seopress_noindex {
|
1135 |
+
width: 5%;
|
1136 |
}
|
1137 |
+
|
1138 |
@media only screen and (max-width: 1200px) {
|
1139 |
+
table.fixed .column-seopress_title > div,
|
1140 |
+
table.fixed .column-seopress_desc > div,
|
1141 |
+
table.fixed .column-seopress_redirect_enable > div,
|
1142 |
+
table.fixed .column-seopress_redirect_url > div,
|
1143 |
+
table.fixed .column-seopress_canonical > div {
|
1144 |
+
white-space: nowrap;
|
1145 |
+
overflow: hidden;
|
1146 |
+
text-overflow: ellipsis;
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
table.fixed thead .column-seopress_redirect_enable,
|
1150 |
+
table.fixed thead .column-seopress_redirect_url,
|
1151 |
+
table.fixed thead .column-seopress_canonical,
|
1152 |
+
table.fixed thead .column-seopress_tkw,
|
1153 |
table.fixed thead .column-seopress_nofollow,
|
1154 |
table.fixed thead .column-seopress_noindex,
|
1155 |
+
table.fixed thead .column-seopress_score,
|
1156 |
table.fixed thead .column-seopress_w3c,
|
1157 |
table.fixed thead .column-seopress_words,
|
1158 |
+
table.fixed thead .column-seopress_ps
|
1159 |
+
{
|
1160 |
width: 10%;
|
1161 |
+
white-space: nowrap;
|
1162 |
+
overflow: hidden;
|
1163 |
+
text-overflow: ellipsis;
|
1164 |
}
|
1165 |
}
|
1166 |
|
2437 |
.seopress-button,
|
2438 |
.seopress-option .tag-title,
|
2439 |
#seopress_pro_cpt .tag-title,
|
2440 |
+
#seopress_cpt .seopress-tag-dropdown,
|
2441 |
+
#seopress-tabs .seopress-tag-dropdown {
|
2442 |
cursor: pointer;
|
2443 |
font-weight: 500;
|
2444 |
border-radius: 4px;
|
2497 |
}
|
2498 |
|
2499 |
#seopress_cpt .sp-wrap-tag-variables-list,
|
2500 |
+
#seopress_pro_cpt .sp-wrap-tag-variables-list,
|
2501 |
+
#seopress-tabs .sp-wrap-tag-variables-list {
|
2502 |
position: relative;
|
2503 |
float: left;
|
2504 |
display: none;
|
2505 |
}
|
2506 |
|
2507 |
#seopress_cpt .sp-tag-variables-list,
|
2508 |
+
#seopress_pro_cpt .sp-tag-variables-list,
|
2509 |
+
#seopress-tabs .sp-tag-variables-list {
|
2510 |
background: #fff;
|
2511 |
position: absolute;
|
2512 |
left: -42px;
|
2528 |
}
|
2529 |
|
2530 |
#seopress_cpt .sp-wrap-tag-variables-list.open,
|
2531 |
+
#seopress_pro_cpt .sp-wrap-tag-variables-list.open,
|
2532 |
+
#seopress-tabs .sp-wrap-tag-variables-list.open {
|
2533 |
display: block;
|
2534 |
}
|
2535 |
|
2536 |
#seopress_cpt .seopress-tag-single-all.tag-title .dashicons,
|
2537 |
#seopress_cpt .seopress-tag-single-all.seopress-tag-dropdown .dashicons,
|
2538 |
+
#seopress_pro_cpt .seopress-tag-single-all.tag-title .dashicons,
|
2539 |
+
#seopress-tabs .seopress-tag-single-all.tag-title .dashicons,
|
2540 |
+
#seopress-tabs .seopress-tag-single-all.tag-description .dashicons {
|
2541 |
margin: 0;
|
2542 |
transition: all 150ms linear;
|
2543 |
}
|
2544 |
|
2545 |
#seopress_cpt .seopress-tag-single-all.open .dashicons,
|
2546 |
+
#seopress_pro_cpt .seopress-tag-single-all.open .dashicons,
|
2547 |
+
#seopress-tabs .seopress-tag-single-all.open .dashicons {
|
2548 |
transform: rotateX(180deg);
|
2549 |
}
|
2550 |
|
2551 |
#seopress_cpt .sp-tag-variables-list li,
|
2552 |
+
#seopress_pro_cpt .sp-tag-variables-list li,
|
2553 |
+
#seopress-tabs .sp-tag-variables-list li {
|
2554 |
padding: 8px 12px;
|
2555 |
cursor: pointer;
|
2556 |
margin: 0;
|
2558 |
}
|
2559 |
|
2560 |
#seopress_cpt .sp-tag-variables-list li span,
|
2561 |
+
#seopress_pro_cpt .sp-tag-variables-list li span,
|
2562 |
+
#seopress-tabs .sp-tag-variables-list li span {
|
2563 |
display: block;
|
2564 |
font-weight: bold;
|
2565 |
font-size: 12px;
|
2567 |
}
|
2568 |
|
2569 |
#seopress_cpt .sp-tag-variables-list li:hover,
|
2570 |
+
#seopress_pro_cpt .sp-tag-variables-list li:hover,
|
2571 |
+
#seopress-tabs .sp-tag-variables-list li:hover {
|
2572 |
background: #0385ba;
|
2573 |
color: #fff;
|
2574 |
}
|
2575 |
|
2576 |
#seopress_cpt .sp-tag-variables-list li::after,
|
2577 |
+
#seopress_pro_cpt .sp-tag-variables-list li::after,
|
2578 |
+
#seopress-tabs .sp-tag-variables-list li::after {
|
2579 |
content: attr(data-value);
|
2580 |
display: inline-block;
|
2581 |
background: #e9ecef;
|
2589 |
#seopress_cpt .tag-title .dashicons,
|
2590 |
.seopress-option .tag-title .dashicons,
|
2591 |
#seopress_pro_cpt .tag-title .dashicons,
|
2592 |
+
#seopress_cpt .seopress-tag-dropdown .dashicons,
|
2593 |
+
#seopress-tabs .seopress-tag-dropdown .dashicons {
|
2594 |
padding: 0;
|
2595 |
height: 16px;
|
2596 |
width: 16px;
|
2602 |
.seopress-overlay-tag-dropdown {
|
2603 |
position: absolute;
|
2604 |
display: none;
|
|
|
2605 |
top: 0;
|
2606 |
left: 0;
|
2607 |
width: 100%;
|
2616 |
#seopress_cpt .tag-title,
|
2617 |
.seopress-option .tag-title,
|
2618 |
#seopress_pro_cpt .tag-title,
|
2619 |
+
#seopress_cpt .seopress-tag-dropdown,
|
2620 |
+
#seopress-tabs .seopress-tag-dropdown {
|
2621 |
padding: 4px 8px;
|
2622 |
position: relative;
|
2623 |
top: 5px;
|
2645 |
.seopress-tag-dropdown:hover,
|
2646 |
#seopress_cpt .seopress-tag-dropdown .tag-title:active,
|
2647 |
#seopress_cpt-option .seopress-tag-dropdown .tag-title:focus,
|
2648 |
+
#seopress_cpt-option .seopress-tag-dropdown .tag-title:hover,
|
2649 |
+
#seopress-tabs .seopress-tag-dropdown .tag-title:active,
|
2650 |
+
#seopress-tabs .seopress-tag-dropdown .tag-title:focus,
|
2651 |
+
#seopress-tabs .seopress-tag-dropdown .tag-title:hover {
|
2652 |
background: #232323;
|
2653 |
color: #fff;
|
2654 |
user-select: none;
|
@@ -1 +1 @@
|
|
1 |
-
@keyframes sp-fade-in-out{0%{opacity:0;bottom:0;visibility:hidden}25%{opacity:1;bottom:40px;visibility:visible}75%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}#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"}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_top_level .wrap-seopress-noindex{background:red;color:#fff;padding:0 8px;float:right;margin-left:6px}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_top_level>a{display:inline-block}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_top_level .wrap-seopress-noindex .ab-icon::before{color:#eee;vertical-align:middle}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots{display:block;background:#23292d}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots a{height:inherit;padding-bottom:5px}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-seo{font-weight:700;border-bottom:1px solid currentColor;width:100%;display:block;margin-bottom:5px}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex{display:block}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow .ab-icon,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex .ab-icon{float:none;vertical-align:middle}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow .on::before,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex .on::before{color:red}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow .off::before,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex .off::before{color:#46b450}.sp-tooltip{position:relative;margin-left:5px;display:inline-block;cursor:help;vertical-align:bottom;text-align:left;background:0 0;border:none;padding:0}.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;text-transform:none}.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:active .sp-tooltiptext,.sp-tooltip:focus .sp-tooltiptext,.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:#1a7a06;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 .description,#seopress_cpt .description,.seopress-tab .description{display:block;font-style:italic}#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}table.wp-list-table .manage_column.column-seopress_canonical,table.wp-list-table .manage_column.column-seopress_desc,table.wp-list-table .manage_column.column-seopress_insights,table.wp-list-table .manage_column.column-seopress_noindex,table.wp-list-table .manage_column.column-seopress_redirect_enable,table.wp-list-table .manage_column.column-seopress_redirect_url,table.wp-list-table .manage_column.column-seopress_title,table.wp-list-table .manage_column.column-seopress_tkw{width:7%!important}#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-tabs .sp-section{font-weight:700;font-size:13px}#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{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%}table.fixed thead .column-seopress_nofollow,table.fixed thead .column-seopress_noindex{width:8%}@media only screen and (max-width:1200px){table.fixed thead .column-seopress_nofollow,table.fixed thead .column-seopress_noindex,table.fixed thead .column-seopress_ps,table.fixed thead .column-seopress_score,table.fixed thead .column-seopress_w3c,table.fixed thead .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 RGB(238,238,238);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-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;max-width:100%;margin:0 auto}@media only screen and (max-width:1024px){#seopress-admin-tabs.wrap{width:100%}}.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:RGB(106,124,148);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:60px;margin:0 auto;width:64rem;box-sizing:border-box;position:relative;max-width:100%}#seopress-header{margin:0 auto;position:relative;width:90%;padding:1rem}#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,rgba(58,74,251,1) 0,rgba(71,190,165,1) 100%);background:-webkit-linear-gradient(45deg,rgba(58,74,251,1) 0,rgba(71,190,165,1) 100%);background:linear-gradient(45deg,rgba(58,74,251,1) 0,rgba(71,190,165,1) 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:absolute;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:inline-block;width:100%;top:52px;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{margin:0;box-sizing:border-box;display:grid;grid-gap:0 10px;grid-template-columns:repeat(2,1fr);padding:20px}@media only screen and (max-width:1024px){#seopress-header #seopress-admin .seopress-quick-access>ul{grid-template-columns:repeat(1,1fr)}}#seopress-header #seopress-admin h1 .seopress-quick-access li{line-height:40px;margin:0;display:inline-block;height:40px;background-size:100%;background-repeat:no-repeat}#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 RGB(238,238,238)}@media only screen and (max-width:782px){#seopress-tabs .seopress-tab.active{width:100%;padding:0;border-left:none;border-top:1px solid RGB(238,238,238)}}.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;margin:0 0 0 .3rem}#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)}@media only screen and (max-width:782px){.seopress-get-started{background:#fff}.seopress-get-started .inside{max-width:100%}}.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-default{margin:0}.seopress-option .wp-picker-container .wp-picker-clear{box-shadow:none;text-transform:none;border-radius:0;background:0 0;margin: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;align-items:center;display:flex}#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:active,#seopress-content .seopress-page-list .seopress-feature .seopress-doc:focus,#seopress-content .seopress-page-list .seopress-feature .seopress-doc:hover,.seopress-option #seopress-tabs .seopress-doc:active,.seopress-option #seopress-tabs .seopress-doc:focus,.seopress-option #seopress-tabs .seopress-doc:hover{color:#747474;background:0 0;box-shadow:none;border:none}#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:782px){#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 .seopress-tag-dropdown,#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:rgba(19,191,17,1);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 .sp-wrap-tag-variables-list,#seopress_pro_cpt .sp-wrap-tag-variables-list{position:relative;float:left;display:none}#seopress_cpt .sp-tag-variables-list,#seopress_pro_cpt .sp-tag-variables-list{background:#fff;position:absolute;left:-42px;width:300px;border-radius:4px;z-index:100;top:20px;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);height:300px;z-index:100;overflow:auto}#seopress_cpt #seopress_titles_title_meta{margin-bottom:.2rem}#seopress_cpt .sp-wrap-tag-variables-list.open,#seopress_pro_cpt .sp-wrap-tag-variables-list.open{display:block}#seopress_cpt .seopress-tag-single-all.seopress-tag-dropdown .dashicons,#seopress_cpt .seopress-tag-single-all.tag-title .dashicons,#seopress_pro_cpt .seopress-tag-single-all.tag-title .dashicons{margin:0;transition:all 150ms linear}#seopress_cpt .seopress-tag-single-all.open .dashicons,#seopress_pro_cpt .seopress-tag-single-all.open .dashicons{transform:rotateX(180deg)}#seopress_cpt .sp-tag-variables-list li,#seopress_pro_cpt .sp-tag-variables-list li{padding:8px 12px;cursor:pointer;margin:0;border-bottom:1px solid #f0f0f0}#seopress_cpt .sp-tag-variables-list li span,#seopress_pro_cpt .sp-tag-variables-list li span{display:block;font-weight:700;font-size:12px;margin-bottom:2px}#seopress_cpt .sp-tag-variables-list li:hover,#seopress_pro_cpt .sp-tag-variables-list li:hover{background:#0385ba;color:#fff}#seopress_cpt .sp-tag-variables-list li::after,#seopress_pro_cpt .sp-tag-variables-list li::after{content:attr(data-value);display:inline-block;background:#e9ecef;padding:1px 5px;color:#333;font-family:Menlo,Monaco,Andale Mono,Courier New,monospace;border-radius:3px;font-size:11px}#seopress_cpt .seopress-tag-dropdown .dashicons,#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-overlay-tag-dropdown{position:absolute;display:none;top:0;left:0;width:100%;height:100%;z-index:50}.seopress-overlay-tag-dropdown.active{display:block}#seopress_cpt .seopress-tag-dropdown,#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 .seopress-tag-dropdown .tag-title:active,#seopress_cpt .tag-title:active,#seopress_cpt .tag-title:focus,#seopress_cpt .tag-title:hover,#seopress_cpt-option .seopress-tag-dropdown .tag-title:focus,#seopress_cpt-option .seopress-tag-dropdown .tag-title:hover,#seopress_pro_cpt .tag-title:active,#seopress_pro_cpt .tag-title:focus,#seopress_pro_cpt .tag-title:hover,.seopress-tag-dropdown:active,.seopress-tag-dropdown:focus,.seopress-tag-dropdown:hover{background:#232323;color:#fff;user-select:none}.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_add_to_insights{margin-left:1rem}#seopress_add_to_insights_status{display:inline-block;font-weight:700;margin:0 0 0 1rem;vertical-align:middle;padding:.3rem;font-style:italic}#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)}@media only screen and (max-width:782px){#seopress-content .seopress-page-list{grid-template-columns:repeat(1,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-styles .wrap{margin:20px 0 0 0;display:flex;position:relative}.seopress-insights.seopress-styles .wrap,.toplevel_page_seopress-option.seopress-styles .wrap{display:inherit;position:inherit;margin:inherit}@media only screen and (max-width:782px){.seopress-styles .wrap{display:inherit;position:inherit;margin:inherit}}.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:782px){.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}@media only screen and (max-width:600px){#seopress-admin-tabs.wrap div.nav-tab-wrapper{top:0;display:block}}@media only screen and (max-width:1024px){#seopress-admin-tabs.wrap div.nav-tab-wrapper{display:block}}#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}#seopress-tabs.wrap .notice{margin:1rem 0}.seopress-BlankState a.button-primary,.seopress-BlankState button.button-primary,.seopress-message a.button-primary,.seopress-message button.button-primary{background:#6259e6;border-color:#6259e6;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;color:#fff;display:inline-block}.seopress-BlankState a.button-primary:active,.seopress-BlankState a.button-primary:focus,.seopress-BlankState a.button-primary:hover,.seopress-BlankState button.button-primary:active,.seopress-BlankState button.button-primary:focus,.seopress-BlankState button.button-primary:hover,.seopress-message a.button-primary:active,.seopress-message a.button-primary:focus,.seopress-message a.button-primary:hover,.seopress-message button.button-primary:active,.seopress-message button.button-primary:focus,.seopress-message button.button-primary:hover{background:#6259e6;border-color:#6259e6;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #6259e6}.post-type-seopress_404 .seopress-BlankState-message::before,.post-type-seopress_schemas .seopress-BlankState-message::before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\f103"}.post-type-seopress_schemas .seopress-BlankState-message::before{content:"\f495"}.seopress-BlankState{text-align:center;padding:5em 0 0}.seopress-BlankState .seopress-BlankState-message{color:#aaa;margin:0 auto 1.5em;line-height:1.5em;font-size:1.2em;max-width:500px}.seopress-BlankState .seopress-BlankState-message::before{color:#ddd;text-shadow:0 -1px 1px rgba(0,0,0,.2),0 1px 0 rgba(255,255,255,.8);font-size:8em;display:block;position:relative!important;top:auto;left:auto;line-height:1em;margin:0 0 .1875em}.seopress-BlankState .seopress-BlankState-cta{font-size:1.2em;padding:.75em 1.5em;margin:0 .25em;height:auto;display:inline-block!important}.seopress-BlankState{max-width:764px;text-align:center;margin:auto}.seopress-BlankState .seopress-BlankState-message{color:#444;font-size:1.5em;margin:0 auto 1em}.seopress-BlankState .seopress-BlankState-message::before{font-size:120px}.seopress-BlankState .seopress-BlankState-buttons{margin-bottom:4em}#seopress_content_analysis .up,#seopress_content_analysis .up .dashicons{color:#4ab866}#seopress_content_analysis .down,#seopress_content_analysis .down .dashicons{color:#d94f4f}#seopress_content_analysis .up .dashicons{transform:rotateZ(45deg)}#seopress_content_analysis .stable .dashicons{transform:rotateZ(90deg)}#seopress_content_analysis .down .dashicons{transform:rotateZ(135deg)}#seopress_content_analysis .wrap-insights-post{clear:both;border-top:1px solid #e2e4e7;display:flex;align-items:center}#seopress_content_analysis .wrap-insights-post .widget-insights-title{margin:0 1rem}#seopress_content_analysis .wrap-insights-post span{font-weight:700;margin:0 .2rem 0 0}#seopress_content_analysis .wrap-insights-post .sp-tooltip *{font-weight:400}#seopress_content_analysis .wrap-insights-post .sp-tooltip-headings{font-weight:700}.sp-components-snackbar-list{position:fixed;right:0;bottom:40px;padding-left:16px;padding-right:16px;animation-name:sp-fade-in-out;animation-duration:5s;animation-iteration-count:1;animation-fill-mode:forwards;visibility:hidden;z-index:1}.sp-components-snackbar__content{display:flex;align-items:center;justify-content:space-between;line-height:1.4}.sp-components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#32373c;border-radius:4px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer}.sp-components-snackbar .dashicons{color:#fff}
|
1 |
+
@keyframes sp-fade-in-out{0%{opacity:0;bottom:0;visibility:hidden}25%{opacity:1;bottom:40px;visibility:visible}75%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}#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"}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_top_level .wrap-seopress-noindex{background:red;color:#fff;padding:0 8px;float:right;margin-left:6px}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_top_level>a{display:inline-block}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_top_level .wrap-seopress-noindex .ab-icon::before{color:#eee;vertical-align:middle}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots{display:block;background:#23292d}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots a{height:inherit;padding-bottom:5px}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-seo{font-weight:700;border-bottom:1px solid currentColor;width:100%;display:block;margin-bottom:5px}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex{display:block}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow .ab-icon,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex .ab-icon{float:none;vertical-align:middle}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow .on::before,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex .on::before{color:red}#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-nofollow .off::before,#wpadminbar #wp-toolbar #wp-admin-bar-seopress_custom_sub_menu_meta_robots .wrap-seopress-cpt-noindex .off::before{color:#46b450}.sp-tooltip{position:relative;margin-left:5px;display:inline-block;cursor:help;vertical-align:bottom;text-align:left;background:0 0;border:none;padding:0}.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;text-transform:none}.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:active .sp-tooltiptext,.sp-tooltip:focus .sp-tooltiptext,.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:#1a7a06;font-size:11px}.analysis-score .sp-tooltip{vertical-align:middle;font-size:.75em}#seopress_content_analysis a{color:#0073aa}#seopress_content_analysis a.nounderline,#seopress_content_analysis a.nounderline:hover{text-decoration:none}#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 .description,#seopress_cpt .description,.seopress-tab .description{display:block;font-style:italic}#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}table.wp-list-table .manage_column.column-seopress_canonical,table.wp-list-table .manage_column.column-seopress_desc,table.wp-list-table .manage_column.column-seopress_insights,table.wp-list-table .manage_column.column-seopress_noindex,table.wp-list-table .manage_column.column-seopress_redirect_enable,table.wp-list-table .manage_column.column-seopress_redirect_url,table.wp-list-table .manage_column.column-seopress_title,table.wp-list-table .manage_column.column-seopress_tkw{width:7%!important}#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-tabs .sp-section{font-weight:700;font-size:13px}#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{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%}table.fixed thead .column-seopress_desc,table.fixed thead .column-seopress_title{width:8%}.fixed .column-seopress_ps,.fixed .column-seopress_w3c,.fixed .column-seopress_words,table.fixed thead .column-seopress_canonical,table.fixed thead .column-seopress_redirect_enable,table.fixed thead .column-seopress_redirect_url,table.fixed thead .column-seopress_tkw{width:6%}.fixed .column-seopress_score{width:50px}table.fixed thead .column-seopress_nofollow,table.fixed thead .column-seopress_noindex{width:5%}@media only screen and (max-width:1200px){table.fixed .column-seopress_canonical>div,table.fixed .column-seopress_desc>div,table.fixed .column-seopress_redirect_enable>div,table.fixed .column-seopress_redirect_url>div,table.fixed .column-seopress_title>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table.fixed thead .column-seopress_canonical,table.fixed thead .column-seopress_nofollow,table.fixed thead .column-seopress_noindex,table.fixed thead .column-seopress_ps,table.fixed thead .column-seopress_redirect_enable,table.fixed thead .column-seopress_redirect_url,table.fixed thead .column-seopress_score,table.fixed thead .column-seopress_tkw,table.fixed thead .column-seopress_w3c,table.fixed thead .column-seopress_words{width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}#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 RGB(238,238,238);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-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;max-width:100%;margin:0 auto}@media only screen and (max-width:1024px){#seopress-admin-tabs.wrap{width:100%}}.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:RGB(106,124,148);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:60px;margin:0 auto;width:64rem;box-sizing:border-box;position:relative;max-width:100%}#seopress-header{margin:0 auto;position:relative;width:90%;padding:1rem}#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,rgba(58,74,251,1) 0,rgba(71,190,165,1) 100%);background:-webkit-linear-gradient(45deg,rgba(58,74,251,1) 0,rgba(71,190,165,1) 100%);background:linear-gradient(45deg,rgba(58,74,251,1) 0,rgba(71,190,165,1) 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:absolute;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:inline-block;width:100%;top:52px;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{margin:0;box-sizing:border-box;display:grid;grid-gap:0 10px;grid-template-columns:repeat(2,1fr);padding:20px}@media only screen and (max-width:1024px){#seopress-header #seopress-admin .seopress-quick-access>ul{grid-template-columns:repeat(1,1fr)}}#seopress-header #seopress-admin h1 .seopress-quick-access li{line-height:40px;margin:0;display:inline-block;height:40px;background-size:100%;background-repeat:no-repeat}#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 RGB(238,238,238)}@media only screen and (max-width:782px){#seopress-tabs .seopress-tab.active{width:100%;padding:0;border-left:none;border-top:1px solid RGB(238,238,238)}}.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;margin:0 0 0 .3rem}#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)}@media only screen and (max-width:782px){.seopress-get-started{background:#fff}.seopress-get-started .inside{max-width:100%}}.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-default{margin:0}.seopress-option .wp-picker-container .wp-picker-clear{box-shadow:none;text-transform:none;border-radius:0;background:0 0;margin: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;align-items:center;display:flex}#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:active,#seopress-content .seopress-page-list .seopress-feature .seopress-doc:focus,#seopress-content .seopress-page-list .seopress-feature .seopress-doc:hover,.seopress-option #seopress-tabs .seopress-doc:active,.seopress-option #seopress-tabs .seopress-doc:focus,.seopress-option #seopress-tabs .seopress-doc:hover{color:#747474;background:0 0;box-shadow:none;border:none}#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:782px){#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-tabs .seopress-tag-dropdown,#seopress_cpt .seopress-tag-dropdown,#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:rgba(19,191,17,1);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-tabs .sp-wrap-tag-variables-list,#seopress_cpt .sp-wrap-tag-variables-list,#seopress_pro_cpt .sp-wrap-tag-variables-list{position:relative;float:left;display:none}#seopress-tabs .sp-tag-variables-list,#seopress_cpt .sp-tag-variables-list,#seopress_pro_cpt .sp-tag-variables-list{background:#fff;position:absolute;left:-42px;width:300px;border-radius:4px;z-index:100;top:20px;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);height:300px;z-index:100;overflow:auto}#seopress_cpt #seopress_titles_title_meta{margin-bottom:.2rem}#seopress-tabs .sp-wrap-tag-variables-list.open,#seopress_cpt .sp-wrap-tag-variables-list.open,#seopress_pro_cpt .sp-wrap-tag-variables-list.open{display:block}#seopress-tabs .seopress-tag-single-all.tag-description .dashicons,#seopress-tabs .seopress-tag-single-all.tag-title .dashicons,#seopress_cpt .seopress-tag-single-all.seopress-tag-dropdown .dashicons,#seopress_cpt .seopress-tag-single-all.tag-title .dashicons,#seopress_pro_cpt .seopress-tag-single-all.tag-title .dashicons{margin:0;transition:all 150ms linear}#seopress-tabs .seopress-tag-single-all.open .dashicons,#seopress_cpt .seopress-tag-single-all.open .dashicons,#seopress_pro_cpt .seopress-tag-single-all.open .dashicons{transform:rotateX(180deg)}#seopress-tabs .sp-tag-variables-list li,#seopress_cpt .sp-tag-variables-list li,#seopress_pro_cpt .sp-tag-variables-list li{padding:8px 12px;cursor:pointer;margin:0;border-bottom:1px solid #f0f0f0}#seopress-tabs .sp-tag-variables-list li span,#seopress_cpt .sp-tag-variables-list li span,#seopress_pro_cpt .sp-tag-variables-list li span{display:block;font-weight:700;font-size:12px;margin-bottom:2px}#seopress-tabs .sp-tag-variables-list li:hover,#seopress_cpt .sp-tag-variables-list li:hover,#seopress_pro_cpt .sp-tag-variables-list li:hover{background:#0385ba;color:#fff}#seopress-tabs .sp-tag-variables-list li::after,#seopress_cpt .sp-tag-variables-list li::after,#seopress_pro_cpt .sp-tag-variables-list li::after{content:attr(data-value);display:inline-block;background:#e9ecef;padding:1px 5px;color:#333;font-family:Menlo,Monaco,Andale Mono,Courier New,monospace;border-radius:3px;font-size:11px}#seopress-tabs .seopress-tag-dropdown .dashicons,#seopress_cpt .seopress-tag-dropdown .dashicons,#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-overlay-tag-dropdown{position:absolute;display:none;top:0;left:0;width:100%;height:100%;z-index:50}.seopress-overlay-tag-dropdown.active{display:block}#seopress-tabs .seopress-tag-dropdown,#seopress_cpt .seopress-tag-dropdown,#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-tabs .seopress-tag-dropdown .tag-title:active,#seopress-tabs .seopress-tag-dropdown .tag-title:focus,#seopress-tabs .seopress-tag-dropdown .tag-title:hover,#seopress_cpt .seopress-tag-dropdown .tag-title:active,#seopress_cpt .tag-title:active,#seopress_cpt .tag-title:focus,#seopress_cpt .tag-title:hover,#seopress_cpt-option .seopress-tag-dropdown .tag-title:focus,#seopress_cpt-option .seopress-tag-dropdown .tag-title:hover,#seopress_pro_cpt .tag-title:active,#seopress_pro_cpt .tag-title:focus,#seopress_pro_cpt .tag-title:hover,.seopress-tag-dropdown:active,.seopress-tag-dropdown:focus,.seopress-tag-dropdown:hover{background:#232323;color:#fff;user-select:none}.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_add_to_insights{margin-left:1rem}#seopress_add_to_insights_status{display:inline-block;font-weight:700;margin:0 0 0 1rem;vertical-align:middle;padding:.3rem;font-style:italic}#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)}@media only screen and (max-width:782px){#seopress-content .seopress-page-list{grid-template-columns:repeat(1,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-styles .wrap{margin:20px 0 0 0;display:flex;position:relative}.seopress-insights.seopress-styles .wrap,.toplevel_page_seopress-option.seopress-styles .wrap{display:inherit;position:inherit;margin:inherit}@media only screen and (max-width:782px){.seopress-styles .wrap{display:inherit;position:inherit;margin:inherit}}.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:782px){.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}@media only screen and (max-width:600px){#seopress-admin-tabs.wrap div.nav-tab-wrapper{top:0;display:block}}@media only screen and (max-width:1024px){#seopress-admin-tabs.wrap div.nav-tab-wrapper{display:block}}#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}#seopress-tabs.wrap .notice{margin:1rem 0}.seopress-BlankState a.button-primary,.seopress-BlankState button.button-primary,.seopress-message a.button-primary,.seopress-message button.button-primary{background:#6259e6;border-color:#6259e6;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;color:#fff;display:inline-block}.seopress-BlankState a.button-primary:active,.seopress-BlankState a.button-primary:focus,.seopress-BlankState a.button-primary:hover,.seopress-BlankState button.button-primary:active,.seopress-BlankState button.button-primary:focus,.seopress-BlankState button.button-primary:hover,.seopress-message a.button-primary:active,.seopress-message a.button-primary:focus,.seopress-message a.button-primary:hover,.seopress-message button.button-primary:active,.seopress-message button.button-primary:focus,.seopress-message button.button-primary:hover{background:#6259e6;border-color:#6259e6;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #6259e6}.post-type-seopress_404 .seopress-BlankState-message::before,.post-type-seopress_schemas .seopress-BlankState-message::before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\f103"}.post-type-seopress_schemas .seopress-BlankState-message::before{content:"\f495"}.seopress-BlankState{text-align:center;padding:5em 0 0}.seopress-BlankState .seopress-BlankState-message{color:#aaa;margin:0 auto 1.5em;line-height:1.5em;font-size:1.2em;max-width:500px}.seopress-BlankState .seopress-BlankState-message::before{color:#ddd;text-shadow:0 -1px 1px rgba(0,0,0,.2),0 1px 0 rgba(255,255,255,.8);font-size:8em;display:block;position:relative!important;top:auto;left:auto;line-height:1em;margin:0 0 .1875em}.seopress-BlankState .seopress-BlankState-cta{font-size:1.2em;padding:.75em 1.5em;margin:0 .25em;height:auto;display:inline-block!important}.seopress-BlankState{max-width:764px;text-align:center;margin:auto}.seopress-BlankState .seopress-BlankState-message{color:#444;font-size:1.5em;margin:0 auto 1em}.seopress-BlankState .seopress-BlankState-message::before{font-size:120px}.seopress-BlankState .seopress-BlankState-buttons{margin-bottom:4em}#seopress_content_analysis .up,#seopress_content_analysis .up .dashicons{color:#4ab866}#seopress_content_analysis .down,#seopress_content_analysis .down .dashicons{color:#d94f4f}#seopress_content_analysis .up .dashicons{transform:rotateZ(45deg)}#seopress_content_analysis .stable .dashicons{transform:rotateZ(90deg)}#seopress_content_analysis .down .dashicons{transform:rotateZ(135deg)}#seopress_content_analysis .wrap-insights-post{clear:both;border-top:1px solid #e2e4e7;display:flex;align-items:center}#seopress_content_analysis .wrap-insights-post .widget-insights-title{margin:0 1rem}#seopress_content_analysis .wrap-insights-post span{font-weight:700;margin:0 .2rem 0 0}#seopress_content_analysis .wrap-insights-post .sp-tooltip *{font-weight:400}#seopress_content_analysis .wrap-insights-post .sp-tooltip-headings{font-weight:700}.sp-components-snackbar-list{position:fixed;right:0;bottom:40px;padding-left:16px;padding-right:16px;animation-name:sp-fade-in-out;animation-duration:5s;animation-iteration-count:1;animation-fill-mode:forwards;visibility:hidden;z-index:1}.sp-components-snackbar__content{display:flex;align-items:center;justify-content:space-between;line-height:1.4}.sp-components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#32373c;border-radius:4px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer}.sp-components-snackbar .dashicons{color:#fff}
|
@@ -8,17 +8,38 @@ let hasSaved = false;
|
|
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',
|
16 |
url : seopressAjaxRealPreview.seopress_real_preview,
|
17 |
data: {
|
18 |
action: 'seopress_do_real_preview',
|
19 |
-
post_id:
|
20 |
-
tax_name:
|
21 |
-
origin:
|
22 |
post_type: $('#seopress_launch_analysis').attr('data_post_type'),
|
23 |
seopress_analysis_target_kw: $('#seopress_analysis_target_kw_meta').val(),
|
24 |
_ajax_nonce: seopressAjaxRealPreview.seopress_nonce,
|
@@ -37,17 +58,17 @@ let hasSaved = false;
|
|
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,
|
43 |
-
og_img : og_img,
|
44 |
og_url : og_url,
|
45 |
og_site_name : og_site_name,
|
46 |
tw_title : tw_title,
|
47 |
tw_desc : tw_desc,
|
48 |
tw_img : tw_img
|
49 |
};
|
50 |
-
|
51 |
for (var key in data_arr) {
|
52 |
if (data_arr.length) {
|
53 |
if (data_arr[key].length > 1) {
|
@@ -129,4 +150,4 @@ let hasSaved = false;
|
|
129 |
}
|
130 |
hasSaved = !! isSavingMetaBoxes; //isSavingPost != 0;
|
131 |
});
|
132 |
-
});
|
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 |
+
//Post ID
|
15 |
+
if (typeof $("#seopress-tabs").attr("data_id") !== "undefined") {
|
16 |
+
var post_id = $("#seopress-tabs").attr("data_id");
|
17 |
+
} else if (typeof $("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id") !== "undefined") {
|
18 |
+
var post_id = $("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id")
|
19 |
+
}
|
20 |
+
|
21 |
+
//Tax origin
|
22 |
+
if (typeof $("#seopress-tabs").attr("data_tax") !== "undefined") {
|
23 |
+
var tax_name = $("#seopress-tabs").attr("data_tax");
|
24 |
+
} else if (typeof $("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax") !== "undefined") {
|
25 |
+
var tax_name = $("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax")
|
26 |
+
}
|
27 |
+
|
28 |
+
//Origin
|
29 |
+
if (typeof $("#seopress-tabs").attr("data_origin") !== "undefined") {
|
30 |
+
var origin = $("#seopress-tabs").attr("data_origin");
|
31 |
+
} else if (typeof $("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin") !== "undefined") {
|
32 |
+
var origin = $("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin")
|
33 |
+
}
|
34 |
+
|
35 |
$.ajax({
|
36 |
method : 'GET',
|
37 |
url : seopressAjaxRealPreview.seopress_real_preview,
|
38 |
data: {
|
39 |
action: 'seopress_do_real_preview',
|
40 |
+
post_id: post_id,
|
41 |
+
tax_name: tax_name,
|
42 |
+
origin: origin,
|
43 |
post_type: $('#seopress_launch_analysis').attr('data_post_type'),
|
44 |
seopress_analysis_target_kw: $('#seopress_analysis_target_kw_meta').val(),
|
45 |
_ajax_nonce: seopressAjaxRealPreview.seopress_nonce,
|
58 |
typeof s.data.tw_desc ==="undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
|
59 |
typeof s.data.tw_img ==="undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
|
60 |
typeof s.data.meta_robots ==="undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
|
61 |
+
|
62 |
var data_arr = {og_title : og_title,
|
63 |
og_desc : og_desc,
|
64 |
+
og_img : og_img,
|
65 |
og_url : og_url,
|
66 |
og_site_name : og_site_name,
|
67 |
tw_title : tw_title,
|
68 |
tw_desc : tw_desc,
|
69 |
tw_img : tw_img
|
70 |
};
|
71 |
+
|
72 |
for (var key in data_arr) {
|
73 |
if (data_arr.length) {
|
74 |
if (data_arr[key].length > 1) {
|
150 |
}
|
151 |
hasSaved = !! isSavingMetaBoxes; //isSavingPost != 0;
|
152 |
});
|
153 |
+
});
|
@@ -1 +1 @@
|
|
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()
|
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();if(s&&!t&&!a){if(void 0!==e("#seopress-tabs").attr("data_id"))var i=e("#seopress-tabs").attr("data_id");else if(void 0!==e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id"))i=e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id");if(void 0!==e("#seopress-tabs").attr("data_tax"))var o=e("#seopress-tabs").attr("data_tax");else if(void 0!==e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax"))o=e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax");if(void 0!==e("#seopress-tabs").attr("data_origin"))var p=e("#seopress-tabs").attr("data_origin");else if(void 0!==e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin"))p=e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin");e.ajax({method:"GET",url:seopressAjaxRealPreview.seopress_real_preview,data:{action:"seopress_do_real_preview",post_id:i,tax_name:o,origin:p,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();var i=new RegExp("noindex");i.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})});
|
@@ -1,35 +1,40 @@
|
|
1 |
//GA user consent
|
2 |
-
jQuery(document).ready(function($) {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
35 |
});
|
1 |
//GA user consent
|
2 |
+
jQuery(document).ready(function ($) {
|
3 |
+
if (Cookies.get('seopress-user-consent-close') == undefined && Cookies.get('seopress-user-consent-accept') == undefined) {
|
4 |
+
$('.seopress-user-consent.seopress-user-message').removeClass('seopress-user-consent-hide');
|
5 |
+
$('.seopress-user-consent-backdrop').removeClass('seopress-user-consent-hide');
|
6 |
+
}
|
7 |
+
$('#seopress-user-consent-accept').on('click', function () {
|
8 |
+
$('.seopress-user-consent.seopress-user-message').addClass('seopress-user-consent-hide');
|
9 |
+
$('.seopress-user-consent-backdrop').addClass('seopress-user-consent-hide');
|
10 |
+
$.ajax({
|
11 |
+
method: 'GET',
|
12 |
+
url: seopressAjaxGAUserConsent.seopress_cookies_user_consent,
|
13 |
+
data: {
|
14 |
+
action: 'seopress_cookies_user_consent',
|
15 |
+
_ajax_nonce: seopressAjaxGAUserConsent.seopress_nonce,
|
16 |
+
},
|
17 |
+
success: function (data) {
|
18 |
+
if (data.data) {
|
19 |
+
$('head').append(data.data.gtag_js);
|
20 |
+
$('head').append(data.data.matomo_js);
|
21 |
+
$('head').append(data.data.custom);
|
22 |
+
$('head').append(data.data.head_js);
|
23 |
+
$('body').prepend(data.data.body_js);
|
24 |
+
$('body').append(data.data.footer_js);
|
25 |
+
}
|
26 |
+
Cookies.set('seopress-user-consent-accept', '1', { expires: Number(seopressAjaxGAUserConsent.seopress_cookies_expiration_days) });
|
27 |
+
},
|
28 |
+
});
|
29 |
+
});
|
30 |
+
$('#seopress-user-consent-close').on('click', function () {
|
31 |
+
$('.seopress-user-consent.seopress-user-message').addClass('seopress-user-consent-hide');
|
32 |
+
$('.seopress-user-consent-backdrop').addClass('seopress-user-consent-hide');
|
33 |
+
Cookies.set('seopress-user-consent-close', '1', { expires: Number(seopressAjaxGAUserConsent.seopress_cookies_expiration_days) });
|
34 |
+
Cookies.remove('seopress-user-consent-accept');
|
35 |
+
});
|
36 |
+
$('#seopress-user-consent-edit').on('click', function () {
|
37 |
+
$('.seopress-user-consent.seopress-user-message').removeClass('seopress-user-consent-hide');
|
38 |
+
$('.seopress-user-consent-backdrop').removeClass('seopress-user-consent-hide');
|
39 |
+
});
|
40 |
});
|
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(s){null==Cookies.get("seopress-user-consent-close")&&null==Cookies.get("seopress-user-consent-accept")&&(s(".seopress-user-consent.seopress-user-message").removeClass("seopress-user-consent-hide"),s(".seopress-user-consent-backdrop").removeClass("seopress-user-consent-hide")),s("#seopress-user-consent-accept").on("click",function(){s(".seopress-user-consent.seopress-user-message").addClass("seopress-user-consent-hide"),s(".seopress-user-consent-backdrop").addClass("seopress-user-consent-hide"),s.ajax({method:"GET",url:seopressAjaxGAUserConsent.seopress_cookies_user_consent,data:{action:"seopress_cookies_user_consent",_ajax_nonce:seopressAjaxGAUserConsent.seopress_nonce},success:function(e){e.data&&(s("head").append(e.data.gtag_js),s("head").append(e.data.matomo_js),s("head").append(e.data.custom),s("head").append(e.data.head_js),s("body").prepend(e.data.body_js),s("body").append(e.data.footer_js)),Cookies.set("seopress-user-consent-accept","1",{expires:Number(seopressAjaxGAUserConsent.seopress_cookies_expiration_days)})}})}),s("#seopress-user-consent-close").on("click",function(){s(".seopress-user-consent.seopress-user-message").addClass("seopress-user-consent-hide"),s(".seopress-user-consent-backdrop").addClass("seopress-user-consent-hide"),Cookies.set("seopress-user-consent-close","1",{expires:Number(seopressAjaxGAUserConsent.seopress_cookies_expiration_days)}),Cookies.remove("seopress-user-consent-accept")}),s("#seopress-user-consent-edit").on("click",function(){s(".seopress-user-consent.seopress-user-message").removeClass("seopress-user-consent-hide"),s(".seopress-user-consent-backdrop").removeClass("seopress-user-consent-hide")})});
|
@@ -1,299 +1,337 @@
|
|
1 |
function sp_titles_counters() {
|
2 |
const $ = jQuery;
|
3 |
let elementTitleMeta = $("#seopress_titles_title_meta");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
elementTitleMeta = $(".snippet-title");
|
9 |
-
} else if ($(".snippet-title-default:visible").length > 0) {
|
10 |
-
elementTitleMeta = $(".snippet-title-default");
|
11 |
-
}
|
12 |
-
|
13 |
-
var meta_title_val = elementTitleMeta.val();
|
14 |
-
var meta_title_placeholder = jQuery("#seopress_titles_title_meta").attr(
|
15 |
-
"placeholder"
|
16 |
-
);
|
17 |
-
|
18 |
-
jQuery("#seopress_titles_title_counters").after(
|
19 |
-
'<div id="seopress_titles_title_counters_val">/ 60</div>'
|
20 |
-
),
|
21 |
-
meta_title_val.length > 0
|
22 |
-
? (jQuery("#seopress_titles_title_counters").text(
|
23 |
-
meta_title_val.length
|
24 |
-
),
|
25 |
-
jQuery("#seopress_titles_title_pixel").text(
|
26 |
-
pixelTitle(meta_title_val)
|
27 |
-
))
|
28 |
-
: meta_title_placeholder.length &&
|
29 |
-
(jQuery("#seopress_titles_title_counters").text(
|
30 |
-
meta_title_placeholder.length
|
31 |
-
),
|
32 |
-
jQuery("#seopress_titles_title_pixel").text(
|
33 |
-
pixelTitle(meta_title_placeholder)
|
34 |
-
)),
|
35 |
-
meta_title_val.length > 60
|
36 |
-
? jQuery("#seopress_titles_title_counters").css("color", "red")
|
37 |
-
: meta_title_placeholder.length > 60 &&
|
38 |
-
jQuery("#seopress_titles_title_counters").css("color", "red"),
|
39 |
-
pixelTitle(meta_title_val) > 568
|
40 |
-
? jQuery("#seopress_titles_title_pixel").css("color", "red")
|
41 |
-
: pixelTitle(meta_title_placeholder) > 568 &&
|
42 |
-
jQuery("#seopress_titles_title_pixel").css("color", "red");
|
43 |
-
|
44 |
-
if (meta_title_val.length) {
|
45 |
-
var progress = Math.round((pixelTitle(meta_title_val) / 568) * 100);
|
46 |
-
} else {
|
47 |
-
var progress = Math.round(
|
48 |
-
(pixelTitle(meta_title_placeholder) / 568) * 100
|
49 |
);
|
50 |
-
}
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
),
|
60 |
-
jQuery("#seopress_titles_title_counters_progress").text(progress + "%"),
|
61 |
-
jQuery("#seopress_titles_title_counters_progress").css(
|
62 |
-
"width",
|
63 |
-
progress + "%"
|
64 |
),
|
65 |
-
|
66 |
-
"#
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
jQuery("#seopress_titles_title_counters").css(
|
85 |
"color",
|
86 |
"red"
|
87 |
),
|
88 |
-
|
89 |
jQuery("#seopress_titles_title_pixel").css("color", "red");
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
jQuery("#seopress_titles_title_pixel").css(
|
99 |
"color",
|
100 |
"red"
|
101 |
);
|
102 |
-
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
),
|
143 |
-
jQuery("#seopress_titles_title_counters_progress").text(
|
144 |
-
progress + "%"
|
145 |
),
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
|
153 |
function sp_meta_desc_counters() {
|
154 |
-
|
155 |
-
|
156 |
-
"
|
157 |
-
|
158 |
-
|
159 |
-
jQuery("#seopress_titles_desc_counters").after(
|
160 |
-
'<div id="seopress_titles_desc_counters_val">/ 160</div>'
|
161 |
-
),
|
162 |
-
meta_desc_val.length > 0
|
163 |
-
? (jQuery("#seopress_titles_desc_counters").text(
|
164 |
-
meta_desc_val.length
|
165 |
-
),
|
166 |
-
jQuery("#seopress_titles_desc_pixel").text(
|
167 |
-
pixelDesc(meta_desc_val)
|
168 |
-
))
|
169 |
-
: meta_desc_placeholder.length &&
|
170 |
-
(jQuery("#seopress_titles_desc_counters").text(
|
171 |
-
meta_desc_placeholder.length
|
172 |
-
),
|
173 |
-
jQuery("#seopress_titles_desc_pixel").text(
|
174 |
-
pixelDesc(meta_desc_placeholder)
|
175 |
-
)),
|
176 |
-
meta_desc_val.length > 160
|
177 |
-
? jQuery("#seopress_titles_desc_counters").css("color", "red")
|
178 |
-
: meta_desc_placeholder.length > 160 &&
|
179 |
-
jQuery("#seopress_titles_desc_counters").css("color", "red"),
|
180 |
-
pixelDesc(meta_desc_val) > 940
|
181 |
-
? jQuery("#seopress_titles_desc_pixel").css("color", "red")
|
182 |
-
: pixelDesc(meta_desc_placeholder) > 940 &&
|
183 |
-
jQuery("#seopress_titles_desc_pixel").css("color", "red");
|
184 |
-
|
185 |
-
if (meta_desc_val.length) {
|
186 |
-
var progress = Math.round((pixelDesc(meta_desc_val) / 940) * 100);
|
187 |
-
} else {
|
188 |
-
var progress = Math.round(
|
189 |
-
(pixelDesc(meta_desc_placeholder) / 940) * 100
|
190 |
);
|
191 |
-
}
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
}
|
196 |
-
|
197 |
-
jQuery("#seopress_titles_desc_counters_progress").attr(
|
198 |
-
"aria-valuenow",
|
199 |
-
progress
|
200 |
-
),
|
201 |
-
jQuery("#seopress_titles_desc_counters_progress").text(progress + "%"),
|
202 |
-
jQuery("#seopress_titles_desc_counters_progress").css(
|
203 |
-
"width",
|
204 |
-
progress + "%"
|
205 |
),
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
|
210 |
-
var meta_desc_placeholder = jQuery(
|
211 |
-
"#seopress_titles_desc_meta"
|
212 |
-
).attr("placeholder");
|
213 |
-
|
214 |
-
jQuery("#seopress_titles_desc_counters").css(
|
215 |
-
"color",
|
216 |
-
"inherit"
|
217 |
),
|
218 |
-
jQuery("#seopress_titles_desc_pixel").
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
"color",
|
220 |
"inherit"
|
221 |
),
|
222 |
-
|
|
|
|
|
|
|
|
|
223 |
jQuery("#seopress_titles_desc_counters").css(
|
224 |
"color",
|
225 |
"red"
|
226 |
),
|
227 |
-
|
228 |
jQuery("#seopress_titles_desc_pixel").css(
|
229 |
"color",
|
230 |
"red"
|
231 |
);
|
232 |
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
jQuery("#seopress_titles_desc_pixel").css(
|
241 |
"color",
|
242 |
"red"
|
243 |
);
|
244 |
-
|
245 |
|
246 |
-
meta_desc_val.length > 0
|
247 |
-
? (jQuery("#seopress_titles_desc_counters").text(
|
248 |
-
meta_desc_val.length
|
249 |
-
),
|
250 |
-
jQuery("#seopress_titles_desc_pixel").text(
|
251 |
-
pixelDesc(meta_desc_val)
|
252 |
-
))
|
253 |
-
: meta_desc_placeholder.length &&
|
254 |
-
(jQuery("#seopress_titles_desc_counters").text(
|
255 |
-
meta_desc_placeholder.length
|
256 |
-
),
|
257 |
-
jQuery("#seopress_titles_desc_pixel").text(
|
258 |
-
pixelDesc(meta_desc_placeholder)
|
259 |
-
)),
|
260 |
meta_desc_val.length > 0
|
261 |
-
? (jQuery("
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
if (meta_desc_val.length) {
|
288 |
-
var progress =
|
289 |
-
(pixelDesc(meta_desc_val) / 940) * 100
|
290 |
-
);
|
291 |
} else {
|
292 |
-
var progress =
|
293 |
-
(pixelDesc(meta_desc_placeholder) / 940) * 100
|
294 |
-
);
|
295 |
}
|
296 |
-
|
297 |
if (progress >= 100) {
|
298 |
progress = 100;
|
299 |
}
|
@@ -309,42 +347,8 @@ function sp_meta_desc_counters() {
|
|
309 |
"width",
|
310 |
progress + "%"
|
311 |
);
|
312 |
-
}
|
313 |
-
|
314 |
-
jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function (e) {
|
315 |
-
var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
|
316 |
-
var meta_desc_placeholder = jQuery(
|
317 |
-
"#seopress_titles_desc_meta"
|
318 |
-
).attr("placeholder");
|
319 |
-
|
320 |
-
0 == meta_desc_val.length &&
|
321 |
-
0 == jQuery(".snippet-description-custom").val().length &&
|
322 |
-
(jQuery(".snippet-description-custom").text(e.target.value),
|
323 |
-
jQuery(".snippet-description").css("display", "none"),
|
324 |
-
jQuery(".snippet-description-custom").css("display", "inline"),
|
325 |
-
jQuery(".snippet-description-default").css("display", "none"));
|
326 |
-
|
327 |
-
if (meta_desc_val.length) {
|
328 |
-
var progress = meta_desc_val.length;
|
329 |
-
} else {
|
330 |
-
var progress = meta_desc_placeholder.length;
|
331 |
-
}
|
332 |
-
if (progress >= 100) {
|
333 |
-
progress = 100;
|
334 |
-
}
|
335 |
-
|
336 |
-
jQuery("#seopress_titles_desc_counters_progress").attr(
|
337 |
-
"aria-valuenow",
|
338 |
-
progress
|
339 |
-
),
|
340 |
-
jQuery("#seopress_titles_desc_counters_progress").text(
|
341 |
-
progress + "%"
|
342 |
-
),
|
343 |
-
jQuery("#seopress_titles_desc_counters_progress").css(
|
344 |
-
"width",
|
345 |
-
progress + "%"
|
346 |
-
);
|
347 |
-
});
|
348 |
}
|
349 |
|
350 |
function pixelTitle(e) {
|
@@ -381,251 +385,255 @@ function sp_is_valid_url(string) {
|
|
381 |
}
|
382 |
|
383 |
function sp_social_img(social_slug) {
|
384 |
-
jQuery("
|
385 |
-
|
386 |
-
"#seopress_social_" + social_slug + "_img_meta"
|
387 |
-
).val();
|
388 |
-
|
389 |
-
if (meta_img_val == "") {
|
390 |
var meta_img_val = jQuery(
|
391 |
"#seopress_social_" + social_slug + "_img_meta"
|
392 |
-
).
|
393 |
-
}
|
394 |
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
social_slug +
|
463 |
"-img-alert.alert2"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
).css("display", "block");
|
465 |
-
|
466 |
-
|
467 |
-
pic_real_width / pic_real_height
|
468 |
-
).toFixed(2);
|
469 |
-
jQuery(
|
470 |
-
".snippet-" + social_slug + "-img-alert.alert4"
|
471 |
-
).css("display", "block");
|
472 |
-
jQuery(
|
473 |
-
".snippet-" +
|
474 |
social_slug +
|
475 |
"-img-alert.alert4 span"
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
}
|
487 |
-
} else {
|
488 |
-
jQuery(".snippet-" + social_slug + "-img-alert.alert5").css(
|
489 |
-
"display",
|
490 |
-
"block"
|
491 |
-
);
|
492 |
}
|
493 |
}
|
494 |
|
495 |
function sp_social() {
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
meta_fb_title_val.length > 0
|
503 |
-
? (jQuery(".snippet-fb-title-custom").text(e.target.value),
|
504 |
-
jQuery(".snippet-fb-title").css("display", "none"),
|
505 |
-
jQuery(".snippet-fb-title-custom").css("display", "block"),
|
506 |
-
jQuery(".snippet-fb-title-default").css("display", "none"))
|
507 |
-
: 0 == meta_fb_title_val.length &&
|
508 |
-
(jQuery(".snippet-fb-title-default").css("display", "block"),
|
509 |
-
jQuery(".snippet-fb-title-custom").css("display", "none"),
|
510 |
-
jQuery(".snippet-fb-title").css("display", "none"));
|
511 |
-
});
|
512 |
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
),
|
524 |
-
jQuery(".snippet-fb-description").css("display", "none"),
|
525 |
-
jQuery(".snippet-fb-description-custom").css(
|
526 |
-
"display",
|
527 |
-
"block"
|
528 |
-
),
|
529 |
-
jQuery(".snippet-fb-description-default").css(
|
530 |
-
"display",
|
531 |
-
"none"
|
532 |
-
))
|
533 |
-
: 0 == meta_fb_desc_val.length &&
|
534 |
-
(jQuery(".snippet-fb-description-default").css(
|
535 |
-
"display",
|
536 |
-
"block"
|
537 |
-
),
|
538 |
-
jQuery(".snippet-fb-description-custom").css(
|
539 |
-
"display",
|
540 |
-
"none"
|
541 |
-
),
|
542 |
-
jQuery(".snippet-fb-description").css("display", "none"));
|
543 |
-
}
|
544 |
-
);
|
545 |
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
);
|
553 |
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
jQuery(".snippet-twitter-title-default").css(
|
570 |
-
"display",
|
571 |
-
"none"
|
572 |
-
))
|
573 |
-
: 0 == meta_fb_title_val.length &&
|
574 |
-
(jQuery(".snippet-twitter-title-default").css(
|
575 |
-
"display",
|
576 |
-
"block"
|
577 |
-
),
|
578 |
-
jQuery(".snippet-twitter-title-custom").css(
|
579 |
-
"display",
|
580 |
-
"none"
|
581 |
-
),
|
582 |
-
jQuery(".snippet-twitter-title").css("display", "none"));
|
583 |
-
}
|
584 |
-
);
|
585 |
|
586 |
-
|
587 |
-
"
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
"none"
|
618 |
-
));
|
619 |
-
}
|
620 |
-
);
|
621 |
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
}
|
630 |
|
631 |
//Content Analysis - Toggle
|
@@ -710,14 +718,35 @@ jQuery(document).ready(function (e) {
|
|
710 |
);
|
711 |
});
|
712 |
function s() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
e.ajax({
|
714 |
method: "GET",
|
715 |
url: seopressAjaxRealPreview.seopress_real_preview,
|
716 |
data: {
|
717 |
action: "seopress_do_real_preview",
|
718 |
-
post_id:
|
719 |
-
tax_name:
|
720 |
-
origin:
|
721 |
post_type: e("#seopress_launch_analysis").attr(
|
722 |
"data_post_type"
|
723 |
),
|
1 |
function sp_titles_counters() {
|
2 |
const $ = jQuery;
|
3 |
let elementTitleMeta = $("#seopress_titles_title_meta");
|
4 |
+
if ($("#seopress_titles_title_meta").length) {
|
5 |
+
|
6 |
+
if ($(".snippet-title-custom:visible").length > 0) {
|
7 |
+
elementTitleMeta = $(".snippet-title-custom");
|
8 |
+
} else if ($(".snippet-title:visible").length > 0) {
|
9 |
+
elementTitleMeta = $(".snippet-title");
|
10 |
+
} else if ($(".snippet-title-default:visible").length > 0) {
|
11 |
+
elementTitleMeta = $(".snippet-title-default");
|
12 |
+
}
|
13 |
|
14 |
+
var meta_title_val = elementTitleMeta.val();
|
15 |
+
var meta_title_placeholder = jQuery("#seopress_titles_title_meta").attr(
|
16 |
+
"placeholder"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
);
|
|
|
18 |
|
19 |
+
jQuery("#seopress_titles_title_counters").after(
|
20 |
+
'<div id="seopress_titles_title_counters_val">/ 60</div>'
|
21 |
+
),
|
22 |
+
meta_title_val.length > 0
|
23 |
+
? (jQuery("#seopress_titles_title_counters").text(
|
24 |
+
meta_title_val.length
|
25 |
+
),
|
26 |
+
jQuery("#seopress_titles_title_pixel").text(
|
27 |
+
pixelTitle(meta_title_val)
|
28 |
+
))
|
29 |
+
: meta_title_placeholder.length &&
|
30 |
+
(jQuery("#seopress_titles_title_counters").text(
|
31 |
+
meta_title_placeholder.length
|
32 |
+
),
|
33 |
+
jQuery("#seopress_titles_title_pixel").text(
|
34 |
+
pixelTitle(meta_title_placeholder)
|
35 |
+
)),
|
36 |
+
meta_title_val.length > 60
|
37 |
+
? jQuery("#seopress_titles_title_counters").css("color", "red")
|
38 |
+
: meta_title_placeholder.length > 60 &&
|
39 |
+
jQuery("#seopress_titles_title_counters").css("color", "red"),
|
40 |
+
pixelTitle(meta_title_val) > 568
|
41 |
+
? jQuery("#seopress_titles_title_pixel").css("color", "red")
|
42 |
+
: pixelTitle(meta_title_placeholder) > 568 &&
|
43 |
+
jQuery("#seopress_titles_title_pixel").css("color", "red");
|
44 |
+
|
45 |
+
if (meta_title_val.length) {
|
46 |
+
var progress = Math.round((pixelTitle(meta_title_val) / 568) * 100);
|
47 |
+
} else {
|
48 |
+
var progress = Math.round(
|
49 |
+
(pixelTitle(meta_title_placeholder) / 568) * 100
|
50 |
+
);
|
51 |
+
}
|
52 |
+
|
53 |
+
if (progress >= 100) {
|
54 |
+
progress = 100;
|
55 |
+
}
|
56 |
|
57 |
+
jQuery("#seopress_titles_title_counters_progress").attr(
|
58 |
+
"aria-valuenow",
|
59 |
+
progress
|
|
|
|
|
|
|
|
|
|
|
60 |
),
|
61 |
+
jQuery("#seopress_titles_title_counters_progress").text(progress + "%"),
|
62 |
+
jQuery("#seopress_titles_title_counters_progress").css(
|
63 |
+
"width",
|
64 |
+
progress + "%"
|
65 |
+
),
|
66 |
+
jQuery(
|
67 |
+
"#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep"
|
68 |
+
).on("keyup paste change click", function (e) {
|
69 |
+
var meta_title_val = $("#seopress_titles_title_meta").val();
|
70 |
+
if ($(".snippet-title-custom:visible").length > 0) {
|
71 |
+
meta_title_val = $(".snippet-title-custom").text();
|
72 |
+
} else if ($(".snippet-title:visible").length > 0) {
|
73 |
+
meta_title_val = $(".snippet-title").text();
|
74 |
+
} else if ($(".snippet-title-default:visible").length > 0) {
|
75 |
+
meta_title_val = $(".snippet-title-default").text();
|
76 |
+
}
|
77 |
|
78 |
+
var meta_title_placeholder = jQuery(
|
79 |
+
"#seopress_titles_title_meta"
|
80 |
+
).attr("placeholder");
|
81 |
|
82 |
+
jQuery("#seopress_titles_title_counters").css("color", "inherit"),
|
83 |
+
jQuery("#seopress_titles_title_pixel").css("color", "inherit"),
|
84 |
+
meta_title_val.length > 60 &&
|
85 |
jQuery("#seopress_titles_title_counters").css(
|
86 |
"color",
|
87 |
"red"
|
88 |
),
|
89 |
+
pixelTitle(meta_title_val) > 568 &&
|
90 |
jQuery("#seopress_titles_title_pixel").css("color", "red");
|
91 |
|
92 |
+
if (meta_title_val.length == 0) {
|
93 |
+
meta_title_placeholder.length > 60 &&
|
94 |
+
jQuery("#seopress_titles_title_counters").css(
|
95 |
+
"color",
|
96 |
+
"red"
|
97 |
+
),
|
98 |
+
pixelTitle(meta_title_placeholder) > 568 &&
|
99 |
jQuery("#seopress_titles_title_pixel").css(
|
100 |
"color",
|
101 |
"red"
|
102 |
);
|
103 |
+
}
|
104 |
|
105 |
+
meta_title_val.length > 0
|
106 |
+
? (jQuery("#seopress_titles_title_counters").text(
|
107 |
+
meta_title_val.length
|
108 |
+
),
|
109 |
+
jQuery("#seopress_titles_title_pixel").text(
|
110 |
+
pixelTitle(meta_title_val)
|
111 |
+
))
|
112 |
+
: meta_title_placeholder.length &&
|
113 |
+
(jQuery("#seopress_titles_title_counters").text(
|
114 |
+
meta_title_placeholder.length
|
115 |
+
),
|
116 |
+
jQuery("#seopress_titles_title_pixel").text(
|
117 |
+
pixelTitle(meta_title_placeholder)
|
118 |
+
));
|
119 |
+
// meta_title_val.length > 0
|
120 |
+
// ? (jQuery(".snippet-title").css("display", "none"),
|
121 |
+
// jQuery(".snippet-title-default").css("display", "none"))
|
122 |
+
// : 0 == meta_title_val.length &&
|
123 |
+
// (jQuery(".snippet-title-default").css("display", "block"),
|
124 |
+
// jQuery(".snippet-title").css("display", "none"));
|
125 |
+
|
126 |
+
if (meta_title_val.length) {
|
127 |
+
var progress = Math.round(
|
128 |
+
(pixelTitle(meta_title_val) / 568) * 100
|
129 |
+
);
|
130 |
+
} else {
|
131 |
+
var progress = Math.round(
|
132 |
+
(pixelTitle(meta_title_placeholder) / 568) * 100
|
133 |
+
);
|
134 |
+
}
|
135 |
|
136 |
+
if (progress >= 100) {
|
137 |
+
progress = 100;
|
138 |
+
}
|
139 |
|
140 |
+
jQuery("#seopress_titles_title_counters_progress").attr(
|
141 |
+
"aria-valuenow",
|
142 |
+
progress
|
|
|
|
|
|
|
143 |
),
|
144 |
+
jQuery("#seopress_titles_title_counters_progress").text(
|
145 |
+
progress + "%"
|
146 |
+
),
|
147 |
+
jQuery("#seopress_titles_title_counters_progress").css(
|
148 |
+
"width",
|
149 |
+
progress + "%"
|
150 |
+
);
|
151 |
+
});
|
152 |
+
}
|
153 |
}
|
154 |
|
155 |
function sp_meta_desc_counters() {
|
156 |
+
if (jQuery("#seopress_titles_desc_meta").length) {
|
157 |
+
var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
|
158 |
+
var meta_desc_placeholder = jQuery("#seopress_titles_desc_meta").attr(
|
159 |
+
"placeholder"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
);
|
|
|
161 |
|
162 |
+
jQuery("#seopress_titles_desc_counters").after(
|
163 |
+
'<div id="seopress_titles_desc_counters_val">/ 160</div>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
),
|
165 |
+
meta_desc_val.length > 0
|
166 |
+
? (jQuery("#seopress_titles_desc_counters").text(
|
167 |
+
meta_desc_val.length
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
),
|
169 |
+
jQuery("#seopress_titles_desc_pixel").text(
|
170 |
+
pixelDesc(meta_desc_val)
|
171 |
+
))
|
172 |
+
: meta_desc_placeholder.length &&
|
173 |
+
(jQuery("#seopress_titles_desc_counters").text(
|
174 |
+
meta_desc_placeholder.length
|
175 |
+
),
|
176 |
+
jQuery("#seopress_titles_desc_pixel").text(
|
177 |
+
pixelDesc(meta_desc_placeholder)
|
178 |
+
)),
|
179 |
+
meta_desc_val.length > 160
|
180 |
+
? jQuery("#seopress_titles_desc_counters").css("color", "red")
|
181 |
+
: meta_desc_placeholder.length > 160 &&
|
182 |
+
jQuery("#seopress_titles_desc_counters").css("color", "red"),
|
183 |
+
pixelDesc(meta_desc_val) > 940
|
184 |
+
? jQuery("#seopress_titles_desc_pixel").css("color", "red")
|
185 |
+
: pixelDesc(meta_desc_placeholder) > 940 &&
|
186 |
+
jQuery("#seopress_titles_desc_pixel").css("color", "red");
|
187 |
+
|
188 |
+
if (meta_desc_val.length) {
|
189 |
+
var progress = Math.round((pixelDesc(meta_desc_val) / 940) * 100);
|
190 |
+
} else {
|
191 |
+
var progress = Math.round(
|
192 |
+
(pixelDesc(meta_desc_placeholder) / 940) * 100
|
193 |
+
);
|
194 |
+
}
|
195 |
+
|
196 |
+
if (progress >= 100) {
|
197 |
+
progress = 100;
|
198 |
+
}
|
199 |
+
|
200 |
+
jQuery("#seopress_titles_desc_counters_progress").attr(
|
201 |
+
"aria-valuenow",
|
202 |
+
progress
|
203 |
+
),
|
204 |
+
jQuery("#seopress_titles_desc_counters_progress").text(progress + "%"),
|
205 |
+
jQuery("#seopress_titles_desc_counters_progress").css(
|
206 |
+
"width",
|
207 |
+
progress + "%"
|
208 |
+
),
|
209 |
+
jQuery("#seopress_titles_desc_meta, #seopress-tag-single-excerpt").on(
|
210 |
+
"keyup paste change click",
|
211 |
+
function (e) {
|
212 |
+
var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
|
213 |
+
var meta_desc_placeholder = jQuery(
|
214 |
+
"#seopress_titles_desc_meta"
|
215 |
+
).attr("placeholder");
|
216 |
+
|
217 |
+
jQuery("#seopress_titles_desc_counters").css(
|
218 |
"color",
|
219 |
"inherit"
|
220 |
),
|
221 |
+
jQuery("#seopress_titles_desc_pixel").css(
|
222 |
+
"color",
|
223 |
+
"inherit"
|
224 |
+
),
|
225 |
+
meta_desc_val.length > 160 &&
|
226 |
jQuery("#seopress_titles_desc_counters").css(
|
227 |
"color",
|
228 |
"red"
|
229 |
),
|
230 |
+
pixelDesc(meta_desc_val) > 940 &&
|
231 |
jQuery("#seopress_titles_desc_pixel").css(
|
232 |
"color",
|
233 |
"red"
|
234 |
);
|
235 |
|
236 |
+
if (meta_desc_val.length == 0) {
|
237 |
+
meta_desc_placeholder.length > 160 &&
|
238 |
+
jQuery("#seopress_titles_desc_counters").css(
|
239 |
+
"color",
|
240 |
+
"red"
|
241 |
+
),
|
242 |
+
pixelDesc(meta_desc_placeholder) > 940 &&
|
243 |
jQuery("#seopress_titles_desc_pixel").css(
|
244 |
"color",
|
245 |
"red"
|
246 |
);
|
247 |
+
}
|
248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
meta_desc_val.length > 0
|
250 |
+
? (jQuery("#seopress_titles_desc_counters").text(
|
251 |
+
meta_desc_val.length
|
252 |
+
),
|
253 |
+
jQuery("#seopress_titles_desc_pixel").text(
|
254 |
+
pixelDesc(meta_desc_val)
|
255 |
+
))
|
256 |
+
: meta_desc_placeholder.length &&
|
257 |
+
(jQuery("#seopress_titles_desc_counters").text(
|
258 |
+
meta_desc_placeholder.length
|
259 |
+
),
|
260 |
+
jQuery("#seopress_titles_desc_pixel").text(
|
261 |
+
pixelDesc(meta_desc_placeholder)
|
262 |
+
)),
|
263 |
+
meta_desc_val.length > 0
|
264 |
+
? (jQuery(".snippet-description-custom").text(
|
265 |
+
e.target.value
|
266 |
+
),
|
267 |
+
jQuery(".snippet-description").css("display", "none"),
|
268 |
+
jQuery(".snippet-description-custom").css(
|
269 |
+
"display",
|
270 |
+
"inline"
|
271 |
+
),
|
272 |
+
jQuery(".snippet-description-default").css(
|
273 |
+
"display",
|
274 |
+
"none"
|
275 |
+
))
|
276 |
+
: 0 == meta_desc_val.length &&
|
277 |
+
(jQuery(".snippet-description-default").css(
|
278 |
+
"display",
|
279 |
+
"inline"
|
280 |
+
),
|
281 |
+
jQuery(".snippet-description-custom").css(
|
282 |
+
"display",
|
283 |
+
"none"
|
284 |
+
),
|
285 |
+
jQuery(".snippet-description").css(
|
286 |
+
"display",
|
287 |
+
"none"
|
288 |
+
));
|
289 |
+
|
290 |
+
if (meta_desc_val.length) {
|
291 |
+
var progress = Math.round(
|
292 |
+
(pixelDesc(meta_desc_val) / 940) * 100
|
293 |
+
);
|
294 |
+
} else {
|
295 |
+
var progress = Math.round(
|
296 |
+
(pixelDesc(meta_desc_placeholder) / 940) * 100
|
297 |
+
);
|
298 |
+
}
|
299 |
+
|
300 |
+
if (progress >= 100) {
|
301 |
+
progress = 100;
|
302 |
+
}
|
303 |
+
|
304 |
+
jQuery("#seopress_titles_desc_counters_progress").attr(
|
305 |
+
"aria-valuenow",
|
306 |
+
progress
|
307 |
+
),
|
308 |
+
jQuery("#seopress_titles_desc_counters_progress").text(
|
309 |
+
progress + "%"
|
310 |
+
),
|
311 |
+
jQuery("#seopress_titles_desc_counters_progress").css(
|
312 |
+
"width",
|
313 |
+
progress + "%"
|
314 |
+
);
|
315 |
+
}
|
316 |
+
),
|
317 |
+
jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function (e) {
|
318 |
+
var meta_desc_val = jQuery("#seopress_titles_desc_meta").val();
|
319 |
+
var meta_desc_placeholder = jQuery(
|
320 |
+
"#seopress_titles_desc_meta"
|
321 |
+
).attr("placeholder");
|
322 |
+
|
323 |
+
0 == meta_desc_val.length &&
|
324 |
+
0 == jQuery(".snippet-description-custom").val().length &&
|
325 |
+
(jQuery(".snippet-description-custom").text(e.target.value),
|
326 |
+
jQuery(".snippet-description").css("display", "none"),
|
327 |
+
jQuery(".snippet-description-custom").css("display", "inline"),
|
328 |
+
jQuery(".snippet-description-default").css("display", "none"));
|
329 |
|
330 |
if (meta_desc_val.length) {
|
331 |
+
var progress = meta_desc_val.length;
|
|
|
|
|
332 |
} else {
|
333 |
+
var progress = meta_desc_placeholder.length;
|
|
|
|
|
334 |
}
|
|
|
335 |
if (progress >= 100) {
|
336 |
progress = 100;
|
337 |
}
|
347 |
"width",
|
348 |
progress + "%"
|
349 |
);
|
350 |
+
});
|
351 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
}
|
353 |
|
354 |
function pixelTitle(e) {
|
385 |
}
|
386 |
|
387 |
function sp_social_img(social_slug) {
|
388 |
+
if (jQuery("#seopress_social_fb_title_meta").length) {
|
389 |
+
jQuery(".snippet-" + social_slug + "-img-alert").css("display", "none");
|
|
|
|
|
|
|
|
|
390 |
var meta_img_val = jQuery(
|
391 |
"#seopress_social_" + social_slug + "_img_meta"
|
392 |
+
).val();
|
|
|
393 |
|
394 |
+
if (meta_img_val == "") {
|
395 |
+
var meta_img_val = jQuery(
|
396 |
+
"#seopress_social_" + social_slug + "_img_meta"
|
397 |
+
).attr("placeholder");
|
398 |
+
}
|
399 |
+
|
400 |
+
// Check valid URL
|
401 |
+
if (sp_is_valid_url(meta_img_val) === true) {
|
402 |
+
meta_img_val.length > 0
|
403 |
+
? (jQuery(".snippet-" + social_slug + "-img-custom img").attr(
|
404 |
+
"src",
|
405 |
+
meta_img_val
|
406 |
+
),
|
407 |
+
jQuery(".snippet-" + social_slug + "-img").css("display", "none"),
|
408 |
+
jQuery(".snippet-" + social_slug + "-img-custom").css(
|
409 |
+
"display",
|
410 |
+
"block"
|
411 |
+
),
|
412 |
+
jQuery(".snippet-" + social_slug + "-img-default").css(
|
413 |
+
"display",
|
414 |
+
"none"
|
415 |
+
))
|
416 |
+
: 0 == meta_img_val.length &&
|
417 |
+
(jQuery(".snippet-" + social_slug + "-img-default").css(
|
418 |
+
"display",
|
419 |
+
"block"
|
420 |
+
),
|
421 |
+
jQuery(".snippet-" + social_slug + "-img-custom").css(
|
422 |
+
"display",
|
423 |
+
"none"
|
424 |
+
),
|
425 |
+
jQuery(".snippet-" + social_slug + "-img").css(
|
426 |
+
"display",
|
427 |
+
"none"
|
428 |
+
));
|
429 |
+
|
430 |
+
if (meta_img_val.length > 0) {
|
431 |
+
// Check file URL
|
432 |
+
jQuery
|
433 |
+
.get(meta_img_val)
|
434 |
+
.done(function () {
|
435 |
+
// Extract filetype
|
436 |
+
var meta_img_filetype = meta_img_val
|
437 |
+
.split(/\#|\?/)[0]
|
438 |
+
.split(".")
|
439 |
+
.pop()
|
440 |
+
.trim();
|
441 |
+
var types = ["jpg", "jpeg", "gif", "png"];
|
442 |
+
|
443 |
+
if (types.indexOf(meta_img_filetype) == -1) {
|
444 |
+
jQuery(
|
445 |
+
".snippet-" + social_slug + "-img-alert.alert1"
|
446 |
+
).css("display", "block");
|
447 |
+
} else {
|
448 |
+
// Extract image size
|
449 |
+
var tmp_img = new Image();
|
450 |
+
tmp_img.src = meta_img_val;
|
451 |
+
jQuery(tmp_img).one("load", function () {
|
452 |
+
pic_real_width = parseInt(tmp_img.width);
|
453 |
+
pic_real_height = parseInt(tmp_img.height);
|
454 |
+
|
455 |
+
// Default minimum size
|
456 |
+
if (social_slug == "fb") {
|
457 |
+
(min_width = 200), (min_height = 200);
|
458 |
+
} else {
|
459 |
+
(min_width = 144), (min_height = 144);
|
460 |
+
}
|
461 |
+
if (
|
462 |
+
pic_real_width < min_width ||
|
463 |
+
pic_real_height < min_height
|
464 |
+
) {
|
465 |
+
jQuery(
|
466 |
+
".snippet-" +
|
467 |
social_slug +
|
468 |
"-img-alert.alert2"
|
469 |
+
).css("display", "block");
|
470 |
+
}
|
471 |
+
ratio_img = (
|
472 |
+
pic_real_width / pic_real_height
|
473 |
+
).toFixed(2);
|
474 |
+
jQuery(
|
475 |
+
".snippet-" + social_slug + "-img-alert.alert4"
|
476 |
).css("display", "block");
|
477 |
+
jQuery(
|
478 |
+
".snippet-" +
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
social_slug +
|
480 |
"-img-alert.alert4 span"
|
481 |
+
).text(ratio_img);
|
482 |
+
});
|
483 |
+
}
|
484 |
+
})
|
485 |
+
.fail(function () {
|
486 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert3").css(
|
487 |
+
"display",
|
488 |
+
"block"
|
489 |
+
);
|
490 |
+
});
|
491 |
+
}
|
492 |
+
} else {
|
493 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert5").css(
|
494 |
+
"display",
|
495 |
+
"block"
|
496 |
+
);
|
497 |
}
|
|
|
|
|
|
|
|
|
|
|
498 |
}
|
499 |
}
|
500 |
|
501 |
function sp_social() {
|
502 |
+
if (jQuery("#seopress_social_fb_title_meta").length) {
|
503 |
+
// FACEBOOK
|
504 |
+
jQuery(
|
505 |
+
"#seopress_social_fb_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep"
|
506 |
+
).on("keyup paste change click", function (e) {
|
507 |
+
var meta_fb_title_val = jQuery("#seopress_social_fb_title_meta").val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
|
509 |
+
meta_fb_title_val.length > 0
|
510 |
+
? (jQuery(".snippet-fb-title-custom").text(e.target.value),
|
511 |
+
jQuery(".snippet-fb-title").css("display", "none"),
|
512 |
+
jQuery(".snippet-fb-title-custom").css("display", "block"),
|
513 |
+
jQuery(".snippet-fb-title-default").css("display", "none"))
|
514 |
+
: 0 == meta_fb_title_val.length &&
|
515 |
+
(jQuery(".snippet-fb-title-default").css("display", "block"),
|
516 |
+
jQuery(".snippet-fb-title-custom").css("display", "none"),
|
517 |
+
jQuery(".snippet-fb-title").css("display", "none"));
|
518 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
|
520 |
+
jQuery("#seopress_social_fb_desc_meta").on(
|
521 |
+
"keyup paste change click",
|
522 |
+
function (e) {
|
523 |
+
var meta_fb_desc_val = jQuery(
|
524 |
+
"#seopress_social_fb_desc_meta"
|
525 |
+
).val();
|
|
|
526 |
|
527 |
+
meta_fb_desc_val.length > 0
|
528 |
+
? (jQuery(".snippet-fb-description-custom").text(
|
529 |
+
e.target.value
|
530 |
+
),
|
531 |
+
jQuery(".snippet-fb-description").css("display", "none"),
|
532 |
+
jQuery(".snippet-fb-description-custom").css(
|
533 |
+
"display",
|
534 |
+
"block"
|
535 |
+
),
|
536 |
+
jQuery(".snippet-fb-description-default").css(
|
537 |
+
"display",
|
538 |
+
"none"
|
539 |
+
))
|
540 |
+
: 0 == meta_fb_desc_val.length &&
|
541 |
+
(jQuery(".snippet-fb-description-default").css(
|
542 |
+
"display",
|
543 |
+
"block"
|
544 |
+
),
|
545 |
+
jQuery(".snippet-fb-description-custom").css(
|
546 |
+
"display",
|
547 |
+
"none"
|
548 |
+
),
|
549 |
+
jQuery(".snippet-fb-description").css("display", "none"));
|
550 |
+
}
|
551 |
+
);
|
552 |
|
553 |
+
sp_social_img("fb");
|
554 |
+
jQuery("#seopress_social_fb_img_meta").on(
|
555 |
+
"keyup paste change click",
|
556 |
+
function () {
|
557 |
+
sp_social_img("fb");
|
558 |
+
}
|
559 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
|
561 |
+
// TWITTER
|
562 |
+
jQuery("#seopress_social_twitter_title_meta").on(
|
563 |
+
"keyup paste change click",
|
564 |
+
function (e) {
|
565 |
+
var meta_fb_title_val = jQuery(
|
566 |
+
"#seopress_social_twitter_title_meta"
|
567 |
+
).val();
|
568 |
+
|
569 |
+
meta_fb_title_val.length > 0
|
570 |
+
? (jQuery(".snippet-twitter-title-custom").text(e.target.value),
|
571 |
+
jQuery(".snippet-twitter-title").css("display", "none"),
|
572 |
+
jQuery(".snippet-twitter-title-custom").css(
|
573 |
+
"display",
|
574 |
+
"block"
|
575 |
+
),
|
576 |
+
jQuery(".snippet-twitter-title-default").css(
|
577 |
+
"display",
|
578 |
+
"none"
|
579 |
+
))
|
580 |
+
: 0 == meta_fb_title_val.length &&
|
581 |
+
(jQuery(".snippet-twitter-title-default").css(
|
582 |
+
"display",
|
583 |
+
"block"
|
584 |
+
),
|
585 |
+
jQuery(".snippet-twitter-title-custom").css(
|
586 |
+
"display",
|
587 |
+
"none"
|
588 |
+
),
|
589 |
+
jQuery(".snippet-twitter-title").css("display", "none"));
|
590 |
+
}
|
591 |
+
);
|
|
|
|
|
|
|
|
|
592 |
|
593 |
+
jQuery("#seopress_social_twitter_desc_meta").on(
|
594 |
+
"keyup paste change click",
|
595 |
+
function (e) {
|
596 |
+
var meta_fb_desc_val = jQuery(
|
597 |
+
"#seopress_social_twitter_desc_meta"
|
598 |
+
).val();
|
599 |
+
|
600 |
+
meta_fb_desc_val.length > 0
|
601 |
+
? (jQuery(".snippet-twitter-description-custom").text(
|
602 |
+
e.target.value
|
603 |
+
),
|
604 |
+
jQuery(".snippet-twitter-description").css("display", "none"),
|
605 |
+
jQuery(".snippet-twitter-description-custom").css(
|
606 |
+
"display",
|
607 |
+
"block"
|
608 |
+
),
|
609 |
+
jQuery(".snippet-twitter-description-default").css(
|
610 |
+
"display",
|
611 |
+
"none"
|
612 |
+
))
|
613 |
+
: 0 == meta_fb_desc_val.length &&
|
614 |
+
(jQuery(".snippet-twitter-description-default").css(
|
615 |
+
"display",
|
616 |
+
"block"
|
617 |
+
),
|
618 |
+
jQuery(".snippet-twitter-description-custom").css(
|
619 |
+
"display",
|
620 |
+
"none"
|
621 |
+
),
|
622 |
+
jQuery(".snippet-twitter-description").css(
|
623 |
+
"display",
|
624 |
+
"none"
|
625 |
+
));
|
626 |
+
}
|
627 |
+
);
|
628 |
+
|
629 |
+
sp_social_img("twitter");
|
630 |
+
jQuery("#seopress_social_twitter_img_meta").on(
|
631 |
+
"keyup paste change click",
|
632 |
+
function () {
|
633 |
+
sp_social_img("twitter");
|
634 |
+
}
|
635 |
+
);
|
636 |
+
}
|
637 |
}
|
638 |
|
639 |
//Content Analysis - Toggle
|
718 |
);
|
719 |
});
|
720 |
function s() {
|
721 |
+
//Post ID
|
722 |
+
if (typeof e("#seopress-tabs").attr("data_id") !== "undefined") {
|
723 |
+
var post_id = e("#seopress-tabs").attr("data_id");
|
724 |
+
} else if (typeof e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id") !== "undefined") {
|
725 |
+
var post_id = e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id")
|
726 |
+
}
|
727 |
+
|
728 |
+
//Tax origin
|
729 |
+
if (typeof e("#seopress-tabs").attr("data_tax") !== "undefined") {
|
730 |
+
var tax_name = e("#seopress-tabs").attr("data_tax");
|
731 |
+
} else if (typeof e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax") !== "undefined") {
|
732 |
+
var tax_name = e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax")
|
733 |
+
}
|
734 |
+
|
735 |
+
//Origin
|
736 |
+
if (typeof e("#seopress-tabs").attr("data_origin") !== "undefined") {
|
737 |
+
var origin = e("#seopress-tabs").attr("data_origin");
|
738 |
+
} else if (typeof e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin") !== "undefined") {
|
739 |
+
var origin = e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin")
|
740 |
+
}
|
741 |
+
|
742 |
e.ajax({
|
743 |
method: "GET",
|
744 |
url: seopressAjaxRealPreview.seopress_real_preview,
|
745 |
data: {
|
746 |
action: "seopress_do_real_preview",
|
747 |
+
post_id: post_id,
|
748 |
+
tax_name: tax_name,
|
749 |
+
origin: origin,
|
750 |
post_type: e("#seopress_launch_analysis").attr(
|
751 |
"data_post_type"
|
752 |
),
|
@@ -1 +1 @@
|
|
1 |
-
function sp_titles_counters(){const e=jQuery;let t=e("#seopress_titles_title_meta");e(".snippet-title-custom:visible").length>0?t=e(".snippet-title-custom"):e(".snippet-title:visible").length>0?t=e(".snippet-title"):e(".snippet-title-default:visible").length>0&&(t=e(".snippet-title-default"));var s=t.val(),i=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),s.length>0?(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))):i.length&&(jQuery("#seopress_titles_title_counters").text(i.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(i))),s.length>60?jQuery("#seopress_titles_title_counters").css("color","red"):i.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(i)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),s.length)var r=Math.round(pixelTitle(s)/568*100);else r=Math.round(pixelTitle(i)/568*100);r>=100&&(r=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",r),jQuery("#seopress_titles_title_counters_progress").text(r+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",r+"%"),jQuery("#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(t){var s=e("#seopress_titles_title_meta").val();e(".snippet-title-custom:visible").length>0?s=e(".snippet-title-custom").text():e(".snippet-title:visible").length>0?s=e(".snippet-title").text():e(".snippet-title-default:visible").length>0&&(s=e(".snippet-title-default").text());var i=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),s.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),0==s.length&&(i.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(i)>568&&jQuery("#seopress_titles_title_pixel").css("color","red")),s.length>0?(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))):i.length&&(jQuery("#seopress_titles_title_counters").text(i.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(i))),s.length)var r=Math.round(pixelTitle(s)/568*100);else r=Math.round(pixelTitle(i)/568*100);r>=100&&(r=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",r),jQuery("#seopress_titles_title_counters_progress").text(r+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",r+"%")})}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){var t=e.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);return null!==t}function sp_social_img(e){jQuery(".snippet-"+e+"-img-alert").css("display","none");var t=jQuery("#seopress_social_"+e+"_img_meta").val();if(""==t)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(),i=["jpg","jpeg","gif","png"];if(-1==i.indexOf(s))jQuery(".snippet-"+e+"-img-alert.alert1").css("display","block");else{var r=new Image;r.src=t,jQuery(r).one("load",function(){pic_real_width=parseInt(r.width),pic_real_height=parseInt(r.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()})}function seopress_google_suggest(e){var t,s=String(e),i=s.split(",");for(t=0;t<i.length;t++)null!=i[t]&&null!=i[t]&&""!=i[t]&&"[object Object]"!=i[t]&&(document.getElementById("seopress_suggestions").innerHTML+='<li><a href="#" class="sp-suggest-btn button button-small">'+i[t]+"</a></li>");jQuery(".sp-suggest-btn").click(function(e){e.preventDefault(),target_kw.addTags(jQuery(this).text())})}var input=document.querySelector("input[id=seopress_analysis_target_kw_meta]"),target_kw=new Tagify(input,{originalInputValueFormat:e=>e.map(e=>e.value).join(",")});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();var r=new RegExp("noindex");r.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()});
|
1 |
+
function sp_titles_counters(){const e=jQuery;let t=e("#seopress_titles_title_meta");if(e("#seopress_titles_title_meta").length){e(".snippet-title-custom:visible").length>0?t=e(".snippet-title-custom"):e(".snippet-title:visible").length>0?t=e(".snippet-title"):e(".snippet-title-default:visible").length>0&&(t=e(".snippet-title-default"));var s=t.val(),i=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),s.length>0?(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))):i.length&&(jQuery("#seopress_titles_title_counters").text(i.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(i))),s.length>60?jQuery("#seopress_titles_title_counters").css("color","red"):i.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(i)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),s.length)var r=Math.round(pixelTitle(s)/568*100);else r=Math.round(pixelTitle(i)/568*100);r>=100&&(r=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",r),jQuery("#seopress_titles_title_counters_progress").text(r+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",r+"%"),jQuery("#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(t){var s=e("#seopress_titles_title_meta").val();e(".snippet-title-custom:visible").length>0?s=e(".snippet-title-custom").text():e(".snippet-title:visible").length>0?s=e(".snippet-title").text():e(".snippet-title-default:visible").length>0&&(s=e(".snippet-title-default").text());var i=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),s.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),0==s.length&&(i.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(i)>568&&jQuery("#seopress_titles_title_pixel").css("color","red")),s.length>0?(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))):i.length&&(jQuery("#seopress_titles_title_counters").text(i.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(i))),s.length)var r=Math.round(pixelTitle(s)/568*100);else r=Math.round(pixelTitle(i)/568*100);r>=100&&(r=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",r),jQuery("#seopress_titles_title_counters_progress").text(r+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",r+"%")})}}function sp_meta_desc_counters(){if(jQuery("#seopress_titles_desc_meta").length){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){var t=e.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);return null!==t}function sp_social_img(e){if(jQuery("#seopress_social_fb_title_meta").length){jQuery(".snippet-"+e+"-img-alert").css("display","none");var t=jQuery("#seopress_social_"+e+"_img_meta").val();if(""==t)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(),i=["jpg","jpeg","gif","png"];if(-1==i.indexOf(s))jQuery(".snippet-"+e+"-img-alert.alert1").css("display","block");else{var r=new Image;r.src=t,jQuery(r).one("load",function(){pic_real_width=parseInt(r.width),pic_real_height=parseInt(r.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").length&&(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()})}function seopress_google_suggest(e){var t,s=String(e),i=s.split(",");for(t=0;t<i.length;t++)null!=i[t]&&null!=i[t]&&""!=i[t]&&"[object Object]"!=i[t]&&(document.getElementById("seopress_suggestions").innerHTML+='<li><a href="#" class="sp-suggest-btn button button-small">'+i[t]+"</a></li>");jQuery(".sp-suggest-btn").click(function(e){e.preventDefault(),target_kw.addTags(jQuery(this).text())})}var input=document.querySelector("input[id=seopress_analysis_target_kw_meta]"),target_kw=new Tagify(input,{originalInputValueFormat:e=>e.map(e=>e.value).join(",")});jQuery(document).ready(function(e){function t(){if(void 0!==e("#seopress-tabs").attr("data_id"))var t=e("#seopress-tabs").attr("data_id");else if(void 0!==e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id"))t=e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_id");if(void 0!==e("#seopress-tabs").attr("data_tax"))var s=e("#seopress-tabs").attr("data_tax");else if(void 0!==e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax"))s=e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_tax");if(void 0!==e("#seopress-tabs").attr("data_origin"))var i=e("#seopress-tabs").attr("data_origin");else if(void 0!==e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin"))i=e("#seopress_content_analysis .wrap-seopress-analysis").attr("data_origin");e.ajax({method:"GET",url:seopressAjaxRealPreview.seopress_real_preview,data:{action:"seopress_do_real_preview",post_id:t,tax_name:s,origin:i,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();var r=new RegExp("noindex");r.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()});
|
@@ -1,125 +1,233 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
$('#seopress-'+item+'-migrate').on('click', function() {
|
119 |
-
$(this).attr("disabled", "disabled");
|
120 |
-
$( '#'+item+'-migration-tool .spinner' ).css( "visibility", "visible" );
|
121 |
-
$( '#'+item+'-migration-tool .spinner' ).css( "float", "none" );
|
122 |
-
$( '#'+item+'-migration-tool .log' ).html('');
|
123 |
-
});
|
124 |
-
});
|
125 |
-
});
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
//Select toggle
|
3 |
+
$("#select-wizard-redirects, #select-wizard-import")
|
4 |
+
.change(function (e) {
|
5 |
+
e.preventDefault();
|
6 |
|
7 |
+
var select = $(this).val();
|
8 |
+
if (select == "none") {
|
9 |
+
$(
|
10 |
+
"#select-wizard-redirects option, #select-wizard-import option"
|
11 |
+
).each(function () {
|
12 |
+
var ids_to_hide = $(this).val();
|
13 |
+
$("#" + ids_to_hide).hide();
|
14 |
+
});
|
15 |
+
} else {
|
16 |
+
$(
|
17 |
+
"#select-wizard-redirects option:selected, #select-wizard-import option:selected"
|
18 |
+
).each(function () {
|
19 |
+
var ids_to_show = $(this).val();
|
20 |
+
$("#" + ids_to_show).show();
|
21 |
+
});
|
22 |
+
$(
|
23 |
+
"#select-wizard-redirects option:not(:selected), #select-wizard-import option:not(:selected)"
|
24 |
+
).each(function () {
|
25 |
+
var ids_to_hide = $(this).val();
|
26 |
+
$("#" + ids_to_hide).hide();
|
27 |
+
});
|
28 |
+
}
|
29 |
+
})
|
30 |
+
.trigger("change");
|
31 |
|
32 |
+
//Import from SEO plugins
|
33 |
+
const seo_plugins = [
|
34 |
+
"yoast",
|
35 |
+
"aio",
|
36 |
+
"seo-framework",
|
37 |
+
"rk",
|
38 |
+
"squirrly",
|
39 |
+
"seo-ultimate",
|
40 |
+
"wp-meta-seo",
|
41 |
+
"premium-seo-pack",
|
42 |
+
"wpseo",
|
43 |
+
"platinum-seo",
|
44 |
+
"smartcrawl",
|
45 |
+
"seopressor",
|
46 |
+
"metadata",
|
47 |
+
];
|
48 |
+
seo_plugins.forEach(function (item) {
|
49 |
+
$("#seopress-" + item + "-migrate").on("click", function (e) {
|
50 |
+
e.preventDefault();
|
51 |
+
id = item;
|
52 |
+
switch (e.target.id) {
|
53 |
+
case "seopress-yoast-migrate":
|
54 |
+
url =
|
55 |
+
seopressAjaxMigrate.seopress_yoast_migrate
|
56 |
+
.seopress_yoast_migration;
|
57 |
+
action = "seopress_yoast_migration";
|
58 |
+
_ajax_nonce =
|
59 |
+
seopressAjaxMigrate.seopress_yoast_migrate
|
60 |
+
.seopress_nonce;
|
61 |
+
break;
|
62 |
+
case "seopress-aio-migrate":
|
63 |
+
url =
|
64 |
+
seopressAjaxMigrate.seopress_aio_migrate
|
65 |
+
.seopress_aio_migration;
|
66 |
+
action = "seopress_aio_migration";
|
67 |
+
_ajax_nonce =
|
68 |
+
seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce;
|
69 |
+
break;
|
70 |
+
case "seopress-seo-framework-migrate":
|
71 |
+
url =
|
72 |
+
seopressAjaxMigrate.seopress_seo_framework_migrate
|
73 |
+
.seopress_seo_framework_migration;
|
74 |
+
action = "seopress_seo_framework_migration";
|
75 |
+
_ajax_nonce =
|
76 |
+
seopressAjaxMigrate.seopress_seo_framework_migrate
|
77 |
+
.seopress_nonce;
|
78 |
+
break;
|
79 |
+
case "seopress-rk-migrate":
|
80 |
+
url =
|
81 |
+
seopressAjaxMigrate.seopress_rk_migrate
|
82 |
+
.seopress_rk_migration;
|
83 |
+
action = "seopress_rk_migration";
|
84 |
+
_ajax_nonce =
|
85 |
+
seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce;
|
86 |
+
break;
|
87 |
+
case "seopress-squirrly-migrate":
|
88 |
+
url =
|
89 |
+
seopressAjaxMigrate.seopress_squirrly_migrate
|
90 |
+
.seopress_squirrly_migration;
|
91 |
+
action = "seopress_squirrly_migration";
|
92 |
+
_ajax_nonce =
|
93 |
+
seopressAjaxMigrate.seopress_squirrly_migrate
|
94 |
+
.seopress_nonce;
|
95 |
+
break;
|
96 |
+
case "seopress-seo-ultimate-migrate":
|
97 |
+
url =
|
98 |
+
seopressAjaxMigrate.seopress_seo_ultimate_migrate
|
99 |
+
.seopress_seo_ultimate_migration;
|
100 |
+
action = "seopress_seo_ultimate_migration";
|
101 |
+
_ajax_nonce =
|
102 |
+
seopressAjaxMigrate.seopress_seo_ultimate_migrate
|
103 |
+
.seopress_nonce;
|
104 |
+
break;
|
105 |
+
case "seopress-wp-meta-seo-migrate":
|
106 |
+
url =
|
107 |
+
seopressAjaxMigrate.seopress_wp_meta_seo_migrate
|
108 |
+
.seopress_wp_meta_seo_migration;
|
109 |
+
action = "seopress_wp_meta_seo_migration";
|
110 |
+
_ajax_nonce =
|
111 |
+
seopressAjaxMigrate.seopress_wp_meta_seo_migrate
|
112 |
+
.seopress_nonce;
|
113 |
+
break;
|
114 |
+
case "seopress-premium-seo-pack-migrate":
|
115 |
+
url =
|
116 |
+
seopressAjaxMigrate.seopress_premium_seo_pack_migrate
|
117 |
+
.seopress_premium_seo_pack_migration;
|
118 |
+
action = "seopress_premium_seo_pack_migration";
|
119 |
+
_ajax_nonce =
|
120 |
+
seopressAjaxMigrate.seopress_premium_seo_pack_migrate
|
121 |
+
.seopress_nonce;
|
122 |
+
break;
|
123 |
+
case "seopress-wpseo-migrate":
|
124 |
+
url =
|
125 |
+
seopressAjaxMigrate.seopress_wpseo_migrate
|
126 |
+
.seopress_wpseo_migration;
|
127 |
+
action = "seopress_wpseo_migration";
|
128 |
+
_ajax_nonce =
|
129 |
+
seopressAjaxMigrate.seopress_wpseo_migrate
|
130 |
+
.seopress_nonce;
|
131 |
+
break;
|
132 |
+
case "seopress-platinum-seo-migrate":
|
133 |
+
url =
|
134 |
+
seopressAjaxMigrate.seopress_platinum_seo_migrate
|
135 |
+
.seopress_platinum_seo_migration;
|
136 |
+
action = "seopress_platinum_seo_migration";
|
137 |
+
_ajax_nonce =
|
138 |
+
seopressAjaxMigrate.seopress_platinum_seo_migrate
|
139 |
+
.seopress_nonce;
|
140 |
+
break;
|
141 |
+
case "seopress-smart-crawl-migrate":
|
142 |
+
url =
|
143 |
+
seopressAjaxMigrate.seopress_smart_crawl_migrate
|
144 |
+
.seopress_smart_crawl_migration;
|
145 |
+
action = "seopress_smart_crawl_migration";
|
146 |
+
_ajax_nonce =
|
147 |
+
seopressAjaxMigrate.seopress_smart_crawl_migrate
|
148 |
+
.seopress_nonce;
|
149 |
+
break;
|
150 |
+
case "seopress-seopressor-migrate":
|
151 |
+
url =
|
152 |
+
seopressAjaxMigrate.seopress_seopressor_migrate
|
153 |
+
.seopress_seopressor_migration;
|
154 |
+
action = "seopress_seopressor_migration";
|
155 |
+
_ajax_nonce =
|
156 |
+
seopressAjaxMigrate.seopress_seopressor_migrate
|
157 |
+
.seopress_nonce;
|
158 |
+
break;
|
159 |
+
case "seopress-metadata-migrate":
|
160 |
+
url =
|
161 |
+
seopressAjaxMigrate.seopress_metadata_csv
|
162 |
+
.seopress_metadata_export;
|
163 |
+
action = "seopress_metadata_export";
|
164 |
+
_ajax_nonce =
|
165 |
+
seopressAjaxMigrate.seopress_metadata_csv
|
166 |
+
.seopress_nonce;
|
167 |
+
break;
|
168 |
+
default:
|
169 |
+
}
|
170 |
+
self.process_offset(0, self, url, action, _ajax_nonce, id);
|
171 |
+
});
|
172 |
|
173 |
+
process_offset = function (
|
174 |
+
offset,
|
175 |
+
self,
|
176 |
+
url,
|
177 |
+
action,
|
178 |
+
_ajax_nonce,
|
179 |
+
id,
|
180 |
+
post_export,
|
181 |
+
term_export
|
182 |
+
) {
|
183 |
+
i18n = seopressAjaxMigrate.i18n.migration;
|
184 |
+
if (id == "metadata") {
|
185 |
+
i18n = seopressAjaxMigrate.i18n.export;
|
186 |
+
}
|
187 |
+
$.ajax({
|
188 |
+
method: "POST",
|
189 |
+
url: url,
|
190 |
+
data: {
|
191 |
+
action: action,
|
192 |
+
offset: offset,
|
193 |
+
post_export: post_export,
|
194 |
+
term_export: term_export,
|
195 |
+
_ajax_nonce: _ajax_nonce,
|
196 |
+
},
|
197 |
+
success: function (data) {
|
198 |
+
if ("done" == data.data.offset) {
|
199 |
+
$("#seopress-" + id + "-migrate").removeAttr(
|
200 |
+
"disabled"
|
201 |
+
);
|
202 |
+
$(".spinner").css("visibility", "hidden");
|
203 |
+
$("#" + id + "-migration-tool .log").html(i18n);
|
204 |
|
205 |
+
if (data.data.url != "") {
|
206 |
+
$(location).attr("href", data.data.url);
|
207 |
+
}
|
208 |
+
} else {
|
209 |
+
self.process_offset(
|
210 |
+
parseInt(data.data.offset),
|
211 |
+
self,
|
212 |
+
url,
|
213 |
+
action,
|
214 |
+
_ajax_nonce,
|
215 |
+
id,
|
216 |
+
data.data.post_export,
|
217 |
+
data.data.term_export
|
218 |
+
);
|
219 |
+
}
|
220 |
+
},
|
221 |
+
});
|
222 |
+
};
|
223 |
+
$("#seopress-" + item + "-migrate").on("click", function () {
|
224 |
+
$(this).attr("disabled", "disabled");
|
225 |
+
$("#" + item + "-migration-tool .spinner").css(
|
226 |
+
"visibility",
|
227 |
+
"visible"
|
228 |
+
);
|
229 |
+
$("#" + item + "-migration-tool .spinner").css("float", "none");
|
230 |
+
$("#" + item + "-migration-tool .log").html("");
|
231 |
+
});
|
232 |
+
});
|
233 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){e("#select-wizard-redirects, #select-wizard-import").change(function(s){s.preventDefault();var r=e(this).val();"none"==r?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");const s=["yoast","aio","seo-framework","rk","squirrly","seo-ultimate","wp-meta-seo","premium-seo-pack","wpseo","metadata"];s.forEach(function(s){e("#seopress-"+s+"-migrate").on("click",function(e){switch(e.preventDefault(),id=s,e.target.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-wpseo-migrate":url=seopressAjaxMigrate.seopress_wpseo_migrate.seopress_wpseo_migration,action="seopress_wpseo_migration",_ajax_nonce=seopressAjaxMigrate.seopress_wpseo_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,_,p){i18n=seopressAjaxMigrate.i18n.migration,"metadata"==i&&(i18n=seopressAjaxMigrate.i18n.export),e.ajax({method:"POST",url:a,data:{action:o,offset:s,post_export:_,term_export:p,_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,s.data.post_export,s.data.term_export)}})},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("")})})});
|
1 |
+
jQuery(document).ready(function(e){e("#select-wizard-redirects, #select-wizard-import").change(function(s){s.preventDefault();var r=e(this).val();"none"==r?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");const s=["yoast","aio","seo-framework","rk","squirrly","seo-ultimate","wp-meta-seo","premium-seo-pack","wpseo","platinum-seo","smartcrawl","seopressor","metadata"];s.forEach(function(s){e("#seopress-"+s+"-migrate").on("click",function(e){switch(e.preventDefault(),id=s,e.target.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-wpseo-migrate":url=seopressAjaxMigrate.seopress_wpseo_migrate.seopress_wpseo_migration,action="seopress_wpseo_migration",_ajax_nonce=seopressAjaxMigrate.seopress_wpseo_migrate.seopress_nonce;break;case"seopress-platinum-seo-migrate":url=seopressAjaxMigrate.seopress_platinum_seo_migrate.seopress_platinum_seo_migration,action="seopress_platinum_seo_migration",_ajax_nonce=seopressAjaxMigrate.seopress_platinum_seo_migrate.seopress_nonce;break;case"seopress-smart-crawl-migrate":url=seopressAjaxMigrate.seopress_smart_crawl_migrate.seopress_smart_crawl_migration,action="seopress_smart_crawl_migration",_ajax_nonce=seopressAjaxMigrate.seopress_smart_crawl_migrate.seopress_nonce;break;case"seopress-seopressor-migrate":url=seopressAjaxMigrate.seopress_seopressor_migrate.seopress_seopressor_migration,action="seopress_seopressor_migration",_ajax_nonce=seopressAjaxMigrate.seopress_seopressor_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,_,p){i18n=seopressAjaxMigrate.i18n.migration,"metadata"==i&&(i18n=seopressAjaxMigrate.i18n.export),e.ajax({method:"POST",url:a,data:{action:o,offset:s,post_export:_,term_export:p,_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,s.data.post_export,s.data.term_export)}})},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("")})})});
|
@@ -1,61 +1,61 @@
|
|
1 |
-
(function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
})(jQuery);
|
1 |
+
(function ($) {
|
2 |
+
|
3 |
+
// we create a copy of the WP inline edit post function
|
4 |
+
var $wp_inline_edit = inlineEditPost.edit;
|
5 |
+
|
6 |
+
// and then we overwrite the function with our own code
|
7 |
+
inlineEditPost.edit = function (id) {
|
8 |
+
|
9 |
+
// "call" the original WP edit function
|
10 |
+
// we don't want to leave WordPress hanging
|
11 |
+
$wp_inline_edit.apply(this, arguments);
|
12 |
+
|
13 |
+
// now we take care of our business
|
14 |
+
|
15 |
+
// get the post ID
|
16 |
+
var $post_id = 0;
|
17 |
+
if (typeof (id) == 'object') {
|
18 |
+
$post_id = parseInt(this.getId(id));
|
19 |
+
}
|
20 |
+
|
21 |
+
if ($post_id > 0) {
|
22 |
+
// define the edit row
|
23 |
+
var $edit_row = $('#edit-' + $post_id);
|
24 |
+
var $post_row = $('#post-' + $post_id);
|
25 |
+
|
26 |
+
// get the data
|
27 |
+
var $seopress_title = $('#seopress_title-' + $post_id).text();
|
28 |
+
var $seopress_desc = $('#seopress_desc-' + $post_id).text();
|
29 |
+
var $seopress_tkw = $('#seopress_tkw-' + $post_id).text();
|
30 |
+
var $seopress_canonical = $('#seopress_canonical-' + $post_id).text();
|
31 |
+
var $seopress_noindex = $('#post-' + $post_id + ' .column-seopress_noindex').html();
|
32 |
+
var $seopress_nofollow = $('#post-' + $post_id + ' .column-seopress_nofollow').html();
|
33 |
+
var $seopress_redirections_enable = $('#post-' + $post_id + ' .column-seopress_404_redirect_enable').html();
|
34 |
+
var $seopress_redirections_type = $('#post-' + $post_id + ' .column-seopress_404_redirect_type').text();
|
35 |
+
var $seopress_redirections_value = $('#post-' + $post_id + ' .column-seopress_404_redirect_value').text();
|
36 |
+
|
37 |
+
// populate the data
|
38 |
+
$edit_row.find('input[name="seopress_title"]').val($seopress_title);
|
39 |
+
$edit_row.find('textarea[name="seopress_desc"]').val($seopress_desc);
|
40 |
+
$edit_row.find('input[name="seopress_tkw"]').val($seopress_tkw);
|
41 |
+
$edit_row.find('input[name="seopress_canonical"]').val($seopress_canonical);
|
42 |
+
|
43 |
+
if ($seopress_noindex && $seopress_noindex.includes('<span class="dashicons dashicons-hidden"></span>')) {
|
44 |
+
$edit_row.find('input[name="seopress_noindex"]').prop('checked', true);
|
45 |
+
}
|
46 |
+
|
47 |
+
if ($seopress_nofollow && $seopress_nofollow.includes('<span class="dashicons dashicons-yes"></span>')) {
|
48 |
+
$edit_row.find('input[name="seopress_nofollow"]').prop('checked', true);
|
49 |
+
}
|
50 |
+
|
51 |
+
if ($seopress_redirections_enable && $seopress_redirections_enable == '<span class="dashicons dashicons-yes"></span>') {
|
52 |
+
$edit_row.find('input[name="seopress_redirections_enabled"]').prop('checked', true);
|
53 |
+
}
|
54 |
+
if ($seopress_redirections_type && $seopress_redirections_type != '404') {
|
55 |
+
$edit_row.find('select[name="seopress_redirections_type"] option[value="' + $seopress_redirections_type + '"]').prop('selected', true);
|
56 |
+
}
|
57 |
+
$edit_row.find('input[name="seopress_redirections_value"]').val($seopress_redirections_value);
|
58 |
+
}
|
59 |
+
};
|
60 |
|
61 |
})(jQuery);
|
@@ -1 +1 @@
|
|
1 |
-
(function(e){var s=inlineEditPost.edit;inlineEditPost.edit=function(n){s.apply(this,arguments);var t=0;if("object"==typeof n&&(t=parseInt(this.getId(n))),t>0){var o=e("#edit-"+t),i=(e("#post-"+t),e("#seopress_title-"+t).text()),p=e("#seopress_desc-"+t).text(),a=e("#seopress_tkw-"+t).text(),d=e("#seopress_canonical-"+t).text(),r=e("#post-"+t+" .column-seopress_noindex").html(),c=e("#post-"+t+" .column-seopress_nofollow").html(),l=e("#post-"+t+" .column-seopress_404_redirect_enable").html(),_=e("#post-"+t+" .column-seopress_404_redirect_type").text(),u=e("#post-"+t+" .column-seopress_404_redirect_value").text();o.find('input[name="seopress_title"]').val(i),o.find('textarea[name="seopress_desc"]').val(p),o.find('input[name="seopress_tkw"]').val(a),o.find('input[name="seopress_canonical"]').val(d),r.includes('<span class="dashicons dashicons-hidden"></span>')&&o.find('input[name="seopress_noindex"]').prop("checked",!0),c.includes('<span class="dashicons dashicons-yes"></span>')&&o.find('input[name="seopress_nofollow"]').prop("checked",!0),'<span class="dashicons dashicons-yes"></span>'==l&&o.find('input[name="seopress_redirections_enabled"]').prop("checked",!0),"404"!=_&&o.find('select[name="seopress_redirections_type"] option[value="'+_+'"]').prop("selected",!0),o.find('input[name="seopress_redirections_value"]').val(u)}}})(jQuery);
|
1 |
+
(function(e){var s=inlineEditPost.edit;inlineEditPost.edit=function(n){s.apply(this,arguments);var t=0;if("object"==typeof n&&(t=parseInt(this.getId(n))),t>0){var o=e("#edit-"+t),i=(e("#post-"+t),e("#seopress_title-"+t).text()),p=e("#seopress_desc-"+t).text(),a=e("#seopress_tkw-"+t).text(),d=e("#seopress_canonical-"+t).text(),r=e("#post-"+t+" .column-seopress_noindex").html(),c=e("#post-"+t+" .column-seopress_nofollow").html(),l=e("#post-"+t+" .column-seopress_404_redirect_enable").html(),_=e("#post-"+t+" .column-seopress_404_redirect_type").text(),u=e("#post-"+t+" .column-seopress_404_redirect_value").text();o.find('input[name="seopress_title"]').val(i),o.find('textarea[name="seopress_desc"]').val(p),o.find('input[name="seopress_tkw"]').val(a),o.find('input[name="seopress_canonical"]').val(d),r&&r.includes('<span class="dashicons dashicons-hidden"></span>')&&o.find('input[name="seopress_noindex"]').prop("checked",!0),c&&c.includes('<span class="dashicons dashicons-yes"></span>')&&o.find('input[name="seopress_nofollow"]').prop("checked",!0),l&&'<span class="dashicons dashicons-yes"></span>'==l&&o.find('input[name="seopress_redirections_enabled"]').prop("checked",!0),_&&"404"!=_&&o.find('select[name="seopress_redirections_type"] option[value="'+_+'"]').prop("selected",!0),o.find('input[name="seopress_redirections_value"]').val(u)}}})(jQuery);
|
@@ -1,102 +1,138 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
var hash = $(location).attr("hash").split("#tab=")[1];
|
3 |
+
|
4 |
+
if (typeof hash != "undefined") {
|
5 |
+
$("#" + hash + "-tab").addClass("nav-tab-active");
|
6 |
+
$("#" + hash).addClass("active");
|
7 |
+
} else {
|
8 |
+
if (typeof sessionStorage != "undefined") {
|
9 |
+
var seopress_tab_session_storage = sessionStorage.getItem(
|
10 |
+
"seopress_titles_tab"
|
11 |
+
);
|
12 |
+
if (seopress_tab_session_storage) {
|
13 |
+
$("#seopress-tabs")
|
14 |
+
.find(".nav-tab.nav-tab-active")
|
15 |
+
.removeClass("nav-tab-active");
|
16 |
+
$("#seopress-tabs")
|
17 |
+
.find(".seopress-tab.active")
|
18 |
+
.removeClass("active");
|
19 |
+
|
20 |
+
$("#" + seopress_tab_session_storage + "-tab").addClass(
|
21 |
+
"nav-tab-active"
|
22 |
+
);
|
23 |
+
$("#" + seopress_tab_session_storage).addClass("active");
|
24 |
+
} else {
|
25 |
+
//Default TAB
|
26 |
+
$("#tab_seopress_titles_home-tab").addClass("nav-tab-active");
|
27 |
+
$("#tab_seopress_titles_home").addClass("active");
|
28 |
+
}
|
29 |
+
}
|
30 |
+
}
|
31 |
+
$("#seopress-tabs")
|
32 |
+
.find("a.nav-tab")
|
33 |
+
.click(function (e) {
|
34 |
+
e.preventDefault();
|
35 |
+
var hash = $(this).attr("href").split("#tab=")[1];
|
36 |
+
|
37 |
+
$("#seopress-tabs")
|
38 |
+
.find(".nav-tab.nav-tab-active")
|
39 |
+
.removeClass("nav-tab-active");
|
40 |
+
$("#" + hash + "-tab").addClass("nav-tab-active");
|
41 |
+
|
42 |
+
sessionStorage.setItem("seopress_titles_tab", hash);
|
43 |
+
|
44 |
+
$("#seopress-tabs")
|
45 |
+
.find(".seopress-tab.active")
|
46 |
+
.removeClass("active");
|
47 |
+
$("#" + hash).addClass("active");
|
48 |
+
});
|
49 |
+
|
50 |
+
function sp_get_field_length(e) {
|
51 |
+
if (e.val().length > 0) {
|
52 |
+
meta = e.val() + " ";
|
53 |
+
} else {
|
54 |
+
meta = e.val();
|
55 |
+
}
|
56 |
+
return meta;
|
57 |
+
}
|
58 |
+
|
59 |
+
let alreadyBind = false;
|
60 |
+
|
61 |
+
// Home Binding
|
62 |
+
|
63 |
+
$("#seopress-tag-site-title").click(function () {
|
64 |
+
$("#seopress_titles_home_site_title").val(
|
65 |
+
sp_get_field_length($("#seopress_titles_home_site_title")) +
|
66 |
+
$("#seopress-tag-site-title").attr("data-tag")
|
67 |
+
);
|
68 |
+
});
|
69 |
+
|
70 |
+
$("#seopress-tag-site-desc").click(function () {
|
71 |
+
$("#seopress_titles_home_site_title").val(
|
72 |
+
sp_get_field_length($("#seopress_titles_home_site_title")) +
|
73 |
+
$("#seopress-tag-site-desc").attr("data-tag")
|
74 |
+
);
|
75 |
+
});
|
76 |
+
$("#seopress-tag-site-sep").click(function () {
|
77 |
+
$("#seopress_titles_home_site_title").val(
|
78 |
+
sp_get_field_length($("#seopress_titles_home_site_title")) +
|
79 |
+
$("#seopress-tag-site-sep").attr("data-tag")
|
80 |
+
);
|
81 |
+
});
|
82 |
+
|
83 |
+
$("#seopress-tag-meta-desc").click(function () {
|
84 |
+
$("#seopress_titles_home_site_desc").val(
|
85 |
+
sp_get_field_length($("#seopress_titles_home_site_desc")) +
|
86 |
+
$("#seopress-tag-meta-desc").attr("data-tag")
|
87 |
+
);
|
88 |
+
});
|
89 |
+
|
90 |
+
//All variables
|
91 |
+
$(".seopress-tag-dropdown").each(function (item) {
|
92 |
+
const input_title = $(this).parent(".wrap-tags").prev("input");
|
93 |
+
const _self = $(this);
|
94 |
+
$(this).on("click", function () {
|
95 |
+
$(this).next(".sp-wrap-tag-variables-list").toggleClass("open");
|
96 |
+
|
97 |
+
$(this)
|
98 |
+
.next(".sp-wrap-tag-variables-list")
|
99 |
+
.find("li")
|
100 |
+
.on("click", function (e) {
|
101 |
+
if (_self.hasClass("tag-title")) {
|
102 |
+
input_title.val(
|
103 |
+
sp_get_field_length(input_title) +
|
104 |
+
$(this).attr("data-value")
|
105 |
+
);
|
106 |
+
input_title.trigger("paste");
|
107 |
+
}
|
108 |
+
if (_self.hasClass("tag-description")) {
|
109 |
+
$("#seopress_titles_home_site_desc").val(
|
110 |
+
sp_get_field_length(
|
111 |
+
$("#seopress_titles_home_site_desc")
|
112 |
+
) + $(this).attr("data-value")
|
113 |
+
);
|
114 |
+
$("#seopress_titles_home_site_desc").trigger("paste");
|
115 |
+
}
|
116 |
+
e.stopImmediatePropagation();
|
117 |
+
});
|
118 |
+
|
119 |
+
function closeItem(e) {
|
120 |
+
if (
|
121 |
+
$(e.target).hasClass("dashicons") ||
|
122 |
+
$(e.target).hasClass("seopress-tag-single-all")
|
123 |
+
) {
|
124 |
+
return;
|
125 |
+
}
|
126 |
+
|
127 |
+
alreadyBind = false;
|
128 |
+
$(document).off("click", closeItem);
|
129 |
+
$(".sp-wrap-tag-variables-list").removeClass("open");
|
130 |
+
}
|
131 |
+
|
132 |
+
if (!alreadyBind) {
|
133 |
+
alreadyBind = true;
|
134 |
+
$(document).on("click", closeItem);
|
135 |
+
}
|
136 |
+
});
|
137 |
+
});
|
138 |
+
});
|
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(s){function t(s){return s.val().length>0?meta=s.val()+" ":meta=s.val(),meta}var e=s(location).attr("hash").split("#tab=")[1];if(void 0!==e)s("#"+e+"-tab").addClass("nav-tab-active"),s("#"+e).addClass("active");else if("undefined"!=typeof sessionStorage){var a=sessionStorage.getItem("seopress_titles_tab");a?(s("#seopress-tabs").find(".nav-tab.nav-tab-active").removeClass("nav-tab-active"),s("#seopress-tabs").find(".seopress-tab.active").removeClass("active"),s("#"+a+"-tab").addClass("nav-tab-active"),s("#"+a).addClass("active")):(s("#tab_seopress_titles_home-tab").addClass("nav-tab-active"),s("#tab_seopress_titles_home").addClass("active"))}s("#seopress-tabs").find("a.nav-tab").click(function(t){t.preventDefault();var e=s(this).attr("href").split("#tab=")[1];s("#seopress-tabs").find(".nav-tab.nav-tab-active").removeClass("nav-tab-active"),s("#"+e+"-tab").addClass("nav-tab-active"),sessionStorage.setItem("seopress_titles_tab",e),s("#seopress-tabs").find(".seopress-tab.active").removeClass("active"),s("#"+e).addClass("active")})
|
1 |
+
jQuery(document).ready(function(s){function t(s){return s.val().length>0?meta=s.val()+" ":meta=s.val(),meta}var e=s(location).attr("hash").split("#tab=")[1];if(void 0!==e)s("#"+e+"-tab").addClass("nav-tab-active"),s("#"+e).addClass("active");else if("undefined"!=typeof sessionStorage){var a=sessionStorage.getItem("seopress_titles_tab");a?(s("#seopress-tabs").find(".nav-tab.nav-tab-active").removeClass("nav-tab-active"),s("#seopress-tabs").find(".seopress-tab.active").removeClass("active"),s("#"+a+"-tab").addClass("nav-tab-active"),s("#"+a).addClass("active")):(s("#tab_seopress_titles_home-tab").addClass("nav-tab-active"),s("#tab_seopress_titles_home").addClass("active"))}s("#seopress-tabs").find("a.nav-tab").click(function(t){t.preventDefault();var e=s(this).attr("href").split("#tab=")[1];s("#seopress-tabs").find(".nav-tab.nav-tab-active").removeClass("nav-tab-active"),s("#"+e+"-tab").addClass("nav-tab-active"),sessionStorage.setItem("seopress_titles_tab",e),s("#seopress-tabs").find(".seopress-tab.active").removeClass("active"),s("#"+e).addClass("active")});let i=!1;s("#seopress-tag-site-title").click(function(){s("#seopress_titles_home_site_title").val(t(s("#seopress_titles_home_site_title"))+s("#seopress-tag-site-title").attr("data-tag"))}),s("#seopress-tag-site-desc").click(function(){s("#seopress_titles_home_site_title").val(t(s("#seopress_titles_home_site_title"))+s("#seopress-tag-site-desc").attr("data-tag"))}),s("#seopress-tag-site-sep").click(function(){s("#seopress_titles_home_site_title").val(t(s("#seopress_titles_home_site_title"))+s("#seopress-tag-site-sep").attr("data-tag"))}),s("#seopress-tag-meta-desc").click(function(){s("#seopress_titles_home_site_desc").val(t(s("#seopress_titles_home_site_desc"))+s("#seopress-tag-meta-desc").attr("data-tag"))}),s(".seopress-tag-dropdown").each(function(e){const a=s(this).parent(".wrap-tags").prev("input"),o=s(this);s(this).on("click",function(){function e(t){s(t.target).hasClass("dashicons")||s(t.target).hasClass("seopress-tag-single-all")||(i=!1,s(document).off("click",e),s(".sp-wrap-tag-variables-list").removeClass("open"))}s(this).next(".sp-wrap-tag-variables-list").toggleClass("open"),s(this).next(".sp-wrap-tag-variables-list").find("li").on("click",function(e){o.hasClass("tag-title")&&(a.val(t(a)+s(this).attr("data-value")),a.trigger("paste")),o.hasClass("tag-description")&&(s("#seopress_titles_home_site_desc").val(t(s("#seopress_titles_home_site_desc"))+s(this).attr("data-value")),s("#seopress_titles_home_site_desc").trigger("paste")),e.stopImmediatePropagation()}),i||(i=!0,s(document).on("click",e))})})});
|
@@ -1,132 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
//Yoast SEO
|
3 |
-
$('#seopress-yoast-migrate').on('click', function(e) {
|
4 |
-
e.preventDefault();
|
5 |
-
self.process_offset( 0, self );
|
6 |
-
});
|
7 |
-
process_offset = function( offset, self ) {
|
8 |
-
$.ajax({
|
9 |
-
method : 'POST',
|
10 |
-
url : seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration,
|
11 |
-
data : {
|
12 |
-
action: 'seopress_yoast_migration',
|
13 |
-
offset: offset,
|
14 |
-
_ajax_nonce: seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce,
|
15 |
-
},
|
16 |
-
success : function( data ) {
|
17 |
-
if( 'done' == data.data.offset ) {
|
18 |
-
$('#seopress-yoast-migrate').removeAttr("disabled");
|
19 |
-
$( '.spinner' ).css( "visibility", "hidden" );
|
20 |
-
$( '#yoast-migration-tool .log' ).html(seopressAjaxMigrate.i18n);
|
21 |
-
} else {
|
22 |
-
self.process_offset( parseInt( data.data.offset ), self );
|
23 |
-
}
|
24 |
-
},
|
25 |
-
});
|
26 |
-
};
|
27 |
-
$('#seopress-yoast-migrate').on('click', function() {
|
28 |
-
$(this).attr("disabled", "disabled");
|
29 |
-
$( '#yoast-migration-tool .spinner' ).css( "visibility", "visible" );
|
30 |
-
$( '#yoast-migration-tool .spinner' ).css( "float", "none" );
|
31 |
-
$( '#yoast-migration-tool .log' ).html('');
|
32 |
-
});
|
33 |
-
|
34 |
-
//All In One
|
35 |
-
$('#seopress-aio-migrate').on('click', function(e2) {
|
36 |
-
e2.preventDefault();
|
37 |
-
self.process_offset2( 0, self );
|
38 |
-
});
|
39 |
-
process_offset2 = function( offset2, self ) {
|
40 |
-
$.ajax({
|
41 |
-
method : 'POST',
|
42 |
-
url : seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration,
|
43 |
-
data : {
|
44 |
-
action: 'seopress_aio_migration',
|
45 |
-
offset2: offset2,
|
46 |
-
_ajax_nonce: seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce,
|
47 |
-
},
|
48 |
-
success : function( data ) {
|
49 |
-
if( 'done' == data.data.offset2 ) {
|
50 |
-
$('#seopress-aio-migrate').removeAttr("disabled");
|
51 |
-
$( '.spinner' ).css( "visibility", "hidden" );
|
52 |
-
$( '#aio-migration-tool .log' ).html(seopressAjaxMigrate.i18n);
|
53 |
-
} else {
|
54 |
-
self.process_offset2( parseInt( data.data.offset2 ), self );
|
55 |
-
}
|
56 |
-
},
|
57 |
-
});
|
58 |
-
};
|
59 |
-
|
60 |
-
$('#seopress-aio-migrate').on('click', function() {
|
61 |
-
$(this).attr("disabled", "disabled");
|
62 |
-
$( '#aio-migration-tool .spinner' ).css( "visibility", "visible" );
|
63 |
-
$( '#aio-migration-tool .spinner' ).css( "float", "none" );
|
64 |
-
$( '#aio-migration-tool .log' ).html('');
|
65 |
-
});
|
66 |
-
|
67 |
-
//SEO Framework
|
68 |
-
$('#seopress-seo-framework-migrate').on('click', function(e3) {
|
69 |
-
e3.preventDefault();
|
70 |
-
self.process_offset3( 0, self );
|
71 |
-
});
|
72 |
-
process_offset3 = function( offset3, self ) {
|
73 |
-
$.ajax({
|
74 |
-
method : 'POST',
|
75 |
-
url : seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_seo_framework_migration,
|
76 |
-
data : {
|
77 |
-
action: 'seopress_seo_framework_migration',
|
78 |
-
offset3: offset3,
|
79 |
-
_ajax_nonce: seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_nonce,
|
80 |
-
},
|
81 |
-
success : function( data ) {
|
82 |
-
if( 'done' == data.data.offset3 ) {
|
83 |
-
$('#seopress-seo-framework-migrate').removeAttr("disabled");
|
84 |
-
$( '.spinner' ).css( "visibility", "hidden" );
|
85 |
-
$( '#seo-framework-migration-tool .log' ).html(seopressAjaxMigrate.i18n);
|
86 |
-
} else {
|
87 |
-
self.process_offset3( parseInt( data.data.offset3 ), self );
|
88 |
-
}
|
89 |
-
},
|
90 |
-
});
|
91 |
-
};
|
92 |
-
|
93 |
-
$('#seopress-seo-framework-migrate').on('click', function() {
|
94 |
-
$(this).attr("disabled", "disabled");
|
95 |
-
$( '#seo-framework-migration-tool .spinner' ).css( "visibility", "visible" );
|
96 |
-
$( '#seo-framework-migration-tool .spinner' ).css( "float", "none" );
|
97 |
-
$( '#seo-framework-migration-tool .log' ).html('');
|
98 |
-
});
|
99 |
-
|
100 |
-
//RK
|
101 |
-
$('#seopress-rk-migrate').on('click', function(e4) {
|
102 |
-
e4.preventDefault();
|
103 |
-
self.process_offset4( 0, self );
|
104 |
-
});
|
105 |
-
process_offset4 = function( offset4, self ) {
|
106 |
-
$.ajax({
|
107 |
-
method : 'POST',
|
108 |
-
url : seopressAjaxMigrate.seopress_rk_migrate.seopress_rk_migration,
|
109 |
-
data : {
|
110 |
-
action: 'seopress_rk_migration',
|
111 |
-
offset4: offset4,
|
112 |
-
_ajax_nonce: seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce,
|
113 |
-
},
|
114 |
-
success : function( data ) {
|
115 |
-
if( 'done' == data.data.offset4 ) {
|
116 |
-
$('#seopress-rk-migrate').removeAttr("disabled");
|
117 |
-
$( '.spinner' ).css( "visibility", "hidden" );
|
118 |
-
$( '#rk-migration-tool .log' ).html(seopressAjaxMigrate.i18n);
|
119 |
-
} else {
|
120 |
-
self.process_offset4( parseInt( data.data.offset4 ), self );
|
121 |
-
}
|
122 |
-
},
|
123 |
-
});
|
124 |
-
};
|
125 |
-
|
126 |
-
$('#seopress-rk-migrate').on('click', function() {
|
127 |
-
$(this).attr("disabled", "disabled");
|
128 |
-
$( '#rk-migration-tool .spinner' ).css( "visibility", "visible" );
|
129 |
-
$( '#rk-migration-tool .spinner' ).css( "float", "none" );
|
130 |
-
$( '#rk-migration-tool .log' ).html('');
|
131 |
-
});
|
132 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(s){s("#seopress-yoast-migrate").on("click",function(s){s.preventDefault(),self.process_offset(0,self)}),process_offset=function(e,o){s.ajax({method:"POST",url:seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration,data:{action:"seopress_yoast_migration",offset:e,_ajax_nonce:seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce},success:function(e){"done"==e.data.offset?(s("#seopress-yoast-migrate").removeAttr("disabled"),s(".spinner").css("visibility","hidden"),s("#yoast-migration-tool .log").html(seopressAjaxMigrate.i18n)):o.process_offset(parseInt(e.data.offset),o)}})},s("#seopress-yoast-migrate").on("click",function(){s(this).attr("disabled","disabled"),s("#yoast-migration-tool .spinner").css("visibility","visible"),s("#yoast-migration-tool .spinner").css("float","none"),s("#yoast-migration-tool .log").html("")}),s("#seopress-aio-migrate").on("click",function(s){s.preventDefault(),self.process_offset2(0,self)}),process_offset2=function(e,o){s.ajax({method:"POST",url:seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration,data:{action:"seopress_aio_migration",offset2:e,_ajax_nonce:seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce},success:function(e){"done"==e.data.offset2?(s("#seopress-aio-migrate").removeAttr("disabled"),s(".spinner").css("visibility","hidden"),s("#aio-migration-tool .log").html(seopressAjaxMigrate.i18n)):o.process_offset2(parseInt(e.data.offset2),o)}})},s("#seopress-aio-migrate").on("click",function(){s(this).attr("disabled","disabled"),s("#aio-migration-tool .spinner").css("visibility","visible"),s("#aio-migration-tool .spinner").css("float","none"),s("#aio-migration-tool .log").html("")}),s("#seopress-seo-framework-migrate").on("click",function(s){s.preventDefault(),self.process_offset3(0,self)}),process_offset3=function(e,o){s.ajax({method:"POST",url:seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_seo_framework_migration,data:{action:"seopress_seo_framework_migration",offset3:e,_ajax_nonce:seopressAjaxMigrate.seopress_seo_framework_migrate.seopress_nonce},success:function(e){"done"==e.data.offset3?(s("#seopress-seo-framework-migrate").removeAttr("disabled"),s(".spinner").css("visibility","hidden"),s("#seo-framework-migration-tool .log").html(seopressAjaxMigrate.i18n)):o.process_offset3(parseInt(e.data.offset3),o)}})},s("#seopress-seo-framework-migrate").on("click",function(){s(this).attr("disabled","disabled"),s("#seo-framework-migration-tool .spinner").css("visibility","visible"),s("#seo-framework-migration-tool .spinner").css("float","none"),s("#seo-framework-migration-tool .log").html("")}),s("#seopress-rk-migrate").on("click",function(s){s.preventDefault(),self.process_offset4(0,self)}),process_offset4=function(e,o){s.ajax({method:"POST",url:seopressAjaxMigrate.seopress_rk_migrate.seopress_rk_migration,data:{action:"seopress_rk_migration",offset4:e,_ajax_nonce:seopressAjaxMigrate.seopress_rk_migrate.seopress_nonce},success:function(e){"done"==e.data.offset4?(s("#seopress-rk-migrate").removeAttr("disabled"),s(".spinner").css("visibility","hidden"),s("#rk-migration-tool .log").html(seopressAjaxMigrate.i18n)):o.process_offset4(parseInt(e.data.offset4),o)}})},s("#seopress-rk-migrate").on("click",function(){s(this).attr("disabled","disabled"),s("#rk-migration-tool .spinner").css("visibility","visible"),s("#rk-migration-tool .spinner").css("float","none"),s("#rk-migration-tool .log").html("")})});
|
|
@@ -46,6 +46,7 @@ function seopress_get_dyn_variables() {
|
|
46 |
'%%currenttime%%' => __('Current time', 'wp-seopress'),
|
47 |
'%%author_bio%%' => __('Author biography', 'wp-seopress'),
|
48 |
'%%currentmonth_num%%' => __('Current month in digital format', 'wp-seopress'),
|
|
|
49 |
];
|
50 |
}
|
51 |
|
46 |
'%%currenttime%%' => __('Current time', 'wp-seopress'),
|
47 |
'%%author_bio%%' => __('Author biography', 'wp-seopress'),
|
48 |
'%%currentmonth_num%%' => __('Current month in digital format', 'wp-seopress'),
|
49 |
+
'%%target_keyword%%' => __('Target keyword', 'wp-seopress'),
|
50 |
];
|
51 |
}
|
52 |
|
@@ -1,7 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
<p>
|
6 |
' . __('Enter a few keywords for analysis to help you write optimized content.', 'wp-seopress') . '
|
7 |
</p>
|
1 |
<?php
|
2 |
|
3 |
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
+
|
5 |
+
|
6 |
+
$data_attr = seopress_metaboxes_init();
|
7 |
+
|
8 |
+
echo '<div class="wrap-seopress-analysis" data-home-id="' . $data_attr['isHomeId'] . '" data-term-id="' . $data_attr['termId'] . '" data_id="' . $data_attr['current_id'] . '" data_origin="' . $data_attr['origin'] . '" data_tax="' . $data_attr['data_tax'] . '">
|
9 |
<p>
|
10 |
' . __('Enter a few keywords for analysis to help you write optimized content.', 'wp-seopress') . '
|
11 |
</p>
|
@@ -4,52 +4,32 @@ defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks
|
|
4 |
global $typenow;
|
5 |
global $pagenow;
|
6 |
|
7 |
-
$
|
8 |
-
|
9 |
-
|
10 |
-
if ('post-new.php' == $pagenow || 'post.php' == $pagenow) {
|
11 |
-
$current_id = get_the_id();
|
12 |
-
$origin = 'post';
|
13 |
-
$title = get_the_title($current_id);
|
14 |
-
|
15 |
-
function seopress_titles_single_cpt_date_option() {
|
16 |
-
global $post;
|
17 |
-
$seopress_get_current_cpt = get_post_type($post);
|
18 |
-
|
19 |
-
$seopress_titles_single_cpt_date_option = get_option('seopress_titles_option_name');
|
20 |
-
if ( ! empty($seopress_titles_single_cpt_date_option)) {
|
21 |
-
foreach ($seopress_titles_single_cpt_date_option as $key => $seopress_titles_single_cpt_date_value) {
|
22 |
-
$options[$key] = $seopress_titles_single_cpt_date_value;
|
23 |
-
}
|
24 |
-
if (isset($seopress_titles_single_cpt_date_option['seopress_titles_single_titles'][$seopress_get_current_cpt]['date'])) {
|
25 |
-
return $seopress_titles_single_cpt_date_option['seopress_titles_single_titles'][$seopress_get_current_cpt]['date'];
|
26 |
-
}
|
27 |
-
}
|
28 |
}
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
35 |
} elseif ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
36 |
global $tag;
|
37 |
-
$current_id = $tag->term_id;
|
38 |
-
$termId = $tag->term_id;
|
39 |
-
$origin = 'term';
|
40 |
-
$data_tax = $tag->taxonomy;
|
41 |
-
$title = $tag->name;
|
42 |
-
}
|
43 |
-
|
44 |
-
$isHomeId = get_option('page_on_front');
|
45 |
-
if ('0' === $isHomeId) {
|
46 |
-
$isHomeId = '';
|
47 |
}
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
}
|
53 |
}
|
54 |
|
55 |
if ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
@@ -61,7 +41,7 @@ if ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
|
61 |
<div class="inside">';
|
62 |
}
|
63 |
|
64 |
-
echo '<div id="seopress-tabs" data-home-id="' . $isHomeId . '" data-term-id="' . $termId . '" data_id="' . $current_id . '" data_origin="' . $origin . '" data_tax="' . $data_tax . '">';
|
65 |
|
66 |
if ('seopress_404' != $typenow) {
|
67 |
$seo_tabs['title-tab'] = '<li><a href="#tabs-1"><span class="dashicons dashicons-editor-table"></span>' . __('Titles settings', 'wp-seopress') . '</a></li>';
|
@@ -193,8 +173,10 @@ echo '<div id="seopress-tabs" data-home-id="' . $isHomeId . '" data-term-id="' .
|
|
193 |
$gp_title = '<div class="snippet-title-default" style="display:none">' . get_the_title() . ' - ' . get_bloginfo('name') . '</div>';
|
194 |
$gp_permalink = '<div class="snippet-permalink">' . htmlspecialchars(urldecode(get_permalink())) . '</div>';
|
195 |
} elseif ($tag) {
|
196 |
-
|
197 |
-
|
|
|
|
|
198 |
}
|
199 |
|
200 |
$siteicon = '<div class="snippet-favicon"><img aria-hidden="true" height="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR4AWL4//8/RRjO8Iucx+noO0MWUDo16FYABMGP6ZfUcRnWtm27jVPbtm3bttuH2t3eFPcY9pLz7NxiLjCyVd87pKnHyqXyxtCs8APd0rnyxiu4qSeA3QEDrAwBDrT1s1Rc/OrjLZwqVmOSu6+Lamcpp2KKMA9PH1BYXMe1mUP5qotvXTywsOEEYHXxrY+3cqk6TMkYpNr2FeoY3KIr0RPtn9wQ2unlA+GMkRw6+9TFw4YTwDUzx/JVvARj9KaedXRO8P5B1Du2S32smzqUrcKGEyA+uAgQjKX7zf0boWHGfn71jIKj2689gxp7OAGShNcBUmLMPVjZuiKcA2vuWHHDCQxMCz629kXAIU4ApY15QwggAFbfOP9DhgBJ+nWVJ1AZAfICAj1pAlY6hCADZnveQf7bQIwzVONGJonhLIlS9gr5mFg44Xd+4S3XHoGNPdJl1INIwKyEgHckEhgTe1bGiFY9GSFBYUwLh1IkiJUbY407E7syBSFxKTszEoiE/YdrgCEayDmtaJwCI9uu8TKMuZSVfSa4BpGgzvomBR/INhLGzrqDotp01ZR8pn/1L0JN9d9XNyx0AAAAAElFTkSuQmCC" width="16" alt="favicon"></div>';
|
@@ -309,7 +291,7 @@ echo '<div id="seopress-tabs" data-home-id="' . $isHomeId . '" data-term-id="' .
|
|
309 |
<span class="description">' . __('Enter a custom value, useful if your title is too long', 'wp-seopress') . '</span>
|
310 |
</p>
|
311 |
<p>
|
312 |
-
<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 . '" />
|
313 |
</p>';
|
314 |
}
|
315 |
echo '</div>';
|
4 |
global $typenow;
|
5 |
global $pagenow;
|
6 |
|
7 |
+
function seopress_redirections_value($seopress_redirections_value) {
|
8 |
+
if ('' != $seopress_redirections_value) {
|
9 |
+
return $seopress_redirections_value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
11 |
+
}
|
12 |
|
13 |
+
$data_attr = [];
|
14 |
+
$data_attr['data_tax'] = '';
|
15 |
+
$data_attr['termId'] = '';
|
16 |
+
|
17 |
+
if ('post-new.php' == $pagenow || 'post.php' == $pagenow) {
|
18 |
+
$data_attr['current_id'] = get_the_id();
|
19 |
+
$data_attr['origin'] = 'post';
|
20 |
+
$data_attr['title'] = get_the_title($data_attr['current_id']);
|
21 |
} elseif ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
22 |
global $tag;
|
23 |
+
$data_attr['current_id'] = $tag->term_id;
|
24 |
+
$data_attr['termId'] = $tag->term_id;
|
25 |
+
$data_attr['origin'] = 'term';
|
26 |
+
$data_attr['data_tax'] = $tag->taxonomy;
|
27 |
+
$data_attr['title'] = $tag->name;
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
+
$data_attr['isHomeId'] = get_option('page_on_front');
|
31 |
+
if ('0' === $data_attr['isHomeId']) {
|
32 |
+
$data_attr['isHomeId'] = '';
|
|
|
33 |
}
|
34 |
|
35 |
if ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
41 |
<div class="inside">';
|
42 |
}
|
43 |
|
44 |
+
echo '<div id="seopress-tabs" data-home-id="' . $data_attr['isHomeId'] . '" data-term-id="' . $data_attr['termId'] . '" data_id="' . $data_attr['current_id'] . '" data_origin="' . $data_attr['origin'] . '" data_tax="' . $data_attr['data_tax'] . '">';
|
45 |
|
46 |
if ('seopress_404' != $typenow) {
|
47 |
$seo_tabs['title-tab'] = '<li><a href="#tabs-1"><span class="dashicons dashicons-editor-table"></span>' . __('Titles settings', 'wp-seopress') . '</a></li>';
|
173 |
$gp_title = '<div class="snippet-title-default" style="display:none">' . get_the_title() . ' - ' . get_bloginfo('name') . '</div>';
|
174 |
$gp_permalink = '<div class="snippet-permalink">' . htmlspecialchars(urldecode(get_permalink())) . '</div>';
|
175 |
} elseif ($tag) {
|
176 |
+
if (false === is_wp_error(get_term_link($tag))) {
|
177 |
+
$gp_title = '<div class="snippet-title-default" style="display:none">' . $tag->name . ' - ' . get_bloginfo('name') . '</div>';
|
178 |
+
$gp_permalink = '<div class="snippet-permalink">' . htmlspecialchars(urldecode(get_term_link($tag))) . '</div>';
|
179 |
+
}
|
180 |
}
|
181 |
|
182 |
$siteicon = '<div class="snippet-favicon"><img aria-hidden="true" height="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR4AWL4//8/RRjO8Iucx+noO0MWUDo16FYABMGP6ZfUcRnWtm27jVPbtm3bttuH2t3eFPcY9pLz7NxiLjCyVd87pKnHyqXyxtCs8APd0rnyxiu4qSeA3QEDrAwBDrT1s1Rc/OrjLZwqVmOSu6+Lamcpp2KKMA9PH1BYXMe1mUP5qotvXTywsOEEYHXxrY+3cqk6TMkYpNr2FeoY3KIr0RPtn9wQ2unlA+GMkRw6+9TFw4YTwDUzx/JVvARj9KaedXRO8P5B1Du2S32smzqUrcKGEyA+uAgQjKX7zf0boWHGfn71jIKj2689gxp7OAGShNcBUmLMPVjZuiKcA2vuWHHDCQxMCz629kXAIU4ApY15QwggAFbfOP9DhgBJ+nWVJ1AZAfICAj1pAlY6hCADZnveQf7bQIwzVONGJonhLIlS9gr5mFg44Xd+4S3XHoGNPdJl1INIwKyEgHckEhgTe1bGiFY9GSFBYUwLh1IkiJUbY407E7syBSFxKTszEoiE/YdrgCEayDmtaJwCI9uu8TKMuZSVfSa4BpGgzvomBR/INhLGzrqDotp01ZR8pn/1L0JN9d9XNyx0AAAAAElFTkSuQmCC" width="16" alt="favicon"></div>';
|
291 |
<span class="description">' . __('Enter a custom value, useful if your title is too long', 'wp-seopress') . '</span>
|
292 |
</p>
|
293 |
<p>
|
294 |
+
<input id="seopress_robots_breadcrumbs_meta" type="text" name="seopress_robots_breadcrumbs" placeholder="' . esc_html(sprintf(__('Current breadcrumbs: %s', 'wp-seopress'), $data_attr['title'])) . '" aria-label="' . __('Custom breadcrumbs', 'wp-seopress') . '" value="' . $seopress_robots_breadcrumbs . '" />
|
295 |
</p>';
|
296 |
}
|
297 |
echo '</div>';
|
@@ -153,6 +153,56 @@ if ( ! function_exists('seopress_titles_noimageindex_option')) {
|
|
153 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
154 |
//Display metabox in Custom Post Type
|
155 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
function seopress_display_seo_metaboxe() {
|
157 |
add_action('add_meta_boxes', 'seopress_init_metabox');
|
158 |
function seopress_init_metabox() {
|
@@ -295,6 +345,7 @@ function seopress_display_seo_metaboxe() {
|
|
295 |
}
|
296 |
|
297 |
require_once dirname(__FILE__) . '/admin-dyn-variables-helper.php'; //Dynamic variables
|
|
|
298 |
require_once dirname(__FILE__) . '/admin-metaboxes-form.php'; //Metaboxe HTML
|
299 |
}
|
300 |
|
@@ -423,6 +474,92 @@ function seopress_display_seo_metaboxe() {
|
|
423 |
}
|
424 |
}
|
425 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
}
|
427 |
}
|
428 |
}
|
@@ -530,6 +667,17 @@ function seopress_display_ca_metaboxe() {
|
|
530 |
if (isset($_POST['seopress_analysis_target_kw'])) {
|
531 |
update_post_meta($post_id, '_seopress_analysis_target_kw', esc_html($_POST['seopress_analysis_target_kw']));
|
532 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
}
|
534 |
}
|
535 |
|
153 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
154 |
//Display metabox in Custom Post Type
|
155 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
156 |
+
function seopress_titles_single_cpt_date_option() {
|
157 |
+
global $post;
|
158 |
+
$seopress_get_current_cpt = get_post_type($post);
|
159 |
+
|
160 |
+
$seopress_titles_single_cpt_date_option = get_option('seopress_titles_option_name');
|
161 |
+
if ( ! empty($seopress_titles_single_cpt_date_option)) {
|
162 |
+
foreach ($seopress_titles_single_cpt_date_option as $key => $seopress_titles_single_cpt_date_value) {
|
163 |
+
$options[$key] = $seopress_titles_single_cpt_date_value;
|
164 |
+
}
|
165 |
+
if (isset($seopress_titles_single_cpt_date_option['seopress_titles_single_titles'][$seopress_get_current_cpt]['date'])) {
|
166 |
+
return $seopress_titles_single_cpt_date_option['seopress_titles_single_titles'][$seopress_get_current_cpt]['date'];
|
167 |
+
}
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
function seopress_display_date_snippet() {
|
172 |
+
if (seopress_titles_single_cpt_date_option()) {
|
173 |
+
return '<div class="snippet-date">' . get_the_modified_date('M j, Y') . ' - </div>';
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
function seopress_metaboxes_init() {
|
178 |
+
global $typenow;
|
179 |
+
global $pagenow;
|
180 |
+
|
181 |
+
$data_attr = [];
|
182 |
+
$data_attr['data_tax'] = '';
|
183 |
+
$data_attr['termId'] = '';
|
184 |
+
|
185 |
+
if ('post-new.php' == $pagenow || 'post.php' == $pagenow) {
|
186 |
+
$data_attr['current_id'] = get_the_id();
|
187 |
+
$data_attr['origin'] = 'post';
|
188 |
+
$data_attr['title'] = get_the_title($data_attr['current_id']);
|
189 |
+
} elseif ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
190 |
+
global $tag;
|
191 |
+
$data_attr['current_id'] = $tag->term_id;
|
192 |
+
$data_attr['termId'] = $tag->term_id;
|
193 |
+
$data_attr['origin'] = 'term';
|
194 |
+
$data_attr['data_tax'] = $tag->taxonomy;
|
195 |
+
$data_attr['title'] = $tag->name;
|
196 |
+
}
|
197 |
+
|
198 |
+
$data_attr['isHomeId'] = get_option('page_on_front');
|
199 |
+
if ('0' === $data_attr['isHomeId']) {
|
200 |
+
$data_attr['isHomeId'] = '';
|
201 |
+
}
|
202 |
+
|
203 |
+
return $data_attr;
|
204 |
+
}
|
205 |
+
|
206 |
function seopress_display_seo_metaboxe() {
|
207 |
add_action('add_meta_boxes', 'seopress_init_metabox');
|
208 |
function seopress_init_metabox() {
|
345 |
}
|
346 |
|
347 |
require_once dirname(__FILE__) . '/admin-dyn-variables-helper.php'; //Dynamic variables
|
348 |
+
|
349 |
require_once dirname(__FILE__) . '/admin-metaboxes-form.php'; //Metaboxe HTML
|
350 |
}
|
351 |
|
474 |
}
|
475 |
}
|
476 |
}
|
477 |
+
if (did_action('elementor/loaded')) {
|
478 |
+
$elementor = get_post_meta($post_id, '_elementor_page_settings', true);
|
479 |
+
|
480 |
+
if ( ! empty($elementor)) {
|
481 |
+
if (isset($_POST['seopress_titles_title'])) {
|
482 |
+
$elementor['_seopress_titles_title'] = esc_html($_POST['seopress_titles_title']);
|
483 |
+
}
|
484 |
+
if (isset($_POST['seopress_titles_desc'])) {
|
485 |
+
$elementor['_seopress_titles_desc'] = esc_html($_POST['seopress_titles_desc']);
|
486 |
+
}
|
487 |
+
if (isset($_POST['seopress_robots_index'])) {
|
488 |
+
$elementor['_seopress_robots_index'] = 'yes';
|
489 |
+
} else {
|
490 |
+
$elementor['_seopress_robots_index'] = '';
|
491 |
+
}
|
492 |
+
if (isset($_POST['seopress_robots_follow'])) {
|
493 |
+
$elementor['_seopress_robots_follow'] = 'yes';
|
494 |
+
} else {
|
495 |
+
$elementor['_seopress_robots_follow'] = '';
|
496 |
+
}
|
497 |
+
if (isset($_POST['seopress_robots_odp'])) {
|
498 |
+
$elementor['_seopress_robots_odp'] = 'yes';
|
499 |
+
} else {
|
500 |
+
$elementor['_seopress_robots_odp'] = '';
|
501 |
+
}
|
502 |
+
if (isset($_POST['seopress_robots_imageindex'])) {
|
503 |
+
$elementor['_seopress_robots_imageindex'] = 'yes';
|
504 |
+
} else {
|
505 |
+
$elementor['_seopress_robots_imageindex'] = '';
|
506 |
+
}
|
507 |
+
if (isset($_POST['seopress_robots_archive'])) {
|
508 |
+
$elementor['_seopress_robots_archive'] = 'yes';
|
509 |
+
} else {
|
510 |
+
$elementor['_seopress_robots_archive'] = '';
|
511 |
+
}
|
512 |
+
if (isset($_POST['seopress_robots_snippet'])) {
|
513 |
+
$elementor['_seopress_robots_snippet'] = 'yes';
|
514 |
+
} else {
|
515 |
+
$elementor['_seopress_robots_snippet'] = '';
|
516 |
+
}
|
517 |
+
if (isset($_POST['seopress_robots_canonical'])) {
|
518 |
+
$elementor['_seopress_robots_canonical'] = esc_html($_POST['seopress_robots_canonical']);
|
519 |
+
}
|
520 |
+
if (isset($_POST['seopress_robots_primary_cat'])) {
|
521 |
+
$elementor['_seopress_robots_primary_cat'] = esc_html($_POST['seopress_robots_primary_cat']);
|
522 |
+
}
|
523 |
+
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
524 |
+
if (isset($_POST['seopress_robots_breadcrumbs'])) {
|
525 |
+
$elementor['_seopress_robots_breadcrumbs'] = esc_html($_POST['seopress_robots_breadcrumbs']);
|
526 |
+
}
|
527 |
+
}
|
528 |
+
if (isset($_POST['seopress_social_fb_title'])) {
|
529 |
+
$elementor['_seopress_social_fb_title'] = esc_html($_POST['seopress_social_fb_title']);
|
530 |
+
}
|
531 |
+
if (isset($_POST['seopress_social_fb_desc'])) {
|
532 |
+
$elementor['_seopress_social_fb_desc'] = esc_html($_POST['seopress_social_fb_desc']);
|
533 |
+
}
|
534 |
+
if (isset($_POST['seopress_social_fb_img'])) {
|
535 |
+
$elementor['_seopress_social_fb_img'] = esc_html($_POST['seopress_social_fb_img']);
|
536 |
+
}
|
537 |
+
if (isset($_POST['seopress_social_twitter_title'])) {
|
538 |
+
$elementor['_seopress_social_twitter_title'] = esc_html($_POST['seopress_social_twitter_title']);
|
539 |
+
}
|
540 |
+
if (isset($_POST['seopress_social_twitter_desc'])) {
|
541 |
+
$elementor['_seopress_social_twitter_desc'] = esc_html($_POST['seopress_social_twitter_desc']);
|
542 |
+
}
|
543 |
+
if (isset($_POST['seopress_social_twitter_img'])) {
|
544 |
+
$elementor['_seopress_social_twitter_img'] = esc_html($_POST['seopress_social_twitter_img']);
|
545 |
+
}
|
546 |
+
if (isset($_POST['seopress_redirections_type'])) {
|
547 |
+
$elementor['_seopress_redirections_type'] = esc_html($_POST['seopress_redirections_type']);
|
548 |
+
}
|
549 |
+
if (isset($_POST['seopress_redirections_value'])) {
|
550 |
+
$elementor['_seopress_redirections_value'] = esc_html($_POST['seopress_redirections_value']);
|
551 |
+
}
|
552 |
+
if (isset($_POST['seopress_redirections_param'])) {
|
553 |
+
$elementor['_seopress_redirections_param'] = esc_html($_POST['seopress_redirections_param']);
|
554 |
+
}
|
555 |
+
if (isset($_POST['seopress_redirections_enabled'])) {
|
556 |
+
$elementor['_seopress_redirections_enabled'] = 'yes';
|
557 |
+
} else {
|
558 |
+
$elementor['_seopress_redirections_enabled'] = '';
|
559 |
+
}
|
560 |
+
update_post_meta($post_id, '_elementor_page_settings', $elementor);
|
561 |
+
}
|
562 |
+
}
|
563 |
}
|
564 |
}
|
565 |
}
|
667 |
if (isset($_POST['seopress_analysis_target_kw'])) {
|
668 |
update_post_meta($post_id, '_seopress_analysis_target_kw', esc_html($_POST['seopress_analysis_target_kw']));
|
669 |
}
|
670 |
+
|
671 |
+
if (did_action('elementor/loaded')) {
|
672 |
+
$elementor = get_post_meta($post_id, '_elementor_page_settings', true);
|
673 |
+
|
674 |
+
if ( ! empty($elementor)) {
|
675 |
+
if (isset($_POST['seopress_analysis_target_kw'])) {
|
676 |
+
$elementor['_seopress_analysis_target_kw'] = esc_html($_POST['seopress_analysis_target_kw']);
|
677 |
+
}
|
678 |
+
update_post_meta($post_id, '_elementor_page_settings', $elementor);
|
679 |
+
}
|
680 |
+
}
|
681 |
}
|
682 |
}
|
683 |
|
@@ -151,16 +151,17 @@
|
|
151 |
if ('Divi' == $theme->template || 'Divi' == $theme->parent_theme) {
|
152 |
$divi_options = get_option('et_divi');
|
153 |
if ( ! empty($divi_options)) {
|
154 |
-
if (
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
164 |
) {
|
165 |
$args = [
|
166 |
'id' => 'notice-divi-seo',
|
@@ -282,16 +283,19 @@
|
|
282 |
}
|
283 |
}
|
284 |
$seo_plugins = [
|
285 |
-
'wordpress-seo/wp-seo.php'
|
286 |
-
'wordpress-seo-premium/wp-seo-premium.php'
|
287 |
-
'all-in-one-seo-pack/all_in_one_seo_pack.php'
|
288 |
-
'autodescription/autodescription.php'
|
289 |
-
'squirrly-seo/squirrly.php'
|
290 |
-
'seo-by-rank-math/rank-math.php'
|
291 |
-
'seo-ultimate/seo-ultimate.php'
|
292 |
-
'wp-meta-seo/wp-meta-seo.php'
|
293 |
-
'premium-seo-pack/plugin.php'
|
294 |
-
'wpseo/wpseo.php'
|
|
|
|
|
|
|
295 |
];
|
296 |
|
297 |
foreach ($seo_plugins as $key => $value) {
|
@@ -328,8 +332,9 @@
|
|
328 |
}
|
329 |
}
|
330 |
$pbuilder_plugins = [
|
331 |
-
'oxygen/functions.php'
|
332 |
-
'js_composer/js_composer.php'
|
|
|
333 |
];
|
334 |
foreach ($pbuilder_plugins as $key => $value) {
|
335 |
if (is_plugin_active($key)) {
|
@@ -345,24 +350,28 @@
|
|
345 |
}
|
346 |
}
|
347 |
if ('1' != seopress_get_hidden_notices_pbuilders_option()) {
|
348 |
-
$
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
'
|
358 |
-
|
359 |
-
|
360 |
-
'
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
|
|
|
|
|
|
|
|
366 |
}
|
367 |
break;
|
368 |
}
|
@@ -386,24 +395,25 @@
|
|
386 |
}
|
387 |
}
|
388 |
if ('1' != seopress_get_hidden_notices_themes_option()) {
|
389 |
-
$
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
'
|
396 |
-
|
397 |
-
|
398 |
-
'
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
|
|
407 |
}
|
408 |
break;
|
409 |
}
|
151 |
if ('Divi' == $theme->template || 'Divi' == $theme->parent_theme) {
|
152 |
$divi_options = get_option('et_divi');
|
153 |
if ( ! empty($divi_options)) {
|
154 |
+
if (
|
155 |
+
(array_key_exists('divi_seo_home_title', $divi_options) && 'on' == $divi_options['divi_seo_home_title']) ||
|
156 |
+
(array_key_exists('divi_seo_home_description', $divi_options) && 'on' == $divi_options['divi_seo_home_description']) ||
|
157 |
+
(array_key_exists('divi_seo_home_keywords', $divi_options) && 'on' == $divi_options['divi_seo_home_keywords']) ||
|
158 |
+
(array_key_exists('divi_seo_home_canonical', $divi_options) && 'on' == $divi_options['divi_seo_home_canonical']) ||
|
159 |
+
(array_key_exists('divi_seo_single_title', $divi_options) && 'on' == $divi_options['divi_seo_single_title']) ||
|
160 |
+
(array_key_exists('divi_seo_single_description', $divi_options) && 'on' == $divi_options['divi_seo_single_description']) ||
|
161 |
+
(array_key_exists('divi_seo_single_keywords', $divi_options) && 'on' == $divi_options['divi_seo_single_keywords']) ||
|
162 |
+
(array_key_exists('divi_seo_single_canonical', $divi_options) && 'on' == $divi_options['divi_seo_single_canonical']) ||
|
163 |
+
(array_key_exists('divi_seo_index_canonical', $divi_options) && 'on' == $divi_options['divi_seo_index_canonical']) ||
|
164 |
+
(array_key_exists('divi_seo_index_description', $divi_options) && 'on' == $divi_options['divi_seo_index_description'])
|
165 |
) {
|
166 |
$args = [
|
167 |
'id' => 'notice-divi-seo',
|
283 |
}
|
284 |
}
|
285 |
$seo_plugins = [
|
286 |
+
'wordpress-seo/wp-seo.php' => 'Yoast SEO',
|
287 |
+
'wordpress-seo-premium/wp-seo-premium.php' => 'Yoast SEO Premium',
|
288 |
+
'all-in-one-seo-pack/all_in_one_seo_pack.php' => 'All In One SEO',
|
289 |
+
'autodescription/autodescription.php' => 'The SEO Framework',
|
290 |
+
'squirrly-seo/squirrly.php' => 'Squirrly SEO',
|
291 |
+
'seo-by-rank-math/rank-math.php' => 'Rank Math',
|
292 |
+
'seo-ultimate/seo-ultimate.php' => 'SEO Ultimate',
|
293 |
+
'wp-meta-seo/wp-meta-seo.php' => 'WP Meta SEO',
|
294 |
+
'premium-seo-pack/plugin.php' => 'Premium SEO Pack',
|
295 |
+
'wpseo/wpseo.php' => 'wpSEO',
|
296 |
+
'platinum-seo-pack/platinum-seo-pack.php' => 'Platinum SEO Pack',
|
297 |
+
'smartcrawl-seo/wpmu-dev-seo.php' => 'SmartCrawl',
|
298 |
+
'seo-pressor/seo-pressor.php' => 'SEOPressor',
|
299 |
];
|
300 |
|
301 |
foreach ($seo_plugins as $key => $value) {
|
332 |
}
|
333 |
}
|
334 |
$pbuilder_plugins = [
|
335 |
+
'oxygen/functions.php' => 'Oxygen',
|
336 |
+
'js_composer/js_composer.php' => 'WP Bakery',
|
337 |
+
'fusion-builder/fusion-builder.php' => 'Fusion Builder',
|
338 |
];
|
339 |
foreach ($pbuilder_plugins as $key => $value) {
|
340 |
if (is_plugin_active($key)) {
|
350 |
}
|
351 |
}
|
352 |
if ('1' != seopress_get_hidden_notices_pbuilders_option()) {
|
353 |
+
if (('1' !== seopress_setting_section_tools_compatibility_oxygen_option() && 'Oxygen' === $value) ||
|
354 |
+
('1' !== seopress_setting_section_tools_compatibility_bakery_option() && 'WP Bakery' === $value) ||
|
355 |
+
('1' !== seopress_setting_section_tools_compatibility_fusion_option() && 'Fusion Builder' === $value)
|
356 |
+
) {
|
357 |
+
$args = [
|
358 |
+
'id' => 'notice-page-builders',
|
359 |
+
/* translators: %s name of a page builder plugin (eg: Oxygen) */
|
360 |
+
'title' => sprintf(__('Generate automatic meta description for <strong>%s</strong> plugin.', 'wp-seopress'), $value),
|
361 |
+
'desc' => __('Your page builder is using shortcodes to save its data. To automatically generate your meta description based on your post content, go to our Compatibility Center.', 'wp-seopress'),
|
362 |
+
'impact' => [
|
363 |
+
'medium' => __('Medium impact', 'wp-seopress'),
|
364 |
+
],
|
365 |
+
'link' => [
|
366 |
+
'en' => admin_url('admin.php?page=seopress-import-export#tab=tab_seopress_tool_compatibility'),
|
367 |
+
'title' => __('Fix this!', 'wp-seopress'),
|
368 |
+
'external' => false,
|
369 |
+
],
|
370 |
+
'icon' => 'dashicons-admin-tools',
|
371 |
+
'deleteable' => true,
|
372 |
+
];
|
373 |
+
seopress_notification($args);
|
374 |
+
}
|
375 |
}
|
376 |
break;
|
377 |
}
|
395 |
}
|
396 |
}
|
397 |
if ('1' != seopress_get_hidden_notices_themes_option()) {
|
398 |
+
if (('1' !== seopress_setting_section_tools_compatibility_divi_option() && 'Divi' === $value) || ('1' !== seopress_setting_section_tools_compatibility_avia_option() && 'Enfold (Avia Layout Builder)' === $value)) {
|
399 |
+
$args = [
|
400 |
+
'id' => 'notice-themes',
|
401 |
+
/* translators: %s name of a WP theme (eg: Enfold) */
|
402 |
+
'title' => sprintf(__('Generate automatic meta description for <strong>%s</strong> theme.', 'wp-seopress'), $value),
|
403 |
+
'desc' => __('Your theme is using shortcodes to save its data. To automatically generate your meta description based on your post content, go to our Compatibility Center.', 'wp-seopress'),
|
404 |
+
'impact' => [
|
405 |
+
'medium' => __('Medium impact', 'wp-seopress'),
|
406 |
+
],
|
407 |
+
'link' => [
|
408 |
+
'en' => admin_url('admin.php?page=seopress-import-export#tab=tab_seopress_tool_compatibility'),
|
409 |
+
'title' => __('Fix this!', 'wp-seopress'),
|
410 |
+
'external' => false,
|
411 |
+
],
|
412 |
+
'icon' => 'dashicons-admin-tools',
|
413 |
+
'deleteable' => true,
|
414 |
+
];
|
415 |
+
seopress_notification($args);
|
416 |
+
}
|
417 |
}
|
418 |
break;
|
419 |
}
|
@@ -1,144 +1,154 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
defined(
|
4 |
|
5 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
6 |
//Restrict SEO metaboxes to user roles
|
7 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
8 |
function seopress_advanced_security_metaboxe_role_hook_option() {
|
9 |
-
$seopress_advanced_security_metaboxe_role_hook_option = get_option(
|
10 |
-
if ( ! empty
|
11 |
-
foreach ($seopress_advanced_security_metaboxe_role_hook_option as $key => $seopress_advanced_security_metaboxe_role_hook_value)
|
12 |
$options[$key] = $seopress_advanced_security_metaboxe_role_hook_value;
|
13 |
-
|
|
|
14 |
return $seopress_advanced_security_metaboxe_role_hook_option['seopress_advanced_security_metaboxe_role'];
|
15 |
-
|
16 |
}
|
17 |
}
|
18 |
|
19 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
20 |
//Check global settings
|
21 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
22 |
-
if (!function_exists('seopress_titles_single_term_noindex_option')) {
|
23 |
function seopress_titles_single_term_noindex_option() {
|
24 |
global $tax;
|
25 |
$seopress_get_current_tax = $tax->name;
|
26 |
|
27 |
-
$seopress_titles_single_term_noindex_option = get_option(
|
28 |
-
if ( ! empty
|
29 |
-
foreach ($seopress_titles_single_term_noindex_option as $key => $seopress_titles_single_term_noindex_value)
|
30 |
$options[$key] = $seopress_titles_single_term_noindex_value;
|
31 |
-
|
|
|
32 |
return $seopress_titles_single_term_noindex_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['noindex'];
|
33 |
-
|
34 |
}
|
35 |
}
|
36 |
}
|
37 |
|
38 |
-
if (!function_exists('seopress_titles_noindex_option')) {
|
39 |
function seopress_titles_noindex_option() {
|
40 |
-
$seopress_titles_noindex_option = get_option(
|
41 |
-
if ( ! empty
|
42 |
-
foreach ($seopress_titles_noindex_option as $key => $seopress_titles_noindex_value)
|
43 |
$options[$key] = $seopress_titles_noindex_value;
|
44 |
-
|
|
|
45 |
return $seopress_titles_noindex_option['seopress_titles_noindex'];
|
46 |
-
|
47 |
}
|
48 |
}
|
49 |
}
|
50 |
|
51 |
-
if (!function_exists('seopress_titles_single_term_nofollow_option')) {
|
52 |
function seopress_titles_single_term_nofollow_option() {
|
53 |
global $tax;
|
54 |
$seopress_get_current_tax = $tax->name;
|
55 |
|
56 |
-
$seopress_titles_single_term_nofollow_option = get_option(
|
57 |
-
if ( ! empty
|
58 |
-
foreach ($seopress_titles_single_term_nofollow_option as $key => $seopress_titles_single_term_nofollow_value)
|
59 |
$options[$key] = $seopress_titles_single_term_nofollow_value;
|
60 |
-
|
|
|
61 |
return $seopress_titles_single_term_nofollow_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['nofollow'];
|
62 |
-
|
63 |
}
|
64 |
}
|
65 |
}
|
66 |
|
67 |
-
if (!function_exists('seopress_titles_nofollow_option')) {
|
68 |
function seopress_titles_nofollow_option() {
|
69 |
-
$seopress_titles_nofollow_option = get_option(
|
70 |
-
if ( ! empty
|
71 |
-
foreach ($seopress_titles_nofollow_option as $key => $seopress_titles_nofollow_value)
|
72 |
$options[$key] = $seopress_titles_nofollow_value;
|
73 |
-
|
|
|
74 |
return $seopress_titles_nofollow_option['seopress_titles_nofollow'];
|
75 |
-
|
76 |
}
|
77 |
}
|
78 |
}
|
79 |
|
80 |
-
if (!function_exists('seopress_titles_noodp_option')) {
|
81 |
function seopress_titles_noodp_option() {
|
82 |
-
$seopress_titles_noodp_option = get_option(
|
83 |
-
if ( ! empty
|
84 |
-
foreach ($seopress_titles_noodp_option as $key => $seopress_titles_noodp_value)
|
85 |
$options[$key] = $seopress_titles_noodp_value;
|
86 |
-
|
|
|
87 |
return $seopress_titles_noodp_option['seopress_titles_noodp'];
|
88 |
-
|
89 |
}
|
90 |
}
|
91 |
}
|
92 |
|
93 |
-
if (!function_exists('seopress_titles_noarchive_option')) {
|
94 |
function seopress_titles_noarchive_option() {
|
95 |
-
$seopress_titles_noarchive_option = get_option(
|
96 |
-
if ( ! empty
|
97 |
-
foreach ($seopress_titles_noarchive_option as $key => $seopress_titles_noarchive_value)
|
98 |
$options[$key] = $seopress_titles_noarchive_value;
|
99 |
-
|
|
|
100 |
return $seopress_titles_noarchive_option['seopress_titles_noarchive'];
|
101 |
-
|
102 |
}
|
103 |
}
|
104 |
}
|
105 |
|
106 |
-
if (!function_exists('seopress_titles_nosnippet_option')) {
|
107 |
function seopress_titles_nosnippet_option() {
|
108 |
-
$seopress_titles_nosnippet_option = get_option(
|
109 |
-
if ( ! empty
|
110 |
-
foreach ($seopress_titles_nosnippet_option as $key => $seopress_titles_nosnippet_value)
|
111 |
$options[$key] = $seopress_titles_nosnippet_value;
|
112 |
-
|
|
|
113 |
return $seopress_titles_nosnippet_option['seopress_titles_nosnippet'];
|
114 |
-
|
115 |
}
|
116 |
}
|
117 |
}
|
118 |
|
119 |
-
if (!function_exists('seopress_titles_noimageindex_option')) {
|
120 |
function seopress_titles_noimageindex_option() {
|
121 |
-
$seopress_titles_noimageindex_option = get_option(
|
122 |
-
if ( ! empty
|
123 |
-
foreach ($seopress_titles_noimageindex_option as $key => $seopress_titles_noimageindex_value)
|
124 |
$options[$key] = $seopress_titles_noimageindex_value;
|
125 |
-
|
|
|
126 |
return $seopress_titles_noimageindex_option['seopress_titles_noimageindex'];
|
127 |
-
|
128 |
}
|
129 |
}
|
130 |
}
|
131 |
|
132 |
//Metaboxe position
|
133 |
-
if (!function_exists('seopress_advanced_appearance_term_metaboxe_position_option')) {
|
134 |
function seopress_advanced_appearance_term_metaboxe_position_option() {
|
135 |
-
$seopress_advanced_appearance_term_metaboxe_position_option = get_option(
|
136 |
-
if ( ! empty
|
137 |
-
foreach ($seopress_advanced_appearance_term_metaboxe_position_option as $key => $seopress_advanced_appearance_term_metaboxe_position_value)
|
138 |
$options[$key] = $seopress_advanced_appearance_term_metaboxe_position_value;
|
139 |
-
|
|
|
140 |
return $seopress_advanced_appearance_term_metaboxe_position_option['seopress_advanced_appearance_metaboxe_position'];
|
141 |
-
|
142 |
}
|
143 |
}
|
144 |
}
|
@@ -147,15 +157,14 @@ if (!function_exists('seopress_advanced_appearance_term_metaboxe_position_option
|
|
147 |
//Display metabox in Custom Taxonomy
|
148 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
149 |
function seopress_display_seo_term_metaboxe() {
|
150 |
-
|
151 |
-
add_action('init','seopress_init_term_metabox', 11);
|
152 |
|
153 |
function seopress_init_term_metabox() {
|
154 |
if (function_exists('seopress_get_taxonomies')) {
|
155 |
$seopress_get_taxonomies = seopress_get_taxonomies();
|
156 |
$seopress_get_taxonomies = apply_filters('seopress_metaboxe_term_seo', $seopress_get_taxonomies);
|
157 |
|
158 |
-
if (!empty($seopress_get_taxonomies)) {
|
159 |
if (function_exists('seopress_advanced_appearance_term_metaboxe_position_option')) {
|
160 |
switch (seopress_advanced_appearance_term_metaboxe_position_option()) {
|
161 |
case 'high':
|
@@ -176,55 +185,54 @@ function seopress_display_seo_term_metaboxe() {
|
|
176 |
}
|
177 |
$priority = apply_filters('seopress_metaboxe_term_seo_priority', $priority);
|
178 |
foreach ($seopress_get_taxonomies as $key => $value) {
|
179 |
-
add_action(
|
180 |
-
add_action(
|
181 |
}
|
182 |
}
|
183 |
}
|
184 |
}
|
185 |
|
186 |
function seopress_tax($term) {
|
187 |
-
wp_nonce_field(
|
188 |
|
189 |
global $typenow;
|
190 |
|
191 |
//init
|
192 |
-
$disabled =
|
193 |
|
194 |
-
wp_enqueue_script(
|
195 |
|
196 |
-
if (
|
197 |
//Tagify
|
198 |
-
|
199 |
-
|
200 |
wp_enqueue_style('seopress-tagify');
|
201 |
|
202 |
//Register Google Snippet Preview / Content Analysis JS
|
203 |
-
wp_enqueue_script(
|
204 |
|
205 |
-
$seopress_real_preview =
|
206 |
-
'seopress_nonce'
|
207 |
-
'seopress_real_preview'
|
208 |
-
'i18n'
|
209 |
-
'ajax_url'
|
210 |
'get_preview_meta_title' => wp_create_nonce('get_preview_meta_title'),
|
211 |
-
|
212 |
-
wp_localize_script(
|
213 |
|
214 |
-
wp_enqueue_script(
|
215 |
wp_enqueue_media();
|
216 |
}
|
217 |
|
218 |
-
$seopress_titles_title = get_term_meta($term->term_id,'_seopress_titles_title', true);
|
219 |
-
$seopress_titles_desc = get_term_meta($term->term_id,'_seopress_titles_desc', true);
|
220 |
|
221 |
$disabled['robots_index'] ='';
|
222 |
if (seopress_titles_single_term_noindex_option() || seopress_titles_noindex_option()) {
|
223 |
$seopress_robots_index = 'yes';
|
224 |
$disabled['robots_index'] = 'disabled';
|
225 |
} else {
|
226 |
-
$seopress_robots_index = get_term_meta($term->term_id,'_seopress_robots_index',true);
|
227 |
-
|
228 |
}
|
229 |
|
230 |
$disabled['robots_follow'] ='';
|
@@ -232,7 +240,7 @@ function seopress_display_seo_term_metaboxe() {
|
|
232 |
$seopress_robots_follow = 'yes';
|
233 |
$disabled['robots_follow'] = 'disabled';
|
234 |
} else {
|
235 |
-
$seopress_robots_follow = get_term_meta($term->term_id,'_seopress_robots_follow',true);
|
236 |
}
|
237 |
|
238 |
$disabled['robots_odp'] ='';
|
@@ -240,8 +248,7 @@ function seopress_display_seo_term_metaboxe() {
|
|
240 |
$seopress_robots_odp = 'yes';
|
241 |
$disabled['robots_odp'] = 'disabled';
|
242 |
} else {
|
243 |
-
$seopress_robots_odp = get_term_meta($term->term_id,'_seopress_robots_odp',true);
|
244 |
-
|
245 |
}
|
246 |
|
247 |
$disabled['archive'] ='';
|
@@ -249,7 +256,7 @@ function seopress_display_seo_term_metaboxe() {
|
|
249 |
$seopress_robots_archive = 'yes';
|
250 |
$disabled['archive'] = 'disabled';
|
251 |
} else {
|
252 |
-
$seopress_robots_archive = get_term_meta($term->term_id,'_seopress_robots_archive',true);
|
253 |
}
|
254 |
|
255 |
$disabled['snippet'] ='';
|
@@ -257,7 +264,7 @@ function seopress_display_seo_term_metaboxe() {
|
|
257 |
$seopress_robots_snippet = 'yes';
|
258 |
$disabled['snippet'] = 'disabled';
|
259 |
} else {
|
260 |
-
$seopress_robots_snippet = get_term_meta($term->term_id,'_seopress_robots_snippet',true);
|
261 |
}
|
262 |
|
263 |
$disabled['imageindex'] ='';
|
@@ -265,139 +272,141 @@ function seopress_display_seo_term_metaboxe() {
|
|
265 |
$seopress_robots_imageindex = 'yes';
|
266 |
$disabled['imageindex'] = 'disabled';
|
267 |
} else {
|
268 |
-
$seopress_robots_imageindex = get_term_meta($term->term_id,'_seopress_robots_imageindex',true);
|
269 |
}
|
270 |
|
271 |
-
$seopress_robots_canonical = get_term_meta($term->term_id,'_seopress_robots_canonical',true);
|
272 |
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
273 |
-
$seopress_robots_breadcrumbs = get_term_meta($term->term_id,'_seopress_robots_breadcrumbs',true);
|
274 |
}
|
275 |
-
$seopress_social_fb_title = get_term_meta($term->term_id,'_seopress_social_fb_title',true);
|
276 |
-
$seopress_social_fb_desc = get_term_meta($term->term_id,'_seopress_social_fb_desc',true);
|
277 |
-
$seopress_social_fb_img = get_term_meta($term->term_id,'_seopress_social_fb_img',true);
|
278 |
-
$seopress_social_twitter_title = get_term_meta($term->term_id,'_seopress_social_twitter_title',true);
|
279 |
-
$seopress_social_twitter_desc = get_term_meta($term->term_id,'_seopress_social_twitter_desc',true);
|
280 |
-
$seopress_social_twitter_img = get_term_meta($term->term_id,'_seopress_social_twitter_img',true);
|
281 |
-
$seopress_redirections_enabled = get_term_meta($term->term_id,'_seopress_redirections_enabled',true);
|
282 |
-
$seopress_redirections_type = get_term_meta($term->term_id,'_seopress_redirections_type',true);
|
283 |
-
$seopress_redirections_value = get_term_meta($term->term_id,'_seopress_redirections_value',true);
|
284 |
-
|
285 |
-
require_once
|
286 |
-
require_once
|
287 |
}
|
288 |
|
289 |
-
function seopress_tax_save_term(
|
290 |
//Nonce
|
291 |
-
if ( !isset(
|
292 |
return $term_id;
|
|
|
293 |
|
294 |
//Taxonomy object
|
295 |
$taxonomy = get_taxonomy(get_current_screen()->taxonomy);
|
296 |
|
297 |
//Check permission
|
298 |
-
if ( !current_user_can(
|
299 |
return $term_id;
|
|
|
300 |
|
301 |
-
$seo_tabs =
|
302 |
$seo_tabs = json_decode(stripslashes(htmlspecialchars_decode($_POST['seo_tabs'])));
|
303 |
|
304 |
if (in_array('title-tab', $seo_tabs)) {
|
305 |
-
if(isset($_POST['seopress_titles_title'])){
|
306 |
update_term_meta($term_id, '_seopress_titles_title', esc_html($_POST['seopress_titles_title']));
|
307 |
}
|
308 |
-
if(isset($_POST['seopress_titles_desc'])){
|
309 |
update_term_meta($term_id, '_seopress_titles_desc', esc_html($_POST['seopress_titles_desc']));
|
310 |
}
|
311 |
}
|
312 |
if (in_array('advanced-tab', $seo_tabs)) {
|
313 |
-
if(
|
314 |
-
update_term_meta(
|
315 |
} else {
|
316 |
-
delete_term_meta(
|
317 |
}
|
318 |
-
if(
|
319 |
-
update_term_meta(
|
320 |
} else {
|
321 |
-
delete_term_meta(
|
322 |
}
|
323 |
-
if(
|
324 |
-
update_term_meta(
|
325 |
} else {
|
326 |
-
delete_term_meta(
|
327 |
}
|
328 |
-
if(
|
329 |
-
update_term_meta(
|
330 |
} else {
|
331 |
-
delete_term_meta(
|
332 |
}
|
333 |
-
if(
|
334 |
-
update_term_meta(
|
335 |
} else {
|
336 |
-
delete_term_meta(
|
337 |
}
|
338 |
-
if(
|
339 |
-
update_term_meta(
|
340 |
} else {
|
341 |
-
delete_term_meta(
|
342 |
}
|
343 |
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
344 |
-
if(isset($_POST['seopress_robots_breadcrumbs'])){
|
345 |
update_term_meta($term_id, '_seopress_robots_breadcrumbs', esc_html($_POST['seopress_robots_breadcrumbs']));
|
346 |
}
|
347 |
}
|
348 |
-
if(isset($_POST['seopress_robots_canonical'])){
|
349 |
update_term_meta($term_id, '_seopress_robots_canonical', esc_html($_POST['seopress_robots_canonical']));
|
350 |
}
|
351 |
}
|
352 |
if (in_array('social-tab', $seo_tabs)) {
|
353 |
-
if(isset($_POST['seopress_social_fb_title'])){
|
354 |
update_term_meta($term_id, '_seopress_social_fb_title', esc_html($_POST['seopress_social_fb_title']));
|
355 |
}
|
356 |
-
if(isset($_POST['seopress_social_fb_desc'])){
|
357 |
update_term_meta($term_id, '_seopress_social_fb_desc', esc_html($_POST['seopress_social_fb_desc']));
|
358 |
}
|
359 |
-
if(isset($_POST['seopress_social_fb_img'])){
|
360 |
update_term_meta($term_id, '_seopress_social_fb_img', esc_html($_POST['seopress_social_fb_img']));
|
361 |
}
|
362 |
-
if(isset($_POST['seopress_social_twitter_title'])){
|
363 |
update_term_meta($term_id, '_seopress_social_twitter_title', esc_html($_POST['seopress_social_twitter_title']));
|
364 |
}
|
365 |
-
if(isset($_POST['seopress_social_twitter_desc'])){
|
366 |
update_term_meta($term_id, '_seopress_social_twitter_desc', esc_html($_POST['seopress_social_twitter_desc']));
|
367 |
}
|
368 |
-
if(isset($_POST['seopress_social_twitter_img'])){
|
369 |
update_term_meta($term_id, '_seopress_social_twitter_img', esc_html($_POST['seopress_social_twitter_img']));
|
370 |
}
|
371 |
}
|
372 |
if (in_array('redirect-tab', $seo_tabs)) {
|
373 |
-
if(isset($_POST['seopress_redirections_type'])){
|
374 |
update_term_meta($term_id, '_seopress_redirections_type', $_POST['seopress_redirections_type']);
|
375 |
}
|
376 |
-
if(isset($_POST['seopress_redirections_value'])){
|
377 |
update_term_meta($term_id, '_seopress_redirections_value', esc_html($_POST['seopress_redirections_value']));
|
378 |
}
|
379 |
-
if(
|
380 |
-
update_term_meta(
|
381 |
} else {
|
382 |
-
delete_term_meta(
|
383 |
}
|
384 |
}
|
385 |
}
|
386 |
}
|
387 |
|
388 |
if (is_user_logged_in()) {
|
389 |
-
if(is_super_admin()) {
|
390 |
echo seopress_display_seo_term_metaboxe();
|
391 |
} else {
|
392 |
global $wp_roles;
|
393 |
|
394 |
//Get current user role
|
395 |
-
if(isset(wp_get_current_user()->roles[0])) {
|
396 |
$seopress_user_role = wp_get_current_user()->roles[0];
|
397 |
|
398 |
//If current user role matchs values from Security settings then apply
|
399 |
-
if (function_exists('seopress_advanced_security_metaboxe_role_hook_option') && seopress_advanced_security_metaboxe_role_hook_option()
|
400 |
-
if(
|
401 |
//do nothing
|
402 |
} else {
|
403 |
echo seopress_display_seo_term_metaboxe();
|
1 |
<?php
|
2 |
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
6 |
//Restrict SEO metaboxes to user roles
|
7 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
8 |
function seopress_advanced_security_metaboxe_role_hook_option() {
|
9 |
+
$seopress_advanced_security_metaboxe_role_hook_option = get_option('seopress_advanced_option_name');
|
10 |
+
if ( ! empty($seopress_advanced_security_metaboxe_role_hook_option)) {
|
11 |
+
foreach ($seopress_advanced_security_metaboxe_role_hook_option as $key => $seopress_advanced_security_metaboxe_role_hook_value) {
|
12 |
$options[$key] = $seopress_advanced_security_metaboxe_role_hook_value;
|
13 |
+
}
|
14 |
+
if (isset($seopress_advanced_security_metaboxe_role_hook_option['seopress_advanced_security_metaboxe_role'])) {
|
15 |
return $seopress_advanced_security_metaboxe_role_hook_option['seopress_advanced_security_metaboxe_role'];
|
16 |
+
}
|
17 |
}
|
18 |
}
|
19 |
|
20 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
21 |
//Check global settings
|
22 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
if ( ! function_exists('seopress_titles_single_term_noindex_option')) {
|
24 |
function seopress_titles_single_term_noindex_option() {
|
25 |
global $tax;
|
26 |
$seopress_get_current_tax = $tax->name;
|
27 |
|
28 |
+
$seopress_titles_single_term_noindex_option = get_option('seopress_titles_option_name');
|
29 |
+
if ( ! empty($seopress_titles_single_term_noindex_option)) {
|
30 |
+
foreach ($seopress_titles_single_term_noindex_option as $key => $seopress_titles_single_term_noindex_value) {
|
31 |
$options[$key] = $seopress_titles_single_term_noindex_value;
|
32 |
+
}
|
33 |
+
if (isset($seopress_titles_single_term_noindex_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['noindex'])) {
|
34 |
return $seopress_titles_single_term_noindex_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['noindex'];
|
35 |
+
}
|
36 |
}
|
37 |
}
|
38 |
}
|
39 |
|
40 |
+
if ( ! function_exists('seopress_titles_noindex_option')) {
|
41 |
function seopress_titles_noindex_option() {
|
42 |
+
$seopress_titles_noindex_option = get_option('seopress_titles_option_name');
|
43 |
+
if ( ! empty($seopress_titles_noindex_option)) {
|
44 |
+
foreach ($seopress_titles_noindex_option as $key => $seopress_titles_noindex_value) {
|
45 |
$options[$key] = $seopress_titles_noindex_value;
|
46 |
+
}
|
47 |
+
if (isset($seopress_titles_noindex_option['seopress_titles_noindex'])) {
|
48 |
return $seopress_titles_noindex_option['seopress_titles_noindex'];
|
49 |
+
}
|
50 |
}
|
51 |
}
|
52 |
}
|
53 |
|
54 |
+
if ( ! function_exists('seopress_titles_single_term_nofollow_option')) {
|
55 |
function seopress_titles_single_term_nofollow_option() {
|
56 |
global $tax;
|
57 |
$seopress_get_current_tax = $tax->name;
|
58 |
|
59 |
+
$seopress_titles_single_term_nofollow_option = get_option('seopress_titles_option_name');
|
60 |
+
if ( ! empty($seopress_titles_single_term_nofollow_option)) {
|
61 |
+
foreach ($seopress_titles_single_term_nofollow_option as $key => $seopress_titles_single_term_nofollow_value) {
|
62 |
$options[$key] = $seopress_titles_single_term_nofollow_value;
|
63 |
+
}
|
64 |
+
if (isset($seopress_titles_single_term_nofollow_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['nofollow'])) {
|
65 |
return $seopress_titles_single_term_nofollow_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['nofollow'];
|
66 |
+
}
|
67 |
}
|
68 |
}
|
69 |
}
|
70 |
|
71 |
+
if ( ! function_exists('seopress_titles_nofollow_option')) {
|
72 |
function seopress_titles_nofollow_option() {
|
73 |
+
$seopress_titles_nofollow_option = get_option('seopress_titles_option_name');
|
74 |
+
if ( ! empty($seopress_titles_nofollow_option)) {
|
75 |
+
foreach ($seopress_titles_nofollow_option as $key => $seopress_titles_nofollow_value) {
|
76 |
$options[$key] = $seopress_titles_nofollow_value;
|
77 |
+
}
|
78 |
+
if (isset($seopress_titles_nofollow_option['seopress_titles_nofollow'])) {
|
79 |
return $seopress_titles_nofollow_option['seopress_titles_nofollow'];
|
80 |
+
}
|
81 |
}
|
82 |
}
|
83 |
}
|
84 |
|
85 |
+
if ( ! function_exists('seopress_titles_noodp_option')) {
|
86 |
function seopress_titles_noodp_option() {
|
87 |
+
$seopress_titles_noodp_option = get_option('seopress_titles_option_name');
|
88 |
+
if ( ! empty($seopress_titles_noodp_option)) {
|
89 |
+
foreach ($seopress_titles_noodp_option as $key => $seopress_titles_noodp_value) {
|
90 |
$options[$key] = $seopress_titles_noodp_value;
|
91 |
+
}
|
92 |
+
if (isset($seopress_titles_noodp_option['seopress_titles_noodp'])) {
|
93 |
return $seopress_titles_noodp_option['seopress_titles_noodp'];
|
94 |
+
}
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
|
99 |
+
if ( ! function_exists('seopress_titles_noarchive_option')) {
|
100 |
function seopress_titles_noarchive_option() {
|
101 |
+
$seopress_titles_noarchive_option = get_option('seopress_titles_option_name');
|
102 |
+
if ( ! empty($seopress_titles_noarchive_option)) {
|
103 |
+
foreach ($seopress_titles_noarchive_option as $key => $seopress_titles_noarchive_value) {
|
104 |
$options[$key] = $seopress_titles_noarchive_value;
|
105 |
+
}
|
106 |
+
if (isset($seopress_titles_noarchive_option['seopress_titles_noarchive'])) {
|
107 |
return $seopress_titles_noarchive_option['seopress_titles_noarchive'];
|
108 |
+
}
|
109 |
}
|
110 |
}
|
111 |
}
|
112 |
|
113 |
+
if ( ! function_exists('seopress_titles_nosnippet_option')) {
|
114 |
function seopress_titles_nosnippet_option() {
|
115 |
+
$seopress_titles_nosnippet_option = get_option('seopress_titles_option_name');
|
116 |
+
if ( ! empty($seopress_titles_nosnippet_option)) {
|
117 |
+
foreach ($seopress_titles_nosnippet_option as $key => $seopress_titles_nosnippet_value) {
|
118 |
$options[$key] = $seopress_titles_nosnippet_value;
|
119 |
+
}
|
120 |
+
if (isset($seopress_titles_nosnippet_option['seopress_titles_nosnippet'])) {
|
121 |
return $seopress_titles_nosnippet_option['seopress_titles_nosnippet'];
|
122 |
+
}
|
123 |
}
|
124 |
}
|
125 |
}
|
126 |
|
127 |
+
if ( ! function_exists('seopress_titles_noimageindex_option')) {
|
128 |
function seopress_titles_noimageindex_option() {
|
129 |
+
$seopress_titles_noimageindex_option = get_option('seopress_titles_option_name');
|
130 |
+
if ( ! empty($seopress_titles_noimageindex_option)) {
|
131 |
+
foreach ($seopress_titles_noimageindex_option as $key => $seopress_titles_noimageindex_value) {
|
132 |
$options[$key] = $seopress_titles_noimageindex_value;
|
133 |
+
}
|
134 |
+
if (isset($seopress_titles_noimageindex_option['seopress_titles_noimageindex'])) {
|
135 |
return $seopress_titles_noimageindex_option['seopress_titles_noimageindex'];
|
136 |
+
}
|
137 |
}
|
138 |
}
|
139 |
}
|
140 |
|
141 |
//Metaboxe position
|
142 |
+
if ( ! function_exists('seopress_advanced_appearance_term_metaboxe_position_option')) {
|
143 |
function seopress_advanced_appearance_term_metaboxe_position_option() {
|
144 |
+
$seopress_advanced_appearance_term_metaboxe_position_option = get_option('seopress_advanced_option_name');
|
145 |
+
if ( ! empty($seopress_advanced_appearance_term_metaboxe_position_option)) {
|
146 |
+
foreach ($seopress_advanced_appearance_term_metaboxe_position_option as $key => $seopress_advanced_appearance_term_metaboxe_position_value) {
|
147 |
$options[$key] = $seopress_advanced_appearance_term_metaboxe_position_value;
|
148 |
+
}
|
149 |
+
if (isset($seopress_advanced_appearance_term_metaboxe_position_option['seopress_advanced_appearance_metaboxe_position'])) {
|
150 |
return $seopress_advanced_appearance_term_metaboxe_position_option['seopress_advanced_appearance_metaboxe_position'];
|
151 |
+
}
|
152 |
}
|
153 |
}
|
154 |
}
|
157 |
//Display metabox in Custom Taxonomy
|
158 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
159 |
function seopress_display_seo_term_metaboxe() {
|
160 |
+
add_action('init', 'seopress_init_term_metabox', 11);
|
|
|
161 |
|
162 |
function seopress_init_term_metabox() {
|
163 |
if (function_exists('seopress_get_taxonomies')) {
|
164 |
$seopress_get_taxonomies = seopress_get_taxonomies();
|
165 |
$seopress_get_taxonomies = apply_filters('seopress_metaboxe_term_seo', $seopress_get_taxonomies);
|
166 |
|
167 |
+
if ( ! empty($seopress_get_taxonomies)) {
|
168 |
if (function_exists('seopress_advanced_appearance_term_metaboxe_position_option')) {
|
169 |
switch (seopress_advanced_appearance_term_metaboxe_position_option()) {
|
170 |
case 'high':
|
185 |
}
|
186 |
$priority = apply_filters('seopress_metaboxe_term_seo_priority', $priority);
|
187 |
foreach ($seopress_get_taxonomies as $key => $value) {
|
188 |
+
add_action($key . '_edit_form', 'seopress_tax', $priority, 2); //Edit term page
|
189 |
+
add_action('edit_' . $key, 'seopress_tax_save_term', $priority, 2); //Edit save term
|
190 |
}
|
191 |
}
|
192 |
}
|
193 |
}
|
194 |
|
195 |
function seopress_tax($term) {
|
196 |
+
wp_nonce_field(plugin_basename(__FILE__), 'seopress_cpt_nonce');
|
197 |
|
198 |
global $typenow;
|
199 |
|
200 |
//init
|
201 |
+
$disabled = [];
|
202 |
|
203 |
+
wp_enqueue_script('seopress-cpt-tabs-js', plugins_url('assets/js/seopress-tabs2.js', dirname(dirname(__FILE__))), ['jquery-ui-tabs'], SEOPRESS_VERSION);
|
204 |
|
205 |
+
if ('seopress_404' != $typenow) {
|
206 |
//Tagify
|
207 |
+
wp_enqueue_script('seopress-tagify-js', plugins_url('assets/js/tagify.min.js', dirname(dirname(__FILE__))), ['jquery'], SEOPRESS_VERSION, true);
|
208 |
+
wp_register_style('seopress-tagify', plugins_url('assets/css/tagify.min.css', dirname(dirname(__FILE__))), [], SEOPRESS_VERSION);
|
209 |
wp_enqueue_style('seopress-tagify');
|
210 |
|
211 |
//Register Google Snippet Preview / Content Analysis JS
|
212 |
+
wp_enqueue_script('seopress-cpt-counters-js', plugins_url('assets/js/seopress-counters.min.js', dirname(dirname(__FILE__))), ['jquery', 'jquery-ui-tabs', 'jquery-ui-accordion'], SEOPRESS_VERSION);
|
213 |
|
214 |
+
$seopress_real_preview = [
|
215 |
+
'seopress_nonce' => wp_create_nonce('seopress_real_preview_nonce'),
|
216 |
+
'seopress_real_preview' => admin_url('admin-ajax.php'),
|
217 |
+
'i18n' => ['progress' => __('Analysis in progress...', 'wp-seopress')],
|
218 |
+
'ajax_url' => admin_url('admin-ajax.php'),
|
219 |
'get_preview_meta_title' => wp_create_nonce('get_preview_meta_title'),
|
220 |
+
];
|
221 |
+
wp_localize_script('seopress-cpt-counters-js', 'seopressAjaxRealPreview', $seopress_real_preview);
|
222 |
|
223 |
+
wp_enqueue_script('seopress-media-uploader-js', plugins_url('assets/js/seopress-media-uploader.js', dirname(dirname(__FILE__))), ['jquery'], SEOPRESS_VERSION, false);
|
224 |
wp_enqueue_media();
|
225 |
}
|
226 |
|
227 |
+
$seopress_titles_title = get_term_meta($term->term_id, '_seopress_titles_title', true);
|
228 |
+
$seopress_titles_desc = get_term_meta($term->term_id, '_seopress_titles_desc', true);
|
229 |
|
230 |
$disabled['robots_index'] ='';
|
231 |
if (seopress_titles_single_term_noindex_option() || seopress_titles_noindex_option()) {
|
232 |
$seopress_robots_index = 'yes';
|
233 |
$disabled['robots_index'] = 'disabled';
|
234 |
} else {
|
235 |
+
$seopress_robots_index = get_term_meta($term->term_id, '_seopress_robots_index', true);
|
|
|
236 |
}
|
237 |
|
238 |
$disabled['robots_follow'] ='';
|
240 |
$seopress_robots_follow = 'yes';
|
241 |
$disabled['robots_follow'] = 'disabled';
|
242 |
} else {
|
243 |
+
$seopress_robots_follow = get_term_meta($term->term_id, '_seopress_robots_follow', true);
|
244 |
}
|
245 |
|
246 |
$disabled['robots_odp'] ='';
|
248 |
$seopress_robots_odp = 'yes';
|
249 |
$disabled['robots_odp'] = 'disabled';
|
250 |
} else {
|
251 |
+
$seopress_robots_odp = get_term_meta($term->term_id, '_seopress_robots_odp', true);
|
|
|
252 |
}
|
253 |
|
254 |
$disabled['archive'] ='';
|
256 |
$seopress_robots_archive = 'yes';
|
257 |
$disabled['archive'] = 'disabled';
|
258 |
} else {
|
259 |
+
$seopress_robots_archive = get_term_meta($term->term_id, '_seopress_robots_archive', true);
|
260 |
}
|
261 |
|
262 |
$disabled['snippet'] ='';
|
264 |
$seopress_robots_snippet = 'yes';
|
265 |
$disabled['snippet'] = 'disabled';
|
266 |
} else {
|
267 |
+
$seopress_robots_snippet = get_term_meta($term->term_id, '_seopress_robots_snippet', true);
|
268 |
}
|
269 |
|
270 |
$disabled['imageindex'] ='';
|
272 |
$seopress_robots_imageindex = 'yes';
|
273 |
$disabled['imageindex'] = 'disabled';
|
274 |
} else {
|
275 |
+
$seopress_robots_imageindex = get_term_meta($term->term_id, '_seopress_robots_imageindex', true);
|
276 |
}
|
277 |
|
278 |
+
$seopress_robots_canonical = get_term_meta($term->term_id, '_seopress_robots_canonical', true);
|
279 |
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
280 |
+
$seopress_robots_breadcrumbs = get_term_meta($term->term_id, '_seopress_robots_breadcrumbs', true);
|
281 |
}
|
282 |
+
$seopress_social_fb_title = get_term_meta($term->term_id, '_seopress_social_fb_title', true);
|
283 |
+
$seopress_social_fb_desc = get_term_meta($term->term_id, '_seopress_social_fb_desc', true);
|
284 |
+
$seopress_social_fb_img = get_term_meta($term->term_id, '_seopress_social_fb_img', true);
|
285 |
+
$seopress_social_twitter_title = get_term_meta($term->term_id, '_seopress_social_twitter_title', true);
|
286 |
+
$seopress_social_twitter_desc = get_term_meta($term->term_id, '_seopress_social_twitter_desc', true);
|
287 |
+
$seopress_social_twitter_img = get_term_meta($term->term_id, '_seopress_social_twitter_img', true);
|
288 |
+
$seopress_redirections_enabled = get_term_meta($term->term_id, '_seopress_redirections_enabled', true);
|
289 |
+
$seopress_redirections_type = get_term_meta($term->term_id, '_seopress_redirections_type', true);
|
290 |
+
$seopress_redirections_value = get_term_meta($term->term_id, '_seopress_redirections_value', true);
|
291 |
+
|
292 |
+
require_once dirname(__FILE__) . '/admin-dyn-variables-helper.php'; //Dynamic variables
|
293 |
+
require_once dirname(__FILE__) . '/admin-metaboxes-form.php'; //Metaboxe HTML
|
294 |
}
|
295 |
|
296 |
+
function seopress_tax_save_term($term_id) {
|
297 |
//Nonce
|
298 |
+
if ( ! isset($_POST['seopress_cpt_nonce']) || ! wp_verify_nonce($_POST['seopress_cpt_nonce'], plugin_basename(__FILE__))) {
|
299 |
return $term_id;
|
300 |
+
}
|
301 |
|
302 |
//Taxonomy object
|
303 |
$taxonomy = get_taxonomy(get_current_screen()->taxonomy);
|
304 |
|
305 |
//Check permission
|
306 |
+
if ( ! current_user_can($taxonomy->cap->edit_terms, $term_id)) {
|
307 |
return $term_id;
|
308 |
+
}
|
309 |
|
310 |
+
$seo_tabs = [];
|
311 |
$seo_tabs = json_decode(stripslashes(htmlspecialchars_decode($_POST['seo_tabs'])));
|
312 |
|
313 |
if (in_array('title-tab', $seo_tabs)) {
|
314 |
+
if (isset($_POST['seopress_titles_title'])) {
|
315 |
update_term_meta($term_id, '_seopress_titles_title', esc_html($_POST['seopress_titles_title']));
|
316 |
}
|
317 |
+
if (isset($_POST['seopress_titles_desc'])) {
|
318 |
update_term_meta($term_id, '_seopress_titles_desc', esc_html($_POST['seopress_titles_desc']));
|
319 |
}
|
320 |
}
|
321 |
if (in_array('advanced-tab', $seo_tabs)) {
|
322 |
+
if (isset($_POST['seopress_robots_index'])) {
|
323 |
+
update_term_meta($term_id, '_seopress_robots_index', 'yes');
|
324 |
} else {
|
325 |
+
delete_term_meta($term_id, '_seopress_robots_index', '');
|
326 |
}
|
327 |
+
if (isset($_POST['seopress_robots_follow'])) {
|
328 |
+
update_term_meta($term_id, '_seopress_robots_follow', 'yes');
|
329 |
} else {
|
330 |
+
delete_term_meta($term_id, '_seopress_robots_follow', '');
|
331 |
}
|
332 |
+
if (isset($_POST['seopress_robots_odp'])) {
|
333 |
+
update_term_meta($term_id, '_seopress_robots_odp', 'yes');
|
334 |
} else {
|
335 |
+
delete_term_meta($term_id, '_seopress_robots_odp', '');
|
336 |
}
|
337 |
+
if (isset($_POST['seopress_robots_imageindex'])) {
|
338 |
+
update_term_meta($term_id, '_seopress_robots_imageindex', 'yes');
|
339 |
} else {
|
340 |
+
delete_term_meta($term_id, '_seopress_robots_imageindex', '');
|
341 |
}
|
342 |
+
if (isset($_POST['seopress_robots_archive'])) {
|
343 |
+
update_term_meta($term_id, '_seopress_robots_archive', 'yes');
|
344 |
} else {
|
345 |
+
delete_term_meta($term_id, '_seopress_robots_archive', '');
|
346 |
}
|
347 |
+
if (isset($_POST['seopress_robots_snippet'])) {
|
348 |
+
update_term_meta($term_id, '_seopress_robots_snippet', 'yes');
|
349 |
} else {
|
350 |
+
delete_term_meta($term_id, '_seopress_robots_snippet', '');
|
351 |
}
|
352 |
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
353 |
+
if (isset($_POST['seopress_robots_breadcrumbs'])) {
|
354 |
update_term_meta($term_id, '_seopress_robots_breadcrumbs', esc_html($_POST['seopress_robots_breadcrumbs']));
|
355 |
}
|
356 |
}
|
357 |
+
if (isset($_POST['seopress_robots_canonical'])) {
|
358 |
update_term_meta($term_id, '_seopress_robots_canonical', esc_html($_POST['seopress_robots_canonical']));
|
359 |
}
|
360 |
}
|
361 |
if (in_array('social-tab', $seo_tabs)) {
|
362 |
+
if (isset($_POST['seopress_social_fb_title'])) {
|
363 |
update_term_meta($term_id, '_seopress_social_fb_title', esc_html($_POST['seopress_social_fb_title']));
|
364 |
}
|
365 |
+
if (isset($_POST['seopress_social_fb_desc'])) {
|
366 |
update_term_meta($term_id, '_seopress_social_fb_desc', esc_html($_POST['seopress_social_fb_desc']));
|
367 |
}
|
368 |
+
if (isset($_POST['seopress_social_fb_img'])) {
|
369 |
update_term_meta($term_id, '_seopress_social_fb_img', esc_html($_POST['seopress_social_fb_img']));
|
370 |
}
|
371 |
+
if (isset($_POST['seopress_social_twitter_title'])) {
|
372 |
update_term_meta($term_id, '_seopress_social_twitter_title', esc_html($_POST['seopress_social_twitter_title']));
|
373 |
}
|
374 |
+
if (isset($_POST['seopress_social_twitter_desc'])) {
|
375 |
update_term_meta($term_id, '_seopress_social_twitter_desc', esc_html($_POST['seopress_social_twitter_desc']));
|
376 |
}
|
377 |
+
if (isset($_POST['seopress_social_twitter_img'])) {
|
378 |
update_term_meta($term_id, '_seopress_social_twitter_img', esc_html($_POST['seopress_social_twitter_img']));
|
379 |
}
|
380 |
}
|
381 |
if (in_array('redirect-tab', $seo_tabs)) {
|
382 |
+
if (isset($_POST['seopress_redirections_type'])) {
|
383 |
update_term_meta($term_id, '_seopress_redirections_type', $_POST['seopress_redirections_type']);
|
384 |
}
|
385 |
+
if (isset($_POST['seopress_redirections_value'])) {
|
386 |
update_term_meta($term_id, '_seopress_redirections_value', esc_html($_POST['seopress_redirections_value']));
|
387 |
}
|
388 |
+
if (isset($_POST['seopress_redirections_enabled'])) {
|
389 |
+
update_term_meta($term_id, '_seopress_redirections_enabled', 'yes');
|
390 |
} else {
|
391 |
+
delete_term_meta($term_id, '_seopress_redirections_enabled', '');
|
392 |
}
|
393 |
}
|
394 |
}
|
395 |
}
|
396 |
|
397 |
if (is_user_logged_in()) {
|
398 |
+
if (is_super_admin()) {
|
399 |
echo seopress_display_seo_term_metaboxe();
|
400 |
} else {
|
401 |
global $wp_roles;
|
402 |
|
403 |
//Get current user role
|
404 |
+
if (isset(wp_get_current_user()->roles[0])) {
|
405 |
$seopress_user_role = wp_get_current_user()->roles[0];
|
406 |
|
407 |
//If current user role matchs values from Security settings then apply
|
408 |
+
if (function_exists('seopress_advanced_security_metaboxe_role_hook_option') && '' != seopress_advanced_security_metaboxe_role_hook_option()) {
|
409 |
+
if (array_key_exists($seopress_user_role, seopress_advanced_security_metaboxe_role_hook_option())) {
|
410 |
//do nothing
|
411 |
} else {
|
412 |
echo seopress_display_seo_term_metaboxe();
|
@@ -93,6 +93,18 @@ class SEOPRESS_Admin_Setup_Wizard {
|
|
93 |
'seopress_nonce' => wp_create_nonce('seopress_wpseo_migrate_nonce'),
|
94 |
'seopress_wpseo_migration' => admin_url('admin-ajax.php'),
|
95 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
'seopress_metadata_csv' => [
|
97 |
'seopress_nonce' => wp_create_nonce('seopress_export_csv_metadata_nonce'),
|
98 |
'seopress_metadata_export' => admin_url('admin-ajax.php'),
|
@@ -285,6 +297,9 @@ class SEOPRESS_Admin_Setup_Wizard {
|
|
285 |
<option value="wp-meta-seo-migration-tool"><?php _e('WP Meta SEO', 'wp-seopress'); ?></option>
|
286 |
<option value="premium-seo-pack-migration-tool"><?php _e('Premium SEO Pack', 'wp-seopress'); ?></option>
|
287 |
<option value="wpseo-migration-tool"><?php _e('wpSEO', 'wp-seopress'); ?></option>
|
|
|
|
|
|
|
288 |
</select>
|
289 |
|
290 |
<br><br>
|
@@ -314,14 +329,16 @@ class SEOPRESS_Admin_Setup_Wizard {
|
|
314 |
|
315 |
<!-- All In One import tool -->
|
316 |
<div id="aio-migration-tool" class="postbox section-tool seopress-wizard-services">
|
317 |
-
<h3><span><?php _e('Import posts
|
318 |
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
319 |
<ul>
|
320 |
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
321 |
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
322 |
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
323 |
-
<li><?php _e('Twitter image thumbnail', 'wp-seopress'); ?></li>
|
324 |
-
<li><?php _e('Meta Robots (noindex, nofollow)', 'wp-seopress'); ?></li>
|
|
|
|
|
325 |
</ul>
|
326 |
<p style="color:red"><span class="dashicons dashicons-warning"></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>
|
327 |
<button id="seopress-aio-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
@@ -457,6 +474,72 @@ class SEOPRESS_Admin_Setup_Wizard {
|
|
457 |
<div class="log"></div>
|
458 |
</div><!-- .inside -->
|
459 |
</div><!-- .postbox -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
</div>
|
461 |
|
462 |
<p class="seopress-setup-actions step">
|
93 |
'seopress_nonce' => wp_create_nonce('seopress_wpseo_migrate_nonce'),
|
94 |
'seopress_wpseo_migration' => admin_url('admin-ajax.php'),
|
95 |
],
|
96 |
+
'seopress_platinum_seo_migrate' => [
|
97 |
+
'seopress_nonce' => wp_create_nonce('seopress_platinum_seo_migrate_nonce'),
|
98 |
+
'seopress_platinum_seo_migration' => admin_url('admin-ajax.php'),
|
99 |
+
],
|
100 |
+
'seopress_smart_crawl_migrate' => [
|
101 |
+
'seopress_nonce' => wp_create_nonce('seopress_smart_crawl_migrate_nonce'),
|
102 |
+
'seopress_smart_crawl_migration' => admin_url('admin-ajax.php'),
|
103 |
+
],
|
104 |
+
'seopress_seopressor_migrate' => [
|
105 |
+
'seopress_nonce' => wp_create_nonce('seopress_seopressor_migrate_nonce'),
|
106 |
+
'seopress_seopressor_migration' => admin_url('admin-ajax.php'),
|
107 |
+
],
|
108 |
'seopress_metadata_csv' => [
|
109 |
'seopress_nonce' => wp_create_nonce('seopress_export_csv_metadata_nonce'),
|
110 |
'seopress_metadata_export' => admin_url('admin-ajax.php'),
|
297 |
<option value="wp-meta-seo-migration-tool"><?php _e('WP Meta SEO', 'wp-seopress'); ?></option>
|
298 |
<option value="premium-seo-pack-migration-tool"><?php _e('Premium SEO Pack', 'wp-seopress'); ?></option>
|
299 |
<option value="wpseo-migration-tool"><?php _e('wpSEO', 'wp-seopress'); ?></option>
|
300 |
+
<option value="platinum-seo-migration-tool"><?php _e('Platinum SEO Pack', 'wp-seopress'); ?></option>
|
301 |
+
<option value="smartcrawl-migration-tool"><?php _e('SmartCrawl', 'wp-seopress'); ?></option>
|
302 |
+
<option value="seopressor-migration-tool"><?php _e('SEOPressor', 'wp-seopress'); ?></option>
|
303 |
</select>
|
304 |
|
305 |
<br><br>
|
329 |
|
330 |
<!-- All In One import tool -->
|
331 |
<div id="aio-migration-tool" class="postbox section-tool seopress-wizard-services">
|
332 |
+
<h3><span><?php _e('Import posts metadata from All In One SEO', 'wp-seopress'); ?></span></h3>
|
333 |
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
334 |
<ul>
|
335 |
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
336 |
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
337 |
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
338 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
339 |
+
<li><?php _e('Meta Robots (noindex, nofollow...)', 'wp-seopress'); ?></li>
|
340 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
341 |
+
<li><?php _e('Focus keywords', 'wp-seopress'); ?></li>
|
342 |
</ul>
|
343 |
<p style="color:red"><span class="dashicons dashicons-warning"></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>
|
344 |
<button id="seopress-aio-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
474 |
<div class="log"></div>
|
475 |
</div><!-- .inside -->
|
476 |
</div><!-- .postbox -->
|
477 |
+
<!-- Platinum SEO import tool -->
|
478 |
+
<div id="platinum-seo-migration-tool" class="postbox section-tool seopress-wizard-services">
|
479 |
+
<div class="inside">
|
480 |
+
<h3><span><?php _e('Import posts and terms metadata from Platinum SEO Pack', 'wp-seopress'); ?></span></h3>
|
481 |
+
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
482 |
+
<ul>
|
483 |
+
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
484 |
+
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
485 |
+
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
486 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
487 |
+
<li><?php _e('Meta Robots (noindex, nofollow, noarchive, nosnippet, noimageindex)', 'wp-seopress'); ?></li>
|
488 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
489 |
+
<li><?php _e('Redirect URL', 'wp-seopress'); ?></li>
|
490 |
+
<li><?php _e('Primary category', 'wp-seopress'); ?></li>
|
491 |
+
<li><?php _e('Keywords', 'wp-seopress'); ?></li>
|
492 |
+
</ul>
|
493 |
+
<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 Platinum SEO data.', 'wp-seopress'); ?></p>
|
494 |
+
<button id="seopress-platinum-seo-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
495 |
+
<span class="spinner"></span>
|
496 |
+
<div class="log"></div>
|
497 |
+
</div><!-- .inside -->
|
498 |
+
</div><!-- .postbox -->
|
499 |
+
|
500 |
+
<!-- SEOPressor import tool -->
|
501 |
+
<div id="seopressor-migration-tool" class="postbox section-tool seopress-wizard-services">
|
502 |
+
<div class="inside">
|
503 |
+
<h3><span><?php _e('Import posts metadata from SEOPressor', 'wp-seopress'); ?></span></h3>
|
504 |
+
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
505 |
+
<ul>
|
506 |
+
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
507 |
+
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
508 |
+
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
509 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
510 |
+
<li><?php _e('Meta Robots (noindex, nofollow, noarchive, nosnippet, noodp, noimageindex)', 'wp-seopress'); ?></li>
|
511 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
512 |
+
<li><?php _e('Redirect URL', 'wp-seopress'); ?></li>
|
513 |
+
<li><?php _e('Keywords', 'wp-seopress'); ?></li>
|
514 |
+
</ul>
|
515 |
+
<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 SEOPressor data.', 'wp-seopress'); ?></p>
|
516 |
+
<button id="seopress-seopressor-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
517 |
+
<span class="spinner"></span>
|
518 |
+
<div class="log"></div>
|
519 |
+
</div><!-- .inside -->
|
520 |
+
</div><!-- .postbox -->
|
521 |
+
|
522 |
+
<!-- Smart Crawl import tool -->
|
523 |
+
<div id="smartcrawl-migration-tool" class="postbox section-tool seopress-wizard-services">
|
524 |
+
<div class="inside">
|
525 |
+
<h3><span><?php _e('Import posts and terms metadata from Smart Crawl', 'wp-seopress'); ?></span></h3>
|
526 |
+
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
527 |
+
<ul>
|
528 |
+
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
529 |
+
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
530 |
+
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
531 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
532 |
+
<li><?php _e('Meta Robots (noindex, nofollow, noarchive, nosnippet)', 'wp-seopress'); ?></li>
|
533 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
534 |
+
<li><?php _e('Redirect URL', 'wp-seopress'); ?></li>
|
535 |
+
<li><?php _e('Focus keywords', 'wp-seopress'); ?></li>
|
536 |
+
</ul>
|
537 |
+
<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 SmartCrawl data.', 'wp-seopress'); ?></p>
|
538 |
+
<button id="seopress-smart-crawl-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
539 |
+
<span class="spinner"></span>
|
540 |
+
<div class="log"></div>
|
541 |
+
</div><!-- .inside -->
|
542 |
+
</div><!-- .postbox -->
|
543 |
</div>
|
544 |
|
545 |
<p class="seopress-setup-actions step">
|
@@ -14,6 +14,8 @@ class seopress_options {
|
|
14 |
public function __construct() {
|
15 |
add_action('admin_menu', [$this, 'add_plugin_page'], 10);
|
16 |
add_action('admin_init', [$this, 'page_init']);
|
|
|
|
|
17 |
}
|
18 |
|
19 |
/**
|
@@ -53,54 +55,20 @@ class seopress_options {
|
|
53 |
function seopress_titles_help_tab() {
|
54 |
$screen = get_current_screen();
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
<li><span>' . __('%%post_tag%%', 'wp-seopress') . '</span>' . __('Post tag', 'wp-seopress') . '</li>
|
71 |
-
<li><span>' . __('%%_category_title%%', 'wp-seopress') . '</span>' . __('Category title', 'wp-seopress') . '</li>
|
72 |
-
<li><span>' . __('%%_category_description%%', 'wp-seopress') . '</span>' . __('Category description', 'wp-seopress') . '</li>
|
73 |
-
<li><span>' . __('%%tag_title%%', 'wp-seopress') . '</span>' . __('Tag title', 'wp-seopress') . '</li>
|
74 |
-
<li><span>' . __('%%tag_description%%', 'wp-seopress') . '</span>' . __('Tag description', 'wp-seopress') . '</li>
|
75 |
-
<li><span>' . __('%%term_title%%', 'wp-seopress') . '</span>' . __('Term title', 'wp-seopress') . '</li>
|
76 |
-
<li><span>' . __('%%term_description%%', 'wp-seopress') . '</span>' . __('Term description', 'wp-seopress') . '</li>
|
77 |
-
<li><span>' . __('%%search_keywords%%', 'wp-seopress') . '</span>' . __('Search keywords', 'wp-seopress') . '</li>
|
78 |
-
<li><span>' . __('%%current_pagination%%', 'wp-seopress') . '</span>' . __('Current number page', 'wp-seopress') . '</li>
|
79 |
-
<li><span>' . __('%%page%%', 'wp-seopress') . '</span>' . __('Current page number with context (i.e. page 1 of 3)', 'wp-seopress') . '</li>
|
80 |
-
<li><span>' . __('%%cpt_plural%%', 'wp-seopress') . '</span>' . __('Plural Post Type Archive name', 'wp-seopress') . '</li>
|
81 |
-
<li><span>' . __('%%archive_title%%', 'wp-seopress') . '</span>' . __('Archive title', 'wp-seopress') . '</li>
|
82 |
-
<li><span>' . __('%%archive_date%%', 'wp-seopress') . '</span>' . __('Date Archive', 'wp-seopress') . '</li>
|
83 |
-
<li><span>' . __('%%archive_date_day%%', 'wp-seopress') . '</span>' . __('Day Archive date', 'wp-seopress') . '</li>
|
84 |
-
<li><span>' . __('%%archive_date_month%%', 'wp-seopress') . '</span>' . __('Month Archive title', 'wp-seopress') . '</li>
|
85 |
-
<li><span>' . __('%%archive_date_year%%', 'wp-seopress') . '</span>' . __('Year Archive title', 'wp-seopress') . '</li>
|
86 |
-
<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>
|
87 |
-
<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>
|
88 |
-
<li><span>' . __('%%wc_single_cat%%', 'wp-seopress') . '</span>' . __('Single product category', 'wp-seopress') . '</li>
|
89 |
-
<li><span>' . __('%%wc_single_tag%%', 'wp-seopress') . '</span>' . __('Single product tag', 'wp-seopress') . '</li>
|
90 |
-
<li><span>' . __('%%wc_single_short_desc%%', 'wp-seopress') . '</span>' . __('Single product short description', 'wp-seopress') . '</li>
|
91 |
-
<li><span>' . __('%%wc_single_price%%', 'wp-seopress') . '</span>' . __('Single product price', 'wp-seopress') . '</li>
|
92 |
-
<li><span>' . __('%%wc_single_price_exc_tax%%', 'wp-seopress') . '</span>' . __('Single product price taxes excluded', 'wp-seopress') . '</li>
|
93 |
-
<li><span>' . __('%%wc_sku%%', 'wp-seopress') . '</span>' . __('Single SKU product', 'wp-seopress') . '</li>
|
94 |
-
<li><span>' . __('%%currentday%%', 'wp-seopress') . '</span>' . __('Current day', 'wp-seopress') . '</li>
|
95 |
-
<li><span>' . __('%%currentmonth%%', 'wp-seopress') . '</span>' . __('Current month', 'wp-seopress') . '</li>
|
96 |
-
<li><span>' . __('%%currentmonth_short%%', 'wp-seopress') . '</span>' . __('Current month in 3 letters, eg: "Jan" for "January"', 'wp-seopress') . '</li>
|
97 |
-
<li><span>' . __('%%currentyear%%', 'wp-seopress') . '</span>' . __('Current year', 'wp-seopress') . '</li>
|
98 |
-
<li><span>' . __('%%currentdate%%', 'wp-seopress') . '</span>' . __('Current date', 'wp-seopress') . '</li>
|
99 |
-
<li><span>' . __('%%currenttime%%', 'wp-seopress') . '</span>' . __('Current time', 'wp-seopress') . '</li>
|
100 |
-
<li><span>' . __('%%author_bio%%', 'wp-seopress') . '</span>' . __('Author biography (description), meta desc only', 'wp-seopress') . '</li>
|
101 |
-
<li><span>' . __('%%currentmonth_num%%', 'wp-seopress') . '</span>' . __('Current month in digital format', 'wp-seopress') . '</li>
|
102 |
-
</ul>
|
103 |
-
' . wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
104 |
|
105 |
$seopress_titles_help_robots_tab_content = wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
106 |
|
@@ -119,18 +87,18 @@ class seopress_options {
|
|
119 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
120 |
$screen->set_help_sidebar(
|
121 |
'<ul>
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
);
|
127 |
} else {
|
128 |
$screen->set_help_sidebar(
|
129 |
'<ul>
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
);
|
135 |
}
|
136 |
}
|
@@ -140,8 +108,8 @@ class seopress_options {
|
|
140 |
$screen = get_current_screen();
|
141 |
|
142 |
$seopress_xml_sitemaps_help_tab_content = '
|
143 |
-
|
144 |
-
|
145 |
|
146 |
$screen->add_help_tab([
|
147 |
'id' => 'seopress_google_analytics_help_tab',
|
@@ -152,14 +120,14 @@ class seopress_options {
|
|
152 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
153 |
$screen->set_help_sidebar(
|
154 |
'<ul>
|
155 |
-
|
156 |
-
|
157 |
);
|
158 |
} else {
|
159 |
$screen->set_help_sidebar(
|
160 |
'<ul>
|
161 |
-
|
162 |
-
|
163 |
);
|
164 |
}
|
165 |
}
|
@@ -169,8 +137,8 @@ class seopress_options {
|
|
169 |
$screen = get_current_screen();
|
170 |
|
171 |
$seopress_social_networks_help_tab_content = '
|
172 |
-
|
173 |
-
|
174 |
|
175 |
$screen->add_help_tab([
|
176 |
'id' => 'seopress_social_networks_help_tab',
|
@@ -181,14 +149,14 @@ class seopress_options {
|
|
181 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
182 |
$screen->set_help_sidebar(
|
183 |
'<ul>
|
184 |
-
|
185 |
-
|
186 |
);
|
187 |
} else {
|
188 |
$screen->set_help_sidebar(
|
189 |
'<ul>
|
190 |
-
|
191 |
-
|
192 |
);
|
193 |
}
|
194 |
}
|
@@ -198,8 +166,8 @@ class seopress_options {
|
|
198 |
$screen = get_current_screen();
|
199 |
|
200 |
$seopress_google_analytics_help_tab_content = '
|
201 |
-
|
202 |
-
|
203 |
|
204 |
$screen->add_help_tab([
|
205 |
'id' => 'seopress_google_analytics_help_tab',
|
@@ -210,14 +178,14 @@ class seopress_options {
|
|
210 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
211 |
$screen->set_help_sidebar(
|
212 |
'<ul>
|
213 |
-
|
214 |
-
|
215 |
);
|
216 |
} else {
|
217 |
$screen->set_help_sidebar(
|
218 |
'<ul>
|
219 |
-
|
220 |
-
|
221 |
);
|
222 |
}
|
223 |
}
|
@@ -232,7 +200,7 @@ class seopress_options {
|
|
232 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
233 |
<?php
|
234 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
235 |
-
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings
|
236 |
}
|
237 |
|
238 |
global $wp_version, $title;
|
@@ -310,7 +278,7 @@ class seopress_options {
|
|
310 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option" name="seopress-flush">
|
311 |
<?php
|
312 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
313 |
-
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings
|
314 |
}
|
315 |
global $wp_version, $title;
|
316 |
$current_tab = '';
|
@@ -382,7 +350,7 @@ class seopress_options {
|
|
382 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
383 |
<?php
|
384 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
385 |
-
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings
|
386 |
}
|
387 |
|
388 |
global $wp_version, $title;
|
@@ -456,7 +424,7 @@ class seopress_options {
|
|
456 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
457 |
<?php
|
458 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
459 |
-
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your
|
460 |
}
|
461 |
|
462 |
global $wp_version, $title;
|
@@ -559,7 +527,7 @@ class seopress_options {
|
|
559 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
560 |
<?php
|
561 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
562 |
-
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings
|
563 |
}
|
564 |
|
565 |
global $wp_version, $title;
|
@@ -606,14 +574,14 @@ class seopress_options {
|
|
606 |
echo '<a id="' . $tab_key . '-tab" class="nav-tab" href="?page=seopress-advanced#tab=' . $tab_key . '">' . $tab_caption . '</a>';
|
607 |
}
|
608 |
echo '</div>'; ?>
|
609 |
-
|
610 |
echo 'active';
|
611 |
} ?>" id="tab_seopress_advanced_image"><?php do_settings_sections('seopress-settings-admin-advanced-image'); ?>
|
612 |
-
|
613 |
<div class="seopress-tab <?php if ('tab_seopress_advanced_advanced' == $current_tab) {
|
614 |
echo 'active';
|
615 |
} ?>" id="tab_seopress_advanced_advanced"><?php do_settings_sections('seopress-settings-admin-advanced-advanced'); ?>
|
616 |
-
|
617 |
<div class="seopress-tab <?php if ('tab_seopress_advanced_appearance' == $current_tab) {
|
618 |
echo 'active';
|
619 |
} ?>" id="tab_seopress_advanced_appearance"><?php do_settings_sections('seopress-settings-admin-advanced-appearance'); ?></div>
|
@@ -640,11 +608,12 @@ class seopress_options {
|
|
640 |
<div id="seopress-tabs" class="wrap">
|
641 |
<?php
|
642 |
$plugin_settings_tabs = [
|
643 |
-
'
|
644 |
-
'
|
645 |
-
'
|
646 |
-
'
|
647 |
-
'
|
|
|
648 |
];
|
649 |
|
650 |
if ( ! is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
@@ -657,6 +626,16 @@ class seopress_options {
|
|
657 |
echo '<a id="' . $tab_key . '-tab" class="nav-tab" href="?page=seopress-import-export#tab=' . $tab_key . '">' . $tab_caption . '</a>';
|
658 |
}
|
659 |
echo '</div>'; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
<?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
|
661 |
<div class="seopress-tab <?php if ('tab_seopress_tool_data' == $current_tab) {
|
662 |
echo 'active';
|
@@ -720,7 +699,7 @@ class seopress_options {
|
|
720 |
<li>
|
721 |
<?php _e('Redirection (enable, type, URL)', 'wp-seopress'); ?>
|
722 |
</li>
|
723 |
-
|
724 |
<?php _e('Primary category', 'wp-seopress'); ?>
|
725 |
</li>
|
726 |
<li>
|
@@ -796,6 +775,9 @@ class seopress_options {
|
|
796 |
<option value="wp-meta-seo-migration-tool"><?php _e('WP Meta SEO', 'wp-seopress'); ?></option>
|
797 |
<option value="premium-seo-pack-migration-tool"><?php _e('Premium SEO Pack', 'wp-seopress'); ?></option>
|
798 |
<option value="wpseo-migration-tool"><?php _e('wpSEO', 'wp-seopress'); ?></option>
|
|
|
|
|
|
|
799 |
</select>
|
800 |
<br><br>
|
801 |
<p class="description"><?php _e('You don\'t have to enable the selected SEO plugin to run the import.', 'wp-seopress'); ?></p>
|
@@ -825,14 +807,16 @@ class seopress_options {
|
|
825 |
<!-- All In One import tool -->
|
826 |
<div id="aio-migration-tool" class="postbox section-tool">
|
827 |
<div class="inside">
|
828 |
-
<h3><span><?php _e('Import posts
|
829 |
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
830 |
<ul>
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
|
|
|
|
836 |
</ul>
|
837 |
<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>
|
838 |
<button id="seopress-aio-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
@@ -981,6 +965,73 @@ class seopress_options {
|
|
981 |
<div class="log"></div>
|
982 |
</div><!-- .inside -->
|
983 |
</div><!-- .postbox -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
</div>
|
985 |
<div class="seopress-tab <?php if ('tab_seopress_tool_redirects' == $current_tab) {
|
986 |
echo 'active';
|
@@ -1111,6 +1162,12 @@ class seopress_options {
|
|
1111 |
[$this, 'sanitize'] // Sanitize
|
1112 |
);
|
1113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1114 |
register_setting(
|
1115 |
'seopress_import_export_option_group', // Option group
|
1116 |
'seopress_import_export_option_name', // Option name
|
@@ -1556,6 +1613,14 @@ class seopress_options {
|
|
1556 |
'seopress_setting_section_html_sitemap' // Section
|
1557 |
);
|
1558 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1559 |
//Knowledge graph SECTION======================================================================
|
1560 |
add_settings_section(
|
1561 |
'seopress_setting_section_social_knowledge', // ID
|
@@ -1842,6 +1907,14 @@ class seopress_options {
|
|
1842 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1843 |
);
|
1844 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1845 |
add_settings_field(
|
1846 |
'seopress_google_analytics_opt_out_msg', // ID
|
1847 |
__('Consent message for user tracking', 'wp-seopress'), // Title
|
@@ -1866,6 +1939,14 @@ class seopress_options {
|
|
1866 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1867 |
);
|
1868 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1869 |
add_settings_field(
|
1870 |
'seopress_google_analytics_cb_exp_date', // ID
|
1871 |
__('User consent cookie expiration date', 'wp-seopress'), // Title
|
@@ -1900,7 +1981,7 @@ class seopress_options {
|
|
1900 |
|
1901 |
add_settings_field(
|
1902 |
'seopress_google_analytics_cb_backdrop', // ID
|
1903 |
-
|
1904 |
[$this, 'seopress_google_analytics_cb_backdrop_callback'], // Callback
|
1905 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1906 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1908,7 +1989,7 @@ class seopress_options {
|
|
1908 |
|
1909 |
add_settings_field(
|
1910 |
'seopress_google_analytics_cb_backdrop_bg', // ID
|
1911 |
-
|
1912 |
[$this, 'seopress_google_analytics_cb_backdrop_bg_callback'], // Callback
|
1913 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1914 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1916,7 +1997,7 @@ class seopress_options {
|
|
1916 |
|
1917 |
add_settings_field(
|
1918 |
'seopress_google_analytics_cb_bg', // ID
|
1919 |
-
|
1920 |
[$this, 'seopress_google_analytics_cb_bg_callback'], // Callback
|
1921 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1922 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1924,7 +2005,7 @@ class seopress_options {
|
|
1924 |
|
1925 |
add_settings_field(
|
1926 |
'seopress_google_analytics_cb_txt_col', // ID
|
1927 |
-
|
1928 |
[$this, 'seopress_google_analytics_cb_txt_col_callback'], // Callback
|
1929 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1930 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1932,7 +2013,7 @@ class seopress_options {
|
|
1932 |
|
1933 |
add_settings_field(
|
1934 |
'seopress_google_analytics_cb_lk_col', // ID
|
1935 |
-
|
1936 |
[$this, 'seopress_google_analytics_cb_lk_col_callback'], // Callback
|
1937 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1938 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1940,31 +2021,31 @@ class seopress_options {
|
|
1940 |
|
1941 |
add_settings_field(
|
1942 |
'seopress_google_analytics_cb_btn_bg', // ID
|
1943 |
-
|
1944 |
[$this, 'seopress_google_analytics_cb_btn_bg_callback'], // Callback
|
1945 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1946 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1947 |
);
|
1948 |
|
1949 |
add_settings_field(
|
1950 |
-
'
|
1951 |
-
|
1952 |
-
[$this, '
|
1953 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1954 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1955 |
);
|
1956 |
|
1957 |
add_settings_field(
|
1958 |
-
'
|
1959 |
-
|
1960 |
-
[$this, '
|
1961 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1962 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1963 |
);
|
1964 |
|
1965 |
add_settings_field(
|
1966 |
'seopress_google_analytics_cb_btn_col_hov', // ID
|
1967 |
-
|
1968 |
[$this, 'seopress_google_analytics_cb_btn_col_hov_callback'], // Callback
|
1969 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1970 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1972,7 +2053,7 @@ class seopress_options {
|
|
1972 |
|
1973 |
add_settings_field(
|
1974 |
'seopress_google_analytics_cb_btn_sec_bg', // ID
|
1975 |
-
|
1976 |
[$this, 'seopress_google_analytics_cb_btn_sec_bg_callback'], // Callback
|
1977 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1978 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1980,7 +2061,7 @@ class seopress_options {
|
|
1980 |
|
1981 |
add_settings_field(
|
1982 |
'seopress_google_analytics_cb_btn_sec_col', // ID
|
1983 |
-
|
1984 |
[$this, 'seopress_google_analytics_cb_btn_sec_col_callback'], // Callback
|
1985 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1986 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1988,7 +2069,7 @@ class seopress_options {
|
|
1988 |
|
1989 |
add_settings_field(
|
1990 |
'seopress_google_analytics_cb_btn_sec_bg_hov', // ID
|
1991 |
-
|
1992 |
[$this, 'seopress_google_analytics_cb_btn_sec_bg_hov_callback'], // Callback
|
1993 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1994 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -1996,7 +2077,7 @@ class seopress_options {
|
|
1996 |
|
1997 |
add_settings_field(
|
1998 |
'seopress_google_analytics_cb_btn_sec_col_hov', // ID
|
1999 |
-
|
2000 |
[$this, 'seopress_google_analytics_cb_btn_sec_col_hov_callback'], // Callback
|
2001 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2002 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
@@ -2712,6 +2793,55 @@ class seopress_options {
|
|
2712 |
'seopress-settings-admin-advanced-security', // Page
|
2713 |
'seopress_setting_section_advanced_security' // Section
|
2714 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2715 |
}
|
2716 |
|
2717 |
/**
|
@@ -2749,6 +2879,8 @@ class seopress_options {
|
|
2749 |
'seopress_google_analytics_download_tracking',
|
2750 |
'seopress_google_analytics_opt_out_msg',
|
2751 |
'seopress_google_analytics_opt_out_msg_ok',
|
|
|
|
|
2752 |
'seopress_google_analytics_other_tracking',
|
2753 |
'seopress_google_analytics_other_tracking_body',
|
2754 |
'seopress_google_analytics_optimize',
|
@@ -2998,25 +3130,39 @@ class seopress_options {
|
|
2998 |
}
|
2999 |
|
3000 |
public function print_section_info_google_analytics_matomo() {
|
3001 |
-
echo
|
3002 |
|
3003 |
-
echo '<p>' . __('Your <strong>Custom Dimensions</strong> will also work with Matomo tracking code', 'wp-seopress') . '</p>';
|
3004 |
}
|
3005 |
|
3006 |
public function print_section_info_advanced_image() {
|
3007 |
-
echo
|
3008 |
}
|
3009 |
|
3010 |
public function print_section_info_advanced_advanced() {
|
3011 |
-
echo
|
3012 |
}
|
3013 |
|
3014 |
public function print_section_info_advanced_appearance() {
|
3015 |
-
echo
|
3016 |
}
|
3017 |
|
3018 |
public function print_section_info_advanced_security() {
|
3019 |
-
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3020 |
}
|
3021 |
|
3022 |
/**
|
@@ -3043,7 +3189,8 @@ class seopress_options {
|
|
3043 |
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>';
|
3044 |
echo '<span id="seopress-tag-site-sep" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3045 |
echo '<span id="seopress-tag-site-desc" data-tag="%%tagline%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Tagline', 'wp-seopress') . '</span>';
|
3046 |
-
|
|
|
3047 |
}
|
3048 |
|
3049 |
public function seopress_titles_home_site_desc_callback() {
|
@@ -3052,7 +3199,8 @@ class seopress_options {
|
|
3052 |
esc_html($this->options['seopress_titles_home_site_desc'])
|
3053 |
);
|
3054 |
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>';
|
3055 |
-
|
|
|
3056 |
|
3057 |
if (get_option('page_for_posts')) {
|
3058 |
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>';
|
@@ -3145,7 +3293,7 @@ class seopress_options {
|
|
3145 |
|
3146 |
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>';
|
3147 |
|
3148 |
-
echo '
|
3149 |
|
3150 |
echo '</div>';
|
3151 |
|
@@ -3179,6 +3327,12 @@ class seopress_options {
|
|
3179 |
|
3180 |
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>';
|
3181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3182 |
if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex'])) {
|
3183 |
esc_attr($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex']);
|
3184 |
}
|
@@ -3219,7 +3373,9 @@ class seopress_options {
|
|
3219 |
}
|
3220 |
echo ' value="1"/>';
|
3221 |
|
3222 |
-
echo '<label for="seopress_titles_single_cpt_date[' . $seopress_cpt_key . ']">' . __('Display date in Google search results?', 'wp-seopress') . '</label>';
|
|
|
|
|
3223 |
|
3224 |
if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date'])) {
|
3225 |
esc_attr($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date']);
|
@@ -3268,7 +3424,7 @@ class seopress_options {
|
|
3268 |
echo '<div class="wrap-tags"><span id="seopress-tag-post-title-bd-groups" data-tag="%%post_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Post Title', 'wp-seopress') . '</span>';
|
3269 |
echo '<span id="seopress-tag-sep-bd-groups" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3270 |
echo '<span id="seopress-tag-site-title-bd-groups" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Site Title', 'wp-seopress') . '</span>';
|
3271 |
-
echo '
|
3272 |
}
|
3273 |
}
|
3274 |
|
@@ -3397,7 +3553,7 @@ class seopress_options {
|
|
3397 |
|
3398 |
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>';
|
3399 |
|
3400 |
-
echo '
|
3401 |
|
3402 |
echo '</div>';
|
3403 |
|
@@ -3430,7 +3586,7 @@ class seopress_options {
|
|
3430 |
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>';
|
3431 |
}
|
3432 |
|
3433 |
-
echo '
|
3434 |
|
3435 |
echo '</div>';
|
3436 |
|
@@ -3449,6 +3605,12 @@ class seopress_options {
|
|
3449 |
|
3450 |
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>';
|
3451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3452 |
if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex'])) {
|
3453 |
esc_attr($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex']);
|
3454 |
}
|
@@ -3522,7 +3684,7 @@ class seopress_options {
|
|
3522 |
|
3523 |
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>';
|
3524 |
|
3525 |
-
echo '
|
3526 |
|
3527 |
echo '</div>';
|
3528 |
|
@@ -3600,7 +3762,7 @@ class seopress_options {
|
|
3600 |
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>';
|
3601 |
echo '<span id="seopress-tag-sep-author" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3602 |
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>';
|
3603 |
-
echo '
|
3604 |
}
|
3605 |
|
3606 |
public function seopress_titles_archives_author_desc_callback() {
|
@@ -3665,7 +3827,7 @@ class seopress_options {
|
|
3665 |
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>';
|
3666 |
echo '<span id="seopress-tag-sep-date" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3667 |
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>';
|
3668 |
-
echo '
|
3669 |
}
|
3670 |
|
3671 |
public function seopress_titles_archives_date_desc_callback() {
|
@@ -3730,7 +3892,7 @@ class seopress_options {
|
|
3730 |
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>';
|
3731 |
echo '<span id="seopress-tag-sep-search" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3732 |
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>';
|
3733 |
-
echo '
|
3734 |
}
|
3735 |
|
3736 |
public function seopress_titles_archives_search_desc_callback() {
|
@@ -3775,7 +3937,7 @@ class seopress_options {
|
|
3775 |
);
|
3776 |
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>';
|
3777 |
echo '<span id="seopress-tag-sep-404" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3778 |
-
echo '
|
3779 |
}
|
3780 |
|
3781 |
public function seopress_titles_archives_404_desc_callback() {
|
@@ -4198,6 +4360,10 @@ class seopress_options {
|
|
4198 |
echo '<br><br><p>' . __('You can also use this shortcode:', 'wp-seopress') . '</p>';
|
4199 |
|
4200 |
echo '<pre>[seopress_html_sitemap]</pre>';
|
|
|
|
|
|
|
|
|
4201 |
}
|
4202 |
|
4203 |
public function seopress_xml_sitemap_html_exclude_callback() {
|
@@ -4288,6 +4454,24 @@ class seopress_options {
|
|
4288 |
}
|
4289 |
}
|
4290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4291 |
public function seopress_social_knowledge_type_callback() {
|
4292 |
$options = get_option('seopress_social_option_name');
|
4293 |
|
@@ -4809,6 +4993,24 @@ class seopress_options {
|
|
4809 |
}
|
4810 |
}
|
4811 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4812 |
public function seopress_google_analytics_opt_out_msg_callback() {
|
4813 |
$options = get_option('seopress_google_analytics_option_name');
|
4814 |
$check = isset($options['seopress_google_analytics_opt_out_msg']) ? $options['seopress_google_analytics_opt_out_msg'] : null;
|
@@ -4847,6 +5049,15 @@ class seopress_options {
|
|
4847 |
);
|
4848 |
}
|
4849 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4850 |
public function seopress_google_analytics_cb_exp_date_callback() {
|
4851 |
$options = get_option('seopress_google_analytics_option_name');
|
4852 |
|
@@ -4937,6 +5148,10 @@ class seopress_options {
|
|
4937 |
|
4938 |
$check = isset($options['seopress_google_analytics_cb_backdrop']);
|
4939 |
|
|
|
|
|
|
|
|
|
4940 |
echo '<input id="seopress_google_analytics_cb_backdrop" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_backdrop]" type="checkbox"';
|
4941 |
if ('1' == $check) {
|
4942 |
echo 'checked="yes"';
|
@@ -4953,6 +5168,7 @@ class seopress_options {
|
|
4953 |
public function seopress_google_analytics_cb_backdrop_bg_callback() {
|
4954 |
$check = isset($this->options['seopress_google_analytics_cb_backdrop_bg']) ? $this->options['seopress_google_analytics_cb_backdrop_bg'] : null;
|
4955 |
|
|
|
4956 |
printf(
|
4957 |
'<input type="text" data-default-color="rgba(255,255,255,0.8)" data-alpha="true" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_backdrop_bg]" aria-label="' . __('Change the background color of the backdrop', 'wp-seopress') . '" value="%s" class="seopress_admin_color_picker color-picker"/>',
|
4958 |
esc_html($check)
|
@@ -4962,6 +5178,12 @@ class seopress_options {
|
|
4962 |
public function seopress_google_analytics_cb_bg_callback() {
|
4963 |
$check = isset($this->options['seopress_google_analytics_cb_bg']) ? $this->options['seopress_google_analytics_cb_bg'] : null;
|
4964 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4965 |
printf(
|
4966 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
4967 |
esc_html($check)
|
@@ -4971,6 +5193,8 @@ class seopress_options {
|
|
4971 |
public function seopress_google_analytics_cb_txt_col_callback() {
|
4972 |
$check = isset($this->options['seopress_google_analytics_cb_txt_col']) ? $this->options['seopress_google_analytics_cb_txt_col'] : null;
|
4973 |
|
|
|
|
|
4974 |
printf(
|
4975 |
'<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"/>',
|
4976 |
esc_html($check)
|
@@ -4980,6 +5204,8 @@ class seopress_options {
|
|
4980 |
public function seopress_google_analytics_cb_lk_col_callback() {
|
4981 |
$check = isset($this->options['seopress_google_analytics_cb_lk_col']) ? $this->options['seopress_google_analytics_cb_lk_col'] : null;
|
4982 |
|
|
|
|
|
4983 |
printf(
|
4984 |
'<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"/>',
|
4985 |
esc_html($check)
|
@@ -4988,6 +5214,11 @@ class seopress_options {
|
|
4988 |
|
4989 |
public function seopress_google_analytics_cb_btn_bg_callback() {
|
4990 |
$check = isset($this->options['seopress_google_analytics_cb_btn_bg']) ? $this->options['seopress_google_analytics_cb_btn_bg'] : null;
|
|
|
|
|
|
|
|
|
|
|
4991 |
|
4992 |
printf(
|
4993 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
@@ -4998,6 +5229,8 @@ class seopress_options {
|
|
4998 |
public function seopress_google_analytics_cb_btn_bg_hov_callback() {
|
4999 |
$check = isset($this->options['seopress_google_analytics_cb_btn_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_bg_hov'] : null;
|
5000 |
|
|
|
|
|
5001 |
printf(
|
5002 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5003 |
esc_html($check)
|
@@ -5007,6 +5240,8 @@ class seopress_options {
|
|
5007 |
public function seopress_google_analytics_cb_btn_col_callback() {
|
5008 |
$check = isset($this->options['seopress_google_analytics_cb_btn_col']) ? $this->options['seopress_google_analytics_cb_btn_col'] : null;
|
5009 |
|
|
|
|
|
5010 |
printf(
|
5011 |
'<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"/>',
|
5012 |
esc_html($check)
|
@@ -5016,6 +5251,8 @@ class seopress_options {
|
|
5016 |
public function seopress_google_analytics_cb_btn_col_hov_callback() {
|
5017 |
$check = isset($this->options['seopress_google_analytics_cb_btn_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_col_hov'] : null;
|
5018 |
|
|
|
|
|
5019 |
printf(
|
5020 |
'<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"/>',
|
5021 |
esc_html($check)
|
@@ -5025,6 +5262,12 @@ class seopress_options {
|
|
5025 |
public function seopress_google_analytics_cb_btn_sec_bg_callback() {
|
5026 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg'] : null;
|
5027 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5028 |
printf(
|
5029 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5030 |
esc_html($check)
|
@@ -5034,6 +5277,8 @@ class seopress_options {
|
|
5034 |
public function seopress_google_analytics_cb_btn_sec_col_callback() {
|
5035 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_col']) ? $this->options['seopress_google_analytics_cb_btn_sec_col'] : null;
|
5036 |
|
|
|
|
|
5037 |
printf(
|
5038 |
'<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"/>',
|
5039 |
esc_html($check)
|
@@ -5043,6 +5288,8 @@ class seopress_options {
|
|
5043 |
public function seopress_google_analytics_cb_btn_sec_bg_hov_callback() {
|
5044 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg_hov'] : null;
|
5045 |
|
|
|
|
|
5046 |
printf(
|
5047 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5048 |
esc_html($check)
|
@@ -5052,6 +5299,8 @@ class seopress_options {
|
|
5052 |
public function seopress_google_analytics_cb_btn_sec_col_hov_callback() {
|
5053 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_col_hov'] : null;
|
5054 |
|
|
|
|
|
5055 |
printf(
|
5056 |
'<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"/>',
|
5057 |
esc_html($check)
|
@@ -6546,6 +6795,106 @@ class seopress_options {
|
|
6546 |
<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>
|
6547 |
<?php
|
6548 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6549 |
}
|
6550 |
|
6551 |
if (is_admin()) {
|
14 |
public function __construct() {
|
15 |
add_action('admin_menu', [$this, 'add_plugin_page'], 10);
|
16 |
add_action('admin_init', [$this, 'page_init']);
|
17 |
+
|
18 |
+
require_once dirname(__FILE__) . '/admin-dyn-variables-helper.php'; //Dynamic variables
|
19 |
}
|
20 |
|
21 |
/**
|
55 |
function seopress_titles_help_tab() {
|
56 |
$screen = get_current_screen();
|
57 |
|
58 |
+
require_once dirname(__FILE__) . '/admin-dyn-variables-helper.php'; //Dynamic variables
|
59 |
+
|
60 |
+
$dyn_var = seopress_get_dyn_variables();
|
61 |
+
|
62 |
+
$seopress_titles_help_tab_content = '<ul>';
|
63 |
+
foreach ($dyn_var as $key => $value) {
|
64 |
+
$seopress_titles_help_tab_content .= '<li>';
|
65 |
+
$seopress_titles_help_tab_content .= '<strong>' . $key . '</strong> - <em>' . $value . '</em>';
|
66 |
+
$seopress_titles_help_tab_content .= '</li>';
|
67 |
+
}
|
68 |
+
|
69 |
+
$seopress_titles_help_tab_content .= '<ul>';
|
70 |
+
|
71 |
+
$seopress_titles_help_tab_content .= wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
$seopress_titles_help_robots_tab_content = wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
74 |
|
87 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
88 |
$screen->set_help_sidebar(
|
89 |
'<ul>
|
90 |
+
<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>
|
91 |
+
<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>
|
92 |
+
<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>
|
93 |
+
</ul>'
|
94 |
);
|
95 |
} else {
|
96 |
$screen->set_help_sidebar(
|
97 |
'<ul>
|
98 |
+
<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>
|
99 |
+
<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>
|
100 |
+
<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>
|
101 |
+
</ul>'
|
102 |
);
|
103 |
}
|
104 |
}
|
108 |
$screen = get_current_screen();
|
109 |
|
110 |
$seopress_xml_sitemaps_help_tab_content = '
|
111 |
+
<p>' . __('Watch our video to learn how to enable XML sitemaps to improve crawling and them to Google Search Console.', 'wp-seopress') . '</p>
|
112 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=Bjfspe1nusY', ['width'=>530]);
|
113 |
|
114 |
$screen->add_help_tab([
|
115 |
'id' => 'seopress_google_analytics_help_tab',
|
120 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
121 |
$screen->set_help_sidebar(
|
122 |
'<ul>
|
123 |
+
<li><a href="https://www.seopress.org/fr/support/guides/activer-sitemap-xml/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
124 |
+
</ul>'
|
125 |
);
|
126 |
} else {
|
127 |
$screen->set_help_sidebar(
|
128 |
'<ul>
|
129 |
+
<li><a href="https://www.seopress.org/support/guides/enable-xml-sitemaps/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
130 |
+
</ul>'
|
131 |
);
|
132 |
}
|
133 |
}
|
137 |
$screen = get_current_screen();
|
138 |
|
139 |
$seopress_social_networks_help_tab_content = '
|
140 |
+
<p>' . __('Watch our video to learn how to edit your Open Graph and Twitters Cards tags to improve social sharing.', 'wp-seopress') . '</p>
|
141 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=TX3AUsI6vKk', ['width'=>530]);
|
142 |
|
143 |
$screen->add_help_tab([
|
144 |
'id' => 'seopress_social_networks_help_tab',
|
149 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
150 |
$screen->set_help_sidebar(
|
151 |
'<ul>
|
152 |
+
<li><a href="https://www.seopress.org/fr/support/guides/gerer-les-metas-facebook-open-graph-et-twitter-cards/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
153 |
+
</ul>'
|
154 |
);
|
155 |
} else {
|
156 |
$screen->set_help_sidebar(
|
157 |
'<ul>
|
158 |
+
<li><a href="https://www.seopress.org/support/guides/manage-facebook-open-graph-and-twitter-cards-metas/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
159 |
+
</ul>'
|
160 |
);
|
161 |
}
|
162 |
}
|
166 |
$screen = get_current_screen();
|
167 |
|
168 |
$seopress_google_analytics_help_tab_content = '
|
169 |
+
<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>
|
170 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=2EWdogYuFgs', ['width'=>530]);
|
171 |
|
172 |
$screen->add_help_tab([
|
173 |
'id' => 'seopress_google_analytics_help_tab',
|
178 |
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
179 |
$screen->set_help_sidebar(
|
180 |
'<ul>
|
181 |
+
<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>
|
182 |
+
</ul>'
|
183 |
);
|
184 |
} else {
|
185 |
$screen->set_help_sidebar(
|
186 |
'<ul>
|
187 |
+
<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>
|
188 |
+
</ul>'
|
189 |
);
|
190 |
}
|
191 |
}
|
200 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
201 |
<?php
|
202 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
203 |
+
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings have been saved.', 'wp-seopress') . '</div></div></div>';
|
204 |
}
|
205 |
|
206 |
global $wp_version, $title;
|
278 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option" name="seopress-flush">
|
279 |
<?php
|
280 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
281 |
+
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings have been saved.', 'wp-seopress') . '</div></div></div>';
|
282 |
}
|
283 |
global $wp_version, $title;
|
284 |
$current_tab = '';
|
350 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
351 |
<?php
|
352 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
353 |
+
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings have been saved.', 'wp-seopress') . '</div></div></div>';
|
354 |
}
|
355 |
|
356 |
global $wp_version, $title;
|
424 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
425 |
<?php
|
426 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
427 |
+
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your setting have been saved.', 'wp-seopress') . '</div></div></div>';
|
428 |
}
|
429 |
|
430 |
global $wp_version, $title;
|
527 |
<form method="post" action="<?php echo admin_url('options.php'); ?>" class="seopress-option">
|
528 |
<?php
|
529 |
if (isset($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
|
530 |
+
echo '<div class="sp-components-snackbar-list"><div class="sp-components-snackbar"><div class="sp-components-snackbar__content"><span class="dashicons dashicons-yes"></span>' . __('Your settings have been saved.', 'wp-seopress') . '</div></div></div>';
|
531 |
}
|
532 |
|
533 |
global $wp_version, $title;
|
574 |
echo '<a id="' . $tab_key . '-tab" class="nav-tab" href="?page=seopress-advanced#tab=' . $tab_key . '">' . $tab_caption . '</a>';
|
575 |
}
|
576 |
echo '</div>'; ?>
|
577 |
+
<div class="seopress-tab <?php if ('tab_seopress_advanced_image' == $current_tab) {
|
578 |
echo 'active';
|
579 |
} ?>" id="tab_seopress_advanced_image"><?php do_settings_sections('seopress-settings-admin-advanced-image'); ?>
|
580 |
+
</div>
|
581 |
<div class="seopress-tab <?php if ('tab_seopress_advanced_advanced' == $current_tab) {
|
582 |
echo 'active';
|
583 |
} ?>" id="tab_seopress_advanced_advanced"><?php do_settings_sections('seopress-settings-admin-advanced-advanced'); ?>
|
584 |
+
</div>
|
585 |
<div class="seopress-tab <?php if ('tab_seopress_advanced_appearance' == $current_tab) {
|
586 |
echo 'active';
|
587 |
} ?>" id="tab_seopress_advanced_appearance"><?php do_settings_sections('seopress-settings-admin-advanced-appearance'); ?></div>
|
608 |
<div id="seopress-tabs" class="wrap">
|
609 |
<?php
|
610 |
$plugin_settings_tabs = [
|
611 |
+
'tab_seopress_tool_compatibility' => __('Compatibility Center', 'wp-seopress'),
|
612 |
+
'tab_seopress_tool_data' => __('Data', 'wp-seopress'),
|
613 |
+
'tab_seopress_tool_settings' => __('Settings', 'wp-seopress'),
|
614 |
+
'tab_seopress_tool_plugins' => __('Plugins', 'wp-seopress'),
|
615 |
+
'tab_seopress_tool_redirects' => __('Redirections', 'wp-seopress'),
|
616 |
+
'tab_seopress_tool_reset' => __('Reset', 'wp-seopress'),
|
617 |
];
|
618 |
|
619 |
if ( ! is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
626 |
echo '<a id="' . $tab_key . '-tab" class="nav-tab" href="?page=seopress-import-export#tab=' . $tab_key . '">' . $tab_caption . '</a>';
|
627 |
}
|
628 |
echo '</div>'; ?>
|
629 |
+
<div class="seopress-tab <?php if ('tab_seopress_tool_compatibility' == $current_tab) {
|
630 |
+
echo 'active';
|
631 |
+
} ?>" id="tab_seopress_tool_compatibility">
|
632 |
+
<form method="post" action="<?php echo admin_url('options.php'); ?>">
|
633 |
+
<?php
|
634 |
+
settings_fields('seopress_tools_option_group');
|
635 |
+
do_settings_sections('seopress-settings-admin-tools-compatibility');
|
636 |
+
submit_button(); ?>
|
637 |
+
</form>
|
638 |
+
</div>
|
639 |
<?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
|
640 |
<div class="seopress-tab <?php if ('tab_seopress_tool_data' == $current_tab) {
|
641 |
echo 'active';
|
699 |
<li>
|
700 |
<?php _e('Redirection (enable, type, URL)', 'wp-seopress'); ?>
|
701 |
</li>
|
702 |
+
<li>
|
703 |
<?php _e('Primary category', 'wp-seopress'); ?>
|
704 |
</li>
|
705 |
<li>
|
775 |
<option value="wp-meta-seo-migration-tool"><?php _e('WP Meta SEO', 'wp-seopress'); ?></option>
|
776 |
<option value="premium-seo-pack-migration-tool"><?php _e('Premium SEO Pack', 'wp-seopress'); ?></option>
|
777 |
<option value="wpseo-migration-tool"><?php _e('wpSEO', 'wp-seopress'); ?></option>
|
778 |
+
<option value="platinum-seo-migration-tool"><?php _e('Platinum SEO Pack', 'wp-seopress'); ?></option>
|
779 |
+
<option value="smartcrawl-migration-tool"><?php _e('SmartCrawl', 'wp-seopress'); ?></option>
|
780 |
+
<option value="seopressor-migration-tool"><?php _e('SEOPressor', 'wp-seopress'); ?></option>
|
781 |
</select>
|
782 |
<br><br>
|
783 |
<p class="description"><?php _e('You don\'t have to enable the selected SEO plugin to run the import.', 'wp-seopress'); ?></p>
|
807 |
<!-- All In One import tool -->
|
808 |
<div id="aio-migration-tool" class="postbox section-tool">
|
809 |
<div class="inside">
|
810 |
+
<h3><span><?php _e('Import posts metadata from All In One SEO', '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...)', 'wp-seopress'); ?></li>
|
818 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
819 |
+
<li><?php _e('Focus keyword', '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 AIO data.', 'wp-seopress'); ?></p>
|
822 |
<button id="seopress-aio-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
965 |
<div class="log"></div>
|
966 |
</div><!-- .inside -->
|
967 |
</div><!-- .postbox -->
|
968 |
+
|
969 |
+
<!-- Platinum SEO import tool -->
|
970 |
+
<div id="platinum-seo-migration-tool" class="postbox section-tool">
|
971 |
+
<div class="inside">
|
972 |
+
<h3><span><?php _e('Import posts and terms metadata from Platinum SEO Pack', 'wp-seopress'); ?></span></h3>
|
973 |
+
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
974 |
+
<ul>
|
975 |
+
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
976 |
+
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
977 |
+
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
978 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
979 |
+
<li><?php _e('Meta Robots (noindex, nofollow, noarchive, nosnippet, noimageindex)', 'wp-seopress'); ?></li>
|
980 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
981 |
+
<li><?php _e('Redirect URL', 'wp-seopress'); ?></li>
|
982 |
+
<li><?php _e('Primary category', 'wp-seopress'); ?></li>
|
983 |
+
<li><?php _e('Keywords', 'wp-seopress'); ?></li>
|
984 |
+
</ul>
|
985 |
+
<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 Platinum SEO data.', 'wp-seopress'); ?></p>
|
986 |
+
<button id="seopress-platinum-seo-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
987 |
+
<span class="spinner"></span>
|
988 |
+
<div class="log"></div>
|
989 |
+
</div><!-- .inside -->
|
990 |
+
</div><!-- .postbox -->
|
991 |
+
|
992 |
+
<!-- Smart Crawl import tool -->
|
993 |
+
<div id="smartcrawl-migration-tool" class="postbox section-tool">
|
994 |
+
<div class="inside">
|
995 |
+
<h3><span><?php _e('Import posts and terms metadata from Smart Crawl', 'wp-seopress'); ?></span></h3>
|
996 |
+
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
997 |
+
<ul>
|
998 |
+
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
999 |
+
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
1000 |
+
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
1001 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
1002 |
+
<li><?php _e('Meta Robots (noindex, nofollow, noarchive, nosnippet)', 'wp-seopress'); ?></li>
|
1003 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
1004 |
+
<li><?php _e('Redirect URL', 'wp-seopress'); ?></li>
|
1005 |
+
<li><?php _e('Focus keywords', 'wp-seopress'); ?></li>
|
1006 |
+
</ul>
|
1007 |
+
<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 SmartCrawl data.', 'wp-seopress'); ?></p>
|
1008 |
+
<button id="seopress-smart-crawl-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
1009 |
+
<span class="spinner"></span>
|
1010 |
+
<div class="log"></div>
|
1011 |
+
</div><!-- .inside -->
|
1012 |
+
</div><!-- .postbox -->
|
1013 |
+
|
1014 |
+
<!-- SEOPressor import tool -->
|
1015 |
+
<div id="seopressor-migration-tool" class="postbox section-tool">
|
1016 |
+
<div class="inside">
|
1017 |
+
<h3><span><?php _e('Import posts metadata from SEOPressor', 'wp-seopress'); ?></span></h3>
|
1018 |
+
<p><?php _e('By clicking Migrate, we\'ll import:', 'wp-seopress'); ?></p>
|
1019 |
+
<ul>
|
1020 |
+
<li><?php _e('Title tags', 'wp-seopress'); ?></li>
|
1021 |
+
<li><?php _e('Meta description', 'wp-seopress'); ?></li>
|
1022 |
+
<li><?php _e('Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
1023 |
+
<li><?php _e('Twitter tags (title, description and image thumbnail)', 'wp-seopress'); ?></li>
|
1024 |
+
<li><?php _e('Meta Robots (noindex, nofollow, noarchive, nosnippet, noodp, noimageindex)', 'wp-seopress'); ?></li>
|
1025 |
+
<li><?php _e('Canonical URL', 'wp-seopress'); ?></li>
|
1026 |
+
<li><?php _e('Redirect URL', 'wp-seopress'); ?></li>
|
1027 |
+
<li><?php _e('Keywords', 'wp-seopress'); ?></li>
|
1028 |
+
</ul>
|
1029 |
+
<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 SEOPressor data.', 'wp-seopress'); ?></p>
|
1030 |
+
<button id="seopress-seopressor-migrate" type="button" class="button"><?php _e('Migrate now', 'wp-seopress'); ?></button>
|
1031 |
+
<span class="spinner"></span>
|
1032 |
+
<div class="log"></div>
|
1033 |
+
</div><!-- .inside -->
|
1034 |
+
</div><!-- .postbox -->
|
1035 |
</div>
|
1036 |
<div class="seopress-tab <?php if ('tab_seopress_tool_redirects' == $current_tab) {
|
1037 |
echo 'active';
|
1162 |
[$this, 'sanitize'] // Sanitize
|
1163 |
);
|
1164 |
|
1165 |
+
register_setting(
|
1166 |
+
'seopress_tools_option_group', // Option group
|
1167 |
+
'seopress_tools_option_name', // Option name
|
1168 |
+
[$this, 'sanitize'] // Sanitize
|
1169 |
+
);
|
1170 |
+
|
1171 |
register_setting(
|
1172 |
'seopress_import_export_option_group', // Option group
|
1173 |
'seopress_import_export_option_name', // Option name
|
1613 |
'seopress_setting_section_html_sitemap' // Section
|
1614 |
);
|
1615 |
|
1616 |
+
add_settings_field(
|
1617 |
+
'seopress_xml_sitemap_html_archive_links', // ID
|
1618 |
+
__('Remove links from archive pages', 'wp-seopress'), // Title
|
1619 |
+
[$this, 'seopress_xml_sitemap_html_archive_links_callback'], // Callback
|
1620 |
+
'seopress-settings-admin-html-sitemap', // Page
|
1621 |
+
'seopress_setting_section_html_sitemap' // Section
|
1622 |
+
);
|
1623 |
+
|
1624 |
//Knowledge graph SECTION======================================================================
|
1625 |
add_settings_section(
|
1626 |
'seopress_setting_section_social_knowledge', // ID
|
1907 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1908 |
);
|
1909 |
|
1910 |
+
add_settings_field(
|
1911 |
+
'seopress_google_analytics_opt_out_edit_choice', // ID
|
1912 |
+
__('Allow user to change its choice', 'wp-seopress'), // Title
|
1913 |
+
[$this, 'seopress_google_analytics_opt_out_edit_choice_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_opt_out_msg', // ID
|
1920 |
__('Consent message for user tracking', 'wp-seopress'), // Title
|
1939 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1940 |
);
|
1941 |
|
1942 |
+
add_settings_field(
|
1943 |
+
'seopress_google_analytics_opt_out_msg_edit', // ID
|
1944 |
+
__('Edit cookies button', 'wp-seopress'), // Title
|
1945 |
+
[$this, 'seopress_google_analytics_opt_out_msg_edit_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_exp_date', // ID
|
1952 |
__('User consent cookie expiration date', 'wp-seopress'), // Title
|
1981 |
|
1982 |
add_settings_field(
|
1983 |
'seopress_google_analytics_cb_backdrop', // ID
|
1984 |
+
'', // Title
|
1985 |
[$this, 'seopress_google_analytics_cb_backdrop_callback'], // Callback
|
1986 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1987 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1989 |
|
1990 |
add_settings_field(
|
1991 |
'seopress_google_analytics_cb_backdrop_bg', // ID
|
1992 |
+
'', // Title
|
1993 |
[$this, 'seopress_google_analytics_cb_backdrop_bg_callback'], // Callback
|
1994 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
1995 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
1997 |
|
1998 |
add_settings_field(
|
1999 |
'seopress_google_analytics_cb_bg', // ID
|
2000 |
+
'', // Title
|
2001 |
[$this, 'seopress_google_analytics_cb_bg_callback'], // Callback
|
2002 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2003 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2005 |
|
2006 |
add_settings_field(
|
2007 |
'seopress_google_analytics_cb_txt_col', // ID
|
2008 |
+
'', // Title
|
2009 |
[$this, 'seopress_google_analytics_cb_txt_col_callback'], // Callback
|
2010 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2011 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2013 |
|
2014 |
add_settings_field(
|
2015 |
'seopress_google_analytics_cb_lk_col', // ID
|
2016 |
+
'', // Title
|
2017 |
[$this, 'seopress_google_analytics_cb_lk_col_callback'], // Callback
|
2018 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2019 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2021 |
|
2022 |
add_settings_field(
|
2023 |
'seopress_google_analytics_cb_btn_bg', // ID
|
2024 |
+
'', // Title
|
2025 |
[$this, 'seopress_google_analytics_cb_btn_bg_callback'], // Callback
|
2026 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2027 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2028 |
);
|
2029 |
|
2030 |
add_settings_field(
|
2031 |
+
'seopress_google_analytics_cb_btn_bg_hov', // ID
|
2032 |
+
'', // Title
|
2033 |
+
[$this, 'seopress_google_analytics_cb_btn_bg_hov_callback'], // Callback
|
2034 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2035 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2036 |
);
|
2037 |
|
2038 |
add_settings_field(
|
2039 |
+
'seopress_google_analytics_cb_btn_col', // ID
|
2040 |
+
'', // Title
|
2041 |
+
[$this, 'seopress_google_analytics_cb_btn_col_callback'], // Callback
|
2042 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2043 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2044 |
);
|
2045 |
|
2046 |
add_settings_field(
|
2047 |
'seopress_google_analytics_cb_btn_col_hov', // ID
|
2048 |
+
'', // Title
|
2049 |
[$this, 'seopress_google_analytics_cb_btn_col_hov_callback'], // Callback
|
2050 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2051 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2053 |
|
2054 |
add_settings_field(
|
2055 |
'seopress_google_analytics_cb_btn_sec_bg', // ID
|
2056 |
+
'', // Title
|
2057 |
[$this, 'seopress_google_analytics_cb_btn_sec_bg_callback'], // Callback
|
2058 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2059 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2061 |
|
2062 |
add_settings_field(
|
2063 |
'seopress_google_analytics_cb_btn_sec_col', // ID
|
2064 |
+
'', // Title
|
2065 |
[$this, 'seopress_google_analytics_cb_btn_sec_col_callback'], // Callback
|
2066 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2067 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2069 |
|
2070 |
add_settings_field(
|
2071 |
'seopress_google_analytics_cb_btn_sec_bg_hov', // ID
|
2072 |
+
'', // Title
|
2073 |
[$this, 'seopress_google_analytics_cb_btn_sec_bg_hov_callback'], // Callback
|
2074 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2075 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2077 |
|
2078 |
add_settings_field(
|
2079 |
'seopress_google_analytics_cb_btn_sec_col_hov', // ID
|
2080 |
+
'', // Title
|
2081 |
[$this, 'seopress_google_analytics_cb_btn_sec_col_hov_callback'], // Callback
|
2082 |
'seopress-settings-admin-google-analytics-gdpr', // Page
|
2083 |
'seopress_setting_section_google_analytics_gdpr' // Section
|
2793 |
'seopress-settings-admin-advanced-security', // Page
|
2794 |
'seopress_setting_section_advanced_security' // Section
|
2795 |
);
|
2796 |
+
|
2797 |
+
//Tools SECTION=======================================================================
|
2798 |
+
add_settings_section(
|
2799 |
+
'seopress_setting_section_tools_compatibility', // ID
|
2800 |
+
'',
|
2801 |
+
//__("Compatibility Center","wp-seopress"), // Title
|
2802 |
+
[$this, 'print_section_info_tools_compatibility'], // Callback
|
2803 |
+
'seopress-settings-admin-tools-compatibility' // Page
|
2804 |
+
);
|
2805 |
+
|
2806 |
+
add_settings_field(
|
2807 |
+
'seopress_setting_section_tools_compatibility_oxygen', // ID
|
2808 |
+
__('Oxygen Builder compatibility', 'wp-seopress'), // Title
|
2809 |
+
[$this, 'seopress_setting_section_tools_compatibility_oxygen_callback'], // Callback
|
2810 |
+
'seopress-settings-admin-tools-compatibility', // Page
|
2811 |
+
'seopress_setting_section_tools_compatibility' // Section
|
2812 |
+
);
|
2813 |
+
|
2814 |
+
add_settings_field(
|
2815 |
+
'seopress_setting_section_tools_compatibility_divi', // ID
|
2816 |
+
__('Divi Builder compatibility', 'wp-seopress'), // Title
|
2817 |
+
[$this, 'seopress_setting_section_tools_compatibility_divi_callback'], // Callback
|
2818 |
+
'seopress-settings-admin-tools-compatibility', // Page
|
2819 |
+
'seopress_setting_section_tools_compatibility' // Section
|
2820 |
+
);
|
2821 |
+
|
2822 |
+
add_settings_field(
|
2823 |
+
'seopress_setting_section_tools_compatibility_bakery', // ID
|
2824 |
+
__('WP Bakery Builder compatibility', 'wp-seopress'), // Title
|
2825 |
+
[$this, 'seopress_setting_section_tools_compatibility_bakery_callback'], // Callback
|
2826 |
+
'seopress-settings-admin-tools-compatibility', // Page
|
2827 |
+
'seopress_setting_section_tools_compatibility' // Section
|
2828 |
+
);
|
2829 |
+
|
2830 |
+
add_settings_field(
|
2831 |
+
'seopress_setting_section_tools_compatibility_avia', // ID
|
2832 |
+
__('Avia Layout Builder compatibility', 'wp-seopress'), // Title
|
2833 |
+
[$this, 'seopress_setting_section_tools_compatibility_avia_callback'], // Callback
|
2834 |
+
'seopress-settings-admin-tools-compatibility', // Page
|
2835 |
+
'seopress_setting_section_tools_compatibility' // Section
|
2836 |
+
);
|
2837 |
+
|
2838 |
+
add_settings_field(
|
2839 |
+
'seopress_setting_section_tools_compatibility_fusion', // ID
|
2840 |
+
__('Fusion Builder compatibility', 'wp-seopress'), // Title
|
2841 |
+
[$this, 'seopress_setting_section_tools_compatibility_fusion_callback'], // Callback
|
2842 |
+
'seopress-settings-admin-tools-compatibility', // Page
|
2843 |
+
'seopress_setting_section_tools_compatibility' // Section
|
2844 |
+
);
|
2845 |
}
|
2846 |
|
2847 |
/**
|
2879 |
'seopress_google_analytics_download_tracking',
|
2880 |
'seopress_google_analytics_opt_out_msg',
|
2881 |
'seopress_google_analytics_opt_out_msg_ok',
|
2882 |
+
'seopress_google_analytics_opt_out_msg_close',
|
2883 |
+
'seopress_google_analytics_opt_out_msg_edit',
|
2884 |
'seopress_google_analytics_other_tracking',
|
2885 |
'seopress_google_analytics_other_tracking_body',
|
2886 |
'seopress_google_analytics_optimize',
|
3130 |
}
|
3131 |
|
3132 |
public function print_section_info_google_analytics_matomo() {
|
3133 |
+
echo '<p>' . __('Use Matomo to track your users with privacy in mind.', 'wp-seopress') . '</p>';
|
3134 |
|
3135 |
+
echo '<p>' . __('Your <strong>Custom Dimensions</strong> will also work with Matomo tracking code.', 'wp-seopress') . '</p>';
|
3136 |
}
|
3137 |
|
3138 |
public function print_section_info_advanced_image() {
|
3139 |
+
echo '<p>' . __('Image SEO options.', 'wp-seopress') . '</p>';
|
3140 |
}
|
3141 |
|
3142 |
public function print_section_info_advanced_advanced() {
|
3143 |
+
echo '<p>' . __('Advanced SEO options.', 'wp-seopress') . '</p>';
|
3144 |
}
|
3145 |
|
3146 |
public function print_section_info_advanced_appearance() {
|
3147 |
+
echo '<p>' . __('Customize the plugin to fit your needs.', 'wp-seopress') . '</p>';
|
3148 |
}
|
3149 |
|
3150 |
public function print_section_info_advanced_security() {
|
3151 |
+
echo '<p>' . __('Manage security.', 'wp-seopress') . '</p>';
|
3152 |
+
}
|
3153 |
+
|
3154 |
+
public function print_section_info_tools_compatibility() {
|
3155 |
+
echo '<p>' . __('Our <strong>Compatibility Center</strong> makes it easy to integrate SEOPress with your favorite tools.', 'wp-seopress') . '</p>';
|
3156 |
+
echo '<p>' . __('Even though a lot of things are completely transparent to you and automated, sometimes it is necessary to leave the final choice to you.', 'wp-seopress') . '</p>';
|
3157 |
+
echo '<p style="color:red">' . __('<span class="dashicons dashicons-info"></span> <strong>Warning</strong>: always test your site after activating one of these options. Running shortcodes to automatically generate meta title / description can have side effects. Clear your cache if necessary.', 'wp-seopress') . '</p>';
|
3158 |
+
|
3159 |
+
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
3160 |
+
$seopress_docs_link['support']['compatibility']['automatic'] = 'https://www.seopress.org/fr/support/guides/generez-automatiquement-meta-descriptions-divi-oxygen-builder/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
3161 |
+
} else {
|
3162 |
+
$seopress_docs_link['support']['compatibility']['automatic'] = 'https://www.seopress.org/support/guides/generate-automatic-meta-description-from-page-builders/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
3163 |
+
}
|
3164 |
+
|
3165 |
+
echo '<a class="seopress-doc" href="' . $seopress_docs_link['support']['compatibility']['automatic'] . '" target="_blank"><span class="dashicons dashicons-info" title="' . __('Learn more about automatic meta descriptions', 'wp-seopress-pro') . '"></span></a></p>';
|
3166 |
}
|
3167 |
|
3168 |
/**
|
3189 |
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>';
|
3190 |
echo '<span id="seopress-tag-site-sep" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3191 |
echo '<span id="seopress-tag-site-desc" data-tag="%%tagline%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Tagline', 'wp-seopress') . '</span>';
|
3192 |
+
|
3193 |
+
echo seopress_render_dyn_variables('tag-title');
|
3194 |
}
|
3195 |
|
3196 |
public function seopress_titles_home_site_desc_callback() {
|
3199 |
esc_html($this->options['seopress_titles_home_site_desc'])
|
3200 |
);
|
3201 |
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>';
|
3202 |
+
|
3203 |
+
echo seopress_render_dyn_variables('tag-description');
|
3204 |
|
3205 |
if (get_option('page_for_posts')) {
|
3206 |
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>';
|
3293 |
|
3294 |
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>';
|
3295 |
|
3296 |
+
echo seopress_render_dyn_variables('tag-title');
|
3297 |
|
3298 |
echo '</div>';
|
3299 |
|
3327 |
|
3328 |
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>';
|
3329 |
|
3330 |
+
$cpt_in_sitemap = seopress_get_service('SitemapOption')->getPostTypesList();
|
3331 |
+
|
3332 |
+
if ('1' == $check && isset($cpt_in_sitemap[$seopress_cpt_key]) && '1' === $cpt_in_sitemap[$seopress_cpt_key]['include']) {
|
3333 |
+
echo '<p class="seopress-notice error notice">' . __('This custom post type is <strong>NOT</strong> excluded from your XML sitemaps despite the fact that it is set to <strong>NOINDEX</strong>. We recommend that you check this out.', 'wp-seopress') . '</p><br>';
|
3334 |
+
}
|
3335 |
+
|
3336 |
if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex'])) {
|
3337 |
esc_attr($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['noindex']);
|
3338 |
}
|
3373 |
}
|
3374 |
echo ' value="1"/>';
|
3375 |
|
3376 |
+
echo '<label for="seopress_titles_single_cpt_date[' . $seopress_cpt_key . ']">' . __('Display date in Google search results by adding <code>article:published_time</code> and <code>article:modified_time</code> meta?', 'wp-seopress') . '</label>';
|
3377 |
+
|
3378 |
+
echo '<p class="description">' . __('Unchecking this doesn\'t prevent Google to display post date in search results.', 'wp-seopress') . '</p><br>';
|
3379 |
|
3380 |
if (isset($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date'])) {
|
3381 |
esc_attr($this->options['seopress_titles_single_titles'][$seopress_cpt_key]['date']);
|
3424 |
echo '<div class="wrap-tags"><span id="seopress-tag-post-title-bd-groups" data-tag="%%post_title%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Post Title', 'wp-seopress') . '</span>';
|
3425 |
echo '<span id="seopress-tag-sep-bd-groups" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3426 |
echo '<span id="seopress-tag-site-title-bd-groups" data-tag="%%sitetitle%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Site Title', 'wp-seopress') . '</span>';
|
3427 |
+
echo seopress_render_dyn_variables('tag-title');
|
3428 |
}
|
3429 |
}
|
3430 |
|
3553 |
|
3554 |
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>';
|
3555 |
|
3556 |
+
echo seopress_render_dyn_variables('tag-title');
|
3557 |
|
3558 |
echo '</div>';
|
3559 |
|
3586 |
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>';
|
3587 |
}
|
3588 |
|
3589 |
+
echo seopress_render_dyn_variables('tag-title');
|
3590 |
|
3591 |
echo '</div>';
|
3592 |
|
3605 |
|
3606 |
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>';
|
3607 |
|
3608 |
+
$tax_in_sitemap = seopress_get_service('SitemapOption')->getTaxonomiesList();
|
3609 |
+
|
3610 |
+
if ('1' == $check && isset($tax_in_sitemap[$seopress_tax_key]) && '1' === $tax_in_sitemap[$seopress_tax_key]['include']) {
|
3611 |
+
echo '<p class="seopress-notice error notice">' . __('This custom taxonomy is <strong>NOT</strong> excluded from your XML sitemaps despite the fact that it is set to <strong>NOINDEX</strong>. We recommend that you check this out.', 'wp-seopress') . '</p><br>';
|
3612 |
+
}
|
3613 |
+
|
3614 |
if (isset($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex'])) {
|
3615 |
esc_attr($this->options['seopress_titles_tax_titles'][$seopress_tax_key]['noindex']);
|
3616 |
}
|
3684 |
|
3685 |
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>';
|
3686 |
|
3687 |
+
echo seopress_render_dyn_variables('tag-title');
|
3688 |
|
3689 |
echo '</div>';
|
3690 |
|
3762 |
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>';
|
3763 |
echo '<span id="seopress-tag-sep-author" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3764 |
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>';
|
3765 |
+
echo seopress_render_dyn_variables('tag-title');
|
3766 |
}
|
3767 |
|
3768 |
public function seopress_titles_archives_author_desc_callback() {
|
3827 |
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>';
|
3828 |
echo '<span id="seopress-tag-sep-date" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3829 |
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>';
|
3830 |
+
echo seopress_render_dyn_variables('tag-title');
|
3831 |
}
|
3832 |
|
3833 |
public function seopress_titles_archives_date_desc_callback() {
|
3892 |
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>';
|
3893 |
echo '<span id="seopress-tag-sep-search" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3894 |
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>';
|
3895 |
+
echo seopress_render_dyn_variables('tag-title');
|
3896 |
}
|
3897 |
|
3898 |
public function seopress_titles_archives_search_desc_callback() {
|
3937 |
);
|
3938 |
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>';
|
3939 |
echo '<span id="seopress-tag-sep-404" data-tag="%%sep%%" class="tag-title"><span class="dashicons dashicons-plus"></span>' . __('Separator', 'wp-seopress') . '</span>';
|
3940 |
+
echo seopress_render_dyn_variables('tag-title');
|
3941 |
}
|
3942 |
|
3943 |
public function seopress_titles_archives_404_desc_callback() {
|
4360 |
echo '<br><br><p>' . __('You can also use this shortcode:', 'wp-seopress') . '</p>';
|
4361 |
|
4362 |
echo '<pre>[seopress_html_sitemap]</pre>';
|
4363 |
+
|
4364 |
+
echo '<br><br><p>' . __('To include specific custom post types, use the CPT attribute:', 'wp-seopress') . '</p>';
|
4365 |
+
|
4366 |
+
echo '<pre>[seopress_html_sitemap cpt="post,product"]</pre>';
|
4367 |
}
|
4368 |
|
4369 |
public function seopress_xml_sitemap_html_exclude_callback() {
|
4454 |
}
|
4455 |
}
|
4456 |
|
4457 |
+
public function seopress_xml_sitemap_html_archive_links_callback() {
|
4458 |
+
$options = get_option('seopress_xml_sitemap_option_name');
|
4459 |
+
|
4460 |
+
$check = isset($options['seopress_xml_sitemap_html_archive_links']);
|
4461 |
+
|
4462 |
+
echo '<input id="seopress_xml_sitemap_html_archive_links" name="seopress_xml_sitemap_option_name[seopress_xml_sitemap_html_archive_links]" type="checkbox"';
|
4463 |
+
if ('1' == $check) {
|
4464 |
+
echo 'checked="yes"';
|
4465 |
+
}
|
4466 |
+
echo ' value="1"/>';
|
4467 |
+
|
4468 |
+
echo '<label for="seopress_xml_sitemap_html_archive_links">' . __('Remove links from archive pages (eg: Products)', 'wp-seopress') . '</label>';
|
4469 |
+
|
4470 |
+
if (isset($this->options['seopress_xml_sitemap_html_archive_links'])) {
|
4471 |
+
esc_attr($this->options['seopress_xml_sitemap_html_archive_links']);
|
4472 |
+
}
|
4473 |
+
}
|
4474 |
+
|
4475 |
public function seopress_social_knowledge_type_callback() {
|
4476 |
$options = get_option('seopress_social_option_name');
|
4477 |
|
4993 |
}
|
4994 |
}
|
4995 |
|
4996 |
+
public function seopress_google_analytics_opt_out_edit_choice_callback() {
|
4997 |
+
$options = get_option('seopress_google_analytics_option_name');
|
4998 |
+
|
4999 |
+
$check = isset($options['seopress_google_analytics_opt_out_edit_choice']);
|
5000 |
+
|
5001 |
+
echo '<input id="seopress_google_analytics_opt_out_edit_choice" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_edit_choice]" type="checkbox"';
|
5002 |
+
if ('1' == $check) {
|
5003 |
+
echo 'checked="yes"';
|
5004 |
+
}
|
5005 |
+
echo ' value="1"/>';
|
5006 |
+
|
5007 |
+
echo '<label for="seopress_google_analytics_opt_out_edit_choice">' . __('Allow user to change its choice about cookies', 'wp-seopress') . '</label>';
|
5008 |
+
|
5009 |
+
if (isset($this->options['seopress_google_analytics_opt_out_edit_choice'])) {
|
5010 |
+
esc_attr($this->options['seopress_google_analytics_opt_out_edit_choice']);
|
5011 |
+
}
|
5012 |
+
}
|
5013 |
+
|
5014 |
public function seopress_google_analytics_opt_out_msg_callback() {
|
5015 |
$options = get_option('seopress_google_analytics_option_name');
|
5016 |
$check = isset($options['seopress_google_analytics_opt_out_msg']) ? $options['seopress_google_analytics_opt_out_msg'] : null;
|
5049 |
);
|
5050 |
}
|
5051 |
|
5052 |
+
public function seopress_google_analytics_opt_out_msg_edit_callback() {
|
5053 |
+
$check = isset($this->options['seopress_google_analytics_opt_out_msg_edit']) ? $this->options['seopress_google_analytics_opt_out_msg_edit'] : null;
|
5054 |
+
|
5055 |
+
printf(
|
5056 |
+
'<input type="text" name="seopress_google_analytics_option_name[seopress_google_analytics_opt_out_msg_edit]" placeholder="' . esc_html__('default: Manage cookies', 'wp-seopress') . '" aria-label="' . __('Change the edit button value', 'wp-seopress') . '" value="%s"/>',
|
5057 |
+
esc_html($check)
|
5058 |
+
);
|
5059 |
+
}
|
5060 |
+
|
5061 |
public function seopress_google_analytics_cb_exp_date_callback() {
|
5062 |
$options = get_option('seopress_google_analytics_option_name');
|
5063 |
|
5148 |
|
5149 |
$check = isset($options['seopress_google_analytics_cb_backdrop']);
|
5150 |
|
5151 |
+
echo '<hr><h2>' . __('Backdrop', 'wp-seopress') . '</h2>';
|
5152 |
+
|
5153 |
+
echo '<p>' . __('Customize the cookie bar <strong>backdrop</strong>.', 'wp-seopress') . '</p><br>';
|
5154 |
+
|
5155 |
echo '<input id="seopress_google_analytics_cb_backdrop" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_backdrop]" type="checkbox"';
|
5156 |
if ('1' == $check) {
|
5157 |
echo 'checked="yes"';
|
5168 |
public function seopress_google_analytics_cb_backdrop_bg_callback() {
|
5169 |
$check = isset($this->options['seopress_google_analytics_cb_backdrop_bg']) ? $this->options['seopress_google_analytics_cb_backdrop_bg'] : null;
|
5170 |
|
5171 |
+
echo '<p class="description">' . __('Background color: ', 'wp-seopress') . '</p>';
|
5172 |
printf(
|
5173 |
'<input type="text" data-default-color="rgba(255,255,255,0.8)" data-alpha="true" name="seopress_google_analytics_option_name[seopress_google_analytics_cb_backdrop_bg]" aria-label="' . __('Change the background color of the backdrop', 'wp-seopress') . '" value="%s" class="seopress_admin_color_picker color-picker"/>',
|
5174 |
esc_html($check)
|
5178 |
public function seopress_google_analytics_cb_bg_callback() {
|
5179 |
$check = isset($this->options['seopress_google_analytics_cb_bg']) ? $this->options['seopress_google_analytics_cb_bg'] : null;
|
5180 |
|
5181 |
+
echo '<hr><h2>' . __('Main settings', 'wp-seopress') . '</h2>';
|
5182 |
+
|
5183 |
+
echo '<p>' . __('Customize the general settings of the <strong>cookie bar</strong>.', 'wp-seopress') . '</p><br>';
|
5184 |
+
|
5185 |
+
echo '<p class="description">' . __('Background color: ', 'wp-seopress') . '</p>';
|
5186 |
+
|
5187 |
printf(
|
5188 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5189 |
esc_html($check)
|
5193 |
public function seopress_google_analytics_cb_txt_col_callback() {
|
5194 |
$check = isset($this->options['seopress_google_analytics_cb_txt_col']) ? $this->options['seopress_google_analytics_cb_txt_col'] : null;
|
5195 |
|
5196 |
+
echo '<p class="description">' . __('Text color: ', 'wp-seopress') . '</p>';
|
5197 |
+
|
5198 |
printf(
|
5199 |
'<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"/>',
|
5200 |
esc_html($check)
|
5204 |
public function seopress_google_analytics_cb_lk_col_callback() {
|
5205 |
$check = isset($this->options['seopress_google_analytics_cb_lk_col']) ? $this->options['seopress_google_analytics_cb_lk_col'] : null;
|
5206 |
|
5207 |
+
echo '<p class="description">' . __('Link color: ', 'wp-seopress') . '</p>';
|
5208 |
+
|
5209 |
printf(
|
5210 |
'<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"/>',
|
5211 |
esc_html($check)
|
5214 |
|
5215 |
public function seopress_google_analytics_cb_btn_bg_callback() {
|
5216 |
$check = isset($this->options['seopress_google_analytics_cb_btn_bg']) ? $this->options['seopress_google_analytics_cb_btn_bg'] : null;
|
5217 |
+
echo '<hr><h2>' . __('Primary button', 'wp-seopress') . '</h2>';
|
5218 |
+
|
5219 |
+
echo '<p>' . __('Customize the <strong>Accept button</strong>.', 'wp-seopress') . '</p><br>';
|
5220 |
+
|
5221 |
+
echo '<p class="description">' . __('Background color: ', 'wp-seopress') . '</p>';
|
5222 |
|
5223 |
printf(
|
5224 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5229 |
public function seopress_google_analytics_cb_btn_bg_hov_callback() {
|
5230 |
$check = isset($this->options['seopress_google_analytics_cb_btn_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_bg_hov'] : null;
|
5231 |
|
5232 |
+
echo '<p class="description">' . __('Background color on hover: ', 'wp-seopress') . '</p>';
|
5233 |
+
|
5234 |
printf(
|
5235 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5236 |
esc_html($check)
|
5240 |
public function seopress_google_analytics_cb_btn_col_callback() {
|
5241 |
$check = isset($this->options['seopress_google_analytics_cb_btn_col']) ? $this->options['seopress_google_analytics_cb_btn_col'] : null;
|
5242 |
|
5243 |
+
echo '<p class="description">' . __('Text color: ', 'wp-seopress') . '</p>';
|
5244 |
+
|
5245 |
printf(
|
5246 |
'<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"/>',
|
5247 |
esc_html($check)
|
5251 |
public function seopress_google_analytics_cb_btn_col_hov_callback() {
|
5252 |
$check = isset($this->options['seopress_google_analytics_cb_btn_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_col_hov'] : null;
|
5253 |
|
5254 |
+
echo '<p class="description">' . __('Text color on hover: ', 'wp-seopress') . '</p>';
|
5255 |
+
|
5256 |
printf(
|
5257 |
'<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"/>',
|
5258 |
esc_html($check)
|
5262 |
public function seopress_google_analytics_cb_btn_sec_bg_callback() {
|
5263 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg'] : null;
|
5264 |
|
5265 |
+
echo '<hr><h2>' . __('Secondary button', 'wp-seopress') . '</h2>';
|
5266 |
+
|
5267 |
+
echo '<p>' . __('Customize the <strong>Close button</strong>.', 'wp-seopress') . '</p><br>';
|
5268 |
+
|
5269 |
+
echo '<p class="description">' . __('Background color: ', 'wp-seopress') . '</p>';
|
5270 |
+
|
5271 |
printf(
|
5272 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5273 |
esc_html($check)
|
5277 |
public function seopress_google_analytics_cb_btn_sec_col_callback() {
|
5278 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_col']) ? $this->options['seopress_google_analytics_cb_btn_sec_col'] : null;
|
5279 |
|
5280 |
+
echo '<p class="description">' . __('Background color on hover: ', 'wp-seopress') . '</p>';
|
5281 |
+
|
5282 |
printf(
|
5283 |
'<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"/>',
|
5284 |
esc_html($check)
|
5288 |
public function seopress_google_analytics_cb_btn_sec_bg_hov_callback() {
|
5289 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_bg_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_bg_hov'] : null;
|
5290 |
|
5291 |
+
echo '<p class="description">' . __('Text color: ', 'wp-seopress') . '</p>';
|
5292 |
+
|
5293 |
printf(
|
5294 |
'<input type="text" data-alpha="true" 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 color-picker"/>',
|
5295 |
esc_html($check)
|
5299 |
public function seopress_google_analytics_cb_btn_sec_col_hov_callback() {
|
5300 |
$check = isset($this->options['seopress_google_analytics_cb_btn_sec_col_hov']) ? $this->options['seopress_google_analytics_cb_btn_sec_col_hov'] : null;
|
5301 |
|
5302 |
+
echo '<p class="description">' . __('Text color on hover: ', 'wp-seopress') . '</p>';
|
5303 |
+
|
5304 |
printf(
|
5305 |
'<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"/>',
|
5306 |
esc_html($check)
|
6795 |
<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>
|
6796 |
<?php
|
6797 |
}
|
6798 |
+
|
6799 |
+
public function seopress_setting_section_tools_compatibility_oxygen_callback() {
|
6800 |
+
$options = get_option('seopress_tools_option_name');
|
6801 |
+
|
6802 |
+
$check = isset($options['seopress_setting_section_tools_compatibility_oxygen']);
|
6803 |
+
|
6804 |
+
echo '<input id="seopress_setting_section_tools_compatibility_oxygen" name="seopress_tools_option_name[seopress_setting_section_tools_compatibility_oxygen]" type="checkbox"';
|
6805 |
+
if ('1' == $check) {
|
6806 |
+
echo 'checked="yes"';
|
6807 |
+
}
|
6808 |
+
echo ' value="1"/>';
|
6809 |
+
|
6810 |
+
echo '<label for="seopress_setting_section_tools_compatibility_oxygen">' . __('Enable Oxygen Builder compatibility', 'wp-seopress') . '</label>';
|
6811 |
+
|
6812 |
+
echo '<p class="description">' . __('Enable automatic meta description with <strong>%%oxygen%%</strong> dynamic variable.', 'wp-seopress') . '</p>';
|
6813 |
+
|
6814 |
+
if (isset($this->options['seopress_setting_section_tools_compatibility_oxygen'])) {
|
6815 |
+
esc_attr($this->options['seopress_setting_section_tools_compatibility_oxygen']);
|
6816 |
+
}
|
6817 |
+
}
|
6818 |
+
|
6819 |
+
public function seopress_setting_section_tools_compatibility_divi_callback() {
|
6820 |
+
$options = get_option('seopress_tools_option_name');
|
6821 |
+
|
6822 |
+
$check = isset($options['seopress_setting_section_tools_compatibility_divi']);
|
6823 |
+
|
6824 |
+
echo '<input id="seopress_setting_section_tools_compatibility_divi" name="seopress_tools_option_name[seopress_setting_section_tools_compatibility_divi]" type="checkbox"';
|
6825 |
+
if ('1' == $check) {
|
6826 |
+
echo 'checked="yes"';
|
6827 |
+
}
|
6828 |
+
echo ' value="1"/>';
|
6829 |
+
|
6830 |
+
echo '<label for="seopress_setting_section_tools_compatibility_divi">' . __('Enable Divi Builder compatibility', 'wp-seopress') . '</label>';
|
6831 |
+
|
6832 |
+
echo '<p class="description">' . __('Enable automatic meta description with <strong>%%divi%%</strong> dynamic variable.', 'wp-seopress') . '</p>';
|
6833 |
+
|
6834 |
+
if (isset($this->options['seopress_setting_section_tools_compatibility_divi'])) {
|
6835 |
+
esc_attr($this->options['seopress_setting_section_tools_compatibility_divi']);
|
6836 |
+
}
|
6837 |
+
}
|
6838 |
+
|
6839 |
+
public function seopress_setting_section_tools_compatibility_bakery_callback() {
|
6840 |
+
$options = get_option('seopress_tools_option_name');
|
6841 |
+
|
6842 |
+
$check = isset($options['seopress_setting_section_tools_compatibility_bakery']);
|
6843 |
+
|
6844 |
+
echo '<input id="seopress_setting_section_tools_compatibility_bakery" name="seopress_tools_option_name[seopress_setting_section_tools_compatibility_bakery]" type="checkbox"';
|
6845 |
+
if ('1' == $check) {
|
6846 |
+
echo 'checked="yes"';
|
6847 |
+
}
|
6848 |
+
echo ' value="1"/>';
|
6849 |
+
|
6850 |
+
echo '<label for="seopress_setting_section_tools_compatibility_bakery">' . __('Enable WP Bakery Builder compatibility', 'wp-seopress') . '</label>';
|
6851 |
+
|
6852 |
+
echo '<p class="description">' . __('Enable automatic meta description with <strong>%%wpbakery%%</strong> dynamic variable.', 'wp-seopress') . '</p>';
|
6853 |
+
|
6854 |
+
if (isset($this->options['seopress_setting_section_tools_compatibility_bakery'])) {
|
6855 |
+
esc_attr($this->options['seopress_setting_section_tools_compatibility_bakery']);
|
6856 |
+
}
|
6857 |
+
}
|
6858 |
+
|
6859 |
+
public function seopress_setting_section_tools_compatibility_avia_callback() {
|
6860 |
+
$options = get_option('seopress_tools_option_name');
|
6861 |
+
|
6862 |
+
$check = isset($options['seopress_setting_section_tools_compatibility_avia']);
|
6863 |
+
|
6864 |
+
echo '<input id="seopress_setting_section_tools_compatibility_avia" name="seopress_tools_option_name[seopress_setting_section_tools_compatibility_avia]" type="checkbox"';
|
6865 |
+
if ('1' == $check) {
|
6866 |
+
echo 'checked="yes"';
|
6867 |
+
}
|
6868 |
+
echo ' value="1"/>';
|
6869 |
+
|
6870 |
+
echo '<label for="seopress_setting_section_tools_compatibility_avia">' . __('Enable Avia Layout Builder compatibility', 'wp-seopress') . '</label>';
|
6871 |
+
|
6872 |
+
echo '<p class="description">' . __('Enable automatic meta description with <strong>%%aviabuilder%%</strong> dynamic variable.', 'wp-seopress') . '</p>';
|
6873 |
+
|
6874 |
+
if (isset($this->options['seopress_setting_section_tools_compatibility_avia'])) {
|
6875 |
+
esc_attr($this->options['seopress_setting_section_tools_compatibility_avia']);
|
6876 |
+
}
|
6877 |
+
}
|
6878 |
+
|
6879 |
+
public function seopress_setting_section_tools_compatibility_fusion_callback() {
|
6880 |
+
$options = get_option('seopress_tools_option_name');
|
6881 |
+
|
6882 |
+
$check = isset($options['seopress_setting_section_tools_compatibility_fusion']);
|
6883 |
+
|
6884 |
+
echo '<input id="seopress_setting_section_tools_compatibility_fusion" name="seopress_tools_option_name[seopress_setting_section_tools_compatibility_fusion]" type="checkbox"';
|
6885 |
+
if ('1' == $check) {
|
6886 |
+
echo 'checked="yes"';
|
6887 |
+
}
|
6888 |
+
echo ' value="1"/>';
|
6889 |
+
|
6890 |
+
echo '<label for="seopress_setting_section_tools_compatibility_fusion">' . __('Enable Fusion Builder compatibility', 'wp-seopress') . '</label>';
|
6891 |
+
|
6892 |
+
echo '<p class="description">' . __('Enable automatic meta description with <strong>%%fusionbuilder%%</strong> dynamic variable.', 'wp-seopress') . '</p>';
|
6893 |
+
|
6894 |
+
if (isset($this->options['seopress_setting_section_tools_compatibility_fusion'])) {
|
6895 |
+
esc_attr($this->options['seopress_setting_section_tools_compatibility_fusion']);
|
6896 |
+
}
|
6897 |
+
}
|
6898 |
}
|
6899 |
|
6900 |
if (is_admin()) {
|
@@ -444,6 +444,24 @@ function seopress_do_real_preview() {
|
|
444 |
}
|
445 |
}
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
//Words Counter
|
448 |
if ( ! is_plugin_active('oxygen/functions.php') && ! function_exists('ct_template_output')) { //disable for Oxygen
|
449 |
if ('' != $seopress_get_the_content) {
|
@@ -475,6 +493,11 @@ function seopress_do_real_preview() {
|
|
475 |
|
476 |
//Send data
|
477 |
if (isset($data)) {
|
|
|
|
|
|
|
|
|
|
|
478 |
update_post_meta($seopress_get_the_id, '_seopress_analysis_data', $data);
|
479 |
}
|
480 |
|
@@ -717,58 +740,6 @@ function seopress_aio_migration() {
|
|
717 |
global $post;
|
718 |
|
719 |
if ($offset > $total_count_posts) {
|
720 |
-
wp_reset_query();
|
721 |
-
|
722 |
-
$args = [
|
723 |
-
//'number' => $increment,
|
724 |
-
'hide_empty' => false,
|
725 |
-
//'offset' => $offset,
|
726 |
-
'fields' => 'ids',
|
727 |
-
];
|
728 |
-
$aio_query_terms = get_terms($args);
|
729 |
-
|
730 |
-
if ($aio_query_terms) {
|
731 |
-
foreach ($aio_query_terms as $term_id) {
|
732 |
-
if ('' != get_term_meta($term_id, '_aioseop_title', true)) { //Import title tag
|
733 |
-
update_term_meta($term_id, '_seopress_titles_title', get_term_meta($term_id, '_aioseop_title', true));
|
734 |
-
}
|
735 |
-
if ('' != get_term_meta($term_id, '_aioseop_description', true)) { //Import meta desc
|
736 |
-
update_term_meta($term_id, '_seopress_titles_desc', get_term_meta($term_id, '_aioseop_description', true));
|
737 |
-
}
|
738 |
-
if ('' != get_term_meta($term_id, '_aioseop_opengraph_settings', true)) { //Import Facebook / Twitter Title
|
739 |
-
$_aioseop_opengraph_settings = get_term_meta($term_id, '_aioseop_opengraph_settings', true);
|
740 |
-
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_title'])) {
|
741 |
-
update_term_meta($term_id, '_seopress_social_fb_title', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
742 |
-
update_term_meta($term_id, '_seopress_social_twitter_title', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
743 |
-
}
|
744 |
-
}
|
745 |
-
if ('' != get_term_meta($term_id, '_aioseop_opengraph_settings', true)) { //Import Facebook / Twitter Title
|
746 |
-
$_aioseop_opengraph_settings = get_term_meta($term_id, '_aioseop_opengraph_settings', true);
|
747 |
-
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_desc'])) {
|
748 |
-
update_term_meta($term_id, '_seopress_social_fb_desc', $_aioseop_opengraph_settings['aioseop_opengraph_settings_desc']);
|
749 |
-
update_term_meta($term_id, '_seopress_social_twitter_desc', $_aioseop_opengraph_settings['aioseop_opengraph_settings_desc']);
|
750 |
-
}
|
751 |
-
}
|
752 |
-
if ('' != get_term_meta($term_id, '_aioseop_opengraph_settings', true)) { //Import Facebook Image
|
753 |
-
$_aioseop_opengraph_settings = get_term_meta($term_id, '_aioseop_opengraph_settings', true);
|
754 |
-
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_image'])) {
|
755 |
-
update_term_meta($term_id, '_seopress_social_fb_img', $_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg']);
|
756 |
-
}
|
757 |
-
}
|
758 |
-
if ('' != get_term_meta($term_id, '_aioseop_opengraph_settings', true)) { //Import Twitter Image
|
759 |
-
$_aioseop_opengraph_settings = get_term_meta($term_id, '_aioseop_opengraph_settings', true);
|
760 |
-
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_image'])) {
|
761 |
-
update_term_meta($term_id, '_seopress_social_twitter_img', $_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg_twitter']);
|
762 |
-
}
|
763 |
-
}
|
764 |
-
if ('on' == get_term_meta($term_id, '_aioseop_noindex', true)) { //Import Robots NoIndex
|
765 |
-
update_term_meta($term_id, '_seopress_robots_index', 'yes');
|
766 |
-
}
|
767 |
-
if ('on' == get_term_meta($term_id, '_aioseop_nofollow', true)) { //Import Robots NoIndex
|
768 |
-
update_term_meta($term_id, '_seopress_robots_follow', 'yes');
|
769 |
-
}
|
770 |
-
}
|
771 |
-
}
|
772 |
$offset = 'done';
|
773 |
wp_reset_query();
|
774 |
} else {
|
@@ -783,43 +754,173 @@ function seopress_aio_migration() {
|
|
783 |
|
784 |
if ($aio_query) {
|
785 |
foreach ($aio_query as $post) {
|
786 |
-
if ('' != get_post_meta($post->ID, '
|
|
|
|
|
787 |
update_post_meta($post->ID, '_seopress_titles_title', get_post_meta($post->ID, '_aioseop_title', true));
|
788 |
}
|
789 |
-
if ('' != get_post_meta($post->ID, '
|
|
|
|
|
790 |
update_post_meta($post->ID, '_seopress_titles_desc', get_post_meta($post->ID, '_aioseop_description', true));
|
791 |
}
|
792 |
-
|
|
|
|
|
|
|
793 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
794 |
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_title'])) {
|
795 |
update_post_meta($post->ID, '_seopress_social_fb_title', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
796 |
update_post_meta($post->ID, '_seopress_social_twitter_title', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
797 |
}
|
798 |
}
|
799 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
800 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
801 |
-
if (isset($_aioseop_opengraph_settings['
|
802 |
-
update_post_meta($post->ID, '
|
803 |
-
update_post_meta($post->ID, '_seopress_social_twitter_desc', $_aioseop_opengraph_settings['aioseop_opengraph_settings_desc']);
|
804 |
}
|
805 |
}
|
806 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
808 |
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_image'])) {
|
809 |
update_post_meta($post->ID, '_seopress_social_fb_img', $_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg']);
|
810 |
}
|
811 |
}
|
812 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
814 |
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg_twitter'])) {
|
815 |
update_post_meta($post->ID, '_seopress_social_twitter_img', $_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg_twitter']);
|
816 |
}
|
817 |
}
|
818 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
819 |
update_post_meta($post->ID, '_seopress_robots_index', 'yes');
|
820 |
}
|
821 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
update_post_meta($post->ID, '_seopress_robots_follow', 'yes');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
}
|
824 |
}
|
825 |
}
|
@@ -1418,6 +1519,474 @@ function seopress_wpseo_migration() {
|
|
1418 |
}
|
1419 |
add_action('wp_ajax_seopress_wpseo_migration', 'seopress_wpseo_migration');
|
1420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1421 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1422 |
//Export SEOPress metadata to CSV
|
1423 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
444 |
}
|
445 |
}
|
446 |
|
447 |
+
//inbound links
|
448 |
+
$permalink = get_permalink((int) $seopress_get_the_id);
|
449 |
+
$args = [
|
450 |
+
's' => $permalink,
|
451 |
+
'post_type' => 'any',
|
452 |
+
];
|
453 |
+
$inbound_links = new WP_Query($args);
|
454 |
+
|
455 |
+
if ($inbound_links->have_posts()) {
|
456 |
+
$data['inbound_links']['count'] = $inbound_links->found_posts;
|
457 |
+
|
458 |
+
while ($inbound_links->have_posts()) {
|
459 |
+
$inbound_links->the_post();
|
460 |
+
$data['inbound_links']['links'][get_the_ID()] = [get_the_permalink() => get_the_title()];
|
461 |
+
}
|
462 |
+
}
|
463 |
+
wp_reset_postdata();
|
464 |
+
|
465 |
//Words Counter
|
466 |
if ( ! is_plugin_active('oxygen/functions.php') && ! function_exists('ct_template_output')) { //disable for Oxygen
|
467 |
if ('' != $seopress_get_the_content) {
|
493 |
|
494 |
//Send data
|
495 |
if (isset($data)) {
|
496 |
+
//Oxygen builder
|
497 |
+
if (get_post_meta($seopress_get_the_id, '_seopress_analysis_data_oxygen', true)) {
|
498 |
+
$data2 = get_post_meta($seopress_get_the_id, '_seopress_analysis_data_oxygen', true);
|
499 |
+
$data = $data + $data2;
|
500 |
+
}
|
501 |
update_post_meta($seopress_get_the_id, '_seopress_analysis_data', $data);
|
502 |
}
|
503 |
|
740 |
global $post;
|
741 |
|
742 |
if ($offset > $total_count_posts) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
$offset = 'done';
|
744 |
wp_reset_query();
|
745 |
} else {
|
754 |
|
755 |
if ($aio_query) {
|
756 |
foreach ($aio_query as $post) {
|
757 |
+
if ('' != get_post_meta($post->ID, '_aioseo_title', true)) { //Import title tag
|
758 |
+
update_post_meta($post->ID, '_seopress_titles_title', get_post_meta($post->ID, '_aioseo_title', true));
|
759 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_title', true)) { //Import old title tag
|
760 |
update_post_meta($post->ID, '_seopress_titles_title', get_post_meta($post->ID, '_aioseop_title', true));
|
761 |
}
|
762 |
+
if ('' != get_post_meta($post->ID, '_aioseo_description', true)) { //Import meta desc
|
763 |
+
update_post_meta($post->ID, '_seopress_titles_desc', get_post_meta($post->ID, '_aioseo_description', true));
|
764 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_description', true)) { //Import old meta desc
|
765 |
update_post_meta($post->ID, '_seopress_titles_desc', get_post_meta($post->ID, '_aioseop_description', true));
|
766 |
}
|
767 |
+
|
768 |
+
if ('' != get_post_meta($post->ID, '_aioseo_og_title', true)) { //Import Facebook Title
|
769 |
+
update_post_meta($post->ID, '_seopress_social_fb_title', get_post_meta($post->ID, '_aioseo_og_title', true));
|
770 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_opengraph_settings', true)) { //Import old Facebook
|
771 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
772 |
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_title'])) {
|
773 |
update_post_meta($post->ID, '_seopress_social_fb_title', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
774 |
+
}
|
775 |
+
}
|
776 |
+
|
777 |
+
if ('' != get_post_meta($post->ID, '_aioseo_twitter_title', true)) { //Import Twitter Title
|
778 |
+
update_post_meta($post->ID, '_seopress_social_twitter_title', get_post_meta($post->ID, '_aioseo_twitter_title', true));
|
779 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_opengraph_settings', true)) { //Import old Twitter Title
|
780 |
+
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
781 |
+
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_title'])) {
|
782 |
update_post_meta($post->ID, '_seopress_social_twitter_title', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
783 |
}
|
784 |
}
|
785 |
+
|
786 |
+
if ('' != get_post_meta($post->ID, '_aioseo_og_description', true)) { //Import Facebook Desc
|
787 |
+
update_post_meta($post->ID, '_seopress_social_fb_desc', get_post_meta($post->ID, '_aioseo_og_description', true));
|
788 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_opengraph_settings', true)) { //Import old Facebook Desc
|
789 |
+
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
790 |
+
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_title'])) {
|
791 |
+
update_post_meta($post->ID, '_seopress_social_fb_desc', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
792 |
+
}
|
793 |
+
}
|
794 |
+
|
795 |
+
if ('' != get_post_meta($post->ID, '_aioseo_twitter_description', true)) { //Import Twitter Desc
|
796 |
+
update_post_meta($post->ID, '_seopress_social_twitter_desc', get_post_meta($post->ID, '_aioseo_twitter_description', true));
|
797 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_opengraph_settings', true)) { //Import old Twitter Desc
|
798 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
799 |
+
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_title'])) {
|
800 |
+
update_post_meta($post->ID, '_seopress_social_twitter_desc', $_aioseop_opengraph_settings['aioseop_opengraph_settings_title']);
|
|
|
801 |
}
|
802 |
}
|
803 |
+
|
804 |
+
$canonical_url = "SELECT p.canonical_url, p.post_id
|
805 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
806 |
+
WHERE p.post_id = $post->ID";
|
807 |
+
|
808 |
+
$canonical_url = $wpdb->get_results($canonical_url, ARRAY_A);
|
809 |
+
|
810 |
+
if ( ! empty($canonical_url[0]['canonical_url'])) {//Import Canonical URL
|
811 |
+
update_post_meta($post->ID, '_seopress_robots_canonical', $canonical_url[0]['canonical_url']);
|
812 |
+
}
|
813 |
+
|
814 |
+
$og_img_url = "SELECT p.og_image_custom_url, p.post_id
|
815 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
816 |
+
WHERE p.og_image_type = 'custom_image' AND p.post_id = $post->ID";
|
817 |
+
|
818 |
+
$og_img_url = $wpdb->get_results($og_img_url, ARRAY_A);
|
819 |
+
|
820 |
+
if ( ! empty($og_img_url[0]['og_image_custom_url'])) {//Import Facebook Image
|
821 |
+
update_post_meta($post->ID, '_seopress_social_fb_img', $og_img_url[0]['og_image_custom_url']);
|
822 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_opengraph_settings', true)) { //Import old Facebook Image
|
823 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
824 |
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_image'])) {
|
825 |
update_post_meta($post->ID, '_seopress_social_fb_img', $_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg']);
|
826 |
}
|
827 |
}
|
828 |
+
|
829 |
+
$tw_img_url = "SELECT p.twitter_image_custom_url, p.post_id
|
830 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
831 |
+
WHERE p.twitter_image_type = 'custom_image' AND p.post_id = $post->ID";
|
832 |
+
|
833 |
+
$tw_img_url = $wpdb->get_results($tw_img_url, ARRAY_A);
|
834 |
+
|
835 |
+
if ( ! empty($tw_img_url[0]['twitter_image_custom_url'])) {//Import Twitter Image
|
836 |
+
update_post_meta($post->ID, '_seopress_social_twitter_img', $tw_img_url[0]['twitter_image_custom_url']);
|
837 |
+
} elseif ('' != get_post_meta($post->ID, '_aioseop_opengraph_settings', true)) { //Import old Twitter Image
|
838 |
$_aioseop_opengraph_settings = get_post_meta($post->ID, '_aioseop_opengraph_settings', true);
|
839 |
if (isset($_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg_twitter'])) {
|
840 |
update_post_meta($post->ID, '_seopress_social_twitter_img', $_aioseop_opengraph_settings['aioseop_opengraph_settings_customimg_twitter']);
|
841 |
}
|
842 |
}
|
843 |
+
|
844 |
+
$robots_noindex = "SELECT p.robots_noindex, p.post_id
|
845 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
846 |
+
WHERE p.post_id = $post->ID";
|
847 |
+
|
848 |
+
$robots_noindex = $wpdb->get_results($robots_noindex, ARRAY_A);
|
849 |
+
|
850 |
+
if ( ! empty($robots_noindex[0]['robots_noindex']) && '1' === $robots_noindex[0]['robots_noindex']) {//Import Robots NoIndex
|
851 |
+
update_post_meta($post->ID, '_seopress_robots_index', 'yes');
|
852 |
+
} elseif ('on' == get_post_meta($post->ID, '_aioseop_noindex', true)) { //Import old Robots NoIndex
|
853 |
update_post_meta($post->ID, '_seopress_robots_index', 'yes');
|
854 |
}
|
855 |
+
|
856 |
+
$robots_nofollow = "SELECT p.robots_nofollow, p.post_id
|
857 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
858 |
+
WHERE p.post_id = $post->ID";
|
859 |
+
|
860 |
+
$robots_nofollow = $wpdb->get_results($robots_nofollow, ARRAY_A);
|
861 |
+
|
862 |
+
if ( ! empty($robots_nofollow[0]['robots_nofollow']) && '1' === $robots_nofollow[0]['robots_nofollow']) {//Import Robots NoFollow
|
863 |
update_post_meta($post->ID, '_seopress_robots_follow', 'yes');
|
864 |
+
} elseif ('on' == get_post_meta($post->ID, '_aioseop_nofollow', true)) { //Import old Robots NoFollow
|
865 |
+
update_post_meta($post->ID, '_seopress_robots_follow', 'yes');
|
866 |
+
}
|
867 |
+
|
868 |
+
$robots_noimageindex = "SELECT p.robots_noimageindex, p.post_id
|
869 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
870 |
+
WHERE p.post_id = $post->ID";
|
871 |
+
|
872 |
+
$robots_noimageindex = $wpdb->get_results($robots_noimageindex, ARRAY_A);
|
873 |
+
|
874 |
+
if ( ! empty($robots_noimageindex[0]['robots_noimageindex']) && '1' === $robots_noimageindex[0]['robots_noimageindex']) {//Import Robots NoImageIndex
|
875 |
+
update_post_meta($post->ID, '_seopress_robots_imageindex', 'yes');
|
876 |
+
}
|
877 |
+
|
878 |
+
$robots_noodp = "SELECT p.robots_noodp, p.post_id
|
879 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
880 |
+
WHERE p.post_id = $post->ID";
|
881 |
+
|
882 |
+
$robots_noodp = $wpdb->get_results($robots_noodp, ARRAY_A);
|
883 |
+
|
884 |
+
if ( ! empty($robots_noodp[0]['robots_noodp']) && '1' === $robots_noodp[0]['robots_noodp']) {//Import Robots NoOdp
|
885 |
+
update_post_meta($post->ID, '_seopress_robots_odp', 'yes');
|
886 |
+
}
|
887 |
+
|
888 |
+
$robots_nosnippet = "SELECT p.robots_nosnippet, p.post_id
|
889 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
890 |
+
WHERE p.post_id = $post->ID";
|
891 |
+
|
892 |
+
$robots_nosnippet = $wpdb->get_results($robots_nosnippet, ARRAY_A);
|
893 |
+
|
894 |
+
if ( ! empty($robots_nosnippet[0]['robots_nosnippet']) && '1' === $robots_nosnippet[0]['robots_nosnippet']) {//Import Robots NoSnippet
|
895 |
+
update_post_meta($post->ID, '_seopress_robots_snippet', 'yes');
|
896 |
+
}
|
897 |
+
|
898 |
+
$robots_noarchive = "SELECT p.robots_noarchive, p.post_id
|
899 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
900 |
+
WHERE p.post_id = $post->ID";
|
901 |
+
|
902 |
+
$robots_noarchive = $wpdb->get_results($robots_noarchive, ARRAY_A);
|
903 |
+
|
904 |
+
if ( ! empty($robots_noarchive[0]['robots_noarchive']) && '1' === $robots_noarchive[0]['robots_noarchive']) {//Import Robots NoArchive
|
905 |
+
update_post_meta($post->ID, '_seopress_robots_archive', 'yes');
|
906 |
+
}
|
907 |
+
|
908 |
+
$keyphrases = "SELECT p.keyphrases, p.post_id
|
909 |
+
FROM {$wpdb->prefix}aioseo_posts p
|
910 |
+
WHERE p.post_id = $post->ID";
|
911 |
+
|
912 |
+
$keyphrases = $wpdb->get_results($keyphrases, ARRAY_A);
|
913 |
+
|
914 |
+
if ( ! empty($keyphrases)) {
|
915 |
+
$keyphrases = json_decode($keyphrases[0]['keyphrases']);
|
916 |
+
|
917 |
+
if (isset($keyphrases->focus->keyphrase)) {
|
918 |
+
$keyphrases = $keyphrases->focus->keyphrase;
|
919 |
+
|
920 |
+
if ('' != $keyphrases) { //Import focus kw
|
921 |
+
update_post_meta($post->ID, '_seopress_analysis_target_kw', $keyphrases);
|
922 |
+
}
|
923 |
+
}
|
924 |
}
|
925 |
}
|
926 |
}
|
1519 |
}
|
1520 |
add_action('wp_ajax_seopress_wpseo_migration', 'seopress_wpseo_migration');
|
1521 |
|
1522 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1523 |
+
/* Platinum SEO migration
|
1524 |
+
* @since 4.5
|
1525 |
+
* @author Benjamin Denis
|
1526 |
+
*/
|
1527 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1528 |
+
function seopress_platinum_seo_migration() {
|
1529 |
+
check_ajax_referer('seopress_platinum_seo_migrate_nonce', $_POST['_ajax_nonce'], true);
|
1530 |
+
|
1531 |
+
if (current_user_can(seopress_capability('manage_options', 'migration')) && is_admin()) {
|
1532 |
+
if (isset($_POST['offset']) && isset($_POST['offset'])) {
|
1533 |
+
$offset = absint($_POST['offset']);
|
1534 |
+
}
|
1535 |
+
|
1536 |
+
global $wpdb;
|
1537 |
+
|
1538 |
+
$total_count_posts = (int) $wpdb->get_var("SELECT count(*) FROM {$wpdb->posts}");
|
1539 |
+
|
1540 |
+
$increment = 200;
|
1541 |
+
global $post;
|
1542 |
+
|
1543 |
+
if ($offset > $total_count_posts) {
|
1544 |
+
wp_reset_query();
|
1545 |
+
|
1546 |
+
$args = [
|
1547 |
+
'hide_empty' => false,
|
1548 |
+
];
|
1549 |
+
$platinum_seo_query_terms = get_terms($args);
|
1550 |
+
|
1551 |
+
if ($platinum_seo_query_terms) {
|
1552 |
+
foreach ($platinum_seo_query_terms as $term) {
|
1553 |
+
if ( ! is_wp_error($term)) {
|
1554 |
+
$tax = 'taxonomy';
|
1555 |
+
if ('category' === $term->taxonomy) {
|
1556 |
+
$tax = 'category';
|
1557 |
+
}
|
1558 |
+
if ('' != get_term_meta($term->term_id, 'psp_' . $tax . '_seo_metas_' . $term->term_id, true) || '' != get_term_meta($term->$term_id, 'psp_' . $tax . '_social_metas_' . $term->term_id, true)) {
|
1559 |
+
$term_settings = get_term_meta($term->term_id, 'psp_' . $tax . '_seo_metas_' . $term->term_id, true);
|
1560 |
+
$term_social_settings = get_term_meta($term->term_id, 'psp_' . $tax . '_social_metas_' . $term->term_id, true);
|
1561 |
+
|
1562 |
+
if ( ! empty($term_settings['title'])) { //Import title tag
|
1563 |
+
update_term_meta($term->term_id, '_seopress_titles_title', $term_settings['title']);
|
1564 |
+
}
|
1565 |
+
if ( ! empty($term_settings['description'])) { //Import meta desc
|
1566 |
+
update_term_meta($term->term_id, '_seopress_titles_desc', $term_settings['description']);
|
1567 |
+
}
|
1568 |
+
if ( ! empty($term_social_settings['fb_title'])) { //Import Facebook Title
|
1569 |
+
update_term_meta($term->term_id, '_seopress_social_fb_title', $term_social_settings['fb_title']);
|
1570 |
+
update_term_meta($term->term_id, '_seopress_social_twitter_title', $term_social_settings['fb_title']);
|
1571 |
+
}
|
1572 |
+
if ( ! empty($term_social_settings['fb_description'])) { //Import Facebook Desc
|
1573 |
+
update_term_meta($term->term_id, '_seopress_social_fb_desc', $term_social_settings['fb_description']);
|
1574 |
+
update_term_meta($term->term_id, '_seopress_social_twitter_desc', $term_social_settings['fb_description']);
|
1575 |
+
}
|
1576 |
+
if ( ! empty($term_social_settings['fb_image'])) { //Import Facebook Image
|
1577 |
+
update_term_meta($term->term_id, '_seopress_social_fb_img', $term_social_settings['fb_image']);
|
1578 |
+
update_term_meta($term->term_id, '_seopress_social_twitter_img', $term_social_settings['fb_image']);
|
1579 |
+
}
|
1580 |
+
if ( ! empty($term_settings['canonical_url'])) { //Import Canonical URL
|
1581 |
+
update_term_meta($term->term_id, '_seopress_robots_canonical', $term_settings['canonical_url']);
|
1582 |
+
}
|
1583 |
+
if ( ! empty($term_settings['redirect_to_url'])) { //Import Redirect URL
|
1584 |
+
update_term_meta($term->term_id, '_seopress_redirections_value', $term_settings['redirect_to_url']);
|
1585 |
+
update_term_meta($term->term_id, '_seopress_redirections_enabled', 'yes');
|
1586 |
+
if ( ! empty($term_settings['redirect_status_code'])) {
|
1587 |
+
$status = $term_settings['redirect_status_code'];
|
1588 |
+
if ('303' === $term_settings['redirect_status_code']) {
|
1589 |
+
$status = '301';
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
update_term_meta($term->term_id, '_seopress_redirections_type', $status);
|
1593 |
+
}
|
1594 |
+
}
|
1595 |
+
if ( ! empty($term_settings['noindex'])) { //Import Robots NoIndex
|
1596 |
+
update_term_meta($term->term_id, '_seopress_robots_index', 'yes');
|
1597 |
+
}
|
1598 |
+
if ( ! empty($term_settings['nofollow'])) { //Import Robots NoFollow
|
1599 |
+
update_term_meta($term->term_id, '_seopress_robots_follow', 'yes');
|
1600 |
+
}
|
1601 |
+
if ( ! empty($term_settings['noarchive'])) { //Import Robots NoArchive
|
1602 |
+
update_term_meta($term->term_id, '_seopress_robots_archive', 'yes');
|
1603 |
+
}
|
1604 |
+
if ( ! empty($term_settings['nosnippet'])) { //Import Robots NoSnippet
|
1605 |
+
update_term_meta($term->term_id, '_seopress_robots_snippet', 'yes');
|
1606 |
+
}
|
1607 |
+
if ( ! empty($term_settings['noimageindex'])) { //Import Robots NoImageIndex
|
1608 |
+
update_term_meta($term->term_id, '_seopress_robots_imageindex', 'yes');
|
1609 |
+
}
|
1610 |
+
}
|
1611 |
+
}
|
1612 |
+
}
|
1613 |
+
}
|
1614 |
+
$offset = 'done';
|
1615 |
+
wp_reset_query();
|
1616 |
+
} else {
|
1617 |
+
$args = [
|
1618 |
+
'posts_per_page' => $increment,
|
1619 |
+
'post_type' => 'any',
|
1620 |
+
'post_status' => 'any',
|
1621 |
+
'offset' => $offset,
|
1622 |
+
];
|
1623 |
+
|
1624 |
+
$platinum_seo_query = get_posts($args);
|
1625 |
+
|
1626 |
+
if ($platinum_seo_query) {
|
1627 |
+
foreach ($platinum_seo_query as $post) {
|
1628 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_title', true)) { //Import title tag
|
1629 |
+
update_post_meta($post->ID, '_seopress_titles_title', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_title', true));
|
1630 |
+
}
|
1631 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_description', true)) { //Import meta desc
|
1632 |
+
update_post_meta($post->ID, '_seopress_titles_desc', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_description', true));
|
1633 |
+
}
|
1634 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_title', true)) { //Import Facebook Title
|
1635 |
+
update_post_meta($post->ID, '_seopress_social_fb_title', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_title', true));
|
1636 |
+
update_post_meta($post->ID, '_seopress_social_twitter_title', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_title', true));
|
1637 |
+
}
|
1638 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_description', true)) { //Import Facebook Desc
|
1639 |
+
update_post_meta($post->ID, '_seopress_social_fb_desc', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_description', true));
|
1640 |
+
update_post_meta($post->ID, '_seopress_social_twitter_desc', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_description', true));
|
1641 |
+
}
|
1642 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_image', true)) { //Import Facebook Image
|
1643 |
+
update_post_meta($post->ID, '_seopress_social_fb_img', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_image', true));
|
1644 |
+
update_post_meta($post->ID, '_seopress_social_twitter_img', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_fb_image', true));
|
1645 |
+
}
|
1646 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_keywords', true)) { //Import Target Keyword
|
1647 |
+
update_post_meta($post->ID, '_seopress_analysis_target_kw', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_keywords', true));
|
1648 |
+
}
|
1649 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_canonical_url', true)) { //Import Canonical URL
|
1650 |
+
update_post_meta($post->ID, '_seopress_robots_canonical', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_canonical_url', true));
|
1651 |
+
}
|
1652 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_redirect_to_url', true)) { //Import Redirect URL
|
1653 |
+
update_post_meta($post->ID, '_seopress_redirections_value', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_redirect_to_url', true));
|
1654 |
+
update_post_meta($post->ID, '_seopress_redirections_enabled', 'yes'); //Enable the redirect
|
1655 |
+
|
1656 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_redirect_status_code', true)) {
|
1657 |
+
$status = get_metadata('platinumseo', $post->ID, '_techblissonline_psp_redirect_status_code', true);
|
1658 |
+
if ('303' === get_metadata('platinumseo', $post->ID, '_techblissonline_psp_redirect_status_code', true)) {
|
1659 |
+
$status = '301';
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
update_term_meta($post->ID, '_seopress_redirections_type', $status);
|
1663 |
+
}
|
1664 |
+
}
|
1665 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_noindex', true)) { //Import Robots NoIndex
|
1666 |
+
update_post_meta($post->ID, '_seopress_robots_index', 'yes');
|
1667 |
+
}
|
1668 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_nofollow', true)) { //Import Robots NoFollow
|
1669 |
+
update_post_meta($post->ID, '_seopress_robots_follow', 'yes');
|
1670 |
+
}
|
1671 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_noarchive', true)) { //Import Robots NoArchive
|
1672 |
+
update_post_meta($post->ID, '_seopress_robots_archive', 'yes');
|
1673 |
+
}
|
1674 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_nosnippet', true)) { //Import Robots NoSnippet
|
1675 |
+
update_post_meta($post->ID, '_seopress_robots_snippet', 'yes');
|
1676 |
+
}
|
1677 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_noimageidx', true)) { //Import Robots NoImageIndex
|
1678 |
+
update_post_meta($post->ID, '_seopress_robots_imageindex', 'yes');
|
1679 |
+
}
|
1680 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_keywords', true)) { //Import Target Keywords
|
1681 |
+
update_post_meta($post->ID, '_seopress_analysis_target_kw', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_keywords', true));
|
1682 |
+
}
|
1683 |
+
if ('' != get_metadata('platinumseo', $post->ID, '_techblissonline_psp_preferred_term', true)) { //Import Primary category
|
1684 |
+
if ('category' == get_metadata('platinumseo', $post->ID, '_techblissonline_psp_preferred_taxonomy', true) || 'product_cat' == get_metadata('platinumseo', $post->ID, '_techblissonline_psp_preferred_taxonomy', true)) {
|
1685 |
+
update_post_meta($post->ID, '_seopress_robots_primary_cat', get_metadata('platinumseo', $post->ID, '_techblissonline_psp_preferred_term', true));
|
1686 |
+
}
|
1687 |
+
}
|
1688 |
+
}
|
1689 |
+
}
|
1690 |
+
$offset += $increment;
|
1691 |
+
}
|
1692 |
+
$data = [];
|
1693 |
+
$data['offset'] = $offset;
|
1694 |
+
wp_send_json_success($data);
|
1695 |
+
exit();
|
1696 |
+
}
|
1697 |
+
}
|
1698 |
+
add_action('wp_ajax_seopress_platinum_seo_migration', 'seopress_platinum_seo_migration');
|
1699 |
+
|
1700 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1701 |
+
/* SmartCrawl migration
|
1702 |
+
* @since 4.5
|
1703 |
+
* @author Benjamin Denis
|
1704 |
+
*/
|
1705 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1706 |
+
function seopress_smart_crawl_migration() {
|
1707 |
+
check_ajax_referer('seopress_smart_crawl_migrate_nonce', $_POST['_ajax_nonce'], true);
|
1708 |
+
|
1709 |
+
if (current_user_can(seopress_capability('manage_options', 'migration')) && is_admin()) {
|
1710 |
+
if (isset($_POST['offset']) && isset($_POST['offset'])) {
|
1711 |
+
$offset = absint($_POST['offset']);
|
1712 |
+
}
|
1713 |
+
|
1714 |
+
global $wpdb;
|
1715 |
+
|
1716 |
+
$total_count_posts = (int) $wpdb->get_var("SELECT count(*) FROM {$wpdb->posts}");
|
1717 |
+
|
1718 |
+
$increment = 200;
|
1719 |
+
global $post;
|
1720 |
+
|
1721 |
+
if ($offset > $total_count_posts) {
|
1722 |
+
wp_reset_query();
|
1723 |
+
|
1724 |
+
$smart_crawl_query_terms = get_option('wds_taxonomy_meta');
|
1725 |
+
|
1726 |
+
if ($smart_crawl_query_terms) {
|
1727 |
+
foreach ($smart_crawl_query_terms as $taxonomies => $taxonomie) {
|
1728 |
+
foreach ($taxonomie as $term_id => $term_value) {
|
1729 |
+
if ( ! empty($term_value['wds_title'])) { //Import title tag
|
1730 |
+
update_term_meta($term_id, '_seopress_titles_title', $term_value['wds_title']);
|
1731 |
+
}
|
1732 |
+
if ( ! empty($term_value['wds_desc'])) { //Import meta desc
|
1733 |
+
update_term_meta($term_id, '_seopress_titles_desc', $term_value['wds_desc']);
|
1734 |
+
}
|
1735 |
+
if ( ! empty($term_value['opengraph']['title'])) { //Import Facebook Title
|
1736 |
+
update_term_meta($term_id, '_seopress_social_fb_title', $term_value['opengraph']['title']);
|
1737 |
+
}
|
1738 |
+
if ( ! empty($term_value['opengraph']['description'])) { //Import Facebook Desc
|
1739 |
+
update_term_meta($term_id, '_seopress_social_fb_desc', $term_value['opengraph']['description']);
|
1740 |
+
}
|
1741 |
+
if ( ! empty($term_value['opengraph']['images'])) { //Import Facebook Image
|
1742 |
+
$image_id = $term_value['opengraph']['images'][0];
|
1743 |
+
$img_url = wp_get_attachment_url($image_id);
|
1744 |
+
|
1745 |
+
if (isset($img_url) && '' != $img_url) {
|
1746 |
+
update_term_meta($term_id, '_seopress_social_fb_img', $img_url);
|
1747 |
+
}
|
1748 |
+
}
|
1749 |
+
if ( ! empty($term_value['twitter']['title'])) { //Import Facebook Title
|
1750 |
+
update_term_meta($term_id, '_seopress_social_twitter_title', $term_value['twitter']['title']);
|
1751 |
+
}
|
1752 |
+
if ( ! empty($term_value['twitter']['description'])) { //Import Facebook Desc
|
1753 |
+
update_term_meta($term_id, '_seopress_social_twitter_desc', $term_value['twitter']['description']);
|
1754 |
+
}
|
1755 |
+
if ( ! empty($term_value['twitter']['images'])) { //Import Facebook Image
|
1756 |
+
$image_id = $term_value['twitter']['images'][0];
|
1757 |
+
$img_url = wp_get_attachment_url($image_id);
|
1758 |
+
|
1759 |
+
if (isset($img_url) && '' != $img_url) {
|
1760 |
+
update_term_meta($term_id, '_seopress_social_twitter_img', $img_url);
|
1761 |
+
}
|
1762 |
+
}
|
1763 |
+
if ( ! empty($term_value['wds_noindex']) && 'noindex' == $term_value['wds_noindex']) { //Import Robots NoIndex
|
1764 |
+
update_term_meta($term_id, '_seopress_robots_index', 'yes');
|
1765 |
+
}
|
1766 |
+
if ( ! empty($term_value['wds_nofollow']) && 'nofollow' == $term_value['wds_nofollow']) { //Import Robots NoFollow
|
1767 |
+
update_term_meta($term_id, '_seopress_robots_follow', 'yes');
|
1768 |
+
}
|
1769 |
+
if ('' != $term_value['wds_canonical']) { //Import Canonical URL
|
1770 |
+
update_term_meta($term_id, '_seopress_robots_canonical', $term_value['wds_canonical']);
|
1771 |
+
}
|
1772 |
+
}
|
1773 |
+
}
|
1774 |
+
}
|
1775 |
+
$offset = 'done';
|
1776 |
+
wp_reset_query();
|
1777 |
+
} else {
|
1778 |
+
$args = [
|
1779 |
+
'posts_per_page' => $increment,
|
1780 |
+
'post_type' => 'any',
|
1781 |
+
'post_status' => 'any',
|
1782 |
+
'offset' => $offset,
|
1783 |
+
];
|
1784 |
+
|
1785 |
+
$smart_crawl_query = get_posts($args);
|
1786 |
+
|
1787 |
+
if ($smart_crawl_query) {
|
1788 |
+
foreach ($smart_crawl_query as $post) {
|
1789 |
+
if ('' != get_post_meta($post->ID, '_wds_title', true)) { //Import title tag
|
1790 |
+
update_post_meta($post->ID, '_seopress_titles_title', get_post_meta($post->ID, '_wds_title', true));
|
1791 |
+
}
|
1792 |
+
if ('' != get_post_meta($post->ID, '_wds_metadesc', true)) { //Import meta desc
|
1793 |
+
update_post_meta($post->ID, '_seopress_titles_desc', get_post_meta($post->ID, '_wds_metadesc', true));
|
1794 |
+
}
|
1795 |
+
if ('' != get_post_meta($post->ID, '_wds_opengraph', true)) {
|
1796 |
+
$_wds_opengraph = get_post_meta($post->ID, '_wds_opengraph', true);
|
1797 |
+
if ( ! empty($_wds_opengraph['title'])) {
|
1798 |
+
update_post_meta($post->ID, '_seopress_social_fb_title', $_wds_opengraph['title']); //Import Facebook Title
|
1799 |
+
}
|
1800 |
+
if ( ! empty($_wds_opengraph['description'])) { //Import Facebook Desc
|
1801 |
+
update_post_meta($post->ID, '_seopress_social_fb_desc', $_wds_opengraph['description']);
|
1802 |
+
}
|
1803 |
+
if ( ! empty($_wds_opengraph['images'])) { //Import Facebook Image
|
1804 |
+
$image_id = $_wds_opengraph['images'][0];
|
1805 |
+
$img_url = wp_get_attachment_url($image_id);
|
1806 |
+
|
1807 |
+
if (isset($img_url) && '' != $img_url) {
|
1808 |
+
update_post_meta($post->ID, '_seopress_social_fb_img', $img_url);
|
1809 |
+
}
|
1810 |
+
}
|
1811 |
+
}
|
1812 |
+
if ('' != get_post_meta($post->ID, '_wds_twitter', true)) {
|
1813 |
+
$_wds_twitter = get_post_meta($post->ID, '_wds_twitter', true);
|
1814 |
+
if ( ! empty($_wds_twitter['title'])) {
|
1815 |
+
update_post_meta($post->ID, '_seopress_social_twitter_title', $_wds_twitter['title']); //Import Twitter Title
|
1816 |
+
}
|
1817 |
+
if ( ! empty($_wds_twitter['description'])) { //Import Twitter Desc
|
1818 |
+
update_post_meta($post->ID, '_seopress_social_twitter_desc', $_wds_twitter['description']);
|
1819 |
+
}
|
1820 |
+
if ( ! empty($_wds_twitter['images'])) { //Import Twitter Image
|
1821 |
+
$image_id = $_wds_twitter['images'][0];
|
1822 |
+
$img_url = wp_get_attachment_url($image_id);
|
1823 |
+
|
1824 |
+
if (isset($img_url) && '' != $img_url) {
|
1825 |
+
update_post_meta($post->ID, '_seopress_social_twitter_img', $img_url);
|
1826 |
+
}
|
1827 |
+
}
|
1828 |
+
}
|
1829 |
+
if ('1' === get_post_meta($post->ID, '_wds_meta-robots-noindex', true)) { //Import Robots NoIndex
|
1830 |
+
update_post_meta($post->ID, '_seopress_robots_index', 'yes');
|
1831 |
+
}
|
1832 |
+
if ('1' === get_post_meta($post->ID, '_wds_meta-robots-nofollow', true)) { //Import Robots NoIndex
|
1833 |
+
update_post_meta($post->ID, '_seopress_robots_follow', 'yes');
|
1834 |
+
}
|
1835 |
+
if ('' != get_post_meta($post->ID, '_wds_meta-robots-adv', true)) {
|
1836 |
+
$robots = get_post_meta($post->ID, '_wds_meta-robots-adv', true);
|
1837 |
+
if ('' != $robots) {
|
1838 |
+
$robots = explode(',', $robots);
|
1839 |
+
|
1840 |
+
if (in_array('noarchive', $robots)) { //Import Robots NoArchive
|
1841 |
+
update_post_meta($post->ID, '_seopress_robots_archive', 'yes');
|
1842 |
+
}
|
1843 |
+
if (in_array('nosnippet', $robots)) { //Import Robots NoSnippet
|
1844 |
+
update_post_meta($post->ID, '_seopress_robots_snippet', 'yes');
|
1845 |
+
}
|
1846 |
+
}
|
1847 |
+
}
|
1848 |
+
if ('' != get_post_meta($post->ID, '_wds_canonical', true)) { //Import Canonical URL
|
1849 |
+
update_post_meta($post->ID, '_seopress_robots_canonical', get_post_meta($post->ID, '_wds_canonical', true));
|
1850 |
+
}
|
1851 |
+
if ('' != get_post_meta($post->ID, '_wds_redirect', true)) { //Import Redirect URL
|
1852 |
+
update_post_meta($post->ID, '_seopress_redirections_enabled', 'yes');
|
1853 |
+
update_post_meta($post->ID, '_seopress_redirections_type', '301');
|
1854 |
+
update_post_meta($post->ID, '_seopress_redirections_value', get_post_meta($post->ID, '_wds_redirect', true));
|
1855 |
+
}
|
1856 |
+
if ('' != get_post_meta($post->ID, '_wds_focus-keywords', true)) { //Import Focus Keywords
|
1857 |
+
update_post_meta($post->ID, '_seopress_analysis_target_kw', get_post_meta($post->ID, '_wds_focus-keywords', true));
|
1858 |
+
}
|
1859 |
+
}
|
1860 |
+
}
|
1861 |
+
$offset += $increment;
|
1862 |
+
}
|
1863 |
+
$data = [];
|
1864 |
+
$data['offset'] = $offset;
|
1865 |
+
wp_send_json_success($data);
|
1866 |
+
exit();
|
1867 |
+
}
|
1868 |
+
}
|
1869 |
+
add_action('wp_ajax_seopress_smart_crawl_migration', 'seopress_smart_crawl_migration');
|
1870 |
+
|
1871 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1872 |
+
/* SEOPressor migration
|
1873 |
+
* @since 4.5
|
1874 |
+
* @author Benjamin Denis
|
1875 |
+
*/
|
1876 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1877 |
+
function seopress_seopressor_migration() {
|
1878 |
+
check_ajax_referer('seopress_seopressor_migrate_nonce', $_POST['_ajax_nonce'], true);
|
1879 |
+
|
1880 |
+
if (current_user_can(seopress_capability('manage_options', 'migration')) && is_admin()) {
|
1881 |
+
if (isset($_POST['offset']) && isset($_POST['offset'])) {
|
1882 |
+
$offset = absint($_POST['offset']);
|
1883 |
+
}
|
1884 |
+
|
1885 |
+
global $wpdb;
|
1886 |
+
|
1887 |
+
$total_count_posts = (int) $wpdb->get_var("SELECT count(*) FROM {$wpdb->posts}");
|
1888 |
+
|
1889 |
+
$increment = 200;
|
1890 |
+
global $post;
|
1891 |
+
|
1892 |
+
if ($offset > $total_count_posts) {
|
1893 |
+
$offset = 'done';
|
1894 |
+
wp_reset_query();
|
1895 |
+
} else {
|
1896 |
+
$args = [
|
1897 |
+
'posts_per_page' => $increment,
|
1898 |
+
'post_type' => 'any',
|
1899 |
+
'post_status' => 'any',
|
1900 |
+
'offset' => $offset,
|
1901 |
+
];
|
1902 |
+
|
1903 |
+
$su_query = get_posts($args);
|
1904 |
+
|
1905 |
+
if ($su_query) {
|
1906 |
+
foreach ($su_query as $post) {
|
1907 |
+
if ( ! empty(get_post_meta($post->ID, '_seop_settings', true))) {
|
1908 |
+
$_seop_settings = get_post_meta($post->ID, '_seop_settings', true);
|
1909 |
+
|
1910 |
+
if ( ! empty($_seop_settings['meta_title'])) { //Import title tag
|
1911 |
+
update_post_meta($post->ID, '_seopress_titles_title', $_seop_settings['meta_title']);
|
1912 |
+
}
|
1913 |
+
if ( ! empty($_seop_settings['meta_description'])) { //Import meta desc
|
1914 |
+
update_post_meta($post->ID, '_seopress_titles_desc', $_seop_settings['meta_description']);
|
1915 |
+
}
|
1916 |
+
if ( ! empty($_seop_settings['fb_title'])) { //Import Facebook Title
|
1917 |
+
update_post_meta($post->ID, '_seopress_social_fb_title', $_seop_settings['fb_title']);
|
1918 |
+
}
|
1919 |
+
if ( ! empty($_seop_settings['fb_description'])) { //Import Facebook Desc
|
1920 |
+
update_post_meta($post->ID, '_seopress_social_fb_desc', $_seop_settings['fb_description']);
|
1921 |
+
}
|
1922 |
+
if ( ! empty($_seop_settings['fb_img'])) { //Import Facebook Image
|
1923 |
+
update_post_meta($post->ID, '_seopress_social_fb_img', $_seop_settings['fb_img']);
|
1924 |
+
}
|
1925 |
+
if ( ! empty($_seop_settings['tw_title'])) { //Import Twitter Title
|
1926 |
+
update_post_meta($post->ID, '_seopress_social_twitter_title', $_seop_settings['tw_title']);
|
1927 |
+
}
|
1928 |
+
if ( ! empty($_seop_settings['tw_description'])) { //Import Twitter Desc
|
1929 |
+
update_post_meta($post->ID, '_seopress_social_twitter_desc', $_seop_settings['tw_description']);
|
1930 |
+
}
|
1931 |
+
if ( ! empty($_seop_settings['tw_image'])) { //Import Twitter Image
|
1932 |
+
update_post_meta($post->ID, '_seopress_social_twitter_img', $_seop_settings['tw_image']);
|
1933 |
+
}
|
1934 |
+
if ( ! empty($_seop_settings['meta_rules'])) {
|
1935 |
+
$robots = explode('#|#|#', $_seop_settings['meta_rules']);
|
1936 |
+
|
1937 |
+
if ( ! empty($robots)) {
|
1938 |
+
if (in_array('noindex', $robots)) { //Import Robots NoIndex
|
1939 |
+
update_post_meta($post->ID, '_seopress_robots_index', 'yes');
|
1940 |
+
}
|
1941 |
+
if (in_array('nofollow', $robots)) { //Import Robots NoFollow
|
1942 |
+
update_post_meta($post->ID, '_seopress_robots_follow', 'yes');
|
1943 |
+
}
|
1944 |
+
if (in_array('noarchive', $robots)) { //Import Robots NoArchive
|
1945 |
+
update_post_meta($post->ID, '_seopress_robots_archive', 'yes');
|
1946 |
+
}
|
1947 |
+
if (in_array('nosnippet', $robots)) { //Import Robots NoSnippet
|
1948 |
+
update_post_meta($post->ID, '_seopress_robots_snippet', 'yes');
|
1949 |
+
}
|
1950 |
+
if (in_array('noodp', $robots)) { //Import Robots NoOdp
|
1951 |
+
update_post_meta($post->ID, '_seopress_robots_odp', 'yes');
|
1952 |
+
}
|
1953 |
+
if (in_array('noimageindex', $robots)) { //Import Robots NoImageIndex
|
1954 |
+
update_post_meta($post->ID, '_seopress_robots_imageindex', 'yes');
|
1955 |
+
}
|
1956 |
+
}
|
1957 |
+
}
|
1958 |
+
if ('' != get_post_meta($post->ID, '_seop_kw_1', true) || '' != get_post_meta($post->ID, '_seop_kw_2', true) || '' != get_post_meta($post->ID, '_seop_kw_3', true)) { //Import Target Keyword
|
1959 |
+
$kw = [];
|
1960 |
+
$kw[] = get_post_meta($post->ID, '_seop_kw_1', true);
|
1961 |
+
$kw[] = get_post_meta($post->ID, '_seop_kw_2', true);
|
1962 |
+
$kw[] = get_post_meta($post->ID, '_seop_kw_3', true);
|
1963 |
+
|
1964 |
+
$kw = implode(',', $kw);
|
1965 |
+
|
1966 |
+
if ( ! empty($kw)) {
|
1967 |
+
update_post_meta($post->ID, '_seopress_analysis_target_kw', $kw);
|
1968 |
+
}
|
1969 |
+
}
|
1970 |
+
if ( ! empty($_seop_settings['meta_canonical'])) { //Import Canonical URL
|
1971 |
+
update_post_meta($post->ID, '_seopress_robots_canonical', $_seop_settings['meta_canonical']);
|
1972 |
+
}
|
1973 |
+
if ( ! empty($_seop_settings['meta_redirect'])) { //Import Redirect URL
|
1974 |
+
update_post_meta($post->ID, '_seopress_redirections_value', $_seop_settings['meta_redirect']);
|
1975 |
+
update_post_meta($post->ID, '_seopress_redirections_enabled', 'yes'); //Enable the redirect
|
1976 |
+
}
|
1977 |
+
}
|
1978 |
+
}
|
1979 |
+
}
|
1980 |
+
$offset += $increment;
|
1981 |
+
}
|
1982 |
+
$data = [];
|
1983 |
+
$data['offset'] = $offset;
|
1984 |
+
wp_send_json_success($data);
|
1985 |
+
exit();
|
1986 |
+
}
|
1987 |
+
}
|
1988 |
+
add_action('wp_ajax_seopress_seopressor_migration', 'seopress_seopressor_migration');
|
1989 |
+
|
1990 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
1991 |
//Export SEOPress metadata to CSV
|
1992 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
@@ -16,7 +16,7 @@ function googlePreview() {
|
|
16 |
is_elementor: seopressElementorBase.is_elementor,
|
17 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
18 |
},
|
19 |
-
success: function(t) {
|
20 |
jQuery(".elementor-control-field.google-snippet-box .google-snippet-preview .snippet-title").html(t.data.title);
|
21 |
jQuery(".elementor-control-field.google-snippet-box .google-snippet-preview .snippet-title-default").html(t.data.title);
|
22 |
jQuery(".elementor-control-field.google-snippet-box .google-snippet-preview .snippet-description").html(t.data.meta_desc);
|
@@ -28,11 +28,11 @@ function googlePreview() {
|
|
28 |
$metaTitle.attr('placeholder', t.data.title);
|
29 |
$metaDesc.attr('placeholder', t.data.meta_desc);
|
30 |
|
31 |
-
if($metaTitle.val() == '') {
|
32 |
elementor.modules.controls.Seopresstextlettercounter.prototype.countLength(false, $metaTitle);
|
33 |
}
|
34 |
|
35 |
-
if($metaDesc.val() == '') {
|
36 |
elementor.modules.controls.Seopresstextlettercounter.prototype.countLength(false, $metaDesc);
|
37 |
}
|
38 |
}
|
@@ -58,24 +58,25 @@ function socialPreview() {
|
|
58 |
}
|
59 |
|
60 |
function socialPreviewFillData(s) {
|
61 |
-
typeof s.data.og_title ==="undefined" ? og_title = "" : og_title = s.data.og_title.values;
|
62 |
-
typeof s.data.og_desc ==="undefined" ? og_desc = "" : og_desc = s.data.og_desc.values;
|
63 |
-
typeof s.data.og_img ==="undefined" ? og_img = "" : og_img = s.data.og_img.values;
|
64 |
-
typeof s.data.og_url ==="undefined" ? og_url = "" : og_url = s.data.og_url.host;
|
65 |
-
typeof s.data.og_site_name ==="undefined" ? og_site_name = "" : og_site_name = s.data.og_site_name.values;
|
66 |
-
typeof s.data.tw_title ==="undefined" ? tw_title = "" : tw_title = s.data.tw_title.values;
|
67 |
-
typeof s.data.tw_desc ==="undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
|
68 |
-
typeof s.data.tw_img ==="undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
|
69 |
-
typeof s.data.meta_robots ==="undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
|
70 |
-
|
71 |
-
var data_arr = {
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
79 |
};
|
80 |
|
81 |
for (var key in data_arr) {
|
@@ -107,7 +108,7 @@ function socialPreviewFillData(s) {
|
|
107 |
}
|
108 |
|
109 |
jQuery(".facebook-snippet-preview .snippet-fb-url").html(data_arr.og_url),
|
110 |
-
|
111 |
|
112 |
// Twitter Preview
|
113 |
if (data_arr.tw_title) {
|
@@ -130,7 +131,7 @@ function socialPreviewFillData(s) {
|
|
130 |
|
131 |
function contentAnalysisToggle() {
|
132 |
var stop = false;
|
133 |
-
jQuery(document).on('click', '.gr-analysis-title .btn-toggle', function(event) {
|
134 |
if (stop) {
|
135 |
event.stopImmediatePropagation();
|
136 |
event.preventDefault();
|
@@ -141,12 +142,12 @@ function contentAnalysisToggle() {
|
|
141 |
});
|
142 |
|
143 |
//Show all
|
144 |
-
jQuery(document).on('click', '#expand-all', function(e) {
|
145 |
e.preventDefault();
|
146 |
jQuery('.gr-analysis-content').show();
|
147 |
});
|
148 |
//Hide all
|
149 |
-
jQuery(document).on('click', '#close-all', function(e) {
|
150 |
e.preventDefault();
|
151 |
jQuery('.gr-analysis-content').hide();
|
152 |
});
|
@@ -166,24 +167,24 @@ function contentAnalysis() {
|
|
166 |
is_elementor: seopressElementorBase.is_elementor,
|
167 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
168 |
},
|
169 |
-
beforeSend: function() {
|
170 |
jQuery(".analysis-score p span").fadeIn().text(seopressElementorBase.i18n.progress),
|
171 |
-
|
172 |
},
|
173 |
-
success: function(s) {
|
174 |
-
typeof s.data.meta_robots ==="undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
|
175 |
-
|
176 |
// Meta Robots
|
177 |
meta_robots = meta_robots.toString();
|
178 |
-
|
179 |
jQuery("#sp-advanced-alert").empty();
|
180 |
|
181 |
var if_noindex = new RegExp('noindex');
|
182 |
|
183 |
-
if(if_noindex.test(meta_robots)){
|
184 |
jQuery("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>');
|
185 |
}
|
186 |
-
|
187 |
jQuery("#seopress-analysis-tabs").load("/wp-admin/post.php?post=" + seopressElementorBase.post_id + "&action=edit #seopress-analysis-tabs-1");
|
188 |
jQuery(".analysis-score p").removeClass('loading');
|
189 |
}
|
@@ -191,55 +192,55 @@ function contentAnalysis() {
|
|
191 |
}
|
192 |
|
193 |
function sp_is_valid_url(string) {
|
194 |
-
|
195 |
-
|
196 |
}
|
197 |
|
198 |
function sp_social_img(social_slug) {
|
199 |
-
jQuery(".snippet-"+social_slug+"-img-alert").css("display", "none");
|
200 |
const imgSelector = social_slug == 'fb' ? '.snippet-' + social_slug + '-img img' : '.snippet-' + social_slug + '-img-default img';
|
201 |
var meta_img_val = jQuery(imgSelector).attr('src');
|
202 |
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
}
|
16 |
is_elementor: seopressElementorBase.is_elementor,
|
17 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
18 |
},
|
19 |
+
success: function (t) {
|
20 |
jQuery(".elementor-control-field.google-snippet-box .google-snippet-preview .snippet-title").html(t.data.title);
|
21 |
jQuery(".elementor-control-field.google-snippet-box .google-snippet-preview .snippet-title-default").html(t.data.title);
|
22 |
jQuery(".elementor-control-field.google-snippet-box .google-snippet-preview .snippet-description").html(t.data.meta_desc);
|
28 |
$metaTitle.attr('placeholder', t.data.title);
|
29 |
$metaDesc.attr('placeholder', t.data.meta_desc);
|
30 |
|
31 |
+
if ($metaTitle.val() == '') {
|
32 |
elementor.modules.controls.Seopresstextlettercounter.prototype.countLength(false, $metaTitle);
|
33 |
}
|
34 |
|
35 |
+
if ($metaDesc.val() == '') {
|
36 |
elementor.modules.controls.Seopresstextlettercounter.prototype.countLength(false, $metaDesc);
|
37 |
}
|
38 |
}
|
58 |
}
|
59 |
|
60 |
function socialPreviewFillData(s) {
|
61 |
+
typeof s.data.og_title === "undefined" ? og_title = "" : og_title = s.data.og_title.values;
|
62 |
+
typeof s.data.og_desc === "undefined" ? og_desc = "" : og_desc = s.data.og_desc.values;
|
63 |
+
typeof s.data.og_img === "undefined" ? og_img = "" : og_img = s.data.og_img.values;
|
64 |
+
typeof s.data.og_url === "undefined" ? og_url = "" : og_url = s.data.og_url.host;
|
65 |
+
typeof s.data.og_site_name === "undefined" ? og_site_name = "" : og_site_name = s.data.og_site_name.values;
|
66 |
+
typeof s.data.tw_title === "undefined" ? tw_title = "" : tw_title = s.data.tw_title.values;
|
67 |
+
typeof s.data.tw_desc === "undefined" ? tw_desc = "" : tw_desc = s.data.tw_desc.values;
|
68 |
+
typeof s.data.tw_img === "undefined" ? tw_img = "" : tw_img = s.data.tw_img.values;
|
69 |
+
typeof s.data.meta_robots === "undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
|
70 |
+
|
71 |
+
var data_arr = {
|
72 |
+
og_title: og_title,
|
73 |
+
og_desc: og_desc,
|
74 |
+
og_img: og_img,
|
75 |
+
og_url: og_url,
|
76 |
+
og_site_name: og_site_name,
|
77 |
+
tw_title: tw_title,
|
78 |
+
tw_desc: tw_desc,
|
79 |
+
tw_img: tw_img
|
80 |
};
|
81 |
|
82 |
for (var key in data_arr) {
|
108 |
}
|
109 |
|
110 |
jQuery(".facebook-snippet-preview .snippet-fb-url").html(data_arr.og_url),
|
111 |
+
jQuery(".facebook-snippet-preview .snippet-fb-site-name").html(data_arr.og_site_name)
|
112 |
|
113 |
// Twitter Preview
|
114 |
if (data_arr.tw_title) {
|
131 |
|
132 |
function contentAnalysisToggle() {
|
133 |
var stop = false;
|
134 |
+
jQuery(document).on('click', '.gr-analysis-title .btn-toggle', function (event) {
|
135 |
if (stop) {
|
136 |
event.stopImmediatePropagation();
|
137 |
event.preventDefault();
|
142 |
});
|
143 |
|
144 |
//Show all
|
145 |
+
jQuery(document).on('click', '#expand-all', function (e) {
|
146 |
e.preventDefault();
|
147 |
jQuery('.gr-analysis-content').show();
|
148 |
});
|
149 |
//Hide all
|
150 |
+
jQuery(document).on('click', '#close-all', function (e) {
|
151 |
e.preventDefault();
|
152 |
jQuery('.gr-analysis-content').hide();
|
153 |
});
|
167 |
is_elementor: seopressElementorBase.is_elementor,
|
168 |
_ajax_nonce: seopressElementorBase.seopress_nonce
|
169 |
},
|
170 |
+
beforeSend: function () {
|
171 |
jQuery(".analysis-score p span").fadeIn().text(seopressElementorBase.i18n.progress),
|
172 |
+
jQuery(".analysis-score p").addClass('loading')
|
173 |
},
|
174 |
+
success: function (s) {
|
175 |
+
typeof s.data.meta_robots === "undefined" ? meta_robots = "" : meta_robots = s.data.meta_robots[0];
|
176 |
+
|
177 |
// Meta Robots
|
178 |
meta_robots = meta_robots.toString();
|
179 |
+
|
180 |
jQuery("#sp-advanced-alert").empty();
|
181 |
|
182 |
var if_noindex = new RegExp('noindex');
|
183 |
|
184 |
+
if (if_noindex.test(meta_robots)) {
|
185 |
jQuery("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>');
|
186 |
}
|
187 |
+
|
188 |
jQuery("#seopress-analysis-tabs").load("/wp-admin/post.php?post=" + seopressElementorBase.post_id + "&action=edit #seopress-analysis-tabs-1");
|
189 |
jQuery(".analysis-score p").removeClass('loading');
|
190 |
}
|
192 |
}
|
193 |
|
194 |
function sp_is_valid_url(string) {
|
195 |
+
var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
|
196 |
+
return (res !== null)
|
197 |
}
|
198 |
|
199 |
function sp_social_img(social_slug) {
|
200 |
+
jQuery(".snippet-" + social_slug + "-img-alert").css("display", "none");
|
201 |
const imgSelector = social_slug == 'fb' ? '.snippet-' + social_slug + '-img img' : '.snippet-' + social_slug + '-img-default img';
|
202 |
var meta_img_val = jQuery(imgSelector).attr('src');
|
203 |
|
204 |
+
// Check valid URL
|
205 |
+
if (typeof meta_img_val != 'undefined' && sp_is_valid_url(meta_img_val) === true) {
|
206 |
+
if (meta_img_val.length > 0) {
|
207 |
+
// Check file URL
|
208 |
+
jQuery.get(meta_img_val).done(function () {
|
209 |
+
// Extract filetype
|
210 |
+
var meta_img_filetype = meta_img_val.split(/\#|\?/)[0].split('.').pop().trim();
|
211 |
+
var types = ['jpg', 'jpeg', 'gif', 'png'];
|
212 |
+
|
213 |
+
if (types.indexOf(meta_img_filetype) == -1) {
|
214 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert1").css("display", "block");
|
215 |
+
} else {
|
216 |
+
// Extract image size
|
217 |
+
var tmp_img = new Image();
|
218 |
+
tmp_img.src = meta_img_val;
|
219 |
+
jQuery(tmp_img).one('load', function () {
|
220 |
+
pic_real_width = parseInt(tmp_img.width);
|
221 |
+
pic_real_height = parseInt(tmp_img.height);
|
222 |
+
|
223 |
+
// Default minimum size
|
224 |
+
if (social_slug == 'fb') {
|
225 |
+
min_width = 200,
|
226 |
+
min_height = 200
|
227 |
+
} else {
|
228 |
+
min_width = 144,
|
229 |
+
min_height = 144
|
230 |
+
}
|
231 |
+
if (pic_real_width < min_width || pic_real_height < min_height) {
|
232 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert2").css("display", "block");
|
233 |
+
}
|
234 |
+
ratio_img = (pic_real_width / pic_real_height).toFixed(2);
|
235 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert4").css("display", "block");
|
236 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert4 span").text(ratio_img);
|
237 |
+
});
|
238 |
+
}
|
239 |
+
}).fail(function () {
|
240 |
+
jQuery(".snippet-" + social_slug + "-img-alert.alert3").css("display", "block");
|
241 |
+
});
|
242 |
+
}
|
243 |
+
} else {
|
244 |
+
jQuery(document).find(".snippet-" + social_slug + "-img-alert.alert5").css("display", "block");
|
245 |
+
}
|
246 |
+
}
|
@@ -2,14 +2,19 @@ contentAnalysisToggle();
|
|
2 |
|
3 |
var contentAnalysisView = elementor.modules.controls.BaseData.extend({
|
4 |
onReady: function () {
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
8 |
contentAnalysis();
|
9 |
-
jQuery(document).on("click", "#seopress_launch_analysis", function() {
|
10 |
contentAnalysis();
|
11 |
-
})
|
12 |
-
}
|
13 |
});
|
14 |
|
15 |
-
elementor.addControlView(
|
2 |
|
3 |
var contentAnalysisView = elementor.modules.controls.BaseData.extend({
|
4 |
onReady: function () {
|
5 |
+
if (
|
6 |
+
seopressFiltersElementor.resize_panel &&
|
7 |
+
seopressFiltersElementor.resize_panel === "1"
|
8 |
+
) {
|
9 |
+
elementor.panel.storage.size.width = "495px";
|
10 |
+
elementor.panel.setSize();
|
11 |
+
}
|
12 |
+
|
13 |
contentAnalysis();
|
14 |
+
jQuery(document).on("click", "#seopress_launch_analysis", function () {
|
15 |
contentAnalysis();
|
16 |
+
});
|
17 |
+
},
|
18 |
});
|
19 |
|
20 |
+
elementor.addControlView("seopress-content-analysis", contentAnalysisView);
|
@@ -1,169 +1,231 @@
|
|
1 |
-
jQuery(document).ready(function() {
|
2 |
-
jQuery(document).on(
|
3 |
-
jQuery("#elementor-panel-footer-settings").trigger(
|
4 |
-
jQuery(".elementor-control-seopress_title_settings").trigger(
|
5 |
});
|
6 |
});
|
7 |
|
8 |
var scriptInitialized = false;
|
9 |
var socialInitialized = false;
|
10 |
|
11 |
-
const runGooglePreview = function() {
|
12 |
-
setTimeout(function() {
|
13 |
googlePreview();
|
14 |
-
}, 1000
|
15 |
-
}
|
16 |
|
17 |
var socialPreviewItemView = elementor.modules.controls.BaseData.extend({
|
18 |
onReady: function () {
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
var $ = jQuery;
|
23 |
|
24 |
-
const observeFBThumbnail = function() {
|
25 |
-
let fbThumbnail = document.querySelectorAll(
|
|
|
|
|
26 |
|
27 |
-
if(!fbThumbnail.length) {
|
28 |
return;
|
29 |
}
|
30 |
|
31 |
fbThumbnail = fbThumbnail[0];
|
32 |
|
33 |
-
const observer = new MutationObserver(function(mutations) {
|
34 |
-
mutations.forEach(function(mutation) {
|
35 |
-
if (
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
38 |
img = elSocialData.fbDefaultImage;
|
39 |
}
|
40 |
-
$(
|
41 |
-
sp_social_img(
|
42 |
}
|
43 |
});
|
44 |
});
|
45 |
|
46 |
observer.observe(fbThumbnail, {
|
47 |
-
attributes: true
|
48 |
});
|
49 |
-
}
|
50 |
|
51 |
-
const observeTWThumbnail = function() {
|
52 |
-
let twThumbnail = document.querySelectorAll(
|
|
|
|
|
53 |
|
54 |
-
if(!twThumbnail.length) {
|
55 |
return;
|
56 |
}
|
57 |
|
58 |
twThumbnail = twThumbnail[0];
|
59 |
|
60 |
-
const observer = new MutationObserver(function(mutations) {
|
61 |
-
mutations.forEach(function(mutation) {
|
62 |
-
if (
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
65 |
img = elSocialData.twDefaultImage;
|
66 |
}
|
67 |
-
$(
|
68 |
-
sp_social_img(
|
69 |
}
|
70 |
});
|
71 |
});
|
72 |
|
73 |
observer.observe(twThumbnail, {
|
74 |
-
attributes: true
|
75 |
});
|
76 |
-
}
|
77 |
|
78 |
-
const updateFbSnippetTitle = function() {
|
79 |
let value = $(this).val();
|
80 |
|
81 |
-
if(value ==
|
82 |
-
value = $(this).attr(
|
83 |
}
|
84 |
|
85 |
-
$(
|
86 |
-
}
|
87 |
|
88 |
-
const updateFbSnippetDesc = function() {
|
89 |
let value = $(this).val();
|
90 |
|
91 |
-
if(value ==
|
92 |
-
value = $(this).attr(
|
93 |
}
|
94 |
|
95 |
-
$(
|
96 |
-
}
|
97 |
|
98 |
-
const updateTwSnippetTitle = function() {
|
99 |
let value = $(this).val();
|
100 |
|
101 |
-
if(value ==
|
102 |
-
value = $(this).attr(
|
103 |
}
|
104 |
|
105 |
-
$(
|
106 |
-
}
|
107 |
|
108 |
-
const updateTwSnippetDesc = function() {
|
109 |
let value = $(this).val();
|
110 |
|
111 |
-
if(value ==
|
112 |
-
value = $(this).attr(
|
113 |
}
|
114 |
|
115 |
-
$(
|
116 |
-
}
|
117 |
-
|
118 |
-
$(document).on(
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
} else {
|
128 |
-
$(
|
|
|
|
|
129 |
}
|
130 |
-
|
131 |
-
$(document).on(
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
scriptInitialized = true;
|
137 |
}
|
138 |
|
139 |
-
$(document).on(
|
|
|
|
|
|
|
|
|
140 |
|
141 |
-
setTimeout(function() {
|
142 |
observeFBThumbnail();
|
143 |
observeTWThumbnail();
|
144 |
-
}, 1000
|
145 |
|
146 |
-
if(this.model.get(
|
147 |
socialInitialized = true;
|
148 |
socialPreview();
|
149 |
}
|
150 |
|
151 |
-
if(this.model.get(
|
152 |
googlePreview();
|
153 |
-
} else if(this.model.get(
|
154 |
-
setTimeout(function() {
|
155 |
-
sp_social_img(
|
156 |
}, 1000);
|
157 |
} else {
|
158 |
-
setTimeout(function() {
|
159 |
-
sp_social_img(
|
160 |
}, 1000);
|
161 |
}
|
162 |
},
|
163 |
|
164 |
onBeforeDestroy() {
|
165 |
-
jQuery(document).off(
|
166 |
-
|
|
|
|
|
|
|
|
|
167 |
});
|
168 |
|
169 |
-
elementor.addControlView(
|
1 |
+
jQuery(document).ready(function () {
|
2 |
+
jQuery(document).on("click", "#seopress-seo-tab", function (e) {
|
3 |
+
jQuery("#elementor-panel-footer-settings").trigger("click");
|
4 |
+
jQuery(".elementor-control-seopress_title_settings").trigger("click");
|
5 |
});
|
6 |
});
|
7 |
|
8 |
var scriptInitialized = false;
|
9 |
var socialInitialized = false;
|
10 |
|
11 |
+
const runGooglePreview = function () {
|
12 |
+
setTimeout(function () {
|
13 |
googlePreview();
|
14 |
+
}, 1000);
|
15 |
+
};
|
16 |
|
17 |
var socialPreviewItemView = elementor.modules.controls.BaseData.extend({
|
18 |
onReady: function () {
|
19 |
+
if (
|
20 |
+
seopressFiltersElementor.resize_panel &&
|
21 |
+
seopressFiltersElementor.resize_panel === "1"
|
22 |
+
) {
|
23 |
+
elementor.panel.storage.size.width = "495px";
|
24 |
+
elementor.panel.setSize();
|
25 |
+
}
|
26 |
|
27 |
var $ = jQuery;
|
28 |
|
29 |
+
const observeFBThumbnail = function () {
|
30 |
+
let fbThumbnail = document.querySelectorAll(
|
31 |
+
".elementor-control-_seopress_social_fb_img .elementor-control-media__preview"
|
32 |
+
);
|
33 |
|
34 |
+
if (!fbThumbnail.length) {
|
35 |
return;
|
36 |
}
|
37 |
|
38 |
fbThumbnail = fbThumbnail[0];
|
39 |
|
40 |
+
const observer = new MutationObserver(function (mutations) {
|
41 |
+
mutations.forEach(function (mutation) {
|
42 |
+
if (
|
43 |
+
mutation.type == "attributes" &&
|
44 |
+
mutation.attributeName == "style"
|
45 |
+
) {
|
46 |
+
let img = mutation.target.style.backgroundImage
|
47 |
+
.replace('url("', "")
|
48 |
+
.replace('")', "");
|
49 |
+
if (!img.length) {
|
50 |
img = elSocialData.fbDefaultImage;
|
51 |
}
|
52 |
+
$(".snippet-fb-img img").attr("src", img);
|
53 |
+
sp_social_img("fb");
|
54 |
}
|
55 |
});
|
56 |
});
|
57 |
|
58 |
observer.observe(fbThumbnail, {
|
59 |
+
attributes: true,
|
60 |
});
|
61 |
+
};
|
62 |
|
63 |
+
const observeTWThumbnail = function () {
|
64 |
+
let twThumbnail = document.querySelectorAll(
|
65 |
+
".elementor-control-_seopress_social_twitter_img .elementor-control-media__preview"
|
66 |
+
);
|
67 |
|
68 |
+
if (!twThumbnail.length) {
|
69 |
return;
|
70 |
}
|
71 |
|
72 |
twThumbnail = twThumbnail[0];
|
73 |
|
74 |
+
const observer = new MutationObserver(function (mutations) {
|
75 |
+
mutations.forEach(function (mutation) {
|
76 |
+
if (
|
77 |
+
mutation.type == "attributes" &&
|
78 |
+
mutation.attributeName == "style"
|
79 |
+
) {
|
80 |
+
let img = mutation.target.style.backgroundImage
|
81 |
+
.replace('url("', "")
|
82 |
+
.replace('")', "");
|
83 |
+
if (!img.length) {
|
84 |
img = elSocialData.twDefaultImage;
|
85 |
}
|
86 |
+
$(".snippet-twitter-img-default img").attr("src", img);
|
87 |
+
sp_social_img("twitter");
|
88 |
}
|
89 |
});
|
90 |
});
|
91 |
|
92 |
observer.observe(twThumbnail, {
|
93 |
+
attributes: true,
|
94 |
});
|
95 |
+
};
|
96 |
|
97 |
+
const updateFbSnippetTitle = function () {
|
98 |
let value = $(this).val();
|
99 |
|
100 |
+
if (value == "") {
|
101 |
+
value = $(this).attr("placeholder");
|
102 |
}
|
103 |
|
104 |
+
$(".snippet-fb-title").html(value);
|
105 |
+
};
|
106 |
|
107 |
+
const updateFbSnippetDesc = function () {
|
108 |
let value = $(this).val();
|
109 |
|
110 |
+
if (value == "") {
|
111 |
+
value = $(this).attr("placeholder");
|
112 |
}
|
113 |
|
114 |
+
$(".snippet-fb-description-custom").html(value);
|
115 |
+
};
|
116 |
|
117 |
+
const updateTwSnippetTitle = function () {
|
118 |
let value = $(this).val();
|
119 |
|
120 |
+
if (value == "") {
|
121 |
+
value = $(this).attr("placeholder");
|
122 |
}
|
123 |
|
124 |
+
$(".snippet-twitter-title").html(value);
|
125 |
+
};
|
126 |
|
127 |
+
const updateTwSnippetDesc = function () {
|
128 |
let value = $(this).val();
|
129 |
|
130 |
+
if (value == "") {
|
131 |
+
value = $(this).attr("placeholder");
|
132 |
}
|
133 |
|
134 |
+
$(".snippet-twitter-description").html(value);
|
135 |
+
};
|
136 |
+
|
137 |
+
$(document).on(
|
138 |
+
"input",
|
139 |
+
"input[data-setting=_seopress_social_fb_title]",
|
140 |
+
updateFbSnippetTitle
|
141 |
+
);
|
142 |
+
$(document).on(
|
143 |
+
"input",
|
144 |
+
"textarea[data-setting=_seopress_social_fb_desc]",
|
145 |
+
updateFbSnippetDesc
|
146 |
+
);
|
147 |
+
|
148 |
+
$(document).on(
|
149 |
+
"input",
|
150 |
+
"input[data-setting=_seopress_social_twitter_title]",
|
151 |
+
updateTwSnippetTitle
|
152 |
+
);
|
153 |
+
$(document).on(
|
154 |
+
"input",
|
155 |
+
"textarea[data-setting=_seopress_social_twitter_desc]",
|
156 |
+
updateTwSnippetDesc
|
157 |
+
);
|
158 |
+
|
159 |
+
if (!scriptInitialized) {
|
160 |
+
if ($("#toggle-preview").attr("data-toggle") == "1") {
|
161 |
+
$(
|
162 |
+
".elementor-control-field.google-snippet-box .google-snippet-preview"
|
163 |
+
).addClass("mobile-preview");
|
164 |
} else {
|
165 |
+
$(
|
166 |
+
".elementor-control-field.google-snippet-box .google-snippet-preview"
|
167 |
+
).removeClass("mobile-preview");
|
168 |
}
|
169 |
+
|
170 |
+
$(document).on(
|
171 |
+
"click",
|
172 |
+
".elementor-control-field.google-snippet-box #toggle-preview",
|
173 |
+
function () {
|
174 |
+
$(
|
175 |
+
".elementor-control-field.google-snippet-box #toggle-preview"
|
176 |
+
).attr(
|
177 |
+
"data-toggle",
|
178 |
+
$(
|
179 |
+
".elementor-control-field.google-snippet-box #toggle-preview"
|
180 |
+
).attr("data-toggle") == "1"
|
181 |
+
? "0"
|
182 |
+
: "1"
|
183 |
+
);
|
184 |
+
$(
|
185 |
+
".elementor-control-field.google-snippet-box .google-snippet-preview"
|
186 |
+
).toggleClass("mobile-preview");
|
187 |
+
}
|
188 |
+
);
|
189 |
|
190 |
scriptInitialized = true;
|
191 |
}
|
192 |
|
193 |
+
$(document).on(
|
194 |
+
"click",
|
195 |
+
"#elementor-panel-saver-button-publish-label",
|
196 |
+
runGooglePreview
|
197 |
+
);
|
198 |
|
199 |
+
setTimeout(function () {
|
200 |
observeFBThumbnail();
|
201 |
observeTWThumbnail();
|
202 |
+
}, 1000);
|
203 |
|
204 |
+
if (this.model.get("network") !== "google" && !socialInitialized) {
|
205 |
socialInitialized = true;
|
206 |
socialPreview();
|
207 |
}
|
208 |
|
209 |
+
if (this.model.get("network") === "google") {
|
210 |
googlePreview();
|
211 |
+
} else if (this.model.get("network") === "facebook") {
|
212 |
+
setTimeout(function () {
|
213 |
+
sp_social_img("fb");
|
214 |
}, 1000);
|
215 |
} else {
|
216 |
+
setTimeout(function () {
|
217 |
+
sp_social_img("twitter");
|
218 |
}, 1000);
|
219 |
}
|
220 |
},
|
221 |
|
222 |
onBeforeDestroy() {
|
223 |
+
jQuery(document).off(
|
224 |
+
"click",
|
225 |
+
"#elementor-panel-saver-button-publish-label",
|
226 |
+
runGooglePreview
|
227 |
+
);
|
228 |
+
},
|
229 |
});
|
230 |
|
231 |
+
elementor.addControlView("seopress-social-preview", socialPreviewItemView);
|
@@ -12,8 +12,13 @@ var textLetterCounterView = elementor.modules.controls.BaseData.extend({
|
|
12 |
currentEl: null,
|
13 |
|
14 |
onReady: function () {
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
this.getCurrentElement.value = this.model.get("default");
|
19 |
this.countLength(true);
|
12 |
currentEl: null,
|
13 |
|
14 |
onReady: function () {
|
15 |
+
if (
|
16 |
+
seopressFiltersElementor.resize_panel &&
|
17 |
+
seopressFiltersElementor.resize_panel === "1"
|
18 |
+
) {
|
19 |
+
elementor.panel.storage.size.width = "495px";
|
20 |
+
elementor.panel.setSize();
|
21 |
+
}
|
22 |
|
23 |
this.getCurrentElement.value = this.model.get("default");
|
24 |
this.countLength(true);
|
@@ -1,34 +1,35 @@
|
|
1 |
<?php
|
|
|
2 |
namespace WPSeoPressElementorAddon\Controls;
|
3 |
|
4 |
-
if ( ! defined(
|
5 |
-
|
6 |
}
|
7 |
|
8 |
class Google_Suggestions_Control extends \Elementor\Base_Control {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
-
|
14 |
-
wp_enqueue_style(
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
);
|
26 |
-
|
27 |
-
if (get_locale()
|
28 |
-
$locale
|
29 |
$country_code = substr(get_locale(), -2);
|
30 |
} else {
|
31 |
-
$locale
|
32 |
$country_code = 'US';
|
33 |
}
|
34 |
|
@@ -36,25 +37,25 @@ class Google_Suggestions_Control extends \Elementor\Base_Control {
|
|
36 |
'sp-el-google-suggestions-script',
|
37 |
'googleSuggestions',
|
38 |
[
|
39 |
-
'locale'
|
40 |
-
'countryCode' => $country_code
|
41 |
]
|
42 |
);
|
43 |
-
|
44 |
|
45 |
-
|
46 |
global $post;
|
47 |
|
48 |
-
|
49 |
-
'label'
|
50 |
-
'tooltip'
|
51 |
-
'placeholder' => __('Get suggestions from Google','wp-seopress'),
|
52 |
-
'buttonLabel' => __('Get suggestions!','wp-seopress')
|
53 |
-
|
54 |
}
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
<div class="elementor-control-field seopress-google-suggestions">
|
59 |
<label for="seopress_google_suggest_kw_meta">
|
60 |
<div>{{{ data.label }}} {{{ data.tooltip }}}</div>
|
@@ -64,5 +65,5 @@ class Google_Suggestions_Control extends \Elementor\Base_Control {
|
|
64 |
<ul id='seopress_suggestions'></ul>
|
65 |
</div>
|
66 |
<?php
|
67 |
-
|
68 |
-
}
|
1 |
<?php
|
2 |
+
|
3 |
namespace WPSeoPressElementorAddon\Controls;
|
4 |
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit();
|
7 |
}
|
8 |
|
9 |
class Google_Suggestions_Control extends \Elementor\Base_Control {
|
10 |
+
public function get_type() {
|
11 |
+
return 'seopress-google-suggestions';
|
12 |
+
}
|
13 |
|
14 |
+
public function enqueue() {
|
15 |
+
wp_enqueue_style(
|
16 |
+
'sp-el-google-suggestions-style',
|
17 |
+
SEOPRESS_ELEMENTOR_ADDON_URL . 'assets/css/google-suggestions.css'
|
18 |
+
);
|
19 |
|
20 |
+
wp_enqueue_script(
|
21 |
+
'sp-el-google-suggestions-script',
|
22 |
+
SEOPRESS_ELEMENTOR_ADDON_URL . 'assets/js/google-suggestions.js',
|
23 |
+
['jquery'],
|
24 |
+
SEOPRESS_VERSION,
|
25 |
+
true
|
26 |
);
|
27 |
+
|
28 |
+
if ('' != get_locale()) {
|
29 |
+
$locale = substr(get_locale(), 0, 2);
|
30 |
$country_code = substr(get_locale(), -2);
|
31 |
} else {
|
32 |
+
$locale = 'en';
|
33 |
$country_code = 'US';
|
34 |
}
|
35 |
|
37 |
'sp-el-google-suggestions-script',
|
38 |
'googleSuggestions',
|
39 |
[
|
40 |
+
'locale' => $locale,
|
41 |
+
'countryCode' => $country_code,
|
42 |
]
|
43 |
);
|
44 |
+
}
|
45 |
|
46 |
+
protected function get_default_settings() {
|
47 |
global $post;
|
48 |
|
49 |
+
return [
|
50 |
+
'label' => __('Google suggestions', 'wp-seopress'),
|
51 |
+
'tooltip' => 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')),
|
52 |
+
'placeholder' => __('Get suggestions from Google', 'wp-seopress'),
|
53 |
+
'buttonLabel' => __('Get suggestions!', 'wp-seopress'),
|
54 |
+
];
|
55 |
}
|
56 |
+
|
57 |
+
public function content_template() {
|
58 |
+
?>
|
59 |
<div class="elementor-control-field seopress-google-suggestions">
|
60 |
<label for="seopress_google_suggest_kw_meta">
|
61 |
<div>{{{ data.label }}} {{{ data.tooltip }}}</div>
|
65 |
<ul id='seopress_suggestions'></ul>
|
66 |
</div>
|
67 |
<?php
|
68 |
+
}
|
69 |
+
}
|
@@ -1,48 +1,52 @@
|
|
1 |
<?php
|
|
|
2 |
namespace WPSeoPressElementorAddon\Controls;
|
3 |
|
4 |
-
if ( ! defined(
|
5 |
-
|
6 |
}
|
7 |
|
8 |
class Social_Preview_Control extends \Elementor\Base_Control {
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
11,
|
24 |
-
true
|
25 |
-
);
|
26 |
-
}
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
?>
|
39 |
<# if ( data.network === 'facebook' ) { #>
|
40 |
<label class="elementor-control-title">{{{ data.label }}}</label>
|
41 |
<div class="elementor-control-field facebook-snippet-box">
|
42 |
<div class="snippet-fb-img-alert alert1" style="display:none"><p class="notice notice-error"><?php _e('File type not supported by Facebook. Please choose another image.', 'wp-seopress'); ?></p></div>
|
43 |
<div class="snippet-fb-img-alert alert2" style="display:none"><p class="notice notice-error"><?php _e('Minimun size for Facebook is <strong>200x200px</strong>. Please choose another image.', 'wp-seopress'); ?></p></div>
|
44 |
<div class="snippet-fb-img-alert alert3" style="display:none"><p class="notice notice-error"><?php _e('File error. Please choose another image.', 'wp-seopress'); ?></p></div>
|
45 |
-
<div class="snippet-fb-img-alert alert4" style="display:none"><p class="notice notice-info"><?php _e('Your image ratio is: ', 'wp-seopress'); ?><span></span><?php _e('. The closer to 1.91 the better.','wp-seopress'); ?></p></div>
|
46 |
<div class="snippet-fb-img-alert alert5" style="display:none"><p class="notice notice-error"><?php _e('File URL is not valid.', 'wp-seopress'); ?></p></div>
|
47 |
<div class="snippet-fb-img">
|
48 |
<img src="{{{data.image}}}">
|
@@ -51,7 +55,7 @@ class Social_Preview_Control extends \Elementor\Base_Control {
|
|
51 |
<div class="snippet-meta">
|
52 |
<div class="snippet-fb-url"><?php echo $site_url; ?></div>
|
53 |
<div class="fb-sep">|</div>
|
54 |
-
<div class="fb-by"><?php _e(
|
55 |
<div class="snippet-fb-site-name"><?php echo get_bloginfo('name'); ?></div>
|
56 |
</div>
|
57 |
<div class="title-desc">
|
@@ -66,7 +70,7 @@ class Social_Preview_Control extends \Elementor\Base_Control {
|
|
66 |
<div class="snippet-twitter-img-alert alert1" style="display:none"><p class="notice notice-error"><?php _e('File type not supported by Twitter. Please choose another image.', 'wp-seopress'); ?></p></div>
|
67 |
<div class="snippet-twitter-img-alert alert2" style="display:none"><p class="notice notice-error"><?php _e('Minimun size for Twitter is <strong>144x144px</strong>. Please choose another image.', 'wp-seopress'); ?></p></div>
|
68 |
<div class="snippet-twitter-img-alert alert3" style="display:none"><p class="notice notice-error"><?php _e('File error. Please choose another image.', 'wp-seopress'); ?></p></div>
|
69 |
-
<div class="snippet-twitter-img-alert alert4" style="display:none"><p class="notice notice-info"><?php _e('Your image ratio is: ', 'wp-seopress'); ?><span></span><?php _e('. The closer to 1 the better (with large card, 2 is better).','wp-seopress'); ?></p></div>
|
70 |
<div class="snippet-twitter-img-alert alert5" style="display:none"><p class="notice notice-error"><?php _e('File URL is not valid.', 'wp-seopress'); ?></p></div>
|
71 |
<div class="snippet-twitter-img-default">
|
72 |
<img src="{{{data.image}}}">
|
@@ -88,7 +92,7 @@ class Social_Preview_Control extends \Elementor\Base_Control {
|
|
88 |
<div class="wrap-toggle-preview">
|
89 |
<p>
|
90 |
<span class="dashicons dashicons-smartphone"></span>
|
91 |
-
<?php _e(
|
92 |
<input type="checkbox" name="toggle-preview" id="toggle-preview" class="toggle" data-toggle="1">
|
93 |
<label for="toggle-preview"></label>
|
94 |
</p>
|
@@ -108,5 +112,5 @@ class Social_Preview_Control extends \Elementor\Base_Control {
|
|
108 |
</div>
|
109 |
<# } #>
|
110 |
<?php
|
111 |
-
|
112 |
-
}
|
1 |
<?php
|
2 |
+
|
3 |
namespace WPSeoPressElementorAddon\Controls;
|
4 |
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit();
|
7 |
}
|
8 |
|
9 |
class Social_Preview_Control extends \Elementor\Base_Control {
|
10 |
+
public function get_type() {
|
11 |
+
return 'seopress-social-preview';
|
12 |
+
}
|
13 |
+
|
14 |
+
public function enqueue() {
|
15 |
+
wp_enqueue_style(
|
16 |
+
'sp-el-social-preview-style',
|
17 |
+
SEOPRESS_ELEMENTOR_ADDON_URL . 'assets/css/social-preview.css'
|
18 |
+
);
|
19 |
|
20 |
+
wp_enqueue_script(
|
21 |
+
'sp-el-social-preview-script',
|
22 |
+
SEOPRESS_ELEMENTOR_ADDON_URL . 'assets/js/social-preview.js',
|
23 |
+
['seopress-elementor-base-script'],
|
24 |
+
11,
|
25 |
+
true
|
26 |
+
);
|
27 |
|
28 |
+
wp_localize_script('sp-el-social-preview-script', 'seopressFiltersElementor', [
|
29 |
+
'resize_panel' => apply_filters('seopress_resize_panel_elementor', true),
|
30 |
+
]);
|
31 |
+
}
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
protected function get_default_settings() {
|
34 |
+
return [
|
35 |
+
'image' => null,
|
36 |
+
'title' => '',
|
37 |
+
'description' => '',
|
38 |
+
];
|
39 |
+
}
|
40 |
|
41 |
+
public function content_template() {
|
42 |
+
$site_url = explode('//', get_bloginfo('url'))[1]; ?>
|
|
|
43 |
<# if ( data.network === 'facebook' ) { #>
|
44 |
<label class="elementor-control-title">{{{ data.label }}}</label>
|
45 |
<div class="elementor-control-field facebook-snippet-box">
|
46 |
<div class="snippet-fb-img-alert alert1" style="display:none"><p class="notice notice-error"><?php _e('File type not supported by Facebook. Please choose another image.', 'wp-seopress'); ?></p></div>
|
47 |
<div class="snippet-fb-img-alert alert2" style="display:none"><p class="notice notice-error"><?php _e('Minimun size for Facebook is <strong>200x200px</strong>. Please choose another image.', 'wp-seopress'); ?></p></div>
|
48 |
<div class="snippet-fb-img-alert alert3" style="display:none"><p class="notice notice-error"><?php _e('File error. Please choose another image.', 'wp-seopress'); ?></p></div>
|
49 |
+
<div class="snippet-fb-img-alert alert4" style="display:none"><p class="notice notice-info"><?php _e('Your image ratio is: ', 'wp-seopress'); ?><span></span><?php _e('. The closer to 1.91 the better.', 'wp-seopress'); ?></p></div>
|
50 |
<div class="snippet-fb-img-alert alert5" style="display:none"><p class="notice notice-error"><?php _e('File URL is not valid.', 'wp-seopress'); ?></p></div>
|
51 |
<div class="snippet-fb-img">
|
52 |
<img src="{{{data.image}}}">
|
55 |
<div class="snippet-meta">
|
56 |
<div class="snippet-fb-url"><?php echo $site_url; ?></div>
|
57 |
<div class="fb-sep">|</div>
|
58 |
+
<div class="fb-by"><?php _e('By', 'wp-seopress'); ?> </div>
|
59 |
<div class="snippet-fb-site-name"><?php echo get_bloginfo('name'); ?></div>
|
60 |
</div>
|
61 |
<div class="title-desc">
|
70 |
<div class="snippet-twitter-img-alert alert1" style="display:none"><p class="notice notice-error"><?php _e('File type not supported by Twitter. Please choose another image.', 'wp-seopress'); ?></p></div>
|
71 |
<div class="snippet-twitter-img-alert alert2" style="display:none"><p class="notice notice-error"><?php _e('Minimun size for Twitter is <strong>144x144px</strong>. Please choose another image.', 'wp-seopress'); ?></p></div>
|
72 |
<div class="snippet-twitter-img-alert alert3" style="display:none"><p class="notice notice-error"><?php _e('File error. Please choose another image.', 'wp-seopress'); ?></p></div>
|
73 |
+
<div class="snippet-twitter-img-alert alert4" style="display:none"><p class="notice notice-info"><?php _e('Your image ratio is: ', 'wp-seopress'); ?><span></span><?php _e('. The closer to 1 the better (with large card, 2 is better).', 'wp-seopress'); ?></p></div>
|
74 |
<div class="snippet-twitter-img-alert alert5" style="display:none"><p class="notice notice-error"><?php _e('File URL is not valid.', 'wp-seopress'); ?></p></div>
|
75 |
<div class="snippet-twitter-img-default">
|
76 |
<img src="{{{data.image}}}">
|
92 |
<div class="wrap-toggle-preview">
|
93 |
<p>
|
94 |
<span class="dashicons dashicons-smartphone"></span>
|
95 |
+
<?php _e('Mobile Preview', 'wp-seopress'); ?>
|
96 |
<input type="checkbox" name="toggle-preview" id="toggle-preview" class="toggle" data-toggle="1">
|
97 |
<label for="toggle-preview"></label>
|
98 |
</p>
|
112 |
</div>
|
113 |
<# } #>
|
114 |
<?php
|
115 |
+
}
|
116 |
+
}
|
@@ -868,15 +868,19 @@ function seopress_bulk_quick_edit_save_post($post_id) {
|
|
868 |
if (isset($_REQUEST['seopress_canonical'])) {
|
869 |
update_post_meta($post_id, '_seopress_robots_canonical', esc_html($_REQUEST['seopress_canonical']));
|
870 |
}
|
871 |
-
if (
|
872 |
-
|
873 |
-
|
874 |
-
|
|
|
|
|
875 |
}
|
876 |
-
if (
|
877 |
-
|
878 |
-
|
879 |
-
|
|
|
|
|
880 |
}
|
881 |
}
|
882 |
|
868 |
if (isset($_REQUEST['seopress_canonical'])) {
|
869 |
update_post_meta($post_id, '_seopress_robots_canonical', esc_html($_REQUEST['seopress_canonical']));
|
870 |
}
|
871 |
+
if ('' != seopress_advanced_appearance_noindex_col_option()) {
|
872 |
+
if (isset($_REQUEST['seopress_noindex'])) {
|
873 |
+
update_post_meta($post_id, '_seopress_robots_index', 'yes');
|
874 |
+
} else {
|
875 |
+
delete_post_meta($post_id, '_seopress_robots_index');
|
876 |
+
}
|
877 |
}
|
878 |
+
if ('' != seopress_advanced_appearance_nofollow_col_option()) {
|
879 |
+
if (isset($_REQUEST['seopress_nofollow'])) {
|
880 |
+
update_post_meta($post_id, '_seopress_robots_follow', 'yes');
|
881 |
+
} else {
|
882 |
+
delete_post_meta($post_id, '_seopress_robots_follow');
|
883 |
+
}
|
884 |
}
|
885 |
}
|
886 |
|
@@ -230,6 +230,8 @@ if ('' != seopress_advanced_advanced_image_auto_alt_target_kw_option()) {
|
|
230 |
if (empty($atts['alt'])) {
|
231 |
if ('' != get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true)) {
|
232 |
$atts['alt'] = esc_html(get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true));
|
|
|
|
|
233 |
}
|
234 |
}
|
235 |
}
|
@@ -254,6 +256,8 @@ if ('' != seopress_advanced_advanced_image_auto_alt_target_kw_option()) {
|
|
254 |
|
255 |
$target_keyword = get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true);
|
256 |
|
|
|
|
|
257 |
if (empty($target_keyword)) {
|
258 |
return $content;
|
259 |
}
|
230 |
if (empty($atts['alt'])) {
|
231 |
if ('' != get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true)) {
|
232 |
$atts['alt'] = esc_html(get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true));
|
233 |
+
|
234 |
+
$atts['alt'] = apply_filters('seopress_auto_image_alt_target_kw', $atts['alt']);
|
235 |
}
|
236 |
}
|
237 |
}
|
256 |
|
257 |
$target_keyword = get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true);
|
258 |
|
259 |
+
$target_keyword = apply_filters('seopress_auto_image_alt_target_kw', $target_keyword);
|
260 |
+
|
261 |
if (empty($target_keyword)) {
|
262 |
return $content;
|
263 |
}
|
@@ -4,8 +4,7 @@ defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks
|
|
4 |
|
5 |
//Google Analytics
|
6 |
//=================================================================================================
|
7 |
-
|
8 |
-
if ((empty($_COOKIE['seopress-user-consent-accept']) || '1' != $_COOKIE['seopress-user-consent-accept']) && (empty($_COOKIE['seopress-user-consent-close']) || '1' != $_COOKIE['seopress-user-consent-close'])) {
|
9 |
function seopress_google_analytics_opt_out_msg_ok_option() {
|
10 |
$seopress_google_analytics_opt_out_msg_ok_option = get_option('seopress_google_analytics_option_name');
|
11 |
if ( ! empty($seopress_google_analytics_opt_out_msg_ok_option)) {
|
@@ -222,11 +221,35 @@ if ('1' == seopress_google_analytics_disable_option() && ((empty($_COOKIE['seopr
|
|
222 |
}
|
223 |
}
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
function seopress_cookies_user_consent_html() {
|
226 |
if ('' != seopress_google_analytics_opt_out_msg_option()) {
|
227 |
$msg = seopress_google_analytics_opt_out_msg_option();
|
228 |
} elseif (get_option('wp_page_for_privacy_policy')) {
|
229 |
-
$msg = __('By visiting our site, you agree to our privacy policy regarding cookies, tracking statistics, etc. <a href="[seopress_privacy_page]"
|
230 |
} else {
|
231 |
$msg = __('By visiting our site, you agree to our privacy policy regarding cookies, tracking statistics, etc.', 'wp-seopress');
|
232 |
}
|
@@ -250,13 +273,13 @@ if ('1' == seopress_google_analytics_disable_option() && ((empty($_COOKIE['seopr
|
|
250 |
$close_btn = __('X', 'wp-seopress');
|
251 |
}
|
252 |
|
253 |
-
$user_msg = '<div class="seopress-user-consent seopress-user-consent-hide"
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
|
261 |
$backdrop = '<div class="seopress-user-consent-backdrop seopress-user-consent-hide"></div>';
|
262 |
|
@@ -265,6 +288,26 @@ if ('1' == seopress_google_analytics_disable_option() && ((empty($_COOKIE['seopr
|
|
265 |
echo $user_msg . $backdrop;
|
266 |
}
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
function seopress_cookies_user_consent_styles() {
|
269 |
$styles = '<style>.seopress-user-consent {left: 50%;position: fixed;z-index: 8000;padding: 20px;display: inline-flex;justify-content: center;border: 1px solid #CCC;max-width:100%;';
|
270 |
|
@@ -312,7 +355,7 @@ if ('1' == seopress_google_analytics_disable_option() && ((empty($_COOKIE['seopr
|
|
312 |
$styles .= 'background:#F1F1F1;';
|
313 |
}
|
314 |
|
315 |
-
$styles .= '}@media (max-width: 782px) {.seopress-user-consent {display: block;}}.seopress-user-consent p:first-child {margin-right:20px}.seopress-user-consent p {margin: 0;font-size: 0.8em;align-self: center;';
|
316 |
|
317 |
//Text color
|
318 |
if ('' != seopress_google_analytics_cb_txt_col_option()) {
|
@@ -413,6 +456,18 @@ if ('1' == seopress_google_analytics_disable_option() && ((empty($_COOKIE['seopr
|
|
413 |
z-index: 100;}';
|
414 |
}
|
415 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
$styles .= '</style>';
|
417 |
|
418 |
$styles = apply_filters('seopress_rgpd_full_message_styles', $styles);
|
@@ -432,24 +487,26 @@ if ('1' == seopress_google_analytics_disable_option() && ((empty($_COOKIE['seopr
|
|
432 |
if (array_key_exists($seopress_user_role, seopress_google_analytics_roles_option())) {
|
433 |
//do nothing
|
434 |
} else {
|
435 |
-
add_action('
|
|
|
436 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
437 |
}
|
438 |
} else {
|
439 |
-
add_action('
|
|
|
440 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
441 |
}
|
442 |
} else {
|
443 |
-
add_action('
|
|
|
444 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
445 |
}
|
446 |
} else {
|
447 |
-
add_action('
|
|
|
448 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
449 |
}
|
450 |
}
|
451 |
-
}
|
452 |
-
}
|
453 |
|
454 |
//Optimize
|
455 |
function seopress_google_analytics_optimize_option() {
|
4 |
|
5 |
//Google Analytics
|
6 |
//=================================================================================================
|
7 |
+
|
|
|
8 |
function seopress_google_analytics_opt_out_msg_ok_option() {
|
9 |
$seopress_google_analytics_opt_out_msg_ok_option = get_option('seopress_google_analytics_option_name');
|
10 |
if ( ! empty($seopress_google_analytics_opt_out_msg_ok_option)) {
|
221 |
}
|
222 |
}
|
223 |
|
224 |
+
function seopress_google_analytics_opt_out_edit_choice_option() {
|
225 |
+
$seopress_google_analytics_opt_out_edit_choice_option = get_option('seopress_google_analytics_option_name');
|
226 |
+
if ( ! empty($seopress_google_analytics_opt_out_edit_choice_option)) {
|
227 |
+
foreach ($seopress_google_analytics_opt_out_edit_choice_option as $key => $seopress_google_analytics_opt_out_edit_choice_value) {
|
228 |
+
$options[$key] = $seopress_google_analytics_opt_out_edit_choice_value;
|
229 |
+
}
|
230 |
+
if (isset($seopress_google_analytics_opt_out_edit_choice_option['seopress_google_analytics_opt_out_edit_choice'])) {
|
231 |
+
return $seopress_google_analytics_opt_out_edit_choice_option['seopress_google_analytics_opt_out_edit_choice'];
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
function seopress_google_analytics_opt_out_msg_edit_option() {
|
237 |
+
$seopress_google_analytics_opt_out_msg_edit_option = get_option('seopress_google_analytics_option_name');
|
238 |
+
if ( ! empty($seopress_google_analytics_opt_out_msg_edit_option)) {
|
239 |
+
foreach ($seopress_google_analytics_opt_out_msg_edit_option as $key => $seopress_google_analytics_opt_out_msg_edit_value) {
|
240 |
+
$options[$key] = $seopress_google_analytics_opt_out_msg_edit_value;
|
241 |
+
}
|
242 |
+
if (isset($seopress_google_analytics_opt_out_msg_edit_option['seopress_google_analytics_opt_out_msg_edit'])) {
|
243 |
+
return $seopress_google_analytics_opt_out_msg_edit_option['seopress_google_analytics_opt_out_msg_edit'];
|
244 |
+
}
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
function seopress_cookies_user_consent_html() {
|
249 |
if ('' != seopress_google_analytics_opt_out_msg_option()) {
|
250 |
$msg = seopress_google_analytics_opt_out_msg_option();
|
251 |
} elseif (get_option('wp_page_for_privacy_policy')) {
|
252 |
+
$msg = __('By visiting our site, you agree to our privacy policy regarding cookies, tracking statistics, etc. <a href="[seopress_privacy_page]">Read more</a>', 'wp-seopress');
|
253 |
} else {
|
254 |
$msg = __('By visiting our site, you agree to our privacy policy regarding cookies, tracking statistics, etc.', 'wp-seopress');
|
255 |
}
|
273 |
$close_btn = __('X', 'wp-seopress');
|
274 |
}
|
275 |
|
276 |
+
$user_msg = '<div data-nosnippet class="seopress-user-consent seopress-user-message seopress-user-consent-hide">
|
277 |
+
<p>' . $msg . '</p>
|
278 |
+
<p>
|
279 |
+
<button id="seopress-user-consent-accept" type="button">' . $consent_btn . '</button>
|
280 |
+
<button type="button" id="seopress-user-consent-close">' . $close_btn . '</button>
|
281 |
+
</p>
|
282 |
+
</div>';
|
283 |
|
284 |
$backdrop = '<div class="seopress-user-consent-backdrop seopress-user-consent-hide"></div>';
|
285 |
|
288 |
echo $user_msg . $backdrop;
|
289 |
}
|
290 |
|
291 |
+
function seopress_cookies_edit_choice_html() {
|
292 |
+
if ('1' === seopress_google_analytics_opt_out_edit_choice_option()) {
|
293 |
+
if ('' != seopress_google_analytics_opt_out_msg_edit_option()) {
|
294 |
+
$edit_cookie_btn = seopress_google_analytics_opt_out_msg_edit_option();
|
295 |
+
} else {
|
296 |
+
$edit_cookie_btn = __('Manage cookies', 'wp-seopress');
|
297 |
+
}
|
298 |
+
|
299 |
+
$user_msg = '<div data-nosnippet class="seopress-user-consent seopress-edit-choice">
|
300 |
+
<p>
|
301 |
+
<button id="seopress-user-consent-edit" type="button">' . $edit_cookie_btn . '</button>
|
302 |
+
</p>
|
303 |
+
</div>';
|
304 |
+
|
305 |
+
$user_msg = apply_filters('seopress_rgpd_full_message', $user_msg, $edit_cookie_btn);
|
306 |
+
|
307 |
+
echo $user_msg;
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
function seopress_cookies_user_consent_styles() {
|
312 |
$styles = '<style>.seopress-user-consent {left: 50%;position: fixed;z-index: 8000;padding: 20px;display: inline-flex;justify-content: center;border: 1px solid #CCC;max-width:100%;';
|
313 |
|
355 |
$styles .= 'background:#F1F1F1;';
|
356 |
}
|
357 |
|
358 |
+
$styles .= '}@media (max-width: 782px) {.seopress-user-consent {display: block;}}.seopress-user-consent.seopress-user-message p:first-child {margin-right:20px}.seopress-user-consent p {margin: 0;font-size: 0.8em;align-self: center;';
|
359 |
|
360 |
//Text color
|
361 |
if ('' != seopress_google_analytics_cb_txt_col_option()) {
|
456 |
z-index: 100;}';
|
457 |
}
|
458 |
|
459 |
+
$styles .= '.seopress-edit-choice{
|
460 |
+
background: none;
|
461 |
+
justify-content: start;
|
462 |
+
z-index: 7500;
|
463 |
+
border: none;
|
464 |
+
width: inherit;
|
465 |
+
transform: none;
|
466 |
+
left: inherit;
|
467 |
+
bottom: 0;
|
468 |
+
top: inherit;
|
469 |
+
}';
|
470 |
+
|
471 |
$styles .= '</style>';
|
472 |
|
473 |
$styles = apply_filters('seopress_rgpd_full_message_styles', $styles);
|
487 |
if (array_key_exists($seopress_user_role, seopress_google_analytics_roles_option())) {
|
488 |
//do nothing
|
489 |
} else {
|
490 |
+
add_action('wp_head', 'seopress_cookies_user_consent_html');
|
491 |
+
add_action('wp_head', 'seopress_cookies_edit_choice_html');
|
492 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
493 |
}
|
494 |
} else {
|
495 |
+
add_action('wp_head', 'seopress_cookies_user_consent_html');
|
496 |
+
add_action('wp_head', 'seopress_cookies_edit_choice_html');
|
497 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
498 |
}
|
499 |
} else {
|
500 |
+
add_action('wp_head', 'seopress_cookies_user_consent_html');
|
501 |
+
add_action('wp_head', 'seopress_cookies_edit_choice_html');
|
502 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
503 |
}
|
504 |
} else {
|
505 |
+
add_action('wp_head', 'seopress_cookies_user_consent_html');
|
506 |
+
add_action('wp_head', 'seopress_cookies_edit_choice_html');
|
507 |
add_action('wp_head', 'seopress_cookies_user_consent_styles');
|
508 |
}
|
509 |
}
|
|
|
|
|
510 |
|
511 |
//Optimize
|
512 |
function seopress_google_analytics_optimize_option() {
|
@@ -13,7 +13,11 @@ if (is_plugin_active('woocommerce/woocommerce.php')) {
|
|
13 |
$order = wc_get_order($order_id);
|
14 |
|
15 |
//Check order status
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
$items_purchased = [];
|
18 |
foreach ($order->get_items() as $item) {
|
19 |
// Get Product object
|
13 |
$order = wc_get_order($order_id);
|
14 |
|
15 |
//Check order status
|
16 |
+
|
17 |
+
$status = ['completed', 'processing'];
|
18 |
+
$status = apply_filters('seopress_gtag_ec_status', $status);
|
19 |
+
|
20 |
+
if (method_exists($order, 'get_status') && (in_array($order->get_status(), $status))) {
|
21 |
$items_purchased = [];
|
22 |
foreach ($order->get_items() as $item) {
|
23 |
// Get Product object
|
@@ -306,6 +306,9 @@ function seopress_export_redirections_settings() {
|
|
306 |
],
|
307 |
],
|
308 |
];
|
|
|
|
|
|
|
309 |
$seopress_redirects_query = new WP_Query($args);
|
310 |
|
311 |
if ($seopress_redirects_query->have_posts()) {
|
306 |
],
|
307 |
],
|
308 |
];
|
309 |
+
|
310 |
+
$args = apply_filters('seopress_export_redirections_query', $args);
|
311 |
+
|
312 |
$seopress_redirects_query = new WP_Query($args);
|
313 |
|
314 |
if ($seopress_redirects_query->have_posts()) {
|
@@ -1,178 +1,235 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
|
4 |
//XML/HTML Sitemap
|
5 |
//=================================================================================================
|
6 |
//HTML Sitemap Enable
|
7 |
function seopress_xml_sitemap_html_enable_option() {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
}
|
17 |
|
18 |
//HTML Sitemap mapping
|
19 |
function seopress_xml_sitemap_html_mapping_option() {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
}
|
29 |
|
30 |
//HTML Sitemap Exclude
|
31 |
function seopress_xml_sitemap_html_exclude_option() {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
40 |
}
|
41 |
|
42 |
//HTML Sitemap Order
|
43 |
function seopress_xml_sitemap_html_order_option() {
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
52 |
}
|
53 |
|
54 |
//HTML Sitemap Order by
|
55 |
function seopress_xml_sitemap_html_orderby_option() {
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
64 |
}
|
65 |
|
66 |
//HTML Sitemap Date
|
67 |
function seopress_xml_sitemap_html_date_option() {
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
-
if (
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
1 |
<?php
|
2 |
+
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
//XML/HTML Sitemap
|
6 |
//=================================================================================================
|
7 |
//HTML Sitemap Enable
|
8 |
function seopress_xml_sitemap_html_enable_option() {
|
9 |
+
$seopress_xml_sitemap_html_enable_option = get_option('seopress_xml_sitemap_option_name');
|
10 |
+
if ( ! empty($seopress_xml_sitemap_html_enable_option)) {
|
11 |
+
foreach ($seopress_xml_sitemap_html_enable_option as $key => $seopress_xml_sitemap_html_enable_value) {
|
12 |
+
$options[$key] = $seopress_xml_sitemap_html_enable_value;
|
13 |
+
}
|
14 |
+
if (isset($seopress_xml_sitemap_html_enable_option['seopress_xml_sitemap_html_enable'])) {
|
15 |
+
return $seopress_xml_sitemap_html_enable_option['seopress_xml_sitemap_html_enable'];
|
16 |
+
}
|
17 |
+
}
|
18 |
}
|
19 |
|
20 |
//HTML Sitemap mapping
|
21 |
function seopress_xml_sitemap_html_mapping_option() {
|
22 |
+
$seopress_xml_sitemap_html_mapping_option = get_option('seopress_xml_sitemap_option_name');
|
23 |
+
if ( ! empty($seopress_xml_sitemap_html_mapping_option)) {
|
24 |
+
foreach ($seopress_xml_sitemap_html_mapping_option as $key => $seopress_xml_sitemap_html_mapping_value) {
|
25 |
+
$options[$key] = $seopress_xml_sitemap_html_mapping_value;
|
26 |
+
}
|
27 |
+
if (isset($seopress_xml_sitemap_html_mapping_option['seopress_xml_sitemap_html_mapping'])) {
|
28 |
+
return $seopress_xml_sitemap_html_mapping_option['seopress_xml_sitemap_html_mapping'];
|
29 |
+
}
|
30 |
+
}
|
31 |
}
|
32 |
|
33 |
//HTML Sitemap Exclude
|
34 |
function seopress_xml_sitemap_html_exclude_option() {
|
35 |
+
$seopress_xml_sitemap_html_exclude_option = get_option('seopress_xml_sitemap_option_name');
|
36 |
+
if ( ! empty($seopress_xml_sitemap_html_exclude_option)) {
|
37 |
+
foreach ($seopress_xml_sitemap_html_exclude_option as $key => $seopress_xml_sitemap_html_exclude_value) {
|
38 |
+
$options[$key] = $seopress_xml_sitemap_html_exclude_value;
|
39 |
+
}
|
40 |
+
if (isset($seopress_xml_sitemap_html_exclude_option['seopress_xml_sitemap_html_exclude'])) {
|
41 |
+
return $seopress_xml_sitemap_html_exclude_option['seopress_xml_sitemap_html_exclude'];
|
42 |
+
}
|
43 |
+
}
|
44 |
}
|
45 |
|
46 |
//HTML Sitemap Order
|
47 |
function seopress_xml_sitemap_html_order_option() {
|
48 |
+
$seopress_xml_sitemap_html_order_option = get_option('seopress_xml_sitemap_option_name');
|
49 |
+
if ( ! empty($seopress_xml_sitemap_html_order_option)) {
|
50 |
+
foreach ($seopress_xml_sitemap_html_order_option as $key => $seopress_xml_sitemap_html_order_value) {
|
51 |
+
$options[$key] = $seopress_xml_sitemap_html_order_value;
|
52 |
+
}
|
53 |
+
if (isset($seopress_xml_sitemap_html_order_option['seopress_xml_sitemap_html_order'])) {
|
54 |
+
return $seopress_xml_sitemap_html_order_option['seopress_xml_sitemap_html_order'];
|
55 |
+
}
|
56 |
+
}
|
57 |
}
|
58 |
|
59 |
//HTML Sitemap Order by
|
60 |
function seopress_xml_sitemap_html_orderby_option() {
|
61 |
+
$seopress_xml_sitemap_html_orderby_option = get_option('seopress_xml_sitemap_option_name');
|
62 |
+
if ( ! empty($seopress_xml_sitemap_html_orderby_option)) {
|
63 |
+
foreach ($seopress_xml_sitemap_html_orderby_option as $key => $seopress_xml_sitemap_html_orderby_value) {
|
64 |
+
$options[$key] = $seopress_xml_sitemap_html_orderby_value;
|
65 |
+
}
|
66 |
+
if (isset($seopress_xml_sitemap_html_orderby_option['seopress_xml_sitemap_html_orderby'])) {
|
67 |
+
return $seopress_xml_sitemap_html_orderby_option['seopress_xml_sitemap_html_orderby'];
|
68 |
+
}
|
69 |
+
}
|
70 |
}
|
71 |
|
72 |
//HTML Sitemap Date
|
73 |
function seopress_xml_sitemap_html_date_option() {
|
74 |
+
$seopress_xml_sitemap_html_date_option = get_option('seopress_xml_sitemap_option_name');
|
75 |
+
if ( ! empty($seopress_xml_sitemap_html_date_option)) {
|
76 |
+
foreach ($seopress_xml_sitemap_html_date_option as $key => $seopress_xml_sitemap_html_date_value) {
|
77 |
+
$options[$key] = $seopress_xml_sitemap_html_date_value;
|
78 |
+
}
|
79 |
+
if (isset($seopress_xml_sitemap_html_date_option['seopress_xml_sitemap_html_date'])) {
|
80 |
+
return $seopress_xml_sitemap_html_date_option['seopress_xml_sitemap_html_date'];
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
//HTML Sitemap Archive links
|
86 |
+
function seopress_xml_sitemap_html_archive_links_option() {
|
87 |
+
$seopress_xml_sitemap_html_archive_links_option = get_option('seopress_xml_sitemap_option_name');
|
88 |
+
if ( ! empty($seopress_xml_sitemap_html_archive_links_option)) {
|
89 |
+
foreach ($seopress_xml_sitemap_html_archive_links_option as $key => $seopress_xml_sitemap_html_archive_links_value) {
|
90 |
+
$options[$key] = $seopress_xml_sitemap_html_archive_links_value;
|
91 |
+
}
|
92 |
+
if (isset($seopress_xml_sitemap_html_archive_links_option['seopress_xml_sitemap_html_archive_links'])) {
|
93 |
+
return $seopress_xml_sitemap_html_archive_links_option['seopress_xml_sitemap_html_archive_links'];
|
94 |
+
}
|
95 |
+
}
|
96 |
}
|
97 |
|
98 |
+
if ('1' == seopress_xml_sitemap_html_enable_option()) {
|
99 |
+
function seopress_xml_sitemap_html_display() {
|
100 |
+
if ('' != seopress_xml_sitemap_html_mapping_option()) {
|
101 |
+
if (is_page(explode(',', seopress_xml_sitemap_html_mapping_option()))) {
|
102 |
+
add_filter('the_content', 'seopress_xml_sitemap_html_hook');
|
103 |
+
}
|
104 |
+
}
|
105 |
+
function seopress_xml_sitemap_html_hook($html) {
|
106 |
+
// Attributes
|
107 |
+
$atts = shortcode_atts(
|
108 |
+
[
|
109 |
+
'cpt' => '',
|
110 |
+
],
|
111 |
+
$html,
|
112 |
+
'[seopress_html_sitemap]'
|
113 |
+
);
|
114 |
+
|
115 |
+
//Exclude IDs
|
116 |
+
if ('' != seopress_xml_sitemap_html_exclude_option()) {
|
117 |
+
$seopress_xml_sitemap_html_exclude_option = seopress_xml_sitemap_html_exclude_option();
|
118 |
+
} else {
|
119 |
+
$seopress_xml_sitemap_html_exclude_option = '';
|
120 |
+
}
|
121 |
+
|
122 |
+
//Order
|
123 |
+
if ('' != seopress_xml_sitemap_html_order_option()) {
|
124 |
+
$seopress_xml_sitemap_html_order_option = seopress_xml_sitemap_html_order_option();
|
125 |
+
} else {
|
126 |
+
$seopress_xml_sitemap_html_order_option = '';
|
127 |
+
}
|
128 |
+
|
129 |
+
//Orderby
|
130 |
+
if ('' != seopress_xml_sitemap_html_orderby_option()) {
|
131 |
+
$seopress_xml_sitemap_html_orderby_option = seopress_xml_sitemap_html_orderby_option();
|
132 |
+
} else {
|
133 |
+
$seopress_xml_sitemap_html_orderby_option = '';
|
134 |
+
}
|
135 |
+
|
136 |
+
$html = '';
|
137 |
+
|
138 |
+
//CPT
|
139 |
+
if ('' != seopress_xml_sitemap_post_types_list_option()) {
|
140 |
+
$html .= '<div class="wrap-html-sitemap sp-html-sitemap">';
|
141 |
+
|
142 |
+
$seopress_xml_sitemap_post_types_list_option = seopress_xml_sitemap_post_types_list_option();
|
143 |
+
|
144 |
+
if (isset($seopress_xml_sitemap_post_types_list_option['page'])) {
|
145 |
+
$seopress_xml_sitemap_post_types_list_option = ['page' => $seopress_xml_sitemap_post_types_list_option['page']] + $seopress_xml_sitemap_post_types_list_option; //Display page first
|
146 |
+
}
|
147 |
+
|
148 |
+
if ( ! empty($atts['cpt'])) {
|
149 |
+
unset($seopress_xml_sitemap_post_types_list_option);
|
150 |
+
|
151 |
+
$cpt = explode(',', $atts['cpt']);
|
152 |
+
|
153 |
+
foreach ($cpt as $key => $value) {
|
154 |
+
$seopress_xml_sitemap_post_types_list_option[$value] = ['include' => '1'];
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
$seopress_xml_sitemap_post_types_list_option = apply_filters('seopress_sitemaps_html_cpt', $seopress_xml_sitemap_post_types_list_option);
|
159 |
+
|
160 |
+
$display_archive = '';
|
161 |
+
foreach ($seopress_xml_sitemap_post_types_list_option as $cpt_key => $cpt_value) {
|
162 |
+
if ('1' !== seopress_xml_sitemap_html_archive_links_option()) {
|
163 |
+
$display_archive = false;
|
164 |
+
}
|
165 |
+
$display_archive = apply_filters('seopress_sitemaps_html_remove_archive', $display_archive, $cpt_key);
|
166 |
+
|
167 |
+
if ( ! empty($cpt_value)) {
|
168 |
+
$html .= '<div class="sp-wrap-cpt">';
|
169 |
+
}
|
170 |
+
$obj = get_post_type_object($cpt_key);
|
171 |
+
if ($obj) {
|
172 |
+
$html .= '<h2 class="sp-cpt-name">' . $obj->labels->name . '</h2>';
|
173 |
+
}
|
174 |
+
foreach ($cpt_value as $_cpt_key => $_cpt_value) {
|
175 |
+
if ('1' == $_cpt_value) {
|
176 |
+
$args = [
|
177 |
+
'posts_per_page' => 1000,
|
178 |
+
'order' => $seopress_xml_sitemap_html_order_option,
|
179 |
+
'orderby' => $seopress_xml_sitemap_html_orderby_option,
|
180 |
+
'post_type' => $cpt_key,
|
181 |
+
'post_status' => 'publish',
|
182 |
+
'meta_query' => [['key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS']],
|
183 |
+
'fields' => 'ids',
|
184 |
+
'exclude' => $seopress_xml_sitemap_html_exclude_option,
|
185 |
+
'suppress_filters' => false,
|
186 |
+
];
|
187 |
+
if ('post' == $cpt_key) {
|
188 |
+
if (get_post_type_archive_link($cpt_key) && 0 != get_option('page_for_posts')) {
|
189 |
+
if (false === $display_archive) {
|
190 |
+
$html .= '<ul>';
|
191 |
+
$html .= '<li><a href="' . get_post_type_archive_link($cpt_key) . '">' . $obj->labels->name . '</a></li>';
|
192 |
+
$html .= '</ul>';
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
$args_cat_query = [
|
197 |
+
'orderby' => 'name',
|
198 |
+
'order' => 'ASC',
|
199 |
+
'meta_query' => [['key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS']],
|
200 |
+
'exclude' => $seopress_xml_sitemap_html_exclude_option,
|
201 |
+
'suppress_filters' => false,
|
202 |
+
];
|
203 |
+
$args_cat_query = apply_filters('seopress_sitemaps_html_cat_query', $args_cat_query);
|
204 |
+
|
205 |
+
$cats = get_categories($args_cat_query);
|
206 |
+
if ( ! empty($cats)) {
|
207 |
+
$html .= '<div class="sp-wrap-cats">';
|
208 |
+
|
209 |
+
foreach ($cats as $cat) {
|
210 |
+
$html .= '<h3 class="sp-cat-name">' . $cat->name . '</h3>';
|
211 |
+
unset($args['cat']);
|
212 |
+
$args['cat'][] = $cat->term_id;
|
213 |
+
require dirname(__FILE__) . '/sitemap/template-html-sitemap.php';
|
214 |
+
}
|
215 |
+
|
216 |
+
$html .= '</div>';
|
217 |
+
}
|
218 |
+
} else {
|
219 |
+
require dirname(__FILE__) . '/sitemap/template-html-sitemap.php';
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
if ( ! empty($cpt_value)) {
|
224 |
+
$html .= '</div>';
|
225 |
+
}
|
226 |
+
}
|
227 |
+
$html .= '</div>';
|
228 |
+
}
|
229 |
+
|
230 |
+
return $html;
|
231 |
+
}
|
232 |
+
add_shortcode('seopress_html_sitemap', 'seopress_xml_sitemap_html_hook');
|
233 |
+
}
|
234 |
+
add_action('wp_head', 'seopress_xml_sitemap_html_display');
|
235 |
}
|
@@ -253,7 +253,9 @@ function seopress_social_accounts_jsonld_hook() {
|
|
253 |
echo $html;
|
254 |
}
|
255 |
}
|
256 |
-
|
|
|
|
|
257 |
|
258 |
//Website Schema.org in JSON-LD - Sitelinks
|
259 |
if (function_exists('seopress_titles_nositelinkssearchbox_option') && '1' == seopress_titles_nositelinkssearchbox_option()) {
|
@@ -519,6 +521,12 @@ function seopress_social_fb_title_hook() {
|
|
519 |
//Init
|
520 |
$seopress_social_og_title ='';
|
521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
if (is_home()) {
|
523 |
if ('' != seopress_social_fb_title_home_option()) {
|
524 |
$seopress_social_og_title .= '<meta property="og:title" content="' . seopress_social_fb_title_home_option() . '" />';
|
@@ -552,10 +560,14 @@ function seopress_social_fb_title_hook() {
|
|
552 |
$seopress_social_og_title .= "\n";
|
553 |
}
|
554 |
|
|
|
|
|
|
|
555 |
//Hook on post OG title - 'seopress_social_og_title'
|
556 |
if (has_filter('seopress_social_og_title')) {
|
557 |
$seopress_social_og_title = apply_filters('seopress_social_og_title', $seopress_social_og_title);
|
558 |
}
|
|
|
559 |
if (isset($seopress_social_og_title) && '' != $seopress_social_og_title) {
|
560 |
if ( ! is_404()) {
|
561 |
echo $seopress_social_og_title;
|
@@ -598,6 +610,12 @@ function seopress_social_fb_desc_hook() {
|
|
598 |
//Init
|
599 |
$seopress_social_og_desc ='';
|
600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
//Excerpt length
|
602 |
$seopress_excerpt_length = 50;
|
603 |
$seopress_excerpt_length = apply_filters('seopress_excerpt_length', $seopress_excerpt_length);
|
@@ -636,6 +654,9 @@ function seopress_social_fb_desc_hook() {
|
|
636 |
$seopress_social_og_desc .= "\n";
|
637 |
}
|
638 |
|
|
|
|
|
|
|
639 |
//Hook on post OG description - 'seopress_social_og_desc'
|
640 |
if (has_filter('seopress_social_og_desc')) {
|
641 |
$seopress_social_og_desc = apply_filters('seopress_social_og_desc', $seopress_social_og_desc);
|
@@ -1049,6 +1070,12 @@ function seopress_social_twitter_title_hook() {
|
|
1049 |
//Init
|
1050 |
$seopress_social_twitter_card_title ='';
|
1051 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1052 |
if (is_home()) {//Home
|
1053 |
if ('' != seopress_social_twitter_title_home_option()) {
|
1054 |
$seopress_social_twitter_card_title .= '<meta name="twitter:title" content="' . seopress_social_twitter_title_home_option() . '" />';
|
@@ -1084,6 +1111,9 @@ function seopress_social_twitter_title_hook() {
|
|
1084 |
$seopress_social_twitter_card_title .= '<meta name="twitter:title" content="' . the_title_attribute('echo=0') . '" />';
|
1085 |
}
|
1086 |
|
|
|
|
|
|
|
1087 |
//Hook on post Twitter card title - 'seopress_social_twitter_card_title'
|
1088 |
if (has_filter('seopress_social_twitter_card_title')) {
|
1089 |
$seopress_social_twitter_card_title = apply_filters('seopress_social_twitter_card_title', $seopress_social_twitter_card_title);
|
@@ -1129,9 +1159,16 @@ function seopress_social_twitter_desc_hook() {
|
|
1129 |
if ('1' == seopress_social_twitter_card_option() && ! is_search()) {
|
1130 |
global $post;
|
1131 |
setup_postdata($post);
|
|
|
1132 |
//Init
|
1133 |
$seopress_social_twitter_card_desc ='';
|
1134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1135 |
//Excerpt length
|
1136 |
$seopress_excerpt_length = 50;
|
1137 |
$seopress_excerpt_length = apply_filters('seopress_excerpt_length', $seopress_excerpt_length);
|
@@ -1171,6 +1208,9 @@ function seopress_social_twitter_desc_hook() {
|
|
1171 |
$seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="' . wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), $seopress_excerpt_length) . '" />';
|
1172 |
}
|
1173 |
|
|
|
|
|
|
|
1174 |
//Hook on post Twitter card description - 'seopress_social_twitter_card_desc'
|
1175 |
if (has_filter('seopress_social_twitter_card_desc')) {
|
1176 |
$seopress_social_twitter_card_desc = apply_filters('seopress_social_twitter_card_desc', $seopress_social_twitter_card_desc);
|
253 |
echo $html;
|
254 |
}
|
255 |
}
|
256 |
+
if (apply_filters('seopress_old_social_accounts_jsonld_hook', ! function_exists('seopress_get_service'))) {
|
257 |
+
add_action('wp_head', 'seopress_social_accounts_jsonld_hook', 1);
|
258 |
+
}
|
259 |
|
260 |
//Website Schema.org in JSON-LD - Sitelinks
|
261 |
if (function_exists('seopress_titles_nositelinkssearchbox_option') && '1' == seopress_titles_nositelinkssearchbox_option()) {
|
521 |
//Init
|
522 |
$seopress_social_og_title ='';
|
523 |
|
524 |
+
$variables = null;
|
525 |
+
$variables = apply_filters('seopress_dyn_variables_fn', $variables);
|
526 |
+
|
527 |
+
$seopress_titles_template_variables_array = $variables['seopress_titles_template_variables_array'];
|
528 |
+
$seopress_titles_template_replace_array = $variables['seopress_titles_template_replace_array'];
|
529 |
+
|
530 |
if (is_home()) {
|
531 |
if ('' != seopress_social_fb_title_home_option()) {
|
532 |
$seopress_social_og_title .= '<meta property="og:title" content="' . seopress_social_fb_title_home_option() . '" />';
|
560 |
$seopress_social_og_title .= "\n";
|
561 |
}
|
562 |
|
563 |
+
//Apply dynamic variables
|
564 |
+
$seopress_social_og_title = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_social_og_title);
|
565 |
+
|
566 |
//Hook on post OG title - 'seopress_social_og_title'
|
567 |
if (has_filter('seopress_social_og_title')) {
|
568 |
$seopress_social_og_title = apply_filters('seopress_social_og_title', $seopress_social_og_title);
|
569 |
}
|
570 |
+
|
571 |
if (isset($seopress_social_og_title) && '' != $seopress_social_og_title) {
|
572 |
if ( ! is_404()) {
|
573 |
echo $seopress_social_og_title;
|
610 |
//Init
|
611 |
$seopress_social_og_desc ='';
|
612 |
|
613 |
+
$variables = null;
|
614 |
+
$variables = apply_filters('seopress_dyn_variables_fn', $variables);
|
615 |
+
|
616 |
+
$seopress_titles_template_variables_array = $variables['seopress_titles_template_variables_array'];
|
617 |
+
$seopress_titles_template_replace_array = $variables['seopress_titles_template_replace_array'];
|
618 |
+
|
619 |
//Excerpt length
|
620 |
$seopress_excerpt_length = 50;
|
621 |
$seopress_excerpt_length = apply_filters('seopress_excerpt_length', $seopress_excerpt_length);
|
654 |
$seopress_social_og_desc .= "\n";
|
655 |
}
|
656 |
|
657 |
+
//Apply dynamic variables
|
658 |
+
$seopress_social_og_desc = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_social_og_desc);
|
659 |
+
|
660 |
//Hook on post OG description - 'seopress_social_og_desc'
|
661 |
if (has_filter('seopress_social_og_desc')) {
|
662 |
$seopress_social_og_desc = apply_filters('seopress_social_og_desc', $seopress_social_og_desc);
|
1070 |
//Init
|
1071 |
$seopress_social_twitter_card_title ='';
|
1072 |
|
1073 |
+
$variables = null;
|
1074 |
+
$variables = apply_filters('seopress_dyn_variables_fn', $variables);
|
1075 |
+
|
1076 |
+
$seopress_titles_template_variables_array = $variables['seopress_titles_template_variables_array'];
|
1077 |
+
$seopress_titles_template_replace_array = $variables['seopress_titles_template_replace_array'];
|
1078 |
+
|
1079 |
if (is_home()) {//Home
|
1080 |
if ('' != seopress_social_twitter_title_home_option()) {
|
1081 |
$seopress_social_twitter_card_title .= '<meta name="twitter:title" content="' . seopress_social_twitter_title_home_option() . '" />';
|
1111 |
$seopress_social_twitter_card_title .= '<meta name="twitter:title" content="' . the_title_attribute('echo=0') . '" />';
|
1112 |
}
|
1113 |
|
1114 |
+
//Apply dynamic variables
|
1115 |
+
$seopress_social_twitter_card_title = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_social_twitter_card_title);
|
1116 |
+
|
1117 |
//Hook on post Twitter card title - 'seopress_social_twitter_card_title'
|
1118 |
if (has_filter('seopress_social_twitter_card_title')) {
|
1119 |
$seopress_social_twitter_card_title = apply_filters('seopress_social_twitter_card_title', $seopress_social_twitter_card_title);
|
1159 |
if ('1' == seopress_social_twitter_card_option() && ! is_search()) {
|
1160 |
global $post;
|
1161 |
setup_postdata($post);
|
1162 |
+
|
1163 |
//Init
|
1164 |
$seopress_social_twitter_card_desc ='';
|
1165 |
|
1166 |
+
$variables = null;
|
1167 |
+
$variables = apply_filters('seopress_dyn_variables_fn', $variables);
|
1168 |
+
|
1169 |
+
$seopress_titles_template_variables_array = $variables['seopress_titles_template_variables_array'];
|
1170 |
+
$seopress_titles_template_replace_array = $variables['seopress_titles_template_replace_array'];
|
1171 |
+
|
1172 |
//Excerpt length
|
1173 |
$seopress_excerpt_length = 50;
|
1174 |
$seopress_excerpt_length = apply_filters('seopress_excerpt_length', $seopress_excerpt_length);
|
1208 |
$seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="' . wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_the_excerpt()))), $seopress_excerpt_length) . '" />';
|
1209 |
}
|
1210 |
|
1211 |
+
//Apply dynamic variables
|
1212 |
+
$seopress_social_twitter_card_desc = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_social_twitter_card_desc);
|
1213 |
+
|
1214 |
//Hook on post Twitter card description - 'seopress_social_twitter_card_desc'
|
1215 |
if (has_filter('seopress_social_twitter_card_desc')) {
|
1216 |
$seopress_social_twitter_card_desc = apply_filters('seopress_social_twitter_card_desc', $seopress_social_twitter_card_desc);
|
@@ -1316,6 +1316,8 @@ if ('0' != get_option('blog_public')) {// Discourage search engines from indexin
|
|
1316 |
//Default meta robots
|
1317 |
$seopress_titles_robots = '<meta name="robots" content="';
|
1318 |
|
|
|
|
|
1319 |
$seopress_comma_count = count($seopress_comma_array);
|
1320 |
for ($i = 0; $i < $seopress_comma_count; ++$i) {
|
1321 |
$seopress_titles_robots .= $seopress_comma_array[$i];
|
@@ -1335,6 +1337,8 @@ if ('0' != get_option('blog_public')) {// Discourage search engines from indexin
|
|
1335 |
//Googlebot
|
1336 |
$seopress_titles_robots .= '<meta name="googlebot" content="';
|
1337 |
|
|
|
|
|
1338 |
$seopress_comma_count = count($seopress_comma_array);
|
1339 |
for ($i = 0; $i < $seopress_comma_count; ++$i) {
|
1340 |
$seopress_titles_robots .= $seopress_comma_array[$i];
|
@@ -1349,6 +1353,8 @@ if ('0' != get_option('blog_public')) {// Discourage search engines from indexin
|
|
1349 |
//Bingbot
|
1350 |
$seopress_titles_robots .= '<meta name="bingbot" content="';
|
1351 |
|
|
|
|
|
1352 |
$seopress_comma_count = count($seopress_comma_array);
|
1353 |
for ($i = 0; $i < $seopress_comma_count; ++$i) {
|
1354 |
$seopress_titles_robots .= $seopress_comma_array[$i];
|
1316 |
//Default meta robots
|
1317 |
$seopress_titles_robots = '<meta name="robots" content="';
|
1318 |
|
1319 |
+
$seopress_comma_array = apply_filters('seopress_titles_robots_attrs', $seopress_comma_array);
|
1320 |
+
|
1321 |
$seopress_comma_count = count($seopress_comma_array);
|
1322 |
for ($i = 0; $i < $seopress_comma_count; ++$i) {
|
1323 |
$seopress_titles_robots .= $seopress_comma_array[$i];
|
1337 |
//Googlebot
|
1338 |
$seopress_titles_robots .= '<meta name="googlebot" content="';
|
1339 |
|
1340 |
+
$seopress_comma_array = apply_filters('seopress_titles_robots_attrs', $seopress_comma_array);
|
1341 |
+
|
1342 |
$seopress_comma_count = count($seopress_comma_array);
|
1343 |
for ($i = 0; $i < $seopress_comma_count; ++$i) {
|
1344 |
$seopress_titles_robots .= $seopress_comma_array[$i];
|
1353 |
//Bingbot
|
1354 |
$seopress_titles_robots .= '<meta name="bingbot" content="';
|
1355 |
|
1356 |
+
$seopress_comma_array = apply_filters('seopress_titles_robots_attrs', $seopress_comma_array);
|
1357 |
+
|
1358 |
$seopress_comma_count = count($seopress_comma_array);
|
1359 |
for ($i = 0; $i < $seopress_comma_count; ++$i) {
|
1360 |
$seopress_titles_robots .= $seopress_comma_array[$i];
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
+
|
5 |
+
//Oxygen Builder
|
6 |
+
function seopress_setting_section_tools_compatibility_oxygen_option() {
|
7 |
+
$seopress_setting_section_tools_compatibility_oxygen_option = get_option('seopress_tools_option_name');
|
8 |
+
if ( ! empty($seopress_setting_section_tools_compatibility_oxygen_option)) {
|
9 |
+
foreach ($seopress_setting_section_tools_compatibility_oxygen_option as $key => $seopress_setting_section_tools_compatibility_oxygen_value) {
|
10 |
+
$options[$key] = $seopress_setting_section_tools_compatibility_oxygen_value;
|
11 |
+
}
|
12 |
+
if (isset($seopress_setting_section_tools_compatibility_oxygen_option['seopress_setting_section_tools_compatibility_oxygen'])) {
|
13 |
+
return $seopress_setting_section_tools_compatibility_oxygen_option['seopress_setting_section_tools_compatibility_oxygen'];
|
14 |
+
}
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
if ('1' === seopress_setting_section_tools_compatibility_oxygen_option()) {
|
19 |
+
//Oxygen Builder - generate automatic meta description
|
20 |
+
function sp_oxygen_titles_template_variables_array($array) {
|
21 |
+
$array[] = '%%oxygen%%';
|
22 |
+
|
23 |
+
return $array;
|
24 |
+
}
|
25 |
+
add_filter('seopress_titles_template_variables_array', 'sp_oxygen_titles_template_variables_array');
|
26 |
+
|
27 |
+
function sp_oxygen_titles_template_replace_array($array) {
|
28 |
+
if (is_plugin_active('oxygen/functions.php') && function_exists('ct_template_output') && ! isset($_GET['ct_builder'])) {
|
29 |
+
add_filter('wp_doing_ajax', '__return_true');
|
30 |
+
|
31 |
+
$content = do_shortcode(get_post_meta(get_the_id(), 'ct_builder_shortcodes', true));
|
32 |
+
|
33 |
+
remove_filter('wp_doing_ajax', '__return_true');
|
34 |
+
|
35 |
+
$array[] = preg_replace('/\r|\n/', '', substr(strip_tags(wp_filter_nohtml_kses($content)), 0, 160));
|
36 |
+
}
|
37 |
+
|
38 |
+
return $array;
|
39 |
+
}
|
40 |
+
add_filter('seopress_titles_template_replace_array', 'sp_oxygen_titles_template_replace_array');
|
41 |
+
}
|
42 |
+
|
43 |
+
//Divi Builder
|
44 |
+
function seopress_setting_section_tools_compatibility_divi_option() {
|
45 |
+
$seopress_setting_section_tools_compatibility_divi_option = get_option('seopress_tools_option_name');
|
46 |
+
if ( ! empty($seopress_setting_section_tools_compatibility_divi_option)) {
|
47 |
+
foreach ($seopress_setting_section_tools_compatibility_divi_option as $key => $seopress_setting_section_tools_compatibility_divi_value) {
|
48 |
+
$options[$key] = $seopress_setting_section_tools_compatibility_divi_value;
|
49 |
+
}
|
50 |
+
if (isset($seopress_setting_section_tools_compatibility_divi_option['seopress_setting_section_tools_compatibility_divi'])) {
|
51 |
+
return $seopress_setting_section_tools_compatibility_divi_option['seopress_setting_section_tools_compatibility_divi'];
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
if ('1' === seopress_setting_section_tools_compatibility_divi_option()) {
|
57 |
+
//Divi Builder - generate automatic meta description
|
58 |
+
function sp_divi_titles_template_variables_array($array) {
|
59 |
+
$array[] = '%%divi%%';
|
60 |
+
|
61 |
+
return $array;
|
62 |
+
}
|
63 |
+
add_filter('seopress_titles_template_variables_array', 'sp_divi_titles_template_variables_array');
|
64 |
+
|
65 |
+
function sp_divi_titles_template_replace_array($array) {
|
66 |
+
$theme = wp_get_theme();
|
67 |
+
if ('Divi' == $theme->template || 'Divi' == $theme->parent_theme) {
|
68 |
+
$array[] = substr(normalize_whitespace(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_field('post_content', get_the_ID()))))), 0, 160);
|
69 |
+
}
|
70 |
+
|
71 |
+
return $array;
|
72 |
+
}
|
73 |
+
add_filter('seopress_titles_template_replace_array', 'sp_divi_titles_template_replace_array');
|
74 |
+
}
|
75 |
+
|
76 |
+
//WP Bakery Builder
|
77 |
+
function seopress_setting_section_tools_compatibility_bakery_option() {
|
78 |
+
$seopress_setting_section_tools_compatibility_bakery_option = get_option('seopress_tools_option_name');
|
79 |
+
if ( ! empty($seopress_setting_section_tools_compatibility_bakery_option)) {
|
80 |
+
foreach ($seopress_setting_section_tools_compatibility_bakery_option as $key => $seopress_setting_section_tools_compatibility_bakery_value) {
|
81 |
+
$options[$key] = $seopress_setting_section_tools_compatibility_bakery_value;
|
82 |
+
}
|
83 |
+
if (isset($seopress_setting_section_tools_compatibility_bakery_option['seopress_setting_section_tools_compatibility_bakery'])) {
|
84 |
+
return $seopress_setting_section_tools_compatibility_bakery_option['seopress_setting_section_tools_compatibility_bakery'];
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
if ('1' === seopress_setting_section_tools_compatibility_bakery_option()) {
|
90 |
+
//WP Bakery Builder Generate automatic meta description
|
91 |
+
function sp_bakery_titles_template_variables_array($array) {
|
92 |
+
$array[] = '%%wpbakery%%';
|
93 |
+
|
94 |
+
return $array;
|
95 |
+
}
|
96 |
+
add_filter('seopress_titles_template_variables_array', 'sp_bakery_titles_template_variables_array');
|
97 |
+
|
98 |
+
function sp_bakery_titles_template_replace_array($array) {
|
99 |
+
if (is_plugin_active('js_composer/js_composer.php')) {
|
100 |
+
$array[] = preg_replace("/\r|\n/", '', substr(trim(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_field('post_content', get_the_ID()))))), 0, 160));
|
101 |
+
}
|
102 |
+
|
103 |
+
return $array;
|
104 |
+
}
|
105 |
+
add_filter('seopress_titles_template_replace_array', 'sp_bakery_titles_template_replace_array');
|
106 |
+
}
|
107 |
+
|
108 |
+
//WP Avia Builder
|
109 |
+
function seopress_setting_section_tools_compatibility_avia_option() {
|
110 |
+
$seopress_setting_section_tools_compatibility_avia_option = get_option('seopress_tools_option_name');
|
111 |
+
if ( ! empty($seopress_setting_section_tools_compatibility_avia_option)) {
|
112 |
+
foreach ($seopress_setting_section_tools_compatibility_avia_option as $key => $seopress_setting_section_tools_compatibility_avia_value) {
|
113 |
+
$options[$key] = $seopress_setting_section_tools_compatibility_avia_value;
|
114 |
+
}
|
115 |
+
if (isset($seopress_setting_section_tools_compatibility_avia_option['seopress_setting_section_tools_compatibility_avia'])) {
|
116 |
+
return $seopress_setting_section_tools_compatibility_avia_option['seopress_setting_section_tools_compatibility_avia'];
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
if ('1' === seopress_setting_section_tools_compatibility_avia_option()) {
|
122 |
+
//WP Avia Layout Builder / Enfold theme - Generate automatic meta description
|
123 |
+
add_filter('avf_preprocess_shortcode_in_header', 'sp_avia_avf_preprocess_shortcode_in_header', 10, 6);
|
124 |
+
function sp_avia_avf_preprocess_shortcode_in_header($return, $class, $atts, $content, $shortcodename, $fake) {
|
125 |
+
return 'preprocess_shortcodes_in_header';
|
126 |
+
}
|
127 |
+
|
128 |
+
function sp_avia_titles_template_variables_array($array) {
|
129 |
+
$array[] = '%%aviabuilder%%';
|
130 |
+
|
131 |
+
return $array;
|
132 |
+
}
|
133 |
+
add_filter('seopress_titles_template_variables_array', 'sp_avia_titles_template_variables_array');
|
134 |
+
|
135 |
+
function sp_avia_titles_template_replace_array($array) {
|
136 |
+
$array[] = preg_replace("/\r|\n/", '', substr(trim(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_meta(get_the_ID(), '_aviaLayoutBuilderCleanData', true))))), 0, 160));
|
137 |
+
|
138 |
+
return $array;
|
139 |
+
}
|
140 |
+
add_filter('seopress_titles_template_replace_array', 'sp_avia_titles_template_replace_array');
|
141 |
+
}
|
142 |
+
|
143 |
+
//WP Fusion Builder
|
144 |
+
function seopress_setting_section_tools_compatibility_fusion_option() {
|
145 |
+
$seopress_setting_section_tools_compatibility_fusion_option = get_option('seopress_tools_option_name');
|
146 |
+
if ( ! empty($seopress_setting_section_tools_compatibility_fusion_option)) {
|
147 |
+
foreach ($seopress_setting_section_tools_compatibility_fusion_option as $key => $seopress_setting_section_tools_compatibility_fusion_value) {
|
148 |
+
$options[$key] = $seopress_setting_section_tools_compatibility_fusion_value;
|
149 |
+
}
|
150 |
+
if (isset($seopress_setting_section_tools_compatibility_fusion_option['seopress_setting_section_tools_compatibility_fusion'])) {
|
151 |
+
return $seopress_setting_section_tools_compatibility_fusion_option['seopress_setting_section_tools_compatibility_fusion'];
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
if ('1' === seopress_setting_section_tools_compatibility_fusion_option()) {
|
157 |
+
//Fusion Builder + Avadar Generate automatic meta description
|
158 |
+
function sp_fusion_titles_template_variables_array($array) {
|
159 |
+
$array[] = '%%fusionbuilder%%';
|
160 |
+
|
161 |
+
return $array;
|
162 |
+
}
|
163 |
+
add_filter('seopress_titles_template_variables_array', 'sp_fusion_titles_template_variables_array');
|
164 |
+
|
165 |
+
function sp_fusion_titles_template_replace_array($array) {
|
166 |
+
if (is_plugin_active('fusion-builder/fusion-builder.php')) {
|
167 |
+
$array[] = preg_replace("/\r|\n/", '', substr(trim(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_field('post_content', get_the_ID()))))), 0, 160));
|
168 |
+
}
|
169 |
+
|
170 |
+
return $array;
|
171 |
+
}
|
172 |
+
add_filter('seopress_titles_template_replace_array', 'sp_fusion_titles_template_replace_array');
|
173 |
+
}
|
@@ -1,671 +1,699 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
|
4 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
5 |
//Permalink structure for TrailingSlash
|
6 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
7 |
function seopress_advanced_advanced_trailingslash_option() {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
}
|
17 |
|
18 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19 |
//SEOPRESS Core
|
20 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
21 |
//Import / Export tool
|
22 |
add_action('init', 'seopress_enable', 999);
|
23 |
function seopress_enable() {
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
}
|
28 |
|
29 |
//Front END
|
30 |
-
if (
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
-
if (
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
}
|
165 |
-
if (seopress_get_toggle_option('google-analytics')
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
}
|
436 |
|
437 |
add_action('wp', 'seopress_load_redirections_options', 0);
|
438 |
function seopress_load_redirections_options() {
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
}
|
443 |
|
444 |
-
if (seopress_get_toggle_option('xml-sitemap')
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
}
|
452 |
-
if (
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
}
|
1 |
<?php
|
2 |
+
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
6 |
//Permalink structure for TrailingSlash
|
7 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
8 |
function seopress_advanced_advanced_trailingslash_option() {
|
9 |
+
$seopress_advanced_advanced_trailingslash_option = get_option('seopress_advanced_option_name');
|
10 |
+
if ( ! empty($seopress_advanced_advanced_trailingslash_option)) {
|
11 |
+
foreach ($seopress_advanced_advanced_trailingslash_option as $key => $seopress_advanced_advanced_trailingslash_value) {
|
12 |
+
$options[$key] = $seopress_advanced_advanced_trailingslash_value;
|
13 |
+
}
|
14 |
+
if (isset($seopress_advanced_advanced_trailingslash_option['seopress_advanced_advanced_trailingslash'])) {
|
15 |
+
return $seopress_advanced_advanced_trailingslash_option['seopress_advanced_advanced_trailingslash'];
|
16 |
+
}
|
17 |
+
}
|
18 |
}
|
19 |
|
20 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
21 |
//SEOPRESS Core
|
22 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
//Tools - Compatibility Center
|
24 |
+
require_once dirname(__FILE__) . '/options-tools.php';
|
25 |
+
|
26 |
//Import / Export tool
|
27 |
add_action('init', 'seopress_enable', 999);
|
28 |
function seopress_enable() {
|
29 |
+
if (is_admin()) {
|
30 |
+
require_once dirname(__FILE__) . '/options-import-export.php'; //Import Export
|
31 |
+
}
|
32 |
}
|
33 |
|
34 |
//Front END
|
35 |
+
if ('1' == seopress_get_toggle_option('titles')) {
|
36 |
+
//Author archive Disabled
|
37 |
+
function seopress_titles_archives_author_disable_option() {
|
38 |
+
$seopress_titles_archives_author_disable_option = get_option('seopress_titles_option_name');
|
39 |
+
if ( ! empty($seopress_titles_archives_author_disable_option)) {
|
40 |
+
foreach ($seopress_titles_archives_author_disable_option as $key => $seopress_titles_archives_author_disable_value) {
|
41 |
+
$options[$key] = $seopress_titles_archives_author_disable_value;
|
42 |
+
}
|
43 |
+
if (isset($seopress_titles_archives_author_disable_option['seopress_titles_archives_author_disable'])) {
|
44 |
+
return $seopress_titles_archives_author_disable_option['seopress_titles_archives_author_disable'];
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
//Date archive Disabled
|
50 |
+
function seopress_titles_archives_date_disable_option() {
|
51 |
+
$seopress_titles_archives_date_disable_option = get_option('seopress_titles_option_name');
|
52 |
+
if ( ! empty($seopress_titles_archives_date_disable_option)) {
|
53 |
+
foreach ($seopress_titles_archives_date_disable_option as $key => $seopress_titles_archives_date_disable_value) {
|
54 |
+
$options[$key] = $seopress_titles_archives_date_disable_value;
|
55 |
+
}
|
56 |
+
if (isset($seopress_titles_archives_date_disable_option['seopress_titles_archives_date_disable'])) {
|
57 |
+
return $seopress_titles_archives_date_disable_option['seopress_titles_archives_date_disable'];
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
function seopress_titles_disable_archives() {
|
63 |
+
global $wp_query;
|
64 |
+
|
65 |
+
if ('1' == seopress_titles_archives_author_disable_option() && $wp_query->is_author && ! is_feed()) {
|
66 |
+
wp_redirect(get_home_url(), '301');
|
67 |
+
exit;
|
68 |
+
}
|
69 |
+
if ('1' == seopress_titles_archives_date_disable_option() && $wp_query->is_date && ! is_feed()) {
|
70 |
+
wp_redirect(get_home_url(), '301');
|
71 |
+
exit;
|
72 |
+
}
|
73 |
+
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
//SEO metaboxes
|
78 |
+
function seopress_hide_metaboxes() {
|
79 |
+
if (is_admin()) {
|
80 |
+
global $typenow;
|
81 |
+
global $pagenow;
|
82 |
+
|
83 |
+
//Post type?
|
84 |
+
if ('post-new.php' == $pagenow || 'post.php' == $pagenow) {
|
85 |
+
function seopress_titles_single_enable_option() {
|
86 |
+
global $post;
|
87 |
+
$seopress_get_current_cpt = get_post_type($post);
|
88 |
+
|
89 |
+
$seopress_titles_single_enable_option = get_option('seopress_titles_option_name');
|
90 |
+
if ( ! empty($seopress_titles_single_enable_option)) {
|
91 |
+
foreach ($seopress_titles_single_enable_option as $key => $seopress_titles_single_enable_value) {
|
92 |
+
$options[$key] = $seopress_titles_single_enable_value;
|
93 |
+
}
|
94 |
+
if (isset($seopress_titles_single_enable_option['seopress_titles_single_titles'][$seopress_get_current_cpt]['enable'])) {
|
95 |
+
return $seopress_titles_single_enable_option['seopress_titles_single_titles'][$seopress_get_current_cpt]['enable'];
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
function seopress_titles_single_enable_metabox($seopress_get_post_types) {
|
100 |
+
global $post;
|
101 |
+
if (1 == seopress_titles_single_enable_option() && '' != get_post_type($post)) {
|
102 |
+
unset($seopress_get_post_types[get_post_type($post)]);
|
103 |
+
}
|
104 |
+
|
105 |
+
return $seopress_get_post_types;
|
106 |
+
}
|
107 |
+
add_filter('seopress_metaboxe_seo', 'seopress_titles_single_enable_metabox');
|
108 |
+
add_filter('seopress_metaboxe_content_analysis', 'seopress_titles_single_enable_metabox');
|
109 |
+
add_filter('seopress_pro_metaboxe_sdt', 'seopress_titles_single_enable_metabox');
|
110 |
+
}
|
111 |
+
|
112 |
+
//Taxonomy?
|
113 |
+
if ('term.php' == $pagenow || 'edit-tags.php' == $pagenow) {
|
114 |
+
if ( ! empty($_GET['taxonomy'])) {
|
115 |
+
$seopress_get_current_tax = sanitize_title(esc_attr($_GET['taxonomy']));
|
116 |
+
|
117 |
+
function seopress_tax_single_enable_option($seopress_get_current_tax) {
|
118 |
+
$seopress_tax_single_enable_option = get_option('seopress_titles_option_name');
|
119 |
+
if ( ! empty($seopress_tax_single_enable_option)) {
|
120 |
+
foreach ($seopress_tax_single_enable_option as $key => $seopress_tax_single_enable_value) {
|
121 |
+
$options[$key] = $seopress_tax_single_enable_value;
|
122 |
+
}
|
123 |
+
if (isset($seopress_tax_single_enable_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['enable'])) {
|
124 |
+
return $seopress_tax_single_enable_option['seopress_titles_tax_titles'][$seopress_get_current_tax]['enable'];
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
function seopress_tax_single_enable_metabox($seopress_get_taxonomies) {
|
130 |
+
$seopress_get_current_tax = sanitize_title(esc_attr($_GET['taxonomy']));
|
131 |
+
if (1 == seopress_tax_single_enable_option($seopress_get_current_tax) && '' != $seopress_get_current_tax) {
|
132 |
+
unset($seopress_get_taxonomies[$seopress_get_current_tax]);
|
133 |
+
}
|
134 |
+
|
135 |
+
return $seopress_get_taxonomies;
|
136 |
+
}
|
137 |
+
add_filter('seopress_metaboxe_term_seo', 'seopress_tax_single_enable_metabox');
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
add_action('after_setup_theme', 'seopress_hide_metaboxes');
|
143 |
+
|
144 |
+
//Titles and metas
|
145 |
+
add_action('template_redirect', 'seopress_titles_disable_archives', 0);
|
146 |
+
add_action('wp_head', 'seopress_load_titles_options', 0);
|
147 |
+
function seopress_load_titles_options() {
|
148 |
+
if ( ! is_admin()) {
|
149 |
+
if ((function_exists('is_wpforo_page') && is_wpforo_page()) || (class_exists('Ecwid_Store_Page') && Ecwid_Store_Page::is_store_page())) {//disable on wpForo pages to avoid conflicts
|
150 |
+
//do nothing
|
151 |
+
} else {
|
152 |
+
require_once dirname(__FILE__) . '/options-titles-metas.php'; //Titles & metas
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
}
|
157 |
+
if ('1' == seopress_get_toggle_option('social')) {
|
158 |
+
add_action('init', 'seopress_load_oembed_options');
|
159 |
+
function seopress_load_oembed_options() {
|
160 |
+
if ( ! is_admin()) {
|
161 |
+
require_once dirname(__FILE__) . '/options-oembed.php'; //Oembed
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
add_action('wp_head', 'seopress_load_social_options', 0);
|
166 |
+
function seopress_load_social_options() {
|
167 |
+
if ( ! is_admin()) {
|
168 |
+
//disable on wpForo, LifterLMS private area, Ecwid store pages to avoid conflicts
|
169 |
+
if ((function_exists('is_llms_private_area') && is_llms_private_area()) || (function_exists('is_wpforo_page') && is_wpforo_page()) || (class_exists('Ecwid_Store_Page') && Ecwid_Store_Page::is_store_page())) {
|
170 |
+
//do nothing
|
171 |
+
} else {
|
172 |
+
require_once dirname(__FILE__) . '/options-social.php'; //Social
|
173 |
+
}
|
174 |
+
}
|
175 |
+
}
|
176 |
}
|
177 |
+
if ('1' == seopress_get_toggle_option('google-analytics')) {
|
178 |
+
//Enabled
|
179 |
+
function seopress_google_analytics_enable_option() {
|
180 |
+
$seopress_google_analytics_enable_option = get_option('seopress_google_analytics_option_name');
|
181 |
+
if ( ! empty($seopress_google_analytics_enable_option)) {
|
182 |
+
foreach ($seopress_google_analytics_enable_option as $key => $seopress_google_analytics_enable_value) {
|
183 |
+
$options[$key] = $seopress_google_analytics_enable_value;
|
184 |
+
}
|
185 |
+
if (isset($seopress_google_analytics_enable_option['seopress_google_analytics_enable'])) {
|
186 |
+
return $seopress_google_analytics_enable_option['seopress_google_analytics_enable'];
|
187 |
+
}
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
//UA
|
192 |
+
function seopress_google_analytics_ua_option() {
|
193 |
+
$seopress_google_analytics_ua_option = get_option('seopress_google_analytics_option_name');
|
194 |
+
if ( ! empty($seopress_google_analytics_ua_option)) {
|
195 |
+
foreach ($seopress_google_analytics_ua_option as $key => $seopress_google_analytics_ua_value) {
|
196 |
+
$options[$key] = $seopress_google_analytics_ua_value;
|
197 |
+
}
|
198 |
+
if (isset($seopress_google_analytics_ua_option['seopress_google_analytics_ua'])) {
|
199 |
+
return $seopress_google_analytics_ua_option['seopress_google_analytics_ua'];
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
//GA4 (measurement ID)
|
205 |
+
function seopress_google_analytics_ga4_option() {
|
206 |
+
$seopress_google_analytics_ga4_option = get_option('seopress_google_analytics_option_name');
|
207 |
+
if ( ! empty($seopress_google_analytics_ga4_option)) {
|
208 |
+
foreach ($seopress_google_analytics_ga4_option as $key => $seopress_google_analytics_ga4_value) {
|
209 |
+
$options[$key] = $seopress_google_analytics_ga4_value;
|
210 |
+
}
|
211 |
+
if (isset($seopress_google_analytics_ga4_option['seopress_google_analytics_ga4'])) {
|
212 |
+
return $seopress_google_analytics_ga4_option['seopress_google_analytics_ga4'];
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
216 |
+
|
217 |
+
//User roles
|
218 |
+
function seopress_google_analytics_roles_option() {
|
219 |
+
$seopress_google_analytics_roles_option = get_option('seopress_google_analytics_option_name');
|
220 |
+
if ( ! empty($seopress_google_analytics_roles_option)) {
|
221 |
+
foreach ($seopress_google_analytics_roles_option as $key => $seopress_google_analytics_roles_value) {
|
222 |
+
$options[$key] = $seopress_google_analytics_roles_value;
|
223 |
+
}
|
224 |
+
if (isset($seopress_google_analytics_roles_option['seopress_google_analytics_roles'])) {
|
225 |
+
return $seopress_google_analytics_roles_option['seopress_google_analytics_roles'];
|
226 |
+
}
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
//Ecommerce enabled
|
231 |
+
function seopress_google_analytics_ecommerce_enable_option() {
|
232 |
+
$seopress_google_analytics_ecommerce_enable_option = get_option('seopress_google_analytics_option_name');
|
233 |
+
if ( ! empty($seopress_google_analytics_ecommerce_enable_option)) {
|
234 |
+
foreach ($seopress_google_analytics_ecommerce_enable_option as $key => $seopress_google_analytics_ecommerce_enable_value) {
|
235 |
+
$options[$key] = $seopress_google_analytics_ecommerce_enable_value;
|
236 |
+
}
|
237 |
+
if (isset($seopress_google_analytics_ecommerce_enable_option['seopress_google_analytics_e_commerce_enable'])) {
|
238 |
+
return $seopress_google_analytics_ecommerce_enable_option['seopress_google_analytics_e_commerce_enable'];
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
//Disable Tracking
|
244 |
+
function seopress_google_analytics_disable_option() {
|
245 |
+
$seopress_google_analytics_disable_option = get_option('seopress_google_analytics_option_name');
|
246 |
+
if ( ! empty($seopress_google_analytics_disable_option)) {
|
247 |
+
foreach ($seopress_google_analytics_disable_option as $key => $seopress_google_analytics_disable_value) {
|
248 |
+
$options[$key] = $seopress_google_analytics_disable_value;
|
249 |
+
}
|
250 |
+
if (isset($seopress_google_analytics_disable_option['seopress_google_analytics_disable'])) {
|
251 |
+
return $seopress_google_analytics_disable_option['seopress_google_analytics_disable'];
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
//Auto accept user consent
|
257 |
+
function seopress_google_analytics_half_disable_option() {
|
258 |
+
$seopress_google_analytics_half_disable_option = get_option('seopress_google_analytics_option_name');
|
259 |
+
if ( ! empty($seopress_google_analytics_half_disable_option)) {
|
260 |
+
foreach ($seopress_google_analytics_half_disable_option as $key => $seopress_google_analytics_half_disable_value) {
|
261 |
+
$options[$key] = $seopress_google_analytics_half_disable_value;
|
262 |
+
}
|
263 |
+
if (isset($seopress_google_analytics_half_disable_option['seopress_google_analytics_half_disable'])) {
|
264 |
+
return $seopress_google_analytics_half_disable_option['seopress_google_analytics_half_disable'];
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
//Disable Tracking - Message
|
270 |
+
function seopress_google_analytics_opt_out_msg_option() {
|
271 |
+
$seopress_google_analytics_opt_out_msg_option = get_option('seopress_google_analytics_option_name');
|
272 |
+
if ( ! empty($seopress_google_analytics_opt_out_msg_option)) {
|
273 |
+
foreach ($seopress_google_analytics_opt_out_msg_option as $key => $seopress_google_analytics_opt_out_msg_value) {
|
274 |
+
$options[$key] = $seopress_google_analytics_opt_out_msg_value;
|
275 |
+
}
|
276 |
+
if (isset($seopress_google_analytics_opt_out_msg_option['seopress_google_analytics_opt_out_msg'])) {
|
277 |
+
return $seopress_google_analytics_opt_out_msg_option['seopress_google_analytics_opt_out_msg'];
|
278 |
+
}
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
//Cookie expiration date
|
283 |
+
function seopress_google_analytics_cb_exp_date_option() {
|
284 |
+
$seopress_google_analytics_cb_exp_date_option = get_option('seopress_google_analytics_option_name');
|
285 |
+
if ( ! empty($seopress_google_analytics_cb_exp_date_option)) {
|
286 |
+
foreach ($seopress_google_analytics_cb_exp_date_option as $key => $seopress_google_analytics_cb_exp_date_value) {
|
287 |
+
$options[$key] = $seopress_google_analytics_cb_exp_date_value;
|
288 |
+
}
|
289 |
+
if (isset($seopress_google_analytics_cb_exp_date_option['seopress_google_analytics_cb_exp_date'])) {
|
290 |
+
return $seopress_google_analytics_cb_exp_date_option['seopress_google_analytics_cb_exp_date'];
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
//User Consent JS
|
296 |
+
function seopress_google_analytics_cookies_js() {
|
297 |
+
$prefix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
298 |
+
wp_register_script('seopress-cookies', plugins_url('assets/js/seopress-cookies' . $prefix . '.js', dirname(dirname(__FILE__))), [], SEOPRESS_VERSION, true);
|
299 |
+
wp_enqueue_script('seopress-cookies');
|
300 |
+
|
301 |
+
wp_enqueue_script('seopress-cookies-ajax', plugins_url('assets/js/seopress-cookies-ajax' . $prefix . '.js', dirname(dirname(__FILE__))), ['jquery', 'seopress-cookies'], SEOPRESS_VERSION, true);
|
302 |
+
|
303 |
+
$days = 30;
|
304 |
+
|
305 |
+
if (seopress_google_analytics_cb_exp_date_option()) {
|
306 |
+
$days = seopress_google_analytics_cb_exp_date_option();
|
307 |
+
}
|
308 |
+
$days = apply_filters('seopress_cookies_expiration_days', $days);
|
309 |
+
|
310 |
+
$seopress_cookies_user_consent = [
|
311 |
+
'seopress_nonce' => wp_create_nonce('seopress_cookies_user_consent_nonce'),
|
312 |
+
'seopress_cookies_user_consent' => admin_url('admin-ajax.php'),
|
313 |
+
'seopress_cookies_expiration_days' => $days,
|
314 |
+
];
|
315 |
+
wp_localize_script('seopress-cookies-ajax', 'seopressAjaxGAUserConsent', $seopress_cookies_user_consent);
|
316 |
+
}
|
317 |
+
|
318 |
+
//Triggers WooCommerce JS
|
319 |
+
function seopress_google_analytics_ecommerce_js() {
|
320 |
+
$prefix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
321 |
+
wp_enqueue_script('seopress-analytics', plugins_url('assets/js/seopress-analytics' . $prefix . '.js', dirname(dirname(__FILE__))), [], SEOPRESS_VERSION, true);
|
322 |
+
|
323 |
+
$seopress_analytics = [
|
324 |
+
'seopress_nonce' => wp_create_nonce('seopress_analytics_nonce'),
|
325 |
+
'seopress_analytics' => admin_url('admin-ajax.php'),
|
326 |
+
];
|
327 |
+
wp_localize_script('seopress-analytics', 'seopressAjaxAnalytics', $seopress_analytics);
|
328 |
+
}
|
329 |
+
|
330 |
+
//Ecommerce
|
331 |
+
function seopress_after_update_cart() {
|
332 |
+
check_ajax_referer('seopress_analytics_nonce');
|
333 |
+
|
334 |
+
$items_purchased = [];
|
335 |
+
$final = [];
|
336 |
+
// Extract cart
|
337 |
+
global $woocommerce;
|
338 |
+
foreach ($woocommerce->cart->get_cart() as $key => $item) {
|
339 |
+
$product = wc_get_product($item['product_id']);
|
340 |
+
// Get current product
|
341 |
+
if ($product) {
|
342 |
+
// Set data
|
343 |
+
$items_purchased['id'] = esc_js($product->get_id());
|
344 |
+
$items_purchased['name'] = esc_js($product->get_title());
|
345 |
+
$items_purchased['quantity'] = (float) esc_js($item['quantity']);
|
346 |
+
$items_purchased['price'] = (float) esc_js($product->get_price());
|
347 |
+
|
348 |
+
// Extract categories
|
349 |
+
$categories = get_the_terms($product->get_id(), 'product_cat');
|
350 |
+
if ($categories) {
|
351 |
+
foreach ($categories as $category) {
|
352 |
+
$categories_out[] = $category->name;
|
353 |
+
}
|
354 |
+
$categories_js = esc_js(implode('/', $categories_out));
|
355 |
+
$items_purchased['category'] = esc_js($categories_js);
|
356 |
+
}
|
357 |
+
}
|
358 |
+
$final[] = $items_purchased;
|
359 |
+
}
|
360 |
+
|
361 |
+
$html = "<script>gtag('event', 'add_to_cart', {'items': " . json_encode($final) . ' });</script>';
|
362 |
+
|
363 |
+
$html = apply_filters('seopress_gtag_ec_add_to_cart_checkout_ev', $html);
|
364 |
+
|
365 |
+
wp_send_json_success($html);
|
366 |
+
}
|
367 |
+
add_action('wp_ajax_seopress_after_update_cart', 'seopress_after_update_cart');
|
368 |
+
add_action('wp_ajax_nopriv_seopress_after_update_cart', 'seopress_after_update_cart');
|
369 |
+
|
370 |
+
if ('1' == seopress_google_analytics_disable_option()) {
|
371 |
+
if (is_user_logged_in()) {
|
372 |
+
global $wp_roles;
|
373 |
+
|
374 |
+
//Get current user role
|
375 |
+
if (isset(wp_get_current_user()->roles[0])) {
|
376 |
+
$seopress_user_role = wp_get_current_user()->roles[0];
|
377 |
+
//If current user role matchs values from SEOPress GA settings then apply
|
378 |
+
if (function_exists('seopress_google_analytics_roles_option') && '' != seopress_google_analytics_roles_option()) {
|
379 |
+
if (array_key_exists($seopress_user_role, seopress_google_analytics_roles_option())) {
|
380 |
+
//do nothing
|
381 |
+
} else {
|
382 |
+
add_action('wp_enqueue_scripts', 'seopress_google_analytics_cookies_js', 20, 1);
|
383 |
+
}
|
384 |
+
} else {
|
385 |
+
add_action('wp_enqueue_scripts', 'seopress_google_analytics_cookies_js', 20, 1);
|
386 |
+
}
|
387 |
+
} else {
|
388 |
+
add_action('wp_enqueue_scripts', 'seopress_google_analytics_cookies_js', 20, 1);
|
389 |
+
}
|
390 |
+
} else {
|
391 |
+
add_action('wp_enqueue_scripts', 'seopress_google_analytics_cookies_js', 20, 1);
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
+
add_action('wp_head', 'seopress_load_google_analytics_options', 0);
|
396 |
+
function seopress_load_google_analytics_options() {
|
397 |
+
require_once dirname(__FILE__) . '/options-google-analytics.php'; //Google Analytics + Matomo
|
398 |
+
}
|
399 |
+
|
400 |
+
function seopress_cookies_user_consent() {
|
401 |
+
//check_ajax_referer( 'seopress_cookies_user_consent_nonce', $_GET['_ajax_nonce'], true );
|
402 |
+
if ('1' == seopress_google_analytics_half_disable_option()) {//no user consent required
|
403 |
+
wp_send_json_success();
|
404 |
+
} else {
|
405 |
+
if (is_user_logged_in()) {
|
406 |
+
global $wp_roles;
|
407 |
+
|
408 |
+
//Get current user role
|
409 |
+
if (isset(wp_get_current_user()->roles[0])) {
|
410 |
+
$seopress_user_role = wp_get_current_user()->roles[0];
|
411 |
+
//If current user role matchs values from SEOPress GA settings then apply
|
412 |
+
if (function_exists('seopress_google_analytics_roles_option') && '' != seopress_google_analytics_roles_option()) {
|
413 |
+
if (array_key_exists($seopress_user_role, seopress_google_analytics_roles_option())) {
|
414 |
+
//do nothing
|
415 |
+
} else {
|
416 |
+
include_once dirname(__FILE__) . '/options-google-analytics.php'; //Google Analytics
|
417 |
+
$data = [];
|
418 |
+
$data['gtag_js'] = seopress_google_analytics_js(false);
|
419 |
+
$data['matomo_js'] = seopress_matomo_js(false);
|
420 |
+
$data['body_js'] = seopress_google_analytics_body_code(false);
|
421 |
+
$data['head_js'] = seopress_google_analytics_head_code(false);
|
422 |
+
$data['footer_js'] = seopress_google_analytics_footer_code(false);
|
423 |
+
$data['custom'] = '';
|
424 |
+
$data['custom'] = apply_filters('seopress_custom_tracking', $data['custom']);
|
425 |
+
wp_send_json_success($data);
|
426 |
+
}
|
427 |
+
} else {
|
428 |
+
include_once dirname(__FILE__) . '/options-google-analytics.php'; //Google Analytics
|
429 |
+
$data = [];
|
430 |
+
$data['gtag_js'] = seopress_google_analytics_js(false);
|
431 |
+
$data['matomo_js'] = seopress_matomo_js(false);
|
432 |
+
$data['body_js'] = seopress_google_analytics_body_code(false);
|
433 |
+
$data['head_js'] = seopress_google_analytics_head_code(false);
|
434 |
+
$data['footer_js'] = seopress_google_analytics_footer_code(false);
|
435 |
+
$data['custom'] = '';
|
436 |
+
$data['custom'] = apply_filters('seopress_custom_tracking', $data['custom']);
|
437 |
+
wp_send_json_success($data);
|
438 |
+
}
|
439 |
+
}
|
440 |
+
} else {
|
441 |
+
include_once dirname(__FILE__) . '/options-google-analytics.php'; //Google Analytics
|
442 |
+
$data = [];
|
443 |
+
$data['gtag_js'] = seopress_google_analytics_js(false);
|
444 |
+
$data['matomo_js'] = seopress_matomo_js(false);
|
445 |
+
$data['body_js'] = seopress_google_analytics_body_code(false);
|
446 |
+
$data['head_js'] = seopress_google_analytics_head_code(false);
|
447 |
+
$data['footer_js'] = seopress_google_analytics_footer_code(false);
|
448 |
+
$data['custom'] = '';
|
449 |
+
$data['custom'] = apply_filters('seopress_custom_tracking', $data['custom']);
|
450 |
+
wp_send_json_success($data);
|
451 |
+
}
|
452 |
+
}
|
453 |
+
}
|
454 |
+
add_action('wp_ajax_seopress_cookies_user_consent', 'seopress_cookies_user_consent');
|
455 |
+
add_action('wp_ajax_nopriv_seopress_cookies_user_consent', 'seopress_cookies_user_consent');
|
456 |
}
|
457 |
|
458 |
add_action('wp', 'seopress_load_redirections_options', 0);
|
459 |
function seopress_load_redirections_options() {
|
460 |
+
if ( ! is_admin()) {
|
461 |
+
require_once dirname(__FILE__) . '/options-redirections.php'; //Redirections
|
462 |
+
}
|
463 |
}
|
464 |
|
465 |
+
if ('1' == seopress_get_toggle_option('xml-sitemap')) {
|
466 |
+
add_action('init', 'seopress_load_sitemap', 999);
|
467 |
+
function seopress_load_sitemap() {
|
468 |
+
if ( ! is_admin()) {
|
469 |
+
require_once dirname(__FILE__) . '/options-sitemap.php'; //XML / HTML Sitemap
|
470 |
+
}
|
471 |
+
}
|
472 |
}
|
473 |
+
if ('1' == seopress_get_toggle_option('advanced')) {
|
474 |
+
//Remove comment author url
|
475 |
+
function seopress_advanced_advanced_comments_author_url_option() {
|
476 |
+
$seopress_advanced_advanced_comments_author_url_option = get_option('seopress_advanced_option_name');
|
477 |
+
if ( ! empty($seopress_advanced_advanced_comments_author_url_option)) {
|
478 |
+
foreach ($seopress_advanced_advanced_comments_author_url_option as $key => $seopress_advanced_advanced_comments_author_url_value) {
|
479 |
+
$options[$key] = $seopress_advanced_advanced_comments_author_url_value;
|
480 |
+
}
|
481 |
+
if (isset($seopress_advanced_advanced_comments_author_url_option['seopress_advanced_advanced_comments_author_url'])) {
|
482 |
+
return $seopress_advanced_advanced_comments_author_url_option['seopress_advanced_advanced_comments_author_url'];
|
483 |
+
}
|
484 |
+
}
|
485 |
+
}
|
486 |
+
if ('1' == seopress_advanced_advanced_comments_author_url_option()) {
|
487 |
+
add_filter('get_comment_author_url', '__return_empty_string');
|
488 |
+
}
|
489 |
+
|
490 |
+
//Remove website field in comments
|
491 |
+
function seopress_advanced_advanced_comments_website_option() {
|
492 |
+
$seopress_advanced_advanced_comments_website_option = get_option('seopress_advanced_option_name');
|
493 |
+
if ( ! empty($seopress_advanced_advanced_comments_website_option)) {
|
494 |
+
foreach ($seopress_advanced_advanced_comments_website_option as $key => $seopress_advanced_advanced_comments_website_value) {
|
495 |
+
$options[$key] = $seopress_advanced_advanced_comments_website_value;
|
496 |
+
}
|
497 |
+
if (isset($seopress_advanced_advanced_comments_website_option['seopress_advanced_advanced_comments_website'])) {
|
498 |
+
return $seopress_advanced_advanced_comments_website_option['seopress_advanced_advanced_comments_website'];
|
499 |
+
}
|
500 |
+
}
|
501 |
+
}
|
502 |
+
if ('1' == seopress_advanced_advanced_comments_website_option()) {
|
503 |
+
function seopress_advanced_advanced_comments_website_hook($fields) {
|
504 |
+
unset($fields['url']);
|
505 |
+
|
506 |
+
return $fields;
|
507 |
+
}
|
508 |
+
add_filter('comment_form_default_fields', 'seopress_advanced_advanced_comments_website_hook', 40);
|
509 |
+
}
|
510 |
+
|
511 |
+
add_action('wp_head', 'seopress_load_advanced_options', 0);
|
512 |
+
function seopress_load_advanced_options() {
|
513 |
+
if ( ! is_admin()) {
|
514 |
+
require_once dirname(__FILE__) . '/options-advanced.php'; //Advanced
|
515 |
+
}
|
516 |
+
}
|
517 |
+
add_action('init', 'seopress_load_advanced_admin_options', 11);
|
518 |
+
function seopress_load_advanced_admin_options() {
|
519 |
+
require_once dirname(__FILE__) . '/options-advanced-admin.php'; //Advanced (admin)
|
520 |
+
//Admin bar
|
521 |
+
function seopress_advanced_appearance_adminbar_option() {
|
522 |
+
$seopress_advanced_appearance_adminbar_option = get_option('seopress_advanced_option_name');
|
523 |
+
if ( ! empty($seopress_advanced_appearance_adminbar_option)) {
|
524 |
+
foreach ($seopress_advanced_appearance_adminbar_option as $key => $seopress_advanced_appearance_adminbar_value) {
|
525 |
+
$options[$key] = $seopress_advanced_appearance_adminbar_value;
|
526 |
+
}
|
527 |
+
if (isset($seopress_advanced_appearance_adminbar_option['seopress_advanced_appearance_adminbar'])) {
|
528 |
+
return $seopress_advanced_appearance_adminbar_option['seopress_advanced_appearance_adminbar'];
|
529 |
+
}
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
if ('' != seopress_advanced_appearance_adminbar_option()) {
|
534 |
+
add_action('admin_bar_menu', 'seopress_advanced_appearance_adminbar_hook', 999);
|
535 |
+
|
536 |
+
function seopress_advanced_appearance_adminbar_hook($wp_admin_bar) {
|
537 |
+
$wp_admin_bar->remove_node('seopress_custom_top_level');
|
538 |
+
}
|
539 |
+
}
|
540 |
+
}
|
541 |
+
//primary category
|
542 |
+
function seopress_titles_primary_cat_hook($cats_0, $cats, $post) {
|
543 |
+
$primary_cat = null;
|
544 |
+
global $post;
|
545 |
+
|
546 |
+
if ($post) {
|
547 |
+
$_seopress_robots_primary_cat = get_post_meta($post->ID, '_seopress_robots_primary_cat', true);
|
548 |
+
if (isset($_seopress_robots_primary_cat) && '' != $_seopress_robots_primary_cat && 'none' != $_seopress_robots_primary_cat) {
|
549 |
+
if (null != $post->post_type && 'post' == $post->post_type) {
|
550 |
+
$primary_cat = get_category($_seopress_robots_primary_cat);
|
551 |
+
}
|
552 |
+
if ( ! is_wp_error($primary_cat) && null != $primary_cat) {
|
553 |
+
return $primary_cat;
|
554 |
+
}
|
555 |
+
} else {
|
556 |
+
//no primary cat
|
557 |
+
return $cats_0;
|
558 |
+
}
|
559 |
+
} else {
|
560 |
+
return $cats_0;
|
561 |
+
}
|
562 |
+
}
|
563 |
+
add_filter('post_link_category', 'seopress_titles_primary_cat_hook', 10, 3);
|
564 |
+
|
565 |
+
function seopress_titles_primary_wc_cat_hook($terms_0, $terms, $post) {
|
566 |
+
$primary_cat = null;
|
567 |
+
|
568 |
+
$id = get_the_ID();
|
569 |
+
|
570 |
+
if (function_exists('wc_get_product')) {
|
571 |
+
$post = wc_get_product($id);
|
572 |
+
}
|
573 |
+
if ($post) {
|
574 |
+
$_seopress_robots_primary_cat = get_post_meta($id, '_seopress_robots_primary_cat', true);
|
575 |
+
|
576 |
+
if (isset($_seopress_robots_primary_cat) && '' != $_seopress_robots_primary_cat && 'none' != $_seopress_robots_primary_cat) {
|
577 |
+
if (null != $post->post_type && 'product' == $post->post_type) {
|
578 |
+
$primary_cat = get_term($_seopress_robots_primary_cat, 'product_cat');
|
579 |
+
}
|
580 |
+
if ( ! is_wp_error($primary_cat) && null != $primary_cat) {
|
581 |
+
return $primary_cat;
|
582 |
+
}
|
583 |
+
} else {
|
584 |
+
//no primary cat
|
585 |
+
return $terms_0;
|
586 |
+
}
|
587 |
+
} else {
|
588 |
+
return $terms_0;
|
589 |
+
}
|
590 |
+
}
|
591 |
+
add_filter('wc_product_post_type_link_product_cat', 'seopress_titles_primary_wc_cat_hook', 10, 3);
|
592 |
+
|
593 |
+
//No /category/ in URL
|
594 |
+
function seopress_advanced_advanced_category_url_option() {
|
595 |
+
$seopress_advanced_advanced_category_url_option = get_option('seopress_advanced_option_name');
|
596 |
+
if ( ! empty($seopress_advanced_advanced_category_url_option)) {
|
597 |
+
foreach ($seopress_advanced_advanced_category_url_option as $key => $seopress_advanced_advanced_category_url_value) {
|
598 |
+
$options[$key] = $seopress_advanced_advanced_category_url_value;
|
599 |
+
}
|
600 |
+
if (isset($seopress_advanced_advanced_category_url_option['seopress_advanced_advanced_category_url'])) {
|
601 |
+
return $seopress_advanced_advanced_category_url_option['seopress_advanced_advanced_category_url'];
|
602 |
+
}
|
603 |
+
}
|
604 |
+
}
|
605 |
+
|
606 |
+
if ('' != seopress_advanced_advanced_category_url_option()) {
|
607 |
+
//Flush permalinks when creating/editing/deleting post categories
|
608 |
+
add_action('created_category', 'flush_rewrite_rules');
|
609 |
+
add_action('delete_category', 'flush_rewrite_rules');
|
610 |
+
add_action('edited_category', 'flush_rewrite_rules');
|
611 |
+
|
612 |
+
//@credits : WordPress VIP
|
613 |
+
add_filter('category_rewrite_rules', 'seopress_filter_category_rewrite_rules');
|
614 |
+
function seopress_filter_category_rewrite_rules($rules) {
|
615 |
+
if (class_exists('Sitepress')) {
|
616 |
+
global $sitepress;
|
617 |
+
remove_filter('terms_clauses', [$sitepress, 'terms_clauses']);
|
618 |
+
$categories = get_categories(['hide_empty' => false]);
|
619 |
+
add_filter('terms_clauses', [$sitepress, 'terms_clauses'], 10, 4);
|
620 |
+
} else {
|
621 |
+
$categories = get_categories(['hide_empty' => false]);
|
622 |
+
}
|
623 |
+
if (is_array($categories) && ! empty($categories)) {
|
624 |
+
$slugs = [];
|
625 |
+
|
626 |
+
foreach ($categories as $category) {
|
627 |
+
if (is_object($category) && ! is_wp_error($category)) {
|
628 |
+
if (0 == $category->category_parent) {
|
629 |
+
$slugs[] = $category->slug;
|
630 |
+
} else {
|
631 |
+
$slugs[] = trim(get_category_parents($category->term_id, false, '/', true), '/');
|
632 |
+
}
|
633 |
+
}
|
634 |
+
}
|
635 |
+
|
636 |
+
if ( ! empty($slugs)) {
|
637 |
+
$rules = [];
|
638 |
+
|
639 |
+
foreach ($slugs as $slug) {
|
640 |
+
$rules['(' . $slug . ')/feed/(feed|rdf|rss|rss2|atom)?/?$'] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
|
641 |
+
$rules['(' . $slug . ')/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
|
642 |
+
$rules['(' . $slug . ')(/page/(\d+))?/?$'] = 'index.php?category_name=$matches[1]&paged=$matches[3]';
|
643 |
+
}
|
644 |
+
}
|
645 |
+
}
|
646 |
+
$rules = apply_filters('seopress_category_rewrite_rules', $rules);
|
647 |
+
|
648 |
+
return $rules;
|
649 |
+
}
|
650 |
+
|
651 |
+
function seopress_remove_category_base($termlink, $term, $taxonomy) {
|
652 |
+
if ('category' == $taxonomy) {
|
653 |
+
$category_base = get_option('category_base');
|
654 |
+
if ('' == $category_base) {
|
655 |
+
$category_base = 'category';
|
656 |
+
}
|
657 |
+
|
658 |
+
if ('/' == substr($category_base, 0, 1)) {
|
659 |
+
$category_base = substr($category_base, 1);
|
660 |
+
}
|
661 |
+
$category_base .= '/';
|
662 |
+
|
663 |
+
return preg_replace('`' . preg_quote($category_base, '`') . '`u', '', $termlink, 1);
|
664 |
+
} else {
|
665 |
+
return $termlink;
|
666 |
+
}
|
667 |
+
}
|
668 |
+
add_filter('term_link', 'seopress_remove_category_base', 10, 3);
|
669 |
+
|
670 |
+
add_action('template_redirect', 'seopress_category_redirect', 1);
|
671 |
+
function seopress_category_redirect() {
|
672 |
+
global $wp;
|
673 |
+
|
674 |
+
if (seopress_advanced_advanced_trailingslash_option()) {
|
675 |
+
$current_url = home_url(add_query_arg([], $wp->request));
|
676 |
+
} else {
|
677 |
+
$current_url = trailingslashit(home_url(add_query_arg([], $wp->request)));
|
678 |
+
}
|
679 |
+
|
680 |
+
$category_base = get_option('category_base');
|
681 |
+
|
682 |
+
if ('' != $category_base) {
|
683 |
+
if (preg_match('/\/' . $category_base . '\//', $current_url)) {
|
684 |
+
$new_url = str_replace('/' . $category_base, '', $current_url);
|
685 |
+
wp_redirect($new_url, 301);
|
686 |
+
exit();
|
687 |
+
}
|
688 |
+
} else {
|
689 |
+
$category_base = 'category';
|
690 |
+
|
691 |
+
if (preg_match('/\/' . $category_base . '\//', $current_url)) {
|
692 |
+
$new_url = str_replace('/' . $category_base, '', $current_url);
|
693 |
+
wp_redirect($new_url, 301);
|
694 |
+
exit();
|
695 |
+
}
|
696 |
+
}
|
697 |
+
}
|
698 |
+
}
|
699 |
}
|
@@ -1,55 +1,60 @@
|
|
1 |
<?php
|
2 |
-
defined( 'ABSPATH' ) or die( 'Please don’t call the plugin directly. Thanks :)' );
|
3 |
|
4 |
-
|
|
|
|
|
5 |
|
6 |
if (is_post_type_hierarchical($cpt_key)) {
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
} else {
|
19 |
-
|
20 |
}
|
21 |
-
if (!empty($postslist)) {
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
1 |
<?php
|
|
|
2 |
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
+
|
5 |
+
$args = apply_filters('seopress_sitemaps_html_query', $args, $cpt_key);
|
6 |
|
7 |
if (is_post_type_hierarchical($cpt_key)) {
|
8 |
+
$postslist = get_posts($args);
|
9 |
+
|
10 |
+
$args2 = [
|
11 |
+
'post_type' => $cpt_key,
|
12 |
+
'include' => $postslist,
|
13 |
+
'sort_order' => $seopress_xml_sitemap_html_order_option,
|
14 |
+
'sort_column' => $seopress_xml_sitemap_html_orderby_option,
|
15 |
+
];
|
16 |
|
17 |
+
$args2 = apply_filters('seopress_sitemaps_html_pages_query', $args2, $cpt_key);
|
18 |
+
$postslist = get_pages($args2);
|
19 |
} else {
|
20 |
+
$postslist = get_posts($args);
|
21 |
}
|
22 |
+
if ( ! empty($postslist)) {
|
23 |
+
$date = true;
|
24 |
+
if (is_post_type_hierarchical($cpt_key)) {
|
25 |
+
$walker_page = new Walker_Page();
|
26 |
+
$html .= '<ul class="sp-list-posts sp-cpt-hierarchical">';
|
27 |
+
if (get_post_type_archive_link($cpt_key)) {
|
28 |
+
if (false === $display_archive) {
|
29 |
+
$html .= '<li><a href="' . get_post_type_archive_link($cpt_key) . '">' . $obj->labels->name . '</a></li>';
|
30 |
+
}
|
31 |
+
}
|
32 |
+
$depth = 0;
|
33 |
+
$depth = apply_filters('seopress_sitemaps_html_pages_depth_query', $depth);
|
34 |
|
35 |
+
$html .= $walker_page->walk($postslist, $depth);
|
36 |
+
$html .= '</ul>'; // 0 means display all levels.
|
37 |
+
} else {
|
38 |
+
$html .= '<ul class="sp-list-posts">';
|
39 |
+
if ('post' != $cpt_key && isset($obj->labels->name)) {//check if not Post cpt
|
40 |
+
if (false === $display_archive) {
|
41 |
+
$html .= '<li><a href="' . get_post_type_archive_link($cpt_key) . '">' . $obj->labels->name . '</a></li>';
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
foreach ($postslist as $post) {
|
46 |
+
setup_postdata($post);
|
47 |
+
$html .= '<li>';
|
48 |
+
$html .= '<a href="' . get_permalink($post) . '">' . get_the_title($post) . '</a>';
|
49 |
+
if ('1' != seopress_xml_sitemap_html_date_option()) {
|
50 |
+
$date = apply_filters('seopress_sitemaps_html_post_date', $date, $cpt_key);
|
51 |
+
if (true === $date) {
|
52 |
+
$html .= ' - ' . get_the_date('j F Y', $post);
|
53 |
+
}
|
54 |
+
}
|
55 |
+
$html .= '</li>';
|
56 |
+
}
|
57 |
+
wp_reset_postdata();
|
58 |
+
$html .= '</ul>';
|
59 |
+
}
|
60 |
+
}
|
@@ -1,101 +1,101 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
|
4 |
//XML
|
5 |
|
6 |
//Headers
|
7 |
if (function_exists('seopress_sitemaps_headers')) {
|
8 |
-
|
9 |
}
|
10 |
|
11 |
//WPML
|
12 |
-
add_filter(
|
13 |
|
14 |
-
add_filter(
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
});
|
23 |
|
24 |
function seopress_xml_sitemap_single_term() {
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
echo seopress_xml_sitemap_single_term();
|
1 |
<?php
|
2 |
+
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
//XML
|
6 |
|
7 |
//Headers
|
8 |
if (function_exists('seopress_sitemaps_headers')) {
|
9 |
+
seopress_sitemaps_headers();
|
10 |
}
|
11 |
|
12 |
//WPML
|
13 |
+
add_filter('wpml_get_home_url', 'seopress_remove_wpml_home_url_filter', 20, 5);
|
14 |
|
15 |
+
add_filter('seopress_sitemaps_single_term_query', function ($args) {
|
16 |
+
global $sitepress, $sitepress_settings;
|
17 |
|
18 |
+
$sitepress_settings['auto_adjust_ids'] = 0;
|
19 |
+
remove_filter('terms_clauses', [$sitepress, 'terms_clauses']);
|
20 |
+
remove_filter('category_link', [$sitepress, 'category_link_adjust_id'], 1);
|
21 |
|
22 |
+
return $args;
|
23 |
});
|
24 |
|
25 |
function seopress_xml_sitemap_single_term() {
|
26 |
+
if ('' !== get_query_var('seopress_cpt')) {
|
27 |
+
$path = get_query_var('seopress_cpt');
|
28 |
+
}
|
29 |
+
|
30 |
+
$offset = basename(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '.xml');
|
31 |
+
$offset = preg_match_all('/\d+/', $offset, $matches);
|
32 |
+
$offset = end($matches[0]);
|
33 |
+
|
34 |
+
//Max posts per paginated sitemap
|
35 |
+
$max = 1000;
|
36 |
+
$max = apply_filters('seopress_sitemaps_max_terms_per_sitemap', $max);
|
37 |
+
|
38 |
+
if (isset($offset) && absint($offset) && '' != $offset && 0 != $offset) {
|
39 |
+
$offset = (($offset - 1) * $max);
|
40 |
+
} else {
|
41 |
+
$offset = 0;
|
42 |
+
}
|
43 |
+
|
44 |
+
$home_url = home_url() . '/';
|
45 |
+
|
46 |
+
if (function_exists('pll_home_url')) {
|
47 |
+
$home_url = site_url() . '/';
|
48 |
+
}
|
49 |
+
|
50 |
+
$home_url = apply_filters('seopress_sitemaps_home_url', $home_url);
|
51 |
+
|
52 |
+
$seopress_sitemaps = '<?xml version="1.0" encoding="UTF-8"?>';
|
53 |
+
$seopress_sitemaps .= '<?xml-stylesheet type="text/xsl" href="' . $home_url . 'sitemaps_xsl.xsl"?>';
|
54 |
+
$seopress_sitemaps .= "\n";
|
55 |
+
$seopress_sitemaps .= apply_filters('seopress_sitemaps_urlset', '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">');
|
56 |
+
|
57 |
+
$args = [
|
58 |
+
'taxonomy' => $path,
|
59 |
+
'offset' => $offset,
|
60 |
+
'hide_empty' => false,
|
61 |
+
'number' => 1000,
|
62 |
+
'fields' => 'ids',
|
63 |
+
'lang' => '',
|
64 |
+
];
|
65 |
+
|
66 |
+
$args = apply_filters('seopress_sitemaps_single_term_query', $args, $path);
|
67 |
+
|
68 |
+
$termslist = new WP_Term_Query($args);
|
69 |
+
|
70 |
+
if (is_array($termslist->terms) && ! empty($termslist->terms)) {
|
71 |
+
foreach ($termslist->terms as $term) {
|
72 |
+
if ( ! get_term_meta($term, '_seopress_robots_index', true) && ! get_term_meta($term, '_seopress_robots_canonical', true)) {
|
73 |
+
$seopress_sitemaps_url = '';
|
74 |
+
// array with all the information needed for a sitemap url
|
75 |
+
$seopress_url = [
|
76 |
+
'loc' => htmlspecialchars(urldecode(esc_url(get_term_link($term)))),
|
77 |
+
'mod' => '',
|
78 |
+
'images' => [],
|
79 |
+
];
|
80 |
+
|
81 |
+
$seopress_sitemaps_url .= "\n";
|
82 |
+
$seopress_sitemaps_url .= '<url>';
|
83 |
+
$seopress_sitemaps_url .= "\n";
|
84 |
+
$seopress_sitemaps_url .= '<loc>';
|
85 |
+
$seopress_sitemaps_url .= $seopress_url['loc'];
|
86 |
+
$seopress_sitemaps_url .= '</loc>';
|
87 |
+
$seopress_sitemaps_url .= "\n";
|
88 |
+
$seopress_sitemaps_url .= '</url>';
|
89 |
+
|
90 |
+
$seopress_sitemaps .= apply_filters('seopress_sitemaps_url', $seopress_sitemaps_url, $seopress_url);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
$seopress_sitemaps .= '</urlset>';
|
95 |
+
$seopress_sitemaps .= "\n";
|
96 |
+
|
97 |
+
$seopress_sitemaps = apply_filters('seopress_sitemaps_xml_single_term', $seopress_sitemaps);
|
98 |
+
|
99 |
+
return $seopress_sitemaps;
|
100 |
+
}
|
101 |
+
echo seopress_xml_sitemap_single_term();
|
|
@@ -129,6 +129,10 @@ function seopress_xml_sitemap_single() {
|
|
129 |
'has_password' => false,
|
130 |
];
|
131 |
|
|
|
|
|
|
|
|
|
132 |
$args = apply_filters('seopress_sitemaps_single_query', $args, $path);
|
133 |
|
134 |
$postslist = get_posts($args);
|
129 |
'has_password' => false,
|
130 |
];
|
131 |
|
132 |
+
if ($path ==='attachment') {
|
133 |
+
unset($args['post_status']);
|
134 |
+
}
|
135 |
+
|
136 |
$args = apply_filters('seopress_sitemaps_single_query', $args, $path);
|
137 |
|
138 |
$postslist = get_posts($args);
|
@@ -27,6 +27,7 @@ $woo_single_price ='';
|
|
27 |
$woo_single_price_exc_tax ='';
|
28 |
$woo_single_sku = '';
|
29 |
$author_bio ='';
|
|
|
30 |
|
31 |
//Excerpt length
|
32 |
$seopress_excerpt_length = 50;
|
@@ -75,6 +76,10 @@ if (is_singular() && isset($post->post_author)) {
|
|
75 |
$author_bio = esc_attr(stripslashes_deep(wp_filter_nohtml_kses(wp_strip_all_tags(strip_shortcodes(get_the_author_meta('description', $post->post_author))))));
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
78 |
if (is_author() && is_int(get_queried_object_id())) {
|
79 |
$user_info = get_userdata(get_queried_object_id());
|
80 |
|
@@ -238,6 +243,7 @@ $seopress_titles_template_variables_array = [
|
|
238 |
'%%currenttime%%',
|
239 |
'%%author_bio%%',
|
240 |
'%%currentmonth_num%%',
|
|
|
241 |
];
|
242 |
|
243 |
$seopress_titles_template_variables_array = apply_filters('seopress_titles_template_variables_array', $seopress_titles_template_variables_array);
|
@@ -290,6 +296,7 @@ $seopress_titles_template_replace_array = [
|
|
290 |
current_time(get_option('time_format')),
|
291 |
$author_bio,
|
292 |
date_i18n('n'),
|
|
|
293 |
];
|
294 |
|
295 |
$seopress_titles_template_replace_array = apply_filters('seopress_titles_template_replace_array', $seopress_titles_template_replace_array);
|
27 |
$woo_single_price_exc_tax ='';
|
28 |
$woo_single_sku = '';
|
29 |
$author_bio ='';
|
30 |
+
$target_kw ='';
|
31 |
|
32 |
//Excerpt length
|
33 |
$seopress_excerpt_length = 50;
|
76 |
$author_bio = esc_attr(stripslashes_deep(wp_filter_nohtml_kses(wp_strip_all_tags(strip_shortcodes(get_the_author_meta('description', $post->post_author))))));
|
77 |
}
|
78 |
|
79 |
+
if (is_singular() && get_post_meta( $post->ID, '_seopress_analysis_target_kw', true )) {
|
80 |
+
$target_kw = get_post_meta( $post->ID, '_seopress_analysis_target_kw', true );
|
81 |
+
}
|
82 |
+
|
83 |
if (is_author() && is_int(get_queried_object_id())) {
|
84 |
$user_info = get_userdata(get_queried_object_id());
|
85 |
|
243 |
'%%currenttime%%',
|
244 |
'%%author_bio%%',
|
245 |
'%%currentmonth_num%%',
|
246 |
+
'%%target_keyword%%'
|
247 |
];
|
248 |
|
249 |
$seopress_titles_template_variables_array = apply_filters('seopress_titles_template_variables_array', $seopress_titles_template_variables_array);
|
296 |
current_time(get_option('time_format')),
|
297 |
$author_bio,
|
298 |
date_i18n('n'),
|
299 |
+
$target_kw
|
300 |
];
|
301 |
|
302 |
$seopress_titles_template_replace_array = apply_filters('seopress_titles_template_replace_array', $seopress_titles_template_replace_array);
|
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
|
|
6 |
Requires at least: 4.7+
|
7 |
Tested up to: 5.7
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -210,6 +210,9 @@ Help localize SEOPress even further by adding your locale – visit <a href="htt
|
|
210 |
<li><a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-premium-seo-pack-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">Premium SEO Pack</a></li>
|
211 |
<li><a href="https://www.seopress.org/support/guides/import-post-metadatas-from-squirrly-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">Squirrly</a></li>
|
212 |
<li><a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-wpseo-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">wpSEO</a></li>
|
|
|
|
|
|
|
213 |
</ul>
|
214 |
|
215 |
<h3>Help and support</h3>
|
@@ -231,6 +234,7 @@ SEOpress (incorrect)
|
|
231 |
<h3>SEOPress featured on</h3>
|
232 |
<ul>
|
233 |
<li>WP Beginner</li>
|
|
|
234 |
<li>HubSpot</li>
|
235 |
<li>GoDaddy</li>
|
236 |
<li>Forbes</li>
|
@@ -261,7 +265,7 @@ Any questions? Visit our website <a href="https://www.seopress.org?utm_source=w.
|
|
261 |
|
262 |
= Can I import my post and term metadata from other plugins? =
|
263 |
|
264 |
-
You can import your metadata from <a href="https://www.seopress.org/support/guides/import-post-terms-metadatas-yoast-seo-seopress
|
265 |
|
266 |
= How to use Google Tag Manager / Facebook Pixel with SEOPress? =
|
267 |
|
@@ -320,87 +324,47 @@ You're theme is probably using a deprecated function to handle the title. <a hre
|
|
320 |
9. Schemas metabox
|
321 |
|
322 |
== Changelog ==
|
323 |
-
= 4.
|
324 |
-
* NEW
|
325 |
-
*
|
326 |
-
*
|
327 |
-
*
|
328 |
-
*
|
329 |
-
*
|
330 |
-
|
331 |
-
*
|
332 |
-
*
|
333 |
-
*
|
334 |
-
|
335 |
-
*
|
336 |
-
|
337 |
-
*
|
338 |
-
*
|
339 |
-
*
|
340 |
-
*
|
341 |
-
*
|
342 |
-
*
|
343 |
-
*
|
344 |
-
*
|
345 |
-
|
346 |
-
*
|
347 |
-
|
348 |
-
*
|
349 |
-
|
350 |
-
*
|
351 |
-
|
352 |
-
*
|
353 |
-
* NEW Preview dynamic tags on post list columns 🎉
|
354 |
-
* NEW Live preview when adding dynamic variables for Google Preview 🎉
|
355 |
-
* NEW Add Local Business types to automatic schemas as new mapping option to avoid entering manually a business type 🎉 (PRO)
|
356 |
-
* NEW Support variable products for automatic product schema (PRO) 🎉
|
357 |
-
* NEW Support Global Product Identifiers for variable products (PRO)
|
358 |
-
* NEW Dashboard notification if Google Analytics is enabled without UA or GA4 ids
|
359 |
-
* NEW White Label option to change the SEO menu name (PRO)
|
360 |
-
* NEW Add post ID to automatic schemas as new mapping option (PRO)
|
361 |
-
* INFO Remove jQuery for Google Analytics Enhanced Ecommerce (no more jQuery with GA tracking code 🎉)
|
362 |
-
* INFO Improve wizard assistant user interface
|
363 |
-
* INFO Stop adding uppercase on the first letter of each word when automatically adding media attributes (eg: alt tag)
|
364 |
-
* INFO Add new help tabs for Sitemaps and Social networks settings page to improve user experience
|
365 |
-
* FIX Cornerstone compatibility issue with our content analysis feature
|
366 |
-
* FIX Oxygen compatibility issue with our content analysis feature ("2 meta robots found")
|
367 |
-
* FIX CSV broken link export with specific PHP configuration
|
368 |
-
* FIX Social tags for term taxonomies
|
369 |
-
* FIX White label: some SEOPress links weren't hidden
|
370 |
-
* FIX WPML XML configuration file (wpml-config.xml)
|
371 |
-
* FIX GA Enhanced Ecommerce check on status order for measuring purchases
|
372 |
-
* FIX GA Enhanced Ecommerce add_to_cart event from archive product page
|
373 |
-
= 4.3.0.2 19/01/2021 =
|
374 |
-
* FIX Analytics tracking code if no UA-XXX set
|
375 |
-
* FIX Conflict Google Analytics with UpdraftPlus (PRO)
|
376 |
-
= 4.3.0.1 15/01/2021 =
|
377 |
-
* FIX Fatal error
|
378 |
-
* FIX Product price with taxes for automatic product schema (default: sale price, fallback: regular price)
|
379 |
-
* FIX Fatal error get_price in specific cases
|
380 |
-
= 4.3 (14/01/2021) =
|
381 |
-
* NEW PHP 8 compatibility
|
382 |
-
* NEW "Disable notifications on slug changes or post deletions" option from SEO, PRO, 404/301 tab (PRO)
|
383 |
-
* NEW "Canonical URL" check added to content analysis
|
384 |
-
* NEW Quickly enable/disable noindex/nofollow using Quick Edit feature from post lists
|
385 |
-
* NEW Import Primary Category with our CSV import tool (PRO)
|
386 |
-
* NEW Add a new field for automatic schema to get product price with taxes (PRO)
|
387 |
-
* INFO Refactoring XML sitemaps feature to avoid conflicts with other plugins / themes
|
388 |
-
* INFO Improve configuration wizard
|
389 |
-
* INFO Improve design and accessibility for SEO columns from post lists
|
390 |
-
* INFO Remove recommended links if White Label is enabled
|
391 |
-
* INFO Improve UI / UX
|
392 |
* INFO Strengthening security
|
393 |
-
*
|
394 |
-
*
|
395 |
-
* FIX
|
396 |
-
* FIX
|
397 |
-
* FIX
|
398 |
-
* FIX
|
399 |
-
* FIX
|
400 |
-
* FIX
|
401 |
-
* FIX
|
402 |
-
* FIX
|
403 |
-
* FIX
|
404 |
-
* FIX Notice: trying to get property "name" of non-object
|
405 |
|
406 |
<a href="https://www.seopress.org/changelog/" target="_blank">View our complete changelog</a>
|
6 |
Requires at least: 4.7+
|
7 |
Tested up to: 5.7
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.5.0
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
210 |
<li><a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-premium-seo-pack-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">Premium SEO Pack</a></li>
|
211 |
<li><a href="https://www.seopress.org/support/guides/import-post-metadatas-from-squirrly-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">Squirrly</a></li>
|
212 |
<li><a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-wpseo-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">wpSEO</a></li>
|
213 |
+
<li><a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-platinum-seo-pack-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">Platinum SEO Pack</a></li>
|
214 |
+
<li><a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-smartcrawl-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">SmartCrawl</a></li>
|
215 |
+
<li><a href="https://www.seopress.org/support/guides/import-post-metadata-from-seopressor-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme" target="_blank">SEOPressor</a></li>
|
216 |
</ul>
|
217 |
|
218 |
<h3>Help and support</h3>
|
234 |
<h3>SEOPress featured on</h3>
|
235 |
<ul>
|
236 |
<li>WP Beginner</li>
|
237 |
+
<li>Neil Patel</li>
|
238 |
<li>HubSpot</li>
|
239 |
<li>GoDaddy</li>
|
240 |
<li>Forbes</li>
|
265 |
|
266 |
= Can I import my post and term metadata from other plugins? =
|
267 |
|
268 |
+
You can import your metadata from <a href="https://www.seopress.org/support/guides/import-post-terms-metadatas-yoast-seo-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">Yoast SEO</a>, <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadatas-from-all-in-one-seo-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">All In One SEO (AIO SEO)</a>, <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadatas-from-the-seo-framework-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">The SEO Framework (TSF)</a>, <a href="https://www.seopress.org/support/guides/import-post-metadatas-from-squirrly-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">Squirrly</a> (post metas only, not terms), <a href="https://www.seopress.org/support/guides/import-post-terms-metadatas-rank-math-seo-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">Rank Math</a>, <a href="https://www.seopress.org/support/guides/import-post-metadata-from-seo-ultimate-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">SEO Ultimate (post metas only, not terms)</a>, <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-wp-meta-seo-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">WP Meta SEO</a>, <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-wpseo-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">wpSEO</a>, <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-platinum-seo-pack-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">Platinum SEO Pack</a>, <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-smartcrawl-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">SmartCrawl</a>, <a href="https://www.seopress.org/support/guides/import-post-metadata-from-seopressor-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">SEOPressor</a> and <a href="https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-premium-seo-pack-to-seopress/?utm_source=w.org&utm_campaign=seopress&utm_medium=readme_faq">Premium SEO Pack</a> in one click to SEOPress without losing traffic.
|
269 |
|
270 |
= How to use Google Tag Manager / Facebook Pixel with SEOPress? =
|
271 |
|
324 |
9. Schemas metabox
|
325 |
|
326 |
== Changelog ==
|
327 |
+
= 4.5 (25/03/2021) https://www.seopress.org/blog/seopress-4-5/ =
|
328 |
+
* NEW HTML sitemap enhancements: add HTML classes
|
329 |
+
* NEW HTML sitemap enhancements: new option to remove links from archive pages
|
330 |
+
* NEW HTML sitemap enhancements: new shortcode attribute to request specific custom post types
|
331 |
+
* NEW Dynamic variable: %%target_keyword%%
|
332 |
+
* NEW Import tools: Platinum SEO Pack, SmartCrawl and SEOPressor
|
333 |
+
* NEW Allow user to change its choice about cookies (SEO, Analytics, Cookie bar tab to enable the option)
|
334 |
+
* NEW Compatibility center (SEO, Tools) for better integration with other plugins (eg: Page Builders) without adding code
|
335 |
+
* NEW Add our dynamic variables dropdown to global meta title / meta description settings page
|
336 |
+
* NEW Add heading 1 (H1) check to Content Analysis feature
|
337 |
+
* NEW Add Inbound links / Orphaned pages check to Content Analysis feature
|
338 |
+
* NEW Use dynamic variables in social metadata (Open Graph and Twitter cards)
|
339 |
+
* NEW Multiple opening hours (morning / afternoon) for global Local Business schema (PRO)
|
340 |
+
* NEW 'seopress_resize_panel_elementor' hook to prevent SEOPress resizes the Elementor Panel (https://www.seopress.org/support/hooks/disable-automatic-resizing-of-elementor-panel/)
|
341 |
+
* NEW 'seopress_titles_robots_attrs' hook to add meta robots attributes (https://www.seopress.org/support/hooks/filter-meta-robots-attributes/)
|
342 |
+
* NEW 'seopress_sitemaps_no_archive_link' hook to remove archive links in XML sitemaps (https://www.seopress.org/support/hooks/filter-custom-post-type-archive-link-in-xml-single-sitemaps/)
|
343 |
+
* NEW 'seopress_breadcrumbs_force_archive_name' hook to force archive name display on CPT with no archive (https://www.seopress.org/support/hooks/force-the-display-of-the-custom-post-type-archive-page-even-if-it-does-not-exist-in-breadcrumbs/)
|
344 |
+
* NEW 'seopress_sitemaps_html_remove_archive' hook to filter archive names in HTML sitemap (https://www.seopress.org/support/hooks/remove-archive-links-per-post-type-in-html-sitemap/)
|
345 |
+
* NEW 'seopress_auto_image_alt_target_kw' hook to use target keywords for the alternative texts of the images (https://www.seopress.org/support/hooks/filter-automatic-image-alt-tag-with-target-keywords/)
|
346 |
+
* NEW 'seopress_export_redirections_query' hook to filter export redirections query (https://www.seopress.org/support/hooks/filter-export-redirections-query/)
|
347 |
+
* NEW 'seopress_gtag_ec_status' hook to change status of WC orders sent to Google Analytics Enhanced Ecommerce (https://www.seopress.org/support/hooks/filter-woocommerce-order-status-sent-to-google-analytics-enhanced-ecommerce/)
|
348 |
+
* INFO Improve accessibility for cookie bar
|
349 |
+
* INFO Improve SEO columns display for posts, pages, custom post type lists
|
350 |
+
* INFO Improve UI to warn users if some content are set to noindex and still included in XML sitemaps
|
351 |
+
* INFO Improve UI / i18n for Google Analytics widget
|
352 |
+
* INFO Improve UI if error on license activation
|
353 |
+
* INFO Improve UI for BlogPosting schema
|
354 |
+
* INFO Improve UI for global LocalBusiness schema
|
355 |
+
* INFO Automatically add custom fields created with Toolset plugin to our Schema feature
|
356 |
+
* INFO SEO and Content Analysis metaboxes are now completely independent (and prevent a lot of errors / warnings)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
* INFO Strengthening security
|
358 |
+
* FIX Quick edit JS errors if noindex/nofollow columns are blocked (props to @mbis)
|
359 |
+
* FIX i18n for Type of Employment on non English languages
|
360 |
+
* FIX Webarx graph conflict
|
361 |
+
* FIX Broken link checker error with 404 links
|
362 |
+
* FIX PHP 8 errors with DIVI
|
363 |
+
* FIX PHP 8 error with Google Preview for terms taxonomy
|
364 |
+
* FIX Product variable price sent to Add to cart GA Enhanced Ecommerce event
|
365 |
+
* FIX Elementor synchronization when duplicating posts
|
366 |
+
* FIX Attachment XML sitemaps
|
367 |
+
* FIX Oxygen content analysis in specific cases
|
368 |
+
* FIX AIO import tool
|
|
|
369 |
|
370 |
<a href="https://www.seopress.org/changelog/" target="_blank">View our complete changelog</a>
|
@@ -4,7 +4,7 @@ Plugin Name: SEOPress
|
|
4 |
Plugin URI: https://www.seopress.org/
|
5 |
Description: One of the best SEO plugins for WordPress.
|
6 |
Author: SEOPress
|
7 |
-
Version: 4.
|
8 |
Author URI: https://www.seopress.org/
|
9 |
License: GPLv2
|
10 |
Text Domain: wp-seopress
|
@@ -55,11 +55,12 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
|
|
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56 |
//Define
|
57 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
-
define('SEOPRESS_VERSION', '4.
|
59 |
define('SEOPRESS_AUTHOR', 'Benjamin Denis');
|
60 |
define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
|
61 |
define('SEOPRESS_TEMPLATE_DIR', SEOPRESS_PLUGIN_DIR_PATH . 'templates');
|
62 |
define('SEOPRESS_TEMPLATE_SITEMAP_DIR', SEOPRESS_TEMPLATE_DIR . '/sitemap');
|
|
|
63 |
|
64 |
use SEOPress\Core\Kernel;
|
65 |
|
@@ -303,6 +304,18 @@ function seopress_add_admin_options_scripts($hook) {
|
|
303 |
'seopress_nonce' => wp_create_nonce('seopress_wpseo_migrate_nonce'),
|
304 |
'seopress_wpseo_migration' => admin_url('admin-ajax.php'),
|
305 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
'seopress_metadata_csv' => [
|
307 |
'seopress_nonce' => wp_create_nonce('seopress_export_csv_metadata_nonce'),
|
308 |
'seopress_metadata_export' => admin_url('admin-ajax.php'),
|
@@ -423,12 +436,12 @@ function seopress_admin_body_class($classes) {
|
|
423 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
424 |
//WP compatibility
|
425 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
426 |
-
|
427 |
* Remove WP default meta robots (added in WP 5.7)
|
428 |
*
|
429 |
* @since 4.4.0.7
|
430 |
*/
|
431 |
-
remove_filter(
|
432 |
|
433 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
434 |
//3rd plugins compatibility
|
@@ -667,6 +680,16 @@ function seopress_get_custom_fields() {
|
|
667 |
ORDER BY meta_key
|
668 |
LIMIT %d", $limit));
|
669 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
670 |
$cf_keys = apply_filters('seopress_get_custom_fields', $cf_keys);
|
671 |
|
672 |
if ($cf_keys) {
|
@@ -1249,26 +1272,26 @@ function seopress_get_oxygen_content() {
|
|
1249 |
if (is_plugin_active('oxygen/functions.php') && function_exists('ct_template_output')) {
|
1250 |
$seopress_get_the_content = ct_template_output();
|
1251 |
|
1252 |
-
if (
|
1253 |
//Get post content
|
1254 |
$seopress_get_the_content = apply_filters('the_content', get_post_field('post_content', get_the_ID()));
|
1255 |
}
|
1256 |
|
1257 |
-
if (
|
1258 |
//Get Target Keywords
|
1259 |
if (get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true)) {
|
1260 |
$seopress_analysis_target_kw = array_filter(explode(',', strtolower(esc_attr(get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true)))));
|
1261 |
|
1262 |
//Keywords density
|
1263 |
foreach ($seopress_analysis_target_kw as $kw) {
|
1264 |
-
if (preg_match_all('#\b(' . $kw . ')\b#iu', strip_tags(wp_filter_nohtml_kses($seopress_get_the_content)), $m)) {
|
1265 |
$data['kws_density']['matches'][$kw][] = $m[0];
|
1266 |
}
|
1267 |
}
|
1268 |
}
|
1269 |
|
1270 |
//Words Counter
|
1271 |
-
$data['words_counter'] = preg_match_all("/\p{L}[\p{L}\p{Mn}\p{Pd}'\x{2019}]*/u", strip_tags(wp_filter_nohtml_kses($seopress_get_the_content)), $matches);
|
1272 |
|
1273 |
if ( ! empty($matches[0])) {
|
1274 |
$words_counter_unique = count(array_unique($matches[0]));
|
@@ -1278,7 +1301,7 @@ function seopress_get_oxygen_content() {
|
|
1278 |
$data['words_counter_unique'] = $words_counter_unique;
|
1279 |
|
1280 |
//Update analysis
|
1281 |
-
update_post_meta(get_the_ID(), '
|
1282 |
}
|
1283 |
}
|
1284 |
}
|
4 |
Plugin URI: https://www.seopress.org/
|
5 |
Description: One of the best SEO plugins for WordPress.
|
6 |
Author: SEOPress
|
7 |
+
Version: 4.5.0
|
8 |
Author URI: https://www.seopress.org/
|
9 |
License: GPLv2
|
10 |
Text Domain: wp-seopress
|
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56 |
//Define
|
57 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
define('SEOPRESS_VERSION', '4.5.0');
|
59 |
define('SEOPRESS_AUTHOR', 'Benjamin Denis');
|
60 |
define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
|
61 |
define('SEOPRESS_TEMPLATE_DIR', SEOPRESS_PLUGIN_DIR_PATH . 'templates');
|
62 |
define('SEOPRESS_TEMPLATE_SITEMAP_DIR', SEOPRESS_TEMPLATE_DIR . '/sitemap');
|
63 |
+
define('SEOPRESS_TEMPLATE_JSON_SCHEMAS', SEOPRESS_TEMPLATE_DIR . '/json-schemas');
|
64 |
|
65 |
use SEOPress\Core\Kernel;
|
66 |
|
304 |
'seopress_nonce' => wp_create_nonce('seopress_wpseo_migrate_nonce'),
|
305 |
'seopress_wpseo_migration' => admin_url('admin-ajax.php'),
|
306 |
],
|
307 |
+
'seopress_platinum_seo_migrate' => [
|
308 |
+
'seopress_nonce' => wp_create_nonce('seopress_platinum_seo_migrate_nonce'),
|
309 |
+
'seopress_platinum_seo_migration' => admin_url('admin-ajax.php'),
|
310 |
+
],
|
311 |
+
'seopress_smart_crawl_migrate' => [
|
312 |
+
'seopress_nonce' => wp_create_nonce('seopress_smart_crawl_migrate_nonce'),
|
313 |
+
'seopress_smart_crawl_migration' => admin_url('admin-ajax.php'),
|
314 |
+
],
|
315 |
+
'seopress_seopressor_migrate' => [
|
316 |
+
'seopress_nonce' => wp_create_nonce('seopress_seopressor_migrate_nonce'),
|
317 |
+
'seopress_seopressor_migration' => admin_url('admin-ajax.php'),
|
318 |
+
],
|
319 |
'seopress_metadata_csv' => [
|
320 |
'seopress_nonce' => wp_create_nonce('seopress_export_csv_metadata_nonce'),
|
321 |
'seopress_metadata_export' => admin_url('admin-ajax.php'),
|
436 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
437 |
//WP compatibility
|
438 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
439 |
+
/*
|
440 |
* Remove WP default meta robots (added in WP 5.7)
|
441 |
*
|
442 |
* @since 4.4.0.7
|
443 |
*/
|
444 |
+
remove_filter('wp_robots', 'wp_robots_max_image_preview_large');
|
445 |
|
446 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
447 |
//3rd plugins compatibility
|
680 |
ORDER BY meta_key
|
681 |
LIMIT %d", $limit));
|
682 |
|
683 |
+
if (is_plugin_active('types/wpcf.php')) {
|
684 |
+
$wpcf_fields = get_option('wpcf-fields');
|
685 |
+
|
686 |
+
if ( ! empty($wpcf_fields)) {
|
687 |
+
foreach ($wpcf_fields as $key => $value) {
|
688 |
+
$cf_keys[] = $value['meta_key'];
|
689 |
+
}
|
690 |
+
}
|
691 |
+
}
|
692 |
+
|
693 |
$cf_keys = apply_filters('seopress_get_custom_fields', $cf_keys);
|
694 |
|
695 |
if ($cf_keys) {
|
1272 |
if (is_plugin_active('oxygen/functions.php') && function_exists('ct_template_output')) {
|
1273 |
$seopress_get_the_content = ct_template_output();
|
1274 |
|
1275 |
+
if ($seopress_get_the_content) {
|
1276 |
//Get post content
|
1277 |
$seopress_get_the_content = apply_filters('the_content', get_post_field('post_content', get_the_ID()));
|
1278 |
}
|
1279 |
|
1280 |
+
if ($seopress_get_the_content) {
|
1281 |
//Get Target Keywords
|
1282 |
if (get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true)) {
|
1283 |
$seopress_analysis_target_kw = array_filter(explode(',', strtolower(esc_attr(get_post_meta(get_the_ID(), '_seopress_analysis_target_kw', true)))));
|
1284 |
|
1285 |
//Keywords density
|
1286 |
foreach ($seopress_analysis_target_kw as $kw) {
|
1287 |
+
if (preg_match_all('#\b(' . $kw . ')\b#iu', normalize_whitespace(strip_tags(wp_filter_nohtml_kses($seopress_get_the_content))), $m)) {
|
1288 |
$data['kws_density']['matches'][$kw][] = $m[0];
|
1289 |
}
|
1290 |
}
|
1291 |
}
|
1292 |
|
1293 |
//Words Counter
|
1294 |
+
$data['words_counter'] = preg_match_all("/\p{L}[\p{L}\p{Mn}\p{Pd}'\x{2019}]*/u", normalize_whitespace(strip_tags(wp_filter_nohtml_kses($seopress_get_the_content))), $matches);
|
1295 |
|
1296 |
if ( ! empty($matches[0])) {
|
1297 |
$words_counter_unique = count(array_unique($matches[0]));
|
1301 |
$data['words_counter_unique'] = $words_counter_unique;
|
1302 |
|
1303 |
//Update analysis
|
1304 |
+
update_post_meta(get_the_ID(), '_seopress_analysis_data_oxygen', $data);
|
1305 |
}
|
1306 |
}
|
1307 |
}
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Actions\Front\Schemas;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Core\Hooks\ExecuteHooksFrontend;
|
10 |
+
|
11 |
+
class PrintHeadJsonSchema implements ExecuteHooksFrontend {
|
12 |
+
public function hooks() {
|
13 |
+
if (apply_filters('seopress_old_social_accounts_jsonld_hook', false)) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
add_action('wp_head', [$this, 'render'], 2);
|
18 |
+
}
|
19 |
+
|
20 |
+
public function render() {
|
21 |
+
if ('none' === seopress_get_service('SocialOption')->getSocialKnowledgeType()) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
$jsons = seopress_get_service('JsonSchemaGenerator')->getJsonsEncoded([
|
26 |
+
'organization',
|
27 |
+
]); ?>
|
28 |
+
<script type="application/ld+json">
|
29 |
+
<?php echo apply_filters('seopress_schemas_organization_html', $jsons[0]); ?>
|
30 |
+
</script>
|
31 |
+
<?php
|
32 |
+
}
|
33 |
+
}
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Compose;
|
4 |
+
|
5 |
+
use SEOPress\Models\GetJsonFromFile;
|
6 |
+
|
7 |
+
trait UseJsonSchema {
|
8 |
+
protected $schemasAvailable = null;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @since 4.5.0
|
12 |
+
*
|
13 |
+
* @param string $key
|
14 |
+
*
|
15 |
+
* @return GetJsonFromFile
|
16 |
+
*/
|
17 |
+
public function getSchemaClass($key) {
|
18 |
+
$schemasAvailable = $this->getSchemasAvailable();
|
19 |
+
$element = null;
|
20 |
+
// Check key <=> schema
|
21 |
+
if (array_key_exists($key, $schemasAvailable)) {
|
22 |
+
$element = $schemasAvailable[$key];
|
23 |
+
}
|
24 |
+
|
25 |
+
// Check alias <=> schema
|
26 |
+
if (null === $element) {
|
27 |
+
foreach ($schemasAvailable as $schema) {
|
28 |
+
if (null !== $element) {
|
29 |
+
break;
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( ! array_key_exists('alias', $schema) || empty($schema['alias'])) {
|
33 |
+
continue;
|
34 |
+
}
|
35 |
+
|
36 |
+
if (in_array($key, $schema['alias'], true)) {
|
37 |
+
$element = $schema;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
// Check custom element
|
43 |
+
if (null === $element) {
|
44 |
+
foreach ($schemasAvailable as $schema) {
|
45 |
+
if (null !== $element) {
|
46 |
+
break;
|
47 |
+
}
|
48 |
+
|
49 |
+
if ( ! array_key_exists('custom', $schema) || null === $schema['custom']) {
|
50 |
+
continue;
|
51 |
+
}
|
52 |
+
|
53 |
+
if (0 === strpos($key, $schema['custom'])) {
|
54 |
+
$element = $schema;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( ! $element) {
|
60 |
+
return null;
|
61 |
+
}
|
62 |
+
|
63 |
+
if (is_string($element['class'])) {
|
64 |
+
$element['class'] = new $element['class']();
|
65 |
+
}
|
66 |
+
|
67 |
+
if ($element['class'] instanceof GetJsonFromFile) {
|
68 |
+
return $element['class'];
|
69 |
+
}
|
70 |
+
|
71 |
+
return null;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @since 4.5.0
|
76 |
+
*
|
77 |
+
* @param string $directory
|
78 |
+
* @param array $schemas
|
79 |
+
* @param string $subNamespace
|
80 |
+
* @param mixed $namespacesOption
|
81 |
+
*
|
82 |
+
* @return array
|
83 |
+
*/
|
84 |
+
public function buildSchemas($directory, $schemas = [], $namespacesOption = ['root' => '\\SEOPress\\JsonSchemas\\%s%s', 'subNamespace' => '']) {
|
85 |
+
$files = array_diff(scandir($directory), ['..', '.']);
|
86 |
+
|
87 |
+
foreach ($files as $filename) {
|
88 |
+
$class = str_replace('.php', '', $filename);
|
89 |
+
$classFile = sprintf($namespacesOption['root'], $namespacesOption['subNamespace'], $class);
|
90 |
+
$fullPath = sprintf('%s/%s', $directory, $filename);
|
91 |
+
|
92 |
+
if (is_dir($fullPath)) {
|
93 |
+
$namespacesOption['subNamespace'] = $filename . '\\';
|
94 |
+
$schemas = $this->buildSchemas($fullPath, $schemas, $namespacesOption);
|
95 |
+
} else {
|
96 |
+
if (defined($classFile . '::NAME')) {
|
97 |
+
$name = $classFile::NAME;
|
98 |
+
} else {
|
99 |
+
$name = strtolower($class);
|
100 |
+
}
|
101 |
+
|
102 |
+
$schemas[$name] = [
|
103 |
+
'class' => $classFile,
|
104 |
+
'name' => $name,
|
105 |
+
'alias' => defined($classFile . '::ALIAS') ? $classFile::ALIAS : [],
|
106 |
+
'custom' => defined($classFile . '::CUSTOM_FORMAT') ? $classFile::CUSTOM_FORMAT : null,
|
107 |
+
'input' => sprintf('[[%s]]', $name),
|
108 |
+
];
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
return $schemas;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* @since 4.5.0
|
117 |
+
*
|
118 |
+
* @return array
|
119 |
+
*/
|
120 |
+
public function getSchemasAvailable() {
|
121 |
+
if (null !== $this->schemasAvailable) {
|
122 |
+
return apply_filters('seopress_schemas_available', $this->schemasAvailable);
|
123 |
+
}
|
124 |
+
|
125 |
+
$schemas = $this->buildSchemas(SEOPRESS_PLUGIN_DIR_PATH . 'src/JsonSchemas');
|
126 |
+
|
127 |
+
if (defined('SEOPRESS_PRO_PLUGIN_DIR_PATH') && file_exists(SEOPRESS_PRO_PLUGIN_DIR_PATH . 'src/JsonSchemas') && is_dir(SEOPRESS_PRO_PLUGIN_DIR_PATH . 'src/JsonSchemas')) {
|
128 |
+
$schemas = $this->buildSchemas(SEOPRESS_PRO_PLUGIN_DIR_PATH . 'src/JsonSchemas', $schemas, ['root' => '\\SEOPressPro\\JsonSchemas\\%s%s', 'subNamespace' => '']);
|
129 |
+
}
|
130 |
+
$this->schemasAvailable = $schemas;
|
131 |
+
|
132 |
+
return apply_filters('seopress_schemas_available', $this->schemasAvailable);
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @since 4.5.0
|
137 |
+
*
|
138 |
+
* @param string $name
|
139 |
+
* @param any $params
|
140 |
+
*/
|
141 |
+
public function __call($name, $params) {
|
142 |
+
$schemaClass = $this->getSchemaClass($name);
|
143 |
+
|
144 |
+
if (null === $schemaClass) {
|
145 |
+
return '';
|
146 |
+
}
|
147 |
+
|
148 |
+
return $schemaClass->getJsonWithName($name);
|
149 |
+
}
|
150 |
+
}
|
@@ -79,19 +79,24 @@ trait UseTags {
|
|
79 |
* @param string $directory
|
80 |
* @param array $tags
|
81 |
* @param string $subNamespace
|
|
|
82 |
*
|
83 |
* @return array
|
84 |
*/
|
85 |
-
public function buildTags($directory, $tags = [], $
|
86 |
$files = array_diff(scandir($directory), ['..', '.']);
|
87 |
|
88 |
foreach ($files as $filename) {
|
89 |
$class = str_replace('.php', '', $filename);
|
90 |
-
$classFile = sprintf('
|
|
|
91 |
$fullPath = sprintf('%s/%s', $directory, $filename);
|
92 |
|
93 |
if (is_dir($fullPath)) {
|
94 |
-
$tags
|
|
|
|
|
|
|
95 |
} else {
|
96 |
if (defined($classFile . '::NAME')) {
|
97 |
$name = $classFile::NAME;
|
@@ -102,6 +107,7 @@ trait UseTags {
|
|
102 |
$tags[$name] = [
|
103 |
'class' => $classFile,
|
104 |
'name' => $name,
|
|
|
105 |
'alias' => defined($classFile . '::ALIAS') ? $classFile::ALIAS : [],
|
106 |
'custom' => defined($classFile . '::CUSTOM_FORMAT') ? $classFile::CUSTOM_FORMAT : null,
|
107 |
'input' => TagCompose::getValueWithTag($name),
|
@@ -122,7 +128,13 @@ trait UseTags {
|
|
122 |
return apply_filters('seopress_tags_available', $this->tagsAvailable);
|
123 |
}
|
124 |
|
125 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
return apply_filters('seopress_tags_available', $this->tagsAvailable);
|
128 |
}
|
79 |
* @param string $directory
|
80 |
* @param array $tags
|
81 |
* @param string $subNamespace
|
82 |
+
* @param mixed $namespacesOption
|
83 |
*
|
84 |
* @return array
|
85 |
*/
|
86 |
+
public function buildTags($directory, $tags = [], $namespacesOption) {
|
87 |
$files = array_diff(scandir($directory), ['..', '.']);
|
88 |
|
89 |
foreach ($files as $filename) {
|
90 |
$class = str_replace('.php', '', $filename);
|
91 |
+
$classFile = sprintf($namespacesOption['root'], $namespacesOption['subNamespace'], $class);
|
92 |
+
|
93 |
$fullPath = sprintf('%s/%s', $directory, $filename);
|
94 |
|
95 |
if (is_dir($fullPath)) {
|
96 |
+
$tags = $this->buildTags($fullPath, $tags, [
|
97 |
+
'root' => $namespacesOption['root'],
|
98 |
+
'subNamespace' => $namespacesOption['subNamespace'] . $filename . '\\',
|
99 |
+
]);
|
100 |
} else {
|
101 |
if (defined($classFile . '::NAME')) {
|
102 |
$name = $classFile::NAME;
|
107 |
$tags[$name] = [
|
108 |
'class' => $classFile,
|
109 |
'name' => $name,
|
110 |
+
'schema' => 0 === strpos($classFile, "\SEOPress\Tags\Schema\\") ? true : false,
|
111 |
'alias' => defined($classFile . '::ALIAS') ? $classFile::ALIAS : [],
|
112 |
'custom' => defined($classFile . '::CUSTOM_FORMAT') ? $classFile::CUSTOM_FORMAT : null,
|
113 |
'input' => TagCompose::getValueWithTag($name),
|
128 |
return apply_filters('seopress_tags_available', $this->tagsAvailable);
|
129 |
}
|
130 |
|
131 |
+
$tags = $this->buildTags(SEOPRESS_PLUGIN_DIR_PATH . 'src/Tags', [], ['root' => '\\SEOPress\\Tags\\%s%s', 'subNamespace' => '']);
|
132 |
+
|
133 |
+
if (defined('SEOPRESS_PRO_PLUGIN_DIR_PATH') && file_exists(SEOPRESS_PRO_PLUGIN_DIR_PATH . 'src/Tags') && is_dir(SEOPRESS_PRO_PLUGIN_DIR_PATH . 'src/Tags')) {
|
134 |
+
$tags = $this->buildTags(SEOPRESS_PRO_PLUGIN_DIR_PATH . 'src/Tags', $tags, ['root' => '\\SEOPressPro\\Tags\\%s%s', 'subNamespace' => '']);
|
135 |
+
}
|
136 |
+
|
137 |
+
$this->tagsAvailable = $tags;
|
138 |
|
139 |
return apply_filters('seopress_tags_available', $this->tagsAvailable);
|
140 |
}
|
@@ -20,4 +20,18 @@ abstract class Options {
|
|
20 |
* @var string
|
21 |
*/
|
22 |
const KEY_OPTION_TITLE = 'seopress_titles_option_name';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
20 |
* @var string
|
21 |
*/
|
22 |
const KEY_OPTION_TITLE = 'seopress_titles_option_name';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @since 4.5.0
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
const KEY_OPTION_SOCIAL = 'seopress_social_option_name';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @since 4.5.0
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
const KEY_TOGGLE_OPTION = 'seopress_toggle';
|
37 |
}
|
@@ -120,11 +120,17 @@ abstract class Kernel {
|
|
120 |
$files = array_diff(scandir($path), ['..', '.']);
|
121 |
foreach ($files as $filename) {
|
122 |
$pathCheck = $path . '/' . $filename;
|
|
|
123 |
if (is_dir($pathCheck)) {
|
124 |
self::buildClasses($pathCheck, $type, $namespace . $filename . '\\');
|
125 |
continue;
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
$data = '\\SEOPress\\' . $namespace . str_replace('.php', '', $filename);
|
129 |
|
130 |
switch ($type) {
|
120 |
$files = array_diff(scandir($path), ['..', '.']);
|
121 |
foreach ($files as $filename) {
|
122 |
$pathCheck = $path . '/' . $filename;
|
123 |
+
|
124 |
if (is_dir($pathCheck)) {
|
125 |
self::buildClasses($pathCheck, $type, $namespace . $filename . '\\');
|
126 |
continue;
|
127 |
}
|
128 |
|
129 |
+
$pathinfo = pathinfo($filename);
|
130 |
+
if (isset($pathinfo['extension']) && 'php' !== $pathinfo['extension']) {
|
131 |
+
continue;
|
132 |
+
}
|
133 |
+
|
134 |
$data = '\\SEOPress\\' . $namespace . str_replace('.php', '', $filename);
|
135 |
|
136 |
switch ($type) {
|
@@ -79,6 +79,11 @@ abstract class ContentAnalysis {
|
|
79 |
'impact' => 'good',
|
80 |
'desc' => null,
|
81 |
],
|
|
|
|
|
|
|
|
|
|
|
82 |
];
|
83 |
|
84 |
return apply_filters('seopress_get_content_analysis_data', $data);
|
79 |
'impact' => 'good',
|
80 |
'desc' => null,
|
81 |
],
|
82 |
+
'inbound_links'=> [
|
83 |
+
'title' => __('Inbound Links', 'wp-seopress'),
|
84 |
+
'impact' => 'good',
|
85 |
+
'desc' => null,
|
86 |
+
],
|
87 |
];
|
88 |
|
89 |
return apply_filters('seopress_get_content_analysis_data', $data);
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Helpers;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
abstract class OpeningHoursHelper {
|
10 |
+
public static function getDays() {
|
11 |
+
return [
|
12 |
+
__('Monday', 'wp-seopress-pro'),
|
13 |
+
__('Tuesday', 'wp-seopress-pro'),
|
14 |
+
__('Wednesday', 'wp-seopress-pro'),
|
15 |
+
__('Thursday', 'wp-seopress-pro'),
|
16 |
+
__('Friday', 'wp-seopress-pro'),
|
17 |
+
__('Saturday', 'wp-seopress-pro'),
|
18 |
+
__('Sunday', 'wp-seopress-pro'),
|
19 |
+
];
|
20 |
+
}
|
21 |
+
|
22 |
+
public static function getHours() {
|
23 |
+
return ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'];
|
24 |
+
}
|
25 |
+
|
26 |
+
public static function getMinutes() {
|
27 |
+
return ['00', '15', '30', '45', '59'];
|
28 |
+
}
|
29 |
+
}
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\JsonSchemas;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetJsonData;
|
10 |
+
use SEOPress\Models\JsonSchemaValue;
|
11 |
+
|
12 |
+
class ContactPoint extends JsonSchemaValue implements GetJsonData {
|
13 |
+
const NAME = 'contact-point';
|
14 |
+
|
15 |
+
protected function getName() {
|
16 |
+
return self::NAME;
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @since 4.5.0
|
21 |
+
*
|
22 |
+
* @param array $context
|
23 |
+
*
|
24 |
+
* @return string|array
|
25 |
+
*/
|
26 |
+
public function getJsonData($context = null) {
|
27 |
+
$data = $this->getArrayJson();
|
28 |
+
|
29 |
+
return apply_filters('seopress_get_json_data_contact_point', $data);
|
30 |
+
}
|
31 |
+
}
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\JsonSchemas;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetJsonData;
|
10 |
+
use SEOPress\Models\JsonSchemaValue;
|
11 |
+
|
12 |
+
class Organization extends JsonSchemaValue implements GetJsonData {
|
13 |
+
const NAME = 'organization';
|
14 |
+
|
15 |
+
protected function getName() {
|
16 |
+
return self::NAME;
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @since 4.5.0
|
21 |
+
*
|
22 |
+
* @param array $context
|
23 |
+
*
|
24 |
+
* @return array|string
|
25 |
+
*/
|
26 |
+
public function getJsonData($context = null) {
|
27 |
+
$data = $this->getArrayJson();
|
28 |
+
|
29 |
+
$type = seopress_get_service('SocialOption')->getSocialKnowledgeType();
|
30 |
+
if ('Organization' === $type) {
|
31 |
+
// Use "contactPoint"
|
32 |
+
$schema = seopress_get_service('JsonSchemaGenerator')->getJsonFromSchema(ContactPoint::NAME, [], ['remove_empty'=> true]);
|
33 |
+
if (count($schema) > 1) {
|
34 |
+
$data['contactPoint'][] = $schema;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
// Not Organization -> Like Is Person
|
39 |
+
else {
|
40 |
+
// Remove "logo"
|
41 |
+
if (array_key_exists('logo', $data)) {
|
42 |
+
unset($data['logo']);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
return apply_filters('seopress_get_json_data_organization', $data);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @since 4.5.0
|
51 |
+
*
|
52 |
+
* @param $data
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function cleanValues($data) {
|
57 |
+
if (isset($data['sameAs'])) {
|
58 |
+
$data['sameAs'] = array_values($data['sameAs']);
|
59 |
+
|
60 |
+
if (empty($data['sameAs'])) {
|
61 |
+
unset($data['sameAs']);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
return parent::cleanValues($data);
|
66 |
+
}
|
67 |
+
}
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Models;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
interface GetJsonData {
|
10 |
+
public function getJsonData($context = null);
|
11 |
+
}
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Models;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
interface GetJsonFromFile {
|
10 |
+
public function getJson();
|
11 |
+
|
12 |
+
public function getArrayJson();
|
13 |
+
}
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Models;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @abstract
|
11 |
+
*/
|
12 |
+
abstract class JsonSchemaValue implements GetJsonFromFile {
|
13 |
+
abstract protected function getName();
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @since 4.5.0
|
17 |
+
*
|
18 |
+
* @param string $file
|
19 |
+
* @param mixed $name
|
20 |
+
*
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function getJson() {
|
24 |
+
$file = apply_filters('seopress_get_json_from_file', sprintf('%s/%s.json', SEOPRESS_TEMPLATE_JSON_SCHEMAS, $this->getName(), '.json'));
|
25 |
+
|
26 |
+
if ( ! file_exists($file)) {
|
27 |
+
return '';
|
28 |
+
}
|
29 |
+
|
30 |
+
$json = file_get_contents($file);
|
31 |
+
|
32 |
+
return $json;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @since 4.5.0
|
37 |
+
*
|
38 |
+
* @param string
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getArrayJson() {
|
43 |
+
$json = $this->getJson();
|
44 |
+
try {
|
45 |
+
$data = json_decode($json, true);
|
46 |
+
|
47 |
+
return apply_filters('seopress_schema_get_array_json', $data, $this->getName());
|
48 |
+
} catch (\Exception $th) {
|
49 |
+
return [];
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @since 4.5.0
|
55 |
+
*
|
56 |
+
* @param array $data
|
57 |
+
*
|
58 |
+
* @return array|string
|
59 |
+
*/
|
60 |
+
public function renderJson($data) {
|
61 |
+
return json_encode($data);
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @since 4.5.0
|
66 |
+
*
|
67 |
+
* @param array $data
|
68 |
+
*
|
69 |
+
* @return array
|
70 |
+
*/
|
71 |
+
public function cleanValues($data) {
|
72 |
+
return apply_filters('seopress_schema_clean_values', $data, $this->getName());
|
73 |
+
}
|
74 |
+
}
|
@@ -167,12 +167,10 @@ class GetContent {
|
|
167 |
*/
|
168 |
protected function analyzeHeadings($analyzes, $data, $post) {
|
169 |
//H1
|
170 |
-
$desc =
|
171 |
-
if ( ! empty($data['h1']['matches'])) {
|
172 |
-
$desc .= '<h4>' . __('H1 (Heading 1)', 'wp-seopress') . '</h4>';
|
173 |
|
|
|
174 |
$count = $data['h1']['nomatches']['count'];
|
175 |
-
|
176 |
$target_kws_h1 = $data['h1']['matches'];
|
177 |
|
178 |
$all_h1 = $data['h1']['values'];
|
@@ -194,14 +192,23 @@ class GetContent {
|
|
194 |
$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>';
|
195 |
$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>';
|
196 |
$analyzes['headings']['impact'] = 'high';
|
197 |
-
}
|
198 |
|
199 |
-
|
200 |
-
$
|
201 |
-
|
202 |
-
$
|
|
|
|
|
|
|
203 |
}
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
}
|
207 |
|
@@ -784,6 +791,39 @@ class GetContent {
|
|
784 |
return $analyzes;
|
785 |
}
|
786 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
/**
|
788 |
* @param array $analyzes
|
789 |
* @param array $data
|
@@ -864,6 +904,9 @@ class GetContent {
|
|
864 |
//Outbound links
|
865 |
$analyzes = $this->analyzeOutboundLinks($analyzes, $data, $post);
|
866 |
|
|
|
|
|
|
|
867 |
$analyzes = $this->analyzeCanonical($analyzes, $data, $post);
|
868 |
|
869 |
return $analyzes;
|
167 |
*/
|
168 |
protected function analyzeHeadings($analyzes, $data, $post) {
|
169 |
//H1
|
170 |
+
$desc = '<h4>' . __('H1 (Heading 1)', 'wp-seopress') . '</h4>';
|
|
|
|
|
171 |
|
172 |
+
if ( ! empty($data['h1']['matches'])) {
|
173 |
$count = $data['h1']['nomatches']['count'];
|
|
|
174 |
$target_kws_h1 = $data['h1']['matches'];
|
175 |
|
176 |
$all_h1 = $data['h1']['values'];
|
192 |
$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>';
|
193 |
$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>';
|
194 |
$analyzes['headings']['impact'] = 'high';
|
|
|
195 |
|
196 |
+
|
197 |
+
if ( ! empty($all_h1)) {
|
198 |
+
$desc .= '<ul>';
|
199 |
+
foreach ($all_h1 as $h1) {
|
200 |
+
$desc .= '<li><span class="dashicons dashicons-minus"></span>' . $h1 . '</li>';
|
201 |
+
}
|
202 |
+
$desc .= '</ul>';
|
203 |
}
|
204 |
+
}
|
205 |
+
} elseif ( isset($data['h1']['nomatches']['count']) && $data['h1']['nomatches']['count'] === 0 ) {
|
206 |
+
$desc .= '<p><span class="dashicons dashicons-no-alt"></span><strong>' . __('No Heading 1 (H1) found in your content. This is required for both SEO and Acessibility!', 'wp-seopress') . '</strong></p>';
|
207 |
+
$analyzes['headings']['impact'] = 'high';
|
208 |
+
} else {
|
209 |
+
$desc .= '<p><span class="dashicons dashicons-no-alt"></span>' . __('None of your target keywords were found in Heading 1 (H1).', 'wp-seopress') . '</p>';
|
210 |
+
if ('high' != $analyzes['headings']['impact']) {
|
211 |
+
$analyzes['headings']['impact'] = 'medium';
|
212 |
}
|
213 |
}
|
214 |
|
791 |
return $analyzes;
|
792 |
}
|
793 |
|
794 |
+
/**
|
795 |
+
* @param array $analyzes
|
796 |
+
* @param array $data
|
797 |
+
* @param WP_Post $post
|
798 |
+
*
|
799 |
+
* @return array
|
800 |
+
*/
|
801 |
+
protected function analyzeInboundLinks($analyzes, $data, $post) {
|
802 |
+
$desc = '<p>' . __('Internal linking is important for SEO and user experience. Always try to link your content together, with quality link anchors.') . '</p>';
|
803 |
+
if ( ! empty($data['inbound_links']['count'])) {
|
804 |
+
$count = $data['inbound_links']['count'];
|
805 |
+
|
806 |
+
$desc .= '<p>' . sprintf(__('We found %s inbound links to this page.', 'wp-seopress'), $count) . '</p>';
|
807 |
+
|
808 |
+
if ( ! empty($data['inbound_links']['links'])) {
|
809 |
+
$desc .= '<ul>';
|
810 |
+
foreach ($data['inbound_links']['links'] as $id => $permalink) {
|
811 |
+
foreach ($permalink as $href => $link) {
|
812 |
+
$desc .= '<li><span class="dashicons dashicons-minus"></span><a href="' . $href . '" target="_blank">' . $link . '</a>
|
813 |
+
<a class="nounderline" href="' . get_edit_post_link($id) . '" title="' . sprintf(__('edit %s', 'wp-seopress'), esc_html(get_the_title($id))) . '"><span class="dashicons dashicons-edit-large"></span></a></li>';
|
814 |
+
}
|
815 |
+
}
|
816 |
+
$desc .= '</ul>';
|
817 |
+
}
|
818 |
+
} else {
|
819 |
+
$analyzes['inbound_links']['impact'] = 'medium';
|
820 |
+
$desc .= '<p><span class="dashicons dashicons-no-alt"></span>' . __('This page doesn\'t have any inbound links from other content. Links from archive pages are not considered inbound links due to lack of context.', 'wp-seopress') . '</p>';
|
821 |
+
}
|
822 |
+
$analyzes['inbound_links']['desc'] = $desc;
|
823 |
+
|
824 |
+
return $analyzes;
|
825 |
+
}
|
826 |
+
|
827 |
/**
|
828 |
* @param array $analyzes
|
829 |
* @param array $data
|
904 |
//Outbound links
|
905 |
$analyzes = $this->analyzeOutboundLinks($analyzes, $data, $post);
|
906 |
|
907 |
+
//Inbound links
|
908 |
+
$analyzes = $this->analyzeInboundLinks($analyzes, $data, $post);
|
909 |
+
|
910 |
$analyzes = $this->analyzeCanonical($analyzes, $data, $post);
|
911 |
|
912 |
return $analyzes;
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Services;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Compose\UseJsonSchema;
|
10 |
+
|
11 |
+
class JsonSchemaGenerator {
|
12 |
+
use UseJsonSchema;
|
13 |
+
|
14 |
+
public function __construct() {
|
15 |
+
$this->tagsToString = seopress_get_service('TagsToString');
|
16 |
+
$this->variablesToString = seopress_get_service('VariablesToString');
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @since 4.5.0
|
21 |
+
*
|
22 |
+
* @param string $schema
|
23 |
+
* @param array $context
|
24 |
+
* @param array $options
|
25 |
+
*
|
26 |
+
* @return array
|
27 |
+
*/
|
28 |
+
public function getJsonFromSchema($schema, $context= [], $options = []) {
|
29 |
+
$classJsonSchema = $this->getSchemaClass($schema);
|
30 |
+
$jsonData = $classJsonSchema->getJsonData($context);
|
31 |
+
|
32 |
+
$jsonData = $this->tagsToString->replaceDataToString($jsonData, $context, $options);
|
33 |
+
|
34 |
+
if (isset($context['variables'])) {
|
35 |
+
$jsonData = $this->variablesToString->replaceDataToString($jsonData, $context['variables'], $options);
|
36 |
+
}
|
37 |
+
|
38 |
+
if ( ! empty($jsonData)) {
|
39 |
+
$jsonData = $classJsonSchema->cleanValues($jsonData);
|
40 |
+
}
|
41 |
+
|
42 |
+
return $jsonData;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @since 4.5.0
|
47 |
+
*
|
48 |
+
* @param array $data
|
49 |
+
* @param array $context
|
50 |
+
*/
|
51 |
+
public function getJsons($data, $context = []) {
|
52 |
+
$jsonsAvailable = $this->getSchemasAvailable();
|
53 |
+
|
54 |
+
if ( ! is_array($data)) {
|
55 |
+
return [];
|
56 |
+
}
|
57 |
+
|
58 |
+
foreach ($data as $key => $schema) {
|
59 |
+
$data[$key] = $this->getJsonFromSchema($schema, $context, ['remove_empty'=> true]);
|
60 |
+
}
|
61 |
+
|
62 |
+
return apply_filters('seopress_json_schema_generator_get_jsons', $data);
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @since 4.5.0
|
67 |
+
*
|
68 |
+
* @param array $data
|
69 |
+
* @param array $context
|
70 |
+
*/
|
71 |
+
public function getJsonsEncoded($data, $context = []) {
|
72 |
+
if ( ! is_array($data)) {
|
73 |
+
return [];
|
74 |
+
}
|
75 |
+
|
76 |
+
$data = $this->getJsons($data, $context);
|
77 |
+
|
78 |
+
foreach ($data as $key => $value) {
|
79 |
+
$data[$key] = json_encode($data[$key]);
|
80 |
+
}
|
81 |
+
|
82 |
+
return apply_filters('seopress_json_schema_generator_get_jsons_encoded', $data);
|
83 |
+
}
|
84 |
+
}
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Services\Options;
|
4 |
+
|
5 |
+
defined('ABSPATH') or exit('Cheatin’ uh?');
|
6 |
+
|
7 |
+
use SEOPress\Constants\Options;
|
8 |
+
|
9 |
+
class SocialOption {
|
10 |
+
/**
|
11 |
+
* @since 4.5.0
|
12 |
+
*
|
13 |
+
* @return array
|
14 |
+
*/
|
15 |
+
public function getOption() {
|
16 |
+
return get_option(Options::KEY_OPTION_SOCIAL);
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @since 4.5.0
|
21 |
+
*
|
22 |
+
* @param string $key
|
23 |
+
*
|
24 |
+
* @return mixed
|
25 |
+
*/
|
26 |
+
public function searchOptionByKey($key) {
|
27 |
+
$data = $this->getOption();
|
28 |
+
|
29 |
+
if (empty($data)) {
|
30 |
+
return null;
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( ! isset($data[$key])) {
|
34 |
+
return null;
|
35 |
+
}
|
36 |
+
|
37 |
+
return $data[$key];
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @since 4.5.0
|
42 |
+
*
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public function getSocialKnowledgeType() {
|
46 |
+
return $this->searchOptionByKey('seopress_social_knowledge_type');
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @since 4.5.0
|
51 |
+
*
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function getSocialKnowledgeName() {
|
55 |
+
return $this->searchOptionByKey('seopress_social_knowledge_name');
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @since 4.5.0
|
60 |
+
*
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
public function getSocialAccountsFacebook() {
|
64 |
+
return $this->searchOptionByKey('seopress_social_accounts_facebook');
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @since 4.5.0
|
69 |
+
*
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
public function getSocialAccountsTwitter() {
|
73 |
+
return $this->searchOptionByKey('seopress_social_accounts_twitter');
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @since 4.5.0
|
78 |
+
*
|
79 |
+
* @return string
|
80 |
+
*/
|
81 |
+
public function getSocialAccountsPinterest() {
|
82 |
+
return $this->searchOptionByKey('seopress_social_accounts_pinterest');
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @since 4.5.0
|
87 |
+
*
|
88 |
+
* @return string
|
89 |
+
*/
|
90 |
+
public function getSocialAccountsInstagram() {
|
91 |
+
return $this->searchOptionByKey('seopress_social_accounts_instagram');
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @since 4.5.0
|
96 |
+
*
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function getSocialAccountsYoutube() {
|
100 |
+
return $this->searchOptionByKey('seopress_social_accounts_youtube');
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @since 4.5.0
|
105 |
+
*
|
106 |
+
* @return string
|
107 |
+
*/
|
108 |
+
public function getSocialAccountsLinkedin() {
|
109 |
+
return $this->searchOptionByKey('seopress_social_accounts_linkedin');
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @since 4.5.0
|
114 |
+
*
|
115 |
+
* @return string
|
116 |
+
*/
|
117 |
+
public function getSocialKnowledgeImage() {
|
118 |
+
return $this->searchOptionByKey('seopress_social_knowledge_img');
|
119 |
+
}
|
120 |
+
}
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Services\Options;
|
4 |
+
|
5 |
+
defined('ABSPATH') or exit('Cheatin’ uh?');
|
6 |
+
|
7 |
+
use SEOPress\Constants\Options;
|
8 |
+
|
9 |
+
class ToggleOption {
|
10 |
+
/**
|
11 |
+
* @since 4.3.0
|
12 |
+
*
|
13 |
+
* @return array
|
14 |
+
*/
|
15 |
+
public function getOption() {
|
16 |
+
return get_option(Options::KEY_TOGGLE_OPTION);
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @since 4.3.0
|
21 |
+
*
|
22 |
+
* @param string $key
|
23 |
+
*
|
24 |
+
* @return mixed
|
25 |
+
*/
|
26 |
+
public function searchOptionByKey($key) {
|
27 |
+
$data = $this->getOption();
|
28 |
+
|
29 |
+
if (empty($data)) {
|
30 |
+
return null;
|
31 |
+
}
|
32 |
+
|
33 |
+
$keyComposed = sprintf('toggle-%s', $key);
|
34 |
+
if ( ! isset($data[$keyComposed])) {
|
35 |
+
return null;
|
36 |
+
}
|
37 |
+
|
38 |
+
return $data[$keyComposed];
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @since 4.4.0
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function getToggleLocalBusiness() {
|
47 |
+
return $this->searchOptionByKey('local-business');
|
48 |
+
}
|
49 |
+
}
|
@@ -30,6 +30,10 @@ class TagsToString {
|
|
30 |
* @return array
|
31 |
*/
|
32 |
public function getTags($string) {
|
|
|
|
|
|
|
|
|
33 |
preg_match_all(self::REGEX, $string, $matches);
|
34 |
|
35 |
return $matches;
|
@@ -67,11 +71,46 @@ class TagsToString {
|
|
67 |
$tagsAvailable = $this->getTagsAvailable();
|
68 |
|
69 |
foreach ($tags[1] as $key => $tag) {
|
70 |
-
$value
|
71 |
-
|
72 |
$string = str_replace($tags[0][$key], $value, $string);
|
73 |
}
|
74 |
|
75 |
return $string;
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
30 |
* @return array
|
31 |
*/
|
32 |
public function getTags($string) {
|
33 |
+
if ( ! is_string($string)) {
|
34 |
+
return [];
|
35 |
+
}
|
36 |
+
|
37 |
preg_match_all(self::REGEX, $string, $matches);
|
38 |
|
39 |
return $matches;
|
71 |
$tagsAvailable = $this->getTagsAvailable();
|
72 |
|
73 |
foreach ($tags[1] as $key => $tag) {
|
74 |
+
$value = $this->getValueFromTag($tag, $context);
|
|
|
75 |
$string = str_replace($tags[0][$key], $value, $string);
|
76 |
}
|
77 |
|
78 |
return $string;
|
79 |
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* @since 4.5.0
|
83 |
+
*
|
84 |
+
* @param array $data
|
85 |
+
*
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
protected function removeDataEmpty($data) {
|
89 |
+
return array_filter($data);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @since 4.5.0
|
94 |
+
*
|
95 |
+
* @param array $data
|
96 |
+
* @param array $context
|
97 |
+
* @param mixed $options
|
98 |
+
*
|
99 |
+
* @return array
|
100 |
+
*/
|
101 |
+
public function replaceDataToString($data, $context = [], $options = []) {
|
102 |
+
foreach ($data as $key => $value) {
|
103 |
+
if (is_array($value)) {
|
104 |
+
$data[$key] = $this->replaceDataToString($value, $context, $options);
|
105 |
+
} else {
|
106 |
+
$data[$key] = $this->replace($value, $context);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
if (isset($options['remove_empty']) && $options['remove_empty']) {
|
111 |
+
$data = $this->removeDataEmpty($data);
|
112 |
+
}
|
113 |
+
|
114 |
+
return $data;
|
115 |
+
}
|
116 |
}
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Services;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
class VariablesToString {
|
10 |
+
const REGEX = "#\[\[(.*?)\]\]#";
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @since 4.5.0
|
14 |
+
*
|
15 |
+
* @param string $string
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public function getVariables($string) {
|
20 |
+
if ( ! is_string($string)) {
|
21 |
+
return [];
|
22 |
+
}
|
23 |
+
|
24 |
+
preg_match_all(self::REGEX, $string, $matches);
|
25 |
+
|
26 |
+
return $matches;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @since 4.5.0
|
31 |
+
*
|
32 |
+
* @param function $variable
|
33 |
+
* @param array $context
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function getValueFromContext($variable, $context= []) {
|
38 |
+
if ( ! array_key_exists($variable, $context)) {
|
39 |
+
return '';
|
40 |
+
}
|
41 |
+
|
42 |
+
return $context[$variable];
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @since 4.5.0
|
47 |
+
*
|
48 |
+
* @param string $string
|
49 |
+
* @param mixed $context
|
50 |
+
*
|
51 |
+
* @return string
|
52 |
+
*/
|
53 |
+
public function replace($string, $context = []) {
|
54 |
+
$variables = $this->getVariables($string);
|
55 |
+
|
56 |
+
if ( ! array_key_exists(1, $variables)) {
|
57 |
+
return $string;
|
58 |
+
}
|
59 |
+
|
60 |
+
foreach ($variables[1] as $key => $variable) {
|
61 |
+
$value = $this->getValueFromContext($variable, $context);
|
62 |
+
$string = str_replace($variables[0][$key], $value, $string);
|
63 |
+
}
|
64 |
+
|
65 |
+
return $string;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @since 4.5.0
|
70 |
+
*
|
71 |
+
* @param array $data
|
72 |
+
*
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
protected function removeDataEmpty($data) {
|
76 |
+
return array_filter($data);
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* @since 4.5.0
|
81 |
+
*
|
82 |
+
* @param array $data
|
83 |
+
* @param array $context
|
84 |
+
* @param mixed $options
|
85 |
+
*
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
public function replaceDataToString($data, $context = [], $options = []) {
|
89 |
+
foreach ($data as $key => $value) {
|
90 |
+
if (is_array($value)) {
|
91 |
+
$data[$key] = $this->replaceDataToString($value, $context, $options);
|
92 |
+
} else {
|
93 |
+
$data[$key] = $this->replace($value, $context);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
if (isset($options['remove_empty']) && $options['remove_empty']) {
|
98 |
+
$data = $this->removeDataEmpty($data);
|
99 |
+
}
|
100 |
+
|
101 |
+
return $data;
|
102 |
+
}
|
103 |
+
}
|
@@ -26,7 +26,11 @@ class PostContent implements GetTagValue {
|
|
26 |
return $value;
|
27 |
}
|
28 |
|
29 |
-
if ( !
|
|
|
|
|
|
|
|
|
30 |
if (has_excerpt($context['post']->ID)) {
|
31 |
$value = get_post_field('post_content', $context['post']->ID);
|
32 |
}
|
26 |
return $value;
|
27 |
}
|
28 |
|
29 |
+
if ( ! isset($context['post'])) {
|
30 |
+
return $value;
|
31 |
+
}
|
32 |
+
|
33 |
+
if (isset($context['is_404']) && ! $context['is_404'] && ! empty($context['post'])) {
|
34 |
if (has_excerpt($context['post']->ID)) {
|
35 |
$value = get_post_field('post_content', $context['post']->ID);
|
36 |
}
|
@@ -20,7 +20,7 @@ class PostTitle implements GetTagValue {
|
|
20 |
}
|
21 |
|
22 |
if (
|
23 |
-
($context['is_home'] || $context['is_single'])
|
24 |
&& isset($context['post']) && $context['post']) {
|
25 |
$value = esc_attr(strip_tags(get_post_field('post_title', $context['post']->ID)));
|
26 |
}
|
20 |
}
|
21 |
|
22 |
if (
|
23 |
+
(isset($context['is_home']) || isset($context['is_single']))
|
24 |
&& isset($context['post']) && $context['post']) {
|
25 |
$value = esc_attr(strip_tags(get_post_field('post_title', $context['post']->ID)));
|
26 |
}
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class KnowledgeType implements GetTagValue {
|
12 |
+
const NAME = 'knowledge_type';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialKnowledgeType();
|
25 |
+
|
26 |
+
if (empty($value)) {
|
27 |
+
$value = 'Organization';
|
28 |
+
}
|
29 |
+
|
30 |
+
return apply_filters('seopress_get_tag_schema_knowledge_type', $value, $context);
|
31 |
+
}
|
32 |
+
}
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class SiteUrl implements GetTagValue {
|
12 |
+
const NAME = 'siteurl';
|
13 |
+
|
14 |
+
public function getValue($args = null) {
|
15 |
+
return site_url();
|
16 |
+
}
|
17 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema\SocialAccount;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class Facebook implements GetTagValue {
|
12 |
+
const NAME = 'social_account_facebook';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialAccountsFacebook();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_account_facebook', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema\SocialAccount;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class Instagram implements GetTagValue {
|
12 |
+
const NAME = 'social_account_instagram';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialAccountsInstagram();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_account_instagram', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema\SocialAccount;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class Linkedin implements GetTagValue {
|
12 |
+
const NAME = 'social_account_linkedin';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialAccountsLinkedin();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_account_linkedin', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema\SocialAccount;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class Pinterest implements GetTagValue {
|
12 |
+
const NAME = 'social_account_pinterest';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialAccountsPinterest();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_account_pinterest', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema\SocialAccount;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class Twitter implements GetTagValue {
|
12 |
+
const NAME = 'social_account_twitter';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialAccountsTwitter();
|
25 |
+
if ( ! empty($value)) {
|
26 |
+
$value = sprintf('https://twitter.com/%s', $value);
|
27 |
+
}
|
28 |
+
|
29 |
+
return apply_filters('seopress_get_tag_schema_social_account_twitter', $value, $context);
|
30 |
+
}
|
31 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema\SocialAccount;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class Youtube implements GetTagValue {
|
12 |
+
const NAME = 'social_account_youtube';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialAccountsYoutube();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_account_youtube', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class SocialKnowledgeContactOption implements GetTagValue {
|
12 |
+
const NAME = 'social_knowledge_contact_option';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_social_knowledge_contact_option_option();
|
25 |
+
if ('None' === $value) {
|
26 |
+
$value = '';
|
27 |
+
}
|
28 |
+
|
29 |
+
return apply_filters('seopress_get_tag_schema_social_knowledge_contact_option', $value, $context);
|
30 |
+
}
|
31 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class SocialKnowledgeContactType implements GetTagValue {
|
12 |
+
const NAME = 'social_knowledge_contact_type';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_social_knowledge_contact_type_option();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_knowledge_contact_type', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class SocialKnowledgeImage implements GetTagValue {
|
12 |
+
const NAME = 'social_knowledge_image';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialKnowledgeImage();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_knowledge_image', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class SocialKnowledgeName implements GetTagValue {
|
12 |
+
const NAME = 'social_knowledge_name';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_get_service('SocialOption')->getSocialKnowledgeName();
|
25 |
+
$type = seopress_get_service('SocialOption')->getSocialKnowledgeType();
|
26 |
+
|
27 |
+
if (empty($value) && 'none' !== $type) {
|
28 |
+
$value = get_bloginfo('name');
|
29 |
+
}
|
30 |
+
|
31 |
+
return apply_filters('seopress_get_tag_schema_social_knowledge_name', $value, $context);
|
32 |
+
}
|
33 |
+
}
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SEOPress\Tags\Schema;
|
4 |
+
|
5 |
+
if ( ! defined('ABSPATH')) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
use SEOPress\Models\GetTagValue;
|
10 |
+
|
11 |
+
class SocialPhoneNumber implements GetTagValue {
|
12 |
+
const NAME = 'social_phone_number';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @since 4.5.0
|
16 |
+
*
|
17 |
+
* @param array $args
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function getValue($args = null) {
|
22 |
+
$context = isset($args[0]) ? $args[0] : null;
|
23 |
+
|
24 |
+
$value = seopress_social_knowledge_phone_number_option();
|
25 |
+
|
26 |
+
return apply_filters('seopress_get_tag_schema_social_phone_number', $value, $context);
|
27 |
+
}
|
28 |
+
}
|
@@ -48,7 +48,7 @@ class Tags {
|
|
48 |
'%name%' => 'post_author',
|
49 |
'%user_description%' => '',
|
50 |
'%id%' => '',
|
51 |
-
'%focuskw%' => '',
|
52 |
'%customfield(field-name)%' => '',
|
53 |
'%page%' => 'page',
|
54 |
'%pagenumber%' => 'current_pagination',
|
48 |
'%name%' => 'post_author',
|
49 |
'%user_description%' => '',
|
50 |
'%id%' => '',
|
51 |
+
'%focuskw%' => 'target_keyword',
|
52 |
'%customfield(field-name)%' => '',
|
53 |
'%page%' => 'page',
|
54 |
'%pagenumber%' => 'current_pagination',
|
@@ -60,7 +60,6 @@ class WooCommerceAnalyticsService {
|
|
60 |
catch(e){}
|
61 |
}
|
62 |
else{
|
63 |
-
console.log('named item')
|
64 |
id = namedItem.value
|
65 |
}
|
66 |
|
@@ -108,6 +107,23 @@ class WooCommerceAnalyticsService {
|
|
108 |
}
|
109 |
|
110 |
const quantity = document.querySelector('input.qty').value || '1';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
gtag('event', 'add_to_cart', {
|
113 |
'items': [ {
|
@@ -115,12 +131,11 @@ class WooCommerceAnalyticsService {
|
|
115 |
'name': '" . esc_js($product->get_title()) . "',
|
116 |
'list_name': '" . esc_js(get_the_title()) . "',
|
117 |
'quantity': quantity,
|
118 |
-
'price':
|
119 |
'category': " . json_encode($items_purchased_category) . '
|
120 |
}]
|
121 |
});
|
122 |
})
|
123 |
-
|
124 |
});
|
125 |
</script>
|
126 |
';
|
60 |
catch(e){}
|
61 |
}
|
62 |
else{
|
|
|
63 |
id = namedItem.value
|
64 |
}
|
65 |
|
107 |
}
|
108 |
|
109 |
const quantity = document.querySelector('input.qty').value || '1';
|
110 |
+
const formProductVariation = document.querySelector('form[data-product_variations]')
|
111 |
+
const variationItem = document.querySelector('.variation_id')
|
112 |
+
|
113 |
+
let price = " . (float) esc_js($product->get_price()) . "
|
114 |
+
if(formProductVariation && variationItem){
|
115 |
+
try{
|
116 |
+
const variations = JSON.parse(formProductVariation.dataset.product_variations)
|
117 |
+
const variationId = variationItem.value
|
118 |
+
for(const variation of variations){
|
119 |
+
if(variation.variation_id == Number(variationId)){
|
120 |
+
price = variation.display_price
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
catch{
|
125 |
+
}
|
126 |
+
}
|
127 |
|
128 |
gtag('event', 'add_to_cart', {
|
129 |
'items': [ {
|
131 |
'name': '" . esc_js($product->get_title()) . "',
|
132 |
'list_name': '" . esc_js(get_the_title()) . "',
|
133 |
'quantity': quantity,
|
134 |
+
'price': price,
|
135 |
'category': " . json_encode($items_purchased_category) . '
|
136 |
}]
|
137 |
});
|
138 |
})
|
|
|
139 |
});
|
140 |
</script>
|
141 |
';
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"@type": "ContactPoint",
|
3 |
+
"telephone": "%%social_phone_number%%",
|
4 |
+
"contactOption": "%%social_knowledge_contact_option%%",
|
5 |
+
"contactType": "%%social_knowledge_contact_type%%"
|
6 |
+
}
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"@context": "https://schema.org",
|
3 |
+
"@type": "%%knowledge_type%%",
|
4 |
+
"name": "%%social_knowledge_name%%",
|
5 |
+
"url": "%%siteurl%%",
|
6 |
+
"logo": "%%social_knowledge_image%%",
|
7 |
+
"sameAs": [
|
8 |
+
"%%social_account_facebook%%",
|
9 |
+
"%%social_account_twitter%%",
|
10 |
+
"%%social_account_pinterest%%",
|
11 |
+
"%%social_account_instagram%%",
|
12 |
+
"%%social_account_youtube%%",
|
13 |
+
"%%social_account_linkedin%%"
|
14 |
+
]
|
15 |
+
}
|
@@ -49,6 +49,9 @@ if (true == get_post_type_archive_link($path) && 0 == $offset) {
|
|
49 |
'images' => [],
|
50 |
];
|
51 |
$sitemap_url = sprintf("<url>\n<loc>%s</loc>\n</url>", htmlspecialchars(urldecode(get_post_type_archive_link($path))));
|
|
|
|
|
|
|
52 |
echo apply_filters('seopress_sitemaps_url', $sitemap_url, $seopress_url);
|
53 |
}
|
54 |
}
|
@@ -61,23 +64,27 @@ $args = [
|
|
61 |
'post_type' => $path,
|
62 |
'post_status' => 'publish',
|
63 |
'meta_query' => [
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
],
|
76 |
'fields' => 'ids',
|
77 |
'lang' => '',
|
78 |
'has_password' => false,
|
79 |
];
|
80 |
|
|
|
|
|
|
|
|
|
81 |
$args = apply_filters('seopress_sitemaps_single_query', $args, $path);
|
82 |
|
83 |
$postslist = get_posts($args);
|
49 |
'images' => [],
|
50 |
];
|
51 |
$sitemap_url = sprintf("<url>\n<loc>%s</loc>\n</url>", htmlspecialchars(urldecode(get_post_type_archive_link($path))));
|
52 |
+
|
53 |
+
$sitemap_url = apply_filters('seopress_sitemaps_no_archive_link', $sitemap_url, $path);
|
54 |
+
|
55 |
echo apply_filters('seopress_sitemaps_url', $sitemap_url, $seopress_url);
|
56 |
}
|
57 |
}
|
64 |
'post_type' => $path,
|
65 |
'post_status' => 'publish',
|
66 |
'meta_query' => [
|
67 |
+
'relation' => 'OR',
|
68 |
+
[
|
69 |
+
'key' => '_seopress_robots_index',
|
70 |
+
'value' => '',
|
71 |
+
'compare' => 'NOT EXISTS',
|
72 |
+
],
|
73 |
+
[
|
74 |
+
'key' => '_seopress_robots_index',
|
75 |
+
'value' => 'yes',
|
76 |
+
'compare' => '!=',
|
77 |
+
],
|
78 |
],
|
79 |
'fields' => 'ids',
|
80 |
'lang' => '',
|
81 |
'has_password' => false,
|
82 |
];
|
83 |
|
84 |
+
if ($path ==='attachment') {
|
85 |
+
unset($args['post_status']);
|
86 |
+
}
|
87 |
+
|
88 |
$args = apply_filters('seopress_sitemaps_single_query', $args, $path);
|
89 |
|
90 |
$postslist = get_posts($args);
|
@@ -24,24 +24,24 @@ class InstalledVersions
|
|
24 |
private static $installed = array (
|
25 |
'root' =>
|
26 |
array (
|
27 |
-
'pretty_version' => '4.
|
28 |
-
'version' => '4.
|
29 |
'aliases' =>
|
30 |
array (
|
31 |
),
|
32 |
-
'reference' => '
|
33 |
'name' => 'wp-seopress/wp-seopress',
|
34 |
),
|
35 |
'versions' =>
|
36 |
array (
|
37 |
'wp-seopress/wp-seopress' =>
|
38 |
array (
|
39 |
-
'pretty_version' => '4.
|
40 |
-
'version' => '4.
|
41 |
'aliases' =>
|
42 |
array (
|
43 |
),
|
44 |
-
'reference' => '
|
45 |
),
|
46 |
),
|
47 |
);
|
24 |
private static $installed = array (
|
25 |
'root' =>
|
26 |
array (
|
27 |
+
'pretty_version' => '4.5.x-dev',
|
28 |
+
'version' => '4.5.9999999.9999999-dev',
|
29 |
'aliases' =>
|
30 |
array (
|
31 |
),
|
32 |
+
'reference' => '2e4eedd07715fa5074eddc61854f37f2a731e84a',
|
33 |
'name' => 'wp-seopress/wp-seopress',
|
34 |
),
|
35 |
'versions' =>
|
36 |
array (
|
37 |
'wp-seopress/wp-seopress' =>
|
38 |
array (
|
39 |
+
'pretty_version' => '4.5.x-dev',
|
40 |
+
'version' => '4.5.9999999.9999999-dev',
|
41 |
'aliases' =>
|
42 |
array (
|
43 |
),
|
44 |
+
'reference' => '2e4eedd07715fa5074eddc61854f37f2a731e84a',
|
45 |
),
|
46 |
),
|
47 |
);
|
@@ -1,24 +1,24 @@
|
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
-
'pretty_version' => '4.
|
5 |
-
'version' => '4.
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'wp-seopress/wp-seopress',
|
11 |
),
|
12 |
'versions' =>
|
13 |
array (
|
14 |
'wp-seopress/wp-seopress' =>
|
15 |
array (
|
16 |
-
'pretty_version' => '4.
|
17 |
-
'version' => '4.
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
21 |
-
'reference' => '
|
22 |
),
|
23 |
),
|
24 |
);
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
+
'pretty_version' => '4.5.x-dev',
|
5 |
+
'version' => '4.5.9999999.9999999-dev',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '2e4eedd07715fa5074eddc61854f37f2a731e84a',
|
10 |
'name' => 'wp-seopress/wp-seopress',
|
11 |
),
|
12 |
'versions' =>
|
13 |
array (
|
14 |
'wp-seopress/wp-seopress' =>
|
15 |
array (
|
16 |
+
'pretty_version' => '4.5.x-dev',
|
17 |
+
'version' => '4.5.9999999.9999999-dev',
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
21 |
+
'reference' => '2e4eedd07715fa5074eddc61854f37f2a731e84a',
|
22 |
),
|
23 |
),
|
24 |
);
|