Version Description
[Aug 02, 2019] =
* Added diacritics into consideration while running the content analysis. Finally, all other language words can be analyzed!
* Improved the logic of honoring the Global Meta so, there are no mismatches between the settings of a single post vs general settings and also for the importers. Please review your Rank Math's settings properly if you happen to import. Here's a detailed guide
* Improved the searching in the redirections & 404 errors
* Improved SEO Analysis text further to make things clearer
* Updated the analysis's API URL to Rank Math's
* Fixed a bug with WordPress 4.x (to everyone still using WP 4.x, please update to the latest WP and use Classic Editor plugin alongside)
* Fixed an issue with the importing of the Redirections. Disabled redirections were getting imported as active. That should not be happening anymore.
* Fixed a bug where CSS & JS files were loading on the frontend even if the admin bar was disabled
* Fixed a compatibility issue with WooCommerce's category permalink flushing
* Fixed an issue with the Snippet Shortcode occurring with a Non-numeric value
* Fixed an issue with the redirections where QueryString with trailing slash /
was not working fine
* Fixed few typos in the description of the helping text
* Fixed an issue with the auto-update. It should be working fine now.
* Fixed a compatibility bug with WPML
Full changelog can be found here - Rank Math SEO changelog
Release Info
Developer | MyThemeShop |
Plugin | WordPress SEO Plugin – Rank Math |
Version | 1.0.31 |
Comparing to | |
See all releases |
Code changes from version 1.0.30.2 to 1.0.31
- assets/admin/css/metabox.css +1 -1
- assets/admin/js/assessor.js +0 -0
- assets/admin/js/common.js +1 -1
- assets/admin/js/dashboard.js +1 -1
- assets/admin/js/feedback.js +1 -1
- assets/admin/js/import-export.js +1 -1
- assets/admin/js/option-panel.js +1 -1
- assets/admin/js/post-list.js +1 -1
- assets/admin/js/post-metabox.js +0 -0
- assets/admin/js/term-metabox.js +0 -0
- assets/admin/js/user-metabox.js +0 -0
- assets/admin/js/validate.js +1 -1
- assets/admin/js/wizard.js +1 -1
- assets/admin/js/wplink.js +1 -1
- assets/front/js/rank-math.js +1 -1
- assets/{admin/js → vendor}/hooks.js +0 -0
- assets/vendor/lodash.js +25 -0
- assets/vendor/moment.js +1 -0
- includes/admin/class-admin-helper.php +4 -4
- includes/admin/class-admin.php +3 -3
- includes/admin/class-assets.php +2 -2
- includes/admin/class-deactivate-survey.php +1 -1
- includes/admin/class-metabox.php +5 -1
- includes/admin/class-options.php +2 -2
- includes/admin/class-post-columns.php +6 -6
- includes/admin/class-post-filters.php +2 -2
- includes/admin/class-registration.php +3 -3
- includes/admin/class-serp-checklist.php +1 -1
- includes/admin/class-serp-preview.php +1 -1
- includes/admin/class-setup-wizard.php +4 -4
- includes/admin/importers/abstract-importer.php +26 -26
- includes/admin/importers/class-aio-rich-snippet.php +4 -4
- includes/admin/importers/class-aioseo.php +67 -30
- includes/admin/importers/class-detector.php +7 -5
- includes/admin/importers/class-redirections.php +3 -2
- includes/admin/importers/class-seopress.php +50 -8
- includes/admin/importers/class-wp-schema-pro.php +4 -4
- includes/admin/importers/class-yoast.php +57 -26
- includes/admin/wizard/class-compatibility.php +5 -6
- includes/admin/wizard/views/compatibility.php +1 -1
- includes/class-common.php +6 -1
- includes/class-helper.php +1 -1
- includes/class-replace-vars.php +3 -3
- includes/cli/class-commands.php +2 -2
- includes/frontend/class-breadcrumbs.php +32 -32
- includes/frontend/class-frontend.php +10 -14
- includes/frontend/class-head.php +36 -34
- includes/frontend/class-remove-reply-to-com.php +9 -17
- includes/frontend/class-shortcodes.php +6 -6
- includes/frontend/paper/class-author.php +1 -1
- includes/frontend/paper/class-paper.php +29 -26
- includes/frontend/paper/class-singular.php +2 -2
- includes/frontend/paper/class-taxonomy.php +1 -1
- includes/helpers/class-api.php +5 -5
- includes/helpers/class-attachment.php +1 -1
- includes/helpers/class-choices.php +17 -7
- includes/helpers/class-conditional.php +10 -5
- includes/helpers/class-post-type.php +15 -12
- includes/helpers/class-taxonomy.php +15 -11
- includes/helpers/class-wordpress.php +2 -2
- includes/metaboxes/general.php +1 -2
- includes/metaboxes/social.php +5 -5
- includes/modules/404-monitor/class-db.php +4 -3
- includes/modules/404-monitor/class-monitor.php +5 -5
- includes/modules/404-monitor/class-table.php +1 -1
- includes/modules/404-monitor/views/main.php +6 -5
- includes/modules/links/class-contentprocessor.php +13 -14
- includes/modules/links/class-link.php +11 -11
- includes/modules/links/class-links.php +17 -20
- includes/modules/links/class-storage.php +22 -22
- includes/modules/local-seo/class-kml-file.php +11 -11
- includes/modules/local-seo/class-local-seo.php +30 -27
- includes/modules/redirections/class-admin.php +2 -2
- includes/modules/redirections/class-cache.php +10 -10
- includes/modules/redirections/class-db.php +17 -18
- includes/modules/redirections/class-export.php +15 -15
- includes/modules/redirections/class-form.php +3 -3
- includes/modules/redirections/class-metabox.php +2 -2
- includes/modules/redirections/class-redirection.php +13 -11
- includes/modules/redirections/class-redirections.php +3 -3
- includes/modules/redirections/class-redirector.php +41 -12
- includes/modules/redirections/class-table.php +2 -2
- includes/modules/redirections/class-watcher.php +8 -8
- includes/modules/redirections/views/main.php +9 -4
- includes/modules/rich-snippet/class-snippet-shortcode.php +1 -1
- includes/modules/rich-snippet/snippets/class-article.php +2 -2
- includes/modules/rich-snippet/snippets/class-author.php +3 -3
- includes/modules/rich-snippet/snippets/class-blog.php +3 -3
- includes/modules/rich-snippet/snippets/class-book.php +2 -2
- includes/modules/rich-snippet/snippets/class-breadcrumbs.php +2 -2
- includes/modules/rich-snippet/snippets/class-collection-page.php +4 -4
- includes/modules/rich-snippet/snippets/class-course.php +2 -2
- includes/modules/rich-snippet/snippets/class-event.php +2 -2
- includes/modules/rich-snippet/snippets/class-jobposting.php +1 -1
- includes/modules/rich-snippet/snippets/class-local.php +1 -1
- includes/modules/rich-snippet/snippets/class-music.php +1 -1
- includes/modules/rich-snippet/snippets/class-person.php +2 -2
- includes/modules/rich-snippet/snippets/class-product-edd.php +4 -4
- includes/modules/rich-snippet/snippets/class-product-woocommerce.php +3 -3
- includes/modules/rich-snippet/snippets/class-product.php +3 -3
- includes/modules/rich-snippet/snippets/class-products-page.php +5 -5
- includes/modules/rich-snippet/snippets/class-recipe.php +11 -11
- includes/modules/rich-snippet/snippets/class-restaurant.php +2 -2
- includes/modules/rich-snippet/snippets/class-review.php +3 -3
- includes/modules/rich-snippet/snippets/class-search-results.php +3 -3
- includes/modules/rich-snippet/snippets/class-service.php +2 -2
- includes/modules/rich-snippet/snippets/class-singular.php +4 -4
- includes/modules/rich-snippet/snippets/class-software.php +2 -2
- includes/modules/rich-snippet/snippets/class-video.php +2 -2
- includes/modules/rich-snippet/snippets/class-website.php +6 -6
- includes/modules/search-console/class-search-console.php +11 -0
- includes/modules/seo-analysis/class-seo-analyzer.php +29 -4
- includes/modules/sitemap/providers/class-taxonomy.php +1 -0
- includes/modules/woocommerce/class-woocommerce.php +3 -0
- includes/modules/woocommerce/views/options-general.php +1 -1
- includes/settings/titles/social.php +7 -7
- includes/template-tags.php +3 -3
- languages/rank-math.pot +26 -5
- rank-math.php +2 -2
- readme.txt +18 -9
- wpml-config.xml +3 -8
@@ -2,4 +2,4 @@
|
|
2 |
* Plugin: Rank Math
|
3 |
* URL: https://rankmath.com/wordpress/plugin/seo-suite/
|
4 |
* Name: metabox.css
|
5 |
-
*/#rank_math_metabox .inside{margin:0;padding:0}.rank-math-metabox-frame{position:relative;min-width:255px;max-width:1000px;margin-bottom:25px;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,0.04)}.rank-math-metabox-frame-title{font-size:14px;line-height:1.4;margin:0;padding:8px 12px;border-bottom:1px solid #e5e5e5}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation){padding:30px 20px 0;border-bottom:1px solid #e5e5e5;background:#fafafa}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a{font-size:14px;font-weight:600;position:relative;float:left;box-sizing:border-box;margin-left:7px;padding:8px 16px 4px 12px;white-space:nowrap;text-decoration:none;color:#555;border:1px solid #e6e6e6;border-bottom:0;outline:none;background:#f5f5f5;box-shadow:none}@media (max-width: 768px){.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a{margin-left:-1px;padding:8px 12px 4px 8px}}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a[href="#setting-panel-askreview"]{padding-right:12px;float:right;color:#e93f30}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .dashicons,.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .fa{font-size:14px;line-height:inherit;min-width:20px;text-align:center}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a.active{bottom:-1px;margin-top:-1px;padding-bottom:5px;color:#069de3;border-top-color:#069de3;background:#fff}.rank-math-metabox-wrap .social-tabs-navigation{display:inline-block;border-radius:3px;box-shadow:0 1px 6px 0 rgba(35,40,45,0.18)}.rank-math-metabox-wrap .social-tabs-navigation-wrapper{padding-bottom:30px;text-align:center}.rank-math-metabox-wrap .social-tabs-navigation a{font-size:16px;float:left;box-sizing:border-box;width:130px;padding:11px;text-decoration:none;color:#939393;border:1px solid #e5e5e5;outline:none;background:#efefef;box-shadow:none}.rank-math-metabox-wrap .social-tabs-navigation a .dashicons{margin-right:8px}.rank-math-metabox-wrap .social-tabs-navigation .tab-facebook{border-right:0;border-radius:3px 0 0 3px}.rank-math-metabox-wrap .social-tabs-navigation .tab-facebook.tab-active{color:#fff;border-color:#3b5998;background:#3b5998}.rank-math-metabox-wrap .social-tabs-navigation .tab-twitter{border-left:0;border-radius:0 3px 3px 0}.rank-math-metabox-wrap .social-tabs-navigation .tab-twitter.tab-active{color:#fff;border-color:#55acee;background:#55acee}.rank-math-metabox-wrap .rank-math-tab{display:none;padding:30px}.serp-preview .highlight{pointer-events:none}.serp-preview-title:before{font-size:13px;font-weight:600;display:inline-block;padding-bottom:6px;content:attr(data-title);letter-spacing:.05em;text-transform:uppercase}.serp-preview-wrapper{position:relative;transition:all .6s ease}.serp-preview-body{padding:15px 0;transition:width .5s ease, padding .5s ease, margin .5s ease}.serp-preview-body .serp-star-rating{display:inline-block;position:relative;color:#ccc;margin-right:5px}.serp-preview-body .serp-star-rating .dashicons{font-size:16px;width:16px;height:16px}.serp-preview-body .serp-star-rating .serp-result{position:absolute;top:0;left:0;height:22px;overflow:hidden;white-space:nowrap;color:#e7711b}.serp-preview-body .cmb-row .cmb-td{width:100%;max-width:680px}.serp-preview-body .cmb-row .cmb-td .cmb2_textarea{width:100% !important}.serp-preview-footer{padding:15px 0}.serp-preview-footer .button.button-secondary{line-height:41px;padding:0 12px}.serp-preview-footer .button.button-secondary .dashicons{font-size:20px;line-height:41px}.serp-preview-bg{overflow:hidden;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:opacity .5s ease, height .5s ease;opacity:0;background-color:#fafafa;height:0;width:100%}.serp-preview-bg .serp-preview-input{position:relative;max-width:600px;pointer-events:none}.serp-preview-bg .serp-preview-input input{font:16px arial,sans-serif;padding:5px 9px 5px 16px;transition:box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);vertical-align:top;color:#000;border:none;border-radius:2px;outline:none;background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,0.16),0 0 0 1px rgba(0,0,0,0.08);height:44px;width:100%}.serp-preview-bg .serp-preview-input .serp-mike{position:absolute;top:0;right:50px;bottom:0;display:inline-block;width:24px;padding:0 2px 0 8px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACrElEQVR42u2Xz2sTQRSAX8VSb1K8iNqKooJH2Ux6Ksn+iPQqxZMIehJB0do/IMhmQWsvHr2KSEGk0tSLIoWIYNUKij20F2/N7iaUZnYT0kYzzhMKs0HDJiTdLcwHDwKZSd63781LBiQSSW9JZdkhzfKm1Rz9mjZp/W9YdEU3vXv4HsQZ40FtNG36q5rls//Ej4tmbSS2T15Mvp3ExOPmEMQNbBtMMEyoljcFcQN7PqyAlqNfIG7gYQ0tYNIaxA1MrJPY3wImbUqBKAXSFv0tBSIVMOkvKRDtGKWN/T6FdqRAxFNoWwpEPIXqUqBT6ALU/UVgu8GW4GD3f6f9TRDYNJTDrk7YbtiqUumHwIYoUJuHERDAS0r4CvgFECgbY+cFAR7KT+g1POmCKFDNw6WggHc3fBtVb4CAoyauBgXIG+g1Xh5mRAGah6cggBd11fK/h7lOprIs0H6uRl6KAo5O7kOv4QmPiwJ4Jqqv4FiwCtXjvD2+tRmfK6kZ/ygI2HritK0rDVGgrClJ6DWMwYC/AGuCBMYcIC2V0CzvjmbRz3j3xUjn6CfeYreUJ2wQkGD75INPX1mFfsEFrrcIYCvdhC4paWQakxajpJMr0C9YFg54i7AsClRmh9/xnr0NHcInzZStk2aLwAcGMAD9pPIazvFKVDD5rdnhJeHLX5RTyRPQHpz5o66emMc9wdlPtvA8wF7Aq2BUHh1525qEo5JtR1WeOXpickO9cJIpyuD6xJmhYiZ5ytWSl3mlnuOaf+2zDaLDXmJrSgZ/MYVEugo+gSh+FkSBa4yd5Ul87DZ5XpFl/AyIEjzYjkau8WqshU2cr13HPbgX4gJOD97n465GZlyVvC9mSKloKI2iTnbwNT+gBX54H+IaXAtxJzE3ycSAFqSAFJACUkAikXD+AHj5/wx2o5osAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:right center;background-size:24px 24px}.serp-preview-bg .serp-preview-input .serp-search{line-height:46px;position:absolute;top:0;right:15px;bottom:0;height:46px;text-align:center;border:0;outline:0}.serp-preview-bg .serp-preview-input .serp-search svg{width:25px;height:46px;fill:#4285f4}.serp-preview-bg .serp-preview-menus{overflow:hidden;max-width:600px}.serp-preview-bg .serp-preview-menus ul{float:left;overflow:hidden;margin:0;padding:0;list-style:none}.serp-preview-bg .serp-preview-menus ul li{font-family:arial,sans-serif;font-size:13px;line-height:19px;float:left;height:15px;margin:0;padding:28px 16px 12px;color:#777}.serp-preview-bg .serp-preview-menus ul li.current{font-weight:bold;color:#1a73e8;border-bottom:3px solid #1a73e8}.serp-preview-bg .serp-preview-menus ul.menus-right{float:right}.serp-preview-bg .serp-preview-result-stats{font-family:arial,sans-serif;font-size:small;line-height:43px;margin:0 -20px;padding-right:20px;padding-left:20px;white-space:nowrap;text-overflow:ellipsis;color:#808080;background-color:#fff}.serp-preview-noindex{z-index:1;display:none;padding:15px 0;background:rgba(255,255,255,0.8);position:absolute;top:0;right:0;bottom:0;left:0}.serp-preview-noindex h3{font-weight:700;margin:0;letter-spacing:1px;text-transform:uppercase}.serp-preview-noindex p{font-size:14px;line-height:2;margin:5px 0;color:#000}.serp-preview .serp-description,.serp-preview .serp-title,.serp-preview .serp-url{font-family:arial, sans-serif;position:relative;z-index:1;display:block;overflow:hidden;width:100%;max-width:680px;margin:0;cursor:pointer}.serp-preview .serp-description:focus:before,.serp-preview .serp-description:hover:before,.serp-preview .serp-title:focus:before,.serp-preview .serp-title:hover:before,.serp-preview .serp-url:focus:before,.serp-preview .serp-url:hover:before{font-family:dashicons;z-index:-1;content:'\f464';text-align:right;background:#f0f1f3;position:absolute;top:0;right:0;bottom:0;left:0}.serp-preview .serp-description:empty:after,.serp-preview .serp-title:empty:after,.serp-preview .serp-url:empty:after{content:attr(data-empty-title)}.serp-preview .serp-title{font-size:18px;font-weight:normal;line-height:19px;white-space:nowrap;text-overflow:ellipsis;color:#1a0dab}.serp-preview .serp-url{font-size:14px;line-height:16px;margin:3px 0 5px;white-space:nowrap;text-overflow:ellipsis;color:#006621}.serp-preview .serp-description{font-size:13px;line-height:1.4;clear:left;word-wrap:break-word;color:#545454}.serp-preview .group{position:relative;min-height:10px}.serp-preview .group .cmb-row{display:none;padding:20px 0 !important;border:0}.serp-preview .group .serp-close{position:absolute;top:10px;right:10px;display:none;cursor:pointer}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active{margin-top:20px;padding:30px 20px 20px;background:#f6f6f6}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .cmb-row{display:block}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .cmb-row.cmb2-id-rank-math-title .rank-math-variables-button{right:0}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .cmb-row.cmb2-id-rank-math-description .rank-math-variables-dropdown{top:60px}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .serp-close{display:block}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active+.group,.serp-preview:not(.expanded-preview):not(.mobile-preview) .group+.group.active{margin-top:20px}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active+.group+.serp-rating,.serp-preview:not(.expanded-preview):not(.mobile-preview) .group+.group.active+.serp-rating{display:none}.serp-preview .button{height:auto;padding:0 5px;outline:0}.serp-preview .button,.serp-preview .button .dashicons{font-size:15px;line-height:30px;height:auto}.serp-preview .button-secondary{margin-bottom:0;color:#818181;border-color:#e5e5e5;background:#fff !important;box-shadow:0 1px 2px 0 #e5e5e5 !important}.serp-preview .button-secondary.active,.serp-preview .button-secondary.active:hover{color:#fff;border-color:#0392d4;background:#069de3 !important}.serp-preview .button-secondary:hover{color:#069de3;border-color:#0392d4}.serp-preview-title .alignright{margin-top:-9px}.serp-preview.desktop-preview .serp-snippet-mobile{display:none}.serp-preview.desktop-preview .serp-snippet-data{color:#808080;line-height:18px;font-size:small;font-weight:normal;margin-bottom:3px}.serp-preview.desktop-preview .serp-snippet-data .serp-desktop-rating{float:left;margin-top:1px}.serp-preview.desktop-preview .serp-snippet-data .separator:first-child{display:none}.serp-preview.desktop-preview .serp-snippet-data .serp-event_name{color:#1a0dab;cursor:pointer}.serp-preview.desktop-preview .serp-snippet-data .serp-event_name:hover{text-decoration:underline}.serp-preview.desktop-preview .serp-snippet-data .serp-event_name,.serp-preview.desktop-preview .serp-snippet-data .serp-event_place{padding-left:15px}.serp-preview.desktop-preview .serp-preview-footer .alignright .dashicons{margin-right:0}.serp-preview.mobile-preview.expanded-preview .group:nth-child(2){margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #dfe1e5}.serp-preview.mobile-preview .serp-snippet-mobile{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:stretch;align-items:stretch;margin:8px -5px 0}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper{-webkit-flex:1;flex:1;margin-left:5px;margin-right:5px}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper .serp-mobile-label{display:block;font-size:14px;line-height:20px;margin-bottom:4px;color:#202124;font-weight:500}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper .serp-rating-count{float:left}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper .serp-rating{float:left;margin-left:5px}.serp-preview.mobile-preview .serp-snippet-mobile .serp-rating-count{color:#808080}.serp-preview.mobile-preview .serp-snippet-data{display:none}.mobile-preview .serp-preview-title:before{content:attr(data-mobile)}.mobile-preview .serp-preview-bg{position:relative;overflow:visible;width:400px;max-width:100%;margin:auto;border-radius:8px;background-color:transparent;box-shadow:0 1px 6px rgba(32,33,36,0.28)}.mobile-preview .serp-preview-bg .serp-preview-input input{height:41px;border-bottom:1px solid rgba(0,0,0,0.12);border-radius:8px 8px 0 0;box-shadow:none}.mobile-preview .serp-preview-bg .serp-preview-input .serp-mike{display:none}.mobile-preview .serp-preview-bg .serp-preview-input .serp-search{right:0;width:40px;height:40px;margin-right:-1px;padding:0;border:1px solid #3367d6;border-radius:0 8px 0 0;-webkit-border-top-right-radius:8px;background-color:#3b78e7;-webkit-flex:0 0 auto;flex:0 0 auto}.mobile-preview .serp-preview-bg .serp-preview-input .serp-search svg{fill:#fff}.mobile-preview .serp-preview-bg .serp-preview-menus ul{display:-webkit-flex;display:flex;width:100%;border-bottom-right-radius:8px;border-bottom-left-radius:8px}.mobile-preview .serp-preview-bg .serp-preview-menus ul li{font-size:12px;line-height:40px;height:40px;padding:0 16px;text-align:center;text-transform:uppercase;-webkit-flex:1;flex:1}.mobile-preview .serp-preview-bg .serp-preview-menus ul li:last-child{display:none}.mobile-preview .serp-preview-bg .serp-preview-menus ul.menus-right{display:none}.mobile-preview .serp-preview-bg .serp-preview-result-stats{display:none}.mobile-preview .serp-preview-body{box-sizing:border-box;width:400px;max-width:100%;margin:auto;padding-top:30px;word-wrap:break-word}.mobile-preview.expanded-preview .serp-preview-body{margin-top:10px;padding:20px;border-radius:8px;background-color:#fff;box-shadow:0 1px 6px rgba(32,33,36,0.28)}.expanded-preview .serp-description,.expanded-preview .serp-title,.expanded-preview .serp-url,.mobile-preview .serp-description,.mobile-preview .serp-title,.mobile-preview .serp-url{overflow:hidden;pointer-events:none}.expanded-preview .serp-preview-footer,.mobile-preview .serp-preview-footer{display:none}.expanded-preview.desktop-preview .serp-preview-footer{padding:15px 0}.expanded-preview.desktop-preview .serp-preview-wrapper{padding:0}.expanded-preview.desktop-preview .serp-preview-title:before{content:attr(data-desktop)}@media (min-width: 768px){.expanded-preview.desktop-preview .serp-preview-bg{height:auto;padding:15px 20px 0;opacity:1}.expanded-preview.desktop-preview .serp-preview-body{padding-left:20px}}.expanded-preview.mobile-preview .serp-preview-bg{height:auto;margin-top:20px;opacity:1}.noindex-preview .serp-preview-wrapper{position:relative}.noindex-preview .serp-preview-body{pointer-events:none;opacity:.2}.noindex-preview .serp-preview-noindex{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-box-align:center;-webkit-box-pack:center;-ms-flex-align:center;-webkit-justify-content:center;justify-content:center}.noindex-preview .serp-preview-footer .alignright{display:none}body.rtl .serp-preview-bg .serp-preview-input input{padding-right:16px;padding-left:9px}body.rtl .serp-preview-bg .serp-preview-input .serp-search{right:auto;left:15px}body.rtl .serp-preview-bg .serp-preview-input .serp-mike{right:auto;left:50px;padding-right:8px;padding-left:2px}body.rtl .serp-preview-bg .serp-preview-menus ul,body.rtl .serp-preview-bg .serp-preview-menus li{float:right}body.rtl .serp-preview-bg .serp-preview-menus ul.menus-right,body.rtl .serp-preview-bg .serp-preview-menus li.menus-right{float:left}body.rtl .mobile-preview .serp-preview-bg .serp-search{left:0;border-radius:0;border-top-left-radius:8px}body.rtl .serp-preview .serp-description:focus:before,body.rtl .serp-preview .serp-description:hover:before,body.rtl .serp-preview .serp-title:focus:before,body.rtl .serp-preview .serp-title:hover:before,body.rtl .serp-preview .serp-url:focus:before,body.rtl .serp-preview .serp-url:hover:before{text-align:left}body.rtl .rank-math-variables-dropdown{right:auto;left:37px}.snippet-fields{padding:45px 0 15px}.length-indicator-wrapper{position:relative;display:block}.length-indicator-wrapper .length-indicator{overflow:hidden;border-radius:2px;background:linear-gradient(to right, #e33e2b 0%, #f06818 18%, #fff 19%, #fff 19%, #f16b17 20%, #f1a104 38%, #fff 39%, #fff 39%, #f1a404 40%, #d9b507 58%, #fff 59%, #fff 59%, #d4b509 60%, #7bb02c 78%, #fff 79%, #fff 79%, #76ae2e 80%, #2da24c 100%);position:absolute;top:-13px;right:60px;height:8px;width:180px}.length-indicator-wrapper .length-indicator span{position:absolute;z-index:11;background:#e0e0e0;height:100%;width:100%}.length-indicator-wrapper .length-indicator.invalid{background:linear-gradient(to right, #e33d2a 0%, #e33d2a 18%, #fff 19%, #fff 19%, #e33d2a 20%, #e33d2a 38%, #fff 39%, #fff 39%, #e33d2a 40%, #e33d2a 58%, #fff 59%, #fff 59%, #e33d2a 60%, #e33d2a 78%, #fff 79%, #fff 79%, #e33d2a 80%, #e33d2a 100%)}.length-indicator-wrapper input:focus+.length-indicator,.length-indicator-wrapper textarea:focus+.length-indicator{display:block}.length-indicator-wrapper .length-count{font-size:12px;position:absolute;top:-17px;right:0;color:#afafaf}.tag-editor{overflow:hidden;box-sizing:border-box;width:100%;padding:7px 80px 7px 10px;cursor:text;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;border:1px solid #e5e5e5;border-radius:3px;background:#fff;box-shadow:inset 0 1px 6px rgba(0,0,0,0.08)}.tag-editor>li{line-height:inherit;position:relative;float:left;margin:3px 10px 3px 0;padding:3px 5px;cursor:pointer;white-space:nowrap;color:#85878b;border-radius:2px;background:#e9e9ea}.tag-editor>li:nth-child(1){margin:0;padding:0;border-color:transparent;background:transparent}.tag-editor div{float:left;padding:0 4px}.tag-editor .placeholder{color:#bbb}.tag-editor-hidden-src{position:absolute !important;left:-99999px}.tag-editor .tag-editor-spacer{display:none}.tag-editor ::-ms-clear{display:none}.tag-editor .tag-editor-tag input[type=text]{margin:0;padding:0;cursor:text;border:0;outline:none;background:none;box-shadow:none !important}.tag-editor .tag-editor-tag.active+.tag-editor-delete,.tag-editor .tag-editor-tag.active+.tag-editor-delete i{visibility:hidden;cursor:text}.tag-editor .tag-editor-delete i{line-height:18px;display:inline-block}.tag-editor .tag-editor-delete i:before{font-size:16px;font-style:normal;content:'×'}.tag-editor .tag-editor-delete:hover i:before{color:#000 !important}.tag-editor>li.selected-fk{color:#000;border-color:#fbbc05;background:#fbbc05}.tag-editor>li.bad-fk{color:#e93f30;background:#fdeae8}.tag-editor>li.bad-fk.selected-fk{color:#fdeae8;background:#e93f30}.tag-editor>li.ok-fk{color:#fbbc05;background:#fef2ce}.tag-editor>li.ok-fk.selected-fk{color:#fef2ce;background:#fbbc05}.tag-editor>li.good-fk{color:#58bb58;background:#e9f6e9}.tag-editor>li.good-fk.selected-fk{color:#e9f6e9;background:#58bb58}.tag-editor>li.selected-fk .tag-editor-tag.active input[type=text],.tag-editor>li.selected-fk .tag-editor-delete:hover i:before{color:#fff}.tag-editor>li:nth-child(2):before{font-family:'dashicons';font-size:7px;line-height:12px;position:absolute;top:-4px;left:-6px;width:12px;content:'\f155';text-align:center;color:#fff;border:1px solid #fff;border-radius:50%;background:#4285f4}.cmb2-wrap .cmb2-id-rank-math-focus-keyword{padding-top:10px}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .cmb-th{width:100%;margin-bottom:10px}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .cmb-td{width:100%}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .notice{margin:20px 0 0;background:#fefcee}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .cmb-td{position:relative}.ui-autocomplete{font-size:14px;position:absolute;top:0;left:0;cursor:default}.ui-autocomplete.ui-autocomplete-loading{background:none}.ui-autocomplete.ui-widget-content{z-index:1111111}.ui-front{z-index:9999}.ui-menu{display:block;margin:0;padding:1px;list-style:none;outline:none}.ui-menu .ui-menu-item a{line-height:1.4;display:block;min-height:0;padding:2px .4em;text-decoration:none}.ui-widget-content{color:#555;border:1px solid #bbb;background:#fff}.ui-widget-content a{color:#46799b}.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{background:#e0eaf1}.ui-helper-hidden-accessible{display:none}.rank-math-seo-score{font-weight:600;position:absolute;top:1px;right:1px;box-sizing:border-box;width:105px;padding:13.5px 15px;text-align:center;border-radius:0 3px 3px 0;background:#f1f1f1}.rank-math-seo-score.misc-pub-section{position:relative;top:auto;right:auto;width:100%;padding:13.5px 12px;text-align:left;border-radius:0}.rank-math-seo-score.misc-pub-section .dashicons{font-size:18px;margin-right:2px}.rank-math-seo-score.misc-pub-section .score-icon{float:left;margin-right:4px}.rank-math-seo-score.good-fk{color:#58bb58;background:#e9f6e9}.rank-math-seo-score.good-fk .score-icon g{fill:#58bb58}.rank-math-seo-score.ok-fk{color:#ca9703;background:#fef2ce}.rank-math-seo-score.ok-fk .score-icon g{fill:#ca9703}.rank-math-seo-score.bad-fk{color:#e93f30;background:#fdeae8}.rank-math-seo-score.bad-fk .score-icon g{fill:#e93f30}.cmb2-wrap .cmb2-id-rank-math-pillar-content .cmb-th{display:none}.cmb2-wrap .cmb2-id-rank-math-pillar-content .cmb-td{width:100%}.rank-math-primary-term-li{position:relative;display:block}.rank-math-primary-term-li .rank-math-tooltip{position:absolute;right:0;display:none}.rank-math-primary-term-li .rank-math-tooltip>span{top:50%;right:32px;bottom:auto;left:auto;width:110px;-webkit-transform:translate3d(-70%, -50%, 0);transform:translate3d(-70%, -50%, 0)}.rank-math-primary-term-li .rank-math-tooltip>span:after{content:'';-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0);top:50%;right:-8px;left:auto;border-style:solid;height:0;width:0;border-color:transparent transparent transparent #555d66;border-width:7px 0 7px 8px}.rank-math-primary-term-li .rank-math-tooltip:hover span{bottom:auto;-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0);opacity:1}.rank-math-primary-term-li.term-checked>label>.rank-math-tooltip{display:inline-block}.rank-math-compare-keywords-trigger{position:absolute;right:0;top:-38px;text-decoration:none;color:#069de3}.rank-math-compare-keywords-trigger>.dashicons{vertical-align:-4px}.rank-math-compare-keywords-wrapper .media-modal{top:10%;right:10%;bottom:10%;left:10%}.rank-math-compare-keywords-wrapper .aligncenter{text-align:center}.rank-math-compare-keywords-wrapper .media-frame-menu{width:300px}.rank-math-compare-keywords-wrapper .media-frame-content,.rank-math-compare-keywords-wrapper .media-frame-title{left:300px}.rank-math-compare-keywords-wrapper .media-menu-item{font-size:23px;font-weight:400;line-height:30px;margin-bottom:8px}.rank-math-compare-keywords-wrapper h1{line-height:50px;padding:0 16px}.rank-math-compare-keywords-wrapper .keyword-input{padding:8px 20px}.rank-math-compare-keywords-wrapper .keyword-input input{margin:0;font-size:14px;height:32px;width:75%}.rank-math-compare-keywords-wrapper .keyword-input input:focus{box-shadow:none}.rank-math-compare-keywords-wrapper .keyword-input .button.add-new-keywords{height:31px;width:25%;padding:0 4px 1px;margin-left:-5px;border-radius:0 3px 3px 0;border-bottom-width:0px}.rank-math-compare-keywords-wrapper .keyword-input .button.add-new-keywords:focus{box-shadow:none;border:1px solid #ccc}.rank-math-compare-keywords-wrapper .button-link.remove-keyword{float:right;margin-right:20px;padding:0;text-decoration:none;box-shadow:none}.rank-math-compare-keywords-wrapper .add-new-keywords .dashicons{font-size:16px;vertical-align:-4px;margin-right:-2px}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields{margin:20px 0;padding:0 22px}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div{position:relative;background:#fbfbfb;padding:10px 10px 10px 35px;margin:0 0 8px;border-radius:3px;box-shadow:0px 0px 3px rgba(0,0,0,0.1)}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:before{position:absolute;top:13px;left:12px;width:12px;height:12px;content:'';border-radius:3px;background:#2196f3}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(2):before{background:#f44336}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(3):before{background:#ffca28}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(4):before{background:#43a047}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(5):before{background:#9c27b0}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields .remove-keyword{width:20px;padding:4px 4px 4px 8px;position:absolute;right:5px;top:6px;cursor:pointer;border-left:1px solid #e9ebed}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields .compare-keyword{font-size:14px}.rank-math-compare-keywords-wrapper .use-these-keywords{display:inline-block;margin-top:10px;font-size:13px}.rank-math-compare-keywords-wrapper .use-these-keywords .dashicons{text-decoration:none}.rank-math-compare-keywords-wrapper .source-credit{position:absolute;bottom:14px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);text-align:center;font-size:11px}.rank-math-compare-keywords-wrapper .button-actions{width:254px;margin:0 auto 8px}.rank-math-compare-keywords-wrapper .separator{position:absolute;bottom:54px;width:100%;left:-20px}.rank-math-compare-keywords-wrapper .attachments-browser{background:#fff}.rank-math-compare-keywords-wrapper .attachments-browser iframe{position:relative;overflow:hidden;top:-48px;height:420px;width:100%}.cmb2-id-rank-math-pillar-content .cmb-th label{visibility:hidden}@media only screen and (max-width: 1176px){.rank-math-compare-keywords-wrapper .attachments-browser iframe{top:0px}}@media only screen and (max-width: 900px){#setting-panel-container-rank_math_metabox .media-frame-menu .media-menu{left:0px;width:100%;max-width:100%;position:relative}#setting-panel-container-rank_math_metabox .aligncenter{margin-bottom:68px}#setting-panel-container-rank_math_metabox .media-frame-menu{width:100%}#setting-panel-container-rank_math_metabox .media-frame-content{position:relative}#setting-panel-container-rank_math_metabox .media-frame{overflow:auto}}.rank-math-serp-group li:before,.rank-math-serp-group.state-closed .group-status:before{font-family:dashicons;font-size:18px;line-height:1;float:left;margin:4px 10px 0 -30px;content:'\f335';color:#fff;border:1px solid #eac0c2;border-radius:50em;background:#eac0c2;height:18px;width:18px}.rank-math-serp-group .test-ok:before,.rank-math-serp-group .test-gallery:before,.rank-math-serp-group.state-closed .group-status.passed:before{content:'\f147';border-color:#58bb58;background:#58bb58}.rank-math-serp-checklist .group-handle{position:relative;padding:15px 20px;cursor:pointer;background:#ededee}.rank-math-serp-checklist h4{margin:0;color:#23282d}.rank-math-serp-checklist .group-handlediv{cursor:pointer;-webkit-transform:translateY(-50%);transform:translateY(-50%);border:0;background:0;position:absolute;top:50%;right:10px}.rank-math-serp-checklist .group-handlediv:focus{outline:0;box-shadow:none}.rank-math-serp-group{margin-top:20px;background:#f5f5f5}.rank-math-serp-group:first-of-type{margin-top:0}.rank-math-serp-group ul{padding:15px 20px}.rank-math-serp-group li{font-size:15px;line-height:28px;position:relative;clear:both;padding-left:30px;color:#444}.rank-math-serp-group li section{display:none}.rank-math-serp-group .test-ok .rank-math-tooltip,.rank-math-serp-group .test-gallery .rank-math-tooltip{display:none}.rank-math-serp-group .test-fail,.rank-math-serp-group .test-empty{color:#a0a0a0}.rank-math-serp-group .rank-math-tooltip{top:4px;right:-2px}.rank-math-serp-group .toggle-indicator:before{font:normal 20px/1 dashicons;display:inline-block;content:'\f142';text-decoration:none !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rank-math-serp-group.state-closed ul{display:none}.rank-math-serp-group.state-closed .toggle-indicator:before{content:'\f140' !important}.rank-math-serp-group.state-closed .group-status{float:left}.rank-math-serp-group.state-closed .group-status:before{margin:0 10px 0 0}.rank-math-serp-group li.seo-check-calculateFleschReading.okay:before,.rank-math-serp-group li.seo-check-calculateFleschReading.fairlyDifficult:before{border-color:#ffbe5f;background:#ffbe5f}.rank-math-serp-group li.seo-check-calculateFleschReading.difficult:before{border-color:#eac0c2;background:#eac0c2}#setting-panel-richsnippet .cmb-row-50,#setting-panel-richsnippet .cmb-row-33{vertical-align:top;border-top:1px solid #e9e9e9;border-bottom:0}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-music-type{border-top:0}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-music-type .cmb-th,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-music-type .cmb-td{margin-left:0;padding:0}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-ingredients,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instructions{border-top:1px solid #e9e9e9}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instruction-type{border-top:1px solid #e9e9e9}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-single-instructions,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instruction-name,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instructions{border-top:none}#setting-panel-richsnippet .notice-warning{margin:10px 0 0;background-color:#fefcee}#setting-panel-social .rank-math-tab{padding:30px 0 0}#setting-panel-social .rank-math-social-preview+.notice{margin-top:20px}#setting-panel-social .cmb-row.cmb-row-33{vertical-align:top;min-height:118px}.rank-math-social-preview-button{font-size:13px;display:inline-block;padding:4px 8px;text-decoration:none;text-transform:uppercase;color:#555555;border:0;outline:none;background:#ededee;box-shadow:none !important}.rank-math-social-preview-button .dashicons{position:relative;top:-2px}.open .rank-math-social-preview-button{color:#fff;background:#069de3}.rank-math-social-preview-item{display:none;padding:30px}.rank-math-social-preview-item-wrapper{overflow:hidden;width:474px;max-width:100%;margin:auto;background:#fff;border:1px solid;border-radius:0 0 3px 3px;border-color:#dadada #dadada #ccc;box-sizing:border-box}.rank-math-social-preview-item .error-msg{width:528px;max-width:100%;margin:auto;padding-top:10px;display:none;line-height:1}.rank-math-social-preview-item .error-msg.show{display:block}.rank-math-social-preview-image{line-height:0;position:relative;z-index:1}.rank-math-social-preview-image img{display:none;max-width:100%;height:100%;min-height:initial}.rank-math-social-preview-image-overlay{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%) scale(0.22126);transform:translate(-50%, -50%) scale(0.22126)}.rank-math-social-preview-image .error-msg{display:none;line-height:1}.rank-math-social-preview .rank-math-social-preview-caption{font-size:12px;background:#f2f3f5;padding:10px 10px 5px;color:#1d2129}.rank-math-social-preview .rank-math-social-preview-title{font-size:16px;font-weight:600;line-height:22px;margin:0 0 8px;padding:0;letter-spacing:normal;word-wrap:break-word}.rank-math-social-preview-description,.rank-math-social-preview-publisher{line-height:16px;margin:0}.rank-math-social-preview-publisher{font-size:12px;font-weight:normal;padding-bottom:5px;color:#90949c}.rank-math-social-preview-publisher.facebook{text-transform:uppercase}.rank-math-social-preview-social-meta{display:none;width:474px;margin:0 auto;clear:both;display:block;position:relative;margin-bottom:15px}.rank-math-social-preview-social-meta .social-profile-image{width:48px;height:48px;background:#dcc7c7;border-radius:50%;float:left;position:absolute;left:-58px}.rank-math-social-preview-social-meta .social-name{color:#14171a;font-size:14px;font-weight:bold}.rank-math-social-preview-social-meta .social-username,.rank-math-social-preview-social-meta .social-time{font-size:14px;color:#657786;font-weight:normal;margin-left:3px}.rank-math-social-preview-social-meta .social-time{margin-left:5px}.rank-math-social-preview-social-meta .social-time:before{content:"\00B7";margin-right:5px}.rank-math-social-preview-social-meta .social-text{margin-top:5px}.rank-math-social-preview-facebook .rank-math-social-preview-button strong:before{content:attr(data-facebook)}.rank-math-social-preview-facebook .facebook-thumbnail{display:block}.rank-math-social-preview-facebook .no-facebook-image .facebook-thumbnail{display:none}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.twitter-meta{display:none}.rank-math-social-preview-facebook .rank-math-social-preview-description{overflow:hidden;max-height:1.3em;margin-bottom:2px;white-space:nowrap;text-overflow:ellipsis}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta{display:block;border:1px solid #dadada;border-bottom:0;border-radius:3px 3px 0;padding:12px;margin-bottom:0;box-sizing:border-box}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-profile-image{width:40px;height:40px;left:auto;position:relative;margin-right:10px;margin-left:-2px}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-name{color:#365899;margin-bottom:3px}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-time:before{display:none}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-time span:first-child:after{content:"\00B7";margin-right:3px;margin-left:5px}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .dashicons.dashicons-admin-site{font-size:14px;line-height:17px}.rank-math-social-preview-facebook .twitter{display:none}.rank-math-social-preview-twitter.app,.rank-math-social-preview-twitter.player{display:none !important}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper{max-width:100%;border:1px solid rgba(136,153,166,0.5);border-radius:10px;clear:both}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper .twitter-thumbnail{display:block;max-width:100%}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper .rank-math-social-preview-caption{background:#ffffff}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper:hover{background:#F5F8FA}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper:hover .rank-math-social-preview-caption{background:#F5F8FA}.rank-math-social-preview-twitter .rank-math-social-preview-title{font:normal normal bold 14px/1.4 Helvetica,Roboto,'Segoe UI',Calibri,sans-serif;overflow:hidden;max-height:1.3em;margin-bottom:2px;white-space:nowrap;text-overflow:ellipsis}.rank-math-social-preview-twitter .rank-math-social-preview-description{font-size:14px;line-height:20px;overflow:hidden;max-height:4.5em;margin-top:.32333em}.rank-math-social-preview-twitter .rank-math-social-preview-publisher{padding-top:5px}.rank-math-social-preview-twitter .rank-math-social-preview-publisher.facebook{display:none}.rank-math-social-preview-twitter .no-twitter-image .twitter-thumbnail{display:none}.rank-math-social-preview-twitter .rank-math-social-preview-button strong:before{content:attr(data-twitter)}.rank-math-social-preview-twitter.summary_card .rank-math-social-preview-image{float:left}.rank-math-social-preview-twitter.summary_card .rank-math-social-preview-image img{height:125px;width:125px}.rank-math-social-preview-twitter.summary_card .rank-math-social-preview-caption{overflow:hidden;box-sizing:border-box;max-height:125px;padding:5px 0 0 15px}.rank-math-social-preview-twitter .rank-math-social-preview-social-meta.facebook-meta{display:none}.rank-math-social-preview-twitter .rank-math-social-preview-social-meta.twitter-meta{display:block}.suggestion-item{overflow:hidden;margin-bottom:5px;padding-bottom:5px;border-bottom:1px dotted #e5e5e5}.suggestion-item a{text-decoration:none;box-shadow:none !important}.suggestion-item .suggestion-actions{float:right;margin-left:5px}.suggestion-item .dashicons{margin-top:5px;cursor:pointer}#rank_math_keyword_density{font-weight:600;display:none;float:right;cursor:pointer;color:#888}#rank_math_keyword_density span{float:right}#rank_math_keyword_density .inner-wrapper{position:absolute;z-index:1;right:30px;margin-top:8px;padding:5px 15px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,0.1)}#rank_math_keyword_density .inner-wrapper ul{margin-top:15px}#rank_math_keyword_density.state-closed span:before{content:'\f140' !important}#rank_math_keyword_density.state-closed .inner-wrapper{display:none}body.rtl .rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a{float:right;margin-right:-1px;margin-left:0;padding-right:8px;padding-left:12px}body.rtl .rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .dashicons,body.rtl .rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .fa{margin-right:0;margin-left:5px}body.rtl .rank-math-metabox-wrap .social-tabs-navigation a .dashicons{margin-right:0;margin-left:8px}body.rtl .serp-preview .group .serp-close{left:10px;right:auto}body.rtl .serp-preview .rank-math-variables-wrap input,body.rtl .serp-preview .rank-math-variables-wrap textarea{padding-right:0.6em !important;padding-left:50px}body.rtl .serp-preview .length-indicator-wrapper .length-count{left:0;right:auto}body.rtl .serp-preview .length-indicator-wrapper .length-indicator{left:60px;right:auto}body.rtl .tag-editor{padding:7px 10px 7px 80px}body.rtl .tag-editor>li{float:right;margin-right:0;margin-left:10px}body.rtl .tag-editor>li:nth-child(2):before{right:-6px;left:auto}body.rtl .tag-editor div{float:right}body.rtl .tag-editor-hidden-src{right:-99999px}body.rtl .rank-math-seo-score{right:auto;left:1px}body.rtl .rank-math-serp-checklist .group-handlediv{right:auto;left:10px}body.rtl .rank-math-serp-group.state-closed .group-status{float:right}body.rtl .rank-math-serp-group.state-closed .group-status:before{margin:0 0 0 10px}body.rtl .rank-math-serp-group li{padding-left:0;padding-right:30px}body.rtl .rank-math-serp-group li:before{float:right;margin:4px -30px 0 10px}body.rtl .rank-math-primary-term-li .rank-math-make-primary,body.rtl .rank-math-primary-term-li .text-primary{right:auto;left:0}body.rtl .rank-math-primary-term-li .rank-math-tooltip{right:auto;left:0}body.rtl .rank-math-primary-term-li .rank-math-tooltip>span{right:auto;left:32px;-webkit-transform:translate3d(70%, -50%, 0);transform:translate3d(70%, -50%, 0)}body.rtl .rank-math-primary-term-li .rank-math-tooltip>span:after{left:-8px;right:auto;top:30%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}body.rtl .rank-math-primary-term-li .rank-math-tooltip:hover>span{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}body.rtl .suggestion-item .suggestion-actions{float:left;margin-right:5px}body.rtl input[type=checkbox]:checked:before{margin:-3px}body.rtl .postbox-container #side-sortables{overflow:hidden}.ask-review{text-align:center}.ask-review p{font-size:14px;margin-bottom:20px}.ask-review .stars-wrapper{line-height:60px;width:316px;margin:0 auto;margin-bottom:20px;border:1px solid #ddd;border-radius:6px}.ask-review .stars-wrapper .stars a{position:relative;top:9px;display:inline-block;height:40px;width:40px;text-decoration:none;color:#aaa}.ask-review .stars-wrapper .stars a span{font-size:40px;height:40px;width:40px}.ask-review .stars-wrapper .stars a.highlighted,.ask-review .stars-wrapper .stars a:hover{color:#f9cb12}.ask-review .stars-wrapper .face{float:right;width:70px;height:60px;border-left:1px solid #ddd;background:#fafafa}.smiley{position:relative;top:50%;left:50%;height:22px;width:22px;padding:12px;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border-radius:100%;background:linear-gradient(135deg, #ffe919 0%, #fbc000 100%)}.mouth{position:absolute;bottom:18%;left:50%;box-sizing:border-box;width:60%;height:30%;margin-left:-30%;transition:all 300ms cubic-bezier(0.645, 0.045, 0.355, 1);border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:22px;border-bottom-left-radius:22px;background:#b57700}.eyes{box-sizing:border-box;width:100%;margin-top:15%;padding:0 1px;transition:all 300ms cubic-bezier(0.645, 0.045, 0.355, 1)}.eyes .eye{position:relative;float:left;height:5px;width:5px;border-radius:100%;background:#b57700}.eyes .eye:nth-of-type(2){float:right}.eyes .eye::after{position:absolute;top:-5px;left:2px;display:block;height:0;width:0;content:'';transition:all 300ms cubic-bezier(0.645, 0.045, 0.355, 1);-webkit-transform:rotate(0deg);transform:rotate(0deg);background:#fed800}.eyes .eye:first-of-type::after{right:5px;left:auto;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.smiley.normal .mouth{bottom:25%;width:40%;height:10%;margin-left:-20%;border-top-left-radius:22px;border-top-right-radius:22px;border-bottom-right-radius:22px;border-bottom-left-radius:22px}.smiley.normal .eyes{margin-top:30%}.smiley.angry .mouth{bottom:25%;left:50%;width:40%;height:10%;margin-left:-20%;border-bottom:0;border-top-left-radius:100%;border-top-right-radius:100%;border-bottom-right-radius:0;border-bottom-left-radius:0}.smiley.happy .mouth{-webkit-animation:move-mouth-down .8s;animation:move-mouth-down .8s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes move-mouth-down{0%{bottom:18%}35%{bottom:16%}65%{bottom:16%}100%{bottom:18%}}@keyframes move-mouth-down{0%{bottom:18%}35%{bottom:16%}65%{bottom:16%}100%{bottom:18%}}.smiley.happy .eyes{-webkit-animation:move-eyes-down .8s;animation:move-eyes-down .8s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes move-eyes-down{0%{margin-top:15%}35%{margin-top:19%}65%{margin-top:19%}100%{margin-top:15%}}@keyframes move-eyes-down{0%{margin-top:15%}35%{margin-top:19%}65%{margin-top:19%}100%{margin-top:15%}}.smiley.happy .eye:nth-of-type(2){height:5px;margin-top:0;-webkit-animation:wink .8s;animation:wink .8s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes wink{0%{height:5px;margin-top:0}30%{height:2px;margin-top:1px}70%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}@keyframes wink{0%{height:5px;margin-top:0}30%{height:2px;margin-top:1px}70%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}.smiley.normal .eye{height:5px;margin-top:0;-webkit-animation:blink .6s;animation:blink .6s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes blink{0%{height:5px;margin-top:0}25%{height:2px;margin-top:1px}50%{height:5px;margin-top:0}75%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}@keyframes blink{0%{height:5px;margin-top:0}25%{height:2px;margin-top:1px}50%{height:5px;margin-top:0}75%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}.smiley.angry .eyes,.smiley.angry .mouth{-webkit-animation:move-angry-head .6s;animation:move-angry-head .6s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes move-angry-head{0%{-webkit-transform:translateX(0%);transform:translateX(0%)}20%{-webkit-transform:translateX(-20%);transform:translateX(-20%)}40%{-webkit-transform:translateX(15%);transform:translateX(15%)}60%{-webkit-transform:translateX(-10%);transform:translateX(-10%)}80%{-webkit-transform:translateX(5%);transform:translateX(5%)}100%{-webkit-transform:translateX(0%);transform:translateX(0%)}}@keyframes move-angry-head{0%{-webkit-transform:translateX(0%);transform:translateX(0%)}20%{-webkit-transform:translateX(-20%);transform:translateX(-20%)}40%{-webkit-transform:translateX(15%);transform:translateX(15%)}60%{-webkit-transform:translateX(-10%);transform:translateX(-10%)}80%{-webkit-transform:translateX(5%);transform:translateX(5%)}100%{-webkit-transform:translateX(0%);transform:translateX(0%)}}
|
2 |
* Plugin: Rank Math
|
3 |
* URL: https://rankmath.com/wordpress/plugin/seo-suite/
|
4 |
* Name: metabox.css
|
5 |
+
*/#rank_math_metabox .inside{margin:0;padding:0}.rank-math-metabox-frame{position:relative;min-width:255px;max-width:1000px;margin-bottom:25px;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,0.04)}.rank-math-metabox-frame-title{font-size:14px;line-height:1.4;margin:0;padding:8px 12px;border-bottom:1px solid #e5e5e5}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation){padding:30px 20px 0;border-bottom:1px solid #e5e5e5;background:#fafafa}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a{font-size:14px;font-weight:600;position:relative;float:left;box-sizing:border-box;margin-left:7px;padding:8px 16px 4px 12px;white-space:nowrap;text-decoration:none;color:#555;border:1px solid #e6e6e6;border-bottom:0;outline:none;background:#f5f5f5;box-shadow:none}@media (max-width: 768px){.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a{margin-left:-1px;padding:8px 12px 4px 8px}}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a[href="#setting-panel-askreview"]{padding-right:12px;float:right;color:#e93f30}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .dashicons,.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .fa{font-size:14px;line-height:inherit;min-width:20px;text-align:center}.rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a.active{bottom:-1px;margin-top:-1px;padding-bottom:5px;color:#069de3;border-top-color:#069de3;background:#fff}.rank-math-metabox-wrap .social-tabs-navigation{display:inline-block;border-radius:3px;box-shadow:0 1px 6px 0 rgba(35,40,45,0.18)}.rank-math-metabox-wrap .social-tabs-navigation-wrapper{padding-bottom:30px;text-align:center}.rank-math-metabox-wrap .social-tabs-navigation a{font-size:16px;float:left;box-sizing:border-box;width:130px;padding:11px;text-decoration:none;color:#939393;border:1px solid #e5e5e5;outline:none;background:#efefef;box-shadow:none}.rank-math-metabox-wrap .social-tabs-navigation a .dashicons{margin-right:8px}.rank-math-metabox-wrap .social-tabs-navigation .tab-facebook{border-right:0;border-radius:3px 0 0 3px}.rank-math-metabox-wrap .social-tabs-navigation .tab-facebook.tab-active{color:#fff;border-color:#3b5998;background:#3b5998}.rank-math-metabox-wrap .social-tabs-navigation .tab-twitter{border-left:0;border-radius:0 3px 3px 0}.rank-math-metabox-wrap .social-tabs-navigation .tab-twitter.tab-active{color:#fff;border-color:#55acee;background:#55acee}.rank-math-metabox-wrap .rank-math-tab{display:none;padding:30px}.serp-preview .highlight{pointer-events:none}.serp-preview-title:before{font-size:13px;font-weight:600;display:inline-block;padding-bottom:6px;content:attr(data-title);letter-spacing:.05em;text-transform:uppercase}.serp-preview-wrapper{position:relative;transition:all .6s ease}.serp-preview-body{padding:15px 0;transition:width .5s ease, padding .5s ease, margin .5s ease}.serp-preview-body .serp-star-rating{display:inline-block;position:relative;color:#ccc;margin-right:5px}.serp-preview-body .serp-star-rating .dashicons{font-size:16px;width:16px;height:16px}.serp-preview-body .serp-star-rating .serp-result{position:absolute;top:0;left:0;height:22px;overflow:hidden;white-space:nowrap;color:#e7711b}.serp-preview-body .cmb-row .cmb-td{width:100%;max-width:680px}.serp-preview-body .cmb-row .cmb-td .cmb2_textarea{width:100% !important}.serp-preview-footer{padding:15px 0}.serp-preview-footer .button.button-secondary{line-height:41px;padding:0 12px}.serp-preview-footer .button.button-secondary .dashicons{font-size:20px;line-height:41px}.serp-preview-bg{overflow:hidden;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:opacity .5s ease, height .5s ease;opacity:0;background-color:#fafafa;height:0;width:100%}.serp-preview-bg .serp-preview-input{position:relative;max-width:600px;pointer-events:none}.serp-preview-bg .serp-preview-input input{font:16px arial,sans-serif;padding:5px 9px 5px 16px;transition:box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);vertical-align:top;color:#000;border:none;border-radius:2px;outline:none;background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,0.16),0 0 0 1px rgba(0,0,0,0.08);height:44px;width:100%}.serp-preview-bg .serp-preview-input .serp-mike{position:absolute;top:0;right:50px;bottom:0;display:inline-block;width:24px;padding:0 2px 0 8px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACrElEQVR42u2Xz2sTQRSAX8VSb1K8iNqKooJH2Ux6Ksn+iPQqxZMIehJB0do/IMhmQWsvHr2KSEGk0tSLIoWIYNUKij20F2/N7iaUZnYT0kYzzhMKs0HDJiTdLcwHDwKZSd63781LBiQSSW9JZdkhzfKm1Rz9mjZp/W9YdEU3vXv4HsQZ40FtNG36q5rls//Ej4tmbSS2T15Mvp3ExOPmEMQNbBtMMEyoljcFcQN7PqyAlqNfIG7gYQ0tYNIaxA1MrJPY3wImbUqBKAXSFv0tBSIVMOkvKRDtGKWN/T6FdqRAxFNoWwpEPIXqUqBT6ALU/UVgu8GW4GD3f6f9TRDYNJTDrk7YbtiqUumHwIYoUJuHERDAS0r4CvgFECgbY+cFAR7KT+g1POmCKFDNw6WggHc3fBtVb4CAoyauBgXIG+g1Xh5mRAGah6cggBd11fK/h7lOprIs0H6uRl6KAo5O7kOv4QmPiwJ4Jqqv4FiwCtXjvD2+tRmfK6kZ/ygI2HritK0rDVGgrClJ6DWMwYC/AGuCBMYcIC2V0CzvjmbRz3j3xUjn6CfeYreUJ2wQkGD75INPX1mFfsEFrrcIYCvdhC4paWQakxajpJMr0C9YFg54i7AsClRmh9/xnr0NHcInzZStk2aLwAcGMAD9pPIazvFKVDD5rdnhJeHLX5RTyRPQHpz5o66emMc9wdlPtvA8wF7Aq2BUHh1525qEo5JtR1WeOXpickO9cJIpyuD6xJmhYiZ5ytWSl3mlnuOaf+2zDaLDXmJrSgZ/MYVEugo+gSh+FkSBa4yd5Ul87DZ5XpFl/AyIEjzYjkau8WqshU2cr13HPbgX4gJOD97n465GZlyVvC9mSKloKI2iTnbwNT+gBX54H+IaXAtxJzE3ycSAFqSAFJACUkAikXD+AHj5/wx2o5osAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:right center;background-size:24px 24px}.serp-preview-bg .serp-preview-input .serp-search{line-height:46px;position:absolute;top:0;right:15px;bottom:0;height:46px;text-align:center;border:0;outline:0}.serp-preview-bg .serp-preview-input .serp-search svg{width:25px;height:46px;fill:#4285f4}.serp-preview-bg .serp-preview-menus{overflow:hidden;max-width:600px}.serp-preview-bg .serp-preview-menus ul{float:left;overflow:hidden;margin:0;padding:0;list-style:none}.serp-preview-bg .serp-preview-menus ul li{font-family:arial,sans-serif;font-size:13px;line-height:19px;float:left;height:15px;margin:0;padding:28px 16px 12px;color:#777}.serp-preview-bg .serp-preview-menus ul li.current{font-weight:bold;color:#1a73e8;border-bottom:3px solid #1a73e8}.serp-preview-bg .serp-preview-menus ul.menus-right{float:right}.serp-preview-bg .serp-preview-result-stats{font-family:arial,sans-serif;font-size:small;line-height:43px;margin:0 -20px;padding-right:20px;padding-left:20px;white-space:nowrap;text-overflow:ellipsis;color:#808080;background-color:#fff}.serp-preview-noindex{z-index:1;display:none;padding:15px 0;background:rgba(255,255,255,0.8);position:absolute;top:0;right:0;bottom:0;left:0}.serp-preview-noindex h3{font-weight:700;margin:0;letter-spacing:1px;text-transform:uppercase}.serp-preview-noindex p{font-size:14px;line-height:2;margin:5px 0;color:#000}.serp-preview .serp-description,.serp-preview .serp-title,.serp-preview .serp-url{font-family:arial, sans-serif;position:relative;z-index:1;display:block;overflow:hidden;width:100%;max-width:680px;margin:0;cursor:pointer}.serp-preview .serp-description:focus:before,.serp-preview .serp-description:hover:before,.serp-preview .serp-title:focus:before,.serp-preview .serp-title:hover:before,.serp-preview .serp-url:focus:before,.serp-preview .serp-url:hover:before{font-family:dashicons;z-index:-1;content:'\f464';text-align:right;background:#f0f1f3;position:absolute;top:0;right:0;bottom:0;left:0}.serp-preview .serp-description:empty:after,.serp-preview .serp-title:empty:after,.serp-preview .serp-url:empty:after{content:attr(data-empty-title)}.serp-preview .serp-title{font-size:18px;font-weight:normal;line-height:19px;white-space:nowrap;text-overflow:ellipsis;color:#1a0dab}.serp-preview .serp-url{font-size:14px;line-height:16px;margin:3px 0 5px;white-space:nowrap;text-overflow:ellipsis;color:#006621}.serp-preview .serp-description{font-size:13px;line-height:1.4;clear:left;word-wrap:break-word;color:#545454}.serp-preview .group{position:relative;min-height:10px}.serp-preview .group .cmb-row{display:none;padding:20px 0 !important;border:0}.serp-preview .group .serp-close{position:absolute;top:10px;right:10px;display:none;cursor:pointer}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active{margin-top:20px;padding:30px 20px 20px;background:#f6f6f6}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .cmb-row{display:block}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .cmb-row.cmb2-id-rank-math-title .rank-math-variables-button{right:0}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .cmb-row.cmb2-id-rank-math-description .rank-math-variables-dropdown{top:60px}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active .serp-close{display:block}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active+.group,.serp-preview:not(.expanded-preview):not(.mobile-preview) .group+.group.active{margin-top:20px}.serp-preview:not(.expanded-preview):not(.mobile-preview) .group.active+.group+.serp-rating,.serp-preview:not(.expanded-preview):not(.mobile-preview) .group+.group.active+.serp-rating{display:none}.serp-preview .button{height:auto;padding:0 5px;outline:0}.serp-preview .button,.serp-preview .button .dashicons{font-size:15px;line-height:30px;height:auto}.serp-preview .button-secondary{margin-bottom:0;color:#818181;border-color:#e5e5e5;background:#fff !important;box-shadow:0 1px 2px 0 #e5e5e5 !important}.serp-preview .button-secondary.active,.serp-preview .button-secondary.active:hover{color:#fff;border-color:#0392d4;background:#069de3 !important}.serp-preview .button-secondary:hover{color:#069de3;border-color:#0392d4}.serp-preview-title .alignright{margin-top:-9px}.serp-preview.desktop-preview .serp-snippet-mobile{display:none}.serp-preview.desktop-preview .serp-snippet-data{color:#808080;line-height:18px;font-size:small;font-weight:normal;margin-bottom:3px}.serp-preview.desktop-preview .serp-snippet-data .serp-desktop-rating{float:left;margin-top:1px}.serp-preview.desktop-preview .serp-snippet-data .separator:first-child{display:none}.serp-preview.desktop-preview .serp-snippet-data .serp-event_name{color:#1a0dab;cursor:pointer}.serp-preview.desktop-preview .serp-snippet-data .serp-event_name:hover{text-decoration:underline}.serp-preview.desktop-preview .serp-snippet-data .serp-event_name,.serp-preview.desktop-preview .serp-snippet-data .serp-event_place{padding-left:15px}.serp-preview.desktop-preview .serp-preview-footer .alignright .dashicons{margin-right:0}.serp-preview.mobile-preview.expanded-preview .group:nth-child(2){margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #dfe1e5}.serp-preview.mobile-preview .serp-snippet-mobile{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:stretch;align-items:stretch;margin:8px -5px 0}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper{-webkit-flex:1;flex:1;margin-left:5px;margin-right:5px}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper .serp-mobile-label{display:block;font-size:14px;line-height:20px;margin-bottom:4px;color:#202124;font-weight:500}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper .serp-rating-count{float:left}.serp-preview.mobile-preview .serp-snippet-mobile .inner-wrapper .serp-rating{float:left;margin-left:5px}.serp-preview.mobile-preview .serp-snippet-mobile .serp-rating-count{color:#808080}.serp-preview.mobile-preview .serp-snippet-data{display:none}.mobile-preview .serp-preview-title:before{content:attr(data-mobile)}.mobile-preview .serp-preview-bg{position:relative;overflow:visible;width:400px;max-width:100%;margin:auto;border-radius:8px;background-color:transparent;box-shadow:0 1px 6px rgba(32,33,36,0.28)}.mobile-preview .serp-preview-bg .serp-preview-input input{height:41px;border-bottom:1px solid rgba(0,0,0,0.12);border-radius:8px 8px 0 0;box-shadow:none}.mobile-preview .serp-preview-bg .serp-preview-input .serp-mike{display:none}.mobile-preview .serp-preview-bg .serp-preview-input .serp-search{right:0;width:40px;height:40px;margin-right:-1px;padding:0;border:1px solid #3367d6;border-radius:0 8px 0 0;-webkit-border-top-right-radius:8px;background-color:#3b78e7;-webkit-flex:0 0 auto;flex:0 0 auto}.mobile-preview .serp-preview-bg .serp-preview-input .serp-search svg{fill:#fff}.mobile-preview .serp-preview-bg .serp-preview-menus ul{display:-webkit-flex;display:flex;width:100%;border-bottom-right-radius:8px;border-bottom-left-radius:8px}.mobile-preview .serp-preview-bg .serp-preview-menus ul li{font-size:12px;line-height:40px;height:40px;padding:0 16px;text-align:center;text-transform:uppercase;-webkit-flex:1;flex:1}.mobile-preview .serp-preview-bg .serp-preview-menus ul li:last-child{display:none}.mobile-preview .serp-preview-bg .serp-preview-menus ul.menus-right{display:none}.mobile-preview .serp-preview-bg .serp-preview-result-stats{display:none}.mobile-preview .serp-preview-body{box-sizing:border-box;width:400px;max-width:100%;margin:auto;padding-top:30px;word-wrap:break-word}.mobile-preview.expanded-preview .serp-preview-body{margin-top:10px;padding:20px;border-radius:8px;background-color:#fff;box-shadow:0 1px 6px rgba(32,33,36,0.28)}.expanded-preview .serp-description,.expanded-preview .serp-title,.expanded-preview .serp-url,.mobile-preview .serp-description,.mobile-preview .serp-title,.mobile-preview .serp-url{overflow:hidden;pointer-events:none}.expanded-preview .serp-preview-footer,.mobile-preview .serp-preview-footer{display:none}.expanded-preview.desktop-preview .serp-preview-footer{padding:15px 0}.expanded-preview.desktop-preview .serp-preview-wrapper{padding:0}.expanded-preview.desktop-preview .serp-preview-title:before{content:attr(data-desktop)}@media (min-width: 768px){.expanded-preview.desktop-preview .serp-preview-bg{height:auto;padding:15px 20px 0;opacity:1}.expanded-preview.desktop-preview .serp-preview-body{padding-left:20px}}.expanded-preview.mobile-preview .serp-preview-bg{height:auto;margin-top:20px;opacity:1}.noindex-preview .serp-preview-wrapper{position:relative}.noindex-preview .serp-preview-body{pointer-events:none;opacity:.2}.noindex-preview .serp-preview-noindex{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-box-align:center;-webkit-box-pack:center;-ms-flex-align:center;-webkit-justify-content:center;justify-content:center}.noindex-preview .serp-preview-footer .alignright{display:none}body.rtl .serp-preview-bg .serp-preview-input input{padding-right:16px;padding-left:9px}body.rtl .serp-preview-bg .serp-preview-input .serp-search{right:auto;left:15px}body.rtl .serp-preview-bg .serp-preview-input .serp-mike{right:auto;left:50px;padding-right:8px;padding-left:2px}body.rtl .serp-preview-bg .serp-preview-menus ul,body.rtl .serp-preview-bg .serp-preview-menus li{float:right}body.rtl .serp-preview-bg .serp-preview-menus ul.menus-right,body.rtl .serp-preview-bg .serp-preview-menus li.menus-right{float:left}body.rtl .mobile-preview .serp-preview-bg .serp-search{left:0;border-radius:0;border-top-left-radius:8px}body.rtl .serp-preview .serp-description:focus:before,body.rtl .serp-preview .serp-description:hover:before,body.rtl .serp-preview .serp-title:focus:before,body.rtl .serp-preview .serp-title:hover:before,body.rtl .serp-preview .serp-url:focus:before,body.rtl .serp-preview .serp-url:hover:before{text-align:left}body.rtl .rank-math-variables-dropdown{right:auto;left:37px}.snippet-fields{padding:45px 0 15px}.length-indicator-wrapper{position:relative;display:block}.length-indicator-wrapper .length-indicator{overflow:hidden;border-radius:2px;background:linear-gradient(to right, #e33e2b 0%, #f06818 18%, #fff 19%, #fff 19%, #f16b17 20%, #f1a104 38%, #fff 39%, #fff 39%, #f1a404 40%, #d9b507 58%, #fff 59%, #fff 59%, #d4b509 60%, #7bb02c 78%, #fff 79%, #fff 79%, #76ae2e 80%, #2da24c 100%);position:absolute;top:-13px;right:60px;height:8px;width:180px}.length-indicator-wrapper .length-indicator span{position:absolute;z-index:11;background:#e0e0e0;height:100%;width:100%}.length-indicator-wrapper .length-indicator.invalid{background:linear-gradient(to right, #e33d2a 0%, #e33d2a 18%, #fff 19%, #fff 19%, #e33d2a 20%, #e33d2a 38%, #fff 39%, #fff 39%, #e33d2a 40%, #e33d2a 58%, #fff 59%, #fff 59%, #e33d2a 60%, #e33d2a 78%, #fff 79%, #fff 79%, #e33d2a 80%, #e33d2a 100%)}.length-indicator-wrapper input:focus+.length-indicator,.length-indicator-wrapper textarea:focus+.length-indicator{display:block}.length-indicator-wrapper .length-count{font-size:12px;position:absolute;top:-17px;right:0;color:#afafaf}.tag-editor{overflow:hidden;box-sizing:border-box;width:100%;padding:7px 80px 7px 10px;cursor:text;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;border:1px solid #e5e5e5;border-radius:3px;background:#fff;box-shadow:inset 0 1px 6px rgba(0,0,0,0.08)}.tag-editor>li{line-height:inherit;position:relative;float:left;margin:3px 10px 3px 0;padding:3px 5px;cursor:pointer;white-space:nowrap;color:#85878b;border-radius:2px;background:#e9e9ea}.tag-editor>li:nth-child(1){margin:0;padding:0;border-color:transparent;background:transparent}.tag-editor div{float:left;padding:0 4px}.tag-editor .placeholder{color:#bbb}.tag-editor-hidden-src{position:absolute !important;left:-99999px}.tag-editor .tag-editor-spacer{display:none}.tag-editor ::-ms-clear{display:none}.tag-editor .tag-editor-tag input[type=text]{margin:0;padding:0;cursor:text;border:0;outline:none;background:none;box-shadow:none !important}.tag-editor .tag-editor-tag.active+.tag-editor-delete,.tag-editor .tag-editor-tag.active+.tag-editor-delete i{visibility:hidden;cursor:text}.tag-editor .tag-editor-delete i{line-height:18px;display:inline-block}.tag-editor .tag-editor-delete i:before{font-size:16px;font-style:normal;content:'×'}.tag-editor .tag-editor-delete:hover i:before{color:#000 !important}.tag-editor>li.selected-fk{color:#000;border-color:#fbbc05;background:#fbbc05}.tag-editor>li.bad-fk{color:#e93f30;background:#fdeae8}.tag-editor>li.bad-fk.selected-fk{color:#fdeae8;background:#e93f30}.tag-editor>li.ok-fk{color:#fbbc05;background:#fef2ce}.tag-editor>li.ok-fk.selected-fk{color:#fef2ce;background:#fbbc05}.tag-editor>li.good-fk{color:#58bb58;background:#e9f6e9}.tag-editor>li.good-fk.selected-fk{color:#e9f6e9;background:#58bb58}.tag-editor>li.selected-fk .tag-editor-tag.active input[type=text],.tag-editor>li.selected-fk .tag-editor-delete:hover i:before{color:#fff}.tag-editor>li:nth-child(2):before{font-family:'dashicons';font-size:7px;line-height:12px;position:absolute;top:-4px;left:-6px;width:12px;content:'\f155';text-align:center;color:#fff;border:1px solid #fff;border-radius:50%;background:#4285f4}.cmb2-wrap .cmb2-id-rank-math-focus-keyword{padding-top:10px}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .cmb-th{width:100%;margin-bottom:10px}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .cmb-td{width:100%}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .notice{margin:20px 0 0;background:#fefcee}.cmb2-wrap .cmb2-id-rank-math-focus-keyword .cmb-td{position:relative}.ui-autocomplete{font-size:14px;position:absolute;top:0;left:0;cursor:default}.ui-autocomplete.ui-autocomplete-loading{background:none}.ui-autocomplete.ui-widget-content{z-index:1111111}.ui-front{z-index:9999}.ui-menu{display:block;margin:0;padding:1px;list-style:none;outline:none}.ui-menu .ui-menu-item a{line-height:1.4;display:block;min-height:0;padding:2px .4em;text-decoration:none}.ui-widget-content{color:#555;border:1px solid #bbb;background:#fff}.ui-widget-content a{color:#46799b}.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{background:#e0eaf1}.ui-helper-hidden-accessible{display:none}.rank-math-seo-score{font-weight:600;position:absolute;top:1px;right:1px;box-sizing:border-box;width:105px;padding:13.5px 15px;text-align:center;border-radius:0 3px 3px 0;background:#f1f1f1}.rank-math-seo-score.misc-pub-section{position:relative;top:auto;right:auto;width:100%;padding:13.5px 12px;text-align:left;border-radius:0}.rank-math-seo-score.misc-pub-section .dashicons{font-size:18px;margin-right:2px}.rank-math-seo-score.misc-pub-section .score-icon{float:left;margin-right:4px}.rank-math-seo-score.good-fk{color:#58bb58;background:#e9f6e9}.rank-math-seo-score.good-fk .score-icon g{fill:#58bb58}.rank-math-seo-score.ok-fk{color:#ca9703;background:#fef2ce}.rank-math-seo-score.ok-fk .score-icon g{fill:#ca9703}.rank-math-seo-score.bad-fk{color:#e93f30;background:#fdeae8}.rank-math-seo-score.bad-fk .score-icon g{fill:#e93f30}.cmb2-wrap .cmb2-id-rank-math-pillar-content .cmb-th{display:none}.cmb2-wrap .cmb2-id-rank-math-pillar-content .cmb-td{width:100%}.rank-math-primary-term-li{position:relative;display:block}.rank-math-primary-term-li .rank-math-tooltip{position:absolute;right:0;display:none}.rank-math-primary-term-li .rank-math-tooltip>span{top:50%;right:32px;bottom:auto;left:auto;width:110px;-webkit-transform:translate3d(-70%, -50%, 0);transform:translate3d(-70%, -50%, 0)}.rank-math-primary-term-li .rank-math-tooltip>span:after{content:'';-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0);top:50%;right:-8px;left:auto;border-style:solid;height:0;width:0;border-color:transparent transparent transparent #555d66;border-width:7px 0 7px 8px}.rank-math-primary-term-li .rank-math-tooltip:hover span{bottom:auto;-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0);opacity:1}.rank-math-primary-term-li.term-checked>label>.rank-math-tooltip{display:inline-block}.rank-math-compare-keywords-trigger{position:absolute;right:0;top:-38px;text-decoration:none;color:#069de3}.rank-math-compare-keywords-trigger>.dashicons{vertical-align:-4px}.rank-math-compare-keywords-wrapper .media-modal{top:10%;right:10%;bottom:10%;left:10%}.rank-math-compare-keywords-wrapper .aligncenter{text-align:center}.rank-math-compare-keywords-wrapper .media-frame-menu{width:300px}.rank-math-compare-keywords-wrapper .media-frame-content,.rank-math-compare-keywords-wrapper .media-frame-title{left:300px}.rank-math-compare-keywords-wrapper .media-menu-item{font-size:23px;font-weight:400;line-height:30px;margin-bottom:8px}.rank-math-compare-keywords-wrapper h1{line-height:50px;padding:0 16px}.rank-math-compare-keywords-wrapper .keyword-input{padding:8px 20px}.rank-math-compare-keywords-wrapper .keyword-input input{margin:0;font-size:14px;height:32px;width:75%}.rank-math-compare-keywords-wrapper .keyword-input input:focus{box-shadow:none}.rank-math-compare-keywords-wrapper .keyword-input .button.add-new-keywords{height:31px;width:25%;padding:0 4px 1px;margin-left:-5px;border-radius:0 3px 3px 0;border-bottom-width:0px}.rank-math-compare-keywords-wrapper .keyword-input .button.add-new-keywords:focus{box-shadow:none;border:1px solid #ccc}.rank-math-compare-keywords-wrapper .button-link.remove-keyword{float:right;margin-right:20px;padding:0;text-decoration:none;box-shadow:none}.rank-math-compare-keywords-wrapper .add-new-keywords .dashicons{font-size:16px;vertical-align:-4px;margin-right:-2px}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields{margin:20px 0;padding:0 22px}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div{position:relative;background:#fbfbfb;padding:10px 10px 10px 35px;margin:0 0 8px;border-radius:3px;box-shadow:0px 0px 3px rgba(0,0,0,0.1)}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:before{position:absolute;top:13px;left:12px;width:12px;height:12px;content:'';border-radius:3px;background:#2196f3}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(2):before{background:#f44336}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(3):before{background:#ffca28}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(4):before{background:#43a047}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields>div:nth-child(5):before{background:#9c27b0}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields .remove-keyword{width:20px;padding:4px 4px 4px 8px;position:absolute;right:5px;top:6px;cursor:pointer;border-left:1px solid #e9ebed}.rank-math-compare-keywords-wrapper .rank-math-keywords-fields .compare-keyword{font-size:14px}.rank-math-compare-keywords-wrapper .use-these-keywords{display:inline-block;margin-top:10px;font-size:13px}.rank-math-compare-keywords-wrapper .use-these-keywords .dashicons{text-decoration:none}.rank-math-compare-keywords-wrapper .source-credit{position:absolute;bottom:14px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);text-align:center;font-size:11px}.rank-math-compare-keywords-wrapper .button-actions{width:254px;margin:0 auto 8px}.rank-math-compare-keywords-wrapper .separator{position:absolute;bottom:54px;width:100%;left:-20px}.rank-math-compare-keywords-wrapper .attachments-browser{background:#fff}.rank-math-compare-keywords-wrapper .attachments-browser iframe{position:relative;overflow:hidden;top:-48px;height:420px;width:100%}.cmb2-id-rank-math-pillar-content .cmb-th label{visibility:hidden}@media only screen and (max-width: 1176px){.rank-math-compare-keywords-wrapper .attachments-browser iframe{top:0px}}@media only screen and (max-width: 900px){#setting-panel-container-rank_math_metabox .media-frame-menu .media-menu{left:0px;width:100%;max-width:100%;position:relative}#setting-panel-container-rank_math_metabox .aligncenter{margin-bottom:68px}#setting-panel-container-rank_math_metabox .media-frame-menu{width:100%}#setting-panel-container-rank_math_metabox .media-frame-content{position:relative}#setting-panel-container-rank_math_metabox .media-frame{overflow:auto}}.rank-math-serp-group li:before,.rank-math-serp-group.state-closed .group-status:before{font-family:dashicons;font-size:18px;line-height:1;float:left;margin:4px 10px 0 -30px;content:'\f335';color:#fff;border:1px solid #eac0c2;border-radius:50em;background:#eac0c2;height:18px;width:18px}.rank-math-serp-group .test-ok:before,.rank-math-serp-group .test-gallery:before,.rank-math-serp-group.state-closed .group-status.passed:before{content:'\f147';border-color:#58bb58;background:#58bb58}.rank-math-serp-checklist .group-handle{position:relative;padding:15px 20px;cursor:pointer;background:#ededee}.rank-math-serp-checklist h4{margin:0;color:#23282d}.rank-math-serp-checklist .group-handlediv{cursor:pointer;-webkit-transform:translateY(-50%);transform:translateY(-50%);border:0;background:0;position:absolute;top:50%;right:10px}.rank-math-serp-checklist .group-handlediv:focus{outline:0;box-shadow:none}.rank-math-serp-group{margin-top:20px;background:#f5f5f5}.rank-math-serp-group:first-of-type{margin-top:0}.rank-math-serp-group ul{padding:15px 20px}.rank-math-serp-group li{font-size:15px;line-height:28px;position:relative;clear:both;padding-left:30px;color:#444}.rank-math-serp-group li section{display:none}.rank-math-serp-group .test-ok .rank-math-tooltip,.rank-math-serp-group .test-gallery .rank-math-tooltip{display:none}.rank-math-serp-group .test-fail,.rank-math-serp-group .test-empty{color:#a0a0a0}.rank-math-serp-group .rank-math-tooltip{top:4px;right:-2px}.rank-math-serp-group .toggle-indicator:before{font:normal 20px/1 dashicons;display:inline-block;content:'\f142';text-decoration:none !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rank-math-serp-group.state-closed ul{display:none}.rank-math-serp-group.state-closed .toggle-indicator:before{content:'\f140' !important}.rank-math-serp-group.state-closed .group-status{float:left}.rank-math-serp-group.state-closed .group-status:before{margin:0 10px 0 0}.rank-math-serp-group li.seo-check-calculateFleschReading.okay:before,.rank-math-serp-group li.seo-check-calculateFleschReading.fairlyDifficult:before{border-color:#ffbe5f;background:#ffbe5f}.rank-math-serp-group li.seo-check-calculateFleschReading.difficult:before{border-color:#eac0c2;background:#eac0c2}#setting-panel-richsnippet .cmb-row-50,#setting-panel-richsnippet .cmb-row-33{vertical-align:top;border-top:1px solid #e9e9e9;border-bottom:0}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-music-type{border-top:0}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-music-type .cmb-th,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-music-type .cmb-td{margin-left:0;padding:0}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-ingredients,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instructions{border-top:1px solid #e9e9e9}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instruction-type{border-top:1px solid #e9e9e9}#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-single-instructions,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instruction-name,#setting-panel-richsnippet .cmb2-id-rank-math-snippet-recipe-instructions{border-top:none}#setting-panel-richsnippet .notice-warning{margin:10px 0 0;background-color:#fefcee}#setting-panel-social .rank-math-tab{padding:30px 0 0}#setting-panel-social .rank-math-social-preview+.notice{margin-top:20px}#setting-panel-social .cmb-row.cmb-row-33{vertical-align:top;min-height:118px}.rank-math-social-preview-button{font-size:13px;display:inline-block;padding:4px 8px;text-decoration:none;text-transform:uppercase;color:#555555;border:0;outline:none;background:#ededee;box-shadow:none !important}.rank-math-social-preview-button .dashicons{position:relative;top:-2px}.open .rank-math-social-preview-button{color:#fff;background:#069de3}.rank-math-social-preview-item{display:none;padding:30px}.rank-math-social-preview-item-wrapper{overflow:hidden;width:474px;max-width:100%;margin:auto;background:#fff;border:1px solid;border-radius:0 0 3px 3px;border-color:#dadada #dadada #ccc;box-sizing:border-box}.rank-math-social-preview-item .error-msg{width:528px;max-width:100%;margin:auto;padding-top:10px;display:none;line-height:1}.rank-math-social-preview-item .error-msg.show{display:block}.rank-math-social-preview-image{line-height:0;position:relative;z-index:1}.rank-math-social-preview-image img{display:none;max-width:100%;height:100%;min-height:initial}.rank-math-social-preview-image-overlay{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%) scale(0.22126);transform:translate(-50%, -50%) scale(0.22126)}.rank-math-social-preview-image .error-msg{display:none;line-height:1}.rank-math-social-preview .rank-math-social-preview-caption{font-size:12px;background:#f2f3f5;padding:10px 10px 5px;color:#1d2129}.rank-math-social-preview .rank-math-social-preview-title{font-size:16px;font-weight:600;line-height:22px;margin:0 0 8px;padding:0;letter-spacing:normal;word-wrap:break-word}.rank-math-social-preview-description,.rank-math-social-preview-publisher{line-height:16px;margin:0}.rank-math-social-preview-publisher{font-size:12px;font-weight:normal;padding-bottom:5px;color:#90949c}.rank-math-social-preview-publisher.facebook{text-transform:uppercase}.rank-math-social-preview-social-meta{display:none;width:474px;margin:0 auto;clear:both;display:block;position:relative;margin-bottom:15px}.rank-math-social-preview-social-meta .social-profile-image{width:48px;height:48px;background:#dcc7c7;border-radius:50%;float:left;position:absolute;left:-58px}.rank-math-social-preview-social-meta .social-name{color:#14171a;font-size:14px;font-weight:bold}.rank-math-social-preview-social-meta .social-username,.rank-math-social-preview-social-meta .social-time{font-size:14px;color:#657786;font-weight:normal;margin-left:3px}.rank-math-social-preview-social-meta .social-time{margin-left:5px}.rank-math-social-preview-social-meta .social-time:before{content:"\00B7";margin-right:5px}.rank-math-social-preview-social-meta .social-text{margin-top:5px}.rank-math-social-preview-facebook .rank-math-social-preview-button strong:before{content:attr(data-facebook)}.rank-math-social-preview-facebook .facebook-thumbnail{display:block}.rank-math-social-preview-facebook .no-facebook-image .facebook-thumbnail{display:none}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.twitter-meta{display:none}.rank-math-social-preview-facebook .rank-math-social-preview-description{overflow:hidden;max-height:1.3em;margin-bottom:2px;white-space:nowrap;text-overflow:ellipsis;display:none}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta{display:block;border:1px solid #dadada;border-bottom:0;border-radius:3px 3px 0;padding:12px;margin-bottom:0;box-sizing:border-box}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-profile-image{width:40px;height:40px;left:auto;position:relative;margin-right:10px;margin-left:-2px}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-name{color:#365899;margin-bottom:3px}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-time:before{display:none}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .social-time span:first-child:after{content:"\00B7";margin-right:3px;margin-left:5px}.rank-math-social-preview-facebook .rank-math-social-preview-social-meta.facebook-meta .dashicons.dashicons-admin-site{font-size:14px;line-height:17px}.rank-math-social-preview-facebook .twitter{display:none}.rank-math-social-preview-twitter.app,.rank-math-social-preview-twitter.player{display:none !important}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper{max-width:100%;border:1px solid rgba(136,153,166,0.5);border-radius:10px;clear:both}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper .twitter-thumbnail{display:block;max-width:100%}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper .rank-math-social-preview-caption{background:#ffffff}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper:hover{background:#F5F8FA}.rank-math-social-preview-twitter .rank-math-social-preview-item-wrapper:hover .rank-math-social-preview-caption{background:#F5F8FA}.rank-math-social-preview-twitter .rank-math-social-preview-title{font:normal normal bold 14px/1.4 Helvetica,Roboto,'Segoe UI',Calibri,sans-serif;overflow:hidden;max-height:1.3em;margin-bottom:2px;white-space:nowrap;text-overflow:ellipsis}.rank-math-social-preview-twitter .rank-math-social-preview-description{font-size:14px;line-height:20px;overflow:hidden;max-height:4.5em;margin-top:.32333em}.rank-math-social-preview-twitter .rank-math-social-preview-publisher{padding-top:5px}.rank-math-social-preview-twitter .rank-math-social-preview-publisher.facebook{display:none}.rank-math-social-preview-twitter .no-twitter-image .twitter-thumbnail{display:none}.rank-math-social-preview-twitter .rank-math-social-preview-button strong:before{content:attr(data-twitter)}.rank-math-social-preview-twitter.summary_card .rank-math-social-preview-image{float:left}.rank-math-social-preview-twitter.summary_card .rank-math-social-preview-image img{height:125px;width:125px}.rank-math-social-preview-twitter.summary_card .rank-math-social-preview-caption{overflow:hidden;box-sizing:border-box;max-height:125px;padding:5px 0 0 15px}.rank-math-social-preview-twitter .rank-math-social-preview-social-meta.facebook-meta{display:none}.rank-math-social-preview-twitter .rank-math-social-preview-social-meta.twitter-meta{display:block}.suggestion-item{overflow:hidden;margin-bottom:5px;padding-bottom:5px;border-bottom:1px dotted #e5e5e5}.suggestion-item a{text-decoration:none;box-shadow:none !important}.suggestion-item .suggestion-actions{float:right;margin-left:5px}.suggestion-item .dashicons{margin-top:5px;cursor:pointer}#rank_math_keyword_density{font-weight:600;display:none;float:right;cursor:pointer;color:#888}#rank_math_keyword_density span{float:right}#rank_math_keyword_density .inner-wrapper{position:absolute;z-index:1;right:30px;margin-top:8px;padding:5px 15px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,0.1)}#rank_math_keyword_density .inner-wrapper ul{margin-top:15px}#rank_math_keyword_density.state-closed span:before{content:'\f140' !important}#rank_math_keyword_density.state-closed .inner-wrapper{display:none}body.rtl .rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a{float:right;margin-right:-1px;margin-left:0;padding-right:8px;padding-left:12px}body.rtl .rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .dashicons,body.rtl .rank-math-metabox-wrap .rank-math-tabs-navigation:not(.social-tabs-navigation) a .fa{margin-right:0;margin-left:5px}body.rtl .rank-math-metabox-wrap .social-tabs-navigation a .dashicons{margin-right:0;margin-left:8px}body.rtl .serp-preview .group .serp-close{left:10px;right:auto}body.rtl .serp-preview .rank-math-variables-wrap input,body.rtl .serp-preview .rank-math-variables-wrap textarea{padding-right:0.6em !important;padding-left:50px}body.rtl .serp-preview .length-indicator-wrapper .length-count{left:0;right:auto}body.rtl .serp-preview .length-indicator-wrapper .length-indicator{left:60px;right:auto}body.rtl .tag-editor{padding:7px 10px 7px 80px}body.rtl .tag-editor>li{float:right;margin-right:0;margin-left:10px}body.rtl .tag-editor>li:nth-child(2):before{right:-6px;left:auto}body.rtl .tag-editor div{float:right}body.rtl .tag-editor-hidden-src{right:-99999px}body.rtl .rank-math-seo-score{right:auto;left:1px}body.rtl .rank-math-serp-checklist .group-handlediv{right:auto;left:10px}body.rtl .rank-math-serp-group.state-closed .group-status{float:right}body.rtl .rank-math-serp-group.state-closed .group-status:before{margin:0 0 0 10px}body.rtl .rank-math-serp-group li{padding-left:0;padding-right:30px}body.rtl .rank-math-serp-group li:before{float:right;margin:4px -30px 0 10px}body.rtl .rank-math-primary-term-li .rank-math-make-primary,body.rtl .rank-math-primary-term-li .text-primary{right:auto;left:0}body.rtl .rank-math-primary-term-li .rank-math-tooltip{right:auto;left:0}body.rtl .rank-math-primary-term-li .rank-math-tooltip>span{right:auto;left:32px;-webkit-transform:translate3d(70%, -50%, 0);transform:translate3d(70%, -50%, 0)}body.rtl .rank-math-primary-term-li .rank-math-tooltip>span:after{left:-8px;right:auto;top:30%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}body.rtl .rank-math-primary-term-li .rank-math-tooltip:hover>span{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}body.rtl .suggestion-item .suggestion-actions{float:left;margin-right:5px}body.rtl input[type=checkbox]:checked:before{margin:-3px}body.rtl .postbox-container #side-sortables{overflow:hidden}.ask-review{text-align:center}.ask-review p{font-size:14px;margin-bottom:20px}.ask-review .stars-wrapper{line-height:60px;width:316px;margin:0 auto;margin-bottom:20px;border:1px solid #ddd;border-radius:6px}.ask-review .stars-wrapper .stars a{position:relative;top:9px;display:inline-block;height:40px;width:40px;text-decoration:none;color:#aaa}.ask-review .stars-wrapper .stars a span{font-size:40px;height:40px;width:40px}.ask-review .stars-wrapper .stars a.highlighted,.ask-review .stars-wrapper .stars a:hover{color:#f9cb12}.ask-review .stars-wrapper .face{float:right;width:70px;height:60px;border-left:1px solid #ddd;background:#fafafa}.smiley{position:relative;top:50%;left:50%;height:22px;width:22px;padding:12px;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border-radius:100%;background:linear-gradient(135deg, #ffe919 0%, #fbc000 100%)}.mouth{position:absolute;bottom:18%;left:50%;box-sizing:border-box;width:60%;height:30%;margin-left:-30%;transition:all 300ms cubic-bezier(0.645, 0.045, 0.355, 1);border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:22px;border-bottom-left-radius:22px;background:#b57700}.eyes{box-sizing:border-box;width:100%;margin-top:15%;padding:0 1px;transition:all 300ms cubic-bezier(0.645, 0.045, 0.355, 1)}.eyes .eye{position:relative;float:left;height:5px;width:5px;border-radius:100%;background:#b57700}.eyes .eye:nth-of-type(2){float:right}.eyes .eye::after{position:absolute;top:-5px;left:2px;display:block;height:0;width:0;content:'';transition:all 300ms cubic-bezier(0.645, 0.045, 0.355, 1);-webkit-transform:rotate(0deg);transform:rotate(0deg);background:#fed800}.eyes .eye:first-of-type::after{right:5px;left:auto;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.smiley.normal .mouth{bottom:25%;width:40%;height:10%;margin-left:-20%;border-top-left-radius:22px;border-top-right-radius:22px;border-bottom-right-radius:22px;border-bottom-left-radius:22px}.smiley.normal .eyes{margin-top:30%}.smiley.angry .mouth{bottom:25%;left:50%;width:40%;height:10%;margin-left:-20%;border-bottom:0;border-top-left-radius:100%;border-top-right-radius:100%;border-bottom-right-radius:0;border-bottom-left-radius:0}.smiley.happy .mouth{-webkit-animation:move-mouth-down .8s;animation:move-mouth-down .8s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes move-mouth-down{0%{bottom:18%}35%{bottom:16%}65%{bottom:16%}100%{bottom:18%}}@keyframes move-mouth-down{0%{bottom:18%}35%{bottom:16%}65%{bottom:16%}100%{bottom:18%}}.smiley.happy .eyes{-webkit-animation:move-eyes-down .8s;animation:move-eyes-down .8s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes move-eyes-down{0%{margin-top:15%}35%{margin-top:19%}65%{margin-top:19%}100%{margin-top:15%}}@keyframes move-eyes-down{0%{margin-top:15%}35%{margin-top:19%}65%{margin-top:19%}100%{margin-top:15%}}.smiley.happy .eye:nth-of-type(2){height:5px;margin-top:0;-webkit-animation:wink .8s;animation:wink .8s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes wink{0%{height:5px;margin-top:0}30%{height:2px;margin-top:1px}70%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}@keyframes wink{0%{height:5px;margin-top:0}30%{height:2px;margin-top:1px}70%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}.smiley.normal .eye{height:5px;margin-top:0;-webkit-animation:blink .6s;animation:blink .6s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes blink{0%{height:5px;margin-top:0}25%{height:2px;margin-top:1px}50%{height:5px;margin-top:0}75%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}@keyframes blink{0%{height:5px;margin-top:0}25%{height:2px;margin-top:1px}50%{height:5px;margin-top:0}75%{height:2px;margin-top:1px}100%{height:5px;margin-top:0}}.smiley.angry .eyes,.smiley.angry .mouth{-webkit-animation:move-angry-head .6s;animation:move-angry-head .6s;-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes move-angry-head{0%{-webkit-transform:translateX(0%);transform:translateX(0%)}20%{-webkit-transform:translateX(-20%);transform:translateX(-20%)}40%{-webkit-transform:translateX(15%);transform:translateX(15%)}60%{-webkit-transform:translateX(-10%);transform:translateX(-10%)}80%{-webkit-transform:translateX(5%);transform:translateX(5%)}100%{-webkit-transform:translateX(0%);transform:translateX(0%)}}@keyframes move-angry-head{0%{-webkit-transform:translateX(0%);transform:translateX(0%)}20%{-webkit-transform:translateX(-20%);transform:translateX(-20%)}40%{-webkit-transform:translateX(15%);transform:translateX(15%)}60%{-webkit-transform:translateX(-10%);transform:translateX(-10%)}80%{-webkit-transform:translateX(5%);transform:translateX(5%)}100%{-webkit-transform:translateX(0%);transform:translateX(0%)}}
|
Binary file
|
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=
|
1 |
+
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=204)}({204:function(e,t,a){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=jQuery,String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,function(t,a){return void 0!==e[a]?e[a]:t})}),String.prototype.trimRight=function(e){return void 0===e&&(e="s"),this.replace(RegExp("["+e+"]+$"),"")},r(function(){window.rankMathAdmin={init:function(){this.misc(),this.tabs(),this.searchConsole(),this.dependencyManager()},misc:function(){void 0!==jQuery.fn.select2&&r("[data-s2]").select2(),r(".cmb-group-text-only,.cmb-group-fix-me").each(function(){var e=r(this),t=e.find(".cmb-repeatable-group"),a=t.find("> .cmb-row:eq(0) > .cmb-th");e.prepend('<div class="cmb-th"><label>'+a.find("h2").text()+"</label></div>"),t.find(".cmb-add-row").append('<span class="cmb2-metabox-description">'+a.find("p").text()+"</span>"),a.parent().remove()}),r(".rank-math-collapsible-trigger").on("click",function(e){e.preventDefault();var t=r(this),a=r("#"+t.data("target"));t.toggleClass("open"),a.toggleClass("open")})},searchConsole:function(){var e=this,t=null,a=r("#console_authorization_code"),i=r("#gsc-dp-info"),o=r("#console_profile"),c=a.parent(),s=o.parent(),l=s.find(".button-primary"),d=r("body").hasClass("rank-math-wizard-body--searchconsole")?r("> p:first-of-type",".cmb-form"):r("h1",".rank-math-wrap-settings");a.after(c.find(".button")),o.after(s.find(".button")),o.on("change",function(){null===o.val()||o.val().indexOf("sc-domain:")?i.addClass("hidden"):i.removeClass("hidden")}).change(),t=l.prev(),a.data("authorized")&&a.hide(),c.on("click",".button-secondary",function(e){e.preventDefault(),window.open(this.href,"","width=800, height=600")}),c.on("click",".button-primary",function(i){i.preventDefault();var o=r(this);o.prop("disabled",!0),a.data("authorized")?e.ajax("search_console_deauthentication").always(function(){o.prop("disabled",!1)}).done(function(){a.val(""),r("#submit-cmb").trigger("click"),"object"===("undefined"==typeof rankMathSetupWizard?"undefined":n(rankMathSetupWizard))&&(a.show(),a.data("authorized",!1),c.find(".button-secondary").show(),o.html("Authorize"),t.prop("disabled",!0),l.prop("disabled",!0))}):(a.addClass("input-loading"),e.ajax("search_console_authentication",{code:a.val()}).always(function(){o.prop("disabled",!1),a.removeClass("input-loading")}).done(function(n){n&&!n.success&&e.addNotice(n.error,"error",d),n&&"fail"===n.status&&e.addNotice(n.body.error_description,"error",d),n&&"success"===n.status&&(a.hide(),a.data("authorized",!0),c.find(".button-secondary").hide(),o.html("De-authorize Account"),l.trigger("click"),t.removeAttr("disabled"))}))}),l.on("click",function(a){a.preventDefault(),l.prop("disabled",!0),t.addClass("input-loading"),e.ajax("search_console_get_profiles").always(function(){l.prop("disabled",!1),r(".console-cache-update-manually").prop("disabled",!1),t.removeClass("input-loading")}).done(function(a){if(a&&!a.success&&e.addNotice(a.error,"error",d),a&&a.success){var n=a.selected||t.val();t.html(""),r.each(a.profiles,function(e,a){t.append('<option value="'+e+'">'+a+"</option>")}),t.val(n||Object.keys(a.profiles)[0]),l.removeClass("hidden")}})})},dependencyManager:function(){var e=this,t=r(".cmb-form, .rank-math-metabox-wrap");r(".cmb-repeat-group-wrap",t).each(function(){var e=r(this),t=e.next(".rank-math-cmb-dependency.hidden");t.length&&e.find("> .cmb-td").append(t)}),r(".rank-math-cmb-dependency",t).each(function(){e.loopDependencies(r(this))}),r("input, select",t).on("change",function(){var t=r(this).attr("name");r('span[data-field="'+t+'"]').each(function(){e.loopDependencies(r(this).closest(".rank-math-cmb-dependency"))})})},checkDependency:function(e,t,a){return"string"==typeof t&&t.includes(",")&&"="===a?t.includes(e):"string"==typeof t&&t.includes(",")&&"!="===a?!t.includes(e):"="===a&&e===t||"=="===a&&e===t||">="===a&&t<=e||"<="===a&&e<=t||">"===a&&t<e||"<"===a&&e<t||"!="===a&&e!==t},loopDependencies:function(e){var t,a=this,n=e.data("relation");e.find("span").each(function(){var e=r(this),i=e.data("value"),o=e.data("comparison"),c=r("[name='"+e.data("field")+"']"),s=c.val();c.is(":radio")&&(s=c.filter(":checked").val()),c.is(":checkbox")&&(s=c.is(":checked"));var l=a.checkDependency(s,i,o);if("or"===n&&l)return!(t=!0);"and"===n&&(t=void 0===t?l:t&&l)});var i=e.closest(".rank-math-cmb-group");i.length||(i=e.closest(".cmb-row")),t?i.slideDown(300):i.hide()},tabs:function(){var e=r(".rank-math-tabs-navigation");e.length&&e.each(function(){var t=r(this),a=t.closest(".rank-math-tabs"),n=r(">a",t),i=r(">.rank-math-tabs-content>.rank-math-tab",a),o=t.data("active-class")||"active";n.on("click",function(){var e=r(this),t=e.attr("href");return n.removeClass(o),i.hide(),e.addClass(o),r(t).show(),!1});var c=location.hash||localStorage.getItem(a.attr("id"));null===c?n.eq(0).trigger("click"):(c=r('a[href="'+c+'"]',t)).length?c.trigger("click"):n.eq(0).trigger("click"),e.next().css("min-height",t.outerHeight())})},variableInserter:function(e){var t=this,a=r("body"),n=r("input[type=text], textarea",".rank-math-supports-variables");if(e=void 0===e||e,n.length){n.attr("autocomplete","off"),n.wrap('<div class="rank-math-variables-wrap"/>'),r(".rank-math-variables-wrap").append('<a href="#" class="rank-math-variables-button button button-secondary"><span class="dashicons dashicons-arrow-down-alt2"></span></a>'),e&&(r(".rank-math-variables-wrap").after('<div class="rank-math-variables-preview" data-title="Example"/>'),n.on("rank_math_variable_change input",function(e){var a=r(e.currentTarget),n=t.replaceVariables(a.val());60<n.length&&~a.attr("name").indexOf("title")&&(n=n.substring(0,60)+"..."),a.parent().next(".rank-math-variables-preview").html(n)}),n.trigger("rank_math_variable_change"));var i=r("<ul/>"),o=r('<div class="rank-math-variables-dropdown"><input type="text" placeholder="Search …"></div>');r.each(rankMath.variables,function(e){i.append('<li data-var="%'+e+'%"'+(this.example?' data-example="'+this.example+'"':"")+"><strong>"+this.name+"</strong><span>"+this.desc+"</span></li>")}),o.append(i),r(".rank-math-variables-wrap:eq(0)").append(o);var c=r(".rank-math-variables-button, .rank-math-variables-button *, .rank-math-variables-dropdown, .rank-math-variables-dropdown *");r(a).on("click",function(e){r(e.target).is(c)||o.hide()});var s=o.find("input"),l=o.find("li");r(a).on("click",".rank-math-variables-button",function(e){e.preventDefault(),r(this).after(o),l.show(),o.show(),s.val("").focus()}),o.on("click","li",function(e){e.preventDefault();var t=r(this),a=t.closest(".rank-math-variables-wrap").find(">:first-child");a.val(r.trim(a.val())+" "+t.data("var")),a.trigger("rank_math_variable_change").trigger("input"),o.hide()}),o.on("keyup","input",function(e){e.preventDefault();var t=r(this).val().toLowerCase();t.length<2?l.show():l.hide().each(function(){var e=r(this);~e.text().toLowerCase().indexOf(t)&&e.show()})})}},replaceVariables:function(e){return r.each(rankMath.variables,function(t){if(!this.example)return!0;t=t.replace(/\([a-z]+\)/g,"\\(.*?\\)"),e=e.replace(RegExp("%+"+t+"%+","g"),this.example)}),e},ajax:function(e,t,a){return r.ajax({url:rankMath.ajaxurl,type:a||"POST",dataType:"json",data:r.extend(!0,{action:"rank_math_"+e,security:rankMath.security},t)})},addNotice:function(e,t,a,n){n=n||!1;var i=r('<div class="notice notice-'+(t=t||"error")+' is-dismissible"><p>'+e+"</p></div>").hide();a.next(".notice").remove(),a.after(i),i.slideDown(),r(document).trigger("wp-updates-notice-added"),n&&setTimeout(function(){i.fadeOut()},n)}},window.rankMathAdmin.init()})}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=205)}({205:function(e,t,n){"use strict";var r;(r=jQuery)(".dashboard-deactivate-plugin").on("click",function(e){e.preventDefault();var t=r(this);return r.ajax({url:ajaxurl,type:"POST",data:{action:"rank_math_deactivate_plugins",security:rankMath.security,plugin:"all"}}).always(function(e){"1"===e?t.parents(".rank-math-notice").remove():console.log("Deactivation error")}),!1}),r(".rank-math-modules").on("change",function(){var e=r(this),t=e.closest(".rank-math-box"),n=e.is(":checked"),a=e.val(),o={"404-monitor":"404-monitor",redirections:"redirections","role-manager":"role-manager","search-console":"search-console","seo-analysis":"seo-analysis",sitemap:"options-sitemap"};t.addClass("saving"),r.ajax({url:rankMath.api.root+"rankmath/v1/saveModule",method:"POST",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",rankMath.api.nonce)},data:{module:a,state:n?"on":"off"}}).done(function(e){e?(t.removeClass("saving"),t.toggleClass("active",n),!n&&o.hasOwnProperty(a)&&r("#toplevel_page_rank-math").find('a[href="admin.php?page=rank-math-'+o[a]+'"]').parent("li").toggle()):alert("Something went wrong! Please try again.")})}),"undefined"!=typeof ClipboardJS&&(r(".get-debug-report").on("click",function(){return r("#debug-report").slideDown(),r("#debug-report textarea").focus().select(),r(this).parent().fadeOut(),!1}),new ClipboardJS("#copy-for-support"))}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=206)}({206:function(e,t,n){"use strict";var r;(r=jQuery)(function(){var e=r("#rank-math-feedback-form"),t=e.find(".rank-math-feedback-input-wrapper"),n=e.find("form"),o=r("#the-list").find('[data-slug="seo-by-rank-math"] span.deactivate a');o.on("click",function(t){t.preventDefault(),e.fadeIn()}),e.on("change","input:radio",function(){var e=r(this).parent();t.removeClass("checked"),e.toggleClass("checked")}),e.on("click",".button-skip",function(){location.href=o.attr("href")}),e.on("click",".button-close",function(t){t.preventDefault(),e.fadeOut()}),e.on("click",function(e){"rank-math-feedback-form"===e.target.id&&r(this).find(".button-close").trigger("click")}),n.on("submit",function(e){e.preventDefault(),n.find(".button-submit").text("").addClass("loading"),r.ajax({url:ajaxurl,type:"POST",dataType:"json",data:n.serialize()}).done(function(){location.href=o.attr("href")})})})}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=
|
1 |
+
!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=207)}({207:function(e,t,r){"use strict";var a;(a=jQuery)(function(){({init:function(){var e=this;a(document.body).on("click",".rank-math-action",function(t){var r=a(this).data("action");r in e&&e[r](t)}),this.importConfirm()},importConfirm:function(){var e=a("#import-me");e.on("change",function(){e.removeClass("invalid")}),a("#rank-math-import-form").on("submit",function(t){if(!e.get(0).files.length)return e.addClass("invalid"),void t.preventDefault();confirm(rankMath.importConfirm)||t.preventDefault()})},createBackup:function(e){var t=this,r=a(e.currentTarget);r.prop("disabled",!0),t.ajax("create_backup").always(function(){r.prop("disabled",!1)}).done(function(e){if(e.success){var n=r.parent().find("tbody"),o=n.find("tr:first").clone();o.removeClass("hidden").find("th").html(e.backup),o.find("[data-action]").attr("data-key",e.key),n.prepend(o),a("#rank-math-no-backup-message").addClass("hidden"),t.addNotice(e.message,"success",a(".wp-header-end"),2e3)}else t.addNotice(e.error,"error",a(".wp-header-end"),2e3)})},restoreBackup:function(e){if(confirm(rankMath.restoreConfirm)){var t=this,r=a(e.currentTarget);r.prop("disabled",!0),t.ajax("restore_backup",{key:r.attr("data-key")}).always(function(){r.prop("disabled",!1)}).done(function(e){e.success?t.addNotice(e.message,"success",a(".wp-header-end"),2e3):t.addNotice(e.error,"error",a(".wp-header-end"),2e3)})}},deleteBackup:function(e){if(confirm(rankMath.deleteBackupConfirm)){var t=this,r=a(e.currentTarget);r.prop("disabled",!0),t.ajax("delete_backup",{key:r.data("key")}).always(function(){r.prop("disabled",!1)}).done(function(e){if(e.success){var n=r.closest("table");r.closest("tr").fadeOut(function(){a(this).remove(),n.find("tr").length<1&&a("#rank-math-no-backup-message").show()}),t.addNotice(e.message,"success",a(".wp-header-end"),2e3)}else t.addNotice(e.error,"error",a(".wp-header-end"),2e3)})}},importPlugin:function(e){if(confirm(rankMath.importConfirm)){var t=this,r=a(e.currentTarget);r.prop("disabled",!0);var n=a.map(r.closest("tr").next("tr").find("input:checkbox:checked"),function(e){return e.value});if(n.length<1)t.addNotice("Select data to import.","error",a(".wp-header-end"),2e3);else{r.data("active")&&n.push("deactivate");var o=a('<textarea id="import-progress-area" class="import-progress-area large-text" disabled="disabled" rows="8" style="margin: 20px 0;background: #eee;"></textarea>');a("#import-progress-area").remove(),r.closest(".list-table").after(o),t.addLog("Import started...",o),t.ajaxImport(r.data("slug"),n,o,null,function(){r.prop("disabled",!1),setTimeout(function(){o.fadeOut(function(){o.remove()})},3e3)})}}},ajaxImport:function(e,t,r,a,n){var o=this;if(0===t.length)return o.addLog("Import finished.",r),void n();var i=t.shift();a=a||1,o.addLog("deactivate"===i?"Deactivating plugin":"Importing "+i,r),o.ajax("import_plugin",{perform:i,pluginSlug:e,paged:a}).done(function(a){var s=1;a&&a.page&&a.page<a.total_pages&&(s=a.page+1,t.unshift(i)),o.addLog(a.success?a.message:a.error,r),o.ajaxImport(e,t,r,s,n)}).fail(function(a){o.addLog(a.statusText,r),o.ajaxImport(e,t,r,null,n)})},addLog:function(e,t){var r=new Date,a=t.val()+"["+(r.getHours()<10?"0":"")+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()+":"+(r.getSeconds()<10?"0":"")+r.getSeconds()+"] "+e+"\n";t.text(a).scrollTop(t[0].scrollHeight-t.height()-20)},cleanPlugin:function(e){if(confirm(rankMath.cleanPluginConfirm)){var t=this,r=a(e.currentTarget);r.prop("disabled",!0),t.ajax("clean_plugin",{pluginSlug:r.data("slug")}).always(function(){r.prop("disabled",!1)}).done(function(e){e.success&&r.closest("tr").fadeOut(function(){a(this).remove()}),t.addNotice(e.success?e.message:e.error,e.success?"success":"error",a(".wp-header-end"),2e3)})}},ajax:function(e,t,r){return a.ajax({url:rankMath.ajaxurl,type:r||"POST",dataType:"json",data:a.extend(!0,{action:"rank_math_"+e,security:rankMath.security},t)})},addNotice:function(e,t,r,n){n=n||!1;var o=a('<div class="notice notice-'+(t=t||"error")+' is-dismissible"><p>'+e+"</p></div>").hide();a(".notice").hide(),r.after(o),o.slideDown(),a(document).trigger("wp-updates-notice-added"),n&&setTimeout(function(){o.fadeOut(function(){o.remove()})},n)}}).init()})}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function a(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=
|
1 |
+
!function(t){var e={};function a(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=208)}({208:function(t,e,a){"use strict";var n;(n=jQuery)(function(){window.rankMathOptions={init:function(){this.misc(),this.preview(),this.scCache(),rankMathAdmin.variableInserter(),this.searchEngine.init(),this.addressFormat()},searchEngine:{init:function(){this.form=n(".rank-math-search-options"),this.wrap=this.form.closest(".rank-math-wrap-settings"),this.input=this.form.find("input"),this.select=this.form.find("select"),this.tabs=this.wrap.find(".rank-math-tabs"),this.panels=this.wrap.find(".rank-math-tab"),this.indexes={},this.buildIndex(),this.events()},events:function(){var t=this,e=!0,a=t.tabs.find(">.rank-math-tabs-navigation"),r=n('<div class="rank-math-search-dropdown"></div>');t.tabs.find(">.rank-math-tabs-content").prepend('<div class="rank-math-setting-search-empty hidden">No results found.</div>'),t.form.append(r),t.select.val(rankMath.optionPage),r.hide().empty();var o=_.debounce(function(e){t.wrap.addClass("searching"),t.panels.show(),t.searchOptions(e,t.wrap)},300),i=_.debounce(function(e){t.wrap.addClass("searching"),t.searchIndexes(e,r)},300);t.form.on("click",".clear-search",function(e){e.preventDefault(),t.input.val(""),t.clearSearch(a)}),t.select.on("change",function(){e=t.select.val()===rankMath.optionPage,r.hide().empty(),e||(t.clearSearch(a),r.append(t.indexes[t.select.val()])),t.input.trigger("input")}),t.input.on("input",function(){if(""===t.input.val())return t.clearSearch(a,!e&&r),!1;e?o(t.input.val().toLowerCase()):i(t.input.val().toLowerCase())}),r.on("click",".cmb-row",function(){var e=n(this);window.location=location.pathname+"?page=rank-math-options-"+t.select.val()+"#"+e.closest(".dropdown-tab").attr("id")});var s=n(".rank-math-search-options, .rank-math-search-options *, .rank-math-search-dropdown, .rank-math-search-dropdown *");n("body").on("click",function(t){n(t.target).is(s)||r.hide()})},searchIndexes:function(t,e){if(1<=t.trim().length){var a=e.find(".cmb-row"),r=0;a.hide().each(function(){var e=n(this);e.text().trim().toLowerCase().includes(t)&&(e.show(),++r)}),e.show(),e.toggleClass("empty",0===r)}},searchOptions:function(t,e){if(1<=t.trim().length){n(".cmb-row").hide().each(function(){var e=n(this);e.hasClass("cmb-type-title")?e.hide():e.text().trim().toLowerCase().includes(t)&&e.show()});var a=n(".cmb-row:visible");0===a.length?e.addClass("search-no-results"):(e.removeClass("search-no-results"),a.each(function(){n(this).find("input, select").each(function(){n('span[data-field="'+n(this).attr("name")+'"]').each(function(){rankMathAdmin.loopDependencies(n(this).closest(".rank-math-cmb-dependency"))})})}))}},clearSearch:function(t,e){e=e||!1,this.wrap.removeClass("searching search-no-results"),n(">a.active",t).trigger("click"),e?e.hide():(n(".cmb-row").show(),n(".rank-math-cmb-dependency",".cmb-form, .rank-math-metabox-wrap").each(function(){rankMathAdmin.loopDependencies(n(this))}))},buildIndex:function(){var t=localStorage.getItem("rank-math-option-search-index"),e=localStorage.getItem("rank-math-option-search-premium"),a=void 0===t||rankMath;a=void 0===e||e!==rankMath.hasPremium,["general","titles","sitemap"].forEach(function(t){this.getIndex(t,a)},this),a&&(localStorage.setItem("rank-math-option-search-index",rankMath.version),localStorage.setItem("rank-math-option-search-premium",rankMath.hasPremium))},getIndex:function(t,e){var a=this;e?n("<div/>").load(rankMath.adminurl+"?page=rank-math-options-"+t,function(e,r){if("error"!==r){var o=n(e).find(".rank-math-tabs-content");o.find(".rank-math-tab").removeClass().addClass("dropdown-tab"),o.find(".cmb-row").each(function(){var t=n(this);(t.hasClass("cmb-type-title")||t.hasClass("cmb-type-notice"))&&t.remove(),t.find(".cmb-td").children(":not(.cmb2-metabox-description)").remove(),t.find("label,.cmb2-metabox-description").unwrap(),t.removeAttr("data-fieldtype")}),o=o.html().replace(/(\r\n\t|\n|\r\t)/gm,""),a.indexes[t]=n(o),localStorage.setItem("rank-math-option-"+t+"-index",o)}}):a.indexes[t]=n(localStorage.getItem("rank-math-option-"+t+"-index"))}},scCache:function(){n(".console-cache-delete").on("click",function(t){t.preventDefault();var e=n(this),a=e.data("days");window.confirm((-1===a?"You are about to delete your whole Cache. Every dataset older than 90 days is lost forever!":"You are about to delete your 90 days Cache?")+" Are you sure you want to continue?")&&(e.prop("disabled",!0),rankMathAdmin.ajax("search_console_delete_cache",{days:a},"GET").always(function(){e.prop("disabled",!1)}).done(function(t){t&&t.success&&(rankMathAdmin.addNotice("Cache deleted.","success",n("h1",".rank-math-wrap-settings")),n(".rank-math-console-db-info").remove(),n("#console-updating-manually-progress").before(t.message))}))}),n(".console-cache-update-manually").on("click",function(t){t.preventDefault();var e=n(this),a=n("#console_caching_control").val();e.prop("disabled",!0),rankMathAdmin.ajax("search_console_get_cache",{days:a},"GET").done(function(t){t&&t.success?rankMathAdmin.addNotice(t.message,"success",n("h1.page-title")):rankMathAdmin.addNotice("Unable to update cache due to: "+t.error,"error",n("h1.page-title"))})})},addressFormat:function(){var t=n("body"),e=n("input[type=text], textarea",".rank-math-address-format");if(e.length){e.attr("autocomplete","off"),e.wrap('<div class="rank-math-variables-wrap"/>');var a=e.parent(".rank-math-variables-wrap");a.append('<a href="#" class="rank-math-variables-button button button-secondary button-address"><span class="dashicons dashicons-arrow-down-alt2"></span></a>');var r=n("<ul/>"),o=n('<div class="rank-math-variables-dropdown"></div>');n.each({"{address} {locality}, {region} {postalcode}":"(New York, NY 12345)","{address} {postalcode}, {locality} {region}":"(New York 12345, NY)","{address} {locality} {postalcode}":"(New York NY 12345)","{postalcode} {region} {locality} {address}":"(12345 NY New York)","{address} {locality}":"(New York NY)"},function(t,e){r.append('<li data-var="'+e+'"><strong>'+t+"</strong></li>")}),o.append(r),n("rank-math-variables-wrap:eq(0)").append(o);var i=n(".rank-math-variables-button, .rank-math-variables-button *, .rank-math-variables-dropdown, .rank-math-variables-dropdown *");n(t).on("click",function(t){n(t.target).is(i)||o.hide()});var s=o.find("input"),c=o.find("li");n(a).on("click",".rank-math-variables-button",function(t){t.preventDefault(),n(this).after(o),c.show(),o.show(),s.val("").focus()}),o.on("click","li",function(t){t.preventDefault();var e=n(this);e.closest(".rank-math-variables-wrap").find("textarea").val(e.find("strong").text())})}},misc:function(){void 0!==jQuery.fn.select2&&n("[data-s2-pages]").select2({ajax:{url:rankMath.ajaxurl+"?action=rank_math_search_pages",dataType:"json",delay:250},width:"100%",minimumInputLength:3}),n("#htaccess_accept_changes").on("change",function(){this.checked?n("#htaccess_content").prop("readonly",!1):n("#htaccess_content").prop("readonly",!0)}),n(".reset-options").on("click",function(){return!!confirm("Are you sure? You want to reset settings.")&&(n(window).off("beforeunload"),!0)});var t=n(".rank-math-tabs");setTimeout(function(){localStorage.removeItem(t.attr("id"))},1e3),n(".save-options").on("click",function(){var e=n("> .rank-math-tabs-navigation > a.active",t);return localStorage.setItem(t.attr("id"),e.attr("href")),n(window).off("beforeunload"),!0});var e=!1;n(window).on("load",function(){n(".cmb-form").on("change","input, textarea, select",function(){e=!0})}),n(window).on("beforeunload",function(){if(e)return"Are you sure? You didn't finish the form!"}),n(".custom-sep").on("keyup",function(){var t=n(this),e=t.text();t.closest("li").find("input.cmb2-option").val(e).trigger("change")})},preview:function(){n("[data-preview]").on("change",function(){var t=n(this),e=null,a="";if(t.is(":radio")&&(e=t.closest(".cmb-td")),null!==e)if(e.hasClass("done"))t.is(":checked")&&(a=e.find("h5")).text(a.data("title").format(t.val()));else if(e.addClass("done"),"title"===t.data("preview")){var r="";r+='<div class="rank-math-preview-title" data-title="Preview"><div>',r+='<h5 data-title="'+rankMath.postTitle+" {0} "+rankMath.blogName+'"></h5>',r+="<span>"+rankMath.postUri+"</span>",e.append(r+="</div></div>"),(a=e.find("h5")).text(a.data("title").format(t.val()))}}).trigger("change")}},window.rankMathOptions.init()})}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(t){var n={};function e(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=t,e.c=n,e.d=function(t,n,a){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:a})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(e.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(a,r,function(n){return t[n]}.bind(null,r));return a},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=
|
1 |
+
!function(t){var n={};function e(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=t,e.c=n,e.d=function(t,n,a){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:a})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(e.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(a,r,function(n){return t[n]}.bind(null,r));return a},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=209)}({209:function(t,n,e){"use strict";var a,r;a=jQuery,r={init:function(){this.addButtons(),this.editingEvents(),this.saveEvents()},addButtons:function(){var t=a("#rank_math_seo_details, #rank_math_title, #rank_math_description, #rank_math_image_alt, #rank_math_image_title");t.each(function(){var t=a(this);t.append(' <a href=#" class="dashicons dashicons-edit" title="'+rankMath.bulkEditTitle+'"></a>'),t.wrapInner("<span/>"),t.append(' <span><a href="#" class="button button-primary button-small rank-math-column-save-all">'+rankMath.buttonSaveAll+'</a> <a href="#" class="button-link button-link-delete rank-math-column-cancel-all">'+rankMath.buttonCancel+"</a></span>")}),t.on("click",".dashicons-edit, .rank-math-column-cancel-all",function(n){n.preventDefault();var e=a(this).closest("th");a(this).hasClass("rank-math-column-cancel-all")?(t.removeClass("bulk-editing"),a(".rank-math-column-cancel","td.bulk-editing.dirty").trigger("click"),a("td.bulk-editing").removeClass("bulk-editing")):(e.toggleClass("bulk-editing"),a("td.column-"+e.attr("id")).toggleClass("bulk-editing"))})},editingEvents:function(){a(".rank-math-column-value").on("input",function(){var t=a(this),n=t.closest("td");t.text()!==t.prev().text()?n.addClass("dirty"):n.removeClass("dirty")}).on("keypress",function(t){if(13===t.keyCode)return a(this).parent().find(".rank-math-column-save").trigger("click"),!1}),a(".rank-math-column-cancel").on("click",function(t){t.preventDefault();var n=a(this).closest("td");n.removeClass("dirty");var e=n.find(".rank-math-column-value").prev(".rank-math-column-display");e.find("span").length&&(e=e.find("span")),n.find(".rank-math-column-value").text(e.text())})},saveEvents:function(){var t=this;a(".rank-math-column-save-all").on("click",function(n){n.preventDefault();var e={},r=[];a(".dirty.bulk-editing").each(function(){var t=a(this),n=parseInt(t.closest("tr").attr("id").replace("post-","")),i=t.find(".rank-math-column-value");r.push(t),e[n]=e[n]||{},e[n][i.data("field")]=i.text()}),t.save(e).done(function(n){n.success&&(r.forEach(function(n){t.setColumn(n)}),a(".rank-math-column-cancel-all","#rank_math_seo_details").trigger("click"))})}),a(".rank-math-column-save").on("click",function(n){n.preventDefault();var e=a(this).closest(".dirty"),r=parseInt(e.closest("tr").attr("id").replace("post-","")),i=e.find(".rank-math-column-value"),l={};l[r]={},l[r][i.data("field")]=i.text(),t.save(l).done(function(n){n.success&&t.setColumn(e)})})},setColumn:function(t){t.removeClass("dirty bulk-editing");var n=t.find(".rank-math-column-value").prev(".rank-math-column-display");n.find("span").length&&(n=n.find("span")),n.text(t.find(".rank-math-column-value").text())},save:function(t){return a.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"rank_math_bulk_edit_columns",security:rankMath.security,rows:t}})}},a(function(){r.init()})}});
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=
|
1 |
+
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=260)}({260:function(t,e,r){"use strict";var n;(n=jQuery)(function(){window.rankMathValidate={init:function(){this.extendLibrary(),this.watchFields()},extendLibrary:function(){n.validator.addMethod("regex",function(t,e,r){r="string"==typeof r?r:n(e).data("validate-pattern");var a=RegExp(r);return this.optional(e)||a.test(t)},rankMath.validationl10n.regexErrorDefault),n.extend(n.validator.messages,{required:rankMath.validationl10n.requiredErrorDefault,email:rankMath.validationl10n.emailErrorDefault,url:rankMath.validationl10n.urlErrorDefault}),n.extend(n.validator.defaults,{errorClass:"invalid"})},watchFields:function(){var t=this;n(".rank-math-validate-field").on("focus","input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea",function(){t.fieldValidation(n(this).closest("form"))})},fieldValidation:function(t){return"1"!==t.data("validated")&&(t.data("validated","1").validate(),!0)}},window.rankMathValidate.init()})}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function n(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(a,r,function(e){return t[e]}.bind(null,r));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=
|
1 |
+
!function(t){var e={};function n(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(a,r,function(e){return t[e]}.bind(null,r));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=210)}({210:function(t,e,n){"use strict";var a;(a=jQuery)(function(){window.rankMathSetupWizard={init:function(){rankMath.currentStep in this&&this[rankMath.currentStep](),a(document).on("cmb_init",function(){a(".cmb-multicheck-toggle",".multicheck-checked").trigger("click")})},compatibility:function(){a(".wizard-deactivate-plugin").on("click",function(t){t.preventDefault();var e=a(this);if(!e.hasClass("disabled")){var n=e.closest("tr");a.ajax({url:rankMath.ajaxurl,type:"POST",data:{action:"rank_math_deactivate_plugins",security:rankMath.security,plugin:e.data("plugin")}}).always(function(t){"1"===t?(n.find(".dashicons-warning").removeClass("dashicons-warning").addClass("dashicons-yes"),e.addClass("disabled").text(rankMath.deactivated)):console.log("Deactivation error")})}})},import:function(){function t(t,e){var n=new Date,a=e.val()+"["+(n.getHours()<10?"0":"")+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()+":"+(n.getSeconds()<10?"0":"")+n.getSeconds()+"] "+t+"\n";e.text(a).scrollTop(e[0].scrollHeight-e.height()-20)}function e(t){100<t&&(t=100),r.find(".number").html(t),r.find("#importBar").css("width",t+"%")}var n=a("#import-progress"),r=a("#import-progress-bar"),i=0,o=0;a(".button-import",".form-footer").on("click",function(i){if(i.preventDefault(),rankMath.isConfigured&&!window.confirm(rankMath.confirm))return!1;var s=a(this),u=a(".import-data:checkbox:checked"),l={},p=[];if(!u.length)return alert("Please select plugin to import data."),!1;a.each(u,function(t){var e=a(this).val(),n=a(this).parents(".cmb-group-description").next().find(":checkbox:checked"),r=n.data("active"),i=a(this).data("plugin");p.push(i);var c=a.map(n,function(t){return t.value});0<c.length&&r&&c.push("deactivate"),o+=c.length,l[e]={plugin:i,actions:c}}),s.prop("disabled",!0),n.show(),r.show(),r.find(".plugin-from").html(p.join()),t("Import started...",n),c(l,n,function(){e(100),s.prop("disabled",!1),a(".button",".form-footer").hide(),a(".button-continue").show()})});var c=function r(c,s,u){var l=Object.keys(c),p=l.length,h=c[l[0]],d=Object.keys(c)[0];if(delete c[d],0===p)return t("Import finished. Click on the button below to continue the Setup Wizard.",s),void u();!function n(r,c,s,u,l,p){if(0!==c.length){var h=c.shift(),d="deactivate"===h?"Deactivating "+p:"Importing "+h+" from "+p,g=Math.floor(100/o);u=u||1,t(d,s),a.ajax({url:rankMath.ajaxurl,type:"POST",data:{perform:h,pluginSlug:r,paged:u,action:"rank_math_import_plugin",security:rankMath.security}}).success(function(a){var o=1;a&&a.page&&a.page<a.total_pages&&(o=a.page+1,c.unshift(h)),a&&a.total_pages&&(g=Math.ceil(g/a.total_pages)),e(i+=g),t(a.success?a.message:a.error,s),n(r,c,s,o,l,p)}).error(function(e){t(e.statusText,s),n(r,c,s,null,l,p)})}else l()}(d,h.actions,n,null,function(){r(c,s,u)},h.plugin)};a(".import-data").on("change",function(){for(var t=this.checked,e=a(this).parents(".cmb-group-description").next().find(".cmb2-option"),n=0;n<e.length;n++)"checkbox"==e[n].type&&(e[n].checked=t);t&&("yoast"===a(this).val()?(a('.import-data[value="aioseo"]').prop("checked",!1).trigger("change"),a('.import-data[value="seopress"]').prop("checked",!1).trigger("change")):"aioseo"===a(this).val()?(a('.import-data[value="yoast"]').prop("checked",!1).trigger("change"),a('.import-data[value="seopress"]').prop("checked",!1).trigger("change")):"seopress"===a(this).val()&&(a('.import-data[value="yoast"]').prop("checked",!1).trigger("change"),a('.import-data[value="aioseo"]').prop("checked",!1).trigger("change")))}),a(".cmb-type-group .cmb2-checkbox-list .cmb2-option").on("click",function(){var t=a(this),e=t.attr("name"),n=t.parents("ul").find('input[name="'+e+'"]:checkbox:checked'),r=t.parents("ul").find('input[name="'+e+'"]');n.length===r.length&&t.parents(".cmb-type-group").find(".import-data").prop("checked",!0).trigger("change")}),a(".button-deactivate-plugins").on("click",function(t){var e=a(this);e.parents("form").find("input[data-active]").length&&(t.preventDefault(),e.text(e.data("deactivate-message")),a.ajax({url:rankMath.ajaxurl,type:"POST",data:{action:"rank_math_deactivate_plugins",security:rankMath.security,plugin:"all"}}).success(function(t){e.parents("form").trigger("submit")}).error(function(t){alert("Something went wrong! Please try again later.")}))})},yoursite:function(){a("#rank-math-search-input").on("input keypress",function(t){var e=a(this),n=e.next();if(13===t.keyCode||13===t.which){if("createEvent"in document){var r=this.ownerDocument,i=r.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,r.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null),n[0].dispatchEvent(i)}return!1}n.attr("href",n.data("href")+encodeURIComponent(e.val()))});var t=a("#business_type");0!==parseInt(t.data("default"))&&a("#site_type").on("change",function(){var e=a(this).val();"news"!==e&&"webshop"!==e&&"otherbusiness"!==e||t.val("Organization").trigger("change"),"business"===e&&t.val("LocalBusiness").trigger("change")})},searchconsole:function(){a("#console_authorization_code").on("paste",function(){var t=a(this).next(".button");setTimeout(function(){t.trigger("click")},100)})},ready:function(){a("#show-seo-score").on("change",function(t){a.ajax({url:rankMath.api.root+"rankmath/v1/enableScore",method:"POST",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",rankMath.api.nonce)},data:{enable:a(this).is(":checked")}}).done(function(t){console.log(t)})}),a(".rank-math-score-image img").on("click",function(t){return t.preventDefault(),a("#show-seo-score").trigger("click"),!1}),a("#auto-update").on("change",function(t){a.ajax({url:rankMath.api.root+"rankmath/v1/autoUpdate",method:"POST",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",rankMath.api.nonce)},data:{enable:a(this).is(":checked")}}).done(function(t){console.log(t)})})}},window.rankMathSetupWizard.init()})}});
|
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=212)}({212:function(e,t){function n(){return p||a.dom.getParent(a.selection.getNode(),"a[href]")}var i,r,l,a,o,s,c,u,p,d,h,f,w,k;i=jQuery,r=window.wpLinkL10n,l=window.wp,d=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,h=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,f={},w={},k="ontouchend"in document,window.wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",modalOpen:!1,init:function(){f.wrap=i("#wp-link-wrap"),f.dialog=i("#wp-link"),f.backdrop=i("#wp-link-backdrop"),f.submit=i("#wp-link-submit"),f.close=i("#wp-link-close");var e=i('<div class="link-nofollow"><label><span> </span> <input type="checkbox" id="wp-link-nofollow"> '+r.relCheckbox+"</label></div>"),t=i('<div class="wp-link-title-field"> <label><span>'+r.linkTitle+'</span> <input id="wp-link-title" type="text"></label></div>');e.insertAfter("#wp-link .link-target"),t.insertAfter("#wp-link .wp-link-text-field"),i("#wp-link .query-results").css("top","260px"),f.text=i("#wp-link-text"),f.url=i("#wp-link-url"),f.nonce=i("#_ajax_linking_nonce"),f.openInNewTab=i("#wp-link-target"),f.search=i("#wp-link-search"),f.nofollow=i("#wp-link-nofollow"),f.title=i("#wp-link-title"),w.search=new s(i("#search-results")),w.recent=new s(i("#most-recent-results")),w.elements=f.dialog.find(".query-results"),f.queryNotice=i("#query-notice-message"),f.queryNoticeTextDefault=f.queryNotice.find(".query-notice-default"),f.queryNoticeTextHint=f.queryNotice.find(".query-notice-hint"),f.dialog.keydown(wpLink.keydown),f.dialog.keyup(wpLink.keyup),f.submit.click(function(e){e.preventDefault(),wpLink.update()}),f.close.add(f.backdrop).add("#wp-link-cancel button").click(function(e){e.preventDefault(),wpLink.close()}),w.elements.on("river-select",wpLink.updateFields),f.search.on("focus.wplink",function(){f.queryNoticeTextDefault.hide(),f.queryNoticeTextHint.removeClass("screen-reader-text").show()}).on("blur.wplink",function(){f.queryNoticeTextDefault.show(),f.queryNoticeTextHint.addClass("screen-reader-text").hide()}),f.search.on("keyup input",function(){window.clearTimeout(o),o=window.setTimeout(function(){wpLink.searchInternalLinks()},500)}),f.url.on("paste",function(){setTimeout(wpLink.correctURL,0)}),f.url.on("blur",wpLink.correctURL)},correctURL:function(){var e=i.trim(f.url.val());e&&u!==e&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(e)&&(f.url.val("http://"+e),u=e)},open:function(e,t,n,r){var l,o=i(document.body);o.addClass("modal-open"),wpLink.modalOpen=!0,p=r,wpLink.range=null,e&&(window.wpActiveEditor=e),window.wpActiveEditor&&(this.textarea=i("#"+window.wpActiveEditor).get(0),void 0!==window.tinymce&&(o.append(f.backdrop,f.wrap),l=window.tinymce.get(window.wpActiveEditor),a=l&&!l.isHidden()?l:null),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),f.wrap.show(),f.backdrop.show(),wpLink.refresh(t,n),i(document).trigger("wplink-open",f.wrap))},isMCE:function(){return a&&!a.isHidden()},refresh:function(e,t){w.search.refresh(),w.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh(e,t):(f.wrap.hasClass("has-text-field")||f.wrap.addClass("has-text-field"),document.selection?document.selection.createRange():void 0!==this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(t=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||t||""),f.text.val(t),wpLink.setDefaultValues()),k?f.url.focus().blur():window.setTimeout(function(){f.url[0].select(),f.url.focus()}),w.recent.ul.children().length||w.recent.ajax(),u=f.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(e){var t,n,i,r=a.selection.getContent();if(/</.test(r)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(r)||!~r.indexOf("href=")))return!1;if(e){if(0===(n=e.childNodes).length)return!1;for(i=n.length-1;0<=i;i--)if(3!=(t=n[i]).nodeType&&!window.tinymce.dom.BookmarkManager.isBookmarkNode(t))return!1}return!0},mceRefresh:function(e,t){var l,o,s=n(),c=this.hasSelectedText(s);s?(l=s.textContent||s.innerText,o=a.dom.getAttrib(s,"href"),i.trim(l)||(l=t||""),e&&(h.test(e)||d.test(e))&&(o=e),"_wp_link_placeholder"!==o?(f.url.val(o),f.openInNewTab.prop("checked","_blank"===a.dom.getAttrib(s,"target")),f.nofollow.prop("checked","nofollow"===a.dom.getAttrib(s,"rel")),f.title.val(a.dom.getAttrib(s,"title")),f.submit.val(r.update)):this.setDefaultValues(l),f.search.val(e&&e!==o?e:""),window.setTimeout(function(){wpLink.searchInternalLinks()})):(l=a.selection.getContent({format:"text"})||t||"",this.setDefaultValues(l)),c?(f.text.val(l),f.wrap.addClass("has-text-field")):(f.text.val(""),f.wrap.removeClass("has-text-field"))},close:function(e){i(document.body).removeClass("modal-open"),wpLink.modalOpen=!1,"noReset"!==e&&(wpLink.isMCE()?(a.plugins.wplink&&a.plugins.wplink.close(),a.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))),f.backdrop.hide(),f.wrap.hide(),f.title.val(""),u=!1,i(document).trigger("wplink-close",f.wrap)},getAttrs:function(){wpLink.correctURL();var e={href:i.trim(f.url.val()),target:f.openInNewTab.prop("checked")?"_blank":null,rel:f.nofollow.prop("checked")?"nofollow":""};return i.trim(f.title.val())&&(e.title=i.trim(f.title.val())),e},buildHtml:function(e){var t='<a href="'+e.href+'"';return e.target&&(t+=' target="'+e.target+'"'),e.rel&&(t+=' rel="'+e.rel+'"'),e.title&&(t+=' title="'+e.title+'"'),t+">"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var e,t,n,a,o,s,c,u=wpLink.textarea;if(u){e=wpLink.getAttrs(),t=f.text.val();var p=document.createElement("a");p.href=e.href,"javascript:"!==p.protocol&&"data:"!==p.protocol||(e.href=""),e.href&&(n=wpLink.buildHtml(e),document.selection&&wpLink.range?(u.focus(),wpLink.range.text=n+(t||wpLink.range.text)+"</a>",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):void 0!==u.selectionStart&&(o=u.selectionEnd,s=(a=u.selectionStart)+(n=n+(c=t||u.value.substring(a,o))+"</a>").length,a!==o||c||(s-=4),u.value=u.value.substring(0,a)+n+u.value.substring(o,u.value.length),u.selectionStart=u.selectionEnd=s),wpLink.close(),u.focus(),i(u).trigger("change"),l.a11y.speak(r.linkInserted))}},mceUpdate:function(){var e,t,o,s,c=wpLink.getAttrs(),u=document.createElement("a");if(u.href=c.href,"javascript:"!==u.protocol&&"data:"!==u.protocol||(c.href=""),!c.href)return a.execCommand("unlink"),void wpLink.close();e=a.$(n()),a.undoManager.transact(function(){e.length||(a.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder","data-wp-temp-link":1}),e=a.$('a[data-wp-temp-link="1"]').removeAttr("data-wp-temp-link"),o=i.trim(e.text())),e.length?(f.wrap.hasClass("has-text-field")&&((t=f.text.val())?e.text(t):o||e.text(c.href)),c["data-wplink-edit"]=null,c["data-mce-href"]=null,c.hasOwnProperty("rel")&&!c.rel&&(c.rel=null),e.attr(c)):a.execCommand("unlink")}),wpLink.close("noReset"),a.focus(),e.length&&((s=e.parent("#_mce_caret")).length&&s.before(e.removeAttr("data-mce-bogus")),a.selection.select(e[0]),a.selection.collapse(),a.plugins.wplink&&a.plugins.wplink.checkLink(e[0])),a.nodeChanged(),f.title.val(""),l.a11y.speak(r.linkInserted)},updateFields:function(e,t){f.url.val(t.children(".item-permalink").val())},getUrlFromSelection:function(e){return e||(this.isMCE()?e=a.selection.getContent({format:"text"}):document.selection&&wpLink.range?e=wpLink.range.text:void 0!==this.textarea.selectionStart&&(e=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd))),(e=i.trim(e))&&d.test(e)?"mailto:"+e:e&&h.test(e)?e.replace(/&|�?38;/gi,"&"):""},setDefaultValues:function(e){f.url.val(this.getUrlFromSelection(e)),f.search.val(""),wpLink.searchInternalLinks(),f.submit.val(r.save)},searchInternalLinks:function(){var e,t=f.search.val()||"";if(2<t.length){if(w.recent.hide(),w.search.show(),wpLink.lastSearch===t)return;wpLink.lastSearch=t,e=f.search.parent().find(".spinner").addClass("is-active"),w.search.change(t),w.search.ajax(function(){e.removeClass("is-active")})}else w.search.hide(),w.recent.show()},next:function(){w.search.next(),w.recent.next()},prev:function(){w.search.prev(),w.recent.prev()},keydown:function(e){var t,n;27===e.keyCode?(wpLink.close(),e.stopImmediatePropagation()):9===e.keyCode&&("wp-link-submit"!==(n=e.target.id)||e.shiftKey?"wp-link-close"===n&&e.shiftKey&&(f.submit.focus(),e.preventDefault()):(f.close.focus(),e.preventDefault())),e.shiftKey||38!==e.keyCode&&40!==e.keyCode||document.activeElement&&("link-title-field"===document.activeElement.id||"url-field"===document.activeElement.id)||(t=38===e.keyCode?"prev":"next",clearInterval(wpLink.keyInterval),wpLink[t](),wpLink.keyInterval=setInterval(wpLink[t],wpLink.keySensitivity),e.preventDefault())},keyup:function(e){38!==e.keyCode&&40!==e.keyCode||(clearInterval(wpLink.keyInterval),e.preventDefault())},delayedCallback:function(e,t){var n,i,r,l;return t?(setTimeout(function(){if(i)return e.apply(l,r);n=!0},t),function(){if(n)return e.apply(this,arguments);r=arguments,l=this,i=!0}):e}},s=function(e,t){var n=this;this.element=e,this.ul=e.children("ul"),this.contentHeight=e.children("#link-selector-height"),this.waiting=e.find(".river-waiting"),this.change(t),this.refresh(),i("#wp-link .query-results, #wp-link #link-selector").scroll(function(){n.maybeLoad()}),e.on("click","li",function(e){n.select(i(this),e)})},i.extend(s.prototype,{refresh:function(){this.deselect(),this.visible=this.element.is(":visible")},show:function(){this.visible||(this.deselect(),this.element.show(),this.visible=!0)},hide:function(){this.element.hide(),this.visible=!1},select:function(e,t){var n,i,r,l;e.hasClass("unselectable")||e===this.selected||(this.deselect(),this.selected=e.addClass("selected"),n=e.outerHeight(),i=this.element.height(),r=e.position().top,l=this.element.scrollTop(),r<0?this.element.scrollTop(l+r):i<r+n&&this.element.scrollTop(l+r-i+n),this.element.trigger("river-select",[e,t,this]))},deselect:function(){this.selected&&this.selected.removeClass("selected"),this.selected=!1},prev:function(){var e;this.visible&&this.selected&&(e=this.selected.prev("li")).length&&this.select(e)},next:function(){if(this.visible){var e=this.selected?this.selected.next("li"):i("li:not(.unselectable):first",this.element);e.length&&this.select(e)}},ajax:function(e){var t=this,n=1==this.query.page?0:wpLink.minRiverAJAXDuration,i=wpLink.delayedCallback(function(n,i){t.process(n,i),e&&e(n,i)},n);this.query.ajax(i)},change:function(e){this.query&&this._search===e||(this._search=e,this.query=new c(e),this.element.scrollTop(0))},process:function(e,t){var n="",l=!0,a="",o=1===t.page;e?i.each(e,function(){a=l?"alternate":"",n+=(a+=this.title?"":" no-title")?'<li class="'+a+'">':"<li>",n+='<input type="hidden" class="item-permalink" value="'+this.permalink+'" />',n+='<span class="item-title">',n+=this.title?this.title:r.noTitle,n+='</span><span class="item-info">'+this.info+"</span></li>",l=!l}):o&&(n+='<li class="unselectable no-matches-found"><span class="item-title"><em>'+r.noMatchesFound+"</em></span></li>"),this.ul[o?"html":"append"](n)},maybeLoad:function(){var e=this,t=this.element,n=t.scrollTop()+t.height();this.query.ready()&&n>=this.contentHeight.height()-wpLink.riverBottomThreshold&&setTimeout(function(){var n=t.scrollTop(),i=n+t.height();e.query.ready()&&i>=e.contentHeight.height()-wpLink.riverBottomThreshold&&(e.waiting.addClass("is-active"),t.scrollTop(n+e.waiting.outerHeight()),e.ajax(function(){e.waiting.removeClass("is-active")}))},wpLink.timeToTriggerRiver)}}),i.extend((c=function(e){this.page=1,this.allLoaded=!1,this.querying=!1,this.search=e}).prototype,{ready:function(){return!(this.querying||this.allLoaded)},ajax:function(e){var t=this,n={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:f.nonce.val()};this.search&&(n.search=this.search),this.querying=!0,i.post(window.ajaxurl,n,function(i){t.page++,t.querying=!1,t.allLoaded=!i,e(i,n)},"json")}}),i(document).ready(wpLink.init)}});
|
1 |
+
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=211)}({211:function(e,t){function n(){return p||a.dom.getParent(a.selection.getNode(),"a[href]")}var i,r,l,a,o,s,c,u,p,d,h,f,w,k;i=jQuery,r=window.wpLinkL10n,l=window.wp,d=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,h=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,f={},w={},k="ontouchend"in document,window.wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",modalOpen:!1,init:function(){f.wrap=i("#wp-link-wrap"),f.dialog=i("#wp-link"),f.backdrop=i("#wp-link-backdrop"),f.submit=i("#wp-link-submit"),f.close=i("#wp-link-close");var e=i('<div class="link-nofollow"><label><span> </span> <input type="checkbox" id="wp-link-nofollow"> '+r.relCheckbox+"</label></div>"),t=i('<div class="wp-link-title-field"> <label><span>'+r.linkTitle+'</span> <input id="wp-link-title" type="text"></label></div>');e.insertAfter("#wp-link .link-target"),t.insertAfter("#wp-link .wp-link-text-field"),i("#wp-link .query-results").css("top","260px"),f.text=i("#wp-link-text"),f.url=i("#wp-link-url"),f.nonce=i("#_ajax_linking_nonce"),f.openInNewTab=i("#wp-link-target"),f.search=i("#wp-link-search"),f.nofollow=i("#wp-link-nofollow"),f.title=i("#wp-link-title"),w.search=new s(i("#search-results")),w.recent=new s(i("#most-recent-results")),w.elements=f.dialog.find(".query-results"),f.queryNotice=i("#query-notice-message"),f.queryNoticeTextDefault=f.queryNotice.find(".query-notice-default"),f.queryNoticeTextHint=f.queryNotice.find(".query-notice-hint"),f.dialog.keydown(wpLink.keydown),f.dialog.keyup(wpLink.keyup),f.submit.click(function(e){e.preventDefault(),wpLink.update()}),f.close.add(f.backdrop).add("#wp-link-cancel button").click(function(e){e.preventDefault(),wpLink.close()}),w.elements.on("river-select",wpLink.updateFields),f.search.on("focus.wplink",function(){f.queryNoticeTextDefault.hide(),f.queryNoticeTextHint.removeClass("screen-reader-text").show()}).on("blur.wplink",function(){f.queryNoticeTextDefault.show(),f.queryNoticeTextHint.addClass("screen-reader-text").hide()}),f.search.on("keyup input",function(){window.clearTimeout(o),o=window.setTimeout(function(){wpLink.searchInternalLinks()},500)}),f.url.on("paste",function(){setTimeout(wpLink.correctURL,0)}),f.url.on("blur",wpLink.correctURL)},correctURL:function(){var e=i.trim(f.url.val());e&&u!==e&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(e)&&(f.url.val("http://"+e),u=e)},open:function(e,t,n,r){var l,o=i(document.body);o.addClass("modal-open"),wpLink.modalOpen=!0,p=r,wpLink.range=null,e&&(window.wpActiveEditor=e),window.wpActiveEditor&&(this.textarea=i("#"+window.wpActiveEditor).get(0),void 0!==window.tinymce&&(o.append(f.backdrop,f.wrap),l=window.tinymce.get(window.wpActiveEditor),a=l&&!l.isHidden()?l:null),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),f.wrap.show(),f.backdrop.show(),wpLink.refresh(t,n),i(document).trigger("wplink-open",f.wrap))},isMCE:function(){return a&&!a.isHidden()},refresh:function(e,t){w.search.refresh(),w.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh(e,t):(f.wrap.hasClass("has-text-field")||f.wrap.addClass("has-text-field"),document.selection?document.selection.createRange():void 0!==this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(t=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||t||""),f.text.val(t),wpLink.setDefaultValues()),k?f.url.focus().blur():window.setTimeout(function(){f.url[0].select(),f.url.focus()}),w.recent.ul.children().length||w.recent.ajax(),u=f.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(e){var t,n,i,r=a.selection.getContent();if(/</.test(r)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(r)||!~r.indexOf("href=")))return!1;if(e){if(0===(n=e.childNodes).length)return!1;for(i=n.length-1;0<=i;i--)if(3!=(t=n[i]).nodeType&&!window.tinymce.dom.BookmarkManager.isBookmarkNode(t))return!1}return!0},mceRefresh:function(e,t){var l,o,s=n(),c=this.hasSelectedText(s);s?(l=s.textContent||s.innerText,o=a.dom.getAttrib(s,"href"),i.trim(l)||(l=t||""),e&&(h.test(e)||d.test(e))&&(o=e),"_wp_link_placeholder"!==o?(f.url.val(o),f.openInNewTab.prop("checked","_blank"===a.dom.getAttrib(s,"target")),f.nofollow.prop("checked","nofollow"===a.dom.getAttrib(s,"rel")),f.title.val(a.dom.getAttrib(s,"title")),f.submit.val(r.update)):this.setDefaultValues(l),f.search.val(e&&e!==o?e:""),window.setTimeout(function(){wpLink.searchInternalLinks()})):(l=a.selection.getContent({format:"text"})||t||"",this.setDefaultValues(l)),c?(f.text.val(l),f.wrap.addClass("has-text-field")):(f.text.val(""),f.wrap.removeClass("has-text-field"))},close:function(e){i(document.body).removeClass("modal-open"),wpLink.modalOpen=!1,"noReset"!==e&&(wpLink.isMCE()?(a.plugins.wplink&&a.plugins.wplink.close(),a.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))),f.backdrop.hide(),f.wrap.hide(),f.title.val(""),u=!1,i(document).trigger("wplink-close",f.wrap)},getAttrs:function(){wpLink.correctURL();var e={href:i.trim(f.url.val()),target:f.openInNewTab.prop("checked")?"_blank":null,rel:f.nofollow.prop("checked")?"nofollow":""};return i.trim(f.title.val())&&(e.title=i.trim(f.title.val())),e},buildHtml:function(e){var t='<a href="'+e.href+'"';return e.target&&(t+=' target="'+e.target+'"'),e.rel&&(t+=' rel="'+e.rel+'"'),e.title&&(t+=' title="'+e.title+'"'),t+">"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var e,t,n,a,o,s,c,u=wpLink.textarea;if(u){e=wpLink.getAttrs(),t=f.text.val();var p=document.createElement("a");p.href=e.href,"javascript:"!==p.protocol&&"data:"!==p.protocol||(e.href=""),e.href&&(n=wpLink.buildHtml(e),document.selection&&wpLink.range?(u.focus(),wpLink.range.text=n+(t||wpLink.range.text)+"</a>",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):void 0!==u.selectionStart&&(o=u.selectionEnd,s=(a=u.selectionStart)+(n=n+(c=t||u.value.substring(a,o))+"</a>").length,a!==o||c||(s-=4),u.value=u.value.substring(0,a)+n+u.value.substring(o,u.value.length),u.selectionStart=u.selectionEnd=s),wpLink.close(),u.focus(),i(u).trigger("change"),l.a11y.speak(r.linkInserted))}},mceUpdate:function(){var e,t,o,s,c=wpLink.getAttrs(),u=document.createElement("a");if(u.href=c.href,"javascript:"!==u.protocol&&"data:"!==u.protocol||(c.href=""),!c.href)return a.execCommand("unlink"),void wpLink.close();e=a.$(n()),a.undoManager.transact(function(){e.length||(a.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder","data-wp-temp-link":1}),e=a.$('a[data-wp-temp-link="1"]').removeAttr("data-wp-temp-link"),o=i.trim(e.text())),e.length?(f.wrap.hasClass("has-text-field")&&((t=f.text.val())?e.text(t):o||e.text(c.href)),c["data-wplink-edit"]=null,c["data-mce-href"]=null,c.hasOwnProperty("rel")&&!c.rel&&(c.rel=null),e.attr(c)):a.execCommand("unlink")}),wpLink.close("noReset"),a.focus(),e.length&&((s=e.parent("#_mce_caret")).length&&s.before(e.removeAttr("data-mce-bogus")),a.selection.select(e[0]),a.selection.collapse(),a.plugins.wplink&&a.plugins.wplink.checkLink(e[0])),a.nodeChanged(),f.title.val(""),l.a11y.speak(r.linkInserted)},updateFields:function(e,t){f.url.val(t.children(".item-permalink").val())},getUrlFromSelection:function(e){return e||(this.isMCE()?e=a.selection.getContent({format:"text"}):document.selection&&wpLink.range?e=wpLink.range.text:void 0!==this.textarea.selectionStart&&(e=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd))),(e=i.trim(e))&&d.test(e)?"mailto:"+e:e&&h.test(e)?e.replace(/&|�?38;/gi,"&"):""},setDefaultValues:function(e){f.url.val(this.getUrlFromSelection(e)),f.search.val(""),wpLink.searchInternalLinks(),f.submit.val(r.save)},searchInternalLinks:function(){var e,t=f.search.val()||"";if(2<t.length){if(w.recent.hide(),w.search.show(),wpLink.lastSearch===t)return;wpLink.lastSearch=t,e=f.search.parent().find(".spinner").addClass("is-active"),w.search.change(t),w.search.ajax(function(){e.removeClass("is-active")})}else w.search.hide(),w.recent.show()},next:function(){w.search.next(),w.recent.next()},prev:function(){w.search.prev(),w.recent.prev()},keydown:function(e){var t,n;27===e.keyCode?(wpLink.close(),e.stopImmediatePropagation()):9===e.keyCode&&("wp-link-submit"!==(n=e.target.id)||e.shiftKey?"wp-link-close"===n&&e.shiftKey&&(f.submit.focus(),e.preventDefault()):(f.close.focus(),e.preventDefault())),e.shiftKey||38!==e.keyCode&&40!==e.keyCode||document.activeElement&&("link-title-field"===document.activeElement.id||"url-field"===document.activeElement.id)||(t=38===e.keyCode?"prev":"next",clearInterval(wpLink.keyInterval),wpLink[t](),wpLink.keyInterval=setInterval(wpLink[t],wpLink.keySensitivity),e.preventDefault())},keyup:function(e){38!==e.keyCode&&40!==e.keyCode||(clearInterval(wpLink.keyInterval),e.preventDefault())},delayedCallback:function(e,t){var n,i,r,l;return t?(setTimeout(function(){if(i)return e.apply(l,r);n=!0},t),function(){if(n)return e.apply(this,arguments);r=arguments,l=this,i=!0}):e}},s=function(e,t){var n=this;this.element=e,this.ul=e.children("ul"),this.contentHeight=e.children("#link-selector-height"),this.waiting=e.find(".river-waiting"),this.change(t),this.refresh(),i("#wp-link .query-results, #wp-link #link-selector").scroll(function(){n.maybeLoad()}),e.on("click","li",function(e){n.select(i(this),e)})},i.extend(s.prototype,{refresh:function(){this.deselect(),this.visible=this.element.is(":visible")},show:function(){this.visible||(this.deselect(),this.element.show(),this.visible=!0)},hide:function(){this.element.hide(),this.visible=!1},select:function(e,t){var n,i,r,l;e.hasClass("unselectable")||e===this.selected||(this.deselect(),this.selected=e.addClass("selected"),n=e.outerHeight(),i=this.element.height(),r=e.position().top,l=this.element.scrollTop(),r<0?this.element.scrollTop(l+r):i<r+n&&this.element.scrollTop(l+r-i+n),this.element.trigger("river-select",[e,t,this]))},deselect:function(){this.selected&&this.selected.removeClass("selected"),this.selected=!1},prev:function(){var e;this.visible&&this.selected&&(e=this.selected.prev("li")).length&&this.select(e)},next:function(){if(this.visible){var e=this.selected?this.selected.next("li"):i("li:not(.unselectable):first",this.element);e.length&&this.select(e)}},ajax:function(e){var t=this,n=1==this.query.page?0:wpLink.minRiverAJAXDuration,i=wpLink.delayedCallback(function(n,i){t.process(n,i),e&&e(n,i)},n);this.query.ajax(i)},change:function(e){this.query&&this._search===e||(this._search=e,this.query=new c(e),this.element.scrollTop(0))},process:function(e,t){var n="",l=!0,a="",o=1===t.page;e?i.each(e,function(){a=l?"alternate":"",n+=(a+=this.title?"":" no-title")?'<li class="'+a+'">':"<li>",n+='<input type="hidden" class="item-permalink" value="'+this.permalink+'" />',n+='<span class="item-title">',n+=this.title?this.title:r.noTitle,n+='</span><span class="item-info">'+this.info+"</span></li>",l=!l}):o&&(n+='<li class="unselectable no-matches-found"><span class="item-title"><em>'+r.noMatchesFound+"</em></span></li>"),this.ul[o?"html":"append"](n)},maybeLoad:function(){var e=this,t=this.element,n=t.scrollTop()+t.height();this.query.ready()&&n>=this.contentHeight.height()-wpLink.riverBottomThreshold&&setTimeout(function(){var n=t.scrollTop(),i=n+t.height();e.query.ready()&&i>=e.contentHeight.height()-wpLink.riverBottomThreshold&&(e.waiting.addClass("is-active"),t.scrollTop(n+e.waiting.outerHeight()),e.ajax(function(){e.waiting.removeClass("is-active")}))},wpLink.timeToTriggerRiver)}}),i.extend((c=function(e){this.page=1,this.allLoaded=!1,this.querying=!1,this.search=e}).prototype,{ready:function(){return!(this.querying||this.allLoaded)},ajax:function(e){var t=this,n={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:f.nonce.val()};this.search&&(n.search=this.search),this.querying=!0,i.post(window.ajaxurl,n,function(i){t.page++,t.querying=!1,t.allLoaded=!i,e(i,n)},"json")}}),i(document).ready(wpLink.init)}});
|
@@ -2,7 +2,7 @@
|
|
2 |
* Rank Math
|
3 |
*
|
4 |
* @version 0.9.0
|
5 |
-
* @author
|
6 |
*/
|
7 |
;(function( $ ) {
|
8 |
|
2 |
* Rank Math
|
3 |
*
|
4 |
* @version 0.9.0
|
5 |
+
* @author RankMath
|
6 |
*/
|
7 |
;(function( $ ) {
|
8 |
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @license
|
3 |
+
* Lodash https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.fp.min.js
|
4 |
+
*/
|
5 |
+
(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()})(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&"function"==typeof _.runInContext&&(_=n(_.runInContext())),
|
6 |
+
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){for(var r=arguments.length,n=r-1,i=Array(r);r--;)i[r]=arguments[r];var a=i[e],o=i.slice(0,e);return a&&d.apply(o,a),
|
7 |
+
e!=n&&d.apply(o,i.slice(e+1)),t.apply(this,o)}}function l(t,e){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),i}}}function u(t,e,r,d){function c(t,e){if(b.cap){var r=p.iterateeRearg[t];if(r)return x(e,r);var n=!O&&p.iterateeAry[t];if(n)return W(e,n)}return e}function h(t,e,r){return E||b.curry&&r>1?D(e,r):e}function g(t,e,r){if(b.fixed&&(F||!p.skipFixed[t])){var n=p.methodSpread[t],i=n&&n.start;return void 0===i?L(e,r):s(e,i);
|
8 |
+
}return e}function y(t,e,r){return b.rearg&&r>1&&(M||!p.skipRearg[t])?N(e,p.methodRearg[t]||p.aryRearg[r]):e}function m(t,e){e=U(e);for(var r=-1,n=e.length,i=n-1,a=w(Object(t)),o=a;null!=o&&++r<n;){var s=e[r],l=o[s];null==l||T(l)||P(l)||K(l)||(o[s]=w(r==i?l:Object(l))),o=o[s]}return a}function v(t){return J.runInContext.convert(t)(void 0)}function A(t,e){var r=p.aliasToReal[t]||t,n=p.remap[r]||r,i=d;return function(t){return u(O?j:C,r,O?j[n]:e,S(S({},i),t))}}function W(t,e){return I(t,function(t){
|
9 |
+
return"function"==typeof t?i(t,e):t})}function x(t,e){return I(t,function(t){var r=e.length;return n(N(i(t,r),e),r)})}function I(t,e){return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=b.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function R(t,e,r){var n,i=p.aliasToReal[t]||t,s=e,u=H[i];return u?s=u(e):b.immutable&&(p.mutate.array[i]?s=l(e,a):p.mutate.object[i]?s=l(e,o(e)):p.mutate.set[i]&&(s=l(e,m))),z(G,function(t){return z(p.aryMethod[t],function(e){
|
10 |
+
if(i==e){var r=p.methodSpread[i];return n=r&&r.afterRearg?g(i,y(i,s,t),t):y(i,g(i,s,t),t),n=c(i,n),n=h(i,n,t),!1}}),!n}),n||(n=s),n==e&&(n=E?D(n,1):function(){return e.apply(this,arguments)}),n.convert=A(i,e),n.placeholder=e.placeholder=r,n}var O="function"==typeof e,k=e===Object(e);if(k&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var b={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg
|
11 |
+
},B=O?r:f,E="curry"in d&&d.curry,F="fixed"in d&&d.fixed,M="rearg"in d&&d.rearg,j=O?r.runInContext():void 0,C=O?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},L=C.ary,S=C.assign,w=C.clone,D=C.curry,z=C.forEach,q=C.isArray,P=C.isError,T=C.isFunction,K=C.isWeakMap,_=C.keys,N=C.rearg,V=C.toInteger,U=C.toPath,G=_(p.aryMethod),H={
|
12 |
+
castArray:function(t){return function(){var e=arguments[0];return q(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return b.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return z(_(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),z(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]];
|
13 |
+
}),r}},nthArg:function(t){return function(e){var r=e<0?1:V(e)+1;return D(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return D(t(e,r),n)}},runInContext:function(e){return function(r){return u(t,e(r),d)}}};if(!k)return R(e,r,B);var J=r,Q=[];return z(G,function(t){z(p.aryMethod[t],function(t){var e=J[p.remap[t]||t];e&&Q.push([t,R(t,e,J)])})}),z(_(J),function(t){var e=J[t];if("function"==typeof e){for(var r=Q.length;r--;)if(Q[r][0]==t)return;e.convert=A(t,e),Q.push([t,e])}}),z(Q,function(t){
|
14 |
+
J[t[0]]=t[1]}),J.convert=v,J.placeholder=J,z(_(J),function(t){z(p.realToAlias[t]||[],function(e){J[e]=J[t]})}),J}var p=r(2),f=r(3),d=Array.prototype.push;t.exports=u},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",
|
15 |
+
always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",
|
16 |
+
props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],
|
17 |
+
2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
|
18 |
+
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],
|
19 |
+
4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,
|
20 |
+
transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],
|
21 |
+
sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,
|
22 |
+
pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={
|
23 |
+
assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",
|
24 |
+
padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,
|
25 |
+
propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])});
|
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function R(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,J=/[+-]?\d{6}/,B=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),H("year","y"),L("year",1),ue("Y",se),ue("YY",B,z),ue("YYYY",ee,q),ue("YYYYY",te,J),ue("YYYYYY",te,J),ce(["YYYYY","YYYYYY"],me),ce("YYYY",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce("YY",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te("FullYear",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),H("month","M"),L("month",8),ue("M",B),ue("MM",B,z),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[_e]=k(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,"Month")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split("-")).length,n=(n=rt(e[r+1]))?n.split("-"):null;0<t;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&""===r?v({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ue("Z",re),ue("ZZ",re),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Lt)||["-",0,0],i=60*s[1]+k(s[2]);return 0===i?0:"+"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,At(e="string"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,"Month")+a*n),r&&be(e,"Date",xe(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,"add"),Jt=zt(-1,"subtract");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",B,z),ue("gg",B,z),ue("GGGG",ee,q),ue("gggg",ee,q),ue("GGGGG",te,J),ue("ggggg",te,J),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),H("quarter","Q"),L("quarter",7),ue("Q",Z),ce("Q",function(e,t){t[_e]=3*(k(e)-1)}),I("D",["DD",2],"Do","date"),H("date","D"),L("date",9),ue("D",B),ue("DD",B,z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ye),ce("Do",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),L("dayOfYear",4),ue("DDD",K),ue("DDDD",$),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),I("m",["mm",2],0,"minute"),H("minute","m"),L("minute",14),ue("m",B),ue("mm",B,z),ce(["m","mm"],pe);var sn=Te("Minutes",!1);I("s",["ss",2],0,"second"),H("second","s"),L("second",15),ue("s",B),ue("ss",B,z),ce(["s","ss"],ve);var rn,an=Te("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),L("millisecond",16),ue("S",K,Z),ue("SS",K,z),ue("SSS",K,$),rn="SSSS";rn.length<=9;rn+="S")ue(rn,ne);function on(e,t){t[we]=k(1e3*("0."+e))}for(rn="S";rn.length<=9;rn+="S")ce(rn,on);var un=Te("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf("day"),i=c.calendarFormat(this,s)||"sameElse",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),"string"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,"month");return i}function mn(e,t,n,s){"boolean"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||"";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,"day");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",ot),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn("ms"),Sn=wn("s"),Dn=wn("m"),kn=wn("h"),Yn=wn("d"),On=wn("w"),Tn=wn("M"),xn=wn("y");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn("milliseconds"),Wn=bn("seconds"),Hn=bn("minutes"),Rn=bn("hours"),Cn=bn("days"),Fn=bn("months"),Ln=bn("years");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",m=Vn(this._days)!==Vn(h)?"-":"",_=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+pn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as("s")),a=Un(i.as("m")),o=Un(i.as("h")),u=Un(i.as("d")),l=Un(i.as("M")),d=Un(i.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||a<=1&&["m"]||a<Nn.m&&["mm",a]||o<=1&&["h"]||o<Nn.h&&["hh",o]||u<=1&&["d"]||u<Nn.d&&["dd",u]||l<=1&&["M"]||l<Nn.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",En),In.lang=Xt,I("X",0,0,"unix"),I("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(k(e))}),c.version="2.22.2",e=Tt,c.fn=ln,c.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,"months")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,"s"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c});
|
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Admin helper Functions.
|
4 |
*
|
5 |
-
* This file contains functions
|
6 |
*
|
7 |
* @since 0.9.0
|
8 |
* @package RankMath
|
@@ -57,7 +57,7 @@ class Admin_Helper {
|
|
57 |
}
|
58 |
|
59 |
/**
|
60 |
-
* Get htaccess related data.
|
61 |
*
|
62 |
* @return array
|
63 |
*/
|
@@ -72,7 +72,7 @@ class Admin_Helper {
|
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
-
* Get tooltip
|
76 |
*
|
77 |
* @param string $message Message to show in tooltip.
|
78 |
* @return string
|
@@ -171,7 +171,7 @@ class Admin_Helper {
|
|
171 |
}
|
172 |
|
173 |
/**
|
174 |
-
* Authenticate user
|
175 |
*
|
176 |
* @param string $username Username for registration.
|
177 |
* @param string $password Password for registration.
|
2 |
/**
|
3 |
* Admin helper Functions.
|
4 |
*
|
5 |
+
* This file contains functions needed on the admin screens.
|
6 |
*
|
7 |
* @since 0.9.0
|
8 |
* @package RankMath
|
57 |
}
|
58 |
|
59 |
/**
|
60 |
+
* Get .htaccess related data.
|
61 |
*
|
62 |
* @return array
|
63 |
*/
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
+
* Get tooltip HTML.
|
76 |
*
|
77 |
* @param string $message Message to show in tooltip.
|
78 |
* @return string
|
171 |
}
|
172 |
|
173 |
/**
|
174 |
+
* Authenticate user on RankMath.com.
|
175 |
*
|
176 |
* @param string $username Username for registration.
|
177 |
* @param string $password Password for registration.
|
@@ -56,10 +56,10 @@ class Admin implements Runner {
|
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
* Add Facebook and Twitter as contact
|
60 |
*
|
61 |
-
* @param array $contactmethods Current
|
62 |
-
* @return array New
|
63 |
*/
|
64 |
public function update_user_contactmethods( $contactmethods ) {
|
65 |
$contactmethods['twitter'] = esc_html__( 'Twitter username (without @)', 'rank-math' );
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
+
* Add Facebook and Twitter as user contact methods.
|
60 |
*
|
61 |
+
* @param array $contactmethods Current contact methods.
|
62 |
+
* @return array New contact methods with extra items.
|
63 |
*/
|
64 |
public function update_user_contactmethods( $contactmethods ) {
|
65 |
$contactmethods['twitter'] = esc_html__( 'Twitter username (without @)', 'rank-math' );
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -26,7 +26,7 @@ class Assets implements Runner {
|
|
26 |
use Hooker;
|
27 |
|
28 |
/**
|
29 |
-
* Prefix for
|
30 |
*/
|
31 |
const PREFIX = 'rank-math-';
|
32 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Register all the necessary CSS and JS.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
26 |
use Hooker;
|
27 |
|
28 |
/**
|
29 |
+
* Prefix for the enqueue handles.
|
30 |
*/
|
31 |
const PREFIX = 'rank-math-';
|
32 |
|
@@ -35,7 +35,7 @@ class Deactivate_Survey implements Runner {
|
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
-
* Send
|
39 |
*/
|
40 |
public function deactivate_feedback() {
|
41 |
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
+
* Send deactivation feedback to the Rank Math API.
|
39 |
*/
|
40 |
public function deactivate_feedback() {
|
41 |
|
@@ -85,8 +85,12 @@ class Metabox implements Runner {
|
|
85 |
wp_enqueue_script( 'rank-math-assessor', $js . 'assessor.js', null, rank_math()->version, true );
|
86 |
|
87 |
if ( ! wp_script_is( 'wp-hooks', 'registered' ) ) {
|
88 |
-
wp_register_script( 'wp-hooks',
|
89 |
}
|
|
|
|
|
|
|
|
|
90 |
if ( Admin_Helper::is_post_edit() ) {
|
91 |
global $post;
|
92 |
Helper::add_json( 'objectID', $post->ID );
|
85 |
wp_enqueue_script( 'rank-math-assessor', $js . 'assessor.js', null, rank_math()->version, true );
|
86 |
|
87 |
if ( ! wp_script_is( 'wp-hooks', 'registered' ) ) {
|
88 |
+
wp_register_script( 'wp-hooks', rank_math()->plugin_url() . 'assets/vendor/hooks.js', [], rank_math()->version, true );
|
89 |
}
|
90 |
+
if ( ! wp_script_is( 'lodash', 'registered' ) ) {
|
91 |
+
wp_register_script( 'lodash', rank_math()->plugin_url() . 'assets/vendor/lodash.js', [], rank_math()->version );
|
92 |
+
}
|
93 |
+
|
94 |
if ( Admin_Helper::is_post_edit() ) {
|
95 |
global $post;
|
96 |
Helper::add_json( 'objectID', $post->ID );
|
@@ -239,7 +239,7 @@ class Options {
|
|
239 |
/**
|
240 |
* Add classes to <body> of WordPress admin.
|
241 |
*
|
242 |
-
* @param string $classes
|
243 |
* @return string
|
244 |
*/
|
245 |
public function body_class( $classes = '' ) {
|
@@ -249,7 +249,7 @@ class Options {
|
|
249 |
/**
|
250 |
* Display Setting on a page.
|
251 |
*
|
252 |
-
* @param CMB2_Options $machine
|
253 |
*/
|
254 |
public function display( $machine ) {
|
255 |
$cmb = $machine->cmb;
|
239 |
/**
|
240 |
* Add classes to <body> of WordPress admin.
|
241 |
*
|
242 |
+
* @param string $classes List of CSS classes.
|
243 |
* @return string
|
244 |
*/
|
245 |
public function body_class( $classes = '' ) {
|
249 |
/**
|
250 |
* Display Setting on a page.
|
251 |
*
|
252 |
+
* @param CMB2_Options $machine Current CMB2 box object.
|
253 |
*/
|
254 |
public function display( $machine ) {
|
255 |
$cmb = $machine->cmb;
|
@@ -173,9 +173,9 @@ class Post_Columns implements Runner {
|
|
173 |
}
|
174 |
|
175 |
/**
|
176 |
-
* Add columns for SEO title, description and focus keywords.
|
177 |
*
|
178 |
-
* @param array $columns
|
179 |
* @return array
|
180 |
*/
|
181 |
public function add_columns( $columns ) {
|
@@ -192,9 +192,9 @@ class Post_Columns implements Runner {
|
|
192 |
}
|
193 |
|
194 |
/**
|
195 |
-
* Make
|
196 |
*
|
197 |
-
* @param array $columns
|
198 |
* @return array
|
199 |
*/
|
200 |
public function sortable_columns( $columns ) {
|
@@ -204,7 +204,7 @@ class Post_Columns implements Runner {
|
|
204 |
}
|
205 |
|
206 |
/**
|
207 |
-
* Add columns for Media Alt & Title.
|
208 |
*
|
209 |
* @param array $columns An array of column names.
|
210 |
* @return array
|
@@ -357,7 +357,7 @@ class Post_Columns implements Runner {
|
|
357 |
}
|
358 |
|
359 |
/**
|
360 |
-
* Get
|
361 |
*
|
362 |
* @param int $score Score.
|
363 |
*
|
173 |
}
|
174 |
|
175 |
/**
|
176 |
+
* Add new columns for SEO title, description and focus keywords.
|
177 |
*
|
178 |
+
* @param array $columns Array of column names.
|
179 |
* @return array
|
180 |
*/
|
181 |
public function add_columns( $columns ) {
|
192 |
}
|
193 |
|
194 |
/**
|
195 |
+
* Make the SEO Score column sortable.
|
196 |
*
|
197 |
+
* @param array $columns Array of column names.
|
198 |
* @return array
|
199 |
*/
|
200 |
public function sortable_columns( $columns ) {
|
204 |
}
|
205 |
|
206 |
/**
|
207 |
+
* Add new columns for Media Alt & Title.
|
208 |
*
|
209 |
* @param array $columns An array of column names.
|
210 |
* @return array
|
357 |
}
|
358 |
|
359 |
/**
|
360 |
+
* Get SEO score rating string: great/good/bad.
|
361 |
*
|
362 |
* @param int $score Score.
|
363 |
*
|
@@ -206,7 +206,7 @@ class Post_Filters implements Runner {
|
|
206 |
}
|
207 |
|
208 |
/**
|
209 |
-
* Can apply
|
210 |
*
|
211 |
* @return bool
|
212 |
*/
|
@@ -282,7 +282,7 @@ class Post_Filters implements Runner {
|
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
-
* Check if Focus Keyword
|
286 |
*
|
287 |
* @return bool|array
|
288 |
*/
|
206 |
}
|
207 |
|
208 |
/**
|
209 |
+
* Can apply SEO filters.
|
210 |
*
|
211 |
* @return bool
|
212 |
*/
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
+
* Check if Focus Keyword appears in the title.
|
286 |
*
|
287 |
* @return bool|array
|
288 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Setup Wizard - configure the SEO settings in a few steps.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -160,7 +160,7 @@ class Registration {
|
|
160 |
}
|
161 |
|
162 |
/**
|
163 |
-
*
|
164 |
*/
|
165 |
public function render_page() {
|
166 |
|
@@ -202,7 +202,7 @@ class Registration {
|
|
202 |
}
|
203 |
|
204 |
/**
|
205 |
-
* Render page.
|
206 |
*/
|
207 |
protected function body() {
|
208 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Setup Wizard - configure the SEO settings in just a few steps.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
160 |
}
|
161 |
|
162 |
/**
|
163 |
+
* Output the admin page.
|
164 |
*/
|
165 |
public function render_page() {
|
166 |
|
202 |
}
|
203 |
|
204 |
/**
|
205 |
+
* Render page body.
|
206 |
*/
|
207 |
protected function body() {
|
208 |
?>
|
@@ -428,7 +428,7 @@ class Serp_Checklist {
|
|
428 |
}
|
429 |
|
430 |
/**
|
431 |
-
* Get heading of the checklist
|
432 |
*
|
433 |
* @param string $id ID of the checklist section.
|
434 |
* @return string
|
428 |
}
|
429 |
|
430 |
/**
|
431 |
+
* Get heading of the checklist group.
|
432 |
*
|
433 |
* @param string $id ID of the checklist section.
|
434 |
* @return string
|
@@ -49,7 +49,7 @@ class Serp_Preview {
|
|
49 |
<div class="serp-preview-wrapper">
|
50 |
<div class="serp-preview-bg">
|
51 |
<div class="serp-preview-input">
|
52 |
-
<input type="text" value="
|
53 |
<span class="serp-search">
|
54 |
<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>
|
55 |
</span>
|
49 |
<div class="serp-preview-wrapper">
|
50 |
<div class="serp-preview-bg">
|
51 |
<div class="serp-preview-input">
|
52 |
+
<input type="text" value="RankMath" disabled />
|
53 |
<span class="serp-search">
|
54 |
<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>
|
55 |
</span>
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Setup Wizard - configure the SEO settings in a few steps.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -237,11 +237,11 @@ class Setup_Wizard {
|
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
-
*
|
241 |
*/
|
242 |
public function admin_page() {
|
243 |
|
244 |
-
// Do not proceed
|
245 |
if ( Param::get( 'page' ) !== $this->slug ) {
|
246 |
return;
|
247 |
}
|
@@ -276,7 +276,7 @@ class Setup_Wizard {
|
|
276 |
}
|
277 |
|
278 |
/**
|
279 |
-
*
|
280 |
*
|
281 |
* @param string $slug Slug of nav item.
|
282 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Setup Wizard - configure the SEO settings in just a few steps.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
+
* Output the admin page.
|
241 |
*/
|
242 |
public function admin_page() {
|
243 |
|
244 |
+
// Do not proceed if we're not on the right page.
|
245 |
if ( Param::get( 'page' ) !== $this->slug ) {
|
246 |
return;
|
247 |
}
|
276 |
}
|
277 |
|
278 |
/**
|
279 |
+
* Check if navigation item is hidden or not.
|
280 |
*
|
281 |
* @param string $slug Slug of nav item.
|
282 |
*
|
@@ -30,49 +30,49 @@ abstract class Plugin_Importer {
|
|
30 |
use Hooker, Ajax, Meta;
|
31 |
|
32 |
/**
|
33 |
-
* The plugin name
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
protected $plugin_name;
|
38 |
|
39 |
/**
|
40 |
-
* The plugin file
|
41 |
*
|
42 |
* @var string
|
43 |
*/
|
44 |
protected $plugin_file;
|
45 |
|
46 |
/**
|
47 |
-
*
|
48 |
*
|
49 |
* @var string
|
50 |
*/
|
51 |
protected $meta_key;
|
52 |
|
53 |
/**
|
54 |
-
*
|
55 |
*
|
56 |
* @var array
|
57 |
*/
|
58 |
protected $option_keys;
|
59 |
|
60 |
/**
|
61 |
-
*
|
62 |
*
|
63 |
* @var array
|
64 |
*/
|
65 |
protected $table_names;
|
66 |
|
67 |
/**
|
68 |
-
*
|
69 |
*
|
70 |
* @var array
|
71 |
*/
|
72 |
protected $choices;
|
73 |
|
74 |
/**
|
75 |
-
*
|
76 |
*
|
77 |
* @var int
|
78 |
*/
|
@@ -86,7 +86,7 @@ abstract class Plugin_Importer {
|
|
86 |
protected $_pagination_args = [];
|
87 |
|
88 |
/**
|
89 |
-
* Class constructor
|
90 |
*
|
91 |
* @param string $plugin_file Plugins file.
|
92 |
*/
|
@@ -95,16 +95,16 @@ abstract class Plugin_Importer {
|
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
-
*
|
99 |
*
|
100 |
-
* @return string Plugin name
|
101 |
*/
|
102 |
public function get_plugin_name() {
|
103 |
return $this->plugin_name;
|
104 |
}
|
105 |
|
106 |
/**
|
107 |
-
*
|
108 |
*
|
109 |
* @return string Plugin file
|
110 |
*/
|
@@ -113,7 +113,7 @@ abstract class Plugin_Importer {
|
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
-
*
|
117 |
*
|
118 |
* @return array
|
119 |
*/
|
@@ -138,16 +138,16 @@ abstract class Plugin_Importer {
|
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
-
*
|
142 |
*
|
143 |
-
* @return bool
|
144 |
*/
|
145 |
public function run_detect() {
|
146 |
return true === $this->has_options() ? true : $this->has_postmeta();
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
-
*
|
151 |
*
|
152 |
* @return bool
|
153 |
*/
|
@@ -164,9 +164,9 @@ abstract class Plugin_Importer {
|
|
164 |
}
|
165 |
|
166 |
/**
|
167 |
-
* Run importer
|
168 |
*
|
169 |
-
* @throws Exception
|
170 |
*
|
171 |
* @param string $perform The action to perform when running import action.
|
172 |
*/
|
@@ -232,7 +232,7 @@ abstract class Plugin_Importer {
|
|
232 |
}
|
233 |
|
234 |
/**
|
235 |
-
*
|
236 |
*
|
237 |
* @param array $hash Array of hash for search and replace.
|
238 |
* @param array $source Array for source where to search.
|
@@ -250,7 +250,7 @@ abstract class Plugin_Importer {
|
|
250 |
}
|
251 |
|
252 |
/**
|
253 |
-
*
|
254 |
*
|
255 |
* @param array $hash Array of hash for search and replace.
|
256 |
* @param array $source Array for source where to search.
|
@@ -275,7 +275,7 @@ abstract class Plugin_Importer {
|
|
275 |
}
|
276 |
|
277 |
/**
|
278 |
-
* Replace
|
279 |
*
|
280 |
* @param string $source Source image url.
|
281 |
* @param array|callable $destination Destination array.
|
@@ -393,7 +393,7 @@ abstract class Plugin_Importer {
|
|
393 |
}
|
394 |
|
395 |
/**
|
396 |
-
* Get all post
|
397 |
*
|
398 |
* @param bool $count If we need count only for pagination purposes.
|
399 |
* @return int|array
|
@@ -407,7 +407,7 @@ abstract class Plugin_Importer {
|
|
407 |
}
|
408 |
|
409 |
/**
|
410 |
-
* Get all user
|
411 |
*
|
412 |
* @param bool $count If we need count only for pagination purposes.
|
413 |
* @return int|array
|
@@ -460,7 +460,7 @@ abstract class Plugin_Importer {
|
|
460 |
}
|
461 |
|
462 |
/**
|
463 |
-
* Clean
|
464 |
*
|
465 |
* @return bool
|
466 |
*/
|
@@ -471,7 +471,7 @@ abstract class Plugin_Importer {
|
|
471 |
|
472 |
$table = DB::query_builder( 'options' );
|
473 |
foreach ( $this->option_keys as $option_key ) {
|
474 |
-
$table->
|
475 |
}
|
476 |
|
477 |
return $table->delete();
|
@@ -496,7 +496,7 @@ abstract class Plugin_Importer {
|
|
496 |
}
|
497 |
|
498 |
/**
|
499 |
-
*
|
500 |
*
|
501 |
* @return bool
|
502 |
*/
|
@@ -514,7 +514,7 @@ abstract class Plugin_Importer {
|
|
514 |
}
|
515 |
|
516 |
/**
|
517 |
-
*
|
518 |
*
|
519 |
* @return bool
|
520 |
*/
|
30 |
use Hooker, Ajax, Meta;
|
31 |
|
32 |
/**
|
33 |
+
* The plugin name.
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
protected $plugin_name;
|
38 |
|
39 |
/**
|
40 |
+
* The plugin file.
|
41 |
*
|
42 |
* @var string
|
43 |
*/
|
44 |
protected $plugin_file;
|
45 |
|
46 |
/**
|
47 |
+
* Plugin options meta key.
|
48 |
*
|
49 |
* @var string
|
50 |
*/
|
51 |
protected $meta_key;
|
52 |
|
53 |
/**
|
54 |
+
* Option keys to import and clean.
|
55 |
*
|
56 |
* @var array
|
57 |
*/
|
58 |
protected $option_keys;
|
59 |
|
60 |
/**
|
61 |
+
* Table names to drop while cleaning.
|
62 |
*
|
63 |
* @var array
|
64 |
*/
|
65 |
protected $table_names;
|
66 |
|
67 |
/**
|
68 |
+
* Choices keys to import.
|
69 |
*
|
70 |
* @var array
|
71 |
*/
|
72 |
protected $choices;
|
73 |
|
74 |
/**
|
75 |
+
* Number of items to parse per page.
|
76 |
*
|
77 |
* @var int
|
78 |
*/
|
86 |
protected $_pagination_args = [];
|
87 |
|
88 |
/**
|
89 |
+
* Class constructor.
|
90 |
*
|
91 |
* @param string $plugin_file Plugins file.
|
92 |
*/
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
+
* Get the name of the plugin we're importing from.
|
99 |
*
|
100 |
+
* @return string Plugin name.
|
101 |
*/
|
102 |
public function get_plugin_name() {
|
103 |
return $this->plugin_name;
|
104 |
}
|
105 |
|
106 |
/**
|
107 |
+
* Get the plugin file of the plugin we're importing from.
|
108 |
*
|
109 |
* @return string Plugin file
|
110 |
*/
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
+
* Get the actions which can be performed for the plugin.
|
117 |
*
|
118 |
* @return array
|
119 |
*/
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
+
* Check if import is needed from this plugin.
|
142 |
*
|
143 |
+
* @return bool Whether there is something to import.
|
144 |
*/
|
145 |
public function run_detect() {
|
146 |
return true === $this->has_options() ? true : $this->has_postmeta();
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
+
* Delete all plugin data from the database.
|
151 |
*
|
152 |
* @return bool
|
153 |
*/
|
164 |
}
|
165 |
|
166 |
/**
|
167 |
+
* Run importer.
|
168 |
*
|
169 |
+
* @throws Exception Throws error if no perform function founds.
|
170 |
*
|
171 |
* @param string $perform The action to perform when running import action.
|
172 |
*/
|
232 |
}
|
233 |
|
234 |
/**
|
235 |
+
* Replace settings based on key/value hash.
|
236 |
*
|
237 |
* @param array $hash Array of hash for search and replace.
|
238 |
* @param array $source Array for source where to search.
|
250 |
}
|
251 |
|
252 |
/**
|
253 |
+
* Replace meta based on key/value hash.
|
254 |
*
|
255 |
* @param array $hash Array of hash for search and replace.
|
256 |
* @param array $source Array for source where to search.
|
275 |
}
|
276 |
|
277 |
/**
|
278 |
+
* Replace an image to its url and id.
|
279 |
*
|
280 |
* @param string $source Source image url.
|
281 |
* @param array|callable $destination Destination array.
|
393 |
}
|
394 |
|
395 |
/**
|
396 |
+
* Get all post IDs of all allowed post types only.
|
397 |
*
|
398 |
* @param bool $count If we need count only for pagination purposes.
|
399 |
* @return int|array
|
407 |
}
|
408 |
|
409 |
/**
|
410 |
+
* Get all user IDs.
|
411 |
*
|
412 |
* @param bool $count If we need count only for pagination purposes.
|
413 |
* @return int|array
|
460 |
}
|
461 |
|
462 |
/**
|
463 |
+
* Clean options table.
|
464 |
*
|
465 |
* @return bool
|
466 |
*/
|
471 |
|
472 |
$table = DB::query_builder( 'options' );
|
473 |
foreach ( $this->option_keys as $option_key ) {
|
474 |
+
$table->orWhereLike( 'option_name', $option_key );
|
475 |
}
|
476 |
|
477 |
return $table->delete();
|
496 |
}
|
497 |
|
498 |
/**
|
499 |
+
* Check if plugin has options.
|
500 |
*
|
501 |
* @return bool
|
502 |
*/
|
514 |
}
|
515 |
|
516 |
/**
|
517 |
+
* Check if plugin has postmeta.
|
518 |
*
|
519 |
* @return bool
|
520 |
*/
|
@@ -28,21 +28,21 @@ class AIO_Rich_Snippet extends Plugin_Importer {
|
|
28 |
protected $plugin_name = 'AIO Schema Rich Snippet';
|
29 |
|
30 |
/**
|
31 |
-
*
|
32 |
*
|
33 |
* @var string
|
34 |
*/
|
35 |
protected $meta_key = '_bsf_post_type';
|
36 |
|
37 |
/**
|
38 |
-
*
|
39 |
*
|
40 |
* @var array
|
41 |
*/
|
42 |
protected $option_keys = [ 'bsf_', 'bsf_%' ];
|
43 |
|
44 |
/**
|
45 |
-
*
|
46 |
*
|
47 |
* @var array
|
48 |
*/
|
@@ -110,7 +110,7 @@ class AIO_Rich_Snippet extends Plugin_Importer {
|
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
-
*
|
114 |
*
|
115 |
* @return array
|
116 |
*/
|
28 |
protected $plugin_name = 'AIO Schema Rich Snippet';
|
29 |
|
30 |
/**
|
31 |
+
* Plugin options meta key.
|
32 |
*
|
33 |
* @var string
|
34 |
*/
|
35 |
protected $meta_key = '_bsf_post_type';
|
36 |
|
37 |
/**
|
38 |
+
* Option keys to import and clean.
|
39 |
*
|
40 |
* @var array
|
41 |
*/
|
42 |
protected $option_keys = [ 'bsf_', 'bsf_%' ];
|
43 |
|
44 |
/**
|
45 |
+
* Choices keys to import.
|
46 |
*
|
47 |
* @var array
|
48 |
*/
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
+
* Get the actions which can be performed for the plugin.
|
114 |
*
|
115 |
* @return array
|
116 |
*/
|
@@ -29,21 +29,21 @@ class AIOSEO extends Plugin_Importer {
|
|
29 |
protected $plugin_name = 'All In One SEO Pack';
|
30 |
|
31 |
/**
|
32 |
-
*
|
33 |
*
|
34 |
* @var string
|
35 |
*/
|
36 |
protected $meta_key = '_aioseop_';
|
37 |
|
38 |
/**
|
39 |
-
*
|
40 |
*
|
41 |
* @var array
|
42 |
*/
|
43 |
protected $option_keys = [ '_aioseop_%', 'aioseop_options' ];
|
44 |
|
45 |
/**
|
46 |
-
*
|
47 |
*
|
48 |
* @var array
|
49 |
*/
|
@@ -105,7 +105,8 @@ class AIOSEO extends Plugin_Importer {
|
|
105 |
$hash[ "aiosp_{$post_type}_title_format" ] = "pt_{$post_type}_title";
|
106 |
$this->set_robots_settings(
|
107 |
in_array( $post_type, $postnoindex, true ),
|
108 |
-
in_array( $post_type, $postnofollow, true )
|
|
|
109 |
);
|
110 |
}
|
111 |
|
@@ -115,10 +116,11 @@ class AIOSEO extends Plugin_Importer {
|
|
115 |
/**
|
116 |
* Set global robots.
|
117 |
*
|
118 |
-
* @param bool
|
119 |
-
* @param bool
|
|
|
120 |
*/
|
121 |
-
private function set_robots_settings( $noindex, $nofollow ) {
|
122 |
if ( ! $noindex && ! $nofollow ) {
|
123 |
return;
|
124 |
}
|
@@ -311,9 +313,9 @@ class AIOSEO extends Plugin_Importer {
|
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
-
* Set OpenGraph
|
315 |
*
|
316 |
-
* @param int $post_id Post
|
317 |
*/
|
318 |
private function set_post_opengraph( $post_id ) {
|
319 |
$opengraph_meta = get_post_meta( $post_id, '_aioseop_opengraph_settings', true );
|
@@ -328,7 +330,7 @@ class AIOSEO extends Plugin_Importer {
|
|
328 |
update_post_meta( $post_id, 'rank_math_twitter_description', $opengraph_meta['aioseop_opengraph_settings_desc'] );
|
329 |
}
|
330 |
|
331 |
-
$og_thumb = ! empty( $opengraph_meta['aioseop_opengraph_settings_customimg'] ) ? $opengraph_meta['aioseop_opengraph_settings_customimg'] : $opengraph_meta['aioseop_opengraph_settings_image'];
|
332 |
if ( ! empty( $og_thumb ) ) {
|
333 |
$this->replace_image( $og_thumb, 'post', 'rank_math_facebook_image', 'rank_math_facebook_image_id', $post_id );
|
334 |
}
|
@@ -340,41 +342,76 @@ class AIOSEO extends Plugin_Importer {
|
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
-
* Set post robots
|
344 |
*
|
345 |
-
* @param int $post_id Post
|
346 |
*/
|
347 |
private function set_post_robots( $post_id ) {
|
|
|
|
|
|
|
|
|
348 |
|
349 |
// ROBOTS.
|
350 |
-
$
|
351 |
-
$
|
|
|
|
|
352 |
|
353 |
-
|
354 |
-
|
355 |
-
$exclude_sitemap = 'on' === $exclude_sitemap ? true : false;
|
356 |
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
-
|
365 |
-
|
366 |
-
$robots[] = 'nofollow';
|
367 |
}
|
368 |
|
369 |
-
|
370 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
}
|
372 |
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
|
376 |
/**
|
377 |
-
*
|
378 |
*
|
379 |
* @return array
|
380 |
*/
|
29 |
protected $plugin_name = 'All In One SEO Pack';
|
30 |
|
31 |
/**
|
32 |
+
* Plugin options meta key.
|
33 |
*
|
34 |
* @var string
|
35 |
*/
|
36 |
protected $meta_key = '_aioseop_';
|
37 |
|
38 |
/**
|
39 |
+
* Option keys to import and clean.
|
40 |
*
|
41 |
* @var array
|
42 |
*/
|
43 |
protected $option_keys = [ '_aioseop_%', 'aioseop_options' ];
|
44 |
|
45 |
/**
|
46 |
+
* Choices keys to import.
|
47 |
*
|
48 |
* @var array
|
49 |
*/
|
105 |
$hash[ "aiosp_{$post_type}_title_format" ] = "pt_{$post_type}_title";
|
106 |
$this->set_robots_settings(
|
107 |
in_array( $post_type, $postnoindex, true ),
|
108 |
+
in_array( $post_type, $postnofollow, true ),
|
109 |
+
$post_type
|
110 |
);
|
111 |
}
|
112 |
|
116 |
/**
|
117 |
* Set global robots.
|
118 |
*
|
119 |
+
* @param bool $noindex Is noindex set.
|
120 |
+
* @param bool $nofollow Is nofollow set.
|
121 |
+
* @param string $post_type Current Post type.
|
122 |
*/
|
123 |
+
private function set_robots_settings( $noindex, $nofollow, $post_type ) {
|
124 |
if ( ! $noindex && ! $nofollow ) {
|
125 |
return;
|
126 |
}
|
313 |
}
|
314 |
|
315 |
/**
|
316 |
+
* Set OpenGraph.
|
317 |
*
|
318 |
+
* @param int $post_id Post ID.
|
319 |
*/
|
320 |
private function set_post_opengraph( $post_id ) {
|
321 |
$opengraph_meta = get_post_meta( $post_id, '_aioseop_opengraph_settings', true );
|
330 |
update_post_meta( $post_id, 'rank_math_twitter_description', $opengraph_meta['aioseop_opengraph_settings_desc'] );
|
331 |
}
|
332 |
|
333 |
+
$og_thumb = ! empty( $opengraph_meta['aioseop_opengraph_settings_customimg'] ) ? $opengraph_meta['aioseop_opengraph_settings_customimg'] : ( ! empty( $opengraph_meta['aioseop_opengraph_settings_image'] ) ? $opengraph_meta['aioseop_opengraph_settings_image'] : '' );
|
334 |
if ( ! empty( $og_thumb ) ) {
|
335 |
$this->replace_image( $og_thumb, 'post', 'rank_math_facebook_image', 'rank_math_facebook_image_id', $post_id );
|
336 |
}
|
342 |
}
|
343 |
|
344 |
/**
|
345 |
+
* Set post robots meta.
|
346 |
*
|
347 |
+
* @param int $post_id Post ID.
|
348 |
*/
|
349 |
private function set_post_robots( $post_id ) {
|
350 |
+
// Early bail if robots data is set in Rank Math plugin.
|
351 |
+
if ( ! empty( $this->get_meta( 'post', $post_id, 'rank_math_robots' ) ) ) {
|
352 |
+
return;
|
353 |
+
}
|
354 |
|
355 |
// ROBOTS.
|
356 |
+
$robots = [];
|
357 |
+
$aioseo = get_option( 'aioseop_options' );
|
358 |
+
$robots[] = $this->get_noindex_robot( $post_id, $aioseo );
|
359 |
+
$robots[] = $this->get_follow_robot( $post_id, $aioseo );
|
360 |
|
361 |
+
update_post_meta( $post_id, 'rank_math_robots', array_unique( $robots ) );
|
362 |
+
}
|
|
|
363 |
|
364 |
+
/**
|
365 |
+
* Get noindex robot.
|
366 |
+
*
|
367 |
+
* @param int $post_id Post ID.
|
368 |
+
* @param array $aioseo Option array.
|
369 |
+
*
|
370 |
+
* @return string
|
371 |
+
*/
|
372 |
+
private function get_noindex_robot( $post_id, $aioseo ) {
|
373 |
+
$noindex = get_post_meta( $post_id, '_aioseop_noindex', true );
|
374 |
+
$exclude_sitemap = $this->is_post_excluded_sitemap( $post_id );
|
375 |
|
376 |
+
if ( empty( $noindex ) ) {
|
377 |
+
return in_array( get_post_type( $post_id ), $aioseo['aiosp_cpostnoindex'], true ) || $exclude_sitemap ? 'noindex' : 'index';
|
|
|
378 |
}
|
379 |
|
380 |
+
return 'on' === $noindex || $exclude_sitemap ? 'noindex' : 'index';
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Get follow robot.
|
385 |
+
*
|
386 |
+
* @param int $post_id Post ID.
|
387 |
+
* @param array $aioseo Option array.
|
388 |
+
*
|
389 |
+
* @return string
|
390 |
+
*/
|
391 |
+
private function get_follow_robot( $post_id, $aioseo ) {
|
392 |
+
$nofollow = get_post_meta( $post_id, '_aioseop_nofollow', true );
|
393 |
+
|
394 |
+
if ( empty( $nofollow ) ) {
|
395 |
+
return in_array( get_post_type( $post_id ), $aioseo['aiosp_cpostnofollow'], true ) ? 'nofollow' : '';
|
396 |
}
|
397 |
|
398 |
+
return 'on' === $nofollow ? 'nofollow' : '';
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Is post excluded from sitemap.
|
403 |
+
*
|
404 |
+
* @param int $post_id Post ID.
|
405 |
+
*
|
406 |
+
* @return bool
|
407 |
+
*/
|
408 |
+
private function is_post_excluded_sitemap( $post_id ) {
|
409 |
+
$exclude_sitemap = get_post_meta( $post_id, '_aioseop_sitemap_exclude', true );
|
410 |
+
return 'on' === $exclude_sitemap ? true : false;
|
411 |
}
|
412 |
|
413 |
/**
|
414 |
+
* Get the actions which can be performed for the plugin.
|
415 |
*
|
416 |
* @return array
|
417 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The functionality to detect whether we should import from another SEO plugin
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -22,14 +22,16 @@ class Detector {
|
|
22 |
use Hooker;
|
23 |
|
24 |
/**
|
25 |
-
* Plugins we can import from
|
26 |
*
|
27 |
* @var array
|
28 |
*/
|
29 |
public static $plugins = null;
|
30 |
|
31 |
/**
|
32 |
-
* Detects whether we can import anything
|
|
|
|
|
33 |
*/
|
34 |
public function detect() {
|
35 |
$this->requirments();
|
@@ -100,9 +102,9 @@ class Detector {
|
|
100 |
}
|
101 |
|
102 |
/**
|
103 |
-
*
|
104 |
*
|
105 |
-
* @return array Available importers
|
106 |
*/
|
107 |
public function get() {
|
108 |
return $this->do_filter( 'importers/detect_plugins', [
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The functionality to detect whether we should import from another SEO plugin.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
22 |
use Hooker;
|
23 |
|
24 |
/**
|
25 |
+
* Plugins we can import from.
|
26 |
*
|
27 |
* @var array
|
28 |
*/
|
29 |
public static $plugins = null;
|
30 |
|
31 |
/**
|
32 |
+
* Detects whether we can import anything or not.
|
33 |
+
*
|
34 |
+
* @return array List of plugins we can import from.
|
35 |
*/
|
36 |
public function detect() {
|
37 |
$this->requirments();
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
+
* Get the list of available importers.
|
106 |
*
|
107 |
+
* @return array Available importers.
|
108 |
*/
|
109 |
public function get() {
|
110 |
return $this->do_filter( 'importers/detect_plugins', [
|
@@ -29,14 +29,14 @@ class Redirections extends Plugin_Importer {
|
|
29 |
protected $plugin_name = 'Redirections';
|
30 |
|
31 |
/**
|
32 |
-
*
|
33 |
*
|
34 |
* @var array
|
35 |
*/
|
36 |
protected $option_keys = [ 'redirection_options' ];
|
37 |
|
38 |
/**
|
39 |
-
*
|
40 |
*
|
41 |
* @var array
|
42 |
*/
|
@@ -68,6 +68,7 @@ class Redirections extends Plugin_Importer {
|
|
68 |
],
|
69 |
'url_to' => $this->get_url_to( $row ),
|
70 |
'header_code' => $row->action_code,
|
|
|
71 |
]
|
72 |
);
|
73 |
|
29 |
protected $plugin_name = 'Redirections';
|
30 |
|
31 |
/**
|
32 |
+
* Option keys to import and clean.
|
33 |
*
|
34 |
* @var array
|
35 |
*/
|
36 |
protected $option_keys = [ 'redirection_options' ];
|
37 |
|
38 |
/**
|
39 |
+
* Choices keys to import.
|
40 |
*
|
41 |
* @var array
|
42 |
*/
|
68 |
],
|
69 |
'url_to' => $this->get_url_to( $row ),
|
70 |
'header_code' => $row->action_code,
|
71 |
+
'status' => 'disabled' === $row->status ? 'inactive' : 'active',
|
72 |
]
|
73 |
);
|
74 |
|
@@ -30,21 +30,21 @@ class SEOPress extends Plugin_Importer {
|
|
30 |
protected $plugin_name = 'SEOPress SEO';
|
31 |
|
32 |
/**
|
33 |
-
*
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
protected $meta_key = 'seopress';
|
38 |
|
39 |
/**
|
40 |
-
*
|
41 |
*
|
42 |
* @var array
|
43 |
*/
|
44 |
protected $option_keys = [ 'seopress', 'seopress_%' ];
|
45 |
|
46 |
/**
|
47 |
-
*
|
48 |
*
|
49 |
* @var array
|
50 |
*/
|
@@ -419,7 +419,7 @@ class SEOPress extends Plugin_Importer {
|
|
419 |
}
|
420 |
|
421 |
/**
|
422 |
-
* Whether to enable sitemap
|
423 |
*
|
424 |
* @param string $object_prefix post_types/taxonomies.
|
425 |
* @param string $object_type Current object type.
|
@@ -742,6 +742,33 @@ class SEOPress extends Plugin_Importer {
|
|
742 |
* @param string $object_type Object type.
|
743 |
*/
|
744 |
private function set_object_robots( $object_id, $object_type ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
$current = [];
|
746 |
$hash = [
|
747 |
'_seopress_robots_index' => 'noindex',
|
@@ -756,11 +783,26 @@ class SEOPress extends Plugin_Importer {
|
|
756 |
$current[] = $value;
|
757 |
}
|
758 |
}
|
759 |
-
|
760 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
}
|
762 |
|
763 |
-
$
|
764 |
-
|
765 |
}
|
766 |
}
|
30 |
protected $plugin_name = 'SEOPress SEO';
|
31 |
|
32 |
/**
|
33 |
+
* Plugin options meta key.
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
protected $meta_key = 'seopress';
|
38 |
|
39 |
/**
|
40 |
+
* Option keys to import and clean.
|
41 |
*
|
42 |
* @var array
|
43 |
*/
|
44 |
protected $option_keys = [ 'seopress', 'seopress_%' ];
|
45 |
|
46 |
/**
|
47 |
+
* Choices keys to import.
|
48 |
*
|
49 |
* @var array
|
50 |
*/
|
419 |
}
|
420 |
|
421 |
/**
|
422 |
+
* Whether to enable sitemap.
|
423 |
*
|
424 |
* @param string $object_prefix post_types/taxonomies.
|
425 |
* @param string $object_type Current object type.
|
742 |
* @param string $object_type Object type.
|
743 |
*/
|
744 |
private function set_object_robots( $object_id, $object_type ) {
|
745 |
+
// Early bail if robots data is set in Rank Math plugin.
|
746 |
+
if ( ! empty( $this->get_meta( $object_type, $object_id, 'rank_math_robots' ) ) ) {
|
747 |
+
return;
|
748 |
+
}
|
749 |
+
|
750 |
+
$current = $this->get_robots_by_hash( $object_id, $object_type );
|
751 |
+
$is_noindex = in_array( 'noindex', $current, true );
|
752 |
+
$is_nofollow = in_array( 'nofollow', $current, true );
|
753 |
+
|
754 |
+
if ( ! $is_noindex || ! $is_nofollow ) {
|
755 |
+
$robots = $this->get_default_robots( $object_id, $object_type );
|
756 |
+
$current[] = ! $is_noindex && ! empty( $robots['noindex'] ) ? 'noindex' : 'index';
|
757 |
+
$current[] = ! $is_nofollow && ! empty( $robots['nofollow'] ) ? 'nofollow' : '';
|
758 |
+
}
|
759 |
+
|
760 |
+
$this->update_meta( $object_type, $object_id, 'rank_math_robots', array_unique( $current ) );
|
761 |
+
}
|
762 |
+
|
763 |
+
/**
|
764 |
+
* Get by meta hash.
|
765 |
+
*
|
766 |
+
* @param int $object_id Object id.
|
767 |
+
* @param string $object_type Object type.
|
768 |
+
*
|
769 |
+
* @return array Array of robots data.
|
770 |
+
*/
|
771 |
+
private function get_robots_by_hash( $object_id, $object_type ) {
|
772 |
$current = [];
|
773 |
$hash = [
|
774 |
'_seopress_robots_index' => 'noindex',
|
783 |
$current[] = $value;
|
784 |
}
|
785 |
}
|
786 |
+
|
787 |
+
return $current;
|
788 |
+
}
|
789 |
+
|
790 |
+
/**
|
791 |
+
* Get default robots data from settings.
|
792 |
+
*
|
793 |
+
* @param int $object_id Object id.
|
794 |
+
* @param string $object_type Object type.
|
795 |
+
*
|
796 |
+
* @return array Array of robots data.
|
797 |
+
*/
|
798 |
+
private function get_default_robots( $object_id, $object_type ) {
|
799 |
+
$seopress_titles = get_option( 'seopress_titles_option_name' );
|
800 |
+
if ( 'post' === $object_type ) {
|
801 |
+
$post_type = get_post_type( $object_id );
|
802 |
+
return isset( $seopress_titles['seopress_titles_single_titles'][ $post_type ] ) ? $seopress_titles['seopress_titles_single_titles'][ $post_type ] : [];
|
803 |
}
|
804 |
|
805 |
+
$term = get_term( $object_id );
|
806 |
+
return isset( $seopress_titles['seopress_titles_tax_titles'][ $term->taxonomy ] ) ? $seopress_titles['seopress_titles_tax_titles'][ $term->taxonomy ] : [];
|
807 |
}
|
808 |
}
|
@@ -28,21 +28,21 @@ class WP_Schema_Pro extends Plugin_Importer {
|
|
28 |
protected $plugin_name = 'WP Schema Pro';
|
29 |
|
30 |
/**
|
31 |
-
*
|
32 |
*
|
33 |
* @var string
|
34 |
*/
|
35 |
protected $meta_key = 'bsf-aiosrs';
|
36 |
|
37 |
/**
|
38 |
-
*
|
39 |
*
|
40 |
* @var array
|
41 |
*/
|
42 |
protected $option_keys = [ 'wp-schema-pro-general-settings', 'wp-schema-pro-social-profiles', 'wp-schema-pro-global-schemas' ];
|
43 |
|
44 |
/**
|
45 |
-
*
|
46 |
*
|
47 |
* @var array
|
48 |
*/
|
@@ -223,7 +223,7 @@ class WP_Schema_Pro extends Plugin_Importer {
|
|
223 |
}
|
224 |
|
225 |
/**
|
226 |
-
*
|
227 |
*
|
228 |
* @return array
|
229 |
*/
|
28 |
protected $plugin_name = 'WP Schema Pro';
|
29 |
|
30 |
/**
|
31 |
+
* Plugin options meta key.
|
32 |
*
|
33 |
* @var string
|
34 |
*/
|
35 |
protected $meta_key = 'bsf-aiosrs';
|
36 |
|
37 |
/**
|
38 |
+
* Option keys to import and clean.
|
39 |
*
|
40 |
* @var array
|
41 |
*/
|
42 |
protected $option_keys = [ 'wp-schema-pro-general-settings', 'wp-schema-pro-social-profiles', 'wp-schema-pro-global-schemas' ];
|
43 |
|
44 |
/**
|
45 |
+
* Choices keys to import.
|
46 |
*
|
47 |
* @var array
|
48 |
*/
|
223 |
}
|
224 |
|
225 |
/**
|
226 |
+
* Get the actions which can be performed for the plugin.
|
227 |
*
|
228 |
* @return array
|
229 |
*/
|
@@ -30,28 +30,28 @@ class Yoast extends Plugin_Importer {
|
|
30 |
protected $plugin_name = 'Yoast SEO';
|
31 |
|
32 |
/**
|
33 |
-
*
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
protected $meta_key = '_yoast_wpseo_';
|
38 |
|
39 |
/**
|
40 |
-
*
|
41 |
*
|
42 |
* @var array
|
43 |
*/
|
44 |
protected $option_keys = [ 'wpseo', 'wpseo_%' ];
|
45 |
|
46 |
/**
|
47 |
-
*
|
48 |
*
|
49 |
* @var array
|
50 |
*/
|
51 |
protected $choices = [ 'settings', 'postmeta', 'termmeta', 'usermeta', 'redirections' ];
|
52 |
|
53 |
/**
|
54 |
-
*
|
55 |
*
|
56 |
* @var array
|
57 |
*/
|
@@ -67,8 +67,8 @@ class Yoast extends Plugin_Importer {
|
|
67 |
public function convert_variables( $string ) {
|
68 |
$string = str_replace( '%%term_title%%', '%term%', $string );
|
69 |
$string = preg_replace( '/%%cf_([^%]+)%%/i', '%customfield($1)%', $string );
|
70 |
-
$string = preg_replace( '/%%ct_([^%]+)%%/i', '%
|
71 |
-
$string = preg_replace( '/%%ct_desc_([^%]+)%%/i', '%
|
72 |
|
73 |
return str_replace( '%%', '%', $string );
|
74 |
}
|
@@ -180,7 +180,7 @@ class Yoast extends Plugin_Importer {
|
|
180 |
|
181 |
// Show/Hide Metabox.
|
182 |
if ( isset( $yoast_titles[ "display-metabox-tax-{$taxonomy}" ] ) ) {
|
183 |
-
$this->titles[ "tax_{$taxonomy}_add_meta_box" ] = $yoast_titles[ "display-metabox-tax-{$taxonomy}" ] ? '
|
184 |
}
|
185 |
|
186 |
// Sitemap.
|
@@ -200,10 +200,13 @@ class Yoast extends Plugin_Importer {
|
|
200 |
* @param array $yoast_titles Settings.
|
201 |
*/
|
202 |
private function set_robots( $prefix, $yoast_prefix, $yoast_titles ) {
|
203 |
-
if ( isset( $yoast_titles[ "noindex-{$yoast_prefix}" ] )
|
204 |
$this->titles[ "{$prefix}_custom_robots" ] = 'on';
|
205 |
-
$this->titles[ "{$prefix}_robots" ][]
|
206 |
-
|
|
|
|
|
|
|
207 |
}
|
208 |
|
209 |
if ( isset( $yoast_titles[ "hideeditbox-{$yoast_prefix}" ] ) ) {
|
@@ -256,13 +259,18 @@ class Yoast extends Plugin_Importer {
|
|
256 |
}
|
257 |
|
258 |
/**
|
259 |
-
* Set post robots
|
260 |
*
|
261 |
* @param int $post_id Post id.
|
262 |
*/
|
263 |
private function set_post_robots( $post_id ) {
|
|
|
|
|
|
|
|
|
|
|
264 |
$robots_nofollow = get_post_meta( $post_id, '_yoast_wpseo_meta-robots-nofollow', true );
|
265 |
-
$robots_noindex = get_post_meta( $post_id, '_yoast_wpseo_meta-robots-noindex', true );
|
266 |
$robots_advanced = (array) get_post_meta( $post_id, '_yoast_wpseo_meta-robots-adv', true );
|
267 |
|
268 |
// If all are empty, then keep default robots.
|
@@ -271,21 +279,34 @@ class Yoast extends Plugin_Importer {
|
|
271 |
return;
|
272 |
}
|
273 |
|
274 |
-
$robots =
|
275 |
if ( $robots_nofollow ) {
|
276 |
$robots[] = 'nofollow';
|
277 |
}
|
278 |
|
279 |
-
if ( 1 === absint( $robots_noindex ) ) {
|
280 |
-
$robots[] = 'noindex';
|
281 |
-
}
|
282 |
-
|
283 |
$robots_advanced = explode( ',', $robots_advanced[0] );
|
284 |
if ( $robots_advanced ) {
|
285 |
$robots = array_merge( $robots, $robots_advanced );
|
286 |
}
|
287 |
|
288 |
-
update_post_meta( $post_id, 'rank_math_robots', array_unique( $robots ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
/**
|
@@ -306,7 +327,7 @@ class Yoast extends Plugin_Importer {
|
|
306 |
}
|
307 |
|
308 |
/**
|
309 |
-
* Set
|
310 |
*
|
311 |
* @param int $post_id Post id.
|
312 |
*/
|
@@ -323,7 +344,7 @@ class Yoast extends Plugin_Importer {
|
|
323 |
}
|
324 |
|
325 |
/**
|
326 |
-
* Return
|
327 |
*
|
328 |
* @param array $entry Yoast focus keyword entry.
|
329 |
* @return string
|
@@ -333,7 +354,7 @@ class Yoast extends Plugin_Importer {
|
|
333 |
}
|
334 |
|
335 |
/**
|
336 |
-
* Set primary term for
|
337 |
*
|
338 |
* @param int[] $post_ids Post ids.
|
339 |
*/
|
@@ -389,17 +410,20 @@ class Yoast extends Plugin_Importer {
|
|
389 |
}
|
390 |
|
391 |
/**
|
392 |
-
* Set term robots
|
393 |
*
|
394 |
* @param int $term_id Term id.
|
395 |
* @param array $data Term data.
|
396 |
*/
|
397 |
private function set_term_robots( $term_id, $data ) {
|
398 |
-
|
399 |
-
|
400 |
-
|
|
|
401 |
|
402 |
-
|
|
|
|
|
403 |
}
|
404 |
}
|
405 |
|
@@ -437,6 +461,13 @@ class Yoast extends Plugin_Importer {
|
|
437 |
foreach ( $user_ids as $user ) {
|
438 |
$userid = $user->ID;
|
439 |
$this->replace_meta( $hash, null, $userid, 'user', 'convert_variables' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
}
|
441 |
|
442 |
return $this->get_pagination_arg();
|
30 |
protected $plugin_name = 'Yoast SEO';
|
31 |
|
32 |
/**
|
33 |
+
* Plugin options meta key.
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
protected $meta_key = '_yoast_wpseo_';
|
38 |
|
39 |
/**
|
40 |
+
* Option keys to import and clean.
|
41 |
*
|
42 |
* @var array
|
43 |
*/
|
44 |
protected $option_keys = [ 'wpseo', 'wpseo_%' ];
|
45 |
|
46 |
/**
|
47 |
+
* Choices keys to import.
|
48 |
*
|
49 |
* @var array
|
50 |
*/
|
51 |
protected $choices = [ 'settings', 'postmeta', 'termmeta', 'usermeta', 'redirections' ];
|
52 |
|
53 |
/**
|
54 |
+
* Table names to drop while cleaning.
|
55 |
*
|
56 |
* @var array
|
57 |
*/
|
67 |
public function convert_variables( $string ) {
|
68 |
$string = str_replace( '%%term_title%%', '%term%', $string );
|
69 |
$string = preg_replace( '/%%cf_([^%]+)%%/i', '%customfield($1)%', $string );
|
70 |
+
$string = preg_replace( '/%%ct_([^%]+)%%/i', '%customterm($1)%', $string );
|
71 |
+
$string = preg_replace( '/%%ct_desc_([^%]+)%%/i', '%customterm($1)%', $string );
|
72 |
|
73 |
return str_replace( '%%', '%', $string );
|
74 |
}
|
180 |
|
181 |
// Show/Hide Metabox.
|
182 |
if ( isset( $yoast_titles[ "display-metabox-tax-{$taxonomy}" ] ) ) {
|
183 |
+
$this->titles[ "tax_{$taxonomy}_add_meta_box" ] = $yoast_titles[ "display-metabox-tax-{$taxonomy}" ] ? 'on' : 'off';
|
184 |
}
|
185 |
|
186 |
// Sitemap.
|
200 |
* @param array $yoast_titles Settings.
|
201 |
*/
|
202 |
private function set_robots( $prefix, $yoast_prefix, $yoast_titles ) {
|
203 |
+
if ( isset( $yoast_titles[ "noindex-{$yoast_prefix}" ] ) ) {
|
204 |
$this->titles[ "{$prefix}_custom_robots" ] = 'on';
|
205 |
+
$this->titles[ "{$prefix}_robots" ] = [];
|
206 |
+
if ( $yoast_titles[ "noindex-{$yoast_prefix}" ] ) {
|
207 |
+
$this->titles[ "{$prefix}_robots" ][] = 'noindex';
|
208 |
+
$this->titles[ "{$prefix}_robots" ] = array_unique( $this->titles[ "{$prefix}_robots" ] );
|
209 |
+
}
|
210 |
}
|
211 |
|
212 |
if ( isset( $yoast_titles[ "hideeditbox-{$yoast_prefix}" ] ) ) {
|
259 |
}
|
260 |
|
261 |
/**
|
262 |
+
* Set post robots.
|
263 |
*
|
264 |
* @param int $post_id Post id.
|
265 |
*/
|
266 |
private function set_post_robots( $post_id ) {
|
267 |
+
// Early bail if robots data is set in Rank Math plugin.
|
268 |
+
if ( ! empty( $this->get_meta( 'post', $post_id, 'rank_math_robots' ) ) ) {
|
269 |
+
return;
|
270 |
+
}
|
271 |
+
|
272 |
$robots_nofollow = get_post_meta( $post_id, '_yoast_wpseo_meta-robots-nofollow', true );
|
273 |
+
$robots_noindex = (int) get_post_meta( $post_id, '_yoast_wpseo_meta-robots-noindex', true );
|
274 |
$robots_advanced = (array) get_post_meta( $post_id, '_yoast_wpseo_meta-robots-adv', true );
|
275 |
|
276 |
// If all are empty, then keep default robots.
|
279 |
return;
|
280 |
}
|
281 |
|
282 |
+
$robots = [ $this->set_robots_index( $post_id, $robots_noindex ) ];
|
283 |
if ( $robots_nofollow ) {
|
284 |
$robots[] = 'nofollow';
|
285 |
}
|
286 |
|
|
|
|
|
|
|
|
|
287 |
$robots_advanced = explode( ',', $robots_advanced[0] );
|
288 |
if ( $robots_advanced ) {
|
289 |
$robots = array_merge( $robots, $robots_advanced );
|
290 |
}
|
291 |
|
292 |
+
update_post_meta( $post_id, 'rank_math_robots', array_filter( array_unique( $robots ) ) );
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Set post robots based on the Settings.
|
297 |
+
*
|
298 |
+
* @param int $post_id Post id.
|
299 |
+
* @param int $robots_noindex Whether or not the post is indexed.
|
300 |
+
*
|
301 |
+
* @return string
|
302 |
+
*/
|
303 |
+
private function set_robots_index( $post_id, $robots_noindex ) {
|
304 |
+
if ( 0 === $robots_noindex ) {
|
305 |
+
$yoast_titles = get_option( 'wpseo_titles' );
|
306 |
+
return empty( $yoast_titles[ 'noindex-' . get_post_type( $post_id ) ] ) ? 'index' : 'noindex';
|
307 |
+
}
|
308 |
+
|
309 |
+
return 1 === $robots_noindex ? 'noindex' : 'index';
|
310 |
}
|
311 |
|
312 |
/**
|
327 |
}
|
328 |
|
329 |
/**
|
330 |
+
* Set Focus Keyword.
|
331 |
*
|
332 |
* @param int $post_id Post id.
|
333 |
*/
|
344 |
}
|
345 |
|
346 |
/**
|
347 |
+
* Return Focus Keyword from entry.
|
348 |
*
|
349 |
* @param array $entry Yoast focus keyword entry.
|
350 |
* @return string
|
354 |
}
|
355 |
|
356 |
/**
|
357 |
+
* Set primary term for the posts.
|
358 |
*
|
359 |
* @param int[] $post_ids Post ids.
|
360 |
*/
|
410 |
}
|
411 |
|
412 |
/**
|
413 |
+
* Set term robots.
|
414 |
*
|
415 |
* @param int $term_id Term id.
|
416 |
* @param array $data Term data.
|
417 |
*/
|
418 |
private function set_term_robots( $term_id, $data ) {
|
419 |
+
// Early bail if robots data is set in Rank Math plugin.
|
420 |
+
if ( ! empty( $this->get_meta( 'term', $term_id, 'rank_math_robots' ) ) ) {
|
421 |
+
return;
|
422 |
+
}
|
423 |
|
424 |
+
if ( ! empty( $data['wpseo_noindex'] ) && 'default' !== $data['wpseo_noindex'] ) {
|
425 |
+
$robots = 'noindex' === $data['wpseo_noindex'] ? 'noindex' : 'index';
|
426 |
+
update_term_meta( $term_id, 'rank_math_robots', [ $robots ] );
|
427 |
}
|
428 |
}
|
429 |
|
461 |
foreach ( $user_ids as $user ) {
|
462 |
$userid = $user->ID;
|
463 |
$this->replace_meta( $hash, null, $userid, 'user', 'convert_variables' );
|
464 |
+
|
465 |
+
// Early bail if robots data is set in Rank Math plugin.
|
466 |
+
if ( empty( $this->get_meta( 'user', $userid, 'rank_math_robots' ) ) ) {
|
467 |
+
$noindex_user = get_user_meta( $userid, 'wpseo_noindex_author', true );
|
468 |
+
$noindex_user = $noindex_user ? 'noindex' : 'index';
|
469 |
+
update_user_meta( $userid, 'rank_math_robots', [ $noindex_user ] );
|
470 |
+
}
|
471 |
}
|
472 |
|
473 |
return $this->get_pagination_arg();
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Compatibility wizard step
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -71,10 +71,9 @@ class Compatibility implements Wizard_Step {
|
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
-
* Return list of
|
75 |
-
* Used in SEO Analysis & Setup Wizard.
|
76 |
*
|
77 |
-
* @return array List of plugins in path => name format
|
78 |
*/
|
79 |
private function get_conflicting_plugins_list() {
|
80 |
|
@@ -133,7 +132,7 @@ class Compatibility implements Wizard_Step {
|
|
133 |
}
|
134 |
|
135 |
/**
|
136 |
-
* Redirection conflicting plugins
|
137 |
*
|
138 |
* @return array
|
139 |
*/
|
@@ -144,7 +143,7 @@ class Compatibility implements Wizard_Step {
|
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
-
* Sitemap conflicting plugins
|
148 |
*
|
149 |
* @return array
|
150 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Compatibility wizard step.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
+
* Return list of conflicting plugins.
|
|
|
75 |
*
|
76 |
+
* @return array List of plugins in path => name format.
|
77 |
*/
|
78 |
private function get_conflicting_plugins_list() {
|
79 |
|
132 |
}
|
133 |
|
134 |
/**
|
135 |
+
* Redirection: conflicting plugins.
|
136 |
*
|
137 |
* @return array
|
138 |
*/
|
143 |
}
|
144 |
|
145 |
/**
|
146 |
+
* Sitemap: conflicting plugins.
|
147 |
*
|
148 |
* @return array
|
149 |
*/
|
@@ -130,7 +130,7 @@ if ( $all_good ) :
|
|
130 |
<?php foreach ( $conflicting_plugins as $pk => $plugin ) { ?>
|
131 |
<tr>
|
132 |
<td><span class="dashicons dashicons-warning"></span></td>
|
133 |
-
<td><?php echo $plugin . ( in_array( $pk, [ 'all-in-one-schemaorg-rich-snippets/index.php', 'wordpress-seo/wp-seo.php', 'wordpress-seo-premium/wp-seo-premium.php', 'all-in-one-seo-pack/all_in_one_seo_pack.php' ] ) ? '<span class="import-info">' . esc_html__( 'You can import settings in the next step.', 'rank-math' ) . '</span>' : '' ); ?></td>
|
134 |
<td><a href="#" class="button button-small wizard-deactivate-plugin" data-plugin="<?php echo esc_attr( $pk ); ?>"><?php esc_html_e( 'Deactivate Plugin', 'rank-math' ); ?></a></td>
|
135 |
</tr>
|
136 |
<?php } ?>
|
130 |
<?php foreach ( $conflicting_plugins as $pk => $plugin ) { ?>
|
131 |
<tr>
|
132 |
<td><span class="dashicons dashicons-warning"></span></td>
|
133 |
+
<td><?php echo $plugin . ( in_array( $pk, [ 'all-in-one-schemaorg-rich-snippets/index.php', 'wordpress-seo/wp-seo.php', 'wordpress-seo-premium/wp-seo-premium.php', 'all-in-one-seo-pack/all_in_one_seo_pack.php' ], true ) ? '<span class="import-info">' . esc_html__( 'You can import settings in the next step.', 'rank-math' ) . '</span>' : '' ); ?></td>
|
134 |
<td><a href="#" class="button button-small wizard-deactivate-plugin" data-plugin="<?php echo esc_attr( $pk ); ?>"><?php esc_html_e( 'Deactivate Plugin', 'rank-math' ); ?></a></td>
|
135 |
</tr>
|
136 |
<?php } ?>
|
@@ -158,7 +158,12 @@ class Common {
|
|
158 |
* @return bool
|
159 |
*/
|
160 |
public function auto_update_plugin( $update, $item ) {
|
161 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
162 |
return true;
|
163 |
}
|
164 |
|
158 |
* @return bool
|
159 |
*/
|
160 |
public function auto_update_plugin( $update, $item ) {
|
161 |
+
if (
|
162 |
+
isset( $item->slug ) &&
|
163 |
+
'seo-by-rank-math' === $item->slug &&
|
164 |
+
isset( $item->new_version ) &&
|
165 |
+
false === stripos( $item->new_version, 'beta' )
|
166 |
+
) {
|
167 |
return true;
|
168 |
}
|
169 |
|
@@ -51,7 +51,7 @@ class Helper {
|
|
51 |
* @param mixed $callback Replacement callback. Should return value, not output it.
|
52 |
* @param array $args Array with additional title, description and example values for the variable.
|
53 |
*
|
54 |
-
* @return bool
|
55 |
*/
|
56 |
public static function register_var_replacement( $var, $callback, $args = [] ) {
|
57 |
return Replace_Vars::register_replacement( $var, $callback, $args );
|
51 |
* @param mixed $callback Replacement callback. Should return value, not output it.
|
52 |
* @param array $args Array with additional title, description and example values for the variable.
|
53 |
*
|
54 |
+
* @return bool Replacement was registered successfully or not.
|
55 |
*/
|
56 |
public static function register_var_replacement( $var, $callback, $args = [] ) {
|
57 |
return Replace_Vars::register_replacement( $var, $callback, $args );
|
@@ -144,7 +144,7 @@ class Replace_Vars {
|
|
144 |
* @param mixed $callback Replacement callback. Should return value, not output it.
|
145 |
* @param array $args Array with additional title, description and example values for the variable.
|
146 |
*
|
147 |
-
* @return bool
|
148 |
*/
|
149 |
public static function register_replacement( $var, $callback, $args = [] ) {
|
150 |
$success = false;
|
@@ -874,7 +874,7 @@ class Replace_Vars {
|
|
874 |
}
|
875 |
|
876 |
/**
|
877 |
-
* Get the current search query to use as a replacement
|
878 |
*
|
879 |
* @return string|null
|
880 |
*/
|
@@ -964,7 +964,7 @@ class Replace_Vars {
|
|
964 |
}
|
965 |
|
966 |
/**
|
967 |
-
* Get the numeric post ID to use as a replacement
|
968 |
*
|
969 |
* @return string|null
|
970 |
*/
|
144 |
* @param mixed $callback Replacement callback. Should return value, not output it.
|
145 |
* @param array $args Array with additional title, description and example values for the variable.
|
146 |
*
|
147 |
+
* @return bool Replacement was registered successfully or not.
|
148 |
*/
|
149 |
public static function register_replacement( $var, $callback, $args = [] ) {
|
150 |
$success = false;
|
874 |
}
|
875 |
|
876 |
/**
|
877 |
+
* Get the current search query to use as a replacement.
|
878 |
*
|
879 |
* @return string|null
|
880 |
*/
|
964 |
}
|
965 |
|
966 |
/**
|
967 |
+
* Get the numeric post ID to use as a replacement.
|
968 |
*
|
969 |
* @return string|null
|
970 |
*/
|
@@ -24,9 +24,9 @@ defined( 'ABSPATH' ) || exit;
|
|
24 |
class Commands extends WP_CLI_Command {
|
25 |
|
26 |
/**
|
27 |
-
* Generate sitemap
|
28 |
*
|
29 |
-
* @param array $args
|
30 |
*/
|
31 |
public function sitemap_generate( $args ) {
|
32 |
$sitemap = Helper::get_module( 'sitemap' );
|
24 |
class Commands extends WP_CLI_Command {
|
25 |
|
26 |
/**
|
27 |
+
* Generate the sitemap.
|
28 |
*
|
29 |
+
* @param array $args Arguments passed.
|
30 |
*/
|
31 |
public function sitemap_generate( $args ) {
|
32 |
$sitemap = Helper::get_module( 'sitemap' );
|
@@ -102,7 +102,7 @@ class Breadcrumbs {
|
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
-
* Get the
|
106 |
*
|
107 |
* @param array $args Arguments.
|
108 |
* @return string
|
@@ -150,17 +150,17 @@ class Breadcrumbs {
|
|
150 |
$html = $args['wrap_before'] . $html . $args['wrap_after'];
|
151 |
|
152 |
/**
|
153 |
-
*
|
154 |
*
|
155 |
* @param string $html HTML output.
|
156 |
-
* @param array $crumbs The
|
157 |
-
* @param Breadcrumbs $this Current breadcrumb
|
158 |
*/
|
159 |
return $this->do_filter( 'frontend/breadcrumb/html', $html, $crumbs, $this );
|
160 |
}
|
161 |
|
162 |
/**
|
163 |
-
* Get the breadrumb trail
|
164 |
*
|
165 |
* @return array
|
166 |
*/
|
@@ -170,20 +170,20 @@ class Breadcrumbs {
|
|
170 |
}
|
171 |
|
172 |
/**
|
173 |
-
*
|
174 |
*
|
175 |
-
* @param array $crumbs The
|
176 |
-
* @param Breadcrumbs $this Current breadcrumb
|
177 |
*/
|
178 |
return $this->do_filter( 'frontend/breadcrumb/items', $this->crumbs, $this );
|
179 |
}
|
180 |
|
181 |
/**
|
182 |
-
* Add
|
183 |
*
|
184 |
* @param string $name Name.
|
185 |
* @param string $link Link.
|
186 |
-
* @param bool $hide_in_schema
|
187 |
*/
|
188 |
private function add_crumb( $name, $link = '', $hide_in_schema = false ) {
|
189 |
$this->crumbs[] = [
|
@@ -194,7 +194,7 @@ class Breadcrumbs {
|
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
-
* Generate breadcrumb trail
|
198 |
*/
|
199 |
private function generate() {
|
200 |
$conditionals = [
|
@@ -235,28 +235,28 @@ class Breadcrumbs {
|
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
-
* Is home trail
|
239 |
*/
|
240 |
private function add_crumbs_home() {
|
241 |
$this->add_crumb( single_post_title( '', false ) );
|
242 |
}
|
243 |
|
244 |
/**
|
245 |
-
* 404 trail
|
246 |
*/
|
247 |
private function add_crumbs_404() {
|
248 |
$this->add_crumb( $this->strings['error404'] );
|
249 |
}
|
250 |
|
251 |
/**
|
252 |
-
*
|
253 |
*/
|
254 |
private function add_crumbs_search() {
|
255 |
$this->add_crumb( sprintf( $this->strings['search_format'], get_search_query() ), remove_query_arg( 'paged' ) );
|
256 |
}
|
257 |
|
258 |
/**
|
259 |
-
* Attachment trail
|
260 |
*/
|
261 |
private function add_crumbs_attachment() {
|
262 |
global $post;
|
@@ -266,7 +266,7 @@ class Breadcrumbs {
|
|
266 |
}
|
267 |
|
268 |
/**
|
269 |
-
* Single product trail
|
270 |
*/
|
271 |
private function add_crumbs_product() {
|
272 |
global $post;
|
@@ -283,7 +283,7 @@ class Breadcrumbs {
|
|
283 |
}
|
284 |
|
285 |
/**
|
286 |
-
* Single post trail
|
287 |
*
|
288 |
* @param int $post_id Post ID.
|
289 |
* @param string $permalink Post permalink.
|
@@ -312,7 +312,7 @@ class Breadcrumbs {
|
|
312 |
}
|
313 |
|
314 |
/**
|
315 |
-
* Product category trail
|
316 |
*/
|
317 |
private function add_crumbs_product_category() {
|
318 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
@@ -322,7 +322,7 @@ class Breadcrumbs {
|
|
322 |
}
|
323 |
|
324 |
/**
|
325 |
-
* Product tag trail
|
326 |
*/
|
327 |
private function add_crumbs_product_tag() {
|
328 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
@@ -332,7 +332,7 @@ class Breadcrumbs {
|
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
-
* Shop
|
336 |
*/
|
337 |
private function add_crumbs_shop() {
|
338 |
$shop_page_id = wc_get_page_id( 'shop' );
|
@@ -349,7 +349,7 @@ class Breadcrumbs {
|
|
349 |
}
|
350 |
|
351 |
/**
|
352 |
-
* Post type archive trail
|
353 |
*
|
354 |
* @param string $post_type Post type.
|
355 |
*/
|
@@ -369,7 +369,7 @@ class Breadcrumbs {
|
|
369 |
}
|
370 |
|
371 |
/**
|
372 |
-
* Category trail
|
373 |
*/
|
374 |
private function add_crumbs_category() {
|
375 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
@@ -378,7 +378,7 @@ class Breadcrumbs {
|
|
378 |
}
|
379 |
|
380 |
/**
|
381 |
-
* Tag trail
|
382 |
*/
|
383 |
private function add_crumbs_tag() {
|
384 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
@@ -386,7 +386,7 @@ class Breadcrumbs {
|
|
386 |
}
|
387 |
|
388 |
/**
|
389 |
-
*
|
390 |
*/
|
391 |
private function add_crumbs_tax() {
|
392 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
@@ -400,7 +400,7 @@ class Breadcrumbs {
|
|
400 |
}
|
401 |
|
402 |
/**
|
403 |
-
*
|
404 |
*/
|
405 |
private function add_crumbs_date() {
|
406 |
if ( is_year() || is_month() || is_day() ) {
|
@@ -415,7 +415,7 @@ class Breadcrumbs {
|
|
415 |
}
|
416 |
|
417 |
/**
|
418 |
-
*
|
419 |
*/
|
420 |
private function add_crumbs_author() {
|
421 |
global $author;
|
@@ -425,7 +425,7 @@ class Breadcrumbs {
|
|
425 |
}
|
426 |
|
427 |
/**
|
428 |
-
*
|
429 |
*
|
430 |
* @param WP_Post $post Post object.
|
431 |
*/
|
@@ -449,7 +449,7 @@ class Breadcrumbs {
|
|
449 |
}
|
450 |
|
451 |
/**
|
452 |
-
* Prepend the shop page to shop
|
453 |
*/
|
454 |
private function prepend_shop_page() {
|
455 |
$permalinks = wc_get_permalink_structure();
|
@@ -463,7 +463,7 @@ class Breadcrumbs {
|
|
463 |
}
|
464 |
|
465 |
/**
|
466 |
-
* Get the primary term
|
467 |
*
|
468 |
* @param array $terms Terms attached to the current post.
|
469 |
*/
|
@@ -485,7 +485,7 @@ class Breadcrumbs {
|
|
485 |
}
|
486 |
|
487 |
/**
|
488 |
-
* Add
|
489 |
*
|
490 |
* @param object $term Term data object.
|
491 |
*/
|
@@ -507,7 +507,7 @@ class Breadcrumbs {
|
|
507 |
}
|
508 |
|
509 |
/**
|
510 |
-
*
|
511 |
*
|
512 |
* @since 1.0.8
|
513 |
*/
|
@@ -526,7 +526,7 @@ class Breadcrumbs {
|
|
526 |
}
|
527 |
|
528 |
/**
|
529 |
-
* Get
|
530 |
*
|
531 |
* @param string $object_type Object type.
|
532 |
* @param int $object_id Object ID to get the title for.
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
+
* Get the breadcrumbs.
|
106 |
*
|
107 |
* @param array $args Arguments.
|
108 |
* @return string
|
150 |
$html = $args['wrap_before'] . $html . $args['wrap_after'];
|
151 |
|
152 |
/**
|
153 |
+
* Change the breadcrumbs HTML output.
|
154 |
*
|
155 |
* @param string $html HTML output.
|
156 |
+
* @param array $crumbs The breadcrumbs array.
|
157 |
+
* @param Breadcrumbs $this Current breadcrumb.
|
158 |
*/
|
159 |
return $this->do_filter( 'frontend/breadcrumb/html', $html, $crumbs, $this );
|
160 |
}
|
161 |
|
162 |
/**
|
163 |
+
* Get the breadrumb trail.
|
164 |
*
|
165 |
* @return array
|
166 |
*/
|
170 |
}
|
171 |
|
172 |
/**
|
173 |
+
* Change the breadcrumb items.
|
174 |
*
|
175 |
+
* @param array $crumbs The breadcrumbs array.
|
176 |
+
* @param Breadcrumbs $this Current breadcrumb.
|
177 |
*/
|
178 |
return $this->do_filter( 'frontend/breadcrumb/items', $this->crumbs, $this );
|
179 |
}
|
180 |
|
181 |
/**
|
182 |
+
* Add an item to the breadcrumbs.
|
183 |
*
|
184 |
* @param string $name Name.
|
185 |
* @param string $link Link.
|
186 |
+
* @param bool $hide_in_schema Don't include in JSON-LD.
|
187 |
*/
|
188 |
private function add_crumb( $name, $link = '', $hide_in_schema = false ) {
|
189 |
$this->crumbs[] = [
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
+
* Generate the breadcrumb trail.
|
198 |
*/
|
199 |
private function generate() {
|
200 |
$conditionals = [
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
+
* Is home trail.
|
239 |
*/
|
240 |
private function add_crumbs_home() {
|
241 |
$this->add_crumb( single_post_title( '', false ) );
|
242 |
}
|
243 |
|
244 |
/**
|
245 |
+
* 404 trail.
|
246 |
*/
|
247 |
private function add_crumbs_404() {
|
248 |
$this->add_crumb( $this->strings['error404'] );
|
249 |
}
|
250 |
|
251 |
/**
|
252 |
+
* Search results trail.
|
253 |
*/
|
254 |
private function add_crumbs_search() {
|
255 |
$this->add_crumb( sprintf( $this->strings['search_format'], get_search_query() ), remove_query_arg( 'paged' ) );
|
256 |
}
|
257 |
|
258 |
/**
|
259 |
+
* Attachment trail.
|
260 |
*/
|
261 |
private function add_crumbs_attachment() {
|
262 |
global $post;
|
266 |
}
|
267 |
|
268 |
/**
|
269 |
+
* Single product trail.
|
270 |
*/
|
271 |
private function add_crumbs_product() {
|
272 |
global $post;
|
283 |
}
|
284 |
|
285 |
/**
|
286 |
+
* Single post trail.
|
287 |
*
|
288 |
* @param int $post_id Post ID.
|
289 |
* @param string $permalink Post permalink.
|
312 |
}
|
313 |
|
314 |
/**
|
315 |
+
* Product category trail.
|
316 |
*/
|
317 |
private function add_crumbs_product_category() {
|
318 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
322 |
}
|
323 |
|
324 |
/**
|
325 |
+
* Product tag trail.
|
326 |
*/
|
327 |
private function add_crumbs_product_tag() {
|
328 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
+
* Shop trail.
|
336 |
*/
|
337 |
private function add_crumbs_shop() {
|
338 |
$shop_page_id = wc_get_page_id( 'shop' );
|
349 |
}
|
350 |
|
351 |
/**
|
352 |
+
* Post type archive trail.
|
353 |
*
|
354 |
* @param string $post_type Post type.
|
355 |
*/
|
369 |
}
|
370 |
|
371 |
/**
|
372 |
+
* Category trail.
|
373 |
*/
|
374 |
private function add_crumbs_category() {
|
375 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
378 |
}
|
379 |
|
380 |
/**
|
381 |
+
* Tag trail.
|
382 |
*/
|
383 |
private function add_crumbs_tag() {
|
384 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
386 |
}
|
387 |
|
388 |
/**
|
389 |
+
* Taxonomies trail.
|
390 |
*/
|
391 |
private function add_crumbs_tax() {
|
392 |
$term = $GLOBALS['wp_query']->get_queried_object();
|
400 |
}
|
401 |
|
402 |
/**
|
403 |
+
* Trail for date based archives.
|
404 |
*/
|
405 |
private function add_crumbs_date() {
|
406 |
if ( is_year() || is_month() || is_day() ) {
|
415 |
}
|
416 |
|
417 |
/**
|
418 |
+
* Trail for author archives.
|
419 |
*/
|
420 |
private function add_crumbs_author() {
|
421 |
global $author;
|
425 |
}
|
426 |
|
427 |
/**
|
428 |
+
* Single post trail.
|
429 |
*
|
430 |
* @param WP_Post $post Post object.
|
431 |
*/
|
449 |
}
|
450 |
|
451 |
/**
|
452 |
+
* Prepend the shop page to the shop trail.
|
453 |
*/
|
454 |
private function prepend_shop_page() {
|
455 |
$permalinks = wc_get_permalink_structure();
|
463 |
}
|
464 |
|
465 |
/**
|
466 |
+
* Get the primary term.
|
467 |
*
|
468 |
* @param array $terms Terms attached to the current post.
|
469 |
*/
|
485 |
}
|
486 |
|
487 |
/**
|
488 |
+
* Add ancestor taxonomy crumbs to the hierachical taxonomy trails.
|
489 |
*
|
490 |
* @param object $term Term data object.
|
491 |
*/
|
507 |
}
|
508 |
|
509 |
/**
|
510 |
+
* Add a page crumb to paginated trails.
|
511 |
*
|
512 |
* @since 1.0.8
|
513 |
*/
|
526 |
}
|
527 |
|
528 |
/**
|
529 |
+
* Get the breadcrumb title.
|
530 |
*
|
531 |
* @param string $object_type Object type.
|
532 |
* @param int $object_id Object ID to get the title for.
|
@@ -2,9 +2,6 @@
|
|
2 |
/**
|
3 |
* The public-facing functionality of the plugin.
|
4 |
*
|
5 |
-
* Defines the plugin name, version, and two examples hooks for how to
|
6 |
-
* enqueue the public-specific stylesheet and JavaScript.
|
7 |
-
*
|
8 |
* @since 0.9.0
|
9 |
* @package RankMath
|
10 |
* @subpackage RankMath\Frontend
|
@@ -52,8 +49,7 @@ class Frontend {
|
|
52 |
|
53 |
if ( Helper::get_settings( 'general.breadcrumbs' ) ) {
|
54 |
/**
|
55 |
-
* If breadcrumbs are
|
56 |
-
* there's no reason to have bbPress breadcrumbs as well.
|
57 |
*/
|
58 |
add_filter( 'bbp_get_breadcrumb', '__return_false' );
|
59 |
}
|
@@ -112,7 +108,7 @@ class Frontend {
|
|
112 |
* Enqueue Styles and Scripts required by plugin.
|
113 |
*/
|
114 |
public function enqueue() {
|
115 |
-
if ( !
|
116 |
return;
|
117 |
}
|
118 |
|
@@ -184,7 +180,7 @@ class Frontend {
|
|
184 |
}
|
185 |
|
186 |
/**
|
187 |
-
* Adds the RSS footer
|
188 |
*
|
189 |
* @param string $content Feed item content.
|
190 |
* @return string
|
@@ -194,7 +190,7 @@ class Frontend {
|
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
-
* Adds the RSS footer
|
198 |
*
|
199 |
* @param string $content Feed item excerpt.
|
200 |
* @return string
|
@@ -204,10 +200,10 @@ class Frontend {
|
|
204 |
}
|
205 |
|
206 |
/**
|
207 |
-
*
|
208 |
*
|
209 |
* @param string $content Feed item content.
|
210 |
-
* @param string $context Feed item context,
|
211 |
* @return string
|
212 |
*/
|
213 |
private function embed_rss( $content, $context = 'full' ) {
|
@@ -237,7 +233,7 @@ class Frontend {
|
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
-
*
|
241 |
*
|
242 |
* @param string $content Feed item content.
|
243 |
* @param string $context Feed item context, either 'excerpt' or 'full'.
|
@@ -263,9 +259,9 @@ class Frontend {
|
|
263 |
}
|
264 |
|
265 |
/**
|
266 |
-
*
|
267 |
*
|
268 |
-
* @param string $content The RSS content
|
269 |
*
|
270 |
* @return string
|
271 |
*/
|
@@ -273,7 +269,7 @@ class Frontend {
|
|
273 |
global $post;
|
274 |
|
275 |
/**
|
276 |
-
*
|
277 |
*
|
278 |
* @param bool $unsigned Whether or not to follow the links in RSS feed, defaults to true.
|
279 |
*/
|
2 |
/**
|
3 |
* The public-facing functionality of the plugin.
|
4 |
*
|
|
|
|
|
|
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
7 |
* @subpackage RankMath\Frontend
|
49 |
|
50 |
if ( Helper::get_settings( 'general.breadcrumbs' ) ) {
|
51 |
/**
|
52 |
+
* If RM's breadcrumbs are enabled then we can remove the bbPress breadcrumbs.
|
|
|
53 |
*/
|
54 |
add_filter( 'bbp_get_breadcrumb', '__return_false' );
|
55 |
}
|
108 |
* Enqueue Styles and Scripts required by plugin.
|
109 |
*/
|
110 |
public function enqueue() {
|
111 |
+
if ( ! is_admin_bar_showing() || ! Helper::has_cap( 'admin_bar' ) ) {
|
112 |
return;
|
113 |
}
|
114 |
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
+
* Adds the RSS header and footer messages to the RSS feed item content.
|
184 |
*
|
185 |
* @param string $content Feed item content.
|
186 |
* @return string
|
190 |
}
|
191 |
|
192 |
/**
|
193 |
+
* Adds the RSS header and footer messages to the RSS feed item excerpt.
|
194 |
*
|
195 |
* @param string $content Feed item excerpt.
|
196 |
* @return string
|
200 |
}
|
201 |
|
202 |
/**
|
203 |
+
* Inserts the RSS header and footer messages in the RSS feed item.
|
204 |
*
|
205 |
* @param string $content Feed item content.
|
206 |
+
* @param string $context Feed item context, 'excerpt' or 'full'.
|
207 |
* @return string
|
208 |
*/
|
209 |
private function embed_rss( $content, $context = 'full' ) {
|
233 |
}
|
234 |
|
235 |
/**
|
236 |
+
* Check if we can add the RSS footer and/or header to the RSS feed item.
|
237 |
*
|
238 |
* @param string $content Feed item content.
|
239 |
* @param string $context Feed item context, either 'excerpt' or 'full'.
|
259 |
}
|
260 |
|
261 |
/**
|
262 |
+
* Replace variables with the actual values in RSS header and footer messages.
|
263 |
*
|
264 |
+
* @param string $content The RSS content.
|
265 |
*
|
266 |
* @return string
|
267 |
*/
|
269 |
global $post;
|
270 |
|
271 |
/**
|
272 |
+
* Add nofollow for the links in the RSS header and footer messages. Default: true.
|
273 |
*
|
274 |
* @param bool $unsigned Whether or not to follow the links in RSS feed, defaults to true.
|
275 |
*/
|
@@ -78,7 +78,7 @@ class Head {
|
|
78 |
}
|
79 |
|
80 |
/**
|
81 |
-
* Output Webmaster Tools
|
82 |
*/
|
83 |
public function webmaster_tools_authentication() {
|
84 |
$tools = [
|
@@ -102,7 +102,7 @@ class Head {
|
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
-
* Add Search Result Page schema.
|
106 |
*
|
107 |
* @param string $output A space-separated list of language attributes.
|
108 |
* @return string
|
@@ -116,8 +116,7 @@ class Head {
|
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
-
* Main
|
120 |
-
* This combines all the output on the frontend of the plugin.
|
121 |
*/
|
122 |
public function head() {
|
123 |
global $wp_query;
|
@@ -130,7 +129,7 @@ class Head {
|
|
130 |
|
131 |
$this->credits();
|
132 |
|
133 |
-
// Remove actions
|
134 |
remove_action( 'wp_head', 'rel_canonical' );
|
135 |
remove_action( 'wp_head', 'index_rel_link' );
|
136 |
remove_action( 'wp_head', 'start_post_rel_link' );
|
@@ -144,7 +143,7 @@ class Head {
|
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
-
*
|
148 |
*/
|
149 |
$this->do_action( 'head' );
|
150 |
|
@@ -159,7 +158,7 @@ class Head {
|
|
159 |
/**
|
160 |
* Main title function.
|
161 |
*
|
162 |
-
* @param string $title
|
163 |
* @return string
|
164 |
*/
|
165 |
public function title( $title ) {
|
@@ -172,7 +171,7 @@ class Head {
|
|
172 |
}
|
173 |
|
174 |
/**
|
175 |
-
*
|
176 |
*/
|
177 |
public function metadesc() {
|
178 |
$generated = Paper::get()->get_description();
|
@@ -185,7 +184,7 @@ class Head {
|
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
-
* Output the meta robots
|
189 |
*/
|
190 |
public function robots() {
|
191 |
$robots = Paper::get()->get_robots();
|
@@ -194,7 +193,8 @@ class Head {
|
|
194 |
echo '<meta name="robots" content="', esc_attr( $robotsstr ), '"/>', "\n";
|
195 |
}
|
196 |
|
197 |
-
// If a page
|
|
|
198 |
if ( isset( $robots['index'] ) && 'noindex' === $robots['index'] ) {
|
199 |
$this->remove_action( 'rank_math/head', 'canonical', 20 );
|
200 |
$this->remove_action( 'rank_math/head', 'adjacent_rel_links', 21 );
|
@@ -202,8 +202,7 @@ class Head {
|
|
202 |
}
|
203 |
|
204 |
/**
|
205 |
-
*
|
206 |
-
* the canonical URL for the current page.
|
207 |
*/
|
208 |
public function canonical() {
|
209 |
$canonical = Paper::get()->get_canonical();
|
@@ -213,25 +212,24 @@ class Head {
|
|
213 |
}
|
214 |
|
215 |
/**
|
216 |
-
*
|
217 |
*
|
218 |
* @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
|
219 |
*/
|
220 |
public function adjacent_rel_links() {
|
221 |
-
// Don't do this for Genesis, as the way Genesis handles homepage functionality is different and causes issues sometimes.
|
222 |
/**
|
223 |
-
*
|
224 |
*
|
225 |
-
* @param bool $unsigned Whether or not to rel
|
226 |
*/
|
227 |
if ( is_home() && function_exists( 'genesis' ) && false === $this->do_filter( 'frontend/genesis/force_adjacent_rel_home', false ) ) {
|
228 |
return;
|
229 |
}
|
230 |
|
231 |
/**
|
232 |
-
*
|
233 |
*
|
234 |
-
* @param bool $
|
235 |
*/
|
236 |
if ( true === $this->do_filter( 'frontend/disable_adjacent_rel_links', false ) ) {
|
237 |
return;
|
@@ -255,7 +253,7 @@ class Head {
|
|
255 |
}
|
256 |
|
257 |
/**
|
258 |
-
* Output the rel next/prev
|
259 |
*
|
260 |
* @return void
|
261 |
*/
|
@@ -284,7 +282,7 @@ class Head {
|
|
284 |
}
|
285 |
|
286 |
/**
|
287 |
-
* Output the rel next/prev
|
288 |
*/
|
289 |
private function adjacent_rel_links_archive() {
|
290 |
$url = Paper::get()->get_canonical( true, true );
|
@@ -297,7 +295,6 @@ class Head {
|
|
297 |
$this->adjacent_rel_link( 'prev', $url, $paged - 1 );
|
298 |
}
|
299 |
|
300 |
-
// Make sure to use index.php when needed, done after paged == 2 check so the prev links to homepage will not have index.php erroneously.
|
301 |
if ( is_front_page() ) {
|
302 |
$url = Router::get_base_url( '' );
|
303 |
}
|
@@ -312,12 +309,12 @@ class Head {
|
|
312 |
}
|
313 |
|
314 |
/**
|
315 |
-
*
|
316 |
*
|
317 |
-
* @param string $rel
|
318 |
-
* @param string $url The
|
319 |
-
* @param string $page The page number to
|
320 |
-
* @param string $query_arg
|
321 |
*/
|
322 |
private function adjacent_rel_link( $rel, $url, $page, $query_arg = 'paged' ) {
|
323 |
global $wp_rewrite;
|
@@ -327,9 +324,9 @@ class Head {
|
|
327 |
}
|
328 |
|
329 |
/**
|
330 |
-
*
|
331 |
*
|
332 |
-
* @param string $link The
|
333 |
*/
|
334 |
$link = $this->do_filter( "frontend/{$rel}_rel_link", '<link rel="' . esc_attr( $rel ) . '" href="' . esc_url( $url ) . "\" />\n" );
|
335 |
if ( Str::is_non_empty( $link ) ) {
|
@@ -338,7 +335,7 @@ class Head {
|
|
338 |
}
|
339 |
|
340 |
/**
|
341 |
-
*
|
342 |
*
|
343 |
* @return string The pagination base.
|
344 |
*/
|
@@ -349,12 +346,17 @@ class Head {
|
|
349 |
}
|
350 |
|
351 |
/**
|
352 |
-
* Credits
|
353 |
*
|
354 |
* @param boolean $closing Is closing credits needed.
|
355 |
*/
|
356 |
private function credits( $closing = false ) {
|
357 |
|
|
|
|
|
|
|
|
|
|
|
358 |
if ( $this->do_filter( 'frontend/remove_credit_notice', false ) ) {
|
359 |
return;
|
360 |
}
|
@@ -381,12 +383,12 @@ class Head {
|
|
381 |
}
|
382 |
|
383 |
/**
|
384 |
-
*
|
385 |
-
* title and then flushes the output.
|
386 |
*/
|
387 |
public function rewrite_title() {
|
388 |
global $wp_query;
|
389 |
-
|
|
|
390 |
$old_wp_query = null;
|
391 |
if ( ! $wp_query->is_main_query() ) {
|
392 |
$old_wp_query = $wp_query;
|
@@ -399,7 +401,7 @@ class Head {
|
|
399 |
echo $content;
|
400 |
}
|
401 |
|
402 |
-
// Find all
|
403 |
$content = preg_replace( '/<title.*?\/title>/i', '', $content );
|
404 |
$content = str_replace( '<head>', '<head>' . "\n" . '<title>' . esc_html( $title ) . '</title>', $content );
|
405 |
if ( ! empty( $old_wp_query ) ) {
|
78 |
}
|
79 |
|
80 |
/**
|
81 |
+
* Output authentication codes for all the Webmaster Tools.
|
82 |
*/
|
83 |
public function webmaster_tools_authentication() {
|
84 |
$tools = [
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
+
* Add Search Result Page schema as language attributes for the <html> tag.
|
106 |
*
|
107 |
* @param string $output A space-separated list of language attributes.
|
108 |
* @return string
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
+
* Main function attached to the wp_head hook.
|
|
|
120 |
*/
|
121 |
public function head() {
|
122 |
global $wp_query;
|
129 |
|
130 |
$this->credits();
|
131 |
|
132 |
+
// Remove core actions, now handled by Rank Math.
|
133 |
remove_action( 'wp_head', 'rel_canonical' );
|
134 |
remove_action( 'wp_head', 'index_rel_link' );
|
135 |
remove_action( 'wp_head', 'start_post_rel_link' );
|
143 |
}
|
144 |
|
145 |
/**
|
146 |
+
* Add extra output in the head tag.
|
147 |
*/
|
148 |
$this->do_action( 'head' );
|
149 |
|
158 |
/**
|
159 |
* Main title function.
|
160 |
*
|
161 |
+
* @param string $title Already set title or empty string.
|
162 |
* @return string
|
163 |
*/
|
164 |
public function title( $title ) {
|
171 |
}
|
172 |
|
173 |
/**
|
174 |
+
* Output the meta description tag with the generated description.
|
175 |
*/
|
176 |
public function metadesc() {
|
177 |
$generated = Paper::get()->get_description();
|
184 |
}
|
185 |
|
186 |
/**
|
187 |
+
* Output the meta robots tag.
|
188 |
*/
|
189 |
public function robots() {
|
190 |
$robots = Paper::get()->get_robots();
|
193 |
echo '<meta name="robots" content="', esc_attr( $robotsstr ), '"/>', "\n";
|
194 |
}
|
195 |
|
196 |
+
// If a page is noindex, let's remove the canonical URL.
|
197 |
+
// https://www.seroundtable.com/google-noindex-rel-canonical-confusion-26079.html .
|
198 |
if ( isset( $robots['index'] ) && 'noindex' === $robots['index'] ) {
|
199 |
$this->remove_action( 'rank_math/head', 'canonical', 20 );
|
200 |
$this->remove_action( 'rank_math/head', 'adjacent_rel_links', 21 );
|
202 |
}
|
203 |
|
204 |
/**
|
205 |
+
* Output the canonical URL tag.
|
|
|
206 |
*/
|
207 |
public function canonical() {
|
208 |
$canonical = Paper::get()->get_canonical();
|
212 |
}
|
213 |
|
214 |
/**
|
215 |
+
* Add the rel 'prev' and 'next' links to archives or single posts.
|
216 |
*
|
217 |
* @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
|
218 |
*/
|
219 |
public function adjacent_rel_links() {
|
|
|
220 |
/**
|
221 |
+
* Enable rel "next" & "prev" tags on sites running Genesis.
|
222 |
*
|
223 |
+
* @param bool $unsigned Whether or not to show rel next / prev .
|
224 |
*/
|
225 |
if ( is_home() && function_exists( 'genesis' ) && false === $this->do_filter( 'frontend/genesis/force_adjacent_rel_home', false ) ) {
|
226 |
return;
|
227 |
}
|
228 |
|
229 |
/**
|
230 |
+
* Disable rel 'prev' and 'next' links.
|
231 |
*
|
232 |
+
* @param bool $disable Rel 'prev' and 'next' links should be disabled or not.
|
233 |
*/
|
234 |
if ( true === $this->do_filter( 'frontend/disable_adjacent_rel_links', false ) ) {
|
235 |
return;
|
253 |
}
|
254 |
|
255 |
/**
|
256 |
+
* Output the rel next/prev tags on a paginated single post.
|
257 |
*
|
258 |
* @return void
|
259 |
*/
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
+
* Output the rel next/prev tags on archives.
|
286 |
*/
|
287 |
private function adjacent_rel_links_archive() {
|
288 |
$url = Paper::get()->get_canonical( true, true );
|
295 |
$this->adjacent_rel_link( 'prev', $url, $paged - 1 );
|
296 |
}
|
297 |
|
|
|
298 |
if ( is_front_page() ) {
|
299 |
$url = Router::get_base_url( '' );
|
300 |
}
|
309 |
}
|
310 |
|
311 |
/**
|
312 |
+
* Build adjacent page link for archives.
|
313 |
*
|
314 |
+
* @param string $rel Prev or next.
|
315 |
+
* @param string $url The current archive URL without page parameter.
|
316 |
+
* @param string $page The page number added to the $url in the link tag.
|
317 |
+
* @param string $query_arg The pagination query argument to use for the $url.
|
318 |
*/
|
319 |
private function adjacent_rel_link( $rel, $url, $page, $query_arg = 'paged' ) {
|
320 |
global $wp_rewrite;
|
324 |
}
|
325 |
|
326 |
/**
|
327 |
+
* Change the link rel HTML output.
|
328 |
*
|
329 |
+
* @param string $link The `<link rel=""` tag.
|
330 |
*/
|
331 |
$link = $this->do_filter( "frontend/{$rel}_rel_link", '<link rel="' . esc_attr( $rel ) . '" href="' . esc_url( $url ) . "\" />\n" );
|
332 |
if ( Str::is_non_empty( $link ) ) {
|
335 |
}
|
336 |
|
337 |
/**
|
338 |
+
* Get pagination base.
|
339 |
*
|
340 |
* @return string The pagination base.
|
341 |
*/
|
346 |
}
|
347 |
|
348 |
/**
|
349 |
+
* Credits.
|
350 |
*
|
351 |
* @param boolean $closing Is closing credits needed.
|
352 |
*/
|
353 |
private function credits( $closing = false ) {
|
354 |
|
355 |
+
/**
|
356 |
+
* Disable credit in the HTML source.
|
357 |
+
*
|
358 |
+
* @param bool $remove
|
359 |
+
*/
|
360 |
if ( $this->do_filter( 'frontend/remove_credit_notice', false ) ) {
|
361 |
return;
|
362 |
}
|
383 |
}
|
384 |
|
385 |
/**
|
386 |
+
* Use output buffering to force rewrite the title tag.
|
|
|
387 |
*/
|
388 |
public function rewrite_title() {
|
389 |
global $wp_query;
|
390 |
+
|
391 |
+
// Check if we're in the main query.
|
392 |
$old_wp_query = null;
|
393 |
if ( ! $wp_query->is_main_query() ) {
|
394 |
$old_wp_query = $wp_query;
|
401 |
echo $content;
|
402 |
}
|
403 |
|
404 |
+
// Find all title tags, remove them, and add the new one.
|
405 |
$content = preg_replace( '/<title.*?\/title>/i', '', $content );
|
406 |
$content = str_replace( '<head>', '<head>' . "\n" . '<title>' . esc_html( $title ) . '</title>', $content );
|
407 |
if ( ! empty( $old_wp_query ) ) {
|
@@ -26,24 +26,29 @@ class Remove_Reply_To_Com {
|
|
26 |
* The Constructor.
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
$this->filter( 'comment_reply_link', 'remove_reply_to_com' );
|
31 |
$this->action( 'template_redirect', 'replytocom_redirect', 1 );
|
32 |
}
|
33 |
}
|
34 |
|
35 |
/**
|
36 |
-
*
|
37 |
*
|
38 |
* @param string $link The comment link as a string.
|
39 |
-
* @return string The
|
40 |
*/
|
41 |
public function remove_reply_to_com( $link ) {
|
42 |
return preg_replace( '`href=(["\'])(?:.*(?:\?|&|&)replytocom=(\d+)#respond)`', 'href=$1#comment-$2', $link );
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
-
*
|
47 |
*
|
48 |
* @return bool True when redirect has been done.
|
49 |
*/
|
@@ -63,17 +68,4 @@ class Remove_Reply_To_Com {
|
|
63 |
return false;
|
64 |
}
|
65 |
|
66 |
-
/**
|
67 |
-
* Checks whether we can allow the feature that removes ?replytocom query parameters.
|
68 |
-
*
|
69 |
-
* @return bool True to remove, false not to remove.
|
70 |
-
*/
|
71 |
-
private function clean_reply_to_com() {
|
72 |
-
/**
|
73 |
-
* Filter: 'rank_math_remove_reply_to_com' - Allow disabling the feature that removes ?replytocom query parameters.
|
74 |
-
*
|
75 |
-
* @param bool $return True to remove, false not to remove.
|
76 |
-
*/
|
77 |
-
return (bool) $this->do_filter( 'frontend/remove_reply_to_com', true );
|
78 |
-
}
|
79 |
}
|
26 |
* The Constructor.
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
+
/**
|
30 |
+
* Enable or disable the feature that removes the ?replytocom parameters.
|
31 |
+
*
|
32 |
+
* @param bool $remove Whether to remove the parameters.
|
33 |
+
*/
|
34 |
+
if ( $this->do_filter( 'frontend/remove_reply_to_com', true ) ) {
|
35 |
$this->filter( 'comment_reply_link', 'remove_reply_to_com' );
|
36 |
$this->action( 'template_redirect', 'replytocom_redirect', 1 );
|
37 |
}
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
+
* Replace the ?replytocom with #comment-[number] in a link.
|
42 |
*
|
43 |
* @param string $link The comment link as a string.
|
44 |
+
* @return string The new link.
|
45 |
*/
|
46 |
public function remove_reply_to_com( $link ) {
|
47 |
return preg_replace( '`href=(["\'])(?:.*(?:\?|&|&)replytocom=(\d+)#respond)`', 'href=$1#comment-$2', $link );
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
+
* Redirect the ?replytocom URLs.
|
52 |
*
|
53 |
* @return bool True when redirect has been done.
|
54 |
*/
|
68 |
return false;
|
69 |
}
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
@@ -41,20 +41,20 @@ class Shortcodes {
|
|
41 |
$this->remove_shortcode( 'wpseo_map' );
|
42 |
$this->remove_shortcode( 'wpseo_opening_hours' );
|
43 |
|
44 |
-
// Yoast compatibility shortcodes.
|
45 |
$this->add_shortcode( 'wpseo_address', 'yoast_address' );
|
46 |
$this->add_shortcode( 'wpseo_map', 'yoast_map' );
|
47 |
$this->add_shortcode( 'wpseo_opening_hours', 'yoast_opening_hours' );
|
48 |
|
49 |
-
// Contact shortcode.
|
50 |
$this->add_shortcode( 'rank_math_contact_info', 'contact_info' );
|
51 |
|
52 |
-
//
|
53 |
$this->add_shortcode( 'rank_math_breadcrumb', 'breadcrumb' );
|
54 |
}
|
55 |
|
56 |
/**
|
57 |
-
* Get the
|
58 |
*
|
59 |
* @param array $args Arguments.
|
60 |
*
|
@@ -142,7 +142,7 @@ class Shortcodes {
|
|
142 |
/**
|
143 |
* Allow developer to change the address part format.
|
144 |
*
|
145 |
-
* @param string $parts_format String format
|
146 |
*/
|
147 |
$parts_format = $this->do_filter( 'shortcode/contact/address_parts_format', '<span class="contact-address-%1$s">%2$s</span>' );
|
148 |
|
@@ -311,7 +311,7 @@ class Shortcodes {
|
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
-
* Filter address for Google Map in contact shortcode
|
315 |
*
|
316 |
* @param string $address
|
317 |
*/
|
41 |
$this->remove_shortcode( 'wpseo_map' );
|
42 |
$this->remove_shortcode( 'wpseo_opening_hours' );
|
43 |
|
44 |
+
// Add Yoast compatibility shortcodes.
|
45 |
$this->add_shortcode( 'wpseo_address', 'yoast_address' );
|
46 |
$this->add_shortcode( 'wpseo_map', 'yoast_map' );
|
47 |
$this->add_shortcode( 'wpseo_opening_hours', 'yoast_opening_hours' );
|
48 |
|
49 |
+
// Add the Contact shortcode.
|
50 |
$this->add_shortcode( 'rank_math_contact_info', 'contact_info' );
|
51 |
|
52 |
+
// Add the Breadcrumbs shortcode.
|
53 |
$this->add_shortcode( 'rank_math_breadcrumb', 'breadcrumb' );
|
54 |
}
|
55 |
|
56 |
/**
|
57 |
+
* Get the breadcrumbs.
|
58 |
*
|
59 |
* @param array $args Arguments.
|
60 |
*
|
142 |
/**
|
143 |
* Allow developer to change the address part format.
|
144 |
*
|
145 |
+
* @param string $parts_format String format to output the address part.
|
146 |
*/
|
147 |
$parts_format = $this->do_filter( 'shortcode/contact/address_parts_format', '<span class="contact-address-%1$s">%2$s</span>' );
|
148 |
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
+
* Filter address for Google Map in contact shortcode.
|
315 |
*
|
316 |
* @param string $address
|
317 |
*/
|
@@ -57,7 +57,7 @@ class Author implements IPaper {
|
|
57 |
$robots = Paper::robots_combine( User::get_meta( 'robots', get_query_var( 'author' ) ) );
|
58 |
|
59 |
if ( empty( $robots ) && Helper::get_settings( 'titles.author_custom_robots' ) ) {
|
60 |
-
$robots = Paper::robots_combine( Helper::get_settings( 'titles.author_robots' ) );
|
61 |
}
|
62 |
|
63 |
return $robots;
|
57 |
$robots = Paper::robots_combine( User::get_meta( 'robots', get_query_var( 'author' ) ) );
|
58 |
|
59 |
if ( empty( $robots ) && Helper::get_settings( 'titles.author_custom_robots' ) ) {
|
60 |
+
$robots = Paper::robots_combine( Helper::get_settings( 'titles.author_robots' ), true );
|
61 |
}
|
62 |
|
63 |
return $robots;
|
@@ -205,17 +205,9 @@ class Paper {
|
|
205 |
|
206 |
$this->robots = $this->paper->robots();
|
207 |
if ( empty( $this->robots ) ) {
|
208 |
-
$this->
|
209 |
}
|
210 |
-
|
211 |
-
// Add Index and Follow.
|
212 |
-
if ( ! isset( $this->robots['index'] ) ) {
|
213 |
-
$this->robots = [ 'index' => 'index' ] + $this->robots;
|
214 |
-
}
|
215 |
-
if ( ! isset( $this->robots['follow'] ) ) {
|
216 |
-
$this->robots = [ 'follow' => 'follow' ] + $this->robots;
|
217 |
-
}
|
218 |
-
|
219 |
$this->respect_settings_for_robots();
|
220 |
|
221 |
/**
|
@@ -228,6 +220,26 @@ class Paper {
|
|
228 |
return $this->robots;
|
229 |
}
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
/**
|
232 |
* Get focus keywords
|
233 |
*
|
@@ -273,19 +285,6 @@ class Paper {
|
|
273 |
}
|
274 |
}
|
275 |
|
276 |
-
/**
|
277 |
-
* Get global robots
|
278 |
-
*/
|
279 |
-
private function get_global_robots() {
|
280 |
-
$this->robots = self::robots_combine( Helper::get_settings( 'titles.robots_global' ) );
|
281 |
-
if ( empty( $this->robots ) ) {
|
282 |
-
$this->robots = [
|
283 |
-
'index' => 'index',
|
284 |
-
'follow' => 'follow',
|
285 |
-
];
|
286 |
-
}
|
287 |
-
}
|
288 |
-
|
289 |
/**
|
290 |
* Get canonical after sanitization.
|
291 |
*
|
@@ -413,13 +412,17 @@ class Paper {
|
|
413 |
/**
|
414 |
* Make robots values as keyed array.
|
415 |
*
|
416 |
-
* @param array $robots
|
|
|
417 |
*
|
418 |
* @return array
|
419 |
*/
|
420 |
-
public static function robots_combine( $robots ) {
|
421 |
if ( empty( $robots ) || ! is_array( $robots ) ) {
|
422 |
-
return []
|
|
|
|
|
|
|
423 |
}
|
424 |
|
425 |
$robots = array_combine( $robots, $robots );
|
205 |
|
206 |
$this->robots = $this->paper->robots();
|
207 |
if ( empty( $this->robots ) ) {
|
208 |
+
$this->robots = self::robots_combine( Helper::get_settings( 'titles.robots_global' ) );
|
209 |
}
|
210 |
+
$this->validate_robots();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
$this->respect_settings_for_robots();
|
212 |
|
213 |
/**
|
220 |
return $this->robots;
|
221 |
}
|
222 |
|
223 |
+
/**
|
224 |
+
* Validate robots.
|
225 |
+
*/
|
226 |
+
private function validate_robots() {
|
227 |
+
if ( empty( $this->robots ) || ! is_array( $this->robots ) ) {
|
228 |
+
return [
|
229 |
+
'index' => 'index',
|
230 |
+
'follow' => 'follow',
|
231 |
+
];
|
232 |
+
}
|
233 |
+
|
234 |
+
// Add Index and Follow.
|
235 |
+
if ( ! isset( $this->robots['index'] ) ) {
|
236 |
+
$this->robots = [ 'index' => 'index' ] + $this->robots;
|
237 |
+
}
|
238 |
+
if ( ! isset( $this->robots['follow'] ) ) {
|
239 |
+
$this->robots = [ 'follow' => 'follow' ] + $this->robots;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
/**
|
244 |
* Get focus keywords
|
245 |
*
|
285 |
}
|
286 |
}
|
287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
/**
|
289 |
* Get canonical after sanitization.
|
290 |
*
|
412 |
/**
|
413 |
* Make robots values as keyed array.
|
414 |
*
|
415 |
+
* @param array $robots Main instance.
|
416 |
+
* @param bool $default Append default.
|
417 |
*
|
418 |
* @return array
|
419 |
*/
|
420 |
+
public static function robots_combine( $robots, $default = false ) {
|
421 |
if ( empty( $robots ) || ! is_array( $robots ) ) {
|
422 |
+
return ! $default ? [] : [
|
423 |
+
'index' => 'index',
|
424 |
+
'follow' => 'follow',
|
425 |
+
];
|
426 |
}
|
427 |
|
428 |
$robots = array_combine( $robots, $robots );
|
@@ -198,7 +198,7 @@ class Singular implements IPaper {
|
|
198 |
/**
|
199 |
* Retrieves the robots set in the post metabox.
|
200 |
*
|
201 |
-
* @param object|null $object Object to retrieve the
|
202 |
*
|
203 |
* @return string The robots for the specified object, or queried object if not supplied.
|
204 |
*/
|
@@ -210,7 +210,7 @@ class Singular implements IPaper {
|
|
210 |
$post_type = $object->post_type;
|
211 |
$robots = Paper::robots_combine( Post::get_meta( 'robots', $object->ID ) );
|
212 |
if ( empty( $robots ) && Helper::get_settings( "titles.pt_{$post_type}_custom_robots" ) ) {
|
213 |
-
$robots = Paper::robots_combine( Helper::get_settings( "titles.pt_{$post_type}_robots" ) );
|
214 |
}
|
215 |
|
216 |
// Noindex these conditions.
|
198 |
/**
|
199 |
* Retrieves the robots set in the post metabox.
|
200 |
*
|
201 |
+
* @param object|null $object Object to retrieve the robots data from.
|
202 |
*
|
203 |
* @return string The robots for the specified object, or queried object if not supplied.
|
204 |
*/
|
210 |
$post_type = $object->post_type;
|
211 |
$robots = Paper::robots_combine( Post::get_meta( 'robots', $object->ID ) );
|
212 |
if ( empty( $robots ) && Helper::get_settings( "titles.pt_{$post_type}_custom_robots" ) ) {
|
213 |
+
$robots = Paper::robots_combine( Helper::get_settings( "titles.pt_{$post_type}_robots" ), true );
|
214 |
}
|
215 |
|
216 |
// Noindex these conditions.
|
@@ -64,7 +64,7 @@ class Taxonomy implements IPaper {
|
|
64 |
$robots = Paper::robots_combine( Term::get_meta( 'robots', $object ) );
|
65 |
|
66 |
if ( is_object( $object ) && empty( $robots ) && Helper::get_settings( "titles.tax_{$object->taxonomy}_custom_robots" ) ) {
|
67 |
-
$robots = Paper::robots_combine( Helper::get_settings( "titles.tax_{$object->taxonomy}_robots" ) );
|
68 |
}
|
69 |
|
70 |
if ( $this->noindex_term( $object ) ) {
|
64 |
$robots = Paper::robots_combine( Term::get_meta( 'robots', $object ) );
|
65 |
|
66 |
if ( is_object( $object ) && empty( $robots ) && Helper::get_settings( "titles.tax_{$object->taxonomy}_custom_robots" ) ) {
|
67 |
+
$robots = Paper::robots_combine( Helper::get_settings( "titles.tax_{$object->taxonomy}_robots" ), true );
|
68 |
}
|
69 |
|
70 |
if ( $this->noindex_term( $object ) ) {
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The
|
4 |
*
|
5 |
* @since 1.0.9
|
6 |
* @package RankMath
|
@@ -13,7 +13,7 @@ namespace RankMath\Helpers;
|
|
13 |
defined( 'ABSPATH' ) || exit;
|
14 |
|
15 |
/**
|
16 |
-
*
|
17 |
*/
|
18 |
trait Api {
|
19 |
|
@@ -28,7 +28,7 @@ trait Api {
|
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
-
*
|
32 |
*
|
33 |
* @param string $notification_id Notification id.
|
34 |
*/
|
@@ -48,7 +48,7 @@ trait Api {
|
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
-
* Add something to JSON object.
|
52 |
*
|
53 |
* @param string $key Unique identifier.
|
54 |
* @param mixed $value The data itself can be either a single or an array.
|
@@ -59,7 +59,7 @@ trait Api {
|
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
-
* Remove something from JSON object.
|
63 |
*
|
64 |
* @param string $key Unique identifier.
|
65 |
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The API helpers.
|
4 |
*
|
5 |
* @since 1.0.9
|
6 |
* @package RankMath
|
13 |
defined( 'ABSPATH' ) || exit;
|
14 |
|
15 |
/**
|
16 |
+
* API class.
|
17 |
*/
|
18 |
trait Api {
|
19 |
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
+
* Remove notification.
|
32 |
*
|
33 |
* @param string $notification_id Notification id.
|
34 |
*/
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
+
* Add something to the JSON object.
|
52 |
*
|
53 |
* @param string $key Unique identifier.
|
54 |
* @param mixed $value The data itself can be either a single or an array.
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
+
* Remove something from the JSON object.
|
63 |
*
|
64 |
* @param string $key Unique identifier.
|
65 |
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
|
@@ -15,7 +15,7 @@ use RankMath\Helper;
|
|
15 |
defined( 'ABSPATH' ) || exit;
|
16 |
|
17 |
/**
|
18 |
-
*
|
19 |
*/
|
20 |
trait Attachment {
|
21 |
|
15 |
defined( 'ABSPATH' ) || exit;
|
16 |
|
17 |
/**
|
18 |
+
* Attachment trait.
|
19 |
*/
|
20 |
trait Attachment {
|
21 |
|
@@ -21,7 +21,7 @@ defined( 'ABSPATH' ) || exit;
|
|
21 |
trait Choices {
|
22 |
|
23 |
/**
|
24 |
-
* Gets list of overlay images for social thumbnail.
|
25 |
*
|
26 |
* @codeCoverageIgnore
|
27 |
*
|
@@ -32,6 +32,11 @@ trait Choices {
|
|
32 |
$uri = rank_math()->plugin_url() . 'assets/admin/img/';
|
33 |
$dir = rank_math()->plugin_dir() . 'assets/admin/img/';
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
$list = apply_filters(
|
36 |
'rank_math/social/overlay_images',
|
37 |
[
|
@@ -73,7 +78,7 @@ trait Choices {
|
|
73 |
*
|
74 |
* @codeCoverageIgnore
|
75 |
*
|
76 |
-
* @param string $current
|
77 |
* @return array
|
78 |
*/
|
79 |
public static function choices_separator( $current = '' ) {
|
@@ -94,7 +99,7 @@ trait Choices {
|
|
94 |
}
|
95 |
|
96 |
/**
|
97 |
-
* Get
|
98 |
*
|
99 |
* @codeCoverageIgnore
|
100 |
*
|
@@ -115,7 +120,7 @@ trait Choices {
|
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
-
* Get post types.
|
119 |
*
|
120 |
* @codeCoverageIgnore
|
121 |
*
|
@@ -130,7 +135,7 @@ trait Choices {
|
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
-
* Get business
|
134 |
*
|
135 |
* @codeCoverageIgnore
|
136 |
*
|
@@ -430,7 +435,7 @@ trait Choices {
|
|
430 |
}
|
431 |
|
432 |
/**
|
433 |
-
*
|
434 |
*
|
435 |
* @codeCoverageIgnore
|
436 |
*
|
@@ -459,11 +464,16 @@ trait Choices {
|
|
459 |
$types = [ 'off' => $none ] + $types;
|
460 |
}
|
461 |
|
|
|
|
|
|
|
|
|
|
|
462 |
return apply_filters( 'rank_math/settings/snippet/types', $types );
|
463 |
}
|
464 |
|
465 |
/**
|
466 |
-
*
|
467 |
*
|
468 |
* @codeCoverageIgnore
|
469 |
*
|
21 |
trait Choices {
|
22 |
|
23 |
/**
|
24 |
+
* Gets list of overlay images for the social thumbnail.
|
25 |
*
|
26 |
* @codeCoverageIgnore
|
27 |
*
|
32 |
$uri = rank_math()->plugin_url() . 'assets/admin/img/';
|
33 |
$dir = rank_math()->plugin_dir() . 'assets/admin/img/';
|
34 |
|
35 |
+
/**
|
36 |
+
* Allow developers to add/remove overlay images.
|
37 |
+
*
|
38 |
+
* @param array $images Image data as array of arrays.
|
39 |
+
*/
|
40 |
$list = apply_filters(
|
41 |
'rank_math/social/overlay_images',
|
42 |
[
|
78 |
*
|
79 |
* @codeCoverageIgnore
|
80 |
*
|
81 |
+
* @param string $current Currently saved separator if any.
|
82 |
* @return array
|
83 |
*/
|
84 |
public static function choices_separator( $current = '' ) {
|
99 |
}
|
100 |
|
101 |
/**
|
102 |
+
* Get all accessible post types as choices.
|
103 |
*
|
104 |
* @codeCoverageIgnore
|
105 |
*
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
+
* Get all post types.
|
124 |
*
|
125 |
* @codeCoverageIgnore
|
126 |
*
|
135 |
}
|
136 |
|
137 |
/**
|
138 |
+
* Get business types as choices.
|
139 |
*
|
140 |
* @codeCoverageIgnore
|
141 |
*
|
435 |
}
|
436 |
|
437 |
/**
|
438 |
+
* Get Rich Snippet types as choices.
|
439 |
*
|
440 |
* @codeCoverageIgnore
|
441 |
*
|
464 |
$types = [ 'off' => $none ] + $types;
|
465 |
}
|
466 |
|
467 |
+
/**
|
468 |
+
* Allow developers to add/remove Rich Snippet type choices.
|
469 |
+
*
|
470 |
+
* @param array $types Rich Snippet types.
|
471 |
+
*/
|
472 |
return apply_filters( 'rank_math/settings/snippet/types', $types );
|
473 |
}
|
474 |
|
475 |
/**
|
476 |
+
* Get the redirection types.
|
477 |
*
|
478 |
* @codeCoverageIgnore
|
479 |
*
|
@@ -26,13 +26,18 @@ trait Conditional {
|
|
26 |
* @return boolean
|
27 |
*/
|
28 |
public static function is_whitelabel() {
|
|
|
|
|
|
|
|
|
|
|
29 |
return apply_filters( 'rank_math/whitelabel', false );
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
-
*
|
34 |
*
|
35 |
-
* @param string $id ID
|
36 |
* @return boolean
|
37 |
*/
|
38 |
public static function is_module_active( $id ) {
|
@@ -61,7 +66,7 @@ trait Conditional {
|
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
-
* Check if site is connected to
|
65 |
*
|
66 |
* @return bool
|
67 |
*/
|
@@ -86,7 +91,7 @@ trait Conditional {
|
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
-
* Check if author
|
90 |
*
|
91 |
* @return bool
|
92 |
*/
|
@@ -103,7 +108,7 @@ trait Conditional {
|
|
103 |
}
|
104 |
|
105 |
/**
|
106 |
-
* Check if AMP module is active.
|
107 |
*
|
108 |
* @return bool
|
109 |
*
|
26 |
* @return boolean
|
27 |
*/
|
28 |
public static function is_whitelabel() {
|
29 |
+
/**
|
30 |
+
* Enable whitelabel.
|
31 |
+
*
|
32 |
+
* @param bool $whitelabel Enable whitelabel.
|
33 |
+
*/
|
34 |
return apply_filters( 'rank_math/whitelabel', false );
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
+
* Check if module is active.
|
39 |
*
|
40 |
+
* @param string $id Module ID.
|
41 |
* @return boolean
|
42 |
*/
|
43 |
public static function is_module_active( $id ) {
|
66 |
}
|
67 |
|
68 |
/**
|
69 |
+
* Check if the site is connected to the Rank Math API.
|
70 |
*
|
71 |
* @return bool
|
72 |
*/
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
+
* Check if author archives are indexable.
|
95 |
*
|
96 |
* @return bool
|
97 |
*/
|
108 |
}
|
109 |
|
110 |
/**
|
111 |
+
* Check if the AMP module is active.
|
112 |
*
|
113 |
* @return bool
|
114 |
*
|
@@ -20,7 +20,7 @@ defined( 'ABSPATH' ) || exit;
|
|
20 |
trait Post_Type {
|
21 |
|
22 |
/**
|
23 |
-
*
|
24 |
*
|
25 |
* @param int $post_id Post ID to check.
|
26 |
* @return boolean
|
@@ -31,8 +31,14 @@ trait Post_Type {
|
|
31 |
}
|
32 |
|
33 |
$robots = Helper::get_post_meta( 'robots', $post_id );
|
34 |
-
if ( ! empty( $robots ) && is_array( $robots )
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
$post_type = get_post_type( $post_id );
|
@@ -43,7 +49,7 @@ trait Post_Type {
|
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
-
*
|
47 |
*
|
48 |
* @param int $post_id Post ID to check.
|
49 |
* @return bool
|
@@ -86,7 +92,7 @@ trait Post_Type {
|
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
-
*
|
90 |
*
|
91 |
* @param string $post_type Post type name.
|
92 |
* @param bool $singular Get singular label.
|
@@ -101,13 +107,11 @@ trait Post_Type {
|
|
101 |
}
|
102 |
|
103 |
/**
|
104 |
-
*
|
105 |
-
*
|
106 |
-
* An accessible post type is a post type that is public.
|
107 |
*
|
108 |
* @codeCoverageIgnore
|
109 |
*
|
110 |
-
* @return array
|
111 |
*/
|
112 |
public static function get_accessible_post_types() {
|
113 |
static $accessible_post_types;
|
@@ -120,13 +124,12 @@ trait Post_Type {
|
|
120 |
$accessible_post_types = array_filter( $accessible_post_types, 'is_post_type_viewable' );
|
121 |
|
122 |
/**
|
123 |
-
*
|
124 |
*
|
125 |
-
* @api array $accessible_post_types The
|
126 |
*/
|
127 |
$accessible_post_types = apply_filters( 'rank_math/sitemap/excluded_post_types', $accessible_post_types );
|
128 |
|
129 |
-
// When the array gets messed up somewhere.
|
130 |
if ( ! is_array( $accessible_post_types ) ) {
|
131 |
$accessible_post_types = [];
|
132 |
}
|
20 |
trait Post_Type {
|
21 |
|
22 |
/**
|
23 |
+
* Check if post is indexable.
|
24 |
*
|
25 |
* @param int $post_id Post ID to check.
|
26 |
* @return boolean
|
31 |
}
|
32 |
|
33 |
$robots = Helper::get_post_meta( 'robots', $post_id );
|
34 |
+
if ( ! empty( $robots ) && is_array( $robots ) ) {
|
35 |
+
if ( in_array( 'index', $robots, true ) ) {
|
36 |
+
return true;
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( in_array( 'noindex', $robots, true ) ) {
|
40 |
+
return false;
|
41 |
+
}
|
42 |
}
|
43 |
|
44 |
$post_type = get_post_type( $post_id );
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
+
* Check if post is explicitly excluded.
|
53 |
*
|
54 |
* @param int $post_id Post ID to check.
|
55 |
* @return bool
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
+
* Get the post type label.
|
96 |
*
|
97 |
* @param string $post_type Post type name.
|
98 |
* @param bool $singular Get singular label.
|
107 |
}
|
108 |
|
109 |
/**
|
110 |
+
* Get post types that are public and not set to noindex.
|
|
|
|
|
111 |
*
|
112 |
* @codeCoverageIgnore
|
113 |
*
|
114 |
+
* @return array All the accessible post types.
|
115 |
*/
|
116 |
public static function get_accessible_post_types() {
|
117 |
static $accessible_post_types;
|
124 |
$accessible_post_types = array_filter( $accessible_post_types, 'is_post_type_viewable' );
|
125 |
|
126 |
/**
|
127 |
+
* Changing the list of accessible post types.
|
128 |
*
|
129 |
+
* @api array $accessible_post_types The post types.
|
130 |
*/
|
131 |
$accessible_post_types = apply_filters( 'rank_math/sitemap/excluded_post_types', $accessible_post_types );
|
132 |
|
|
|
133 |
if ( ! is_array( $accessible_post_types ) ) {
|
134 |
$accessible_post_types = [];
|
135 |
}
|
@@ -28,8 +28,14 @@ trait Taxonomy {
|
|
28 |
*/
|
29 |
public static function is_term_indexable( $term ) {
|
30 |
$robots = Helper::get_term_meta( 'robots', $term, $term->taxonomy );
|
31 |
-
if ( ! empty( $robots ) && is_array( $robots )
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
$robots = Helper::get_settings( 'titles.tax_' . $term->taxonomy . '_custom_robots' );
|
@@ -56,13 +62,11 @@ trait Taxonomy {
|
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
*
|
60 |
-
*
|
61 |
-
* An accessible taxonomy is a taxonomy that is public.
|
62 |
*
|
63 |
* @codeCoverageIgnore
|
64 |
*
|
65 |
-
* @return array
|
66 |
*/
|
67 |
public static function get_accessible_taxonomies() {
|
68 |
static $accessible_taxonomies;
|
@@ -74,7 +78,6 @@ trait Taxonomy {
|
|
74 |
$accessible_taxonomies = get_taxonomies( [ 'public' => true ], 'objects' );
|
75 |
$accessible_taxonomies = self::filter_exclude_taxonomies( $accessible_taxonomies );
|
76 |
|
77 |
-
// When the array gets messed up somewhere.
|
78 |
if ( ! is_array( $accessible_taxonomies ) ) {
|
79 |
$accessible_taxonomies = [];
|
80 |
}
|
@@ -161,10 +164,7 @@ trait Taxonomy {
|
|
161 |
}
|
162 |
|
163 |
/**
|
164 |
-
* Determine whether a taxonomy is
|
165 |
-
*
|
166 |
-
* For built-in taxonomies such as categories and tags, the 'public' value will be evaluated.
|
167 |
-
* For all others, the 'publicly_queryable' value will be used.
|
168 |
*
|
169 |
* @codeCoverageIgnore
|
170 |
*
|
@@ -180,6 +180,10 @@ trait Taxonomy {
|
|
180 |
}
|
181 |
}
|
182 |
|
|
|
|
|
|
|
|
|
183 |
return $taxonomy->publicly_queryable || ( $taxonomy->_builtin && $taxonomy->public );
|
184 |
}
|
185 |
}
|
28 |
*/
|
29 |
public static function is_term_indexable( $term ) {
|
30 |
$robots = Helper::get_term_meta( 'robots', $term, $term->taxonomy );
|
31 |
+
if ( ! empty( $robots ) && is_array( $robots ) ) {
|
32 |
+
if ( in_array( 'index', $robots, true ) ) {
|
33 |
+
return true;
|
34 |
+
}
|
35 |
+
|
36 |
+
if ( in_array( 'noindex', $robots, true ) ) {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
}
|
40 |
|
41 |
$robots = Helper::get_settings( 'titles.tax_' . $term->taxonomy . '_custom_robots' );
|
62 |
}
|
63 |
|
64 |
/**
|
65 |
+
* Get the taxonomies that are public and not set to noindex.
|
|
|
|
|
66 |
*
|
67 |
* @codeCoverageIgnore
|
68 |
*
|
69 |
+
* @return array All the accessible taxonomies.
|
70 |
*/
|
71 |
public static function get_accessible_taxonomies() {
|
72 |
static $accessible_taxonomies;
|
78 |
$accessible_taxonomies = get_taxonomies( [ 'public' => true ], 'objects' );
|
79 |
$accessible_taxonomies = self::filter_exclude_taxonomies( $accessible_taxonomies );
|
80 |
|
|
|
81 |
if ( ! is_array( $accessible_taxonomies ) ) {
|
82 |
$accessible_taxonomies = [];
|
83 |
}
|
164 |
}
|
165 |
|
166 |
/**
|
167 |
+
* Determine whether a taxonomy is viewable.
|
|
|
|
|
|
|
168 |
*
|
169 |
* @codeCoverageIgnore
|
170 |
*
|
180 |
}
|
181 |
}
|
182 |
|
183 |
+
/*
|
184 |
+
* For categories and tags, we check for the 'public' parameter.
|
185 |
+
* For others, we use the 'publicly_queryable' parameter.
|
186 |
+
*/
|
187 |
return $taxonomy->publicly_queryable || ( $taxonomy->_builtin && $taxonomy->public );
|
188 |
}
|
189 |
}
|
@@ -120,7 +120,7 @@ trait WordPress {
|
|
120 |
return add_query_arg( $args, admin_url( 'admin.php' ) );
|
121 |
}
|
122 |
|
123 |
-
// Makes sure the plugin
|
124 |
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
125 |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
126 |
}
|
@@ -129,7 +129,7 @@ trait WordPress {
|
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
-
* Get
|
133 |
*
|
134 |
* @codeCoverageIgnore
|
135 |
*
|
120 |
return add_query_arg( $args, admin_url( 'admin.php' ) );
|
121 |
}
|
122 |
|
123 |
+
// Makes sure the plugin functions are defined before trying to use them.
|
124 |
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
125 |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
126 |
}
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
+
* Get Rank Math Dashboard url.
|
133 |
*
|
134 |
* @codeCoverageIgnore
|
135 |
*
|
@@ -85,9 +85,8 @@ if ( Helper::has_cap( 'onpage_analysis' ) ) {
|
|
85 |
) );
|
86 |
}
|
87 |
|
88 |
-
// Primary Category.
|
89 |
/**
|
90 |
-
*
|
91 |
*
|
92 |
* @param bool $return True to disable.
|
93 |
*/
|
85 |
) );
|
86 |
}
|
87 |
|
|
|
88 |
/**
|
89 |
+
* Allow disabling the primary term feature.
|
90 |
*
|
91 |
* @param bool $return True to disable.
|
92 |
*/
|
@@ -16,7 +16,7 @@ $cmb->add_field( array(
|
|
16 |
) );
|
17 |
|
18 |
/**
|
19 |
-
* Facebook data
|
20 |
*/
|
21 |
$cmb->add_field( array(
|
22 |
'name' => esc_html__( 'Panel', 'rank-math' ),
|
@@ -45,7 +45,7 @@ $cmb->add_field( array(
|
|
45 |
'id' => 'rank_math_facebook_title',
|
46 |
'type' => 'text',
|
47 |
'name' => esc_html__( 'Title', 'rank-math' ),
|
48 |
-
'attributes' => array( 'placeholder' => esc_html__( '
|
49 |
) );
|
50 |
|
51 |
$cmb->add_field( array(
|
@@ -55,7 +55,7 @@ $cmb->add_field( array(
|
|
55 |
'attributes' => array(
|
56 |
'rows' => 3,
|
57 |
'data-autoresize' => true,
|
58 |
-
'placeholder' => esc_html__( '
|
59 |
),
|
60 |
) );
|
61 |
|
@@ -94,7 +94,7 @@ $cmb->add_field( array(
|
|
94 |
) );
|
95 |
|
96 |
/**
|
97 |
-
* Twitter data
|
98 |
*/
|
99 |
$dep = array(
|
100 |
array( 'rank_math_twitter_use_facebook', 'off' ),
|
@@ -169,7 +169,7 @@ $cmb->add_field( array(
|
|
169 |
'id' => 'rank_math_twitter_title',
|
170 |
'type' => 'text',
|
171 |
'name' => esc_html__( 'Title', 'rank-math' ),
|
172 |
-
'attributes' => array( 'placeholder' => esc_html__( '
|
173 |
'dep' => $basic,
|
174 |
) );
|
175 |
|
16 |
) );
|
17 |
|
18 |
/**
|
19 |
+
* Facebook data.
|
20 |
*/
|
21 |
$cmb->add_field( array(
|
22 |
'name' => esc_html__( 'Panel', 'rank-math' ),
|
45 |
'id' => 'rank_math_facebook_title',
|
46 |
'type' => 'text',
|
47 |
'name' => esc_html__( 'Title', 'rank-math' ),
|
48 |
+
'attributes' => array( 'placeholder' => esc_html__( 'RankMath -- Test Drive', 'rank-math' ) ),
|
49 |
) );
|
50 |
|
51 |
$cmb->add_field( array(
|
55 |
'attributes' => array(
|
56 |
'rows' => 3,
|
57 |
'data-autoresize' => true,
|
58 |
+
'placeholder' => esc_html__( 'RankMath -- Description', 'rank-math' ),
|
59 |
),
|
60 |
) );
|
61 |
|
94 |
) );
|
95 |
|
96 |
/**
|
97 |
+
* Twitter data.
|
98 |
*/
|
99 |
$dep = array(
|
100 |
array( 'rank_math_twitter_use_facebook', 'off' ),
|
169 |
'id' => 'rank_math_twitter_title',
|
170 |
'type' => 'text',
|
171 |
'name' => esc_html__( 'Title', 'rank-math' ),
|
172 |
+
'attributes' => array( 'placeholder' => esc_html__( 'RankMath -- Test Drive', 'rank-math' ) ),
|
173 |
'dep' => $basic,
|
174 |
) );
|
175 |
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The 404 module database operations
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -114,7 +114,7 @@ class DB {
|
|
114 |
/**
|
115 |
* Delete a record.
|
116 |
*
|
117 |
-
* @param array $ids Array of
|
118 |
*
|
119 |
* @return int Number of records deleted.
|
120 |
*/
|
@@ -150,7 +150,7 @@ class DB {
|
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
-
* Update if
|
154 |
*
|
155 |
* @param object $row Record to update.
|
156 |
*
|
@@ -161,6 +161,7 @@ class DB {
|
|
161 |
'accessed' => current_time( 'mysql' ),
|
162 |
'times_accessed' => absint( $row['times_accessed'] ) + 1,
|
163 |
];
|
|
|
164 |
return self::table()->set( $update_data )->where( 'id', absint( $row['id'] ) )->update();
|
165 |
}
|
166 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The 404 module database operations.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
114 |
/**
|
115 |
* Delete a record.
|
116 |
*
|
117 |
+
* @param array $ids Array of IDs to delete.
|
118 |
*
|
119 |
* @return int Number of records deleted.
|
120 |
*/
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
+
* Update if URL is matched and hit.
|
154 |
*
|
155 |
* @param object $row Record to update.
|
156 |
*
|
161 |
'accessed' => current_time( 'mysql' ),
|
162 |
'times_accessed' => absint( $row['times_accessed'] ) + 1,
|
163 |
];
|
164 |
+
|
165 |
return self::table()->set( $update_data )->where( 'id', absint( $row['id'] ) )->update();
|
166 |
}
|
167 |
}
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The 404 Monitor Module
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -111,7 +111,7 @@ class Monitor {
|
|
111 |
return;
|
112 |
}
|
113 |
|
114 |
-
// Mode =
|
115 |
DB::add([
|
116 |
'uri' => $uri,
|
117 |
'ip' => Param::server( 'REMOTE_ADDR', '' ),
|
@@ -121,9 +121,9 @@ class Monitor {
|
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
-
*
|
125 |
*
|
126 |
-
* @param string $uri Check this
|
127 |
*
|
128 |
* @return boolean
|
129 |
*/
|
@@ -165,7 +165,7 @@ class Monitor {
|
|
165 |
}
|
166 |
|
167 |
/**
|
168 |
-
* Parses a user
|
169 |
*
|
170 |
* @link https://github.com/donatj/PhpUserAgent
|
171 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The 404 Monitor Module.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
111 |
return;
|
112 |
}
|
113 |
|
114 |
+
// Mode = advanced.
|
115 |
DB::add([
|
116 |
'uri' => $uri,
|
117 |
'ip' => Param::server( 'REMOTE_ADDR', '' ),
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
+
* Check if current URL is excluded.
|
125 |
*
|
126 |
+
* @param string $uri Check this URI for exclusion.
|
127 |
*
|
128 |
* @return boolean
|
129 |
*/
|
165 |
}
|
166 |
|
167 |
/**
|
168 |
+
* Parses a user-agent string into its parts.
|
169 |
*
|
170 |
* @link https://github.com/donatj/PhpUserAgent
|
171 |
*
|
@@ -41,7 +41,7 @@ class Table extends List_Table {
|
|
41 |
public function prepare_items() {
|
42 |
global $per_page;
|
43 |
|
44 |
-
$per_page = $this->get_items_per_page( 'rank_math_404_monitor_per_page' );
|
45 |
$search = $this->get_search();
|
46 |
|
47 |
$data = DB::get_logs(
|
41 |
public function prepare_items() {
|
42 |
global $per_page;
|
43 |
|
44 |
+
$per_page = $this->get_items_per_page( 'rank_math_404_monitor_per_page', 100 );
|
45 |
$search = $this->get_search();
|
46 |
|
47 |
$data = DB::get_logs(
|
@@ -10,6 +10,7 @@ use RankMath\Helper;
|
|
10 |
use RankMath\KB;
|
11 |
|
12 |
$monitor = Helper::get_module( '404-monitor' )->admin;
|
|
|
13 |
?>
|
14 |
<div class="wrap rank-math-404-monitor-wrap">
|
15 |
|
@@ -31,12 +32,12 @@ $monitor = Helper::get_module( '404-monitor' )->admin;
|
|
31 |
);
|
32 |
?>
|
33 |
</p>
|
|
|
|
|
|
|
|
|
34 |
<form method="post">
|
35 |
-
|
36 |
-
$monitor->table->prepare_items();
|
37 |
-
$monitor->table->search_box( esc_html__( 'Search', 'rank-math' ), 's' );
|
38 |
-
$monitor->table->display();
|
39 |
-
?>
|
40 |
</form>
|
41 |
|
42 |
</div>
|
10 |
use RankMath\KB;
|
11 |
|
12 |
$monitor = Helper::get_module( '404-monitor' )->admin;
|
13 |
+
$monitor->table->prepare_items();
|
14 |
?>
|
15 |
<div class="wrap rank-math-404-monitor-wrap">
|
16 |
|
32 |
);
|
33 |
?>
|
34 |
</p>
|
35 |
+
<form method="get">
|
36 |
+
<input type="hidden" name="page" value="rank-math-404-monitor">
|
37 |
+
<?php $monitor->table->search_box( esc_html__( 'Search', 'rank-math' ), 's' ); ?>
|
38 |
+
</form>
|
39 |
<form method="post">
|
40 |
+
<?php $monitor->table->display(); ?>
|
|
|
|
|
|
|
|
|
41 |
</form>
|
42 |
|
43 |
</div>
|
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The Content Processor.
|
4 |
*
|
5 |
-
*
|
6 |
*
|
7 |
* @since 0.9.0
|
8 |
* @package RankMath
|
@@ -45,10 +45,10 @@ class ContentProcessor {
|
|
45 |
}
|
46 |
|
47 |
/**
|
48 |
-
* Process the content
|
49 |
*
|
50 |
-
* @param int $post_id The post
|
51 |
-
* @param string $content The content
|
52 |
*/
|
53 |
public function process( $post_id, $content ) {
|
54 |
$links = $this->extract( $content );
|
@@ -62,7 +62,6 @@ class ContentProcessor {
|
|
62 |
$this->process_link( $link, $new_links, $counts );
|
63 |
}
|
64 |
|
65 |
-
// Start processing.
|
66 |
$old_links = $this->get_stored_internal_links( $post_id );
|
67 |
$this->storage->cleanup( $post_id );
|
68 |
$this->storage->save_links( $post_id, $new_links );
|
@@ -70,7 +69,7 @@ class ContentProcessor {
|
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
-
* Process link.
|
74 |
*
|
75 |
* @param string $link Link to process.
|
76 |
* @param array $list Links to add after process.
|
@@ -92,11 +91,11 @@ class ContentProcessor {
|
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
-
*
|
96 |
*
|
97 |
* @param string $content Content to extract links from.
|
98 |
*
|
99 |
-
* @return array
|
100 |
*/
|
101 |
public function extract( $content ) {
|
102 |
$links = [];
|
@@ -106,7 +105,7 @@ class ContentProcessor {
|
|
106 |
|
107 |
$regexp = '<a\s[^>]*href=("??)([^" >]*?)\\1[^>]*>';
|
108 |
|
109 |
-
//
|
110 |
if ( preg_match_all( "/$regexp/iU", $content, $matches, PREG_SET_ORDER ) ) {
|
111 |
foreach ( $matches as $match ) {
|
112 |
$links[] = trim( $match[2], "'" );
|
@@ -129,20 +128,20 @@ class ContentProcessor {
|
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
-
*
|
133 |
*
|
134 |
-
* @param Link $link Link to test
|
135 |
*
|
136 |
-
* @return bool True
|
137 |
*/
|
138 |
protected function filter_internal_link( Link $link ) {
|
139 |
return $link->get_type() === Classifier::TYPE_INTERNAL;
|
140 |
}
|
141 |
|
142 |
/**
|
143 |
-
* Check if link is valid
|
144 |
*
|
145 |
-
* @param string $link Link to
|
146 |
*
|
147 |
* @return boolean
|
148 |
*/
|
2 |
/**
|
3 |
* The Content Processor.
|
4 |
*
|
5 |
+
* Extract and save links from the content of a given post.
|
6 |
*
|
7 |
* @since 0.9.0
|
8 |
* @package RankMath
|
45 |
}
|
46 |
|
47 |
/**
|
48 |
+
* Process the content.
|
49 |
*
|
50 |
+
* @param int $post_id The post ID.
|
51 |
+
* @param string $content The content.
|
52 |
*/
|
53 |
public function process( $post_id, $content ) {
|
54 |
$links = $this->extract( $content );
|
62 |
$this->process_link( $link, $new_links, $counts );
|
63 |
}
|
64 |
|
|
|
65 |
$old_links = $this->get_stored_internal_links( $post_id );
|
66 |
$this->storage->cleanup( $post_id );
|
67 |
$this->storage->save_links( $post_id, $new_links );
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
+
* Process a link.
|
73 |
*
|
74 |
* @param string $link Link to process.
|
75 |
* @param array $list Links to add after process.
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
+
* Extract href property values from HTML string.
|
95 |
*
|
96 |
* @param string $content Content to extract links from.
|
97 |
*
|
98 |
+
* @return array The extracted links.
|
99 |
*/
|
100 |
public function extract( $content ) {
|
101 |
$links = [];
|
105 |
|
106 |
$regexp = '<a\s[^>]*href=("??)([^" >]*?)\\1[^>]*>';
|
107 |
|
108 |
+
// Case insensitive & ungreedy modifiers.
|
109 |
if ( preg_match_all( "/$regexp/iU", $content, $matches, PREG_SET_ORDER ) ) {
|
110 |
foreach ( $matches as $match ) {
|
111 |
$links[] = trim( $match[2], "'" );
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
+
* Filter internal links.
|
132 |
*
|
133 |
+
* @param Link $link Link to test.
|
134 |
*
|
135 |
+
* @return bool True if internal, false if external.
|
136 |
*/
|
137 |
protected function filter_internal_link( Link $link ) {
|
138 |
return $link->get_type() === Classifier::TYPE_INTERNAL;
|
139 |
}
|
140 |
|
141 |
/**
|
142 |
+
* Check if link is valid.
|
143 |
*
|
144 |
+
* @param string $link Link to check.
|
145 |
*
|
146 |
* @return boolean
|
147 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The SEO Link.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -18,14 +18,14 @@ defined( 'ABSPATH' ) || exit;
|
|
18 |
class Link {
|
19 |
|
20 |
/**
|
21 |
-
* Link
|
22 |
*
|
23 |
* @var string
|
24 |
*/
|
25 |
protected $url;
|
26 |
|
27 |
/**
|
28 |
-
* Link post
|
29 |
*
|
30 |
* @var int
|
31 |
*/
|
@@ -41,9 +41,9 @@ class Link {
|
|
41 |
/**
|
42 |
* Sets the properties for the object.
|
43 |
*
|
44 |
-
* @param string $url The
|
45 |
* @param int $target_post_id ID to the post where the link refers to.
|
46 |
-
* @param string $type The
|
47 |
*/
|
48 |
public function __construct( $url, $target_post_id, $type ) {
|
49 |
$this->url = $url;
|
@@ -52,27 +52,27 @@ class Link {
|
|
52 |
}
|
53 |
|
54 |
/**
|
55 |
-
* Returns the
|
56 |
*
|
57 |
-
* @return string The
|
58 |
*/
|
59 |
public function get_url() {
|
60 |
return $this->url;
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
-
* Returns the
|
65 |
*
|
66 |
-
* @return int The
|
67 |
*/
|
68 |
public function get_target_post_id() {
|
69 |
return (int) $this->target_post_id;
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
-
* Return the
|
74 |
*
|
75 |
-
* @return string The
|
76 |
*/
|
77 |
public function get_type() {
|
78 |
return $this->type;
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The SEO Link class.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
18 |
class Link {
|
19 |
|
20 |
/**
|
21 |
+
* Link URL.
|
22 |
*
|
23 |
* @var string
|
24 |
*/
|
25 |
protected $url;
|
26 |
|
27 |
/**
|
28 |
+
* Link post ID.
|
29 |
*
|
30 |
* @var int
|
31 |
*/
|
41 |
/**
|
42 |
* Sets the properties for the object.
|
43 |
*
|
44 |
+
* @param string $url The URL.
|
45 |
* @param int $target_post_id ID to the post where the link refers to.
|
46 |
+
* @param string $type The URL type: internal or external.
|
47 |
*/
|
48 |
public function __construct( $url, $target_post_id, $type ) {
|
49 |
$this->url = $url;
|
52 |
}
|
53 |
|
54 |
/**
|
55 |
+
* Returns the URL.
|
56 |
*
|
57 |
+
* @return string The URL.
|
58 |
*/
|
59 |
public function get_url() {
|
60 |
return $this->url;
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
+
* Returns the target post ID.
|
65 |
*
|
66 |
+
* @return int The target post ID.
|
67 |
*/
|
68 |
public function get_target_post_id() {
|
69 |
return (int) $this->target_post_id;
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
+
* Return the link type (internal/external).
|
74 |
*
|
75 |
+
* @return string The link type.
|
76 |
*/
|
77 |
public function get_type() {
|
78 |
return $this->type;
|
@@ -38,13 +38,12 @@ class Links {
|
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
-
*
|
42 |
*
|
43 |
-
* @param int $post_id The post
|
44 |
* @param WP_Post $post The post object.
|
45 |
*/
|
46 |
public function save_post( $post_id, WP_Post $post ) {
|
47 |
-
// When the post isn't processable, just remove the saved links.
|
48 |
if ( ! $this->is_processable( $post ) ) {
|
49 |
return;
|
50 |
}
|
@@ -53,25 +52,25 @@ class Links {
|
|
53 |
}
|
54 |
|
55 |
/**
|
56 |
-
*
|
57 |
*
|
58 |
-
* @param int $post_id The post
|
59 |
*/
|
60 |
public function delete_post( $post_id ) {
|
61 |
$processor = new ContentProcessor;
|
62 |
|
63 |
-
//
|
64 |
$links = $processor->get_stored_internal_links( $post_id );
|
65 |
|
66 |
-
//
|
67 |
$processor->storage->cleanup( $post_id );
|
68 |
|
69 |
-
// Update link counts
|
70 |
$processor->storage->update_link_counts( $post_id, 0, $links );
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
-
* Post column content
|
75 |
*
|
76 |
* @param int $post_id Post id.
|
77 |
*/
|
@@ -116,26 +115,26 @@ class Links {
|
|
116 |
]
|
117 |
);
|
118 |
|
119 |
-
// Early Bail
|
120 |
if ( empty( $posts ) ) {
|
121 |
wp_clear_scheduled_hook( 'rank_math/links/count_internal_links' );
|
122 |
return;
|
123 |
}
|
124 |
|
125 |
-
// Process
|
126 |
foreach ( $posts as $post ) {
|
127 |
$this->save_post( $post->ID, $post );
|
128 |
}
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
-
*
|
133 |
*
|
134 |
-
* @param int $post_id The post
|
135 |
-
* @param string $content The content
|
136 |
*/
|
137 |
private function process( $post_id, $content ) {
|
138 |
-
// Apply the filters to
|
139 |
$content = apply_filters( 'the_content', $content );
|
140 |
$content = str_replace( ']]>', ']]>', $content );
|
141 |
|
@@ -145,20 +144,18 @@ class Links {
|
|
145 |
}
|
146 |
|
147 |
/**
|
148 |
-
*
|
149 |
*
|
150 |
-
* @param WP_Post $post
|
151 |
*
|
152 |
-
* @return bool True
|
153 |
*/
|
154 |
private function is_processable( $post ) {
|
155 |
|
156 |
-
// When the post is a revision.
|
157 |
if ( wp_is_post_revision( $post->ID ) ) {
|
158 |
return false;
|
159 |
}
|
160 |
|
161 |
-
// Post statuses to skip.
|
162 |
if ( in_array( $post->post_status, [ 'auto-draft', 'trash' ], true ) ) {
|
163 |
return false;
|
164 |
}
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
+
* Process and save the links in a post.
|
42 |
*
|
43 |
+
* @param int $post_id The post ID to check.
|
44 |
* @param WP_Post $post The post object.
|
45 |
*/
|
46 |
public function save_post( $post_id, WP_Post $post ) {
|
|
|
47 |
if ( ! $this->is_processable( $post ) ) {
|
48 |
return;
|
49 |
}
|
52 |
}
|
53 |
|
54 |
/**
|
55 |
+
* Remove the links data when the post is deleted.
|
56 |
*
|
57 |
+
* @param int $post_id The post ID.
|
58 |
*/
|
59 |
public function delete_post( $post_id ) {
|
60 |
$processor = new ContentProcessor;
|
61 |
|
62 |
+
// Get links to update linked objects.
|
63 |
$links = $processor->get_stored_internal_links( $post_id );
|
64 |
|
65 |
+
// Remove all links for this post.
|
66 |
$processor->storage->cleanup( $post_id );
|
67 |
|
68 |
+
// Update link counts.
|
69 |
$processor->storage->update_link_counts( $post_id, 0, $links );
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
+
* Post column content.
|
74 |
*
|
75 |
* @param int $post_id Post id.
|
76 |
*/
|
115 |
]
|
116 |
);
|
117 |
|
118 |
+
// Early Bail.
|
119 |
if ( empty( $posts ) ) {
|
120 |
wp_clear_scheduled_hook( 'rank_math/links/count_internal_links' );
|
121 |
return;
|
122 |
}
|
123 |
|
124 |
+
// Process.
|
125 |
foreach ( $posts as $post ) {
|
126 |
$this->save_post( $post->ID, $post );
|
127 |
}
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
+
* Process the content for a given post.
|
132 |
*
|
133 |
+
* @param int $post_id The post ID.
|
134 |
+
* @param string $content The content.
|
135 |
*/
|
136 |
private function process( $post_id, $content ) {
|
137 |
+
// Apply the filters to get the real content.
|
138 |
$content = apply_filters( 'the_content', $content );
|
139 |
$content = str_replace( ']]>', ']]>', $content );
|
140 |
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
+
* Check if the post is processable.
|
148 |
*
|
149 |
+
* @param WP_Post $post The post object.
|
150 |
*
|
151 |
+
* @return bool True if processable.
|
152 |
*/
|
153 |
private function is_processable( $post ) {
|
154 |
|
|
|
155 |
if ( wp_is_post_revision( $post->ID ) ) {
|
156 |
return false;
|
157 |
}
|
158 |
|
|
|
159 |
if ( in_array( $post->post_status, [ 'auto-draft', 'trash' ], true ) ) {
|
160 |
return false;
|
161 |
}
|
@@ -27,9 +27,9 @@ class Storage {
|
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
-
* Removes all
|
31 |
*
|
32 |
-
* @param int $post_id The
|
33 |
*
|
34 |
* @return int|false The number of rows updated, or false on error.
|
35 |
*/
|
@@ -38,11 +38,11 @@ class Storage {
|
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
-
*
|
42 |
*
|
43 |
* @param int $post_id The post to get the links for.
|
44 |
*
|
45 |
-
* @return Link[] The links
|
46 |
*/
|
47 |
public function get_links( $post_id ) {
|
48 |
$links = [];
|
@@ -59,10 +59,10 @@ class Storage {
|
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
-
*
|
63 |
*
|
64 |
-
* @param integer $post_id The post
|
65 |
-
* @param Link[] $links The
|
66 |
*
|
67 |
* @return void
|
68 |
*/
|
@@ -81,11 +81,11 @@ class Storage {
|
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
-
*
|
85 |
*
|
86 |
-
* @param int $post_id Post to update
|
87 |
-
* @param int|null $counts
|
88 |
-
* @param Link[] $links Links to
|
89 |
*/
|
90 |
public function update_link_counts( $post_id, $counts, array $links ) {
|
91 |
$counts = wp_parse_args(
|
@@ -101,10 +101,10 @@ class Storage {
|
|
101 |
}
|
102 |
|
103 |
/**
|
104 |
-
*
|
105 |
*
|
106 |
-
* @param int $post_id Post which is processed
|
107 |
-
* @param Link[] $links Links to update the incoming link count of.
|
108 |
*
|
109 |
* @return void
|
110 |
*/
|
@@ -115,9 +115,9 @@ class Storage {
|
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
-
*
|
119 |
*
|
120 |
-
* @param Link[] $links Links to update the incoming link count of.
|
121 |
*
|
122 |
* @return int[] List of post IDs.
|
123 |
*/
|
@@ -131,9 +131,9 @@ class Storage {
|
|
131 |
}
|
132 |
|
133 |
/**
|
134 |
-
*
|
135 |
*
|
136 |
-
* @param array $post_ids The posts to update the
|
137 |
*/
|
138 |
public function update_incoming_link_count( array $post_ids ) {
|
139 |
$results = $this->table()
|
@@ -155,15 +155,15 @@ class Storage {
|
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
-
*
|
159 |
*
|
160 |
-
* @param int $post_id The
|
161 |
* @param array $meta_data The total amount of links.
|
162 |
*/
|
163 |
public function save_meta_data( $post_id, array $meta_data ) {
|
164 |
global $wpdb;
|
165 |
|
166 |
-
// Suppress database errors.
|
167 |
$last_suppressed_state = $wpdb->suppress_errors();
|
168 |
|
169 |
$where = [ 'object_id' => $post_id ];
|
@@ -174,7 +174,7 @@ class Storage {
|
|
174 |
$result = $wpdb->update( $wpdb->prefix . 'rank_math_internal_meta', $data, $where );
|
175 |
}
|
176 |
|
177 |
-
// Revert to
|
178 |
$wpdb->suppress_errors( $last_suppressed_state );
|
179 |
|
180 |
return $result;
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
+
* Removes all data for a given post.
|
31 |
*
|
32 |
+
* @param int $post_id The post ID to remove the records for.
|
33 |
*
|
34 |
* @return int|false The number of rows updated, or false on error.
|
35 |
*/
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
+
* Get array of links from the database for given post.
|
42 |
*
|
43 |
* @param int $post_id The post to get the links for.
|
44 |
*
|
45 |
+
* @return Link[] The links array.
|
46 |
*/
|
47 |
public function get_links( $post_id ) {
|
48 |
$links = [];
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
+
* Save links for a post.
|
63 |
*
|
64 |
+
* @param integer $post_id The post ID to save.
|
65 |
+
* @param Link[] $links The links to save.
|
66 |
*
|
67 |
* @return void
|
68 |
*/
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
+
* Update the link counts for a post and its referenced posts.
|
85 |
*
|
86 |
+
* @param int $post_id Post to update.
|
87 |
+
* @param int|null $counts Links count.
|
88 |
+
* @param Link[] $links Links to update incoming link count.
|
89 |
*/
|
90 |
public function update_link_counts( $post_id, $counts, array $links ) {
|
91 |
$counts = wp_parse_args(
|
101 |
}
|
102 |
|
103 |
/**
|
104 |
+
* Update the incoming link count.
|
105 |
*
|
106 |
+
* @param int $post_id Post which is processed.
|
107 |
+
* @param Link[] $links Links we need to update the incoming link count of.
|
108 |
*
|
109 |
* @return void
|
110 |
*/
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
+
* Get post IDs from the link objects.
|
119 |
*
|
120 |
+
* @param Link[] $links Links we need to update the incoming link count of.
|
121 |
*
|
122 |
* @return int[] List of post IDs.
|
123 |
*/
|
131 |
}
|
132 |
|
133 |
/**
|
134 |
+
* Update the incoming link count.
|
135 |
*
|
136 |
+
* @param array $post_ids The posts to update the link count for.
|
137 |
*/
|
138 |
public function update_incoming_link_count( array $post_ids ) {
|
139 |
$results = $this->table()
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
+
* Save the link count to the database.
|
159 |
*
|
160 |
+
* @param int $post_id The ID to save the link count for.
|
161 |
* @param array $meta_data The total amount of links.
|
162 |
*/
|
163 |
public function save_meta_data( $post_id, array $meta_data ) {
|
164 |
global $wpdb;
|
165 |
|
166 |
+
// Suppress database errors and store current state.
|
167 |
$last_suppressed_state = $wpdb->suppress_errors();
|
168 |
|
169 |
$where = [ 'object_id' => $post_id ];
|
174 |
$result = $wpdb->update( $wpdb->prefix . 'rank_math_internal_meta', $data, $where );
|
175 |
}
|
176 |
|
177 |
+
// Revert to previous state of database error suppression.
|
178 |
$wpdb->suppress_errors( $last_suppressed_state );
|
179 |
|
180 |
return $result;
|
@@ -39,16 +39,16 @@ class KML_File {
|
|
39 |
}
|
40 |
|
41 |
/**
|
42 |
-
*
|
43 |
*/
|
44 |
public function init() {
|
45 |
add_rewrite_rule( 'locations\.kml$', 'index.php?sitemap=locations', 'top' );
|
46 |
}
|
47 |
|
48 |
/**
|
49 |
-
*
|
50 |
*
|
51 |
-
* @return string $xml
|
52 |
*/
|
53 |
public function add_local_sitemap() {
|
54 |
$xml = $this->newline( '<sitemap>' );
|
@@ -60,9 +60,9 @@ class KML_File {
|
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
-
*
|
64 |
*
|
65 |
-
* @return string $urlset Local SEO Sitemap content.
|
66 |
*/
|
67 |
public function local_sitemap_content() {
|
68 |
$urlset = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
@@ -76,7 +76,7 @@ class KML_File {
|
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
-
*
|
80 |
*
|
81 |
* @return string $kml KML file content.
|
82 |
*/
|
@@ -125,11 +125,11 @@ class KML_File {
|
|
125 |
}
|
126 |
|
127 |
/**
|
128 |
-
* Update
|
129 |
*
|
130 |
* @param int $object_id The ID of the current object.
|
131 |
-
* @param array $updated Array of field
|
132 |
-
* Will only include field
|
133 |
*/
|
134 |
public function update_sitemap( $object_id, $updated ) {
|
135 |
$local_seo_fields = [
|
@@ -151,7 +151,7 @@ class KML_File {
|
|
151 |
}
|
152 |
|
153 |
/**
|
154 |
-
*
|
155 |
*
|
156 |
* @return array
|
157 |
*/
|
@@ -180,7 +180,7 @@ class KML_File {
|
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
-
*
|
184 |
*
|
185 |
* @return $date
|
186 |
*/
|
39 |
}
|
40 |
|
41 |
/**
|
42 |
+
* Set up rewrite rules.
|
43 |
*/
|
44 |
public function init() {
|
45 |
add_rewrite_rule( 'locations\.kml$', 'index.php?sitemap=locations', 'top' );
|
46 |
}
|
47 |
|
48 |
/**
|
49 |
+
* Add the Local SEO Sitemap to the sitemap index.
|
50 |
*
|
51 |
+
* @return string $xml The sitemap index with the Local SEO Sitemap added.
|
52 |
*/
|
53 |
public function add_local_sitemap() {
|
54 |
$xml = $this->newline( '<sitemap>' );
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
+
* The content of the Local SEO Sitemap.
|
64 |
*
|
65 |
+
* @return string $urlset Local SEO Sitemap XML content.
|
66 |
*/
|
67 |
public function local_sitemap_content() {
|
68 |
$urlset = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
+
* Generate the KML file contents.
|
80 |
*
|
81 |
* @return string $kml KML file content.
|
82 |
*/
|
125 |
}
|
126 |
|
127 |
/**
|
128 |
+
* Update the sitemap when the Local SEO settings are changed.
|
129 |
*
|
130 |
* @param int $object_id The ID of the current object.
|
131 |
+
* @param array $updated Array of field IDs that were updated.
|
132 |
+
* Will only include field IDs that had values change.
|
133 |
*/
|
134 |
public function update_sitemap( $object_id, $updated ) {
|
135 |
$local_seo_fields = [
|
151 |
}
|
152 |
|
153 |
/**
|
154 |
+
* Get the Local SEO data.
|
155 |
*
|
156 |
* @return array
|
157 |
*/
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
+
* Get the Modified Date.
|
184 |
*
|
185 |
* @return $date
|
186 |
*/
|
@@ -37,7 +37,7 @@ class Local_Seo {
|
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
-
* Init
|
41 |
*/
|
42 |
public function location_sitemap() {
|
43 |
if (
|
@@ -63,7 +63,7 @@ class Local_Seo {
|
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
-
* Ajax search pages
|
67 |
*/
|
68 |
public function search_pages() {
|
69 |
$term = Param::get( 'term' );
|
@@ -89,10 +89,10 @@ class Local_Seo {
|
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
-
*
|
93 |
*
|
94 |
-
* @param array $data Array of
|
95 |
-
* @param JsonLD $json_ld JsonLD instance.
|
96 |
*
|
97 |
* @return array
|
98 |
*/
|
@@ -128,7 +128,7 @@ class Local_Seo {
|
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
-
*
|
132 |
*
|
133 |
* @return bool
|
134 |
*/
|
@@ -144,9 +144,9 @@ class Local_Seo {
|
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
-
*
|
148 |
*
|
149 |
-
* @param array $entity Array of
|
150 |
*/
|
151 |
private function organization( $entity ) {
|
152 |
$name = Helper::get_settings( 'titles.knowledgegraph_name' );
|
@@ -168,9 +168,9 @@ class Local_Seo {
|
|
168 |
}
|
169 |
|
170 |
/**
|
171 |
-
*
|
172 |
*
|
173 |
-
* @param array $entity Array of
|
174 |
* @param JsonLD $json_ld JsonLD instance.
|
175 |
*/
|
176 |
private function person( $entity, $json_ld ) {
|
@@ -193,9 +193,9 @@ class Local_Seo {
|
|
193 |
}
|
194 |
|
195 |
/**
|
196 |
-
* Add Contact Points
|
197 |
*
|
198 |
-
* @param array $entity Array of
|
199 |
*/
|
200 |
private function add_contact_points( &$entity ) {
|
201 |
$phone_numbers = Helper::get_settings( 'titles.phone_numbers' );
|
@@ -214,9 +214,9 @@ class Local_Seo {
|
|
214 |
}
|
215 |
|
216 |
/**
|
217 |
-
* Add
|
218 |
*
|
219 |
-
* @param array $entity Array of
|
220 |
*/
|
221 |
private function add_geo_cordinates( &$entity ) {
|
222 |
$geo = Str::to_arr( Helper::get_settings( 'titles.geo' ) );
|
@@ -234,9 +234,9 @@ class Local_Seo {
|
|
234 |
}
|
235 |
|
236 |
/**
|
237 |
-
* Add
|
238 |
*
|
239 |
-
* @param array $entity Array of
|
240 |
*/
|
241 |
private function add_business_hours( &$entity ) {
|
242 |
$opening_hours = $this->get_opening_hours();
|
@@ -251,7 +251,7 @@ class Local_Seo {
|
|
251 |
}
|
252 |
|
253 |
/**
|
254 |
-
* Get
|
255 |
*
|
256 |
* @return bool|array
|
257 |
*/
|
@@ -274,9 +274,9 @@ class Local_Seo {
|
|
274 |
}
|
275 |
|
276 |
/**
|
277 |
-
* Sanitize
|
278 |
*
|
279 |
-
* @param array $entity Array of
|
280 |
* @param string $type Type of organization.
|
281 |
*
|
282 |
* @return array Sanitized data.
|
@@ -301,9 +301,10 @@ class Local_Seo {
|
|
301 |
}
|
302 |
|
303 |
/**
|
304 |
-
*
|
|
|
305 |
*
|
306 |
-
* @param array $entity Array of
|
307 |
*
|
308 |
* @return array Sanitized data.
|
309 |
*/
|
@@ -314,9 +315,10 @@ class Local_Seo {
|
|
314 |
}
|
315 |
|
316 |
/**
|
317 |
-
*
|
|
|
318 |
*
|
319 |
-
* @param array $entity Array of
|
320 |
*
|
321 |
* @return array Sanitized data.
|
322 |
*/
|
@@ -327,9 +329,10 @@ class Local_Seo {
|
|
327 |
}
|
328 |
|
329 |
/**
|
330 |
-
*
|
|
|
331 |
*
|
332 |
-
* @param array $entity Array of
|
333 |
*
|
334 |
* @return array Sanitized data.
|
335 |
*/
|
@@ -340,7 +343,7 @@ class Local_Seo {
|
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
-
*
|
344 |
*
|
345 |
* @param array $entity Array of schema data.
|
346 |
*
|
@@ -360,7 +363,7 @@ class Local_Seo {
|
|
360 |
}
|
361 |
|
362 |
/**
|
363 |
-
*
|
364 |
*
|
365 |
* @link https://developers.google.com/webmasters/structured-data/customize/social-profiles
|
366 |
*/
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
+
* Init Local SEO Sitemap if possible.
|
41 |
*/
|
42 |
public function location_sitemap() {
|
43 |
if (
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
+
* Ajax search pages.
|
67 |
*/
|
68 |
public function search_pages() {
|
69 |
$term = Param::get( 'term' );
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
+
* Output structured data for Person or Organization.
|
93 |
*
|
94 |
+
* @param array $data Array of JSON-LD data.
|
95 |
+
* @param JsonLD $json_ld The JsonLD instance.
|
96 |
*
|
97 |
* @return array
|
98 |
*/
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
+
* Check if schema data can be output.
|
132 |
*
|
133 |
* @return bool
|
134 |
*/
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
+
* Structured data for Organization.
|
148 |
*
|
149 |
+
* @param array $entity Array of JSON-LD entity.
|
150 |
*/
|
151 |
private function organization( $entity ) {
|
152 |
$name = Helper::get_settings( 'titles.knowledgegraph_name' );
|
168 |
}
|
169 |
|
170 |
/**
|
171 |
+
* Structured data for Person.
|
172 |
*
|
173 |
+
* @param array $entity Array of JSON-LD entity.
|
174 |
* @param JsonLD $json_ld JsonLD instance.
|
175 |
*/
|
176 |
private function person( $entity, $json_ld ) {
|
193 |
}
|
194 |
|
195 |
/**
|
196 |
+
* Add Contact Points.
|
197 |
*
|
198 |
+
* @param array $entity Array of JSON-LD entity.
|
199 |
*/
|
200 |
private function add_contact_points( &$entity ) {
|
201 |
$phone_numbers = Helper::get_settings( 'titles.phone_numbers' );
|
214 |
}
|
215 |
|
216 |
/**
|
217 |
+
* Add geo coordinates.
|
218 |
*
|
219 |
+
* @param array $entity Array of JSON-LD entity.
|
220 |
*/
|
221 |
private function add_geo_cordinates( &$entity ) {
|
222 |
$geo = Str::to_arr( Helper::get_settings( 'titles.geo' ) );
|
234 |
}
|
235 |
|
236 |
/**
|
237 |
+
* Add business hours.
|
238 |
*
|
239 |
+
* @param array $entity Array of JSON-LD entity.
|
240 |
*/
|
241 |
private function add_business_hours( &$entity ) {
|
242 |
$opening_hours = $this->get_opening_hours();
|
251 |
}
|
252 |
|
253 |
/**
|
254 |
+
* Get opening hours.
|
255 |
*
|
256 |
* @return bool|array
|
257 |
*/
|
274 |
}
|
275 |
|
276 |
/**
|
277 |
+
* Sanitize structured data for different organization types.
|
278 |
*
|
279 |
+
* @param array $entity Array of Schema structured data.
|
280 |
* @param string $type Type of organization.
|
281 |
*
|
282 |
* @return array Sanitized data.
|
301 |
}
|
302 |
|
303 |
/**
|
304 |
+
* Remove `email`, `contactPoint`, `priceRange` properties
|
305 |
+
* from the Schema entity.
|
306 |
*
|
307 |
+
* @param array $entity Array of Schema structured data.
|
308 |
*
|
309 |
* @return array Sanitized data.
|
310 |
*/
|
315 |
}
|
316 |
|
317 |
/**
|
318 |
+
* Remove `openingHours`, `priceRange` properties
|
319 |
+
* from the Schema entity.
|
320 |
*
|
321 |
+
* @param array $entity Array of Schema structured data.
|
322 |
*
|
323 |
* @return array Sanitized data.
|
324 |
*/
|
329 |
}
|
330 |
|
331 |
/**
|
332 |
+
* Remove `openingHours`, `priceRange`, `email`, `contactPoint` properties
|
333 |
+
* from the Schema entity.
|
334 |
*
|
335 |
+
* @param array $entity Array of Schema structured data.
|
336 |
*
|
337 |
* @return array Sanitized data.
|
338 |
*/
|
343 |
}
|
344 |
|
345 |
/**
|
346 |
+
* Change `logo` property to `image` & `contactPoint` to `telephone`.
|
347 |
*
|
348 |
* @param array $entity Array of schema data.
|
349 |
*
|
363 |
}
|
364 |
|
365 |
/**
|
366 |
+
* Get global social profile URLs, to use in the `sameAs` property.
|
367 |
*
|
368 |
* @link https://developers.google.com/webmasters/structured-data/customize/social-profiles
|
369 |
*/
|
@@ -147,7 +147,7 @@ class Admin extends Module {
|
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
-
* Add module settings
|
151 |
*
|
152 |
* @param array $tabs Array of option panel tabs.
|
153 |
* @return array
|
@@ -255,7 +255,7 @@ class Admin extends Module {
|
|
255 |
}
|
256 |
|
257 |
/**
|
258 |
-
* Perform action on
|
259 |
*
|
260 |
* @codeCoverageIgnore
|
261 |
*
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
+
* Add module settings in the General Options panel.
|
151 |
*
|
152 |
* @param array $tabs Array of option panel tabs.
|
153 |
* @return array
|
255 |
}
|
256 |
|
257 |
/**
|
258 |
+
* Perform action on database.
|
259 |
*
|
260 |
* @codeCoverageIgnore
|
261 |
*
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Redirections Cache
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -30,9 +30,9 @@ class Cache {
|
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
-
* Get redirection by object
|
34 |
*
|
35 |
-
* @param integer $object_id Object
|
36 |
* @param string $object_type Current objcect type.
|
37 |
* @return object
|
38 |
*/
|
@@ -41,9 +41,9 @@ class Cache {
|
|
41 |
}
|
42 |
|
43 |
/**
|
44 |
-
* Get redirection by
|
45 |
*
|
46 |
-
* @param integer $url
|
47 |
* @return object
|
48 |
*/
|
49 |
public static function get_by_url( $url ) {
|
@@ -72,9 +72,9 @@ class Cache {
|
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
-
* Purge cache for a redirection
|
76 |
*
|
77 |
-
* @param integer $ids Redirection
|
78 |
* @return integer
|
79 |
*/
|
80 |
public static function purge( $ids ) {
|
@@ -82,10 +82,10 @@ class Cache {
|
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
* Purge cache for an object
|
86 |
*
|
87 |
-
* @param integer $ids Object
|
88 |
-
* @param string $object_type Current
|
89 |
* @return integer
|
90 |
*/
|
91 |
public static function purge_by_object_id( $ids, $object_type ) {
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Redirections Cache.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
+
* Get redirection by object ID.
|
34 |
*
|
35 |
+
* @param integer $object_id Object ID to look for.
|
36 |
* @param string $object_type Current objcect type.
|
37 |
* @return object
|
38 |
*/
|
41 |
}
|
42 |
|
43 |
/**
|
44 |
+
* Get redirection by URL.
|
45 |
*
|
46 |
+
* @param integer $url URL to look for.
|
47 |
* @return object
|
48 |
*/
|
49 |
public static function get_by_url( $url ) {
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
+
* Purge cache for a redirection.
|
76 |
*
|
77 |
+
* @param integer $ids Redirection IDs to purge cache for.
|
78 |
* @return integer
|
79 |
*/
|
80 |
public static function purge( $ids ) {
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
+
* Purge cache for an object.
|
86 |
*
|
87 |
+
* @param integer $ids Object IDs to purge cache for.
|
88 |
+
* @param string $object_type Current object type.
|
89 |
* @return integer
|
90 |
*/
|
91 |
public static function purge_by_object_id( $ids, $object_type ) {
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Redirection module database operations
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ defined( 'ABSPATH' ) || exit;
|
|
22 |
class DB {
|
23 |
|
24 |
/**
|
25 |
-
* Get query builder.
|
26 |
*
|
27 |
* @return Query_Builder
|
28 |
*/
|
@@ -31,7 +31,7 @@ class DB {
|
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
-
* Get counts of
|
35 |
*
|
36 |
* @return array
|
37 |
*/
|
@@ -92,9 +92,9 @@ class DB {
|
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
-
* Match redirections for
|
96 |
*
|
97 |
-
* @param string $uri Current
|
98 |
* @param bool $all Get All.
|
99 |
*
|
100 |
* @return object
|
@@ -119,7 +119,7 @@ class DB {
|
|
119 |
// Generate words.
|
120 |
$words = self::remove_stopwords( $uri );
|
121 |
|
122 |
-
// Generate where
|
123 |
$where = [];
|
124 |
$source = maybe_serialize([
|
125 |
'pattern' => $uri,
|
@@ -141,10 +141,10 @@ class DB {
|
|
141 |
}
|
142 |
|
143 |
/**
|
144 |
-
* Compare given redirections
|
145 |
*
|
146 |
* @param array $redirections Array of redirection matched.
|
147 |
-
* @param string $uri
|
148 |
*
|
149 |
* @return array|bool
|
150 |
*/
|
@@ -163,7 +163,7 @@ class DB {
|
|
163 |
* Compare sources.
|
164 |
*
|
165 |
* @param array $sources Array of sources.
|
166 |
-
* @param string $uri
|
167 |
*
|
168 |
* @return bool
|
169 |
*/
|
@@ -178,7 +178,7 @@ class DB {
|
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
-
* Match redirections for source
|
182 |
*
|
183 |
* @param string $source Current source to match.
|
184 |
*
|
@@ -213,9 +213,9 @@ class DB {
|
|
213 |
}
|
214 |
|
215 |
/**
|
216 |
-
* Get source by
|
217 |
*
|
218 |
-
* @param int $id
|
219 |
* @param string $status Status to filter with.
|
220 |
*
|
221 |
* @return bool|array
|
@@ -306,7 +306,7 @@ class DB {
|
|
306 |
}
|
307 |
|
308 |
/**
|
309 |
-
* Add or Update record
|
310 |
*
|
311 |
* @param array $redirection Single redirection item.
|
312 |
*
|
@@ -342,9 +342,9 @@ class DB {
|
|
342 |
}
|
343 |
|
344 |
/**
|
345 |
-
* Delete multiple
|
346 |
*
|
347 |
-
* @param array $ids
|
348 |
*
|
349 |
* @return int Number of records deleted.
|
350 |
*/
|
@@ -372,7 +372,7 @@ class DB {
|
|
372 |
}
|
373 |
|
374 |
/**
|
375 |
-
*
|
376 |
*
|
377 |
* @return int Number of records deleted.
|
378 |
*/
|
@@ -386,7 +386,7 @@ class DB {
|
|
386 |
}
|
387 |
|
388 |
/**
|
389 |
-
*
|
390 |
*
|
391 |
* @return int Number of records deleted.
|
392 |
*/
|
@@ -413,7 +413,6 @@ class DB {
|
|
413 |
$redirection_stop_words = explode( ',', esc_html__( "a,about,above,after,again,against,all,am,an,and,any,are,as,at,be,because,been,before,being,below,between,both,but,by,could,did,do,does,doing,down,during,each,few,for,from,further,had,has,have,having,he,he'd,he'll,he's,her,here,here's,hers,herself,him,himself,his,how,how's,i,i'd,i'll,i'm,i've,if,in,into,is,it,it's,its,itself,let's,me,more,most,my,myself,nor,of,on,once,only,or,other,ought,our,ours,ourselves,out,over,own,same,she,she'd,she'll,she's,should,so,some,such,than,that,that's,the,their,theirs,them,themselves,then,there,there's,these,they,they'd,they'll,they're,they've,this,those,through,to,too,under,until,up,very,was,we,we'd,we'll,we're,we've,were,what,what's,when,when's,where,where's,which,while,who,who's,whom,why,why's,with,would,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves", 'rank-math' ) );
|
414 |
}
|
415 |
|
416 |
-
// Turn it to an array and strip stop words by comparing against an array of stopwords.
|
417 |
$words = str_replace( '/', '-', $uri );
|
418 |
$words = str_replace( '.', '-', $words );
|
419 |
$words = explode( '-', $words );
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Redirection module database operations.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
22 |
class DB {
|
23 |
|
24 |
/**
|
25 |
+
* Get query builder object.
|
26 |
*
|
27 |
* @return Query_Builder
|
28 |
*/
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
+
* Get counts of records grouped by active and inactive.
|
35 |
*
|
36 |
* @return array
|
37 |
*/
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
+
* Match redirections for URI.
|
96 |
*
|
97 |
+
* @param string $uri Current URI to match.
|
98 |
* @param bool $all Get All.
|
99 |
*
|
100 |
* @return object
|
119 |
// Generate words.
|
120 |
$words = self::remove_stopwords( $uri );
|
121 |
|
122 |
+
// Generate where clause.
|
123 |
$where = [];
|
124 |
$source = maybe_serialize([
|
125 |
'pattern' => $uri,
|
141 |
}
|
142 |
|
143 |
/**
|
144 |
+
* Compare given redirections.
|
145 |
*
|
146 |
* @param array $redirections Array of redirection matched.
|
147 |
+
* @param string $uri URI to compare with.
|
148 |
*
|
149 |
* @return array|bool
|
150 |
*/
|
163 |
* Compare sources.
|
164 |
*
|
165 |
* @param array $sources Array of sources.
|
166 |
+
* @param string $uri URI to compare with.
|
167 |
*
|
168 |
* @return bool
|
169 |
*/
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
+
* Match redirections for a source.
|
182 |
*
|
183 |
* @param string $source Current source to match.
|
184 |
*
|
213 |
}
|
214 |
|
215 |
/**
|
216 |
+
* Get source by ID.
|
217 |
*
|
218 |
+
* @param int $id ID of the record to search for.
|
219 |
* @param string $status Status to filter with.
|
220 |
*
|
221 |
* @return bool|array
|
306 |
}
|
307 |
|
308 |
/**
|
309 |
+
* Add or Update record.
|
310 |
*
|
311 |
* @param array $redirection Single redirection item.
|
312 |
*
|
342 |
}
|
343 |
|
344 |
/**
|
345 |
+
* Delete multiple records.
|
346 |
*
|
347 |
+
* @param array $ids Array of ids to delete.
|
348 |
*
|
349 |
* @return int Number of records deleted.
|
350 |
*/
|
372 |
}
|
373 |
|
374 |
/**
|
375 |
+
* Clean trashed redirects after 30 days.
|
376 |
*
|
377 |
* @return int Number of records deleted.
|
378 |
*/
|
386 |
}
|
387 |
|
388 |
/**
|
389 |
+
* Delete all trashed redirections and associated sources.
|
390 |
*
|
391 |
* @return int Number of records deleted.
|
392 |
*/
|
413 |
$redirection_stop_words = explode( ',', esc_html__( "a,about,above,after,again,against,all,am,an,and,any,are,as,at,be,because,been,before,being,below,between,both,but,by,could,did,do,does,doing,down,during,each,few,for,from,further,had,has,have,having,he,he'd,he'll,he's,her,here,here's,hers,herself,him,himself,his,how,how's,i,i'd,i'll,i'm,i've,if,in,into,is,it,it's,its,itself,let's,me,more,most,my,myself,nor,of,on,once,only,or,other,ought,our,ours,ourselves,out,over,own,same,she,she'd,she'll,she's,should,so,some,such,than,that,that's,the,their,theirs,them,themselves,then,there,there's,these,they,they'd,they'll,they're,they've,this,those,through,to,too,under,until,up,very,was,we,we'd,we'll,we're,we've,were,what,what's,when,when's,where,where's,which,while,who,who's,whom,why,why's,with,would,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves", 'rank-math' ) );
|
414 |
}
|
415 |
|
|
|
416 |
$words = str_replace( '/', '-', $uri );
|
417 |
$words = str_replace( '.', '-', $words );
|
418 |
$words = explode( '-', $words );
|
@@ -72,7 +72,7 @@ class Export {
|
|
72 |
/**
|
73 |
* Apache rewrite rules.
|
74 |
*
|
75 |
-
* @param array $items Array of
|
76 |
*
|
77 |
* @return string
|
78 |
*/
|
@@ -89,7 +89,7 @@ class Export {
|
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
-
* Format
|
93 |
*
|
94 |
* @param array $item Single item.
|
95 |
* @param array $output Output array.
|
@@ -107,12 +107,12 @@ class Export {
|
|
107 |
}
|
108 |
|
109 |
// Get rewrite string.
|
110 |
-
$output[] = sprintf( '%sRewriteRule %s %s', $this->is_valid_regex( $from ), $this->get_comparison( $url, $from ), $target );
|
111 |
}
|
112 |
}
|
113 |
|
114 |
/**
|
115 |
-
*
|
116 |
*
|
117 |
* @param array $items Array of db items.
|
118 |
*
|
@@ -142,7 +142,7 @@ class Export {
|
|
142 |
$header_code = '301' === $item['header_code'] ? 'permanent' : 'redirect';
|
143 |
|
144 |
foreach ( $sources as $from ) {
|
145 |
-
if (
|
146 |
continue;
|
147 |
}
|
148 |
|
@@ -161,14 +161,14 @@ class Export {
|
|
161 |
*/
|
162 |
private function is_valid_regex( $source ) {
|
163 |
if ( 'regex' == $source['comparison'] && @preg_match( $source['pattern'], null ) === false ) { // phpcs:ignore
|
164 |
-
return
|
165 |
}
|
166 |
|
167 |
-
return
|
168 |
}
|
169 |
|
170 |
/**
|
171 |
-
* Normalize redirect data
|
172 |
*
|
173 |
* @param string $source Matching pattern.
|
174 |
* @param string $target Target where to redirect.
|
@@ -186,10 +186,10 @@ class Export {
|
|
186 |
}
|
187 |
|
188 |
/**
|
189 |
-
* Get comparison pattern
|
190 |
*
|
191 |
-
* @param string $url
|
192 |
-
* @param array $from Comparison type and
|
193 |
*
|
194 |
* @return string
|
195 |
*/
|
@@ -211,9 +211,9 @@ class Export {
|
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
-
* Encode
|
215 |
*
|
216 |
-
* @param string $url
|
217 |
*
|
218 |
* @return string
|
219 |
*/
|
@@ -231,9 +231,9 @@ class Export {
|
|
231 |
}
|
232 |
|
233 |
/**
|
234 |
-
* Encode regex
|
235 |
*
|
236 |
-
* @param string $url
|
237 |
*
|
238 |
* @return string
|
239 |
*/
|
72 |
/**
|
73 |
* Apache rewrite rules.
|
74 |
*
|
75 |
+
* @param array $items Array of DB items.
|
76 |
*
|
77 |
* @return string
|
78 |
*/
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
+
* Format Apache single item.
|
93 |
*
|
94 |
* @param array $item Single item.
|
95 |
* @param array $output Output array.
|
107 |
}
|
108 |
|
109 |
// Get rewrite string.
|
110 |
+
$output[] = sprintf( '%sRewriteRule %s %s', ( $this->is_valid_regex( $from ) ? '' : '# ' ), $this->get_comparison( $url, $from ), $target );
|
111 |
}
|
112 |
}
|
113 |
|
114 |
/**
|
115 |
+
* Nginx rewrite rules.
|
116 |
*
|
117 |
* @param array $items Array of db items.
|
118 |
*
|
142 |
$header_code = '301' === $item['header_code'] ? 'permanent' : 'redirect';
|
143 |
|
144 |
foreach ( $sources as $from ) {
|
145 |
+
if ( ! $this->is_valid_regex( $from ) ) {
|
146 |
continue;
|
147 |
}
|
148 |
|
161 |
*/
|
162 |
private function is_valid_regex( $source ) {
|
163 |
if ( 'regex' == $source['comparison'] && @preg_match( $source['pattern'], null ) === false ) { // phpcs:ignore
|
164 |
+
return false;
|
165 |
}
|
166 |
|
167 |
+
return true;
|
168 |
}
|
169 |
|
170 |
/**
|
171 |
+
* Normalize redirect data.
|
172 |
*
|
173 |
* @param string $source Matching pattern.
|
174 |
* @param string $target Target where to redirect.
|
186 |
}
|
187 |
|
188 |
/**
|
189 |
+
* Get comparison pattern.
|
190 |
*
|
191 |
+
* @param string $url URL for comparison.
|
192 |
+
* @param array $from Comparison type and URL.
|
193 |
*
|
194 |
* @return string
|
195 |
*/
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
+
* Encode URL.
|
215 |
*
|
216 |
+
* @param string $url URL to encode.
|
217 |
*
|
218 |
* @return string
|
219 |
*/
|
231 |
}
|
232 |
|
233 |
/**
|
234 |
+
* Encode regex.
|
235 |
*
|
236 |
+
* @param string $url URL to encode.
|
237 |
*
|
238 |
* @return string
|
239 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Redirections Form
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -155,7 +155,7 @@ class Form {
|
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
-
* Get sources for 404 log items
|
159 |
*
|
160 |
* @return array
|
161 |
*/
|
@@ -217,7 +217,7 @@ class Form {
|
|
217 |
}
|
218 |
|
219 |
/**
|
220 |
-
* Stripslashes
|
221 |
*
|
222 |
* @param mixed $value The unescaped value from the database.
|
223 |
* @param array $field_args Array of field arguments.
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Redirections Form.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
+
* Get sources for 404 log items.
|
159 |
*
|
160 |
* @return array
|
161 |
*/
|
217 |
}
|
218 |
|
219 |
/**
|
220 |
+
* Stripslashes wrapper.
|
221 |
*
|
222 |
* @param mixed $value The unescaped value from the database.
|
223 |
* @param array $field_args Array of field arguments.
|
@@ -31,7 +31,7 @@ class Metabox {
|
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
-
*
|
35 |
*
|
36 |
* @param CMB2 $cmb The CMB2 metabox object.
|
37 |
*/
|
@@ -134,7 +134,7 @@ class Metabox {
|
|
134 |
}
|
135 |
|
136 |
/**
|
137 |
-
*
|
138 |
*
|
139 |
* @param array $values Values.
|
140 |
* @return boolean
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
+
* Add settings in the Advanced tab of the metabox.
|
35 |
*
|
36 |
* @param CMB2 $cmb The CMB2 metabox object.
|
37 |
*/
|
134 |
}
|
135 |
|
136 |
/**
|
137 |
+
* Check if update is required.
|
138 |
*
|
139 |
* @param array $values Values.
|
140 |
* @return boolean
|
@@ -51,7 +51,7 @@ class Redirection {
|
|
51 |
/**
|
52 |
* Retrieve Redirection instance.
|
53 |
*
|
54 |
-
* @param integer $id
|
55 |
*
|
56 |
* @return Redirection
|
57 |
*/
|
@@ -129,7 +129,7 @@ class Redirection {
|
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
-
* Get item
|
133 |
*
|
134 |
* @return int
|
135 |
*/
|
@@ -138,7 +138,7 @@ class Redirection {
|
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
-
* Set item
|
142 |
*
|
143 |
* @param int $id Item ID.
|
144 |
*/
|
@@ -219,9 +219,9 @@ class Redirection {
|
|
219 |
}
|
220 |
|
221 |
/**
|
222 |
-
* Add and sanitize destination
|
223 |
*
|
224 |
-
* @param string $url
|
225 |
*/
|
226 |
public function add_destination( $url ) {
|
227 |
$processed = trim( $url );
|
@@ -235,7 +235,7 @@ class Redirection {
|
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
-
* Sanitize source
|
239 |
*
|
240 |
* @param string $pattern Pattern to sanitize.
|
241 |
* @param string $comparison Comparison of pattern.
|
@@ -282,7 +282,8 @@ class Redirection {
|
|
282 |
* https://www.website.com/URI => URI
|
283 |
* https://www.website.com/URI/ => URI
|
284 |
*
|
285 |
-
* @param
|
|
|
286 |
* @return string|false
|
287 |
*/
|
288 |
private function sanitize_source_url( $url ) {
|
@@ -306,6 +307,7 @@ class Redirection {
|
|
306 |
'www.' . $domain,
|
307 |
];
|
308 |
$url = str_replace( $search, '', $url );
|
|
|
309 |
|
310 |
// Empty url.
|
311 |
// External domain.
|
@@ -317,7 +319,7 @@ class Redirection {
|
|
317 |
}
|
318 |
|
319 |
/**
|
320 |
-
* Sanitize redirection source for regex
|
321 |
*
|
322 |
* @param string $pattern Pattern to process.
|
323 |
* @return string
|
@@ -340,7 +342,7 @@ class Redirection {
|
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
-
*
|
344 |
*
|
345 |
* @param string $slug Url to search for.
|
346 |
*/
|
@@ -384,7 +386,7 @@ class Redirection {
|
|
384 |
}
|
385 |
|
386 |
/**
|
387 |
-
* Save redirection caches
|
388 |
*/
|
389 |
private function save_redirection_cache() {
|
390 |
if ( ! $this->get_id() || empty( $this->cache ) ) {
|
@@ -415,7 +417,7 @@ class Redirection {
|
|
415 |
/**
|
416 |
* Strip home directory when WP is installed in subdirectory
|
417 |
*
|
418 |
-
* @param string $url
|
419 |
*
|
420 |
* @return string
|
421 |
*/
|
51 |
/**
|
52 |
* Retrieve Redirection instance.
|
53 |
*
|
54 |
+
* @param integer $id Redirection ID.
|
55 |
*
|
56 |
* @return Redirection
|
57 |
*/
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
+
* Get item ID.
|
133 |
*
|
134 |
* @return int
|
135 |
*/
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
+
* Set item ID.
|
142 |
*
|
143 |
* @param int $id Item ID.
|
144 |
*/
|
219 |
}
|
220 |
|
221 |
/**
|
222 |
+
* Add and sanitize destination URL.
|
223 |
*
|
224 |
+
* @param string $url URL to process.
|
225 |
*/
|
226 |
public function add_destination( $url ) {
|
227 |
$processed = trim( $url );
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
+
* Sanitize source.
|
239 |
*
|
240 |
* @param string $pattern Pattern to sanitize.
|
241 |
* @param string $comparison Comparison of pattern.
|
282 |
* https://www.website.com/URI => URI
|
283 |
* https://www.website.com/URI/ => URI
|
284 |
*
|
285 |
+
* @param string $url User-input source URL.
|
286 |
+
*
|
287 |
* @return string|false
|
288 |
*/
|
289 |
private function sanitize_source_url( $url ) {
|
307 |
'www.' . $domain,
|
308 |
];
|
309 |
$url = str_replace( $search, '', $url );
|
310 |
+
$url = preg_replace( '/^' . preg_quote( $domain, '/' ) . '/s', '', $url );
|
311 |
|
312 |
// Empty url.
|
313 |
// External domain.
|
319 |
}
|
320 |
|
321 |
/**
|
322 |
+
* Sanitize redirection source for regex.
|
323 |
*
|
324 |
* @param string $pattern Pattern to process.
|
325 |
* @return string
|
342 |
}
|
343 |
|
344 |
/**
|
345 |
+
* Maybe collect WordPress object to add redirection cache.
|
346 |
*
|
347 |
* @param string $slug Url to search for.
|
348 |
*/
|
386 |
}
|
387 |
|
388 |
/**
|
389 |
+
* Save redirection caches.
|
390 |
*/
|
391 |
private function save_redirection_cache() {
|
392 |
if ( ! $this->get_id() || empty( $this->cache ) ) {
|
417 |
/**
|
418 |
* Strip home directory when WP is installed in subdirectory
|
419 |
*
|
420 |
+
* @param string $url URL to strip from.
|
421 |
*
|
422 |
* @return string
|
423 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Redirections Module
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -44,7 +44,7 @@ class Redirections {
|
|
44 |
}
|
45 |
|
46 |
/**
|
47 |
-
* Load redirection admin and
|
48 |
*/
|
49 |
private function load_admin() {
|
50 |
if ( is_admin() ) {
|
@@ -117,7 +117,7 @@ class Redirections {
|
|
117 |
}
|
118 |
|
119 |
/**
|
120 |
-
*
|
121 |
*
|
122 |
* @return boolean
|
123 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Redirections Module.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
44 |
}
|
45 |
|
46 |
/**
|
47 |
+
* Load redirection admin and the REST API.
|
48 |
*/
|
49 |
private function load_admin() {
|
50 |
if ( is_admin() ) {
|
117 |
}
|
118 |
|
119 |
/**
|
120 |
+
* Check if request is script URI or a http-x request.
|
121 |
*
|
122 |
* @return boolean
|
123 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Redirector
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
@@ -33,19 +33,26 @@ class Redirector {
|
|
33 |
private $matched = false;
|
34 |
|
35 |
/**
|
36 |
-
* Redirect to this
|
37 |
*
|
38 |
* @var string
|
39 |
*/
|
40 |
private $redirect_to;
|
41 |
|
42 |
/**
|
43 |
-
* Current request
|
44 |
*
|
45 |
* @var string
|
46 |
*/
|
47 |
private $uri = '';
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* Current query string.
|
51 |
*
|
@@ -68,7 +75,7 @@ class Redirector {
|
|
68 |
protected $template_file_path;
|
69 |
|
70 |
/**
|
71 |
-
* The
|
72 |
*/
|
73 |
public function __construct() {
|
74 |
$this->start();
|
@@ -81,16 +88,18 @@ class Redirector {
|
|
81 |
*/
|
82 |
private function start() {
|
83 |
$this->uri = str_replace( site_url( '/' ), '', Param::server( 'REQUEST_URI' ) );
|
84 |
-
$this->uri = trim( $this->uri, '/' );
|
85 |
$this->uri = urldecode( $this->uri );
|
86 |
$this->uri = trim( Redirection::strip_subdirectory( $this->uri ), '/' );
|
87 |
|
|
|
|
|
|
|
88 |
// Remove query string.
|
89 |
$this->uri = explode( '?', $this->uri );
|
90 |
if ( isset( $this->uri[1] ) ) {
|
91 |
$this->query_string = $this->uri[1];
|
92 |
}
|
93 |
-
$this->uri = $this->uri[0];
|
94 |
|
95 |
if ( $this->is_amp_endpoint() ) {
|
96 |
$this->uri = \str_replace( '/' . amp_get_slug(), '', $this->uri );
|
@@ -101,7 +110,7 @@ class Redirector {
|
|
101 |
* Run the system flow.
|
102 |
*/
|
103 |
private function flow() {
|
104 |
-
$flow = [ 'from_cahce', 'everything', 'fallback' ];
|
105 |
foreach ( $flow as $func ) {
|
106 |
if ( false !== $this->matched ) {
|
107 |
break;
|
@@ -112,7 +121,7 @@ class Redirector {
|
|
112 |
}
|
113 |
|
114 |
/**
|
115 |
-
* If we got a match redirect.
|
116 |
*/
|
117 |
private function redirect() {
|
118 |
if ( false === $this->matched ) {
|
@@ -133,8 +142,9 @@ class Redirector {
|
|
133 |
$this->do_debugging();
|
134 |
|
135 |
// @codeCoverageIgnoreStart
|
|
|
136 |
if ( true === $this->do_filter( 'redirection/add_query_string', true ) && Str::is_non_empty( $this->query_string ) ) {
|
137 |
-
$this->redirect_to .= '
|
138 |
}
|
139 |
|
140 |
if ( wp_redirect( $this->redirect_to, $header_code, $this->get_redirect_header() ) ) {
|
@@ -201,6 +211,25 @@ class Redirector {
|
|
201 |
return $template;
|
202 |
}
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
/**
|
205 |
* Search from cache.
|
206 |
*/
|
@@ -270,7 +299,7 @@ class Redirector {
|
|
270 |
}
|
271 |
|
272 |
/**
|
273 |
-
*
|
274 |
*
|
275 |
* @codeCoverageIgnore
|
276 |
*/
|
@@ -291,9 +320,9 @@ class Redirector {
|
|
291 |
}
|
292 |
|
293 |
/**
|
294 |
-
* Set redirection by
|
295 |
*
|
296 |
-
* @param integer $redirection Redirection
|
297 |
*/
|
298 |
private function set_redirection( $redirection ) {
|
299 |
if ( ! is_array( $redirection ) ) {
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Redirector.
|
4 |
*
|
5 |
* @since 0.9.0
|
6 |
* @package RankMath
|
33 |
private $matched = false;
|
34 |
|
35 |
/**
|
36 |
+
* Redirect to this URL.
|
37 |
*
|
38 |
* @var string
|
39 |
*/
|
40 |
private $redirect_to;
|
41 |
|
42 |
/**
|
43 |
+
* Current request URI.
|
44 |
*
|
45 |
* @var string
|
46 |
*/
|
47 |
private $uri = '';
|
48 |
|
49 |
+
/**
|
50 |
+
* Current request uri with querystring.
|
51 |
+
*
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
private $full_uri = '';
|
55 |
+
|
56 |
/**
|
57 |
* Current query string.
|
58 |
*
|
75 |
protected $template_file_path;
|
76 |
|
77 |
/**
|
78 |
+
* The Constructor.
|
79 |
*/
|
80 |
public function __construct() {
|
81 |
$this->start();
|
88 |
*/
|
89 |
private function start() {
|
90 |
$this->uri = str_replace( site_url( '/' ), '', Param::server( 'REQUEST_URI' ) );
|
|
|
91 |
$this->uri = urldecode( $this->uri );
|
92 |
$this->uri = trim( Redirection::strip_subdirectory( $this->uri ), '/' );
|
93 |
|
94 |
+
// Complete request uri.
|
95 |
+
$this->full_uri = $this->uri;
|
96 |
+
|
97 |
// Remove query string.
|
98 |
$this->uri = explode( '?', $this->uri );
|
99 |
if ( isset( $this->uri[1] ) ) {
|
100 |
$this->query_string = $this->uri[1];
|
101 |
}
|
102 |
+
$this->uri = trim( $this->uri[0], '/' );
|
103 |
|
104 |
if ( $this->is_amp_endpoint() ) {
|
105 |
$this->uri = \str_replace( '/' . amp_get_slug(), '', $this->uri );
|
110 |
* Run the system flow.
|
111 |
*/
|
112 |
private function flow() {
|
113 |
+
$flow = [ 'pre_filter', 'from_cahce', 'everything', 'fallback' ];
|
114 |
foreach ( $flow as $func ) {
|
115 |
if ( false !== $this->matched ) {
|
116 |
break;
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
+
* If we got a match, redirect.
|
125 |
*/
|
126 |
private function redirect() {
|
127 |
if ( false === $this->matched ) {
|
142 |
$this->do_debugging();
|
143 |
|
144 |
// @codeCoverageIgnoreStart
|
145 |
+
$this->redirect_to = trailingslashit( $this->redirect_to );
|
146 |
if ( true === $this->do_filter( 'redirection/add_query_string', true ) && Str::is_non_empty( $this->query_string ) ) {
|
147 |
+
$this->redirect_to .= '?' . $this->query_string;
|
148 |
}
|
149 |
|
150 |
if ( wp_redirect( $this->redirect_to, $header_code, $this->get_redirect_header() ) ) {
|
211 |
return $template;
|
212 |
}
|
213 |
|
214 |
+
/**
|
215 |
+
* Pre filter
|
216 |
+
*/
|
217 |
+
private function pre_filter() {
|
218 |
+
$pre = $this->do_filter(
|
219 |
+
'redirection/pre_search',
|
220 |
+
null,
|
221 |
+
$this->uri,
|
222 |
+
$this->full_uri
|
223 |
+
);
|
224 |
+
|
225 |
+
if ( null === $pre || ! is_array( $pre ) ) {
|
226 |
+
return;
|
227 |
+
}
|
228 |
+
|
229 |
+
$this->matched = $pre;
|
230 |
+
$this->redirect_to = $pre['url_to'];
|
231 |
+
}
|
232 |
+
|
233 |
/**
|
234 |
* Search from cache.
|
235 |
*/
|
299 |
}
|
300 |
|
301 |
/**
|
302 |
+
* Show debugging interstitial if enabled.
|
303 |
*
|
304 |
* @codeCoverageIgnore
|
305 |
*/
|
320 |
}
|
321 |
|
322 |
/**
|
323 |
+
* Set redirection by ID.
|
324 |
*
|
325 |
+
* @param integer $redirection Redirection ID to set for.
|
326 |
*/
|
327 |
private function set_redirection( $redirection ) {
|
328 |
if ( ! is_array( $redirection ) ) {
|
@@ -36,7 +36,7 @@ class Table extends List_Table {
|
|
36 |
public function prepare_items() {
|
37 |
global $per_page;
|
38 |
|
39 |
-
$per_page = $this->get_items_per_page( 'rank_math_redirections_per_page' );
|
40 |
|
41 |
$data = DB::get_redirections([
|
42 |
'limit' => $per_page,
|
@@ -309,7 +309,7 @@ class Table extends List_Table {
|
|
309 |
}
|
310 |
|
311 |
/**
|
312 |
-
* Checks if is
|
313 |
*
|
314 |
* @return bool
|
315 |
*/
|
36 |
public function prepare_items() {
|
37 |
global $per_page;
|
38 |
|
39 |
+
$per_page = $this->get_items_per_page( 'rank_math_redirections_per_page', 100 );
|
40 |
|
41 |
$data = DB::get_redirections([
|
42 |
'limit' => $per_page,
|
309 |
}
|
310 |
|
311 |
/**
|
312 |
+
* Checks if page status is set to trashed.
|
313 |
*
|
314 |
* @return bool
|
315 |
*/
|
@@ -56,7 +56,7 @@ class Watcher {
|
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
* Remember the previous post permalink
|
60 |
*
|
61 |
* @param integer $post_id Post ID.
|
62 |
*/
|
@@ -109,7 +109,7 @@ class Watcher {
|
|
109 |
}
|
110 |
|
111 |
/**
|
112 |
-
* Create redirection
|
113 |
*
|
114 |
* @param string $from_url Redirecting from url for cache.
|
115 |
* @param string $url_to Destination url.
|
@@ -118,7 +118,7 @@ class Watcher {
|
|
118 |
* @return int Redirection id.
|
119 |
*/
|
120 |
private function create_redirection( $from_url, $url_to, $header_code, $object ) {
|
121 |
-
// Early
|
122 |
if ( empty( $from_url ) || empty( $url_to ) ) {
|
123 |
return;
|
124 |
}
|
@@ -169,7 +169,7 @@ class Watcher {
|
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
-
*
|
173 |
*
|
174 |
* @param WP_Post $before Post object before update.
|
175 |
* @param WP_Post $after Post object after update.
|
@@ -179,12 +179,12 @@ class Watcher {
|
|
179 |
$before = parse_url( $before, PHP_URL_PATH );
|
180 |
$after = parse_url( $after, PHP_URL_PATH );
|
181 |
|
182 |
-
//
|
183 |
if ( $before === $after ) {
|
184 |
return false;
|
185 |
}
|
186 |
|
187 |
-
//
|
188 |
if ( $this->get_site_path() === $before || '/' === $before ) {
|
189 |
return false;
|
190 |
}
|
@@ -220,7 +220,7 @@ class Watcher {
|
|
220 |
}
|
221 |
|
222 |
/**
|
223 |
-
* Display notice after a post has been deleted
|
224 |
*
|
225 |
* @param int $post_id Deleted post ID.
|
226 |
*/
|
@@ -239,7 +239,7 @@ class Watcher {
|
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
-
*
|
243 |
*
|
244 |
* @param WP_Post $post Current post.
|
245 |
* @return bool
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
+
* Remember the previous post permalink.
|
60 |
*
|
61 |
* @param integer $post_id Post ID.
|
62 |
*/
|
109 |
}
|
110 |
|
111 |
/**
|
112 |
+
* Create redirection.
|
113 |
*
|
114 |
* @param string $from_url Redirecting from url for cache.
|
115 |
* @param string $url_to Destination url.
|
118 |
* @return int Redirection id.
|
119 |
*/
|
120 |
private function create_redirection( $from_url, $url_to, $header_code, $object ) {
|
121 |
+
// Early bail.
|
122 |
if ( empty( $from_url ) || empty( $url_to ) ) {
|
123 |
return;
|
124 |
}
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
+
* Check if permalinks are different and if the before isn't the site URL.
|
173 |
*
|
174 |
* @param WP_Post $before Post object before update.
|
175 |
* @param WP_Post $after Post object after update.
|
179 |
$before = parse_url( $before, PHP_URL_PATH );
|
180 |
$after = parse_url( $after, PHP_URL_PATH );
|
181 |
|
182 |
+
// Do the URLs the match?
|
183 |
if ( $before === $after ) {
|
184 |
return false;
|
185 |
}
|
186 |
|
187 |
+
// Is the $before the site URL?
|
188 |
if ( $this->get_site_path() === $before || '/' === $before ) {
|
189 |
return false;
|
190 |
}
|
220 |
}
|
221 |
|
222 |
/**
|
223 |
+
* Display a suggestion notice after a post has been deleted.
|
224 |
*
|
225 |
* @param int $post_id Deleted post ID.
|
226 |
*/
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
+
* Check if notice can be displayed or not.
|
243 |
*
|
244 |
* @param WP_Post $post Current post.
|
245 |
* @return bool
|
@@ -9,9 +9,11 @@
|
|
9 |
use RankMath\KB;
|
10 |
use RankMath\Helper;
|
11 |
|
12 |
-
$is_new = isset( $_GET['new'] );
|
13 |
$redirections = Helper::get_module( 'redirections' )->admin;
|
14 |
-
$
|
|
|
|
|
|
|
15 |
?>
|
16 |
<div class="wrap rank-math-redirections-wrap">
|
17 |
|
@@ -32,11 +34,14 @@ $is_editing = ! empty( $_GET['url'] ) || ! empty( $_REQUEST['log'] ) || ! empt
|
|
32 |
|
33 |
</div>
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
<form method="post">
|
36 |
<?php
|
37 |
-
$redirections->table->prepare_items();
|
38 |
$redirections->table->views();
|
39 |
-
$redirections->table->search_box( esc_html__( 'Search', 'rank-math' ), 's' );
|
40 |
$redirections->table->display();
|
41 |
?>
|
42 |
</form>
|
9 |
use RankMath\KB;
|
10 |
use RankMath\Helper;
|
11 |
|
|
|
12 |
$redirections = Helper::get_module( 'redirections' )->admin;
|
13 |
+
$redirections->table->prepare_items();
|
14 |
+
|
15 |
+
$is_new = isset( $_GET['new'] );
|
16 |
+
$is_editing = ! empty( $_GET['url'] ) || ! empty( $_REQUEST['log'] ) || ! empty( $_REQUEST['redirect_uri'] ) || $redirections->form->is_editing();
|
17 |
?>
|
18 |
<div class="wrap rank-math-redirections-wrap">
|
19 |
|
34 |
|
35 |
</div>
|
36 |
|
37 |
+
<form method="get">
|
38 |
+
<input type="hidden" name="page" value="rank-math-redirections">
|
39 |
+
<?php $redirections->table->search_box( esc_html__( 'Search', 'rank-math' ), 's' ); ?>
|
40 |
+
</form>
|
41 |
+
|
42 |
<form method="post">
|
43 |
<?php
|
|
|
44 |
$redirections->table->views();
|
|
|
45 |
$redirections->table->display();
|
46 |
?>
|
47 |
</form>
|
@@ -223,7 +223,7 @@ class Snippet_Shortcode {
|
|
223 |
*/
|
224 |
public function show_ratings( $post_id, $field ) {
|
225 |
wp_enqueue_style( 'font-awesome', rank_math()->plugin_url() . 'assets/vendor/font-awesome/css/font-awesome.min.css', null, '4.7.0' );
|
226 |
-
$rating = isset( $field['value'] ) ? Helper::get_post_meta( "snippet_{$field['value']}", $post_id ) : '';
|
227 |
$count = isset( $field['count'] ) ? Helper::get_post_meta( $field['count'], $post_id ) : '';
|
228 |
?>
|
229 |
<div class="rank-math-total-wrapper">
|
223 |
*/
|
224 |
public function show_ratings( $post_id, $field ) {
|
225 |
wp_enqueue_style( 'font-awesome', rank_math()->plugin_url() . 'assets/vendor/font-awesome/css/font-awesome.min.css', null, '4.7.0' );
|
226 |
+
$rating = isset( $field['value'] ) ? (float) Helper::get_post_meta( "snippet_{$field['value']}", $post_id ) : '';
|
227 |
$count = isset( $field['count'] ) ? Helper::get_post_meta( $field['count'], $post_id ) : '';
|
228 |
?>
|
229 |
<div class="rank-math-total-wrapper">
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Article Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Article implements Snippet {
|
|
22 |
/**
|
23 |
* Article rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Article Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Article rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Author Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -18,11 +18,11 @@ defined( 'ABSPATH' ) || exit;
|
|
18 |
class Author implements Snippet {
|
19 |
|
20 |
/**
|
21 |
-
*
|
22 |
*
|
23 |
* @link https://schema.org/ProfilePage
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Author Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
18 |
class Author implements Snippet {
|
19 |
|
20 |
/**
|
21 |
+
* Sets the Schema structured data for the ProfilePage.
|
22 |
*
|
23 |
* @link https://schema.org/ProfilePage
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Blog Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -18,11 +18,11 @@ defined( 'ABSPATH' ) || exit;
|
|
18 |
class Blog implements Snippet {
|
19 |
|
20 |
/**
|
21 |
-
*
|
22 |
*
|
23 |
* @link https://schema.org/Blog
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Blog Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
18 |
class Blog implements Snippet {
|
19 |
|
20 |
/**
|
21 |
+
* Sets the Schema structured data for the Blog.
|
22 |
*
|
23 |
* @link https://schema.org/Blog
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Book Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Book implements Snippet {
|
|
22 |
/**
|
23 |
* Book rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Book Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Book rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Breadcrumbs Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -24,7 +24,7 @@ class Breadcrumbs implements Snippet {
|
|
24 |
*
|
25 |
* @link https://schema.org/BreadcrumbList
|
26 |
*
|
27 |
-
* @param array $data Array of
|
28 |
* @param JsonLD $jsonld JsonLD Instance.
|
29 |
*
|
30 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Breadcrumbs Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
24 |
*
|
25 |
* @link https://schema.org/BreadcrumbList
|
26 |
*
|
27 |
+
* @param array $data Array of JSON-LD data.
|
28 |
* @param JsonLD $jsonld JsonLD Instance.
|
29 |
*
|
30 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The CollectionPage Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -20,11 +20,11 @@ defined( 'ABSPATH' ) || exit;
|
|
20 |
class Collection_Page implements Snippet {
|
21 |
|
22 |
/**
|
23 |
-
*
|
24 |
*
|
25 |
* @link https://schema.org/CollectionPage
|
26 |
*
|
27 |
-
* @param array $data Array of
|
28 |
* @param JsonLD $jsonld JsonLD Instance.
|
29 |
*
|
30 |
* @return array
|
@@ -33,7 +33,7 @@ class Collection_Page implements Snippet {
|
|
33 |
$queried_object = get_queried_object();
|
34 |
|
35 |
/**
|
36 |
-
*
|
37 |
*
|
38 |
* @param bool $unsigned Default: false
|
39 |
* @param string $unsigned Taxonomy Name
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The CollectionPage Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
20 |
class Collection_Page implements Snippet {
|
21 |
|
22 |
/**
|
23 |
+
* Sets the Schema structured data for the CollectionPage.
|
24 |
*
|
25 |
* @link https://schema.org/CollectionPage
|
26 |
*
|
27 |
+
* @param array $data Array of JSON-LD data.
|
28 |
* @param JsonLD $jsonld JsonLD Instance.
|
29 |
*
|
30 |
* @return array
|
33 |
$queried_object = get_queried_object();
|
34 |
|
35 |
/**
|
36 |
+
* Filter to remove snippet data: rank_math/snippet/remove_taxonomy_data.
|
37 |
*
|
38 |
* @param bool $unsigned Default: false
|
39 |
* @param string $unsigned Taxonomy Name
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Course Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Course implements Snippet {
|
|
22 |
/**
|
23 |
* Course rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Course Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Course rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Event Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Event implements Snippet {
|
|
22 |
/**
|
23 |
* Event rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Event Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Event rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The JobPosting Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The JobPosting Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Local implements Snippet {
|
|
22 |
/**
|
23 |
* Local rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
22 |
/**
|
23 |
* Local rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -22,7 +22,7 @@ class Music implements Snippet {
|
|
22 |
/**
|
23 |
* Music rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
22 |
/**
|
23 |
* Music rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Person Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Person implements Snippet {
|
|
22 |
/**
|
23 |
* Person rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Person Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Person rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -23,7 +23,7 @@ class Product_Edd {
|
|
23 |
/**
|
24 |
* Set product data for rich snippet.
|
25 |
*
|
26 |
-
* @param array $entity Array of
|
27 |
* @param JsonLD $jsonld JsonLD Instance.
|
28 |
*/
|
29 |
public function set_product( &$entity, $jsonld ) {
|
@@ -36,7 +36,7 @@ class Product_Edd {
|
|
36 |
$entity['description'] = strip_shortcodes( $jsonld->post->post_content );
|
37 |
$entity['category'] = Product::get_category( $product_id, 'download_category' );
|
38 |
|
39 |
-
//
|
40 |
if ( $product->get_sku() ) {
|
41 |
$entity['sku'] = $product->get_sku();
|
42 |
}
|
@@ -73,7 +73,7 @@ class Product_Edd {
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
* If product is variable
|
77 |
*
|
78 |
* @param EDD_Download $product Current product.
|
79 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Easy Digital Downloads Product Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
23 |
/**
|
24 |
* Set product data for rich snippet.
|
25 |
*
|
26 |
+
* @param array $entity Array of JSON-LD entity.
|
27 |
* @param JsonLD $jsonld JsonLD Instance.
|
28 |
*/
|
29 |
public function set_product( &$entity, $jsonld ) {
|
36 |
$entity['description'] = strip_shortcodes( $jsonld->post->post_content );
|
37 |
$entity['category'] = Product::get_category( $product_id, 'download_category' );
|
38 |
|
39 |
+
// SKU.
|
40 |
if ( $product->get_sku() ) {
|
41 |
$entity['sku'] = $product->get_sku();
|
42 |
}
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
+
* If product is variable, set variations.
|
77 |
*
|
78 |
* @param EDD_Download $product Current product.
|
79 |
*
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The WooCommerce Product Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -29,7 +29,7 @@ class Product_WooCommerce {
|
|
29 |
/**
|
30 |
* Set product data for rich snippet.
|
31 |
*
|
32 |
-
* @param array $entity Array of
|
33 |
* @param JsonLD $jsonld JsonLD Instance.
|
34 |
*/
|
35 |
public function set_product( &$entity, $jsonld ) {
|
@@ -372,7 +372,7 @@ class Product_WooCommerce {
|
|
372 |
}
|
373 |
|
374 |
/**
|
375 |
-
* If product is variable send variations.
|
376 |
*
|
377 |
* @param object $product Current product.
|
378 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The WooCommerce Product Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
29 |
/**
|
30 |
* Set product data for rich snippet.
|
31 |
*
|
32 |
+
* @param array $entity Array of JSON-LD entity.
|
33 |
* @param JsonLD $jsonld JsonLD Instance.
|
34 |
*/
|
35 |
public function set_product( &$entity, $jsonld ) {
|
372 |
}
|
373 |
|
374 |
/**
|
375 |
+
* If product is variable, send variations.
|
376 |
*
|
377 |
* @param object $product Current product.
|
378 |
*
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Product Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -32,7 +32,7 @@ class Product implements Snippet {
|
|
32 |
/**
|
33 |
* Product rich snippet.
|
34 |
*
|
35 |
-
* @param array $data Array of
|
36 |
* @param JsonLD $jsonld JsonLD Instance.
|
37 |
*
|
38 |
* @return array
|
@@ -86,7 +86,7 @@ class Product implements Snippet {
|
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
-
* Get seller
|
90 |
*
|
91 |
* @param JsonLD $jsonld JsonLD Instance.
|
92 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Product Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
32 |
/**
|
33 |
* Product rich snippet.
|
34 |
*
|
35 |
+
* @param array $data Array of JSON-LD data.
|
36 |
* @param JsonLD $jsonld JsonLD Instance.
|
37 |
*
|
38 |
* @return array
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
+
* Get seller.
|
90 |
*
|
91 |
* @param JsonLD $jsonld JsonLD Instance.
|
92 |
*
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Products Page Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -20,11 +20,11 @@ defined( 'ABSPATH' ) || exit;
|
|
20 |
class Products_Page implements Snippet {
|
21 |
|
22 |
/**
|
23 |
-
*
|
24 |
*
|
25 |
* @link https://schema.org/CollectionPage
|
26 |
*
|
27 |
-
* @param array $data Array of
|
28 |
* @param JsonLD $jsonld JsonLD Instance.
|
29 |
*
|
30 |
* @return array
|
@@ -62,7 +62,7 @@ class Products_Page implements Snippet {
|
|
62 |
}
|
63 |
|
64 |
/**
|
65 |
-
*
|
66 |
*
|
67 |
* @return boolean|string
|
68 |
*/
|
@@ -89,7 +89,7 @@ class Products_Page implements Snippet {
|
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
-
*
|
93 |
*
|
94 |
* @return boolean|string
|
95 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Products Page Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
20 |
class Products_Page implements Snippet {
|
21 |
|
22 |
/**
|
23 |
+
* Sets the Schema structured data for the CollectionPage.
|
24 |
*
|
25 |
* @link https://schema.org/CollectionPage
|
26 |
*
|
27 |
+
* @param array $data Array of JSON-LD data.
|
28 |
* @param JsonLD $jsonld JsonLD Instance.
|
29 |
*
|
30 |
* @return array
|
62 |
}
|
63 |
|
64 |
/**
|
65 |
+
* Check if structured data can be added for the current taxonomy.
|
66 |
*
|
67 |
* @return boolean|string
|
68 |
*/
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
+
* Check if structured data can be added for the Shop page.
|
93 |
*
|
94 |
* @return boolean|string
|
95 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Recipe Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -23,7 +23,7 @@ class Recipe implements Snippet {
|
|
23 |
/**
|
24 |
* Recipe rich snippet.
|
25 |
*
|
26 |
-
* @param array $data Array of
|
27 |
* @param JsonLD $jsonld JsonLD Instance.
|
28 |
*
|
29 |
* @return array
|
@@ -73,9 +73,9 @@ class Recipe implements Snippet {
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
* Set
|
77 |
*
|
78 |
-
* @param array $entity Array of
|
79 |
*/
|
80 |
private function set_how_to_section( &$entity ) {
|
81 |
$instructions = Helper::get_post_meta( 'snippet_recipe_instructions' );
|
@@ -121,7 +121,7 @@ class Recipe implements Snippet {
|
|
121 |
/**
|
122 |
* Set reciepe how to step.
|
123 |
*
|
124 |
-
* @param array $entity Array of
|
125 |
*/
|
126 |
private function set_how_to_step( &$entity ) {
|
127 |
$instructions = Str::to_arr_no_empty( Helper::get_post_meta( 'snippet_recipe_single_instructions' ) );
|
@@ -150,9 +150,9 @@ class Recipe implements Snippet {
|
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
-
* Set
|
154 |
*
|
155 |
-
* @param array $entity Array of
|
156 |
*/
|
157 |
private function set_calories( &$entity ) {
|
158 |
if ( $calories = Helper::get_post_meta( 'snippet_recipe_calories' ) ) { // phpcs:ignore
|
@@ -164,9 +164,9 @@ class Recipe implements Snippet {
|
|
164 |
}
|
165 |
|
166 |
/**
|
167 |
-
* Set
|
168 |
*
|
169 |
-
* @param array $entity Array of
|
170 |
*/
|
171 |
private function set_rating( &$entity ) {
|
172 |
if ( $rating = Helper::get_post_meta( 'snippet_recipe_rating' ) ) { // phpcs:ignore
|
@@ -181,9 +181,9 @@ class Recipe implements Snippet {
|
|
181 |
}
|
182 |
|
183 |
/**
|
184 |
-
* Set
|
185 |
*
|
186 |
-
* @param array $entity Array of
|
187 |
*/
|
188 |
private function set_video( &$entity ) {
|
189 |
if ( $video = Helper::get_post_meta( 'snippet_recipe_video' ) ) { // phpcs:ignore
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Recipe Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
23 |
/**
|
24 |
* Recipe rich snippet.
|
25 |
*
|
26 |
+
* @param array $data Array of JSON-LD data.
|
27 |
* @param JsonLD $jsonld JsonLD Instance.
|
28 |
*
|
29 |
* @return array
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
+
* Set recipe how to section.
|
77 |
*
|
78 |
+
* @param array $entity Array of JSON-LD entity.
|
79 |
*/
|
80 |
private function set_how_to_section( &$entity ) {
|
81 |
$instructions = Helper::get_post_meta( 'snippet_recipe_instructions' );
|
121 |
/**
|
122 |
* Set reciepe how to step.
|
123 |
*
|
124 |
+
* @param array $entity Array of JSON-LD entity.
|
125 |
*/
|
126 |
private function set_how_to_step( &$entity ) {
|
127 |
$instructions = Str::to_arr_no_empty( Helper::get_post_meta( 'snippet_recipe_single_instructions' ) );
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
+
* Set recipe calories.
|
154 |
*
|
155 |
+
* @param array $entity Array of JSON-LD entity.
|
156 |
*/
|
157 |
private function set_calories( &$entity ) {
|
158 |
if ( $calories = Helper::get_post_meta( 'snippet_recipe_calories' ) ) { // phpcs:ignore
|
164 |
}
|
165 |
|
166 |
/**
|
167 |
+
* Set recipe rating.
|
168 |
*
|
169 |
+
* @param array $entity Array of JSON-LD entity.
|
170 |
*/
|
171 |
private function set_rating( &$entity ) {
|
172 |
if ( $rating = Helper::get_post_meta( 'snippet_recipe_rating' ) ) { // phpcs:ignore
|
181 |
}
|
182 |
|
183 |
/**
|
184 |
+
* Set recipe video.
|
185 |
*
|
186 |
+
* @param array $entity Array of JSON-LD entity.
|
187 |
*/
|
188 |
private function set_video( &$entity ) {
|
189 |
if ( $video = Helper::get_post_meta( 'snippet_recipe_video' ) ) { // phpcs:ignore
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Restaurant Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Restaurant implements Snippet {
|
|
22 |
/**
|
23 |
* Restaurant rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Restaurant Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Restaurant rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Review Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -25,7 +25,7 @@ class Review implements Snippet {
|
|
25 |
/**
|
26 |
* Review rich snippet.
|
27 |
*
|
28 |
-
* @param array $data Array of
|
29 |
* @param JsonLD $jsonld JsonLD Instance.
|
30 |
*
|
31 |
* @return array
|
@@ -89,7 +89,7 @@ class Review implements Snippet {
|
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
-
*
|
93 |
*
|
94 |
* @return boolean|string
|
95 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Review Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
25 |
/**
|
26 |
* Review rich snippet.
|
27 |
*
|
28 |
+
* @param array $data Array of JSON-LD data.
|
29 |
* @param JsonLD $jsonld JsonLD Instance.
|
30 |
*
|
31 |
* @return array
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
+
* Check if we can inject the review in the content.
|
93 |
*
|
94 |
* @return boolean|string
|
95 |
*/
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Search Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -18,11 +18,11 @@ defined( 'ABSPATH' ) || exit;
|
|
18 |
class Search_Results implements Snippet {
|
19 |
|
20 |
/**
|
21 |
-
*
|
22 |
*
|
23 |
* @link https://schema.org/SearchResultsPage
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Search Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
18 |
class Search_Results implements Snippet {
|
19 |
|
20 |
/**
|
21 |
+
* Sets the Schema structured data for the SearchResultsPage.
|
22 |
*
|
23 |
* @link https://schema.org/SearchResultsPage
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Service Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Service implements Snippet {
|
|
22 |
/**
|
23 |
* Service rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Service Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Service rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Singular Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -26,7 +26,7 @@ class Singular implements Snippet {
|
|
26 |
/**
|
27 |
* Generate rich snippet.
|
28 |
*
|
29 |
-
* @param array $data Array of
|
30 |
* @param JsonLD $jsonld JsonLD Instance.
|
31 |
*
|
32 |
* @return array
|
@@ -67,7 +67,7 @@ class Singular implements Snippet {
|
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
-
*
|
71 |
*
|
72 |
* @param JsonLD $jsonld JsonLD Instance.
|
73 |
*
|
@@ -87,7 +87,7 @@ class Singular implements Snippet {
|
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
* Get Schema Class.
|
91 |
*
|
92 |
* @param string $schema Schema type.
|
93 |
* @return bool|Class
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Singular Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
26 |
/**
|
27 |
* Generate rich snippet.
|
28 |
*
|
29 |
+
* @param array $data Array of JSON-LD data.
|
30 |
* @param JsonLD $jsonld JsonLD Instance.
|
31 |
*
|
32 |
* @return array
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
+
* Get Rich Snippet type.
|
71 |
*
|
72 |
* @param JsonLD $jsonld JsonLD Instance.
|
73 |
*
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
+
* Get appropriate Schema Class.
|
91 |
*
|
92 |
* @param string $schema Schema type.
|
93 |
* @return bool|Class
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Software Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Software implements Snippet {
|
|
22 |
/**
|
23 |
* Software rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Software Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Software rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Video Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Video implements Snippet {
|
|
22 |
/**
|
23 |
* Video rich snippet.
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Video Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
/**
|
23 |
* Video rich snippet.
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The Website Class
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
@@ -22,7 +22,7 @@ class Website implements Snippet {
|
|
22 |
*
|
23 |
* @link https://developers.google.com/structured-data/site-name
|
24 |
*
|
25 |
-
* @param array $data Array of
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
@@ -37,15 +37,15 @@ class Website implements Snippet {
|
|
37 |
];
|
38 |
|
39 |
/**
|
40 |
-
*
|
41 |
*
|
42 |
-
* @param boolean
|
43 |
*/
|
44 |
if ( ! apply_filters( 'rank_math/json_ld/disable_search', false ) ) {
|
45 |
/**
|
46 |
-
*
|
47 |
*
|
48 |
-
* @param string $search_url The search URL
|
49 |
*/
|
50 |
$search_url = apply_filters( 'rank_math/json_ld/search_url', home_url( '/?s={search_term_string}' ) );
|
51 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The Website Class.
|
4 |
*
|
5 |
* @since 1.0.13
|
6 |
* @package RankMath
|
22 |
*
|
23 |
* @link https://developers.google.com/structured-data/site-name
|
24 |
*
|
25 |
+
* @param array $data Array of JSON-LD data.
|
26 |
* @param JsonLD $jsonld JsonLD Instance.
|
27 |
*
|
28 |
* @return array
|
37 |
];
|
38 |
|
39 |
/**
|
40 |
+
* Disable the JSON-LD output for the Sitelinks Searchbox.
|
41 |
*
|
42 |
+
* @param boolean Display or not the JSON-LD for the Sitelinks Searchbox.
|
43 |
*/
|
44 |
if ( ! apply_filters( 'rank_math/json_ld/disable_search', false ) ) {
|
45 |
/**
|
46 |
+
* Change the search URL in the JSON-LD.
|
47 |
*
|
48 |
+
* @param string $search_url The search URL with `{search_term_string}` placeholder.
|
49 |
*/
|
50 |
$search_url = apply_filters( 'rank_math/json_ld/search_url', home_url( '/?s={search_term_string}' ) );
|
51 |
|
@@ -81,6 +81,8 @@ class Search_Console extends Module {
|
|
81 |
$this->filter( 'rank_math/settings/general', 'add_settings' );
|
82 |
}
|
83 |
|
|
|
|
|
84 |
// AJAX.
|
85 |
$this->ajax( 'search_console_authentication', 'authentication' );
|
86 |
$this->ajax( 'search_console_deauthentication', 'deauthentication' );
|
@@ -91,6 +93,15 @@ class Search_Console extends Module {
|
|
91 |
}
|
92 |
}
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
/**
|
95 |
* Set current tab field.
|
96 |
*/
|
81 |
$this->filter( 'rank_math/settings/general', 'add_settings' );
|
82 |
}
|
83 |
|
84 |
+
$this->action( 'rank_math/admin/enqueue_scripts', 'enqueue' );
|
85 |
+
|
86 |
// AJAX.
|
87 |
$this->ajax( 'search_console_authentication', 'authentication' );
|
88 |
$this->ajax( 'search_console_deauthentication', 'deauthentication' );
|
93 |
}
|
94 |
}
|
95 |
|
96 |
+
/**
|
97 |
+
* Enqueue scripts for the metabox.
|
98 |
+
*/
|
99 |
+
public function enqueue() {
|
100 |
+
if ( ! wp_script_is( 'moment', 'registered' ) ) {
|
101 |
+
wp_register_script( 'moment', rank_math()->plugin_url() . 'assets/vendor/moment.js', [], rank_math()->version );
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
/**
|
106 |
* Set current tab field.
|
107 |
*/
|
@@ -73,7 +73,7 @@ class SEO_Analyzer {
|
|
73 |
* The Constructor.
|
74 |
*/
|
75 |
public function __construct() {
|
76 |
-
$this->api_url = $this->do_filter( 'seo_analysis/api_endpoint', 'https://
|
77 |
$this->analyse_url = get_home_url();
|
78 |
|
79 |
if ( ! empty( $_REQUEST['u'] ) && $this->is_allowed_url( Param::request( 'u' ) ) ) {
|
@@ -81,6 +81,8 @@ class SEO_Analyzer {
|
|
81 |
$this->analyse_subpage = true;
|
82 |
}
|
83 |
|
|
|
|
|
84 |
if ( ! $this->analyse_subpage ) {
|
85 |
$this->get_results_from_storage();
|
86 |
$this->local_tests = $this->do_filter( 'seo_analysis/tests', [] );
|
@@ -239,6 +241,17 @@ class SEO_Analyzer {
|
|
239 |
$this->build_results();
|
240 |
}
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
/**
|
243 |
* Convert result into object.
|
244 |
*/
|
@@ -288,6 +301,17 @@ class SEO_Analyzer {
|
|
288 |
return false;
|
289 |
}
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
foreach ( $response as $id => $results ) {
|
292 |
$this->results[ $id ] = wp_parse_args(
|
293 |
$results,
|
@@ -309,9 +333,10 @@ class SEO_Analyzer {
|
|
309 |
private function get_api_results() {
|
310 |
$api_url = add_query_arg(
|
311 |
[
|
312 |
-
'u'
|
313 |
-
'ak'
|
314 |
-
'locale'
|
|
|
315 |
],
|
316 |
$this->api_url
|
317 |
);
|
73 |
* The Constructor.
|
74 |
*/
|
75 |
public function __construct() {
|
76 |
+
$this->api_url = $this->do_filter( 'seo_analysis/api_endpoint', 'https://rankmath.com/analyze/v2/json/' );
|
77 |
$this->analyse_url = get_home_url();
|
78 |
|
79 |
if ( ! empty( $_REQUEST['u'] ) && $this->is_allowed_url( Param::request( 'u' ) ) ) {
|
81 |
$this->analyse_subpage = true;
|
82 |
}
|
83 |
|
84 |
+
$this->maybe_clear_storage();
|
85 |
+
|
86 |
if ( ! $this->analyse_subpage ) {
|
87 |
$this->get_results_from_storage();
|
88 |
$this->local_tests = $this->do_filter( 'seo_analysis/tests', [] );
|
241 |
$this->build_results();
|
242 |
}
|
243 |
|
244 |
+
/**
|
245 |
+
* Clear stored results if needed.
|
246 |
+
*/
|
247 |
+
private function maybe_clear_storage() {
|
248 |
+
if ( '1' === Param::request( 'clear_results' ) ) {
|
249 |
+
delete_option( 'rank_math_seo_analysis_results' );
|
250 |
+
wp_safe_redirect( remove_query_arg( 'clear_results' ) );
|
251 |
+
exit;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
/**
|
256 |
* Convert result into object.
|
257 |
*/
|
301 |
return false;
|
302 |
}
|
303 |
|
304 |
+
$this->process_api_results( $response );
|
305 |
+
|
306 |
+
return true;
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Process results as needed.
|
311 |
+
*
|
312 |
+
* @return boolean
|
313 |
+
*/
|
314 |
+
private function process_api_results( $response ) {
|
315 |
foreach ( $response as $id => $results ) {
|
316 |
$this->results[ $id ] = wp_parse_args(
|
317 |
$results,
|
333 |
private function get_api_results() {
|
334 |
$api_url = add_query_arg(
|
335 |
[
|
336 |
+
'u' => $this->analyse_url,
|
337 |
+
'ak' => $this->get_api_key(),
|
338 |
+
'locale' => get_locale(),
|
339 |
+
'is_subpage' => $this->analyse_subpage,
|
340 |
],
|
341 |
$this->api_url
|
342 |
);
|
@@ -45,6 +45,7 @@ class Taxonomy implements Provider {
|
|
45 |
}
|
46 |
|
47 |
if (
|
|
|
48 |
false === taxonomy_exists( $type ) ||
|
49 |
false === Helper::is_taxonomy_viewable( $type ) ||
|
50 |
false === Helper::is_taxonomy_indexable( $type ) ||
|
45 |
}
|
46 |
|
47 |
if (
|
48 |
+
empty( $type ) ||
|
49 |
false === taxonomy_exists( $type ) ||
|
50 |
false === Helper::is_taxonomy_viewable( $type ) ||
|
51 |
false === Helper::is_taxonomy_indexable( $type ) ||
|
@@ -49,6 +49,9 @@ class WooCommerce {
|
|
49 |
}
|
50 |
if ( Helper::get_settings( 'general.wc_remove_category_base' ) || Helper::get_settings( 'general.wc_remove_category_parent_slugs' ) ) {
|
51 |
$this->filter( 'term_link', 'product_term_link', 1, 3 );
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
$this->filter( 'rewrite_rules_array', 'add_rewrite_rules', 99 );
|
49 |
}
|
50 |
if ( Helper::get_settings( 'general.wc_remove_category_base' ) || Helper::get_settings( 'general.wc_remove_category_parent_slugs' ) ) {
|
51 |
$this->filter( 'term_link', 'product_term_link', 1, 3 );
|
52 |
+
add_action( 'created_product_cat', 'RankMath\\Helper::schedule_flush_rewrite' );
|
53 |
+
add_action( 'delete_product_cat', 'RankMath\\Helper::schedule_flush_rewrite' );
|
54 |
+
add_action( 'edited_product_cat', 'RankMath\\Helper::schedule_flush_rewrite' );
|
55 |
}
|
56 |
|
57 |
$this->filter( 'rewrite_rules_array', 'add_rewrite_rules', 99 );
|
@@ -13,7 +13,7 @@ $cmb->add_field( array(
|
|
13 |
'type' => 'switch',
|
14 |
'name' => esc_html__( 'Remove base', 'rank-math' ),
|
15 |
'desc' => esc_html__( 'Remove prefix from product URL.', 'rank-math' ) .
|
16 |
-
'<br><code>' . esc_html__( 'default: /
|
17 |
'default' => 'off',
|
18 |
) );
|
19 |
|
13 |
'type' => 'switch',
|
14 |
'name' => esc_html__( 'Remove base', 'rank-math' ),
|
15 |
'desc' => esc_html__( 'Remove prefix from product URL.', 'rank-math' ) .
|
16 |
+
'<br><code>' . esc_html__( 'default: /product/accessories/action-figures/acme/ - changed: /accessories/action-figures/acme/', 'rank-math' ) . '</code>',
|
17 |
'default' => 'off',
|
18 |
) );
|
19 |
|
@@ -11,7 +11,7 @@ $cmb->add_field([
|
|
11 |
'type' => 'text',
|
12 |
'name' => esc_html__( 'Facebook Page URL', 'rank-math' ),
|
13 |
'desc' => esc_html__( 'Enter your complete Facebook page URL here. eg:', 'rank-math' ) .
|
14 |
-
'<br><code>' . htmlspecialchars( 'https://www.facebook.com/
|
15 |
]);
|
16 |
|
17 |
$cmb->add_field([
|
@@ -52,14 +52,14 @@ $cmb->add_field([
|
|
52 |
'type' => 'text',
|
53 |
'name' => esc_html__( 'Twitter Profile URL', 'rank-math' ),
|
54 |
'desc' => esc_html__( 'Enter your complete Twitter Profile URL here. eg:', 'rank-math' ) .
|
55 |
-
'<br><code>' . htmlspecialchars( 'https://twitter.com/
|
56 |
]);
|
57 |
|
58 |
$cmb->add_field([
|
59 |
'id' => 'twitter_author_names',
|
60 |
'type' => 'text',
|
61 |
'name' => esc_html__( 'Twitter Username', 'rank-math' ),
|
62 |
-
'desc' => wp_kses_post( __( 'Enter the Twitter username of the author to add <code>twitter:creator</code> tag to posts. eg: <code>
|
63 |
]);
|
64 |
|
65 |
$cmb->add_field([
|
@@ -107,7 +107,7 @@ $cmb->add_field([
|
|
107 |
'type' => 'text',
|
108 |
'name' => esc_html__( 'LinkedIn Page URL', 'rank-math' ),
|
109 |
'desc' => wp_kses_post( __( 'Enter your LinkedIn profile URL (for personal blogs) or your company URL (for business blogs). eg:', 'rank-math' ) ) .
|
110 |
-
'<br><code>' . htmlspecialchars( 'https://www.linkedin.com/company/
|
111 |
]);
|
112 |
|
113 |
$cmb->add_field([
|
@@ -131,7 +131,7 @@ $cmb->add_field([
|
|
131 |
'type' => 'text',
|
132 |
'name' => esc_html__( 'Pinterest Page URL', 'rank-math' ),
|
133 |
'desc' => wp_kses_post( __( 'Enter your Pinterest Profile URL here. eg:', 'rank-math' ) ) .
|
134 |
-
'<br><code>' . htmlspecialchars( 'https://in.pinterest.com/
|
135 |
]);
|
136 |
|
137 |
$cmb->add_field([
|
@@ -139,7 +139,7 @@ $cmb->add_field([
|
|
139 |
'type' => 'text',
|
140 |
'name' => esc_html__( 'SoundClound Page URL', 'rank-math' ),
|
141 |
'desc' => wp_kses_post( __( 'Enter your SoundCloud URL here. eg:', 'rank-math' ) ) .
|
142 |
-
'<br><code>' . htmlspecialchars( 'https://soundcloud.com/
|
143 |
]);
|
144 |
|
145 |
$cmb->add_field([
|
@@ -147,7 +147,7 @@ $cmb->add_field([
|
|
147 |
'type' => 'text',
|
148 |
'name' => esc_html__( 'Tumblr Page URL', 'rank-math' ),
|
149 |
'desc' => wp_kses_post( __( 'Enter your Tumblr URL here. eg:', 'rank-math' ) ) .
|
150 |
-
'<br><code>' . htmlspecialchars( 'https://
|
151 |
]);
|
152 |
|
153 |
$cmb->add_field([
|
11 |
'type' => 'text',
|
12 |
'name' => esc_html__( 'Facebook Page URL', 'rank-math' ),
|
13 |
'desc' => esc_html__( 'Enter your complete Facebook page URL here. eg:', 'rank-math' ) .
|
14 |
+
'<br><code>' . htmlspecialchars( 'https://www.facebook.com/RankMath/' ) . '</code>',
|
15 |
]);
|
16 |
|
17 |
$cmb->add_field([
|
52 |
'type' => 'text',
|
53 |
'name' => esc_html__( 'Twitter Profile URL', 'rank-math' ),
|
54 |
'desc' => esc_html__( 'Enter your complete Twitter Profile URL here. eg:', 'rank-math' ) .
|
55 |
+
'<br><code>' . htmlspecialchars( 'https://twitter.com/RankMathSEO/' ) . '</code>',
|
56 |
]);
|
57 |
|
58 |
$cmb->add_field([
|
59 |
'id' => 'twitter_author_names',
|
60 |
'type' => 'text',
|
61 |
'name' => esc_html__( 'Twitter Username', 'rank-math' ),
|
62 |
+
'desc' => wp_kses_post( __( 'Enter the Twitter username of the author to add <code>twitter:creator</code> tag to posts. eg: <code>RankMathSEO</code>', 'rank-math' ) ),
|
63 |
]);
|
64 |
|
65 |
$cmb->add_field([
|
107 |
'type' => 'text',
|
108 |
'name' => esc_html__( 'LinkedIn Page URL', 'rank-math' ),
|
109 |
'desc' => wp_kses_post( __( 'Enter your LinkedIn profile URL (for personal blogs) or your company URL (for business blogs). eg:', 'rank-math' ) ) .
|
110 |
+
'<br><code>' . htmlspecialchars( 'https://www.linkedin.com/company/rankmath/' ) . '</code>',
|
111 |
]);
|
112 |
|
113 |
$cmb->add_field([
|
131 |
'type' => 'text',
|
132 |
'name' => esc_html__( 'Pinterest Page URL', 'rank-math' ),
|
133 |
'desc' => wp_kses_post( __( 'Enter your Pinterest Profile URL here. eg:', 'rank-math' ) ) .
|
134 |
+
'<br><code>' . htmlspecialchars( 'https://in.pinterest.com/rankmath/' ) . '</code>',
|
135 |
]);
|
136 |
|
137 |
$cmb->add_field([
|
139 |
'type' => 'text',
|
140 |
'name' => esc_html__( 'SoundClound Page URL', 'rank-math' ),
|
141 |
'desc' => wp_kses_post( __( 'Enter your SoundCloud URL here. eg:', 'rank-math' ) ) .
|
142 |
+
'<br><code>' . htmlspecialchars( 'https://soundcloud.com/rankmath' ) . '</code>',
|
143 |
]);
|
144 |
|
145 |
$cmb->add_field([
|
147 |
'type' => 'text',
|
148 |
'name' => esc_html__( 'Tumblr Page URL', 'rank-math' ),
|
149 |
'desc' => wp_kses_post( __( 'Enter your Tumblr URL here. eg:', 'rank-math' ) ) .
|
150 |
+
'<br><code>' . htmlspecialchars( 'https://rankmath.tumblr.com' ) . '</code>',
|
151 |
]);
|
152 |
|
153 |
$cmb->add_field([
|
@@ -62,11 +62,11 @@ function rank_math_the_seo_score( $args = [] ) {
|
|
62 |
*
|
63 |
* @codeCoverageIgnore
|
64 |
*
|
65 |
-
* @param string $var Variable name, for example %custom%. '%' signs are optional.
|
66 |
-
* @param mixed $callback Replacement callback. Should return value
|
67 |
* @param array $args Array with additional title, description and example values for the variable.
|
68 |
*
|
69 |
-
* @return bool
|
70 |
*/
|
71 |
function rank_math_register_var_replacement( $var, $callback, $args = [] ) {
|
72 |
return RankMath\Replace_Vars::register_replacement( $var, $callback, $args );
|
62 |
*
|
63 |
* @codeCoverageIgnore
|
64 |
*
|
65 |
+
* @param string $var Variable name, for example %custom%. The '%' signs are optional.
|
66 |
+
* @param mixed $callback Replacement callback. Should return value and not output it.
|
67 |
* @param array $args Array with additional title, description and example values for the variable.
|
68 |
*
|
69 |
+
* @return bool Replacement was registered successfully or not.
|
70 |
*/
|
71 |
function rank_math_register_var_replacement( $var, $callback, $args = [] ) {
|
72 |
return RankMath\Replace_Vars::register_replacement( $var, $callback, $args );
|
@@ -6,8 +6,8 @@ msgstr ""
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
-
"Language-Team:
|
10 |
-
"Last-Translator:
|
11 |
"X-Poedit-Basepath: ..\n"
|
12 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
13 |
"X-Poedit-SearchPath-0: .\n"
|
@@ -423,6 +423,12 @@ msgstr ""
|
|
423 |
msgid "Sitemap Settings"
|
424 |
msgstr ""
|
425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
msgid "No data found."
|
427 |
msgstr ""
|
428 |
|
@@ -1803,6 +1809,18 @@ msgstr ""
|
|
1803 |
msgid "Google Mobile-Friendly Test"
|
1804 |
msgstr ""
|
1805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1806 |
msgid "Google Cache"
|
1807 |
msgstr ""
|
1808 |
|
@@ -2478,10 +2496,10 @@ msgstr ""
|
|
2478 |
msgid "Image is smaller than the minimum size, please select a different image."
|
2479 |
msgstr ""
|
2480 |
|
2481 |
-
msgid "
|
2482 |
msgstr ""
|
2483 |
|
2484 |
-
msgid "
|
2485 |
msgstr ""
|
2486 |
|
2487 |
msgid "Add icon overlay to thumbnail"
|
@@ -4780,7 +4798,7 @@ msgstr ""
|
|
4780 |
msgid "Remove prefix from product URL."
|
4781 |
msgstr ""
|
4782 |
|
4783 |
-
msgid "default: /
|
4784 |
msgstr ""
|
4785 |
|
4786 |
msgid "Remove category base"
|
@@ -5005,6 +5023,9 @@ msgstr ""
|
|
5005 |
msgid "Find out more."
|
5006 |
msgstr ""
|
5007 |
|
|
|
|
|
|
|
5008 |
msgid "Show SEO Score"
|
5009 |
msgstr ""
|
5010 |
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Language-Team: Rank Math\n"
|
10 |
+
"Last-Translator: Rank Math\n"
|
11 |
"X-Poedit-Basepath: ..\n"
|
12 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
13 |
"X-Poedit-SearchPath-0: .\n"
|
423 |
msgid "Sitemap Settings"
|
424 |
msgstr ""
|
425 |
|
426 |
+
msgid "Save Changes"
|
427 |
+
msgstr ""
|
428 |
+
|
429 |
+
msgid "Reset Options"
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
msgid "No data found."
|
433 |
msgstr ""
|
434 |
|
1809 |
msgid "Google Mobile-Friendly Test"
|
1810 |
msgstr ""
|
1811 |
|
1812 |
+
msgid "Google Rich Results (Mobile)"
|
1813 |
+
msgstr ""
|
1814 |
+
|
1815 |
+
msgid "Google Rich Results Test - Googlebot Smartphone"
|
1816 |
+
msgstr ""
|
1817 |
+
|
1818 |
+
msgid "Google Rich Results (Desktop)"
|
1819 |
+
msgstr ""
|
1820 |
+
|
1821 |
+
msgid "Google Rich Results Test - Googlebot Desktop"
|
1822 |
+
msgstr ""
|
1823 |
+
|
1824 |
msgid "Google Cache"
|
1825 |
msgstr ""
|
1826 |
|
2496 |
msgid "Image is smaller than the minimum size, please select a different image."
|
2497 |
msgstr ""
|
2498 |
|
2499 |
+
msgid "RankMath -- Test Drive"
|
2500 |
msgstr ""
|
2501 |
|
2502 |
+
msgid "RankMath -- Description"
|
2503 |
msgstr ""
|
2504 |
|
2505 |
msgid "Add icon overlay to thumbnail"
|
4798 |
msgid "Remove prefix from product URL."
|
4799 |
msgstr ""
|
4800 |
|
4801 |
+
msgid "default: /product/accessories/action-figures/acme/ - changed: /accessories/action-figures/acme/"
|
4802 |
msgstr ""
|
4803 |
|
4804 |
msgid "Remove category base"
|
5023 |
msgid "Find out more."
|
5024 |
msgstr ""
|
5025 |
|
5026 |
+
msgid "Auto Update"
|
5027 |
+
msgstr ""
|
5028 |
+
|
5029 |
msgid "Show SEO Score"
|
5030 |
msgstr ""
|
5031 |
|
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
-
* Version: 1.0.
|
13 |
* Plugin URI: https://s.rankmath.com/home
|
14 |
* Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
|
15 |
* Author: Rank Math
|
@@ -34,7 +34,7 @@ final class RankMath {
|
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
-
public $version = '1.0.
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
+
* Version: 1.0.31
|
13 |
* Plugin URI: https://s.rankmath.com/home
|
14 |
* Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
|
15 |
* Author: Rank Math
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
+
public $version = '1.0.31';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
@@ -5,7 +5,7 @@ Tags: seo, sitemap, google search console, schema, redirection
|
|
5 |
Tested up to: 5.2.2
|
6 |
Requires at least: 4.7.0
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
@@ -451,11 +451,20 @@ We look forward to helping you.
|
|
451 |
|
452 |
== Changelog ==
|
453 |
|
454 |
-
= 1.0.
|
455 |
-
*
|
456 |
-
* Improved the
|
457 |
-
* Improved
|
458 |
-
*
|
459 |
-
*
|
460 |
-
|
461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
Tested up to: 5.2.2
|
6 |
Requires at least: 4.7.0
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.0.31
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
451 |
|
452 |
== Changelog ==
|
453 |
|
454 |
+
= 1.0.31 [Aug 02, 2019] =
|
455 |
+
* Added diacritics into consideration while running the content analysis. Finally, all other language words can be analyzed!
|
456 |
+
* Improved the logic of honoring the Global Meta so, there are no mismatches between the settings of a single post vs general settings and also for the importers. Please review your Rank Math's settings properly if you happen to import. [Here's a detailed guide](https://s.rankmath.com/wpmrmguide)
|
457 |
+
* Improved the searching in the redirections & 404 errors
|
458 |
+
* Improved SEO Analysis text further to make things clearer
|
459 |
+
* Updated the analysis's API URL to Rank Math's
|
460 |
+
* Fixed a bug with WordPress 4.x (to everyone still using WP 4.x, please update to the latest WP and use Classic Editor plugin alongside)
|
461 |
+
* Fixed an issue with the importing of the Redirections. Disabled redirections were getting imported as active. That should not be happening anymore.
|
462 |
+
* Fixed a bug where CSS & JS files were loading on the frontend even if the admin bar was disabled
|
463 |
+
* Fixed a compatibility issue with WooCommerce's category permalink flushing
|
464 |
+
* Fixed an issue with the Snippet Shortcode occurring with a Non-numeric value
|
465 |
+
* Fixed an issue with the redirections where QueryString with trailing slash `/` was not working fine
|
466 |
+
* Fixed few typos in the description of the helping text
|
467 |
+
* Fixed an issue with the auto-update. It should be working fine now.
|
468 |
+
* Fixed a compatibility bug with WPML
|
469 |
+
|
470 |
+
Full changelog can be found here - **[Rank Math SEO changelog](https://s.rankmath.com/changelog)**
|
@@ -1,16 +1,11 @@
|
|
1 |
<wpml-config>
|
2 |
<custom-fields>
|
3 |
<custom-field action="translate">rank_math_title</custom-field>
|
4 |
-
<custom-field action="copy">rank_math_permalink</custom-field>
|
5 |
<custom-field action="translate">rank_math_description</custom-field>
|
6 |
<custom-field action="translate">rank_math_focus_keyword</custom-field>
|
7 |
-
<custom-field action="
|
8 |
-
<custom-field action="copy">rank_math_robots</custom-field>
|
9 |
-
<custom-field action="copy">rank_math_pillar_content</custom-field>
|
10 |
-
<custom-field action="copy">rank_math_canonical_url</custom-field>
|
11 |
-
<custom-field action="copy">rank_math_include_local_seo</custom-field>
|
12 |
-
<custom-field action="copy">rank_math_include_sitemap</custom-field>
|
13 |
-
<custom-field action="copy">rank_math_link_builder_exclude</custom-field>
|
14 |
<custom-field action="copy">rank_math_facebook_enable_image_overlay</custom-field>
|
15 |
<custom-field action="copy">rank_math_facebook_image_overlay</custom-field>
|
16 |
<custom-field action="copy">rank_math_twitter_use_facebook</custom-field>
|
1 |
<wpml-config>
|
2 |
<custom-fields>
|
3 |
<custom-field action="translate">rank_math_title</custom-field>
|
|
|
4 |
<custom-field action="translate">rank_math_description</custom-field>
|
5 |
<custom-field action="translate">rank_math_focus_keyword</custom-field>
|
6 |
+
<custom-field action="ignore">rank_math_canonical_url</custom-field>
|
7 |
+
<custom-field action="copy-once">rank_math_robots</custom-field>
|
8 |
+
<custom-field action="copy-once">rank_math_pillar_content</custom-field>
|
|
|
|
|
|
|
|
|
9 |
<custom-field action="copy">rank_math_facebook_enable_image_overlay</custom-field>
|
10 |
<custom-field action="copy">rank_math_facebook_image_overlay</custom-field>
|
11 |
<custom-field action="copy">rank_math_twitter_use_facebook</custom-field>
|