All in One SEO Pack - Version 3.5.2

Version Description

Download this release

Release Info

Developer benjaminprojas
Plugin Icon 128x128 All in One SEO Pack
Version 3.5.2
Comparing to
See all releases

Code changes from version 3.4.3 to 3.5.2

admin/aioseop_module_class.php CHANGED
@@ -929,25 +929,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
929
  return $post_types;
930
  }
931
 
932
- /**
933
- * Get Term Labels
934
- *
935
- * @since ?
936
- *
937
- * @param $post_objs
938
- * @return array
939
- */
940
- function get_term_labels( $post_objs ) {
941
- $post_types = array();
942
- foreach ( $post_objs as $p ) {
943
- if ( ! empty( $p->name ) ) {
944
- $post_types[ $p->term_id ] = $p->name;
945
- }
946
- }
947
-
948
- return $post_types;
949
- }
950
-
951
  /**
952
  * Get Post Type Titles
953
  *
@@ -976,22 +957,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
976
  return $this->get_object_labels( get_taxonomies( $args, 'objects' ) );
977
  }
978
 
979
- /**
980
- * Gets the category titles.
981
- *
982
- * @since 3.0 Changed function name from `get_category_titles` to `get_term_titles`. (#240)
983
- * @since 3.0 Changed `get_categories()` to `get_terms()` to fetch all (custom) terms. (#240)
984
- *
985
- * @see WP_Term_Query::__constructor()
986
- * @link https://developer.wordpress.org/reference/classes/wp_term_query/__construct/
987
- *
988
- * @param array $args An array for arguments to query by. See WP_Term_Query::__constructor() for more info.
989
- * @return array
990
- */
991
- function get_term_titles( $args = array() ) {
992
- return $this->get_term_labels( get_terms( $args ) );
993
- }
994
-
995
  /**
996
  * Helper function for exporting settings on post data.
997
  *
929
  return $post_types;
930
  }
931
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
932
  /**
933
  * Get Post Type Titles
934
  *
957
  return $this->get_object_labels( get_taxonomies( $args, 'objects' ) );
958
  }
959
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
960
  /**
961
  * Helper function for exporting settings on post data.
962
  *
admin/class-aioseop-helper.php CHANGED
@@ -696,7 +696,6 @@ class AIOSEOP_Helper {
696
  private function help_text_sitemap() {
697
  $rtn_help_text = array(
698
  // XML Sitemap.
699
- 'aiosp_sitemap_rss_sitemap' => __( 'Generate an RSS sitemap in addition to the regular XML Sitemap.', 'all-in-one-seo-pack' ),
700
  'aiosp_sitemap_daily_cron' => __( 'Notify search engines based on the selected schedule, and also update static sitemap daily if in use. (this uses WP-Cron, so make sure this is working properly on your server as well)', 'all-in-one-seo-pack' ),
701
  'aiosp_sitemap_indexes' => __( 'Organize sitemap entries into distinct files in your sitemap. We recommend you enable this setting if your sitemap contains more than 1,000 URLs.', 'all-in-one-seo-pack' ),
702
  'aiosp_sitemap_max_posts' => __( 'Allows you to specify the maximum number of posts in a sitemap (up to 50,000).', 'all-in-one-seo-pack' ),
@@ -714,6 +713,10 @@ class AIOSEOP_Helper {
714
  'aiosp_sitemap_excl_terms' => __( 'Exclude any category, tag or custom taxonomy from the XML sitemap. Start typing the name of a category, tag or taxonomy term in the field and a dropdown will populate with the matching terms for you to select from.<br/><br/>This will also exclude any content belonging to the specified term. For example, if you exclude the "Uncategorized" category then all posts in that category will also be excluded from the sitemap.', 'all-in-one-seo-pack' ),
715
  'aiosp_sitemap_excl_pages' => __( 'Use page slugs or page IDs, separated by commas, to exclude pages from the sitemap.', 'all-in-one-seo-pack' ),
716
 
 
 
 
 
717
  // Priorities.
718
  'aiosp_sitemap_prio_homepage' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' ) ),
719
  'aiosp_sitemap_prio_post' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Posts', 'all-in-one-seo-pack' ) ),
@@ -765,6 +768,9 @@ class AIOSEOP_Helper {
765
  'aiosp_sitemap_robots' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#link-from-virtual-robots',
766
  'aiosp_sitemap_rewrite' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#dynamically-generate-sitemap',
767
 
 
 
 
768
  // Additional Pages.
769
  'aiosp_sitemap_addl_url' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
770
  'aiosp_sitemap_addl_prio' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
696
  private function help_text_sitemap() {
697
  $rtn_help_text = array(
698
  // XML Sitemap.
 
699
  'aiosp_sitemap_daily_cron' => __( 'Notify search engines based on the selected schedule, and also update static sitemap daily if in use. (this uses WP-Cron, so make sure this is working properly on your server as well)', 'all-in-one-seo-pack' ),
700
  'aiosp_sitemap_indexes' => __( 'Organize sitemap entries into distinct files in your sitemap. We recommend you enable this setting if your sitemap contains more than 1,000 URLs.', 'all-in-one-seo-pack' ),
701
  'aiosp_sitemap_max_posts' => __( 'Allows you to specify the maximum number of posts in a sitemap (up to 50,000).', 'all-in-one-seo-pack' ),
713
  'aiosp_sitemap_excl_terms' => __( 'Exclude any category, tag or custom taxonomy from the XML sitemap. Start typing the name of a category, tag or taxonomy term in the field and a dropdown will populate with the matching terms for you to select from.<br/><br/>This will also exclude any content belonging to the specified term. For example, if you exclude the "Uncategorized" category then all posts in that category will also be excluded from the sitemap.', 'all-in-one-seo-pack' ),
714
  'aiosp_sitemap_excl_pages' => __( 'Use page slugs or page IDs, separated by commas, to exclude pages from the sitemap.', 'all-in-one-seo-pack' ),
715
 
716
+ // Additional Sitemaps
717
+ 'aiosp_sitemap_posttypes_news' => __( 'Select which Post Types should appear in your Google News sitemap. This sitemap only includes posts that were published in the last 48 hours.', 'all-in-one-seo-pack' ),
718
+ 'aiosp_sitemap_rss_sitemap' => __( 'Generate an RSS sitemap in addition to the regular XML Sitemap.', 'all-in-one-seo-pack' ),
719
+
720
  // Priorities.
721
  'aiosp_sitemap_prio_homepage' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' ) ),
722
  'aiosp_sitemap_prio_post' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Posts', 'all-in-one-seo-pack' ) ),
768
  'aiosp_sitemap_robots' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#link-from-virtual-robots',
769
  'aiosp_sitemap_rewrite' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#dynamically-generate-sitemap',
770
 
771
+ // Additional Sitemaps
772
+ 'aiosp_sitemap_posttypes_news' => 'https://semperplugins.com/documentation/google-news-sitemap/',
773
+
774
  // Additional Pages.
775
  'aiosp_sitemap_addl_url' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
776
  'aiosp_sitemap_addl_prio' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
admin/display/general-metaboxes.php CHANGED
@@ -135,7 +135,7 @@ class aiosp_metaboxes {
135
  <li>
136
  <div class="aioseop_icon aioseop-icon-file"></div>
137
  <a target="_blank" rel="noopener noreferrer"
138
- href="https://semperplugins.com/documentation/">
139
  <?php
140
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
141
  printf( __( 'Read the %s user guide', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
@@ -146,22 +146,22 @@ class aiosp_metaboxes {
146
  <div class="aioseop_icon aioseop-icon-support"></div>
147
  <a target="_blank" rel="noopener noreferrer"
148
  title="<?php _e( 'All in One SEO Pro Plugin Support Forum', 'all-in-one-seo-pack' ); ?>"
149
- href="https://semperplugins.com/support/"><?php _e( 'Access our Premium Support Forums', 'all-in-one-seo-pack' ); ?></a>
150
  </li>
151
  <li>
152
  <div class="aioseop_icon aioseop-icon-cog"></div>
153
  <a target="_blank" rel="noopener noreferrer" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
154
- href="https://semperplugins.com/all-in-one-seo-pack-changelog/"><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a>
155
  </li>
156
  <li>
157
  <div class="aioseop_icon aioseop-icon-youtube"></div>
158
  <a target="_blank" rel="noopener noreferrer"
159
- href="https://semperplugins.com/doc-type/video/"><?php _e( 'Watch video tutorials', 'all-in-one-seo-pack' ); ?></a>
160
  </li>
161
  <li>
162
  <div class="aioseop_icon aioseop-icon-book"></div>
163
  <a target="_blank" rel="noopener noreferrer"
164
- href="https://semperplugins.com/documentation/quick-start-guide/"><?php _e( 'Getting started? Read the Beginners Guide', 'all-in-one-seo-pack' ); ?></a>
165
  </li>
166
  </ul>
167
  </div>
135
  <li>
136
  <div class="aioseop_icon aioseop-icon-file"></div>
137
  <a target="_blank" rel="noopener noreferrer"
138
+ href="<?php echo aioseop_add_url_utm( 'https://semperplugins.com/documentation/' , array( 'utm_campaign' => 'support-box', 'utm_content' => 'documentation' ) ); ?>">
139
  <?php
140
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
141
  printf( __( 'Read the %s user guide', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
146
  <div class="aioseop_icon aioseop-icon-support"></div>
147
  <a target="_blank" rel="noopener noreferrer"
148
  title="<?php _e( 'All in One SEO Pro Plugin Support Forum', 'all-in-one-seo-pack' ); ?>"
149
+ href="<?php echo aioseop_add_url_utm( 'https://semperplugins.com/support/', array( 'utm_campaign' => 'support-box', 'utm_content' => 'support' ) ); ?>"><?php _e( 'Access our Premium Support', 'all-in-one-seo-pack' ); ?></a>
150
  </li>
151
  <li>
152
  <div class="aioseop_icon aioseop-icon-cog"></div>
153
  <a target="_blank" rel="noopener noreferrer" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
154
+ href="<?php echo aioseop_add_url_utm( 'https://semperplugins.com/all-in-one-seo-pack-changelog/', array( 'utm_campaign' => 'support-box', 'utm_content' => 'changelog', ) ); ?>"><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a>
155
  </li>
156
  <li>
157
  <div class="aioseop_icon aioseop-icon-youtube"></div>
158
  <a target="_blank" rel="noopener noreferrer"
159
+ href="<?php echo aioseop_add_url_utm( 'https://semperplugins.com/doc-type/video/', array( 'utm_campaign' => 'support-box', 'utm_content' => 'video') ); ?>"><?php _e( 'Watch video tutorials', 'all-in-one-seo-pack' ); ?></a>
160
  </li>
161
  <li>
162
  <div class="aioseop_icon aioseop-icon-book"></div>
163
  <a target="_blank" rel="noopener noreferrer"
164
+ href="<?php echo aioseop_add_url_utm( 'https://semperplugins.com/documentation/quick-start-guide/', array( 'utm_campaign' => 'support-box', 'utm_content' => 'quick-start' ) ); ?>"><?php _e( 'Getting started? Read the Beginners Guide', 'all-in-one-seo-pack' ); ?></a>
165
  </li>
166
  </ul>
167
  </div>
all_in_one_seo_pack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: All In One SEO Pack
4
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
5
  Description: Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
6
- Version: 3.4.3
7
  Author: All in One SEO Team
8
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
9
  Text Domain: all-in-one-seo-pack
@@ -59,4 +59,4 @@ if ( ! class_exists( 'AIOSEOP_Core' ) ) {
59
  if ( is_null( $aioseop_core ) ) {
60
  $aioseop_core = new AIOSEOP_Core();
61
  }
62
- }
3
  Plugin Name: All In One SEO Pack
4
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
5
  Description: Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
6
+ Version: 3.5.2
7
  Author: All in One SEO Team
8
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
9
  Text Domain: all-in-one-seo-pack
59
  if ( is_null( $aioseop_core ) ) {
60
  $aioseop_core = new AIOSEOP_Core();
61
  }
62
+ }
build/aioseop-link-old.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('lodash', 'wp-element', 'wp-polyfill'), 'version' => 'e291442bb727790ebe3a898227670fe4');
build/aioseop-link-old.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=36)}([function(t,e){!function(){t.exports=this.wp.element}()},,function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},,,function(t,e){!function(){t.exports=this.lodash}()},function(t,e,n){var o;
2
+ /*!
3
+ Copyright (c) 2017 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)&&o.length){var s=r.apply(null,o);s&&t.push(s)}else if("object"===i)for(var a in o)n.call(o,a)&&o[a]&&t.push(a)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o)}()},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},,function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n.apply(this,arguments)}t.exports=n},,function(t,e,n){var o=n(21);t.exports=function(t,e){if(null==t)return{};var n,r,i=o(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}},function(t,e,n){var o=n(22);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}},function(t,e,n){var o=n(23),r=n(2);t.exports=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?r(t):e}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},,,,,function(t,e){t.exports=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e),n.d(e,"link",(function(){return gn}));var o=n(11),r=n.n(o),i=n(16),s=n.n(i),a=n(12),l=n.n(a),c=n(13),u=n.n(c),p=n(2),f=n.n(p),d=n(14),h=n.n(d),g=n(15),v=n.n(g),b=n(7),y=n.n(b),m=n(0),w=n(5),k=n(9),O=n.n(k),S=wp.url,j=S.getProtocol,L=S.isValidProtocol,R=S.getAuthority,E=S.isValidAuthority,C=S.getPath,P=S.isValidPath,x=S.getQueryString,N=S.isValidQueryString,_=S.getFragment,F=S.isValidFragment,T=wp.i18n,D=T.__,A=T.sprintf;function W(t){if(!t)return!1;var e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){var n=j(e);if(!L(n))return!1;if(Object(w.startsWith)(n,"http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;var o=R(e);if(!E(o))return!1;var r=C(e);if(r&&!P(r))return!1;var i=x(e);if(i&&!N(i))return!1;var s=_(e);if(s&&!F(s))return!1}return!(Object(w.startsWith)(e,"#")&&!F(e))}function I(t){var e=t.url,n=t.opensInNewWindow,o=t.noFollow,r=t.sponsored,i=t.ugc,s=t.text,a={type:"core/link",attributes:{url:e}},l=[];if(n){var c=A(D("%s (opens in a new tab)","all-in-one-seo-pack"),s);a.attributes.target="_blank",a.attributes["aria-label"]=c,l.push("noreferrer noopener")}return o&&l.push("nofollow"),r&&l.push("sponsored"),i&&l.push("ugc"),l.length>0&&(a.attributes.rel=l.join(" ")),a}function V(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var M=wp.element.Component,U=wp.dom,K=U.getOffsetParent,B=U.getRectangleFromRange;function H(){var t=window.getSelection();if(0===t.rangeCount)return{};var e=B(t.getRangeAt(0)),n=e.top+e.height,o=e.left+e.width/2,r=K(t.anchorNode);if(r){var i=r.getBoundingClientRect();n-=i.top,o-=i.left}return{top:n,left:o}}var z=function(t){h()(o,t);var e,n=(e=o,function(){var t,n=y()(e);if(V()){var o=y()(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return v()(this,t)});function o(){var t;return l()(this,o),(t=n.apply(this,arguments)).state={style:H()},t}return u()(o,[{key:"render",value:function(){var t=this.props.children,e=this.state.style;return Object(m.createElement)("div",{className:"editor-format-toolbar__selection-position",style:e},t)}}]),o}(M),q=n(6),Q=n.n(q);function $(t){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Y(t,e){var n=t["page".concat(e?"Y":"X","Offset")],o="scroll".concat(e?"Top":"Left");if("number"!=typeof n){var r=t.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function J(t){return Y(t)}function Z(t){return Y(t,!0)}function tt(t){var e=function(t){var e,n,o,r=t.ownerDocument,i=r.body,s=r&&r.documentElement;return n=(e=t.getBoundingClientRect()).left,o=e.top,{left:n-=s.clientLeft||i.clientLeft||0,top:o-=s.clientTop||i.clientTop||0}}(t),n=t.ownerDocument,o=n.defaultView||n.parentWindow;return e.left+=J(o),e.top+=Z(o),e}var et,nt=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),ot=/^(top|right|bottom|left)$/,rt="left";function it(t,e){for(var n=0;n<t.length;n++)e(t[n])}function st(t){return"border-box"===et(t,"boxSizing")}"undefined"!=typeof window&&(et=window.getComputedStyle?function(t,e,n){var o="",r=t.ownerDocument,i=n||r.defaultView.getComputedStyle(t,null);return i&&(o=i.getPropertyValue(e)||i[e]),o}:function(t,e){var n=t.currentStyle&&t.currentStyle[e];if(nt.test(n)&&!ot.test(e)){var o=t.style,r=o[rt],i=t.runtimeStyle[rt];t.runtimeStyle[rt]=t.currentStyle[rt],o[rt]="fontSize"===e?"1em":n||0,n=o.pixelLeft+"px",o[rt]=r,t.runtimeStyle[rt]=i}return""===n?"auto":n});var at=["margin","border","padding"];function lt(t,e,n){var o,r={},i=t.style;for(o in e)e.hasOwnProperty(o)&&(r[o]=i[o],i[o]=e[o]);for(o in n.call(t),e)e.hasOwnProperty(o)&&(i[o]=r[o])}function ct(t,e,n){var o,r,i,s=0;for(r=0;r<e.length;r++)if(o=e[r])for(i=0;i<n.length;i++){var a=void 0;a="border"===o?"".concat(o+n[i],"Width"):o+n[i],s+=parseFloat(et(t,a))||0}return s}function ut(t){return null!=t&&t==t.window}var pt={};function ft(t,e,n){if(ut(t))return"width"===e?pt.viewportWidth(t):pt.viewportHeight(t);if(9===t.nodeType)return"width"===e?pt.docWidth(t):pt.docHeight(t);var o="width"===e?["Left","Right"]:["Top","Bottom"],r="width"===e?t.offsetWidth:t.offsetHeight,i=(et(t),st(t)),s=0;(null==r||r<=0)&&(r=void 0,(null==(s=et(t,e))||Number(s)<0)&&(s=t.style[e]||0),s=parseFloat(s)||0),void 0===n&&(n=i?1:-1);var a=void 0!==r||i,l=r||s;if(-1===n)return a?l-ct(t,["border","padding"],o):s;if(a){var c=2===n?-ct(t,["border"],o):ct(t,["margin"],o);return l+(1===n?0:c)}return s+ct(t,at.slice(n),o)}it(["Width","Height"],(function(t){pt["doc".concat(t)]=function(e){var n=e.document;return Math.max(n.documentElement["scroll".concat(t)],n.body["scroll".concat(t)],pt["viewport".concat(t)](n))},pt["viewport".concat(t)]=function(e){var n="client".concat(t),o=e.document,r=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||r&&r[n]||i}}));var dt={position:"absolute",visibility:"hidden",display:"block"};function ht(t){var e,n=arguments;return 0!==t.offsetWidth?e=ft.apply(void 0,n):lt(t,dt,(function(){e=ft.apply(void 0,n)})),e}function gt(t,e,n){var o=n;if("object"!==$(e))return void 0!==o?("number"==typeof o&&(o+="px"),void(t.style[e]=o)):et(t,e);for(var r in e)e.hasOwnProperty(r)&&gt(t,r,e[r])}it(["width","height"],(function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);pt["outer".concat(e)]=function(e,n){return e&&ht(e,t,n?0:1)};var n="width"===t?["Left","Right"]:["Top","Bottom"];pt[t]=function(e,o){if(void 0===o)return e&&ht(e,t,-1);if(e){et(e);return st(e)&&(o+=ct(e,["padding","border"],n)),gt(e,t,o)}}}));var vt=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(n,!0).forEach((function(e){G(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({getWindow:function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},offset:function(t,e){if(void 0===e)return tt(t);!function(t,e){"static"===gt(t,"position")&&(t.style.position="relative");var n,o,r=tt(t),i={};for(o in e)e.hasOwnProperty(o)&&(n=parseFloat(gt(t,o))||0,i[o]=n+e[o]-r[o]);gt(t,i)}(t,e)},isWindow:ut,each:it,css:gt,clone:function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);if(t.overflow)for(var o in t)t.hasOwnProperty(o)&&(e.overflow[o]=t.overflow[o]);return e},scrollLeft:function(t,e){if(ut(t)){if(void 0===e)return J(t);window.scrollTo(e,Z(t))}else{if(void 0===e)return t.scrollLeft;t.scrollLeft=e}},scrollTop:function(t,e){if(ut(t)){if(void 0===e)return Z(t);window.scrollTo(J(t),e)}else{if(void 0===e)return t.scrollTop;t.scrollTop=e}},viewportWidth:0,viewportHeight:0},pt);var bt=function(t,e,n){n=n||{},9===e.nodeType&&(e=vt.getWindow(e));var o=n.allowHorizontalScroll,r=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,l=n.offsetLeft||0,c=n.offsetBottom||0,u=n.offsetRight||0;o=void 0===o||o;var p,f,d,h,g,v,b,y,m,w,k=vt.isWindow(e),O=vt.offset(t),S=vt.outerHeight(t),j=vt.outerWidth(t);k?(b=e,w=vt.height(b),m=vt.width(b),y={left:vt.scrollLeft(b),top:vt.scrollTop(b)},g={left:O.left-y.left-l,top:O.top-y.top-a},v={left:O.left+j-(y.left+m)+u,top:O.top+S-(y.top+w)+c},h=y):(p=vt.offset(e),f=e.clientHeight,d=e.clientWidth,h={left:e.scrollLeft,top:e.scrollTop},g={left:O.left-(p.left+(parseFloat(vt.css(e,"borderLeftWidth"))||0))-l,top:O.top-(p.top+(parseFloat(vt.css(e,"borderTopWidth"))||0))-a},v={left:O.left+j-(p.left+d+(parseFloat(vt.css(e,"borderRightWidth"))||0))+u,top:O.top+S-(p.top+f+(parseFloat(vt.css(e,"borderBottomWidth"))||0))+c}),g.top<0||v.top>0?!0===i?vt.scrollTop(e,h.top+g.top):!1===i?vt.scrollTop(e,h.top+v.top):g.top<0?vt.scrollTop(e,h.top+g.top):vt.scrollTop(e,h.top+v.top):r||((i=void 0===i||!!i)?vt.scrollTop(e,h.top+g.top):vt.scrollTop(e,h.top+v.top)),o&&(g.left<0||v.left>0?!0===s?vt.scrollLeft(e,h.left+g.left):!1===s?vt.scrollLeft(e,h.left+v.left):g.left<0?vt.scrollLeft(e,h.left+g.left):vt.scrollLeft(e,h.left+v.left):r||((s=void 0===s||!!s)?vt.scrollLeft(e,h.left+g.left):vt.scrollLeft(e,h.left+v.left)))};function yt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var mt=wp.i18n,wt=mt.__,kt=mt.sprintf,Ot=mt._n,St=wp.element,jt=St.Component,Lt=St.createRef,Rt=wp.htmlEntities.decodeEntities,Et=wp.keycodes,Ct=Et.UP,Pt=Et.DOWN,xt=Et.ENTER,Nt=Et.TAB,_t=wp.components,Ft=_t.Spinner,Tt=_t.withSpokenMessages,Dt=_t.Popover,At=wp.compose.withInstanceId,Wt=wp.apiFetch,It=wp.url.addQueryArgs,Vt=function(t){return t.stopPropagation()},Mt=Tt(At(function(t){h()(o,t);var e,n=(e=o,function(){var t,n=y()(e);if(yt()){var o=y()(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return v()(this,t)});function o(t){var e,r=t.autocompleteRef;return l()(this,o),(e=n.apply(this,arguments)).onChange=e.onChange.bind(f()(e)),e.onKeyDown=e.onKeyDown.bind(f()(e)),e.autocompleteRef=r||Lt(),e.inputRef=Lt(),e.updateSuggestions=Object(w.throttle)(e.updateSuggestions.bind(f()(e)),200),e.suggestionNodes=[],e.state={posts:[],showSuggestions:!1,selectedSuggestion:null},e}return u()(o,[{key:"componentDidUpdate",value:function(){var t=this,e=this.state,n=e.showSuggestions,o=e.selectedSuggestion;n&&null!==o&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,bt(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),setTimeout((function(){t.scrollingIntoView=!1}),100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(t){var e=this;return function(n){e.suggestionNodes[t]=n}}},{key:"updateSuggestions",value:function(t){var e=this;if(t.length<2||/^https?:/.test(t))this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});else{this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0});var n=Wt({path:It("/wp/v2/search",{search:t,per_page:20,type:"post"})});n.then((function(t){e.suggestionsRequest===n&&(e.setState({posts:t,loading:!1}),t.length?e.props.debouncedSpeak(kt(Ot("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(wt("No results.","all-in-one-seo-pack"),"assertive"))})).catch((function(){e.suggestionsRequest===n&&e.setState({loading:!1})})),this.suggestionsRequest=n}}},{key:"onChange",value:function(t){var e=t.target.value;this.props.onChange(e),this.updateSuggestions(e)}},{key:"onKeyDown",value:function(t){var e=this.state,n=e.showSuggestions,o=e.selectedSuggestion,r=e.posts,i=e.loading;if(n&&r.length&&!i){var s=this.state.posts[this.state.selectedSuggestion];switch(t.keyCode){case Ct:t.stopPropagation(),t.preventDefault();var a=o?o-1:r.length-1;this.setState({selectedSuggestion:a});break;case Pt:t.stopPropagation(),t.preventDefault();var l=null===o||o===r.length-1?0:o+1;this.setState({selectedSuggestion:l});break;case Nt:null!==this.state.selectedSuggestion&&(this.selectLink(s),this.props.speak(wt("Link selected.","all-in-one-seo-pack")));break;case xt:null!==this.state.selectedSuggestion&&(t.stopPropagation(),this.selectLink(s))}}else switch(t.keyCode){case Ct:0!==t.target.selectionStart&&(t.stopPropagation(),t.preventDefault(),t.target.setSelectionRange(0,0));break;case Pt:this.props.value.length!==t.target.selectionStart&&(t.stopPropagation(),t.preventDefault(),t.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(t){this.props.onChange(t.url,t),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(t){this.selectLink(t),this.inputRef.current.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.value,o=void 0===n?"":n,r=e.autoFocus,i=void 0===r||r,s=e.instanceId,a=e.className,l=this.state,c=l.showSuggestions,u=l.posts,p=l.selectedSuggestion,f=l.loading;return Object(m.createElement)("div",{className:Q()("editor-url-input block-editor-url-input",a)},Object(m.createElement)("input",{autoFocus:i,type:"text","aria-label":wt("URL","all-in-one-seo-pack"),required:!0,value:o,onChange:this.onChange,onInput:Vt,placeholder:wt("Paste URL or type to search","all-in-one-seo-pack"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":c,"aria-autocomplete":"list","aria-owns":"editor-url-input-suggestions-".concat(s),"aria-activedescendant":null!==p?"editor-url-input-suggestion-".concat(s,"-").concat(p):void 0,ref:this.inputRef}),f&&Object(m.createElement)(Ft,null),c&&!!u.length&&Object(m.createElement)(Dt,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(m.createElement)("div",{className:Q()("editor-url-input__suggestions","block-editor-url-input__suggestions","".concat(a,"__suggestions")),id:"editor-url-input-suggestions-".concat(s),ref:this.autocompleteRef,role:"listbox"},u.map((function(e,n){return Object(m.createElement)("button",{key:e.id,role:"option",tabIndex:"-1",id:"editor-url-input-suggestion-".concat(s,"-").concat(n),ref:t.bindSuggestionNode(n),className:Q()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===p}),onClick:function(){return t.handleOnClick(e)},"aria-selected":n===p},Rt(e.title)||wt("(no title)","all-in-one-seo-pack"))})))))}}]),o}(jt))),Ut=wp.i18n.__,Kt=wp.components.IconButton;function Bt(t){var e=t.autocompleteRef,n=t.className,o=t.onChangeInputValue,i=t.value,s=r()(t,["autocompleteRef","className","onChangeInputValue","value"]);return Object(m.createElement)("form",O()({className:Q()("block-editor-url-popover__link-editor",n)},s),Object(m.createElement)(Mt,{value:i,onChange:o,autocompleteRef:e}),Object(m.createElement)(Kt,{icon:"editor-break",label:Ut("Apply","all-in-one-seo-pack"),type:"submit"}))}var Ht=wp.i18n.__,zt=wp.components,qt=zt.ExternalLink,Qt=zt.IconButton,$t=wp.url,Gt=$t.safeDecodeURI,Xt=$t.filterURLForDisplay;function Yt(t){var e=t.url,n=t.urlLabel,o=t.className,r=Q()(o,"block-editor-url-popover__link-viewer-url");return e?Object(m.createElement)(qt,{className:r,href:e},n||Xt(Gt(e))):Object(m.createElement)("span",{className:r})}function Jt(t){var e=t.className,n=t.linkClassName,o=t.onEditLinkClick,i=t.url,s=t.urlLabel,a=r()(t,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(m.createElement)("div",O()({className:Q()("block-editor-url-popover__link-viewer",e)},a),Object(m.createElement)(Yt,{url:i,urlLabel:s,className:n}),o&&Object(m.createElement)(Qt,{icon:"edit",label:Ht("Edit","all-in-one-seo-pack"),onClick:o}))}function Zt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var te=wp.i18n.__,ee=wp.element,ne=ee.Component,oe=ee.createRef,re=ee.useMemo,ie=ee.Fragment,se=wp.components,ae=se.ToggleControl,le=se.withSpokenMessages,ce=wp.keycodes,ue=ce.LEFT,pe=ce.RIGHT,fe=ce.UP,de=ce.DOWN,he=ce.BACKSPACE,ge=ce.ENTER,ve=ce.ESCAPE,be=wp.dom.getRectangleFromRange,ye=wp.url.prependHTTP,me=wp.richText,we=me.create,ke=me.insert,Oe=me.isCollapsed,Se=me.applyFormat,je=me.getTextContent,Le=me.slice,Re=wp.blockEditor.URLPopover,Ee=function(t){return t.stopPropagation()};function Ce(t,e){return t.addingLink||e.editLink}var Pe=function(t){var e=t.isActive,n=t.addingLink,o=t.value,i=t.resetOnMount,s=r()(t,["isActive","addingLink","value","resetOnMount"]),a=re((function(){var t=window.getSelection(),e=t.rangeCount>0?t.getRangeAt(0):null;if(e){if(n)return be(e);var o=e.startContainer;for(o=o.nextElementSibling||o;o.nodeType!==window.Node.ELEMENT_NODE;)o=o.parentNode;var r=o.closest("a");return r?r.getBoundingClientRect():void 0}}),[e,n,o.start,o.end]);return a?(i(a),Object(m.createElement)(Re,O()({anchorRect:a},s))):null},xe=le(function(t){h()(o,t);var e,n=(e=o,function(){var t,n=y()(e);if(Zt()){var o=y()(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return v()(this,t)});function o(){var t;return l()(this,o),(t=n.apply(this,arguments)).editLink=t.editLink.bind(f()(t)),t.submitLink=t.submitLink.bind(f()(t)),t.onKeyDown=t.onKeyDown.bind(f()(t)),t.onChangeInputValue=t.onChangeInputValue.bind(f()(t)),t.setLinkTarget=t.setLinkTarget.bind(f()(t)),t.setNoFollow=t.setNoFollow.bind(f()(t)),t.setSponsored=t.setSponsored.bind(f()(t)),t.setUgc=t.setUgc.bind(f()(t)),t.onFocusOutside=t.onFocusOutside.bind(f()(t)),t.resetState=t.resetState.bind(f()(t)),t.autocompleteRef=oe(),t.resetOnMount=t.resetOnMount.bind(f()(t)),t.state={opensInNewWindow:!1,noFollow:!1,sponsored:!1,ugc:!1,inputValue:"",anchorRect:!1},t}return u()(o,[{key:"onKeyDown",value:function(t){[ue,de,pe,fe,he,ge].indexOf(t.keyCode)>-1&&t.stopPropagation(),[ve].indexOf(t.keyCode)>-1&&this.resetState()}},{key:"onChangeInputValue",value:function(t){this.setState({inputValue:t})}},{key:"setLinkTarget",value:function(t){var e=this.props,n=e.activeAttributes.url,o=void 0===n?"":n,r=e.value,i=e.onChange;if(this.setState({opensInNewWindow:t}),!Ce(this.props,this.state)){var s=je(Le(r));i(Se(r,I({url:o,opensInNewWindow:t,noFollow:this.state.noFollow,sponsored:this.state.sponsored,ugc:this.state.ugc,text:s})))}}},{key:"setNoFollow",value:function(t){var e=this.props,n=e.activeAttributes.url,o=void 0===n?"":n,r=e.value,i=e.onChange;if(this.setState({noFollow:t}),!Ce(this.props,this.state)){var s=je(Le(r));i(Se(r,I({url:o,opensInNewWindow:this.state.opensInNewWindow,noFollow:t,sponsored:this.state.sponsored,ugc:this.state.ugc,text:s})))}}},{key:"setSponsored",value:function(t){var e=this.props,n=e.activeAttributes.url,o=void 0===n?"":n,r=e.value,i=e.onChange;if(this.setState({sponsored:t}),!Ce(this.props,this.state)){var s=je(Le(r));i(Se(r,I({url:o,opensInNewWindow:this.state.opensInNewWindow,noFollow:this.state.noFollow,sponsored:t,ugc:this.state.ugc,text:s})))}}},{key:"setUgc",value:function(t){var e=this.props,n=e.activeAttributes.url,o=void 0===n?"":n,r=e.value,i=e.onChange;if(this.setState({ugc:t}),!Ce(this.props,this.state)){var s=je(Le(r));i(Se(r,I({url:o,opensInNewWindow:this.state.opensInNewWindow,noFollow:this.state.noFollow,sponsored:this.state.sponsored,ugc:t,text:s})))}}},{key:"editLink",value:function(t){this.setState({editLink:!0}),t.preventDefault()}},{key:"submitLink",value:function(t){var e=this.props,n=e.isActive,o=e.value,r=e.onChange,i=e.speak,s=this.state,a=s.inputValue,l=s.opensInNewWindow,c=s.noFollow,u=s.sponsored,p=s.ugc,f=ye(a),d=I({url:f,opensInNewWindow:l,noFollow:c,sponsored:u,ugc:p,text:je(Le(o))});if(t.preventDefault(),Oe(o)&&!n){var h=Se(we({text:f}),d,0,f.length);r(ke(o,h))}else r(Se(o,d));this.resetState(),W(f)?i(te(n?"Link edited.":"Link inserted.","all-in-one-seo-pack"),"assertive"):i(te("Warning: the link has been inserted but could have errors. Please test it.","all-in-one-seo-pack"),"assertive")}},{key:"onFocusOutside",value:function(){var t=this.autocompleteRef.current;t&&t.contains(event.target)||this.resetState()}},{key:"resetState",value:function(){this.props.stopAddingLink(),this.setState({editLink:!1})}},{key:"resetOnMount",value:function(t){this.state.anchorRect!==t&&this.setState({opensInNewWindow:!1,noFollow:!1,sponsored:!1,ugc:!1,anchorRect:t})}},{key:"render",value:function(){var t=this,e=this.props,n=e.isActive,o=e.activeAttributes,r=o.url,i=(o.target,o.rel,e.addingLink),s=e.value;if(!n&&!i)return null;var a=this.state,l=a.inputValue,c=a.opensInNewWindow,u=a.noFollow,p=a.sponsored,f=a.ugc,d=Ce(this.props,this.state);return Object(m.createElement)(z,{key:"".concat(s.start).concat(s.end)},Object(m.createElement)(Pe,{resetOnMount:this.resetOnMount,value:s,isActive:n,addingLink:i,onFocusOutside:this.onFocusOutside,onClose:function(){l||t.resetState()},focusOnMount:!!d&&"firstElement",renderSettings:function(){return Object(m.createElement)(ie,null,Object(m.createElement)(ae,{label:te("Open in New Tab","all-in-one-seo-pack"),checked:c,onChange:t.setLinkTarget}),Object(m.createElement)(ae,{label:te('Add "nofollow" to link',"all-in-one-seo-pack"),checked:u,onChange:t.setNoFollow}),Object(m.createElement)(ae,{label:te('Add "sponsored" to link',"all-in-one-seo-pack"),checked:p,onChange:t.setSponsored}),Object(m.createElement)(ae,{label:te('Add "ugc" to link',"all-in-one-seo-pack"),checked:f,onChange:t.setUgc}))}},d?Object(m.createElement)(Bt,{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",value:l,onChangeInputValue:this.onChangeInputValue,onKeyDown:this.onKeyDown,onKeyPress:Ee,onSubmit:this.submitLink,autocompleteRef:this.autocompleteRef}):Object(m.createElement)(Jt,{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:Ee,url:r,onEditLinkClick:this.editLink,linkClassName:W(ye(r))?void 0:"has-invalid-link"})))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeAttributes,o=n.url,r=n.target,i=n.rel,s="_blank"===r,a={};if(!Ce(t,e)&&(o!==e.inputValue&&(a.inputValue=o),s!==e.opensInNewWindow&&(a.opensInNewWindow=s),"string"==typeof i)){var l=i.split(" ").includes("nofollow"),c=i.split(" ").includes("sponsored"),u=i.split(" ").includes("ugc");l!==e.noFollow&&(a.noFollow=l),c!==e.sponsored&&(a.sponsored=c),u!==e.ugc&&(a.ugc=u)}return a}}]),o}(ne));function Ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function _e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Fe=wp.i18n.__,Te=wp.element,De=Te.Component,Ae=Te.Fragment,We=wp.data,Ie=We.select,Ve=We.withSelect,Me=(We.dispatch,wp.blockEditor),Ue=Me.BlockControls,Ke=Me.RichTextToolbarButton,Be=Me.RichTextShortcut,He=wp.richText,ze=He.getTextContent,qe=He.applyFormat,Qe=He.removeFormat,$e=He.slice,Ge=(He.getActiveFormat,wp.url.isURL),Xe=wp.components,Ye=Xe.Toolbar,Je=Xe.withSpokenMessages,Ze=wp.compose,tn=Ze.compose,en=Ze.ifCondition,nn=Fe("Add Link","all-in-one-seo-pack"),on=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i,rn=function(t){h()(o,t);var e,n=(e=o,function(){var t,n=y()(e);if(_e()){var o=y()(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return v()(this,t)});function o(){var t;return l()(this,o),(t=n.apply(this,arguments)).isEmail=t.isEmail.bind(f()(t)),t.addLink=t.addLink.bind(f()(t)),t.stopAddingLink=t.stopAddingLink.bind(f()(t)),t.onRemoveFormat=t.onRemoveFormat.bind(f()(t)),t.state={addingLink:!1},t}return u()(o,[{key:"isEmail",value:function(t){return on.test(t)}},{key:"addLink",value:function(){var t=this.props,e=t.value,n=t.onChange,o=ze($e(e));o&&Ge(o)?n(qe(e,{type:"core/link",attributes:{url:o}})):o&&this.isEmail(o)?n(qe(e,{type:"core/link",attributes:{url:"mailto:".concat(o)}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1})}},{key:"onRemoveFormat",value:function(){var t=this.props,e=t.value,n=t.onChange,o=t.speak,r=e;Object(w.map)(["core/link"],(function(t){r=Qe(r,t)})),n(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ne(Object(n),!0).forEach((function(e){s()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},r)),o(Fe("Link removed.","all-in-one-seo-pack"),"assertive")}},{key:"render",value:function(){var t=this.props,e=t.activeAttributes,n=t.onChange,o=this.props,r=o.isActive,i=o.value;return Object(m.createElement)(Ae,null,Object(m.createElement)(Ue,null,Object(m.createElement)(Ye,{className:"editorskit-components-toolbar"},Object(m.createElement)(Be,{type:"primary",character:"k",onUse:this.addLink}),Object(m.createElement)(Be,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),r&&Object(m.createElement)(Ke,{name:"link",icon:"editor-unlink",title:Fe("Unlink","all-in-one-seo-pack"),onClick:this.onRemoveFormat,isActive:r,shortcutType:"primaryShift",shortcutCharacter:"k"}),!r&&Object(m.createElement)(Ke,{name:"link",icon:"admin-links",title:nn,onClick:this.addLink,isActive:r,shortcutType:"primary",shortcutCharacter:"k"}),Object(m.createElement)(xe,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:r,activeAttributes:e,value:i,onChange:n}))))}}]),o}(De),sn=tn(Ve((function(){return{isDisabled:Ie("core/edit-post").isFeatureActive("disableEditorsKitLinkFormats")}})),en((function(t){return!t.isDisabled})),Je)(rn),an=wp.i18n.__,ln=wp.richText,cn=ln.registerFormatType,un=ln.unregisterFormatType,pn=ln.applyFormat,fn=ln.isCollapsed,dn=wp.htmlEntities.decodeEntities,hn=wp.url.isURL,gn={name:"core/link",title:an("Link","all-in-one-seo-pack"),tagName:"a",className:null,attributes:{url:"href",target:"target",rel:"rel"},__unstablePasteRule:function(t,e){var n=e.html,o=e.plainText;if(fn(t))return t;var r=(n||o).replace(/<[^>]+>/g,"").trim();return hn(r)?pn(t,{type:"core/link",attributes:{url:dn(r)}}):t},edit:sn};[gn].forEach((function(t){var e=t.name,n=r()(t,["name"]);e&&(un("core/link"),cn(e,n))}))}]);
build/aioseop-link.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'd07454773b8775efba479ccb28b9f24b');
build/aioseop-link.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
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=35)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){var r;
2
+ /*!
3
+ Copyright (c) 2017 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,n){var r=n(21);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(22);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(23),o=n(2);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(30),o=n(31),c=n(32),i=n(34);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){function n(e,t,n,r,o,c,i){try{var l=e[c](i),a=l.value}catch(e){return void n(e)}l.done?t(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function l(e){n(i,o,c,l,a,"next",e)}function a(e){n(i,o,c,l,a,"throw",e)}l(void 0)}))}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw c}}return n}}},function(e,t,n){var r=n(33);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var r=n(11),o=n.n(r),c=n(12),i=n.n(c),l=n(13),a=n.n(l),s=n(2),u=n.n(s),p=n(14),f=n.n(p),b=n(15),d=n.n(b),m=n(7),O=n.n(m),h=n(0),g=n(1),j=n(4),v=n(8),y=n(3),k=n(19),_=n(25),w=n(10),E=Object(h.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(h.createElement)(w.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"})),x=Object(h.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(h.createElement)(w.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),S=n(16),P=n.n(S),C=n(17),T=n.n(C),N=n(5),L=n(9),R=n.n(L),A=n(18),H=n.n(A),I=n(20),F=n.n(I),z=n(6),D=n.n(z),M=n(26),V=n(27),U=n(28);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G=[{id:"opensInNewTab",title:Object(g.__)("Open in new tab"),type:"ToggleControl"},{id:"nofollow",title:Object(g.__)('Add "nofollow" to link',"all-in-one-seo-pack"),type:"ToggleControl"},{id:"sponsored",title:Object(g.__)('Add "sponsored" to link',"all-in-one-seo-pack"),type:"ToggleControl"},{id:"ugc",title:Object(g.__)('Add "ugc" to link',"all-in-one-seo-pack"),type:"ToggleControl"},{id:"title",title:Object(g.__)("Add title attribute to link","all-in-one-seo-pack"),type:"TextControl"}],Q=function(e){var t=e.value,n=e.onChange,r=void 0===n?N.noop:n,o=e.settings,c=void 0===o?G:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(W({},t,P()({},e.id,n)))}},l=c.map((function(e){if("TextControl"===e.type){var n=Object(h.useState)(),o=T()(n,2),c=o[0],l=o[1];return Object(h.createElement)(j.TextControl,{"data-aioseop":"true",className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:function(e){l(e)},onBlur:function(n){r(W({},t,P()({},e.id,n.target.value)))},value:c||t[e.id]})}if("ToggleControl"===e.type)return Object(h.createElement)(j.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(h.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(h.createElement)(j.VisuallyHidden,{as:"legend"},Object(g.__)("Currently selected link settings")),l)};function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var K=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,o=$(e,["icon","size"]);return Object(h.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))},X=Object(h.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(h.createElement)(w.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),Y=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,i=e.isURL,l=void 0!==i&&i,a=e.searchTerm,s=void 0===a?"":a;return Object(h.createElement)(j.Button,R()({},t,{onClick:c,className:D()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),l&&Object(h.createElement)(K,{className:"block-editor-link-control__search-item-icon",icon:X}),Object(h.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(h.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(h.createElement)(j.TextHighlight,{text:n.title,highlight:s})),Object(h.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&(Object(y.safeDecodeURI)(n.url)||""),l&&Object(g.__)("Press ENTER to add this link"))),n.type&&Object(h.createElement)("span",{className:"block-editor-link-control__search-item-type"},n.type))},Z=Object(h.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(h.createElement)(w.Path,{d:"M16 4h2v9H7v3l-5-4 5-4v3h9V4z"})),ee=n(29),te=function(e){var t=e.value,n=e.onChange,r=e.onSelect,o=e.renderSuggestions,c=e.fetchSuggestions,i=e.showInitialSuggestions,l=e.errorMessage,a=Object(h.useState)(),s=T()(a,2),u=s[0],p=s[1];return Object(h.createElement)("form",{onSubmit:function(e){e.preventDefault(),r(u||{url:t})}},Object(h.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(h.createElement)(ee.URLInput,{className:"block-editor-link-control__search-input",value:t,onChange:function(e,t){n(e),p(t)},placeholder:Object(g.__)("Search or type url"),__experimentalRenderSuggestions:o,__experimentalFetchLinkSuggestions:c,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:i}),Object(h.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(h.createElement)(j.Button,{type:"submit",label:Object(g.__)("Submit"),icon:Z,className:"block-editor-link-control__search-submit"}))),l&&Object(h.createElement)(j.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},l))},ne=function(e){var t=e.searchTerm,n=e.onClick,r=e.itemProps,o=e.isSelected;return t?Object(h.createElement)(j.Button,R()({},r,{className:D()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:n}),Object(h.createElement)(j.Icon,{className:"block-editor-link-control__search-item-icon",icon:"insert"}),Object(h.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(h.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(h.createInterpolateElement)(Object(g.sprintf)(Object(g.__)("New page: <mark>%s</mark>"),t),{mark:Object(h.createElement)("mark",null)})))):null};function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=Object(j.createSlotFill)("BlockEditorLinkControlViewer"),ie=ce.Slot,le=ce.Fill,ae=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function se(e){var t=e.value,n=e.settings,r=e.onChange,o=void 0===r?N.noop:r,c=e.showSuggestions,i=void 0===c||c,l=e.showInitialSuggestions,a=e.forceIsEditingLink,s=e.createSuggestion,u=Object(h.useRef)(),p=Object(h.useRef)(),f=Object(h.useRef)(),b=Object(M.useInstanceId)(se),d=Object(h.useState)(t&&t.url||""),m=T()(d,2),O=m[0],v=m[1],k=Object(h.useState)(void 0!==a?a:!t||!t.url),_=T()(k,2),w=_[0],E=_[1],x=Object(h.useState)(!1),S=T()(x,2),P=S[0],C=S[1],L=Object(h.useState)(null),A=T()(L,2),I=A[0],z=A[1],B=Object(h.useRef)(!1),W=Object(V.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,G=t&&Object(y.filterURLForDisplay)(Object(y.safeDecodeURI)(t.url))||"";Object(h.useEffect)((function(){void 0!==a&&a!==w&&E(a)}),[a]),Object(h.useEffect)((function(){B.current&&f.current&&!f.current.contains(document.activeElement)&&(U.focus.focusable.find(f.current)[0]||f.current).focus();B.current=!1}),[w]),Object(h.useEffect)((function(){return function(){u.current&&u.current.cancel(),p.current&&p.current.cancel()}}),[]);var q=function(e){var t="URL",n=Object(y.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(N.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(y.prependHTTP)(e):e,type:t}])},$=function(){var e=F()(H.a.mark((function e(t,n){var r,o;return H.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([W(t,oe({},n.isInitialSuggestions?{perPage:3}:{})),q(t)]);case 2:return r=e.sent,o=!t.includes(" "),r=o&&!n.isInitialSuggestions?r[0].concat(r[1]):r[0],e.abrupt("return",K(t)?r:r.concat({title:t,url:t,type:"__CREATE__"}));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function J(){B.current=!!f.current&&f.current.contains(document.activeElement),E(!1)}function K(e){var t=Object(N.startsWith)(e,"#");return Object(y.isURL)(e)||e&&e.includes("www.")||t}var X=Object(h.useCallback)((function(e,t){return i?K(e)?q(e):$(e,t):Promise.resolve([])}),[q,W]),Z=function(){var e=F()(H.a.mark((function e(t){var n;return H.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),z(null),e.prev=2,p.current=ae(Promise.resolve(s(t))),e.next=6,p.current.promise;case 6:n=e.sent,C(!1),n?(o(n),J()):E(!0),e.next=18;break;case 11:if(e.prev=11,e.t0=e.catch(2),!e.t0||!e.t0.isCanceled){e.next=15;break}return e.abrupt("return");case 15:z(e.t0.message||Object(g.__)("An unknown error occurred during creation. Please try again.")),C(!1),E(!0);case 18:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E(!1),o(oe({},t,{},e))},re=Object(h.useMemo)((function(){return{url:t&&t.url}}),[t&&t.url]);return Object(h.createElement)("div",{tabIndex:-1,ref:f,className:"block-editor-link-control"},P&&Object(h.createElement)("div",{className:"block-editor-link-control__loading"},Object(h.createElement)(j.Spinner,null)," ",Object(g.__)("Creating"),"…"),(w||!t)&&!P&&Object(h.createElement)(te,{value:O,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";v(e)},onSelect:function(){var e=F()(H.a.mark((function e(n){return H.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("__CREATE__"!==n.type){e.next=5;break}return e.next=3,Z(O);case 3:e.next=7;break;case 5:ee(n,t),J();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),renderSuggestions:i?function(e){var n=e.suggestionsListProps,r=e.buildSuggestionItemProps,c=e.suggestions,i=e.selectedSuggestion,l=e.isLoading,a=e.isInitialSuggestions,u=D()("block-editor-link-control__search-results",{"is-loading":l}),p=["url","mailto","tel","internal"],f=1===c.length&&p.includes(c[0].type.toLowerCase()),d=s&&!f&&!a,m="block-editor-link-control-search-results-label-".concat(b),v=a?Object(g.__)("Recently updated"):Object(g.sprintf)(Object(g.__)('Search results for "%s"'),O),y=Object(h.createElement)(a?h.Fragment:j.VisuallyHidden,{},Object(h.createElement)("span",{className:"block-editor-link-control__search-results-label",id:m},v));return Object(h.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},y,Object(h.createElement)("div",R()({},n,{className:u,"aria-labelledby":m}),c.map((function(e,n){return d&&"__CREATE__"===e.type?Object(h.createElement)(ne,{searchTerm:O,onClick:F()(H.a.mark((function t(){return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Z(e.title);case 2:case"end":return t.stop()}}),t)}))),key:e.type,itemProps:r(e,n),isSelected:n===i}):"__CREATE__"===e.type?null:Object(h.createElement)(Y,{key:"".concat(e.id,"-").concat(e.type),itemProps:r(e,n),suggestion:e,index:n,onClick:function(){J(),o(oe({},t,{},e))},isSelected:n===i,isURL:p.includes(e.type.toLowerCase()),searchTerm:O})}))))}:null,fetchSuggestions:X,showInitialSuggestions:l,errorMessage:I}),t&&!w&&!P&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("div",{"aria-label":Object(g.__)("Currently selected"),"aria-selected":"true",className:D()("block-editor-link-control__search-item",{"is-current":!0})},Object(h.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(h.createElement)(j.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||G),t&&t.title&&Object(h.createElement)("span",{className:"block-editor-link-control__search-item-info"},G)),Object(h.createElement)(j.Button,{isSecondary:!0,onClick:function(){return E(!0)},className:"block-editor-link-control__search-item-action"},Object(g.__)("Edit")),Object(h.createElement)(ie,{fillProps:re}))),Object(h.createElement)(Q,{key:"aioseop-settings-drawer",value:t,settings:n,onChange:o}))}se.ViewerFill=le;var ue=se;function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=Object(j.withSpokenMessages)((function(e){var t=e.isActive,n=e.activeAttributes,r=e.addingLink,o=e.value,c=e.onChange,i=e.speak,l=e.stopAddingLink,a=Object(h.useMemo)(N.uniqueId,[r]),s=Object(h.useState)(),u=T()(s,2),p=u[0],f=u[1],b=Object(h.useMemo)((function(){var e=window.getSelection();if(e.rangeCount){var n=e.getRangeAt(0);if(r&&!t)return n;var o=n.startContainer;for(o=o.nextElementSibling||o;o.nodeType!==window.Node.ELEMENT_NODE;)o=o.parentNode;return o.closest("a")}}),[r,o.start,o.end]);n.rel&&n.rel.includes("nofollow"),n.rel&&n.rel.includes("sponsored"),n.rel&&n.rel.includes("ugc");var d=fe({url:n.url,opensInNewTab:"_blank"===n.target,nofollow:!!n.rel&&n.rel.includes("nofollow"),sponsored:!!n.rel&&n.rel.includes("sponsored"),ugc:!!n.rel&&n.rel.includes("ugc"),title:n.title},p);return Object(h.createElement)(j.Popover,{key:a,anchorRef:b,focusOnMount:!!r&&"firstElement",onClose:l,position:"bottom center"},Object(h.createElement)(ue,{value:d,onChange:function(e){e=fe({},p,{},e);var n=(d.opensInNewTab!==e.opensInNewTab||d.sponsored!==e.sponsored||d.nofollow!==e.nofollow||d.ugc!==e.ugc)&&d.url===e.url,r=n&&void 0===e.url;if(f(r?e:void 0),!r){var a=Object(y.prependHTTP)(e.url),s=function(e){var t=e.url,n=e.opensInNewWindow,r=e.nofollow,o=e.sponsored,c=e.ugc,i=e.title,l={type:"core/link",attributes:{url:t}},a=[];return n&&(l.attributes.target="_blank",a.push("noreferrer noopener")),r&&a.push("nofollow"),o&&a.push("sponsored"),c&&a.push("ugc"),a.length>0&&(l.attributes.rel=a.join(" ")),i&&(l.attributes.title=i),l}({url:a,opensInNewWindow:e.opensInNewTab,nofollow:e.nofollow,sponsored:e.sponsored,ugc:e.ugc,title:e.title});if(Object(v.isCollapsed)(o)&&!t){var u=e.title||a,b=Object(v.applyFormat)(Object(v.create)({text:u}),s,0,u.length);c(Object(v.insert)(o,b))}else c(Object(v.applyFormat)(o,s));n||l(),!function(e){if(!e)return!1;var t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){var n=Object(y.getProtocol)(t);if(!Object(y.isValidProtocol)(n))return!1;if(Object(N.startsWith)(n,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;var r=Object(y.getAuthority)(t);if(!Object(y.isValidAuthority)(r))return!1;var o=Object(y.getPath)(t);if(o&&!Object(y.isValidPath)(o))return!1;var c=Object(y.getQueryString)(t);if(c&&!Object(y.isValidQueryString)(c))return!1;var i=Object(y.getFragment)(t);if(i&&!Object(y.isValidFragment)(i))return!1}return!(Object(N.startsWith)(t,"#")&&!Object(y.isValidFragment)(t))}(a)?i(Object(g.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive"):i(t?Object(g.__)("Link edited."):Object(g.__)("Link inserted."),"assertive")}},forceIsEditingLink:r}))}));function de(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var me=Object(g.__)("Link"),Oe={name:"core/link",title:me,tagName:"a",className:null,attributes:{url:"href",target:"target",rel:"rel",title:"title"},__unstablePasteRule:function(e,t){var n=t.html,r=t.plainText;if(Object(v.isCollapsed)(e))return e;var o=(n||r).replace(/<[^>]+>/g,"").trim();return Object(y.isURL)(o)?(window.console.log("Created link:\n\n",o),Object(v.applyFormat)(e,{type:"core/link",attributes:{url:Object(_.decodeEntities)(o)}})):e},edit:Object(j.withSpokenMessages)(function(e){f()(r,e);var t,n=(t=r,function(){var e,n=O()(t);if(de()){var r=O()(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d()(this,e)});function r(){var e;return i()(this,r),e=n.apply(this,arguments),console.log(e.props),e.addLink=e.addLink.bind(u()(e)),e.stopAddingLink=e.stopAddingLink.bind(u()(e)),e.onRemoveFormat=e.onRemoveFormat.bind(u()(e)),e.state={addingLink:!1},e}return a()(r,[{key:"addLink",value:function(){var e=this.props,t=e.value,n=e.onChange,r=Object(v.getTextContent)(Object(v.slice)(t));r&&Object(y.isURL)(r)?n(Object(v.applyFormat)(t,{type:"core/link",attributes:{url:r}})):r&&Object(y.isEmail)(r)?n(Object(v.applyFormat)(t,{type:"core/link",attributes:{url:"mailto:".concat(r)}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1}),this.props.onFocus()}},{key:"onRemoveFormat",value:function(){var e=this.props,t=e.value,n=e.onChange,r=e.speak;n(Object(v.removeFormat)(t,"core/link")),r(Object(g.__)("Link removed."),"assertive")}},{key:"render",value:function(){var e=this.props,t=e.isActive,n=e.activeAttributes,r=e.value,o=e.onChange;return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(k.RichTextShortcut,{type:"primary",character:"k",onUse:this.addLink}),Object(h.createElement)(k.RichTextShortcut,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),t&&Object(h.createElement)(k.RichTextToolbarButton,{name:"link",icon:E,title:Object(g.__)("Unlink"),onClick:this.onRemoveFormat,isActive:t,shortcutType:"primaryShift",shortcutCharacter:"k"}),!t&&Object(h.createElement)(k.RichTextToolbarButton,{name:"link",icon:x,title:me,onClick:this.addLink,isActive:t,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||t)&&Object(h.createElement)(be,{key:"aioseop-inline-link-ui",addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:t,activeAttributes:n,value:r,onChange:o}))}}]),r}(h.Component))},he=wp.richText,ge=he.registerFormatType,je=he.unregisterFormatType;[Oe].forEach((function(e){var t=e.name,n=o()(e,["name"]);t&&(je("core/link"),ge(t,n))}))}]);
class-aioseop-core.php CHANGED
@@ -427,7 +427,7 @@ class AIOSEOP_Core {
427
 
428
  $file_dir = AIOSEOP_PLUGIN_DIR . 'all_in_one_seo_pack.php';
429
  register_activation_hook( $file_dir, array( 'AIOSEOP_Core', 'activate' ) );
430
- register_deactivation_hook( $file_dir, array( 'AIOSEOP_Core', 'deactivate' ) );
431
 
432
  // TODO Move AJAX to aioseop_admin class, and could be a separate function hooked onto admin_init.
433
  add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
@@ -453,9 +453,9 @@ class AIOSEOP_Core {
453
  // Low priority allows us to override implementations of other plugins.
454
  add_action( 'wp_enqueue_editor', array( 'AIOSEOP_Link_Attributes', 'enqueue_link_attributes_classic_editor' ), 999999 );
455
 
456
- add_action( 'admin_init', array( 'AIOSEOP_Link_Attributes', 'register_link_attributes_gutenberg_editor' ) );
457
-
458
- if ( version_compare( $wp_version, '5.0', '>=' ) ) {
459
  add_action( 'enqueue_block_editor_assets', array( 'AIOSEOP_Link_Attributes', 'enqueue_link_attributes_gutenberg_editor' ) );
460
  }
461
 
@@ -511,7 +511,7 @@ class AIOSEOP_Core {
511
 
512
  /**
513
  * Runs on plugin deactivation.
514
- *
515
  * @since 3.4.3
516
  */
517
  public static function deactivate() {
427
 
428
  $file_dir = AIOSEOP_PLUGIN_DIR . 'all_in_one_seo_pack.php';
429
  register_activation_hook( $file_dir, array( 'AIOSEOP_Core', 'activate' ) );
430
+ register_deactivation_hook( $file_dir, array( 'AIOSEOP_Core', 'deactivate' ) );
431
 
432
  // TODO Move AJAX to aioseop_admin class, and could be a separate function hooked onto admin_init.
433
  add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
453
  // Low priority allows us to override implementations of other plugins.
454
  add_action( 'wp_enqueue_editor', array( 'AIOSEOP_Link_Attributes', 'enqueue_link_attributes_classic_editor' ), 999999 );
455
 
456
+ include_once ABSPATH . 'wp-admin/includes/plugin.php';
457
+ if ( version_compare( $wp_version, '5.3', '>=' ) || is_plugin_active( 'gutenberg/gutenberg.php' ) ) {
458
+ add_action( 'admin_init', array( 'AIOSEOP_Link_Attributes', 'register_link_attributes_gutenberg_editor' ) );
459
  add_action( 'enqueue_block_editor_assets', array( 'AIOSEOP_Link_Attributes', 'enqueue_link_attributes_gutenberg_editor' ) );
460
  }
461
 
511
 
512
  /**
513
  * Runs on plugin deactivation.
514
+ *
515
  * @since 3.4.3
516
  */
517
  public static function deactivate() {
css/aiosp_admin.css CHANGED
@@ -206,9 +206,9 @@ label[for=aioseop_edit_profile_header] {
206
 
207
  /** Taxonomies upsell **/
208
 
209
- .aioseop-preview-wrapper{
210
- max-width:800px;
211
- margin-top:30px;
212
  }
213
 
214
  .aioseop-upsell-blurred {
@@ -230,7 +230,6 @@ label[for=aioseop_edit_profile_header] {
230
  width: 750px;
231
  box-shadow: 0 0 60px 30px rgba(0, 0, 0, 0.15);
232
  border-radius: 3px;
233
-
234
  position: absolute;
235
  margin-top: -750px;
236
  margin-left: 25px;
@@ -337,111 +336,156 @@ label[for=aioseop_edit_profile_header] {
337
  color: #0073AA !important;
338
  }
339
 
340
- #aiosp_feature_manager_default_metabox a.feature-manager-cta-button{
341
- float:right;
342
- margin: 0 10px 10px 0;
343
- background: #d54e21;
344
- border-color: #aa3e1a;
345
- -webkit-box-shadow: 0 1px 0 #aa3e1a;
346
- box-shadow: 0 1px 0 #aa3e1a;
347
- color: #fff;
348
- text-decoration: none;
349
- text-shadow: 0 -1px 1px #d54e21,1px 0 1px #d54e21,0 1px 1px #d54e21,-1px 0 1px #d54e21;
350
  }
351
 
 
352
  /* Image SEO - Media Library */
353
 
354
  .aioseop-image-attribute {
355
- height: 100px;
356
  }
357
 
358
  .aioseop-media-lib-dashicon:hover {
359
- cursor: help;
360
- color: #00a0d2;
361
  }
362
 
363
  .aioseop-media-lib-tooltip {
364
- display: inline-block;
365
- position: relative;
366
  }
367
 
368
  .aioseop-media-lib-tooltip .aioseop-media-lib-tooltip-text {
369
- visibility: hidden;
370
- position: absolute;
371
- width: 120px;
372
-
373
- border-radius: 6px;
374
- padding: 10px;
375
- z-index: 1;
376
- bottom: 125%;
377
- left: 50%;
378
- margin-left: -70px;
379
-
380
- color: #fff;
381
- background-color: rgb(95, 95, 95);
382
-
383
- text-align: center;
384
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
385
- font-size: 0.8rem;
386
- line-height: 1rem;
387
-
388
- opacity: 0;
389
- transition: opacity 0.3s;
390
  }
391
 
392
  .aioseop-media-lib-tooltip .aioseop-media-lib-tooltip-text::after {
393
- content: "";
394
- position: absolute;
395
- top: 100%;
396
- left: 50%;
397
- margin-left: -5px;
398
-
399
- border-width: 5px;
400
- border-style: solid;
401
- border-color: #555 transparent transparent transparent;
402
  }
403
 
404
  .aioseop-media-lib-tooltip:hover .aioseop-media-lib-tooltip-text {
405
- visibility: visible;
406
- opacity: 1;
407
- }
 
408
 
409
  /* QUICKEDIT */
410
 
411
  .aioseop-quickedit-pencil {
412
- margin-right: 5px;
413
- color: #72777c;
414
  }
415
 
416
  .aioseop-quickedit-pencil:hover {
417
- color: #0073aa;
418
- outline: 0;
419
  }
420
 
421
  .aioseop-quickedit-input {
422
- float:left;
423
- position:relative;
424
- margin-bottom: 10px;
425
- font-size:13px;
426
- width:100%;
427
- z-index:1;
428
  }
429
 
430
  .aioseop-quickedit-input-save {
431
- margin-right: 5px;
432
- color: rgb(22, 204, 22);
433
  }
434
 
435
  .aioseop-quickedit-input-cancel {
436
- color: red;
437
  }
438
 
439
- .aioseop-quickedit-pencil:focus, .aioseop-quickedit-input-save:focus, .aioseop-quickedit-input-cancel:focus {
440
- box-shadow: none;
 
 
441
  }
442
 
443
  .aioseop-quickedit-spinner {
444
- float:left;
445
- width:20px;
446
- margin-right:5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
  /** Taxonomies upsell **/
208
 
209
+ .aioseop-preview-wrapper {
210
+ max-width: 800px;
211
+ margin-top: 30px;
212
  }
213
 
214
  .aioseop-upsell-blurred {
230
  width: 750px;
231
  box-shadow: 0 0 60px 30px rgba(0, 0, 0, 0.15);
232
  border-radius: 3px;
 
233
  position: absolute;
234
  margin-top: -750px;
235
  margin-left: 25px;
336
  color: #0073AA !important;
337
  }
338
 
339
+ #aiosp_feature_manager_default_metabox a.feature-manager-cta-button {
340
+ float: right;
341
+ margin: 0 10px 10px 0;
342
+ background: #d54e21;
343
+ border-color: #aa3e1a;
344
+ -webkit-box-shadow: 0 1px 0 #aa3e1a;
345
+ box-shadow: 0 1px 0 #aa3e1a;
346
+ color: #fff;
347
+ text-decoration: none;
348
+ text-shadow: 0 -1px 1px #d54e21, 1px 0 1px #d54e21, 0 1px 1px #d54e21, -1px 0 1px #d54e21;
349
  }
350
 
351
+
352
  /* Image SEO - Media Library */
353
 
354
  .aioseop-image-attribute {
355
+ height: 100px;
356
  }
357
 
358
  .aioseop-media-lib-dashicon:hover {
359
+ cursor: help;
360
+ color: #00a0d2;
361
  }
362
 
363
  .aioseop-media-lib-tooltip {
364
+ display: inline-block;
365
+ position: relative;
366
  }
367
 
368
  .aioseop-media-lib-tooltip .aioseop-media-lib-tooltip-text {
369
+ visibility: hidden;
370
+ position: absolute;
371
+ width: 120px;
372
+ border-radius: 6px;
373
+ padding: 10px;
374
+ z-index: 1;
375
+ bottom: 125%;
376
+ left: 50%;
377
+ margin-left: -70px;
378
+ color: #fff;
379
+ background-color: rgb(95, 95, 95);
380
+ text-align: center;
381
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
382
+ font-size: 0.8rem;
383
+ line-height: 1rem;
384
+ opacity: 0;
385
+ transition: opacity 0.3s;
 
 
 
 
386
  }
387
 
388
  .aioseop-media-lib-tooltip .aioseop-media-lib-tooltip-text::after {
389
+ content: "";
390
+ position: absolute;
391
+ top: 100%;
392
+ left: 50%;
393
+ margin-left: -5px;
394
+ border-width: 5px;
395
+ border-style: solid;
396
+ border-color: #555 transparent transparent transparent;
 
397
  }
398
 
399
  .aioseop-media-lib-tooltip:hover .aioseop-media-lib-tooltip-text {
400
+ visibility: visible;
401
+ opacity: 1;
402
+ }
403
+
404
 
405
  /* QUICKEDIT */
406
 
407
  .aioseop-quickedit-pencil {
408
+ margin-right: 5px;
409
+ color: #72777c;
410
  }
411
 
412
  .aioseop-quickedit-pencil:hover {
413
+ color: #0073aa;
414
+ outline: 0;
415
  }
416
 
417
  .aioseop-quickedit-input {
418
+ float: left;
419
+ position: relative;
420
+ margin-bottom: 10px;
421
+ font-size: 13px;
422
+ width: 100%;
423
+ z-index: 1;
424
  }
425
 
426
  .aioseop-quickedit-input-save {
427
+ margin-right: 5px;
428
+ color: rgb(22, 204, 22);
429
  }
430
 
431
  .aioseop-quickedit-input-cancel {
432
+ color: red;
433
  }
434
 
435
+ .aioseop-quickedit-pencil:focus,
436
+ .aioseop-quickedit-input-save:focus,
437
+ .aioseop-quickedit-input-cancel:focus {
438
+ box-shadow: none;
439
  }
440
 
441
  .aioseop-quickedit-spinner {
442
+ float: left;
443
+ width: 20px;
444
+ margin-right: 5px;
445
+ }
446
+
447
+ #aiosp_sitemap_link_wrapper,
448
+ #aiosp_video_sitemap_link_wrapper {
449
+ margin-left: 10px;
450
+ }
451
+
452
+ #aiosp_sitemap_link_wrapper p:first-of-type,
453
+ #aiosp_video_sitemap_link_wrapper p:first-of-type {
454
+ margin-top: 0px;
455
+ }
456
+
457
+ #aiosp_sitemap_link_wrapper ul,
458
+ #aiosp_video_sitemap_link_wrapper ul {
459
+ margin-left: 40px;
460
+ list-style: disc;
461
+ }
462
+
463
+ #aiosp_sitemap_link_wrapper ul li a,
464
+ #aiosp_video_sitemap_link_wrapper ul li a {
465
+ text-decoration: none;
466
+ }
467
+
468
+ .aioseop-msg-small {
469
+ font-size: 0.8rem;
470
+ }
471
+
472
+ #aiosp_sitemap_status_metabox .aioseop-news-sitemap-upsell {
473
+ margin: 10px 0;
474
+ }
475
+
476
+ .aioseop-news-sitemap-upsell a {
477
+ font-weight: bold;
478
  }
479
+
480
+
481
+ /* Fixes the default CSS for the Classic Editor link modal. */
482
+
483
+ #wp-link-wrap {
484
+ height: 530px !important;
485
+ margin-top: -265px !important;
486
+ }
487
+
488
+ #search-results,
489
+ #most-recent-results {
490
+ margin-top: 55px !important;
491
+ }
css/modules/aioseop_module-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- *{direction:rtl!important}.form-table.aioseop{clear:none}.form-table.aioseop th{padding:10px 9px 12px 0;direction:rtl}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:right;float:right}.aioseop_help_text_link span{left:-60px}.aioseop_meta_box_help>label{margin-left:0;margin-right:8px}.aioseop_help_text_link img{float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:left;padding-left:0;margin-right:0}.aioseop_label{float:right;padding-left:0;padding-right:0;text-align:right;direction:rtl}.aioseop_help_text_div{text-align:right;margin:8px 0 10px 0}.aioseop_help_text{float:right;clear:right}.aioseop_head_nav{float:right}.aioseop_head_nav_tab{margin:0 15px 0 0;float:right}.aioseop_head_nav_tab:first-child{margin-right:0}.aioseop_header{float:right;clear:right}.aioseop_nopad{padding-right:0}.aioseop_adverts{float:left}.aioseop_content{clear:right}#aiosp_feature_manager_metabox.postbox{float:right}.aioseop_sidebar{margin-left:0;margin-right:10px}.aioseop_option_label{float:right!important;clear:right!important}.aioseop_settings_left{float:right}.aioseop_option_input{float:left;padding-left:0;padding-right:1px;margin-bottom:20px;width:60%;min-width:160px}.aioseop_top{margin:10px 0 0 10px}.aioseop_right_sidebar{float:left}div.aioseop_feature{float:right}.aioseop_feature #free-flag{float:left;margin-right:0;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px;position:relative}.aioseop_feature #free-flag:after,.aioseop_feature #free-flag:before{display:none}.aioseop_feature .feature_button{float:left;margin-right:0;margin-left:10px}.aioseop_follow_button{margin-right:0;margin-left:5px}.aioseop_wrapper{padding-left:0;padding-right:5px;direction:rtl}.aioseop_input{clear:left}#aiosp div.preview_snippet{padding:15px 7px 20px 15px}#aiosp_sitemap_addl_pages,#aiosp_video_sitemap_addl_pages{clear:right;margin-left:0;margin-right:20px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{border-left:0 solid #dfdfdf;border-right:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{border-right:0 solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:0 solid #dfdfdf;border-left:1px solid #dfdfdf}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{padding-left:0;padding-right:5%}.aioseop_settings_left .postbox{float:right}.aioseop_option_setting_label{padding-left:0;padding-right:1px}.aioseop_settings_left .postbox .inside{clear:left}.postbox h2 .Taha{float:left!important}.postbox-container div#aiosp_upgrade_wrapper{float:right}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:right;margin:0 13px 0 23px}.aioseop_module.error.below-h2{margin:0 0 15px 477px!important}.robots img{margin:0 2px 0 0}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{margin-top:10px}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;left:10px;text-align:left}.aioseop_help_text ul{margin:15px 20px 0 0}.aioseop_header_tabs li a.aioseop_header_tab{margin:5px 0 0 5px}.aioseop_header_tabs li:first-child a.aioseop_header_tab{border-left:solid 0 #ccc;border-right:solid 1px #ccc;margin-left:0;margin-right:5px}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:0;padding-left:477px}#aiosp_settings_form ul.sfwd_debug_settings li strong{float:right;text-align:left;margin-right:0;margin-left:8px;padding-right:0;padding-left:8px}#aiosp_settings_form ul.sfwd_debug_settings li{clear:right}.aioseop_advert{direction:rtl;float:right;z-index:999999}.aioseop_advert form input{float:left}.MRL{margin-left:0!important;margin-right:20px!important}.aioseop_upload_image_label{clear:right!important;float:none!important}.aioseop_upload_image_button{float:right!important;margin-bottom:5px!important}#aioseop-about .aioseop_metabox_text ul{padding-right:15px}.aioseop input[readonly]{text-align:center}.aioseop_input input[type=checkbox]:before{margin:-4px -4px 0 0}.aioseop_header_tabs li:first-child a.aioseop_header_tab{border:none}.aioseop_feature h3{text-align:left}.aioseop_feature .flag:before{border-width:13.5px 4px 15px 10px}#aioseop_coming_soon,#aioseop_coming_soon2 b{text-align:center}.aioseop_feature p.aioseop_desc{text-align:right}#aioseop_coming_soon .flag.pro{height:17.5px;font-size:13.5px}#aiosp_robots_default_metabox table.aioseop_table{margin:5px 10px 10px 0}textarea.robots-text{margin:0 10px 0 10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin:30px 0 0 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2190 ';padding-right:2px}
 
css/modules/aioseop_module.min.css DELETED
@@ -1 +0,0 @@
1
- .all-in-one-seo_page_aiosp_opengraph #wpbody-content,[class*=all-in-one-seo-pack] #wpbody-content{min-width:900px}.form-table.aioseop{clear:none}.form-table.aioseop td{vertical-align:top;padding:16px 0 10px 0;line-height:20px;font-size:12px}.form-table.aioseop th{width:200px;padding:10px 0 12px 9px}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:left;float:left;max-width:30px;min-width:20px;padding-top:2px;outline:0;color:#888;font-family:sans-serif;line-height:1.4em}.aioseop_help_text_link span{font-size:14px}.aioseop_help_text_link:before{content:"\f223";font-size:22px;font-family:dashicons;vertical-align:middle;margin-right:4px}#aioseop-support .aioseop_metabox_text,#aioseop-support a{font-size:14px;color:#000;text-decoration:none}.aioseop_meta_box_help>label{position:absolute;margin-left:8px}.aioseop_help_text_link img{width:40px;float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:right;text-align:right;min-width:56px;max-width:90px;text-decoration:none;height:15px;padding-top:1px;position:relative}.aioseop_meta_box_help span{vertical-align:middle}.aioseop_tabs .aioseop_meta_box_help,.aioseop_tabs .aioseop_meta_box_help:active{margin-top:10px}.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help,.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help:active{margin-bottom:20px}.aioseop_label{color:#5f5f5f;font-weight:600;line-height:19px;display:inline-block;float:left;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:2px 0;width:81%;min-width:120px;max-width:250px;cursor:default;font-size:13.5px}.aioseop_option_div{max-height:360px;min-height:37px;width:95%;overflow-y:auto}.aioseop_overflowed{border:1px solid #e1e1e1}.aioseop input[type=text],.aioseop input[type=url]{color:#515151;min-height:35px;padding:10px;font-size:14px;width:95%;max-width:600px}.aioseop textarea{color:#515151;padding:10px;margin:1px;font-size:14px;line-height:25px;width:95%;max-width:600px;min-height:36px}.aioseop input,.aioseop textarea{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop input:focus,.aioseop textarea:focus{box-shadow:0 0 0 1px #007cba}.aioseop textarea::-webkit-scrollbar{width:12px}.aioseop textarea::-webkit-scrollbar-track{background:#f1f1f1}.aioseop textarea::-webkit-scrollbar-thumb{background:#aeaeae}.aioseop textarea::-webkit-scrollbar-thumb:hover{background:#888}.aioseop_help_text_div{text-align:left;width:100%;margin:0}.aioseop_help_text{font-size:12px;float:left;clear:left;color:#797979;line-height:15px;font-style:italic}.aioseop_head_tagline{color:#5f5f5f;font-size:13px}.aioseop_head_nav{float:left;font-size:18px;margin:0 0 16px 0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;background-color:#fff;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;color:#000;font-weight:700;text-shadow:#fff 0 1px 0;text-decoration:none}.aioseop_head_nav_tab.aioseop_head_nav_active{opacity:1;margin-bottom:-1px;border-width:1px}.aioseop_head_nav_tab:first-child{margin-left:0}.aioseop_head_nav_tab:hover{opacity:1}.aioseop_header{float:left;clear:left}.aioseop_advert{padding:10px;margin-bottom:30px;border:1px solid #ddd;height:200px;width:423px}.aioseop_nopad{padding-left:0;padding-top:0}.aioseop_nopad_all{padding:0;height:220px;width:445px;margin-bottom:20px;border:none}.aioseop_adverts{float:right}.wincherad{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;margin-bottom:0;border:none}#wincher21{background-image:url(../../modules/images/banner21.jpg)}#wincher22{background-image:url(../../modules/images/banner22.jpg)}.aioseop_content{min-width:760px;clear:left}.aioseop_options_wrapper .hndle{font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:400;min-height:18px;padding:7px 10px;margin:0;line-height:1}.aioseop_options_wrapper .submit input.button-primary{margin-bottom:5px}#aiosp_feature_manager_metabox.postbox{margin-top:20px;float:left}.aioseop_advert p{margin:25px 0 25px 0}.aioseop_options_wrapper .postarea{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.aioseop_advert h3{padding:0;margin-top:6px}.aioseop_metabox_text p{margin:0;width:101%}.aioseop_sidebar{width:457px;margin-left:10px}.aioseop_metabox_text{margin-bottom:0}.aioseop_metabox_wrapper{padding:0}.aioseop_metabox_text :last-child{margin:0}.aioseop_metabox_feature{margin-top:20px}.aioseop_translations{margin-top:15px}.aioseop_option_label{float:left;margin:0;padding-top:3px;padding-bottom:3px;width:37%;min-width:150px;max-width:360px;min-height:30px}.aioseop_metabox_text h2{font-size:30px;padding:0;font-weight:700;line-height:29px}#aioseop-about{width:443px;margin-bottom:20px}#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2{font-size:13px}.aioseop_sidebar #mc-embedded-subscribe-form{margin:0 0 10px 0;background:#fff;padding:10px 10px;border:1px solid #ddd}#aioseop-about .aioseop_metabox_text ul{list-style-type:disc;padding-left:15px}.aioseop input[readonly]{background-color:#eee;margin:5px 1px 5px 1px!important}.aioseop_settings_left{float:left;padding:0;margin:0;width:100%}body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}#aioseop_top_button{margin-top:5px;height:30px}#aioseop-list #mce-EMAIL{margin-top:5px;width:250px}.aioseop_top{margin:10px 10px 0 0}.aioseop_top #aioseop-list{margin-bottom:0}.aioseop_top #aioseop-list.postbox.closed{overflow:hidden}.aioseop_right_sidebar{float:right;margin-top:55px}#aiosp_settings_form .button-primary.hidden{display:none}form#edittag div#aiosp_menulabel_wrapper,form#edittag div#aiosp_sitemap_exclude_wrapper,form#edittag div#aiosp_titleatr_wrapper{display:none}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>#aioseop_top_button{height:5px;position:absolute;top:0;width:97%}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>.aioseop_settings_left{margin-top:10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin-top:30px}div#aiosp_feature_manager_metabox .inside{padding:8px}div.aioseop_feature{position:relative;display:inline-block;float:left;vertical-align:top;width:240px;height:288px;margin:8px;border:1px solid #dedede;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#fff;padding:10px 0;-webkit-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-webkit-transition-duration:.4s;-moz-transition-duration:.4s}.aioseop_feature .flag{float:right;margin-right:-7px;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px 6px 5px;position:relative}.aioseop_feature .flag:before{border-color:#d23d46 #d23d46 #d23d46 transparent;border-style:solid;border-width:14px 4px 15px 10px;content:"";left:-14px;position:absolute;top:0}.aioseop_feature .flag:after{border-color:#892026 transparent transparent;border-style:solid;border-width:6px 6px 6px 0;bottom:-12px;content:"";position:absolute;right:0}.aioseop_feature .flag.pro{display:none}#aioseop_coming_soon .free.flag,.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag{display:none}#aioseop_coming_soon .flag.pro{display:block;margin-top:-30px}.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro{display:none}.aioseop_feature h3{font-size:17px;margin:0;padding:0 10px 5px 10px;font-weight:400;font-style:normal;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.aioseop_feature p{line-height:150%;font-size:12px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin-bottom:20px;color:#666;padding:0 10px}.aioseop_feature p.aioseop_desc{min-height:80px}.aioseop_feature .feature_button{float:right;display:inline-block;position:relative;margin:0 10px 10px 0;min-width:80px;text-align:center}.aioseop_feature .feature_button:before{content:"Activate"}.aioseop_feature .active.feature_button:before{content:"Deactivate"}div.aioseop_feature .aioseop_featured_image{min-height:100px;background-repeat:no-repeat;display:block;margin:0 auto;width:133px}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Standard.png)}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}.All_in_One_SEO_Pack_Sitemap>form>.wrap>.form-table,.All_in_One_SEO_Pack_Video_Sitemap>form>.wrap>.form-table{max-width:500px;clear:none}.aioseop_follow_button{min-height:50px;background-repeat:no-repeat;display:inline-block;width:100px;background-size:auto 50px!important;margin-right:0}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-standard.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-standard.png)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5),only screen and (min-resolution:1.5dppx){div.aioseop_feature .aioseop_featured_image{background-size:auto 100px!important}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Retina.png)}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Retina.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-retina.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-retina.png)}}.aioseop_options{width:100%;margin:18px 0 10px 0}.aioseop_wrapper{width:100%;padding-left:5px}.aioseop_input{clear:left;width:98%;padding:5px 1%;display:inline-block}.aioseop_option_input{float:left;width:61%;margin:0;padding-left:1px;min-width:160px}#aiosp_sitemap_addl_pages_metabox .aioseop_options,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options{width:97%;margin:5px}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper{display:block;width:100%;float:none;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input{display:block;width:100%}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper{padding:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label{width:70%;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label{height:30px!important}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date{height:36px}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type{margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary{margin-left:0!important}#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div{position:absolute;width:auto;margin:5px 0 10px 0}#aiosp_sitemap_addl_pages_metabox table.aioseop_table,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 5px 10px}.selectize-control.aioseop-exclude-terms{position:static;width:95%;max-width:600px}.selectize-input{padding:10px 0 10px 10px!important;border:1px solid #8d96a0!important}table.aioseop_table tr:nth-child(odd){background-color:#eee}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd){background-color:rgba(238,238,238,.5)}table.aioseop_table td{width:23%}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{width:80%;max-width:800px;display:block;border-top:1px solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{width:18%;border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info{margin-top:10px;border:1px solid #dfdfdf;width:80%;max-width:800px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th{background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);padding:5px;border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item{display:inline-block;width:30%;vertical-align:top}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even){font-weight:700}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd){width:70%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}table.aioseop_table td,table.aioseop_table th{padding:3px}.aioseop_no_label .aioseop_option_input,.aioseop_top_label .aioseop_option_input{width:100%}#aiosp_settings_form .postbox{margin:20px 0 0 0}.aioseop_settings_left .postbox{float:left;width:100%}.aioseop_option_setting_label{min-height:35px;display:inline-block;white-space:nowrap;overflow:hidden;padding-left:1px;max-width:229px;min-width:160px;width:33%}.aioseop_settings_left .postbox .inside{padding:0;margin:0;clear:right}#aiosp_robots_rules{clear:left;margin-left:20px;max-width:1072px}#aiosp_robots_default_metabox .aioseop_wrapper{width:31%;min-width:165px;display:inline-block;max-width:265px}#aiosp_robots_default_metabox .aioseop_help_text_div{position:absolute;margin:5px 0 10px 0}#aiosp_robots_default_metabox .aioseop_option_input{width:94%;min-width:94%}#aiosp_robots_default_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 0 10px 0}#aiosp_robots_default_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}#aiosp_robots_default_metabox table.aioseop_table td:first-child{white-space:nowrap}.aioseop.aioseop_options.aiosp_robots_settings h3{margin:1.5em .6em .3em}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:left;width:92%;max-width:100%}#aiosp_sitemap_status_metabox .handlediv.button-link{display:none}#aiosp_sitemap_status_metabox.closed .inside{display:block}.aioseop_top_label{width:96%;margin:0 10px}.aioseop_hidden_type{margin:0;padding:0;height:0}#aiosp_title_metabox #aiosp_force_rewrites_wrapper{display:none;height:0}.aioseop_module.error.below-h2{padding:5px 0;margin:0 477px 15px 0!important}#aioseop_opengraph_settings .inside{margin:0}#aioseop_opengraph_settings_image_wrapper img{width:auto;height:75px}#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label{max-width:160px;min-width:100px;width:30%}.aioseop_input input[type=checkbox],.aioseop_input input[type=radio]{border:1.25px solid #6c7781;vertical-align:text-bottom;margin-top:8px}.aioseop_input input[type=checkbox]:before{margin:-3px 0 0 -5px;color:#fff}.aioseop_input input[type=radio]{border-radius:8px}.aioseop_input input[type=radio]:before{content:none!important}.aioseop_input input[type=checkbox]:checked,.aioseop_input input[type=radio]:checked{background:#11a0d2}#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div{max-height:initial}#aiosp{width:auto}.aioseop_input.aioseop_top_label .aioseop_option_input{margin:0 0 10px 0}.aiosp_file_editor_settings>.aioseop_textarea_type .aioseop_option_div{max-height:none}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{max-height:none}.aioseop_option_input .widefat td{vertical-align:middle}.entry-row.robots.quirks{font-weight:700;opacity:1}.entry-row.robots{opacity:.8}.entry-row.robots.invalid{opacity:1;font-weight:700}.invalid .entry_label{font-weight:700}.aioseop .aioseop_option_input tbody{background:#fcfcfc}.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody{background:0 0}.entry-row.robots div{height:20px;vertical-align:middle;width:90%;margin:0 0 4px 0}.robots img{margin:0 0 0 2px;opacity:.6}.aioseop_option_docs{width:98%;display:none;border:1px solid #d3d3d3;margin-top:20px;padding:1%;background-color:#eee}.aioseop_option_docs h3{background:0 0}div.aioseop_notice{position:relative}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;right:10px}.aioseop_error_notice{color:red;font-weight:700}.aioseop_input select{border-radius:4px;border:1px solid #8d96a0}.aioseop_help_text ul{margin:15px 0 0 20px}.aioseop_help_text ul li{line-height:20px;margin:0}.aioseop_sidebar #side-sortables{width:98%}.aioseop_header_tabs.hide,.aioseop_tabs.hide{display:block!important}.aioseop_header_tabs li a.aioseop_header_tab{font-size:14px;line-height:37px;text-decoration:none;cursor:pointer;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none!important;padding:0 .5em!important;color:#5f5f5f;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_tab{padding:10px}.aioseop_loading{background-image:url(../../images/activity.gif);display:inline-block;width:24px;height:24px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs.ui-widget-content{background:0 0!important}.aioseop_tab.ui-widget-content{border:1px solid #aaa!important}.aioseop_tab.ui-widget-content a.aioseop_help_text_link{color:#757575!important}.aioseop_tabs.ui-widget{font-size:13px!important;border:none!important}.aioseop_tabs .ui-widget-header{border:none!important;background:0 0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.aioseop_tabs ul{margin-left:.2em!important}.aioseop_tabs .ui-tabs .ui-tabs-panel{border-width:inherit!important}.aioseop_tabs .ui-state-default,.aioseop_tabs .ui-widget-content .ui-state-default,.aioseop_tabs .ui-widget-header .ui-state-default{background-image:none!important}.aioseop_tabs .ui-state-active a{font-weight:700!important}.aiosp_delete{background-image:url(../../images/delete.png);display:inline-block;width:16px;height:16px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:477px}.aioseop_tabs_div{margin-top:10px}#aiosp_settings_form ul.sfwd_debug_settings li strong{display:block;float:left;text-align:right;background-color:#ddd;margin-right:8px;padding:1px 8px 1px 1px;overflow:auto;width:200px;min-height:16px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong{background-color:#ccc}#aiosp_settings_form ul.sfwd_debug_settings li{clear:left;margin:0;padding:0;background-color:#eee;overflow:auto;max-width:75%;min-width:800px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n){background-color:#ddd}div.sfwd_debug_mail_sent{background-color:#080;border:1px solid #0a0;margin:10px 0 10px 0;width:598px;color:#fff;text-align:center}div.sfwd_debug_error{background-color:red;color:#fff;border:1px solid #a00;margin:10px 0 10px 0;width:598px;text-align:center;font-weight:bolder}#aiosp_performance_status_wrapper .aioseop_option_div{max-height:420px}#aioseop_coming_soon,#aioseop_coming_soon2{padding-top:40px;text-align:center;height:258px;font-size:16px}.MRL{margin-left:20px!important;margin-bottom:10px!important}.postbox-container .aioseop_option_div{width:100%}.postbox-container .aioseop_option_div input[type=text],.postbox-container .aioseop_option_div textarea{width:99%;max-width:900px}.postbox-container .aioseop_option_label{max-width:none;height:auto!important}.postbox-container .aioseop_wrapper{padding:0}.postbox-container .aioseop_input{width:100%;margin-bottom:10px;padding:0}.postbox-container .aioseop_option_input{width:63%;padding:0}.postbox-container div#aiosp_upgrade_wrapper{float:none;width:auto;margin:0;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input{display:block;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input{float:none;width:auto;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div{width:auto;min-height:0;padding:10px 0}.aioseop_tabs .aioseop_options{margin:0}#aioseop_opengraph_settings .aioseop_options{clear:both;margin-top:35px}div#aiosp_snippet_wrapper{border-radius:4px;border:1px solid #8d96a0;clear:both;padding:10px 10px 0;width:auto;margin:0 1px 15px}#aiosp_snippet_wrapper>.aioseop_input:first-child{margin-bottom:0}div#aiosp_snippet_wrapper .aioseop_option_label{height:auto!important}#aiosp_snippet_wrapper>.aioseop_input:first-child .aioseop_option_label{padding:0;min-height:inherit}div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input{margin:0;width:99%}div#aioseop_snippet{font-family:arial,sans-serif;font-size:13px}div#aioseop_snippet>h3{margin:10px 0 5px;font-size:18px;border:0;background:inherit;font-weight:400}div#aioseop_snippet>h3>a{color:#12c;text-decoration:none;cursor:pointer}div#aioseop_snippet>div{color:#545454;max-width:48em}div#aioseop_snippet>div>div{display:block;margin-bottom:1px}div#aioseop_snippet>div>div>cite{color:#00852b;font-style:normal}div#aioseop_snippet>div>span{margin:0;padding:0;border:0}.aioseop_count_chars_below_treshold{color:#515151!important;background-color:#eee!important}.aioseop_count_chars_near_treshold{color:#515151!important;background-color:#ff0!important}.aioseop_count_chars_past_treshold{color:#fff!important;background-color:red!important}textarea.robots-text{color:#000;background-color:#eee;height:100%;margin:0 0 0 10px}div#aiosp_sitemap_status_metabox .toggle-indicator{display:none}.required.email{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_options_wrapper .ui-sortable-handle span{font-size:16px;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#000}.aioseop_file_upload{border:none!important}.aioseop_upload_image_button{float:left;margin:0 0 5px 0!important}.aioseop_delete_files_button{margin:0 5px 10px 0!important}.aioseop_rename_files_button{margin:0 0 10px 0!important}.aioseop_reset_settings_button,.aioseop_update_options_button{margin:10px 0 0 0!important}#aiosp_robots_default_metabox .aioseop_option_label{margin-left:10px}#aiosp_robots_default_metabox .add-edit-rule{margin-left:5px}#aiosp_file_editor_htaccess_metabox{margin:0!important}.aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value]{background-color:#0e7bbe;background-image:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div{background-color:#fff;padding:15px;border:1px solid #8d96a0;border-radius:4px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2190 ';padding-right:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-title{clear:both;text-align:center;font-weight:700;padding:10px 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar{border:1px solid #007cba;border-collapse:collapse}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead{background-color:#f1f1f1;border-bottom:1px solid #8d96a0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td,body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead th{width:2rem;height:2rem;text-align:center}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a{text-decoration:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a:hover{border:1px solid #8d96a0;padding:5px 7px}
 
css/welcome.min.css DELETED
@@ -1 +0,0 @@
1
- h2.nav-tab-wrapper{margin:22px 0 0 0}#sections{padding:22px;background:#fff;border:1px solid #ccc;border-top:0}section{display:none}section:first-child{display:block}.no-js h2.nav-tab-wrapper{display:none}.no-js #sections{border-top:1px solid #ccc;margin-top:22px}.no-js section{border-top:1px dashed #aaa;margin-top:22px;padding-top:22px}.no-js section:first-child{margin:0;padding:0;border:0}.nav-tab-active{background-color:#fff}.welcome-panel-close{display:none}.welcome-panel-close{z-index:2}.welcome-panel{overflow-x:hidden}.welcome-panel>p{margin-left:15px}.welcome-panel-content{display:inline-block}.welcome-panel-column{width:30%!important;margin-right:3%;display:inline-block;vertical-align:top}.welcome-panel-column:last-child{margin-right:0}.welcome-panel-column p.aioseop-message{width:70%;display:inline-block;vertical-align:top}.welcome-panel-column p.call-to-action{display:inline-block;width:25%;vertical-align:top;margin-left:3%;margin-top:13px}.welcome-panel-column p.call-to-action .button-orange{background:#d54e21;border-color:#aa3e1a;-webkit-box-shadow:0 1px 0 #aa3e1a;box-shadow:0 1px 0 #aa3e1a;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #d54e21,1px 0 1px #d54e21,0 1px 1px #d54e21,-1px 0 1px #d54e21}.welcome-panel-column ul{margin-left:20px}#wp-people-group-rockstars li{margin-bottom:1.33em}#wp-people-group-rockstars li.wp-person{margin-bottom:0}@media screen and (max-width:850px){.welcome-panel-column{width:100%;margin-right:0;display:block}}
 
inc/admin/class-aioseop-education.php CHANGED
@@ -53,6 +53,10 @@ class AIOSEOP_Education {
53
 
54
  add_action( 'wp_ajax_aioseop_deactivate_conflicting_plugins', array( 'AIOSEOP_Education', 'deactivate_conflicting_plugins' ) );
55
 
 
 
 
 
56
  if ( AIOSEOPPRO ) {
57
  return;
58
  }
@@ -76,6 +80,10 @@ class AIOSEOP_Education {
76
  public static function admin_enqueue_scripts() {
77
  self::enqueue_deactivate_conflicting_plugins_script();
78
 
 
 
 
 
79
  if ( AIOSEOPPRO ) {
80
  return;
81
  }
@@ -147,6 +155,29 @@ class AIOSEOP_Education {
147
  wp_localize_script( 'aioseop-video-sitemap-upsell', 'aioseopVideoSitemapUpsellData', $ajax_data );
148
  }
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  /**
151
  * Enqueues the taxonomy upsell script.
152
  *
@@ -382,6 +413,39 @@ class AIOSEOP_Education {
382
  wp_die();
383
  }
384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  /**
386
  * Returns the taxonomies upsell markup.
387
  *
53
 
54
  add_action( 'wp_ajax_aioseop_deactivate_conflicting_plugins', array( 'AIOSEOP_Education', 'deactivate_conflicting_plugins' ) );
55
 
56
+ if ( !AIOSEOPPRO || ( AIOSEOPPRO && !aioseop_is_addon_allowed('news_sitemap') ) ) {
57
+ add_action( 'wp_ajax_aioseop_get_news_sitemap_upsell', array( 'AIOSEOP_Education', 'get_news_sitemap_upsell' ) );
58
+ }
59
+
60
  if ( AIOSEOPPRO ) {
61
  return;
62
  }
80
  public static function admin_enqueue_scripts() {
81
  self::enqueue_deactivate_conflicting_plugins_script();
82
 
83
+ if ( !AIOSEOPPRO || ( AIOSEOPPRO && !aioseop_is_addon_allowed('news_sitemap') ) ) {
84
+ self::enqueue_news_sitemap_upsell_script();
85
+ }
86
+
87
  if ( AIOSEOPPRO ) {
88
  return;
89
  }
155
  wp_localize_script( 'aioseop-video-sitemap-upsell', 'aioseopVideoSitemapUpsellData', $ajax_data );
156
  }
157
 
158
+ /**
159
+ * Enqueues the video sitemap upsell script.
160
+ *
161
+ * @since 3.4.0
162
+ */
163
+ private static function enqueue_news_sitemap_upsell_script() {
164
+ if (
165
+ 'all-in-one-seo_page_' . AIOSEOP_PLUGIN_DIRNAME . '/modules/aioseop_sitemap' !== get_current_screen()->id &&
166
+ 'all-in-one-seo_page_' . AIOSEOP_PLUGIN_DIRNAME . '/pro/class-aioseop-pro-sitemap' !== get_current_screen()->id
167
+ ) {
168
+ return;
169
+ }
170
+
171
+ wp_enqueue_script( 'aioseop-news-sitemap-upsell', AIOSEOP_PLUGIN_URL . 'js/admin/education/aioseop-news-sitemap-upsell.js', array( 'jquery' ), AIOSEOP_VERSION, false );
172
+
173
+ $ajax_data = array(
174
+ 'requestUrl' => admin_url( 'admin-ajax.php' ),
175
+ 'nonce' => wp_create_nonce( 'news-sitemap-upsell' ),
176
+ );
177
+
178
+ wp_localize_script( 'aioseop-news-sitemap-upsell', 'aioseopNewsSitemapUpsellData', $ajax_data );
179
+ }
180
+
181
  /**
182
  * Enqueues the taxonomy upsell script.
183
  *
413
  wp_die();
414
  }
415
 
416
+ /**
417
+ * Returns the news sitemap upsell markup.
418
+ *
419
+ * Acts as a callback for our "wp_ajax_aioseop_get_news_sitemap_upsell" endpoint.
420
+ *
421
+ * @since 3.4.0
422
+ */
423
+ public static function get_news_sitemap_upsell() {
424
+ if ( ! isset( $_GET ) ) {
425
+ return;
426
+ }
427
+
428
+ check_ajax_referer( 'news-sitemap-upsell', '_ajax_nonce' );
429
+
430
+ $message = __( 'Did you know that we also support Google News sitemaps?&nbsp;', 'all-in-one-seo-pack' );
431
+ $link = __( 'Upgrade to Pro to unlock this feature.', 'all-in-one-seo-pack' );
432
+ if( AIOSEOPPRO && !aioseop_is_addon_allowed('news_sitemap') ) {
433
+ $message = __( 'Did you know that Business & Agency plan users also have access to Google News sitemaps?&nbsp;', 'all-in-one-seo-pack' );
434
+ $link = __( 'Upgrade to a higher tier to unlock this feature.', 'all-in-one-seo-pack' );
435
+ }
436
+
437
+ printf(
438
+ '<p class="aioseop-news-sitemap-upsell">%1$s<br/><a href="%2$s" title="%3$s" target="_blank">%4$s</a></p>',
439
+ $message,
440
+ aioseop_get_utm_url( 'news-sitemap-upsell' ),
441
+ /* translators: %s: "All in One SEO Pack Pro" */
442
+ sprintf( __( 'Upgrade to %s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME . '&nbsp;Pro' ),
443
+ $link
444
+ );
445
+
446
+ wp_die();
447
+ }
448
+
449
  /**
450
  * Returns the taxonomies upsell markup.
451
  *
inc/admin/class-aioseop-link-attributes.php CHANGED
@@ -23,21 +23,18 @@ class AIOSEOP_Link_Attributes {
23
  * @return void
24
  */
25
  public static function enqueue_link_attributes_classic_editor() {
26
- $active_plugins = get_option('active_plugins');
27
- if ( in_array( 'title-and-nofollow-for-links/title-and-nofollow-for-links.php', $active_plugins ) ) {
28
- wp_deregister_script( 'wplink' );
29
- }
30
-
31
  wp_enqueue_script(
32
- 'aioseop-link-attributes-classic-editor',
33
- AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-link-attributes-classic-editor.js',
34
  array( 'jquery', 'wp-a11y' ),
35
  AIOSEOP_VERSION,
36
  true
37
  );
38
 
39
  wp_localize_script(
40
- 'aioseop-link-attributes-classic-editor',
41
  'aioseopL10n',
42
  array(
43
  'update' => __( 'Update', 'all-in-one-seo-pack' ),
@@ -48,6 +45,7 @@ class AIOSEOP_Link_Attributes {
48
  'linkInserted' => __( 'Link has been inserted.', 'all-in-one-seo-pack' ),
49
  'noFollow' => __( '&nbsp;Add <code>rel="nofollow"</code> to link', 'all-in-one-seo-pack' ),
50
  'sponsored' => __( '&nbsp;Add <code>rel="sponsored"</code> to link', 'all-in-one-seo-pack' ),
 
51
  )
52
  );
53
  }
@@ -62,9 +60,23 @@ class AIOSEOP_Link_Attributes {
62
  * @return void
63
  */
64
  public static function register_link_attributes_gutenberg_editor() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  wp_register_script(
66
- 'aioseop-link-attributes-gutenberg-editor',
67
- AIOSEOP_PLUGIN_URL . 'build/aioseop-link-attributes-gutenberg-editor.js',
68
  array(
69
  'wp-blocks',
70
  'wp-i18n',
@@ -92,6 +104,6 @@ class AIOSEOP_Link_Attributes {
92
  * @return void
93
  */
94
  public static function enqueue_link_attributes_gutenberg_editor() {
95
- wp_enqueue_script( 'aioseop-link-attributes-gutenberg-editor' );
96
  }
97
  }
23
  * @return void
24
  */
25
  public static function enqueue_link_attributes_classic_editor() {
26
+ wp_deregister_script( 'wplink' );
27
+
 
 
 
28
  wp_enqueue_script(
29
+ 'wplink',
30
+ AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-link.js',
31
  array( 'jquery', 'wp-a11y' ),
32
  AIOSEOP_VERSION,
33
  true
34
  );
35
 
36
  wp_localize_script(
37
+ 'wplink',
38
  'aioseopL10n',
39
  array(
40
  'update' => __( 'Update', 'all-in-one-seo-pack' ),
45
  'linkInserted' => __( 'Link has been inserted.', 'all-in-one-seo-pack' ),
46
  'noFollow' => __( '&nbsp;Add <code>rel="nofollow"</code> to link', 'all-in-one-seo-pack' ),
47
  'sponsored' => __( '&nbsp;Add <code>rel="sponsored"</code> to link', 'all-in-one-seo-pack' ),
48
+ 'ugc' => __( '&nbsp;Add <code>rel="UGC"</code> to link', 'all-in-one-seo-pack' ),
49
  )
50
  );
51
  }
60
  * @return void
61
  */
62
  public static function register_link_attributes_gutenberg_editor() {
63
+ $link_format = 'aioseop-link';
64
+ $link_format_old = 'aioseop-link-old';
65
+
66
+ if ( is_plugin_active( 'gutenberg/gutenberg.php' ) ) {
67
+ $data = get_plugin_data( ABSPATH . 'wp-content/plugins/gutenberg/gutenberg.php', false, false );
68
+ if ( version_compare( $data['Version'], '7.4.0', '<' ) ) {
69
+ $link_format = $link_format_old;
70
+ }
71
+ } else {
72
+ if ( version_compare( get_bloginfo( 'version' ), '5.4', '<' ) ) {
73
+ $link_format = $link_format_old;
74
+ }
75
+ }
76
+
77
  wp_register_script(
78
+ 'aioseop-link',
79
+ AIOSEOP_PLUGIN_URL . 'build/' . $link_format . '.js',
80
  array(
81
  'wp-blocks',
82
  'wp-i18n',
104
  * @return void
105
  */
106
  public static function enqueue_link_attributes_gutenberg_editor() {
107
+ wp_enqueue_script( 'aioseop-link' );
108
  }
109
  }
inc/admin/views/class-aioseop-about.php CHANGED
@@ -399,7 +399,7 @@ class AIOSEOP_About {
399
  'woocommerce' => esc_html__( 'WooCommerce Integration', 'all-in-one-seo-pack' ),
400
  'xml_sitemap' => esc_html__( 'XML Sitemap', 'all-in-one-seo-pack' ),
401
  'video_sitemap' => esc_html__( 'Video XML Sitemap', 'all-in-one-seo-pack' ),
402
- // 'news_sitemap' => esc_html__( 'News Sitemap', 'all-in-one-seo-pack' ),
403
  'google_tag_manager' => esc_html__( 'Google Tag Manager', 'all-in-one-seo-pack' ),
404
  'image_seo' => esc_html__( 'Image SEO', 'all-in-one-seo-pack' ),
405
  'schema' => esc_html__( 'Schema Rich Snippets', 'all-in-one-seo-pack' ),
@@ -610,7 +610,7 @@ class AIOSEOP_About {
610
  'pro' => array(
611
  'status' => 'full',
612
  'text' => array(
613
- '<strong>' . esc_html__( 'Submit Your Latest News Stories to Search Engines', 'all-in-one-seo-pack' ) . '</strong>',
614
  ),
615
  ),
616
  ),
399
  'woocommerce' => esc_html__( 'WooCommerce Integration', 'all-in-one-seo-pack' ),
400
  'xml_sitemap' => esc_html__( 'XML Sitemap', 'all-in-one-seo-pack' ),
401
  'video_sitemap' => esc_html__( 'Video XML Sitemap', 'all-in-one-seo-pack' ),
402
+ 'news_sitemap' => esc_html__( 'News Sitemap', 'all-in-one-seo-pack' ),
403
  'google_tag_manager' => esc_html__( 'Google Tag Manager', 'all-in-one-seo-pack' ),
404
  'image_seo' => esc_html__( 'Image SEO', 'all-in-one-seo-pack' ),
405
  'schema' => esc_html__( 'Schema Rich Snippets', 'all-in-one-seo-pack' ),
610
  'pro' => array(
611
  'status' => 'full',
612
  'text' => array(
613
+ '<strong>' . esc_html__( 'Submit Your Latest News Stories to Google News (Business & Agency tier only)', 'all-in-one-seo-pack' ) . '</strong>',
614
  ),
615
  ),
616
  ),
inc/aioseop_functions.php CHANGED
@@ -1519,6 +1519,32 @@ if ( ! function_exists( 'aioseop_get_utm_url' ) ) {
1519
  }
1520
  }
1521
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1522
  if ( ! function_exists( 'aioseop_get_site_logo_url' ) ) {
1523
  /**
1524
  * Returns the URL of the site logo if it exists.
@@ -1574,3 +1600,51 @@ if ( ! function_exists( 'aioseop_delete_rewrite_rules' ) ) {
1574
  update_option( 'rewrite_rules', $rules );
1575
  }
1576
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1519
  }
1520
  }
1521
 
1522
+ if ( ! function_exists('aioseop_add_url_utm') ) {
1523
+
1524
+ /**
1525
+ * Adds UTM params to URL
1526
+ *
1527
+ * @since 3.5
1528
+ *
1529
+ * @param string $href Base URL to append UTM params.
1530
+ * @param array $args UTM params to apply to $href/URL.
1531
+ * @return string Full URL with UTM params.
1532
+ */
1533
+ function aioseop_add_url_utm( $href = '', $args = array() ) {
1534
+ if ( empty( $href ) ) {
1535
+ $href = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
1536
+ }
1537
+
1538
+ $default_args = array(
1539
+ 'utm_source' => 'WordPress',
1540
+ 'utm_medium' => ( AIOSEOPPRO ) ? 'proplugin' : 'liteplugin'
1541
+ );
1542
+ $args = wp_parse_args( $args, $default_args );
1543
+
1544
+ return add_query_arg( $args, $href );
1545
+ }
1546
+ }
1547
+
1548
  if ( ! function_exists( 'aioseop_get_site_logo_url' ) ) {
1549
  /**
1550
  * Returns the URL of the site logo if it exists.
1600
  update_option( 'rewrite_rules', $rules );
1601
  }
1602
  }
1603
+
1604
+ if ( ! function_exists( 'aioseop_is_addon_allowed' ) ) {
1605
+ function aioseop_is_addon_allowed( $addonName ) {
1606
+ global $aioseop_options;
1607
+ if (
1608
+ ! AIOSEOPPRO ||
1609
+ ! isset( $aioseop_options['addons'] ) ||
1610
+ ! is_array( $aioseop_options['addons'] ) ||
1611
+ ! in_array( $addonName, $aioseop_options['addons'], true )
1612
+ ) {
1613
+ return false;
1614
+ }
1615
+ return true;
1616
+ }
1617
+ }
1618
+
1619
+ if ( ! function_exists( 'aioseop_last_modified_post' ) ) {
1620
+ /**
1621
+ * Returns the last modified post.
1622
+ *
1623
+ * This function is also useful to check if there's at least 1 published post.
1624
+ *
1625
+ * @since 3.5.0
1626
+ *
1627
+ * @param array $additionalArgs
1628
+ * @return mixed WP_Post or false.
1629
+ */
1630
+ function aioseop_last_modified_post( $additionalArgs = array() ) {
1631
+ $args = array(
1632
+ 'post_status' => 'publish',
1633
+ 'posts_per_page' => 1,
1634
+ 'orderby ' => 'modified',
1635
+ 'order' => 'DESC'
1636
+ );
1637
+
1638
+ if ( $additionalArgs ) {
1639
+ foreach ( $additionalArgs as $k => $v ) {
1640
+ $args[ $k ] = $v;
1641
+ }
1642
+ }
1643
+
1644
+ $query = ( new WP_Query( $args ) );
1645
+ if ( ! $query->post_count ) {
1646
+ return false;
1647
+ }
1648
+ return $query->posts[0];
1649
+ }
1650
+ }
inc/aioseop_updates_class.php CHANGED
@@ -152,6 +152,10 @@ class AIOSEOP_Updates {
152
  aioseop_delete_rewrite_rules();
153
  }
154
  }
 
 
 
 
155
  }
156
 
157
  /**
@@ -408,4 +412,24 @@ class AIOSEOP_Updates {
408
  $aiosp->update_class_option( $aioseop_options );
409
  }
410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  }
152
  aioseop_delete_rewrite_rules();
153
  }
154
  }
155
+
156
+ if ( version_compare( $old_version, '3.5.0', '<' ) ) {
157
+ $this->add_news_sitemap_post_types();
158
+ }
159
  }
160
 
161
  /**
412
  $aiosp->update_class_option( $aioseop_options );
413
  }
414
 
415
+ /**
416
+ * Add default news sitemap post types.
417
+ *
418
+ * @since 3.5.0
419
+ */
420
+ public function add_news_sitemap_post_types() {
421
+ global $aiosp;
422
+ global $aioseop_options;
423
+
424
+ if (
425
+ ! isset( $aioseop_options['modules']['aiosp_sitemap_options'] ) ||
426
+ isset( $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes_news'] )
427
+ ) {
428
+ return;
429
+ }
430
+
431
+ $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes_news'] = array( 'post' );
432
+ $aiosp->update_class_option( $aioseop_options );
433
+ }
434
+
435
  }
inc/aiosp_common.php CHANGED
@@ -210,9 +210,10 @@ class aiosp_common {
210
  *
211
  * Renders the value XML safe.
212
  *
213
- * @since 2.10
 
214
  */
215
- public static function make_xml_safe( $tag, $value ) {
216
  // some tags contain an array of values.
217
  if ( is_array( $value ) ) {
218
  return $value;
210
  *
211
  * Renders the value XML safe.
212
  *
213
+ * @since 2.10.0
214
+ * @since 3.4.0 Renamed function.
215
  */
216
+ public static function esc_xml( $tag, $value ) {
217
  // some tags contain an array of values.
218
  if ( is_array( $value ) ) {
219
  return $value;
inc/news-sitemap-xsl.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Styles the Google News sitemap.
4
+ *
5
+ * @since 3.4.0
6
+ */
7
+
8
+ echo '<?xml version="1.0" encoding="UTF-8"?>';
9
+
10
+ ?>
11
+ <xsl:stylesheet
12
+ version="2.0"
13
+ xmlns:html="http://www.w3.org/TR/REC-html40"
14
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
15
+ xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
16
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
17
+ >
18
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
19
+
20
+ <xsl:template match="/">
21
+ <html xmlns="http://www.w3.org/1999/xhtml">
22
+ <head>
23
+ <title><?php _e( 'Google News Sitemap', 'all-in-one-seo-pack' ); ?></title>
24
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
25
+ <style type="text/css">
26
+ body {
27
+ margin: 0;
28
+ font-family: Helvetica, Arial, sans-serif;
29
+ }
30
+ #content-head {
31
+ background-color: #4275f4;
32
+ padding: 20px 40px;
33
+ }
34
+ #content-head h1,
35
+ #content-head p,
36
+ #content-head a {
37
+ color: #fff;
38
+ font-size: 0.8rem;
39
+ }
40
+ #content-head h1 {
41
+ font-size: 1.5rem;
42
+ }
43
+ table {
44
+ margin: 20px 40px;
45
+ border: none;
46
+ border-collapse: collapse;
47
+ }
48
+ table {
49
+ font-size: 0.85rem;
50
+ width: 80%;
51
+ }
52
+ th {
53
+ border-bottom: 1px solid #ccc;
54
+ text-align: left;
55
+ padding: 15px 5px;
56
+ font-size: 0.8rem;
57
+ }
58
+ td {
59
+ padding: 10px 5px;
60
+ border-left: 3px solid #fff;
61
+ font-size: 0.7rem;
62
+ }
63
+ tr.stripe {
64
+ background-color: #f7f7f7;
65
+ }
66
+ table td a {
67
+ display: block;
68
+ text-decoration: none;
69
+ }
70
+ </style>
71
+ </head>
72
+ <body>
73
+ <div id="content">
74
+ <div id="content-head">
75
+ <xsl:variable name="amountOfURLs">
76
+ <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/>
77
+ </xsl:variable>
78
+ <h1><?php _e( 'Google News Sitemap', 'all-in-one-seo-pack' ); ?></h1>
79
+ <p>
80
+ <?php
81
+ $anchor = sprintf(
82
+ '<a href="%1$s" target="_blank">%2$s</a>',
83
+ 'https://semperplugins.com/all-in-one-seo-pack-pro-version/?utm_source=WordPress&amp;utm_campaign=aioseop-pro&amp;utm_medium=news-sitemap',
84
+ AIOSEOP_PLUGIN_NAME
85
+ );
86
+ /** translators: %s: "All in One SEO Pack Pro" */
87
+ printf( __( 'This Google News sitemap is generated by %s.', 'all-in-one-seo-pack' ), $anchor );
88
+ ?>
89
+ </p>
90
+ <p>
91
+ <?php
92
+ _e( 'It features all news articles that were published in the last 48 hours and contains', 'all-in-one-seo-pack' );
93
+ ?>
94
+ <xsl:value-of select="$amountOfURLs"/>
95
+ <xsl:choose>
96
+ <xsl:when test="$amountOfURLs = 1">
97
+ <?php echo __( 'URL', 'all-in-one-seo-pack' ); ?>
98
+ </xsl:when>
99
+ <xsl:otherwise>
100
+ <?php echo __( 'URLs', 'all-in-one-seo-pack' ); ?>
101
+ </xsl:otherwise>
102
+ </xsl:choose>
103
+ .</p>
104
+ </div>
105
+ <xsl:call-template name="sitemapTable"/>
106
+ </div>
107
+ </body>
108
+ </html>
109
+ </xsl:template>
110
+ <xsl:template name="sitemapTable">
111
+ <table cellpadding="3">
112
+ <thead>
113
+ <tr>
114
+ <th>#</th>
115
+ <th width="40%"><?php _e( 'Title', 'all-in-one-seo-pack' ); ?></th>
116
+ <th width="40%"><?php _e( 'URL', 'all-in-one-seo-pack' ); ?></th>
117
+ <th><?php _e( 'Publish Date', 'all-in-one-seo-pack' ); ?></th>
118
+ </tr>
119
+ </thead>
120
+ <tbody>
121
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
122
+ <tr>
123
+ <xsl:if test="position() mod 2 != 1">
124
+ <xsl:attribute name="class">stripe</xsl:attribute>
125
+ </xsl:if>
126
+ <td><xsl:value-of select="position()"/></td>
127
+ <td>
128
+ <xsl:value-of select="news:news/news:title"/>
129
+ </td>
130
+ <td>
131
+ <xsl:variable name="itemURL">
132
+ <xsl:value-of select="sitemap:loc"/>
133
+ </xsl:variable>
134
+ <a href="{$itemURL}">
135
+ <xsl:value-of select="sitemap:loc"/>
136
+ </a>
137
+ </td>
138
+ <td>
139
+ <xsl:value-of select="concat(substring(news:news/news:publication_date,0,11),concat(' ', substring(news:news/news:publication_date,12,8)))"/>
140
+ </td>
141
+ </tr>
142
+ </xsl:for-each>
143
+ </tbody>
144
+ </table>
145
+ </xsl:template>
146
+ </xsl:stylesheet>
147
+ <?php
inc/schema/aioseop-context.php CHANGED
@@ -114,6 +114,19 @@ class AIOSEOP_Context {
114
  $this->wp_props = $props;
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /**
118
  * Internationalize
119
  *
@@ -349,6 +362,10 @@ class AIOSEOP_Context {
349
  }
350
  }
351
  $key = $context->ID;
 
 
 
 
352
  break;
353
 
354
  case 'WP_Post_Type':
@@ -465,6 +482,7 @@ class AIOSEOP_Context {
465
  $object = false;
466
  switch ( $type ) {
467
  case 'var_site':
 
468
  case 'var_date':
469
  case 'var_date_year':
470
  case 'var_date_month':
@@ -526,6 +544,10 @@ class AIOSEOP_Context {
526
  public function get_slug() {
527
  $slug = '';
528
  $wp_obj = self::get_object( $this->context_type, $this->context_key, $this->wp_props );
 
 
 
 
529
  switch ( $this->context_type ) {
530
  case 'var_site':
531
  break;
@@ -569,6 +591,10 @@ class AIOSEOP_Context {
569
 
570
  case 'WP_Post':
571
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
 
 
 
 
572
  $display_name = $wp_obj->post_title;
573
  break;
574
 
@@ -646,6 +672,11 @@ class AIOSEOP_Context {
646
 
647
  case 'WP_Post':
648
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
 
 
 
 
 
649
 
650
  if ( 'attachment' === $wp_obj->post_type ) {
651
  // Source URL.
@@ -674,8 +705,9 @@ class AIOSEOP_Context {
674
  break;
675
 
676
  case 'WP_Term':
 
677
  $taxonomy = isset( $this->wp_props['taxonomy'] ) ? $this->wp_props['taxonomy'] : '';
678
- $url = get_term_link( $this->context_key, $taxonomy );
679
 
680
  $s_url[ $this->context_type ][ $this->context_key ] = $url;
681
  break;
@@ -688,16 +720,19 @@ class AIOSEOP_Context {
688
  break;
689
 
690
  case 'var_date_year':
691
- $url = get_year_link( false );
 
692
  break;
693
 
694
  case 'var_date_month':
695
- $url = get_month_link( false, false );
 
696
  break;
697
 
698
  case 'var_date_day':
699
  case 'var_date':
700
- $url = get_day_link( false, false, false );
 
701
  break;
702
  }
703
 
@@ -736,6 +771,10 @@ class AIOSEOP_Context {
736
 
737
  case 'WP_Post':
738
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
 
 
 
 
739
 
740
  // Using AIOSEOP's description is limited in content. With Schema's descriptions,
741
  // there is no cap limit.
@@ -814,6 +853,11 @@ class AIOSEOP_Context {
814
  switch ( $this->context_type ) {
815
  case 'WP_Post':
816
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
 
 
 
 
 
817
  if ( 'attachment' === $wp_obj->post_type ) {
818
  $images['attachments'][] = array(
819
  'id' => $wp_obj->ID,
@@ -852,7 +896,12 @@ class AIOSEOP_Context {
852
 
853
  case 'WP_Post':
854
  $object = self::get_object( $this->context_type, $this->context_key );
855
- while ( ! empty( $object->post_parent ) ) {
 
 
 
 
 
856
  array_unshift(
857
  $rtn_list,
858
  array(
@@ -861,20 +910,9 @@ class AIOSEOP_Context {
861
  )
862
  );
863
 
864
- $context = array(
865
- 'context_type' => $context->context_type,
866
- 'context_key' => $object->post_parent, // Create get_parent().
867
- );
868
- $context = self::get_instance( $context );
869
- $object = self::get_object( $context->context_type, $context->context_key );
870
- }
871
- array_unshift(
872
- $rtn_list,
873
- array(
874
- 'name' => $context->get_display_name(),
875
- 'url' => $context->get_url(),
876
- )
877
- );
878
  break;
879
 
880
  case 'WP_Post_Type':
@@ -893,7 +931,7 @@ class AIOSEOP_Context {
893
 
894
  case 'WP_Term':
895
  $object = self::get_object( $context->context_type, $context->context_key, $context->wp_props );
896
- while ( ! empty( $object->parent ) ) {
897
  array_unshift(
898
  $rtn_list,
899
  array(
@@ -902,21 +940,9 @@ class AIOSEOP_Context {
902
  )
903
  );
904
 
905
- $context = array(
906
- 'context_type' => $context->context_type,
907
- 'context_key' => $object->parent, // Create get_parent().
908
- 'wp_props' => $context->wp_props,
909
- );
910
  $context = self::get_instance( $context );
911
- $object = self::get_object( $context->context_type, $context->context_key, $context->wp_props );
912
- }
913
- array_unshift(
914
- $rtn_list,
915
- array(
916
- 'name' => $context->get_display_name(),
917
- 'url' => $context->get_url(),
918
- )
919
- );
920
  break;
921
 
922
  case 'var_date':
@@ -979,7 +1005,7 @@ class AIOSEOP_Context {
979
  }
980
  if ( empty( $title ) ) {
981
  preg_match(
982
- '/^(?:https|http)(?:\:\/\/)(?:www\.)?([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+)(?:\.[a-z]+\/|\.[a-z]+)$/',
983
  $site_context->get_url(),
984
  $matches
985
  );
114
  $this->wp_props = $props;
115
  }
116
 
117
+ /**
118
+ * Logs Error when WP_DEBUG(_LOG) is Enabled.
119
+ *
120
+ * @since 3.5.2
121
+ */
122
+ public function log_error() {
123
+ global $aioseop_options;
124
+ if ( 'on' === $aioseop_options['aiosp_do_log'] ) {
125
+ $e = new Exception;
126
+ error_log( $e->getTraceAsString() );
127
+ }
128
+ }
129
+
130
  /**
131
  * Internationalize
132
  *
362
  }
363
  }
364
  $key = $context->ID;
365
+ if ( empty( $key ) ) {
366
+ $key = get_queried_object_id();
367
+ }
368
+
369
  break;
370
 
371
  case 'WP_Post_Type':
482
  $object = false;
483
  switch ( $type ) {
484
  case 'var_site':
485
+ case 'var_search':
486
  case 'var_date':
487
  case 'var_date_year':
488
  case 'var_date_month':
544
  public function get_slug() {
545
  $slug = '';
546
  $wp_obj = self::get_object( $this->context_type, $this->context_key, $this->wp_props );
547
+ if ( ! $wp_obj ) {
548
+ $this->log_error();
549
+ return $slug;
550
+ }
551
  switch ( $this->context_type ) {
552
  case 'var_site':
553
  break;
591
 
592
  case 'WP_Post':
593
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
594
+ if ( ! $wp_obj ) {
595
+ $this->log_error();
596
+ return $display_name;
597
+ }
598
  $display_name = $wp_obj->post_title;
599
  break;
600
 
672
 
673
  case 'WP_Post':
674
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
675
+ if ( ! $wp_obj ) {
676
+ $s_url[ $this->context_type ][ $this->context_key ] = $url;
677
+ $this->log_error();
678
+ return $url;
679
+ }
680
 
681
  if ( 'attachment' === $wp_obj->post_type ) {
682
  // Source URL.
705
  break;
706
 
707
  case 'WP_Term':
708
+ $wp_obj = self::get_object( $this->context_type, $this->context_key );
709
  $taxonomy = isset( $this->wp_props['taxonomy'] ) ? $this->wp_props['taxonomy'] : '';
710
+ $url = get_term_link( $wp_obj, $taxonomy );
711
 
712
  $s_url[ $this->context_type ][ $this->context_key ] = $url;
713
  break;
720
  break;
721
 
722
  case 'var_date_year':
723
+ global $wp_query;
724
+ $url = get_year_link( $wp_query->query_vars['year'] );
725
  break;
726
 
727
  case 'var_date_month':
728
+ global $wp_query;
729
+ $url = get_month_link( $wp_query->query_vars['year'], $wp_query->query_vars['monthnum'] );
730
  break;
731
 
732
  case 'var_date_day':
733
  case 'var_date':
734
+ global $wp_query;
735
+ $url = get_day_link( $wp_query->query_vars['year'], $wp_query->query_vars['monthnum'], $wp_query->query_vars['day'] );
736
  break;
737
  }
738
 
771
 
772
  case 'WP_Post':
773
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
774
+ if ( ! $wp_obj ) {
775
+ $this->log_error();
776
+ return $desc;
777
+ }
778
 
779
  // Using AIOSEOP's description is limited in content. With Schema's descriptions,
780
  // there is no cap limit.
853
  switch ( $this->context_type ) {
854
  case 'WP_Post':
855
  $wp_obj = self::get_object( $this->context_type, $this->context_key );
856
+ if ( ! $wp_obj ) {
857
+ $this->log_error();
858
+ return $image;
859
+ }
860
+
861
  if ( 'attachment' === $wp_obj->post_type ) {
862
  $images['attachments'][] = array(
863
  'id' => $wp_obj->ID,
896
 
897
  case 'WP_Post':
898
  $object = self::get_object( $this->context_type, $this->context_key );
899
+ if ( ! $object ) {
900
+ $this->log_error();
901
+ break;
902
+ }
903
+
904
+ do {
905
  array_unshift(
906
  $rtn_list,
907
  array(
910
  )
911
  );
912
 
913
+ $object = self::get_object( $context->context_type, $object->post_parent );
914
+ $context = self::get_instance( $object );
915
+ } while ( $object );
 
 
 
 
 
 
 
 
 
 
 
916
  break;
917
 
918
  case 'WP_Post_Type':
931
 
932
  case 'WP_Term':
933
  $object = self::get_object( $context->context_type, $context->context_key, $context->wp_props );
934
+ do {
935
  array_unshift(
936
  $rtn_list,
937
  array(
940
  )
941
  );
942
 
943
+ $object = self::get_object( $context->context_type, $object->parent, $context->wp_props );
 
 
 
 
944
  $context = self::get_instance( $context );
945
+ } while ( $object );
 
 
 
 
 
 
 
 
946
  break;
947
 
948
  case 'var_date':
1005
  }
1006
  if ( empty( $title ) ) {
1007
  preg_match(
1008
+ '/^(?:https|http)(?:\:\/\/)(?:www\.)?([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+)(?:\.[a-z]+)(?:\/)?(?:[a-z]+\/?)?$/',
1009
  $site_context->get_url(),
1010
  $matches
1011
  );
inc/schema/graphs/graph-breadcrumblist.php CHANGED
@@ -47,7 +47,33 @@ class AIOSEOP_Graph_BreadcrumbList extends AIOSEOP_Graph_ItemList {
47
  * @return array
48
  */
49
  protected function prepare( $data = array() ) {
50
- $context = AIOSEOP_Context::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  $rtn_data = array(
52
  '@type' => $this->slug,
53
  '@id' => $context->get_url() . '#' . strtolower( $this->slug ),
47
  * @return array
48
  */
49
  protected function prepare( $data = array() ) {
50
+ if (
51
+ class_exists( 'BuddyPress' ) &&
52
+ 'single_page' === AIOSEOP_Context::get_is() &&
53
+ bp_is_user()
54
+ ) {
55
+ // BuddyPress - Member Page.
56
+ $wp_user = wp_get_current_user();
57
+ $context = AIOSEOP_Context::get_instance( $wp_user );
58
+ } elseif (
59
+ class_exists( 'BuddyPress' ) &&
60
+ 'single_page' === AIOSEOP_Context::get_is() &&
61
+ (
62
+ bp_is_group() ||
63
+ bp_is_group_create()
64
+ )
65
+ ) {
66
+ // BuddyPress - Member Page(s).
67
+ $bp_pages = get_option( 'bp-pages' );
68
+ $context = array(
69
+ 'context_type' => 'WP_Post',
70
+ 'context_key' => $bp_pages['groups']
71
+ );
72
+ $context = AIOSEOP_Context::get_instance( $context );
73
+ } else {
74
+ $context = AIOSEOP_Context::get_instance();
75
+ }
76
+
77
  $rtn_data = array(
78
  '@type' => $this->slug,
79
  '@id' => $context->get_url() . '#' . strtolower( $this->slug ),
inc/schema/graphs/graph-person.php CHANGED
@@ -54,7 +54,17 @@ class AIOSEOP_Graph_Person extends AIOSEOP_Graph {
54
  $author_url = '';
55
  $hashtag = 'person';
56
 
57
- if ( ! empty( $post->post_author ) ) {
 
 
 
 
 
 
 
 
 
 
58
  $user_id = intval( $post->post_author );
59
  $author_url = get_author_posts_url( $post->post_author );
60
  $hashtag = 'author';
54
  $author_url = '';
55
  $hashtag = 'person';
56
 
57
+ if (
58
+ 'single_page' === AIOSEOP_Context::get_is() &&
59
+ function_exists( 'bp_is_user' ) &&
60
+ bp_is_user()
61
+ ) {
62
+ // BuddyPress - Member Page.
63
+ $wp_user = wp_get_current_user();
64
+ $user_id = intval( $wp_user->ID );
65
+ $author_url = get_author_posts_url( $user_id );
66
+ $hashtag = 'author';
67
+ } elseif ( ! empty( $post->post_author ) ) {
68
  $user_id = intval( $post->post_author );
69
  $author_url = get_author_posts_url( $post->post_author );
70
  $hashtag = 'author';
inc/schema/graphs/graph-webpage.php CHANGED
@@ -60,6 +60,29 @@ class AIOSEOP_Graph_WebPage extends AIOSEOP_Graph_Creativework {
60
  // WooCommerce - Shop Page.
61
  $shop_page = get_post( wc_get_page_id( 'shop' ) );
62
  $context = AIOSEOP_Context::get_instance( $shop_page );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  } else {
64
  $context = AIOSEOP_Context::get_instance();
65
  }
60
  // WooCommerce - Shop Page.
61
  $shop_page = get_post( wc_get_page_id( 'shop' ) );
62
  $context = AIOSEOP_Context::get_instance( $shop_page );
63
+ } elseif (
64
+ class_exists( 'BuddyPress' ) &&
65
+ 'single_page' === AIOSEOP_Context::get_is() &&
66
+ bp_is_user()
67
+ ) {
68
+ // BuddyPress - Member Page.
69
+ $wp_user = wp_get_current_user();
70
+ $context = AIOSEOP_Context::get_instance( $wp_user );
71
+ } elseif (
72
+ class_exists( 'BuddyPress' ) &&
73
+ 'single_page' === AIOSEOP_Context::get_is() &&
74
+ (
75
+ bp_is_group() ||
76
+ bp_is_group_create()
77
+ )
78
+ ) {
79
+ // BuddyPress - Group Page(s).
80
+ $bp_pages = get_option( 'bp-pages' );
81
+ $context = array(
82
+ 'context_type' => 'WP_Post',
83
+ 'context_key' => $bp_pages['groups']
84
+ );
85
+ $context = AIOSEOP_Context::get_instance( $context );
86
  } else {
87
  $context = AIOSEOP_Context::get_instance();
88
  }
inc/schema/schema-builder.php CHANGED
@@ -113,7 +113,16 @@ class AIOSEOP_Schema_Builder {
113
  );
114
 
115
  // TODO Add layout customizations to settings.
116
- if ( is_front_page() || is_home() ) {
 
 
 
 
 
 
 
 
 
117
  array_push( $layout['@graph'], '[aioseop_schema_WebPage]' );
118
  array_push( $layout['@graph'], '[aioseop_schema_BreadcrumbList]' );
119
  } elseif ( is_archive() ) {
113
  );
114
 
115
  // TODO Add layout customizations to settings.
116
+ if (
117
+ 'single_page' === AIOSEOP_Context::get_is() &&
118
+ function_exists( 'bp_is_user' ) &&
119
+ bp_is_user()
120
+ ) {
121
+ // Correct issue with BuddyPress when viewing a member page.
122
+ array_push( $layout['@graph'], '[aioseop_schema_ProfilePage]' );
123
+ array_push( $layout['@graph'], '[aioseop_schema_Person]' );
124
+ array_push( $layout['@graph'], '[aioseop_schema_BreadcrumbList]' );
125
+ } elseif ( is_front_page() || is_home() ) {
126
  array_push( $layout['@graph'], '[aioseop_schema_WebPage]' );
127
  array_push( $layout['@graph'], '[aioseop_schema_BreadcrumbList]' );
128
  } elseif ( is_archive() ) {
js/admin/{aioseop-link-attributes-classic-editor.js → aioseop-link.js} RENAMED
@@ -35,8 +35,9 @@
35
 
36
  init: function () {
37
  // All in One SEO Pack - Begin
38
- $("#wp-link .link-target").append('<br><label style="padding-left: 4px;"><span>&nbsp;</span><input type="checkbox" id="tanfl-add-nofollow">' + aioseopL10n.noFollow + "</label>");
39
- $("#wp-link .link-target").append('<br><label style="padding-left: 4px;"><span>&nbsp;</span><input type="checkbox" id="tanfl-add-sponsored">' + aioseopL10n.sponsored + '</label><br>');
 
40
  $(".wp-link-text-field").before('<div class="link-title-field"><label><span style="padding-left: 4px;">' + aioseopL10n.labelTitle + '</span><input id="wp-link-title" type="text" name="linktitle" /></label></div>');
41
  $('<style type="text/css"> .has-text-field #wp-link .query-results { top: 256px !important; } #wp-link-wrap.search-panel-visible {height: 549px !important;}</style>').appendTo("head");
42
  // All in One SEO Pack - End
@@ -48,8 +49,9 @@
48
  inputs.close = $('#wp-link-close');
49
 
50
  // All in One SEO Pack - Begin
51
- inputs.tanfl = $('#tanfl-add-nofollow');
52
- inputs.tanfl_sponsored = $('#tanfl-add-sponsored');
 
53
  inputs.title = $('#wp-link-title');
54
  // All in One SEO Pack - End
55
 
@@ -296,6 +298,11 @@
296
  } else {
297
  inputs.tanfl_sponsored.prop('checked', false);
298
  }
 
 
 
 
 
299
  inputs.title.val(editor.dom.getAttrib(linkNode, 'title'));
300
  // All in One SEO Pack - End
301
 
@@ -358,7 +365,10 @@
358
  tanfl_value += 'nofollow ';
359
  }
360
  if (inputs.tanfl_sponsored.prop('checked')) {
361
- tanfl_value += 'sponsored';
 
 
 
362
  }
363
  // All in One SEO Pack - End
364
 
@@ -582,6 +592,7 @@
582
  inputs.openInNewTab.prop('checked', false);
583
  inputs.tanfl.prop('checked', false);
584
  inputs.tanfl_sponsored.prop('checked', false);
 
585
  // All in One SEO Pack - End
586
 
587
  // Empty the search field and swap the "rivers".
35
 
36
  init: function () {
37
  // All in One SEO Pack - Begin
38
+ $("#wp-link .link-target").append('<br><label style="padding-left: 4px;"><span>&nbsp;</span><input type="checkbox" id="aioseop-add-nofollow">' + aioseopL10n.noFollow + "</label>");
39
+ $("#wp-link .link-target").append('<br><label style="padding-left: 4px;"><span>&nbsp;</span><input type="checkbox" id="aioseop-add-sponsored">' + aioseopL10n.sponsored + '</label>');
40
+ $("#wp-link .link-target").append('<br><label style="padding-left: 4px;"><span>&nbsp;</span><input type="checkbox" id="aioseop-add-ugc">' + aioseopL10n.ugc + '</label><br>');
41
  $(".wp-link-text-field").before('<div class="link-title-field"><label><span style="padding-left: 4px;">' + aioseopL10n.labelTitle + '</span><input id="wp-link-title" type="text" name="linktitle" /></label></div>');
42
  $('<style type="text/css"> .has-text-field #wp-link .query-results { top: 256px !important; } #wp-link-wrap.search-panel-visible {height: 549px !important;}</style>').appendTo("head");
43
  // All in One SEO Pack - End
49
  inputs.close = $('#wp-link-close');
50
 
51
  // All in One SEO Pack - Begin
52
+ inputs.tanfl = $('#aioseop-add-nofollow');
53
+ inputs.tanfl_sponsored = $('#aioseop-add-sponsored');
54
+ inputs.tanfl_ugc = $('#aioseop-add-ugc');
55
  inputs.title = $('#wp-link-title');
56
  // All in One SEO Pack - End
57
 
298
  } else {
299
  inputs.tanfl_sponsored.prop('checked', false);
300
  }
301
+ if (editor.dom.getAttrib(linkNode, 'rel').indexOf("ugc") >= 0) {
302
+ inputs.tanfl_ugc.prop('checked', true);
303
+ } else {
304
+ inputs.tanfl_ugc.prop('checked', false);
305
+ }
306
  inputs.title.val(editor.dom.getAttrib(linkNode, 'title'));
307
  // All in One SEO Pack - End
308
 
365
  tanfl_value += 'nofollow ';
366
  }
367
  if (inputs.tanfl_sponsored.prop('checked')) {
368
+ tanfl_value += 'sponsored ';
369
+ }
370
+ if (inputs.tanfl_ugc.prop('checked')) {
371
+ tanfl_value += 'ugc';
372
  }
373
  // All in One SEO Pack - End
374
 
592
  inputs.openInNewTab.prop('checked', false);
593
  inputs.tanfl.prop('checked', false);
594
  inputs.tanfl_sponsored.prop('checked', false);
595
+ inputs.tanfl_ugc.prop('checked', false);
596
  // All in One SEO Pack - End
597
 
598
  // Empty the search field and swap the "rivers".
js/admin/education/aioseop-news-sitemap-upsell.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var aioseopNewsSitemapUpsell;
2
+
3
+ jQuery(function($) {
4
+
5
+ aioseopNewsSitemapUpsell = {
6
+
7
+ sitemapOverviewBox: $('#aiosp_sitemap_status_metabox .aioseop_input'),
8
+ newsSitemapSetting: $('#aiosp_sitemap_posttypes_news_wrapper .aioseop_option_input'),
9
+
10
+ init: function() {
11
+ aioseopNewsSitemapUpsell.disableCheckboxes();
12
+ aioseopNewsSitemapUpsell.getNewsSitemapUpsell();
13
+ },
14
+
15
+ disableCheckboxes: function() {
16
+ $('#aiosp_sitemap_posttypes_news_wrapper .aioseop_option_input input').attr('disabled', true);
17
+ },
18
+
19
+ getNewsSitemapUpsell: function() {
20
+ $.ajax({
21
+ type: "GET",
22
+ url: aioseopNewsSitemapUpsellData.requestUrl,
23
+ data: {
24
+ action: "aioseop_get_news_sitemap_upsell",
25
+ _ajax_nonce: aioseopNewsSitemapUpsellData.nonce
26
+ },
27
+ success: function(response) {
28
+ aioseopNewsSitemapUpsell.appendUpsell(response);
29
+ },
30
+ error: function() {
31
+ //console.log("Couldn't fetch news sitemap upsell content from our endpoint.");
32
+ }
33
+ });
34
+ },
35
+
36
+ appendUpsell: function(content) {
37
+ aioseopNewsSitemapUpsell.sitemapOverviewBox.append(document.createElement('hr'), content);
38
+ aioseopNewsSitemapUpsell.newsSitemapSetting.append(content);
39
+ }
40
+ }
41
+
42
+ aioseopNewsSitemapUpsell.init();
43
+
44
+ });
modules/aioseop_sitemap.php CHANGED
@@ -171,7 +171,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
171
  $this->comment_string = 'Sitemap %s generated by ' . AIOSEOP_PLUGIN_NAME . ' %s on %s';
172
 
173
  $this->default_options = array(
174
- 'rss_sitemap' => array( 'name' => __( 'Create RSS Sitemap', 'all-in-one-seo-pack' ) ),
175
  'daily_cron' => array(
176
  'name' => __( 'Schedule Updates', 'all-in-one-seo-pack' ),
177
  'type' => 'select',
@@ -226,13 +225,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
226
 
227
  $this->layout = array(
228
  'status' => array(
229
- 'name' => __( 'Sitemap Status', 'all-in-one-seo-pack' ),
230
- 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/',
231
  'options' => array_keys( $status_options ),
232
  ),
233
  'default' => array(
234
  'name' => $this->name,
235
- 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/',
236
  'options' => array_keys( $this->default_options ),
237
  ),
238
  );
@@ -291,7 +290,28 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
291
  }
292
  }
293
 
294
- $addl_options = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  'addl_instructions' => array(
296
  'default' => '<div>' . __( 'Enter information below for any additional links for your sitemap not already managed through WordPress.', 'all-in-one-seo-pack' ) . '</div><br />',
297
  'type' => 'html',
@@ -350,10 +370,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
350
  ),
351
  );
352
 
 
 
 
 
 
 
353
  $this->layout['addl_pages'] = array(
354
  'name' => __( 'Additional Pages', 'all-in-one-seo-pack' ),
355
  'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
356
- 'options' => array_keys( $addl_options ),
357
  );
358
 
359
  $this->layout['excl_pages'] = array(
@@ -376,7 +402,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
376
  'options' => array_keys( $freq_options ),
377
  );
378
 
379
- $this->default_options = array_merge( $status_options, $this->default_options, $addl_options, $excl_options, $prio_options, $freq_options );
380
 
381
  add_action(
382
  'after_doing_aioseop_updates',
@@ -572,12 +598,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
572
  * @see Selectize
573
  * @link https://github.com/selectize/selectize.js
574
  */
575
- wp_enqueue_script(
576
- 'aioseop-selectize',
577
- AIOSEOP_PLUGIN_URL . 'js/admin/selectize-v0.12.6/selectize.min.js',
578
- array( 'jquery' ),
579
- AIOSEOP_VERSION
580
- );
 
 
 
581
 
582
  wp_enqueue_script(
583
  'aioseop-search-terms',
@@ -734,6 +763,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
734
  $this->default_options['posttypes']['default'] = array_keys( $this->default_options['posttypes']['initial_options'] );
735
  $this->default_options['taxonomies']['default'] = array_keys( $this->default_options['taxonomies']['initial_options'] );
736
 
 
 
 
 
 
 
 
 
737
  // Unset Media as default included post type.
738
  $index = array_search( 'attachment', $this->default_options['posttypes']['default'] );
739
 
@@ -764,9 +801,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
764
  $args_terms = array(
765
  'taxonomy' => $v1_taxonomy,
766
  'hide_empty' => false,
 
767
  );
768
 
769
- $taxonomy_terms_tmp = $this->get_term_titles( $args_terms );
770
  foreach ( $taxonomy_terms_tmp as $k2_id => $v2_term ) {
771
  $excl_terms_init_opts[ $v1_taxonomy . '-' . $k2_id ] = $v2_term . ' (' . $v1_taxonomy . ')';
772
  }
@@ -849,7 +887,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
849
  * Set up settings, checking for sitemap conflicts, on settings page.
850
  *
851
  * @since ?
852
- */
853
  public function add_page_hooks() {
854
  $this->flush_rules_hook();
855
  $this->add_post_types();
@@ -956,34 +994,65 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
956
  * @return mixed
957
  */
958
  public function filter_display_options( $options ) {
 
 
959
  if ( is_multisite() ) {
960
  $options[ $this->prefix . 'rewrite' ] = 'On';
961
  }
962
  if ( isset( $options[ $this->prefix . 'max_posts' ] ) && ( ( $options[ $this->prefix . 'max_posts' ] <= 0 ) || ( $options[ $this->prefix . 'max_posts' ] >= 50000 ) ) ) {
963
  $options[ $this->prefix . 'max_posts' ] = 50000;
964
  }
965
- $url = aioseop_home_url( '/' . $this->get_filename() . '.xml' );
 
 
966
 
967
- /* translators: Link to documentation. */
968
- $options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your XML sitemap', 'all-in-one-seo-pack' ) . '</a>' );
969
- $options[ $this->prefix . 'link' ] .= ' ' . __( 'Your sitemap has been created with content and images.', 'all-in-one-seo-pack' );
970
 
971
  if ( ! empty( $options[ "{$this->prefix}rss_sitemap" ] ) ) {
972
- $url_rss = aioseop_home_url( '/' . $this->get_filename() . '.rss' );
973
  /* translators: Link to sitemap within current site. */
974
- $options[ $this->prefix . 'link' ] .= '<p>' . sprintf( __( 'Click here to %1$sview your RSS sitemap%2$s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url_rss ) . '" target="_blank">', '</a>' ) . '</p>';
975
  }
976
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
977
  if ( '0' !== get_option( 'blog_public' ) ) {
978
- $options[ $this->prefix . 'link' ] .= ' ' . __( 'Changes are automatically submitted to search engines.', 'all-in-one-seo-pack' );
979
  }
980
 
981
  if ( $this->option_isset( 'rewrite' ) ) {
 
 
 
 
 
 
 
 
 
 
 
982
  $rule = $this->get_rewrite_url( $url );
983
  $rules = $this->get_rewrite_rules();
984
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
985
  if ( ! in_array( $rule, $rules ) ) {
986
- $options[ $this->prefix . 'link' ] .= '<p>' . __( 'Dynamic sitemap generation does not appear to be using the correct rewrite rules; please disable any other sitemap plugins or functionality on your site and reset your permalinks.', 'all-in-one-seo-pack' ) . '</p>';
987
  }
988
  }
989
  if ( ! get_option( 'blog_public' ) ) {
@@ -1588,6 +1657,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1588
  if ( ! empty( $query->query_vars[ "{$this->prefix}page" ] ) ) {
1589
  $page = $query->query_vars[ "{$this->prefix}page" ] - 1;
1590
  }
 
1591
  $this->start_memory_usage = memory_get_peak_usage();
1592
  $sitemap_type = $query->query_vars[ "{$this->prefix}path" ];
1593
 
@@ -1637,6 +1707,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1637
 
1638
  /**
1639
  * Gets all content for the sitemap.
 
 
1640
  *
1641
  * @param string $sitemap_type The type of sitemap that has to be generated.
1642
  * @param int $page_number The page number of the sitemap index.
@@ -1645,41 +1717,54 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1645
  public function get_sitemap_data( $sitemap_type, $page_number = 0 ) {
1646
  $sitemap_data = array();
1647
 
1648
- if ( 0 === strpos( $sitemap_type, 'rss' ) ) {
1649
- $sitemap_data = $this->get_sitemap_without_indexes();
1650
- } elseif ( $this->options[ "{$this->prefix}indexes" ] ) {
1651
- $posttypes = $this->options[ "{$this->prefix}posttypes" ];
1652
- if ( empty( $posttypes ) ) {
1653
- $posttypes = array();
1654
  }
1655
- $taxonomies = $this->options[ "{$this->prefix}taxonomies" ];
1656
- if ( empty( $taxonomies ) ) {
1657
- $taxonomies = array();
 
 
 
 
1658
  }
1659
- if ( 'root' === $sitemap_type ) {
1660
- $sitemap_data = array_merge( $this->get_sitemap_index_filenames() );
1661
- } elseif ( 'addl' === $sitemap_type ) {
1662
  $sitemap_data = $this->get_addl_pages();
1663
- } elseif ( 'archive' === $sitemap_type && $this->option_isset( 'archive' ) ) {
 
 
1664
  $sitemap_data = $this->get_date_archive_data();
1665
- } elseif ( 'author' === $sitemap_type && $this->option_isset( 'author' ) ) {
 
 
1666
  $sitemap_data = $this->get_author_archive_data();
1667
- } elseif ( in_array( $sitemap_type, $posttypes ) ) {
1668
- // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
1669
- $sitemap_data = $this->get_custom_posts_data( $sitemap_type, 'publish', $page_number );
1670
- } elseif ( in_array( $sitemap_type, $taxonomies ) ) {
1671
- // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
1672
- $args = $this->get_tax_args( (array) $sitemap_type, $page_number );
1673
- $terms = get_terms( $args );
1674
- $sitemap_data = $this->get_terms_data( $terms );
1675
- } else {
1676
- // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
1677
- if ( is_array( $this->extra_sitemaps ) && in_array( $sitemap_type, $this->extra_sitemaps ) ) {
 
 
 
 
 
 
 
 
 
 
 
1678
  $sitemap_data = apply_filters( $this->prefix . 'custom_' . $sitemap_type, $sitemap_data, $page_number, $this_options );
1679
  }
1680
  }
1681
- } elseif ( 'root' === $sitemap_type ) {
1682
- $sitemap_data = $this->get_sitemap_without_indexes();
1683
  }
1684
 
1685
  /**
@@ -2518,7 +2603,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2518
  * @param string $sitemap_type The type of RSS sitemap viz. rss or rss_latest.
2519
  * @param string $comment
2520
  */
2521
- private function output_rss( $urls, $sitemap_type, $comment ) {
2522
  echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n\r\n";
2523
  // TODO Add esc_* function.
2524
  echo '<!-- ' . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date( 'D, d M Y H:i:s e' ) ) . " -->\r\n";
@@ -2527,15 +2612,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2527
  if ( is_multisite() ) {
2528
  // TODO Add esc_* function.
2529
  echo
2530
- '<title>' . aiosp_common::make_xml_safe( 'title', get_blog_option( get_current_blog_id(), 'blogname' ) ) . '</title>' .
2531
- '<link>' . aiosp_common::make_xml_safe( 'link', get_blog_option( get_current_blog_id(), 'siteurl' ) ) . '</link>' .
2532
- '<description>' . aiosp_common::make_xml_safe( 'description', get_blog_option( get_current_blog_id(), 'blogdescription' ) ) . '</description>';
2533
  } else {
2534
  // TODO Add esc_* function.
2535
  echo
2536
- '<title>' . aiosp_common::make_xml_safe( 'title', get_option( 'blogname' ) ) . '</title>' .
2537
- '<link>' . aiosp_common::make_xml_safe( 'link', get_option( 'siteurl' ) ) . '</link>' .
2538
- '<description>' . aiosp_common::make_xml_safe( 'description', get_option( 'blogdescription' ) ) . '</description>';
2539
  }
2540
 
2541
  // remove urls that do not have the rss element.
@@ -2551,12 +2636,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2551
  // TODO Add esc_* function.
2552
  echo
2553
  '<item>' .
2554
- '<guid>' . aiosp_common::make_xml_safe( 'guid', $url['loc'] ) . '</guid>' .
2555
- '<title>' . aiosp_common::make_xml_safe( 'title', $url['rss']['title'] ) . '</title>' .
2556
- '<link>' . aiosp_common::make_xml_safe( 'link', $url['loc'] ) . '</link>' .
2557
  // TODO Add esc_* or wp_kses function.
2558
  '<description><![CDATA[' . $url['rss']['description'] . ']]></description>' .
2559
- '<pubDate>' . aiosp_common::make_xml_safe( 'pubDate', $url['rss']['pubDate'] ) . '</pubDate>' .
2560
  '</item>';
2561
  }
2562
  echo '</channel></rss>';
@@ -2599,16 +2684,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2599
  *
2600
  * Output the XML for a sitemap.
2601
  *
2602
- * @since ?
 
2603
  *
2604
  * @param $urls
2605
  * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2606
  * @param string $comment
2607
  * @return null
2608
  */
2609
- private function output_sitemap( $urls, $sitemap_type, $comment = '' ) {
2610
- if ( 0 === strpos( $sitemap_type, 'rss' ) ) {
2611
- // starts with rss.
2612
  $this->output_rss( $urls, $sitemap_type, $comment );
2613
  return;
2614
  }
@@ -2664,7 +2749,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2664
  }
2665
  foreach ( $url as $k => $v ) {
2666
  if ( ! empty( $v ) ) {
2667
- $v = aiosp_common::make_xml_safe( $k, $v );
2668
  if ( is_array( $v ) ) {
2669
  $buf = "\t\t\t<$k>\r\n";
2670
  foreach ( $v as $ext => $attr ) {
@@ -2677,14 +2762,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2677
  // TODO Add esc_* function.
2678
  echo "\t\t\t<$a>\r\n";
2679
  foreach ( $nested as $next => $nattr ) {
2680
- $value = aiosp_common::make_xml_safe( $next, $nattr );
2681
  // TODO Add esc_* function.
2682
  echo "\t\t\t\t<$next>$value</$next>\r\n";
2683
  }
2684
  // TODO Add esc_* function.
2685
  echo "\t\t\t</$a>\r\n";
2686
  } else {
2687
- $value = aiosp_common::make_xml_safe( $a, $nested );
2688
  // TODO Add esc_* function.
2689
  echo "\t\t\t<$a>$value</$a>\r\n";
2690
  }
@@ -2692,7 +2777,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2692
  // TODO Add esc_* function.
2693
  echo "\t\t</$k>\r\n";
2694
  } else {
2695
- $value = aiosp_common::make_xml_safe( $ext, $attr );
2696
  $buf .= "\t\t\t<$ext>$value</$ext>\r\n";
2697
  }
2698
  }
@@ -2701,14 +2786,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2701
  echo $buf . "\t\t</$k>\r\n";
2702
  }
2703
  } else {
2704
- $value = aiosp_common::make_xml_safe( $k, $v );
2705
  // TODO Add esc_* function.
2706
  echo "\t\t<$k>$value</$k>\r\n";
2707
  }
2708
  }
2709
  }
2710
  } else {
2711
- $value = aiosp_common::make_xml_safe( 'loc', $url );
2712
  // TODO Add esc_* function.
2713
  echo "\t\t<loc>$value</loc>\r\n";
2714
  }
@@ -2752,12 +2837,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2752
  if ( ! in_array( $k, array( 'loc', 'lastmod' ) ) ) {
2753
  continue;
2754
  }
2755
- $v = aiosp_common::make_xml_safe( $k, $v );
2756
  // TODO Add esc_* function.
2757
  echo "\t\t<$k>$v</$k>\r\n";
2758
  }
2759
  } else {
2760
- $value = aiosp_common::make_xml_safe( 'loc', $url );
2761
  // TODO Add esc_* function.
2762
  echo "\t\t<loc>$value</loc>\r\n";
2763
  }
@@ -3440,61 +3525,68 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3440
  * @return array $date_archives All date archive sitemap entries.
3441
  */
3442
  public function get_date_archive_data() {
 
3443
  $args = array(
3444
  'numberposts' => 50000,
3445
  'post_type' => 'post',
3446
  );
3447
- $args = $this->set_post_args( $args );
3448
- $posts = $this->get_all_post_type_data( $args );
3449
 
3450
- $date_archives = array();
3451
- if ( is_array( $posts ) ) {
3452
- foreach ( $posts as $p ) {
3453
- if ( 'post' !== $p->post_type ) {
3454
- continue;
3455
- }
 
 
 
 
 
 
 
 
3456
 
3457
- // Add the post type to the date so as to support posts of different post types created on the same date.
3458
- $date = date( 'Y-m', mysql2date( 'U', $p->post_date ) ) . $p->post_type;
3459
- if ( empty( $date_archives[ $date ] ) ) {
3460
- $date_archives[ $date ] = $p;
3461
- } else {
3462
- if ( $p->post_modified > $date_archives[ $date ]->post_modified ) {
3463
- $date_archives[ $date ] = $p;
3464
- }
3465
- }
3466
- }
3467
  }
3468
 
3469
- if ( ! empty( $date_archives ) ) {
3470
-
3471
- $priority = $this->get_default_priority( 'archive' );
3472
- $frequency = $this->get_default_frequency( 'archive' );
3473
-
3474
- if ( isset( $this->options[ $this->prefix . 'prio_archive' ] ) && 'no' !== $this->options[ $this->prefix . 'prio_archive' ] ) {
3475
- if ( 'sel' !== $this->options[ $this->prefix . 'prio_archive' ] ) {
3476
- $priority = $this->options[ $this->prefix . 'prio_archive' ];
3477
- }
3478
  }
 
3479
 
3480
- if ( isset( $this->options[ $this->prefix . 'freq_archive' ] ) && 'no' !== $this->options[ $this->prefix . 'freq_archive' ] ) {
 
 
 
 
3481
 
3482
- if ( 'sel' !== $this->options[ $this->prefix . 'freq_archive' ] ) {
3483
- $frequency = $this->options[ $this->prefix . 'freq_archive' ];
 
 
 
 
 
 
 
 
3484
  }
3485
- }
3486
 
3487
- $populated_date_archives = array();
3488
- foreach ( $date_archives as $date_archive ) {
3489
- $date_archive = array(
3490
- 'loc' => $this->get_date_archive_link_from_post( $date_archive ),
3491
  'changefreq' => $frequency,
3492
  'priority' => $priority,
3493
  );
3494
-
3495
- array_push( $populated_date_archives, $date_archive );
3496
  }
3497
- $date_archives = $populated_date_archives;
3498
  }
3499
 
3500
  return $date_archives;
@@ -3603,26 +3695,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3603
  return $post_archive;
3604
  }
3605
 
3606
- /**
3607
- * Get Date Archive Link from Post
3608
- *
3609
- * Return a date archive link for a post.
3610
- *
3611
- * @since ?
3612
- *
3613
- * @param $post
3614
- * @return bool|string
3615
- */
3616
- public function get_date_archive_link_from_post( $post ) {
3617
- $extra = array();
3618
- if ( 'post' !== $post->post_type ) {
3619
- return false;
3620
- }
3621
- $date = mysql2date( 'U', $post->post_date );
3622
-
3623
- return get_month_link( date( 'Y', $date ), date( 'm', $date ) );
3624
- }
3625
-
3626
  /**
3627
  * Returns all author archive entries for the sitemap.
3628
  *
@@ -3632,60 +3704,37 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3632
  * @return array $author_archives All author archive sitemap entries.
3633
  */
3634
  public function get_author_archive_data() {
3635
- $args = array(
3636
- 'numberposts' => 50000,
3637
- 'post_type' => 'post',
 
 
 
 
 
 
 
3638
  );
3639
- $args = $this->set_post_args( $args );
3640
- $posts = $this->get_all_post_type_data( $args );
3641
-
3642
- $author_archives = array();
3643
- if ( is_array( $posts ) ) {
3644
- foreach ( $posts as $p ) {
3645
- if ( 'post' !== $p->post_type ) {
3646
- continue;
3647
- }
3648
- if ( empty( $author_archives[ $p->post_author ] ) ) {
3649
- $author_archives[ $p->post_author ] = $p;
3650
- } else {
3651
- if ( $p->post_modified > $author_archives[ $p->post_author ]->post_modified ) {
3652
- $author_archives[ $p->post_author ] = $p;
3653
- }
3654
- }
3655
- }
3656
  }
3657
-
3658
- if ( ! empty( $author_archives ) ) {
3659
- $priority = $this->get_default_priority( 'archive' );
3660
- $frequency = $this->get_default_frequency( 'archive' );
3661
-
3662
- if ( isset( $this->options[ $this->prefix . 'prio_author' ] ) && 'no' !== $this->options[ $this->prefix . 'prio_author' ] ) {
3663
- if ( 'sel' !== $this->options[ $this->prefix . 'prio_author' ] ) {
3664
- $priority = $this->options[ $this->prefix . 'prio_author' ];
3665
- }
3666
- }
3667
-
3668
- if ( isset( $this->options[ $this->prefix . 'freq_author' ] ) && 'no' !== $this->options[ $this->prefix . 'freq_author' ] ) {
3669
-
3670
- if ( 'sel' !== $this->options[ $this->prefix . 'freq_author' ] ) {
3671
- $frequency = $this->options[ $this->prefix . 'freq_author' ];
3672
- }
3673
- }
3674
-
3675
- $populated_author_archives = array();
3676
- foreach ( $author_archives as $author_archive ) {
3677
- $author_archive = array(
3678
- 'loc' => get_author_posts_url( $author_archive->post_author ),
3679
- 'changefreq' => $frequency,
3680
- 'priority' => $priority,
3681
- );
3682
-
3683
- array_push( $populated_author_archives, $author_archive );
3684
- }
3685
- $author_archives = $populated_author_archives;
3686
  }
3687
-
3688
- return $author_archives;
3689
  }
3690
 
3691
  /**
@@ -4011,9 +4060,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4011
 
4012
  // If possible, get ID from URL, and store the post's attachment ID => URL value.
4013
  // This is to base the attachment query on the ID instead of the URL; which is less SQL intense.
4014
- foreach ( $post_image_urls as $k1_index => &$v1_image_url ) {
4015
- $v1_image_url = aiosp_common::absolutize_url( $v1_image_url );
4016
- $attachment_id = aiosp_common::attachment_url_to_postid( $v1_image_url );
 
4017
 
4018
  if ( $attachment_id ) {
4019
  if ( ! isset( $this->image_ids_urls[ $attachment_id ] ) ) {
@@ -4902,16 +4952,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4902
  if ( ! empty( $args ) && ! empty( $args['post_type'] ) ) {
4903
  // #884: removed hard-to-understand code here which suspected $args['post_type'] to NOT be an array. Do not see any case in which this is likely to happen.
4904
  foreach ( $args['post_type'] as $post_type ) {
4905
- $count_args = $args;
4906
  if ( 'all' === $post_type ) {
4907
  continue;
4908
  }
 
 
 
4909
  if ( 'attachment' === $post_type ) {
4910
- $count_args['post_status'] = 'inherit';
 
 
4911
  }
4912
-
4913
- $count_args['post_type'] = $post_type;
4914
- $post_counts[ $post_type ] = $this->get_post_count( $count_args );
4915
  }
4916
  }
4917
  $post_counts = apply_filters( $this->prefix . 'post_counts', $post_counts, $args );
@@ -4937,32 +4988,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4937
  $args = apply_filters( $this->prefix . 'modify_post_params', $args );
4938
  }
4939
 
4940
- /**
4941
- * Get Post Count
4942
- *
4943
- * Return post counts for the specified arguments.
4944
- *
4945
- * @since ?
4946
- *
4947
- * @param $args
4948
- * @return int
4949
- */
4950
- public function get_post_count( $args ) {
4951
- $this->modify_post_params_for_external_plugins( $args );
4952
-
4953
- // we will use WP_Query instead of get_posts here as that is more efficient.
4954
- // BEWARE: since we are using WP_Query, suppress_filters is false.
4955
- $args['posts_per_page'] = -1;
4956
- $args['fields'] = 'ids';
4957
- $args['update_post_meta_cache'] = false;
4958
- $args['update_post_term_cache'] = false;
4959
- $query = new WP_Query( $args );
4960
- if ( $query->have_posts() ) {
4961
- return $query->post_count;
4962
- }
4963
- return 0;
4964
- }
4965
-
4966
  /**
4967
  * Get total post count.
4968
  *
@@ -5124,7 +5149,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
5124
  }
5125
  }
5126
 
5127
- // TODO: consider using WP_Query instead of get_posts to improve efficiency.
5128
  /**
5129
  * {$module_prefix}post_query
5130
  *
171
  $this->comment_string = 'Sitemap %s generated by ' . AIOSEOP_PLUGIN_NAME . ' %s on %s';
172
 
173
  $this->default_options = array(
 
174
  'daily_cron' => array(
175
  'name' => __( 'Schedule Updates', 'all-in-one-seo-pack' ),
176
  'type' => 'select',
225
 
226
  $this->layout = array(
227
  'status' => array(
228
+ 'name' => __( 'Sitemap Overview', 'all-in-one-seo-pack' ),
229
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#sitemap-overview',
230
  'options' => array_keys( $status_options ),
231
  ),
232
  'default' => array(
233
  'name' => $this->name,
234
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#xml-sitemap',
235
  'options' => array_keys( $this->default_options ),
236
  ),
237
  );
290
  }
291
  }
292
 
293
+ $addl_sitemap_options = array(
294
+ 'rss_sitemap' => array( 'name' => __( 'Create RSS Sitemap', 'all-in-one-seo-pack' ) ),
295
+ );
296
+
297
+ /**
298
+ * Allows users to disable the Google News sitemap.
299
+ *
300
+ * @since 3.4.0
301
+ *
302
+ * @param bool Whether or not the Google News sitemap should be output. Defaults to true.
303
+ */
304
+ if ( apply_filters( 'aioseo_news_sitemap_enabled', true ) ) {
305
+ $news_sitemap = array(
306
+ 'name' => __( 'Google News Sitemap Post Types', 'all-in-one-seo-pack' ),
307
+ 'type' => 'multicheckbox',
308
+ 'default' => array( 'post' ),
309
+ );
310
+
311
+ $addl_sitemap_options['posttypes_news'] = $news_sitemap;
312
+ }
313
+
314
+ $addl_pages_options = array(
315
  'addl_instructions' => array(
316
  'default' => '<div>' . __( 'Enter information below for any additional links for your sitemap not already managed through WordPress.', 'all-in-one-seo-pack' ) . '</div><br />',
317
  'type' => 'html',
370
  ),
371
  );
372
 
373
+ $this->layout['addl_sitemaps'] = array(
374
+ 'name' => __( 'Additional Sitemaps', 'all-in-one-seo-pack' ),
375
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-sitemaps',
376
+ 'options' => array_keys( $addl_sitemap_options ),
377
+ );
378
+
379
  $this->layout['addl_pages'] = array(
380
  'name' => __( 'Additional Pages', 'all-in-one-seo-pack' ),
381
  'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
382
+ 'options' => array_keys( $addl_pages_options ),
383
  );
384
 
385
  $this->layout['excl_pages'] = array(
402
  'options' => array_keys( $freq_options ),
403
  );
404
 
405
+ $this->default_options = array_merge( $status_options, $this->default_options, $addl_sitemap_options, $addl_pages_options, $excl_options, $prio_options, $freq_options );
406
 
407
  add_action(
408
  'after_doing_aioseop_updates',
598
  * @see Selectize
599
  * @link https://github.com/selectize/selectize.js
600
  */
601
+ if ( apply_filters( 'aioseop_sitemap_admin_enqueue_selectize', true ) ) {
602
+ wp_enqueue_script(
603
+ 'aioseop-selectize',
604
+ AIOSEOP_PLUGIN_URL . 'js/admin/selectize-v0.12.6/selectize.min.js',
605
+ array( 'jquery' ),
606
+ AIOSEOP_VERSION
607
+ );
608
+ }
609
+
610
 
611
  wp_enqueue_script(
612
  'aioseop-search-terms',
763
  $this->default_options['posttypes']['default'] = array_keys( $this->default_options['posttypes']['initial_options'] );
764
  $this->default_options['taxonomies']['default'] = array_keys( $this->default_options['taxonomies']['initial_options'] );
765
 
766
+ if( AIOSEOPPRO ) {
767
+ if( isset( $post_type_titles['attachment'] ) ) {
768
+ unset( $post_type_titles['attachment'] );
769
+ }
770
+ }
771
+ $this->default_options['posttypes_news']['initial_options'] = $post_type_titles;
772
+ $this->default_options['posttypes_news']['default'] = 'post';
773
+
774
  // Unset Media as default included post type.
775
  $index = array_search( 'attachment', $this->default_options['posttypes']['default'] );
776
 
801
  $args_terms = array(
802
  'taxonomy' => $v1_taxonomy,
803
  'hide_empty' => false,
804
+ 'fields' => 'id=>name',
805
  );
806
 
807
+ $taxonomy_terms_tmp = get_terms( apply_filters( 'aioseop_sitemap_add_post_types_taxonomy_terms_args', $args_terms ) );
808
  foreach ( $taxonomy_terms_tmp as $k2_id => $v2_term ) {
809
  $excl_terms_init_opts[ $v1_taxonomy . '-' . $k2_id ] = $v2_term . ' (' . $v1_taxonomy . ')';
810
  }
887
  * Set up settings, checking for sitemap conflicts, on settings page.
888
  *
889
  * @since ?
890
+ */
891
  public function add_page_hooks() {
892
  $this->flush_rules_hook();
893
  $this->add_post_types();
994
  * @return mixed
995
  */
996
  public function filter_display_options( $options ) {
997
+ global $aioseop_options;
998
+
999
  if ( is_multisite() ) {
1000
  $options[ $this->prefix . 'rewrite' ] = 'On';
1001
  }
1002
  if ( isset( $options[ $this->prefix . 'max_posts' ] ) && ( ( $options[ $this->prefix . 'max_posts' ] <= 0 ) || ( $options[ $this->prefix . 'max_posts' ] >= 50000 ) ) ) {
1003
  $options[ $this->prefix . 'max_posts' ] = 50000;
1004
  }
1005
+
1006
+ $url = aioseop_home_url( '/' . 'sitemap.xml' );
1007
+ $options[ $this->prefix . 'link' ] = '<p>' . __( 'You can navigate to your sitemap(s) using the links below:', 'all-in-one-seo-pack' ) . '<ul>';
1008
 
1009
+ $url = aioseop_home_url( '/' . 'sitemap.xml' );
1010
+ $options[ $this->prefix . 'link' ] .= '<li><a href="' . esc_url( $url ) . '" target="_blank">' . __( 'XML Sitemap', 'all-in-one-seo-pack' ) . '</a></li>';
 
1011
 
1012
  if ( ! empty( $options[ "{$this->prefix}rss_sitemap" ] ) ) {
1013
+ $url = aioseop_home_url( '/' . $this->get_filename() . '.rss' );
1014
  /* translators: Link to sitemap within current site. */
1015
+ $options[ $this->prefix . 'link' ] .= '<li><a href="' . esc_url( $url ) . '" target="_blank">' . __( 'RSS Sitemap', 'all-in-one-seo-pack' ) . '</a></li>';
1016
  }
1017
 
1018
+ if (
1019
+ AIOSEOPPRO &&
1020
+ aioseop_is_addon_allowed( 'news_sitemap' ) &&
1021
+ apply_filters( 'aioseo_news_sitemap_enabled', true )
1022
+ ) {
1023
+ $url = aioseop_home_url( '/news-sitemap.xml' );
1024
+ $options[ $this->prefix . 'link' ] .= '<li><a href="' . esc_url( $url ) . '" target="_blank">' . __( 'Google News Sitemap', 'all-in-one-seo-pack' ) . '</a><br/><i class="aioseop-msg-small">(' . __( 'This will lead to a 404 Not Found page if no posts have been published in the last 48 hours.', 'all-in-one-seo-pack' ) . ')</i></li>';
1025
+ }
1026
+
1027
+ if ( AIOSEOPPRO && ! empty( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_video_sitemap'] ) ) {
1028
+ $url = aioseop_home_url( '/video-sitemap.xml' );
1029
+ $options[ $this->prefix . 'link' ] .= '<li><a href="' . esc_url( $url ) . '" target="_blank">' . __( 'Video Sitemap', 'all-in-one-seo-pack' ) . '</a></li>';
1030
+ }
1031
+
1032
+
1033
+ $options[ $this->prefix . 'link' ] .= '</ul>';
1034
+
1035
  if ( '0' !== get_option( 'blog_public' ) ) {
1036
+ $options[ $this->prefix . 'link' ] .= '<p>' . __( 'Any changes are automatically submitted to search engines.', 'all-in-one-seo-pack' ) . '</p>';
1037
  }
1038
 
1039
  if ( $this->option_isset( 'rewrite' ) ) {
1040
+ switch( $this->prefix ) {
1041
+ case 'aiosp_sitemap_': {
1042
+ $url = aioseop_home_url( '/' . 'sitemap.xml' );
1043
+ break;
1044
+ }
1045
+ case 'aiosp_video_sitemap_':{
1046
+ $url = aioseop_home_url( '/' . 'video-sitemap.xml' );
1047
+ break;
1048
+ }
1049
+ }
1050
+
1051
  $rule = $this->get_rewrite_url( $url );
1052
  $rules = $this->get_rewrite_rules();
1053
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
1054
  if ( ! in_array( $rule, $rules ) ) {
1055
+ $options[ $this->prefix . 'link' ] .= '<strong>' . __( 'Dynamic sitemap generation does not appear to be using the correct rewrite rules; please disable any other sitemap plugins or functionality on your site and reset your permalinks.', 'all-in-one-seo-pack' ) . '</strong>';
1056
  }
1057
  }
1058
  if ( ! get_option( 'blog_public' ) ) {
1657
  if ( ! empty( $query->query_vars[ "{$this->prefix}page" ] ) ) {
1658
  $page = $query->query_vars[ "{$this->prefix}page" ] - 1;
1659
  }
1660
+
1661
  $this->start_memory_usage = memory_get_peak_usage();
1662
  $sitemap_type = $query->query_vars[ "{$this->prefix}path" ];
1663
 
1707
 
1708
  /**
1709
  * Gets all content for the sitemap.
1710
+ *
1711
+ * @since 3.4.0 Refactored to improve readability.
1712
  *
1713
  * @param string $sitemap_type The type of sitemap that has to be generated.
1714
  * @param int $page_number The page number of the sitemap index.
1717
  public function get_sitemap_data( $sitemap_type, $page_number = 0 ) {
1718
  $sitemap_data = array();
1719
 
1720
+ switch( $sitemap_type ) {
1721
+ case 'rss': {
1722
+ $sitemap_data = $this->get_sitemap_without_indexes();
1723
+ break;
 
 
1724
  }
1725
+ case 'root': {
1726
+ if( $this->options[ "{$this->prefix}indexes" ] ) {
1727
+ $sitemap_data = array_merge( $this->get_sitemap_index_filenames() );
1728
+ } else {
1729
+ $sitemap_data = $this->get_sitemap_without_indexes();
1730
+ }
1731
+ break;
1732
  }
1733
+ case 'addl': {
 
 
1734
  $sitemap_data = $this->get_addl_pages();
1735
+ break;
1736
+ }
1737
+ case 'archive': {
1738
  $sitemap_data = $this->get_date_archive_data();
1739
+ break;
1740
+ }
1741
+ case 'author': {
1742
  $sitemap_data = $this->get_author_archive_data();
1743
+ break;
1744
+ }
1745
+ default: {
1746
+ $posttypes = $this->options[ "{$this->prefix}posttypes" ];
1747
+ if ( empty( $posttypes ) ) {
1748
+ $posttypes = array();
1749
+ }
1750
+
1751
+ $taxonomies = $this->options[ "{$this->prefix}taxonomies" ];
1752
+ if ( empty( $taxonomies ) ) {
1753
+ $taxonomies = array();
1754
+ }
1755
+
1756
+ if ( in_array( $sitemap_type, $posttypes ) ) {
1757
+ $sitemap_data = $this->get_custom_posts_data( $sitemap_type, 'publish', $page_number );
1758
+ }
1759
+ else if ( in_array( $sitemap_type, $taxonomies ) ) {
1760
+ $args = $this->get_tax_args( (array) $sitemap_type, $page_number );
1761
+ $terms = get_terms( $args );
1762
+ $sitemap_data = $this->get_terms_data( $terms );
1763
+ }
1764
+ else if ( is_array( $this->extra_sitemaps ) && in_array( $sitemap_type, $this->extra_sitemaps ) ) {
1765
  $sitemap_data = apply_filters( $this->prefix . 'custom_' . $sitemap_type, $sitemap_data, $page_number, $this_options );
1766
  }
1767
  }
 
 
1768
  }
1769
 
1770
  /**
2603
  * @param string $sitemap_type The type of RSS sitemap viz. rss or rss_latest.
2604
  * @param string $comment
2605
  */
2606
+ protected function output_rss( $urls, $sitemap_type, $comment ) {
2607
  echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n\r\n";
2608
  // TODO Add esc_* function.
2609
  echo '<!-- ' . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date( 'D, d M Y H:i:s e' ) ) . " -->\r\n";
2612
  if ( is_multisite() ) {
2613
  // TODO Add esc_* function.
2614
  echo
2615
+ '<title>' . aiosp_common::esc_xml( 'title', get_blog_option( get_current_blog_id(), 'blogname' ) ) . '</title>' .
2616
+ '<link>' . aiosp_common::esc_xml( 'link', get_blog_option( get_current_blog_id(), 'siteurl' ) ) . '</link>' .
2617
+ '<description>' . aiosp_common::esc_xml( 'description', get_blog_option( get_current_blog_id(), 'blogdescription' ) ) . '</description>';
2618
  } else {
2619
  // TODO Add esc_* function.
2620
  echo
2621
+ '<title>' . aiosp_common::esc_xml( 'title', get_option( 'blogname' ) ) . '</title>' .
2622
+ '<link>' . aiosp_common::esc_xml( 'link', get_option( 'siteurl' ) ) . '</link>' .
2623
+ '<description>' . aiosp_common::esc_xml( 'description', get_option( 'blogdescription' ) ) . '</description>';
2624
  }
2625
 
2626
  // remove urls that do not have the rss element.
2636
  // TODO Add esc_* function.
2637
  echo
2638
  '<item>' .
2639
+ '<guid>' . aiosp_common::esc_xml( 'guid', $url['loc'] ) . '</guid>' .
2640
+ '<title>' . aiosp_common::esc_xml( 'title', $url['rss']['title'] ) . '</title>' .
2641
+ '<link>' . aiosp_common::esc_xml( 'link', $url['loc'] ) . '</link>' .
2642
  // TODO Add esc_* or wp_kses function.
2643
  '<description><![CDATA[' . $url['rss']['description'] . ']]></description>' .
2644
+ '<pubDate>' . aiosp_common::esc_xml( 'pubDate', $url['rss']['pubDate'] ) . '</pubDate>' .
2645
  '</item>';
2646
  }
2647
  echo '</channel></rss>';
2684
  *
2685
  * Output the XML for a sitemap.
2686
  *
2687
+ * @since ?
2688
+ * @since 3.4.0 Added support for News Sitemap.
2689
  *
2690
  * @param $urls
2691
  * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2692
  * @param string $comment
2693
  * @return null
2694
  */
2695
+ protected function output_sitemap( $urls, $sitemap_type, $comment = '' ) {
2696
+ if ( 'rss' === $sitemap_type ) {
 
2697
  $this->output_rss( $urls, $sitemap_type, $comment );
2698
  return;
2699
  }
2749
  }
2750
  foreach ( $url as $k => $v ) {
2751
  if ( ! empty( $v ) ) {
2752
+ $v = aiosp_common::esc_xml( $k, $v );
2753
  if ( is_array( $v ) ) {
2754
  $buf = "\t\t\t<$k>\r\n";
2755
  foreach ( $v as $ext => $attr ) {
2762
  // TODO Add esc_* function.
2763
  echo "\t\t\t<$a>\r\n";
2764
  foreach ( $nested as $next => $nattr ) {
2765
+ $value = aiosp_common::esc_xml( $next, $nattr );
2766
  // TODO Add esc_* function.
2767
  echo "\t\t\t\t<$next>$value</$next>\r\n";
2768
  }
2769
  // TODO Add esc_* function.
2770
  echo "\t\t\t</$a>\r\n";
2771
  } else {
2772
+ $value = aiosp_common::esc_xml( $a, $nested );
2773
  // TODO Add esc_* function.
2774
  echo "\t\t\t<$a>$value</$a>\r\n";
2775
  }
2777
  // TODO Add esc_* function.
2778
  echo "\t\t</$k>\r\n";
2779
  } else {
2780
+ $value = aiosp_common::esc_xml( $ext, $attr );
2781
  $buf .= "\t\t\t<$ext>$value</$ext>\r\n";
2782
  }
2783
  }
2786
  echo $buf . "\t\t</$k>\r\n";
2787
  }
2788
  } else {
2789
+ $value = aiosp_common::esc_xml( $k, $v );
2790
  // TODO Add esc_* function.
2791
  echo "\t\t<$k>$value</$k>\r\n";
2792
  }
2793
  }
2794
  }
2795
  } else {
2796
+ $value = aiosp_common::esc_xml( 'loc', $url );
2797
  // TODO Add esc_* function.
2798
  echo "\t\t<loc>$value</loc>\r\n";
2799
  }
2837
  if ( ! in_array( $k, array( 'loc', 'lastmod' ) ) ) {
2838
  continue;
2839
  }
2840
+ $v = aiosp_common::esc_xml( $k, $v );
2841
  // TODO Add esc_* function.
2842
  echo "\t\t<$k>$v</$k>\r\n";
2843
  }
2844
  } else {
2845
+ $value = aiosp_common::esc_xml( 'loc', $url );
2846
  // TODO Add esc_* function.
2847
  echo "\t\t<loc>$value</loc>\r\n";
2848
  }
3525
  * @return array $date_archives All date archive sitemap entries.
3526
  */
3527
  public function get_date_archive_data() {
3528
+ global $wpdb;
3529
  $args = array(
3530
  'numberposts' => 50000,
3531
  'post_type' => 'post',
3532
  );
 
 
3533
 
3534
+ // Get monthly results.
3535
+ $sql_query = $wpdb->prepare( "
3536
+ SELECT
3537
+ YEAR(post_date) AS `year`,
3538
+ MONTH(post_date) AS `month`
3539
+ FROM {$wpdb->posts}
3540
+ WHERE post_type = %s AND post_status = 'publish'
3541
+ GROUP BY
3542
+ YEAR(post_date),
3543
+ MONTH(post_date)
3544
+ ORDER BY post_date ASC LIMIT %d",
3545
+ $args['post_type'],
3546
+ $args['numberposts']
3547
+ );
3548
 
3549
+ $key = md5( $sql_query );
3550
+ $last_changed = wp_cache_get_last_changed( 'posts' );
3551
+ $key = "aioseop_get_date_archive_data:$key:$last_changed";
3552
+ $date_results = wp_cache_get( $key, 'posts' );
3553
+ if ( ! $date_results ) {
3554
+ $date_results = $wpdb->get_results( $sql_query );
3555
+ wp_cache_set( $key, $date_results, 'posts' );
 
 
 
3556
  }
3557
 
3558
+ $priority = $this->get_default_priority( 'archive' );
3559
+ $frequency = $this->get_default_frequency( 'archive' );
3560
+ if ( isset( $this->options[ $this->prefix . 'prio_archive' ] ) && 'no' !== $this->options[ $this->prefix . 'prio_archive' ] ) {
3561
+ if ( 'sel' !== $this->options[ $this->prefix . 'prio_archive' ] ) {
3562
+ $priority = $this->options[ $this->prefix . 'prio_archive' ];
 
 
 
 
3563
  }
3564
+ }
3565
 
3566
+ if ( isset( $this->options[ $this->prefix . 'freq_archive' ] ) && 'no' !== $this->options[ $this->prefix . 'freq_archive' ] ) {
3567
+ if ( 'sel' !== $this->options[ $this->prefix . 'freq_archive' ] ) {
3568
+ $frequency = $this->options[ $this->prefix . 'freq_archive' ];
3569
+ }
3570
+ }
3571
 
3572
+ if ( $date_results ) {
3573
+ $year = null;
3574
+ foreach ( $date_results as $date_result ) {
3575
+ if ( $year !== $date_result->year ) {
3576
+ $year = $date_result->year;
3577
+ $date_archives[] = array(
3578
+ 'loc' => get_year_link( $date_result->year ),
3579
+ 'changefreq' => $frequency,
3580
+ 'priority' => $priority,
3581
+ );
3582
  }
 
3583
 
3584
+ $date_archives[] = array(
3585
+ 'loc' => get_month_link( $date_result->year, $date_result->month ),
 
 
3586
  'changefreq' => $frequency,
3587
  'priority' => $priority,
3588
  );
 
 
3589
  }
 
3590
  }
3591
 
3592
  return $date_archives;
3695
  return $post_archive;
3696
  }
3697
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3698
  /**
3699
  * Returns all author archive entries for the sitemap.
3700
  *
3704
  * @return array $author_archives All author archive sitemap entries.
3705
  */
3706
  public function get_author_archive_data() {
3707
+ $entries = array();
3708
+ if (
3709
+ ! aioseop_last_modified_post() ||
3710
+ ! $this->options[ $this->prefix . 'author' ]
3711
+ ) {
3712
+ return $entries;
3713
+ }
3714
+
3715
+ $args = array(
3716
+ 'has_published_posts' => array( 'post' ),
3717
  );
3718
+
3719
+ $authors = get_users( $args );
3720
+ if ( ! $authors ) {
3721
+ return $entries;
 
 
 
 
 
 
 
 
 
 
 
 
 
3722
  }
3723
+
3724
+ foreach ( $authors as $author ) {
3725
+ $args = array(
3726
+ 'author' => $author->ID,
3727
+ );
3728
+
3729
+ $entries[] = array(
3730
+ 'loc' => get_author_posts_url( $author->ID ),
3731
+ 'lastmod' => aioseop_last_modified_post( $args ) ? aioseop_last_modified_post( $args )->post_modified_gmt : '',
3732
+ 'changefreq' => $this->get_default_frequency( 'author' ),
3733
+ 'priority' => $this->get_default_priority( 'author' ),
3734
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3735
  }
3736
+
3737
+ return apply_filters( 'aioseo_sitemap_author', $entries );
3738
  }
3739
 
3740
  /**
4060
 
4061
  // If possible, get ID from URL, and store the post's attachment ID => URL value.
4062
  // This is to base the attachment query on the ID instead of the URL; which is less SQL intense.
4063
+ foreach ( $post_image_urls as $k1_index => $v1_image_url ) {
4064
+ $v1_image_url = aiosp_common::absolutize_url( $v1_image_url );
4065
+ $post_image_urls[ $k1_index ] = $v1_image_url;
4066
+ $attachment_id = aiosp_common::attachment_url_to_postid( $v1_image_url );
4067
 
4068
  if ( $attachment_id ) {
4069
  if ( ! isset( $this->image_ids_urls[ $attachment_id ] ) ) {
4952
  if ( ! empty( $args ) && ! empty( $args['post_type'] ) ) {
4953
  // #884: removed hard-to-understand code here which suspected $args['post_type'] to NOT be an array. Do not see any case in which this is likely to happen.
4954
  foreach ( $args['post_type'] as $post_type ) {
 
4955
  if ( 'all' === $post_type ) {
4956
  continue;
4957
  }
4958
+
4959
+ $post_type_count = (array) wp_count_posts( $post_type );
4960
+ $post_counts[ $post_type ] = 0;
4961
  if ( 'attachment' === $post_type ) {
4962
+ $post_counts[ $post_type ] = $post_type_count['inherit'];
4963
+ } elseif ( ! empty( $post_type_count[ $status ] ) ) {
4964
+ $post_counts[ $post_type ] = $post_type_count[ $status ];
4965
  }
 
 
 
4966
  }
4967
  }
4968
  $post_counts = apply_filters( $this->prefix . 'post_counts', $post_counts, $args );
4988
  $args = apply_filters( $this->prefix . 'modify_post_params', $args );
4989
  }
4990
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4991
  /**
4992
  * Get total post count.
4993
  *
5149
  }
5150
  }
5151
 
5152
+ // TODO: consider using WP_Query instead of get_posts to improve consistency (does not improve performance).
5153
  /**
5154
  * {$module_prefix}post_query
5155
  *
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: semperplugins, smub, benjaminprojas
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
  Requires at least: 4.9
5
- Tested up to: 5.4
6
- Stable tag: 3.4.3
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
2
  Contributors: semperplugins, smub, benjaminprojas
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
  Requires at least: 4.9
5
+ Tested up to: 5.4.1
6
+ Stable tag: 3.5.2
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9