All in One SEO Pack - Version 3.0.4

Version Description

Download this release

Release Info

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

Code changes from version 3.2.1 to 3.0.4

Files changed (69) hide show
  1. CONTRIBUTING.md +156 -0
  2. PULL_REQUEST_TEMPLATE.md +38 -0
  3. admin/aioseop_module_class.php +76 -471
  4. admin/aioseop_module_manager.php +13 -68
  5. admin/class-aioseop-helper.php +39 -70
  6. admin/class-aioseop-notices.php +2 -2
  7. admin/display/credits-content.php +3 -19
  8. admin/display/dashboard_widget.php +1 -19
  9. admin/display/general-metaboxes.php +78 -87
  10. admin/display/menu.php +0 -6
  11. admin/display/notice-aioseop.php +1 -1
  12. admin/display/notices/review-plugin-notice.php +5 -5
  13. admin/display/welcome-content.php +33 -62
  14. admin/display/welcome.php +13 -25
  15. admin/meta_import.php +24 -64
  16. aioseop-init.php +2 -2
  17. aioseop_class.php +384 -1153
  18. all_in_one_seo_pack.php +22 -66
  19. css/admin-notice.min.css +0 -1
  20. css/aioseop-font-icons-rtl.min.css +0 -1
  21. css/aioseop-font-icons.css +8 -6
  22. css/aioseop-font-icons.min.css +0 -1
  23. css/aioseop-jquery-ui.css +0 -105
  24. css/aioseop-jquery-ui.min.css +0 -1
  25. css/aioseop-welcome-rtl.css +0 -6
  26. css/aioseop-welcome-rtl.min.css +0 -1
  27. css/aioseop-welcome.css +0 -132
  28. css/aioseop-welcome.min.css +0 -1
  29. css/aiosp_admin.css +1 -1
  30. css/aiosp_admin.min.css +0 -1
  31. css/modules/aioseop_module-rtl.css +5 -4
  32. css/modules/aioseop_module-rtl.min.css +0 -1
  33. css/modules/aioseop_module.css +16 -37
  34. css/modules/aioseop_module.min.css +0 -1
  35. css/welcome.min.css +0 -1
  36. inc/aioseop_UTF8.php +439 -1319
  37. inc/aioseop_functions.php +109 -304
  38. inc/aioseop_updates_class.php +6 -96
  39. inc/aiosp_common.php +14 -50
  40. inc/commonstrings.php +7 -11
  41. inc/compatability/abstract/aiosep_compatible.php +0 -9
  42. inc/compatability/compat-init.php +9 -7
  43. inc/compatability/compat-wpml.php +3 -10
  44. inc/schema/graphs/graph-article.php +0 -156
  45. inc/schema/graphs/graph-collectionpage.php +0 -52
  46. inc/schema/graphs/graph-creativework.php +0 -28
  47. inc/schema/graphs/graph-organization.php +0 -203
  48. inc/schema/graphs/graph-person.php +0 -84
  49. inc/schema/graphs/graph-profilepage.php +0 -54
  50. inc/schema/graphs/graph-searchresultspage.php +0 -54
  51. inc/schema/graphs/graph-webpage.php +0 -186
  52. inc/schema/graphs/graph-website.php +0 -74
  53. inc/schema/graphs/graph.php +0 -337
  54. inc/schema/schema-builder.php +0 -199
  55. inc/sitemap-xsl.php +21 -11
  56. inc/translations.php +5 -79
  57. modules/aioseop_bad_robots.php +14 -27
  58. modules/aioseop_feature_manager.php +15 -29
  59. modules/aioseop_file_editor.php +9 -30
  60. modules/aioseop_importer_exporter.php +59 -105
  61. modules/aioseop_opengraph.php +134 -112
  62. modules/aioseop_performance.php +18 -121
  63. modules/aioseop_robots.php +39 -269
  64. modules/aioseop_sitemap.php +189 -840
  65. modules/aioseop_video_sitemap.php +2 -2
  66. public/front.php +4 -23
  67. public/google-analytics.php +5 -24
  68. public/opengraph.php +18 -28
  69. readme.txt +1 -2
CONTRIBUTING.md ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to All in One SEO Pack
2
+
3
+ So you'd like to contribute to an open source project? You're awesome!
4
+
5
+ - [Reporting bugs](#reporting-bugs)
6
+ - [Feature ideas](#feature-ideas)
7
+ - [Contributing code](#contributing-code)
8
+ - [Translating](#translating)
9
+
10
+
11
+ ## Reporting bugs
12
+
13
+ 1. Support issues (white screen of death, plugin/theme conflict, post meta or titles not showing up, etc.) should go to the [**support forums**](http://semperplugins.com/support/). Make sure you're reporting a true AIOSEOP issue here. First do some [basic debugging](http://semperplugins.com/faqs/how-to-troubleshoot-issues-with-our-plugins/).
14
+ 2. [**Search** the issues](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues) first.
15
+ 3. [Open a new issue](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new).
16
+
17
+ What makes the issue really helpful:
18
+
19
+ - You articulate the problem clearly and provide **steps to reproduce** the problem.
20
+ - **Screenshots or GIFs** are appreciated.
21
+
22
+
23
+ ## Feature ideas
24
+
25
+ Ideas are great. All in One SEO Pack needs them. There are so many difficult problems still to solve, and so many opportunities to make the project better. :bulb: :bulb: :bulb:
26
+
27
+ [Submit a new feature request](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new) and start a discussion.
28
+
29
+
30
+ ## Contributing code
31
+
32
+ Generally:
33
+
34
+ 1. Open a new issue / pick an existing one
35
+ 2. Fork the repo, create a branch (off the development branch), commit to it
36
+ 3. Push the branch, open a pull request
37
+ 4. The core team will review it and work with you if necessary
38
+ 5. Someone from the core team will merge the PR
39
+ 6. :tada:
40
+
41
+ Smaller changes like updating README's etc. don't need to use the full workflow, a direct PR or sometimes even a commit into `master` is fine. However, most code changes undergo the suggested workflow which is described in more detail [below](#development-workflow).
42
+
43
+ The following discusses some of the important details if you want to contribute.
44
+
45
+ ### Core values
46
+
47
+ - **We care about user / dev experience**. Everything that is outward-facing, be it a user interface, developer API or a file format, must be carefully designed for usability and usefulness. We invest our energy to save it for the others.
48
+ - **We care about code quality**. Bad code is a liability, not an asset. We value tests, review each other's code and try to make it good and clean.
49
+ - **We try to be pragmatic**. While we care about quality, the main thing for All in One SEO Pack and its users is to move forward. We're always looking for the right balance.
50
+
51
+
52
+ ### Our development process
53
+
54
+ **Major versions** (2.0, 2.1 etc.) are released every few months. Each major version has a [corresponding milestone](https://github.com/semperfiwebdesign/all-in-one-seo-pack/milestones/) and issues are assigned to it by the core team. Issues not assigned to any milestone are in a backlog – we want to do them one day but there's no immediate plans yet.
55
+
56
+ **Issues** are the most important tool to plan and manage almost everything around VersionPress:
57
+
58
+ - We create them for new features, bugs, improvements or even larger things like planning documents. **We strongly prefer issues over wiki** or other documents as they are actionable and time-framed.
59
+ - [This set of **labels**](https://github.com/semperfiwebdesign/all-in-one-seo-pack/wiki/Issues#labels) is used to categorize issues.
60
+ - Issues go through **four states**: 'open', 'in progress', 'in review' and 'closed'. There's an [**overv.io board**](https://overv.io/workspace/JanVoracek/cautious-tarsier/) board to visualize that. Also, overv.io helps us set priorities – tickets higher up will be worked on first.
61
+
62
+ Regarding **branches**, the current release being worked on is **`development`**. It is hence inherently unsafe, even though we do our best to keep it in a good shape. **`Master`** is typically relatively stable.
63
+
64
+
65
+ ### Development workflow
66
+
67
+ For small / "safe" changes like updating a README or other Markdown files, quick pull request or even commit into `master` is acceptable. However, for most new code, we use the [GitHub flow](https://guides.github.com/introduction/flow/):
68
+
69
+ ![GitHub Flow](https://guides.github.com/activities/hello-world/branching.png)
70
+
71
+ Here are the details:
72
+
73
+
74
+ 1. When you start working on an issue, **move it to the 'in progress' state** (either visually on the [overv.io board](https://overv.io/workspace/JanVoracek/cautious-tarsier/) or by assigning the `in progress` label to the issue) and **create a new feature branch** for it. Name it `<issue number>-<short description>`, e.g., `123-row-filtering`.
75
+
76
+ - **Every feature branch should branch off of master**, not another feature branch, even if it depends on it. For dependent feature branches, simply merge between them. This is mainly because when you're going to open a PR for it, you will need to select the target branch (GitHub doesn't let you to change this later) and `master` is the only sensible choice there.
77
+
78
+ 2. **Commit to this branch**. We appreciate good commits, here are some tips:
79
+
80
+ - **Keep commits small and focused**. There are many articles on version control best practices, e.g., [this one](http://www.git-tower.com/learn/git/ebook/command-line/appendix/best-practices) is good. To sum it up, commit small logical changes, prefer smaller commits over large ones and keep project in a workable state at all times.
81
+ - **Write good commit messages**. We don't have strict rules like [this](http://chris.beams.io/posts/git-commit/), e.g., we don't enforce short subject lines. The main thing for us is that the commit messages are *useful*. Do they make it clear what happened in a commit? Do they reference related commits, if applicable? Good.
82
+ - We most commonly use past tense ("Added tests") or present tense describing the new situation ("IniSerializer now has tests") but we're not religious about it.
83
+ - **Link to an issue from the commit message**. Most of the commit messages look like this:
84
+
85
+ ```
86
+ [#123] Implemented xyz
87
+ ```
88
+
89
+ It means that the commit belongs to issue `#123`. It makes looking up issues from commits easier.
90
+
91
+
92
+ 3. When ready, push the branch, **open a pull request** for it and **move the issue to the 'in review' state** (again, either visually in [overv.io](https://overv.io/workspace/JanVoracek/cautious-tarsier/) or by removing the `in progress` label and adding the `in review` one). You can open a PR early to gather feedback, no worries, you can always add commits to it later. The branch can be push-forced if necessary, it is a "sandbox" to make it great.
93
+
94
+ This is an example of a good pull request: [versionpress/versionpress#744](https://github.com/versionpress/versionpress/pull/744). The body usually contains something like:
95
+
96
+ Resolves #123.
97
+
98
+ Some notes on the implementation here if it's not obvious from the code
99
+ or the list of commits.
100
+
101
+ Reviewers:
102
+
103
+ - [ ] @JanVoracek
104
+ - [ ] @borekb
105
+
106
+ It will be pre-filled for you automatically via GitHub templates, just with a different reviewer (`@versionpress/core-devs` will be there by default, someone from the core team will update it to the actual list of people).
107
+
108
+ 4. **Core team reviews the PR**. Expect feedback – it is uncommon to receive none – and be open to it. The team will happily work with you to make the code contribution great.
109
+
110
+ All checkboxes checked means that the PR is OK to merge.
111
+
112
+ > This is an important nuance because the checkbox can have two meanings: "PR is OK to merge" or "I am done with the review (regardless of whether I still see issues with the code or not)". The former is useful for the one who will eventually perform the merge, the latter is more convenient for a reviewer. We use the first meaning which means that I, as a reviewer, will only check the checkbox after I reported some issues with the code **and they have been fixed**.
113
+
114
+ 5. Someone from the core team **merges the pull request**, issue is closed and the branch can be deleted.
115
+
116
+ A couple of notes:
117
+
118
+ - As noted above, small / safe changes don't need to undergo this whole process. For example, Markdown files can be **committed directly into `master`** if the changes don't need to be reviewed.
119
+ - We used to use **rebasing** in the past – you can still see that in commits before April 2015 – but left it in favor of merging which is much more natural on GitHub. Plus, rebases [have their own issues](http://geekblog.oneandoneis2.org/index.php/2013/04/30/please-stay-away-from-rebase).
120
+ - **Issues vs. pull requests**: most of the new improvements and features start as issues as they are quick to create and don't require a Git branch. Then there's usually a single PR against the issue (sometimes more but that's relatively rare). However, issues and pull requests are almost the same thing on GitHub and it's not a problem to start something (possibly simpler) directly as a PR.
121
+
122
+
123
+ ### Style guides
124
+
125
+ All in Code should follow the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/) and [WordPress Documentation Standards](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/).
126
+
127
+ #### PHP style guide
128
+
129
+ [WordPress PHP Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/)
130
+
131
+ [WordPress PHP Documentation Standards](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/)
132
+
133
+ There are tools out there for apps like Netbeans and PHPStorm to apply WordPress Coding Standards.
134
+
135
+
136
+ #### JavaScript style guide
137
+
138
+ [WordPress Javascript Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/)
139
+
140
+ [WordPress Javascript Documentation](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/)
141
+
142
+
143
+
144
+ ## Translating
145
+
146
+ We would love your help translating the project into your language. [Translations](https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack)
147
+
148
+
149
+ [How to Contribute Translations](https://github.com/semperfiwebdesign/all-in-one-seo-pack/wiki/Translating-into-your-language)
150
+
151
+ [Translations FAQ](https://github.com/semperfiwebdesign/all-in-one-seo-pack/wiki/Translations-FAQ)
152
+
153
+
154
+ ---
155
+
156
+ Other ideas of how to contribute? [Tell us](http://semperplugins.com/contact).
PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Issue #
2
+
3
+ ## Proposed changes
4
+
5
+ Describe the big picture of your changes here to communicate why the PR should be accepted. If it fixes a bug or resolves a feature request, be sure to link to that issue.
6
+
7
+ ## Types of changes
8
+
9
+ What types of changes does your code introduce?
10
+ _Delete those that don't apply_
11
+
12
+ - Bugfix (non-breaking change which fixes an issue)
13
+ - New feature (non-breaking change which adds functionality)
14
+ - Breaking change (fix or feature that would cause existing functionality to not work as expected)
15
+ - Adds new API hooks
16
+ - Removing old code/functionality
17
+ - Improves existing functionality
18
+ - Improves existing code
19
+
20
+ ## Checklist
21
+
22
+ _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. If creating a separate issue for an item, link to the issue # at the end of the line._
23
+
24
+ - [ ] I've selected the appropriate branch (ie x.y rather than master).
25
+ - [ ] I've created an appropriate title, descriptive of what the PR does.
26
+ - [ ] Travis-ci runs with no errors.
27
+ - [ ] I have added tests that prove my fix is effective/my feature works or have created an issue for it (if appropriate).
28
+ - [ ] I have added necessary documentation, or have created an issue for docs (if appropriate).
29
+
30
+ ## Testing instructions
31
+ - Don't assume the tester knows the entire backstory of the issue, and don't force him/her to decipher the code to try and figure out what -it's doing or how to test it.
32
+ - Do provide step by step instructions on how to test.
33
+ - Do note things to watch out for.
34
+ - Do note what aspects the tester should try and break.
35
+
36
+ ## Further comments
37
+
38
+ If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
admin/aioseop_module_class.php CHANGED
@@ -1,7 +1,5 @@
1
  <?php
2
  /**
3
- * AIOSEOP Module Class
4
- *
5
  * @package All-in-One-SEO-Pack
6
  * @version 2.3.12.2
7
  */
@@ -12,245 +10,30 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
12
  * The module base class; handles settings, options, menus, metaboxes, etc.
13
  */
14
  abstract class All_in_One_SEO_Pack_Module {
15
- /**
16
- * Instance
17
- *
18
- * @since ?
19
- *
20
- * @var null $instance
21
- */
22
  public static $instance = null;
23
-
24
- /**
25
- * Plugin Name
26
- *
27
- * @since ?
28
- *
29
- * @var string $plugin_name
30
- */
31
  protected $plugin_name;
32
-
33
- /**
34
- * Name
35
- *
36
- * @since ?
37
- *
38
- * @var string $name
39
- */
40
  protected $name;
41
-
42
- /**
43
- * Menu Name
44
- *
45
- * @since ?
46
- *
47
- * @var string $menu_name
48
- */
49
  protected $menu_name;
50
-
51
- /**
52
- * Module Prefix
53
- *
54
- * @since ?
55
- *
56
- * @var string $prefix
57
- */
58
  protected $prefix;
59
-
60
- /**
61
- * File
62
- *
63
- * @since ?
64
- *
65
- * @var string $file
66
- */
67
  protected $file;
68
-
69
- /**
70
- * Module Options
71
- *
72
- * @since ?
73
- *
74
- * @var array $options {
75
- * TODO Add details to show module database options. May need to use module classes instead.
76
- * }
77
- */
78
  protected $options;
79
-
80
- /**
81
- * Option Name
82
- *
83
- * @since ?
84
- *
85
- * @var string $option_name
86
- */
87
  protected $option_name;
88
-
89
- /**
90
- * Default Options
91
- *
92
- * @since ?
93
- *
94
- * @var array $default_options
95
- */
96
  protected $default_options;
97
-
98
- /**
99
- * Help Text
100
- *
101
- * @since ?
102
- * @deprecated
103
- *
104
- * @var array $help_text
105
- */
106
  protected $help_text = array();
107
-
108
- /**
109
- * Help Anchors
110
- *
111
- * @since ?
112
- * @deprecated
113
- *
114
- * @var array $help_anchors
115
- */
116
  protected $help_anchors = array();
117
-
118
- /**
119
- * Locations
120
- *
121
- * (Optional) Organize settings into settings pages with a menu items and/or metaboxes on post types edit screen.
122
- *
123
- * @since ?
124
- *
125
- * @var array $locations
126
- */
127
- protected $locations = null;
128
-
129
- /**
130
- * Layout
131
- *
132
- * (Optional) Organize settings on a settings page into multiple, separate metaboxes.
133
- *
134
- * @since ?
135
- *
136
- * @var array $layout
137
- */
138
- protected $layout = null;
139
-
140
- /**
141
- * Tabs
142
- *
143
- * (Optional) Organize layouts on a settings page into multiple.
144
- *
145
- * @since ?
146
- *
147
- * @var array $tabs
148
- */
149
- protected $tabs = null;
150
-
151
- /**
152
- * Current Tab
153
- *
154
- * @since ?
155
- *
156
- * @var string $current_tab
157
- */
158
- protected $current_tab = null;
159
-
160
- /**
161
- * Pagehook
162
- *
163
- * The current page hook.
164
- *
165
- * @since ?
166
- *
167
- * @var string $pagehook
168
- */
169
- protected $pagehook = null;
170
-
171
- /**
172
- * Store Option
173
- *
174
- * @since ?
175
- *
176
- * @var bool
177
- */
178
  protected $store_option = false;
179
-
180
- /**
181
- * Parent Option
182
- *
183
- * @since ?
184
- *
185
- * @var string $parent_option
186
- */
187
  protected $parent_option = 'aioseop_options';
188
-
189
- /**
190
- * Post Metaboxes
191
- *
192
- * @since ?
193
- *
194
- * @var array $post_metaboxes
195
- */
196
  protected $post_metaboxes = array();
197
-
198
- /**
199
- * Tabbed Metaboxes
200
- *
201
- * @since ?
202
- *
203
- * @var bool
204
- */
205
  protected $tabbed_metaboxes = true;
206
-
207
- /**
208
- * Credentials
209
- *
210
- * Used for WP Filesystem.
211
- *
212
- * @since ?
213
- *
214
- * @var bool
215
- */
216
- protected $credentials = false;
217
-
218
- /**
219
- * Script Data
220
- *
221
- * Used for passing data to JavaScript.
222
- *
223
- * @since ?
224
- *
225
- * @var array $script_data
226
- */
227
- protected $script_data = null;
228
-
229
- /**
230
- * Plugin Path
231
- *
232
- * @since ?
233
- *
234
- * @var array|null
235
- */
236
  protected $plugin_path = null;
237
-
238
- /**
239
- * Pointers
240
- *
241
- * @since ?
242
- *
243
- * @var array
244
- */
245
  protected $pointers = array();
246
-
247
- /**
248
- * Form
249
- *
250
- * @since ?
251
- *
252
- * @var string $form
253
- */
254
  protected $form = 'dofollow';
255
 
256
  /**
@@ -406,7 +189,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
406
  }
407
 
408
  if ( $charset == 'UTF-8' ) {
409
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
410
  global $UTF8_TABLES;
411
  include_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_UTF8.php' );
412
  if ( is_array( $UTF8_TABLES ) ) {
@@ -417,7 +199,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
417
  return strtr( $str, $UTF8_TABLES['strtolower'] );
418
  }
419
  }
420
- // phpcs:enable
421
  }
422
 
423
  if ( $mode == 'upper' ) {
@@ -558,21 +339,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
558
  $doc = new DOMDocument();
559
  $doc->loadXML( $htmlstr );
560
 
561
- // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
562
  return $this->domnode_to_array( $doc->documentElement );
563
  }
564
  }
565
 
566
  /**
567
- * DOM Node to Array
568
- *
569
- * @since ?
570
- *
571
  * @param DOMElement $node
 
572
  * @return array|string
573
  */
574
  function domnode_to_array( $node ) {
575
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
576
  switch ( $node->nodeType ) {
577
  case XML_CDATA_SECTION_NODE:
578
  case XML_TEXT_NODE:
@@ -595,15 +371,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
595
  $output = (string) $v;
596
  }
597
  }
598
- // Has attributes but isn't an array.
599
- if ( $node->attributes->length && ! is_array( $output ) ) {
600
  $output = array( '@content' => $output );
601
  } //Change output into an array.
602
  if ( is_array( $output ) ) {
603
  if ( $node->attributes->length ) {
604
  $a = array();
605
- foreach ( $node->attributes as $attr_name => $attr_node ) {
606
- $a[ $attr_name ] = (string) $attr_node->value;
607
  }
608
  $output['@attributes'] = $a;
609
  }
@@ -614,7 +389,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
614
  }
615
  }
616
  }
617
- // phpcs:enable
618
  if ( empty( $output ) ) {
619
  return '';
620
  }
@@ -623,14 +397,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
623
  }
624
 
625
  /**
626
- * Apply Custom Fields
627
- *
628
- * Adds support for using %cf_(name of field)% for using
629
- * custom fields / Advanced Custom Fields in titles / descriptions etc. **
630
- *
631
- * @since ?
632
  *
633
  * @param $format
 
634
  * @return mixed
635
  */
636
  function apply_cf_fields( $format ) {
@@ -638,11 +408,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
638
  }
639
 
640
  /**
641
- * (ACF) Custom Field Replace
642
- *
643
- * @since ?
644
- *
645
  * @param $matches
 
646
  * @return bool|mixed|string
647
  */
648
  function cf_field_replace( $matches ) {
@@ -687,13 +454,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
687
  }
688
 
689
  /**
690
- * Is AIOSEOP Active Blog
691
- *
692
  * Checks if the plugin is active on a given blog by blogid on a multisite.
693
  *
694
- * @since ?
695
- *
696
  * @param bool $bid
 
697
  * @return bool
698
  */
699
  function is_aioseop_active_on_blog( $bid = false ) {
@@ -712,12 +476,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
712
  }
713
 
714
  /**
715
- * Quote List for Regex
716
- *
717
- * @since ?
718
- *
719
  * @param $list
720
  * @param string $quote
 
721
  * @return string
722
  */
723
  function quote_list_for_regex( $list, $quote = '/' ) {
@@ -737,12 +498,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
737
  return $regex;
738
  }
739
 
 
740
  /**
741
- * Is Good Bot
742
- *
743
- * @see Original code, thanks to Sean M. Brown.
744
- * @link http://smbrown.wordpress.com/2009/04/29/verify-googlebot-forward-reverse-dns/
745
- *
746
  * @return bool
747
  */
748
  function is_good_bot() {
@@ -779,10 +536,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
779
  }
780
 
781
  /**
782
- * Default Bad Bots
783
- *
784
- * @since ?
785
- *
786
  * @return array
787
  */
788
  function default_bad_bots() {
@@ -927,10 +680,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
927
  }
928
 
929
  /**
930
- * Is Bad Bot
931
- *
932
- * @since ?
933
- *
934
  * @return bool
935
  */
936
  function is_bad_bot() {
@@ -951,10 +700,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
951
  }
952
 
953
  /**
954
- * Default Bad Referers
955
- *
956
- * @since ?
957
- *
958
  * @return array
959
  */
960
  function default_bad_referers() {
@@ -990,10 +735,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
990
  }
991
 
992
  /**
993
- * Is Bad Referer
994
- *
995
- * @since ?
996
- *
997
  * @return bool
998
  */
999
  function is_bad_referer() {
@@ -1012,10 +753,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1012
  }
1013
 
1014
  /**
1015
- * Allow Bot
1016
- *
1017
- * @since ?
1018
- *
1019
  * @return mixed|void
1020
  */
1021
  function allow_bot() {
@@ -1030,13 +767,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1030
  /**
1031
  * Displays tabs for tabbed locations on a settings page.
1032
  *
1033
- * @since ?
1034
- *
1035
  * @param $location
1036
  */
1037
  function display_tabs( $location ) {
1038
  if ( ( $location != null ) && isset( $locations[ $location ]['tabs'] ) ) {
1039
- // TODO Fix undefined variable.
1040
  $tabs = $locations['location']['tabs'];
1041
  } else {
1042
  $tabs = $this->tabs;
@@ -1054,7 +788,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1054
  }
1055
  ?>
1056
  active"
1057
- href="<?php echo esc_url( add_query_arg( 'tab', $k ) ); ?>"><?php echo $v['name']; ?></a>
1058
  <?php
1059
  }
1060
  ?>
@@ -1064,11 +798,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1064
  }
1065
 
1066
  /**
1067
- * Get Object Labels
1068
- *
1069
- * @since ?
1070
- *
1071
  * @param $post_objs
 
1072
  * @return array
1073
  */
1074
  function get_object_labels( $post_objs ) {
@@ -1086,11 +817,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1086
  }
1087
 
1088
  /**
1089
- * Get Term Labels
1090
- *
1091
- * @since ?
1092
- *
1093
  * @param $post_objs
 
1094
  * @return array
1095
  */
1096
  function get_term_labels( $post_objs ) {
@@ -1105,11 +833,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1105
  }
1106
 
1107
  /**
1108
- * Get Post Type Titles
1109
- *
1110
- * @since ?
1111
- *
1112
  * @param array $args
 
1113
  * @return array
1114
  */
1115
  function get_post_type_titles( $args = array() ) {
@@ -1121,11 +846,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1121
  }
1122
 
1123
  /**
1124
- * Get Taxonomy Titles
1125
- *
1126
- * @since ?
1127
- *
1128
  * @param array $args
 
1129
  * @return array
1130
  */
1131
  function get_taxonomy_titles( $args = array() ) {
@@ -1229,11 +951,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1229
 
1230
  if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
1231
  $buf .= $this->post_data_export(
1232
- '_aioseop',
1233
- array(
1234
  'posts_per_page' => - 1,
1235
  'post_type' => $post_types,
1236
- 'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit' ),
1237
  )
1238
  );
1239
  }
@@ -1249,22 +970,18 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1249
  } // don't re-export all module settings -- pdb
1250
  if ( is_array( $value ) ) {
1251
  $value = "'" . str_replace(
1252
- array( "'", "\n", "\r" ),
1253
- array(
1254
  "\'",
1255
  '\n',
1256
  '\r',
1257
- ),
1258
- trim( serialize( $value ) )
1259
  ) . "'";
1260
  } else {
1261
  $value = str_replace(
1262
- array( "\n", "\r" ),
1263
- array(
1264
  '\n',
1265
  '\r',
1266
- ),
1267
- trim( var_export( $value, true ) )
1268
  );
1269
  }
1270
  $buf .= "$key = $value\n";
@@ -1497,9 +1214,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1497
  * @return bool
1498
  */
1499
  function save_file( $filename, $contents ) {
1500
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1501
  $failed_str = sprintf( __( 'Failed to write file %s!', 'all-in-one-seo-pack' ) . "\n", $filename );
1502
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1503
  $readonly_str = sprintf( __( 'File %s isn\'t writable!', 'all-in-one-seo-pack' ) . "\n", $filename );
1504
  $wpfs = $this->get_filesystem_object();
1505
  if ( is_object( $wpfs ) ) {
@@ -1530,13 +1245,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1530
  if ( is_object( $wpfs ) ) {
1531
  if ( $wpfs->exists( $filename ) ) {
1532
  if ( $wpfs->delete( $filename ) === false ) {
1533
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1534
  $this->output_error( sprintf( __( 'Failed to delete file %s!', 'all-in-one-seo-pack' ) . "\n", $filename ) );
1535
  } else {
1536
  return true;
1537
  }
1538
  } else {
1539
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1540
  $this->output_error( sprintf( __( "File %s doesn't exist!", 'all-in-one-seo-pack' ) . "\n", $filename ) );
1541
  }
1542
  }
@@ -1559,17 +1272,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1559
  $newfile_exists = $wpfs->exists( $newname );
1560
  if ( $file_exists && ! $newfile_exists ) {
1561
  if ( $wpfs->move( $filename, $newname ) === false ) {
1562
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1563
  $this->output_error( sprintf( __( 'Failed to rename file %s!', 'all-in-one-seo-pack' ) . "\n", $filename ) );
1564
  } else {
1565
  return true;
1566
  }
1567
  } else {
1568
  if ( ! $file_exists ) {
1569
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1570
  $this->output_error( sprintf( __( "File %s doesn't exist!", 'all-in-one-seo-pack' ) . "\n", $filename ) );
1571
  } elseif ( $newfile_exists ) {
1572
- /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1573
  $this->output_error( sprintf( __( 'File %s already exists!', 'all-in-one-seo-pack' ) . "\n", $newname ) );
1574
  }
1575
  }
@@ -1667,11 +1377,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1667
  if ( ! empty( $post_thumbnail_id ) ) {
1668
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1669
  if ( is_array( $image ) ) {
1670
- $img[] = array(
1671
- 'type' => 'featured',
1672
- 'id' => $post_thumbnail_id,
1673
- 'link' => $image[0],
1674
- );
1675
  }
1676
  }
1677
  }
@@ -1693,21 +1399,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1693
  )
1694
  );
1695
  if ( ! empty( $image ) ) {
1696
- $img[] = array(
1697
- 'type' => 'meta_key',
1698
- 'id' => $meta_key,
1699
- 'link' => $image,
1700
- );
1701
  }
1702
  }
1703
 
1704
  if ( ! $post->post_modified_gmt != '' ) {
1705
- $wp_query = new WP_Query(
1706
- array(
1707
- 'p' => $post_id,
1708
- 'post_type' => $post->post_type,
1709
- )
1710
- );
1711
  }
1712
  if ( $post->post_type == 'page' ) {
1713
  $wp_query->is_page = true;
@@ -1738,11 +1435,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1738
  foreach ( $attachments as $id => $attachment ) {
1739
  $image = wp_get_attachment_image_src( $id, $size );
1740
  if ( is_array( $image ) ) {
1741
- $img[] = array(
1742
- 'type' => 'attachment',
1743
- 'id' => $id,
1744
- 'link' => $image[0],
1745
- );
1746
  }
1747
  }
1748
  }
@@ -1750,11 +1443,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1750
  preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $post->ID ), $matches );
1751
  if ( isset( $matches ) && ! empty( $matches[1] ) && ! empty( $matches[1][0] ) ) {
1752
  foreach ( $matches[1] as $i => $m ) {
1753
- $img[] = array(
1754
- 'type' => 'post_content',
1755
- 'id' => 'post' . $count ++,
1756
- 'link' => $m,
1757
- );
1758
  }
1759
  }
1760
  wp_reset_postdata();
@@ -1767,12 +1456,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1767
  }
1768
 
1769
  /**
1770
- * Get All Images
1771
- *
1772
- * @since ?
1773
- *
1774
  * @param null $options
1775
  * @param null $p
 
1776
  * @return array
1777
  */
1778
  function get_all_images( $options = null, $p = null ) {
@@ -1798,6 +1484,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1798
  *
1799
  * @return bool|mixed|string
1800
  */
 
1801
  function get_the_image( $options = null, $p = null ) {
1802
 
1803
  if ( $p === null ) {
@@ -1837,11 +1524,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1837
  }
1838
 
1839
  /**
1840
- * Get the Image by Default
1841
- *
1842
- * @since ?
1843
- *
1844
  * @param null $p
 
1845
  * @return string
1846
  */
1847
  function get_the_image_by_default( $p = null ) {
@@ -1849,11 +1533,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1849
  }
1850
 
1851
  /**
1852
- * Get the Image by Meta Key
1853
- *
1854
- * @since ?
1855
- *
1856
  * @param array $args
 
1857
  * @return bool|mixed
1858
  */
1859
  function get_the_image_by_meta_key( $args = array() ) {
@@ -1877,12 +1558,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1877
  }
1878
 
1879
  /**
1880
- * Get the Image by Post Thumbnail
1881
- *
1882
- * @since ?
1883
  * @since 2.4.13 Fixes when content is taxonomy.
1884
  *
1885
  * @param null $p
 
1886
  * @return bool
1887
  */
1888
  function get_the_image_by_post_thumbnail( $p = null ) {
@@ -1914,11 +1593,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1914
  }
1915
 
1916
  /**
1917
- * Get the Image by Attachment
1918
- *
1919
- * @since ?
1920
- *
1921
  * @param null $p
 
1922
  * @return bool
1923
  */
1924
  function get_the_image_by_attachment( $p = null ) {
@@ -1970,11 +1646,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1970
  }
1971
 
1972
  /**
1973
- * Get the Image by Scan
1974
- *
1975
- * @since ?
1976
- *
1977
  * @param null $p
 
1978
  * @return bool
1979
  */
1980
  function get_the_image_by_scan( $p = null ) {
@@ -2075,12 +1748,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2075
  wp_enqueue_style( 'aioseop-module-style-rtl', AIOSEOP_PLUGIN_URL . 'css/modules/aioseop_module-rtl.css', array( 'aioseop-module-style' ), AIOSEOP_VERSION );
2076
  }
2077
 
 
2078
  if ( ! wp_style_is( 'aioseop-jquery-ui', 'registered' ) && ! wp_style_is( 'aioseop-jquery-ui', 'enqueued' ) ) {
 
2079
  wp_enqueue_style(
2080
  'aioseop-jquery-ui',
2081
- AIOSEOP_PLUGIN_URL . 'css/aioseop-jquery-ui.css',
2082
- array(),
2083
- AIOSEOP_VERSION
 
2084
  );
2085
  }
2086
  }
@@ -2159,11 +1835,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2159
  }
2160
 
2161
  /**
2162
- * Localize Script Data
2163
- *
2164
- * @since ?
2165
- *
2166
  * @param $data
 
2167
  * @return array
2168
  */
2169
  function localize_script_data( $data ) {
@@ -2227,10 +1900,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2227
  }
2228
 
2229
  /**
2230
- * Get Admin Links
2231
- *
2232
- * @since ?
2233
- *
2234
  * @return array
2235
  */
2236
  function get_admin_links() {
@@ -2253,8 +1922,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2253
 
2254
  if ( $this->locations === null ) {
2255
  array_unshift(
2256
- $links,
2257
- array(
2258
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
2259
  'title' => $name,
2260
  'id' => $hookname,
@@ -2267,8 +1935,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2267
  if ( $v['type'] === 'settings' ) {
2268
  if ( $k === 'default' ) {
2269
  array_unshift(
2270
- $links,
2271
- array(
2272
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
2273
  'title' => $name,
2274
  'id' => $hookname,
@@ -2283,8 +1950,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2283
  $name = $v['name'];
2284
  }
2285
  array_unshift(
2286
- $links,
2287
- array(
2288
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
2289
  'title' => $name,
2290
  'id' => $this->get_prefix( $k ) . $k,
@@ -2338,12 +2004,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2338
  }
2339
  if ( $this->locations === null ) {
2340
  $hookname = add_submenu_page(
2341
- $parent_slug,
2342
- $name,
2343
- $name,
2344
- apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ),
2345
- plugin_basename( $this->file ),
2346
- array(
2347
  $this,
2348
  'display_settings_page',
2349
  )
@@ -2361,12 +2022,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2361
  $name = $this->name;
2362
  }
2363
  $hookname = add_submenu_page(
2364
- $parent_slug,
2365
- $name,
2366
- $name,
2367
- apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ),
2368
- plugin_basename( $this->file ),
2369
- array(
2370
  $this,
2371
  'display_settings_page',
2372
  )
@@ -2378,12 +2034,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2378
  $name = $v['name'];
2379
  }
2380
  $hookname = add_submenu_page(
2381
- $parent_slug,
2382
- $name,
2383
- $name,
2384
- apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ),
2385
- $this->get_prefix( $k ) . $k,
2386
- array(
2387
  $this,
2388
  "display_settings_page_$k",
2389
  )
@@ -2391,8 +2042,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2391
  }
2392
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2393
  } elseif ( $v['type'] === 'metabox' ) {
2394
- // hack -- make sure this runs anyhow, for now -- pdb.
2395
- $this->setting_options( $k );
2396
  $this->toggle_save_post_hooks( true );
2397
  if ( isset( $v['display'] ) && ! empty( $v['display'] ) ) {
2398
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_metabox_scripts' ), 5 );
@@ -2438,21 +2088,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2438
  $title = $this->plugin_name . ' - ' . $title;
2439
  }
2440
  if ( ! empty( $v['help_link'] ) ) {
2441
- $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" .
2442
- /* translators: This string is used as an action link which users can click on to view the relevant documentation on our website. */
2443
- __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2444
  }
2445
  add_meta_box(
2446
- $v['prefix'] . $k,
2447
- $title,
2448
- array(
2449
  $this,
2450
  'display_metabox',
2451
- ),
2452
- $posttype,
2453
- $v['context'],
2454
- $v['priority'],
2455
- $v
2456
  );
2457
  }
2458
  }
@@ -2636,8 +2278,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2636
  return apply_filters( "{$prefix}output_option", '', $args );
2637
  }
2638
  if ( in_array(
2639
- $options['type'],
2640
- array(
2641
  'multiselect',
2642
  'select',
2643
  'multicheckbox',
@@ -2736,7 +2377,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2736
  if ( isset( $options['count_desc'] ) ) {
2737
  $count_desc = $options['count_desc'];
2738
  } else {
2739
- /* translators: %1$s and %2$s are placeholders and should not be translated. %1$s is replaced with a number, %2$s is replaced with the name of an meta tag field (e.g; "Title", "Description", etc.). */
2740
  $count_desc = __( ' characters. Most search engines use a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
2741
  }
2742
  $buf .= "<br /><input readonly tabindex='-1' type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen( $value ) . "' />"
@@ -2795,7 +2435,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2795
  }
2796
  $input_attr .= " aioseop_{$opts['type']}_type";
2797
 
2798
- $display_row_template = '<div class="aioseop_wrapper%s" id="%s_wrapper"><div class="aioseop_input">%s<div class="aioseop_option_input"><div class="aioseop_option_div" %s>%s</div></div><p style="clear:left"></p></div></div>';
2799
  return sprintf( $display_row_template, $input_attr, $name, $label_text, $id_attr, $this->get_option_html( $args ) );
2800
  }
2801
 
@@ -2860,20 +2500,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2860
  $args = $settings;
2861
  }
2862
  foreach ( $args as $name => $opts ) {
2863
- // List of valid element attributes.
2864
- $attr_list = array( 'class', 'style', 'readonly', 'disabled', 'size', 'placeholder', 'autocomplete' );
2865
  if ( $opts['type'] == 'textarea' ) {
2866
  $attr_list = array_merge( $attr_list, array( 'rows', 'cols' ) );
2867
  }
2868
-
2869
- // Set element attribute values.
2870
  $attr = '';
2871
  foreach ( $attr_list as $a ) {
2872
  if ( isset( $opts[ $a ] ) ) {
2873
  $attr .= ' ' . $a . '="' . esc_attr( $opts[ $a ] ) . '" ';
2874
  }
2875
  }
2876
-
2877
  $opt = '';
2878
  if ( isset( $current_options[ $name ] ) ) {
2879
  $opt = $current_options[ $name ];
@@ -2908,11 +2544,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2908
  }
2909
 
2910
  /**
2911
- * Sanitize Domain
2912
- *
2913
- * @since ?
2914
- *
2915
  * @param $domain
 
2916
  * @return mixed|string
2917
  */
2918
  function sanitize_domain( $domain ) {
@@ -3004,27 +2637,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3004
  $this->update_class_option( $this->options );
3005
  }
3006
 
3007
- /**
3008
- * Handle Settings Updates
3009
- *
3010
- * Handle option resetting and updating.
3011
- *
3012
- * @since ?
3013
  *
3014
  * @param null $location
 
3015
  * @return mixed|string|void
3016
  */
3017
  function handle_settings_updates( $location = null ) {
3018
  $message = '';
3019
  if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
3020
- ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) || ! empty( $_POST['Submit'] ) ) )
3021
  ) {
3022
  $nonce = $_POST['nonce-aioseop'];
3023
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
3024
  die( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all-in-one-seo-pack' ) );
3025
  }
3026
  if ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) ) {
3027
- /* translators: This message confirms that the options have been reset. */
3028
  $message = __( 'Options Reset.', 'all-in-one-seo-pack' );
3029
  if ( isset( $_POST['Submit_All_Default'] ) ) {
3030
  $this->reset_options( $location, true );
@@ -3034,8 +2662,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3034
  }
3035
  }
3036
  if ( ! empty( $_POST['Submit'] ) ) {
3037
- /* translators: %s is a placeholder and will be replace with the name of the plugin. */
3038
- $message = sprintf( __( '%s Options Updated.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
3039
  $default_options = $this->default_options( $location );
3040
  foreach ( $default_options as $k => $v ) {
3041
  if ( isset( $_POST[ $k ] ) ) {
@@ -3087,39 +2714,27 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3087
  }
3088
  ?>
3089
  <div id="icon-aioseop" class="icon32"><br></div>
3090
- <h1><?php echo $name; ?></h1>
3091
  <div id="dropmessage" class="updated" style="display:none;"></div>
3092
  </div>
3093
  <?php
3094
  do_action( 'aioseop_global_settings_header', $location );
3095
  do_action( $this->prefix . 'settings_header', $location );
3096
  ?>
3097
- <form id="aiosp_settings_form" name="dofollow" enctype="multipart/form-data" action="#" method="post">
3098
  <div id="aioseop_top_button">
3099
  <div id="aiosp_ajax_settings_message"></div>
3100
  <?php
3101
 
3102
  $submit_options = array(
3103
- 'action' => array(
3104
- 'type' => 'hidden',
3105
- 'value' => 'aiosp_update_module',
3106
- ),
3107
- 'module' => array(
3108
- 'type' => 'hidden',
3109
- 'value' => get_class( $this ),
3110
- ),
3111
- 'location' => array(
3112
- 'type' => 'hidden',
3113
- 'value' => $location,
3114
- ),
3115
  'nonce-aioseop' => array(
3116
  'type' => 'hidden',
3117
  'value' => wp_create_nonce( 'aioseop-nonce' ),
3118
  ),
3119
- 'page_options' => array(
3120
- 'type' => 'hidden',
3121
- 'value' => 'aiosp_home_description',
3122
- ),
3123
  'Submit' => array(
3124
  'type' => 'submit',
3125
  'class' => 'aioseop_update_options_button button-primary',
@@ -3128,7 +2743,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3128
  'Submit_Default' => array(
3129
  'type' => 'submit',
3130
  'class' => 'aioseop_reset_settings_button button-secondary',
3131
- /* translators: This is a button users can click to reset the settings of a specific module to their default values. %s is a placeholder and will be replaced with the name of a settings menu (e.g. "Performance"). */
3132
  'value' => sprintf( __( 'Reset %s Settings to Defaults', 'all-in-one-seo-pack' ), $name ) . ' &raquo;',
3133
  ),
3134
  );
@@ -3166,34 +2780,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3166
  $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
3167
  }
3168
  add_meta_box(
3169
- $this->get_prefix( $location ) . $l . '_metabox',
3170
- $title,
3171
- array(
3172
  $this,
3173
  'display_options',
3174
  ),
3175
- "{$this->prefix}settings",
3176
- 'advanced',
3177
- 'default',
3178
- $lopts
3179
  );
3180
  }
3181
  }
3182
  } else {
3183
  add_meta_box(
3184
- $this->get_prefix( $location ) . 'metabox',
3185
- $name,
3186
- array(
3187
  $this,
3188
  'display_options',
3189
- ),
3190
- "{$this->prefix}settings",
3191
- 'advanced'
3192
  );
3193
  }
3194
  do_meta_boxes( "{$this->prefix}settings", 'advanced', $location );
3195
  ?>
3196
- <p class="submit" style="clear:both;">
3197
  <?php
3198
  foreach ( array( 'action', 'nonce-aioseop', 'page_options' ) as $submit_field ) {
3199
  if ( isset( $submit_field ) ) {
1
  <?php
2
  /**
 
 
3
  * @package All-in-One-SEO-Pack
4
  * @version 2.3.12.2
5
  */
10
  * The module base class; handles settings, options, menus, metaboxes, etc.
11
  */
12
  abstract class All_in_One_SEO_Pack_Module {
 
 
 
 
 
 
 
13
  public static $instance = null;
 
 
 
 
 
 
 
 
14
  protected $plugin_name;
 
 
 
 
 
 
 
 
15
  protected $name;
 
 
 
 
 
 
 
 
16
  protected $menu_name;
 
 
 
 
 
 
 
 
17
  protected $prefix;
 
 
 
 
 
 
 
 
18
  protected $file;
 
 
 
 
 
 
 
 
 
 
19
  protected $options;
 
 
 
 
 
 
 
 
20
  protected $option_name;
 
 
 
 
 
 
 
 
21
  protected $default_options;
 
 
 
 
 
 
 
 
 
22
  protected $help_text = array();
 
 
 
 
 
 
 
 
 
23
  protected $help_anchors = array();
24
+ protected $locations = null; // organize settings into settings pages with a menu items and/or metaboxes on post types edit screen; optional
25
+ protected $layout = null; // organize settings on a settings page into multiple, separate metaboxes; optional
26
+ protected $tabs = null; // organize layouts on a settings page into multiple, separate tabs; optional
27
+ protected $current_tab = null; // the current tab
28
+ protected $pagehook = null; // the current page hook
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  protected $store_option = false;
 
 
 
 
 
 
 
 
30
  protected $parent_option = 'aioseop_options';
 
 
 
 
 
 
 
 
31
  protected $post_metaboxes = array();
 
 
 
 
 
 
 
 
32
  protected $tabbed_metaboxes = true;
33
+ protected $credentials = false; // used for WP Filesystem
34
+ protected $script_data = null; // used for passing data to JavaScript
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  protected $plugin_path = null;
 
 
 
 
 
 
 
 
36
  protected $pointers = array();
 
 
 
 
 
 
 
 
37
  protected $form = 'dofollow';
38
 
39
  /**
189
  }
190
 
191
  if ( $charset == 'UTF-8' ) {
 
192
  global $UTF8_TABLES;
193
  include_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_UTF8.php' );
194
  if ( is_array( $UTF8_TABLES ) ) {
199
  return strtr( $str, $UTF8_TABLES['strtolower'] );
200
  }
201
  }
 
202
  }
203
 
204
  if ( $mode == 'upper' ) {
339
  $doc = new DOMDocument();
340
  $doc->loadXML( $htmlstr );
341
 
 
342
  return $this->domnode_to_array( $doc->documentElement );
343
  }
344
  }
345
 
346
  /**
 
 
 
 
347
  * @param DOMElement $node
348
+ *
349
  * @return array|string
350
  */
351
  function domnode_to_array( $node ) {
 
352
  switch ( $node->nodeType ) {
353
  case XML_CDATA_SECTION_NODE:
354
  case XML_TEXT_NODE:
371
  $output = (string) $v;
372
  }
373
  }
374
+ if ( $node->attributes->length && ! is_array( $output ) ) { // Has attributes but isn't an array
 
375
  $output = array( '@content' => $output );
376
  } //Change output into an array.
377
  if ( is_array( $output ) ) {
378
  if ( $node->attributes->length ) {
379
  $a = array();
380
+ foreach ( $node->attributes as $attrName => $attrNode ) {
381
+ $a[ $attrName ] = (string) $attrNode->value;
382
  }
383
  $output['@attributes'] = $a;
384
  }
389
  }
390
  }
391
  }
 
392
  if ( empty( $output ) ) {
393
  return '';
394
  }
397
  }
398
 
399
  /**
400
+ * adds support for using %cf_(name of field)% for using custom fields / Advanced Custom Fields in titles / descriptions etc. **
 
 
 
 
 
401
  *
402
  * @param $format
403
+ *
404
  * @return mixed
405
  */
406
  function apply_cf_fields( $format ) {
408
  }
409
 
410
  /**
 
 
 
 
411
  * @param $matches
412
+ *
413
  * @return bool|mixed|string
414
  */
415
  function cf_field_replace( $matches ) {
454
  }
455
 
456
  /**
 
 
457
  * Checks if the plugin is active on a given blog by blogid on a multisite.
458
  *
 
 
459
  * @param bool $bid
460
+ *
461
  * @return bool
462
  */
463
  function is_aioseop_active_on_blog( $bid = false ) {
476
  }
477
 
478
  /**
 
 
 
 
479
  * @param $list
480
  * @param string $quote
481
+ *
482
  * @return string
483
  */
484
  function quote_list_for_regex( $list, $quote = '/' ) {
498
  return $regex;
499
  }
500
 
501
+ // original code thanks to Sean M. Brown -- http://smbrown.wordpress.com/2009/04/29/verify-googlebot-forward-reverse-dns/
502
  /**
 
 
 
 
 
503
  * @return bool
504
  */
505
  function is_good_bot() {
536
  }
537
 
538
  /**
 
 
 
 
539
  * @return array
540
  */
541
  function default_bad_bots() {
680
  }
681
 
682
  /**
 
 
 
 
683
  * @return bool
684
  */
685
  function is_bad_bot() {
700
  }
701
 
702
  /**
 
 
 
 
703
  * @return array
704
  */
705
  function default_bad_referers() {
735
  }
736
 
737
  /**
 
 
 
 
738
  * @return bool
739
  */
740
  function is_bad_referer() {
753
  }
754
 
755
  /**
 
 
 
 
756
  * @return mixed|void
757
  */
758
  function allow_bot() {
767
  /**
768
  * Displays tabs for tabbed locations on a settings page.
769
  *
 
 
770
  * @param $location
771
  */
772
  function display_tabs( $location ) {
773
  if ( ( $location != null ) && isset( $locations[ $location ]['tabs'] ) ) {
 
774
  $tabs = $locations['location']['tabs'];
775
  } else {
776
  $tabs = $this->tabs;
788
  }
789
  ?>
790
  active"
791
+ href="<?php echo esc_url( add_query_arg( 'tab', $k ) ); ?>"><?php echo $v['name']; ?></a>
792
  <?php
793
  }
794
  ?>
798
  }
799
 
800
  /**
 
 
 
 
801
  * @param $post_objs
802
+ *
803
  * @return array
804
  */
805
  function get_object_labels( $post_objs ) {
817
  }
818
 
819
  /**
 
 
 
 
820
  * @param $post_objs
821
+ *
822
  * @return array
823
  */
824
  function get_term_labels( $post_objs ) {
833
  }
834
 
835
  /**
 
 
 
 
836
  * @param array $args
837
+ *
838
  * @return array
839
  */
840
  function get_post_type_titles( $args = array() ) {
846
  }
847
 
848
  /**
 
 
 
 
849
  * @param array $args
850
+ *
851
  * @return array
852
  */
853
  function get_taxonomy_titles( $args = array() ) {
951
 
952
  if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
953
  $buf .= $this->post_data_export(
954
+ '_aioseop', array(
 
955
  'posts_per_page' => - 1,
956
  'post_type' => $post_types,
957
+ 'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit' ),
958
  )
959
  );
960
  }
970
  } // don't re-export all module settings -- pdb
971
  if ( is_array( $value ) ) {
972
  $value = "'" . str_replace(
973
+ array( "'", "\n", "\r" ), array(
 
974
  "\'",
975
  '\n',
976
  '\r',
977
+ ), trim( serialize( $value ) )
 
978
  ) . "'";
979
  } else {
980
  $value = str_replace(
981
+ array( "\n", "\r" ), array(
 
982
  '\n',
983
  '\r',
984
+ ), trim( var_export( $value, true ) )
 
985
  );
986
  }
987
  $buf .= "$key = $value\n";
1214
  * @return bool
1215
  */
1216
  function save_file( $filename, $contents ) {
 
1217
  $failed_str = sprintf( __( 'Failed to write file %s!', 'all-in-one-seo-pack' ) . "\n", $filename );
 
1218
  $readonly_str = sprintf( __( 'File %s isn\'t writable!', 'all-in-one-seo-pack' ) . "\n", $filename );
1219
  $wpfs = $this->get_filesystem_object();
1220
  if ( is_object( $wpfs ) ) {
1245
  if ( is_object( $wpfs ) ) {
1246
  if ( $wpfs->exists( $filename ) ) {
1247
  if ( $wpfs->delete( $filename ) === false ) {
 
1248
  $this->output_error( sprintf( __( 'Failed to delete file %s!', 'all-in-one-seo-pack' ) . "\n", $filename ) );
1249
  } else {
1250
  return true;
1251
  }
1252
  } else {
 
1253
  $this->output_error( sprintf( __( "File %s doesn't exist!", 'all-in-one-seo-pack' ) . "\n", $filename ) );
1254
  }
1255
  }
1272
  $newfile_exists = $wpfs->exists( $newname );
1273
  if ( $file_exists && ! $newfile_exists ) {
1274
  if ( $wpfs->move( $filename, $newname ) === false ) {
 
1275
  $this->output_error( sprintf( __( 'Failed to rename file %s!', 'all-in-one-seo-pack' ) . "\n", $filename ) );
1276
  } else {
1277
  return true;
1278
  }
1279
  } else {
1280
  if ( ! $file_exists ) {
 
1281
  $this->output_error( sprintf( __( "File %s doesn't exist!", 'all-in-one-seo-pack' ) . "\n", $filename ) );
1282
  } elseif ( $newfile_exists ) {
 
1283
  $this->output_error( sprintf( __( 'File %s already exists!', 'all-in-one-seo-pack' ) . "\n", $newname ) );
1284
  }
1285
  }
1377
  if ( ! empty( $post_thumbnail_id ) ) {
1378
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1379
  if ( is_array( $image ) ) {
1380
+ $img[] = array( 'type' => 'featured', 'id' => $post_thumbnail_id, 'link' => $image[0] );
 
 
 
 
1381
  }
1382
  }
1383
  }
1399
  )
1400
  );
1401
  if ( ! empty( $image ) ) {
1402
+ $img[] = array( 'type' => 'meta_key', 'id' => $meta_key, 'link' => $image );
 
 
 
 
1403
  }
1404
  }
1405
 
1406
  if ( ! $post->post_modified_gmt != '' ) {
1407
+ $wp_query = new WP_Query( array( 'p' => $post_id, 'post_type' => $post->post_type ) );
 
 
 
 
 
1408
  }
1409
  if ( $post->post_type == 'page' ) {
1410
  $wp_query->is_page = true;
1435
  foreach ( $attachments as $id => $attachment ) {
1436
  $image = wp_get_attachment_image_src( $id, $size );
1437
  if ( is_array( $image ) ) {
1438
+ $img[] = array( 'type' => 'attachment', 'id' => $id, 'link' => $image[0] );
 
 
 
 
1439
  }
1440
  }
1441
  }
1443
  preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $post->ID ), $matches );
1444
  if ( isset( $matches ) && ! empty( $matches[1] ) && ! empty( $matches[1][0] ) ) {
1445
  foreach ( $matches[1] as $i => $m ) {
1446
+ $img[] = array( 'type' => 'post_content', 'id' => 'post' . $count ++, 'link' => $m );
 
 
 
 
1447
  }
1448
  }
1449
  wp_reset_postdata();
1456
  }
1457
 
1458
  /**
 
 
 
 
1459
  * @param null $options
1460
  * @param null $p
1461
+ *
1462
  * @return array
1463
  */
1464
  function get_all_images( $options = null, $p = null ) {
1484
  *
1485
  * @return bool|mixed|string
1486
  */
1487
+
1488
  function get_the_image( $options = null, $p = null ) {
1489
 
1490
  if ( $p === null ) {
1524
  }
1525
 
1526
  /**
 
 
 
 
1527
  * @param null $p
1528
+ *
1529
  * @return string
1530
  */
1531
  function get_the_image_by_default( $p = null ) {
1533
  }
1534
 
1535
  /**
 
 
 
 
1536
  * @param array $args
1537
+ *
1538
  * @return bool|mixed
1539
  */
1540
  function get_the_image_by_meta_key( $args = array() ) {
1558
  }
1559
 
1560
  /**
 
 
 
1561
  * @since 2.4.13 Fixes when content is taxonomy.
1562
  *
1563
  * @param null $p
1564
+ *
1565
  * @return bool
1566
  */
1567
  function get_the_image_by_post_thumbnail( $p = null ) {
1593
  }
1594
 
1595
  /**
 
 
 
 
1596
  * @param null $p
1597
+ *
1598
  * @return bool
1599
  */
1600
  function get_the_image_by_attachment( $p = null ) {
1646
  }
1647
 
1648
  /**
 
 
 
 
1649
  * @param null $p
1650
+ *
1651
  * @return bool
1652
  */
1653
  function get_the_image_by_scan( $p = null ) {
1748
  wp_enqueue_style( 'aioseop-module-style-rtl', AIOSEOP_PLUGIN_URL . 'css/modules/aioseop_module-rtl.css', array( 'aioseop-module-style' ), AIOSEOP_VERSION );
1749
  }
1750
 
1751
+ // Uses WP Scripts to load the current platform version of jQuery UI CSS.
1752
  if ( ! wp_style_is( 'aioseop-jquery-ui', 'registered' ) && ! wp_style_is( 'aioseop-jquery-ui', 'enqueued' ) ) {
1753
+ $wp_scripts = wp_scripts();
1754
  wp_enqueue_style(
1755
  'aioseop-jquery-ui',
1756
+ '//ajax.aspnetcdn.com/ajax/jquery.ui/' . $wp_scripts->registered['jquery-ui-core']->ver . '/themes/smoothness/jquery-ui.min.css',
1757
+ false,
1758
+ AIOSEOP_VERSION,
1759
+ false
1760
  );
1761
  }
1762
  }
1835
  }
1836
 
1837
  /**
 
 
 
 
1838
  * @param $data
1839
+ *
1840
  * @return array
1841
  */
1842
  function localize_script_data( $data ) {
1900
  }
1901
 
1902
  /**
 
 
 
 
1903
  * @return array
1904
  */
1905
  function get_admin_links() {
1922
 
1923
  if ( $this->locations === null ) {
1924
  array_unshift(
1925
+ $links, array(
 
1926
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
1927
  'title' => $name,
1928
  'id' => $hookname,
1935
  if ( $v['type'] === 'settings' ) {
1936
  if ( $k === 'default' ) {
1937
  array_unshift(
1938
+ $links, array(
 
1939
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
1940
  'title' => $name,
1941
  'id' => $hookname,
1950
  $name = $v['name'];
1951
  }
1952
  array_unshift(
1953
+ $links, array(
 
1954
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
1955
  'title' => $name,
1956
  'id' => $this->get_prefix( $k ) . $k,
2004
  }
2005
  if ( $this->locations === null ) {
2006
  $hookname = add_submenu_page(
2007
+ $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
 
 
 
 
 
2008
  $this,
2009
  'display_settings_page',
2010
  )
2022
  $name = $this->name;
2023
  }
2024
  $hookname = add_submenu_page(
2025
+ $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
 
 
 
 
 
2026
  $this,
2027
  'display_settings_page',
2028
  )
2034
  $name = $v['name'];
2035
  }
2036
  $hookname = add_submenu_page(
2037
+ $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $this->get_prefix( $k ) . $k, array(
 
 
 
 
 
2038
  $this,
2039
  "display_settings_page_$k",
2040
  )
2042
  }
2043
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2044
  } elseif ( $v['type'] === 'metabox' ) {
2045
+ $this->setting_options( $k ); // hack -- make sure this runs anyhow, for now -- pdb
 
2046
  $this->toggle_save_post_hooks( true );
2047
  if ( isset( $v['display'] ) && ! empty( $v['display'] ) ) {
2048
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_metabox_scripts' ), 5 );
2088
  $title = $this->plugin_name . ' - ' . $title;
2089
  }
2090
  if ( ! empty( $v['help_link'] ) ) {
2091
+ $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
 
 
2092
  }
2093
  add_meta_box(
2094
+ $v['prefix'] . $k, $title, array(
 
 
2095
  $this,
2096
  'display_metabox',
2097
+ ), $posttype, $v['context'], $v['priority'], $v
 
 
 
 
2098
  );
2099
  }
2100
  }
2278
  return apply_filters( "{$prefix}output_option", '', $args );
2279
  }
2280
  if ( in_array(
2281
+ $options['type'], array(
 
2282
  'multiselect',
2283
  'select',
2284
  'multicheckbox',
2377
  if ( isset( $options['count_desc'] ) ) {
2378
  $count_desc = $options['count_desc'];
2379
  } else {
 
2380
  $count_desc = __( ' characters. Most search engines use a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
2381
  }
2382
  $buf .= "<br /><input readonly tabindex='-1' type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen( $value ) . "' />"
2435
  }
2436
  $input_attr .= " aioseop_{$opts['type']}_type";
2437
 
2438
+ $display_row_template = '<div class="aioseop_wrapper%s" id="%s_wrapper"><div class="aioseop_input">%s<span class="aioseop_option_input"><div class="aioseop_option_div" %s>%s</div></span><p style="clear:left"></p></div></div>';
2439
  return sprintf( $display_row_template, $input_attr, $name, $label_text, $id_attr, $this->get_option_html( $args ) );
2440
  }
2441
 
2500
  $args = $settings;
2501
  }
2502
  foreach ( $args as $name => $opts ) {
2503
+ $attr_list = array( 'class', 'style', 'readonly', 'disabled', 'size', 'placeholder' );
 
2504
  if ( $opts['type'] == 'textarea' ) {
2505
  $attr_list = array_merge( $attr_list, array( 'rows', 'cols' ) );
2506
  }
 
 
2507
  $attr = '';
2508
  foreach ( $attr_list as $a ) {
2509
  if ( isset( $opts[ $a ] ) ) {
2510
  $attr .= ' ' . $a . '="' . esc_attr( $opts[ $a ] ) . '" ';
2511
  }
2512
  }
 
2513
  $opt = '';
2514
  if ( isset( $current_options[ $name ] ) ) {
2515
  $opt = $current_options[ $name ];
2544
  }
2545
 
2546
  /**
 
 
 
 
2547
  * @param $domain
2548
+ *
2549
  * @return mixed|string
2550
  */
2551
  function sanitize_domain( $domain ) {
2637
  $this->update_class_option( $this->options );
2638
  }
2639
 
2640
+ /** handle option resetting and updating
 
 
 
 
 
2641
  *
2642
  * @param null $location
2643
+ *
2644
  * @return mixed|string|void
2645
  */
2646
  function handle_settings_updates( $location = null ) {
2647
  $message = '';
2648
  if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
2649
+ ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) || ! empty( $_POST['Submit'] ) ) )
2650
  ) {
2651
  $nonce = $_POST['nonce-aioseop'];
2652
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
2653
  die( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all-in-one-seo-pack' ) );
2654
  }
2655
  if ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) ) {
 
2656
  $message = __( 'Options Reset.', 'all-in-one-seo-pack' );
2657
  if ( isset( $_POST['Submit_All_Default'] ) ) {
2658
  $this->reset_options( $location, true );
2662
  }
2663
  }
2664
  if ( ! empty( $_POST['Submit'] ) ) {
2665
+ $message = __( 'All in One SEO Options Updated.', 'all-in-one-seo-pack' );
 
2666
  $default_options = $this->default_options( $location );
2667
  foreach ( $default_options as $k => $v ) {
2668
  if ( isset( $_POST[ $k ] ) ) {
2714
  }
2715
  ?>
2716
  <div id="icon-aioseop" class="icon32"><br></div>
2717
+ <h2><?php echo $name; ?></h2>
2718
  <div id="dropmessage" class="updated" style="display:none;"></div>
2719
  </div>
2720
  <?php
2721
  do_action( 'aioseop_global_settings_header', $location );
2722
  do_action( $this->prefix . 'settings_header', $location );
2723
  ?>
2724
+ <form id="aiosp_settings_form" name="dofollow" enctype="multipart/form-data" action="" method="post">
2725
  <div id="aioseop_top_button">
2726
  <div id="aiosp_ajax_settings_message"></div>
2727
  <?php
2728
 
2729
  $submit_options = array(
2730
+ 'action' => array( 'type' => 'hidden', 'value' => 'aiosp_update_module' ),
2731
+ 'module' => array( 'type' => 'hidden', 'value' => get_class( $this ) ),
2732
+ 'location' => array( 'type' => 'hidden', 'value' => $location ),
 
 
 
 
 
 
 
 
 
2733
  'nonce-aioseop' => array(
2734
  'type' => 'hidden',
2735
  'value' => wp_create_nonce( 'aioseop-nonce' ),
2736
  ),
2737
+ 'page_options' => array( 'type' => 'hidden', 'value' => 'aiosp_home_description' ),
 
 
 
2738
  'Submit' => array(
2739
  'type' => 'submit',
2740
  'class' => 'aioseop_update_options_button button-primary',
2743
  'Submit_Default' => array(
2744
  'type' => 'submit',
2745
  'class' => 'aioseop_reset_settings_button button-secondary',
 
2746
  'value' => sprintf( __( 'Reset %s Settings to Defaults', 'all-in-one-seo-pack' ), $name ) . ' &raquo;',
2747
  ),
2748
  );
2780
  $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2781
  }
2782
  add_meta_box(
2783
+ $this->get_prefix( $location ) . $l . '_metabox', $title, array(
 
 
2784
  $this,
2785
  'display_options',
2786
  ),
2787
+ "{$this->prefix}settings", 'advanced', 'default', $lopts
 
 
 
2788
  );
2789
  }
2790
  }
2791
  } else {
2792
  add_meta_box(
2793
+ $this->get_prefix( $location ) . 'metabox', $name, array(
 
 
2794
  $this,
2795
  'display_options',
2796
+ ), "{$this->prefix}settings", 'advanced'
 
 
2797
  );
2798
  }
2799
  do_meta_boxes( "{$this->prefix}settings", 'advanced', $location );
2800
  ?>
2801
+ <p class="submit" style="clear:both;">
2802
  <?php
2803
  foreach ( array( 'action', 'nonce-aioseop', 'page_options' ) as $submit_field ) {
2804
  if ( isset( $submit_field ) ) {
admin/aioseop_module_manager.php CHANGED
@@ -14,49 +14,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
14
  * Class All_in_One_SEO_Pack_Module_Manager
15
  */
16
  class All_in_One_SEO_Pack_Module_Manager {
17
- /**
18
- * Modules
19
- *
20
- * @since ?
21
- *
22
- * @var array $modules
23
- */
24
  protected $modules = array();
25
-
26
- /**
27
- * Settings Update
28
- *
29
- * @since ?
30
- *
31
- * @var bool $settings_update
32
- */
33
  protected $settings_update = false;
34
-
35
- /**
36
- * Settings Reset
37
- *
38
- * @since ?
39
- *
40
- * @var bool $settings_reset
41
- */
42
  protected $settings_reset = false;
43
-
44
- /**
45
- * Settings Reset All
46
- *
47
- * @since ?
48
- *
49
- * @var bool $settings_reset_all
50
- */
51
  protected $settings_reset_all = false;
52
-
53
- /**
54
- * Module Settings Update
55
- *
56
- * @since ?
57
- *
58
- * @var bool $module_settings_update
59
- */
60
  protected $module_settings_update = false;
61
 
62
  /**
@@ -76,7 +37,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
76
  $reset_all = ( isset( $_POST['Submit_All_Default'] ) && '' !== $_POST['Submit_All_Default'] );
77
  $reset = ( ( isset( $_POST['Submit_Default'] ) && '' !== $_POST['Submit_Default'] ) || $reset_all );
78
  $update = ( isset( $_POST['action'] ) && $_POST['action']
79
- && ( ( isset( $_POST['Submit'] ) && '' !== $_POST['Submit'] ) || $reset )
80
  );
81
  if ( $update ) {
82
  if ( $reset ) {
@@ -96,11 +57,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
96
  }
97
 
98
  /**
99
- * Return Module
100
- *
101
- * @since ?
102
  *
103
  * @param $class
 
104
  * @return $this|bool|mixed
105
  */
106
  function return_module( $class ) {
@@ -122,10 +82,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
122
  }
123
 
124
  /**
125
- * Get Loaded Module List
126
- *
127
- * @since ?
128
- *
129
  * @return array
130
  */
131
  function get_loaded_module_list() {
@@ -142,12 +98,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
142
  }
143
 
144
  /**
145
- * Do Load Module
146
- *
147
- * @since ?
148
- *
149
  * @param $mod Module.
150
  * @param null $args
 
151
  * @return bool
152
  */
153
  function do_load_module( $mod, $args = null ) {
@@ -169,22 +122,18 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
169
  $this->modules[ $mod ] = $module_class;
170
  if ( is_user_logged_in() && is_admin_bar_showing() && current_user_can( 'aiosp_manage_seo' ) ) {
171
  add_action(
172
- 'admin_bar_menu',
173
- array(
174
  $module_class,
175
  'add_admin_bar_submenu',
176
- ),
177
- 1001 + $module_class->menu_order()
178
  );
179
  }
180
  if ( is_admin() ) {
181
  add_action(
182
- 'aioseop_modules_add_menus',
183
- array(
184
  $module_class,
185
  'add_menu',
186
- ),
187
- $module_class->menu_order()
188
  );
189
  add_action( 'aiosoep_options_reset', array( $module_class, 'reset_options' ) );
190
  add_filter( 'aioseop_export_settings', array( $module_class, 'settings_export' ) );
@@ -194,11 +143,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
194
  }
195
 
196
  /**
197
- * Load Module
198
- *
199
- * @since ?
200
- *
201
  * @param $mod
 
202
  * @return bool
203
  */
204
  function load_module( $mod ) {
@@ -214,11 +160,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
214
  if ( 'performance' === $mod && ! is_super_admin() ) {
215
  return false;
216
  }
217
- if (
218
- ( 'file_editor' === $mod )
219
- && ( ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
220
- || ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
221
- || ! is_super_admin() )
222
  ) {
223
  return false;
224
  }
14
  * Class All_in_One_SEO_Pack_Module_Manager
15
  */
16
  class All_in_One_SEO_Pack_Module_Manager {
 
 
 
 
 
 
 
17
  protected $modules = array();
 
 
 
 
 
 
 
 
18
  protected $settings_update = false;
 
 
 
 
 
 
 
 
19
  protected $settings_reset = false;
 
 
 
 
 
 
 
 
20
  protected $settings_reset_all = false;
 
 
 
 
 
 
 
 
21
  protected $module_settings_update = false;
22
 
23
  /**
37
  $reset_all = ( isset( $_POST['Submit_All_Default'] ) && '' !== $_POST['Submit_All_Default'] );
38
  $reset = ( ( isset( $_POST['Submit_Default'] ) && '' !== $_POST['Submit_Default'] ) || $reset_all );
39
  $update = ( isset( $_POST['action'] ) && $_POST['action']
40
+ && ( ( isset( $_POST['Submit'] ) && '' !== $_POST['Submit'] ) || $reset )
41
  );
42
  if ( $update ) {
43
  if ( $reset ) {
57
  }
58
 
59
  /**
60
+ * Return module.
 
 
61
  *
62
  * @param $class
63
+ *
64
  * @return $this|bool|mixed
65
  */
66
  function return_module( $class ) {
82
  }
83
 
84
  /**
 
 
 
 
85
  * @return array
86
  */
87
  function get_loaded_module_list() {
98
  }
99
 
100
  /**
 
 
 
 
101
  * @param $mod Module.
102
  * @param null $args
103
+ *
104
  * @return bool
105
  */
106
  function do_load_module( $mod, $args = null ) {
122
  $this->modules[ $mod ] = $module_class;
123
  if ( is_user_logged_in() && is_admin_bar_showing() && current_user_can( 'aiosp_manage_seo' ) ) {
124
  add_action(
125
+ 'admin_bar_menu', array(
 
126
  $module_class,
127
  'add_admin_bar_submenu',
128
+ ), 1001 + $module_class->menu_order()
 
129
  );
130
  }
131
  if ( is_admin() ) {
132
  add_action(
133
+ 'aioseop_modules_add_menus', array(
 
134
  $module_class,
135
  'add_menu',
136
+ ), $module_class->menu_order()
 
137
  );
138
  add_action( 'aiosoep_options_reset', array( $module_class, 'reset_options' ) );
139
  add_filter( 'aioseop_export_settings', array( $module_class, 'settings_export' ) );
143
  }
144
 
145
  /**
 
 
 
 
146
  * @param $mod
147
+ *
148
  * @return bool
149
  */
150
  function load_module( $mod ) {
160
  if ( 'performance' === $mod && ! is_super_admin() ) {
161
  return false;
162
  }
163
+ if ( ( 'file_editor' === $mod )
164
+ && ( ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
165
+ || ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
166
+ || ! is_super_admin() )
 
167
  ) {
168
  return false;
169
  }
admin/class-aioseop-helper.php CHANGED
@@ -116,12 +116,12 @@ class AIOSEOP_Helper {
116
  // phpcs:disable WordPress.WP.I18n.UnorderedPlaceholdersText
117
  $rtn_help_text = array(
118
  // General Settings.
119
- 'aiosp_can' => __( 'This option will automatically generate Canonical URLs for your entire WordPress installation. This will help to prevent duplicate content penalties by Google.', 'all-in-one-seo-pack' ),
120
  'aiosp_no_paged_canonical_links' => __( 'Checking this option will set the Canonical URL for all paginated content to the first page.', 'all-in-one-seo-pack' ),
121
  'aiosp_use_original_title' => __( 'Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.', 'all-in-one-seo-pack' ),
122
- 'aiosp_schema_markup' => __( 'This enables Schema.org structured data markup for rich snippets in search results.', 'all-in-one-seo-pack' ),
123
  /* 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. */
124
- 'aiosp_do_log' => sprintf( __( 'Check this and %s will create a log of important events (all-in-one-seo-pack.log) in the wp-content directory which might help debugging. Make sure this directory is writable.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
125
 
126
  // Home Page Settings.
127
  'aiosp_home_title' => __( 'As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.', 'all-in-one-seo-pack' ),
@@ -148,8 +148,7 @@ class AIOSEOP_Helper {
148
  '<dd>' . sprintf(
149
  __( 'The %1$s of the author of the %2$s', 'all-in-one-seo-pack' ),
150
  /* translators: The "nicename" is the sanitized version of a username. */
151
- __( 'nicename', 'all-in-one-seo-pack' ),
152
- __( 'Homepage', 'all-in-one-seo-pack' )
153
  ) . '</dd>' .
154
  '<dt>%page_author_firstname%</dt>' .
155
  '<dd>' . sprintf( __( 'The %1$s of the author of the %2$s', 'all-in-one-seo-pack' ), __( 'first name', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' ) ) . '</dd>' .
@@ -161,11 +160,6 @@ class AIOSEOP_Helper {
161
  '<dt>%current_year%</dt>' .
162
  /* translators: %s is replaced with a time related term such as Date, Year, Month, etc. */
163
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
164
- '<dt>%current_month%</dt>' .
165
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
166
- '<dt>%current_month_i18n%</dt>' .
167
- /* translators: %s is replaced with a time related term such as Date, Year, Month, etc. */
168
- '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
169
  '<dt>%cf_fieldname%</dt>' .
170
  '<dd>' . __( 'The name of a custom field', 'all-in-one-seo-pack' ) . '</dd>' .
171
  '</dl>',
@@ -192,10 +186,6 @@ class AIOSEOP_Helper {
192
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
193
  '<dt>%current_year%</dt>' .
194
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
195
- '<dt>%current_month%</dt>' .
196
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
197
- '<dt>%current_month_i18n%</dt>' .
198
- '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
199
  '<dt>%post_date%</dt>' .
200
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ), __( 'Page', 'all-in-one-seo-pack' ) ) . '</dd>' .
201
  '<dt>%post_year%</dt>' .
@@ -230,10 +220,6 @@ class AIOSEOP_Helper {
230
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
231
  '<dt>%current_year%</dt>' .
232
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
233
- '<dt>%current_month%</dt>' .
234
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
235
- '<dt>%current_month_i18n%</dt>' .
236
- '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
237
  '<dt>%post_date%</dt>' .
238
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ), __( 'Post', 'all-in-one-seo-pack' ) ) . '</dd>' .
239
  '<dt>%post_year%</dt>' .
@@ -257,11 +243,7 @@ class AIOSEOP_Helper {
257
  /* translators: %s is replaced with a content type such as Post, Page, etc. */
258
  '<dd>' . sprintf( __( 'The description of the %s', 'all-in-one-seo-pack' ), __( 'Category', 'all-in-one-seo-pack' ) ) . '</dd>' .
259
  '<dt>%current_year%</dt>' .
260
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
261
- '<dt>%current_month%</dt>' .
262
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
263
- '<dt>%current_month_i18n%</dt>' .
264
- '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
265
  '</dl>',
266
  'aiosp_archive_title_format' =>
267
  __( 'This controls the format of the title tag for Custom Post Archives.', 'all-in-one-seo-pack' ) . '<br />' .
@@ -345,14 +327,9 @@ class AIOSEOP_Helper {
345
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
346
  '<dt>%current_year%</dt>' .
347
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
348
- '<dt>%current_month%</dt>' .
349
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
350
- '<dt>%current_month_i18n%</dt>' .
351
- '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
352
  '<dt>%post_date%</dt>' .
353
  '<dd>' . sprintf(
354
- __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ),
355
- __( 'date', 'all-in-one-seo-pack' ),
356
  /* translators: "Post/Page" are the two main content types in WordPress. */
357
  __( 'Post/Page', 'all-in-one-seo-pack' )
358
  ) . '</dd>' .
@@ -402,7 +379,7 @@ class AIOSEOP_Helper {
402
  'aiosp_baidu_verify' => __( 'Enter your verification code here to verify your site with Baidu Webmaster Tools.', 'all-in-one-seo-pack' ),
403
 
404
  // Google Settings.
405
-
406
  'aiosp_google_analytics_id' => __( 'Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.', 'all-in-one-seo-pack' ),
407
  'aiosp_ga_advanced_options' => __( 'Check to use advanced Google Analytics options.', 'all-in-one-seo-pack' ),
408
  'aiosp_ga_domain' => __( 'Enter your domain name without the http:// to set your cookie domain.', 'all-in-one-seo-pack' ),
@@ -415,16 +392,6 @@ class AIOSEOP_Helper {
415
  'aiosp_ga_link_attribution' => __( 'This enables support for the Enhanced Link Attribution in Google Analytics.', 'all-in-one-seo-pack' ),
416
  'aiosp_ga_enhanced_ecommerce' => __( 'This enables support for the Enhanced Ecommerce in Google Analytics.', 'all-in-one-seo-pack' ),
417
 
418
- // Schema Settings.
419
- 'aiosp_schema_search_results_page' => __( 'Select this to output markup that notifies Google to display the Sitelinks Search Box within certain search results.', 'all-in-one-seo-pack' ),
420
- 'aiosp_schema_social_profile_links' => __( 'Add the URLs for your website\'s social profiles here (Facebook, Twitter, Instagram, LinkedIn, etc.), one per line. These may be used in rich search results such as Google Knowledge Graph.', 'all-in-one-seo-pack' ),
421
- 'aiosp_schema_site_represents' => __( 'Select whether your website is primarily for a person or an organization.', 'all-in-one-seo-pack' ),
422
- 'aiosp_schema_organization_name' => __( 'Enter your organization or business name.', 'all-in-one-seo-pack' ),
423
- 'aiosp_schema_organization_logo' => __( 'Add a logo that represents your organization or business. The image must be in PNG, JPG or GIF format and a minimum size of 112px by 112px. If no image is selected, then the plugin will try to use the logo in the Customizer settings.', 'all-in-one-seo-pack' ),
424
- 'aiosp_schema_person_user' => __( 'Select the primary owner for your site from the list of users. Only users with the role of Author, Editor or Administrator will be listed here.', 'all-in-one-seo-pack' ),
425
- 'aiosp_schema_phone_number' => __( 'Enter the primary phone number your organization or business. You must include the country code and the phone number must use the standard format for your country, for example: 1-888-888-8888.', 'all-in-one-seo-pack' ),
426
- 'aiosp_schema_contact_type' => __( 'Select the type of contact for the phone number you have entered.', 'all-in-one-seo-pack' ),
427
-
428
  // Noindex Settings.
429
  'aiosp_cpostnoindex' => __( 'Set the default NOINDEX setting for each Post Type.', 'all-in-one-seo-pack' ),
430
  'aiosp_cpostnofollow' => __( 'Set the default NOFOLLOW setting for each Post Type.', 'all-in-one-seo-pack' ),
@@ -459,6 +426,9 @@ class AIOSEOP_Helper {
459
  'aiosp_use_tags_as_keywords' => __( 'Check this if you want your tags for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).', 'all-in-one-seo-pack' ),
460
  'aiosp_dynamic_postspage_keywords' => __( 'Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) and your archive pages to be dynamically generated from the keywords of the posts showing on that page. If unchecked, it will use the keywords set in the edit page screen for the posts page.', 'all-in-one-seo-pack' ),
461
 
 
 
 
462
  );
463
 
464
  // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment
@@ -495,10 +465,6 @@ class AIOSEOP_Helper {
495
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
496
  '<dt>%current_year%</dt>' .
497
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
498
- '<dt>%current_month%</dt>' .
499
- '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
500
- '<dt>%current_month_i18n%</dt>' .
501
- '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ) ) . '</dd>' .
502
  '<dt>%post_date%</dt>' .
503
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ), $name ) . '</dd>' .
504
  '<dt>%post_year%</dt>' .
@@ -516,7 +482,7 @@ class AIOSEOP_Helper {
516
  'aiosp_can' => 'https://semperplugins.com/documentation/general-settings/#canonical-urls',
517
  'aiosp_no_paged_canonical_links' => 'https://semperplugins.com/documentation/general-settings/#no-pagination-for-canonical-urls',
518
  'aiosp_use_original_title' => 'https://semperplugins.com/documentation/general-settings/#use-original-title',
519
- 'aiosp_schema_markup' => 'https://semperplugins.com/documentation/schema-settings/#use-schema-markup',
520
  'aiosp_do_log' => 'https://semperplugins.com/documentation/general-settings/#log-important-events',
521
 
522
  // Home Page Settings.
@@ -553,6 +519,7 @@ class AIOSEOP_Helper {
553
  'aiosp_baidu_verify' => 'https://semperplugins.com/documentation/baidu-webmaster-verification/',
554
 
555
  // Google Settings.
 
556
  'aiosp_google_analytics_id' => 'https://semperplugins.com/documentation/setting-up-google-analytics/',
557
  'aiosp_ga_advanced_options' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/',
558
  'aiosp_ga_domain' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#tracking-domain',
@@ -565,16 +532,6 @@ class AIOSEOP_Helper {
565
  'aiosp_ga_link_attribution' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#enhanced-link-attribution',
566
  'aiosp_ga_enhanced_ecommerce' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#enhanced-ecommerce',
567
 
568
- // Schema Settings.
569
- 'aiosp_schema_search_results_page' => 'https://semperplugins.com/documentation/schema-settings/#display-sitelinks-search-box',
570
- 'aiosp_schema_social_profile_links' => 'https://semperplugins.com/documentation/schema-settings/#social-profile-links',
571
- 'aiosp_schema_site_represents' => 'https://semperplugins.com/documentation/schema-settings/#person-or-organization',
572
- 'aiosp_schema_organization_name' => 'https://semperplugins.com/documentation/schema-settings/#organization-name',
573
- 'aiosp_schema_organization_logo' => 'https://semperplugins.com/documentation/schema-settings/#organization-logo',
574
- 'aiosp_schema_person_user' => 'https://semperplugins.com/documentation/schema-settings/#persons-username',
575
- 'aiosp_schema_phone_number' => 'https://semperplugins.com/documentation/schema-settings/#phone-number',
576
- 'aiosp_schema_contact_type' => 'https://semperplugins.com/documentation/schema-settings/#type-of-contact',
577
-
578
  // Noindex Settings.
579
  'aiosp_cpostnoindex' => 'https://semperplugins.com/documentation/noindex-settings/#noindex',
580
  'aiosp_cpostnofollow' => 'https://semperplugins.com/documentation/noindex-settings/#nofollow',
@@ -608,6 +565,8 @@ class AIOSEOP_Helper {
608
  'aiosp_use_tags_as_keywords' => 'https://semperplugins.com/documentation/keyword-settings/#use-tags-for-meta-keywords',
609
  'aiosp_dynamic_postspage_keywords' => 'https://semperplugins.com/documentation/keyword-settings/#dynamically-generate-keywords-for-posts-page',
610
 
 
 
611
  );
612
 
613
  foreach ( $help_doc_link as $k1_slug => $v1_url ) {
@@ -698,18 +657,18 @@ class AIOSEOP_Helper {
698
  'aiosp_sitemap_excl_pages' => __( 'Use page slugs or page IDs, separated by commas, to exclude pages from the sitemap.', 'all-in-one-seo-pack' ),
699
 
700
  // Priorities.
701
- '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' ) ),
702
- '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' ) ),
703
- 'aiosp_sitemap_prio_taxonomies' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Taxonomies', 'all-in-one-seo-pack' ) ),
704
- 'aiosp_sitemap_prio_archive' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Archive Pages', 'all-in-one-seo-pack' ) ),
705
- 'aiosp_sitemap_prio_author' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Author Pages', 'all-in-one-seo-pack' ) ),
706
 
707
  // Frequencies.
708
- 'aiosp_sitemap_freq_homepage' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' ) ),
709
- 'aiosp_sitemap_freq_post' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Posts', 'all-in-one-seo-pack' ) ),
710
- 'aiosp_sitemap_freq_taxonomies' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Taxonomies', 'all-in-one-seo-pack' ) ),
711
- 'aiosp_sitemap_freq_archive' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Archive Pages', 'all-in-one-seo-pack' ) ),
712
- 'aiosp_sitemap_freq_author' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Author Pages', 'all-in-one-seo-pack' ) ),
713
 
714
  );
715
 
@@ -755,7 +714,7 @@ class AIOSEOP_Helper {
755
  'aiosp_sitemap_addl_mod' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
756
 
757
  // Exclude Items.
758
- 'aiosp_sitemap_excl_terms' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items',
759
  'aiosp_sitemap_excl_pages' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items',
760
 
761
  // Priorities.
@@ -824,6 +783,11 @@ class AIOSEOP_Helper {
824
  'aiosp_opengraph_dimgheight' => __( 'This option lets you set a default height for your images, where unspecified.', 'all-in-one-seo-pack' ),
825
  'aiosp_opengraph_meta_key' => __( 'Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.', 'all-in-one-seo-pack' ),
826
 
 
 
 
 
 
827
  // Facebook Settings.
828
  'aiosp_opengraph_key' => __( 'Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/', 'all-in-one-seo-pack' ),
829
  'aiosp_opengraph_appid' => __( 'Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register', 'all-in-one-seo-pack' ),
@@ -893,6 +857,11 @@ class AIOSEOP_Helper {
893
  'aiosp_opengraph_dimgheight' => 'https://semperplugins.com/documentation/social-meta-module/#default-image-height',
894
  'aiosp_opengraph_meta_key' => 'https://semperplugins.com/documentation/social-meta-module/#use-custom-field-for-image',
895
 
 
 
 
 
 
896
  // Facebook Settings.
897
  'aiosp_opengraph_key' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-admin-id',
898
  'aiosp_opengraph_appid' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-app-id',
@@ -951,9 +920,9 @@ class AIOSEOP_Helper {
951
  */
952
  private function help_text_robots_generator() {
953
  $rtn_help_text = array(
954
- 'aiosp_robots_type' => __( 'Use the dropdown to select whether you want to allow or block access to the specified directory or file.', 'all-in-one-seo-pack' ),
955
- 'aiosp_robots_agent' => __( 'Enter the name of a User Agent here. You can use the wildcard * to allow or block all robots. A list of User Agents can be found <a target="_blank" rel="noopener noreferrer" href="http://www.robotstxt.org/db.html">here</a>.', 'all-in-one-seo-pack' ),
956
- 'aiosp_robots_path' => __( 'Enter a valid path to a directory or file, for example: /wp-admin/ or /wp-admin/admin-ajax.php', 'all-in-one-seo-pack' ),
957
  );
958
 
959
  return $rtn_help_text;
@@ -987,7 +956,7 @@ class AIOSEOP_Helper {
987
  $rtn_help_text = array(
988
  // Possible HTML link concept IF links become usable inside jQuery UI Tooltips.
989
  /* translators: %1$s and 12$s are placeholders, which means these should not be translated. These will be replaced with the name of the plugin, All in One SEO Pack. */
990
- 'aiosp_importer_exporter_import_submit' => sprintf( __( 'Choose a valid %1$s .ini file and click &quot;Import&quot; to import options from a previous state or install of %2$s.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, AIOSEOP_PLUGIN_NAME ),
991
  'aiosp_importer_exporter_export_choices' => __( 'You may choose to export settings from active modules, and content from post data.', 'all-in-one-seo-pack' ),
992
  /* 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. */
993
  'aiosp_importer_exporter_export_post_types' => sprintf( __( 'Select which Post Types you want to export your %s meta data for.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
116
  // phpcs:disable WordPress.WP.I18n.UnorderedPlaceholdersText
117
  $rtn_help_text = array(
118
  // General Settings.
119
+ 'aiosp_can' => __( 'This option will automatically generate Canonical URLs for your entire WordPress installation. This will help to prevent duplicate content penalties by Google.', 'all-in-one-seo-pack' ),
120
  'aiosp_no_paged_canonical_links' => __( 'Checking this option will set the Canonical URL for all paginated content to the first page.', 'all-in-one-seo-pack' ),
121
  'aiosp_use_original_title' => __( 'Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.', 'all-in-one-seo-pack' ),
122
+ 'aiosp_schema_markup' => __( 'Check this to support Schema.org markup, i.e., itemprop on supported metadata.', 'all-in-one-seo-pack' ),
123
  /* 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. */
124
+ 'aiosp_do_log' => sprintf( __( 'Check this and %s will create a log of important events (all-in-one-seo-pack.log) in its plugin directory which might help debugging. Make sure this directory is writable.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
125
 
126
  // Home Page Settings.
127
  'aiosp_home_title' => __( 'As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.', 'all-in-one-seo-pack' ),
148
  '<dd>' . sprintf(
149
  __( 'The %1$s of the author of the %2$s', 'all-in-one-seo-pack' ),
150
  /* translators: The "nicename" is the sanitized version of a username. */
151
+ __( 'nicename', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' )
 
152
  ) . '</dd>' .
153
  '<dt>%page_author_firstname%</dt>' .
154
  '<dd>' . sprintf( __( 'The %1$s of the author of the %2$s', 'all-in-one-seo-pack' ), __( 'first name', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' ) ) . '</dd>' .
160
  '<dt>%current_year%</dt>' .
161
  /* translators: %s is replaced with a time related term such as Date, Year, Month, etc. */
162
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
 
 
 
 
 
163
  '<dt>%cf_fieldname%</dt>' .
164
  '<dd>' . __( 'The name of a custom field', 'all-in-one-seo-pack' ) . '</dd>' .
165
  '</dl>',
186
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
187
  '<dt>%current_year%</dt>' .
188
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
 
 
 
 
189
  '<dt>%post_date%</dt>' .
190
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ), __( 'Page', 'all-in-one-seo-pack' ) ) . '</dd>' .
191
  '<dt>%post_year%</dt>' .
220
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
221
  '<dt>%current_year%</dt>' .
222
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
 
 
 
 
223
  '<dt>%post_date%</dt>' .
224
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ), __( 'Post', 'all-in-one-seo-pack' ) ) . '</dd>' .
225
  '<dt>%post_year%</dt>' .
243
  /* translators: %s is replaced with a content type such as Post, Page, etc. */
244
  '<dd>' . sprintf( __( 'The description of the %s', 'all-in-one-seo-pack' ), __( 'Category', 'all-in-one-seo-pack' ) ) . '</dd>' .
245
  '<dt>%current_year%</dt>' .
246
+ '<dd>' . __( 'The current year', 'all-in-one-seo-pack' ) . '</dd>' .
 
 
 
 
247
  '</dl>',
248
  'aiosp_archive_title_format' =>
249
  __( 'This controls the format of the title tag for Custom Post Archives.', 'all-in-one-seo-pack' ) . '<br />' .
327
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
328
  '<dt>%current_year%</dt>' .
329
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
 
 
 
 
330
  '<dt>%post_date%</dt>' .
331
  '<dd>' . sprintf(
332
+ __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ),
 
333
  /* translators: "Post/Page" are the two main content types in WordPress. */
334
  __( 'Post/Page', 'all-in-one-seo-pack' )
335
  ) . '</dd>' .
379
  'aiosp_baidu_verify' => __( 'Enter your verification code here to verify your site with Baidu Webmaster Tools.', 'all-in-one-seo-pack' ),
380
 
381
  // Google Settings.
382
+ 'aiosp_google_sitelinks_search' => __( 'Add markup to display the Google Sitelinks Search Box next to your search results in Google.', 'all-in-one-seo-pack' ),
383
  'aiosp_google_analytics_id' => __( 'Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.', 'all-in-one-seo-pack' ),
384
  'aiosp_ga_advanced_options' => __( 'Check to use advanced Google Analytics options.', 'all-in-one-seo-pack' ),
385
  'aiosp_ga_domain' => __( 'Enter your domain name without the http:// to set your cookie domain.', 'all-in-one-seo-pack' ),
392
  'aiosp_ga_link_attribution' => __( 'This enables support for the Enhanced Link Attribution in Google Analytics.', 'all-in-one-seo-pack' ),
393
  'aiosp_ga_enhanced_ecommerce' => __( 'This enables support for the Enhanced Ecommerce in Google Analytics.', 'all-in-one-seo-pack' ),
394
 
 
 
 
 
 
 
 
 
 
 
395
  // Noindex Settings.
396
  'aiosp_cpostnoindex' => __( 'Set the default NOINDEX setting for each Post Type.', 'all-in-one-seo-pack' ),
397
  'aiosp_cpostnofollow' => __( 'Set the default NOFOLLOW setting for each Post Type.', 'all-in-one-seo-pack' ),
426
  'aiosp_use_tags_as_keywords' => __( 'Check this if you want your tags for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).', 'all-in-one-seo-pack' ),
427
  'aiosp_dynamic_postspage_keywords' => __( 'Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) and your archive pages to be dynamically generated from the keywords of the posts showing on that page. If unchecked, it will use the keywords set in the edit page screen for the posts page.', 'all-in-one-seo-pack' ),
428
 
429
+ // Unknown Location.
430
+ 'aiosp_google_connect' => __( 'Press the connect button to connect with Google Analytics; or if already connected, press the disconnect button to disable and remove any stored analytics credentials.', 'all-in-one-seo-pack' ),
431
+
432
  );
433
 
434
  // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment
465
  '<dd>' . sprintf( __( 'The current %s (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ) ) . '</dd>' .
466
  '<dt>%current_year%</dt>' .
467
  '<dd>' . sprintf( __( 'The current %s', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ) ) . '</dd>' .
 
 
 
 
468
  '<dt>%post_date%</dt>' .
469
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'date', 'all-in-one-seo-pack' ), $name ) . '</dd>' .
470
  '<dt>%post_year%</dt>' .
482
  'aiosp_can' => 'https://semperplugins.com/documentation/general-settings/#canonical-urls',
483
  'aiosp_no_paged_canonical_links' => 'https://semperplugins.com/documentation/general-settings/#no-pagination-for-canonical-urls',
484
  'aiosp_use_original_title' => 'https://semperplugins.com/documentation/general-settings/#use-original-title',
485
+ 'aiosp_schema_markup' => 'https://semperplugins.com/documentation/general-settings/#use-schema-markup',
486
  'aiosp_do_log' => 'https://semperplugins.com/documentation/general-settings/#log-important-events',
487
 
488
  // Home Page Settings.
519
  'aiosp_baidu_verify' => 'https://semperplugins.com/documentation/baidu-webmaster-verification/',
520
 
521
  // Google Settings.
522
+ 'aiosp_google_sitelinks_search' => 'https://semperplugins.com/documentation/google-settings/#display-sitelinks-search-box',
523
  'aiosp_google_analytics_id' => 'https://semperplugins.com/documentation/setting-up-google-analytics/',
524
  'aiosp_ga_advanced_options' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/',
525
  'aiosp_ga_domain' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#tracking-domain',
532
  'aiosp_ga_link_attribution' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#enhanced-link-attribution',
533
  'aiosp_ga_enhanced_ecommerce' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#enhanced-ecommerce',
534
 
 
 
 
 
 
 
 
 
 
 
535
  // Noindex Settings.
536
  'aiosp_cpostnoindex' => 'https://semperplugins.com/documentation/noindex-settings/#noindex',
537
  'aiosp_cpostnofollow' => 'https://semperplugins.com/documentation/noindex-settings/#nofollow',
565
  'aiosp_use_tags_as_keywords' => 'https://semperplugins.com/documentation/keyword-settings/#use-tags-for-meta-keywords',
566
  'aiosp_dynamic_postspage_keywords' => 'https://semperplugins.com/documentation/keyword-settings/#dynamically-generate-keywords-for-posts-page',
567
 
568
+ // Unknown/Pro?
569
+ // 'aiosp_google_connect' => '',
570
  );
571
 
572
  foreach ( $help_doc_link as $k1_slug => $v1_url ) {
657
  'aiosp_sitemap_excl_pages' => __( 'Use page slugs or page IDs, separated by commas, to exclude pages from the sitemap.', 'all-in-one-seo-pack' ),
658
 
659
  // Priorities.
660
+ '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' ) ),
661
+ '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' ) ),
662
+ 'aiosp_sitemap_prio_taxonomies' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Taxonomies', 'all-in-one-seo-pack' ) ),
663
+ 'aiosp_sitemap_prio_archive' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Archive Pages', 'all-in-one-seo-pack' ) ),
664
+ 'aiosp_sitemap_prio_author' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'priority', 'all-in-one-seo-pack' ), __( 'Author Pages', 'all-in-one-seo-pack' ) ),
665
 
666
  // Frequencies.
667
+ 'aiosp_sitemap_freq_homepage' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Homepage', 'all-in-one-seo-pack' ) ),
668
+ 'aiosp_sitemap_freq_post' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Posts', 'all-in-one-seo-pack' ) ),
669
+ 'aiosp_sitemap_freq_taxonomies' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Taxonomies', 'all-in-one-seo-pack' ) ),
670
+ 'aiosp_sitemap_freq_archive' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Archive Pages', 'all-in-one-seo-pack' ) ),
671
+ 'aiosp_sitemap_freq_author' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), __( 'frequency', 'all-in-one-seo-pack' ), __( 'Author Pages', 'all-in-one-seo-pack' ) ),
672
 
673
  );
674
 
714
  'aiosp_sitemap_addl_mod' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
715
 
716
  // Exclude Items.
717
+ 'aiosp_sitemap_excl_terms' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items',
718
  'aiosp_sitemap_excl_pages' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items',
719
 
720
  // Priorities.
783
  'aiosp_opengraph_dimgheight' => __( 'This option lets you set a default height for your images, where unspecified.', 'all-in-one-seo-pack' ),
784
  'aiosp_opengraph_meta_key' => __( 'Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.', 'all-in-one-seo-pack' ),
785
 
786
+ // Social Profile Links.
787
+ 'aiosp_opengraph_profile_links' => __( 'Add URLs for your website\'s social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.', 'all-in-one-seo-pack' ),
788
+ 'aiosp_opengraph_person_or_org' => __( 'Are the social profile links for your website for a person or an organization?', 'all-in-one-seo-pack' ),
789
+ 'aiosp_opengraph_social_name' => __( 'Add the name of the person or organization who owns these profiles.', 'all-in-one-seo-pack' ),
790
+
791
  // Facebook Settings.
792
  'aiosp_opengraph_key' => __( 'Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/', 'all-in-one-seo-pack' ),
793
  'aiosp_opengraph_appid' => __( 'Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register', 'all-in-one-seo-pack' ),
857
  'aiosp_opengraph_dimgheight' => 'https://semperplugins.com/documentation/social-meta-module/#default-image-height',
858
  'aiosp_opengraph_meta_key' => 'https://semperplugins.com/documentation/social-meta-module/#use-custom-field-for-image',
859
 
860
+ // Social Profile Links.
861
+ 'aiosp_opengraph_profile_links' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
862
+ 'aiosp_opengraph_person_or_org' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
863
+ 'aiosp_opengraph_social_name' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
864
+
865
  // Facebook Settings.
866
  'aiosp_opengraph_key' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-admin-id',
867
  'aiosp_opengraph_appid' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-app-id',
920
  */
921
  private function help_text_robots_generator() {
922
  $rtn_help_text = array(
923
+ 'aiosp_robots_type' => __( 'Rule Type', 'all-in-one-seo-pack' ),
924
+ 'aiosp_robots_agent' => __( 'User Agent', 'all-in-one-seo-pack' ),
925
+ 'aiosp_robots_path' => __( 'Directory Path', 'all-in-one-seo-pack' ),
926
  );
927
 
928
  return $rtn_help_text;
956
  $rtn_help_text = array(
957
  // Possible HTML link concept IF links become usable inside jQuery UI Tooltips.
958
  /* translators: %1$s and 12$s are placeholders, which means these should not be translated. These will be replaced with the name of the plugin, All in One SEO Pack. */
959
+ 'aiosp_importer_exporter_import_submit' => sprintf( __( 'Choose a valid %1$s .ini file and click &quot;Import&quot; to import options from a previous state or install of %1$s.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
960
  'aiosp_importer_exporter_export_choices' => __( 'You may choose to export settings from active modules, and content from post data.', 'all-in-one-seo-pack' ),
961
  /* 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. */
962
  'aiosp_importer_exporter_export_post_types' => sprintf( __( 'Select which Post Types you want to export your %s meta data for.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
admin/class-aioseop-notices.php CHANGED
@@ -112,10 +112,10 @@ if ( ! class_exists( 'AIOSEOP_Notices' ) ) {
112
  * @since 3.0
113
  */
114
  public function __construct() {
115
-
116
  // DirectoryIterator::getExtension() was added in PHP 5.3.6. We can remove this once we drop support < PHP 5.3.
117
  if ( version_compare( phpversion(), '5.3.6', '<' ) ) {
118
- return false;
119
  }
120
 
121
  $this->_requires();
112
  * @since 3.0
113
  */
114
  public function __construct() {
115
+
116
  // DirectoryIterator::getExtension() was added in PHP 5.3.6. We can remove this once we drop support < PHP 5.3.
117
  if ( version_compare( phpversion(), '5.3.6', '<' ) ) {
118
+ return false;
119
  }
120
 
121
  $this->_requires();
admin/display/credits-content.php CHANGED
@@ -1,23 +1,8 @@
1
- <?php
2
- /**
3
- * Credits Content
4
- *
5
- * Displays AIOSEOP's team and additional individuals who have contributed.
6
- *
7
- * @link https://wordpress.org/plugins/all-in-one-seo-pack/
8
- *
9
- * @package All_in_One_SEO_Pack
10
- * @since ?
11
- */
12
- ?>
13
  <div class="wrap credits-wrap">
14
 
15
- <p class="about-description">
16
- <?php
17
  /* 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. */
18
- printf( __( '%s is created by a worldwide network of friendly folks like these.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
19
- ?>
20
- </p>
21
 
22
  <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'all-in-one-seo-pack' ); ?></h3>
23
  <ul class="wp-people-group " id="wp-people-group-project-leaders">
@@ -66,8 +51,7 @@
66
  /* translators: '%1$s' and '%2$s' are used as placeholders and turn the text in between into a clickable link */
67
  printf(
68
  __( 'Want to see your name and picture here as a community developer? %1$sClick here%2$s to open an issue on GitHub to report a bug, request a feature or find an issue and submit code!', 'all-in-one-seo-pack' ),
69
- '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">',
70
- '</a>'
71
  );
72
  ?>
73
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="wrap credits-wrap">
2
 
3
+ <p class="about-description"><?php
 
4
  /* 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. */
5
+ printf( __( '%s is created by a worldwide network of friendly folks like these.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ); ?></p>
 
 
6
 
7
  <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'all-in-one-seo-pack' ); ?></h3>
8
  <ul class="wp-people-group " id="wp-people-group-project-leaders">
51
  /* translators: '%1$s' and '%2$s' are used as placeholders and turn the text in between into a clickable link */
52
  printf(
53
  __( 'Want to see your name and picture here as a community developer? %1$sClick here%2$s to open an issue on GitHub to report a bug, request a feature or find an issue and submit code!', 'all-in-one-seo-pack' ),
54
+ '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">', '</a>'
 
55
  );
56
  ?>
57
  </li>
admin/display/dashboard_widget.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Dashboard Widget
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since 2.3.10
7
- */
8
 
9
  if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
10
 
@@ -18,27 +12,19 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
18
  // @codingStandardsIgnoreEnd
19
 
20
  /**
21
- * Constructor
22
- *
23
  * Add the action to the constructor.
24
- *
25
- * @since 2.3.10
26
  */
27
  function __construct() {
28
  add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) );
29
  }
30
 
31
  /**
32
- * Add Dashboard Widget
33
- *
34
  * @since 2.3.10
35
  */
36
  function add_dashboard_widget() {
37
  if ( current_user_can( 'install_plugins' ) && false !== $this->show_widget() ) {
38
  wp_add_dashboard_widget(
39
- 'semperplugins-rss-feed',
40
- __( 'SEO News', 'all-in-one-seo-pack' ),
41
- array(
42
  $this,
43
  'display_rss_dashboard_widget',
44
  )
@@ -48,8 +34,6 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
48
  }
49
 
50
  /**
51
- * Show Widget
52
- *
53
  * @since 2.3.10.2
54
  */
55
  function show_widget() {
@@ -71,8 +55,6 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
71
  }
72
 
73
  /**
74
- * Display RSS Dashboard Widget
75
- *
76
  * @since 2.3.10
77
  */
78
  function display_rss_dashboard_widget() {
1
  <?php
 
 
 
 
 
 
2
 
3
  if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
4
 
12
  // @codingStandardsIgnoreEnd
13
 
14
  /**
 
 
15
  * Add the action to the constructor.
 
 
16
  */
17
  function __construct() {
18
  add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) );
19
  }
20
 
21
  /**
 
 
22
  * @since 2.3.10
23
  */
24
  function add_dashboard_widget() {
25
  if ( current_user_can( 'install_plugins' ) && false !== $this->show_widget() ) {
26
  wp_add_dashboard_widget(
27
+ 'semperplugins-rss-feed', __( 'SEO News', 'all-in-one-seo-pack' ), array(
 
 
28
  $this,
29
  'display_rss_dashboard_widget',
30
  )
34
  }
35
 
36
  /**
 
 
37
  * @since 2.3.10.2
38
  */
39
  function show_widget() {
55
  }
56
 
57
  /**
 
 
58
  * @since 2.3.10
59
  */
60
  function display_rss_dashboard_widget() {
admin/display/general-metaboxes.php CHANGED
@@ -1,40 +1,31 @@
1
  <?php
 
2
  /**
3
- * General Metaboxes
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since 2.3.3
7
  */
8
  // @codingStandardsIgnoreStart
9
  class aiosp_metaboxes {
10
  // @codingStandardsIgnoreEnd
11
 
12
  /**
13
- * Constructor
14
- *
15
- * AIOSEOP metaboxes constructor.
16
- *
17
- * @since 2.3.3
18
  */
19
  function __construct() {
20
- // construct.
21
  }
22
 
23
  /**
24
- * Display Metaboxes
25
- *
26
- * @since 2.3.3
27
- *
28
  * @param $add
29
  * @param $meta
30
  */
31
  static function display_extra_metaboxes( $add, $meta ) {
32
  echo "<div class='aioseop_metabox_wrapper' >";
33
- switch ( $meta['id'] ) :
34
  case 'aioseop-about':
35
  ?>
36
  <div class="aioseop_metabox_text">
37
- <h2 style="display:inline;"><?php echo AIOSEOP_PLUGIN_NAME; ?></h2>
 
38
  <?php
39
  global $current_user;
40
  $user_id = $current_user->ID;
@@ -46,8 +37,8 @@ class aiosp_metaboxes {
46
  $url = '?' . build_query( $qa );
47
  echo '<p><a href="' . $url . '">' . __( 'Reset Dismissed Notices', 'all-in-one-seo-pack' ) . '</a></p>';
48
  }
49
- ?>
50
- <?php if ( ! AIOSEOPPRO ) : ?>
51
  <p>
52
  <strong>
53
  <?php
@@ -55,33 +46,40 @@ class aiosp_metaboxes {
55
  /* translators: after this string comes a list of exclusive features that are not included in the free version of the plugin */
56
  echo ' ' . __( 'to upgrade to Pro Version and get:', 'all-in-one-seo-pack' );
57
  ?>
58
- </strong>
59
  </p>
60
- <?php endif; ?>
61
  </div>
62
  <?php
63
- // Fall-through.
64
  case 'aioseop-donate':
65
  ?>
66
- <div>
67
- <?php if ( ! AIOSEOPPRO ) : ?>
 
68
  <div class="aioseop_metabox_text">
 
69
  <?php self::pro_meta_content(); ?>
 
70
  </div>
71
- <?php endif; ?>
 
72
  <div class="aioseop_metabox_feature">
 
73
  <div class="aiosp-di">
74
  <a class="dashicons di-twitter" target="_blank" href="https://twitter.com/aioseopack" title="Follow me on Twitter"></a>
 
75
  <a class="dashicons di-facebook" target="_blank" href="https://www.facebook.com/aioseopack" title="Follow me on Facebook"></a>
76
  </div>
 
77
  </div>
78
  <?php
 
79
  $aiosp_trans = new AIOSEOP_Translations();
80
  // Eventually if nothing is returned we should just remove this section.
81
- if ( get_locale() != 'en_US' ) :
82
  ?>
83
- <div class="aioseop_translations">
84
- <strong>
85
  <?php
86
  if ( $aiosp_trans->percent_translated < 100 ) {
87
  if ( ! empty( $aiosp_trans->native_name ) ) {
@@ -92,7 +90,9 @@ class aiosp_metaboxes {
92
 
93
  /* translators: %1$s, %2$s, etc. are placeholders and shouldn't be translated. %1$s expands to the number of languages All in One SEO Pack has been translated into, %2$s to the name of the plugin, $3%s to the percentage translated of the current language, $4%s to the language name, %5$s and %6$s to anchor tags with link to the translation page at translate.wordpress.org */
94
  printf(
95
- __( '%1$s has been translated into %2$s languages, but currently the %3$s translation is only %4$s percent complete. %5$sClick here%6$s to help get it to 100 percent.', 'all-in-one-seo-pack' ),
 
 
96
  AIOSEOP_PLUGIN_NAME,
97
  $aiosp_trans->translated_count,
98
  $maybe_native_name,
@@ -103,12 +103,11 @@ class aiosp_metaboxes {
103
  }
104
 
105
  ?>
106
- </strong>
 
107
  </div>
108
- <?php endif; ?>
109
- </div>
110
- <?php break; ?>
111
- <?php
112
  case 'aioseop-list':
113
  ?>
114
  <div class="aioseop_metabox_text">
@@ -118,72 +117,64 @@ class aiosp_metaboxes {
118
  <?php else : ?>
119
  action="https://semperplugins.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&amp;id=af0a96d3d9"
120
  <?php endif; ?>
121
- method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate"
122
  target="_blank">
123
  <h2><?php _e( 'Join our mailing list for tips, tricks, and WordPress secrets.', 'all-in-one-seo-pack' ); ?></h2>
124
  <p>
125
  <i><?php _e( 'Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value).', 'all-in-one-seo-pack' ); ?></i>
126
  </p>
127
- <p>
128
- <input
129
- type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL"
130
- placeholder="<?php _e( 'Email Address', 'all-in-one-seo-pack' ); ?>" aria-label="<?php _e( 'Enter your email address', 'all-in-one-seo-pack' ); ?>">
131
- <input
132
- type="submit" value="<?php _e( 'Subscribe', 'all-in-one-seo-pack' ); ?>" name="subscribe" id="mc-embedded-subscribe"
133
- class="button-primary" aria-label="<?php _e( 'Subscribe to our mailing list', 'all-in-one-seo-pack' ); ?>">
134
- </p>
135
  </form>
136
  </div>
137
- <?php break; ?>
138
- <?php
139
  case 'aioseop-support':
140
  ?>
141
  <div class="aioseop_metabox_text">
142
- <ul>
143
- <li>
144
- <div class="aioseop_icon aioseop-icon-file"></div>
145
- <a target="_blank" rel="noopener noreferrer"
146
- href="https://semperplugins.com/documentation/">
147
- <?php
148
- /* 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. */
149
- printf( __( 'Read the %s user guide', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
150
- ?>
151
- </a>
152
- </li>
153
- <li>
154
- <div class="aioseop_icon aioseop-icon-support"></div>
155
- <a target="_blank" rel="noopener noreferrer"
156
- title="<?php _e( 'All in One SEO Pro Plugin Support Forum', 'all-in-one-seo-pack' ); ?>"
157
- href="https://semperplugins.com/support/"><?php _e( 'Access our Premium Support Forums', 'all-in-one-seo-pack' ); ?></a>
158
- </li>
159
- <li>
160
- <div class="aioseop_icon aioseop-icon-cog"></div>
161
- <a target="_blank" rel="noopener noreferrer" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
162
- href="https://semperplugins.com/all-in-one-seo-pack-changelog/"><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a>
163
- </li>
164
- <li>
165
- <div class="aioseop_icon aioseop-icon-youtube"></div>
166
- <a target="_blank" rel="noopener noreferrer"
167
- href="https://semperplugins.com/doc-type/video/"><?php _e( 'Watch video tutorials', 'all-in-one-seo-pack' ); ?></a>
168
- </li>
169
- <li>
170
- <div class="aioseop_icon aioseop-icon-book"></div>
171
- <a target="_blank" rel="noopener noreferrer"
172
- href="https://semperplugins.com/documentation/quick-start-guide/"><?php _e( 'Getting started? Read the Beginners Guide', 'all-in-one-seo-pack' ); ?></a>
173
- </li>
174
- </ul>
 
175
  </div>
176
- <?php break; ?>
177
- <?php endswitch; ?>
178
- </div>
179
- <?php
180
  }
181
 
182
- /**
183
- * Pro Meta Content
184
- *
185
- * @since 2.3.11
186
- */
187
  static function pro_meta_content() {
188
 
189
  echo '<ul>';
@@ -202,7 +193,7 @@ class aiosp_metaboxes {
202
 
203
  echo '</ul>';
204
 
205
- echo sprintf( __( '%1$sClick here%2$s to file a feature request/bug report.', 'all-in-one-seo-pack' ), '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new" target="_blank" rel="noopener noreferrer">', '</a>' );
206
 
207
  }
208
 
1
  <?php
2
+
3
  /**
4
+ * @package All-in-One-SEO-Pack
 
 
 
5
  */
6
  // @codingStandardsIgnoreStart
7
  class aiosp_metaboxes {
8
  // @codingStandardsIgnoreEnd
9
 
10
  /**
11
+ * aiosp_metaboxes constructor.
 
 
 
 
12
  */
13
  function __construct() {
14
+ // construct
15
  }
16
 
17
  /**
 
 
 
 
18
  * @param $add
19
  * @param $meta
20
  */
21
  static function display_extra_metaboxes( $add, $meta ) {
22
  echo "<div class='aioseop_metabox_wrapper' >";
23
+ switch ( $meta['id'] ) {
24
  case 'aioseop-about':
25
  ?>
26
  <div class="aioseop_metabox_text">
27
+ <p><h2
28
+ style="display:inline;"><?php echo AIOSEOP_PLUGIN_NAME; ?></h2></p>
29
  <?php
30
  global $current_user;
31
  $user_id = $current_user->ID;
37
  $url = '?' . build_query( $qa );
38
  echo '<p><a href="' . $url . '">' . __( 'Reset Dismissed Notices', 'all-in-one-seo-pack' ) . '</a></p>';
39
  }
40
+ if ( ! AIOSEOPPRO ) {
41
+ ?>
42
  <p>
43
  <strong>
44
  <?php
46
  /* translators: after this string comes a list of exclusive features that are not included in the free version of the plugin */
47
  echo ' ' . __( 'to upgrade to Pro Version and get:', 'all-in-one-seo-pack' );
48
  ?>
49
+ </strong>
50
  </p>
51
+ <?php } ?>
52
  </div>
53
  <?php
54
+ // Is this fall through deliberate?
55
  case 'aioseop-donate':
56
  ?>
57
+ <div>
58
+
59
+ <?php if ( ! AIOSEOPPRO ) { ?>
60
  <div class="aioseop_metabox_text">
61
+ <p>
62
  <?php self::pro_meta_content(); ?>
63
+ </p>
64
  </div>
65
+ <?php } ?>
66
+
67
  <div class="aioseop_metabox_feature">
68
+
69
  <div class="aiosp-di">
70
  <a class="dashicons di-twitter" target="_blank" href="https://twitter.com/aioseopack" title="Follow me on Twitter"></a>
71
+
72
  <a class="dashicons di-facebook" target="_blank" href="https://www.facebook.com/aioseopack" title="Follow me on Facebook"></a>
73
  </div>
74
+
75
  </div>
76
  <?php
77
+
78
  $aiosp_trans = new AIOSEOP_Translations();
79
  // Eventually if nothing is returned we should just remove this section.
80
+ if ( get_locale() != 'en_US' ) {
81
  ?>
82
+ <div class="aioseop_translations"><strong>
 
83
  <?php
84
  if ( $aiosp_trans->percent_translated < 100 ) {
85
  if ( ! empty( $aiosp_trans->native_name ) ) {
90
 
91
  /* translators: %1$s, %2$s, etc. are placeholders and shouldn't be translated. %1$s expands to the number of languages All in One SEO Pack has been translated into, %2$s to the name of the plugin, $3%s to the percentage translated of the current language, $4%s to the language name, %5$s and %6$s to anchor tags with link to the translation page at translate.wordpress.org */
92
  printf(
93
+ __(
94
+ '%1$s has been translated into %2$s languages, but currently the %3$s translation is only %4$s percent complete. %5$sClick here%6$s to help get it to 100 percent.', 'all-in-one-seo-pack'
95
+ ),
96
  AIOSEOP_PLUGIN_NAME,
97
  $aiosp_trans->translated_count,
98
  $maybe_native_name,
103
  }
104
 
105
  ?>
106
+ </strong></div>
107
+ <?php } ?>
108
  </div>
109
+ <?php
110
+ break;
 
 
111
  case 'aioseop-list':
112
  ?>
113
  <div class="aioseop_metabox_text">
117
  <?php else : ?>
118
  action="https://semperplugins.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&amp;id=af0a96d3d9"
119
  <?php endif; ?>
120
+ method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate"
121
  target="_blank">
122
  <h2><?php _e( 'Join our mailing list for tips, tricks, and WordPress secrets.', 'all-in-one-seo-pack' ); ?></h2>
123
  <p>
124
  <i><?php _e( 'Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value).', 'all-in-one-seo-pack' ); ?></i>
125
  </p>
126
+ <p><input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL"
127
+ placeholder="<?php _e( 'Email Address', 'all-in-one-seo-pack' ); ?>">
128
+ <input type="submit" value="<?php _e( 'Subscribe', 'all-in-one-seo-pack' ); ?>" name="subscribe" id="mc-embedded-subscribe"
129
+ class="button-primary" aria-label="<?php _e( 'Subscribe', 'all-in-one-seo-pack' ); ?>"></p>
 
 
 
 
130
  </form>
131
  </div>
132
+ <?php
133
+ break;
134
  case 'aioseop-support':
135
  ?>
136
  <div class="aioseop_metabox_text">
137
+ <p>
138
+ <div class="aioseop_icon aioseop-icon-file"></div>
139
+ <a target="_blank"
140
+ href="https://semperplugins.com/documentation/">
141
+ <?php
142
+ /* 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. */
143
+ printf( __( 'Read the %s user guide', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
144
+ ?>
145
+ </a></p>
146
+ <p>
147
+ <div class="aioseop_icon aioseop-icon-support"></div>
148
+ <a target="_blank"
149
+ title="<?php _e( 'All in One SEO Pro Plugin Support Forum', 'all-in-one-seo-pack' ); ?>"
150
+ href="https://semperplugins.com/support/"><?php _e( 'Access our Premium Support Forums', 'all-in-one-seo-pack' ); ?></a></p>
151
+ <p>
152
+ <div class="aioseop_icon aioseop-icon-cog"></div>
153
+ <a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
154
+ href="
155
+ <?php
156
+ if ( AIOSEOPPRO ) {
157
+ echo 'https://semperplugins.com/documentation/all-in-one-seo-pack-pro-changelog/';
158
+ } else {
159
+ echo 'https://semperfiwebdesign.com/all-in-one-seo-pack-release-history/';
160
+ }
161
+ ?>
162
+ "><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a></p>
163
+ <p>
164
+ <div class="aioseop_icon aioseop-icon-youtube"></div>
165
+ <a target="_blank"
166
+ href="https://semperplugins.com/doc-type/video/"><?php _e( 'Watch video tutorials', 'all-in-one-seo-pack' ); ?></a></p>
167
+ <p>
168
+ <div class="aioseop_icon aioseop-icon-book"></div>
169
+ <a target="_blank"
170
+ href="https://semperplugins.com/documentation/quick-start-guide/"><?php _e( 'Getting started? Read the Beginners Guide', 'all-in-one-seo-pack' ); ?></a></p>
171
  </div>
172
+ <?php
173
+ break;
174
+ }
175
+ echo '</div>';
176
  }
177
 
 
 
 
 
 
178
  static function pro_meta_content() {
179
 
180
  echo '<ul>';
193
 
194
  echo '</ul>';
195
 
196
+ echo sprintf( __( '%1$sClick here%2$s to file a feature request/bug report.', 'all-in-one-seo-pack' ), '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new" />', '</a>' );
197
 
198
  }
199
 
admin/display/menu.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Menu
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
 
9
  /**
10
  * Class AIOSEOPAdminMenus
1
  <?php
 
 
 
 
 
 
2
 
3
  /**
4
  * Class AIOSEOPAdminMenus
admin/display/notice-aioseop.php CHANGED
@@ -6,7 +6,7 @@
6
  *
7
  * @see AIOSEOP_Notice::display_notice_aioseop();
8
  * @uses $notice in AIOSEOP_Notice::notices
9
- * @package All_in_One_SEO_Pack
10
  * @subpackage AIOSEOP_Notices
11
  */
12
 
6
  *
7
  * @see AIOSEOP_Notice::display_notice_aioseop();
8
  * @uses $notice in AIOSEOP_Notice::notices
9
+ * @package All-in-One-SEO-Pack
10
  * @subpackage AIOSEOP_Notices
11
  */
12
 
admin/display/notices/review-plugin-notice.php CHANGED
@@ -21,29 +21,29 @@ function aioseop_notice_review_plugin() {
21
  'screens' => array( 'aioseop' ),
22
  'class' => 'notice-info',
23
  /* translators: %1$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. */
24
- 'message' => sprintf( __( 'You have been using %1$s for a while now. That is awesome! If you like %2$s, then please leave us a 5-star rating. Huge thanks in advance!', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, AIOSEOP_PLUGIN_NAME ),
25
  'action_options' => array(
26
  array(
27
  'time' => 0,
28
  'text' => __( 'Add a review', 'all-in-one-seo-pack' ),
29
  'link' => 'https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews?rate=5#new-post',
30
  'dismiss' => false,
31
- 'class' => 'button-primary button-orange',
32
  ),
33
  array(
34
  'text' => __( 'Remind me later', 'all-in-one-seo-pack' ),
35
  'time' => 432000,
36
  'dismiss' => false,
37
- 'class' => 'button-secondary',
38
  ),
39
  array(
40
  'time' => 0,
41
  'text' => __( 'No, thanks', 'all-in-one-seo-pack' ),
42
  'dismiss' => true,
43
- 'class' => 'button-secondary',
44
  ),
45
  ),
46
  );
47
  }
48
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
49
  // add_filter( 'aioseop_admin_notice-review_plugin', 'aioseop_notice_review_plugin' );
 
21
  'screens' => array( 'aioseop' ),
22
  'class' => 'notice-info',
23
  /* translators: %1$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. */
24
+ 'message' => sprintf( __( 'You have been using %1$s for a while now. That is awesome! If you like %1$s, then please leave us a 5-star rating. Huge thanks in advance!', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
25
  'action_options' => array(
26
  array(
27
  'time' => 0,
28
  'text' => __( 'Add a review', 'all-in-one-seo-pack' ),
29
  'link' => 'https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews?rate=5#new-post',
30
  'dismiss' => false,
31
+ 'class' => '',
32
  ),
33
  array(
34
  'text' => __( 'Remind me later', 'all-in-one-seo-pack' ),
35
  'time' => 432000,
36
  'dismiss' => false,
37
+ 'class' => '',
38
  ),
39
  array(
40
  'time' => 0,
41
  'text' => __( 'No, thanks', 'all-in-one-seo-pack' ),
42
  'dismiss' => true,
43
+ 'class' => '',
44
  ),
45
  ),
46
  );
47
  }
 
48
  // add_filter( 'aioseop_admin_notice-review_plugin', 'aioseop_notice_review_plugin' );
49
+
admin/display/welcome-content.php CHANGED
@@ -1,16 +1,8 @@
1
- <?php
2
- /**
3
- * Welcome Content
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
- ?>
9
  <div class="welcome-panel">
10
  <div class="welcome-panel-content">
11
  <div class="welcome-panel-column-container">
12
  <div>
13
- <h3><a href="https://semperplugins.com/all-in-one-seo-pack-3-2/" target="_blank"><?php echo esc_html( __( "Check out what's new in our latest release post!", 'all-in-one-seo-pack' ) ); ?></a></h3>
14
  </div>
15
  <div class="welcome-panel-column">
16
  <h3>
@@ -31,8 +23,7 @@
31
  echo esc_html( sprintf( __( 'Upgrade to %s to access priority support and premium features.', 'all-in-one-seo-pack' ), 'All in One SEO Pack Pro' ) );
32
  ?>
33
  </p>
34
- <p class="call-to-action">
35
- <a
36
  href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
37
  target="_blank"
38
  class="button button-primary button-orange"><?php echo __( 'Upgrade', 'all-in-one-seo-pack' ); ?></a>
@@ -43,8 +34,7 @@
43
  echo esc_html( sprintf( __( 'Help translate %s into your language.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ) );
44
  ?>
45
  </p>
46
- <p class="call-to-action">
47
- <a
48
  href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack"
49
  class="button button-primary"
50
  target="_blank"><?php echo __( 'Translate', 'all-in-one-seo-pack' ); ?></a></p>
@@ -53,11 +43,9 @@
53
  <div class="welcome-panel-column">
54
  <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
55
  <ul>
56
- <li>
57
- <a
58
- href="https://semperplugins.com/documentation/quick-start-guide/"
59
- target="_blank"
60
- class="welcome-icon welcome-add-page">
61
  <?php
62
  /* 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. */
63
  echo sprintf( __( 'Beginners Guide for %s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
@@ -65,41 +53,30 @@
65
  </a>
66
 
67
  </li>
68
- <li>
69
- <a
70
- href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/"
71
- target="_blank"
72
- class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
73
  </li>
74
- <li>
75
- <a
76
- href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/"
77
- target="_blank"
78
- class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
79
  </li>
80
- <li>
81
- <a
82
- href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/"
83
- target="_blank"
84
- class="welcome-icon welcome-add-page"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
85
  </li>
86
  <li>
87
- <a
88
- href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/"
89
- target="_blank"
90
- class="welcome-icon welcome-add-page"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
91
  </li>
92
- <li>
93
- <a
94
- href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/"
95
- target="_blank"
96
- class="welcome-icon welcome-add-page"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
97
  </li>
98
- <li>
99
- <a
100
- href="https://semperplugins.com/documentation/setting-up-google-analytics/"
101
- target="_blank"
102
- class="welcome-icon welcome-add-page"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
103
  </li>
104
  </ul>
105
  </div>
@@ -107,24 +84,18 @@
107
  <div class="welcome-panel-column">
108
  <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
109
  <ul>
110
- <li>
111
- <a
112
- href="https://semperplugins.com/documentation/"
113
- target="_blank"
114
- class="welcome-icon welcome-learn-more"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
115
 
116
  </li>
117
- <li>
118
- <a
119
- href="https://semperplugins.com/videos/"
120
- target="_blank"
121
- class="welcome-icon welcome-learn-more"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
122
  </li>
123
- <li>
124
- <a
125
- href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
126
- target="_blank"
127
- class="welcome-icon welcome-learn-more"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
128
  </li>
129
  </ul>
130
  </div>
 
 
 
 
 
 
 
 
1
  <div class="welcome-panel">
2
  <div class="welcome-panel-content">
3
  <div class="welcome-panel-column-container">
4
  <div>
5
+ <h3><a href="https://semperplugins.com/all-in-one-seo-pack-3-0/" target="_blank"><?php echo esc_html( sprintf( __( "Check out what's new in our %s release post!", 'all-in-one-seo-pack' ), __( 'Version 3', 'all-in-one-seo-pack' ) ) ); ?></a></h3>
6
  </div>
7
  <div class="welcome-panel-column">
8
  <h3>
23
  echo esc_html( sprintf( __( 'Upgrade to %s to access priority support and premium features.', 'all-in-one-seo-pack' ), 'All in One SEO Pack Pro' ) );
24
  ?>
25
  </p>
26
+ <p class="call-to-action"><a
 
27
  href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
28
  target="_blank"
29
  class="button button-primary button-orange"><?php echo __( 'Upgrade', 'all-in-one-seo-pack' ); ?></a>
34
  echo esc_html( sprintf( __( 'Help translate %s into your language.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ) );
35
  ?>
36
  </p>
37
+ <p class="call-to-action"><a
 
38
  href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack"
39
  class="button button-primary"
40
  target="_blank"><?php echo __( 'Translate', 'all-in-one-seo-pack' ); ?></a></p>
43
  <div class="welcome-panel-column">
44
  <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
45
  <ul>
46
+ <li><a href="https://semperplugins.com/documentation/quick-start-guide/"
47
+ target="_blank"
48
+ class="welcome-icon welcome-add-page">
 
 
49
  <?php
50
  /* 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. */
51
  echo sprintf( __( 'Beginners Guide for %s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
53
  </a>
54
 
55
  </li>
56
+ <li><a href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/"
57
+ target="_blank"
58
+ class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
 
 
59
  </li>
60
+ <li><a href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/"
61
+ target="_blank"
62
+ class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
 
 
63
  </li>
64
+ <li><a href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/"
65
+ target="_blank"
66
+ class="welcome-icon welcome-add-page"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
 
 
67
  </li>
68
  <li>
69
+ <a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/"
70
+ target="_blank"
71
+ class="welcome-icon welcome-add-page"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
 
72
  </li>
73
+ <li><a href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/"
74
+ target="_blank"
75
+ class="welcome-icon welcome-add-page"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
 
 
76
  </li>
77
+ <li><a href="https://semperplugins.com/documentation/setting-up-google-analytics/"
78
+ target="_blank"
79
+ class="welcome-icon welcome-add-page"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
 
 
80
  </li>
81
  </ul>
82
  </div>
84
  <div class="welcome-panel-column">
85
  <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
86
  <ul>
87
+ <li><a href="https://semperplugins.com/documentation/"
88
+ target="_blank"
89
+ class="welcome-icon welcome-learn-more"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
 
 
90
 
91
  </li>
92
+ <li><a href="https://semperplugins.com/videos/"
93
+ target="_blank"
94
+ class="welcome-icon welcome-learn-more"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
 
 
95
  </li>
96
+ <li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
97
+ target="_blank"
98
+ class="welcome-icon welcome-learn-more"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
 
 
99
  </li>
100
  </ul>
101
  </div>
admin/display/welcome.php CHANGED
@@ -1,10 +1,5 @@
1
  <?php
2
- /**
3
- * Welcome
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
  if ( ! class_exists( 'aioseop_welcome' ) ) {
9
 
10
  /**
@@ -37,10 +32,7 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
37
 
38
  if ( 'dashboard_page_aioseop-about' === $hook ) {
39
 
40
- wp_enqueue_style( 'aioseop_welcome_css', AIOSEOP_PLUGIN_URL . 'css/aioseop-welcome.css', array(), AIOSEOP_VERSION );
41
- if ( function_exists( 'is_rtl' ) && is_rtl() ) {
42
- wp_enqueue_style( 'aioseop_welcome_css_rtl', AIOSEOP_PLUGIN_URL . 'css/aioseop-welcome-rtl.css', array( 'aioseop_welcome_css' ), AIOSEOP_VERSION );
43
- }
44
  wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/welcome.js', array( 'jquery' ), AIOSEOP_VERSION, true );
45
  }
46
  }
@@ -82,7 +74,7 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
82
  return;
83
  }
84
 
85
- // Bail if activating from network, or bulk.
86
  if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
87
  return;
88
  }
@@ -123,31 +115,27 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
123
  ?>
124
 
125
  <div class="wrap about-wrap">
126
- <div class="aioseop-welcome-logo">
127
- <?php echo aioseop_get_logo( 180, 180, '#44619A' ); ?>
128
- </div>
129
  <h1>
130
- <?php
131
  /* translators: %1$s and %2$s are placeholders, which means that these should not be translated. These will be replaced with the name of the plugin, All in One SEO Pack, and the current version number. */
132
  printf( esc_html__( 'Welcome to %1$s %2$s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, $version );
133
- ?>
134
- </h1>
135
- <div class="about-text">
 
136
  <?php
137
  /* translators: %1$s and %2$s are placeholders, which means that these should not be translated. These will be replaced with the name of the plugin, All in One SEO Pack, and the current version number. */
138
  printf( esc_html__( '%1$s %2$s contains new features, bug fixes, increased security, and tons of under the hood performance improvements.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, $version );
139
  ?>
140
- </div>
141
 
142
  <h2 class="nav-tab-wrapper">
143
- <a
144
- class="nav-tab nav-tab-active" id="aioseop-about"
145
- href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-about' ), 'index.php' ) ) ); ?>">
146
  <?php esc_html_e( 'What&#8217;s New', 'all-in-one-seo-pack' ); ?>
147
  </a>
148
- <a
149
- class="nav-tab" id="aioseop-credits"
150
- href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-credits' ), 'index.php' ) ) ); ?>">
151
  <?php esc_html_e( 'Credits', 'all-in-one-seo-pack' ); ?>
152
  </a>
153
  </h2>
1
  <?php
2
+
 
 
 
 
 
3
  if ( ! class_exists( 'aioseop_welcome' ) ) {
4
 
5
  /**
32
 
33
  if ( 'dashboard_page_aioseop-about' === $hook ) {
34
 
35
+ wp_enqueue_style( 'aioseop_welcome_css', AIOSEOP_PLUGIN_URL . 'css/welcome.css', array(), AIOSEOP_VERSION );
 
 
 
36
  wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/welcome.js', array( 'jquery' ), AIOSEOP_VERSION, true );
37
  }
38
  }
74
  return;
75
  }
76
 
77
+ // Bail if activating from network, or bulk
78
  if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
79
  return;
80
  }
115
  ?>
116
 
117
  <div class="wrap about-wrap">
 
 
 
118
  <h1>
119
+ <?php
120
  /* translators: %1$s and %2$s are placeholders, which means that these should not be translated. These will be replaced with the name of the plugin, All in One SEO Pack, and the current version number. */
121
  printf( esc_html__( 'Welcome to %1$s %2$s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, $version );
122
+ ?>
123
+ </h1>
124
+ <div
125
+ class="about-text">
126
  <?php
127
  /* translators: %1$s and %2$s are placeholders, which means that these should not be translated. These will be replaced with the name of the plugin, All in One SEO Pack, and the current version number. */
128
  printf( esc_html__( '%1$s %2$s contains new features, bug fixes, increased security, and tons of under the hood performance improvements.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, $version );
129
  ?>
130
+ </div>
131
 
132
  <h2 class="nav-tab-wrapper">
133
+ <a class="nav-tab nav-tab-active" id="aioseop-about"
134
+ href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-about' ), 'index.php' ) ) ); ?>">
 
135
  <?php esc_html_e( 'What&#8217;s New', 'all-in-one-seo-pack' ); ?>
136
  </a>
137
+ <a class="nav-tab" id="aioseop-credits"
138
+ href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-credits' ), 'index.php' ) ) ); ?>">
 
139
  <?php esc_html_e( 'Credits', 'all-in-one-seo-pack' ); ?>
140
  </a>
141
  </h2>
admin/meta_import.php CHANGED
@@ -1,10 +1,5 @@
1
  <?php
2
- /**
3
- * Meta Import
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
  if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
9
 
10
  /**
@@ -14,22 +9,8 @@ if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
14
  */
15
  class WPSEO_Import_AIOSEO_Hooks extends WPSEO_Import_Hooks {
16
 
17
- /**
18
- * Plugin File
19
- *
20
- * @since ?
21
- *
22
- * @var string $plugin_file
23
- */
24
  protected $plugin_file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
25
 
26
- /**
27
- * Deactivate Listener
28
- *
29
- * @since ?
30
- *
31
- * @var string $deactivation_listener
32
- */
33
  protected $deactivation_listener = 'deactivate_aioseo';
34
 
35
  /**
@@ -125,7 +106,6 @@ function aiosp_seometa_action() {
125
 
126
  printf( __( '<p>Analyzing records in a %1$s to %2$s conversion&hellip;', 'all-in-one-seo-pack' ), esc_html( $_POST['platform_old'] ), 'All in One SEO Pack' );
127
  printf( '<p><b>%d</b> Compatible Records were identified</p>', $response->update );
128
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
129
  // printf( '<p>%d Compatible Records will be ignored</p>', $response->ignore );
130
  printf( '<p><b>%s</b></p>', __( 'Compatible data:', 'all-in-one-seo-pack' ) );
131
  echo '<ol>';
@@ -161,7 +141,7 @@ function aiosp_seometa_admin() {
161
  <div class="wrap">
162
 
163
 
164
- <h1><?php _e( 'Import SEO Settings', 'all-in-one-seo-pack' ); ?></h1>
165
 
166
  <p><span
167
  class="description"><?php printf( __( 'Use the drop down below to choose which plugin or theme you wish to import SEO data from.', 'all-in-one-seo-pack' ) ); ?></span>
@@ -176,19 +156,13 @@ function aiosp_seometa_admin() {
176
  </span>
177
  </p>
178
 
179
- <p>
180
- <span class="description">
181
- <strong><?php printf( __( 'Please Note: ' ) ); ?></strong>
182
- <?php
183
- /* 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. */
184
- printf(
185
- sprintf(
186
- __( 'Some plugins and themes do not share similar data, or they store data in a non-standard way. If we cannot import this data, it will remain unchanged in your database. Any compatible SEO data will be displayed for you to review. If a post or page already has SEO data in %s, we will not import data from another plugin/theme.', 'all-in-one-seo-pack' ),
187
- AIOSEOP_PLUGIN_NAME
188
- )
189
- );
190
- ?>
191
- </span>
192
  </p>
193
 
194
  <p><span
@@ -207,7 +181,7 @@ function aiosp_seometa_admin() {
207
  $platform_old = ( ! isset( $_POST['platform_old'] ) ) ? '' : $_POST['platform_old'];
208
 
209
  _e( 'Import SEO data from:', 'all-in-one-seo-pack' );
210
- echo '<select name="platform_old" aria-label="' . __( 'Choose the platform you want to import SEO data from', 'all-in-one-seo-pack' ) . '">';
211
  printf( '<option value="">%s</option>', __( 'Choose platform:', 'all-in-one-seo-pack' ) );
212
 
213
  printf( '<optgroup label="%s">', __( 'Plugins', 'all-in-one-seo-pack' ) );
@@ -228,17 +202,10 @@ function aiosp_seometa_admin() {
228
 
229
  ?>
230
 
231
- <input
232
- type="submit"
233
- class="button-secondary"
234
- name="analyze"
235
- value="<?php _e( 'Analyze', 'all-in-one-seo-pack' ); ?>"
236
- aria-label="Analyze"/>
237
- <input
238
- type="submit"
239
- class="button-primary"
240
- value="<?php _e( 'Convert', 'all-in-one-seo-pack' ); ?>"
241
- aria-label="Convert"/>
242
 
243
  </form>
244
 
@@ -255,6 +222,7 @@ function aiosp_seometa_admin() {
255
  * First check to see what records for $new already exist, storing the corresponding post_id values in an array.
256
  * When the conversion happens, ignore rows that contain a post_id, to avoid duplicate entries.
257
  *
 
258
  * @param string $old Old meta_key entries.
259
  * @param string $new New meta_key entries.
260
  * @param bool $delete_old Whether to delete the old entries.
@@ -270,7 +238,6 @@ function aiosp_seometa_meta_key_convert( $old = '', $new = '', $delete_old = fal
270
  $output = new stdClass;
271
 
272
  if ( ! $old || ! $new ) {
273
- // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
274
  $output->WP_Error = 1;
275
 
276
  return $output;
@@ -327,7 +294,6 @@ function aiosp_seometa_post_meta_convert( $old_platform = '', $new_platform = 'A
327
  $output = new stdClass;
328
 
329
  if ( empty( $_aiosp_seometa_platforms[ $old_platform ] ) || empty( $_aiosp_seometa_platforms[ $new_platform ] ) ) {
330
- // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
331
  $output->WP_Error = 1;
332
 
333
  return $output;
@@ -387,7 +353,6 @@ function aiosp_seometa_post_meta_analyze( $old_platform = '', $new_platform = 'A
387
  $output = new stdClass;
388
 
389
  if ( empty( $_aiosp_seometa_platforms[ $old_platform ] ) || empty( $_aiosp_seometa_platforms[ $new_platform ] ) ) {
390
- // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
391
  $output->WP_Error = 1;
392
 
393
  return $output;
@@ -413,14 +378,12 @@ function aiosp_seometa_post_meta_analyze( $old_platform = '', $new_platform = 'A
413
  $update = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
414
 
415
  // Count items in returned arrays.
416
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
417
  // $ignore = count( (array)$ignore );
418
  $update = count( (array) $update );
419
 
420
  // Calculate update/ignore by comparison.
421
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
422
  // $update = ( (int)$update > (int)$ignore ) ? ( (int)$update - (int)$ignore ) : 0;
423
- // update output numbers.
424
  $output->update += (int) $update;
425
  $output->ignore += (int) $ignore;
426
 
@@ -434,10 +397,9 @@ function aiosp_seometa_post_meta_analyze( $old_platform = '', $new_platform = 'A
434
 
435
  }
436
 
437
- // phpcs:disable Squiz.Commenting.InlineComment.InvalidEndChar
438
  // define('aiosp_seometa_PLUGIN_DIR', dirname(__FILE__));
439
  // add_action( 'plugins_loaded', 'aiosp_seometa_import' );
440
- // phpcs:enable
441
  /**
442
  * Initialize the SEO Data Transporter plugin
443
  */
@@ -449,7 +411,7 @@ function aiosp_seometa_import() {
449
  * The associative array of supported themes.
450
  */
451
  $_aiosp_seometa_themes = array(
452
- // alphabatized.
453
  'Builder' => array(
454
  'Custom Doctitle' => '_builder_seo_title',
455
  'META Description' => '_builder_seo_description',
@@ -521,8 +483,8 @@ function aiosp_seometa_import() {
521
  * The associative array of supported plugins.
522
  */
523
  $_aiosp_seometa_plugins = array(
524
- // alphabatized.
525
- 'Add Meta Tags' => array(
526
  'Custom Doctitle' => '_amt_title',
527
  'META Description' => '_amt_description',
528
  'META Keywords' => '_amt_keywords',
@@ -553,7 +515,7 @@ function aiosp_seometa_import() {
553
  'Canonical URI' => '_wds_canonical',
554
  'Redirect URI' => '_wds_redirect',
555
  ),
556
- 'Jetpack' => array(
557
  'META Description' => 'advanced_seo_description',
558
  ),
559
  'Meta SEO Pack' => array(
@@ -570,7 +532,7 @@ function aiosp_seometa_import() {
570
  'META Description' => 'rank_math_description',
571
  'Canonical URI' => 'rank_math_canonical_url',
572
  ),
573
- 'SEOpressor' => array(
574
  'Custom Doctitle' => '_seopressor_meta_title',
575
  'META Description' => '_seopressor_meta_description',
576
  ),
@@ -604,16 +566,15 @@ function aiosp_seometa_import() {
604
  /**
605
  * Include the other elements of the plugin.
606
  */
607
- // phpcs:disable Squiz.Commenting.InlineComment.InvalidEndChar
608
  // require_once( aiosp_seometa_PLUGIN_DIR . '/admin.php' );
609
  // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
610
- // phpcs:enable
611
  /**
612
  * Init hook.
613
  *
614
  * Hook fires after plugin functions are loaded.
615
  *
616
  * @since 0.9.10
 
617
  */
618
  do_action( 'aiosp_seometa_import' );
619
 
@@ -621,12 +582,11 @@ function aiosp_seometa_import() {
621
 
622
  /**
623
  * Activation Hook
624
- *
625
  * @since 0.9.4
626
  */
627
  register_activation_hook( __FILE__, 'aiosp_seometa_activation_hook' );
628
  function aiosp_seometa_activation_hook() {
629
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
630
  // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
631
  aiosp_seometa_meta_key_convert( '_yoast_seo_title', 'yoast_wpseo_title', true );
632
  aiosp_seometa_meta_key_convert( '_yoast_seo_metadesc', 'yoast_wpseo_metadesc', true );
1
  <?php
2
+
 
 
 
 
 
3
  if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
4
 
5
  /**
9
  */
10
  class WPSEO_Import_AIOSEO_Hooks extends WPSEO_Import_Hooks {
11
 
 
 
 
 
 
 
 
12
  protected $plugin_file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
13
 
 
 
 
 
 
 
 
14
  protected $deactivation_listener = 'deactivate_aioseo';
15
 
16
  /**
106
 
107
  printf( __( '<p>Analyzing records in a %1$s to %2$s conversion&hellip;', 'all-in-one-seo-pack' ), esc_html( $_POST['platform_old'] ), 'All in One SEO Pack' );
108
  printf( '<p><b>%d</b> Compatible Records were identified</p>', $response->update );
 
109
  // printf( '<p>%d Compatible Records will be ignored</p>', $response->ignore );
110
  printf( '<p><b>%s</b></p>', __( 'Compatible data:', 'all-in-one-seo-pack' ) );
111
  echo '<ol>';
141
  <div class="wrap">
142
 
143
 
144
+ <h2><?php _e( 'Import SEO Settings', 'all-in-one-seo-pack' ); ?></h2>
145
 
146
  <p><span
147
  class="description"><?php printf( __( 'Use the drop down below to choose which plugin or theme you wish to import SEO data from.', 'all-in-one-seo-pack' ) ); ?></span>
156
  </span>
157
  </p>
158
 
159
+ <p><span
160
+ class="description"><strong><?php printf( __( 'Please Note: ' ) ); ?></strong>
161
+ <?php
162
+ /* 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. */
163
+ printf( sprintf( __( 'Some plugins and themes do not share similar data, or they store data in a non-standard way. If we cannot import this data, it will remain unchanged in your database. Any compatible SEO data will be displayed for you to review. If a post or page already has SEO data in %s, we will not import data from another plugin/theme.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ) );
164
+ ?>
165
+ </span>
 
 
 
 
 
 
166
  </p>
167
 
168
  <p><span
181
  $platform_old = ( ! isset( $_POST['platform_old'] ) ) ? '' : $_POST['platform_old'];
182
 
183
  _e( 'Import SEO data from:', 'all-in-one-seo-pack' );
184
+ echo '<select name="platform_old">';
185
  printf( '<option value="">%s</option>', __( 'Choose platform:', 'all-in-one-seo-pack' ) );
186
 
187
  printf( '<optgroup label="%s">', __( 'Plugins', 'all-in-one-seo-pack' ) );
202
 
203
  ?>
204
 
205
+ <input type="submit" class="button-secondary" name="analyze"
206
+ value="<?php _e( 'Analyze', 'all-in-one-seo-pack' ); ?>" aria-label="Analyze"/>
207
+ <input type="submit" class="button-primary"
208
+ value="<?php _e( 'Convert', 'all-in-one-seo-pack' ); ?>" aria-label="Convert"/>
 
 
 
 
 
 
 
209
 
210
  </form>
211
 
222
  * First check to see what records for $new already exist, storing the corresponding post_id values in an array.
223
  * When the conversion happens, ignore rows that contain a post_id, to avoid duplicate entries.
224
  *
225
+ *
226
  * @param string $old Old meta_key entries.
227
  * @param string $new New meta_key entries.
228
  * @param bool $delete_old Whether to delete the old entries.
238
  $output = new stdClass;
239
 
240
  if ( ! $old || ! $new ) {
 
241
  $output->WP_Error = 1;
242
 
243
  return $output;
294
  $output = new stdClass;
295
 
296
  if ( empty( $_aiosp_seometa_platforms[ $old_platform ] ) || empty( $_aiosp_seometa_platforms[ $new_platform ] ) ) {
 
297
  $output->WP_Error = 1;
298
 
299
  return $output;
353
  $output = new stdClass;
354
 
355
  if ( empty( $_aiosp_seometa_platforms[ $old_platform ] ) || empty( $_aiosp_seometa_platforms[ $new_platform ] ) ) {
 
356
  $output->WP_Error = 1;
357
 
358
  return $output;
378
  $update = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
379
 
380
  // Count items in returned arrays.
 
381
  // $ignore = count( (array)$ignore );
382
  $update = count( (array) $update );
383
 
384
  // Calculate update/ignore by comparison.
 
385
  // $update = ( (int)$update > (int)$ignore ) ? ( (int)$update - (int)$ignore ) : 0;
386
+ // update output numbers
387
  $output->update += (int) $update;
388
  $output->ignore += (int) $ignore;
389
 
397
 
398
  }
399
 
400
+
401
  // define('aiosp_seometa_PLUGIN_DIR', dirname(__FILE__));
402
  // add_action( 'plugins_loaded', 'aiosp_seometa_import' );
 
403
  /**
404
  * Initialize the SEO Data Transporter plugin
405
  */
411
  * The associative array of supported themes.
412
  */
413
  $_aiosp_seometa_themes = array(
414
+ // alphabatized
415
  'Builder' => array(
416
  'Custom Doctitle' => '_builder_seo_title',
417
  'META Description' => '_builder_seo_description',
483
  * The associative array of supported plugins.
484
  */
485
  $_aiosp_seometa_plugins = array(
486
+ // alphabatized
487
+ 'Add Meta Tags' => array(
488
  'Custom Doctitle' => '_amt_title',
489
  'META Description' => '_amt_description',
490
  'META Keywords' => '_amt_keywords',
515
  'Canonical URI' => '_wds_canonical',
516
  'Redirect URI' => '_wds_redirect',
517
  ),
518
+ 'Jetpack' => array(
519
  'META Description' => 'advanced_seo_description',
520
  ),
521
  'Meta SEO Pack' => array(
532
  'META Description' => 'rank_math_description',
533
  'Canonical URI' => 'rank_math_canonical_url',
534
  ),
535
+ 'SEOpressor' => array(
536
  'Custom Doctitle' => '_seopressor_meta_title',
537
  'META Description' => '_seopressor_meta_description',
538
  ),
566
  /**
567
  * Include the other elements of the plugin.
568
  */
 
569
  // require_once( aiosp_seometa_PLUGIN_DIR . '/admin.php' );
570
  // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
 
571
  /**
572
  * Init hook.
573
  *
574
  * Hook fires after plugin functions are loaded.
575
  *
576
  * @since 0.9.10
577
+ *
578
  */
579
  do_action( 'aiosp_seometa_import' );
580
 
582
 
583
  /**
584
  * Activation Hook
 
585
  * @since 0.9.4
586
  */
587
  register_activation_hook( __FILE__, 'aiosp_seometa_activation_hook' );
588
  function aiosp_seometa_activation_hook() {
589
+
590
  // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
591
  aiosp_seometa_meta_key_convert( '_yoast_seo_title', 'yoast_wpseo_title', true );
592
  aiosp_seometa_meta_key_convert( '_yoast_seo_metadesc', 'yoast_wpseo_metadesc', true );
aioseop-init.php CHANGED
@@ -2,6 +2,6 @@
2
  /**
3
  * We'll eventually put stuff in here from the main plugin file.
4
  *
5
- * @package All_in_One_SEO_Pack
6
- * @since 2.3.6
7
  */
2
  /**
3
  * We'll eventually put stuff in here from the main plugin file.
4
  *
5
+ * @package All-in-One-SEO-Pack
6
+ *
7
  */
aioseop_class.php CHANGED
@@ -1,16 +1,12 @@
1
  <?php
2
  /**
3
- * All in One SEO Pack Main Class file
4
  *
5
  * Main class file, to be broken up later.
6
  *
7
- * @package All_in_One_SEO_Pack
8
- * @since ?
9
  */
10
 
11
- /**
12
- * Module Base Class
13
- */
14
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
15
 
16
  /**
@@ -20,189 +16,45 @@ require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Includ
20
  */
21
  class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
22
 
23
- /**
24
- * Plugin Version
25
- *
26
- * Current version of the plugin.
27
- *
28
- * @since ?
29
- *
30
- * @var string $version
31
- */
32
  var $version = AIOSEOP_VERSION;
33
 
34
- /**
35
- * Max Description Length
36
- *
37
- * Max numbers of chars in auto-generated description.
38
- *
39
- * @since ?
40
- *
41
- * @var int $maximum_description_length
42
- */
43
  var $maximum_description_length = 160;
44
 
45
- /**
46
- * Min Description Length
47
- *
48
- * Minimum number of chars an excerpt should be so that it can be used as description.
49
- *
50
- * @since ?
51
- *
52
- * @var int $minimum_description_length
53
- */
54
  var $minimum_description_length = 1;
55
 
56
- /**
57
- * OB Start Detected
58
- *
59
- * Whether output buffering is already being used during forced title rewrites.
60
- *
61
- * @since ?
62
- *
63
- * @var bool $ob_start_detected
64
- */
65
  var $ob_start_detected = false;
66
 
67
- /**
68
- * Title Start
69
- *
70
- * The start of the title text in the head section for forced title rewrites.
71
- *
72
- * @since ?
73
- *
74
- * @var int $title_start
75
- */
76
  var $title_start = - 1;
77
 
78
- /**
79
- * Title End
80
- *
81
- * The end of the title text in the head section for forced title rewrites.
82
- *
83
- * @since ?
84
- *
85
- * @var int $title_end
86
- */
87
  var $title_end = - 1;
88
 
89
- /**
90
- * Original Title
91
- *
92
- * The title before rewriting.
93
- *
94
- * @since ?
95
- *
96
- * @var string $orig_title
97
- */
98
  var $orig_title = '';
99
 
100
- /**
101
- * Log File
102
- *
103
- * Filename of log file.
104
- *
105
- * @since ?
106
- *
107
- * @var string $log_file
108
- */
109
  var $log_file;
110
 
111
- /**
112
- * Do Log
113
- *
114
- * Flag whether there should be logging.
115
- *
116
- * @since ?
117
- *
118
- * @var bool $do_log
119
- */
120
  var $do_log;
121
 
122
- /**
123
- * Token
124
- *
125
- * @since ?
126
- * @deprecated
127
- *
128
- * @var null $token
129
- */
130
  var $token;
131
-
132
- /**
133
- * Secret
134
- *
135
- * @since ?
136
- * @deprecated
137
- *
138
- * @var null $secret
139
- */
140
  var $secret;
141
-
142
- /**
143
- * Access Token
144
- *
145
- * @since ?
146
- * @deprecated
147
- *
148
- * @var null $access_token
149
- */
150
  var $access_token;
151
-
152
- /**
153
- * GA Token
154
- *
155
- * @since ?
156
- * @deprecated
157
- *
158
- * @var null $ga_token
159
- */
160
  var $ga_token;
161
-
162
- /**
163
- * Account Cache
164
- *
165
- * @since ?
166
- * @deprecated
167
- *
168
- * @var null $account_cache
169
- */
170
  var $account_cache;
171
-
172
- /**
173
- * Profile ID
174
- *
175
- * @since ?
176
- * @deprecated
177
- *
178
- * @var null $profile_id
179
- */
180
  var $profile_id;
181
-
182
- /**
183
- * Meta Opts
184
- *
185
- * @since ?
186
- *
187
- * @var bool $meta_opts
188
- */
189
  var $meta_opts = false;
190
-
191
- /**
192
- * Is Front Page
193
- *
194
- * @since ?
195
- *
196
- * @var bool|null $is_front_page
197
- */
198
  var $is_front_page = null;
199
 
200
  /**
201
- * Constructor
202
- *
203
  * All_in_One_SEO_Pack constructor.
204
  *
205
- * @since ?
206
  * @since 2.3.14 #921 More google analytics options added.
207
  * @since 2.4.0 #1395 Longer Meta Descriptions.
208
  * @since 2.6.1 #1694 Back to shorter meta descriptions.
@@ -216,9 +68,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
216
  } else {
217
  $this->do_log = false;
218
  }
219
- /* translators: This is a header for the General Settings menu. %s is a placeholder and is replaced with the name of the plugin. */
220
  $this->name = sprintf( __( '%s Plugin Options', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
221
- /* translators: This is the main menu of the plugin. */
222
  $this->menu_name = __( 'General Settings', 'all-in-one-seo-pack' );
223
 
224
  $this->prefix = 'aiosp_'; // Option prefix.
@@ -230,12 +81,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
230
 
231
  $this->default_options = array(
232
  'license_key' => array(
233
- /* translators: This is a setting where users can enter their license code for All in One SEO Pack Pro. */
234
  'name' => __( 'License Key:', 'all-in-one-seo-pack' ),
235
  'type' => 'text',
236
  ),
237
  'home_title' => array(
238
- /* translators: This is a setting where users can enter the title for their homepage. */
239
  'name' => __( 'Home Title:', 'all-in-one-seo-pack' ),
240
  'default' => null,
241
  'type' => 'text',
@@ -246,7 +95,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
246
  'condshow' => array( 'aiosp_use_static_home_info' => 0 ),
247
  ),
248
  'home_description' => array(
249
- /* translators: This is a setting where users can enter the description for their homepage. */
250
  'name' => __( 'Home Description:', 'all-in-one-seo-pack' ),
251
  'default' => '',
252
  'type' => 'textarea',
@@ -257,30 +105,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
257
  'condshow' => array( 'aiosp_use_static_home_info' => 0 ),
258
  ),
259
  'togglekeywords' => array(
260
- /* translators: This is a setting where users can enable the use of meta keywords for their website. */
261
  'name' => __( 'Use Keywords:', 'all-in-one-seo-pack' ),
262
  'default' => 1,
263
  'type' => 'radio',
264
  'initial_options' => array(
265
- /* translators: Some settings are either 'Enabled' or 'Disabled'. 'Activated' and 'Deactivated' mean the same. */
266
  0 => __( 'Enabled', 'all-in-one-seo-pack' ),
267
- /* translators: Some settings are either 'Enabled' or 'Disabled'. 'Activated' and 'Deactivated' mean the same. */
268
  1 => __( 'Disabled', 'all-in-one-seo-pack' ),
269
  ),
270
  ),
271
  'home_keywords' => array(
272
- /* translators: This is a setting where users can enter meta keywords for their homepage. */
273
  'name' => __( 'Home Keywords (comma separated):', 'all-in-one-seo-pack' ),
274
  'default' => null,
275
  'type' => 'textarea',
276
  'sanitize' => 'text',
277
- 'condshow' => array(
278
- 'aiosp_togglekeywords' => 0,
279
- 'aiosp_use_static_home_info' => 0,
280
- ),
281
  ),
282
  'use_static_home_info' => array(
283
- /* translators: This is a setting where users can indicate that they are using a static page for their homepage. */
284
  'name' => __( 'Use Static Front Page Instead', 'all-in-one-seo-pack' ),
285
  'default' => 0,
286
  'type' => 'radio',
@@ -290,18 +130,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
290
  ),
291
  ),
292
  'can' => array(
293
- /* translators: This is the name of a setting. Canonical URLs help users prevent duplicate content issues - https://en.wikipedia.org/wiki/Canonical_link_element. Leave "Canonical" in English if there is no such term in your language. */
294
  'name' => __( 'Canonical URLs:', 'all-in-one-seo-pack' ),
295
  'default' => 1,
296
  ),
297
  'no_paged_canonical_links' => array(
298
- /* translators: This is the name of a setting. Canonical URLs help users prevent duplicate content issues - https://en.wikipedia.org/wiki/Canonical_link_element. Leave "Canonical" in English if there is no such term in your language. Enabling this setting means the plugin will use the URL of the first page as the canonical URL for all subsequent paginated pages. */
299
  'name' => __( 'No Pagination for Canonical URLs:', 'all-in-one-seo-pack' ),
300
  'default' => 0,
301
  'condshow' => array( 'aiosp_can' => 'on' ),
302
  ),
303
  'force_rewrites' => array(
304
- /* translators: This is the name of a setting. Enabling this option forces the plugin to use output buffering to ensure that the title tag will be rewritten. */
305
  'name' => __( 'Force Rewrites:', 'all-in-one-seo-pack' ),
306
  'default' => 1,
307
  'type' => 'hidden',
@@ -312,7 +149,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
312
  ),
313
  ),
314
  'use_original_title' => array(
315
- /* translators: This is the name of a setting. Enabling this option forces the plugin to use the wp_title() function to fetch the title tag. */
316
  'name' => __( 'Use Original Title:', 'all-in-one-seo-pack' ),
317
  'type' => 'radio',
318
  'default' => 0,
@@ -322,143 +158,126 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
322
  ),
323
  ),
324
  'home_page_title_format' => array(
325
- /* translators: This is a setting where users can enter the title format for the homepage. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
326
- 'name' => __( 'Home Page Title Format:', 'all-in-one-seo-pack' ),
327
- 'type' => 'text',
328
- 'default' => '%page_title%',
329
  ),
330
  'page_title_format' => array(
331
-
332
- /* translators: This is a setting where users can enter the title format for Pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
333
- 'name' => __( 'Page Title Format:', 'all-in-one-seo-pack' ),
334
- 'type' => 'text',
335
- 'default' => '%page_title% | %site_title%',
336
  ),
337
  'post_title_format' => array(
338
- /* translators: This is a setting where users can enter the title format for Posts. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
339
- 'name' => __( 'Post Title Format:', 'all-in-one-seo-pack' ),
340
- 'type' => 'text',
341
- 'default' => '%post_title% | %site_title%',
342
  ),
343
  'category_title_format' => array(
344
- /* translators: This is a setting where users can enter the title format for categories. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
345
- 'name' => __( 'Category Title Format:', 'all-in-one-seo-pack' ),
346
- 'type' => 'text',
347
- 'default' => '%category_title% | %site_title%',
348
  ),
349
  'archive_title_format' => array(
350
- /* translators: This is a setting where users can enter the title format for archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
351
- 'name' => __( 'Archive Title Format:', 'all-in-one-seo-pack' ),
352
- 'type' => 'text',
353
- 'default' => '%archive_title% | %site_title%',
354
  ),
355
  'date_title_format' => array(
356
- /* translators: This is a setting where users can enter the title format for date archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
357
- 'name' => __( 'Date Archive Title Format:', 'all-in-one-seo-pack' ),
358
- 'type' => 'text',
359
- 'default' => '%date% | %site_title%',
360
  ),
361
  'author_title_format' => array(
362
- /* translators: This is a setting where users can enter the title format for author archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
363
- 'name' => __( 'Author Archive Title Format:', 'all-in-one-seo-pack' ),
364
- 'type' => 'text',
365
- 'default' => '%author% | %site_title%',
366
  ),
367
  'tag_title_format' => array(
368
- /* translators: This is a setting where users can enter the title format for tag archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
369
- 'name' => __( 'Tag Title Format:', 'all-in-one-seo-pack' ),
370
- 'type' => 'text',
371
- 'default' => '%tag% | %site_title%',
372
  ),
373
  'search_title_format' => array(
374
- /* translators: This is a setting where users can enter the title format for the search page. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
375
- 'name' => __( 'Search Title Format:', 'all-in-one-seo-pack' ),
376
- 'type' => 'text',
377
- 'default' => '%search% | %site_title%',
378
  ),
379
  'description_format' => array(
380
- /* translators: This is a setting where users can enter the description format. The description format is the format All in One SEO Pack uses to rewrite the meta description tag. */
381
- 'name' => __( 'Description Format', 'all-in-one-seo-pack' ),
382
- 'type' => 'text',
383
- 'default' => '%description%',
384
  ),
385
  '404_title_format' => array(
386
- /* translators: This is a setting where users can enter the title format for the 404 page. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
387
- 'name' => __( '404 Title Format:', 'all-in-one-seo-pack' ),
388
- 'type' => 'text',
389
- 'default' => __( 'Nothing found for %request_words%', 'all-in-one-seo-pack' ),
390
  ),
391
  'paged_format' => array(
392
- /* translators: This is a setting where users can enter the title format for paginated pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
393
- 'name' => __( 'Paged Format:', 'all-in-one-seo-pack' ),
394
- 'type' => 'text',
395
- 'default' => sprintf( ' - %s %%page%%', __( 'Part', 'all-in-one-seo-pack' ) ),
396
  ),
397
  'cpostactive' => array(
398
- /* translators: This is a setting where users can indicate which post types they want to use All in One SEO Pack with. */
399
- 'name' => __( 'SEO on only these Content Types:', 'all-in-one-seo-pack' ),
400
- 'type' => 'multicheckbox',
401
- 'default' => array( 'post', 'page' ),
402
  ),
403
  'taxactive' => array(
404
- /* translators: This is a setting where users can indicate which taxonomies they want to use All in One SEO Pack with. */
405
- 'name' => __( 'SEO on only these taxonomies:', 'all-in-one-seo-pack' ),
406
- 'type' => 'multicheckbox',
407
- 'default' => array( 'category', 'post_tag' ),
408
  ),
409
  'cpostnoindex' => array(
410
- /* translators: This is a setting where users can indicate which post types they want to NOINDEX by default. NOINDEX is a value of the HTML robots meta tag that asks search engines not to index the page. */
411
  'name' => __( 'Default to NOINDEX:', 'all-in-one-seo-pack' ),
412
  'type' => 'multicheckbox',
413
  'default' => array(),
414
  ),
415
  'cpostnofollow' => array(
416
- /* translators: This is a setting where users can indicate which post types they want to NOFOLLOW by default. NOFOLLOW is a value of the HTML robots meta tag that asks search engines not to follow any links on the page. */
417
  'name' => __( 'Default to NOFOLLOW:', 'all-in-one-seo-pack' ),
418
  'type' => 'multicheckbox',
419
  'default' => array(),
420
  ),
421
- 'posttypecolumns' => array(
422
- /* translators: This is a setting where users can indicate for which post types they want to enable columns. Columns are added to the All Posts, All Pages, etc. list pages and allow users to quick-edit their title and description - https://semperplugins.com/documentation/display-settings/#show-column-labels-for-custom-post-types. */
423
- 'name' => __( 'Show Column Labels for Custom Post Types:', 'all-in-one-seo-pack' ),
424
- 'type' => 'multicheckbox',
425
- 'default' => array( 'post', 'page' ),
426
  ),
427
  'google_verify' => array(
428
- 'name' => 'Google Search Console:',
429
  'default' => '',
430
  'type' => 'text',
431
  ),
432
  'bing_verify' => array(
433
- 'name' => 'Bing Webmaster Tools:',
434
  'default' => '',
435
  'type' => 'text',
436
  ),
437
  'pinterest_verify' => array(
438
- /* translators: This is a setting where users can add their Pinterest website verification code. */
439
  'name' => __( 'Pinterest Site Verification:', 'all-in-one-seo-pack' ),
440
  'default' => '',
441
  'type' => 'text',
442
  ),
443
- 'yandex_verify' => array(
444
- 'name' => 'Yandex Webmaster Tools:',
445
  'default' => '',
446
  'type' => 'text',
447
  ),
448
- 'baidu_verify' => array(
449
- 'name' => 'Baidu Webmaster Tools:',
450
  'default' => '',
451
  'type' => 'text',
452
  ),
 
 
 
 
453
  'google_analytics_id' => array(
454
- /* translators: This is a setting where users can add their Google Analytics verification code. Leave this in English if there is no translation for "Google Analytics". */
455
  'name' => __( 'Google Analytics ID:', 'all-in-one-seo-pack' ),
456
  'default' => null,
457
  'type' => 'text',
458
  'placeholder' => 'UA-########-#',
459
  ),
460
  'ga_advanced_options' => array(
461
- /* translators: This is a setting users can enable to display more advanced options for Google Analytics. */
462
  'name' => __( 'Advanced Analytics Options:', 'all-in-one-seo-pack' ),
463
  'default' => 'on',
464
  'type' => 'radio',
@@ -475,7 +294,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
475
  ),
476
  ),
477
  'ga_domain' => array(
478
- /* translators: This is a setting which allows users to set the cookie domain for their Google Analytics tracking code. */
479
  'name' => __( 'Tracking Domain:', 'all-in-one-seo-pack' ),
480
  'type' => 'text',
481
  'condshow' => array(
@@ -488,7 +306,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
488
  ),
489
  ),
490
  'ga_multi_domain' => array(
491
- /* translators: This is a setting which allows users to enable Google Analytics tracking for multiple domain names. */
492
  'name' => __( 'Track Multiple Domains:', 'all-in-one-seo-pack' ),
493
  'default' => 0,
494
  'condshow' => array(
@@ -501,7 +318,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
501
  ),
502
  ),
503
  'ga_addl_domains' => array(
504
- /* translators: This is a setting which allows users to enter additional domain names used for Google Analytics cross-domain tracking - https://support.google.com/analytics/answer/1034342?hl=en.*/
505
  'name' => __( 'Additional Domains:', 'all-in-one-seo-pack' ),
506
  'type' => 'textarea',
507
  'condshow' => array(
@@ -515,7 +331,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
515
  ),
516
  ),
517
  'ga_anonymize_ip' => array(
518
- /* translators: This is a setting which tells Google Analytics not to track and store the IP addresses of website visitors. This is required to be compliant with the GDPR for example. */
519
  'name' => __( 'Anonymize IP Addresses:', 'all-in-one-seo-pack' ),
520
  'type' => 'checkbox',
521
  'condshow' => array(
@@ -528,7 +343,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
528
  ),
529
  ),
530
  'ga_display_advertising' => array(
531
- /* translators: This is a setting that enables a collection of Google Analytics features so you can, for example, create segments based on demographic and interest data. */
532
  'name' => __( 'Display Advertiser Tracking:', 'all-in-one-seo-pack' ),
533
  'type' => 'checkbox',
534
  'condshow' => array(
@@ -541,7 +355,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
541
  ),
542
  ),
543
  'ga_exclude_users' => array(
544
- /* translators: This is a setting that allows you to exclude certain WordPress user roles, e.g. Administrators, from Google Analytics tracking. */
545
  'name' => __( 'Exclude Users From Tracking:', 'all-in-one-seo-pack' ),
546
  'type' => 'multicheckbox',
547
  'condshow' => array(
@@ -554,7 +367,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
554
  ),
555
  ),
556
  'ga_track_outbound_links' => array(
557
- /* translators: This is a setting that enables tracking of outbound/external links by Google Analytics. */
558
  'name' => __( 'Track Outbound Links:', 'all-in-one-seo-pack' ),
559
  'default' => 0,
560
  'condshow' => array(
@@ -567,7 +379,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
567
  ),
568
  ),
569
  'ga_link_attribution' => array(
570
- /* translators: This is a setting for Google Analytics that allows you to tag your pages to implement enhanced link-tracking. */
571
  'name' => __( 'Enhanced Link Attribution:', 'all-in-one-seo-pack' ),
572
  'default' => 0,
573
  'condshow' => array(
@@ -580,257 +391,136 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
580
  ),
581
  ),
582
  'ga_enhanced_ecommerce' => array(
583
- /* translators: This is a setting which tells Google Analytics to track your customers' path to purchase on your e-commerce website. */
584
  'name' => __( 'Enhanced Ecommerce:', 'all-in-one-seo-pack' ),
585
  'default' => 0,
586
  'condshow' => array(
587
- 'aiosp_google_analytics_id' => array(
588
  'lhs' => 'aiosp_google_analytics_id',
589
  'op' => '!=',
590
  'rhs' => '',
591
  ),
592
- 'aiosp_ga_advanced_options' => 'on',
593
- ),
594
- ),
595
- 'schema_markup' => array(
596
- /* translators: This is a setting that outputs basic Schema.org markup, also known as structured data, into the source code of each page. */
597
- 'name' => __( 'Use Schema.org Markup', 'all-in-one-seo-pack' ),
598
- 'type' => 'radio',
599
- 'default' => 0,
600
- 'initial_options' => array(
601
- 1 => __( 'Enabled', 'all-in-one-seo-pack' ),
602
- 0 => __( 'Disabled', 'all-in-one-seo-pack' ),
603
- ),
604
- ),
605
- // TODO Change `schema_search_results_page` to `schema_add_search_results_page`. Requires modifying double arrow alignment.
606
- 'schema_search_results_page' => array(
607
- /* translators: This is a setting users can enable to add the basic markup code to their source code that is needed for Google to generate a Sitelinks Search Box - https://developers.google.com/search/docs/data-types/sitelinks-searchbox.*/
608
- 'name' => __( 'Display Sitelinks Search Box:', 'all-in-one-seo-pack' ),
609
- 'condshow' => array(
610
- 'aiosp_schema_markup' => 1,
611
- ),
612
- ),
613
- 'schema_social_profile_links' => array(
614
- 'name' => __( 'Social Profile Links:', 'all-in-one-seo-pack' ),
615
- 'type' => 'textarea',
616
- 'cols' => 60,
617
- 'rows' => 5,
618
- 'condshow' => array(
619
- 'aiosp_schema_markup' => 1,
620
- ),
621
- ),
622
- 'schema_site_represents' => array(
623
- 'name' => __( 'Person or Organization:', 'all-in-one-seo-pack' ),
624
- 'type' => 'radio',
625
- 'default' => 'organization',
626
- 'initial_options' => array(
627
- 'organization' => __( 'Organization', 'all-in-one-seo-pack' ),
628
- 'person' => __( 'Person', 'all-in-one-seo-pack' ),
629
- ),
630
- 'condshow' => array(
631
- 'aiosp_schema_markup' => 1,
632
- ),
633
- ),
634
- 'schema_organization_name' => array(
635
- 'name' => __( 'Organization Name:', 'all-in-one-seo-pack' ),
636
- 'type' => 'text',
637
- 'default' => '',
638
- 'condshow' => array(
639
- 'aiosp_schema_markup' => 1,
640
- 'aiosp_schema_site_represents' => 'organization',
641
- ),
642
- ),
643
- 'schema_organization_logo' => array(
644
- 'name' => __( 'Organization Logo:', 'all-in-one-seo-pack' ),
645
- 'type' => 'image',
646
- 'condshow' => array(
647
- 'aiosp_schema_markup' => 1,
648
- 'aiosp_schema_site_represents' => 'organization',
649
- ),
650
- ),
651
-
652
- 'schema_person_user' => array(
653
- 'name' => __( 'Person\'s Username:', 'all-in-one-seo-pack' ),
654
- 'type' => 'select',
655
- 'default' => 1,
656
- 'condshow' => array(
657
- 'aiosp_schema_markup' => 1,
658
- 'aiosp_schema_site_represents' => 'person',
659
- ),
660
- // Add initial options below.
661
- ),
662
- 'schema_phone_number' => array(
663
- 'name' => __( 'Phone Number:', 'all-in-one-seo-pack' ),
664
- 'type' => 'tel',
665
- 'autocomplete' => 'off',
666
- 'condshow' => array(
667
- 'aiosp_schema_markup' => 1,
668
- 'aiosp_schema_site_represents' => 'organization',
669
- ),
670
- ),
671
- 'schema_contact_type' => array(
672
- 'name' => __( 'Type of Contact:', 'all-in-one-seo-pack' ),
673
- 'type' => 'select',
674
- 'condshow' => array(
675
- 'aiosp_schema_markup' => 1,
676
- 'aiosp_schema_site_represents' => 'organization',
677
- ),
678
- 'initial_options' => array(
679
- 'none' => __( '-- Select --', 'all-in-one-seo-pack' ),
680
- 'customer support' => __( 'Customer Support', 'all-in-one-seo-pack' ),
681
- 'tech support' => __( 'Technical Support', 'all-in-one-seo-pack' ),
682
- 'billing support' => __( 'Billing Support', 'all-in-one-seo-pack' ),
683
- 'bill payment' => __( 'Bill Payment', 'all-in-one-seo-pack' ),
684
- 'sales' => __( 'Sales', 'all-in-one-seo-pack' ),
685
- 'reservations' => __( 'Reservations', 'all-in-one-seo-pack' ),
686
- 'credit card support' => __( 'Credit Card Support', 'all-in-one-seo-pack' ),
687
- 'emergency' => __( 'Emergency', 'all-in-one-seo-pack' ),
688
- 'baggage tracking' => __( 'Baggage Tracking', 'all-in-one-seo-pack' ),
689
- 'roadside assistance' => __( 'Roadside Assistance', 'all-in-one-seo-pack' ),
690
- 'package tracking' => __( 'Package Tracking', 'all-in-one-seo-pack' ),
691
  ),
692
  ),
693
  'use_categories' => array(
694
- /* translators: This is the name of a setting. By enabling it, the plugin will use the categories of the relevant post as meta keywords in addition to any user-specified keywords. */
695
  'name' => __( 'Use Categories for META keywords:', 'all-in-one-seo-pack' ),
696
  'default' => 0,
697
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
698
  ),
699
  'use_tags_as_keywords' => array(
700
- /* translators: This is the name of a setting. By enabling it, the plugin will use the tags of the relevant post as meta keywords in addition to any user-specified keywords. */
701
  'name' => __( 'Use Tags for META keywords:', 'all-in-one-seo-pack' ),
702
  'default' => 1,
703
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
704
  ),
705
  'dynamic_postspage_keywords' => array(
706
- /* translators: This a setting that allows you to dynamically output meta keywords on archive pages based on the keywords from the posts that are displayed by the archive page. */
707
  'name' => __( 'Dynamically Generate Keywords for Posts Page/Archives:', 'all-in-one-seo-pack' ),
708
  'default' => 1,
709
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
710
  ),
711
  'category_noindex' => array(
712
- /* translators: This is a global setting that allows you to NOINDEX all your categories. */
713
  'name' => __( 'Use noindex for Categories:', 'all-in-one-seo-pack' ),
714
  'default' => 1,
715
  ),
716
  'archive_date_noindex' => array(
717
- /* translators: This is a global setting that allows you to NOINDEX all your date archive pages. */
718
  'name' => __( 'Use noindex for Date Archives:', 'all-in-one-seo-pack' ),
719
  'default' => 1,
720
  ),
721
  'archive_author_noindex' => array(
722
- /* translators: This is a global setting that allows you to NOINDEX all your author archive pages. */
723
  'name' => __( 'Use noindex for Author Archives:', 'all-in-one-seo-pack' ),
724
  'default' => 1,
725
  ),
726
  'tags_noindex' => array(
727
- /* translators: This is a global setting that allows you to NOINDEX all your tag archive pages. */
728
  'name' => __( 'Use noindex for Tag Archives:', 'all-in-one-seo-pack' ),
729
  'default' => 0,
730
  ),
731
  'search_noindex' => array(
732
- /* translators: This is a setting that allows you to NOINDEX your search results page. */
733
  'name' => __( 'Use noindex for the Search page:', 'all-in-one-seo-pack' ),
734
  'default' => 0,
735
  ),
736
  '404_noindex' => array(
737
- /* translators: This is a setting that allows you to NOINDEX your 404 Not Found page. */
738
  'name' => __( 'Use noindex for the 404 page:', 'all-in-one-seo-pack' ),
739
  'default' => 0,
740
  ),
741
  'tax_noindex' => array(
742
- /* translators: This is a global setting that allows you to NOINDEX specific taxonomies. */
743
- 'name' => __( 'Use noindex for Taxonomy Archives:', 'all-in-one-seo-pack' ),
744
- 'type' => 'multicheckbox',
745
- 'default' => array(),
746
  ),
747
  'paginated_noindex' => array(
748
- /* translators: This is a global setting that allows you to NOINDEX all your paginated content (page 2 and higher). */
749
  'name' => __( 'Use noindex for paginated pages/posts:', 'all-in-one-seo-pack' ),
750
  'default' => 0,
751
  ),
752
  'paginated_nofollow' => array(
753
- /* translators: This is a global setting that allows you to NOFOLLOW all your paginated content. */
754
  'name' => __( 'Use nofollow for paginated pages/posts:', 'all-in-one-seo-pack' ),
755
  'default' => 0,
756
  ),
757
  'generate_descriptions' => array(
758
- /* translators: This is a setting that allows the plugin to automatically populate the meta description tag based on the excerpt or content of the post/page.*/
759
  'name' => __( 'Autogenerate Descriptions:', 'all-in-one-seo-pack' ),
760
  'default' => 0,
761
  ),
762
  'skip_excerpt' => array(
763
- /* translators: This is the name of a setting. By enabling it, the plugin will use the content of the post/page to automatically populate the meta description tag, instead of the excerpt. */
764
- 'name' => __( 'Use Content For Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
765
- 'default' => 0,
766
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
767
  ),
768
  'run_shortcodes' => array(
769
- /* translators: This is a setting that enables the plugin to execute shortcodes in the autogenerated descriptions. Shortcodes allow people to execute code inside WordPress posts, pages, and widgets without writing any code directly. */
770
  'name' => __( 'Run Shortcodes In Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
771
  'default' => 0,
772
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
773
  ),
774
  'hide_paginated_descriptions' => array(
775
- /* translators: This is a setting that, if enabled, removes the meta description for paginated content (page 2 and higher). */
776
  'name' => __( 'Remove Descriptions For Paginated Pages:', 'all-in-one-seo-pack' ),
777
  'default' => 0,
778
  ),
779
  'dont_truncate_descriptions' => array(
780
- /* translators: This is a setting that makes sure the plugin does not truncate the meta description tag if it is longer than what All in One SEO Pack recommends. */
781
  'name' => __( 'Never Shorten Long Descriptions:', 'all-in-one-seo-pack' ),
782
  'default' => 0,
783
  ),
 
 
 
 
784
  'unprotect_meta' => array(
785
- /* translators: This is a setting that allows users to unprotect internal postmeta fields for use with XML-RPC. */
786
  'name' => __( 'Unprotect Post Meta Fields:', 'all-in-one-seo-pack' ),
787
  'default' => 0,
788
  ),
789
  'redirect_attachement_parent' => array(
790
- /* translators: This is the name of a setting. By enabling it, the plugin will redirect attachment page requests to the post parent, or in other words, the post/page where the media is embedded. */
791
  'name' => __( 'Redirect Attachments to Post Parent:', 'all-in-one-seo-pack' ),
792
  'default' => 0,
793
  ),
794
  'ex_pages' => array(
795
- /* translators: This is a textarea setting where users can enter a list of pages that All in One SEO Pack should not affect. */
796
  'name' => __( 'Exclude Pages:', 'all-in-one-seo-pack' ),
797
  'type' => 'textarea',
798
  'default' => '',
799
  ),
800
  'post_meta_tags' => array(
801
- /* translators: This is a setting that allows users to ouput additional code, such as references to stylesheets or JavaScript libraries, into the HEAD section of each post. */
802
  'name' => __( 'Additional Post Headers:', 'all-in-one-seo-pack' ),
803
  'type' => 'textarea',
804
  'default' => '',
805
  'sanitize' => 'default',
806
  ),
807
  'page_meta_tags' => array(
808
- /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of each page. */
809
  'name' => __( 'Additional Page Headers:', 'all-in-one-seo-pack' ),
810
  'type' => 'textarea',
811
  'default' => '',
812
  'sanitize' => 'default',
813
  ),
814
  'front_meta_tags' => array(
815
- /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the frontpage/homepage. */
816
  'name' => __( 'Additional Front Page Headers:', 'all-in-one-seo-pack' ),
817
  'type' => 'textarea',
818
  'default' => '',
819
  'sanitize' => 'default',
820
  ),
821
  'home_meta_tags' => array(
822
- /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the static Posts page (see Settings > Reading). */
823
  'name' => __( 'Additional Posts Page Headers:', 'all-in-one-seo-pack' ),
824
  'type' => 'textarea',
825
  'default' => '',
826
  'sanitize' => 'default',
827
  ),
828
  'do_log' => array(
829
- /* translators: This is a setting that enables All in One SEO Pack to log important events to help with debugging. */
830
  'name' => __( 'Log important events:', 'all-in-one-seo-pack' ),
831
  'default' => null,
832
  ),
833
-
834
  );
835
 
836
  if ( ! AIOSEOPPRO ) {
@@ -839,12 +529,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
839
  }
840
 
841
  $this->locations = array(
842
- 'default' => array(
843
- 'name' => $this->name,
844
- 'prefix' => 'aiosp_',
845
- 'type' => 'settings',
846
- 'options' => null,
847
- ),
848
  'aiosp' => array(
849
  'name' => $this->plugin_name,
850
  'type' => 'metabox',
@@ -881,25 +566,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
881
  'upgrade' => array(
882
  'type' => 'html',
883
  'label' => 'none',
884
- 'default' => aiosp_common::get_upgrade_hyperlink(
885
- 'meta',
886
- sprintf(
887
- '%1$s %2$s Pro',
888
- /* translators: The complete string is as follows: "Upgrade to All in One SEO Pack Pro". */
889
- __( 'Upgrade to', 'all-in-one-seo-pack' ),
890
- AIOSEOP_PLUGIN_NAME
891
- ),
892
- __( 'UPGRADE TO PRO VERSION', 'all-in-one-seo-pack' ),
893
- '_blank'
894
- ),
895
  ),
896
  'support' => array(
897
  'type' => 'html',
898
  'label' => 'none',
899
- 'default' => '<a target="_blank" href="https://semperplugins.com/support/">' . __( 'Support Forum', 'all-in-one-seo-pack' ) . '</a>',
 
900
  ),
901
  'snippet' => array(
902
- /* translators: The preview snippet shows how the page will look like in the search results (title, meta description and permalink). */
903
  'name' => __( 'Preview Snippet', 'all-in-one-seo-pack' ),
904
  'type' => 'custom',
905
  'label' => 'top',
@@ -919,33 +594,27 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
919
  'rows' => 2,
920
  ),
921
 
922
- 'keywords' => array(
923
  'name' => __( 'Keywords (comma separated)', 'all-in-one-seo-pack' ),
924
  'type' => 'text',
925
  ),
926
- 'custom_link' => array(
927
- /* translators: This is a setting that users can enable to enter a custom canonical URL. */
928
  'name' => __( 'Custom Canonical URL', 'all-in-one-seo-pack' ),
929
  'type' => 'text',
930
  'size' => 60,
931
  ),
932
- 'noindex' => array(
933
- /* translators: This is a setting that allows users to add the NOINDEX robots meta tag value to the current post/page. */
934
  'name' => __( 'NOINDEX this page/post', 'all-in-one-seo-pack' ),
935
  'default' => '',
936
  ),
937
- 'nofollow' => array(
938
- /* translators: This is a setting that allows users to add the NOFOLLOW robots meta tag value to the current post/page. */
939
  'name' => __( 'NOFOLLOW this page/post', 'all-in-one-seo-pack' ),
940
  'default' => '',
941
  ),
942
- /* translators: This is a setting that allows users to exclude the current post/page from the sitemap. */
943
- 'sitemap_exclude' => array( 'name' => __( 'Exclude From Sitemap', 'all-in-one-seo-pack' ) ),
944
- /* translators: This is a setting that allows users to disable All in One SEO Pack for the current post/page. */
945
- 'disable' => array( 'name' => __( 'Disable on this page/post', 'all-in-one-seo-pack' ) ),
946
- 'disable_analytics' => array(
947
- /* translators: This is a setting that allows users to disable Google Analytics tracking for the current post/page. */
948
- 'name' => __( 'Disable Google Analytics', 'all-in-one-seo-pack' ),
949
  'condshow' => array( 'aiosp_disable' => 'on' ),
950
  ),
951
  ),
@@ -956,7 +625,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
956
 
957
  $this->layout = array(
958
  'default' => array(
959
- /* translators: This is the name of the main menu. */
960
  'name' => __( 'General Settings', 'all-in-one-seo-pack' ),
961
  'help_link' => 'https://semperplugins.com/documentation/general-settings/',
962
  'options' => array(), // This is set below, to the remaining options -- pdb.
@@ -986,19 +654,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
986
  ),
987
  ),
988
  'cpt' => array(
989
- /* translators: This is the name of a settings section where users can indicate which post types and taxonomies they want to use All in One SEO Pack with. */
990
  'name' => __( 'Content Type Settings', 'all-in-one-seo-pack' ),
991
  'help_link' => 'https://semperplugins.com/documentation/custom-post-type-settings/',
992
  'options' => array( 'taxactive', 'cpostactive' ),
993
  ),
994
  'display' => array(
995
- /* translators: This is the name of a settings section where users can control how All in One SEO Pack appears in the WordPress Administrator Panel. */
996
  'name' => __( 'Display Settings', 'all-in-one-seo-pack' ),
997
  'help_link' => 'https://semperplugins.com/documentation/display-settings/',
998
  'options' => array( 'posttypecolumns' ),
999
  ),
1000
  'webmaster' => array(
1001
- /* translators: This is the name of a settings section where users can add verification codes of webmaster platforms such as Google Search Console, Bing Webmaster Tools, etc. */
1002
  'name' => __( 'Webmaster Verification', 'all-in-one-seo-pack' ),
1003
  'help_link' => 'https://semperplugins.com/sections/webmaster-verification/',
1004
  'options' => array( 'google_verify', 'bing_verify', 'pinterest_verify', 'yandex_verify', 'baidu_verify' ),
@@ -1007,6 +672,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1007
  'name' => __( 'Google Settings', 'all-in-one-seo-pack' ),
1008
  'help_link' => 'https://semperplugins.com/documentation/google-settings/',
1009
  'options' => array(
 
 
1010
  'google_analytics_id',
1011
  'ga_advanced_options',
1012
  'ga_domain',
@@ -1020,21 +687,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1020
  'ga_enhanced_ecommerce',
1021
  ),
1022
  ),
1023
- 'schema' => array(
1024
- 'name' => __( 'Schema Settings', 'all-in-one-seo-pack' ),
1025
- 'help_link' => 'https://semperplugins.com/documentation/schema-settings/',
1026
- 'options' => array(
1027
- 'schema_markup',
1028
- 'schema_search_results_page',
1029
- 'schema_social_profile_links',
1030
- 'schema_site_represents',
1031
- 'schema_organization_name',
1032
- 'schema_organization_logo',
1033
- 'schema_person_user',
1034
- 'schema_phone_number',
1035
- 'schema_contact_type',
1036
- ),
1037
- ),
1038
  'noindex' => array(
1039
  'name' => __( 'Noindex Settings', 'all-in-one-seo-pack' ),
1040
  'help_link' => 'https://semperplugins.com/documentation/noindex-settings/',
@@ -1082,21 +734,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1082
  ),
1083
  );
1084
 
1085
- $user_args = array(
1086
- 'role__in' => array(
1087
- 'administrator',
1088
- 'editor',
1089
- 'author',
1090
- ),
1091
- 'orderby' => 'nicename',
1092
- );
1093
- $users = get_users( $user_args );
1094
-
1095
- $this->default_options['schema_person_user']['initial_options'] = array();
1096
- foreach ( $users as $user ) {
1097
- $this->default_options['schema_person_user']['initial_options'][ $user->ID ] = $user->data->user_nicename . ' (' . $user->data->display_name . ')';
1098
- }
1099
-
1100
  if ( AIOSEOPPRO ) {
1101
  // Add Pro options.
1102
  $this->default_options = aioseop_add_pro_opt( $this->default_options );
@@ -1127,17 +764,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1127
  }
1128
  }
1129
 
1130
- // good candidate for pro dir.
1131
  /**
1132
- * Custom Output Option
1133
- *
1134
  * Use custom callback for outputting snippet
1135
  *
1136
- * @since ?
1137
  * @since 2.3.16 Decodes HTML entities on title, description and title length count.
1138
  *
1139
  * @param $buf
1140
  * @param $args
 
1141
  * @return string
1142
  */
1143
  function custom_output_option( $buf, $args ) {
@@ -1178,8 +813,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1178
  if ( empty( $title_format ) ) {
1179
  $title = '<span id="' . $args['name'] . '_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title ) ) ) . '</span>';
1180
  } else {
1181
- $title_format = $this->get_preview_snippet_title();
1182
- $title = $title_format;
1183
  }
1184
 
1185
  $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( $description ) );
@@ -1189,16 +824,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1189
  }
1190
 
1191
  /**
1192
- * The get_preview_snippet_title() function.
1193
  *
1194
- * Processes the title format for the snippet preview on the Edit screen.
1195
  *
1196
  * @since 2.4.9
1197
- * @since 3.2.0 Fix #1408 & #2526.
1198
  *
 
1199
  * @return mixed
1200
  */
1201
- public function get_preview_snippet_title() {
1202
  $info = $this->get_page_snippet_info();
1203
  $title = $info['title'];
1204
  $description = $info['description'];
@@ -1206,36 +841,31 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1206
  $url = $info['url'];
1207
  $title_format = $info['title_format'];
1208
  $category = $info['category'];
1209
- $wp_query = $info['w'];
1210
- $post = $info['p'];
1211
-
1212
- // Posts page title doesn't need to be processed because get_aioseop_title() does this.
1213
- if ( is_home() ) {
1214
- return $this->get_preview_snippet_title_helper( $title );
1215
- }
1216
 
1217
  /**
1218
- * The aioseop_before_get_title_format action hook.
1219
  *
1220
- * Runs before we process the title format for the snippet preview is.
1221
  *
1222
- * @since 3.0.0
1223
  */
1224
  do_action( 'aioseop_before_get_title_format' );
1225
 
1226
  if ( false !== strpos( $title_format, '%site_title%', 0 ) ) {
1227
  $title_format = str_replace( '%site_title%', get_bloginfo( 'name' ), $title_format );
1228
  }
1229
- // %blog_title% macro is deprecated.
1230
  if ( false !== strpos( $title_format, '%blog_title%', 0 ) ) {
1231
  $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
1232
  }
1233
  $title_format = $this->apply_cf_fields( $title_format );
 
1234
  if ( false !== strpos( $title_format, '%post_title%', 0 ) ) {
1235
- $title_format = str_replace( '%post_title%', $this->get_preview_snippet_title_helper( $title ), $title_format );
1236
  }
1237
  if ( false !== strpos( $title_format, '%page_title%', 0 ) ) {
1238
- $title_format = str_replace( '%page_title%', $this->get_preview_snippet_title_helper( $title ), $title_format );
1239
  }
1240
  if ( false !== strpos( $title_format, '%current_date%', 0 ) ) {
1241
  $title_format = str_replace( '%current_date%', aioseop_formatted_date(), $title_format );
@@ -1243,12 +873,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1243
  if ( false !== strpos( $title_format, '%current_year%', 0 ) ) {
1244
  $title_format = str_replace( '%current_year%', date( 'Y' ), $title_format );
1245
  }
1246
- if ( false !== strpos( $title_format, '%current_month%', 0 ) ) {
1247
- $title_format = str_replace( '%current_month%', date( 'M' ), $title_format );
1248
- }
1249
- if ( false !== strpos( $title_format, '%current_month_i18n%', 0 ) ) {
1250
- $title_format = str_replace( '%current_month_i18n%', date_i18n( 'M' ), $title_format );
1251
- }
1252
  if ( false !== strpos( $title_format, '%post_date%', 0 ) ) {
1253
  $title_format = str_replace( '%post_date%', aioseop_formatted_date( get_the_time( 'U' ) ), $title_format );
1254
  }
@@ -1258,7 +882,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1258
  if ( false !== strpos( $title_format, '%post_month%', 0 ) ) {
1259
  $title_format = str_replace( '%post_month%', get_the_date( 'F' ), $title_format );
1260
  }
1261
- if ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) {
1262
  if ( AIOSEOPPRO && ! empty( $_GET ) && ! empty( $_GET['taxonomy'] ) && ! empty( $_GET['tag_ID'] ) && function_exists( 'wp_get_split_terms' ) ) {
1263
  $term_id = intval( $_GET['tag_ID'] );
1264
  $was_split = get_term_meta( $term_id, '_aioseop_term_was_split', true );
@@ -1272,10 +896,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1272
  }
1273
  }
1274
  if ( false !== strpos( $title_format, '%category_title%', 0 ) ) {
1275
- $title_format = str_replace( '%category_title%', $title, $title_format );
1276
  }
1277
  if ( false !== strpos( $title_format, '%taxonomy_title%', 0 ) ) {
1278
- $title_format = str_replace( '%taxonomy_title%', $title, $title_format );
1279
  }
1280
  } else {
1281
  if ( false !== strpos( $title_format, '%category%', 0 ) ) {
@@ -1288,12 +912,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1288
  $title_format = str_replace( '%taxonomy_title%', $category, $title_format );
1289
  }
1290
  if ( AIOSEOPPRO ) {
1291
- if ( strpos( $title_format, '%tax_', 0 ) && ! empty( $post ) ) {
1292
- $taxes = get_object_taxonomies( $post, 'objects' );
1293
  if ( ! empty( $taxes ) ) {
1294
  foreach ( $taxes as $t ) {
1295
  if ( strpos( $title_format, "%tax_{$t->name}%", 0 ) ) {
1296
- $terms = $this->get_all_terms( $post->ID, $t->name );
1297
  $term = '';
1298
  if ( count( $terms ) > 0 ) {
1299
  $term = $terms[0];
@@ -1310,50 +934,30 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1310
  }
1311
 
1312
  /**
1313
- * The aioseop_title_format filter hook.
1314
  *
1315
- * Filter the title for the preview snippet after replacing all macros.
1316
  *
1317
- * @since 3.0.0
1318
  *
1319
- * @param string $title_format Title format to be filtered.
1320
  */
1321
  $title_format = apply_filters( 'aioseop_title_format', $title_format );
1322
 
 
 
1323
  /**
1324
- * The aioseop_after_format_title action hook.
1325
  *
1326
- * Runs after we have processed the title format for the snippet preview is.
1327
  *
1328
- * @since 3.0.0
1329
  */
1330
  do_action( 'aioseop_after_format_title' );
1331
 
1332
  return $title_format;
1333
  }
1334
 
 
1335
  /**
1336
- * The get_preview_snippet_title_helper() function.
1337
- *
1338
- * Wraps the page or post title for the preview snippet title in its HTML span element.
1339
- * Helper function for the get_preview_snippet_title() function.
1340
- *
1341
- * @since 3.2.0
1342
- *
1343
- * @param string $title_format
1344
- * @return string
1345
- */
1346
- private function get_preview_snippet_title_helper( $title_format ) {
1347
- return '<span id="aiosp_snippet_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title_format ) ) ) . '</span>';
1348
- }
1349
-
1350
- /**
1351
- * The get_page_snippet_info() function.
1352
- *
1353
- * Gets data that is needed to determine the preview snippet.
1354
- *
1355
- * @since ?
1356
- *
1357
  * @return array
1358
  */
1359
  function get_page_snippet_info() {
@@ -1378,12 +982,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1378
  $opts = $this->meta_opts;
1379
  $post_id = $p->ID;
1380
  if ( empty( $post->post_modified_gmt ) ) {
1381
- $wp_query = new WP_Query(
1382
- array(
1383
- 'p' => $post_id,
1384
- 'post_type' => $post->post_type,
1385
- )
1386
- );
1387
  }
1388
  if ( 'page' === $post->post_type ) {
1389
  $wp_query->is_page = true;
@@ -1415,7 +1014,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1415
  }
1416
  $description = $this->get_main_description( $post );
1417
 
1418
- // All this needs to be in it's own function (class really).
1419
  if ( empty( $title_format ) ) {
1420
  if ( is_page() ) {
1421
  $title_format = $aioseop_options['aiosp_page_title_format'];
@@ -1507,10 +1106,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1507
  }
1508
 
1509
  /**
1510
- * Get Queried Object
1511
- *
1512
- * @since ?
1513
- *
1514
  * @return null|object|WP_Post
1515
  */
1516
  function get_queried_object() {
@@ -1532,14 +1127,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1532
  }
1533
 
1534
  /**
1535
- * Get Current Option
1536
- *
1537
- * @since ?
1538
- *
1539
  * @param array $opts
1540
  * @param null $location
1541
  * @param null $defaults
1542
  * @param null $post
 
1543
  * @return array
1544
  */
1545
  function get_current_options( $opts = array(), $location = null, $defaults = null, $post = null ) {
@@ -1547,8 +1139,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1547
  if ( null === $post ) {
1548
  global $post;
1549
  }
1550
-
1551
- // TODO Fetch correct ID for static posts page/Woocommerce shop page - #2729.
1552
  $post_id = $post;
1553
  if ( is_object( $post_id ) ) {
1554
  $post_id = $post_id->ID;
@@ -1613,11 +1203,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1613
  }
1614
 
1615
  /**
1616
- * Internationalize
1617
- *
1618
- * @since ?
1619
- *
1620
  * @param $in
 
1621
  * @return mixed|void
1622
  */
1623
  function internationalize( $in ) {
@@ -1640,15 +1227,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1640
  return apply_filters( 'localization', $in );
1641
  }
1642
 
1643
- /**
1644
- * WP Title
1645
- *
1646
- * Used to filter wp_title(), get our title.
1647
- *
1648
- * @since ?
1649
- *
1650
- * @return mixed|void
1651
- */
1652
  function wp_title() {
1653
  if ( ! $this->is_seo_enabled_for_cpt() ) {
1654
  return;
@@ -1668,19 +1247,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1668
  }
1669
 
1670
  /**
1671
- * Get AIOSEOP Title
1672
- *
1673
  * Gets the title that will be used by AIOSEOP for title rewrites or returns false.
1674
  *
1675
  * @param WP_Post $post the post object
1676
  * @param bool $use_original_title_format should the original title format be used viz. post_title | blog_title. This parameter was introduced
1677
  * to resolve issue#986
 
1678
  * @return bool|string
1679
  */
1680
  function get_aioseop_title( $post, $use_original_title_format = true ) {
1681
  global $aioseop_options;
1682
  // the_search_query() is not suitable, it cannot just return.
1683
- global $s, $STagging; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
1684
  $opts = $this->meta_opts;
1685
  if ( is_front_page() ) {
1686
  if ( ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
@@ -1709,23 +1287,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1709
  $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
1710
  }
1711
 
1712
- // #1616 - Avoid trying to get property of non-object when no posts are present on the homepage.
1713
  global $post;
1714
-
1715
- if ( $post === null ) {
1716
- $post_id = get_option( 'page_on_front' );
1717
- } else {
1718
- $post_id = $post->ID;
1719
- }
1720
 
1721
  if ( is_post_type_archive() && is_post_type_archive( 'product' ) && $post_id = wc_get_page_id( 'shop' ) && $post = get_post( $post_id ) ) {
 
1722
 
1723
  if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1724
  $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1725
  }
1726
  // $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1727
  if ( ! $title ) {
1728
- $title = $this->internationalize( get_post_meta( $post_id, '_aioseop_title', true ) );
1729
  } // This is/was causing the first product to come through.
1730
  if ( ! $title ) {
1731
  $title = $this->internationalize( $post->post_title );
@@ -1742,8 +1315,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1742
 
1743
  }
1744
 
1745
- // this is returned for woo.
1746
- return $this->paged_title( $title );
1747
  } elseif ( is_attachment() ) {
1748
  if ( null === $post ) {
1749
  return false;
@@ -1920,10 +1492,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1920
  }
1921
  } elseif ( ( is_tax() || is_category() ) && ! is_feed() ) {
1922
  return $this->get_tax_title();
1923
-
1924
- } elseif ( isset( $STagging ) && $STagging->is_tag_view() ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
1925
- // Simple tagging support.
1926
- $tag = $STagging->search_tag; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
1927
  if ( $tag ) {
1928
  $title_format = $aioseop_options['aiosp_tag_title_format'];
1929
  $title = str_replace( '%site_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
@@ -2023,14 +1593,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2023
  }
2024
 
2025
  /**
2026
- * Get Original Title
2027
- *
2028
- * @since ?
2029
- *
2030
  * @param string $sep
2031
  * @param bool $echo
2032
  * @param string $seplocation
2033
- * @return string The original title as delivered by WP (well, in most cases).
 
2034
  */
2035
  function get_original_title( $sep = '|', $echo = false, $seplocation = '' ) {
2036
  global $aioseop_options;
@@ -2125,12 +1692,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2125
  }
2126
 
2127
  /**
2128
- * Request as Words
2129
- *
2130
- * @since ?
2131
- *
2132
  * @param $request
2133
- * @return string User -readable nice words for a given request.
 
2134
  */
2135
  function request_as_words( $request ) {
2136
  $request = htmlspecialchars( $request );
@@ -2150,13 +1714,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2150
  }
2151
 
2152
  /**
2153
- * Apply Page Title Format
2154
- *
2155
- * @since ?
2156
- *
2157
  * @param $title
2158
  * @param null $p
2159
  * @param string $title_format
 
2160
  * @return string
2161
  */
2162
  function apply_page_title_format( $title, $p = null, $title_format = '' ) {
@@ -2174,17 +1735,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2174
  }
2175
 
2176
  /**
2177
- * Title Placeholder Helper
2178
- *
2179
  * Replace doc title templates inside % symbol on the frontend.
2180
  *
2181
- * @since ?
2182
- *
2183
  * @param $title
2184
  * @param $post
2185
  * @param string $type
2186
  * @param string $title_format
2187
  * @param string $category
 
2188
  * @return string
2189
  */
2190
  function title_placeholder_helper( $title, $post, $type = 'post', $title_format = '', $category = '' ) {
@@ -2193,6 +1751,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2193
  * Runs before applying the formatting for the doc title on the frontend.
2194
  *
2195
  * @since 3.0
 
2196
  */
2197
  do_action( 'aioseop_before_title_placeholder_helper' );
2198
 
@@ -2255,12 +1814,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2255
  if ( false !== strpos( $new_title, '%current_year%', 0 ) ) {
2256
  $new_title = str_replace( '%current_year%', date( 'Y' ), $new_title );
2257
  }
2258
- if ( false !== strpos( $new_title, '%current_month%', 0 ) ) {
2259
- $new_title = str_replace( '%current_month%', date( 'M' ), $new_title );
2260
- }
2261
- if ( false !== strpos( $new_title, '%current_month_i18n%', 0 ) ) {
2262
- $new_title = str_replace( '%current_month_i18n%', date_i18n( 'M' ), $new_title );
2263
- }
2264
  if ( false !== strpos( $new_title, '%post_date%', 0 ) ) {
2265
  $new_title = str_replace( '%post_date%', aioseop_formatted_date( get_the_date( 'U' ) ), $new_title );
2266
  }
@@ -2277,6 +1830,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2277
  * @since 3.0
2278
  *
2279
  * @param string $new_title Document title to be filtered.
 
2280
  */
2281
  $new_title = apply_filters( 'aioseop_title_format', $new_title );
2282
 
@@ -2284,6 +1838,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2284
  * Runs after applying the formatting for the doc title on the frontend.
2285
  *
2286
  * @since 3.0
 
2287
  */
2288
  do_action( 'aioseop_after_title_placeholder_helper' );
2289
 
@@ -2293,12 +1848,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2293
  }
2294
 
2295
  /**
2296
- * Get All Terms
2297
- *
2298
- * @since ?
2299
- *
2300
  * @param $id
2301
  * @param $taxonomy
 
2302
  * @return array
2303
  */
2304
  function get_all_terms( $id, $taxonomy ) {
@@ -2314,18 +1866,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2314
  }
2315
 
2316
  /**
2317
- * Paged Title
2318
- *
2319
- * @since ?
2320
- *
2321
  * @param $title
 
2322
  * @return string
2323
  */
2324
  function paged_title( $title ) {
2325
  // The page number if paged.
2326
  global $paged;
2327
  global $aioseop_options;
2328
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
2329
  // Simple tagging support.
2330
  global $STagging;
2331
  $page = get_query_var( 'page' );
@@ -2341,16 +1889,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2341
  $title .= $part;
2342
  }
2343
  }
2344
- // phpcs:enable
2345
 
2346
  return $title;
2347
  }
2348
 
2349
  /**
2350
- * Log
2351
- *
2352
- * @since ?
2353
- *
2354
  * @param $message
2355
  */
2356
  function log( $message ) {
@@ -2362,13 +1905,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2362
  }
2363
 
2364
  /**
2365
- * Apply Post Title Format
2366
- *
2367
- * @since ?
2368
- *
2369
  * @param $title
2370
  * @param string $category
2371
  * @param null $p
 
2372
  * @return string
2373
  */
2374
  function apply_post_title_format( $title, $category = '', $p = null ) {
@@ -2383,12 +1923,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2383
  }
2384
 
2385
  /**
2386
- * Get Post Title Format
2387
- *
2388
- * @since ?
2389
- *
2390
  * @param string $title_type
2391
  * @param null $p
 
2392
  * @return bool|string
2393
  */
2394
  function get_post_title_format( $title_type = 'post', $p = null ) {
@@ -2403,17 +1940,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2403
 
2404
  if ( ! empty( $aioseop_options['aiosp_cpostactive'] ) ) {
2405
  $wp_post_types = $aioseop_options['aiosp_cpostactive'];
2406
- if (
2407
- (
2408
- ( $title_type == 'archive' ) &&
2409
- is_post_type_archive( $wp_post_types ) &&
2410
- $prefix = "aiosp_{$title_type}_"
2411
- ) ||
2412
- (
2413
- ( $title_type == 'post' ) &&
2414
- $this->is_singular( $wp_post_types, $p ) &&
2415
- $prefix = 'aiosp_'
2416
- )
2417
  ) {
2418
  $post_type = get_post_type( $p );
2419
 
@@ -2427,12 +1955,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2427
  }
2428
 
2429
  /**
2430
- * Is Singular
2431
- *
2432
- * @since ?
2433
- *
2434
  * @param array $post_types
2435
  * @param null $post
 
2436
  * @return bool
2437
  */
2438
  function is_singular( $post_types = array(), $post = null ) {
@@ -2444,10 +1969,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2444
  }
2445
 
2446
  /**
2447
- * Is Static Posts Page
2448
- *
2449
- * @since ?
2450
- *
2451
  * @return bool|null
2452
  */
2453
  function is_static_posts_page() {
@@ -2462,10 +1983,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2462
  }
2463
 
2464
  /**
2465
- * Is Static Front Page
2466
- *
2467
- * @since ?
2468
- *
2469
  * @return bool|null
2470
  */
2471
  function is_static_front_page() {
@@ -2479,11 +1996,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2479
  }
2480
 
2481
  /**
2482
- * Get All Categories
2483
- *
2484
- * @since ?
2485
- *
2486
  * @param int $id
 
2487
  * @return array
2488
  */
2489
  function get_all_categories( $id = 0 ) {
@@ -2499,11 +2013,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2499
  }
2500
 
2501
  /**
2502
- * Get Taxonomy Title
2503
- *
2504
- * @since ?
2505
- *
2506
  * @param string $tax
 
2507
  * @return string
2508
  */
2509
  function get_tax_title( $tax = '' ) {
@@ -2526,12 +2037,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2526
  return $this->apply_tax_title_format( $name, $desc, $tax );
2527
  }
2528
 
 
2529
  /**
2530
- * Gets Taxonomy Name
 
2531
  *
2532
  * @param $tax
2533
  *
2534
- * @since ?
2535
  * @since 2.3.10 Remove option for capitalize categories. We still respect the option,
2536
  * and the default (true) or a legacy option in the db can be overridden with the new filter hook aioseop_capitalize_categories
2537
  * @since 2.3.15 Remove category capitalization completely
@@ -2556,11 +2068,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2556
  }
2557
 
2558
  /**
2559
- * Get Taxonomy Description
2560
- *
2561
- * @since ?
2562
- *
2563
  * @param $tax
 
2564
  * @return mixed|void
2565
  */
2566
  function get_tax_desc( $tax ) {
@@ -2580,13 +2089,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2580
  }
2581
 
2582
  /**
2583
- * Apply Taxonomy Title Format
2584
- *
2585
- * @since ?
2586
- *
2587
  * @param $category_name
2588
  * @param $category_description
2589
  * @param string $tax
 
2590
  * @return string
2591
  */
2592
  function apply_tax_title_format( $category_name, $category_description, $tax = '' ) {
@@ -2595,6 +2101,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2595
  * Runs before applying the formatting for the taxonomy title.
2596
  *
2597
  * @since 3.0
 
2598
  */
2599
  do_action( 'aioseop_before_tax_title_format' );
2600
 
@@ -2627,12 +2134,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2627
  if ( false !== strpos( $title, '%current_year%', 0 ) ) {
2628
  $title = str_replace( '%current_year%', date( 'Y' ), $title );
2629
  }
2630
- if ( false !== strpos( $title, '%current_month%', 0 ) ) {
2631
- $title = str_replace( '%current_month%', date( 'M' ), $title );
2632
- }
2633
- if ( false !== strpos( $title, '%current_month_i18n%', 0 ) ) {
2634
- $title = str_replace( '%current_month_i18n%', date_i18n( 'M' ), $title );
2635
- }
2636
 
2637
  /**
2638
  * Filters document title after applying the formatting.
@@ -2640,6 +2141,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2640
  * @since 3.0
2641
  *
2642
  * @param string $title Document title to be filtered.
 
2643
  */
2644
  $title = apply_filters( 'aioseop_title_format', $title );
2645
 
@@ -2649,6 +2151,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2649
  * Runs after applying the formatting for the taxonomy title.
2650
  *
2651
  * @since 3.0
 
2652
  */
2653
  do_action( 'aioseop_after_tax_title_format' );
2654
 
@@ -2656,11 +2159,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2656
  }
2657
 
2658
  /**
2659
- * Get Taxonomy Title Format
2660
- *
2661
- * @since ?
2662
- *
2663
  * @param string $tax
 
2664
  * @return string
2665
  */
2666
  function get_tax_title_format( $tax = '' ) {
@@ -2694,12 +2194,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2694
  }
2695
 
2696
  /**
2697
- * Apply Archive Title Format
2698
- *
2699
- * @since ?
2700
- *
2701
  * @param $title
2702
  * @param string $category
 
2703
  * @return string
2704
  */
2705
  function apply_archive_title_format( $title, $category = '' ) {
@@ -2716,10 +2213,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2716
  }
2717
 
2718
  /**
2719
- * Get Archive Title Format
2720
- *
2721
- * @since ?
2722
- *
2723
  * @return bool|string
2724
  */
2725
  function get_archive_title_format() {
@@ -2727,14 +2220,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2727
  }
2728
 
2729
  /**
2730
- * Get Main Description
2731
- *
2732
- * @since ?
2733
  * @since 2.3.14 #932 Adds filter "aioseop_description", removes extra filtering.
2734
  * @since 2.4 #951 Trim/truncates occurs inside filter "aioseop_description".
2735
  * @since 2.4.4.1 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
2736
  *
2737
  * @param null $post
 
2738
  * @return mixed|string|void
2739
  */
2740
  function get_main_description( $post = null ) {
@@ -2793,10 +2284,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2793
  }
2794
 
2795
  /**
2796
- * Show Page Description
2797
- *
2798
- * @since ?
2799
- *
2800
  * @return bool
2801
  */
2802
  function show_page_description() {
@@ -2812,10 +2299,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2812
  }
2813
 
2814
  /**
2815
- * Get Page Number
2816
- *
2817
- * @since ?
2818
- *
2819
  * @return mixed
2820
  */
2821
  function get_page_number() {
@@ -2832,8 +2315,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2832
  }
2833
 
2834
  /**
2835
- * Get AIOSEOP Description
2836
- *
2837
  * @since ?
2838
  * @since 2.4 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
2839
  *
@@ -2862,8 +2343,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2862
  }
2863
 
2864
  /**
2865
- * Gets Post Description
2866
- *
2867
  * Auto-generates description if settings are ON.
2868
  *
2869
  * @since 2.3.13 #899 Fixes non breacking space, applies filter "aioseop_description".
@@ -2872,6 +2352,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2872
  * @since 2.4 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
2873
  *
2874
  * @param object $post Post object.
 
2875
  * @return mixed|string
2876
  */
2877
  function get_post_description( $post ) {
@@ -2906,12 +2387,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2906
  }
2907
 
2908
  /**
2909
- * Trim Text without Filter Full Length
2910
- *
2911
- * @since ?
2912
  * @since 2.3.15 Brackets not longer replaced from filters.
2913
  *
2914
  * @param $text
 
2915
  * @return string
2916
  */
2917
  function trim_text_without_filters_full_length( $text ) {
@@ -2923,13 +2402,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2923
  }
2924
 
2925
  /**
2926
- * Trim Excerpt without Filters
2927
- *
2928
- * @since ?
2929
  * @since 2.3.15 Brackets not longer replaced from filters.
2930
  *
2931
  * @param $text
2932
  * @param int $max
 
2933
  * @return string
2934
  */
2935
  function trim_excerpt_without_filters( $text, $max = 0 ) {
@@ -2971,14 +2448,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2971
  }
2972
 
2973
  /**
2974
- * AIOSEOP Get URL
2975
- *
2976
- * @since ?
2977
- *
2978
- * @todo Change name to `*_get_url`.
2979
- *
2980
  * @param $query
2981
  * @param bool $show_page
 
2982
  * @return bool|false|string
2983
  */
2984
  function aiosp_mrt_get_url( $query, $show_page = true ) {
@@ -3075,11 +2547,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3075
  }
3076
 
3077
  /**
3078
- * Get Paged
3079
- *
3080
- * @since ?
3081
- *
3082
  * @param $link
 
3083
  * @return string
3084
  */
3085
  function get_paged( $link ) {
@@ -3112,10 +2581,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3112
  }
3113
 
3114
  /**
3115
- * Get Main Keywords
3116
- *
3117
- * @since ?
3118
- *
3119
  * @return comma|string
3120
  */
3121
  function get_main_keywords() {
@@ -3143,11 +2608,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3143
  }
3144
 
3145
  /**
3146
- * Get All Keywords
3147
- *
3148
- * @since ?
3149
- *
3150
- * @return string|null comma-separated list of unique keywords
3151
  */
3152
  function get_all_keywords() {
3153
  global $posts;
@@ -3221,11 +2682,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3221
  }
3222
 
3223
  /**
3224
- * Keyword String to List
3225
- *
3226
- * @since ?
3227
- *
3228
  * @param $keywords
 
3229
  * @return array
3230
  */
3231
  function keyword_string_to_list( $keywords ) {
@@ -3239,11 +2697,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3239
  }
3240
 
3241
  /**
3242
- * Get All Tags
3243
- *
3244
- * @since ?
3245
- *
3246
  * @param int $id
 
3247
  * @return array
3248
  */
3249
  function get_all_tags( $id = 0 ) {
@@ -3273,11 +2728,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3273
  }
3274
 
3275
  /**
3276
- * Get Unique Keywords
3277
- *
3278
- * @since ?
3279
- *
3280
  * @param $keywords
 
3281
  * @return string
3282
  */
3283
  function get_unique_keywords( $keywords ) {
@@ -3285,11 +2737,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3285
  }
3286
 
3287
  /**
3288
- * Clean Keyword List
3289
- *
3290
- * @since ?
3291
- *
3292
  * @param $keywords
 
3293
  * @return array
3294
  */
3295
  function clean_keyword_list( $keywords ) {
@@ -3307,10 +2756,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3307
  }
3308
 
3309
  /**
3310
- * Split Share Term
3311
- *
3312
- * @since ?
3313
- *
3314
  * @param $term_id
3315
  * @param $new_term_id
3316
  * @param string $term_taxonomy_id
@@ -3330,11 +2775,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3330
  }
3331
 
3332
  /**
3333
- * Get All Term Data
3334
- *
3335
- * @since ?
3336
- *
3337
  * @param $term_id
 
3338
  * @return array
3339
  */
3340
  function get_all_term_data( $term_id ) {
@@ -3438,11 +2880,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3438
  }
3439
  */
3440
 
3441
- /**
3442
- * Add Page Hooks
3443
- *
3444
- * @since ?
3445
- */
3446
  function add_page_hooks() {
3447
 
3448
  global $aioseop_options;
@@ -3468,7 +2905,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3468
  }
3469
 
3470
  if ( isset( $post_types['attachment'] ) ) {
3471
- /* translators: This refers to entries in the Media Library (images, videos, recordings and other files) and their attachment pages. */
3472
  $post_types['attachment'] = __( 'Media / Attachments', 'all-in-one-seo-pack' );
3473
  }
3474
  if ( isset( $all_post_types['attachment'] ) ) {
@@ -3510,7 +2946,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3510
  $name = $post_objs[ $p ]->labels->singular_name;
3511
  if ( ! isset( $this->default_options[ $field ] ) ) {
3512
  $this->default_options[ $field ] = array(
3513
- /* translators: The title format is the template that is used to format the title for each post of a certain post type (Posts, Pages, etc.). */
3514
  'name' => "$name " . __( 'Title Format:', 'all-in-one-seo-pack' ) . "<br />($p)",
3515
  'type' => 'text',
3516
  'default' => '%post_title% | %site_title%',
@@ -3542,12 +2977,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3542
  $name = $pt;
3543
  if ( ! isset( $this->default_options[ $field ] ) ) {
3544
  $this->default_options[ $field ] = array(
3545
- /* translators: The taxonomy title format is the template that is used to format the title for each taxonomy term of a certain taxonomy (Categories, Tags, etc.). */
3546
  'name' => "$name " . __( 'Taxonomy Title Format:', 'all-in-one-seo-pack' ),
3547
  'type' => 'text',
3548
  'default' => '%taxonomy_title% | %site_title%',
3549
  'condshow' => array(
3550
- 'aiosp_taxactive\[\]' => $p,
3551
  ),
3552
  );
3553
  $this->layout['cpt']['options'][] = $field;
@@ -3558,7 +2992,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3558
 
3559
  if ( AIOSEOPPRO ) {
3560
  global $aioseop_update_checker;
3561
- add_action( "{$this->prefix}update_options", array( $aioseop_update_checker, 'license_change_check' ), 10, 2 );
 
 
 
 
 
3562
  add_action( "{$this->prefix}settings_update", array( $aioseop_update_checker, 'update_check' ), 10, 2 );
3563
  }
3564
 
@@ -3608,6 +3047,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3608
  // Screens `post.php`, `post-new.php`, & `../aioseop_class.php` share the same `count-char.js`.
3609
  case 'post.php':
3610
  case 'post-new.php':
 
 
 
 
 
 
 
 
3611
  // Fall through.
3612
  case 'toplevel_page_' . AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class':
3613
  wp_enqueue_script(
@@ -3628,24 +3075,19 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3628
  }
3629
 
3630
  /**
3631
- * Filter Submit
3632
- *
3633
- * @since ?
3634
- *
3635
  * @param $submit
 
3636
  * @return mixed
3637
  */
3638
  function filter_submit( $submit ) {
3639
  $submit['Submit_Default'] = array(
3640
  'type' => 'submit',
3641
  'class' => 'aioseop_reset_settings_button button-secondary',
3642
- /* translators: This is the text of a button that allows users to reset the General Settings to their default values. */
3643
  'value' => __( 'Reset General Settings to Defaults', 'all-in-one-seo-pack' ) . ' &raquo;',
3644
  );
3645
  $submit['Submit_All_Default'] = array(
3646
  'type' => 'submit',
3647
  'class' => 'aioseop_reset_settings_button button-secondary',
3648
- /* translators: This is the text of a button that allows users to reset all settings across the entire plugin to their default values. */
3649
  'value' => __( 'Reset ALL Settings to Defaults', 'all-in-one-seo-pack' ) . ' &raquo;',
3650
  );
3651
 
@@ -3653,12 +3095,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3653
  }
3654
 
3655
  /**
3656
- * Reset Options
3657
- *
3658
  * Handle resetting options to defaults, but preserve the license key if pro.
3659
  *
3660
- * @since ?
3661
- *
3662
  * @param null $location
3663
  * @param bool $delete
3664
  */
@@ -3701,14 +3139,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3701
  }
3702
 
3703
  /**
3704
- * Filter Settings
3705
- *
3706
- * @since ?
3707
  * @since 2.3.16 Forces HTML entity decode on placeholder values.
3708
  *
3709
  * @param $settings
3710
  * @param $location
3711
  * @param $current
 
3712
  * @return mixed
3713
  */
3714
  function filter_settings( $settings, $location, $current ) {
@@ -3719,6 +3155,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3719
  unset( $settings[ "{$prefix}$opt" ] );
3720
  }
3721
 
 
 
 
3722
  if ( AIOSEOPPRO ) {
3723
  if ( ! empty( $this->options['aiosp_license_key'] ) ) {
3724
  $settings['aiosp_license_key']['type'] = 'password';
@@ -3733,7 +3172,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3733
  if ( ! empty( $this->options['aiosp_cpostnoindex'] ) && in_array( $post_type, $this->options['aiosp_cpostnoindex'] ) ) {
3734
  $settings[ "{$prefix}noindex" ]['type'] = 'select';
3735
  $settings[ "{$prefix}noindex" ]['initial_options'] = array(
3736
- /* translators: This indicates that the current post/page is using the default value for its post type, which is NOINDEX. */
3737
  '' => __( 'Default - noindex', 'all-in-one-seo-pack' ),
3738
  'off' => __( 'index', 'all-in-one-seo-pack' ),
3739
  'on' => __( 'noindex', 'all-in-one-seo-pack' ),
@@ -3742,7 +3180,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3742
  if ( ! empty( $this->options['aiosp_cpostnofollow'] ) && in_array( $post_type, $this->options['aiosp_cpostnofollow'] ) ) {
3743
  $settings[ "{$prefix}nofollow" ]['type'] = 'select';
3744
  $settings[ "{$prefix}nofollow" ]['initial_options'] = array(
3745
- /* translators: This indicates that the current post/page is using the default value for its post type, which is NOFOLLOW. */
3746
  '' => __( 'Default - nofollow', 'all-in-one-seo-pack' ),
3747
  'off' => __( 'follow', 'all-in-one-seo-pack' ),
3748
  'on' => __( 'nofollow', 'all-in-one-seo-pack' ),
@@ -3786,12 +3223,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3786
  }
3787
 
3788
  /**
3789
- * Filter Options
3790
- *
3791
- * @since ?
3792
- *
3793
  * @param $options
3794
  * @param $location
 
3795
  * @return mixed
3796
  */
3797
  function filter_options( $options, $location ) {
@@ -3819,11 +3253,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3819
  return $options;
3820
  }
3821
 
3822
- /**
3823
- * Template Redirect
3824
- *
3825
- * @since ?
3826
- */
3827
  function template_redirect() {
3828
  global $aioseop_options;
3829
 
@@ -3845,12 +3274,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3845
  }
3846
 
3847
  /**
3848
- * The is_page_included() function.
3849
- *
3850
- * Checks whether All in One SEO Pack is enabled for this page.
3851
- *
3852
- * @since ?
3853
- *
3854
  * @return bool
3855
  */
3856
  function is_page_included() {
@@ -3931,11 +3354,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3931
  }
3932
 
3933
  /**
3934
- * Output Callback for Title
3935
- *
3936
- * @since ?
3937
- *
3938
  * @param $content
 
3939
  * @return mixed|string
3940
  */
3941
  function output_callback_for_title( $content ) {
@@ -3943,13 +3363,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3943
  }
3944
 
3945
  /**
3946
- * Rewrite Title
3947
- *
3948
  * Used for forcing title rewrites.
3949
  *
3950
- * @since ?
3951
- *
3952
  * @param $header
 
3953
  * @return mixed|string
3954
  */
3955
  function rewrite_title( $header ) {
@@ -3981,12 +3398,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3981
  }
3982
 
3983
  /**
3984
- * Replace Title
3985
- *
3986
- * @since ?
3987
- *
3988
  * @param $content
3989
  * @param $title
 
3990
  * @return mixed
3991
  */
3992
  function replace_title( $content, $title ) {
@@ -4004,11 +3418,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4004
  }
4005
 
4006
  /**
4007
- * Add Hooks
4008
- *
4009
  * Adds WordPress hooks.
4010
  *
4011
- * @since ?
4012
  * @since 2.3.13 #899 Adds filter:aioseop_description.
4013
  * @since 2.3.14 #593 Adds filter:aioseop_title.
4014
  * @since 2.4 #951 Increases filter:aioseop_description arguments number.
@@ -4041,7 +3452,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4041
  if ( current_user_can( 'update_plugins' ) ) {
4042
  add_action( 'admin_notices', array( $aioseop_update_checker, 'key_warning' ) );
4043
  }
4044
- add_action( 'after_plugin_row_' . AIOSEOP_PLUGIN_BASENAME, array( $aioseop_update_checker, 'add_plugin_row' ) );
 
 
 
 
 
4045
  }
4046
  } else {
4047
  if ( $aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on' ) {
@@ -4097,11 +3513,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4097
  }
4098
 
4099
  /**
4100
- * Make Unique Attachment Description
4101
- *
4102
- * @since ?
4103
- *
4104
  * @param $description
 
4105
  * @return string
4106
  */
4107
  function make_unique_att_desc( $description ) {
@@ -4109,30 +3522,23 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4109
  if ( is_attachment() ) {
4110
 
4111
  $url = $this->aiosp_mrt_get_url( $wp_query );
4112
- $unique_desc = '';
4113
  if ( $url ) {
4114
  $matches = array();
4115
  preg_match_all( '/(\d+)/', $url, $matches );
4116
  if ( is_array( $matches ) ) {
4117
- $unique_desc = join( '', $matches[0] );
4118
  }
4119
  }
4120
- $description .= ' ' . $unique_desc;
4121
  }
4122
 
4123
  return $description;
4124
  }
4125
 
4126
  /**
4127
- * AMP Head
4128
- *
4129
  * Adds meta description to AMP pages.
4130
  *
4131
- * @todo Change void returns to empty string returns.
4132
- *
4133
  * @since 2.3.11.5
4134
- *
4135
- * @return string|void
4136
  */
4137
  function amp_head() {
4138
  if ( ! $this->is_seo_enabled_for_cpt() ) {
@@ -4170,15 +3576,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4170
  }
4171
 
4172
  /**
4173
- * Is SEO Enabled for CPT
4174
- *
4175
  * Checks whether the current CPT should show the SEO tags.
4176
- *
4177
- * @since 2.9
4178
- *
4179
- * @todo Remove this as it is only a simple boolean check.
4180
- *
4181
- * @return bool
4182
  */
4183
  private function is_seo_enabled_for_cpt() {
4184
  global $aioseop_options;
@@ -4186,9 +3584,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4186
  }
4187
 
4188
  /**
4189
- * WP Head
4190
- *
4191
- * @since ?
4192
  * @since 2.3.14 #932 Removes filter "aioseop_description".
4193
  */
4194
  function wp_head() {
@@ -4201,17 +3596,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4201
  }
4202
 
4203
  if ( ! $this->is_page_included() ) {
4204
- /**
4205
- * The aioseop_robots_meta filter hook.
4206
- *
4207
- * Can be used to filter the robots meta tag value.
4208
- * e.g. 'noindex, nofollow'
4209
- *
4210
- * @since ?
4211
- *
4212
- * @param string
4213
- * @return string
4214
- */
4215
  $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
4216
  if ( ! empty( $robots_meta ) ) {
4217
  // Should plugin & version details be added here as well?
@@ -4321,24 +3706,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4321
  }
4322
  }
4323
  // Handle noindex, nofollow - robots meta.
4324
- if ( get_option( 'blog_public' ) ) {
4325
-
4326
- /**
4327
- * The aioseop_robots_meta filter hook.
4328
- *
4329
- * Can be used to filter the robots meta tag value.
4330
- * e.g. 'noindex, nofollow'
4331
- *
4332
- * @since ?
4333
- *
4334
- * @param string
4335
- * @return string
4336
- */
4337
- $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
4338
-
4339
- if ( ! empty( $robots_meta ) ) {
4340
- $meta_string .= sprintf( '<meta name="robots" content="%s"', esc_attr( $robots_meta ) ) . " />\n";
4341
- }
4342
  }
4343
  // Handle site verification.
4344
  if ( is_front_page() ) {
@@ -4348,13 +3718,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4348
  'bing' => 'msvalidate.01',
4349
  'pinterest' => 'p:domain_verify',
4350
  'yandex' => 'yandex-verification',
4351
- 'baidu' => 'baidu-site-verification',
4352
  ) as $k => $v
4353
  ) {
4354
  if ( ! empty( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) {
4355
  $meta_string .= '<meta name="' . $v . '" content="' . trim( strip_tags( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) . '" />' . "\n";
4356
  }
4357
  }
 
 
 
 
 
4358
  }
4359
  // Handle extra meta fields.
4360
  foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
@@ -4403,12 +3778,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4403
  echo "$meta_string\n";
4404
  }
4405
 
4406
- // Handle Schema.
4407
- if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && (bool) $aioseop_options['aiosp_schema_markup'] ) {
4408
- $aioseop_schema = new AIOSEOP_Schema_Builder();
4409
- $aioseop_schema->display_json_ld_head_script();
4410
- }
4411
-
4412
  // Handle canonical links.
4413
  $show_page = true;
4414
  if ( ! empty( $aioseop_options['aiosp_no_paged_canonical_links'] ) ) {
@@ -4444,10 +3813,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4444
  }
4445
 
4446
  }
 
4447
  /**
4448
- * Check Rewrite Handler
4449
- *
4450
- * @since ?
4451
  */
4452
  function check_rewrite_handler() {
4453
  global $aioseop_options;
@@ -4464,9 +3832,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4464
  } else {
4465
  $active_handlers = array();
4466
  }
4467
- if (
4468
- sizeof( $active_handlers ) > 0 &&
4469
- $this->strtolower( $active_handlers[ sizeof( $active_handlers ) - 1 ] ) == $this->strtolower( 'All_in_One_SEO_Pack::output_callback_for_title' )
4470
  ) {
4471
  ob_end_flush();
4472
  } else {
@@ -4487,11 +3855,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4487
  }
4488
 
4489
  /**
4490
- * Trim Description
4491
- *
4492
- * @since ?
4493
- *
4494
  * @param $description
 
4495
  * @return mixed|string
4496
  */
4497
  function trim_description( $description ) {
@@ -4504,12 +3869,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4504
  }
4505
 
4506
  /**
4507
- * Apply Description Format
4508
- *
4509
- * @since ?
4510
- *
4511
  * @param $description
4512
  * @param null $post
 
4513
  * @return mixed
4514
  */
4515
  function apply_description_format( $description, $post = null ) {
@@ -4518,6 +3880,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4518
  * Runs before applying the formatting for the meta description.
4519
  *
4520
  * @since 3.0
 
4521
  */
4522
  do_action( 'aioseop_before_apply_description_format' );
4523
 
@@ -4551,12 +3914,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4551
  if ( false !== strpos( $description, '%current_year%', 0 ) ) {
4552
  $description = str_replace( '%current_year%', date( 'Y' ), $description );
4553
  }
4554
- if ( false !== strpos( $description, '%current_month%', 0 ) ) {
4555
- $description = str_replace( '%current_month%', date( 'M' ), $description );
4556
- }
4557
- if ( false !== strpos( $description, '%current_month_i18n%', 0 ) ) {
4558
- $description = str_replace( '%current_month_i18n%', date_i18n( 'M' ), $description );
4559
- }
4560
  if ( false !== strpos( $description, '%post_date%', 0 ) ) {
4561
  $description = str_replace( '%post_date%', get_the_date(), $description );
4562
  }
@@ -4568,16 +3925,17 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4568
  }
4569
 
4570
  /*
4571
- * This was intended to make attachment descriptions unique if pulling from the parent... let's remove it and see if there are any problems
4572
- * on the roadmap is to have a better hierarchy for attachment description pulling
4573
- * if ($aioseop_options['aiosp_can']) $description = $this->make_unique_att_desc($description);
4574
- */
4575
  $description = $this->apply_cf_fields( $description );
4576
 
4577
  /**
4578
  * Runs after applying the formatting for the meta description.
4579
  *
4580
  * @since 3.0
 
4581
  */
4582
  do_action( 'aioseop_after_apply_description_format' );
4583
 
@@ -4585,191 +3943,80 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4585
  }
4586
 
4587
  /**
4588
- * The get_robots_meta() function.
4589
- *
4590
- * Determines and returns the noindex/nofollow values for the robots meta tag string.
4591
- *
4592
- * @since 2.3.5
4593
- * @since 2.3.11.5 Added noindex API filter hook for password protected posts.
4594
- * @since 3.2.0 Refactored function to fix various bugs.
4595
- *
4596
  * @return string
 
 
4597
  */
4598
  function get_robots_meta() {
4599
  global $aioseop_options;
4600
- $page_number = $this->get_page_number();
4601
- $post_type = get_post_type();
4602
- $noindex = false;
4603
- $nofollow = false;
4604
- $aiosp_noindex = '';
4605
- $aiosp_nofollow = '';
4606
- $tax_noindex = array();
4607
- $is_static_page = false;
4608
- $is_static_posts_page = false;
4609
- $is_woocommerce_shop_page = false;
4610
-
4611
- if ( isset( $aioseop_options['aiosp_tax_noindex'] ) && ! empty( $aioseop_options['aiosp_tax_noindex'] ) ) {
4612
  $tax_noindex = $aioseop_options['aiosp_tax_noindex'];
4613
  }
4614
 
4615
- if ( is_front_page() ) {
4616
- return $this->get_robots_meta_string( false, false );
4617
- }
4618
-
4619
- if ( is_home() && 0 !== (int) get_option( 'page_for_posts' ) ) {
4620
- $is_static_posts_page = true;
4621
- }
4622
-
4623
- // TODO Use aioseop_is_woocommerce_active() when #2720 is merged.
4624
- if ( class_exists( 'woocommerce' ) && is_shop() ) {
4625
- $is_woocommerce_shop_page = true;
4626
- }
4627
-
4628
- if ( $is_static_posts_page || $is_woocommerce_shop_page ) {
4629
- $post_type = 'page';
4630
- $is_static_page = true;
4631
- }
4632
-
4633
- if (
4634
- ! is_date() &&
4635
- ! is_author() &&
4636
- ! is_search()
4637
- ) {
4638
- $aiosp_noindex = $this->get_noindex_nofollow_meta_value( 'noindex' );
4639
- $aiosp_nofollow = $this->get_noindex_nofollow_meta_value( 'nofollow' );
4640
- }
4641
-
4642
- if ( 'on' === $aiosp_noindex ||
4643
- ( is_singular() && ! empty( $aioseop_options['aiosp_paginated_noindex'] ) && $page_number > 1 )
4644
- ) {
4645
- $noindex = true;
4646
- }
4647
- if ( 'on' === $aiosp_nofollow ||
4648
- ( is_singular() && ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) && $page_number > 1 )
4649
- ) {
4650
- $nofollow = true;
4651
  }
4652
 
4653
- if (
4654
- is_singular() &&
4655
- $this->is_password_protected() &&
4656
- apply_filters( 'aiosp_noindex_password_posts', false )
4657
- ) {
4658
- $noindex = true;
4659
- }
4660
 
4661
- if ( $noindex && $nofollow ) {
4662
- // Not needed to run subsequent checks if both are true.
4663
- return $this->get_robots_meta_string( $noindex, $nofollow );
4664
  }
4665
 
4666
- if (
4667
- ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) ||
4668
- ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) ||
4669
- ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ||
4670
- ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) ) ||
4671
- ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) ) ||
4672
- ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) ) ||
4673
- ( is_tax() && in_array( get_query_var( 'taxonomy' ), $tax_noindex ) )
4674
  ) {
4675
- $noindex = true;
4676
- }
4677
 
4678
- if (
4679
- is_single() ||
4680
- is_page() ||
4681
- is_attachment() ||
4682
- $this->check_singular() ||
4683
- $is_static_page
4684
- ) {
4685
- if ( '' === $aiosp_noindex &&
4686
- ! empty( $aioseop_options['aiosp_cpostnoindex'] ) &&
4687
- in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] )
4688
  ) {
4689
- $noindex = true;
4690
  }
4691
- if (
4692
- '' === $aiosp_nofollow &&
4693
- ! empty( $aioseop_options['aiosp_cpostnofollow'] ) &&
4694
- in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] )
 
4695
  ) {
4696
- $nofollow = true;
4697
- }
4698
- }
4699
-
4700
- return $this->get_robots_meta_string( $noindex, $nofollow );
4701
- }
4702
-
4703
- /**
4704
- * The get_noindex_nofollow_meta_value() function.
4705
- *
4706
- * Gets the noindex/nofollow meta value for the requested object.
4707
- *
4708
- * @since 3.2.0
4709
- *
4710
- * @param string $key The requested meta key.
4711
- * @return string
4712
- */
4713
- private function get_noindex_nofollow_meta_value( $key ) {
4714
- $meta = array();
4715
- $meta_key = '_aioseop_' . $key;
4716
- $meta_value = '';
4717
-
4718
- $queried_object = get_queried_object();
4719
- if ( empty( $queried_object ) ) {
4720
- return $meta_value;
4721
- }
4722
 
4723
- // TODO Use $meta_opts when get_current_options() is refactored - #2729.
4724
- if ( property_exists( $queried_object, 'ID' ) ) {
4725
- $meta = get_post_meta( $queried_object->ID );
4726
- }
4727
- if ( property_exists( $queried_object, 'term_id' ) ) {
4728
- $meta = get_term_meta( $queried_object->term_id );
4729
- }
4730
- // TODO Use aioseop_is_woocommerce_active() when #2720 is merged.
4731
- if ( class_exists( 'woocommerce' ) && is_shop() ) {
4732
- $meta = get_post_meta( wc_get_page_id( 'shop' ) );
4733
- }
4734
 
4735
- if ( array_key_exists( $meta_key, $meta ) ) {
4736
- $meta_value = $meta[ $meta_key ][0];
 
 
 
 
 
 
 
4737
  }
4738
-
4739
- return $meta_value;
4740
- }
4741
-
4742
-
4743
- /**
4744
- * The get_robots_meta_string() function.
4745
- *
4746
- * Helper function for get_robots_meta().
4747
- *
4748
- * @since 3.2.0
4749
- *
4750
- * @param bool $noindex
4751
- * @param bool $nofollow
4752
- *
4753
- * @return string
4754
- */
4755
- private function get_robots_meta_string( $noindex, $nofollow ) {
4756
- $index_value = 'index';
4757
- $follow_value = 'follow';
4758
-
4759
- if ( $noindex ) {
4760
- $index_value = 'noindex';
4761
  }
4762
 
4763
- if ( $nofollow ) {
4764
- $follow_value = 'nofollow';
 
4765
  }
4766
 
4767
- return $index_value . ',' . $follow_value;
4768
  }
4769
 
4770
  /**
4771
- * Check Singular
4772
- *
4773
  * Determine if the post is 'like' singular. In some specific instances, such as when the Reply post type of bbpress is loaded in its own page,
4774
  * it reflects as singular intead of single
4775
  *
@@ -4790,12 +4037,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4790
  }
4791
 
4792
  /**
4793
- * Is Password Protected
4794
- *
4795
  * Determine if post is password protected.
4796
- *
4797
  * @since 2.3.11.5
4798
- *
4799
  * @return bool
4800
  */
4801
  function is_password_protected() {
@@ -4810,11 +4053,48 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4810
  }
4811
 
4812
  /**
4813
- * Get Previous/Next Links
4814
  *
4815
  * @since ?
4816
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4817
  * @param null $post
 
4818
  * @return array
4819
  */
4820
  function get_prev_next_links( $post = null ) {
@@ -4893,24 +4173,21 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4893
  }
4894
  }
4895
 
4896
- return array(
4897
- 'prev' => $prev,
4898
- 'next' => $next,
4899
- );
4900
  }
4901
 
4902
  /**
4903
- * Validate URL Scheme
4904
  *
4905
  * Validates whether the url should be https or http.
4906
  *
4907
  * Mainly we're just using this for canonical URLS, but eventually it may be useful for other things
4908
  *
4909
- * @since 2.3.5
4910
- * @since 2.3.11 Removed check for legacy protocol setting. Added filter.
4911
- *
4912
  * @param $url
 
4913
  * @return string $url
 
 
 
4914
  */
4915
  function validate_url_scheme( $url ) {
4916
 
@@ -4930,25 +4207,27 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4930
  }
4931
 
4932
  /**
4933
- * Google Analytics
4934
- *
4935
- * @since ?
4936
- *
4937
  * @param $options
4938
  * @param $location
4939
  * @param $settings
 
4940
  * @return mixed
4941
  */
 
 
 
 
 
 
 
 
4942
  function aiosp_google_analytics() {
4943
  new aioseop_google_analytics;
4944
  }
4945
 
4946
  /**
4947
- * Save Post Data
4948
- *
4949
- * @since ?
4950
- *
4951
  * @param $id
 
4952
  * @return bool
4953
  */
4954
  function save_post_data( $id ) {
@@ -5025,10 +4304,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5025
  }
5026
 
5027
  /**
5028
- * Display Tabbed Metabox
5029
- *
5030
- * @since ?
5031
- *
5032
  * @param $post
5033
  * @param $metabox
5034
  */
@@ -5051,10 +4326,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5051
  }
5052
 
5053
  /**
5054
- * Get Metabox Header
5055
- *
5056
- * @since ?
5057
- *
5058
  * @param $tabs
5059
  *
5060
  * @return string
@@ -5064,7 +4335,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5064
  $active = ' active';
5065
  foreach ( $tabs as $t ) {
5066
  if ( $active ) {
5067
- /* translators: This is the name of the main tab of the All in One SEO Pack meta box that appears on the Edit screen. */
5068
  $title = __( 'Main Settings', 'all-in-one-seo-pack' );
5069
  } else {
5070
  $title = $t['title'];
@@ -5077,11 +4347,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5077
  return $header;
5078
  }
5079
 
5080
- /**
5081
- * Admin Bar Menu
5082
- *
5083
- * @since ?
5084
- */
5085
  function admin_bar_menu() {
5086
 
5087
  if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
@@ -5128,14 +4393,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5128
  $wp_admin_bar->add_menu(
5129
  array(
5130
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
5131
- /* translators: This is a CTA action link to upgrade to the premium version of the plugin. */
5132
  'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ),
5133
  'id' => 'aioseop-pro-upgrade',
5134
  'href' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu',
5135
  'meta' => array( 'target' => '_blank' ),
5136
  )
5137
  );
5138
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
5139
  // add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
5140
  }
5141
 
@@ -5194,10 +4457,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5194
  }
5195
 
5196
  /**
5197
- * Menu Order
5198
- *
5199
- * @since ?
5200
- *
5201
  * Order for adding the menus for the aioseop_modules_add_menus hook.
5202
  */
5203
  function menu_order() {
@@ -5205,10 +4464,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5205
  }
5206
 
5207
  /**
5208
- * Display Category Metaboxes
5209
- *
5210
- * @since ?
5211
- *
5212
  * @param $tax
5213
  */
5214
  function display_category_metaboxes( $tax ) {
@@ -5221,10 +4476,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5221
  }
5222
 
5223
  /**
5224
- * Save Category Metaboxes
5225
- *
5226
- * @since ?
5227
- *
5228
  * @param $id
5229
  */
5230
  function save_category_metaboxes( $id ) {
@@ -5295,14 +4546,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5295
  }
5296
  }
5297
 
5298
- /**
5299
- * Admin Menu
5300
- *
5301
- * @since ?
5302
- */
5303
  function admin_menu() {
5304
  $file = plugin_basename( __FILE__ );
5305
- $menu_name = 'All in One SEO';
5306
 
5307
  $this->locations['aiosp']['default_options']['nonce-aioseop-edit']['default'] = wp_create_nonce( 'edit-aioseop-nonce' );
5308
 
@@ -5361,7 +4607,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5361
 
5362
  if ( AIOSEOPPRO ) {
5363
  if ( is_array( $this->options['aiosp_cpostactive'] ) ) {
5364
- $this->locations['aiosp']['display'] = $this->options['aiosp_cpostactive'];
5365
  } else {
5366
  $this->locations['aiosp']['display'][] = $this->options['aiosp_cpostactive']; // Store as an array in case there are taxonomies to add also.
5367
  }
@@ -5391,39 +4637,31 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5391
  );
5392
 
5393
  add_meta_box(
5394
- 'aioseop-list',
5395
- __( 'Join Our Mailing List', 'all-in-one-seo-pack' ),
5396
- array( 'aiosp_metaboxes', 'display_extra_metaboxes' ),
5397
- 'aioseop_metaboxes',
5398
- 'normal',
5399
- 'core'
5400
  );
5401
  if ( AIOSEOPPRO ) {
5402
  add_meta_box(
5403
- 'aioseop-about',
5404
- __( 'About', 'all-in-one-seo-pack' ),
5405
- array( 'aiosp_metaboxes', 'display_extra_metaboxes' ),
5406
- 'aioseop_metaboxes',
5407
- 'side',
5408
- 'core'
5409
  );
5410
  } else {
5411
  add_meta_box(
5412
- 'aioseop-about',
5413
- __( 'About', 'all-in-one-seo-pack' ) . "<span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>',
5414
- array( 'aiosp_metaboxes', 'display_extra_metaboxes' ),
5415
- 'aioseop_metaboxes',
5416
- 'side',
5417
- 'core'
5418
  );
5419
  }
5420
  add_meta_box(
5421
- 'aioseop-support',
5422
- __( 'Support', 'all-in-one-seo-pack' ) . " <span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>',
5423
- array( 'aiosp_metaboxes', 'display_extra_metaboxes' ),
5424
- 'aioseop_metaboxes',
5425
- 'side',
5426
- 'core'
5427
  );
5428
 
5429
  add_action( 'aioseop_modules_add_menus', array( $this, 'add_menu' ), 5 );
@@ -5456,13 +4694,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5456
  add_meta_box( $m[0]['id'], $title, $m[0]['callback'], $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m[0]['callback_args'] );
5457
  } elseif ( $tab_num > 1 ) {
5458
  add_meta_box(
5459
- $m[0]['id'] . '_tabbed',
5460
- $title,
5461
- array( $this, 'display_tabbed_metabox' ),
5462
- $m[0]['post_type'],
5463
- $m[0]['context'],
5464
- $m[0]['priority'],
5465
- $m
5466
  );
5467
  }
5468
  }
@@ -5483,11 +4718,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5483
  }
5484
 
5485
  /**
5486
- * Set Menu Order
5487
- *
5488
- * @since ?
5489
- *
5490
  * @param $menu_order
 
5491
  * @return array
5492
  */
5493
  function set_menu_order( $menu_order ) {
@@ -5524,9 +4756,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5524
  * @return string
5525
  */
5526
  public function filter_title( $value ) {
5527
- // Decode entities.
5528
  $value = $this->html_entity_decode( $value );
5529
- // Encode to valid SEO html entities.
5530
  return $this->seo_entity_encode( $value );
5531
  }
5532
 
@@ -5556,30 +4788,30 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5556
  if ( $ignore_php_version || preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
5557
  $value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ) );
5558
  }
5559
- // Decode entities.
5560
  $value = $this->html_entity_decode( $value );
5561
  $value = preg_replace(
5562
  array(
5563
- '#<a.*?>([^>]*)</a>#i', // Remove link but keep anchor text.
5564
- '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', // Remove URLs.
5565
  ),
5566
  array(
5567
  '$1', // Replacement link's anchor text.
5568
- '', // Replacement URLs.
5569
  ),
5570
  $value
5571
  );
5572
- // Strip html.
5573
  $value = wp_strip_all_tags( $value );
5574
- // External trim.
5575
  $value = trim( $value );
5576
  // Internal whitespace trim.
5577
  $value = preg_replace( '/\s\s+/u', ' ', $value );
5578
- // Truncate / crop.
5579
  if ( ! empty( $truncate ) && $truncate ) {
5580
  $value = $this->trim_excerpt_without_filters( $value );
5581
  }
5582
- // Encode to valid SEO html entities.
5583
  return $this->seo_entity_encode( $value );
5584
  }
5585
 
@@ -5596,20 +4828,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5596
  * @return string
5597
  */
5598
  private function html_entity_decode( $value ) {
5599
- // Special conversions.
5600
  $value = preg_replace(
5601
  array(
5602
- // Double quotes.
5603
  '/\“|\”|&#[xX]00022;|&#34;|&[lLrRbB](dquo|DQUO)(?:[rR])?;|&#[xX]0201[dDeE];'
5604
- . '|&[OoCc](pen|lose)[Cc]urly[Dd]ouble[Qq]uote;|&#822[012];|&#[xX]27;/',
5605
- // Apostrophes.
5606
- '/&#039;|&#8217;|&apos;/',
5607
  ),
5608
  array(
5609
- // Double quotes.
5610
- '"',
5611
- // Apostrophes.
5612
- '\'',
5613
  ),
5614
  $value
5615
  );
@@ -5629,12 +4857,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5629
  private function seo_entity_encode( $value ) {
5630
  return preg_replace(
5631
  array(
5632
- '/\"|\“|\”|\„/', // Double quotes.
5633
- '/\'|\’|\‘/', // Apostrophes.
5634
  ),
5635
  array(
5636
- '&quot;', // Double quotes.
5637
- '&#039;', // Apostrophes.
5638
  ),
5639
  esc_html( $value )
5640
  );
@@ -5658,14 +4886,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5658
  <?php do_meta_boxes( 'aioseop_metaboxes', 'normal', array( 'test' ) ); ?>
5659
  </div>
5660
  </div>
5661
-
 
 
 
 
5662
  <div class="aioseop_right_sidebar aioseop_options_wrapper">
5663
 
5664
  <div class="aioseop_sidebar">
5665
  <?php
5666
  do_meta_boxes( 'aioseop_metaboxes', 'side', array( 'test' ) );
5667
  ?>
5668
- <script>
5669
  //<![CDATA[
5670
  jQuery(document).ready(function ($) {
5671
  // Close postboxes that should be closed.
@@ -5679,9 +4911,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5679
  <?php if ( ! AIOSEOPPRO ) { ?>
5680
  <div class="aioseop_advert aioseop_nopad_all">
5681
  <?php $adid = mt_rand( 21, 22 ); ?>
5682
- <a
5683
- href="https://www.wincher.com/?referer=all-in-one-seo-pack&adreferer=banner<?php echo $adid; ?>"
5684
- target="_blank" aria-label="<?php _e( 'Banner advert for free Wincher rank checker plugin', 'all-in-one-seo-pack' ); ?>">
5685
  <div class=wincherad id=wincher<?php echo $adid; ?>>
5686
  </div>
5687
  </a>
1
  <?php
2
  /**
3
+ * All in One SEO Pack Main Class file.
4
  *
5
  * Main class file, to be broken up later.
6
  *
7
+ * @package All-in-One-SEO-Pack
 
8
  */
9
 
 
 
 
10
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
11
 
12
  /**
16
  */
17
  class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
18
 
19
+ // Current version of the plugin.
 
 
 
 
 
 
 
 
20
  var $version = AIOSEOP_VERSION;
21
 
22
+ // Max numbers of chars in auto-generated description.
 
 
 
 
 
 
 
 
23
  var $maximum_description_length = 160;
24
 
25
+ // Minimum number of chars an excerpt should be so that it can be used as description.
 
 
 
 
 
 
 
 
26
  var $minimum_description_length = 1;
27
 
28
+ // Whether output buffering is already being used during forced title rewrites.
 
 
 
 
 
 
 
 
29
  var $ob_start_detected = false;
30
 
31
+ // The start of the title text in the head section for forced title rewrites.
 
 
 
 
 
 
 
 
32
  var $title_start = - 1;
33
 
34
+ // The end of the title text in the head section for forced title rewrites.
 
 
 
 
 
 
 
 
35
  var $title_end = - 1;
36
 
37
+ // The title before rewriting.
 
 
 
 
 
 
 
 
38
  var $orig_title = '';
39
 
40
+ // Filename of log file.
 
 
 
 
 
 
 
 
41
  var $log_file;
42
 
43
+ // Flag whether there should be logging.
 
 
 
 
 
 
 
 
44
  var $do_log;
45
 
 
 
 
 
 
 
 
 
46
  var $token;
 
 
 
 
 
 
 
 
 
47
  var $secret;
 
 
 
 
 
 
 
 
 
48
  var $access_token;
 
 
 
 
 
 
 
 
 
49
  var $ga_token;
 
 
 
 
 
 
 
 
 
50
  var $account_cache;
 
 
 
 
 
 
 
 
 
51
  var $profile_id;
 
 
 
 
 
 
 
 
52
  var $meta_opts = false;
 
 
 
 
 
 
 
 
53
  var $is_front_page = null;
54
 
55
  /**
 
 
56
  * All_in_One_SEO_Pack constructor.
57
  *
 
58
  * @since 2.3.14 #921 More google analytics options added.
59
  * @since 2.4.0 #1395 Longer Meta Descriptions.
60
  * @since 2.6.1 #1694 Back to shorter meta descriptions.
68
  } else {
69
  $this->do_log = false;
70
  }
71
+
72
  $this->name = sprintf( __( '%s Plugin Options', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
 
73
  $this->menu_name = __( 'General Settings', 'all-in-one-seo-pack' );
74
 
75
  $this->prefix = 'aiosp_'; // Option prefix.
81
 
82
  $this->default_options = array(
83
  'license_key' => array(
 
84
  'name' => __( 'License Key:', 'all-in-one-seo-pack' ),
85
  'type' => 'text',
86
  ),
87
  'home_title' => array(
 
88
  'name' => __( 'Home Title:', 'all-in-one-seo-pack' ),
89
  'default' => null,
90
  'type' => 'text',
95
  'condshow' => array( 'aiosp_use_static_home_info' => 0 ),
96
  ),
97
  'home_description' => array(
 
98
  'name' => __( 'Home Description:', 'all-in-one-seo-pack' ),
99
  'default' => '',
100
  'type' => 'textarea',
105
  'condshow' => array( 'aiosp_use_static_home_info' => 0 ),
106
  ),
107
  'togglekeywords' => array(
 
108
  'name' => __( 'Use Keywords:', 'all-in-one-seo-pack' ),
109
  'default' => 1,
110
  'type' => 'radio',
111
  'initial_options' => array(
 
112
  0 => __( 'Enabled', 'all-in-one-seo-pack' ),
 
113
  1 => __( 'Disabled', 'all-in-one-seo-pack' ),
114
  ),
115
  ),
116
  'home_keywords' => array(
 
117
  'name' => __( 'Home Keywords (comma separated):', 'all-in-one-seo-pack' ),
118
  'default' => null,
119
  'type' => 'textarea',
120
  'sanitize' => 'text',
121
+ 'condshow' => array( 'aiosp_togglekeywords' => 0, 'aiosp_use_static_home_info' => 0 ),
 
 
 
122
  ),
123
  'use_static_home_info' => array(
 
124
  'name' => __( 'Use Static Front Page Instead', 'all-in-one-seo-pack' ),
125
  'default' => 0,
126
  'type' => 'radio',
130
  ),
131
  ),
132
  'can' => array(
 
133
  'name' => __( 'Canonical URLs:', 'all-in-one-seo-pack' ),
134
  'default' => 1,
135
  ),
136
  'no_paged_canonical_links' => array(
 
137
  'name' => __( 'No Pagination for Canonical URLs:', 'all-in-one-seo-pack' ),
138
  'default' => 0,
139
  'condshow' => array( 'aiosp_can' => 'on' ),
140
  ),
141
  'force_rewrites' => array(
 
142
  'name' => __( 'Force Rewrites:', 'all-in-one-seo-pack' ),
143
  'default' => 1,
144
  'type' => 'hidden',
149
  ),
150
  ),
151
  'use_original_title' => array(
 
152
  'name' => __( 'Use Original Title:', 'all-in-one-seo-pack' ),
153
  'type' => 'radio',
154
  'default' => 0,
158
  ),
159
  ),
160
  'home_page_title_format' => array(
161
+ 'name' => __( 'Home Page Title Format:', 'all-in-one-seo-pack' ),
162
+ 'type' => 'text',
163
+ 'default' => '%page_title%',
 
164
  ),
165
  'page_title_format' => array(
166
+ 'name' => __( 'Page Title Format:', 'all-in-one-seo-pack' ),
167
+ 'type' => 'text',
168
+ 'default' => '%page_title% | %site_title%',
 
 
169
  ),
170
  'post_title_format' => array(
171
+ 'name' => __( 'Post Title Format:', 'all-in-one-seo-pack' ),
172
+ 'type' => 'text',
173
+ 'default' => '%post_title% | %site_title%',
 
174
  ),
175
  'category_title_format' => array(
176
+ 'name' => __( 'Category Title Format:', 'all-in-one-seo-pack' ),
177
+ 'type' => 'text',
178
+ 'default' => '%category_title% | %site_title%',
 
179
  ),
180
  'archive_title_format' => array(
181
+ 'name' => __( 'Archive Title Format:', 'all-in-one-seo-pack' ),
182
+ 'type' => 'text',
183
+ 'default' => '%archive_title% | %site_title%',
 
184
  ),
185
  'date_title_format' => array(
186
+ 'name' => __( 'Date Archive Title Format:', 'all-in-one-seo-pack' ),
187
+ 'type' => 'text',
188
+ 'default' => '%date% | %site_title%',
 
189
  ),
190
  'author_title_format' => array(
191
+ 'name' => __( 'Author Archive Title Format:', 'all-in-one-seo-pack' ),
192
+ 'type' => 'text',
193
+ 'default' => '%author% | %site_title%',
 
194
  ),
195
  'tag_title_format' => array(
196
+ 'name' => __( 'Tag Title Format:', 'all-in-one-seo-pack' ),
197
+ 'type' => 'text',
198
+ 'default' => '%tag% | %site_title%',
 
199
  ),
200
  'search_title_format' => array(
201
+ 'name' => __( 'Search Title Format:', 'all-in-one-seo-pack' ),
202
+ 'type' => 'text',
203
+ 'default' => '%search% | %site_title%',
 
204
  ),
205
  'description_format' => array(
206
+ 'name' => __( 'Description Format', 'all-in-one-seo-pack' ),
207
+ 'type' => 'text',
208
+ 'default' => '%description%',
 
209
  ),
210
  '404_title_format' => array(
211
+ 'name' => __( '404 Title Format:', 'all-in-one-seo-pack' ),
212
+ 'type' => 'text',
213
+ 'default' => __( 'Nothing found for %request_words%', 'all-in-one-seo-pack' ),
 
214
  ),
215
  'paged_format' => array(
216
+ 'name' => __( 'Paged Format:', 'all-in-one-seo-pack' ),
217
+ 'type' => 'text',
218
+ 'default' => sprintf( ' - %s %%page%%', __( 'Part', 'all-in-one-seo-pack' ) ),
 
219
  ),
220
  'cpostactive' => array(
221
+ 'name' => __( 'SEO on only these Content Types:', 'all-in-one-seo-pack' ),
222
+ 'type' => 'multicheckbox',
223
+ 'default' => array( 'post', 'page' ),
 
224
  ),
225
  'taxactive' => array(
226
+ 'name' => __( 'SEO on only these taxonomies:', 'all-in-one-seo-pack' ),
227
+ 'type' => 'multicheckbox',
228
+ 'default' => array( 'category', 'post_tag' ),
 
229
  ),
230
  'cpostnoindex' => array(
 
231
  'name' => __( 'Default to NOINDEX:', 'all-in-one-seo-pack' ),
232
  'type' => 'multicheckbox',
233
  'default' => array(),
234
  ),
235
  'cpostnofollow' => array(
 
236
  'name' => __( 'Default to NOFOLLOW:', 'all-in-one-seo-pack' ),
237
  'type' => 'multicheckbox',
238
  'default' => array(),
239
  ),
240
+ 'posttypecolumns' => array(
241
+ 'name' => __( 'Show Column Labels for Custom Post Types:', 'all-in-one-seo-pack' ),
242
+ 'type' => 'multicheckbox',
243
+ 'default' => array( 'post', 'page' ),
 
244
  ),
245
  'google_verify' => array(
246
+ 'name' => __( 'Google Search Console:', 'all-in-one-seo-pack' ),
247
  'default' => '',
248
  'type' => 'text',
249
  ),
250
  'bing_verify' => array(
251
+ 'name' => __( 'Bing Webmaster Tools:', 'all-in-one-seo-pack' ),
252
  'default' => '',
253
  'type' => 'text',
254
  ),
255
  'pinterest_verify' => array(
 
256
  'name' => __( 'Pinterest Site Verification:', 'all-in-one-seo-pack' ),
257
  'default' => '',
258
  'type' => 'text',
259
  ),
260
+ 'yandex_verify' => array(
261
+ 'name' => __( 'Yandex Webmaster Tools:', 'all-in-one-seo-pack' ),
262
  'default' => '',
263
  'type' => 'text',
264
  ),
265
+ 'baidu_verify' => array(
266
+ 'name' => __( 'Baidu Webmaster Tools:', 'all-in-one-seo-pack' ),
267
  'default' => '',
268
  'type' => 'text',
269
  ),
270
+ 'google_sitelinks_search' => array(
271
+ 'name' => __( 'Display Sitelinks Search Box:', 'all-in-one-seo-pack' ),
272
+ ),
273
+ // "google_connect"=>array( 'name' => __( 'Connect With Google Analytics', 'all-in-one-seo-pack' ), ),
274
  'google_analytics_id' => array(
 
275
  'name' => __( 'Google Analytics ID:', 'all-in-one-seo-pack' ),
276
  'default' => null,
277
  'type' => 'text',
278
  'placeholder' => 'UA-########-#',
279
  ),
280
  'ga_advanced_options' => array(
 
281
  'name' => __( 'Advanced Analytics Options:', 'all-in-one-seo-pack' ),
282
  'default' => 'on',
283
  'type' => 'radio',
294
  ),
295
  ),
296
  'ga_domain' => array(
 
297
  'name' => __( 'Tracking Domain:', 'all-in-one-seo-pack' ),
298
  'type' => 'text',
299
  'condshow' => array(
306
  ),
307
  ),
308
  'ga_multi_domain' => array(
 
309
  'name' => __( 'Track Multiple Domains:', 'all-in-one-seo-pack' ),
310
  'default' => 0,
311
  'condshow' => array(
318
  ),
319
  ),
320
  'ga_addl_domains' => array(
 
321
  'name' => __( 'Additional Domains:', 'all-in-one-seo-pack' ),
322
  'type' => 'textarea',
323
  'condshow' => array(
331
  ),
332
  ),
333
  'ga_anonymize_ip' => array(
 
334
  'name' => __( 'Anonymize IP Addresses:', 'all-in-one-seo-pack' ),
335
  'type' => 'checkbox',
336
  'condshow' => array(
343
  ),
344
  ),
345
  'ga_display_advertising' => array(
 
346
  'name' => __( 'Display Advertiser Tracking:', 'all-in-one-seo-pack' ),
347
  'type' => 'checkbox',
348
  'condshow' => array(
355
  ),
356
  ),
357
  'ga_exclude_users' => array(
 
358
  'name' => __( 'Exclude Users From Tracking:', 'all-in-one-seo-pack' ),
359
  'type' => 'multicheckbox',
360
  'condshow' => array(
367
  ),
368
  ),
369
  'ga_track_outbound_links' => array(
 
370
  'name' => __( 'Track Outbound Links:', 'all-in-one-seo-pack' ),
371
  'default' => 0,
372
  'condshow' => array(
379
  ),
380
  ),
381
  'ga_link_attribution' => array(
 
382
  'name' => __( 'Enhanced Link Attribution:', 'all-in-one-seo-pack' ),
383
  'default' => 0,
384
  'condshow' => array(
391
  ),
392
  ),
393
  'ga_enhanced_ecommerce' => array(
 
394
  'name' => __( 'Enhanced Ecommerce:', 'all-in-one-seo-pack' ),
395
  'default' => 0,
396
  'condshow' => array(
397
+ 'aiosp_google_analytics_id' => array(
398
  'lhs' => 'aiosp_google_analytics_id',
399
  'op' => '!=',
400
  'rhs' => '',
401
  ),
402
+ 'aiosp_ga_advanced_options' => 'on',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  ),
404
  ),
405
  'use_categories' => array(
 
406
  'name' => __( 'Use Categories for META keywords:', 'all-in-one-seo-pack' ),
407
  'default' => 0,
408
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
409
  ),
410
  'use_tags_as_keywords' => array(
 
411
  'name' => __( 'Use Tags for META keywords:', 'all-in-one-seo-pack' ),
412
  'default' => 1,
413
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
414
  ),
415
  'dynamic_postspage_keywords' => array(
 
416
  'name' => __( 'Dynamically Generate Keywords for Posts Page/Archives:', 'all-in-one-seo-pack' ),
417
  'default' => 1,
418
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
419
  ),
420
  'category_noindex' => array(
 
421
  'name' => __( 'Use noindex for Categories:', 'all-in-one-seo-pack' ),
422
  'default' => 1,
423
  ),
424
  'archive_date_noindex' => array(
 
425
  'name' => __( 'Use noindex for Date Archives:', 'all-in-one-seo-pack' ),
426
  'default' => 1,
427
  ),
428
  'archive_author_noindex' => array(
 
429
  'name' => __( 'Use noindex for Author Archives:', 'all-in-one-seo-pack' ),
430
  'default' => 1,
431
  ),
432
  'tags_noindex' => array(
 
433
  'name' => __( 'Use noindex for Tag Archives:', 'all-in-one-seo-pack' ),
434
  'default' => 0,
435
  ),
436
  'search_noindex' => array(
 
437
  'name' => __( 'Use noindex for the Search page:', 'all-in-one-seo-pack' ),
438
  'default' => 0,
439
  ),
440
  '404_noindex' => array(
 
441
  'name' => __( 'Use noindex for the 404 page:', 'all-in-one-seo-pack' ),
442
  'default' => 0,
443
  ),
444
  'tax_noindex' => array(
445
+ 'name' => __( 'Use noindex for Taxonomy Archives:', 'all-in-one-seo-pack' ),
446
+ 'type' => 'multicheckbox',
447
+ 'default' => array(),
 
448
  ),
449
  'paginated_noindex' => array(
 
450
  'name' => __( 'Use noindex for paginated pages/posts:', 'all-in-one-seo-pack' ),
451
  'default' => 0,
452
  ),
453
  'paginated_nofollow' => array(
 
454
  'name' => __( 'Use nofollow for paginated pages/posts:', 'all-in-one-seo-pack' ),
455
  'default' => 0,
456
  ),
457
  'generate_descriptions' => array(
 
458
  'name' => __( 'Autogenerate Descriptions:', 'all-in-one-seo-pack' ),
459
  'default' => 0,
460
  ),
461
  'skip_excerpt' => array(
462
+ 'name' => __( 'Use Content For Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
463
+ 'default' => 0,
 
464
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
465
  ),
466
  'run_shortcodes' => array(
 
467
  'name' => __( 'Run Shortcodes In Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
468
  'default' => 0,
469
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
470
  ),
471
  'hide_paginated_descriptions' => array(
 
472
  'name' => __( 'Remove Descriptions For Paginated Pages:', 'all-in-one-seo-pack' ),
473
  'default' => 0,
474
  ),
475
  'dont_truncate_descriptions' => array(
 
476
  'name' => __( 'Never Shorten Long Descriptions:', 'all-in-one-seo-pack' ),
477
  'default' => 0,
478
  ),
479
+ 'schema_markup' => array(
480
+ 'name' => __( 'Use Schema.org Markup', 'all-in-one-seo-pack' ),
481
+ 'default' => 1,
482
+ ),
483
  'unprotect_meta' => array(
 
484
  'name' => __( 'Unprotect Post Meta Fields:', 'all-in-one-seo-pack' ),
485
  'default' => 0,
486
  ),
487
  'redirect_attachement_parent' => array(
 
488
  'name' => __( 'Redirect Attachments to Post Parent:', 'all-in-one-seo-pack' ),
489
  'default' => 0,
490
  ),
491
  'ex_pages' => array(
 
492
  'name' => __( 'Exclude Pages:', 'all-in-one-seo-pack' ),
493
  'type' => 'textarea',
494
  'default' => '',
495
  ),
496
  'post_meta_tags' => array(
 
497
  'name' => __( 'Additional Post Headers:', 'all-in-one-seo-pack' ),
498
  'type' => 'textarea',
499
  'default' => '',
500
  'sanitize' => 'default',
501
  ),
502
  'page_meta_tags' => array(
 
503
  'name' => __( 'Additional Page Headers:', 'all-in-one-seo-pack' ),
504
  'type' => 'textarea',
505
  'default' => '',
506
  'sanitize' => 'default',
507
  ),
508
  'front_meta_tags' => array(
 
509
  'name' => __( 'Additional Front Page Headers:', 'all-in-one-seo-pack' ),
510
  'type' => 'textarea',
511
  'default' => '',
512
  'sanitize' => 'default',
513
  ),
514
  'home_meta_tags' => array(
 
515
  'name' => __( 'Additional Posts Page Headers:', 'all-in-one-seo-pack' ),
516
  'type' => 'textarea',
517
  'default' => '',
518
  'sanitize' => 'default',
519
  ),
520
  'do_log' => array(
 
521
  'name' => __( 'Log important events:', 'all-in-one-seo-pack' ),
522
  'default' => null,
523
  ),
 
524
  );
525
 
526
  if ( ! AIOSEOPPRO ) {
529
  }
530
 
531
  $this->locations = array(
532
+ 'default' => array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => null ),
 
 
 
 
 
533
  'aiosp' => array(
534
  'name' => $this->plugin_name,
535
  'type' => 'metabox',
566
  'upgrade' => array(
567
  'type' => 'html',
568
  'label' => 'none',
569
+ 'default' => aiosp_common::get_upgrade_hyperlink( 'meta', sprintf( '%1$s %2$s Pro', __( 'Upgrade to', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ), __( 'UPGRADE TO PRO VERSION', 'all-in-one-seo-pack' ), '_blank' ),
 
 
 
 
 
 
 
 
 
 
570
  ),
571
  'support' => array(
572
  'type' => 'html',
573
  'label' => 'none',
574
+ 'default' => '<a target="_blank" href="https://semperplugins.com/support/">'
575
+ . __( 'Support Forum', 'all-in-one-seo-pack' ) . '</a>',
576
  ),
577
  'snippet' => array(
 
578
  'name' => __( 'Preview Snippet', 'all-in-one-seo-pack' ),
579
  'type' => 'custom',
580
  'label' => 'top',
594
  'rows' => 2,
595
  ),
596
 
597
+ 'keywords' => array(
598
  'name' => __( 'Keywords (comma separated)', 'all-in-one-seo-pack' ),
599
  'type' => 'text',
600
  ),
601
+ 'custom_link' => array(
 
602
  'name' => __( 'Custom Canonical URL', 'all-in-one-seo-pack' ),
603
  'type' => 'text',
604
  'size' => 60,
605
  ),
606
+ 'noindex' => array(
 
607
  'name' => __( 'NOINDEX this page/post', 'all-in-one-seo-pack' ),
608
  'default' => '',
609
  ),
610
+ 'nofollow' => array(
 
611
  'name' => __( 'NOFOLLOW this page/post', 'all-in-one-seo-pack' ),
612
  'default' => '',
613
  ),
614
+ 'sitemap_exclude' => array( 'name' => __( 'Exclude From Sitemap', 'all-in-one-seo-pack' ) ),
615
+ 'disable' => array( 'name' => __( 'Disable on this page/post', 'all-in-one-seo-pack' ) ),
616
+ 'disable_analytics' => array(
617
+ 'name' => __( 'Disable Google Analytics', 'all-in-one-seo-pack' ),
 
 
 
618
  'condshow' => array( 'aiosp_disable' => 'on' ),
619
  ),
620
  ),
625
 
626
  $this->layout = array(
627
  'default' => array(
 
628
  'name' => __( 'General Settings', 'all-in-one-seo-pack' ),
629
  'help_link' => 'https://semperplugins.com/documentation/general-settings/',
630
  'options' => array(), // This is set below, to the remaining options -- pdb.
654
  ),
655
  ),
656
  'cpt' => array(
 
657
  'name' => __( 'Content Type Settings', 'all-in-one-seo-pack' ),
658
  'help_link' => 'https://semperplugins.com/documentation/custom-post-type-settings/',
659
  'options' => array( 'taxactive', 'cpostactive' ),
660
  ),
661
  'display' => array(
 
662
  'name' => __( 'Display Settings', 'all-in-one-seo-pack' ),
663
  'help_link' => 'https://semperplugins.com/documentation/display-settings/',
664
  'options' => array( 'posttypecolumns' ),
665
  ),
666
  'webmaster' => array(
 
667
  'name' => __( 'Webmaster Verification', 'all-in-one-seo-pack' ),
668
  'help_link' => 'https://semperplugins.com/sections/webmaster-verification/',
669
  'options' => array( 'google_verify', 'bing_verify', 'pinterest_verify', 'yandex_verify', 'baidu_verify' ),
672
  'name' => __( 'Google Settings', 'all-in-one-seo-pack' ),
673
  'help_link' => 'https://semperplugins.com/documentation/google-settings/',
674
  'options' => array(
675
+ 'google_sitelinks_search',
676
+ // "google_connect",
677
  'google_analytics_id',
678
  'ga_advanced_options',
679
  'ga_domain',
687
  'ga_enhanced_ecommerce',
688
  ),
689
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
  'noindex' => array(
691
  'name' => __( 'Noindex Settings', 'all-in-one-seo-pack' ),
692
  'help_link' => 'https://semperplugins.com/documentation/noindex-settings/',
734
  ),
735
  );
736
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
737
  if ( AIOSEOPPRO ) {
738
  // Add Pro options.
739
  $this->default_options = aioseop_add_pro_opt( $this->default_options );
764
  }
765
  }
766
 
767
+ // good candidate for pro dir
768
  /**
 
 
769
  * Use custom callback for outputting snippet
770
  *
 
771
  * @since 2.3.16 Decodes HTML entities on title, description and title length count.
772
  *
773
  * @param $buf
774
  * @param $args
775
+ *
776
  * @return string
777
  */
778
  function custom_output_option( $buf, $args ) {
813
  if ( empty( $title_format ) ) {
814
  $title = '<span id="' . $args['name'] . '_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title ) ) ) . '</span>';
815
  } else {
816
+ $title_format = $this->get_title_format( $args );
817
+ $title = $title_format;
818
  }
819
 
820
  $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( $description ) );
824
  }
825
 
826
  /**
827
+ * Get Title Format for snippet preview.
828
  *
829
+ * Get the title formatted according to AIOSEOP %shortcodes% specifically for the snippet preview..
830
  *
831
  * @since 2.4.9
 
832
  *
833
+ * @param array $args
834
  * @return mixed
835
  */
836
+ public function get_title_format( $args ) {
837
  $info = $this->get_page_snippet_info();
838
  $title = $info['title'];
839
  $description = $info['description'];
841
  $url = $info['url'];
842
  $title_format = $info['title_format'];
843
  $category = $info['category'];
844
+ $w = $info['w'];
845
+ $p = $info['p'];
 
 
 
 
 
846
 
847
  /**
848
+ * Runs before we start applying the formatting for the snippet preview title.
849
  *
850
+ * @since 3.0
851
  *
 
852
  */
853
  do_action( 'aioseop_before_get_title_format' );
854
 
855
  if ( false !== strpos( $title_format, '%site_title%', 0 ) ) {
856
  $title_format = str_replace( '%site_title%', get_bloginfo( 'name' ), $title_format );
857
  }
858
+ // %blog_title% is deprecated.
859
  if ( false !== strpos( $title_format, '%blog_title%', 0 ) ) {
860
  $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
861
  }
862
  $title_format = $this->apply_cf_fields( $title_format );
863
+ $replace_title = '<span id="' . $args['name'] . '_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title ) ) ) . '</span>';
864
  if ( false !== strpos( $title_format, '%post_title%', 0 ) ) {
865
+ $title_format = str_replace( '%post_title%', $replace_title, $title_format );
866
  }
867
  if ( false !== strpos( $title_format, '%page_title%', 0 ) ) {
868
+ $title_format = str_replace( '%page_title%', $replace_title, $title_format );
869
  }
870
  if ( false !== strpos( $title_format, '%current_date%', 0 ) ) {
871
  $title_format = str_replace( '%current_date%', aioseop_formatted_date(), $title_format );
873
  if ( false !== strpos( $title_format, '%current_year%', 0 ) ) {
874
  $title_format = str_replace( '%current_year%', date( 'Y' ), $title_format );
875
  }
 
 
 
 
 
 
876
  if ( false !== strpos( $title_format, '%post_date%', 0 ) ) {
877
  $title_format = str_replace( '%post_date%', aioseop_formatted_date( get_the_time( 'U' ) ), $title_format );
878
  }
882
  if ( false !== strpos( $title_format, '%post_month%', 0 ) ) {
883
  $title_format = str_replace( '%post_month%', get_the_date( 'F' ), $title_format );
884
  }
885
+ if ( $w->is_category || $w->is_tag || $w->is_tax ) {
886
  if ( AIOSEOPPRO && ! empty( $_GET ) && ! empty( $_GET['taxonomy'] ) && ! empty( $_GET['tag_ID'] ) && function_exists( 'wp_get_split_terms' ) ) {
887
  $term_id = intval( $_GET['tag_ID'] );
888
  $was_split = get_term_meta( $term_id, '_aioseop_term_was_split', true );
896
  }
897
  }
898
  if ( false !== strpos( $title_format, '%category_title%', 0 ) ) {
899
+ $title_format = str_replace( '%category_title%', $replace_title, $title_format );
900
  }
901
  if ( false !== strpos( $title_format, '%taxonomy_title%', 0 ) ) {
902
+ $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
903
  }
904
  } else {
905
  if ( false !== strpos( $title_format, '%category%', 0 ) ) {
912
  $title_format = str_replace( '%taxonomy_title%', $category, $title_format );
913
  }
914
  if ( AIOSEOPPRO ) {
915
+ if ( strpos( $title_format, '%tax_', 0 ) && ! empty( $p ) ) {
916
+ $taxes = get_object_taxonomies( $p, 'objects' );
917
  if ( ! empty( $taxes ) ) {
918
  foreach ( $taxes as $t ) {
919
  if ( strpos( $title_format, "%tax_{$t->name}%", 0 ) ) {
920
+ $terms = $this->get_all_terms( $p->ID, $t->name );
921
  $term = '';
922
  if ( count( $terms ) > 0 ) {
923
  $term = $terms[0];
934
  }
935
 
936
  /**
937
+ * Filters document title after applying the formatting.
938
  *
939
+ * @since 3.0
940
  *
941
+ * @param string $title_format Document title to be filtered.
942
  *
 
943
  */
944
  $title_format = apply_filters( 'aioseop_title_format', $title_format );
945
 
946
+ $title_format = preg_replace( '/%([^%]*?)%/', '', $title_format );
947
+
948
  /**
949
+ * Runs after applying the formatting for the snippet preview title.
950
  *
951
+ * @since 3.0
952
  *
 
953
  */
954
  do_action( 'aioseop_after_format_title' );
955
 
956
  return $title_format;
957
  }
958
 
959
+ // good candidate for pro dir
960
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
961
  * @return array
962
  */
963
  function get_page_snippet_info() {
982
  $opts = $this->meta_opts;
983
  $post_id = $p->ID;
984
  if ( empty( $post->post_modified_gmt ) ) {
985
+ $wp_query = new WP_Query( array( 'p' => $post_id, 'post_type' => $post->post_type ) );
 
 
 
 
 
986
  }
987
  if ( 'page' === $post->post_type ) {
988
  $wp_query->is_page = true;
1014
  }
1015
  $description = $this->get_main_description( $post );
1016
 
1017
+ // All this needs to be in it's own function (class really)
1018
  if ( empty( $title_format ) ) {
1019
  if ( is_page() ) {
1020
  $title_format = $aioseop_options['aiosp_page_title_format'];
1106
  }
1107
 
1108
  /**
 
 
 
 
1109
  * @return null|object|WP_Post
1110
  */
1111
  function get_queried_object() {
1127
  }
1128
 
1129
  /**
 
 
 
 
1130
  * @param array $opts
1131
  * @param null $location
1132
  * @param null $defaults
1133
  * @param null $post
1134
+ *
1135
  * @return array
1136
  */
1137
  function get_current_options( $opts = array(), $location = null, $defaults = null, $post = null ) {
1139
  if ( null === $post ) {
1140
  global $post;
1141
  }
 
 
1142
  $post_id = $post;
1143
  if ( is_object( $post_id ) ) {
1144
  $post_id = $post_id->ID;
1203
  }
1204
 
1205
  /**
 
 
 
 
1206
  * @param $in
1207
+ *
1208
  * @return mixed|void
1209
  */
1210
  function internationalize( $in ) {
1227
  return apply_filters( 'localization', $in );
1228
  }
1229
 
1230
+ /*** Used to filter wp_title(), get our title. ***/
 
 
 
 
 
 
 
 
1231
  function wp_title() {
1232
  if ( ! $this->is_seo_enabled_for_cpt() ) {
1233
  return;
1247
  }
1248
 
1249
  /**
 
 
1250
  * Gets the title that will be used by AIOSEOP for title rewrites or returns false.
1251
  *
1252
  * @param WP_Post $post the post object
1253
  * @param bool $use_original_title_format should the original title format be used viz. post_title | blog_title. This parameter was introduced
1254
  * to resolve issue#986
1255
+ *
1256
  * @return bool|string
1257
  */
1258
  function get_aioseop_title( $post, $use_original_title_format = true ) {
1259
  global $aioseop_options;
1260
  // the_search_query() is not suitable, it cannot just return.
1261
+ global $s, $STagging;
1262
  $opts = $this->meta_opts;
1263
  if ( is_front_page() ) {
1264
  if ( ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1287
  $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
1288
  }
1289
 
 
1290
  global $post;
1291
+ $post_id = $post->ID;
 
 
 
 
 
1292
 
1293
  if ( is_post_type_archive() && is_post_type_archive( 'product' ) && $post_id = wc_get_page_id( 'shop' ) && $post = get_post( $post_id ) ) {
1294
+ $frontpage_id = get_option( 'page_on_front' );
1295
 
1296
  if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1297
  $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1298
  }
1299
  // $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1300
  if ( ! $title ) {
1301
+ $title = $this->internationalize( get_post_meta( $frontpage_id, '_aioseop_title', true ) );
1302
  } // This is/was causing the first product to come through.
1303
  if ( ! $title ) {
1304
  $title = $this->internationalize( $post->post_title );
1315
 
1316
  }
1317
 
1318
+ return $this->paged_title( $title ); // this is returned for woo
 
1319
  } elseif ( is_attachment() ) {
1320
  if ( null === $post ) {
1321
  return false;
1492
  }
1493
  } elseif ( ( is_tax() || is_category() ) && ! is_feed() ) {
1494
  return $this->get_tax_title();
1495
+ } elseif ( isset( $STagging ) && $STagging->is_tag_view() ) { // Simple tagging support.
1496
+ $tag = $STagging->search_tag;
 
 
1497
  if ( $tag ) {
1498
  $title_format = $aioseop_options['aiosp_tag_title_format'];
1499
  $title = str_replace( '%site_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1593
  }
1594
 
1595
  /**
 
 
 
 
1596
  * @param string $sep
1597
  * @param bool $echo
1598
  * @param string $seplocation
1599
+ *
1600
+ * @return The original title as delivered by WP (well, in most cases).
1601
  */
1602
  function get_original_title( $sep = '|', $echo = false, $seplocation = '' ) {
1603
  global $aioseop_options;
1692
  }
1693
 
1694
  /**
 
 
 
 
1695
  * @param $request
1696
+ *
1697
+ * @return User -readable nice words for a given request.
1698
  */
1699
  function request_as_words( $request ) {
1700
  $request = htmlspecialchars( $request );
1714
  }
1715
 
1716
  /**
 
 
 
 
1717
  * @param $title
1718
  * @param null $p
1719
  * @param string $title_format
1720
+ *
1721
  * @return string
1722
  */
1723
  function apply_page_title_format( $title, $p = null, $title_format = '' ) {
1735
  }
1736
 
1737
  /**
 
 
1738
  * Replace doc title templates inside % symbol on the frontend.
1739
  *
 
 
1740
  * @param $title
1741
  * @param $post
1742
  * @param string $type
1743
  * @param string $title_format
1744
  * @param string $category
1745
+ *
1746
  * @return string
1747
  */
1748
  function title_placeholder_helper( $title, $post, $type = 'post', $title_format = '', $category = '' ) {
1751
  * Runs before applying the formatting for the doc title on the frontend.
1752
  *
1753
  * @since 3.0
1754
+ *
1755
  */
1756
  do_action( 'aioseop_before_title_placeholder_helper' );
1757
 
1814
  if ( false !== strpos( $new_title, '%current_year%', 0 ) ) {
1815
  $new_title = str_replace( '%current_year%', date( 'Y' ), $new_title );
1816
  }
 
 
 
 
 
 
1817
  if ( false !== strpos( $new_title, '%post_date%', 0 ) ) {
1818
  $new_title = str_replace( '%post_date%', aioseop_formatted_date( get_the_date( 'U' ) ), $new_title );
1819
  }
1830
  * @since 3.0
1831
  *
1832
  * @param string $new_title Document title to be filtered.
1833
+ *
1834
  */
1835
  $new_title = apply_filters( 'aioseop_title_format', $new_title );
1836
 
1838
  * Runs after applying the formatting for the doc title on the frontend.
1839
  *
1840
  * @since 3.0
1841
+ *
1842
  */
1843
  do_action( 'aioseop_after_title_placeholder_helper' );
1844
 
1848
  }
1849
 
1850
  /**
 
 
 
 
1851
  * @param $id
1852
  * @param $taxonomy
1853
+ *
1854
  * @return array
1855
  */
1856
  function get_all_terms( $id, $taxonomy ) {
1866
  }
1867
 
1868
  /**
 
 
 
 
1869
  * @param $title
1870
+ *
1871
  * @return string
1872
  */
1873
  function paged_title( $title ) {
1874
  // The page number if paged.
1875
  global $paged;
1876
  global $aioseop_options;
 
1877
  // Simple tagging support.
1878
  global $STagging;
1879
  $page = get_query_var( 'page' );
1889
  $title .= $part;
1890
  }
1891
  }
 
1892
 
1893
  return $title;
1894
  }
1895
 
1896
  /**
 
 
 
 
1897
  * @param $message
1898
  */
1899
  function log( $message ) {
1905
  }
1906
 
1907
  /**
 
 
 
 
1908
  * @param $title
1909
  * @param string $category
1910
  * @param null $p
1911
+ *
1912
  * @return string
1913
  */
1914
  function apply_post_title_format( $title, $category = '', $p = null ) {
1923
  }
1924
 
1925
  /**
 
 
 
 
1926
  * @param string $title_type
1927
  * @param null $p
1928
+ *
1929
  * @return bool|string
1930
  */
1931
  function get_post_title_format( $title_type = 'post', $p = null ) {
1940
 
1941
  if ( ! empty( $aioseop_options['aiosp_cpostactive'] ) ) {
1942
  $wp_post_types = $aioseop_options['aiosp_cpostactive'];
1943
+ if ( ( ( $title_type == 'archive' ) && is_post_type_archive( $wp_post_types ) && $prefix = "aiosp_{$title_type}_" ) ||
1944
+ ( ( $title_type == 'post' ) && $this->is_singular( $wp_post_types, $p ) && $prefix = 'aiosp_' )
 
 
 
 
 
 
 
 
 
1945
  ) {
1946
  $post_type = get_post_type( $p );
1947
 
1955
  }
1956
 
1957
  /**
 
 
 
 
1958
  * @param array $post_types
1959
  * @param null $post
1960
+ *
1961
  * @return bool
1962
  */
1963
  function is_singular( $post_types = array(), $post = null ) {
1969
  }
1970
 
1971
  /**
 
 
 
 
1972
  * @return bool|null
1973
  */
1974
  function is_static_posts_page() {
1983
  }
1984
 
1985
  /**
 
 
 
 
1986
  * @return bool|null
1987
  */
1988
  function is_static_front_page() {
1996
  }
1997
 
1998
  /**
 
 
 
 
1999
  * @param int $id
2000
+ *
2001
  * @return array
2002
  */
2003
  function get_all_categories( $id = 0 ) {
2013
  }
2014
 
2015
  /**
 
 
 
 
2016
  * @param string $tax
2017
+ *
2018
  * @return string
2019
  */
2020
  function get_tax_title( $tax = '' ) {
2037
  return $this->apply_tax_title_format( $name, $desc, $tax );
2038
  }
2039
 
2040
+ // Handle prev / next links.
2041
  /**
2042
+ *
2043
+ * Gets taxonomy name.
2044
  *
2045
  * @param $tax
2046
  *
 
2047
  * @since 2.3.10 Remove option for capitalize categories. We still respect the option,
2048
  * and the default (true) or a legacy option in the db can be overridden with the new filter hook aioseop_capitalize_categories
2049
  * @since 2.3.15 Remove category capitalization completely
2068
  }
2069
 
2070
  /**
 
 
 
 
2071
  * @param $tax
2072
+ *
2073
  * @return mixed|void
2074
  */
2075
  function get_tax_desc( $tax ) {
2089
  }
2090
 
2091
  /**
 
 
 
 
2092
  * @param $category_name
2093
  * @param $category_description
2094
  * @param string $tax
2095
+ *
2096
  * @return string
2097
  */
2098
  function apply_tax_title_format( $category_name, $category_description, $tax = '' ) {
2101
  * Runs before applying the formatting for the taxonomy title.
2102
  *
2103
  * @since 3.0
2104
+ *
2105
  */
2106
  do_action( 'aioseop_before_tax_title_format' );
2107
 
2134
  if ( false !== strpos( $title, '%current_year%', 0 ) ) {
2135
  $title = str_replace( '%current_year%', date( 'Y' ), $title );
2136
  }
 
 
 
 
 
 
2137
 
2138
  /**
2139
  * Filters document title after applying the formatting.
2141
  * @since 3.0
2142
  *
2143
  * @param string $title Document title to be filtered.
2144
+ *
2145
  */
2146
  $title = apply_filters( 'aioseop_title_format', $title );
2147
 
2151
  * Runs after applying the formatting for the taxonomy title.
2152
  *
2153
  * @since 3.0
2154
+ *
2155
  */
2156
  do_action( 'aioseop_after_tax_title_format' );
2157
 
2159
  }
2160
 
2161
  /**
 
 
 
 
2162
  * @param string $tax
2163
+ *
2164
  * @return string
2165
  */
2166
  function get_tax_title_format( $tax = '' ) {
2194
  }
2195
 
2196
  /**
 
 
 
 
2197
  * @param $title
2198
  * @param string $category
2199
+ *
2200
  * @return string
2201
  */
2202
  function apply_archive_title_format( $title, $category = '' ) {
2213
  }
2214
 
2215
  /**
 
 
 
 
2216
  * @return bool|string
2217
  */
2218
  function get_archive_title_format() {
2220
  }
2221
 
2222
  /**
 
 
 
2223
  * @since 2.3.14 #932 Adds filter "aioseop_description", removes extra filtering.
2224
  * @since 2.4 #951 Trim/truncates occurs inside filter "aioseop_description".
2225
  * @since 2.4.4.1 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
2226
  *
2227
  * @param null $post
2228
+ *
2229
  * @return mixed|string|void
2230
  */
2231
  function get_main_description( $post = null ) {
2284
  }
2285
 
2286
  /**
 
 
 
 
2287
  * @return bool
2288
  */
2289
  function show_page_description() {
2299
  }
2300
 
2301
  /**
 
 
 
 
2302
  * @return mixed
2303
  */
2304
  function get_page_number() {
2315
  }
2316
 
2317
  /**
 
 
2318
  * @since ?
2319
  * @since 2.4 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
2320
  *
2343
  }
2344
 
2345
  /**
2346
+ * Gets post description.
 
2347
  * Auto-generates description if settings are ON.
2348
  *
2349
  * @since 2.3.13 #899 Fixes non breacking space, applies filter "aioseop_description".
2352
  * @since 2.4 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
2353
  *
2354
  * @param object $post Post object.
2355
+ *
2356
  * @return mixed|string
2357
  */
2358
  function get_post_description( $post ) {
2387
  }
2388
 
2389
  /**
 
 
 
2390
  * @since 2.3.15 Brackets not longer replaced from filters.
2391
  *
2392
  * @param $text
2393
+ *
2394
  * @return string
2395
  */
2396
  function trim_text_without_filters_full_length( $text ) {
2402
  }
2403
 
2404
  /**
 
 
 
2405
  * @since 2.3.15 Brackets not longer replaced from filters.
2406
  *
2407
  * @param $text
2408
  * @param int $max
2409
+ *
2410
  * @return string
2411
  */
2412
  function trim_excerpt_without_filters( $text, $max = 0 ) {
2448
  }
2449
 
2450
  /**
 
 
 
 
 
 
2451
  * @param $query
2452
  * @param bool $show_page
2453
+ *
2454
  * @return bool|false|string
2455
  */
2456
  function aiosp_mrt_get_url( $query, $show_page = true ) {
2547
  }
2548
 
2549
  /**
 
 
 
 
2550
  * @param $link
2551
+ *
2552
  * @return string
2553
  */
2554
  function get_paged( $link ) {
2581
  }
2582
 
2583
  /**
 
 
 
 
2584
  * @return comma|string
2585
  */
2586
  function get_main_keywords() {
2608
  }
2609
 
2610
  /**
2611
+ * @return comma-separated list of unique keywords
 
 
 
 
2612
  */
2613
  function get_all_keywords() {
2614
  global $posts;
2682
  }
2683
 
2684
  /**
 
 
 
 
2685
  * @param $keywords
2686
+ *
2687
  * @return array
2688
  */
2689
  function keyword_string_to_list( $keywords ) {
2697
  }
2698
 
2699
  /**
 
 
 
 
2700
  * @param int $id
2701
+ *
2702
  * @return array
2703
  */
2704
  function get_all_tags( $id = 0 ) {
2728
  }
2729
 
2730
  /**
 
 
 
 
2731
  * @param $keywords
2732
+ *
2733
  * @return string
2734
  */
2735
  function get_unique_keywords( $keywords ) {
2737
  }
2738
 
2739
  /**
 
 
 
 
2740
  * @param $keywords
2741
+ *
2742
  * @return array
2743
  */
2744
  function clean_keyword_list( $keywords ) {
2756
  }
2757
 
2758
  /**
 
 
 
 
2759
  * @param $term_id
2760
  * @param $new_term_id
2761
  * @param string $term_taxonomy_id
2775
  }
2776
 
2777
  /**
 
 
 
 
2778
  * @param $term_id
2779
+ *
2780
  * @return array
2781
  */
2782
  function get_all_term_data( $term_id ) {
2880
  }
2881
  */
2882
 
 
 
 
 
 
2883
  function add_page_hooks() {
2884
 
2885
  global $aioseop_options;
2905
  }
2906
 
2907
  if ( isset( $post_types['attachment'] ) ) {
 
2908
  $post_types['attachment'] = __( 'Media / Attachments', 'all-in-one-seo-pack' );
2909
  }
2910
  if ( isset( $all_post_types['attachment'] ) ) {
2946
  $name = $post_objs[ $p ]->labels->singular_name;
2947
  if ( ! isset( $this->default_options[ $field ] ) ) {
2948
  $this->default_options[ $field ] = array(
 
2949
  'name' => "$name " . __( 'Title Format:', 'all-in-one-seo-pack' ) . "<br />($p)",
2950
  'type' => 'text',
2951
  'default' => '%post_title% | %site_title%',
2977
  $name = $pt;
2978
  if ( ! isset( $this->default_options[ $field ] ) ) {
2979
  $this->default_options[ $field ] = array(
 
2980
  'name' => "$name " . __( 'Taxonomy Title Format:', 'all-in-one-seo-pack' ),
2981
  'type' => 'text',
2982
  'default' => '%taxonomy_title% | %site_title%',
2983
  'condshow' => array(
2984
+ 'aiosp_taxactive\[\]' => $p,
2985
  ),
2986
  );
2987
  $this->layout['cpt']['options'][] = $field;
2992
 
2993
  if ( AIOSEOPPRO ) {
2994
  global $aioseop_update_checker;
2995
+ add_action(
2996
+ "{$this->prefix}update_options", array(
2997
+ $aioseop_update_checker,
2998
+ 'license_change_check',
2999
+ ), 10, 2
3000
+ );
3001
  add_action( "{$this->prefix}settings_update", array( $aioseop_update_checker, 'update_check' ), 10, 2 );
3002
  }
3003
 
3047
  // Screens `post.php`, `post-new.php`, & `../aioseop_class.php` share the same `count-char.js`.
3048
  case 'post.php':
3049
  case 'post-new.php':
3050
+ $info = $this->get_page_snippet_info();
3051
+ $title = $info['title'];
3052
+ $title_format = $this->get_title_format( array( 'name' => 'aiosp_snippet' ) );
3053
+
3054
+ if ( ! empty( $title_format ) ) {
3055
+ $replace_title = '<span id="aiosp_snippet_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title ) ) ) . '</span>';
3056
+ $extra_title_len = strlen( $this->html_entity_decode( str_replace( $replace_title, '', $title_format ) ) );
3057
+ }
3058
  // Fall through.
3059
  case 'toplevel_page_' . AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class':
3060
  wp_enqueue_script(
3075
  }
3076
 
3077
  /**
 
 
 
 
3078
  * @param $submit
3079
+ *
3080
  * @return mixed
3081
  */
3082
  function filter_submit( $submit ) {
3083
  $submit['Submit_Default'] = array(
3084
  'type' => 'submit',
3085
  'class' => 'aioseop_reset_settings_button button-secondary',
 
3086
  'value' => __( 'Reset General Settings to Defaults', 'all-in-one-seo-pack' ) . ' &raquo;',
3087
  );
3088
  $submit['Submit_All_Default'] = array(
3089
  'type' => 'submit',
3090
  'class' => 'aioseop_reset_settings_button button-secondary',
 
3091
  'value' => __( 'Reset ALL Settings to Defaults', 'all-in-one-seo-pack' ) . ' &raquo;',
3092
  );
3093
 
3095
  }
3096
 
3097
  /**
 
 
3098
  * Handle resetting options to defaults, but preserve the license key if pro.
3099
  *
 
 
3100
  * @param null $location
3101
  * @param bool $delete
3102
  */
3139
  }
3140
 
3141
  /**
 
 
 
3142
  * @since 2.3.16 Forces HTML entity decode on placeholder values.
3143
  *
3144
  * @param $settings
3145
  * @param $location
3146
  * @param $current
3147
+ *
3148
  * @return mixed
3149
  */
3150
  function filter_settings( $settings, $location, $current ) {
3155
  unset( $settings[ "{$prefix}$opt" ] );
3156
  }
3157
 
3158
+ if ( ! class_exists( 'DOMDocument' ) ) {
3159
+ unset( $settings['{prefix}google_connect'] );
3160
+ }
3161
  if ( AIOSEOPPRO ) {
3162
  if ( ! empty( $this->options['aiosp_license_key'] ) ) {
3163
  $settings['aiosp_license_key']['type'] = 'password';
3172
  if ( ! empty( $this->options['aiosp_cpostnoindex'] ) && in_array( $post_type, $this->options['aiosp_cpostnoindex'] ) ) {
3173
  $settings[ "{$prefix}noindex" ]['type'] = 'select';
3174
  $settings[ "{$prefix}noindex" ]['initial_options'] = array(
 
3175
  '' => __( 'Default - noindex', 'all-in-one-seo-pack' ),
3176
  'off' => __( 'index', 'all-in-one-seo-pack' ),
3177
  'on' => __( 'noindex', 'all-in-one-seo-pack' ),
3180
  if ( ! empty( $this->options['aiosp_cpostnofollow'] ) && in_array( $post_type, $this->options['aiosp_cpostnofollow'] ) ) {
3181
  $settings[ "{$prefix}nofollow" ]['type'] = 'select';
3182
  $settings[ "{$prefix}nofollow" ]['initial_options'] = array(
 
3183
  '' => __( 'Default - nofollow', 'all-in-one-seo-pack' ),
3184
  'off' => __( 'follow', 'all-in-one-seo-pack' ),
3185
  'on' => __( 'nofollow', 'all-in-one-seo-pack' ),
3223
  }
3224
 
3225
  /**
 
 
 
 
3226
  * @param $options
3227
  * @param $location
3228
+ *
3229
  * @return mixed
3230
  */
3231
  function filter_options( $options, $location ) {
3253
  return $options;
3254
  }
3255
 
 
 
 
 
 
3256
  function template_redirect() {
3257
  global $aioseop_options;
3258
 
3274
  }
3275
 
3276
  /**
 
 
 
 
 
 
3277
  * @return bool
3278
  */
3279
  function is_page_included() {
3354
  }
3355
 
3356
  /**
 
 
 
 
3357
  * @param $content
3358
+ *
3359
  * @return mixed|string
3360
  */
3361
  function output_callback_for_title( $content ) {
3363
  }
3364
 
3365
  /**
 
 
3366
  * Used for forcing title rewrites.
3367
  *
 
 
3368
  * @param $header
3369
+ *
3370
  * @return mixed|string
3371
  */
3372
  function rewrite_title( $header ) {
3398
  }
3399
 
3400
  /**
 
 
 
 
3401
  * @param $content
3402
  * @param $title
3403
+ *
3404
  * @return mixed
3405
  */
3406
  function replace_title( $content, $title ) {
3418
  }
3419
 
3420
  /**
 
 
3421
  * Adds WordPress hooks.
3422
  *
 
3423
  * @since 2.3.13 #899 Adds filter:aioseop_description.
3424
  * @since 2.3.14 #593 Adds filter:aioseop_title.
3425
  * @since 2.4 #951 Increases filter:aioseop_description arguments number.
3452
  if ( current_user_can( 'update_plugins' ) ) {
3453
  add_action( 'admin_notices', array( $aioseop_update_checker, 'key_warning' ) );
3454
  }
3455
+ add_action(
3456
+ 'after_plugin_row_' . AIOSEOP_PLUGIN_BASENAME, array(
3457
+ $aioseop_update_checker,
3458
+ 'add_plugin_row',
3459
+ )
3460
+ );
3461
  }
3462
  } else {
3463
  if ( $aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on' ) {
3513
  }
3514
 
3515
  /**
 
 
 
 
3516
  * @param $description
3517
+ *
3518
  * @return string
3519
  */
3520
  function make_unique_att_desc( $description ) {
3522
  if ( is_attachment() ) {
3523
 
3524
  $url = $this->aiosp_mrt_get_url( $wp_query );
 
3525
  if ( $url ) {
3526
  $matches = array();
3527
  preg_match_all( '/(\d+)/', $url, $matches );
3528
  if ( is_array( $matches ) ) {
3529
+ $uniqueDesc = join( '', $matches[0] );
3530
  }
3531
  }
3532
+ $description .= ' ' . $uniqueDesc;
3533
  }
3534
 
3535
  return $description;
3536
  }
3537
 
3538
  /**
 
 
3539
  * Adds meta description to AMP pages.
3540
  *
 
 
3541
  * @since 2.3.11.5
 
 
3542
  */
3543
  function amp_head() {
3544
  if ( ! $this->is_seo_enabled_for_cpt() ) {
3576
  }
3577
 
3578
  /**
 
 
3579
  * Checks whether the current CPT should show the SEO tags.
 
 
 
 
 
 
3580
  */
3581
  private function is_seo_enabled_for_cpt() {
3582
  global $aioseop_options;
3584
  }
3585
 
3586
  /**
 
 
 
3587
  * @since 2.3.14 #932 Removes filter "aioseop_description".
3588
  */
3589
  function wp_head() {
3596
  }
3597
 
3598
  if ( ! $this->is_page_included() ) {
3599
+ // Handle noindex, nofollow - robots meta.
 
 
 
 
 
 
 
 
 
 
3600
  $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
3601
  if ( ! empty( $robots_meta ) ) {
3602
  // Should plugin & version details be added here as well?
3706
  }
3707
  }
3708
  // Handle noindex, nofollow - robots meta.
3709
+ $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
3710
+ if ( ! empty( $robots_meta ) ) {
3711
+ $meta_string .= '<meta name="robots" content="' . esc_attr( $robots_meta ) . '" />' . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3712
  }
3713
  // Handle site verification.
3714
  if ( is_front_page() ) {
3718
  'bing' => 'msvalidate.01',
3719
  'pinterest' => 'p:domain_verify',
3720
  'yandex' => 'yandex-verification',
3721
+ 'baidu' => 'baidu-site-verification',
3722
  ) as $k => $v
3723
  ) {
3724
  if ( ! empty( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) {
3725
  $meta_string .= '<meta name="' . $v . '" content="' . trim( strip_tags( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) . '" />' . "\n";
3726
  }
3727
  }
3728
+
3729
+ // Sitelinks search. Only show if "use schema.org markup is checked".
3730
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && ! empty( $aioseop_options['aiosp_google_sitelinks_search'] ) ) {
3731
+ $meta_string .= $this->sitelinks_search_box() . "\n";
3732
+ }
3733
  }
3734
  // Handle extra meta fields.
3735
  foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
3778
  echo "$meta_string\n";
3779
  }
3780
 
 
 
 
 
 
 
3781
  // Handle canonical links.
3782
  $show_page = true;
3783
  if ( ! empty( $aioseop_options['aiosp_no_paged_canonical_links'] ) ) {
3813
  }
3814
 
3815
  }
3816
+
3817
  /**
3818
+ * Check rewrite handler.
 
 
3819
  */
3820
  function check_rewrite_handler() {
3821
  global $aioseop_options;
3832
  } else {
3833
  $active_handlers = array();
3834
  }
3835
+ if ( sizeof( $active_handlers ) > 0 &&
3836
+ $this->strtolower( $active_handlers[ sizeof( $active_handlers ) - 1 ] ) ==
3837
+ $this->strtolower( 'All_in_One_SEO_Pack::output_callback_for_title' )
3838
  ) {
3839
  ob_end_flush();
3840
  } else {
3855
  }
3856
 
3857
  /**
 
 
 
 
3858
  * @param $description
3859
+ *
3860
  * @return mixed|string
3861
  */
3862
  function trim_description( $description ) {
3869
  }
3870
 
3871
  /**
 
 
 
 
3872
  * @param $description
3873
  * @param null $post
3874
+ *
3875
  * @return mixed
3876
  */
3877
  function apply_description_format( $description, $post = null ) {
3880
  * Runs before applying the formatting for the meta description.
3881
  *
3882
  * @since 3.0
3883
+ *
3884
  */
3885
  do_action( 'aioseop_before_apply_description_format' );
3886
 
3914
  if ( false !== strpos( $description, '%current_year%', 0 ) ) {
3915
  $description = str_replace( '%current_year%', date( 'Y' ), $description );
3916
  }
 
 
 
 
 
 
3917
  if ( false !== strpos( $description, '%post_date%', 0 ) ) {
3918
  $description = str_replace( '%post_date%', get_the_date(), $description );
3919
  }
3925
  }
3926
 
3927
  /*
3928
+ This was intended to make attachment descriptions unique if pulling from the parent... let's remove it and see if there are any problems
3929
+ *on the roadmap is to have a better hierarchy for attachment description pulling
3930
+ * if ($aioseop_options['aiosp_can']) $description = $this->make_unique_att_desc($description);
3931
+ */
3932
  $description = $this->apply_cf_fields( $description );
3933
 
3934
  /**
3935
  * Runs after applying the formatting for the meta description.
3936
  *
3937
  * @since 3.0
3938
+ *
3939
  */
3940
  do_action( 'aioseop_after_apply_description_format' );
3941
 
3943
  }
3944
 
3945
  /**
 
 
 
 
 
 
 
 
3946
  * @return string
3947
+ * @since 0.0
3948
+ * @since 2.3.11.5 Added no index API filter hook for password protected posts.
3949
  */
3950
  function get_robots_meta() {
3951
  global $aioseop_options;
3952
+ $opts = $this->meta_opts;
3953
+ $page = $this->get_page_number();
3954
+ $robots_meta = $tax_noindex = '';
3955
+ if ( isset( $aioseop_options['aiosp_tax_noindex'] ) ) {
 
 
 
 
 
 
 
 
3956
  $tax_noindex = $aioseop_options['aiosp_tax_noindex'];
3957
  }
3958
 
3959
+ if ( empty( $tax_noindex ) || ! is_array( $tax_noindex ) ) {
3960
+ $tax_noindex = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3961
  }
3962
 
3963
+ $aiosp_noindex = $aiosp_nofollow = '';
3964
+ $noindex = 'index';
3965
+ $nofollow = 'follow';
 
 
 
 
3966
 
3967
+ if ( ! empty( $opts ) ) {
3968
+ $aiosp_noindex = htmlspecialchars( stripslashes( $opts['aiosp_noindex'] ) );
3969
+ $aiosp_nofollow = htmlspecialchars( stripslashes( $opts['aiosp_nofollow'] ) );
3970
  }
3971
 
3972
+ if ( ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) || ( ! is_category() && is_archive() && ! is_tag() && ! is_tax()
3973
+ && ( ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) || ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ) )
3974
+ || ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) )
3975
+ || ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) )
3976
+ || ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) )
3977
+ || ( is_tax() && in_array( get_query_var( 'taxonomy' ), $tax_noindex ) )
 
 
3978
  ) {
3979
+ $noindex = 'noindex';
 
3980
 
3981
+ // #322: duplicating this code so that we don't step on some other entities' toes.
3982
+ if ( ( 'on' === $aiosp_nofollow ) || ( ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) ) && $page > 1 ) ||
3983
+ ( ( '' === $aiosp_nofollow ) && ( ! empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) )
 
 
 
 
 
 
 
3984
  ) {
3985
+ $nofollow = 'nofollow';
3986
  }
3987
+ // #322: duplicating this code so that we don't step on some other entities' toes.
3988
+ } elseif ( is_single() || is_page() || $this->is_static_posts_page() || is_attachment() || is_category() || is_tag() || is_tax() || ( $page > 1 ) || $this->check_singular() ) {
3989
+ $post_type = get_post_type();
3990
+ if ( $aiosp_noindex || $aiosp_nofollow || ! empty( $aioseop_options['aiosp_cpostnoindex'] )
3991
+ || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] )
3992
  ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3993
 
3994
+ if ( ( 'on' === $aiosp_noindex ) || ( ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) ) && $page > 1 ) ||
3995
+ ( ( '' === $aiosp_noindex ) && ( ! empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) )
 
 
 
 
 
 
 
 
 
3996
 
3997
+ ) {
3998
+ $noindex = 'noindex';
3999
+ }
4000
+ if ( ( $aiosp_nofollow == 'on' ) || ( ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) ) && $page > 1 ) ||
4001
+ ( ( $aiosp_nofollow == '' ) && ( ! empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) )
4002
+ ) {
4003
+ $nofollow = 'nofollow';
4004
+ }
4005
+ }
4006
  }
4007
+ if ( is_singular() && $this->is_password_protected() && apply_filters( 'aiosp_noindex_password_posts', false ) ) {
4008
+ $noindex = 'noindex';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4009
  }
4010
 
4011
+ $robots_meta = $noindex . ',' . $nofollow;
4012
+ if ( $robots_meta == 'index,follow' ) {
4013
+ $robots_meta = '';
4014
  }
4015
 
4016
+ return $robots_meta;
4017
  }
4018
 
4019
  /**
 
 
4020
  * Determine if the post is 'like' singular. In some specific instances, such as when the Reply post type of bbpress is loaded in its own page,
4021
  * it reflects as singular intead of single
4022
  *
4037
  }
4038
 
4039
  /**
 
 
4040
  * Determine if post is password protected.
 
4041
  * @since 2.3.11.5
 
4042
  * @return bool
4043
  */
4044
  function is_password_protected() {
4053
  }
4054
 
4055
  /**
4056
+ * Sitelinks Search Box
4057
  *
4058
  * @since ?
4059
  *
4060
+ * @return mixed|void
4061
+ */
4062
+ function sitelinks_search_box() {
4063
+ global $aioseop_options;
4064
+ $home_url = esc_url( get_home_url() );
4065
+ $search_block = '';
4066
+
4067
+ if ( ! empty( $aioseop_options['aiosp_google_sitelinks_search'] ) ) {
4068
+ $search_block = <<<EOF
4069
+ "potentialAction": {
4070
+ "@type": "SearchAction",
4071
+ "target": "{$home_url}/?s={search_term}",
4072
+ "query-input": "required name=search_term"
4073
+ },
4074
+ EOF;
4075
+ }
4076
+
4077
+ $search_box = <<<EOF
4078
+ <script type="application/ld+json">
4079
+ {
4080
+ "@context": "https://schema.org",
4081
+ "@type": "WebSite",
4082
+ EOF;
4083
+ if ( ! empty( $search_block ) ) {
4084
+ $search_box .= $search_block;
4085
+ }
4086
+ $search_box .= <<<EOF
4087
+ "url": "{$home_url}/"
4088
+ }
4089
+ </script>
4090
+ EOF;
4091
+
4092
+ return apply_filters( 'aiosp_sitelinks_search_box', $search_box );
4093
+ }
4094
+
4095
+ /**
4096
  * @param null $post
4097
+ *
4098
  * @return array
4099
  */
4100
  function get_prev_next_links( $post = null ) {
4173
  }
4174
  }
4175
 
4176
+ return array( 'prev' => $prev, 'next' => $next );
 
 
 
4177
  }
4178
 
4179
  /**
 
4180
  *
4181
  * Validates whether the url should be https or http.
4182
  *
4183
  * Mainly we're just using this for canonical URLS, but eventually it may be useful for other things
4184
  *
 
 
 
4185
  * @param $url
4186
+ *
4187
  * @return string $url
4188
+ *
4189
+ * @since 2.3.5
4190
+ * @since 2.3.11 Removed check for legacy protocol setting. Added filter.
4191
  */
4192
  function validate_url_scheme( $url ) {
4193
 
4207
  }
4208
 
4209
  /**
 
 
 
 
4210
  * @param $options
4211
  * @param $location
4212
  * @param $settings
4213
+ *
4214
  * @return mixed
4215
  */
4216
+ function override_options( $options, $location, $settings ) {
4217
+ if ( class_exists( 'DOMDocument' ) ) {
4218
+ $options['aiosp_google_connect'] = $settings['aiosp_google_connect']['default'];
4219
+ }
4220
+
4221
+ return $options;
4222
+ }
4223
+
4224
  function aiosp_google_analytics() {
4225
  new aioseop_google_analytics;
4226
  }
4227
 
4228
  /**
 
 
 
 
4229
  * @param $id
4230
+ *
4231
  * @return bool
4232
  */
4233
  function save_post_data( $id ) {
4304
  }
4305
 
4306
  /**
 
 
 
 
4307
  * @param $post
4308
  * @param $metabox
4309
  */
4326
  }
4327
 
4328
  /**
 
 
 
 
4329
  * @param $tabs
4330
  *
4331
  * @return string
4335
  $active = ' active';
4336
  foreach ( $tabs as $t ) {
4337
  if ( $active ) {
 
4338
  $title = __( 'Main Settings', 'all-in-one-seo-pack' );
4339
  } else {
4340
  $title = $t['title'];
4347
  return $header;
4348
  }
4349
 
 
 
 
 
 
4350
  function admin_bar_menu() {
4351
 
4352
  if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
4393
  $wp_admin_bar->add_menu(
4394
  array(
4395
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
 
4396
  'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ),
4397
  'id' => 'aioseop-pro-upgrade',
4398
  'href' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu',
4399
  'meta' => array( 'target' => '_blank' ),
4400
  )
4401
  );
 
4402
  // add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
4403
  }
4404
 
4457
  }
4458
 
4459
  /**
 
 
 
 
4460
  * Order for adding the menus for the aioseop_modules_add_menus hook.
4461
  */
4462
  function menu_order() {
4464
  }
4465
 
4466
  /**
 
 
 
 
4467
  * @param $tax
4468
  */
4469
  function display_category_metaboxes( $tax ) {
4476
  }
4477
 
4478
  /**
 
 
 
 
4479
  * @param $id
4480
  */
4481
  function save_category_metaboxes( $id ) {
4546
  }
4547
  }
4548
 
 
 
 
 
 
4549
  function admin_menu() {
4550
  $file = plugin_basename( __FILE__ );
4551
+ $menu_name = __( 'All in One SEO', 'all-in-one-seo-pack' );
4552
 
4553
  $this->locations['aiosp']['default_options']['nonce-aioseop-edit']['default'] = wp_create_nonce( 'edit-aioseop-nonce' );
4554
 
4607
 
4608
  if ( AIOSEOPPRO ) {
4609
  if ( is_array( $this->options['aiosp_cpostactive'] ) ) {
4610
+ $this->locations['aiosp']['display'] = $this->options['aiosp_cpostactive'];
4611
  } else {
4612
  $this->locations['aiosp']['display'][] = $this->options['aiosp_cpostactive']; // Store as an array in case there are taxonomies to add also.
4613
  }
4637
  );
4638
 
4639
  add_meta_box(
4640
+ 'aioseop-list', __( 'Join Our Mailing List', 'all-in-one-seo-pack' ), array(
4641
+ 'aiosp_metaboxes',
4642
+ 'display_extra_metaboxes',
4643
+ ), 'aioseop_metaboxes', 'normal', 'core'
 
 
4644
  );
4645
  if ( AIOSEOPPRO ) {
4646
  add_meta_box(
4647
+ 'aioseop-about', __( 'About', 'all-in-one-seo-pack' ), array(
4648
+ 'aiosp_metaboxes',
4649
+ 'display_extra_metaboxes',
4650
+ ), 'aioseop_metaboxes', 'side', 'core'
 
 
4651
  );
4652
  } else {
4653
  add_meta_box(
4654
+ 'aioseop-about', __( 'About', 'all-in-one-seo-pack' ) . "<span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>', array(
4655
+ 'aiosp_metaboxes',
4656
+ 'display_extra_metaboxes',
4657
+ ), 'aioseop_metaboxes', 'side', 'core'
 
 
4658
  );
4659
  }
4660
  add_meta_box(
4661
+ 'aioseop-support', __( 'Support', 'all-in-one-seo-pack' ) . " <span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>', array(
4662
+ 'aiosp_metaboxes',
4663
+ 'display_extra_metaboxes',
4664
+ ), 'aioseop_metaboxes', 'side', 'core'
 
 
4665
  );
4666
 
4667
  add_action( 'aioseop_modules_add_menus', array( $this, 'add_menu' ), 5 );
4694
  add_meta_box( $m[0]['id'], $title, $m[0]['callback'], $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m[0]['callback_args'] );
4695
  } elseif ( $tab_num > 1 ) {
4696
  add_meta_box(
4697
+ $m[0]['id'] . '_tabbed', $title, array(
4698
+ $this,
4699
+ 'display_tabbed_metabox',
4700
+ ), $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m
 
 
 
4701
  );
4702
  }
4703
  }
4718
  }
4719
 
4720
  /**
 
 
 
 
4721
  * @param $menu_order
4722
+ *
4723
  * @return array
4724
  */
4725
  function set_menu_order( $menu_order ) {
4756
  * @return string
4757
  */
4758
  public function filter_title( $value ) {
4759
+ // Decode entities
4760
  $value = $this->html_entity_decode( $value );
4761
+ // Encode to valid SEO html entities
4762
  return $this->seo_entity_encode( $value );
4763
  }
4764
 
4788
  if ( $ignore_php_version || preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
4789
  $value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ) );
4790
  }
4791
+ // Decode entities
4792
  $value = $this->html_entity_decode( $value );
4793
  $value = preg_replace(
4794
  array(
4795
+ '#<a.*?>([^>]*)</a>#i', // Remove link but keep anchor text
4796
+ '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', // Remove URLs
4797
  ),
4798
  array(
4799
  '$1', // Replacement link's anchor text.
4800
+ '', // Replacement URLs
4801
  ),
4802
  $value
4803
  );
4804
+ // Strip html
4805
  $value = wp_strip_all_tags( $value );
4806
+ // External trim
4807
  $value = trim( $value );
4808
  // Internal whitespace trim.
4809
  $value = preg_replace( '/\s\s+/u', ' ', $value );
4810
+ // Truncate / crop
4811
  if ( ! empty( $truncate ) && $truncate ) {
4812
  $value = $this->trim_excerpt_without_filters( $value );
4813
  }
4814
+ // Encode to valid SEO html entities
4815
  return $this->seo_entity_encode( $value );
4816
  }
4817
 
4828
  * @return string
4829
  */
4830
  private function html_entity_decode( $value ) {
4831
+ // Special conversions
4832
  $value = preg_replace(
4833
  array(
 
4834
  '/\“|\”|&#[xX]00022;|&#34;|&[lLrRbB](dquo|DQUO)(?:[rR])?;|&#[xX]0201[dDeE];'
4835
+ . '|&[OoCc](pen|lose)[Cc]urly[Dd]ouble[Qq]uote;|&#822[012];|&#[xX]27;/', // Double quotes
4836
+ '/&#039;|&#8217;|&apos;/', // Apostrophes
 
4837
  ),
4838
  array(
4839
+ '"', // Double quotes
4840
+ '\'', // Apostrophes
 
 
4841
  ),
4842
  $value
4843
  );
4857
  private function seo_entity_encode( $value ) {
4858
  return preg_replace(
4859
  array(
4860
+ '/\"|\“|\”|\„/', // Double quotes
4861
+ '/\'|\’|\‘/', // Apostrophes
4862
  ),
4863
  array(
4864
+ '&quot;', // Double quotes
4865
+ '&#039;', // Apostrophes
4866
  ),
4867
  esc_html( $value )
4868
  );
4886
  <?php do_meta_boxes( 'aioseop_metaboxes', 'normal', array( 'test' ) ); ?>
4887
  </div>
4888
  </div>
4889
+ <style>
4890
+ #wpbody-content {
4891
+ min-width: 900px;
4892
+ }
4893
+ </style>
4894
  <div class="aioseop_right_sidebar aioseop_options_wrapper">
4895
 
4896
  <div class="aioseop_sidebar">
4897
  <?php
4898
  do_meta_boxes( 'aioseop_metaboxes', 'side', array( 'test' ) );
4899
  ?>
4900
+ <script type="text/javascript">
4901
  //<![CDATA[
4902
  jQuery(document).ready(function ($) {
4903
  // Close postboxes that should be closed.
4911
  <?php if ( ! AIOSEOPPRO ) { ?>
4912
  <div class="aioseop_advert aioseop_nopad_all">
4913
  <?php $adid = mt_rand( 21, 22 ); ?>
4914
+ <a href="https://www.wincher.com/?referer=all-in-one-seo-pack&adreferer=banner<?php echo $adid; ?>"
4915
+ target="_blank">
 
4916
  <div class=wincherad id=wincher<?php echo $adid; ?>>
4917
  </div>
4918
  </a>
all_in_one_seo_pack.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: All In One SEO Pack
5
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
6
  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.
7
- Version: 3.2.1
8
  Author: Michael Torbert
9
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
10
  Text Domain: all-in-one-seo-pack
@@ -32,21 +32,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32
  * The original WordPress SEO plugin.
33
  *
34
  * @package All-in-One-SEO-Pack
35
- * @version 3.2.1
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
39
  define( 'AIOSEOPPRO', false );
40
  }
41
  if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
42
- if ( ! AIOSEOPPRO ) {
43
- define( 'AIOSEOP_PLUGIN_NAME', 'All in One SEO Pack' );
44
- } else {
45
- define( 'AIOSEOP_PLUGIN_NAME', 'All in One SEO Pack Pro' );
46
- }
47
  }
48
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
49
- define( 'AIOSEOP_VERSION', '3.2.1' );
50
  }
51
 
52
  /*
@@ -65,16 +61,11 @@ if ( AIOSEOPPRO ) {
65
 
66
  if ( ! function_exists( 'aiosp_add_cap' ) ) {
67
 
68
- /**
69
- * AIOSEOP Add Capabilities
70
- *
71
- * @since 2.3.6
72
- */
73
  function aiosp_add_cap() {
74
  /*
75
- * TODO we should put this into an install script. We just need to make sure it runs soon enough and we need to make
76
- * sure people updating from previous versions have access to it.
77
- */
78
 
79
  $role = get_role( 'administrator' );
80
  if ( is_object( $role ) ) {
@@ -88,10 +79,10 @@ if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
88
  define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
89
  } elseif ( AIOSEOP_PLUGIN_DIR !== plugin_dir_path( __FILE__ ) ) {
90
  /*
91
- This is not a great message.
92
- add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
93
- __( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
94
- $aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
95
  */
96
  return;
97
  }
@@ -109,7 +100,7 @@ if ( ! defined( 'AIOSEOP_PLUGIN_IMAGES_URL' ) ) {
109
  define( 'AIOSEOP_PLUGIN_IMAGES_URL', AIOSEOP_PLUGIN_URL . 'images/' );
110
  }
111
  if ( ! defined( 'AIOSEOP_BASELINE_MEM_LIMIT' ) ) {
112
- define( 'AIOSEOP_BASELINE_MEM_LIMIT', '256M' );
113
  } // 256MB
114
  if ( ! defined( 'WP_CONTENT_URL' ) ) {
115
  define( 'WP_CONTENT_URL', site_url() . '/wp-content' );
@@ -142,11 +133,8 @@ $aioseop_mem_limit = @ini_get( 'memory_limit' );
142
 
143
  if ( ! function_exists( 'aioseop_convert_bytestring' ) ) {
144
  /**
145
- * AIOSEOP Convert Bytestring
146
- *
147
- * @since ?
148
- *
149
  * @param $byte_string
 
150
  * @return int
151
  */
152
  function aioseop_convert_bytestring( $byte_string ) {
@@ -209,7 +197,6 @@ if ( ! empty( $aioseop_mem_limit ) ) {
209
  }
210
 
211
  $aiosp_activation = false;
212
- // list all available modules here.
213
  $aioseop_module_list = array(
214
  'sitemap',
215
  'opengraph',
@@ -218,7 +205,7 @@ $aioseop_module_list = array(
218
  'importer_exporter',
219
  'bad_robots',
220
  'performance',
221
- );
222
 
223
  if ( AIOSEOPPRO ) {
224
  $aioseop_module_list[] = 'video_sitemap';
@@ -226,11 +213,6 @@ if ( AIOSEOPPRO ) {
226
 
227
  if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
228
  add_action( 'admin_notices', 'admin_notices_already_defined' );
229
- /**
230
- * Admin Notices Already Defined
231
- *
232
- * @throws ReflectionException
233
- */
234
  function admin_notices_already_defined() {
235
  echo "<div class=\'error\'>The All In One SEO Pack class is already defined";
236
  if ( class_exists( 'ReflectionClass' ) ) {
@@ -272,11 +254,6 @@ if ( AIOSEOPPRO ) {
272
 
273
  if ( ! function_exists( 'aioseop_activate' ) ) {
274
 
275
- /**
276
- * AIOSEOP Activate
277
- *
278
- * @since ?
279
- */
280
  function aioseop_activate() {
281
 
282
  // Check if we just got activated.
@@ -309,10 +286,6 @@ if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
309
  add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
310
 
311
  /**
312
- * AIOSEOP Plugin Row Meta
313
- *
314
- * @since 2.3.3
315
- *
316
  * @param $actions
317
  * @param $plugin_file
318
  *
@@ -323,7 +296,6 @@ if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
323
  $action_links = array(
324
 
325
  'settings' => array(
326
- /* translators: This is an action link users can click to open a feature request/bug report on GitHub. */
327
  'label' => __( 'Feature Request/Bug Report', 'all-in-one-seo-pack' ),
328
  'url' => 'https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new',
329
  ),
@@ -340,12 +312,9 @@ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
340
  add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'aiosp_add_action_links', 10, 2 );
341
 
342
  /**
343
- * AIOSEOP Add Action Links
344
- *
345
- * @since 2.3
346
- *
347
  * @param $actions
348
  * @param $plugin_file
 
349
  * @return array
350
  */
351
  function aiosp_add_action_links( $actions, $plugin_file ) {
@@ -357,19 +326,16 @@ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
357
  $action_links = array();
358
  $action_links = array(
359
  'settings' => array(
360
- /* translators: This is an action link users can click to open the General Settings menu. */
361
  'label' => __( 'SEO Settings', 'all-in-one-seo-pack' ),
362
  'url' => get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/aioseop_class.php" ),
363
  ),
364
 
365
- 'forum' => array(
366
- /* translators: This is an action link users can click to open our premium support forum. */
367
  'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
368
  'url' => 'https://semperplugins.com/support/',
369
  ),
370
 
371
- 'docs' => array(
372
- /* translators: This is an action link users can click to open our general documentation page. */
373
  'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
374
  'url' => 'https://semperplugins.com/documentation/',
375
  ),
@@ -381,7 +347,6 @@ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
381
  if ( ! AIOSEOPPRO ) {
382
  $action_links['proupgrade'] =
383
  array(
384
- /* translators: This is an action link users can click to purchase a license for All in One SEO Pack Pro. */
385
  'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
386
  'url' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
387
 
@@ -395,14 +360,11 @@ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
395
  if ( ! function_exists( 'aiosp_action_links' ) ) {
396
 
397
  /**
398
- * AIOSEOP Action Links
399
- *
400
- * @since 2.3
401
- *
402
  * @param $actions
403
  * @param $plugin_file
404
  * @param array $action_links
405
  * @param string $position
 
406
  * @return array
407
  */
408
  function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
@@ -430,7 +392,7 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
430
  *
431
  * @global AIOSEOP_Notices $aioseop_notices
432
  *
433
- * @since 2.3
434
  * @since 2.3.12.3 Loads third party compatibility class.
435
  */
436
  function aioseop_init_class() {
@@ -453,16 +415,13 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
453
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/dashboard_widget.php' );
454
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/menu.php' );
455
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/class-aioseop-notices.php' );
456
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/schema/schema-builder.php' );
457
 
458
  $aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
459
 
460
  if ( AIOSEOPPRO ) {
461
- // Loads pro files and other pro init stuff.
462
- require_once( AIOSEOP_PLUGIN_DIR . 'pro/class-aio-pro-init.php' );
463
  }
464
- // call importer functions... this should be moved somewhere better.
465
- aiosp_seometa_import();
466
 
467
  $aiosp = new All_in_One_SEO_Pack();
468
 
@@ -482,13 +441,11 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
482
  add_action( 'init', array( $aiosp, 'add_hooks' ) );
483
  add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
484
 
485
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
486
  // add_action( 'admin_init', 'aioseop_review_plugin_notice' );
487
  if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
488
  remove_action( 'init', array( $aiosp, 'add_hooks' ) );
489
  add_action( 'admin_init', 'aioseop_scan_post_header' );
490
- // if the action doesn't run -- pdb.
491
- add_action( 'shutdown', 'aioseop_ajax_scan_header' );
492
  include_once( ABSPATH . 'wp-admin/includes/screen.php' );
493
  global $current_screen;
494
  if ( class_exists( 'WP_Screen' ) ) {
@@ -565,7 +522,6 @@ if ( ! function_exists( 'aioseop_welcome' ) ) {
565
  }
566
 
567
  add_action( 'init', 'aioseop_load_modules', 1 );
568
- // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
569
  // add_action( 'after_setup_theme', 'aioseop_load_modules' );
570
  if ( is_admin() || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
571
  add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
4
  Plugin Name: All In One SEO Pack
5
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
6
  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.
7
+ Version: 3.0.4
8
  Author: Michael Torbert
9
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
10
  Text Domain: all-in-one-seo-pack
32
  * The original WordPress SEO plugin.
33
  *
34
  * @package All-in-One-SEO-Pack
35
+ * @version 3.0.4
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
39
  define( 'AIOSEOPPRO', false );
40
  }
41
  if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
42
+ define( 'AIOSEOP_PLUGIN_NAME', 'All in One SEO Pack' );
 
 
 
 
43
  }
44
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
45
+ define( 'AIOSEOP_VERSION', '3.0.4' );
46
  }
47
 
48
  /*
61
 
62
  if ( ! function_exists( 'aiosp_add_cap' ) ) {
63
 
 
 
 
 
 
64
  function aiosp_add_cap() {
65
  /*
66
+ TODO we should put this into an install script. We just need to make sure it runs soon enough and we need to make
67
+ sure people updating from previous versions have access to it.
68
+ */
69
 
70
  $role = get_role( 'administrator' );
71
  if ( is_object( $role ) ) {
79
  define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
80
  } elseif ( AIOSEOP_PLUGIN_DIR !== plugin_dir_path( __FILE__ ) ) {
81
  /*
82
+ This is not a great message.
83
+ add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
84
+ __( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
85
+ $aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
86
  */
87
  return;
88
  }
100
  define( 'AIOSEOP_PLUGIN_IMAGES_URL', AIOSEOP_PLUGIN_URL . 'images/' );
101
  }
102
  if ( ! defined( 'AIOSEOP_BASELINE_MEM_LIMIT' ) ) {
103
+ define( 'AIOSEOP_BASELINE_MEM_LIMIT', 268435456 );
104
  } // 256MB
105
  if ( ! defined( 'WP_CONTENT_URL' ) ) {
106
  define( 'WP_CONTENT_URL', site_url() . '/wp-content' );
133
 
134
  if ( ! function_exists( 'aioseop_convert_bytestring' ) ) {
135
  /**
 
 
 
 
136
  * @param $byte_string
137
+ *
138
  * @return int
139
  */
140
  function aioseop_convert_bytestring( $byte_string ) {
197
  }
198
 
199
  $aiosp_activation = false;
 
200
  $aioseop_module_list = array(
201
  'sitemap',
202
  'opengraph',
205
  'importer_exporter',
206
  'bad_robots',
207
  'performance',
208
+ ); // list all available modules here
209
 
210
  if ( AIOSEOPPRO ) {
211
  $aioseop_module_list[] = 'video_sitemap';
213
 
214
  if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
215
  add_action( 'admin_notices', 'admin_notices_already_defined' );
 
 
 
 
 
216
  function admin_notices_already_defined() {
217
  echo "<div class=\'error\'>The All In One SEO Pack class is already defined";
218
  if ( class_exists( 'ReflectionClass' ) ) {
254
 
255
  if ( ! function_exists( 'aioseop_activate' ) ) {
256
 
 
 
 
 
 
257
  function aioseop_activate() {
258
 
259
  // Check if we just got activated.
286
  add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
287
 
288
  /**
 
 
 
 
289
  * @param $actions
290
  * @param $plugin_file
291
  *
296
  $action_links = array(
297
 
298
  'settings' => array(
 
299
  'label' => __( 'Feature Request/Bug Report', 'all-in-one-seo-pack' ),
300
  'url' => 'https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new',
301
  ),
312
  add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'aiosp_add_action_links', 10, 2 );
313
 
314
  /**
 
 
 
 
315
  * @param $actions
316
  * @param $plugin_file
317
+ *
318
  * @return array
319
  */
320
  function aiosp_add_action_links( $actions, $plugin_file ) {
326
  $action_links = array();
327
  $action_links = array(
328
  'settings' => array(
 
329
  'label' => __( 'SEO Settings', 'all-in-one-seo-pack' ),
330
  'url' => get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/aioseop_class.php" ),
331
  ),
332
 
333
+ 'forum' => array(
 
334
  'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
335
  'url' => 'https://semperplugins.com/support/',
336
  ),
337
 
338
+ 'docs' => array(
 
339
  'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
340
  'url' => 'https://semperplugins.com/documentation/',
341
  ),
347
  if ( ! AIOSEOPPRO ) {
348
  $action_links['proupgrade'] =
349
  array(
 
350
  'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
351
  'url' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
352
 
360
  if ( ! function_exists( 'aiosp_action_links' ) ) {
361
 
362
  /**
 
 
 
 
363
  * @param $actions
364
  * @param $plugin_file
365
  * @param array $action_links
366
  * @param string $position
367
+ *
368
  * @return array
369
  */
370
  function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
392
  *
393
  * @global AIOSEOP_Notices $aioseop_notices
394
  *
395
+ * @since ?? // When was this added?
396
  * @since 2.3.12.3 Loads third party compatibility class.
397
  */
398
  function aioseop_init_class() {
415
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/dashboard_widget.php' );
416
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/menu.php' );
417
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/class-aioseop-notices.php' );
 
418
 
419
  $aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
420
 
421
  if ( AIOSEOPPRO ) {
422
+ require_once( AIOSEOP_PLUGIN_DIR . 'pro/class-aio-pro-init.php' ); // Loads pro files and other pro init stuff.
 
423
  }
424
+ aiosp_seometa_import(); // call importer functions... this should be moved somewhere better
 
425
 
426
  $aiosp = new All_in_One_SEO_Pack();
427
 
441
  add_action( 'init', array( $aiosp, 'add_hooks' ) );
442
  add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
443
 
 
444
  // add_action( 'admin_init', 'aioseop_review_plugin_notice' );
445
  if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
446
  remove_action( 'init', array( $aiosp, 'add_hooks' ) );
447
  add_action( 'admin_init', 'aioseop_scan_post_header' );
448
+ add_action( 'shutdown', 'aioseop_ajax_scan_header' ); // if the action doesn't run -- pdb
 
449
  include_once( ABSPATH . 'wp-admin/includes/screen.php' );
450
  global $current_screen;
451
  if ( class_exists( 'WP_Screen' ) ) {
522
  }
523
 
524
  add_action( 'init', 'aioseop_load_modules', 1 );
 
525
  // add_action( 'after_setup_theme', 'aioseop_load_modules' );
526
  if ( is_admin() || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
527
  add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
css/admin-notice.min.css DELETED
@@ -1 +0,0 @@
1
- .aioseop-notice-delay{display:inherit}.aioseop-notice-delay.aioseop-delay-0.button-primary.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}
 
css/aioseop-font-icons-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- .aioseop-label-quickedit{padding:0 20px 0 0}
 
css/aioseop-font-icons.css CHANGED
@@ -7,6 +7,8 @@
7
  * @package All-in-One-SEO-Pack.
8
  */
9
 
 
 
10
  @font-face {
11
  font-family: 'aioseop-font';
12
  src: url('font-icons/aioseop.eot');
@@ -145,7 +147,7 @@ div.aioseop_tip_icon:before {
145
  /* ABOUT METABOX */
146
 
147
  .aiosp-di .dashicons {
148
- margin: 1px 3px;
149
  line-height: 1;
150
  width: 42px;
151
  height: 36px;
@@ -158,18 +160,18 @@ div.aioseop_tip_icon:before {
158
  -webkit-font-smoothing: antialiased;
159
  font-family: 'dashicons';
160
  font-weight: 400;
161
- font-size: 1.75em;
162
  line-height: 38px;
163
  }
164
 
165
  .aiosp-di .dashicons.di-facebook {
166
- width: 36px;
167
- background-color: #3B5998;
168
- border-radius: 2px;
169
  }
170
 
171
  .aiosp-di .dashicons.di-facebook:before {
172
- content: '\f305';
 
173
  }
174
 
175
  .aiosp-di .dashicons.di-twitter {
7
  * @package All-in-One-SEO-Pack.
8
  */
9
 
10
+ @charset "UTF-8";
11
+
12
  @font-face {
13
  font-family: 'aioseop-font';
14
  src: url('font-icons/aioseop.eot');
147
  /* ABOUT METABOX */
148
 
149
  .aiosp-di .dashicons {
150
+ margin: 1px;
151
  line-height: 1;
152
  width: 42px;
153
  height: 36px;
160
  -webkit-font-smoothing: antialiased;
161
  font-family: 'dashicons';
162
  font-weight: 400;
163
+ font-size: 1.5em;
164
  line-height: 38px;
165
  }
166
 
167
  .aiosp-di .dashicons.di-facebook {
168
+ margin: 0;
169
+ color: #3B5998;
 
170
  }
171
 
172
  .aiosp-di .dashicons.di-facebook:before {
173
+ content: '\f304';
174
+ font-size: 2.7em;
175
  }
176
 
177
  .aiosp-di .dashicons.di-twitter {
css/aioseop-font-icons.min.css DELETED
@@ -1 +0,0 @@
1
- @font-face{font-family:aioseop-font;src:url(font-icons/aioseop.eot);src:url(font-icons/aioseop.eot?#iefix) format('embedded-opentype'),url(font-icons/aioseop.woff) format('woff'),url(font-icons/aioseop.ttf) format('truetype'),url(font-icons/aioseop.svg#aioseop) format('svg');font-weight:400;font-style:normal}[class*=' aioseop-icon-']:before,[class^=aioseop-icon-]:before{display:inline-block;font-family:aioseop-font;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;speak:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.aioseop_icon{display:inline;margin-right:10px;color:#00a2e2;font-size:2.5em;line-height:1.2;vertical-align:middle}.aioseop-icon-file:before{content:'\69'}.aioseop-icon-support:before{content:'\6a'}.aioseop-icon-cog:before{content:'\6b'}.aioseop-icon-youtube:before{content:'\6c'}.aioseop-icon-book:before{content:'\6d'}.aioseop_help_icon:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC)}.aioseop-icon-qedit{margin:0 3px;line-height:2;font-size:14px}.aioseop-icon-qedit-accept{color:#9dd490}.aioseop-icon-qedit-accept:hover{color:#97eb84}.aioseop-icon-qedit-accept:before{content:'\70'}.aioseop-icon-qedit-delete{color:#ed8881}.aioseop-icon-qedit-delete:hover{color:#ffad9e}.aioseop-icon-qedit-delete:before{content:'\71'}.aioseop_edit_link{display:inline-block;position:absolute}.aioseop-icon-cog-edit{color:#72777c}.aioseop-icon-cog-edit:hover{color:#0073aa}.aioseop-icon-cog-edit:before{content:'\6e'}.aioseop-label-quickedit{padding-left:20px}div.aioseop_tip_icon{font-size:14px;border:1px solid #888;width:1em;text-align:center;padding:0 4px;-webkit-border-radius:12px;-moz-border-radius:12px;-webkit-box-shadow:1px 1px 1px #888;-moz-box-shadow:1px 1px 1px #888;box-shadow:1px 1px 1px #888;border-radius:12px}div.aioseop_tip_icon:before{content:'?'}.aiosp-di .dashicons{margin:1px 3px;line-height:1;width:42px;height:36px;color:#fff;padding:3px;vertical-align:middle}.aiosp-di .dashicons:before{-webkit-font-smoothing:antialiased;font-family:dashicons;font-weight:400;font-size:1.75em;line-height:38px}.aiosp-di .dashicons.di-facebook{width:36px;background-color:#3b5998;border-radius:2px}.aiosp-di .dashicons.di-facebook:before{content:'\f305'}.aiosp-di .dashicons.di-twitter{width:36px;background-color:#00aced;border-radius:2px}.aiosp-di .dashicons.di-twitter:before{content:'\f301'}
 
css/aioseop-jquery-ui.css DELETED
@@ -1,105 +0,0 @@
1
- /**
2
- * jQuery UI - v1.11.4
3
- * Targets AIOSEOP instead of whole page to avoid plugin conflicts.
4
- *
5
- * @since 3.0.0
6
- *
7
- * ©2015 jQuery Foundation and other contributors; Licensed MIT.
8
- */
9
- #aiosp_tabbed .ui-helper-clearfix:before,
10
- #aiosp_tabbed .ui-helper-clearfix:after {
11
- content: "";
12
- display: table;
13
- border-collapse: collapse
14
- }
15
-
16
- #aiosp_tabbed .ui-helper-clearfix:after {
17
- clear: both
18
- }
19
-
20
- #aiosp_tabbed .ui-tabs {
21
- position: relative;
22
- padding: .2em
23
- }
24
-
25
- #aiosp_tabbed .ui-tabs .ui-tabs-nav {
26
- margin: 0;
27
- padding: .2em .2em 0
28
- }
29
-
30
- #aiosp_tabbed .ui-tabs .ui-tabs-nav li {
31
- list-style: none;
32
- float: left;
33
- position: relative;
34
- top: 0;
35
- margin: 1px .2em 0 0;
36
- border-bottom-width: 0;
37
- padding: 0;
38
- white-space: nowrap
39
- }
40
-
41
- #aiosp_tabbed .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
42
- float: left;
43
- padding: .5em 1em;
44
- text-decoration: none
45
- }
46
-
47
- #aiosp_tabbed .ui-tabs .ui-tabs-nav li.ui-tabs-active {
48
- margin-bottom: -1px;
49
- padding-bottom: 1px
50
- }
51
-
52
- #aiosp_tabbed .ui-state-default,
53
- #aiosp_tabbed .ui-widget-content .ui-state-default,
54
- #aiosp_tabbed .ui-widget-header .ui-state-default {
55
- border: 1px solid #d3d3d3;
56
- background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
57
- font-weight: normal;
58
- color: #555
59
- }
60
-
61
- #aiosp_tabbed .ui-state-active,
62
- #aiosp_tabbed .ui-widget-content .ui-state-active,
63
- #aiosp_tabbed .ui-widget-header .ui-state-active {
64
- border: 1px solid #aaa;
65
- background: #fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
66
- font-weight: normal;
67
- color: #212121
68
- }
69
-
70
- #aiosp_tabbed .ui-corner-all,
71
- #aiosp_tabbed .ui-corner-top,
72
- #aiosp_tabbed .ui-corner-left,
73
- #aiosp_tabbed .ui-corner-tl {
74
- border-top-left-radius: 4px
75
- }
76
-
77
- #aiosp_tabbed .ui-corner-all,
78
- #aiosp_tabbed .ui-corner-top,
79
- #aiosp_tabbed .ui-corner-right,
80
- #aiosp_tabbed .ui-corner-tr {
81
- border-top-right-radius: 4px
82
- }
83
-
84
- #aiosp_tabbed .ui-corner-all,
85
- #aiosp_tabbed .ui-corner-bottom,
86
- #aiosp_tabbed .ui-corner-left,
87
- #aiosp_tabbed .ui-corner-bl {
88
- border-bottom-left-radius: 4px
89
- }
90
-
91
- #aiosp_tabbed .ui-corner-all,
92
- #aiosp_tabbed .ui-corner-bottom,
93
- #aiosp_tabbed .ui-corner-right,
94
- #aiosp_tabbed .ui-corner-br {
95
- border-bottom-right-radius: 4px
96
- }
97
-
98
- .aioseop-ui-tooltip.ui-tooltip {
99
- padding: 8px;
100
- position: absolute;
101
- z-index: 9999;
102
- max-width: 300px;
103
- -webkit-box-shadow: 0 0 5px #aaa;
104
- box-shadow: 0 0 5px #aaa
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/aioseop-jquery-ui.min.css DELETED
@@ -1 +0,0 @@
1
- #aiosp_tabbed .ui-helper-clearfix:after,#aiosp_tabbed .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#aiosp_tabbed .ui-helper-clearfix:after{clear:both}#aiosp_tabbed .ui-tabs{position:relative;padding:.2em}#aiosp_tabbed .ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}#aiosp_tabbed .ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}#aiosp_tabbed .ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}#aiosp_tabbed .ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}#aiosp_tabbed .ui-state-default,#aiosp_tabbed .ui-widget-content .ui-state-default,#aiosp_tabbed .ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}#aiosp_tabbed .ui-state-active,#aiosp_tabbed .ui-widget-content .ui-state-active,#aiosp_tabbed .ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}#aiosp_tabbed .ui-corner-all,#aiosp_tabbed .ui-corner-left,#aiosp_tabbed .ui-corner-tl,#aiosp_tabbed .ui-corner-top{border-top-left-radius:4px}#aiosp_tabbed .ui-corner-all,#aiosp_tabbed .ui-corner-right,#aiosp_tabbed .ui-corner-top,#aiosp_tabbed .ui-corner-tr{border-top-right-radius:4px}#aiosp_tabbed .ui-corner-all,#aiosp_tabbed .ui-corner-bl,#aiosp_tabbed .ui-corner-bottom,#aiosp_tabbed .ui-corner-left{border-bottom-left-radius:4px}#aiosp_tabbed .ui-corner-all,#aiosp_tabbed .ui-corner-bottom,#aiosp_tabbed .ui-corner-br,#aiosp_tabbed .ui-corner-right{border-bottom-right-radius:4px}.aioseop-ui-tooltip.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}
 
css/aioseop-welcome-rtl.css DELETED
@@ -1,6 +0,0 @@
1
- .aioseop-welcome-logo {
2
- float: left;
3
- margin-left: 200px;
4
- margin-right: 0px;
5
- padding: 0px 20px 0px 20px;
6
- }
 
 
 
 
 
 
css/aioseop-welcome-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- .aioseop-welcome-logo{float:left;margin-left:200px;margin-right:0;padding:0 20px 0 20px}
 
css/aioseop-welcome.css DELETED
@@ -1,132 +0,0 @@
1
- h2.nav-tab-wrapper {
2
- margin:22px 0 0 0;
3
- }
4
-
5
- #sections {
6
- padding:22px;
7
- background: #fff;
8
- border:1px solid #ccc;
9
- border-top:0px;
10
- }
11
-
12
- section {
13
- display:none;
14
- }
15
-
16
- section:first-child {
17
- display:block;
18
- }
19
-
20
-
21
- .no-js h2.nav-tab-wrapper {
22
- display:none;
23
- }
24
-
25
- .no-js #sections {
26
- border-top:1px solid #ccc;
27
- margin-top:22px;
28
- }
29
-
30
- .no-js section {
31
- border-top: 1px dashed #aaa;
32
- margin-top:22px;
33
- padding-top:22px;
34
- }
35
-
36
- .no-js section:first-child {
37
- margin:0px;
38
- padding:0px;
39
- border:0px;
40
- }
41
-
42
- .nav-tab-active {
43
- background-color:white;
44
- }
45
-
46
-
47
-
48
- /* Welcome Panel */
49
-
50
- .welcome-panel-close {
51
- display: none;
52
- }
53
- .welcome-panel-close {
54
- z-index: 2;
55
- }
56
-
57
- .welcome-panel {
58
- overflow-x: hidden;
59
- }
60
-
61
- .welcome-panel > p {
62
- margin-left: 15px;
63
- }
64
-
65
- .welcome-panel-content {
66
- display: inline-block;
67
- }
68
-
69
- .welcome-panel-column {
70
- width: 30% !important;
71
- margin-right: 3%;
72
- display: inline-block;
73
- vertical-align: top;
74
- }
75
-
76
- .welcome-panel-column:last-child {
77
- margin-right: 0;
78
- }
79
-
80
- .welcome-panel-column p.aioseop-message {
81
- width: 70%;
82
- display: inline-block;
83
- vertical-align: top;
84
- }
85
-
86
- .welcome-panel-column p.call-to-action {
87
- display: inline-block;
88
- width: 25%;
89
- vertical-align: top;
90
- margin-left: 3%;
91
- margin-top: 13px;
92
- }
93
-
94
- .welcome-panel-column p.call-to-action .button-orange {
95
- background: #d54e21;
96
- border-color: #aa3e1a;
97
- -webkit-box-shadow: 0 1px 0 #aa3e1a;
98
- box-shadow: 0 1px 0 #aa3e1a;
99
- color: #fff;
100
- text-decoration: none;
101
- text-shadow: 0 -1px 1px #d54e21,1px 0 1px #d54e21,0 1px 1px #d54e21,-1px 0 1px #d54e21;
102
- }
103
-
104
- .welcome-panel-column ul {
105
- margin-left: 20px;
106
- }
107
-
108
- #wp-people-group-rockstars li {
109
- margin-bottom: 1.33em;
110
- }
111
-
112
- #wp-people-group-rockstars li.wp-person {
113
- margin-bottom: 0;
114
- }
115
-
116
- @media screen and (max-width: 850px) {
117
- .welcome-panel-column {
118
- width: 100%;
119
- margin-right: 0;
120
- display: block;
121
- }
122
- }
123
-
124
- .aioseop-welcome-logo {
125
- float: right;
126
- margin-right:200px;
127
- padding: 0 20px 20px 20px;
128
- }
129
-
130
- .rtl h1 {
131
- font-weight: normal;
132
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/aioseop-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}}.aioseop-welcome-logo{float:right;margin-right:200px;padding:0 20px 20px 20px}.rtl h1{font-weight:400}
 
css/aiosp_admin.css CHANGED
@@ -32,7 +32,7 @@ li#wp-admin-bar-aioseop-pro-upgrade a.ab-item {
32
 
33
  #aio-pro-update{
34
  font-weight: 900;
35
- color: #CC4B1F !important;
36
  font-size: 110%;
37
  }
38
 
32
 
33
  #aio-pro-update{
34
  font-weight: 900;
35
+ color: #d54e21 !important;
36
  font-size: 110%;
37
  }
38
 
css/aiosp_admin.min.css DELETED
@@ -1 +0,0 @@
1
- #aioseop_settings_header #message{padding:5px 0 5px 50px;background-image:url(../images/update32.png);background-repeat:no-repeat;background-position:10px;font-size:14px;min-height:32px;clear:none}@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){#aioseop_settings_header #message{background-image:url(../images/update64.png)!important;-webkit-background-size:32px 32px!important;-moz-background-size:32px 32px!important;background-size:32px 32px!important}}.proupgrade a{font-weight:900;color:#d54e21;font-size:105%}li#wp-admin-bar-aioseop-pro-upgrade a.ab-item{font-weight:900;color:#d54e21!important;font-size:110%}#aio-pro-update{font-weight:900;color:#d54e21!important;font-size:110%}.upgrade_menu_link{font-weight:900;color:#d54e21;font-size:105%}label[for=aioseop_edit_profile_header]{font-size:1.3em}#aioseop_edit_profile_header{display:none}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip{font-family:'Open Sans',sans-serif;-webkit-box-shadow:0 1px 6px -2px #0073aa;box-shadow:0 1px 6px -2px #0073aa;border:0;border-radius:0;background:#fefefe}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip a{color:#0073aa;text-decoration:none}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip dt{font-weight:700}
 
css/modules/aioseop_module-rtl.css CHANGED
@@ -208,10 +208,6 @@ div.aioseop_feature {
208
  float: left !important;
209
  }
210
 
211
- .postbox-container div#aiosp_upgrade_wrapper {
212
- float: right;
213
- }
214
-
215
  #aiosp_settings_form .aioseop_no_label,
216
  .aioseop_no_label {
217
  float: right;
@@ -261,6 +257,11 @@ div.aioseop_notice a.aioseop_dismiss_link {
261
  margin-right: 5px
262
  }
263
 
 
 
 
 
 
264
  form#aiosp_settings_form,
265
  .aioseop_tabs_div {
266
  padding-right: 0;
208
  float: left !important;
209
  }
210
 
 
 
 
 
211
  #aiosp_settings_form .aioseop_no_label,
212
  .aioseop_no_label {
213
  float: right;
257
  margin-right: 5px
258
  }
259
 
260
+ .aioseop_tab {
261
+ padding-left: 0;
262
+ padding-right: 5px
263
+ }
264
+
265
  form#aiosp_settings_form,
266
  .aioseop_tabs_div {
267
  padding-right: 0;
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}
 
css/modules/aioseop_module.css CHANGED
@@ -7,10 +7,6 @@
7
  * @package All-in-One-SEO-Pack.
8
  */
9
 
10
- [class*="all-in-one-seo-pack"] #wpbody-content,
11
- .all-in-one-seo_page_aiosp_opengraph #wpbody-content {
12
- min-width: 900px;
13
- }
14
  .form-table.aioseop {
15
  clear: none;
16
  }
@@ -87,12 +83,8 @@
87
 
88
  .aioseop_tabs .aioseop_meta_box_help,
89
  .aioseop_tabs .aioseop_meta_box_help:active {
90
- margin-top: 10px;
91
- }
92
-
93
- .aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help,
94
- .aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help:active {
95
- margin-bottom: 20px;
96
  }
97
 
98
  .aioseop_label {
@@ -200,6 +192,7 @@
200
  "Helvetica Neue Light",
201
  "Helvetica Neue",
202
  sans-serif;
 
203
  width: 100%;
204
  margin: 8px 0 0 0;
205
  }
@@ -207,13 +200,12 @@
207
  .aioseop_head_nav_tab {
208
  padding: 10px 15px 10px 15px;
209
  margin: 0 0 0 15px;
210
- background-color: #fff;
211
  border-radius: 4px 4px 0 0;
212
  border: 1px solid #CCC;
213
  border-bottom: 0 white;
214
  float: left;
 
215
  color: black;
216
- font-weight: bold;
217
  text-shadow: white 0 1px 0;
218
  text-decoration: none;
219
  }
@@ -960,10 +952,13 @@ table.aioseop_table td {
960
 
961
  #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
962
  #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
963
- width: auto;
964
- max-width: 50%;
 
 
 
 
965
  padding-left: 2%;
966
- padding-right: 2%;
967
  }
968
 
969
  table.aioseop_table td,
@@ -1032,18 +1027,8 @@ table.aioseop_table th {
1032
  }
1033
 
1034
  #aiosp_robots_default_metabox table.aioseop_table td {
1035
- width: auto;
1036
- max-width: 50%;
1037
- padding-left: 2%;
1038
- padding-right: 2%;
1039
- }
1040
-
1041
- #aiosp_robots_default_metabox table.aioseop_table td:first-child {
1042
- white-space: nowrap;
1043
- }
1044
-
1045
- .aioseop.aioseop_options.aiosp_robots_settings h3 {
1046
- margin: 1.5em 0.6em 0.3em;
1047
  }
1048
 
1049
  #aiosp_settings_form .aioseop_no_label,
@@ -1275,7 +1260,7 @@ div.aioseop_notice a.aioseop_dismiss_link {
1275
  }
1276
 
1277
  .aioseop_tab.ui-widget-content a.aioseop_help_text_link {
1278
- color: #757575 !important;
1279
  }
1280
 
1281
  .aioseop_tabs.ui-widget {
@@ -1417,7 +1402,6 @@ div.sfwd_debug_error {
1417
  }
1418
 
1419
  .postbox-container .aioseop_input {
1420
- width: 100%;
1421
  margin-bottom: 10px;
1422
  padding: 0;
1423
  }
@@ -1469,8 +1453,8 @@ div#aiosp_snippet_wrapper {
1469
  border: 1px solid #8d96a0;
1470
  clear: both;
1471
  padding: 10px 10px 0;
1472
- width: auto;
1473
- margin: 0 1px 15px;
1474
  }
1475
 
1476
  #aiosp_snippet_wrapper > .aioseop_input:first-child {
@@ -1521,7 +1505,7 @@ div#aioseop_snippet > div > div {
1521
  }
1522
 
1523
  div#aioseop_snippet > div > div > cite {
1524
- color: #00852B;
1525
  font-style: normal;
1526
  }
1527
 
@@ -1603,8 +1587,3 @@ div#aiosp_sitemap_status_metabox .toggle-indicator {
1603
  #aiosp_file_editor_htaccess_metabox {
1604
  margin: 0 !important;
1605
  }
1606
-
1607
- .aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value] {
1608
- background-color: #0E7BBE;
1609
- background-image: none;
1610
- }
7
  * @package All-in-One-SEO-Pack.
8
  */
9
 
 
 
 
 
10
  .form-table.aioseop {
11
  clear: none;
12
  }
83
 
84
  .aioseop_tabs .aioseop_meta_box_help,
85
  .aioseop_tabs .aioseop_meta_box_help:active {
86
+ margin-top: 4px;
87
+ margin-right: 45px;
 
 
 
 
88
  }
89
 
90
  .aioseop_label {
192
  "Helvetica Neue Light",
193
  "Helvetica Neue",
194
  sans-serif;
195
+ border-bottom: 1px solid #CCC;
196
  width: 100%;
197
  margin: 8px 0 0 0;
198
  }
200
  .aioseop_head_nav_tab {
201
  padding: 10px 15px 10px 15px;
202
  margin: 0 0 0 15px;
 
203
  border-radius: 4px 4px 0 0;
204
  border: 1px solid #CCC;
205
  border-bottom: 0 white;
206
  float: left;
207
+ opacity: 0.5;
208
  color: black;
 
209
  text-shadow: white 0 1px 0;
210
  text-decoration: none;
211
  }
952
 
953
  #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
954
  #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
955
+ width: 27%;
956
+ padding-left: 5%;
957
+ }
958
+
959
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table td:first-child,
960
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td:first-child {
961
  padding-left: 2%;
 
962
  }
963
 
964
  table.aioseop_table td,
1027
  }
1028
 
1029
  #aiosp_robots_default_metabox table.aioseop_table td {
1030
+ width: 25%;
1031
+ padding-left: 5%;
 
 
 
 
 
 
 
 
 
 
1032
  }
1033
 
1034
  #aiosp_settings_form .aioseop_no_label,
1260
  }
1261
 
1262
  .aioseop_tab.ui-widget-content a.aioseop_help_text_link {
1263
+ color: #888 !important;
1264
  }
1265
 
1266
  .aioseop_tabs.ui-widget {
1402
  }
1403
 
1404
  .postbox-container .aioseop_input {
 
1405
  margin-bottom: 10px;
1406
  padding: 0;
1407
  }
1453
  border: 1px solid #8d96a0;
1454
  clear: both;
1455
  padding: 10px 10px 0;
1456
+ max-width: 97%;
1457
+ margin-bottom: 15px;
1458
  }
1459
 
1460
  #aiosp_snippet_wrapper > .aioseop_input:first-child {
1505
  }
1506
 
1507
  div#aioseop_snippet > div > div > cite {
1508
+ color: #093;
1509
  font-style: normal;
1510
  }
1511
 
1587
  #aiosp_file_editor_htaccess_metabox {
1588
  margin: 0 !important;
1589
  }
 
 
 
 
 
css/modules/aioseop_module.min.css DELETED
@@ -1 +0,0 @@
1
- .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;border-bottom:1px solid #ccc;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;opacity:.5;color:#000;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:27%;padding-left:5%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td:first-child,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td:first-child{padding-left: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:25%;padding-left:5%}.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:#888!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:#093;font-style:normal}div#aioseop_snippet>div>span{margin:0;padding:0;border:0}.aioseop_count_good{color:#515151!important;background-color:#eee!important}.aioseop_count_bad{color:#515151!important;background-color:#ff0!important}.aioseop_count_ugly{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}
 
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/aioseop_UTF8.php CHANGED
@@ -1,1330 +1,450 @@
1
  <?php
2
  /**
3
- * AIOSEOP UTF8
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
-
9
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
10
  $UTF8_TABLES = array();
11
 
12
  $UTF8_TABLES['strtolower'] = array(
13
- 'Z' => 'z',
14
- 'Ôºπ' => 'ÔΩô',
15
- 'X' => 'x',
16
- 'W' => 'w',
17
- 'V' => 'v',
18
- 'U' => 'u',
19
- 'T' => 't',
20
- 'S' => 's',
21
- 'R' => 'r',
22
- 'Q' => 'q',
23
- 'P' => 'p',
24
- 'O' => 'o',
25
- 'N' => 'n',
26
- 'M' => 'm',
27
- 'L' => 'l',
28
- 'Ôº´' => 'ÔΩã',
29
- 'J' => 'j',
30
- 'I' => 'i',
31
- 'H' => 'h',
32
- 'G' => 'g',
33
- 'F' => 'f',
34
- 'E' => 'e',
35
- 'D' => 'd',
36
- 'C' => 'c',
37
- 'B' => 'b',
38
- 'Ôº°' => 'ÔΩÅ',
39
- 'Å' => 'å',
40
- '‚Ñ™' => 'k',
41
- 'Ω' => 'ω',
42
- '·øª' => '·ΩΩ',
43
- '·ø∫' => '·Ωº',
44
- '·øπ' => '·Ωπ',
45
- '·ø∏' => '·Ω∏',
46
- '·ø¨' => '·ø•',
47
- '·ø´' => '·Ωª',
48
- '·ø™' => '·Ω∫',
49
- '·ø©' => '·ø°',
50
- '·ø®' => '·ø ',
51
- '·øõ' => '·Ω∑',
52
- '·øö' => '·Ω∂',
53
- '·øô' => '·øë',
54
- '·øò' => '·øê',
55
- '·øã' => '·Ωµ',
56
- '·øä' => '·Ω¥',
57
- '·øâ' => '·Ω≥',
58
- '·øà' => '·Ω≤',
59
- 'Ά' => 'ά',
60
- '·æ∫' => '·Ω∞',
61
- '·æπ' => '·æ±',
62
- '·æ∏' => '·æ∞',
63
- '·ΩØ' => '·Ωß',
64
- '·ΩÆ' => '·Ω¶',
65
- '·Ω≠' => '·Ω•',
66
- '·Ω¨' => '·Ω§',
67
- '·Ω´' => '·Ω£',
68
- '·Ω™' => '·Ω¢',
69
- '·Ω©' => '·Ω°',
70
- '·Ω®' => '·Ω ',
71
- '·Ωü' => '·Ωó',
72
- '·Ωù' => '·Ωï',
73
- '·Ωõ' => '·Ωì',
74
- '·Ωô' => '·Ωë',
75
- '·Ωç' => '·ΩÖ',
76
- '·Ωå' => '·ΩÑ',
77
- '·Ωã' => '·ΩÉ',
78
- '·Ωä' => '·ΩÇ',
79
- '·Ωâ' => '·ΩÅ',
80
- '·Ωà' => '·ΩÄ',
81
- 'Ἷ' => 'ἷ',
82
- 'Ἶ' => 'ἶ',
83
- 'Ἵ' => 'ἵ',
84
- 'Ἴ' => 'ἴ',
85
- 'Ἳ' => 'ἳ',
86
- 'Ἲ' => 'ἲ',
87
- 'Ἱ' => 'ἱ',
88
- 'Ἰ' => 'ἰ',
89
- 'Ἧ' => 'ἧ',
90
- 'Ἦ' => 'ἦ',
91
- 'Ἥ' => 'ἥ',
92
- 'Ἤ' => 'ἤ',
93
- 'Ἣ' => 'ἣ',
94
- 'Ἢ' => 'ἢ',
95
- 'Ἡ' => 'ἡ',
96
- '·º®' => '·º ',
97
- 'Ἕ' => 'ἕ',
98
- 'Ἔ' => 'ἔ',
99
- 'Ἓ' => 'ἓ',
100
- 'Ἒ' => 'ἒ',
101
- 'Ἑ' => 'ἑ',
102
- 'Ἐ' => 'ἐ',
103
- 'Ἇ' => 'ἇ',
104
- 'Ἆ' => 'ἆ',
105
- 'Ἅ' => 'ἅ',
106
- 'Ἄ' => 'ἄ',
107
- 'Ἃ' => 'ἃ',
108
- 'Ἂ' => 'ἂ',
109
- 'Ἁ' => 'ἁ',
110
- 'Ἀ' => 'ἀ',
111
- 'Ỹ' => 'ỹ',
112
- 'Ỷ' => 'ỷ',
113
- 'Ỵ' => 'ỵ',
114
- 'Ỳ' => 'ỳ',
115
- 'Ự' => 'ự',
116
- 'Ữ' => 'ữ',
117
- 'Ử' => 'ử',
118
- 'Ừ' => 'ừ',
119
- 'Ứ' => 'ứ',
120
- 'Ủ' => 'ủ',
121
- 'Ụ' => 'ụ',
122
- 'Ợ' => 'ợ',
123
- '·ª ' => '·ª°',
124
- 'Ở' => 'ở',
125
- '·ªú' => '·ªù',
126
- '·ªö' => '·ªõ',
127
- '·ªò' => '·ªô',
128
- 'Ỗ' => 'ỗ',
129
- 'Ổ' => 'ổ',
130
- 'Ồ' => 'ồ',
131
- 'Ố' => 'ố',
132
- 'Ỏ' => 'ỏ',
133
- 'Ọ' => 'ọ',
134
- 'Ị' => 'ị',
135
- 'Ỉ' => 'ỉ',
136
- 'Ệ' => 'ệ',
137
- 'Ễ' => 'ễ',
138
- 'Ể' => 'ể',
139
- 'Ề' => 'ề',
140
- 'Ế' => 'ế',
141
- 'Ẽ' => 'ẽ',
142
- 'Ẻ' => 'ẻ',
143
- '·∫∏' => '·∫π',
144
- '·∫∂' => '·∫∑',
145
- '·∫¥' => '·∫µ',
146
- '·∫≤' => '·∫≥',
147
- '·∫∞' => '·∫±',
148
- 'Ắ' => 'ắ',
149
- 'Ậ' => 'ậ',
150
- '·∫™' => '·∫´',
151
- 'Ẩ' => 'ẩ',
152
- 'Ầ' => 'ầ',
153
- 'Ấ' => 'ấ',
154
- '·∫¢' => '·∫£',
155
- '·∫ ' => '·∫°',
156
- 'Ẕ' => 'ẕ',
157
- 'Ẓ' => 'ẓ',
158
- 'Ẑ' => 'ẑ',
159
- 'Ẏ' => 'ẏ',
160
- 'Ẍ' => 'ẍ',
161
- 'Ẋ' => 'ẋ',
162
- 'Ẉ' => 'ẉ',
163
- 'Ẇ' => 'ẇ',
164
- 'Ẅ' => 'ẅ',
165
- 'Ẃ' => 'ẃ',
166
- 'Ẁ' => 'ẁ',
167
- '·πæ' => '·πø',
168
- '·πº' => '·πΩ',
169
- '·π∫' => '·πª',
170
- '·π∏' => '·ππ',
171
- '·π∂' => '·π∑',
172
- '·π¥' => '·πµ',
173
- '·π≤' => '·π≥',
174
- '·π∞' => '·π±',
175
- 'Ṯ' => 'ṯ',
176
- '·π¨' => '·π≠',
177
- '·π™' => '·π´',
178
- '·π®' => '·π©',
179
- '·π¶' => '·πß',
180
- '·π§' => '·π•',
181
- '·π¢' => '·π£',
182
- '·π ' => '·π°',
183
- '·πû' => '·πü',
184
- '·πú' => '·πù',
185
- '·πö' => '·πõ',
186
- '·πò' => '·πô',
187
- '·πñ' => '·πó',
188
- '·πî' => '·πï',
189
- '·πí' => '·πì',
190
- '·πê' => '·πë',
191
- '·πé' => '·πè',
192
- '·πå' => '·πç',
193
- '·πä' => '·πã',
194
- '·πà' => '·πâ',
195
- 'Ṇ' => 'ṇ',
196
- 'Ṅ' => 'ṅ',
197
- 'Ṃ' => 'ṃ',
198
- 'Ṁ' => 'ṁ',
199
- 'Ḿ' => 'ḿ',
200
- 'Ḽ' => 'ḽ',
201
- 'Ḻ' => 'ḻ',
202
- '·∏∏' => '·∏π',
203
- '·∏∂' => '·∏∑',
204
- '·∏¥' => '·∏µ',
205
- '·∏≤' => '·∏≥',
206
- '·∏∞' => '·∏±',
207
- 'Ḯ' => 'ḯ',
208
- 'Ḭ' => 'ḭ',
209
- '·∏™' => '·∏´',
210
- 'Ḩ' => 'ḩ',
211
- 'Ḧ' => 'ḧ',
212
- 'Ḥ' => 'ḥ',
213
- '·∏¢' => '·∏£',
214
- '·∏ ' => '·∏°',
215
- 'Ḟ' => 'ḟ',
216
- '·∏ú' => '·∏ù',
217
- '·∏ö' => '·∏õ',
218
- '·∏ò' => '·∏ô',
219
- 'Ḗ' => 'ḗ',
220
- 'Ḕ' => 'ḕ',
221
- 'Ḓ' => 'ḓ',
222
- 'Ḑ' => 'ḑ',
223
- 'Ḏ' => 'ḏ',
224
- 'Ḍ' => 'ḍ',
225
- 'Ḋ' => 'ḋ',
226
- 'Ḉ' => 'ḉ',
227
- 'Ḇ' => 'ḇ',
228
- 'Ḅ' => 'ḅ',
229
- 'Ḃ' => 'ḃ',
230
- 'Ḁ' => 'ḁ',
231
- 'Ֆ' => 'ֆ',
232
- '’ï' => '÷Ö',
233
- 'Ք' => 'ք',
234
- 'Փ' => 'փ',
235
- 'Ւ' => 'ւ',
236
- 'Ց' => 'ց',
237
- 'Ր' => 'ր',
238
- '’è' => '’ø',
239
- '’é' => '’æ',
240
- '’ç' => '’Ω',
241
- '’å' => '’º',
242
- '’ã' => '’ª',
243
- '’ä' => '’∫',
244
- '’â' => '’π',
245
- '’à' => '’∏',
246
- '’á' => '’∑',
247
- '’Ü' => '’∂',
248
- '’Ö' => '’µ',
249
- '’Ñ' => '’¥',
250
- '’É' => '’≥',
251
- '’Ç' => '’≤',
252
- '’Å' => '’±',
253
- '’Ä' => '’∞',
254
- '‘ø' => '’Ø',
255
- '‘æ' => '’Æ',
256
- '‘Ω' => '’≠',
257
- 'Լ' => 'լ',
258
- 'Ի' => 'ի',
259
- '‘∫' => '’™',
260
- '‘π' => '’©',
261
- '‘∏' => '’®',
262
- '‘∑' => '’ß',
263
- '‘∂' => '’¶',
264
- '‘µ' => '’•',
265
- '‘¥' => '’§',
266
- '‘≥' => '’£',
267
- '‘≤' => '’¢',
268
- '‘±' => '’°',
269
- '‘é' => '‘è',
270
- '‘å' => '‘ç',
271
- '‘ä' => '‘ã',
272
- '‘à' => '‘â',
273
- '‘Ü' => '‘á',
274
- '‘Ñ' => '‘Ö',
275
- '‘Ç' => '‘É',
276
- '‘Ä' => '‘Å',
277
- '”∏' => '”π',
278
- 'Ӵ' => 'ӵ',
279
- '”≤' => '”≥',
280
- '”∞' => '”±',
281
- 'Ӯ' => 'ӯ',
282
- 'Ӭ' => 'ӭ',
283
- '”™' => '”´',
284
- '”®' => '”©',
285
- 'Ӧ' => 'ӧ',
286
- 'Ӥ' => 'ӥ',
287
- 'Ӣ' => 'ӣ',
288
- '” ' => '”°',
289
- 'Ӟ' => 'ӟ',
290
- '”ú' => '”ù',
291
- '”ö' => '”õ',
292
- '”ò' => '”ô',
293
- 'Ӗ' => 'ӗ',
294
- 'Ӕ' => 'ӕ',
295
- 'Ӓ' => 'ӓ',
296
- 'Ӑ' => 'ӑ',
297
- 'Ӎ' => 'ӎ',
298
- 'Ӌ' => 'ӌ',
299
- 'Ӊ' => 'ӊ',
300
- 'Ӈ' => 'ӈ',
301
- 'Ӆ' => 'ӆ',
302
- 'Ӄ' => 'ӄ',
303
- 'Ӂ' => 'ӂ',
304
- '“æ' => '“ø',
305
- 'Ҽ' => 'ҽ',
306
- 'Һ' => 'һ',
307
- '“∏' => '“π',
308
- '“∂' => '“∑',
309
- '“¥' => '“µ',
310
- '“≤' => '“≥',
311
- '“∞' => '“±',
312
- '“Æ' => '“Ø',
313
- 'Ҭ' => 'ҭ',
314
- '“™' => '“´',
315
- '“®' => '“©',
316
- 'Ҧ' => 'ҧ',
317
- 'Ҥ' => 'ҥ',
318
- '“¢' => '“£',
319
- '“ ' => '“°',
320
- '“û' => '“ü',
321
- '“ú' => '“ù',
322
- '“ö' => '“õ',
323
- '“ò' => '“ô',
324
- '“ñ' => '“ó',
325
- '“î' => '“ï',
326
- '“í' => '“ì',
327
- '“ê' => '“ë',
328
- '“é' => '“è',
329
- '“å' => '“ç',
330
- '“ä' => '“ã',
331
- '“Ä' => '“Å',
332
- '—æ' => '—ø',
333
- '—º' => '—Ω',
334
- '—∫' => '—ª',
335
- '—∏' => '—π',
336
- '—∂' => '—∑',
337
- '—¥' => '—µ',
338
- '—≤' => '—≥',
339
- '—∞' => '—±',
340
- '—Æ' => '—Ø',
341
- '—¨' => '—≠',
342
- '—™' => '—´',
343
- '—®' => '—©',
344
- '—¶' => '—ß',
345
- '—§' => '—•',
346
- '—¢' => '—£',
347
- '— ' => '—°',
348
- '–Ø' => '—è',
349
- '–Æ' => '—é',
350
- '–≠' => '—ç',
351
- '–¨' => '—å',
352
- '–´' => '—ã',
353
- '–™' => '—ä',
354
- '–©' => '—â',
355
- '–®' => '—à',
356
- '–ß' => '—á',
357
- '–¶' => '—Ü',
358
- '–•' => '—Ö',
359
- '–§' => '—Ñ',
360
- '–£' => '—É',
361
- '–¢' => '—Ç',
362
- '–°' => '—Å',
363
- '– ' => '—Ä',
364
- '–ü' => '–ø',
365
- '–û' => '–æ',
366
- '–ù' => '–Ω',
367
- '–ú' => '–º',
368
- '–õ' => '–ª',
369
- '–ö' => '–∫',
370
- '–ô' => '–π',
371
- '–ò' => '–∏',
372
- '–ó' => '–∑',
373
- '–ñ' => '–∂',
374
- '–ï' => '–µ',
375
- '–î' => '–¥',
376
- '–ì' => '–≥',
377
- '–í' => '–≤',
378
- '–ë' => '–±',
379
- '–ê' => '–∞',
380
- '–è' => '—ü',
381
- '–é' => '—û',
382
- '–ç' => '—ù',
383
- '–å' => '—ú',
384
- '–ã' => '—õ',
385
- '–ä' => '—ö',
386
- '–â' => '—ô',
387
- '–à' => '—ò',
388
- '–á' => '—ó',
389
- '–Ü' => '—ñ',
390
- '–Ö' => '—ï',
391
- '–Ñ' => '—î',
392
- '–É' => '—ì',
393
- '–Ç' => '—í',
394
- '–Å' => '—ë',
395
- '–Ä' => '—ê',
396
- 'ϴ' => 'θ',
397
- 'Ϯ' => 'ϯ',
398
- 'Ϭ' => 'ϭ',
399
- 'Ϫ' => 'ϫ',
400
- 'Ϩ' => 'ϩ',
401
- 'Ϧ' => 'ϧ',
402
- 'Ϥ' => 'ϥ',
403
- 'Ϣ' => 'ϣ',
404
- 'œ ' => 'œ°',
405
- 'Ϟ' => 'ϟ',
406
- 'Ϝ' => 'ϝ',
407
- 'Ϛ' => 'ϛ',
408
- 'Ϙ' => 'ϙ',
409
- 'Ϋ' => 'ϋ',
410
- 'Ϊ' => 'ϊ',
411
- 'Ω' => 'ω',
412
- 'Ψ' => 'ψ',
413
- 'Χ' => 'χ',
414
- 'Φ' => 'φ',
415
- 'Υ' => 'υ',
416
- 'Τ' => 'τ',
417
- 'Σ' => 'σ',
418
- 'Ρ' => 'ρ',
419
- 'Œ ' => 'œÄ',
420
- 'Ο' => 'ο',
421
- 'Ξ' => 'ξ',
422
- 'Ν' => 'ν',
423
- 'Μ' => 'μ',
424
- 'Λ' => 'λ',
425
- 'Κ' => 'κ',
426
- 'Ι' => 'ι',
427
- 'Θ' => 'θ',
428
- 'Η' => 'η',
429
- 'Ζ' => 'ζ',
430
- 'Ε' => 'ε',
431
- 'Δ' => 'δ',
432
- 'Γ' => 'γ',
433
- 'Β' => 'β',
434
- 'Α' => 'α',
435
- 'Ώ' => 'ώ',
436
- 'Ύ' => 'ύ',
437
- 'Å’Ã¥' => 'Å“Ã¥',
438
- 'Ί' => 'ί',
439
- 'Ή' => 'ή',
440
- 'Έ' => 'έ',
441
- 'Ά' => 'ά',
442
- '»≤' => '»≥',
443
- '»∞' => '»±',
444
- 'Ȯ' => 'ȯ',
445
- 'Ȭ' => 'ȭ',
446
- '»™' => '»´',
447
- '»®' => '»©',
448
- 'Ȧ' => 'ȧ',
449
- 'Ȥ' => 'ȥ',
450
- 'Ȣ' => 'ȣ',
451
- '» ' => '∆û',
452
- 'Ȟ' => 'ȟ',
453
- '»ú' => '»ù',
454
- '»ö' => '»õ',
455
- '»ò' => '»ô',
456
- 'Ȗ' => 'ȗ',
457
- 'Ȕ' => 'ȕ',
458
- 'Ȓ' => 'ȓ',
459
- 'Ȑ' => 'ȑ',
460
- 'Ȏ' => 'ȏ',
461
- 'Ȍ' => 'ȍ',
462
- 'Ȋ' => 'ȋ',
463
- 'Ȉ' => 'ȉ',
464
- 'Ȇ' => 'ȇ',
465
- 'Ȅ' => 'ȅ',
466
- 'Ȃ' => 'ȃ',
467
- 'Ȁ' => 'ȁ',
468
- '«æ' => '«ø',
469
- 'Ǽ' => 'ǽ',
470
- 'Ǻ' => 'ǻ',
471
- '«∏' => '«π',
472
- '«∑' => '∆ø',
473
- 'Ƕ' => 'ƕ',
474
- '«¥' => '«µ',
475
- '«±' => '«≥',
476
- '«Æ' => '«Ø',
477
- 'Ǭ' => 'ǭ',
478
- '«™' => '«´',
479
- '«®' => '«©',
480
- 'Ǧ' => 'ǧ',
481
- 'Ǥ' => 'ǥ',
482
- '«¢' => '«£',
483
- '« ' => '«°',
484
- '«û' => '«ü',
485
- '«õ' => '«ú',
486
- '«ô' => '«ö',
487
- '«ó' => '«ò',
488
- '«ï' => '«ñ',
489
- '«ì' => '«î',
490
- '«ë' => '«í',
491
- '«è' => '«ê',
492
- '«ç' => '«é',
493
- '«ä' => '«å',
494
- '«á' => '«â',
495
- '«Ñ' => '«Ü',
496
- 'Ƽ' => 'ƽ',
497
- '∆∏' => '∆π',
498
- '∆∑' => ' í',
499
- '∆µ' => '∆∂',
500
- '∆≥' => '∆¥',
501
- '∆≤' => ' ã',
502
- '∆±' => ' ä',
503
- 'Ư' => 'ư',
504
- 'Ʈ' => 'ʈ',
505
- 'Ƭ' => 'ƭ',
506
- 'Ʃ' => 'ʃ',
507
- 'Ƨ' => 'ƨ',
508
- 'Ʀ' => 'ʀ',
509
- 'Ƥ' => 'ƥ',
510
- '∆¢' => '∆£',
511
- '∆ ' => '∆°',
512
- 'Ɵ' => 'ɵ',
513
- '∆ù' => '…≤',
514
- '∆ú' => '…Ø',
515
- '∆ò' => '∆ô',
516
- '∆ó' => '…®',
517
- 'Ɩ' => 'ɩ',
518
- 'Ɣ' => 'ɣ',
519
- '∆ì' => '… ',
520
- 'Ƒ' => 'ƒ',
521
- 'Ɛ' => 'ɛ',
522
- 'Ə' => 'ə',
523
- 'Ǝ' => 'ǝ',
524
- 'Ƌ' => 'ƌ',
525
- 'Ɗ' => 'ɗ',
526
- 'Ɖ' => 'ɖ',
527
- 'Ƈ' => 'ƈ',
528
- 'Ɔ' => 'ɔ',
529
- 'Ƅ' => 'ƅ',
530
- 'Ƃ' => 'ƃ',
531
- 'Ɓ' => 'ɓ',
532
- 'Ž' => 'ž',
533
- 'Ż' => 'ż',
534
- '≈π' => '≈∫',
535
- 'Ÿ' => 'ÿ',
536
- '≈∂' => '≈∑',
537
- '≈¥' => '≈µ',
538
- '≈≤' => '≈≥',
539
- '≈∞' => '≈±',
540
- 'Ů' => 'ů',
541
- 'Ŭ' => 'ŭ',
542
- '≈™' => '≈´',
543
- 'Ũ' => 'ũ',
544
- 'Ŧ' => 'ŧ',
545
- 'Ť' => 'ť',
546
- 'Ţ' => 'ţ',
547
- '≈ ' => '≈°',
548
- 'Ş' => 'ş',
549
- '≈ú' => '≈ù',
550
- '≈ö' => '≈õ',
551
- '≈ò' => '≈ô',
552
- 'Ŗ' => 'ŗ',
553
- 'Ŕ' => 'ŕ',
554
- 'Œ' => 'œ',
555
- 'Ő' => 'ő',
556
- 'Ŏ' => 'ŏ',
557
- 'Ō' => 'ō',
558
- 'Ŋ' => 'ŋ',
559
- 'Ň' => 'ň',
560
- 'Ņ' => 'ņ',
561
- 'Ń' => 'ń',
562
- 'Ł' => 'ł',
563
- 'Ŀ' => 'ŀ',
564
- 'Ľ' => 'ľ',
565
- 'Ļ' => 'ļ',
566
- 'Ĺ' => 'ĺ',
567
- 'Ķ' => 'ķ',
568
- 'Ĵ' => 'ĵ',
569
- 'IJ' => 'ij',
570
- 'İ' => 'i',
571
- 'Į' => 'į',
572
- 'Ĭ' => 'ĭ',
573
- 'Ī' => 'ī',
574
- 'Ĩ' => 'ĩ',
575
- 'Ħ' => 'ħ',
576
- 'Ĥ' => 'ĥ',
577
- 'Ģ' => 'ģ',
578
- 'ƒ ' => 'ƒ°',
579
- 'Ğ' => 'ğ',
580
- 'ƒú' => 'ƒù',
581
- 'ƒö' => 'ƒõ',
582
- 'ƒò' => 'ƒô',
583
- 'Ė' => 'ė',
584
- 'Ĕ' => 'ĕ',
585
- 'Ē' => 'ē',
586
- 'Đ' => 'đ',
587
- 'Ď' => 'ď',
588
- 'Č' => 'č',
589
- 'Ċ' => 'ċ',
590
- 'Ĉ' => 'ĉ',
591
- 'Ć' => 'ć',
592
- 'Ą' => 'ą',
593
- 'Ă' => 'ă',
594
- 'Ā' => 'ā',
595
- 'Þ' => 'þ',
596
- '√ù' => '√Ω',
597
- 'Ü' => 'ü',
598
- 'Û' => 'û',
599
- '√ö' => '√∫',
600
- '√ô' => '√π',
601
- '√ò' => '√∏',
602
- 'Ö' => 'ö',
603
- 'Õ' => 'õ',
604
- 'Ô' => 'ô',
605
- 'Ó' => 'ó',
606
- 'Ò' => 'ò',
607
- 'Ñ' => 'ñ',
608
- 'Ð' => 'ð',
609
- 'Ï' => 'ï',
610
- 'Î' => 'î',
611
- 'Í' => 'í',
612
- 'Ì' => 'ì',
613
- 'Ë' => 'ë',
614
- 'Ê' => 'ê',
615
- 'É' => 'é',
616
- 'È' => 'è',
617
- 'Ç' => 'ç',
618
- 'Æ' => 'æ',
619
- 'Å' => 'å',
620
- 'Ä' => 'ä',
621
- 'Ã' => 'ã',
622
- 'Â' => 'â',
623
- 'Á' => 'á',
624
- '√Ä' => '√ ',
625
- 'Z' => 'z',
626
- 'Y' => 'y',
627
- 'X' => 'x',
628
- 'W' => 'w',
629
- 'V' => 'v',
630
- 'U' => 'u',
631
- 'T' => 't',
632
- 'S' => 's',
633
- 'R' => 'r',
634
- 'Q' => 'q',
635
- 'P' => 'p',
636
- 'O' => 'o',
637
- 'N' => 'n',
638
- 'M' => 'm',
639
- 'L' => 'l',
640
- 'K' => 'k',
641
- 'J' => 'j',
642
- 'I' => 'i',
643
- 'H' => 'h',
644
- 'G' => 'g',
645
- 'F' => 'f',
646
- 'E' => 'e',
647
- 'D' => 'd',
648
- 'C' => 'c',
649
- 'B' => 'b',
650
- 'A' => 'a',
651
  );
652
 
653
 
654
  $UTF8_TABLES['strtoupper'] = array(
655
- 'z' => 'Z',
656
- 'ÔΩô' => 'Ôºπ',
657
- 'x' => 'X',
658
- 'w' => 'W',
659
- 'v' => 'V',
660
- 'u' => 'U',
661
- 't' => 'T',
662
- 's' => 'S',
663
- 'r' => 'R',
664
- 'q' => 'Q',
665
- 'p' => 'P',
666
- 'o' => 'O',
667
- 'n' => 'N',
668
- 'm' => 'M',
669
- 'l' => 'L',
670
- 'ÔΩã' => 'Ôº´',
671
- 'j' => 'J',
672
- 'i' => 'I',
673
- 'h' => 'H',
674
- 'g' => 'G',
675
- 'f' => 'F',
676
- 'e' => 'E',
677
- 'd' => 'D',
678
- 'c' => 'C',
679
- 'b' => 'B',
680
- 'ÔΩÅ' => 'Ôº°',
681
- '·ø≥' => '·øº',
682
- '·ø•' => '·ø¨',
683
- '·ø°' => '·ø©',
684
- '·ø ' => '·ø®',
685
- '·øë' => '·øô',
686
- '·øê' => '·øò',
687
- '·øÉ' => '·øå',
688
- 'ι' => 'Ι',
689
- 'ᾳ' => 'ᾼ',
690
- '·æ±' => '·æπ',
691
- '·æ∞' => '·æ∏',
692
- 'ᾧ' => 'ᾯ',
693
- 'ᾦ' => 'ᾮ',
694
- '·æ•' => '·æ≠',
695
- 'ᾤ' => 'ᾬ',
696
- 'ᾣ' => 'ᾫ',
697
- 'ᾢ' => 'ᾪ',
698
- '·æ°' => '·æ©',
699
- '·æ ' => '·æ®',
700
- '·æó' => '·æü',
701
- '·æñ' => '·æû',
702
- '·æï' => '·æù',
703
- '·æî' => '·æú',
704
- '·æì' => '·æõ',
705
- '·æí' => '·æö',
706
- '·æë' => '·æô',
707
- '·æê' => '·æò',
708
- '·æá' => '·æè',
709
- 'ᾆ' => 'ᾎ',
710
- '·æÖ' => '·æç',
711
- 'ᾄ' => 'ᾌ',
712
- 'ᾃ' => 'ᾋ',
713
- 'ᾂ' => 'ᾊ',
714
- 'ᾁ' => 'ᾉ',
715
- 'ᾀ' => 'ᾈ',
716
- '·ΩΩ' => '·øª',
717
- '·Ωº' => '·ø∫',
718
- '·Ωª' => '·ø´',
719
- '·Ω∫' => '·ø™',
720
- '·Ωπ' => '·øπ',
721
- '·Ω∏' => '·ø∏',
722
- '·Ω∑' => '·øõ',
723
- '·Ω∂' => '·øö',
724
- '·Ωµ' => '·øã',
725
- '·Ω¥' => '·øä',
726
- '·Ω≥' => '·øâ',
727
- '·Ω≤' => '·øà',
728
- 'ά' => 'Ά',
729
- '·Ω∞' => '·æ∫',
730
- '·Ωß' => '·ΩØ',
731
- '·Ω¶' => '·ΩÆ',
732
- '·Ω•' => '·Ω≠',
733
- '·Ω§' => '·Ω¨',
734
- '·Ω£' => '·Ω´',
735
- '·Ω¢' => '·Ω™',
736
- '·Ω°' => '·Ω©',
737
- '·Ω ' => '·Ω®',
738
- '·Ωó' => '·Ωü',
739
- '·Ωï' => '·Ωù',
740
- '·Ωì' => '·Ωõ',
741
- '·Ωë' => '·Ωô',
742
- '·ΩÖ' => '·Ωç',
743
- '·ΩÑ' => '·Ωå',
744
- '·ΩÉ' => '·Ωã',
745
- '·ΩÇ' => '·Ωä',
746
- '·ΩÅ' => '·Ωâ',
747
- '·ΩÄ' => '·Ωà',
748
- 'ἷ' => 'Ἷ',
749
- 'ἶ' => 'Ἶ',
750
- 'ἵ' => 'Ἵ',
751
- 'ἴ' => 'Ἴ',
752
- 'ἳ' => 'Ἳ',
753
- 'ἲ' => 'Ἲ',
754
- 'ἱ' => 'Ἱ',
755
- 'ἰ' => 'Ἰ',
756
- 'ἧ' => 'Ἧ',
757
- 'ἦ' => 'Ἦ',
758
- 'ἥ' => 'Ἥ',
759
- 'ἤ' => 'Ἤ',
760
- 'ἣ' => 'Ἣ',
761
- 'ἢ' => 'Ἢ',
762
- 'ἡ' => 'Ἡ',
763
- '·º ' => '·º®',
764
- 'ἕ' => 'Ἕ',
765
- 'ἔ' => 'Ἔ',
766
- 'ἓ' => 'Ἓ',
767
- 'ἒ' => 'Ἒ',
768
- 'ἑ' => 'Ἑ',
769
- 'ἐ' => 'Ἐ',
770
- 'ἇ' => 'Ἇ',
771
- 'ἆ' => 'Ἆ',
772
- 'ἅ' => 'Ἅ',
773
- 'ἄ' => 'Ἄ',
774
- 'ἃ' => 'Ἃ',
775
- 'ἂ' => 'Ἂ',
776
- 'ἁ' => 'Ἁ',
777
- 'ἀ' => 'Ἀ',
778
- 'ỹ' => 'Ỹ',
779
- 'ỷ' => 'Ỷ',
780
- 'ỵ' => 'Ỵ',
781
- 'ỳ' => 'Ỳ',
782
- 'ự' => 'Ự',
783
- 'ữ' => 'Ữ',
784
- 'ử' => 'Ử',
785
- 'ừ' => 'Ừ',
786
- 'ứ' => 'Ứ',
787
- 'ủ' => 'Ủ',
788
- 'ụ' => 'Ụ',
789
- 'ợ' => 'Ợ',
790
- '·ª°' => '·ª ',
791
- 'ở' => 'Ở',
792
- '·ªù' => '·ªú',
793
- '·ªõ' => '·ªö',
794
- '·ªô' => '·ªò',
795
- 'ỗ' => 'Ỗ',
796
- 'ổ' => 'Ổ',
797
- 'ồ' => 'Ồ',
798
- 'ố' => 'Ố',
799
- 'ỏ' => 'Ỏ',
800
- 'ọ' => 'Ọ',
801
- 'ị' => 'Ị',
802
- 'ỉ' => 'Ỉ',
803
- 'ệ' => 'Ệ',
804
- 'ễ' => 'Ễ',
805
- 'ể' => 'Ể',
806
- 'ề' => 'Ề',
807
- 'ế' => 'Ế',
808
- 'ẽ' => 'Ẽ',
809
- 'ẻ' => 'Ẻ',
810
- '·∫π' => '·∫∏',
811
- '·∫∑' => '·∫∂',
812
- '·∫µ' => '·∫¥',
813
- '·∫≥' => '·∫≤',
814
- '·∫±' => '·∫∞',
815
- 'ắ' => 'Ắ',
816
- 'ậ' => 'Ậ',
817
- '·∫´' => '·∫™',
818
- 'ẩ' => 'Ẩ',
819
- 'ầ' => 'Ầ',
820
- 'ấ' => 'Ấ',
821
- '·∫£' => '·∫¢',
822
- '·∫°' => '·∫ ',
823
- '·∫õ' => '·π ',
824
- 'ẕ' => 'Ẕ',
825
- 'ẓ' => 'Ẓ',
826
- 'ẑ' => 'Ẑ',
827
- 'ẏ' => 'Ẏ',
828
- 'ẍ' => 'Ẍ',
829
- 'ẋ' => 'Ẋ',
830
- 'ẉ' => 'Ẉ',
831
- 'ẇ' => 'Ẇ',
832
- 'ẅ' => 'Ẅ',
833
- 'ẃ' => 'Ẃ',
834
- 'ẁ' => 'Ẁ',
835
- '·πø' => '·πæ',
836
- '·πΩ' => '·πº',
837
- '·πª' => '·π∫',
838
- '·ππ' => '·π∏',
839
- '·π∑' => '·π∂',
840
- '·πµ' => '·π¥',
841
- '·π≥' => '·π≤',
842
- '·π±' => '·π∞',
843
- 'ṯ' => 'Ṯ',
844
- '·π≠' => '·π¨',
845
- '·π´' => '·π™',
846
- '·π©' => '·π®',
847
- '·πß' => '·π¶',
848
- '·π•' => '·π§',
849
- '·π£' => '·π¢',
850
- '·π°' => '·π ',
851
- '·πü' => '·πû',
852
- '·πù' => '·πú',
853
- '·πõ' => '·πö',
854
- '·πô' => '·πò',
855
- '·πó' => '·πñ',
856
- '·πï' => '·πî',
857
- '·πì' => '·πí',
858
- '·πë' => '·πê',
859
- '·πè' => '·πé',
860
- '·πç' => '·πå',
861
- '·πã' => '·πä',
862
- '·πâ' => '·πà',
863
- 'ṇ' => 'Ṇ',
864
- 'ṅ' => 'Ṅ',
865
- 'ṃ' => 'Ṃ',
866
- 'ṁ' => 'Ṁ',
867
- 'ḿ' => 'Ḿ',
868
- 'ḽ' => 'Ḽ',
869
- 'ḻ' => 'Ḻ',
870
- '·∏π' => '·∏∏',
871
- '·∏∑' => '·∏∂',
872
- '·∏µ' => '·∏¥',
873
- '·∏≥' => '·∏≤',
874
- '·∏±' => '·∏∞',
875
- 'ḯ' => 'Ḯ',
876
- 'ḭ' => 'Ḭ',
877
- '·∏´' => '·∏™',
878
- 'ḩ' => 'Ḩ',
879
- 'ḧ' => 'Ḧ',
880
- 'ḥ' => 'Ḥ',
881
- '·∏£' => '·∏¢',
882
- '·∏°' => '·∏ ',
883
- 'ḟ' => 'Ḟ',
884
- '·∏ù' => '·∏ú',
885
- '·∏õ' => '·∏ö',
886
- '·∏ô' => '·∏ò',
887
- 'ḗ' => 'Ḗ',
888
- 'ḕ' => 'Ḕ',
889
- 'ḓ' => 'Ḓ',
890
- 'ḑ' => 'Ḑ',
891
- 'ḏ' => 'Ḏ',
892
- 'ḍ' => 'Ḍ',
893
- 'ḋ' => 'Ḋ',
894
- 'ḉ' => 'Ḉ',
895
- 'ḇ' => 'Ḇ',
896
- 'ḅ' => 'Ḅ',
897
- 'ḃ' => 'Ḃ',
898
- 'ḁ' => 'Ḁ',
899
- 'ֆ' => 'Ֆ',
900
- '÷Ö' => '’ï',
901
- 'ք' => 'Ք',
902
- 'փ' => 'Փ',
903
- 'ւ' => 'Ւ',
904
- 'ց' => 'Ց',
905
- 'ր' => 'Ր',
906
- '’ø' => '’è',
907
- '’æ' => '’é',
908
- '’Ω' => '’ç',
909
- '’º' => '’å',
910
- '’ª' => '’ã',
911
- '’∫' => '’ä',
912
- '’π' => '’â',
913
- '’∏' => '’à',
914
- '’∑' => '’á',
915
- '’∂' => '’Ü',
916
- '’µ' => '’Ö',
917
- '’¥' => '’Ñ',
918
- '’≥' => '’É',
919
- '’≤' => '’Ç',
920
- '’±' => '’Å',
921
- '’∞' => '’Ä',
922
- '’Ø' => '‘ø',
923
- '’Æ' => '‘æ',
924
- '’≠' => '‘Ω',
925
- 'լ' => 'Լ',
926
- 'ի' => 'Ի',
927
- '’™' => '‘∫',
928
- '’©' => '‘π',
929
- '’®' => '‘∏',
930
- '’ß' => '‘∑',
931
- '’¶' => '‘∂',
932
- '’•' => '‘µ',
933
- '’§' => '‘¥',
934
- '’£' => '‘≥',
935
- '’¢' => '‘≤',
936
- '’°' => '‘±',
937
- '‘è' => '‘é',
938
- '‘ç' => '‘å',
939
- '‘ã' => '‘ä',
940
- '‘â' => '‘à',
941
- '‘á' => '‘Ü',
942
- '‘Ö' => '‘Ñ',
943
- '‘É' => '‘Ç',
944
- '‘Å' => '‘Ä',
945
- '”π' => '”∏',
946
- 'ӵ' => 'Ӵ',
947
- '”≥' => '”≤',
948
- '”±' => '”∞',
949
- 'ӯ' => 'Ӯ',
950
- 'ӭ' => 'Ӭ',
951
- '”´' => '”™',
952
- '”©' => '”®',
953
- 'ӧ' => 'Ӧ',
954
- 'ӥ' => 'Ӥ',
955
- 'ӣ' => 'Ӣ',
956
- '”°' => '” ',
957
- 'ӟ' => 'Ӟ',
958
- '”ù' => '”ú',
959
- '”õ' => '”ö',
960
- '”ô' => '”ò',
961
- 'ӗ' => 'Ӗ',
962
- 'ӕ' => 'Ӕ',
963
- 'ӓ' => 'Ӓ',
964
- 'ӑ' => 'Ӑ',
965
- 'ӎ' => 'Ӎ',
966
- 'ӌ' => 'Ӌ',
967
- 'ӊ' => 'Ӊ',
968
- 'ӈ' => 'Ӈ',
969
- 'ӆ' => 'Ӆ',
970
- 'ӄ' => 'Ӄ',
971
- 'ӂ' => 'Ӂ',
972
- '“ø' => '“æ',
973
- 'ҽ' => 'Ҽ',
974
- 'һ' => 'Һ',
975
- '“π' => '“∏',
976
- '“∑' => '“∂',
977
- '“µ' => '“¥',
978
- '“≥' => '“≤',
979
- '“±' => '“∞',
980
- '“Ø' => '“Æ',
981
- 'ҭ' => 'Ҭ',
982
- '“´' => '“™',
983
- '“©' => '“®',
984
- 'ҧ' => 'Ҧ',
985
- 'ҥ' => 'Ҥ',
986
- '“£' => '“¢',
987
- '“°' => '“ ',
988
- '“ü' => '“û',
989
- '“ù' => '“ú',
990
- '“õ' => '“ö',
991
- '“ô' => '“ò',
992
- '“ó' => '“ñ',
993
- '“ï' => '“î',
994
- '“ì' => '“í',
995
- '“ë' => '“ê',
996
- '“è' => '“é',
997
- '“ç' => '“å',
998
- '“ã' => '“ä',
999
- '“Å' => '“Ä',
1000
- '—ø' => '—æ',
1001
- '—Ω' => '—º',
1002
- '—ª' => '—∫',
1003
- '—π' => '—∏',
1004
- '—∑' => '—∂',
1005
- '—µ' => '—¥',
1006
- '—≥' => '—≤',
1007
- '—±' => '—∞',
1008
- '—Ø' => '—Æ',
1009
- '—≠' => '—¨',
1010
- '—´' => '—™',
1011
- '—©' => '—®',
1012
- '—ß' => '—¶',
1013
- '—•' => '—§',
1014
- '—£' => '—¢',
1015
- '—°' => '— ',
1016
- '—ü' => '–è',
1017
- '—û' => '–é',
1018
- '—ù' => '–ç',
1019
- '—ú' => '–å',
1020
- '—õ' => '–ã',
1021
- '—ö' => '–ä',
1022
- '—ô' => '–â',
1023
- '—ò' => '–à',
1024
- '—ó' => '–á',
1025
- '—ñ' => '–Ü',
1026
- '—ï' => '–Ö',
1027
- '—î' => '–Ñ',
1028
- '—ì' => '–É',
1029
- '—í' => '–Ç',
1030
- '—ë' => '–Å',
1031
- '—ê' => '–Ä',
1032
- '—è' => '–Ø',
1033
- '—é' => '–Æ',
1034
- '—ç' => '–≠',
1035
- '—å' => '–¨',
1036
- '—ã' => '–´',
1037
- '—ä' => '–™',
1038
- '—â' => '–©',
1039
- '—à' => '–®',
1040
- '—á' => '–ß',
1041
- '—Ü' => '–¶',
1042
- '—Ö' => '–•',
1043
- '—Ñ' => '–§',
1044
- '—É' => '–£',
1045
- '—Ç' => '–¢',
1046
- '—Å' => '–°',
1047
- '—Ä' => '– ',
1048
- '–ø' => '–ü',
1049
- '–æ' => '–û',
1050
- '–Ω' => '–ù',
1051
- '–º' => '–ú',
1052
- '–ª' => '–õ',
1053
- '–∫' => '–ö',
1054
- '–π' => '–ô',
1055
- '–∏' => '–ò',
1056
- '–∑' => '–ó',
1057
- '–∂' => '–ñ',
1058
- '–µ' => '–ï',
1059
- '–¥' => '–î',
1060
- '–≥' => '–ì',
1061
- '–≤' => '–í',
1062
- '–±' => '–ë',
1063
- '–∞' => '–ê',
1064
- 'ϵ' => 'Ε',
1065
- 'ϲ' => 'Σ',
1066
- 'ϱ' => 'Ρ',
1067
- 'ϰ' => 'Κ',
1068
- 'ϯ' => 'Ϯ',
1069
- 'ϭ' => 'Ϭ',
1070
- 'ϫ' => 'Ϫ',
1071
- 'ϩ' => 'Ϩ',
1072
- 'ϧ' => 'Ϧ',
1073
- 'ϥ' => 'Ϥ',
1074
- 'ϣ' => 'Ϣ',
1075
- 'œ°' => 'œ ',
1076
- 'ϟ' => 'Ϟ',
1077
- 'ϝ' => 'Ϝ',
1078
- 'ϛ' => 'Ϛ',
1079
- 'ϙ' => 'Ϙ',
1080
- 'œñ' => 'Œ ',
1081
- 'ϕ' => 'Φ',
1082
- 'ϑ' => 'Θ',
1083
- 'ϐ' => 'Β',
1084
- 'ώ' => 'Ώ',
1085
- 'ύ' => 'Ύ',
1086
- 'Å“Ã¥' => 'Å’Ã¥',
1087
- 'ϋ' => 'Ϋ',
1088
- 'ϊ' => 'Ϊ',
1089
- 'ω' => 'Ω',
1090
- 'ψ' => 'Ψ',
1091
- 'χ' => 'Χ',
1092
- 'φ' => 'Φ',
1093
- 'υ' => 'Υ',
1094
- 'τ' => 'Τ',
1095
- 'σ' => 'Σ',
1096
- 'ς' => 'Σ',
1097
- 'ρ' => 'Ρ',
1098
- 'œÄ' => 'Œ ',
1099
- 'ο' => 'Ο',
1100
- 'ξ' => 'Ξ',
1101
- 'ν' => 'Ν',
1102
- 'μ' => 'Μ',
1103
- 'λ' => 'Λ',
1104
- 'κ' => 'Κ',
1105
- 'ι' => 'Ι',
1106
- 'θ' => 'Θ',
1107
- 'η' => 'Η',
1108
- 'ζ' => 'Ζ',
1109
- 'ε' => 'Ε',
1110
- 'δ' => 'Δ',
1111
- 'γ' => 'Γ',
1112
- 'β' => 'Β',
1113
- 'α' => 'Α',
1114
- 'ί' => 'Ί',
1115
- 'ή' => 'Ή',
1116
- 'έ' => 'Έ',
1117
- 'ά' => 'Ά',
1118
- ' í' => '∆∑',
1119
- ' ã' => '∆≤',
1120
- ' ä' => '∆±',
1121
- 'ʈ' => 'Ʈ',
1122
- 'ʃ' => 'Ʃ',
1123
- 'ʀ' => 'Ʀ',
1124
- 'ɵ' => 'Ɵ',
1125
- '…≤' => '∆ù',
1126
- '…Ø' => '∆ú',
1127
- 'ɩ' => 'Ɩ',
1128
- '…®' => '∆ó',
1129
- 'ɣ' => 'Ɣ',
1130
- '… ' => '∆ì',
1131
- 'ɛ' => 'Ɛ',
1132
- 'ə' => 'Ə',
1133
- 'ɗ' => 'Ɗ',
1134
- 'ɖ' => 'Ɖ',
1135
- 'ɔ' => 'Ɔ',
1136
- 'ɓ' => 'Ɓ',
1137
- '»≥' => '»≤',
1138
- '»±' => '»∞',
1139
- 'ȯ' => 'Ȯ',
1140
- 'ȭ' => 'Ȭ',
1141
- '»´' => '»™',
1142
- '»©' => '»®',
1143
- 'ȧ' => 'Ȧ',
1144
- 'ȥ' => 'Ȥ',
1145
- 'ȣ' => 'Ȣ',
1146
- 'ȟ' => 'Ȟ',
1147
- '»ù' => '»ú',
1148
- '»õ' => '»ö',
1149
- '»ô' => '»ò',
1150
- 'ȗ' => 'Ȗ',
1151
- 'ȕ' => 'Ȕ',
1152
- 'ȓ' => 'Ȓ',
1153
- 'ȑ' => 'Ȑ',
1154
- 'ȏ' => 'Ȏ',
1155
- 'ȍ' => 'Ȍ',
1156
- 'ȋ' => 'Ȋ',
1157
- 'ȉ' => 'Ȉ',
1158
- 'ȇ' => 'Ȇ',
1159
- 'ȅ' => 'Ȅ',
1160
- 'ȃ' => 'Ȃ',
1161
- 'ȁ' => 'Ȁ',
1162
- '«ø' => '«æ',
1163
- 'ǽ' => 'Ǽ',
1164
- 'ǻ' => 'Ǻ',
1165
- '«π' => '«∏',
1166
- '«µ' => '«¥',
1167
- '«≥' => '«≤',
1168
- '«Ø' => '«Æ',
1169
- 'ǭ' => 'Ǭ',
1170
- '«´' => '«™',
1171
- '«©' => '«®',
1172
- 'ǧ' => 'Ǧ',
1173
- 'ǥ' => 'Ǥ',
1174
- '«£' => '«¢',
1175
- '«°' => '« ',
1176
- '«ü' => '«û',
1177
- 'ǝ' => 'Ǝ',
1178
- '«ú' => '«õ',
1179
- '«ö' => '«ô',
1180
- '«ò' => '«ó',
1181
- '«ñ' => '«ï',
1182
- '«î' => '«ì',
1183
- '«í' => '«ë',
1184
- '«ê' => '«è',
1185
- '«é' => '«ç',
1186
- '«å' => '«ã',
1187
- '«â' => '«à',
1188
- '«Ü' => '«Ö',
1189
- '∆ø' => '«∑',
1190
- 'ƽ' => 'Ƽ',
1191
- '∆π' => '∆∏',
1192
- '∆∂' => '∆µ',
1193
- '∆¥' => '∆≥',
1194
- 'ư' => 'Ư',
1195
- 'ƭ' => 'Ƭ',
1196
- 'ƨ' => 'Ƨ',
1197
- 'ƥ' => 'Ƥ',
1198
- '∆£' => '∆¢',
1199
- '∆°' => '∆ ',
1200
- '∆û' => '» ',
1201
- '∆ô' => '∆ò',
1202
- 'ƕ' => 'Ƕ',
1203
- 'ƒ' => 'Ƒ',
1204
- 'ƌ' => 'Ƌ',
1205
- 'ƈ' => 'Ƈ',
1206
- 'ƅ' => 'Ƅ',
1207
- 'ƃ' => 'Ƃ',
1208
- '≈ø' => 'S',
1209
- 'ž' => 'Ž',
1210
- 'ż' => 'Ż',
1211
- '≈∫' => '≈π',
1212
- '≈∑' => '≈∂',
1213
- '≈µ' => '≈¥',
1214
- '≈≥' => '≈≤',
1215
- '≈±' => '≈∞',
1216
- 'ů' => 'Ů',
1217
- 'ŭ' => 'Ŭ',
1218
- '≈´' => '≈™',
1219
- 'ũ' => 'Ũ',
1220
- 'ŧ' => 'Ŧ',
1221
- 'ť' => 'Ť',
1222
- 'ţ' => 'Ţ',
1223
- '≈°' => '≈ ',
1224
- 'ş' => 'Ş',
1225
- '≈ù' => '≈ú',
1226
- '≈õ' => '≈ö',
1227
- '≈ô' => '≈ò',
1228
- 'ŗ' => 'Ŗ',
1229
- 'ŕ' => 'Ŕ',
1230
- 'œ' => 'Œ',
1231
- 'ő' => 'Ő',
1232
- 'ŏ' => 'Ŏ',
1233
- 'ō' => 'Ō',
1234
- 'ŋ' => 'Ŋ',
1235
- 'ň' => 'Ň',
1236
- 'ņ' => 'Ņ',
1237
- 'ń' => 'Ń',
1238
- 'ł' => 'Ł',
1239
- 'ŀ' => 'Ŀ',
1240
- 'ľ' => 'Ľ',
1241
- 'ļ' => 'Ļ',
1242
- 'ĺ' => 'Ĺ',
1243
- 'ķ' => 'Ķ',
1244
- 'ĵ' => 'Ĵ',
1245
- 'ij' => 'IJ',
1246
- 'ı' => 'I',
1247
- 'į' => 'Į',
1248
- 'ĭ' => 'Ĭ',
1249
- 'ī' => 'Ī',
1250
- 'ĩ' => 'Ĩ',
1251
- 'ħ' => 'Ħ',
1252
- 'ĥ' => 'Ĥ',
1253
- 'ģ' => 'Ģ',
1254
- 'ƒ°' => 'ƒ ',
1255
- 'ğ' => 'Ğ',
1256
- 'ƒù' => 'ƒú',
1257
- 'ƒõ' => 'ƒö',
1258
- 'ƒô' => 'ƒò',
1259
- 'ė' => 'Ė',
1260
- 'ĕ' => 'Ĕ',
1261
- 'ē' => 'Ē',
1262
- 'đ' => 'Đ',
1263
- 'ď' => 'Ď',
1264
- 'č' => 'Č',
1265
- 'ċ' => 'Ċ',
1266
- 'ĉ' => 'Ĉ',
1267
- 'ć' => 'Ć',
1268
- 'ą' => 'Ą',
1269
- 'ă' => 'Ă',
1270
- 'ā' => 'Ā',
1271
- 'ÿ' => 'Ÿ',
1272
- 'þ' => 'Þ',
1273
- '√Ω' => '√ù',
1274
- 'ü' => 'Ü',
1275
- 'û' => 'Û',
1276
- '√∫' => '√ö',
1277
- '√π' => '√ô',
1278
- '√∏' => '√ò',
1279
- 'ö' => 'Ö',
1280
- 'õ' => 'Õ',
1281
- 'ô' => 'Ô',
1282
- 'ó' => 'Ó',
1283
- 'ò' => 'Ò',
1284
- 'ñ' => 'Ñ',
1285
- 'ð' => 'Ð',
1286
- 'ï' => 'Ï',
1287
- 'î' => 'Î',
1288
- 'í' => 'Í',
1289
- 'ì' => 'Ì',
1290
- 'ë' => 'Ë',
1291
- 'ê' => 'Ê',
1292
- 'é' => 'É',
1293
- 'è' => 'È',
1294
- 'ç' => 'Ç',
1295
- 'æ' => 'Æ',
1296
- 'å' => 'Å',
1297
- 'ä' => 'Ä',
1298
- 'ã' => 'Ã',
1299
- 'â' => 'Â',
1300
- 'á' => 'Á',
1301
- '√ ' => '√Ä',
1302
- 'µ' => 'Μ',
1303
- 'z' => 'Z',
1304
- 'y' => 'Y',
1305
- 'x' => 'X',
1306
- 'w' => 'W',
1307
- 'v' => 'V',
1308
- 'u' => 'U',
1309
- 't' => 'T',
1310
- 's' => 'S',
1311
- 'r' => 'R',
1312
- 'q' => 'Q',
1313
- 'p' => 'P',
1314
- 'o' => 'O',
1315
- 'n' => 'N',
1316
- 'm' => 'M',
1317
- 'l' => 'L',
1318
- 'k' => 'K',
1319
- 'j' => 'J',
1320
- 'i' => 'I',
1321
- 'h' => 'H',
1322
- 'g' => 'G',
1323
- 'f' => 'F',
1324
- 'e' => 'E',
1325
- 'd' => 'D',
1326
- 'c' => 'C',
1327
- 'b' => 'B',
1328
- 'a' => 'A',
1329
  );
1330
- // phpcs:enable
1
  <?php
2
  /**
3
+ * @package All-in-One-SEO-Pack
 
 
 
4
  */
 
 
5
  $UTF8_TABLES = array();
6
 
7
  $UTF8_TABLES['strtolower'] = array(
8
+ 'Z' => 'z', 'Y' => 'y', 'X' => 'x',
9
+ 'W' => 'w', 'V' => 'v', 'U' => 'u',
10
+ 'T' => 't', 'S' => 's', 'R' => 'r',
11
+ 'Q' => 'q', 'P' => 'p', 'O' => 'o',
12
+ 'N' => 'n', 'M' => 'm', 'L' => 'l',
13
+ 'K' => 'k', 'J' => 'j', 'I' => 'i',
14
+ 'H' => 'h', 'G' => 'g', 'F' => 'f',
15
+ 'E' => 'e', 'D' => 'd', 'C' => 'c',
16
+ 'B' => 'b', 'A' => 'a', 'Å' => 'å',
17
+ 'K' => 'k', 'Ω' => 'ω', 'Ώ' => 'ώ',
18
+ '·ø∫' => '·Ωº', '·øπ' => '·Ωπ', '·ø∏' => '·Ω∏',
19
+ '·ø¨' => '·ø•', '·ø´' => '·Ωª', '·ø™' => '·Ω∫',
20
+ '·ø©' => '·ø°', '·ø®' => '·ø ', '·øõ' => '·Ω∑',
21
+ '·øö' => '·Ω∂', '·øô' => '·øë', '·øò' => '·øê',
22
+ '·øã' => '·Ωµ', '·øä' => '·Ω¥', '·øâ' => '·Ω≥',
23
+ 'Ὲ' => 'ὲ', 'Ά' => 'ά', 'Ὰ' => 'ὰ',
24
+ '·æπ' => '·æ±', '·æ∏' => '·æ∞', '·ΩØ' => '·Ωß',
25
+ '·ΩÆ' => '·Ω¶', '·Ω≠' => '·Ω•', '·Ω¨' => '·Ω§',
26
+ '·Ω´' => '·Ω£', '·Ω™' => '·Ω¢', '·Ω©' => '·Ω°',
27
+ '·Ω®' => '·Ω ', '·Ωü' => '·Ωó', '·Ωù' => '·Ωï',
28
+ '·Ωõ' => '·Ωì', '·Ωô' => '·Ωë', '·Ωç' => '·ΩÖ',
29
+ '·Ωå' => '·ΩÑ', '·Ωã' => '·ΩÉ', '·Ωä' => '·ΩÇ',
30
+ 'Ὁ' => 'ὁ', 'Ὀ' => 'ὀ', 'Ἷ' => 'ἷ',
31
+ 'Ἶ' => 'ἶ', 'Ἵ' => 'ἵ', 'Ἴ' => 'ἴ',
32
+ 'Ἳ' => 'ἳ', 'Ἲ' => 'ἲ', 'Ἱ' => 'ἱ',
33
+ 'Ἰ' => 'ἰ', 'Ἧ' => 'ἧ', 'Ἦ' => 'ἦ',
34
+ 'Ἥ' => 'ἥ', 'Ἤ' => 'ἤ', 'Ἣ' => 'ἣ',
35
+ '·º™' => '·º¢', '·º©' => '·º°', '·º®' => '·º ',
36
+ 'Ἕ' => 'ἕ', 'Ἔ' => 'ἔ', 'Ἓ' => 'ἓ',
37
+ 'Ἒ' => 'ἒ', 'Ἑ' => 'ἑ', 'Ἐ' => 'ἐ',
38
+ 'Ἇ' => 'ἇ', 'Ἆ' => 'ἆ', 'Ἅ' => 'ἅ',
39
+ 'Ἄ' => 'ἄ', 'Ἃ' => 'ἃ', 'Ἂ' => 'ἂ',
40
+ 'Ἁ' => 'ἁ', 'Ἀ' => 'ἀ', 'Ỹ' => 'ỹ',
41
+ 'Ỷ' => 'ỷ', 'Ỵ' => 'ỵ', 'Ỳ' => 'ỳ',
42
+ 'Ự' => 'ự', 'Ữ' => 'ữ', 'Ử' => 'ử',
43
+ 'Ừ' => 'ừ', 'Ứ' => 'ứ', 'Ủ' => 'ủ',
44
+ '·ª§' => '·ª•', '·ª¢' => '·ª£', '·ª ' => '·ª°',
45
+ 'Ở' => 'ở', 'Ờ' => 'ờ', 'Ớ' => 'ớ',
46
+ 'Ộ' => 'ộ', 'Ỗ' => 'ỗ', 'Ổ' => 'ổ',
47
+ 'Ồ' => 'ồ', 'Ố' => 'ố', 'Ỏ' => 'ỏ',
48
+ 'Ọ' => 'ọ', 'Ị' => 'ị', 'Ỉ' => 'ỉ',
49
+ 'Ệ' => 'ệ', 'Ễ' => 'ễ', 'Ể' => 'ể',
50
+ 'Ề' => 'ề', 'Ế' => 'ế', 'Ẽ' => 'ẽ',
51
+ 'Ẻ' => 'ẻ', 'Ẹ' => 'ẹ', 'Ặ' => 'ặ',
52
+ '·∫¥' => '·∫µ', '·∫≤' => '·∫≥', '·∫∞' => '·∫±',
53
+ 'Ắ' => 'ắ', 'Ậ' => 'ậ', 'Ẫ' => 'ẫ',
54
+ 'Ẩ' => 'ẩ', 'Ầ' => 'ầ', 'Ấ' => 'ấ',
55
+ '·∫¢' => '·∫£', '·∫ ' => '·∫°', '·∫î' => '·∫ï',
56
+ 'Ẓ' => 'ẓ', 'Ẑ' => 'ẑ', 'Ẏ' => 'ẏ',
57
+ 'Ẍ' => 'ẍ', 'Ẋ' => 'ẋ', 'Ẉ' => 'ẉ',
58
+ 'Ẇ' => 'ẇ', 'Ẅ' => 'ẅ', 'Ẃ' => 'ẃ',
59
+ 'Ẁ' => 'ẁ', 'Ṿ' => 'ṿ', 'Ṽ' => 'ṽ',
60
+ '·π∫' => '·πª', '·π∏' => '·ππ', '·π∂' => '·π∑',
61
+ '·π¥' => '·πµ', '·π≤' => '·π≥', '·π∞' => '·π±',
62
+ 'Ṯ' => 'ṯ', 'Ṭ' => 'ṭ', 'Ṫ' => 'ṫ',
63
+ '·π®' => '·π©', '·π¶' => '·πß', '·π§' => '·π•',
64
+ '·π¢' => '·π£', '·π ' => '·π°', '·πû' => '·πü',
65
+ '·πú' => '·πù', '·πö' => '·πõ', '·πò' => '·πô',
66
+ '·πñ' => '·πó', '·πî' => '·πï', '·πí' => '·πì',
67
+ '·πê' => '·πë', '·πé' => '·πè', '·πå' => '·πç',
68
+ 'Ṋ' => 'ṋ', 'Ṉ' => 'ṉ', 'Ṇ' => 'ṇ',
69
+ 'Ṅ' => 'ṅ', 'Ṃ' => 'ṃ', 'Ṁ' => 'ṁ',
70
+ 'Ḿ' => 'ḿ', 'Ḽ' => 'ḽ', 'Ḻ' => 'ḻ',
71
+ '·∏∏' => '·∏π', '·∏∂' => '·∏∑', '·∏¥' => '·∏µ',
72
+ 'Ḳ' => 'ḳ', 'Ḱ' => 'ḱ', 'Ḯ' => 'ḯ',
73
+ 'Ḭ' => 'ḭ', 'Ḫ' => 'ḫ', 'Ḩ' => 'ḩ',
74
+ 'Ḧ' => 'ḧ', 'Ḥ' => 'ḥ', 'Ḣ' => 'ḣ',
75
+ '·∏ ' => '·∏°', '·∏û' => '·∏ü', '·∏ú' => '·∏ù',
76
+ 'Ḛ' => 'ḛ', 'Ḙ' => 'ḙ', 'Ḗ' => 'ḗ',
77
+ 'Ḕ' => 'ḕ', 'Ḓ' => 'ḓ', 'Ḑ' => 'ḑ',
78
+ 'Ḏ' => 'ḏ', 'Ḍ' => 'ḍ', 'Ḋ' => 'ḋ',
79
+ 'Ḉ' => 'ḉ', 'Ḇ' => 'ḇ', 'Ḅ' => 'ḅ',
80
+ 'Ḃ' => 'ḃ', 'Ḁ' => 'ḁ', 'Ֆ' => 'ֆ',
81
+ 'Օ' => 'օ', 'Ք' => 'ք', 'Փ' => 'փ',
82
+ 'Ւ' => 'ւ', 'Ց' => 'ց', 'Ր' => 'ր',
83
+ '’è' => '’ø', '’é' => '’æ', '’ç' => '’Ω',
84
+ '’å' => '’º', '’ã' => '’ª', '’ä' => '’∫',
85
+ '’â' => '’π', '’à' => '’∏', '’á' => '’∑',
86
+ '’Ü' => '’∂', '’Ö' => '’µ', '’Ñ' => '’¥',
87
+ '’É' => '’≥', '’Ç' => '’≤', '’Å' => '’±',
88
+ '’Ä' => '’∞', '‘ø' => '’Ø', '‘æ' => '’Æ',
89
+ 'Խ' => 'խ', 'Լ' => 'լ', 'Ի' => 'ի',
90
+ '‘∫' => '’™', '‘π' => '’©', '‘∏' => '’®',
91
+ '‘∑' => '’ß', '‘∂' => '’¶', '‘µ' => '’•',
92
+ '‘¥' => '’§', '‘≥' => '’£', '‘≤' => '’¢',
93
+ '‘±' => '’°', '‘é' => '‘è', '‘å' => '‘ç',
94
+ '‘ä' => '‘ã', '‘à' => '‘â', '‘Ü' => '‘á',
95
+ '‘Ñ' => '‘Ö', '‘Ç' => '‘É', '‘Ä' => '‘Å',
96
+ 'Ӹ' => 'ӹ', 'Ӵ' => 'ӵ', 'Ӳ' => 'ӳ',
97
+ 'Ӱ' => 'ӱ', 'Ӯ' => 'ӯ', 'Ӭ' => 'ӭ',
98
+ 'Ӫ' => 'ӫ', 'Ө' => 'ө', 'Ӧ' => 'ӧ',
99
+ '”§' => '”•', '”¢' => '”£', '” ' => '”°',
100
+ 'Ӟ' => 'ӟ', 'Ӝ' => 'ӝ', 'Ӛ' => 'ӛ',
101
+ 'Ә' => 'ә', 'Ӗ' => 'ӗ', 'Ӕ' => 'ӕ',
102
+ 'Ӓ' => 'ӓ', 'Ӑ' => 'ӑ', 'Ӎ' => 'ӎ',
103
+ 'Ӌ' => 'ӌ', 'Ӊ' => 'ӊ', 'Ӈ' => 'ӈ',
104
+ 'Ӆ' => 'ӆ', 'Ӄ' => 'ӄ', 'Ӂ' => 'ӂ',
105
+ 'Ҿ' => 'ҿ', 'Ҽ' => 'ҽ', 'Һ' => 'һ',
106
+ '“∏' => '“π', '“∂' => '“∑', '“¥' => '“µ',
107
+ '“≤' => '“≥', '“∞' => '“±', '“Æ' => '“Ø',
108
+ 'Ҭ' => 'ҭ', 'Ҫ' => 'ҫ', 'Ҩ' => 'ҩ',
109
+ 'Ҧ' => 'ҧ', 'Ҥ' => 'ҥ', 'Ң' => 'ң',
110
+ '“ ' => '“°', '“û' => '“ü', '“ú' => '“ù',
111
+ '“ö' => '“õ', '“ò' => '“ô', '“ñ' => '“ó',
112
+ '“î' => '“ï', '“í' => '“ì', '“ê' => '“ë',
113
+ '“é' => '“è', '“å' => '“ç', '“ä' => '“ã',
114
+ '“Ä' => '“Å', '—æ' => '—ø', '—º' => '—Ω',
115
+ '—∫' => '—ª', '—∏' => '—π', '—∂' => '—∑',
116
+ '—¥' => '—µ', '—≤' => '—≥', '—∞' => '—±',
117
+ '—Æ' => '—Ø', '—¨' => '—≠', '—™' => '—´',
118
+ '—®' => '—©', '—¶' => '—ß', '—§' => '—•',
119
+ '—¢' => '—£', '— ' => '—°', '–Ø' => '—è',
120
+ '–Æ' => '—é', '–≠' => '—ç', '–¨' => '—å',
121
+ '–´' => '—ã', '–™' => '—ä', '–©' => '—â',
122
+ '–®' => '—à', '–ß' => '—á', '–¶' => '—Ü',
123
+ '–•' => '—Ö', '–§' => '—Ñ', '–£' => '—É',
124
+ '–¢' => '—Ç', '–°' => '—Å', '– ' => '—Ä',
125
+ '–ü' => '–ø', '–û' => '–æ', '–ù' => '–Ω',
126
+ '–ú' => '–º', '–õ' => '–ª', '–ö' => '–∫',
127
+ '–ô' => '–π', '–ò' => '–∏', '–ó' => '–∑',
128
+ '–ñ' => '–∂', '–ï' => '–µ', '–î' => '–¥',
129
+ '–ì' => '–≥', '–í' => '–≤', '–ë' => '–±',
130
+ '–ê' => '–∞', '–è' => '—ü', '–é' => '—û',
131
+ '–ç' => '—ù', '–å' => '—ú', '–ã' => '—õ',
132
+ '–ä' => '—ö', '–â' => '—ô', '–à' => '—ò',
133
+ '–á' => '—ó', '–Ü' => '—ñ', '–Ö' => '—ï',
134
+ '–Ñ' => '—î', '–É' => '—ì', '–Ç' => '—í',
135
+ 'Ё' => 'ё', 'Ѐ' => 'ѐ', 'ϴ' => 'θ',
136
+ 'Ϯ' => 'ϯ', 'Ϭ' => 'ϭ', 'Ϫ' => 'ϫ',
137
+ 'Ϩ' => 'ϩ', 'Ϧ' => 'ϧ', 'Ϥ' => 'ϥ',
138
+ 'œ¢' => 'œ£', 'œ ' => 'œ°', 'œû' => 'œü',
139
+ 'Ϝ' => 'ϝ', 'Ϛ' => 'ϛ', 'Ϙ' => 'ϙ',
140
+ 'Ϋ' => 'ϋ', 'Ϊ' => 'ϊ', 'Ω' => 'ω',
141
+ 'Ψ' => 'ψ', 'Χ' => 'χ', 'Φ' => 'φ',
142
+ 'Υ' => 'υ', 'Τ' => 'τ', 'Σ' => 'σ',
143
+ 'Œ°' => 'œÅ', 'Œ ' => 'œÄ', 'Œü' => 'Œø',
144
+ 'Ξ' => 'ξ', 'Ν' => 'ν', 'Μ' => 'μ',
145
+ 'Λ' => 'λ', 'Κ' => 'κ', 'Ι' => 'ι',
146
+ 'Θ' => 'θ', 'Η' => 'η', 'Ζ' => 'ζ',
147
+ 'Ε' => 'ε', 'Δ' => 'δ', 'Γ' => 'γ',
148
+ 'Β' => 'β', 'Α' => 'α', 'Ώ' => 'ώ',
149
+ 'Ύ' => 'ύ', 'Ό' => 'ό', 'Ί' => 'ί',
150
+ 'Ή' => 'ή', 'Έ' => 'έ', 'Ά' => 'ά',
151
+ 'Ȳ' => 'ȳ', 'Ȱ' => 'ȱ', 'Ȯ' => 'ȯ',
152
+ 'Ȭ' => 'ȭ', 'Ȫ' => 'ȫ', 'Ȩ' => 'ȩ',
153
+ 'Ȧ' => 'ȧ', 'Ȥ' => 'ȥ', 'Ȣ' => 'ȣ',
154
+ '» ' => '∆û', '»û' => '»ü', '»ú' => '»ù',
155
+ 'Ț' => 'ț', 'Ș' => 'ș', 'Ȗ' => 'ȗ',
156
+ 'Ȕ' => 'ȕ', 'Ȓ' => 'ȓ', 'Ȑ' => 'ȑ',
157
+ 'Ȏ' => 'ȏ', 'Ȍ' => 'ȍ', 'Ȋ' => 'ȋ',
158
+ 'Ȉ' => 'ȉ', 'Ȇ' => 'ȇ', 'Ȅ' => 'ȅ',
159
+ 'Ȃ' => 'ȃ', 'Ȁ' => 'ȁ', 'Ǿ' => 'ǿ',
160
+ 'Ǽ' => 'ǽ', 'Ǻ' => 'ǻ', 'Ǹ' => 'ǹ',
161
+ 'Ƿ' => 'ƿ', 'Ƕ' => 'ƕ', 'Ǵ' => 'ǵ',
162
+ 'DZ' => 'dz', 'Ǯ' => 'ǯ', 'Ǭ' => 'ǭ',
163
+ 'Ǫ' => 'ǫ', 'Ǩ' => 'ǩ', 'Ǧ' => 'ǧ',
164
+ '«§' => '«•', '«¢' => '«£', '« ' => '«°',
165
+ '«û' => '«ü', '«õ' => '«ú', '«ô' => '«ö',
166
+ '«ó' => '«ò', '«ï' => '«ñ', '«ì' => '«î',
167
+ '«ë' => '«í', '«è' => '«ê', '«ç' => '«é',
168
+ '«ä' => '«å', '«á' => '«â', '«Ñ' => '«Ü',
169
+ 'Ƽ' => 'ƽ', 'Ƹ' => 'ƹ', 'Ʒ' => 'ʒ',
170
+ '∆µ' => '∆∂', '∆≥' => '∆¥', '∆≤' => ' ã',
171
+ 'Ʊ' => 'ʊ', 'Ư' => 'ư', 'Ʈ' => 'ʈ',
172
+ 'Ƭ' => 'ƭ', 'Ʃ' => 'ʃ', 'Ƨ' => 'ƨ',
173
+ 'Ʀ' => 'ʀ', 'Ƥ' => 'ƥ', 'Ƣ' => 'ƣ',
174
+ '∆ ' => '∆°', '∆ü' => '…µ', '∆ù' => '…≤',
175
+ '∆ú' => '…Ø', '∆ò' => '∆ô', '∆ó' => '…®',
176
+ '∆ñ' => '…©', '∆î' => '…£', '∆ì' => '… ',
177
+ 'Ƒ' => 'ƒ', 'Ɛ' => 'ɛ', 'Ə' => 'ə',
178
+ 'Ǝ' => 'ǝ', 'Ƌ' => 'ƌ', 'Ɗ' => 'ɗ',
179
+ 'Ɖ' => 'ɖ', 'Ƈ' => 'ƈ', 'Ɔ' => 'ɔ',
180
+ 'Ƅ' => 'ƅ', 'Ƃ' => 'ƃ', 'Ɓ' => 'ɓ',
181
+ 'Ž' => 'ž', 'Ż' => 'ż', 'Ź' => 'ź',
182
+ 'Ÿ' => 'ÿ', 'Ŷ' => 'ŷ', 'Ŵ' => 'ŵ',
183
+ 'Ų' => 'ų', 'Ű' => 'ű', 'Ů' => 'ů',
184
+ 'Ŭ' => 'ŭ', 'Ū' => 'ū', 'Ũ' => 'ũ',
185
+ 'Ŧ' => 'ŧ', 'Ť' => 'ť', 'Ţ' => 'ţ',
186
+ '≈ ' => '≈°', '≈û' => '≈ü', '≈ú' => '≈ù',
187
+ 'Ś' => 'ś', 'Ř' => 'ř', 'Ŗ' => 'ŗ',
188
+ 'Ŕ' => 'ŕ', 'Œ' => 'œ', 'Ő' => 'ő',
189
+ 'Ŏ' => 'ŏ', 'Ō' => 'ō', 'Ŋ' => 'ŋ',
190
+ 'Ň' => 'ň', 'Ņ' => 'ņ', 'Ń' => 'ń',
191
+ 'Ł' => 'ł', 'Ŀ' => 'ŀ', 'Ľ' => 'ľ',
192
+ 'Ļ' => 'ļ', 'Ĺ' => 'ĺ', 'Ķ' => 'ķ',
193
+ 'Ĵ' => 'ĵ', 'IJ' => 'ij', 'İ' => 'i',
194
+ 'Į' => 'į', 'Ĭ' => 'ĭ', 'Ī' => 'ī',
195
+ 'Ĩ' => 'ĩ', 'Ħ' => 'ħ', 'Ĥ' => 'ĥ',
196
+ 'ƒ¢' => 'ƒ£', 'ƒ ' => 'ƒ°', 'ƒû' => 'ƒü',
197
+ 'ƒú' => 'ƒù', 'ƒö' => 'ƒõ', 'ƒò' => 'ƒô',
198
+ 'Ė' => 'ė', 'Ĕ' => 'ĕ', 'Ē' => 'ē',
199
+ 'Đ' => 'đ', 'Ď' => 'ď', 'Č' => 'č',
200
+ 'Ċ' => 'ċ', 'Ĉ' => 'ĉ', 'Ć' => 'ć',
201
+ 'Ą' => 'ą', 'Ă' => 'ă', 'Ā' => 'ā',
202
+ 'Þ' => 'þ', 'Ý' => 'ý', 'Ü' => 'ü',
203
+ 'Û' => 'û', 'Ú' => 'ú', 'Ù' => 'ù',
204
+ 'Ø' => 'ø', 'Ö' => 'ö', 'Õ' => 'õ',
205
+ 'Ô' => 'ô', 'Ó' => 'ó', 'Ò' => 'ò',
206
+ 'Ñ' => 'ñ', 'Ð' => 'ð', 'Ï' => 'ï',
207
+ 'Î' => 'î', 'Í' => 'í', 'Ì' => 'ì',
208
+ 'Ë' => 'ë', 'Ê' => 'ê', 'É' => 'é',
209
+ 'È' => 'è', 'Ç' => 'ç', 'Æ' => 'æ',
210
+ 'Å' => 'å', 'Ä' => 'ä', 'Ã' => 'ã',
211
+ '√Ç' => '√¢', '√Å' => '√°', '√Ä' => '√ ',
212
+ 'Z' => 'z', 'Y' => 'y', 'X' => 'x',
213
+ 'W' => 'w', 'V' => 'v', 'U' => 'u',
214
+ 'T' => 't', 'S' => 's', 'R' => 'r',
215
+ 'Q' => 'q', 'P' => 'p', 'O' => 'o',
216
+ 'N' => 'n', 'M' => 'm', 'L' => 'l',
217
+ 'K' => 'k', 'J' => 'j', 'I' => 'i',
218
+ 'H' => 'h', 'G' => 'g', 'F' => 'f',
219
+ 'E' => 'e', 'D' => 'd', 'C' => 'c',
220
+ 'B' => 'b', 'A' => 'a',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  );
222
 
223
 
224
  $UTF8_TABLES['strtoupper'] = array(
225
+ 'z' => 'Z', 'y' => 'Y', 'x' => 'X',
226
+ 'w' => 'W', 'v' => 'V', 'u' => 'U',
227
+ 't' => 'T', 's' => 'S', 'r' => 'R',
228
+ 'q' => 'Q', 'p' => 'P', 'o' => 'O',
229
+ 'n' => 'N', 'm' => 'M', 'l' => 'L',
230
+ 'k' => 'K', 'j' => 'J', 'i' => 'I',
231
+ 'h' => 'H', 'g' => 'G', 'f' => 'F',
232
+ 'e' => 'E', 'd' => 'D', 'c' => 'C',
233
+ 'b' => 'B', 'a' => 'A', 'ῳ' => 'ῼ',
234
+ '·ø•' => '·ø¨', '·ø°' => '·ø©', '·ø ' => '·ø®',
235
+ '·øë' => '·øô', '·øê' => '·øò', '·øÉ' => '·øå',
236
+ 'ι' => 'Ι', 'ᾳ' => 'ᾼ', 'ᾱ' => 'Ᾱ',
237
+ 'ᾰ' => 'Ᾰ', 'ᾧ' => 'ᾯ', 'ᾦ' => 'ᾮ',
238
+ 'ᾥ' => 'ᾭ', 'ᾤ' => 'ᾬ', 'ᾣ' => 'ᾫ',
239
+ '·æ¢' => '·æ™', '·æ°' => '·æ©', '·æ ' => '·æ®',
240
+ '·æó' => '·æü', '·æñ' => '·æû', '·æï' => '·æù',
241
+ '·æî' => '·æú', '·æì' => '·æõ', '·æí' => '·æö',
242
+ '·æë' => '·æô', '·æê' => '·æò', '·æá' => '·æè',
243
+ 'ᾆ' => 'ᾎ', 'ᾅ' => 'ᾍ', 'ᾄ' => 'ᾌ',
244
+ 'ᾃ' => 'ᾋ', 'ᾂ' => 'ᾊ', 'ᾁ' => 'ᾉ',
245
+ 'ᾀ' => 'ᾈ', 'ώ' => 'Ώ', 'ὼ' => 'Ὼ',
246
+ '·Ωª' => '·ø´', '·Ω∫' => '·ø™', '·Ωπ' => '·øπ',
247
+ '·Ω∏' => '·ø∏', '·Ω∑' => '·øõ', '·Ω∂' => '·øö',
248
+ '·Ωµ' => '·øã', '·Ω¥' => '·øä', '·Ω≥' => '·øâ',
249
+ 'ὲ' => 'Ὲ', 'ά' => 'Ά', 'ὰ' => 'Ὰ',
250
+ '·Ωß' => '·ΩØ', '·Ω¶' => '·ΩÆ', '·Ω•' => '·Ω≠',
251
+ '·Ω§' => '·Ω¨', '·Ω£' => '·Ω´', '·Ω¢' => '·Ω™',
252
+ '·Ω°' => '·Ω©', '·Ω ' => '·Ω®', '·Ωó' => '·Ωü',
253
+ '·Ωï' => '·Ωù', '·Ωì' => '·Ωõ', '·Ωë' => '·Ωô',
254
+ '·ΩÖ' => '·Ωç', '·ΩÑ' => '·Ωå', '·ΩÉ' => '·Ωã',
255
+ '·ΩÇ' => '·Ωä', '·ΩÅ' => '·Ωâ', '·ΩÄ' => '·Ωà',
256
+ 'ἷ' => 'Ἷ', 'ἶ' => 'Ἶ', 'ἵ' => 'Ἵ',
257
+ 'ἴ' => 'Ἴ', 'ἳ' => 'Ἳ', 'ἲ' => 'Ἲ',
258
+ 'ἱ' => 'Ἱ', 'ἰ' => 'Ἰ', 'ἧ' => 'Ἧ',
259
+ 'ἦ' => 'Ἦ', 'ἥ' => 'Ἥ', 'ἤ' => 'Ἤ',
260
+ 'ἣ' => 'Ἣ', 'ἢ' => 'Ἢ', 'ἡ' => 'Ἡ',
261
+ '·º ' => '·º®', '·ºï' => '·ºù', '·ºî' => '·ºú',
262
+ 'ἓ' => 'Ἓ', 'ἒ' => 'Ἒ', 'ἑ' => 'Ἑ',
263
+ 'ἐ' => 'Ἐ', 'ἇ' => 'Ἇ', 'ἆ' => 'Ἆ',
264
+ 'ἅ' => 'Ἅ', 'ἄ' => 'Ἄ', 'ἃ' => 'Ἃ',
265
+ 'ἂ' => 'Ἂ', 'ἁ' => 'Ἁ', 'ἀ' => 'Ἀ',
266
+ 'ỹ' => 'Ỹ', 'ỷ' => 'Ỷ', 'ỵ' => 'Ỵ',
267
+ 'ỳ' => 'Ỳ', 'ự' => 'Ự', 'ữ' => 'Ữ',
268
+ 'ử' => 'Ử', 'ừ' => 'Ừ', 'ứ' => 'Ứ',
269
+ 'ủ' => 'Ủ', 'ụ' => 'Ụ', 'ợ' => 'Ợ',
270
+ '·ª°' => '·ª ', '·ªü' => '·ªû', '·ªù' => '·ªú',
271
+ 'ớ' => 'Ớ', 'ộ' => 'Ộ', 'ỗ' => 'Ỗ',
272
+ 'ổ' => 'Ổ', 'ồ' => 'Ồ', 'ố' => 'Ố',
273
+ 'ỏ' => 'Ỏ', 'ọ' => 'Ọ', 'ị' => 'Ị',
274
+ 'ỉ' => 'Ỉ', 'ệ' => 'Ệ', 'ễ' => 'Ễ',
275
+ 'ể' => 'Ể', 'ề' => 'Ề', 'ế' => 'Ế',
276
+ 'ẽ' => 'Ẽ', 'ẻ' => 'Ẻ', 'ẹ' => 'Ẹ',
277
+ '·∫∑' => '·∫∂', '·∫µ' => '·∫¥', '·∫≥' => '·∫≤',
278
+ 'ằ' => 'Ằ', 'ắ' => 'Ắ', 'ậ' => 'Ậ',
279
+ 'ẫ' => 'Ẫ', 'ẩ' => 'Ẩ', 'ầ' => 'Ầ',
280
+ '·∫•' => '·∫§', '·∫£' => '·∫¢', '·∫°' => '·∫ ',
281
+ '·∫õ' => '·π ', '·∫ï' => '·∫î', '·∫ì' => '·∫í',
282
+ 'ẑ' => 'Ẑ', 'ẏ' => 'Ẏ', 'ẍ' => 'Ẍ',
283
+ 'ẋ' => 'Ẋ', 'ẉ' => 'Ẉ', 'ẇ' => 'Ẇ',
284
+ 'ẅ' => 'Ẅ', 'ẃ' => 'Ẃ', 'ẁ' => 'Ẁ',
285
+ '·πø' => '·πæ', '·πΩ' => '·πº', '·πª' => '·π∫',
286
+ '·ππ' => '·π∏', '·π∑' => '·π∂', '·πµ' => '·π¥',
287
+ 'ṳ' => 'Ṳ', 'ṱ' => 'Ṱ', 'ṯ' => 'Ṯ',
288
+ '·π≠' => '·π¨', '·π´' => '·π™', '·π©' => '·π®',
289
+ '·πß' => '·π¶', '·π•' => '·π§', '·π£' => '·π¢',
290
+ '·π°' => '·π ', '·πü' => '·πû', '·πù' => '·πú',
291
+ '·πõ' => '·πö', '·πô' => '·πò', '·πó' => '·πñ',
292
+ '·πï' => '·πî', '·πì' => '·πí', '·πë' => '·πê',
293
+ '·πè' => '·πé', '·πç' => '·πå', '·πã' => '·πä',
294
+ 'ṉ' => 'Ṉ', 'ṇ' => 'Ṇ', 'ṅ' => 'Ṅ',
295
+ 'ṃ' => 'Ṃ', 'ṁ' => 'Ṁ', 'ḿ' => 'Ḿ',
296
+ 'ḽ' => 'Ḽ', 'ḻ' => 'Ḻ', 'ḹ' => 'Ḹ',
297
+ '·∏∑' => '·∏∂', '·∏µ' => '·∏¥', '·∏≥' => '·∏≤',
298
+ 'ḱ' => 'Ḱ', 'ḯ' => 'Ḯ', 'ḭ' => 'Ḭ',
299
+ 'ḫ' => 'Ḫ', 'ḩ' => 'Ḩ', 'ḧ' => 'Ḧ',
300
+ '·∏•' => '·∏§', '·∏£' => '·∏¢', '·∏°' => '·∏ ',
301
+ 'ḟ' => 'Ḟ', 'ḝ' => 'Ḝ', 'ḛ' => 'Ḛ',
302
+ 'ḙ' => 'Ḙ', 'ḗ' => 'Ḗ', 'ḕ' => 'Ḕ',
303
+ 'ḓ' => 'Ḓ', 'ḑ' => 'Ḑ', 'ḏ' => 'Ḏ',
304
+ 'ḍ' => 'Ḍ', 'ḋ' => 'Ḋ', 'ḉ' => 'Ḉ',
305
+ 'ḇ' => 'Ḇ', 'ḅ' => 'Ḅ', 'ḃ' => 'Ḃ',
306
+ 'ḁ' => 'Ḁ', 'ֆ' => 'Ֆ', 'օ' => 'Օ',
307
+ 'ք' => 'Ք', 'փ' => 'Փ', 'ւ' => 'Ւ',
308
+ 'ց' => 'Ց', 'ր' => 'Ր', 'տ' => 'Տ',
309
+ '’æ' => '’é', '’Ω' => '’ç', '’º' => '’å',
310
+ '’ª' => '’ã', '’∫' => '’ä', '’π' => '’â',
311
+ '’∏' => '’à', '’∑' => '’á', '’∂' => '’Ü',
312
+ '’µ' => '’Ö', '’¥' => '’Ñ', '’≥' => '’É',
313
+ '’≤' => '’Ç', '’±' => '’Å', '’∞' => '’Ä',
314
+ '’Ø' => '‘ø', '’Æ' => '‘æ', '’≠' => '‘Ω',
315
+ 'լ' => 'Լ', 'ի' => 'Ի', 'ժ' => 'Ժ',
316
+ '’©' => '‘π', '’®' => '‘∏', '’ß' => '‘∑',
317
+ '’¶' => '‘∂', '’•' => '‘µ', '’§' => '‘¥',
318
+ '’£' => '‘≥', '’¢' => '‘≤', '’°' => '‘±',
319
+ '‘è' => '‘é', '‘ç' => '‘å', '‘ã' => '‘ä',
320
+ '‘â' => '‘à', '‘á' => '‘Ü', '‘Ö' => '‘Ñ',
321
+ '‘É' => '‘Ç', '‘Å' => '‘Ä', '”π' => '”∏',
322
+ 'ӵ' => 'Ӵ', 'ӳ' => 'Ӳ', 'ӱ' => 'Ӱ',
323
+ 'ӯ' => 'Ӯ', 'ӭ' => 'Ӭ', 'ӫ' => 'Ӫ',
324
+ 'ө' => 'Ө', 'ӧ' => 'Ӧ', 'ӥ' => 'Ӥ',
325
+ '”£' => '”¢', '”°' => '” ', '”ü' => '”û',
326
+ '”ù' => '”ú', '”õ' => '”ö', '”ô' => '”ò',
327
+ 'ӗ' => 'Ӗ', 'ӕ' => 'Ӕ', 'ӓ' => 'Ӓ',
328
+ 'ӑ' => 'Ӑ', 'ӎ' => 'Ӎ', 'ӌ' => 'Ӌ',
329
+ 'ӊ' => 'Ӊ', 'ӈ' => 'Ӈ', 'ӆ' => 'Ӆ',
330
+ 'ӄ' => 'Ӄ', 'ӂ' => 'Ӂ', 'ҿ' => 'Ҿ',
331
+ 'ҽ' => 'Ҽ', 'һ' => 'Һ', 'ҹ' => 'Ҹ',
332
+ '“∑' => '“∂', '“µ' => '“¥', '“≥' => '“≤',
333
+ 'ұ' => 'Ұ', 'ү' => 'Ү', 'ҭ' => 'Ҭ',
334
+ 'ҫ' => 'Ҫ', 'ҩ' => 'Ҩ', 'ҧ' => 'Ҧ',
335
+ '“•' => '“§', '“£' => '“¢', '“°' => '“ ',
336
+ '“ü' => '“û', '“ù' => '“ú', '“õ' => '“ö',
337
+ '“ô' => '“ò', '“ó' => '“ñ', '“ï' => '“î',
338
+ '“ì' => '“í', '“ë' => '“ê', '“è' => '“é',
339
+ '“ç' => '“å', '“ã' => '“ä', '“Å' => '“Ä',
340
+ '—ø' => '—æ', '—Ω' => '—º', '—ª' => '—∫',
341
+ '—π' => '—∏', '—∑' => '—∂', '—µ' => '—¥',
342
+ '—≥' => '—≤', '—±' => '—∞', '—Ø' => '—Æ',
343
+ '—≠' => '—¨', '—´' => '—™', '—©' => '—®',
344
+ '—ß' => '—¶', '—•' => '—§', '—£' => '—¢',
345
+ '—°' => '— ', '—ü' => '–è', '—û' => '–é',
346
+ '—ù' => '–ç', '—ú' => '–å', '—õ' => '–ã',
347
+ '—ö' => '–ä', '—ô' => '–â', '—ò' => '–à',
348
+ '—ó' => '–á', '—ñ' => '–Ü', '—ï' => '–Ö',
349
+ '—î' => '–Ñ', '—ì' => '–É', '—í' => '–Ç',
350
+ '—ë' => '–Å', '—ê' => '–Ä', '—è' => '–Ø',
351
+ '—é' => '–Æ', '—ç' => '–≠', '—å' => '–¨',
352
+ '—ã' => '–´', '—ä' => '–™', '—â' => '–©',
353
+ '—à' => '–®', '—á' => '–ß', '—Ü' => '–¶',
354
+ '—Ö' => '–•', '—Ñ' => '–§', '—É' => '–£',
355
+ '—Ç' => '–¢', '—Å' => '–°', '—Ä' => '– ',
356
+ '–ø' => '–ü', '–æ' => '–û', '–Ω' => '–ù',
357
+ '–º' => '–ú', '–ª' => '–õ', '–∫' => '–ö',
358
+ '–π' => '–ô', '–∏' => '–ò', '–∑' => '–ó',
359
+ '–∂' => '–ñ', '–µ' => '–ï', '–¥' => '–î',
360
+ '–≥' => '–ì', '–≤' => '–í', '–±' => '–ë',
361
+ 'а' => 'А', 'ϵ' => 'Ε', 'ϲ' => 'Σ',
362
+ 'ϱ' => 'Ρ', 'ϰ' => 'Κ', 'ϯ' => 'Ϯ',
363
+ 'ϭ' => 'Ϭ', 'ϫ' => 'Ϫ', 'ϩ' => 'Ϩ',
364
+ 'ϧ' => 'Ϧ', 'ϥ' => 'Ϥ', 'ϣ' => 'Ϣ',
365
+ 'œ°' => 'œ ', 'œü' => 'œû', 'œù' => 'œú',
366
+ 'œõ' => 'œö', 'œô' => 'œò', 'œñ' => 'Œ ',
367
+ 'ϕ' => 'Φ', 'ϑ' => 'Θ', 'ϐ' => 'Β',
368
+ 'ώ' => 'Ώ', 'ύ' => 'Ύ', 'ό' => 'Ό',
369
+ 'ϋ' => 'Ϋ', 'ϊ' => 'Ϊ', 'ω' => 'Ω',
370
+ 'ψ' => 'Ψ', 'χ' => 'Χ', 'φ' => 'Φ',
371
+ 'υ' => 'Υ', 'τ' => 'Τ', 'σ' => 'Σ',
372
+ 'œÇ' => 'Œ£', 'œÅ' => 'Œ°', 'œÄ' => 'Œ ',
373
+ 'ο' => 'Ο', 'ξ' => 'Ξ', 'ν' => 'Ν',
374
+ 'μ' => 'Μ', 'λ' => 'Λ', 'κ' => 'Κ',
375
+ 'ι' => 'Ι', 'θ' => 'Θ', 'η' => 'Η',
376
+ 'ζ' => 'Ζ', 'ε' => 'Ε', 'δ' => 'Δ',
377
+ 'γ' => 'Γ', 'β' => 'Β', 'α' => 'Α',
378
+ 'ί' => 'Ί', 'ή' => 'Ή', 'έ' => 'Έ',
379
+ 'ά' => 'Ά', 'ʒ' => 'Ʒ', 'ʋ' => 'Ʋ',
380
+ 'ʊ' => 'Ʊ', 'ʈ' => 'Ʈ', 'ʃ' => 'Ʃ',
381
+ 'ʀ' => 'Ʀ', 'ɵ' => 'Ɵ', 'ɲ' => 'Ɲ',
382
+ 'ɯ' => 'Ɯ', 'ɩ' => 'Ɩ', 'ɨ' => 'Ɨ',
383
+ '…£' => '∆î', '… ' => '∆ì', '…õ' => '∆ê',
384
+ 'ə' => 'Ə', 'ɗ' => 'Ɗ', 'ɖ' => 'Ɖ',
385
+ 'ɔ' => 'Ɔ', 'ɓ' => 'Ɓ', 'ȳ' => 'Ȳ',
386
+ 'ȱ' => 'Ȱ', 'ȯ' => 'Ȯ', 'ȭ' => 'Ȭ',
387
+ 'ȫ' => 'Ȫ', 'ȩ' => 'Ȩ', 'ȧ' => 'Ȧ',
388
+ 'ȥ' => 'Ȥ', 'ȣ' => 'Ȣ', 'ȟ' => 'Ȟ',
389
+ '»ù' => '»ú', '»õ' => '»ö', '»ô' => '»ò',
390
+ 'ȗ' => 'Ȗ', 'ȕ' => 'Ȕ', 'ȓ' => 'Ȓ',
391
+ 'ȑ' => 'Ȑ', 'ȏ' => 'Ȏ', 'ȍ' => 'Ȍ',
392
+ 'ȋ' => 'Ȋ', 'ȉ' => 'Ȉ', 'ȇ' => 'Ȇ',
393
+ 'ȅ' => 'Ȅ', 'ȃ' => 'Ȃ', 'ȁ' => 'Ȁ',
394
+ 'ǿ' => 'Ǿ', 'ǽ' => 'Ǽ', 'ǻ' => 'Ǻ',
395
+ '«π' => '«∏', '«µ' => '«¥', '«≥' => '«≤',
396
+ 'ǯ' => 'Ǯ', 'ǭ' => 'Ǭ', 'ǫ' => 'Ǫ',
397
+ 'ǩ' => 'Ǩ', 'ǧ' => 'Ǧ', 'ǥ' => 'Ǥ',
398
+ '«£' => '«¢', '«°' => '« ', '«ü' => '«û',
399
+ 'ǝ' => 'Ǝ', 'ǜ' => 'Ǜ', 'ǚ' => 'Ǚ',
400
+ '«ò' => '«ó', '«ñ' => '«ï', '«î' => '«ì',
401
+ '«í' => '«ë', '«ê' => '«è', '«é' => '«ç',
402
+ '«å' => '«ã', '«â' => '«à', '«Ü' => '«Ö',
403
+ 'ƿ' => 'Ƿ', 'ƽ' => 'Ƽ', 'ƹ' => 'Ƹ',
404
+ 'ƶ' => 'Ƶ', 'ƴ' => 'Ƴ', 'ư' => 'Ư',
405
+ 'ƭ' => 'Ƭ', 'ƨ' => 'Ƨ', 'ƥ' => 'Ƥ',
406
+ '∆£' => '∆¢', '∆°' => '∆ ', '∆û' => '» ',
407
+ 'ƙ' => 'Ƙ', 'ƕ' => 'Ƕ', 'ƒ' => 'Ƒ',
408
+ 'ƌ' => 'Ƌ', 'ƈ' => 'Ƈ', 'ƅ' => 'Ƅ',
409
+ 'ƃ' => 'Ƃ', 'ſ' => 'S', 'ž' => 'Ž',
410
+ 'ż' => 'Ż', 'ź' => 'Ź', 'ŷ' => 'Ŷ',
411
+ '≈µ' => '≈¥', '≈≥' => '≈≤', '≈±' => '≈∞',
412
+ 'ů' => 'Ů', 'ŭ' => 'Ŭ', 'ū' => 'Ū',
413
+ 'ũ' => 'Ũ', 'ŧ' => 'Ŧ', 'ť' => 'Ť',
414
+ '≈£' => '≈¢', '≈°' => '≈ ', '≈ü' => '≈û',
415
+ '≈ù' => '≈ú', '≈õ' => '≈ö', '≈ô' => '≈ò',
416
+ 'ŗ' => 'Ŗ', 'ŕ' => 'Ŕ', 'œ' => 'Œ',
417
+ 'ő' => 'Ő', 'ŏ' => 'Ŏ', 'ō' => 'Ō',
418
+ 'ŋ' => 'Ŋ', 'ň' => 'Ň', 'ņ' => 'Ņ',
419
+ 'ń' => 'Ń', 'ł' => 'Ł', 'ŀ' => 'Ŀ',
420
+ 'ľ' => 'Ľ', 'ļ' => 'Ļ', 'ĺ' => 'Ĺ',
421
+ 'ķ' => 'Ķ', 'ĵ' => 'Ĵ', 'ij' => 'IJ',
422
+ 'ı' => 'I', 'į' => 'Į', 'ĭ' => 'Ĭ',
423
+ 'ī' => 'Ī', 'ĩ' => 'Ĩ', 'ħ' => 'Ħ',
424
+ 'ƒ•' => 'ƒ§', 'ƒ£' => 'ƒ¢', 'ƒ°' => 'ƒ ',
425
+ 'ğ' => 'Ğ', 'ĝ' => 'Ĝ', 'ě' => 'Ě',
426
+ 'ę' => 'Ę', 'ė' => 'Ė', 'ĕ' => 'Ĕ',
427
+ 'ē' => 'Ē', 'đ' => 'Đ', 'ď' => 'Ď',
428
+ 'č' => 'Č', 'ċ' => 'Ċ', 'ĉ' => 'Ĉ',
429
+ 'ć' => 'Ć', 'ą' => 'Ą', 'ă' => 'Ă',
430
+ 'ā' => 'Ā', 'ÿ' => 'Ÿ', 'þ' => 'Þ',
431
+ 'ý' => 'Ý', 'ü' => 'Ü', 'û' => 'Û',
432
+ '√∫' => '√ö', '√π' => '√ô', '√∏' => '√ò',
433
+ 'ö' => 'Ö', 'õ' => 'Õ', 'ô' => 'Ô',
434
+ 'ó' => 'Ó', 'ò' => 'Ò', 'ñ' => 'Ñ',
435
+ 'ð' => 'Ð', 'ï' => 'Ï', 'î' => 'Î',
436
+ 'í' => 'Í', 'ì' => 'Ì', 'ë' => 'Ë',
437
+ 'ê' => 'Ê', 'é' => 'É', 'è' => 'È',
438
+ 'ç' => 'Ç', 'æ' => 'Æ', 'å' => 'Å',
439
+ 'ä' => 'Ä', 'ã' => 'Ã', 'â' => 'Â',
440
+ '√°' => '√Å', '√ ' => '√Ä', '¬µ' => 'Œú',
441
+ 'z' => 'Z', 'y' => 'Y', 'x' => 'X',
442
+ 'w' => 'W', 'v' => 'V', 'u' => 'U',
443
+ 't' => 'T', 's' => 'S', 'r' => 'R',
444
+ 'q' => 'Q', 'p' => 'P', 'o' => 'O',
445
+ 'n' => 'N', 'm' => 'M', 'l' => 'L',
446
+ 'k' => 'K', 'j' => 'J', 'i' => 'I',
447
+ 'h' => 'H', 'g' => 'G', 'f' => 'F',
448
+ 'e' => 'E', 'd' => 'D', 'c' => 'C',
449
+ 'b' => 'B', 'a' => 'A',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  );
 
inc/aioseop_functions.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * The aioseop_functions file.
4
  *
5
- * Contains all general functions that are used throughout the plugin.
6
  *
7
  * @package All-in-One-SEO-Pack
8
  * @version 2.3.13
@@ -10,12 +10,8 @@
10
 
11
  if ( ! function_exists( 'aioseop_get_permalink' ) ) {
12
  /**
13
- * AIOSEOP Get Permalink
14
- *
15
  * Support UTF8 URLs.
16
  *
17
- * @since ?
18
- *
19
  * @param int|object|null $post_id The post.
20
  */
21
  function aioseop_get_permalink( $post_id = null ) {
@@ -30,11 +26,7 @@ if ( ! function_exists( 'aioseop_get_permalink' ) ) {
30
 
31
  if ( ! function_exists( 'aioseop_load_modules' ) ) {
32
  /**
33
- * AIOSEOP Load Modules
34
- *
35
  * Load the module manager.
36
- *
37
- * @since ?
38
  */
39
  function aioseop_load_modules() {
40
  global $aioseop_modules, $aioseop_module_list;
@@ -46,10 +38,6 @@ if ( ! function_exists( 'aioseop_load_modules' ) ) {
46
 
47
  if ( ! function_exists( 'aioseop_get_options' ) ) {
48
  /**
49
- * AIOSEOP Get Option
50
- *
51
- * @since ?
52
- *
53
  * @return mixed|void
54
  */
55
  function aioseop_get_options() {
@@ -63,13 +51,9 @@ if ( ! function_exists( 'aioseop_get_options' ) ) {
63
 
64
  if ( ! function_exists( 'aioseop_update_settings_check' ) ) {
65
  /**
66
- * AIOSEOP Update Settings Check
67
- *
68
  * Check if settings need to be updated / migrated from old version.
69
  *
70
  * @TODO See when this is from and if we can move it elsewhere... our new db updates/upgrades class? This is called every single time a page is loaded both on the front-end or backend.
71
- *
72
- * @since ?
73
  */
74
  function aioseop_update_settings_check() {
75
  global $aioseop_options;
@@ -103,13 +87,9 @@ if ( ! function_exists( 'aioseop_update_settings_check' ) ) {
103
 
104
  if ( ! function_exists( 'aioseop_initialize_options' ) ) {
105
  /**
106
- * AIOSEOP Initialize Options
107
- *
108
  * Initialize settings to defaults. Changed name from the abstruse 'aioseop_mrt_mkarry' to 'aioseop_initialize_options'.
109
  *
110
  * @TODO Should also move.
111
- *
112
- * @since ?
113
  */
114
  function aioseop_initialize_options() {
115
  global $aiosp;
@@ -133,14 +113,10 @@ if ( ! function_exists( 'aioseop_initialize_options' ) ) {
133
  }
134
 
135
  if ( ! function_exists( 'aioseop_get_version' ) ) {
136
-
137
  /**
138
- * AIOSEOP Get Version
139
- *
140
  * Returns the version.
141
- * I'm not sure why we have BOTH a function and a constant for this. -mrt
142
  *
143
- * @since ?
144
  *
145
  * @return string
146
  */
@@ -150,15 +126,11 @@ if ( ! function_exists( 'aioseop_get_version' ) ) {
150
  }
151
 
152
  if ( ! function_exists( 'aioseop_option_isset' ) ) {
153
-
154
  /**
155
- * AIOSEOP Option Isset
156
- *
157
  * Checks if an option isset.
158
  *
159
- * @since ?
160
- *
161
  * @param $option
 
162
  * @return bool
163
  */
164
  function aioseop_option_isset( $option ) {
@@ -169,13 +141,9 @@ if ( ! function_exists( 'aioseop_option_isset' ) ) {
169
  }
170
 
171
  if ( ! function_exists( 'aioseop_addmycolumns' ) ) {
172
-
173
  /**
174
- * AIOSEOP Add My Columns
175
- *
176
  * Adds posttype columns.
177
  *
178
- * @since ?
179
  */
180
  function aioseop_addmycolumns() {
181
  global $aioseop_options, $pagenow;
@@ -213,11 +181,8 @@ if ( ! function_exists( 'aioseop_addmycolumns' ) ) {
213
  if ( ! function_exists( 'aioseop_mrt_pcolumns' ) ) {
214
 
215
  /**
216
- * AIOSEOP (MRT) P Columns
217
- *
218
- * @since ?
219
- *
220
  * @param $aioseopc
 
221
  * @return mixed
222
  */
223
  function aioseop_mrt_pcolumns( $aioseopc ) {
@@ -234,11 +199,6 @@ if ( ! function_exists( 'aioseop_mrt_pcolumns' ) ) {
234
 
235
  if ( ! function_exists( 'aioseop_admin_head' ) ) {
236
 
237
- /**
238
- * AIOSEOP Admin Head
239
- *
240
- * @since ?
241
- */
242
  function aioseop_admin_head() {
243
  wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/quickedit_functions.js', array( 'jquery' ), AIOSEOP_VERSION );
244
  ?>
@@ -303,11 +263,6 @@ if ( ! function_exists( 'aioseop_admin_head' ) ) {
303
 
304
  if ( ! function_exists( 'aioseop_handle_ignore_notice' ) ) {
305
 
306
- /**
307
- * AIOSEOP Handle Ignore Notice
308
- *
309
- * @since ?
310
- */
311
  function aioseop_handle_ignore_notice() {
312
 
313
  if ( ! empty( $_GET ) ) {
@@ -327,13 +282,10 @@ if ( ! function_exists( 'aioseop_handle_ignore_notice' ) ) {
327
  if ( ! function_exists( 'aioseop_output_notice' ) ) {
328
 
329
  /**
330
- * AIOSEOP Output Notice
331
- *
332
- * @since ?
333
- *
334
  * @param $message
335
  * @param string $id
336
  * @param string $class
 
337
  * @return bool
338
  */
339
  function aioseop_output_notice( $message, $id = '', $class = 'updated fade' ) {
@@ -354,13 +306,10 @@ if ( ! function_exists( 'aioseop_output_notice' ) ) {
354
  if ( ! function_exists( 'aioseop_output_dismissable_notice' ) ) {
355
 
356
  /**
357
- * AIOSEOP Output Dismissable Notice
358
- *
359
- * @since ?
360
- *
361
  * @param $message
362
  * @param string $id
363
  * @param string $class
 
364
  * @return bool
365
  */
366
  function aioseop_output_dismissable_notice( $message, $id = '', $class = 'updated fade' ) {
@@ -386,9 +335,6 @@ if ( ! function_exists( 'aioseop_output_dismissable_notice' ) ) {
386
 
387
  if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
388
 
389
- /**
390
- * AIOSEOP AJAX Save Meta
391
- */
392
  function aioseop_ajax_save_meta() {
393
  if ( ! empty( $_POST['_inline_edit'] ) && ( $_POST['_inline_edit'] !== 'undefined' ) ) {
394
  check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
@@ -399,8 +345,7 @@ if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
399
  check_ajax_referer( 'aioseop_meta_' . $target . '_' . $post_id, '_nonce' );
400
  $result = '';
401
  if ( in_array(
402
- $target,
403
- array(
404
  'title',
405
  'description',
406
  'keywords',
@@ -435,11 +380,6 @@ if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
435
 
436
  if ( ! function_exists( 'aioseop_ajax_init' ) ) {
437
 
438
- /**
439
- * AIOSEOP AJAX Init
440
- *
441
- * @since ?
442
- */
443
  function aioseop_ajax_init() {
444
  if ( ! empty( $_POST ) && ! empty( $_POST['settings'] ) && ( ! empty( $_POST['nonce-aioseop'] ) || ( ! empty( $_POST['nonce-aioseop-edit'] ) ) ) && ! empty( $_POST['options'] ) ) {
445
  $_POST = stripslashes_deep( $_POST );
@@ -458,13 +398,10 @@ if ( ! function_exists( 'aioseop_ajax_init' ) ) {
458
  }
459
 
460
  /**
461
- * AIOSEOP Embed Handler HTML
462
- *
463
- * @since 2.3a
464
- *
465
  * @param $return
466
  * @param $url
467
  * @param $attr
 
468
  * @return mixed
469
  */
470
  function aioseop_embed_handler_html( $return, $url, $attr ) {
@@ -473,11 +410,6 @@ function aioseop_embed_handler_html( $return, $url, $attr ) {
473
 
474
  if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
475
 
476
- /**
477
- * AIOSEOP AJAX Save URL
478
- *
479
- * @since ?
480
- */
481
  function aioseop_ajax_save_url() {
482
  $valid = true;
483
  $invalid_msg = null;
@@ -520,8 +452,7 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
520
  $module->handle_settings_updates( null );
521
  $options = $module->get_current_options( array(), null );
522
  $output = $module->display_custom_options(
523
- '',
524
- array(
525
  'name' => $prefix . 'addl_pages',
526
  'type' => 'custom',
527
  'save' => true,
@@ -544,11 +475,6 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
544
 
545
  if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
546
 
547
- /**
548
- * AIOSEOP AJAX Delete URL
549
- *
550
- * @since ?
551
- */
552
  function aioseop_ajax_delete_url() {
553
  aioseop_ajax_init();
554
  $options = array();
@@ -575,8 +501,7 @@ if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
575
  $module->handle_settings_updates( null );
576
  $options = $module->get_current_options( array(), null );
577
  $output = $module->display_custom_options(
578
- '',
579
- array(
580
  'name' => 'aiosp_sitemap_addl_pages',
581
  'type' => 'custom',
582
  'save' => true,
@@ -587,7 +512,6 @@ if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
587
  $output = str_replace( "'", "\'", $output );
588
  $output = str_replace( "\n", '\n', $output );
589
  } else {
590
- /* translators: %s is a placeholder and will be replaced with a number. */
591
  $output = sprintf( __( 'Row %s not found; no rows were deleted.', 'all-in-one-seo-pack' ), esc_attr( $options ) );
592
  }
593
  die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
@@ -596,11 +520,6 @@ if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
596
 
597
  if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
598
 
599
- /**
600
- * AIOSEOP AJAX Scan Header
601
- *
602
- * @since ?
603
- */
604
  function aioseop_ajax_scan_header() {
605
  $_POST['options'] = 'foo';
606
  aioseop_ajax_init();
@@ -622,14 +541,8 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
622
  $output = $aiosp->html_string_to_array( $output );
623
  $meta = '';
624
  $metatags = array(
625
- 'facebook' => array(
626
- 'name' => 'property',
627
- 'value' => 'content',
628
- ),
629
- 'twitter' => array(
630
- 'name' => 'name',
631
- 'value' => 'value',
632
- ),
633
  );
634
  $metadata = array(
635
  'facebook' => array(
@@ -657,7 +570,6 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
657
  if ( ! empty( $m[ $tags['name'] ] ) && ! empty( $m[ $tags['value'] ] ) ) {
658
  foreach ( $metadata[ $type ] as $tk => $tv ) {
659
  if ( $m[ $tags['name'] ] == $tv ) {
660
- /* This message is shown when a duplicate meta tag is found. %s is a placeholder and will be replaced with the name of the relevant meta tag. */
661
  $meta .= "<tr><th style='color:red;'>" . sprintf( __( 'Duplicate %s Meta' ), ucwords( $type ) ) . '</th><td>' . ucwords( $tk ) . "</td><td>{$m[$tags['name']]}</td><td>{$m[$tags['value']]}</td></tr>\n";
662
  }
663
  }
@@ -670,12 +582,11 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
670
  $meta = '<span style="color:green;">' . __( 'No duplicate meta tags found.', 'all-in-one-seo-pack' ) . '</span>';
671
  } else {
672
  $meta = "<table cellspacing=0 cellpadding=0 width=80% class='aioseop_table'><tr class='aioseop_table_header'><th>Meta For Site</th><th>Kind of Meta</th><th>Element Name</th><th>Element Value</th></tr>" . $meta . '</table>';
673
- $meta .=
674
- "<p><div class='aioseop_meta_info'><h3 style='padding:5px;margin-bottom:0px;'>" . __( 'What Does This Mean?', 'all-in-one-seo-pack' ) . "</h3><div style='padding:5px;padding-top:0px;'>"
675
- /* 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. */
676
- . '<p>' . sprintf( __( '%s has detected that a plugin(s) or theme is also outputting social meta tags on your site. You can view this social meta in the source code of your site (check your browser help for instructions on how to view source code).', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME )
677
- . '</p><p>' . __( 'You may prefer to use the social meta tags that are being output by the other plugin(s) or theme. If so, then you should deactivate this Social Meta feature in the Feature Manager.', 'all-in-one-seo-pack' )
678
- . '</p><p>' . __( 'You should avoid duplicate social meta tags. You can use these free tools from Facebook and Twitter to validate your social meta and check for errors:', 'all-in-one-seo-pack' ) . '</p>';
679
 
680
  foreach (
681
  array(
@@ -696,11 +607,6 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
696
 
697
  if ( ! function_exists( 'aioseop_ajax_save_settings' ) ) {
698
 
699
- /**
700
- * AIOSEOP AJAX Save Settings
701
- *
702
- * @since ?
703
- */
704
  function aioseop_ajax_save_settings() {
705
  aioseop_ajax_init();
706
  $options = array();
@@ -735,11 +641,6 @@ if ( ! function_exists( 'aioseop_ajax_save_settings' ) ) {
735
 
736
  if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
737
 
738
- /**
739
- * AIOSEOP AJAX Get Menu Links
740
- *
741
- * @since ?
742
- */
743
  function aioseop_ajax_get_menu_links() {
744
  aioseop_ajax_init();
745
  $options = array();
@@ -811,10 +712,6 @@ if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
811
  if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
812
 
813
  /**
814
- * AIOSEOP (MRT) Column
815
- *
816
- * @since ?
817
- *
818
  * @param $aioseopcn
819
  * @param $aioseoppi
820
  */
@@ -836,10 +733,9 @@ if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
836
  if ( current_user_can( 'edit_post', $id ) ) {
837
  ?>
838
  <div class="aioseop_mpc_admin_meta_container">
839
- <div
840
- class="aioseop_mpc_admin_meta_options"
841
- id="aioseop_<?php print $target; ?>_<?php echo $id; ?>"
842
- style="float:left;">
843
  <?php
844
  $content = strip_tags( stripslashes( get_post_meta( $id, '_aioseop_' . $target, true ) ) );
845
  if ( ! empty( $content ) ) :
@@ -865,10 +761,6 @@ if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
865
  if ( ! function_exists( 'aioseop_unprotect_meta' ) ) {
866
 
867
  /**
868
- * AIOSEOP Unprotect Meta
869
- *
870
- * @since ?
871
- *
872
  * @param $protected
873
  * @param $meta_key
874
  * @param $meta_type
@@ -887,11 +779,8 @@ if ( ! function_exists( 'aioseop_unprotect_meta' ) ) {
887
  if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
888
 
889
  /**
890
- * AIOSEOP (MRT) Exclude this Page
891
- *
892
- * @since ?
893
- *
894
  * @param null $url
 
895
  * @return bool
896
  */
897
  function aioseop_mrt_exclude_this_page( $url = null ) {
@@ -921,7 +810,7 @@ if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
921
  if ( $url === null ) {
922
  $url = $_SERVER['REQUEST_URI'];
923
  } else {
924
- $url = wp_parse_url( $url );
925
  if ( ! empty( $url['path'] ) ) {
926
  $url = $url['path'];
927
  } else {
@@ -944,11 +833,8 @@ if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
944
  if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
945
 
946
  /**
947
- * AIOSEOP Add Contact Methods
948
- *
949
- * @since ?
950
- *
951
  * @param $contactmethods
 
952
  * @return mixed
953
  */
954
  function aioseop_add_contactmethods( $contactmethods ) {
@@ -963,10 +849,10 @@ if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
963
  }
964
 
965
  if ( $m->option_isset( 'twitter_creator' ) ) {
966
- $contactmethods['twitter'] = 'Twitter';
967
  }
968
  if ( $m->option_isset( 'facebook_author' ) ) {
969
- $contactmethods['facebook'] = 'Facebook';
970
  }
971
  }
972
  }
@@ -995,24 +881,21 @@ if ( ! function_exists( 'aioseop_localize_script_data' ) ) {
995
 
996
  if ( ! function_exists( 'aioseop_array_insert_after' ) ) {
997
  /**
998
- * AIOSEOP Array Insert After
999
- *
1000
  * Utility function for inserting elements into associative arrays by key.
1001
  *
1002
- * @since ?
1003
- *
1004
  * @param $arr
1005
- * @param $insert_key
1006
- * @param $new_values
 
1007
  * @return array
1008
  */
1009
- function aioseop_array_insert_after( $arr, $insert_key, $new_values ) {
1010
- $keys = array_keys( $arr );
1011
- $vals = array_values( $arr );
1012
- $insert_after = array_search( $insert_key, $keys ) + 1;
1013
- $keys2 = array_splice( $keys, $insert_after );
1014
- $vals2 = array_splice( $vals, $insert_after );
1015
- foreach ( $new_values as $k => $v ) {
1016
  $keys[] = $k;
1017
  $vals[] = $v;
1018
  }
@@ -1022,41 +905,27 @@ if ( ! function_exists( 'aioseop_array_insert_after' ) ) {
1022
  }
1023
 
1024
  if ( ! function_exists( 'fnmatch' ) ) {
1025
-
1026
  /**
1027
- * Filename Match
1028
- *
1029
  * Support for fnmatch() doesn't exist on Windows pre PHP 5.3.
1030
  *
1031
- * @since ?
1032
- *
1033
  * @param $pattern
1034
  * @param $string
 
1035
  * @return int
1036
  */
1037
  function fnmatch( $pattern, $string ) {
1038
  return preg_match(
1039
  '#^' . strtr(
1040
- preg_quote( $pattern, '#' ),
1041
- array(
1042
  '\*' => '.*',
1043
  '\?' => '.',
1044
  )
1045
- ) . '$#i',
1046
- $string
1047
  );
1048
  }
1049
  }
1050
 
1051
  if ( ! function_exists( 'aiosp_log' ) ) {
1052
- /**
1053
- * AIOSEOP Log
1054
- *
1055
- * @since 2.4.10
1056
- *
1057
- * @param $log
1058
- * @param bool $force
1059
- */
1060
  function aiosp_log( $log, $force = false ) {
1061
 
1062
  global $aioseop_options;
@@ -1074,14 +943,11 @@ if ( ! function_exists( 'aiosp_log' ) ) {
1074
 
1075
  if ( ! function_exists( 'parse_ini_string' ) ) {
1076
  /**
1077
- * Parse INI String
1078
- *
1079
  * Parse_ini_string() doesn't exist pre PHP 5.3.
1080
  *
1081
- * @since ?
1082
- *
1083
  * @param $string
1084
  * @param $process_sections
 
1085
  * @return array|bool
1086
  */
1087
  function parse_ini_string( $string, $process_sections ) {
@@ -1096,13 +962,6 @@ if ( ! function_exists( 'parse_ini_string' ) ) {
1096
  // @codingStandardsIgnoreStart
1097
  class parse_ini_filter extends php_user_filter {
1098
  // @codingStandardsIgnoreEnd
1099
- /**
1100
- * Buffer
1101
- *
1102
- * @since ?
1103
- *
1104
- * @var string $buf
1105
- */
1106
  static $buf = '';
1107
 
1108
  /**
@@ -1135,22 +994,13 @@ if ( ! function_exists( 'parse_ini_string' ) ) {
1135
  }
1136
 
1137
  /**
1138
- * AIOSEOP Update User Visibility Notice
1139
- *
1140
- * @since ?
1141
- * @deprecated 3.0
1142
  */
1143
  function aioseop_update_user_visibilitynotice() {
1144
 
1145
  update_user_meta( get_current_user_id(), 'aioseop_visibility_notice_dismissed', true );
1146
  }
1147
 
1148
- /**
1149
- * AIOSEOP Update Yoast Detected Notice
1150
- *
1151
- * @since ?
1152
- * @deprecated 3.0
1153
- */
1154
  function aioseop_update_yst_detected_notice() {
1155
 
1156
  update_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed', true );
@@ -1174,13 +1024,6 @@ function aioseop_home_url( $path = '/' ) {
1174
 
1175
 
1176
  if ( ! function_exists( 'aiosp_include_images' ) ) {
1177
- /**
1178
- * AIOSEOP Include Images
1179
- *
1180
- * @since 2.4.2
1181
- *
1182
- * @return bool
1183
- */
1184
  function aiosp_include_images() {
1185
  if ( false === apply_filters( 'aioseo_include_images_in_sitemap', true ) ) {
1186
  return false;
@@ -1192,7 +1035,7 @@ if ( ! function_exists( 'aiosp_include_images' ) ) {
1192
  isset( $aioseop_options['modules']['aiosp_sitemap_options'] ) &&
1193
  isset( $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images'] ) &&
1194
  'on' === $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images']
1195
- ) {
1196
  return false;
1197
  }
1198
 
@@ -1203,14 +1046,10 @@ if ( ! function_exists( 'aiosp_include_images' ) ) {
1203
 
1204
  if ( ! function_exists( 'aioseop_formatted_date' ) ) {
1205
  /**
1206
- * AIOSEOP Formatted Date
1207
- *
1208
  * Get formatted date. For custom formatting, the user has 2 options:
1209
  * 1. provide the native date_i18n filter.
1210
  * 2. provide a custom aioseop_format_date filter.
1211
  *
1212
- * @since 2.5
1213
- *
1214
  * @param int $date Date in UNIX timestamp format.
1215
  * @param string $format Require date format.
1216
  */
@@ -1228,100 +1067,83 @@ if ( ! function_exists( 'aioseop_formatted_date' ) ) {
1228
  }
1229
 
1230
  /**
1231
- * The aioseop_get_menu_icon() function.
1232
  *
1233
- * Gets the menu icon as a base64 data URI.
1234
  *
1235
- * @since 3.0.0
1236
- * @since 3.2.0 Moved SVG code to dedicated aioseop_get_logo() function.
1237
  *
1238
- * @return string base64 data URI with menu icon.
1239
  */
1240
  if ( ! function_exists( 'aioseop_get_menu_icon' ) ) {
1241
 
1242
  function aioseop_get_menu_icon() {
1243
- return 'data:image/svg+xml;base64,' . base64_encode( aioseop_get_logo( 16, 16, '#A0A5AA' ) );
1244
- }
1245
- }
1246
-
1247
- if ( ! function_exists( 'aioseop_get_logo' ) ) {
1248
- /**
1249
- * The aioseop_get_logo() function.
1250
- *
1251
- * Gets the plugin logo as an SVG in HTML format.
1252
- *
1253
- * @since 3.2.0
1254
- *
1255
- * @return string SVG in HTML format.
1256
- */
1257
- function aioseop_get_logo( $width, $height, $colour_code ) {
1258
- return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
1259
- width="' . $width . '" height="' . $height . '" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
1260
- <g>
1261
- <g>
1262
- <path fill="' . $colour_code . '" d="M6.6356587,16.0348835c-0.0206718,0-0.0413432,0-0.0620155,0
1263
- c-0.067409-0.5687227-0.188632-1.1286116-0.2770367-1.6938677c-0.0116553-0.0745268-0.0655184-0.0857201-0.1188116-0.1016665
1264
- c-0.3916383-0.1171865-0.7678571-0.2725677-1.1279092-0.4651537c-0.0950913-0.0508642-0.1637669-0.0440636-0.2516775,0.0184937
1265
- c-0.4121995,0.2933187-0.8315198,0.5766335-1.2435973,0.8701181c-0.0922408,0.0656958-0.1460404,0.0679903-0.2289517-0.0181942
1266
- c-0.6222079-0.6467686-1.2487767-1.2893686-1.878032-1.9292908c-0.0701602-0.0713491-0.0678169-0.1162405-0.0118753-0.1922131
1267
- c0.3030721-0.4115992,0.5985562-0.8287926,0.9025542-1.2396946c0.0631523-0.0853596,0.0758619-0.1488447,0.0193999-0.2455435
1268
- c-0.2010608-0.344347-0.3531485-0.711894-0.4586703-1.095892C1.8667084,9.8243389,1.8056024,9.7895813,1.6982909,9.7728567
1269
- C1.1987077,9.6949921,0.7006906,9.6068258,0.2005107,9.5332375C0.086966,9.516531,0.0595014,9.4774542,0.0604039,9.3681087
1270
- c0.0040068-0.485467-0.001498-0.9710121-0.0035627-1.4565291c0.0033759-0.4542298,0.0067518-0.9084601,0.0101276-1.36269
1271
- c0.5357779-0.0816574,1.0710917-0.1666121,1.6077318-0.2421441c0.1052274-0.014811,0.1534867-0.0610075,0.1793816-0.156611
1272
- C1.9584855,5.7646813,2.1191192,5.401351,2.3082211,5.0513253c0.0522738-0.0967579,0.0481837-0.162436-0.0161171-0.250216
1273
- C1.9869013,4.3844619,1.6903805,3.9614599,1.3860248,3.5441806c-0.0582591-0.0798743-0.0660335-0.1283553,0.0108961-0.205359
1274
- c0.2363812-0.2366092,0.4708829-0.4750328,0.6985862-0.7207708c0.3790767-0.4091005,0.7861221-0.7921721,1.175601-1.1918454
1275
- c0.073673-0.0756011,0.1193006-0.0768266,0.2023387-0.0167576C3.8918667,1.7121295,4.316906,2.0056617,4.7353082,2.308367
1276
- C4.8231764,2.3719378,4.8931837,2.3785665,4.9881315,2.32724c0.3547778-0.1917841,0.7246637-0.3497989,1.111764-0.4646662
1277
- c0.0834813-0.0247719,0.1245975-0.064445,0.1387806-0.1575147c0.0761976-0.5000092,0.16292-0.9984057,0.2415481-1.4980611
1278
- c0.0154085-0.0979107,0.0362725-0.1528581,0.1583104-0.1525809C7.5273662,0.0564359,8.4162264,0.0512272,9.305047,0.0441977
1279
- c0.1012211-0.0008005,0.1417351,0.0252949,0.1585598,0.1328662C9.53936,0.6614148,9.6292553,1.1435384,9.7077475,1.6274875
1280
- c0.0177774,0.1096017,0.058032,0.1689863,0.1729288,0.1986653c0.3962202,0.102347,0.7708454,0.2639885,1.1316824,0.4550474
1281
- c0.0918427,0.04863,0.1530666,0.0429895,0.2356024-0.017288c0.4170818-0.3046039,0.8413315-0.5994209,1.2571535-0.9056976
1282
- c0.0917759-0.0675981,0.1401968-0.0588857,0.2166672,0.0191574c0.6248131,0.6376669,1.2525311,1.272517,1.883935,1.9036541
1283
- c0.0746508,0.07462,0.0591631,0.1200178,0.0068951,0.1928642c-0.3040953,0.4238276-0.6021757,0.8519745-0.9068089,1.2754121
1284
- c-0.055665,0.0773745-0.062233,0.1379747-0.0156651,0.2230096c0.1986971,0.3628144,0.3654804,0.740099,0.4793482,1.1387706
1285
- c0.0208931,0.0731559,0.0545502,0.1125269,0.1340227,0.124958c0.5150261,0.080555,1.0287666,0.1695499,1.5444088,0.2457719
1286
- c0.1157055,0.0171032,0.1522121,0.0537534,0.1517,0.1727324c-0.0038252,0.8888292-0.0027952,1.7777138,0.0044317,2.6665182
1287
- c0.0009861,0.1212635-0.0400152,0.1560354-0.1516571,0.1713991c-0.506238,0.0696716-1.01122,0.1484213-1.5170298,0.2212944
1288
- c-0.0849352,0.0122366-0.1369514,0.0427141-0.1609879,0.1339951c-0.1068697,0.4058342-0.2684164,0.7910061-0.4649954,1.1610003
1289
- c-0.0476036,0.0895996-0.0424118,0.1538601,0.0197964,0.2369499c0.3095427,0.4134502,0.6102238,0.8335266,0.9184151,1.2480059
1290
- c0.0534544,0.0718899,0.0545559,0.1134748-0.0114231,0.1797924c-0.2578106,0.2591314-0.5192184,0.5143776-0.769351,0.7817802
1291
- c-0.3668623,0.392189-0.7637119,0.7561789-1.1404953,1.1393509c-0.0824919,0.08389-0.1328821,0.0722904-0.217783,0.011488
1292
- c-0.4072781-0.2916708-0.8208151-0.5745983-1.2280502-0.8663273c-0.0825233-0.0591173-0.144722-0.067111-0.236228-0.0173359
1293
- c-0.3357944,0.1826582-0.6816397,0.3475332-1.0514994,0.4474249c-0.1470699,0.0397205-0.2045288,0.1080666-0.2260523,0.2567778
1294
- c-0.0761395,0.5260658-0.1672792,1.0499601-0.2527313,1.5746784c-0.4212217,0.0021896-0.8424425,0.0043812-1.2636642,0.0065708
1295
- c-0.4936438-0.0006676-0.9872875-0.0013523-1.4809322-0.0019608C6.7227592,16.005888,6.6766686,16.0087776,6.6356587,16.0348835z
1296
- M5.5945344,8.0587454c0-0.2738581,0.0047617-0.5478387-0.0023174-0.8215132
1297
- C5.5893402,7.1260171,5.6286783,7.0980015,5.7342682,7.101109c0.2426443,0.0071421,0.485899-0.004355,0.7283907,0.0050206
1298
- C6.582684,7.1107702,6.6087341,7.0694351,6.6071982,6.9564962C6.6010141,6.5018721,6.6034818,6.047111,6.6051793,5.5924091
1299
- C6.6059542,5.3847222,6.7331271,5.2457314,6.9168048,5.244235c0.1906495-0.0015526,0.3085308,0.127861,0.3090096,0.3434582
1300
- C7.2268128,6.0372324,7.2299843,6.486825,7.2238765,6.9362822C7.2222071,7.059145,7.2495227,7.1088743,7.3848124,7.1063519
1301
- c0.439054-0.0081887,0.8784418-0.0078368,1.3175068,0.0000539C8.8253679,7.1086168,8.8466787,7.0647745,8.845252,6.9549446
1302
- C8.8396749,6.5261455,8.8435812,6.0972285,8.8424616,5.6683593c-0.0001907-0.072803,0.0000401-0.1455956,0.0266342-0.213613
1303
- c0.0515699-0.1318998,0.146349-0.2095218,0.2923908-0.2100406C9.3081264,5.244184,9.4056911,5.3223853,9.4531078,5.4547076
1304
- c0.0219107,0.0611463,0.022418,0.1320171,0.0227108,0.1985226c0.0019064,0.4340315,0.004344,0.8681149-0.0010605,1.3020859
1305
- C9.4733648,7.0671229,9.4999199,7.1107302,9.6208115,7.106133c0.2476625-0.0094175,0.496212,0.0041265,0.7438431-0.0057049
1306
- c0.1215019-0.0048237,0.1450939,0.038619,0.1435795,0.1499443c-0.0059738,0.439126,0.0016041,0.8784308-0.0038633,1.3175702
1307
- c-0.0045824,0.3680878-0.0652542,0.7269754-0.226469,1.062129c-0.3337469,0.6938353-0.8668461,1.1507959-1.613966,1.3531427
1308
- c-0.0617809,0.0167313-0.1411858,0.0100212-0.1393509,0.1228523c0.0067186,0.4132614,0.0039825,0.8267059,0.0015554,1.2400627
1309
- c-0.0004635,0.0790262,0.0286264,0.0947142,0.102293,0.0837212c0.888093-0.1325045,1.6820068-0.4789791,2.3410072-1.0896969
1310
- c1.1879272-1.1008902,1.6558428-2.4656649,1.4010391-4.0640707c-0.1778069-1.1154013-0.7301302-2.025878-1.6186838-2.7184963
1311
- c-1.047287-0.8163497-2.2356091-1.1035333-3.5431743-0.8636246C6.1200128,3.893697,5.2326531,4.4406323,4.5548649,5.3104329
1312
- c-0.8100188,1.0394912-1.079107,2.221858-0.8649251,3.5168509c0.1360686,0.8227005,0.491719,1.543438,1.0476153,2.1613245
1313
- c0.7106156,0.7898598,1.5925984,1.2679882,2.6462483,1.4320927c0.1402783,0.0218477,0.1544113-0.0172405,0.1528563-0.1345453
1314
- c-0.0050645-0.3823004-0.0053444-0.7647629,0.0003886-1.1470451c0.0015402-0.1027012-0.0355787-0.1348372-0.131959-0.1631641
1315
- c-0.8400359-0.2468815-1.4050922-0.7891521-1.6920962-1.6152534C5.5662184,8.9382191,5.5952759,8.4963045,5.5945344,8.0587454z"/>
1316
- </g>
1317
- </g>
1318
- </svg>';
1319
  }
1320
  }
1321
 
1322
  /**
1323
- * AIOSEOP Do Shortcodes
1324
- *
1325
  * Runs shortcodes in autogenerated titles & descriptions.
1326
  *
1327
  * @since 3.0.0
@@ -1340,7 +1162,7 @@ function aioseop_do_shortcodes( $content ) {
1340
  // Second check is needed for shortcodes in Gutenberg Classic blocks.
1341
  if ( stripos( $content, $shortcode, 0 ) || 0 === stripos( $content, $shortcode, 0 ) ) {
1342
  global $shortcode_tags;
1343
- $shortcode_tag = str_replace( array( '[', ']' ), '', $shortcode );
1344
  if ( array_key_exists( $shortcode_tag, $shortcode_tags ) ) {
1345
  $rtn_conflict_shortcodes[ $shortcode_tag ] = $shortcode_tags[ $shortcode_tag ];
1346
  }
@@ -1355,8 +1177,6 @@ function aioseop_do_shortcodes( $content ) {
1355
  }
1356
 
1357
  /**
1358
- * AIOSEOP Do Shortcode Helper
1359
- *
1360
  * Ignores shortcodes that are known to conflict.
1361
  * Acts as a helper function for aioseop_do_shortcodes().
1362
  *
@@ -1382,18 +1202,3 @@ function aioseop_do_shortcode_helper( $content, $conflicting_shortcodes ) {
1382
 
1383
  return $content;
1384
  }
1385
-
1386
- /**
1387
- * The aioseop_is_woocommerce_active() function.
1388
- *
1389
- * Checks whether WooCommerce is active.
1390
- *
1391
- * @since 3.2.0
1392
- *
1393
- * @return bool
1394
- */
1395
- if ( ! function_exists( 'aioseop_is_woocommerce_active' ) ) {
1396
- function aioseop_is_woocommerce_active() {
1397
- return class_exists( 'woocommerce' );
1398
- }
1399
- }
1
  <?php
2
  /**
3
+ * General functions file.
4
  *
5
+ * We'll eventually move these to a better place, and figure out ones not being used anymore.
6
  *
7
  * @package All-in-One-SEO-Pack
8
  * @version 2.3.13
10
 
11
  if ( ! function_exists( 'aioseop_get_permalink' ) ) {
12
  /**
 
 
13
  * Support UTF8 URLs.
14
  *
 
 
15
  * @param int|object|null $post_id The post.
16
  */
17
  function aioseop_get_permalink( $post_id = null ) {
26
 
27
  if ( ! function_exists( 'aioseop_load_modules' ) ) {
28
  /**
 
 
29
  * Load the module manager.
 
 
30
  */
31
  function aioseop_load_modules() {
32
  global $aioseop_modules, $aioseop_module_list;
38
 
39
  if ( ! function_exists( 'aioseop_get_options' ) ) {
40
  /**
 
 
 
 
41
  * @return mixed|void
42
  */
43
  function aioseop_get_options() {
51
 
52
  if ( ! function_exists( 'aioseop_update_settings_check' ) ) {
53
  /**
 
 
54
  * Check if settings need to be updated / migrated from old version.
55
  *
56
  * @TODO See when this is from and if we can move it elsewhere... our new db updates/upgrades class? This is called every single time a page is loaded both on the front-end or backend.
 
 
57
  */
58
  function aioseop_update_settings_check() {
59
  global $aioseop_options;
87
 
88
  if ( ! function_exists( 'aioseop_initialize_options' ) ) {
89
  /**
 
 
90
  * Initialize settings to defaults. Changed name from the abstruse 'aioseop_mrt_mkarry' to 'aioseop_initialize_options'.
91
  *
92
  * @TODO Should also move.
 
 
93
  */
94
  function aioseop_initialize_options() {
95
  global $aiosp;
113
  }
114
 
115
  if ( ! function_exists( 'aioseop_get_version' ) ) {
 
116
  /**
 
 
117
  * Returns the version.
 
118
  *
119
+ * I'm not sure why we have BOTH a function and a constant for this. -mrt
120
  *
121
  * @return string
122
  */
126
  }
127
 
128
  if ( ! function_exists( 'aioseop_option_isset' ) ) {
 
129
  /**
 
 
130
  * Checks if an option isset.
131
  *
 
 
132
  * @param $option
133
+ *
134
  * @return bool
135
  */
136
  function aioseop_option_isset( $option ) {
141
  }
142
 
143
  if ( ! function_exists( 'aioseop_addmycolumns' ) ) {
 
144
  /**
 
 
145
  * Adds posttype columns.
146
  *
 
147
  */
148
  function aioseop_addmycolumns() {
149
  global $aioseop_options, $pagenow;
181
  if ( ! function_exists( 'aioseop_mrt_pcolumns' ) ) {
182
 
183
  /**
 
 
 
 
184
  * @param $aioseopc
185
+ *
186
  * @return mixed
187
  */
188
  function aioseop_mrt_pcolumns( $aioseopc ) {
199
 
200
  if ( ! function_exists( 'aioseop_admin_head' ) ) {
201
 
 
 
 
 
 
202
  function aioseop_admin_head() {
203
  wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/quickedit_functions.js', array( 'jquery' ), AIOSEOP_VERSION );
204
  ?>
263
 
264
  if ( ! function_exists( 'aioseop_handle_ignore_notice' ) ) {
265
 
 
 
 
 
 
266
  function aioseop_handle_ignore_notice() {
267
 
268
  if ( ! empty( $_GET ) ) {
282
  if ( ! function_exists( 'aioseop_output_notice' ) ) {
283
 
284
  /**
 
 
 
 
285
  * @param $message
286
  * @param string $id
287
  * @param string $class
288
+ *
289
  * @return bool
290
  */
291
  function aioseop_output_notice( $message, $id = '', $class = 'updated fade' ) {
306
  if ( ! function_exists( 'aioseop_output_dismissable_notice' ) ) {
307
 
308
  /**
 
 
 
 
309
  * @param $message
310
  * @param string $id
311
  * @param string $class
312
+ *
313
  * @return bool
314
  */
315
  function aioseop_output_dismissable_notice( $message, $id = '', $class = 'updated fade' ) {
335
 
336
  if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
337
 
 
 
 
338
  function aioseop_ajax_save_meta() {
339
  if ( ! empty( $_POST['_inline_edit'] ) && ( $_POST['_inline_edit'] !== 'undefined' ) ) {
340
  check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
345
  check_ajax_referer( 'aioseop_meta_' . $target . '_' . $post_id, '_nonce' );
346
  $result = '';
347
  if ( in_array(
348
+ $target, array(
 
349
  'title',
350
  'description',
351
  'keywords',
380
 
381
  if ( ! function_exists( 'aioseop_ajax_init' ) ) {
382
 
 
 
 
 
 
383
  function aioseop_ajax_init() {
384
  if ( ! empty( $_POST ) && ! empty( $_POST['settings'] ) && ( ! empty( $_POST['nonce-aioseop'] ) || ( ! empty( $_POST['nonce-aioseop-edit'] ) ) ) && ! empty( $_POST['options'] ) ) {
385
  $_POST = stripslashes_deep( $_POST );
398
  }
399
 
400
  /**
 
 
 
 
401
  * @param $return
402
  * @param $url
403
  * @param $attr
404
+ *
405
  * @return mixed
406
  */
407
  function aioseop_embed_handler_html( $return, $url, $attr ) {
410
 
411
  if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
412
 
 
 
 
 
 
413
  function aioseop_ajax_save_url() {
414
  $valid = true;
415
  $invalid_msg = null;
452
  $module->handle_settings_updates( null );
453
  $options = $module->get_current_options( array(), null );
454
  $output = $module->display_custom_options(
455
+ '', array(
 
456
  'name' => $prefix . 'addl_pages',
457
  'type' => 'custom',
458
  'save' => true,
475
 
476
  if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
477
 
 
 
 
 
 
478
  function aioseop_ajax_delete_url() {
479
  aioseop_ajax_init();
480
  $options = array();
501
  $module->handle_settings_updates( null );
502
  $options = $module->get_current_options( array(), null );
503
  $output = $module->display_custom_options(
504
+ '', array(
 
505
  'name' => 'aiosp_sitemap_addl_pages',
506
  'type' => 'custom',
507
  'save' => true,
512
  $output = str_replace( "'", "\'", $output );
513
  $output = str_replace( "\n", '\n', $output );
514
  } else {
 
515
  $output = sprintf( __( 'Row %s not found; no rows were deleted.', 'all-in-one-seo-pack' ), esc_attr( $options ) );
516
  }
517
  die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
520
 
521
  if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
522
 
 
 
 
 
 
523
  function aioseop_ajax_scan_header() {
524
  $_POST['options'] = 'foo';
525
  aioseop_ajax_init();
541
  $output = $aiosp->html_string_to_array( $output );
542
  $meta = '';
543
  $metatags = array(
544
+ 'facebook' => array( 'name' => 'property', 'value' => 'content' ),
545
+ 'twitter' => array( 'name' => 'name', 'value' => 'value' ),
 
 
 
 
 
 
546
  );
547
  $metadata = array(
548
  'facebook' => array(
570
  if ( ! empty( $m[ $tags['name'] ] ) && ! empty( $m[ $tags['value'] ] ) ) {
571
  foreach ( $metadata[ $type ] as $tk => $tv ) {
572
  if ( $m[ $tags['name'] ] == $tv ) {
 
573
  $meta .= "<tr><th style='color:red;'>" . sprintf( __( 'Duplicate %s Meta' ), ucwords( $type ) ) . '</th><td>' . ucwords( $tk ) . "</td><td>{$m[$tags['name']]}</td><td>{$m[$tags['value']]}</td></tr>\n";
574
  }
575
  }
582
  $meta = '<span style="color:green;">' . __( 'No duplicate meta tags found.', 'all-in-one-seo-pack' ) . '</span>';
583
  } else {
584
  $meta = "<table cellspacing=0 cellpadding=0 width=80% class='aioseop_table'><tr class='aioseop_table_header'><th>Meta For Site</th><th>Kind of Meta</th><th>Element Name</th><th>Element Value</th></tr>" . $meta . '</table>';
585
+ $meta .= "<p><div class='aioseop_meta_info'><h3 style='padding:5px;margin-bottom:0px;'>" . __( 'What Does This Mean?', 'all-in-one-seo-pack' ) . "</h3><div style='padding:5px;padding-top:0px;'>"
586
+ /* 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. */
587
+ . '<p>' . sprintf( __( '%s has detected that a plugin(s) or theme is also outputting social meta tags on your site. You can view this social meta in the source code of your site (check your browser help for instructions on how to view source code).', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME )
588
+ . '</p><p>' . __( 'You may prefer to use the social meta tags that are being output by the other plugin(s) or theme. If so, then you should deactivate this Social Meta feature in the Feature Manager.', 'all-in-one-seo-pack' )
589
+ . '</p><p>' . __( 'You should avoid duplicate social meta tags. You can use these free tools from Facebook and Twitter to validate your social meta and check for errors:', 'all-in-one-seo-pack' ) . '</p>';
 
590
 
591
  foreach (
592
  array(
607
 
608
  if ( ! function_exists( 'aioseop_ajax_save_settings' ) ) {
609
 
 
 
 
 
 
610
  function aioseop_ajax_save_settings() {
611
  aioseop_ajax_init();
612
  $options = array();
641
 
642
  if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
643
 
 
 
 
 
 
644
  function aioseop_ajax_get_menu_links() {
645
  aioseop_ajax_init();
646
  $options = array();
712
  if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
713
 
714
  /**
 
 
 
 
715
  * @param $aioseopcn
716
  * @param $aioseoppi
717
  */
733
  if ( current_user_can( 'edit_post', $id ) ) {
734
  ?>
735
  <div class="aioseop_mpc_admin_meta_container">
736
+ <div class="aioseop_mpc_admin_meta_options"
737
+ id="aioseop_<?php print $target; ?>_<?php echo $id; ?>"
738
+ style="float:left;">
 
739
  <?php
740
  $content = strip_tags( stripslashes( get_post_meta( $id, '_aioseop_' . $target, true ) ) );
741
  if ( ! empty( $content ) ) :
761
  if ( ! function_exists( 'aioseop_unprotect_meta' ) ) {
762
 
763
  /**
 
 
 
 
764
  * @param $protected
765
  * @param $meta_key
766
  * @param $meta_type
779
  if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
780
 
781
  /**
 
 
 
 
782
  * @param null $url
783
+ *
784
  * @return bool
785
  */
786
  function aioseop_mrt_exclude_this_page( $url = null ) {
810
  if ( $url === null ) {
811
  $url = $_SERVER['REQUEST_URI'];
812
  } else {
813
+ $url = parse_url( $url );
814
  if ( ! empty( $url['path'] ) ) {
815
  $url = $url['path'];
816
  } else {
833
  if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
834
 
835
  /**
 
 
 
 
836
  * @param $contactmethods
837
+ *
838
  * @return mixed
839
  */
840
  function aioseop_add_contactmethods( $contactmethods ) {
849
  }
850
 
851
  if ( $m->option_isset( 'twitter_creator' ) ) {
852
+ $contactmethods['twitter'] = __( 'Twitter', 'all-in-one-seo-pack' );
853
  }
854
  if ( $m->option_isset( 'facebook_author' ) ) {
855
+ $contactmethods['facebook'] = __( 'Facebook', 'all-in-one-seo-pack' );
856
  }
857
  }
858
  }
881
 
882
  if ( ! function_exists( 'aioseop_array_insert_after' ) ) {
883
  /**
 
 
884
  * Utility function for inserting elements into associative arrays by key.
885
  *
 
 
886
  * @param $arr
887
+ * @param $insertKey
888
+ * @param $newValues
889
+ *
890
  * @return array
891
  */
892
+ function aioseop_array_insert_after( $arr, $insertKey, $newValues ) {
893
+ $keys = array_keys( $arr );
894
+ $vals = array_values( $arr );
895
+ $insertAfter = array_search( $insertKey, $keys ) + 1;
896
+ $keys2 = array_splice( $keys, $insertAfter );
897
+ $vals2 = array_splice( $vals, $insertAfter );
898
+ foreach ( $newValues as $k => $v ) {
899
  $keys[] = $k;
900
  $vals[] = $v;
901
  }
905
  }
906
 
907
  if ( ! function_exists( 'fnmatch' ) ) {
 
908
  /**
 
 
909
  * Support for fnmatch() doesn't exist on Windows pre PHP 5.3.
910
  *
 
 
911
  * @param $pattern
912
  * @param $string
913
+ *
914
  * @return int
915
  */
916
  function fnmatch( $pattern, $string ) {
917
  return preg_match(
918
  '#^' . strtr(
919
+ preg_quote( $pattern, '#' ), array(
 
920
  '\*' => '.*',
921
  '\?' => '.',
922
  )
923
+ ) . '$#i', $string
 
924
  );
925
  }
926
  }
927
 
928
  if ( ! function_exists( 'aiosp_log' ) ) {
 
 
 
 
 
 
 
 
929
  function aiosp_log( $log, $force = false ) {
930
 
931
  global $aioseop_options;
943
 
944
  if ( ! function_exists( 'parse_ini_string' ) ) {
945
  /**
 
 
946
  * Parse_ini_string() doesn't exist pre PHP 5.3.
947
  *
 
 
948
  * @param $string
949
  * @param $process_sections
950
+ *
951
  * @return array|bool
952
  */
953
  function parse_ini_string( $string, $process_sections ) {
962
  // @codingStandardsIgnoreStart
963
  class parse_ini_filter extends php_user_filter {
964
  // @codingStandardsIgnoreEnd
 
 
 
 
 
 
 
965
  static $buf = '';
966
 
967
  /**
994
  }
995
 
996
  /**
997
+ * @deprecated 2.4.2
 
 
 
998
  */
999
  function aioseop_update_user_visibilitynotice() {
1000
 
1001
  update_user_meta( get_current_user_id(), 'aioseop_visibility_notice_dismissed', true );
1002
  }
1003
 
 
 
 
 
 
 
1004
  function aioseop_update_yst_detected_notice() {
1005
 
1006
  update_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed', true );
1024
 
1025
 
1026
  if ( ! function_exists( 'aiosp_include_images' ) ) {
 
 
 
 
 
 
 
1027
  function aiosp_include_images() {
1028
  if ( false === apply_filters( 'aioseo_include_images_in_sitemap', true ) ) {
1029
  return false;
1035
  isset( $aioseop_options['modules']['aiosp_sitemap_options'] ) &&
1036
  isset( $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images'] ) &&
1037
  'on' === $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images']
1038
+ ) {
1039
  return false;
1040
  }
1041
 
1046
 
1047
  if ( ! function_exists( 'aioseop_formatted_date' ) ) {
1048
  /**
 
 
1049
  * Get formatted date. For custom formatting, the user has 2 options:
1050
  * 1. provide the native date_i18n filter.
1051
  * 2. provide a custom aioseop_format_date filter.
1052
  *
 
 
1053
  * @param int $date Date in UNIX timestamp format.
1054
  * @param string $format Require date format.
1055
  */
1067
  }
1068
 
1069
  /**
1070
+ * SVG menu icon function.
1071
  *
1072
+ * Returns a base64 data URI for the SVG icon in the menu.
1073
  *
1074
+ * @since 3.0
 
1075
  *
1076
+ * @return string
1077
  */
1078
  if ( ! function_exists( 'aioseop_get_menu_icon' ) ) {
1079
 
1080
  function aioseop_get_menu_icon() {
1081
+ $svg = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
1082
+ width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
1083
+ <g>
1084
+ <g>
1085
+ <path fill="#a0a5aa" d="M6.6356587,16.0348835c-0.0206718,0-0.0413432,0-0.0620155,0
1086
+ c-0.067409-0.5687227-0.188632-1.1286116-0.2770367-1.6938677c-0.0116553-0.0745268-0.0655184-0.0857201-0.1188116-0.1016665
1087
+ c-0.3916383-0.1171865-0.7678571-0.2725677-1.1279092-0.4651537c-0.0950913-0.0508642-0.1637669-0.0440636-0.2516775,0.0184937
1088
+ c-0.4121995,0.2933187-0.8315198,0.5766335-1.2435973,0.8701181c-0.0922408,0.0656958-0.1460404,0.0679903-0.2289517-0.0181942
1089
+ c-0.6222079-0.6467686-1.2487767-1.2893686-1.878032-1.9292908c-0.0701602-0.0713491-0.0678169-0.1162405-0.0118753-0.1922131
1090
+ c0.3030721-0.4115992,0.5985562-0.8287926,0.9025542-1.2396946c0.0631523-0.0853596,0.0758619-0.1488447,0.0193999-0.2455435
1091
+ c-0.2010608-0.344347-0.3531485-0.711894-0.4586703-1.095892C1.8667084,9.8243389,1.8056024,9.7895813,1.6982909,9.7728567
1092
+ C1.1987077,9.6949921,0.7006906,9.6068258,0.2005107,9.5332375C0.086966,9.516531,0.0595014,9.4774542,0.0604039,9.3681087
1093
+ c0.0040068-0.485467-0.001498-0.9710121-0.0035627-1.4565291c0.0033759-0.4542298,0.0067518-0.9084601,0.0101276-1.36269
1094
+ c0.5357779-0.0816574,1.0710917-0.1666121,1.6077318-0.2421441c0.1052274-0.014811,0.1534867-0.0610075,0.1793816-0.156611
1095
+ C1.9584855,5.7646813,2.1191192,5.401351,2.3082211,5.0513253c0.0522738-0.0967579,0.0481837-0.162436-0.0161171-0.250216
1096
+ C1.9869013,4.3844619,1.6903805,3.9614599,1.3860248,3.5441806c-0.0582591-0.0798743-0.0660335-0.1283553,0.0108961-0.205359
1097
+ c0.2363812-0.2366092,0.4708829-0.4750328,0.6985862-0.7207708c0.3790767-0.4091005,0.7861221-0.7921721,1.175601-1.1918454
1098
+ c0.073673-0.0756011,0.1193006-0.0768266,0.2023387-0.0167576C3.8918667,1.7121295,4.316906,2.0056617,4.7353082,2.308367
1099
+ C4.8231764,2.3719378,4.8931837,2.3785665,4.9881315,2.32724c0.3547778-0.1917841,0.7246637-0.3497989,1.111764-0.4646662
1100
+ c0.0834813-0.0247719,0.1245975-0.064445,0.1387806-0.1575147c0.0761976-0.5000092,0.16292-0.9984057,0.2415481-1.4980611
1101
+ c0.0154085-0.0979107,0.0362725-0.1528581,0.1583104-0.1525809C7.5273662,0.0564359,8.4162264,0.0512272,9.305047,0.0441977
1102
+ c0.1012211-0.0008005,0.1417351,0.0252949,0.1585598,0.1328662C9.53936,0.6614148,9.6292553,1.1435384,9.7077475,1.6274875
1103
+ c0.0177774,0.1096017,0.058032,0.1689863,0.1729288,0.1986653c0.3962202,0.102347,0.7708454,0.2639885,1.1316824,0.4550474
1104
+ c0.0918427,0.04863,0.1530666,0.0429895,0.2356024-0.017288c0.4170818-0.3046039,0.8413315-0.5994209,1.2571535-0.9056976
1105
+ c0.0917759-0.0675981,0.1401968-0.0588857,0.2166672,0.0191574c0.6248131,0.6376669,1.2525311,1.272517,1.883935,1.9036541
1106
+ c0.0746508,0.07462,0.0591631,0.1200178,0.0068951,0.1928642c-0.3040953,0.4238276-0.6021757,0.8519745-0.9068089,1.2754121
1107
+ c-0.055665,0.0773745-0.062233,0.1379747-0.0156651,0.2230096c0.1986971,0.3628144,0.3654804,0.740099,0.4793482,1.1387706
1108
+ c0.0208931,0.0731559,0.0545502,0.1125269,0.1340227,0.124958c0.5150261,0.080555,1.0287666,0.1695499,1.5444088,0.2457719
1109
+ c0.1157055,0.0171032,0.1522121,0.0537534,0.1517,0.1727324c-0.0038252,0.8888292-0.0027952,1.7777138,0.0044317,2.6665182
1110
+ c0.0009861,0.1212635-0.0400152,0.1560354-0.1516571,0.1713991c-0.506238,0.0696716-1.01122,0.1484213-1.5170298,0.2212944
1111
+ c-0.0849352,0.0122366-0.1369514,0.0427141-0.1609879,0.1339951c-0.1068697,0.4058342-0.2684164,0.7910061-0.4649954,1.1610003
1112
+ c-0.0476036,0.0895996-0.0424118,0.1538601,0.0197964,0.2369499c0.3095427,0.4134502,0.6102238,0.8335266,0.9184151,1.2480059
1113
+ c0.0534544,0.0718899,0.0545559,0.1134748-0.0114231,0.1797924c-0.2578106,0.2591314-0.5192184,0.5143776-0.769351,0.7817802
1114
+ c-0.3668623,0.392189-0.7637119,0.7561789-1.1404953,1.1393509c-0.0824919,0.08389-0.1328821,0.0722904-0.217783,0.011488
1115
+ c-0.4072781-0.2916708-0.8208151-0.5745983-1.2280502-0.8663273c-0.0825233-0.0591173-0.144722-0.067111-0.236228-0.0173359
1116
+ c-0.3357944,0.1826582-0.6816397,0.3475332-1.0514994,0.4474249c-0.1470699,0.0397205-0.2045288,0.1080666-0.2260523,0.2567778
1117
+ c-0.0761395,0.5260658-0.1672792,1.0499601-0.2527313,1.5746784c-0.4212217,0.0021896-0.8424425,0.0043812-1.2636642,0.0065708
1118
+ c-0.4936438-0.0006676-0.9872875-0.0013523-1.4809322-0.0019608C6.7227592,16.005888,6.6766686,16.0087776,6.6356587,16.0348835z
1119
+ M5.5945344,8.0587454c0-0.2738581,0.0047617-0.5478387-0.0023174-0.8215132
1120
+ C5.5893402,7.1260171,5.6286783,7.0980015,5.7342682,7.101109c0.2426443,0.0071421,0.485899-0.004355,0.7283907,0.0050206
1121
+ C6.582684,7.1107702,6.6087341,7.0694351,6.6071982,6.9564962C6.6010141,6.5018721,6.6034818,6.047111,6.6051793,5.5924091
1122
+ C6.6059542,5.3847222,6.7331271,5.2457314,6.9168048,5.244235c0.1906495-0.0015526,0.3085308,0.127861,0.3090096,0.3434582
1123
+ C7.2268128,6.0372324,7.2299843,6.486825,7.2238765,6.9362822C7.2222071,7.059145,7.2495227,7.1088743,7.3848124,7.1063519
1124
+ c0.439054-0.0081887,0.8784418-0.0078368,1.3175068,0.0000539C8.8253679,7.1086168,8.8466787,7.0647745,8.845252,6.9549446
1125
+ C8.8396749,6.5261455,8.8435812,6.0972285,8.8424616,5.6683593c-0.0001907-0.072803,0.0000401-0.1455956,0.0266342-0.213613
1126
+ c0.0515699-0.1318998,0.146349-0.2095218,0.2923908-0.2100406C9.3081264,5.244184,9.4056911,5.3223853,9.4531078,5.4547076
1127
+ c0.0219107,0.0611463,0.022418,0.1320171,0.0227108,0.1985226c0.0019064,0.4340315,0.004344,0.8681149-0.0010605,1.3020859
1128
+ C9.4733648,7.0671229,9.4999199,7.1107302,9.6208115,7.106133c0.2476625-0.0094175,0.496212,0.0041265,0.7438431-0.0057049
1129
+ c0.1215019-0.0048237,0.1450939,0.038619,0.1435795,0.1499443c-0.0059738,0.439126,0.0016041,0.8784308-0.0038633,1.3175702
1130
+ c-0.0045824,0.3680878-0.0652542,0.7269754-0.226469,1.062129c-0.3337469,0.6938353-0.8668461,1.1507959-1.613966,1.3531427
1131
+ c-0.0617809,0.0167313-0.1411858,0.0100212-0.1393509,0.1228523c0.0067186,0.4132614,0.0039825,0.8267059,0.0015554,1.2400627
1132
+ c-0.0004635,0.0790262,0.0286264,0.0947142,0.102293,0.0837212c0.888093-0.1325045,1.6820068-0.4789791,2.3410072-1.0896969
1133
+ c1.1879272-1.1008902,1.6558428-2.4656649,1.4010391-4.0640707c-0.1778069-1.1154013-0.7301302-2.025878-1.6186838-2.7184963
1134
+ c-1.047287-0.8163497-2.2356091-1.1035333-3.5431743-0.8636246C6.1200128,3.893697,5.2326531,4.4406323,4.5548649,5.3104329
1135
+ c-0.8100188,1.0394912-1.079107,2.221858-0.8649251,3.5168509c0.1360686,0.8227005,0.491719,1.543438,1.0476153,2.1613245
1136
+ c0.7106156,0.7898598,1.5925984,1.2679882,2.6462483,1.4320927c0.1402783,0.0218477,0.1544113-0.0172405,0.1528563-0.1345453
1137
+ c-0.0050645-0.3823004-0.0053444-0.7647629,0.0003886-1.1470451c0.0015402-0.1027012-0.0355787-0.1348372-0.131959-0.1631641
1138
+ c-0.8400359-0.2468815-1.4050922-0.7891521-1.6920962-1.6152534C5.5662184,8.9382191,5.5952759,8.4963045,5.5945344,8.0587454z"/>
1139
+ </g>
1140
+ </g>
1141
+ </svg>';
1142
+ return 'data:image/svg+xml;base64,' . base64_encode( $svg );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1143
  }
1144
  }
1145
 
1146
  /**
 
 
1147
  * Runs shortcodes in autogenerated titles & descriptions.
1148
  *
1149
  * @since 3.0.0
1162
  // Second check is needed for shortcodes in Gutenberg Classic blocks.
1163
  if ( stripos( $content, $shortcode, 0 ) || 0 === stripos( $content, $shortcode, 0 ) ) {
1164
  global $shortcode_tags;
1165
+ $shortcode_tag = str_replace( array('[', ']'), '', $shortcode );
1166
  if ( array_key_exists( $shortcode_tag, $shortcode_tags ) ) {
1167
  $rtn_conflict_shortcodes[ $shortcode_tag ] = $shortcode_tags[ $shortcode_tag ];
1168
  }
1177
  }
1178
 
1179
  /**
 
 
1180
  * Ignores shortcodes that are known to conflict.
1181
  * Acts as a helper function for aioseop_do_shortcodes().
1182
  *
1202
 
1203
  return $content;
1204
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/aioseop_updates_class.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * AIOSEOP Updates Class
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
 
9
  /**
10
  * Handles detection of new plugin version updates.
@@ -19,6 +13,7 @@ class AIOSEOP_Updates {
19
 
20
  /**
21
  * Constructor
 
22
  */
23
  function __construct() {
24
 
@@ -138,18 +133,6 @@ class AIOSEOP_Updates {
138
  ) {
139
  $this->reset_review_notice_201906();
140
  }
141
-
142
- if (
143
- version_compare( $old_version, '3.1', '<' )
144
- ) {
145
- $this->reset_flush_rewrite_rules_201906();
146
- }
147
-
148
- if (
149
- version_compare( $old_version, '3.2', '<' )
150
- ) {
151
- $this->update_schema_markup();
152
- }
153
  }
154
 
155
  /**
@@ -169,9 +152,7 @@ class AIOSEOP_Updates {
169
  array(
170
  "DOC\r\n",
171
  "DOC\n",
172
- ),
173
- '',
174
- $list
175
  );
176
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
177
  update_option( 'aioseop_options', $aioseop_options );
@@ -199,9 +180,7 @@ class AIOSEOP_Updates {
199
  array(
200
  "yandex\r\n",
201
  "yandex\n",
202
- ),
203
- '',
204
- $list
205
  );
206
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
207
  update_option( 'aioseop_options', $aioseop_options );
@@ -225,9 +204,7 @@ class AIOSEOP_Updates {
225
  array(
226
  "SeznamBot\r\n",
227
  "SeznamBot\n",
228
- ),
229
- '',
230
- $list
231
  );
232
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
233
  update_option( 'aioseop_options', $aioseop_options );
@@ -251,9 +228,7 @@ class AIOSEOP_Updates {
251
  array(
252
  "SemrushBot\r\n",
253
  "SemrushBot\n",
254
- ),
255
- '',
256
- $list
257
  );
258
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
259
  update_option( 'aioseop_options', $aioseop_options );
@@ -276,9 +251,7 @@ class AIOSEOP_Updates {
276
  array(
277
  "Exabot\r\n",
278
  "Exabot\n",
279
- ),
280
- '',
281
- $list
282
  );
283
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
284
  update_option( 'aioseop_options', $aioseop_options );
@@ -352,67 +325,4 @@ class AIOSEOP_Updates {
352
  $aioseop_notices->reset_notice( 'review_plugin' );
353
  $aioseop_notices->remove_notice( 'review_plugin' );
354
  }
355
-
356
- /**
357
- * Flushes rewrite rules for XML Sitemap URL changes
358
- *
359
- * @since 3.1
360
- */
361
- public function reset_flush_rewrite_rules_201906() {
362
- add_action( 'shutdown', 'flush_rewrite_rules' );
363
- }
364
-
365
- /**
366
- * Update to add schema markup settings.
367
- *
368
- * @since 3.2
369
- */
370
- public function update_schema_markup() {
371
- global $aiosp;
372
- global $aioseop_options;
373
-
374
- $update_values = array(
375
- 'aiosp_schema_markup' => '1',
376
- 'aiosp_schema_search_results_page' => '1',
377
- 'aiosp_schema_social_profile_links' => '',
378
- 'aiosp_schema_site_represents' => 'organization',
379
- 'aiosp_schema_organization_name' => '',
380
- 'aiosp_schema_organization_logo' => '',
381
- 'aiosp_schema_person_user' => '1',
382
- 'aiosp_schema_phone_number' => '',
383
- 'aiosp_schema_contact_type' => 'none',
384
- );
385
-
386
- if ( isset( $aioseop_options['aiosp_schema_markup'] ) ) {
387
- if ( empty( $aioseop_options['aiosp_schema_markup'] ) || 'off' === $aioseop_options['aiosp_schema_markup'] ) {
388
- $update_values['aiosp_schema_markup'] = '0';
389
- }
390
- }
391
- if ( isset( $aioseop_options['aiosp_google_sitelinks_search'] ) ) {
392
- if ( empty( $aioseop_options['aiosp_google_sitelinks_search'] ) || 'off' === $aioseop_options['aiosp_google_sitelinks_search'] ) {
393
- $update_values['aiosp_schema_search_results_page'] = '0';
394
- }
395
- }
396
- if ( isset( $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_profile_links'] ) ) {
397
- $update_values['aiosp_schema_social_profile_links'] = $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_profile_links'];
398
- }
399
- if ( isset( $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_person_or_org'] ) ) {
400
- if ( 'person' === $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_person_or_org'] ) {
401
- $update_values['aiosp_schema_site_represents'] = 'person';
402
- }
403
- }
404
- if ( isset( $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_social_name'] ) ) {
405
- $update_values['aiosp_schema_organization_name'] = $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_social_name'];
406
- }
407
-
408
- // Add/update values to options.
409
- foreach ( $update_values as $key => $value ) {
410
- $aioseop_options[ $key ] = $value;
411
- }
412
-
413
- $aiosp->update_class_option( $aioseop_options );
414
- }
415
-
416
  }
417
-
418
-
1
  <?php
 
 
 
 
 
 
2
 
3
  /**
4
  * Handles detection of new plugin version updates.
13
 
14
  /**
15
  * Constructor
16
+ *
17
  */
18
  function __construct() {
19
 
133
  ) {
134
  $this->reset_review_notice_201906();
135
  }
 
 
 
 
 
 
 
 
 
 
 
 
136
  }
137
 
138
  /**
152
  array(
153
  "DOC\r\n",
154
  "DOC\n",
155
+ ), '', $list
 
 
156
  );
157
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
158
  update_option( 'aioseop_options', $aioseop_options );
180
  array(
181
  "yandex\r\n",
182
  "yandex\n",
183
+ ), '', $list
 
 
184
  );
185
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
186
  update_option( 'aioseop_options', $aioseop_options );
204
  array(
205
  "SeznamBot\r\n",
206
  "SeznamBot\n",
207
+ ), '', $list
 
 
208
  );
209
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
210
  update_option( 'aioseop_options', $aioseop_options );
228
  array(
229
  "SemrushBot\r\n",
230
  "SemrushBot\n",
231
+ ), '', $list
 
 
232
  );
233
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
234
  update_option( 'aioseop_options', $aioseop_options );
251
  array(
252
  "Exabot\r\n",
253
  "Exabot\n",
254
+ ), '', $list
 
 
255
  );
256
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
257
  update_option( 'aioseop_options', $aioseop_options );
325
  $aioseop_notices->reset_notice( 'review_plugin' );
326
  $aioseop_notices->remove_notice( 'review_plugin' );
327
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  }
 
 
inc/aiosp_common.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
 
2
  /**
3
- * AIOSEOP Common
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
 
9
  /**
@@ -17,8 +15,6 @@ class aiosp_common {
17
  // @codingStandardsIgnoreEnd
18
 
19
  /**
20
- * Attachment URL => PostIDs
21
- *
22
  * @var null|array
23
  *
24
  * @since 2.9.2
@@ -26,20 +22,15 @@ class aiosp_common {
26
  public static $attachment_url_postids = null;
27
 
28
  /**
29
- * Constructor
30
  *
31
- * @since 2.3.3
32
  */
33
  function __construct() {
34
 
35
  }
36
 
37
  /**
38
- * Clear WPE Cache
39
- *
40
  * Clears WP Engine cache.
41
- *
42
- * @since 2.4.10
43
  */
44
  static function clear_wpe_cache() {
45
  if ( class_exists( 'WpeCommon' ) ) {
@@ -50,11 +41,8 @@ class aiosp_common {
50
  }
51
 
52
  /**
53
- * Get Blog Page
54
- *
55
- * @since 2.3.3
56
- *
57
  * @param null $p
 
58
  * @return array|null|string|WP_Post
59
  */
60
  static function get_blog_page( $p = null ) {
@@ -78,26 +66,23 @@ class aiosp_common {
78
  }
79
 
80
  /**
81
- * Get Upgrade Hyperlink
82
- *
83
- * @since 2.3.3
84
- *
85
  * @param string $location
86
  * @param string $title
87
  * @param string $anchor
88
  * @param string $target
89
  * @param string $class
90
  * @param string $id
 
91
  * @return string
92
  */
93
  static function get_upgrade_hyperlink( $location = '', $title = '', $anchor = '', $target = '', $class = '', $id = 'aio-pro-update' ) {
94
 
95
  $affiliate_id = '';
96
 
97
- // call during plugins_loaded.
98
  $affiliate_id = apply_filters( 'aiosp_aff_id', $affiliate_id );
99
 
100
- // build URL.
101
  $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
102
  if ( $location ) {
103
  $url .= '?loc=' . $location;
@@ -106,7 +91,7 @@ class aiosp_common {
106
  $url .= "?ap_id=$affiliate_id";
107
  }
108
 
109
- // build hyperlink.
110
  $hyperlink = '<a ';
111
  if ( $target ) {
112
  $hyperlink .= "target=\"$target\" ";
@@ -124,31 +109,24 @@ class aiosp_common {
124
  }
125
 
126
  /**
127
- * Get Upgrade URL
128
- *
129
  * Gets the upgrade to Pro version URL.
130
- *
131
- * @since 2.3.3
132
  */
133
  static function get_upgrade_url() {
134
- // put build URL stuff in here.
135
  }
136
 
137
  /**
138
- * Absolutize URL
139
- *
140
  * Check whether a url is relative and if it is, make it absolute.
141
  *
142
- * @since 2.4.2
143
- *
144
  * @param string $url URL to check.
 
145
  * @return string
146
  */
147
  static function absolutize_url( $url ) {
148
  if ( 0 !== strpos( $url, 'http' ) && '/' !== $url ) {
149
  if ( 0 === strpos( $url, '//' ) ) {
150
  // for //<host>/resource type urls.
151
- $scheme = wp_parse_url( home_url(), PHP_URL_SCHEME );
152
  $url = $scheme . ':' . $url;
153
  } else {
154
  // for /resource type urls.
@@ -159,17 +137,14 @@ class aiosp_common {
159
  }
160
 
161
  /**
162
- * Make URL Valid Smartly
163
- *
164
  * Check whether a url is relative (does not contain a . before the first /) or absolute and makes it a valid url.
165
  *
166
- * @since 2.8
167
- *
168
  * @param string $url URL to check.
 
169
  * @return string
170
  */
171
  static function make_url_valid_smartly( $url ) {
172
- $scheme = wp_parse_url( home_url(), PHP_URL_SCHEME );
173
  if ( 0 !== strpos( $url, 'http' ) ) {
174
  if ( 0 === strpos( $url, '//' ) ) {
175
  // for //<host>/resource type urls.
@@ -192,13 +167,10 @@ class aiosp_common {
192
  }
193
 
194
  /**
195
- * Is URL Valid
196
- *
197
  * Check whether a url is valid.
198
  *
199
- * @since 2.8
200
- *
201
  * @param string $url URL to check.
 
202
  * @return bool
203
  */
204
  public static function is_url_valid( $url ) {
@@ -206,11 +178,7 @@ class aiosp_common {
206
  }
207
 
208
  /**
209
- * Make XML Safe
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.
@@ -299,7 +267,6 @@ class aiosp_common {
299
  $id = intval( $results_1[ $url_md5 ] );
300
  }
301
 
302
- // phpcs:disable Squiz.Commenting.InlineComment.InvalidEndChar
303
  // TODO Add setting to enable; this is TOO MEMORY INTENSE which could result in 1 or more crashes,
304
  // TODO however some may still need custom image URLs.
305
  // TODO NOTE: Transient data does prevent continual crashes.
@@ -315,7 +282,6 @@ class aiosp_common {
315
  // $id = intval( $results_2[ $url_md5 ] );
316
  // }
317
  // }
318
- // phpcs:enable
319
  }
320
 
321
  self::$attachment_url_postids[ $url_md5 ] = $id;
@@ -332,8 +298,6 @@ class aiosp_common {
332
  }
333
 
334
  /**
335
- * Set Transient URL Post IDs
336
- *
337
  * Sets the transient data at the last hook instead at every call.
338
  *
339
  * @see set_transient()
1
  <?php
2
+
3
  /**
4
+ * @package All-in-One-SEO-Pack
 
 
 
5
  */
6
 
7
  /**
15
  // @codingStandardsIgnoreEnd
16
 
17
  /**
 
 
18
  * @var null|array
19
  *
20
  * @since 2.9.2
22
  public static $attachment_url_postids = null;
23
 
24
  /**
25
+ * aiosp_common constructor.
26
  *
 
27
  */
28
  function __construct() {
29
 
30
  }
31
 
32
  /**
 
 
33
  * Clears WP Engine cache.
 
 
34
  */
35
  static function clear_wpe_cache() {
36
  if ( class_exists( 'WpeCommon' ) ) {
41
  }
42
 
43
  /**
 
 
 
 
44
  * @param null $p
45
+ *
46
  * @return array|null|string|WP_Post
47
  */
48
  static function get_blog_page( $p = null ) {
66
  }
67
 
68
  /**
 
 
 
 
69
  * @param string $location
70
  * @param string $title
71
  * @param string $anchor
72
  * @param string $target
73
  * @param string $class
74
  * @param string $id
75
+ *
76
  * @return string
77
  */
78
  static function get_upgrade_hyperlink( $location = '', $title = '', $anchor = '', $target = '', $class = '', $id = 'aio-pro-update' ) {
79
 
80
  $affiliate_id = '';
81
 
82
+ // call during plugins_loaded
83
  $affiliate_id = apply_filters( 'aiosp_aff_id', $affiliate_id );
84
 
85
+ // build URL
86
  $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
87
  if ( $location ) {
88
  $url .= '?loc=' . $location;
91
  $url .= "?ap_id=$affiliate_id";
92
  }
93
 
94
+ // build hyperlink
95
  $hyperlink = '<a ';
96
  if ( $target ) {
97
  $hyperlink .= "target=\"$target\" ";
109
  }
110
 
111
  /**
 
 
112
  * Gets the upgrade to Pro version URL.
 
 
113
  */
114
  static function get_upgrade_url() {
115
+ // put build URL stuff in here
116
  }
117
 
118
  /**
 
 
119
  * Check whether a url is relative and if it is, make it absolute.
120
  *
 
 
121
  * @param string $url URL to check.
122
+ *
123
  * @return string
124
  */
125
  static function absolutize_url( $url ) {
126
  if ( 0 !== strpos( $url, 'http' ) && '/' !== $url ) {
127
  if ( 0 === strpos( $url, '//' ) ) {
128
  // for //<host>/resource type urls.
129
+ $scheme = parse_url( home_url(), PHP_URL_SCHEME );
130
  $url = $scheme . ':' . $url;
131
  } else {
132
  // for /resource type urls.
137
  }
138
 
139
  /**
 
 
140
  * Check whether a url is relative (does not contain a . before the first /) or absolute and makes it a valid url.
141
  *
 
 
142
  * @param string $url URL to check.
143
+ *
144
  * @return string
145
  */
146
  static function make_url_valid_smartly( $url ) {
147
+ $scheme = parse_url( home_url(), PHP_URL_SCHEME );
148
  if ( 0 !== strpos( $url, 'http' ) ) {
149
  if ( 0 === strpos( $url, '//' ) ) {
150
  // for //<host>/resource type urls.
167
  }
168
 
169
  /**
 
 
170
  * Check whether a url is valid.
171
  *
 
 
172
  * @param string $url URL to check.
173
+ *
174
  * @return bool
175
  */
176
  public static function is_url_valid( $url ) {
178
  }
179
 
180
  /**
 
 
181
  * Renders the value XML safe.
 
 
182
  */
183
  public static function make_xml_safe( $tag, $value ) {
184
  // some tags contain an array of values.
267
  $id = intval( $results_1[ $url_md5 ] );
268
  }
269
 
 
270
  // TODO Add setting to enable; this is TOO MEMORY INTENSE which could result in 1 or more crashes,
271
  // TODO however some may still need custom image URLs.
272
  // TODO NOTE: Transient data does prevent continual crashes.
282
  // $id = intval( $results_2[ $url_md5 ] );
283
  // }
284
  // }
 
285
  }
286
 
287
  self::$attachment_url_postids[ $url_md5 ] = $id;
298
  }
299
 
300
  /**
 
 
301
  * Sets the transient data at the last hook instead at every call.
302
  *
303
  * @see set_transient()
inc/commonstrings.php CHANGED
@@ -4,15 +4,9 @@
4
  *
5
  * This is just for Pro strings to be translated.
6
  *
7
- * @package All_in_One_SEO_Pack
8
- * @since ?
9
  */
10
 
11
- /**
12
- * Class AIOSP_Common_Strings
13
- *
14
- * @since ?
15
- */
16
  class AIOSP_Common_Strings {
17
 
18
  /**
@@ -20,6 +14,7 @@ class AIOSP_Common_Strings {
20
  *
21
  * We'll just put all the strings in the contruct for lack of a better place.
22
  */
 
23
  private function __construct() {
24
 
25
  // From aioseop-helper-filters.php.
@@ -28,12 +23,12 @@ class AIOSP_Common_Strings {
28
  __( 'Use these checkboxes to select which Taxonomies you want to use %s with.', 'all-in-one-seo-pack' );
29
  __( 'This displays an SEO News widget on the dashboard.', 'all-in-one-seo-pack' );
30
  /* 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. */
31
- __( 'Check this to add %s to the Toolbar for easy access to your SEO settings.', 'all-in-one-seo-pack' );
32
  /* 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. */
33
  __( 'Check this to move the %s menu item to the top of your WordPress Dashboard menu.', 'all-in-one-seo-pack' );
34
  __( 'Check this if you want to track outbound forms with Google Analytics.', 'all-in-one-seo-pack' );
35
  __( 'Check this if you want to track events with Google Analytics.', 'all-in-one-seo-pack' );
36
- __( 'Check this if you want to track URL changes for single pages with Google Analytics.', 'all-in-one-seo-pack' );
37
  __( 'Check this if you want to track how long pages are in visible state with Google Analytics.', 'all-in-one-seo-pack' );
38
  /* translators: 'This option allows users to track media queries, allowing them to find out if users are viewing a responsive layout or not and which layout changes have been applied if the browser window has been resized by the user, see https://github.com/googleanalytics/autotrack/blob/master/docs/plugins/media-query-tracker.md. */
39
  __( 'Check this if you want to track media query matching and queries with Google Analytics.', 'all-in-one-seo-pack' );
@@ -62,6 +57,7 @@ class AIOSP_Common_Strings {
62
  __( 'Include Date Archives in your sitemap.', 'all-in-one-seo-pack' );
63
  __( 'Include Author Archives in your sitemap.', 'all-in-one-seo-pack' );
64
  __( 'Exclude Images in your sitemap.', 'all-in-one-seo-pack' );
 
65
  __( 'Places a link to your Sitemap.xml into your virtual Robots.txt file.', 'all-in-one-seo-pack' );
66
  __( 'Dynamically creates the XML sitemap instead of using a static file.', 'all-in-one-seo-pack' );
67
  __( 'If checked, only posts that have videos in them will be displayed on the sitemap.', 'all-in-one-seo-pack' );
@@ -88,11 +84,11 @@ class AIOSP_Common_Strings {
88
 
89
  // From functions_general.php.
90
  __( 'Show SEO News', 'all-in-one-seo-pack' );
91
- __( 'Display Menu In Toolbar:', 'all-in-one-seo-pack' );
92
  __( 'Display Menu At The Top:', 'all-in-one-seo-pack' );
93
  __( 'Track Outbound Forms:', 'all-in-one-seo-pack' );
94
  __( 'Track Events:', 'all-in-one-seo-pack' );
95
- __( 'Track URL Changes:', 'all-in-one-seo-pack' );
96
  __( 'Track Page Visibility:', 'all-in-one-seo-pack' );
97
  __( 'Track Media Query:', 'all-in-one-seo-pack' );
98
  __( 'Track Elements Visibility:', 'all-in-one-seo-pack' );
4
  *
5
  * This is just for Pro strings to be translated.
6
  *
7
+ * @package All-in-One-SEO-Pack
 
8
  */
9
 
 
 
 
 
 
10
  class AIOSP_Common_Strings {
11
 
12
  /**
14
  *
15
  * We'll just put all the strings in the contruct for lack of a better place.
16
  */
17
+
18
  private function __construct() {
19
 
20
  // From aioseop-helper-filters.php.
23
  __( 'Use these checkboxes to select which Taxonomies you want to use %s with.', 'all-in-one-seo-pack' );
24
  __( 'This displays an SEO News widget on the dashboard.', 'all-in-one-seo-pack' );
25
  /* 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. */
26
+ __( 'Check this to add %s to the Admin Bar for easy access to your SEO settings.', 'all-in-one-seo-pack' );
27
  /* 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. */
28
  __( 'Check this to move the %s menu item to the top of your WordPress Dashboard menu.', 'all-in-one-seo-pack' );
29
  __( 'Check this if you want to track outbound forms with Google Analytics.', 'all-in-one-seo-pack' );
30
  __( 'Check this if you want to track events with Google Analytics.', 'all-in-one-seo-pack' );
31
+ __( 'Check this if you want to track url changes for single pages with Google Analytics.', 'all-in-one-seo-pack' );
32
  __( 'Check this if you want to track how long pages are in visible state with Google Analytics.', 'all-in-one-seo-pack' );
33
  /* translators: 'This option allows users to track media queries, allowing them to find out if users are viewing a responsive layout or not and which layout changes have been applied if the browser window has been resized by the user, see https://github.com/googleanalytics/autotrack/blob/master/docs/plugins/media-query-tracker.md. */
34
  __( 'Check this if you want to track media query matching and queries with Google Analytics.', 'all-in-one-seo-pack' );
57
  __( 'Include Date Archives in your sitemap.', 'all-in-one-seo-pack' );
58
  __( 'Include Author Archives in your sitemap.', 'all-in-one-seo-pack' );
59
  __( 'Exclude Images in your sitemap.', 'all-in-one-seo-pack' );
60
+ __( 'Create a compressed sitemap file in .xml.gz format.', 'all-in-one-seo-pack' );
61
  __( 'Places a link to your Sitemap.xml into your virtual Robots.txt file.', 'all-in-one-seo-pack' );
62
  __( 'Dynamically creates the XML sitemap instead of using a static file.', 'all-in-one-seo-pack' );
63
  __( 'If checked, only posts that have videos in them will be displayed on the sitemap.', 'all-in-one-seo-pack' );
84
 
85
  // From functions_general.php.
86
  __( 'Show SEO News', 'all-in-one-seo-pack' );
87
+ __( 'Display Menu In Admin Bar:', 'all-in-one-seo-pack' );
88
  __( 'Display Menu At The Top:', 'all-in-one-seo-pack' );
89
  __( 'Track Outbound Forms:', 'all-in-one-seo-pack' );
90
  __( 'Track Events:', 'all-in-one-seo-pack' );
91
+ __( 'Track Url Changes:', 'all-in-one-seo-pack' );
92
  __( 'Track Page Visibility:', 'all-in-one-seo-pack' );
93
  __( 'Track Media Query:', 'all-in-one-seo-pack' );
94
  __( 'Track Elements Visibility:', 'all-in-one-seo-pack' );
inc/compatability/abstract/aiosep_compatible.php CHANGED
@@ -1,11 +1,4 @@
1
  <?php
2
- /**
3
- * AIOSEOP Compatable
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
-
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Compatible' ) ) {
10
  /**
11
  * Abstract class to be used to create compatibility with 3rd party WordPress plugins.
@@ -20,7 +13,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatible' ) ) {
20
  /**
21
  * Returns flag indicating if compatible plugin exists in current instalation or not.
22
  * This function should be overwritten on child class.
23
- *
24
  * @since 2.3.12.3
25
  *
26
  * @return bool
@@ -31,7 +23,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatible' ) ) {
31
 
32
  /**
33
  * Method executed by compatibility handler to declare hooks and/or any other compatibility code needed.
34
- *
35
  * @since 2.3.12.3
36
  */
37
  public function hooks() {
1
  <?php
 
 
 
 
 
 
 
2
  if ( ! class_exists( 'All_in_One_SEO_Pack_Compatible' ) ) {
3
  /**
4
  * Abstract class to be used to create compatibility with 3rd party WordPress plugins.
13
  /**
14
  * Returns flag indicating if compatible plugin exists in current instalation or not.
15
  * This function should be overwritten on child class.
 
16
  * @since 2.3.12.3
17
  *
18
  * @return bool
23
 
24
  /**
25
  * Method executed by compatibility handler to declare hooks and/or any other compatibility code needed.
 
26
  * @since 2.3.12.3
27
  */
28
  public function hooks() {
inc/compatability/compat-init.php CHANGED
@@ -15,6 +15,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
15
  *
16
  * @since 2.3.6
17
  */
 
18
  class All_in_One_SEO_Pack_Compatibility {
19
 
20
  /**
@@ -47,7 +48,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
47
  // We'll use this until we set up our classes.
48
  if ( class_exists( 'jetpack' ) ) {
49
  add_filter( 'jetpack_get_available_modules', array( $this, 'remove_jetpack_sitemap' ) );
50
- add_filter( 'jetpack_site_verification_output', array( $this, 'filter_jetpack_site_verification_output' ), 10, 1 );
 
 
 
 
 
51
  }
52
 
53
  // Remove Twitter plugin's meta if our Social Module is on.
@@ -55,17 +61,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
55
  if ( isset( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) && $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] === 'on' ) {
56
  add_filter( 'twitter_card', array( $this, 'aioseop_disable_twitter' ) );
57
  }
58
- // Run compatibility classes.
59
  for ( $i = count( $this->classes ) - 1; $i >= 0; --$i ) {
60
  $this->classes[ $i ]->hooks();
61
  }
62
  }
63
 
64
  /**
65
- *
66
- * AIOSEOP Disable Twitter
67
- *
68
- * @since 2.3.11.4
69
  *
70
  * @return bool
71
  */
@@ -147,7 +149,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
147
  */
148
  public function load_compatibility_classes() {
149
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-wpml.php' ); // Load classes.
150
- // Evaluate classes and push them into array.
151
  $target = new All_in_One_SEO_Pack_Wpml;
152
  if ( $target->exists() ) {
153
  $this->classes[] = $target;
15
  *
16
  * @since 2.3.6
17
  */
18
+
19
  class All_in_One_SEO_Pack_Compatibility {
20
 
21
  /**
48
  // We'll use this until we set up our classes.
49
  if ( class_exists( 'jetpack' ) ) {
50
  add_filter( 'jetpack_get_available_modules', array( $this, 'remove_jetpack_sitemap' ) );
51
+ add_filter(
52
+ 'jetpack_site_verification_output', array(
53
+ $this,
54
+ 'filter_jetpack_site_verification_output',
55
+ ), 10, 1
56
+ );
57
  }
58
 
59
  // Remove Twitter plugin's meta if our Social Module is on.
61
  if ( isset( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) && $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] === 'on' ) {
62
  add_filter( 'twitter_card', array( $this, 'aioseop_disable_twitter' ) );
63
  }
64
+ // Run compatibility classes
65
  for ( $i = count( $this->classes ) - 1; $i >= 0; --$i ) {
66
  $this->classes[ $i ]->hooks();
67
  }
68
  }
69
 
70
  /**
 
 
 
 
71
  *
72
  * @return bool
73
  */
149
  */
150
  public function load_compatibility_classes() {
151
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-wpml.php' ); // Load classes.
152
+ // Evaluate classes and push them into array
153
  $target = new All_in_One_SEO_Pack_Wpml;
154
  if ( $target->exists() ) {
155
  $this->classes[] = $target;
inc/compatability/compat-wpml.php CHANGED
@@ -1,11 +1,4 @@
1
  <?php
2
- /**
3
- * Compatability with WPML (WordPress Multilingual)
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
-
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Wpml' ) ) {
10
  /**
11
  * Compatibility with WPML - WordPress Multilingual Plugin
@@ -52,13 +45,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Wpml' ) ) {
52
  */
53
  public function aioseop_home_url( $path ) {
54
  $url = apply_filters( 'wpml_home_url', home_url( '/' ) );
55
- // Remove query string.
56
  preg_match_all( '/\?[\s\S]+/', $url, $matches );
57
- // Get base.
58
  $url = preg_replace( '/\?[\s\S]+/', '', $url );
59
  $url = trailingslashit( $url );
60
  $url .= preg_replace( '/\//', '', $path, 1 );
61
- // Add query string.
62
  if ( count( $matches ) > 0 && count( $matches[0] ) > 0 ) {
63
  $url .= $matches[0][0];
64
  }
1
  <?php
 
 
 
 
 
 
 
2
  if ( ! class_exists( 'All_in_One_SEO_Pack_Wpml' ) ) {
3
  /**
4
  * Compatibility with WPML - WordPress Multilingual Plugin
45
  */
46
  public function aioseop_home_url( $path ) {
47
  $url = apply_filters( 'wpml_home_url', home_url( '/' ) );
48
+ // Remove query string
49
  preg_match_all( '/\?[\s\S]+/', $url, $matches );
50
+ // Get base
51
  $url = preg_replace( '/\?[\s\S]+/', '', $url );
52
  $url = trailingslashit( $url );
53
  $url .= preg_replace( '/\//', '', $path, 1 );
54
+ // Add query string
55
  if ( count( $matches ) > 0 && count( $matches[0] ) > 0 ) {
56
  $url .= $matches[0][0];
57
  }
inc/schema/graphs/graph-article.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph Article Class
4
- *
5
- * Acts as the article class for Schema Article.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_Article
12
- *
13
- * @since 3.2
14
- *
15
- * @see AIOSEOP_Graph_Creativework
16
- * @see Schema Article
17
- * @link https://schema.org/Article
18
- */
19
- class AIOSEOP_Graph_Article extends AIOSEOP_Graph_CreativeWork {
20
-
21
- /**
22
- * Get Graph Slug.
23
- *
24
- * @since 3.2
25
- *
26
- * @return string
27
- */
28
- protected function get_slug() {
29
- return 'Article';
30
- }
31
-
32
- /**
33
- * Get Graph Name.
34
- *
35
- * Intended for frontend use when displaying which schema graphs are available.
36
- *
37
- * @since 3.2
38
- *
39
- * @return string
40
- */
41
- protected function get_name() {
42
- return 'Article';
43
- }
44
-
45
- /**
46
- * Prepare data.
47
- *
48
- * @since 3.2
49
- *
50
- * @return array
51
- */
52
- protected function prepare() {
53
- global $post;
54
- global $aioseop_options;
55
-
56
- $comment_count = get_comment_count( $post->ID );
57
- $post_url = wp_get_canonical_url( $post );
58
- $post_taxonomies = get_post_taxonomies( $post );
59
- $post_terms = array();
60
- foreach ( $post_taxonomies as $taxonomy_slug ) {
61
- $post_taxonomy_terms = get_the_terms( $post, $taxonomy_slug );
62
- if ( is_array( $post_taxonomy_terms ) ) {
63
- $post_terms = array_merge( $post_terms, wp_list_pluck( $post_taxonomy_terms, 'name' ) );
64
- }
65
- }
66
-
67
- $rtn_data = array(
68
- '@type' => $this->slug,
69
- '@id' => $post_url . '#' . strtolower( $this->slug ),
70
- 'isPartOf' => array( '@id' => $post_url . '#webpage' ),
71
- 'author' => $this->prepare_author(),
72
- 'headline' => get_the_title(),
73
- 'datePublished' => mysql2date( DATE_W3C, $post->post_date_gmt, false ),
74
- 'dateModified' => mysql2date( DATE_W3C, $post->post_modified_gmt, false ),
75
- 'commentCount' => $comment_count['approved'],
76
- 'mainEntityOfPage' => array( '@id' => $post_url . '#webpage' ),
77
- 'publisher' => array( '@id' => home_url() . '/#' . $aioseop_options['aiosp_schema_site_represents'] ),
78
- 'articleSection' => implode( ', ', $post_terms ),
79
- );
80
-
81
- // Handle post Image.
82
- $image_schema = $this->prepare_image( $this->get_article_image_data( $post ), $post_url . '#primaryimage' );
83
- if ( $image_schema ) {
84
- $rtn_data['image'] = $image_schema;
85
- }
86
-
87
- return $rtn_data;
88
- }
89
-
90
- /**
91
- * Prepare Author Data
92
- *
93
- * TODO ?Move to Graph (Thing) Properties?
94
- *
95
- * @since 3.2
96
- *
97
- * @return array
98
- */
99
- protected function prepare_author() {
100
- global $post;
101
-
102
- $author_url = get_author_posts_url( $post->post_author );
103
-
104
- $rtn_data = array(
105
- '@id' => $author_url . '#author',
106
- );
107
-
108
- return $rtn_data;
109
- }
110
-
111
- /**
112
- * Get Image Data for Article
113
- *
114
- * Retrieves the image (data) required for the articles. This uses multiple sources in order to
115
- * complete the required field.
116
- *
117
- * Attempts to access image sources by the following order.
118
- *
119
- * 1. Gets Featured Image from Post.
120
- * 2. If 'organization', get Organization Logo.
121
- * 3. If 'person', get User's avatar.
122
- * 4. Get Image url from Post Content.
123
- * 5. Get Site Logo from theme customizer.
124
- *
125
- * @since 3.2
126
- *
127
- * @param WP_post $post
128
- * @return array
129
- */
130
- protected function get_article_image_data( $post ) {
131
- global $aioseop_options;
132
-
133
- $rtn_image_data = $this->get_image_data_defaults();
134
-
135
- if ( has_post_thumbnail( $post ) ) {
136
- $rtn_image_data = $this->get_site_image_data( get_post_thumbnail_id() );
137
- } elseif ( 'organization' === $aioseop_options['aiosp_schema_site_represents'] && ! empty( $aioseop_options['aiosp_schema_organization_logo'] ) ) {
138
- $rtn_image_data = $this->get_site_image_data( $aioseop_options['aiosp_schema_organization_logo'] );
139
- } elseif ( 'person' === $aioseop_options['aiosp_schema_site_represents'] && ! empty( $post->post_author ) ) {
140
- $rtn_image_data = $this->get_user_image_data( intval( $post->post_author ) );
141
- } else {
142
- $content_image_url = $this->get_image_url_from_content( $post );
143
- if ( ! empty( $content_image_url ) ) {
144
- $rtn_image_data = wp_parse_args( $this->get_image_data_defaults(), array( 'url' => $content_image_url ) );
145
- } else {
146
- $blog_logo = get_theme_mod( 'custom_logo' );
147
- if ( $blog_logo ) {
148
- $rtn_image_data = $this->get_site_image_data( $blog_logo );
149
- }
150
- }
151
- }
152
-
153
- return $rtn_image_data;
154
- }
155
-
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-collectionpage.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph CollectionPage Class
4
- *
5
- * Acts as the collection page class for Schema CollectionPage.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_CollectionPage
12
- *
13
- * @see Schema CollectionPage
14
- * @link https://schema.org/CollectionPage
15
- */
16
- class AIOSEOP_Graph_CollectionPage extends AIOSEOP_Graph_WebPage {
17
-
18
- /**
19
- * Get Graph Slug.
20
- *
21
- * @since 3.2
22
- *
23
- * @return string
24
- */
25
- protected function get_slug() {
26
- return 'CollectionPage';
27
- }
28
-
29
- /**
30
- * Get Graph Name.
31
- *
32
- * Intended for frontend use when displaying which schema graphs are available.
33
- *
34
- * @since 3.2
35
- *
36
- * @return string
37
- */
38
- protected function get_name() {
39
- return 'Collection Page';
40
- }
41
-
42
- /**
43
- * Prepare data.
44
- *
45
- * @since 3.2
46
- *
47
- * @return array
48
- */
49
- protected function prepare() {
50
- return parent::prepare();
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-creativework.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph CollectionPage Class
4
- *
5
- * Acts as the collection page class for Schema CollectionPage.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_CreativeWork
12
- *
13
- * @see Schema CreativeWork
14
- * @link https://schema.org/CreativeWork
15
- */
16
- abstract class AIOSEOP_Graph_CreativeWork extends AIOSEOP_Graph {
17
-
18
- /**
19
- * Get Graph Slug.
20
- *
21
- * @since 3.2
22
- *
23
- * @return string
24
- */
25
- protected function get_slug() {
26
- return 'creativework';
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-organization.php DELETED
@@ -1,203 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph Organization Class
4
- *
5
- * Acts as the organization class for Schema Organization.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_Organization
12
- *
13
- * @see Schema Organization
14
- * @link https://schema.org/Organization
15
- */
16
- class AIOSEOP_Graph_Organization extends AIOSEOP_Graph {
17
-
18
- /**
19
- * Get Graph Slug.
20
- *
21
- * @since 3.2
22
- *
23
- * @return string
24
- */
25
- protected function get_slug() {
26
- return 'Organization';
27
- }
28
-
29
- /**
30
- * Get Graph Name.
31
- *
32
- * Intended for frontend use when displaying which schema graphs are available.
33
- *
34
- * @since 3.2
35
- *
36
- * @return string
37
- */
38
- protected function get_name() {
39
- return 'Organization';
40
- }
41
-
42
- /**
43
- * Prepare data.
44
- *
45
- * @since 3.2
46
- *
47
- * @return array
48
- */
49
- protected function prepare() {
50
- global $aioseop_options;
51
-
52
- $rtn_data = array(
53
- '@type' => $this->slug,
54
- '@id' => home_url() . '/#' . strtolower( $this->slug ),
55
- 'url' => home_url() . '/',
56
- );
57
-
58
- // Site represents Organization or Person.
59
- if ( 'person' === $aioseop_options['aiosp_schema_site_represents'] ) {
60
- $person_id = intval( $aioseop_options['aiosp_schema_person_user'] );
61
-
62
- $rtn_data['@type'] = array( 'Person', $this->slug );
63
- $rtn_data['@id'] = home_url() . '/#person';
64
- $rtn_data['name'] = get_the_author_meta( 'display_name', $person_id );
65
- $rtn_data['sameAs'] = $this->get_user_social_profile_links( $person_id );
66
-
67
- // Handle Logo/Image.
68
- $image_schema = $this->prepare_image( $this->get_user_image_data( $person_id ), home_url() . '/#personlogo' );
69
- if ( $image_schema ) {
70
- $rtn_data['image'] = $image_schema;
71
- $rtn_data['logo'] = array( '@id' => home_url() . '/#personlogo' );
72
- }
73
- } else {
74
- // Get Name from General > Schema Settings > Organization Name, and fallback on WP's Site Name.
75
- $rtn_data['name'] = $aioseop_options['aiosp_schema_organization_name'] ?: get_bloginfo( 'name' );
76
- $rtn_data['sameAs'] = $this->get_site_social_profile_links();
77
-
78
- // Handle Logo/Image.
79
- $data_logo = $this->prepare_logo();
80
- if ( ! empty( $data_logo ) ) {
81
- $rtn_data['logo'] = $data_logo;
82
-
83
- $rtn_data['image'] = array(
84
- '@id' => home_url() . '/#logo',
85
- );
86
- }
87
-
88
- // Handle contactPoint.
89
- if ( ! empty( $aioseop_options['aiosp_schema_phone_number'] ) ) {
90
- $rtn_data['contactPoint'] = $this->prepare_contactpoint();
91
- }
92
- }
93
-
94
- return $rtn_data;
95
- }
96
-
97
- /**
98
- * Prepare Logo Data.
99
- *
100
- * @since 3.2
101
- *
102
- * @return array
103
- */
104
- protected function prepare_logo() {
105
- $rtn_data = array();
106
-
107
- $logo_id = $this->get_logo_id();
108
- $logo_meta = wp_get_attachment_metadata( $logo_id );
109
- if ( ! empty( $logo_id ) ) {
110
- $rtn_data = array(
111
- '@type' => 'ImageObject',
112
- '@id' => home_url() . '/#logo',
113
- 'url' => wp_get_attachment_image_url( $logo_id, 'full' ),
114
- 'width' => $logo_meta['width'],
115
- 'height' => $logo_meta['height'],
116
- );
117
-
118
- $caption = wp_get_attachment_caption( $logo_id );
119
- if ( false !== $caption || ! empty( $caption ) ) {
120
- $rtn_data['caption'] = $caption;
121
- }
122
- }
123
-
124
- return $rtn_data;
125
- }
126
-
127
- /**
128
- * Prepare ContactPoint Data.
129
- *
130
- * TODO !?Move to graph.php since it is part of schema 'thing' object?!
131
- *
132
- * @since 3.2
133
- *
134
- * @return array
135
- */
136
- protected function prepare_contactpoint() {
137
- global $aioseop_options;
138
-
139
- $rtn_data = array(
140
- '@type' => 'ContactPoint',
141
- 'telephone' => '+' . $aioseop_options['aiosp_schema_phone_number'],
142
- 'contactType' => $aioseop_options['aiosp_schema_contact_type'],
143
- );
144
-
145
- return $rtn_data;
146
- }
147
-
148
- /**
149
- * Get Site Social Links
150
- *
151
- * @since 3.2
152
- *
153
- * @return array
154
- */
155
- protected function get_site_social_profile_links() {
156
- global $aioseop_options;
157
-
158
- $social_links = array();
159
-
160
- if ( ! empty( $aioseop_options['aiosp_schema_social_profile_links'] ) ) {
161
- $social_links = $aioseop_options['aiosp_schema_social_profile_links'];
162
- $social_links = str_replace( array( ",\r\n", ",\r" ), ',', $social_links );
163
- $social_links = str_replace( array( "\r\n", "\r" ), ',', $social_links );
164
- $social_links = explode( ',', $social_links );
165
- }
166
-
167
- return $social_links;
168
- }
169
-
170
- /**
171
- * Get Custom Logo
172
- *
173
- * Retrieves the custom logo from WP's customizer for theme customizations.
174
- *
175
- * @since 3.2
176
- *
177
- * @return int|mixed
178
- */
179
- protected function get_logo_id() {
180
- global $aioseop_options;
181
-
182
- $logo_id = 0;
183
-
184
- // Uses logo selected from General Settings > Schema Settings > Organization Logo.
185
- if ( ! empty( $aioseop_options['aiosp_schema_organization_logo'] ) ) {
186
- // Changes the URL to an ID. Known to be memory intense.
187
- // Option configurations need to use IDs rather than the URL strings.
188
- $logo_id = aiosp_common::attachment_url_to_postid( $aioseop_options['aiosp_schema_organization_logo'] );
189
- }
190
-
191
- // Fallback on Customizer site logo.
192
- if ( ! $logo_id ) {
193
- $logo_id = get_theme_mod( 'custom_logo' );
194
- }
195
-
196
- // Prevent case type errors if empty/false.
197
- if ( ! $logo_id ) {
198
- $logo_id = 0;
199
- }
200
-
201
- return $logo_id;
202
- }
203
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-person.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph Person Class
4
- *
5
- * Acts as the person class for Schema Person.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_Person
12
- *
13
- * @see Schema Person
14
- * @link https://schema.org/Person
15
- */
16
- class AIOSEOP_Graph_Person extends AIOSEOP_Graph {
17
-
18
- /**
19
- * Get Graph Slug.
20
- *
21
- * @since 3.2
22
- *
23
- * @return string
24
- */
25
- protected function get_slug() {
26
- return 'Person';
27
- }
28
-
29
- /**
30
- * Get Graph Name.
31
- *
32
- * Intended for frontend use when displaying which schema graphs are available.
33
- *
34
- * @since 3.2
35
- *
36
- * @return string
37
- */
38
- protected function get_name() {
39
- return 'Person';
40
- }
41
-
42
- /**
43
- * Prepare
44
- *
45
- * @since 3.2
46
- *
47
- * @return array
48
- */
49
- protected function prepare() {
50
- global $post;
51
- global $aioseop_options;
52
-
53
- $user_id = 1;
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';
61
- }
62
- $author_name = get_the_author_meta( 'display_name', $user_id );
63
-
64
- $rtn_data = array(
65
- '@type' => $this->slug,
66
- '@id' => $author_url . '#' . $hashtag,
67
- 'name' => $author_name,
68
- 'sameAs' => $this->get_user_social_profile_links( $user_id ),
69
- );
70
-
71
- // Handle Logo/Image.
72
- $image_schema = $this->prepare_image( $this->get_user_image_data( $user_id ), home_url() . '/#personlogo' );
73
- if ( $image_schema ) {
74
- $rtn_data['image'] = $image_schema;
75
- }
76
-
77
- if ( is_author() ) {
78
- $rtn_data['mainEntityOfPage'] = array( '@id' => $author_url . '#profilepage' );
79
- }
80
-
81
- return $rtn_data;
82
- }
83
-
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-profilepage.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph ProfilePage Class
4
- *
5
- * Acts as the profile page class for Schema ProfilePage.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_ProfilePage
12
- *
13
- * @see AIOSEOP_Graph_Creativework
14
- * @see AIOSEOP_Graph_WebPage
15
- * @see Schema ProfilePage
16
- * @link https://schema.org/ProfilePage
17
- */
18
- class AIOSEOP_Graph_ProfilePage extends AIOSEOP_Graph_WebPage {
19
-
20
- /**
21
- * Get Graph Slug.
22
- *
23
- * @since 3.2
24
- *
25
- * @return string
26
- */
27
- protected function get_slug() {
28
- return 'ProfilePage';
29
- }
30
-
31
- /**
32
- * Get Graph Name.
33
- *
34
- * Intended for frontend use when displaying which schema graphs are available.
35
- *
36
- * @since 3.2
37
- *
38
- * @return string
39
- */
40
- protected function get_name() {
41
- return 'Profile Page';
42
- }
43
-
44
- /**
45
- * Prepare
46
- *
47
- * @since 3.2
48
- *
49
- * @return array
50
- */
51
- protected function prepare() {
52
- return parent::prepare();
53
- }
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-searchresultspage.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph SearchResultsPage Class
4
- *
5
- * Acts as the search results page class for Schema SearchResultsPage.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_SearchResultsPage
12
- *
13
- * @see AIOSEOP_Graph_Creativework
14
- * @see AIOSEOP_Graph_WebPage
15
- * @see Schema SearchResultsPage
16
- * @link https://schema.org/SearchResultsPage
17
- */
18
- class AIOSEOP_Graph_SearchResultsPage extends AIOSEOP_Graph_WebPage {
19
-
20
- /**
21
- * Get Graph Slug.
22
- *
23
- * @since 3.2
24
- *
25
- * @return string
26
- */
27
- protected function get_slug() {
28
- return 'SearchResultsPage';
29
- }
30
-
31
- /**
32
- * Get Graph Name.
33
- *
34
- * Intended for frontend use when displaying which schema graphs are available.
35
- *
36
- * @since 3.2
37
- *
38
- * @return string
39
- */
40
- protected function get_name() {
41
- return 'Search Results Page';
42
- }
43
-
44
- /**
45
- * Prepare
46
- *
47
- * @since 3.2
48
- *
49
- * @return array
50
- */
51
- protected function prepare() {
52
- return parent::prepare();
53
- }
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-webpage.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph WebPage Class
4
- *
5
- * Acts as the web page class for Schema WebPage.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_WebPage
12
- *
13
- * @see AIOSEOP_Graph_Creativework
14
- * @see Schema WebPage
15
- * @link https://schema.org/WebPage
16
- */
17
- class AIOSEOP_Graph_WebPage extends AIOSEOP_Graph_Creativework {
18
-
19
- /**
20
- * Get Graph Slug.
21
- *
22
- * @since 3.2
23
- *
24
- * @return string
25
- */
26
- protected function get_slug() {
27
- return 'WebPage';
28
- }
29
-
30
- /**
31
- * Get Graph Name.
32
- *
33
- * Intended for frontend use when displaying which schema graphs are available.
34
- *
35
- * @since 3.2
36
- *
37
- * @return string
38
- */
39
- protected function get_name() {
40
- return 'Web Page';
41
- }
42
-
43
- /**
44
- * Prepare data.
45
- *
46
- * @since 3.2
47
- *
48
- * @return array
49
- */
50
- protected function prepare() {
51
- global $post;
52
- global $aioseop_options;
53
-
54
- $current_url = '';
55
- $current_name = '';
56
- $current_desc = '';
57
-
58
- if ( is_home() ) {
59
- if ( is_front_page() ) {
60
- // Front Page for 'Your latest posts'.
61
- $current_url = home_url() . '/';
62
- $current_name = get_bloginfo( 'name' );
63
- $current_desc = get_bloginfo( 'description' );
64
- } else {
65
- // A static page - Posts page.
66
- // Resembles elseif $wp_query->is_posts_page.
67
- $page_id = get_option( 'page_for_posts' );
68
-
69
- $current_url = wp_get_canonical_url( $page_id );
70
- $current_name = get_the_title( $page_id );
71
- $current_desc = $this->get_post_description( get_post( $page_id ) );
72
- }
73
- } elseif ( is_front_page() && is_page() ) {
74
- // A static page - Homepage.
75
- $current_url = home_url() . '/';
76
- $current_name = get_the_title();
77
- $current_desc = $this->get_post_description( $post );
78
- } elseif ( is_singular() || is_single() ) {
79
- $current_url = wp_get_canonical_url( $post );
80
- $current_name = get_the_title();
81
- $current_desc = $this->get_post_description( $post );
82
- } elseif ( is_tax() || is_category() || is_tag() ) {
83
- $term = get_queried_object();
84
-
85
- $current_url = get_term_link( $term );
86
- $current_name = $term->name;
87
- $current_desc = $term->description;
88
- } elseif ( is_date() ) {
89
- if ( is_year() ) {
90
- $current_url = get_year_link( false );
91
- /* translators: Yearly archive title. %s: Year */
92
- $current_name = sprintf( __( 'Year: %s', 'all-in-one-seo-pack' ), get_the_date( _x( 'Y', 'yearly archives date format', 'all-in-one-seo-pack' ) ) );
93
- } elseif ( is_month() ) {
94
- $current_url = get_month_link( false, false );
95
- /* translators: Monthly archive title. %s: Month name and year */
96
- $current_name = sprintf( __( 'Month: %s', 'all-in-one-seo-pack' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'all-in-one-seo-pack' ) ) );
97
- } else {
98
- $current_url = get_day_link( false, false, false );
99
- /* translators: Daily archive title. %s: Date */
100
- $current_name = sprintf( __( 'Day: %s', 'all-in-one-seo-pack' ), get_the_date( _x( 'F j, Y', 'daily archives date format', 'all-in-one-seo-pack' ) ) );
101
- }
102
- } elseif ( is_author() ) {
103
- $user_id = intval( $post->post_author );
104
- $current_url = get_author_posts_url( $user_id );
105
- $current_name = get_the_author_meta( 'display_name', $user_id );
106
- } elseif ( is_search() ) {
107
- $current_url = get_search_link();
108
- /* Translators: String used in search query: %s: Search */
109
- $current_name = sprintf( __( 'Search results for "%s"', 'all-in-one-seo-pack' ), esc_html( get_search_query() ) );
110
- }
111
-
112
- $rtn_data = array(
113
- '@type' => $this->slug,
114
- '@id' => $current_url . '#' . strtolower( $this->slug ), // TODO Should this be `#webpage`?
115
- 'url' => $current_url,
116
- 'inLanguage' => get_bloginfo( 'language' ),
117
- 'name' => $current_name,
118
- 'isPartOf' => array(
119
- '@id' => home_url() . '/#website',
120
- ),
121
-
122
- );
123
-
124
- // Handles pages.
125
- if ( is_singular() || is_single() ) {
126
- if ( has_post_thumbnail( $post ) ) {
127
- $image_id = get_post_thumbnail_id();
128
-
129
- $image_schema = $this->prepare_image( $this->get_site_image_data( $image_id ), $current_url . '#primaryimage' );
130
- if ( $image_schema ) {
131
- $rtn_data['image'] = $image_schema;
132
- $rtn_data['primaryImageOfPage'] = array( '@id' => $current_url . '#primaryimage' );
133
- }
134
- }
135
-
136
- $rtn_data['datePublished'] = mysql2date( DATE_W3C, $post->post_date_gmt, false );
137
- $rtn_data['dateModified'] = mysql2date( DATE_W3C, $post->post_modified_gmt, false );
138
- }
139
-
140
- if ( is_front_page() ) {
141
- $rtn_data['about'] = array(
142
- '@id' => home_url() . '/#' . $aioseop_options['aiosp_schema_site_represents'],
143
- );
144
- }
145
-
146
- if ( ! empty( $current_desc ) ) {
147
- $rtn_data['description'] = $current_desc;
148
- }
149
-
150
- return $rtn_data;
151
- }
152
-
153
- /**
154
- * Get Post Description.
155
- *
156
- * @since 3.2
157
- *
158
- * @param WP_Post $post See WP_Post for details.
159
- * @return string
160
- */
161
- protected function get_post_description( $post ) {
162
- $rtn_description = '';
163
-
164
- // Using AIOSEOP's description is limited in content. With Schema's descriptions, there is no cap limit.
165
- $post_description = get_post_meta( $post->ID, '_aioseop_description', true );
166
-
167
- // If there is no AIOSEOP description, and the post isn't password protected, then use post excerpt or content.
168
- if ( ! $post_description && ! post_password_required( $post ) ) {
169
- if ( ! empty( $post->post_excerpt ) ) {
170
- $post_description = $post->post_excerpt;
171
- } elseif ( ! empty( $post->post_content ) ) {
172
- $post_description = $post->post_content;
173
- $post_description = aioseop_do_shortcodes( $post_description );
174
- $post_description = strip_shortcodes( $post_description );
175
- $post_description = wp_strip_all_tags( $post_description );
176
- }
177
- }
178
-
179
- if ( ! empty( $post_description ) && is_string( $post_description ) ) {
180
- $rtn_description = $post_description;
181
- }
182
-
183
- return $rtn_description;
184
- }
185
-
186
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-website.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph WebSite Class
4
- *
5
- * Acts as the website class for Schema WebSite.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph_WebPage
12
- *
13
- * @see AIOSEOP_Graph_Creativework
14
- * @see Schema WebSite
15
- * @link https://schema.org/WebSite
16
- */
17
- class AIOSEOP_Graph_WebSite extends AIOSEOP_Graph_Creativework {
18
-
19
- /**
20
- * Get Graph Slug.
21
- *
22
- * @since 3.2
23
- *
24
- * @return string
25
- */
26
- protected function get_slug() {
27
- return 'WebSite';
28
- }
29
-
30
- /**
31
- * Get Graph Name.
32
- *
33
- * Intended for frontend use when displaying which schema graphs are available.
34
- *
35
- * @since 3.2
36
- *
37
- * @return string
38
- */
39
- protected function get_name() {
40
- return 'Website';
41
- }
42
-
43
- /**
44
- * Prepare
45
- *
46
- * @since 3.2
47
- *
48
- * @return array
49
- */
50
- protected function prepare() {
51
- global $aioseop_options;
52
-
53
- $rtn_data = array(
54
- '@type' => $this->slug,
55
- '@id' => home_url() . '/#' . strtolower( $this->slug ),
56
- 'url' => home_url() . '/',
57
- 'name' => get_bloginfo( 'name' ),
58
- 'publisher' => array(
59
- '@id' => home_url() . '/#' . $aioseop_options['aiosp_schema_site_represents'],
60
- ),
61
- );
62
-
63
- if ( $aioseop_options['aiosp_schema_search_results_page'] ) {
64
- $rtn_data['potentialAction'] = array(
65
- '@type' => 'SearchAction',
66
- 'target' => home_url() . '/?s={search_term_string}',
67
- 'query-input' => 'required name=search_term_string',
68
- );
69
- }
70
-
71
- return $rtn_data;
72
- }
73
-
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph.php DELETED
@@ -1,337 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Graph Base Class
4
- *
5
- * Acts as the base class for Schema Thing.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * Class AIOSEOP_Graph
12
- *
13
- * @since 3.2
14
- *
15
- * @see Schema Thing
16
- * @link https://schema.org/Thing
17
- */
18
- abstract class AIOSEOP_Graph {
19
-
20
- /**
21
- * Schema Slug.
22
- *
23
- * @since 3.2
24
- *
25
- * @var string
26
- */
27
- public $slug;
28
-
29
- /**
30
- * Schema Name.
31
- *
32
- * @since 3.2
33
- *
34
- * @var string
35
- */
36
- public $name;
37
-
38
- // TODO Add Schema properties/content/context object to handled all post/page (post_type, taxonomy, terms, author) data.
39
-
40
- // TODO Add Static Variables to store what Schema IDs are in use. Implement when adding property types for schema.
41
- // For example, when using property schemas, like imageObject, more than 1 object can reference the same image object.
42
-
43
- /**
44
- * AIOSEOP_Graph Constructor.
45
- *
46
- * @since 3.2
47
- *
48
- * @throws LogicException Shows which child class variables are missing or empty.
49
- */
50
- public function __construct() {
51
- $this->slug = $this->get_slug();
52
- $this->name = $this->get_name();
53
-
54
- if ( ! isset( $this->slug ) || empty( $this->slug ) ) {
55
- throw new LogicException( 'Class ' . get_class( $this ) . ' property $slug is missing or empty.' );
56
- }
57
- if ( ! isset( $this->name ) || empty( $this->name ) ) {
58
- throw new LogicException( 'Class ' . get_class( $this ) . ' property $name is missing or empty.' );
59
- }
60
-
61
- $this->add_hooks();
62
- }
63
-
64
- /**
65
- * Get Graph Slug.
66
- *
67
- * @since 3.2
68
- *
69
- * @return string
70
- */
71
- abstract protected function get_slug();
72
-
73
- /**
74
- * Get Graph Name.
75
- *
76
- * Intended for frontend use when displaying which schema graphs are available.
77
- *
78
- * @since 3.2
79
- *
80
- * @return string
81
- */
82
- abstract protected function get_name();
83
-
84
- /**
85
- * Prepare data.
86
- *
87
- * @since 3.2
88
- *
89
- * @return array
90
- */
91
- abstract protected function prepare();
92
-
93
- /**
94
- * Add Hooks.
95
- *
96
- * @since 3.2
97
- */
98
- protected function add_hooks() {
99
- add_action( 'aioseop_schema_internal_shortcodes_on', array( $this, 'add_shortcode' ) );
100
- add_action( 'aioseop_schema_internal_shortcodes_off', array( $this, 'remove_shortcode' ) );
101
- }
102
-
103
- /**
104
- * Add Shortcode
105
- *
106
- * @since 3.2
107
- */
108
- public function add_shortcode() {
109
- add_shortcode( 'aioseop_schema_' . $this->slug, array( $this, 'display_json_ld' ) );
110
- }
111
-
112
- /**
113
- * Remove Shortcode
114
- *
115
- * @since 3.2
116
- */
117
- public function remove_shortcode() {
118
- remove_shortcode( 'aioseop_schema_' . $this->slug );
119
- }
120
-
121
- /**
122
- * Display JSON LD
123
- *
124
- * @since 3.2
125
- *
126
- * @return string
127
- */
128
- public function display_json_ld() {
129
- // TODO Discuss what operation style to use on filter hook.
130
- // A) A single hook to run added hooks multiple times.
131
- // B) Multiple class hooks to run added hooks specific to schema graph object.
132
- /**
133
- * AIOSEOP Schema Class's Prepared Data
134
- *
135
- * @since 3.2
136
- *
137
- * @param array Dynamically generated data through inherited schema graphs.
138
- * @param string Current schema (child) class being used to prepare data.
139
- */
140
- // $schema_data = apply_filters( 'aioseop_schema_class_data', $this->prepare(), get_class( $this ) );
141
-
142
- /**
143
- * AIOSEOP Schema Class's Prepared Data
144
- *
145
- * Uses class name with hook `aioseop_schema_class_data_{CLASS NAME}`.
146
- *
147
- * @since 3.2
148
- *
149
- * @param array Dynamically generated data through inherited schema graphs.
150
- */
151
- $schema_data = apply_filters( 'aioseop_schema_class_data_' . get_class( $this ), $this->prepare() );
152
- return wp_json_encode( (object) $schema_data, JSON_UNESCAPED_SLASHES ) ?: '';
153
- }
154
-
155
- /**
156
- * Prepare Image Data.
157
- *
158
- * TODO !?Move/Create schema properties object?!
159
- *
160
- * @since 3.2
161
- *
162
- * @param array $image_data See `AIOSEOP_Graph::get_image_data_defaults()` for details.
163
- * @param string $schema_id Schema reference id.
164
- * @return array Image schema. False on failure.
165
- */
166
- protected function prepare_image( $image_data, $schema_id ) {
167
- if ( empty( $image_data['url'] ) ) {
168
- return false;
169
- }
170
-
171
- $rtn_data = array(
172
- '@type' => 'ImageObject',
173
- '@id' => $schema_id,
174
- );
175
-
176
- // Only use valid variables from defaults.
177
- foreach ( array_keys( $this->get_image_data_defaults() ) as $key ) {
178
- if ( ! empty( $image_data[ $key ] ) ) {
179
- $rtn_data[ $key ] = $image_data[ $key ];
180
- }
181
- }
182
-
183
- return $rtn_data;
184
- }
185
-
186
- /**
187
- * Get Image Data Defaults.
188
- *
189
- * @since 3.2
190
- *
191
- * @return array
192
- */
193
- protected function get_image_data_defaults() {
194
- return array(
195
- 'url' => '',
196
- 'width' => 0,
197
- 'height' => 0,
198
- 'caption' => '',
199
- );
200
- }
201
-
202
- /**
203
- * Get Image Data from Site.
204
- *
205
- * @since 3.2
206
- *
207
- * @uses wp_get_attachment_metadata()
208
- * @link https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/
209
- *
210
- * @param $image_id Image ID to retrieve data.
211
- * @return array|bool Image data. False on failure.
212
- */
213
- protected function get_site_image_data( $image_id ) {
214
- if ( ! is_numeric( $image_id ) ) {
215
- return false;
216
- }
217
-
218
- // Defaults.
219
- $rtn_image_data = $this->get_image_data_defaults();
220
-
221
- // Store ID just in case of any other operations, but is not required with schema.
222
- $rtn_image_data['id'] = intval( $image_id );
223
- $rtn_image_data['url'] = wp_get_attachment_image_url( $image_id, 'full' );
224
-
225
- $image_meta = wp_get_attachment_metadata( $image_id );
226
- if ( $image_meta ) {
227
- $rtn_image_data['width'] = $image_meta['width'];
228
- $rtn_image_data['height'] = $image_meta['height'];
229
- }
230
-
231
- $caption = wp_get_attachment_caption( $image_id );
232
- if ( false !== $caption || ! empty( $caption ) ) {
233
- $rtn_image_data['caption'] = $caption;
234
- }
235
-
236
- return $rtn_image_data;
237
- }
238
-
239
- /**
240
- * Get Image Data from User Gravatar.
241
- *
242
- * @since 3.2
243
- *
244
- * @uses get_avatar_data()
245
- * @link https://developer.wordpress.org/reference/functions/get_avatar_data/
246
- *
247
- * @param $user_id User ID to retrieve data.
248
- * @return array|bool Gravatar image data. False on failure.
249
- */
250
- protected function get_user_image_data( $user_id ) {
251
- if ( ! is_numeric( $user_id ) ) {
252
- return false;
253
- }
254
-
255
- // Defaults.
256
- $rtn_image_data = $this->get_image_data_defaults();
257
-
258
- if ( get_option( 'show_avatars' ) ) {
259
- $avatar_data = get_avatar_data( $user_id );
260
- if ( $avatar_data['found_avatar'] ) {
261
- $rtn_image_data['url'] = $avatar_data['url'];
262
- $rtn_image_data['width'] = $avatar_data['width'];
263
- $rtn_image_data['height'] = $avatar_data['height'];
264
- $rtn_image_data['caption'] = get_the_author_meta( 'display_name', $user_id );
265
- }
266
- }
267
-
268
- return $rtn_image_data;
269
- }
270
-
271
- /**
272
- * Get Featured Image URL.
273
- *
274
- * @since 3.2
275
- *
276
- * @param WP_Post $post See WP_Post for details.
277
- * @return false|string
278
- */
279
- protected function get_image_url_from_content( $post ) {
280
- $image_url = '';
281
-
282
- // Get first image from content.
283
- if ( ( substr_count( $post->post_content, '<img' ) + substr_count( $post->post_content, '<IMG' ) ) ) {
284
- if ( class_exists( 'DOMDocument' ) ) {
285
- $dom = new domDocument();
286
-
287
- // Non-compliant HTML might give errors, so ignore them.
288
- libxml_use_internal_errors( true );
289
- $dom->loadHTML( $post->post_content );
290
- libxml_clear_errors();
291
-
292
- // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
293
- $dom->preserveWhiteSpace = false;
294
-
295
- $matches = $dom->getElementsByTagName( 'img' );
296
- foreach ( $matches as $match ) {
297
- $image_url = $match->getAttribute( 'src' );
298
- }
299
- } else {
300
- preg_match_all( '/<img.*src=([\'"])?(.*?)\\1/', $post->post_content, $matches );
301
- if ( $matches && isset( $matches[2] ) ) {
302
- $image_url = $matches[2];
303
- }
304
- }
305
- }
306
-
307
- return $image_url;
308
- }
309
-
310
-
311
- /**
312
- * Get Social Profiles from user id.
313
- *
314
- * @since 3.2
315
- *
316
- * @param int $user_id
317
- * @return array
318
- */
319
- protected function get_user_social_profile_links( $user_id ) {
320
- $rtn_social_profiles = array();
321
- $social_sites = array(
322
- 'facebook',
323
- 'twitter',
324
- );
325
-
326
- foreach ( $social_sites as $social_site ) {
327
- $author_social_link = get_the_author_meta( $social_site, $user_id );
328
-
329
- if ( $author_social_link ) {
330
- $rtn_social_profiles[] = $author_social_link;
331
- }
332
- }
333
-
334
- return $rtn_social_profiles;
335
- }
336
-
337
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/schema-builder.php DELETED
@@ -1,199 +0,0 @@
1
- <?php
2
- /**
3
- * Schema Builder Class
4
- *
5
- * Creates the schema to be displayed on frontend.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- */
9
-
10
- /**
11
- * AIOSEOP Schema Builder
12
- *
13
- * @since 3.2
14
- */
15
- class AIOSEOP_Schema_Builder {
16
-
17
- /**
18
- * Graph Classes.
19
- *
20
- * @since 3.2
21
- *
22
- * @var array $graphs
23
- */
24
- public $graphs = array();
25
-
26
- /**
27
- * Constructor.
28
- *
29
- * @since 3.2
30
- */
31
- public function __construct() {
32
- $this->graphs = $this->get_graphs();
33
- }
34
-
35
- /**
36
- * Register Graphs
37
- *
38
- * @since 3.2
39
- *
40
- * @return array
41
- */
42
- public function get_graphs() {
43
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph.php';
44
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-organization.php';
45
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-person.php';
46
-
47
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-creativework.php';
48
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-article.php';
49
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-website.php';
50
-
51
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-webpage.php';
52
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-collectionpage.php';
53
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-profilepage.php';
54
- require_once AIOSEOP_PLUGIN_DIR . 'inc/schema/graphs/graph-searchresultspage.php';
55
-
56
- $graphs = array(
57
- // Keys/Slugs follow Schema's @type format.
58
- 'Article' => new AIOSEOP_Graph_Article(),
59
- 'CollectionPage' => new AIOSEOP_Graph_CollectionPage(),
60
- 'Organization' => new AIOSEOP_Graph_Organization(),
61
- 'Person' => new AIOSEOP_Graph_Person(),
62
- 'ProfilePage' => new AIOSEOP_Graph_ProfilePage(),
63
- 'SearchResultsPage' => new AIOSEOP_Graph_SearchResultsPage(),
64
- 'Website' => new AIOSEOP_Graph_WebSite(),
65
- 'Webpage' => new AIOSEOP_Graph_Webpage(),
66
- );
67
-
68
- /**
69
- * Register Schema Objects
70
- *
71
- * @since 3.2
72
- *
73
- * @param $graphs Array containing schema objects that are currently active.
74
- */
75
- $graphs = apply_filters( 'aioseop_register_schema_objects', $graphs );
76
-
77
- // TODO Could add operation here to loop through objects to *::add_hooks(). Rather than schema __constructor executing add_hooks().
78
- // That would allow some schema objects to be completely replaced without interfering.
79
-
80
- return $graphs;
81
- }
82
-
83
- /**
84
- * Get Layout
85
- *
86
- * Presets the schema layout to be generated.
87
- *
88
- * This concept is intended to allow...
89
- *
90
- * * Better dynamics with configurable layout settings.
91
- * * Unnecessarily generating data where some instances remove it.
92
- *
93
- * @since 3.2
94
- *
95
- * @uses WP's Template Hierarchy
96
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
97
- */
98
- public function get_layout() {
99
- global $aioseop_options;
100
-
101
- $layout = array(
102
- '@context' => 'https://schema.org',
103
- '@graph' => array(
104
- '[aioseop_schema_Organization]',
105
- '[aioseop_schema_WebSite]',
106
- ),
107
- );
108
-
109
- // TODO Add layout customizations to settings.
110
- if ( is_front_page() || is_home() ) {
111
- array_push( $layout['@graph'], '[aioseop_schema_WebPage]' );
112
- } elseif ( is_archive() ) {
113
- if ( is_author() ) {
114
- array_push( $layout['@graph'], '[aioseop_schema_ProfilePage]' );
115
- array_push( $layout['@graph'], '[aioseop_schema_Person]' );
116
- } elseif ( is_post_type_archive() ) {
117
- array_push( $layout['@graph'], '[aioseop_schema_CollectionPage]' );
118
- } elseif ( is_tax() || is_category() || is_tag() ) {
119
- array_push( $layout['@graph'], '[aioseop_schema_CollectionPage]' );
120
- // Remove when Custom Taxonomies is supported.
121
- if ( is_tax() ) {
122
- $layout = array();
123
- }
124
- } elseif ( is_date() ) {
125
- array_push( $layout['@graph'], '[aioseop_schema_CollectionPage]' );
126
- }
127
- } elseif ( is_singular() || is_single() ) {
128
- global $post;
129
-
130
- array_push( $layout['@graph'], '[aioseop_schema_WebPage]' );
131
- if ( ! is_post_type_hierarchical( $post->post_type ) ) {
132
- // TODO Add custom setting for individual posts.
133
-
134
- array_push( $layout['@graph'], '[aioseop_schema_Article]' );
135
- array_push( $layout['@graph'], '[aioseop_schema_Person]' );
136
- }
137
-
138
- // Remove when CPT is supported.
139
- if ( ! in_array( get_post_type( $post ), array( 'post', 'page' ) ) ) {
140
- $layout = array();
141
- }
142
- } elseif ( is_search() ) {
143
- array_push( $layout['@graph'], '[aioseop_schema_SearchResultsPage]' );
144
- } elseif ( is_404() ) {
145
- // Do 404 page.
146
- }
147
-
148
- /**
149
- * Schema Layout
150
- *
151
- * Pre-formats the schema array shortcode layout.
152
- *
153
- * @since 3.2
154
- *
155
- * @param array $layout Schema array/object containing shortcodes.
156
- */
157
- $layout = apply_filters( 'aioseop_schema_layout', $layout );
158
-
159
- // Encode to json string, and remove string type around shortcodes.
160
- $layout = wp_json_encode( (object) $layout, JSON_UNESCAPED_SLASHES );
161
- $layout = str_replace( '"[', '[', $layout );
162
- $layout = str_replace( ']"', ']', $layout );
163
-
164
- return $layout;
165
- }
166
-
167
- /**
168
- * Display JSON LD Script
169
- *
170
- * @since 3.2
171
- */
172
- public function display_json_ld_head_script() {
173
- // do stuff.
174
-
175
- $layout = $this->get_layout();
176
-
177
- do_action( 'aioseop_schema_internal_shortcodes_on' );
178
- $schema_content = do_shortcode( $layout );
179
- do_action( 'aioseop_schema_internal_shortcodes_off' );
180
-
181
- echo '<script type="application/ld+json" class="aioseop-schema">' . $schema_content . '</script>';
182
- echo "\n";
183
- }
184
-
185
- /**
186
- * Display JSON LD Script
187
- *
188
- * Intended for data that isn't readily available during `wp_head`.
189
- *
190
- * This should be avoided if possible. If an instance requires data to be loaded later,
191
- * then use transient data to load in next instance within `wp_head`.
192
- *
193
- * @since 3.2
194
- */
195
- public function display_json_ld_body_script() {
196
- // do stuff.
197
- }
198
-
199
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/sitemap-xsl.php CHANGED
@@ -4,7 +4,8 @@
4
  *
5
  * Dynamically generates the XML Sitemap's XSL file.
6
  *
7
- * @package All_in_One_SEO_Pack
 
8
  * @since 2.3.6
9
  * @since 2.3.12.3 Refactoring indentation and added xmlns fix for Chrome rendering.
10
  */
@@ -89,7 +90,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
89
  <div id="content-head">
90
  <h1>XML Sitemap</h1>
91
  <p><?php echo __( 'Generated by', 'all-in-one-seo-pack' ); ?> <a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_sitemap" target="_blank"><?php echo AIOSEOP_PLUGIN_NAME; ?></a>, <?php echo __( 'this is an XML Sitemap, meant to be consumed by search engines like Google or Bing.', 'all-in-one-seo-pack' ); ?><br/>
92
- <?php echo __( 'You can find more information about XML sitemaps at <a href="https://www.sitemaps.org/" target="_blank" rel="noreferrer noopener">sitemaps.org</a>', 'all-in-one-seo-pack' ); ?>.</p>
93
  <p><xsl:choose>
94
  <xsl:when test="$fileType='Sitemap'">
95
  <?php echo __( 'This sitemap contains', 'all-in-one-seo-pack' ); ?> <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of> <?php echo __( 'URLs', 'all-in-one-seo-pack' ); ?>.</xsl:when>
@@ -152,15 +153,24 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
152
  <thead>
153
  <tr>
154
  <th width="50%">URL</th>
155
- <?php if ( aiosp_include_images() ) : ?>
156
- <th>Images</th>
157
- <?php endif; ?>
158
- <?php if ( AIOSEOPPRO ) : ?>
159
- <xsl:if test="$sitemapType='video'">
160
- <th>Videos</th>
161
- <th>Video Thumbnails</th>
162
- </xsl:if>
163
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
164
  <th>Priority</th>
165
  <th>Change Frequency</th>
166
  <th>Last Change</th>
4
  *
5
  * Dynamically generates the XML Sitemap's XSL file.
6
  *
7
+ * @package All-in-One-SEO-Pack
8
+ *
9
  * @since 2.3.6
10
  * @since 2.3.12.3 Refactoring indentation and added xmlns fix for Chrome rendering.
11
  */
90
  <div id="content-head">
91
  <h1>XML Sitemap</h1>
92
  <p><?php echo __( 'Generated by', 'all-in-one-seo-pack' ); ?> <a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_sitemap" target="_blank"><?php echo AIOSEOP_PLUGIN_NAME; ?></a>, <?php echo __( 'this is an XML Sitemap, meant to be consumed by search engines like Google or Bing.', 'all-in-one-seo-pack' ); ?><br/>
93
+ <?php echo __( 'You can find more information about XML sitemaps at <a href="http://sitemaps.org">sitemaps.org</a>', 'all-in-one-seo-pack' ); ?>.</p>
94
  <p><xsl:choose>
95
  <xsl:when test="$fileType='Sitemap'">
96
  <?php echo __( 'This sitemap contains', 'all-in-one-seo-pack' ); ?> <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of> <?php echo __( 'URLs', 'all-in-one-seo-pack' ); ?>.</xsl:when>
153
  <thead>
154
  <tr>
155
  <th width="50%">URL</th>
156
+ <?php
157
+ if ( aiosp_include_images() ) {
158
+ ?>
159
+ <th>Images</th>
160
+ <?php
161
+ }
162
+ ?>
163
+ <?php
164
+ if ( AIOSEOPPRO ) {
165
+ ?>
166
+
167
+ <xsl:if test="$sitemapType='video'">
168
+ <th>Videos</th>
169
+ <th>Video Thumbnails</th>
170
+ </xsl:if>
171
+ <?php
172
+ }
173
+ ?>
174
  <th>Priority</th>
175
  <th>Change Frequency</th>
176
  <th>Last Change</th>
inc/translations.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Translations
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
 
9
  if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
10
 
@@ -15,93 +9,31 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
15
  */
16
  class AIOSEOP_Translations {
17
 
18
- /**
19
- * Current Local
20
- *
21
- * @since ?
22
- *
23
- * @var string $current_locale
24
- */
25
  public $current_locale = '';
26
 
27
- /**
28
- * URL
29
- *
30
- * @since ?
31
- *
32
- * @var string $url
33
- */
34
  public $url = 'https://translate.wordpress.org/api/projects/wp-plugins/all-in-one-seo-pack/dev';
35
 
36
- /**
37
- * Name
38
- *
39
- * @since ?
40
- *
41
- * @var string $name
42
- */
43
  public $name = '';
44
 
45
  /**
46
  * Loop through the locale info.
47
  *
48
  * @since 2.3.5
49
- *
50
  * @var string $wplocale Information for a particular locale (in loop)
51
  */
52
  public $wplocale = '';
53
-
54
- /**
55
- * Translated Count
56
- *
57
- * @since ?
58
- *
59
- * @var int $translated_count
60
- */
61
  public $translated_count = 0;
62
-
63
- /**
64
- * Translation URL
65
- *
66
- * @since ?
67
- *
68
- * @var string $translation_url
69
- */
70
  public $translation_url = 'https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack';
71
-
72
- /**
73
- * Slug
74
- *
75
- * @since ?
76
- *
77
- * @var string $slug
78
- */
79
  public $slug = '';
80
-
81
- /**
82
- * Percent Translated
83
- *
84
- * @since ?
85
- *
86
- * @var string $percent_translated
87
- */
88
  public $percent_translated = '';
89
-
90
- /**
91
- * Native Name
92
- *
93
- * @since 2.3.14.1
94
- *
95
- * @var string $native_name
96
- */
97
  public $native_name = '';
98
 
99
  /**
100
- * Constructor
101
- *
102
  * AIOSEOP_Translations constructor.
103
  *
104
  * @since 2.3.5
 
105
  */
106
  public function __construct() {
107
 
@@ -116,8 +48,6 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
116
  }
117
 
118
  /**
119
- * Get Local Data
120
- *
121
  * Fetch locale data from WP.
122
  *
123
  * @since 2.3.5
@@ -136,8 +66,6 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
136
 
137
 
138
  /**
139
- *
140
- * Set Current Loacal Data
141
  *
142
  * @since 2.3.5
143
  *
@@ -200,11 +128,11 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
200
  }
201
 
202
  /**
203
- * Count Translated Languages
204
  *
205
  * @since 2.3.5
206
  *
207
  * @param $locales
 
208
  * @return int
209
  */
210
  private function count_translated_languages( $locales ) {
@@ -222,7 +150,7 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
222
  }
223
 
224
  /**
225
- * Set Translation URL
226
  *
227
  * @since 2.3.5
228
  */
@@ -238,8 +166,6 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
238
  }
239
 
240
  /**
241
- * Set Native Language
242
- *
243
  * Gets and sets the native language.
244
  *
245
  * @since 2.3.12.1
@@ -257,11 +183,11 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
257
  }
258
 
259
  /**
260
- * Init
261
  *
262
  * @since 2.3.5
263
  * @since 2.3.6 Return FALSE on WP_Error object in get_locale_data().
264
  * @since 2.3.12.1 set_native_language()
 
265
  */
266
  private function init() {
267
 
1
  <?php
 
 
 
 
 
 
2
 
3
  if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
4
 
9
  */
10
  class AIOSEOP_Translations {
11
 
 
 
 
 
 
 
 
12
  public $current_locale = '';
13
 
 
 
 
 
 
 
 
14
  public $url = 'https://translate.wordpress.org/api/projects/wp-plugins/all-in-one-seo-pack/dev';
15
 
 
 
 
 
 
 
 
16
  public $name = '';
17
 
18
  /**
19
  * Loop through the locale info.
20
  *
21
  * @since 2.3.5
22
+ * @access public
23
  * @var string $wplocale Information for a particular locale (in loop)
24
  */
25
  public $wplocale = '';
 
 
 
 
 
 
 
 
26
  public $translated_count = 0;
 
 
 
 
 
 
 
 
27
  public $translation_url = 'https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack';
 
 
 
 
 
 
 
 
28
  public $slug = '';
 
 
 
 
 
 
 
 
29
  public $percent_translated = '';
 
 
 
 
 
 
 
 
30
  public $native_name = '';
31
 
32
  /**
 
 
33
  * AIOSEOP_Translations constructor.
34
  *
35
  * @since 2.3.5
36
+ *
37
  */
38
  public function __construct() {
39
 
48
  }
49
 
50
  /**
 
 
51
  * Fetch locale data from WP.
52
  *
53
  * @since 2.3.5
66
 
67
 
68
  /**
 
 
69
  *
70
  * @since 2.3.5
71
  *
128
  }
129
 
130
  /**
 
131
  *
132
  * @since 2.3.5
133
  *
134
  * @param $locales
135
+ *
136
  * @return int
137
  */
138
  private function count_translated_languages( $locales ) {
150
  }
151
 
152
  /**
153
+ *
154
  *
155
  * @since 2.3.5
156
  */
166
  }
167
 
168
  /**
 
 
169
  * Gets and sets the native language.
170
  *
171
  * @since 2.3.12.1
183
  }
184
 
185
  /**
 
186
  *
187
  * @since 2.3.5
188
  * @since 2.3.6 Return FALSE on WP_Error object in get_locale_data().
189
  * @since 2.3.12.1 set_native_language()
190
+ *
191
  */
192
  private function init() {
193
 
modules/aioseop_bad_robots.php CHANGED
@@ -1,9 +1,6 @@
1
  <?php
2
  /**
3
- * Bad Robots Module
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
 
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
@@ -23,11 +20,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
23
  parent::__construct();
24
 
25
  $this->default_options = array(
26
- 'block_bots' => array( 'name' => __( 'Block Bad Bots using HTTP', 'all-in-one-seo-pack' ) ),
27
- 'block_refer' => array( 'name' => __( 'Block Referral Spam using HTTP', 'all-in-one-seo-pack' ) ),
28
- 'track_blocks' => array( 'name' => __( 'Track Blocked Bots', 'all-in-one-seo-pack' ) ),
29
- 'edit_blocks' => array( 'name' => __( 'Use Custom Blocklists', 'all-in-one-seo-pack' ) ),
30
- 'blocklist' => array(
31
  'name' => __( 'User Agent Blocklist', 'all-in-one-seo-pack' ),
32
  'type' => 'textarea',
33
  'rows' => 5,
@@ -35,7 +32,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
35
  'condshow' => array( "{$this->prefix}edit_blocks" => 'on' ),
36
  'default' => join( "\n", $this->default_bad_bots() ),
37
  ),
38
- 'referlist' => array(
39
  'name' => __( 'Referer Blocklist', 'all-in-one-seo-pack' ),
40
  'type' => 'textarea',
41
  'rows' => 5,
@@ -46,7 +43,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
46
  ),
47
  'default' => join( "\n", $this->default_bad_referers() ),
48
  ),
49
- 'blocked_log' => array(
50
  'name' => __( 'Log Of Blocked Bots', 'all-in-one-seo-pack' ),
51
  'default' => __( 'No requests yet.', 'all-in-one-seo-pack' ),
52
  'type' => 'esc_html',
@@ -62,7 +59,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
62
 
63
  add_filter( $this->prefix . 'display_options', array( $this, 'filter_display_options' ) );
64
 
65
- // Load initial options / set defaults.
66
  $this->update_options();
67
 
68
  if ( $this->option_isset( 'edit_blocks' ) ) {
@@ -91,9 +88,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
91
  /**
92
  * Validate IP.
93
  *
 
 
94
  * @since 2.3.7
95
  *
96
- * @param $ip
97
  * @return string
98
  */
99
  function validate_ip( $ip ) {
@@ -114,11 +112,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
114
  }
115
 
116
  /**
117
- * Filter Bad Refer List
118
- *
119
- * @since ?
120
- *
121
  * @param $referlist
 
122
  * @return array
123
  */
124
  function filter_bad_referlist( $referlist ) {
@@ -130,11 +125,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
130
  }
131
 
132
  /**
133
- * Filter Bad Bot List
134
- *
135
- * @since ?
136
- *
137
  * @param $botlist
 
138
  * @return array
139
  */
140
  function filter_bad_botlist( $botlist ) {
@@ -147,12 +139,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
147
 
148
 
149
  /**
150
- * Blocked Message
151
- *
152
  * Updates blocked message.
153
  *
154
- * @since 2.3.11.1
155
- *
156
  * @param string $msg
157
  */
158
  function blocked_message( $msg ) {
@@ -181,9 +169,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
181
  *
182
  * Add in options for status display on settings page, sitemap rewriting on multisite.
183
  *
184
- * @since ?
185
- *
186
  * @param $options
 
187
  * @return mixed
188
  */
189
  function filter_display_options( $options ) {
1
  <?php
2
  /**
3
+ * @package All-in-One-SEO-Pack
 
 
 
4
  */
5
 
6
  if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
20
  parent::__construct();
21
 
22
  $this->default_options = array(
23
+ 'block_bots' => array( 'name' => __( 'Block Bad Bots using HTTP', 'all-in-one-seo-pack' ) ),
24
+ 'block_refer' => array( 'name' => __( 'Block Referral Spam using HTTP', 'all-in-one-seo-pack' ) ),
25
+ 'track_blocks' => array( 'name' => __( 'Track Blocked Bots', 'all-in-one-seo-pack' ) ),
26
+ 'edit_blocks' => array( 'name' => __( 'Use Custom Blocklists', 'all-in-one-seo-pack' ) ),
27
+ 'blocklist' => array(
28
  'name' => __( 'User Agent Blocklist', 'all-in-one-seo-pack' ),
29
  'type' => 'textarea',
30
  'rows' => 5,
32
  'condshow' => array( "{$this->prefix}edit_blocks" => 'on' ),
33
  'default' => join( "\n", $this->default_bad_bots() ),
34
  ),
35
+ 'referlist' => array(
36
  'name' => __( 'Referer Blocklist', 'all-in-one-seo-pack' ),
37
  'type' => 'textarea',
38
  'rows' => 5,
43
  ),
44
  'default' => join( "\n", $this->default_bad_referers() ),
45
  ),
46
+ 'blocked_log' => array(
47
  'name' => __( 'Log Of Blocked Bots', 'all-in-one-seo-pack' ),
48
  'default' => __( 'No requests yet.', 'all-in-one-seo-pack' ),
49
  'type' => 'esc_html',
59
 
60
  add_filter( $this->prefix . 'display_options', array( $this, 'filter_display_options' ) );
61
 
62
+ // Load initial options / set defaults,
63
  $this->update_options();
64
 
65
  if ( $this->option_isset( 'edit_blocks' ) ) {
88
  /**
89
  * Validate IP.
90
  *
91
+ * @param $ip
92
+ *
93
  * @since 2.3.7
94
  *
 
95
  * @return string
96
  */
97
  function validate_ip( $ip ) {
112
  }
113
 
114
  /**
 
 
 
 
115
  * @param $referlist
116
+ *
117
  * @return array
118
  */
119
  function filter_bad_referlist( $referlist ) {
125
  }
126
 
127
  /**
 
 
 
 
128
  * @param $botlist
129
+ *
130
  * @return array
131
  */
132
  function filter_bad_botlist( $botlist ) {
139
 
140
 
141
  /**
 
 
142
  * Updates blocked message.
143
  *
 
 
144
  * @param string $msg
145
  */
146
  function blocked_message( $msg ) {
169
  *
170
  * Add in options for status display on settings page, sitemap rewriting on multisite.
171
  *
 
 
172
  * @param $options
173
+ *
174
  * @return mixed
175
  */
176
  function filter_display_options( $options ) {
modules/aioseop_feature_manager.php CHANGED
@@ -2,8 +2,7 @@
2
  /**
3
  * The Feature Manager class.
4
  *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
 
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
@@ -13,20 +12,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
13
  */
14
  class All_in_One_SEO_Pack_Feature_Manager extends All_in_One_SEO_Pack_Module {
15
 
16
- /**
17
- * Module Info
18
- *
19
- * @since ?
20
- *
21
- * @var array|mixed|void $module_info
22
- */
23
  protected $module_info = array();
24
 
25
  /**
26
  * All_in_One_SEO_Pack_Feature_Manager constructor.
27
  *
28
- * @since ?
29
- *
30
  * @param $mod Module.
31
  */
32
  function __construct( $mod ) {
@@ -37,14 +27,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
37
  parent::__construct();
38
  $this->module_info = array(
39
  'sitemap' => array(
40
- /* translators: the XML Sitemaps module allows users to generate a sitemap in .xml format for their website and submit it to search engines such as Google, Bing and Yahoo. */
 
41
  'name' => __( 'XML Sitemaps', 'all-in-one-seo-pack' ),
42
  'description' => __( 'Create and manage your XML Sitemaps using this feature and submit your XML Sitemap to Google, Bing/Yahoo and Ask.com.', 'all-in-one-seo-pack' ),
43
  ),
44
  'opengraph' => array(
45
- /* translators: the Social Meta module allows users to add Open Graph (OG:) meta tags to their site's post/pages to control the appearance of them when shared on social media networks like Facebook and Twitter. */
 
46
  'name' => __( 'Social Meta', 'all-in-one-seo-pack' ),
47
- /* translators: Social Meta refers to Open Graph (OG:) meta tags, which can be used to control the appearance of a site's posts/pages when shared on social media networks like Facebook and Twitter. */
 
48
  'description' => __( 'Add Social Meta data to your site to deliver closer integration between your website and social media.', 'all-in-one-seo-pack' ),
49
  ),
50
  'robots' => array(
@@ -58,7 +51,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
58
  'description' => __( 'Edit your .htaccess file to fine-tune your site.', 'all-in-one-seo-pack' ),
59
  ),
60
  'importer_exporter' => array(
61
- /* translators: the Importer & Exporter module allows users to import/export their All in One SEO Pack settings for backup purposes or when migrating their site. */
 
62
  'name' => __( 'Importer & Exporter', 'all-in-one-seo-pack' ),
63
  /* 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. */
64
  'description' => sprintf( __( 'Exports and imports your %s plugin settings.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
@@ -70,7 +64,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
70
  'description' => __( 'Stop badly behaving bots from slowing down your website.', 'all-in-one-seo-pack' ),
71
  ),
72
  'performance' => array(
73
- /* translators: the Performance module allows users to set certain performance related settings and check the status of their WordPress installation. */
 
74
  'name' => __( 'Performance', 'all-in-one-seo-pack' ),
75
  'description' => __( 'Optimize performance related to SEO and check your system status.', 'all-in-one-seo-pack' ),
76
  'default' => 'on',
@@ -87,7 +82,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
87
  'save' => false,
88
  );
89
  $this->module_info['video_sitemap'] = array(
90
- /* translators: the Video Sitemap module allows users to generate a sitemap with video content in .xml format for their website and submit it to search engines such as Google, Bing and Yahoo. */
 
91
  'name' => __( 'Video Sitemap', 'all-in-one-seo-pack' ),
92
  'description' => __( 'Create and manage your Video Sitemap using this feature and submit your Video Sitemap to Google, Bing/Yahoo and Ask.com.', 'all-in-one-seo-pack' ),
93
  );
@@ -154,12 +150,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
154
  }
155
 
156
  /**
157
- * Menu Order
158
- *
159
  * Determines the menu order.
160
  *
161
- * @since ?
162
- *
163
  * @return int
164
  */
165
  function menu_order() {
@@ -167,11 +159,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
167
  }
168
 
169
  /**
170
- * Filter Submit
171
- *
172
- * @since ?
173
- *
174
  * @param $submit
 
175
  * @return mixed
176
  */
177
  function filter_submit( $submit ) {
@@ -184,12 +173,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
184
  }
185
 
186
  /**
187
- * Display Option Div
188
- *
189
- * @since ?
190
- *
191
  * @param $buf
192
  * @param $args
 
193
  * @return string
194
  */
195
  function display_option_div( $buf, $args ) {
2
  /**
3
  * The Feature Manager class.
4
  *
5
+ * @package All-in-One-SEO-Pack
 
6
  */
7
 
8
  if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
12
  */
13
  class All_in_One_SEO_Pack_Feature_Manager extends All_in_One_SEO_Pack_Module {
14
 
 
 
 
 
 
 
 
15
  protected $module_info = array();
16
 
17
  /**
18
  * All_in_One_SEO_Pack_Feature_Manager constructor.
19
  *
 
 
20
  * @param $mod Module.
21
  */
22
  function __construct( $mod ) {
27
  parent::__construct();
28
  $this->module_info = array(
29
  'sitemap' => array(
30
+ /* translators: the XML Sitemaps module allows users to generate a sitemap in .xml format for their website and
31
+ submit it to search engines such as Google, Bing and Yahoo. */
32
  'name' => __( 'XML Sitemaps', 'all-in-one-seo-pack' ),
33
  'description' => __( 'Create and manage your XML Sitemaps using this feature and submit your XML Sitemap to Google, Bing/Yahoo and Ask.com.', 'all-in-one-seo-pack' ),
34
  ),
35
  'opengraph' => array(
36
+ /* translators: the Social Meta module allows users to add Open Graph (OG:) meta tags to their site's post/pages
37
+ to control the appearance of them when shared on social media networks like Facebook and Twitter. */
38
  'name' => __( 'Social Meta', 'all-in-one-seo-pack' ),
39
+ /* translators: Social Meta refers to Open Graph (OG:) meta tags, which can be used to control the appearance
40
+ of a site's posts/pages when shared on social media networks like Facebook and Twitter. */
41
  'description' => __( 'Add Social Meta data to your site to deliver closer integration between your website and social media.', 'all-in-one-seo-pack' ),
42
  ),
43
  'robots' => array(
51
  'description' => __( 'Edit your .htaccess file to fine-tune your site.', 'all-in-one-seo-pack' ),
52
  ),
53
  'importer_exporter' => array(
54
+ /* translators: the Importer & Exporter module allows users to import/export their All in One SEO Pack
55
+ settings for backup purposes or when migrating their site. */
56
  'name' => __( 'Importer & Exporter', 'all-in-one-seo-pack' ),
57
  /* 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. */
58
  'description' => sprintf( __( 'Exports and imports your %s plugin settings.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
64
  'description' => __( 'Stop badly behaving bots from slowing down your website.', 'all-in-one-seo-pack' ),
65
  ),
66
  'performance' => array(
67
+ /* translators: the Performance module allows users to set certain performance related settings and
68
+ check the status of their WordPress installation. */
69
  'name' => __( 'Performance', 'all-in-one-seo-pack' ),
70
  'description' => __( 'Optimize performance related to SEO and check your system status.', 'all-in-one-seo-pack' ),
71
  'default' => 'on',
82
  'save' => false,
83
  );
84
  $this->module_info['video_sitemap'] = array(
85
+ /*translators: the Video Sitemap module allows users to generate a sitemap with video content in .xml format
86
+ for their website and submit it to search engines such as Google, Bing and Yahoo. */
87
  'name' => __( 'Video Sitemap', 'all-in-one-seo-pack' ),
88
  'description' => __( 'Create and manage your Video Sitemap using this feature and submit your Video Sitemap to Google, Bing/Yahoo and Ask.com.', 'all-in-one-seo-pack' ),
89
  );
150
  }
151
 
152
  /**
 
 
153
  * Determines the menu order.
154
  *
 
 
155
  * @return int
156
  */
157
  function menu_order() {
159
  }
160
 
161
  /**
 
 
 
 
162
  * @param $submit
163
+ *
164
  * @return mixed
165
  */
166
  function filter_submit( $submit ) {
173
  }
174
 
175
  /**
 
 
 
 
176
  * @param $buf
177
  * @param $args
178
+ *
179
  * @return string
180
  */
181
  function display_option_div( $buf, $args ) {
modules/aioseop_file_editor.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
 
2
  /**
3
- * The File Editor class
4
  *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
-
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
10
 
11
  /**
@@ -17,9 +16,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
17
  * All_in_One_SEO_Pack_File_Editor constructor.
18
  */
19
  function __construct() {
20
- $this->name = __( 'File Editor', 'all-in-one-seo-pack' ); // Human-readable name of the plugin.
21
- $this->prefix = 'aiosp_file_editor_'; // option prefix.
22
- $this->file = __FILE__; // the current file.
23
  parent::__construct();
24
  $this->current_tab = 'htaccess';
25
  if ( isset( $_REQUEST['tab'] ) ) {
@@ -50,36 +49,23 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
50
  ),
51
  );
52
 
53
- // load initial options / set defaults.
54
- $this->update_options();
55
  }
56
 
57
- /**
58
- * Settings Page Initialize
59
- *
60
- * @since ?
61
- */
62
  function settings_page_init() {
63
  add_filter( $this->prefix . 'display_options', array( $this, 'filter_options' ), 10, 2 );
64
  add_filter( $this->prefix . 'submit_options', array( $this, 'filter_submit' ), 10, 2 );
65
  }
66
 
67
- /**
68
- * Add Page Hooks
69
- *
70
- * @since ?
71
- */
72
  function add_page_hooks() {
73
  parent::add_page_hooks();
74
  add_action( $this->prefix . 'settings_update', array( $this, 'do_file_editor' ), 10, 2 );
75
  }
76
 
77
  /**
78
- * Filter Submit
79
- *
80
- * @since ?
81
  * @param $submit
82
  * @param $location
 
83
  * @return mixed
84
  */
85
  function filter_submit( $submit, $location ) {
@@ -97,12 +83,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
97
  }
98
 
99
  /**
100
- * Filter Options
101
- *
102
- * @since ?
103
- *
104
  * @param $options
105
  * @param $location
 
106
  * @return mixed
107
  */
108
  function filter_options( $options, $location ) {
@@ -115,10 +98,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
115
  }
116
 
117
  /**
118
- * Do File Editor
119
- *
120
- * @since ?
121
- *
122
  * @param $options This seems to be unused.
123
  * @param $location
124
  */
1
  <?php
2
+
3
  /**
4
+ * The File Editor class.
5
  *
6
+ * @package All-in-One-SEO-Pack
 
7
  */
 
8
  if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
9
 
10
  /**
16
  * All_in_One_SEO_Pack_File_Editor constructor.
17
  */
18
  function __construct() {
19
+ $this->name = __( 'File Editor', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
20
+ $this->prefix = 'aiosp_file_editor_'; // option prefix
21
+ $this->file = __FILE__; // the current file
22
  parent::__construct();
23
  $this->current_tab = 'htaccess';
24
  if ( isset( $_REQUEST['tab'] ) ) {
49
  ),
50
  );
51
 
52
+ $this->update_options(); // load initial options / set defaults
 
53
  }
54
 
 
 
 
 
 
55
  function settings_page_init() {
56
  add_filter( $this->prefix . 'display_options', array( $this, 'filter_options' ), 10, 2 );
57
  add_filter( $this->prefix . 'submit_options', array( $this, 'filter_submit' ), 10, 2 );
58
  }
59
 
 
 
 
 
 
60
  function add_page_hooks() {
61
  parent::add_page_hooks();
62
  add_action( $this->prefix . 'settings_update', array( $this, 'do_file_editor' ), 10, 2 );
63
  }
64
 
65
  /**
 
 
 
66
  * @param $submit
67
  * @param $location
68
+ *
69
  * @return mixed
70
  */
71
  function filter_submit( $submit, $location ) {
83
  }
84
 
85
  /**
 
 
 
 
86
  * @param $options
87
  * @param $location
88
+ *
89
  * @return mixed
90
  */
91
  function filter_options( $options, $location ) {
98
  }
99
 
100
  /**
 
 
 
 
101
  * @param $options This seems to be unused.
102
  * @param $location
103
  */
modules/aioseop_importer_exporter.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * AIOSEOP Import & Export
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
 
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
10
 
@@ -19,8 +13,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
19
  * All_in_One_SEO_Pack_Importer_Exporter constructor.
20
  */
21
  function __construct() {
22
- $this->name = __( 'Importer & Exporter', 'all-in-one-seo-pack' ); // Human-readable name of the module.
23
- $this->prefix = 'aiosp_importer_exporter_'; // option prefix.
24
  $this->file = __FILE__;
25
  parent::__construct();
26
  $this->warnings = array();
@@ -37,7 +31,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
37
  'type' => 'multicheckbox',
38
  'initial_options' => array(
39
  1 => __( 'General Settings', 'all-in-one-seo-pack' ),
40
- 2 => __( 'Post Data', 'all-in-one-seo-pack' ),
41
  ),
42
  ),
43
  'export_post_types' => array(
@@ -71,15 +65,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
71
  ),
72
  );
73
 
74
- // load initial options / set defaults.
75
  add_action( 'admin_init', array( $this, 'debug_post_types' ), 5 );
76
  }
77
 
78
- /**
79
- * Settings Page Initialize
80
- *
81
- * @since ?
82
- */
83
  function settings_page_init() {
84
  add_filter(
85
  $this->prefix . 'submit_options',
@@ -89,15 +79,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
89
 
90
 
91
  /**
92
- * Filter Submit
93
- *
94
- * @since ?
95
- *
96
  * @param $submit
 
97
  * @return array
98
  */
99
  function filter_submit( $submit ) {
100
- $submit['Submit']['value'] = __( 'Import', 'all-in-one-seo-pack' ) . ' &raquo;';
 
 
 
 
101
 
102
  return array(
103
  'export_submit' => array(
@@ -108,11 +99,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
108
  ) + $submit;
109
  }
110
 
111
- /**
112
- * Debug Post Types
113
- *
114
- * @since ?
115
- */
116
  function debug_post_types() {
117
  $post_types = $this->get_post_type_titles();
118
  $rempost = array(
@@ -166,16 +153,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
166
 
167
 
168
  /**
169
- * Importer/Exporter Export
170
- *
171
- * @since ?
172
- *
173
  * @param $args
 
174
  * @return string
175
  */
176
  function importer_exporter_export( $args ) {
177
 
178
- // Adds all settings to settings file.
179
  $name = $this->get_option_name();
180
  $buf = '[' . $this->get_option_name() . "]\n";
181
  if ( ! empty( $this->options ) ) {
@@ -191,11 +175,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
191
  return $buf;
192
  }
193
 
194
- /**
195
- * Show Import Warning
196
- *
197
- * @since ?
198
- */
199
  function show_import_warnings() {
200
 
201
  echo '<div class="error fade" style="width:52%">';
@@ -210,15 +190,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
210
 
211
 
212
  /**
213
- * Parse INI Helper
214
- *
215
- * @since ?
216
- *
217
  * @param $array
 
218
  * @return array
219
  */
220
  function parse_ini_helper( $array ) {
221
- $return_array = array();
222
  if ( is_array( $array ) ) {
223
  foreach ( $array as $key => $value ) {
224
  $e = explode( ':', $key );
@@ -230,41 +207,37 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
230
  $x = array_reverse( $x, true );
231
  foreach ( $x as $k => $v ) {
232
  $c = $x[0];
233
- if ( empty( $return_array[ $c ] ) ) {
234
- $return_array[ $c ] = array();
235
  }
236
- if ( isset( $return_array[ $x[1] ] ) ) {
237
- $return_array[ $c ] = array_merge(
238
- $return_array[ $c ],
239
- $return_array[ $x[1] ]
240
  );
241
  }
242
  if ( $k === 0 ) {
243
- $return_array[ $c ] = array_merge(
244
- $return_array[ $c ],
245
- $array[ $key ]
246
  );
247
  }
248
  }
249
  } else {
250
- $return_array[ $key ] = $array[ $key ];
251
  }
252
  }
253
  }
254
 
255
- return $return_array;
256
  }
257
 
 
258
  /**
259
- * Recursive Parse
260
- *
261
- * @since ?
262
- *
263
  * @param $array
 
264
  * @return array
265
  */
266
  function recursive_parse( $array ) {
267
- $return_array = array();
268
  if ( is_array( $array ) ) {
269
  foreach ( $array as $key => $value ) {
270
  if ( is_array( $value ) ) {
@@ -273,11 +246,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
273
  $x = explode( '.', $key );
274
  if ( ! empty( $x[1] ) ) {
275
  $x = array_reverse( $x, true );
276
- if ( isset( $return_array[ $key ] ) ) {
277
- unset( $return_array[ $key ] );
278
  }
279
- if ( ! isset( $return_array[ $x[0] ] ) ) {
280
- $return_array[ $x[0] ] = array();
281
  }
282
  $first = true;
283
  foreach ( $x as $k => $v ) {
@@ -287,27 +260,23 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
287
  }
288
  $b = array( $v => $b );
289
  }
290
- $return_array[ $x[0] ] = array_merge_recursive(
291
- $return_array[ $x[0] ],
292
- $b[ $x[0] ]
293
  );
294
  } else {
295
- $return_array[ $key ] = $array[ $key ];
296
  }
297
  }
298
  }
299
 
300
- return $return_array;
301
  }
302
 
303
 
304
  /**
305
- * Get INI File
306
- *
307
- * @since ?
308
- *
309
  * @param $assoc_arr
310
  * @param bool $has_sections
 
311
  * @return string
312
  */
313
  function get_ini_file( $assoc_arr, $has_sections = true ) {
@@ -344,12 +313,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
344
  return $content;
345
  }
346
 
 
347
  /**
348
- * Parse INI Advanced
349
- *
350
- * @since ?
351
- *
352
  * @param $string
 
353
  * @return array
354
  */
355
  function parse_ini_advanced( $string ) {
@@ -360,11 +327,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
360
  );
361
  }
362
 
363
- /**
364
- * Do Importer/Exporter
365
- *
366
- * @since ?
367
- */
368
  function do_importer_exporter() {
369
  $submit = null;
370
  $count = 0;
@@ -394,7 +357,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
394
  switch ( $submit ) {
395
  case 'Import':
396
  try {
397
- // Parses export file.
398
  $file = $this->get_sanitized_file(
399
  $_FILES['aiosp_importer_exporter_import_submit']['tmp_name']
400
  );
@@ -441,13 +404,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
441
  }
442
  }
443
 
444
- // Updates Plugin Settings.
445
  if ( is_array( $section ) ) {
446
  foreach ( $section as $label => $module_options ) {
447
  if ( is_array( $module_options ) ) {
448
  foreach ( $module_options as $key => $value ) {
449
 
450
- // Updates Post Data.
451
  if ( $label == 'post_data' ) {
452
  $post_exists = post_exists(
453
  $module_options[ $key ]['post_title'],
@@ -455,9 +418,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
455
  $module_options[ $key ]['post_date']
456
  );
457
  $target = get_post( $post_exists );
458
- if (
459
- ( ! empty( $module_options[ $key ]['post_type'] ) ) &&
460
- $post_exists != null
461
  ) {
462
  if ( is_array( $value ) ) {
463
  foreach ( $value as $field_name => $field_value ) {
@@ -493,7 +455,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
493
  $post_warning = null;
494
  }
495
 
496
- // Updates Module Settings.
497
  } else {
498
  $module_options[ $key ] = str_replace(
499
  array( "\'", '\n', '\r' ),
@@ -503,7 +465,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
503
  }
504
  }
505
 
506
- // Updates Module Settings.
507
  $this->update_class_option(
508
  $module_options,
509
  $label
@@ -512,7 +474,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
512
  }
513
  }
514
  } catch ( Exception $e ) {
515
- // Shows only one warning when compromised file is imported.
516
  $this->warnings = array();
517
  $this->warnings[] = $e->getMessage();
518
  add_action(
@@ -522,7 +484,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
522
  break;
523
  }
524
 
525
- // Shows all errors found.
526
  if ( ! empty( $this->warnings ) ) {
527
  add_action(
528
  $this->prefix . 'settings_header',
@@ -533,23 +495,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
533
 
534
  break;
535
  case 'Export':
536
- // Creates Files Contents.
537
  $settings_file = 'settings_aioseop.ini';
538
  /* 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. */
539
  $buf = '; ' . sprintf(
540
  __(
541
- 'Settings export file for %s',
542
- '
543
  all-in-one-seo-pack'
544
  ),
545
  AIOSEOP_PLUGIN_NAME
546
  ) . "\n";
547
 
548
- // Adds all settings to settings file.
549
  $buf = $aiosp->settings_export( $buf );
550
  $buf = apply_filters( 'aioseop_export_settings', $buf );
551
 
552
- // Sends File to browser.
553
  $strlength = strlen( $buf );
554
  header( 'Content-type: application/ini' );
555
  header( "Content-Disposition: attachment; filename=$settings_file" );
@@ -562,30 +523,23 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
562
  }
563
 
564
 
565
- /**
566
- * Settings Update
567
- *
568
- * @since ?
569
- * @deprecated
570
- */
571
  function settings_update() {
572
  }
573
 
574
  /**
575
- * Get Sanitized File
576
- *
577
  * Returns sanitized imported file.
578
  *
579
- * @since 2.3.4.2
580
  *
581
  * @param string $filename Path to where the uploaded file is located.
 
582
  * @return array Sanitized file as array.
583
  * @throws Exception
584
  */
585
  private function get_sanitized_file( $filename ) {
586
  $file = file( $filename );
587
  for ( $i = count( $file ) - 1; $i >= 0; -- $i ) {
588
- // Remove insecured lines.
589
  if ( preg_match( '/\<(\?php|script)/', $file[ $i ] ) ) {
590
  throw new Exception(
591
  __(
@@ -594,9 +548,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
594
  )
595
  );
596
  }
597
- // Apply security filters.
598
  $file[ $i ] = strip_tags( trim( $file[ $i ] ) );
599
- // Remove empty lines.
600
  if ( empty( $file[ $i ] ) ) {
601
  unset( $file[ $i ] );
602
  }
1
  <?php
 
 
 
 
 
 
2
 
3
  if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
4
 
13
  * All_in_One_SEO_Pack_Importer_Exporter constructor.
14
  */
15
  function __construct() {
16
+ $this->name = __( 'Importer & Exporter', 'all-in-one-seo-pack' ); // Human-readable name of the module
17
+ $this->prefix = 'aiosp_importer_exporter_'; // option prefix
18
  $this->file = __FILE__;
19
  parent::__construct();
20
  $this->warnings = array();
31
  'type' => 'multicheckbox',
32
  'initial_options' => array(
33
  1 => __( 'General Settings', 'all-in-one-seo-pack' ),
34
+ + 2 => __( 'Post Data', 'all-in-one-seo-pack' ),
35
  ),
36
  ),
37
  'export_post_types' => array(
65
  ),
66
  );
67
 
68
+ // load initial options / set defaults
69
  add_action( 'admin_init', array( $this, 'debug_post_types' ), 5 );
70
  }
71
 
72
+
 
 
 
 
73
  function settings_page_init() {
74
  add_filter(
75
  $this->prefix . 'submit_options',
79
 
80
 
81
  /**
 
 
 
 
82
  * @param $submit
83
+ *
84
  * @return array
85
  */
86
  function filter_submit( $submit ) {
87
+ $submit['Submit']['value'] = __(
88
+ 'Import',
89
+ 'all-in-one-seo-pack'
90
+ )
91
+ . ' &raquo;';
92
 
93
  return array(
94
  'export_submit' => array(
99
  ) + $submit;
100
  }
101
 
102
+
 
 
 
 
103
  function debug_post_types() {
104
  $post_types = $this->get_post_type_titles();
105
  $rempost = array(
153
 
154
 
155
  /**
 
 
 
 
156
  * @param $args
157
+ *
158
  * @return string
159
  */
160
  function importer_exporter_export( $args ) {
161
 
162
+ // Adds all settings to settings file
163
  $name = $this->get_option_name();
164
  $buf = '[' . $this->get_option_name() . "]\n";
165
  if ( ! empty( $this->options ) ) {
175
  return $buf;
176
  }
177
 
178
+
 
 
 
 
179
  function show_import_warnings() {
180
 
181
  echo '<div class="error fade" style="width:52%">';
190
 
191
 
192
  /**
 
 
 
 
193
  * @param $array
194
+ *
195
  * @return array
196
  */
197
  function parse_ini_helper( $array ) {
198
+ $returnArray = array();
199
  if ( is_array( $array ) ) {
200
  foreach ( $array as $key => $value ) {
201
  $e = explode( ':', $key );
207
  $x = array_reverse( $x, true );
208
  foreach ( $x as $k => $v ) {
209
  $c = $x[0];
210
+ if ( empty( $returnArray[ $c ] ) ) {
211
+ $returnArray[ $c ] = array();
212
  }
213
+ if ( isset( $returnArray[ $x[1] ] ) ) {
214
+ $returnArray[ $c ] = array_merge(
215
+ $returnArray[ $c ], $returnArray[ $x[1] ]
 
216
  );
217
  }
218
  if ( $k === 0 ) {
219
+ $returnArray[ $c ] = array_merge(
220
+ $returnArray[ $c ], $array[ $key ]
 
221
  );
222
  }
223
  }
224
  } else {
225
+ $returnArray[ $key ] = $array[ $key ];
226
  }
227
  }
228
  }
229
 
230
+ return $returnArray;
231
  }
232
 
233
+
234
  /**
 
 
 
 
235
  * @param $array
236
+ *
237
  * @return array
238
  */
239
  function recursive_parse( $array ) {
240
+ $returnArray = array();
241
  if ( is_array( $array ) ) {
242
  foreach ( $array as $key => $value ) {
243
  if ( is_array( $value ) ) {
246
  $x = explode( '.', $key );
247
  if ( ! empty( $x[1] ) ) {
248
  $x = array_reverse( $x, true );
249
+ if ( isset( $returnArray[ $key ] ) ) {
250
+ unset( $returnArray[ $key ] );
251
  }
252
+ if ( ! isset( $returnArray[ $x[0] ] ) ) {
253
+ $returnArray[ $x[0] ] = array();
254
  }
255
  $first = true;
256
  foreach ( $x as $k => $v ) {
260
  }
261
  $b = array( $v => $b );
262
  }
263
+ $returnArray[ $x[0] ] = array_merge_recursive(
264
+ $returnArray[ $x[0] ], $b[ $x[0] ]
 
265
  );
266
  } else {
267
+ $returnArray[ $key ] = $array[ $key ];
268
  }
269
  }
270
  }
271
 
272
+ return $returnArray;
273
  }
274
 
275
 
276
  /**
 
 
 
 
277
  * @param $assoc_arr
278
  * @param bool $has_sections
279
+ *
280
  * @return string
281
  */
282
  function get_ini_file( $assoc_arr, $has_sections = true ) {
313
  return $content;
314
  }
315
 
316
+
317
  /**
 
 
 
 
318
  * @param $string
319
+ *
320
  * @return array
321
  */
322
  function parse_ini_advanced( $string ) {
327
  );
328
  }
329
 
330
+
 
 
 
 
331
  function do_importer_exporter() {
332
  $submit = null;
333
  $count = 0;
357
  switch ( $submit ) {
358
  case 'Import':
359
  try {
360
+ // Parses export file
361
  $file = $this->get_sanitized_file(
362
  $_FILES['aiosp_importer_exporter_import_submit']['tmp_name']
363
  );
404
  }
405
  }
406
 
407
+ // Updates Plugin Settings
408
  if ( is_array( $section ) ) {
409
  foreach ( $section as $label => $module_options ) {
410
  if ( is_array( $module_options ) ) {
411
  foreach ( $module_options as $key => $value ) {
412
 
413
+ // Updates Post Data
414
  if ( $label == 'post_data' ) {
415
  $post_exists = post_exists(
416
  $module_options[ $key ]['post_title'],
418
  $module_options[ $key ]['post_date']
419
  );
420
  $target = get_post( $post_exists );
421
+ if ( ( ! empty( $module_options[ $key ]['post_type'] ) )
422
+ && $post_exists != null
 
423
  ) {
424
  if ( is_array( $value ) ) {
425
  foreach ( $value as $field_name => $field_value ) {
455
  $post_warning = null;
456
  }
457
 
458
+ // Updates Module Settings
459
  } else {
460
  $module_options[ $key ] = str_replace(
461
  array( "\'", '\n', '\r' ),
465
  }
466
  }
467
 
468
+ // Updates Module Settings
469
  $this->update_class_option(
470
  $module_options,
471
  $label
474
  }
475
  }
476
  } catch ( Exception $e ) {
477
+ // Shows only one warning when compromised file is imported
478
  $this->warnings = array();
479
  $this->warnings[] = $e->getMessage();
480
  add_action(
484
  break;
485
  }
486
 
487
+ // Shows all errors found
488
  if ( ! empty( $this->warnings ) ) {
489
  add_action(
490
  $this->prefix . 'settings_header',
495
 
496
  break;
497
  case 'Export':
498
+ // Creates Files Contents
499
  $settings_file = 'settings_aioseop.ini';
500
  /* 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. */
501
  $buf = '; ' . sprintf(
502
  __(
503
+ 'Settings export file for %s', '
 
504
  all-in-one-seo-pack'
505
  ),
506
  AIOSEOP_PLUGIN_NAME
507
  ) . "\n";
508
 
509
+ // Adds all settings to settings file
510
  $buf = $aiosp->settings_export( $buf );
511
  $buf = apply_filters( 'aioseop_export_settings', $buf );
512
 
513
+ // Sends File to browser
514
  $strlength = strlen( $buf );
515
  header( 'Content-type: application/ini' );
516
  header( "Content-Disposition: attachment; filename=$settings_file" );
523
  }
524
 
525
 
 
 
 
 
 
 
526
  function settings_update() {
527
  }
528
 
529
  /**
 
 
530
  * Returns sanitized imported file.
531
  *
532
+ * @since
533
  *
534
  * @param string $filename Path to where the uploaded file is located.
535
+ *
536
  * @return array Sanitized file as array.
537
  * @throws Exception
538
  */
539
  private function get_sanitized_file( $filename ) {
540
  $file = file( $filename );
541
  for ( $i = count( $file ) - 1; $i >= 0; -- $i ) {
542
+ // Remove insecured lines
543
  if ( preg_match( '/\<(\?php|script)/', $file[ $i ] ) ) {
544
  throw new Exception(
545
  __(
548
  )
549
  );
550
  }
551
+ // Apply security filters
552
  $file[ $i ] = strip_tags( trim( $file[ $i ] ) );
553
+ // Remove empty lines
554
  if ( empty( $file[ $i ] ) ) {
555
  unset( $file[ $i ] );
556
  }
modules/aioseop_opengraph.php CHANGED
@@ -2,34 +2,12 @@
2
  /**
3
  * The Opengraph class.
4
  *
5
- * @package All_in_One_SEO_Pack
6
  * @version 2.3.16
7
  */
8
-
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
10
-
11
- /**
12
- * Class All_in_One_SEO_Pack_Opengraph
13
- *
14
- * @since ?
15
- */
16
  class All_in_One_SEO_Pack_Opengraph extends All_in_One_SEO_Pack_Module {
17
- /**
18
- * Facebook Object Types
19
- *
20
- * @since ?
21
- *
22
- * @var array
23
- */
24
  var $fb_object_types;
25
-
26
- /**
27
- * Type
28
- *
29
- * @since ?
30
- *
31
- * @var string $type
32
- */
33
  var $type;
34
 
35
  /**
@@ -41,9 +19,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
41
  function __construct() {
42
  add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
43
 
44
- $this->name = __( 'Social Meta', 'all-in-one-seo-pack' ); // Human-readable name of the plugin.
45
- $this->prefix = 'aiosp_opengraph_'; // option prefix.
46
- $this->file = __FILE__; // the current file.
47
  $this->fb_object_types = array(
48
  'Activities' => array(
49
  'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
@@ -114,18 +92,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
114
  }
115
  // Set variables after WordPress load.
116
  add_action( 'init', array( &$this, 'init' ), 999999 );
117
- // Avoid having duplicate meta tags.
118
- add_filter( 'jetpack_enable_open_graph', '__return_false' );
119
  add_filter( $this->prefix . 'meta', array( $this, 'handle_meta_tag' ), 10, 5 );
120
  // Force refresh of Facebook cache.
121
  add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
122
  add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
123
  add_action( 'edited_term', array( &$this, 'save_tax_data' ), 10, 3 );
124
- // Adds special filters.
125
  add_filter( 'aioseop_opengraph_placeholder', array( &$this, 'filter_placeholder' ) );
126
  add_action( 'aiosp_activate_opengraph', array( $this, 'activate_module' ) );
127
  add_action( 'created_term', array( $this, 'created_term' ), 10, 3 );
128
- // Call to init to generate menus.
129
  $this->init();
130
  }
131
 
@@ -145,7 +122,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
145
  function handle_meta_tag( $value, $network, $meta_tag, $network_meta_tag, $extra_params ) {
146
  switch ( $meta_tag ) {
147
  case 'type':
148
- // @issue 1013 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1013 ).
149
  if ( 'blog' === $value ) {
150
  $value = 'website';
151
  }
@@ -159,7 +136,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
159
  *
160
  * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/808
161
  * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2296
162
- * @link https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.html
163
  *
164
  * @param bool The value that is proposed to be shown in the tag.
165
  * @param string $network The social network.
@@ -174,6 +150,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
174
  if ( isset( $extra_params['auto_generate_desc'] ) && $extra_params['auto_generate_desc'] ) {
175
  switch ( $network_meta_tag ) {
176
  case 'twitter:title':
 
177
  $value = trim( $this->substr( $value, 0, 70 ) );
178
  break;
179
  case 'og:description':
@@ -213,16 +190,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
213
  $object_type = null;
214
  if ( ! $terms ) {
215
  $terms = get_terms(
216
- $taxonomy_name,
217
- array(
218
  'meta_query' => array(
219
  array(
220
- 'key' => '_' . $prefix . $k,
221
  'compare' => 'NOT EXISTS',
222
  ),
223
  ),
224
- 'number' => PHP_INT_MAX,
225
- 'fields' => 'ids',
226
  'hide_empty' => false,
227
  )
228
  );
@@ -239,12 +215,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
239
  $posts = get_posts(
240
  array(
241
  'numberposts' => 1,
242
- 'post_type' => 'any',
243
- 'tax_query' => array(
244
  array(
245
  'taxonomy' => $taxonomy_name,
246
- 'field' => 'term_id',
247
- 'terms' => $terms,
248
  ),
249
  ),
250
  )
@@ -312,7 +288,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
312
  */
313
  public function init() {
314
  $count_desc = __( ' characters. We recommend a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
315
- // Create default options.
316
  $this->default_options = array(
317
  'scan_header' => array(
318
  'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
@@ -348,6 +324,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
348
  'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
349
  'default' => '',
350
  'type' => 'text',
 
351
  'count' => true,
352
  'count_desc' => $count_desc,
353
  'size' => 95,
@@ -363,6 +340,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
363
  'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
364
  'default' => '',
365
  'type' => 'textarea',
 
366
  'count' => true,
367
  'count_desc' => $count_desc,
368
  'size' => 200,
@@ -477,9 +455,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
477
  'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
478
 
479
  /*
480
- * REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
481
- * 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
482
- */
483
  ),
484
  ),
485
  'setcard' => array(
@@ -490,9 +468,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
490
  'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
491
 
492
  /*
493
- * REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
494
- * 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
495
- */
496
  ),
497
  ),
498
  'twitter_site' => array(
@@ -533,10 +511,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
533
  'types' => array(
534
  'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
535
  'type' => 'multicheckbox',
536
- 'default' => array(
537
- 'post' => 'post',
538
- 'page' => 'page',
539
- ),
540
  'initial_options' => $this->get_post_type_titles( array( '_builtin' => false ) ),
541
  ),
542
  'title' => array(
@@ -568,6 +543,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
568
  'type' => 'html',
569
  'save' => false,
570
  'default' => '<a
 
571
  id="aioseop_opengraph_settings_facebook_debug"
572
  class="button-primary"
573
  href=""
@@ -593,8 +569,27 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
593
  'facebook_author' => array(
594
  'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ),
595
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
  );
597
- // load initial options / set defaults.
598
  $this->update_options();
599
  $display = array();
600
  if ( isset( $this->options['aiosp_opengraph_types'] ) && ! empty( $this->options['aiosp_opengraph_types'] ) ) {
@@ -624,6 +619,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
624
  'dimgheight',
625
  'meta_key',
626
  'defcard',
 
 
 
627
  'twitter_site',
628
  'twitter_creator',
629
  'twitter_domain',
@@ -672,6 +670,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
672
  'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
673
  'options' => array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
674
  ),
 
 
 
 
 
675
  'facebook' => array(
676
  'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
677
  'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
@@ -695,8 +698,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
695
  'default' => array(
696
  'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
697
  'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
698
- // this is set below, to the remaining options -- pdb.
699
- 'options' => array(),
700
  ),
701
  'scan_meta' => array(
702
  'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
@@ -738,8 +740,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
738
  if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
739
  $post_url = aioseop_get_permalink( $post->ID );
740
  $endpoint = sprintf(
741
- 'https://graph.facebook.com/?%s',
742
- http_build_query(
743
  array(
744
  'id' => $post_url,
745
  'scrape' => true,
@@ -767,8 +768,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
767
  if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
768
  $post_url = aioseop_get_permalink( $post_id );
769
  $endpoint = sprintf(
770
- 'https://graph.facebook.com/?%s',
771
- http_build_query(
772
  array(
773
  'id' => $post_url,
774
  'scrape' => true,
@@ -861,9 +861,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
861
  $title = $info['title'];
862
  $description = $info['description'];
863
 
864
- // Description options.
865
  if ( is_object( $post ) ) {
866
- // Always show excerpt.
867
  $description = empty( $this->options['aiosp_opengraph_generate_descriptions'] )
868
  ? $aiosp->trim_excerpt_without_filters(
869
  $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ),
@@ -875,14 +875,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
875
  );
876
  }
877
 
878
- // #1308 - we want to make sure we are ignoring php version only in the admin area
879
- // while editing the post, so that it does not impact #932.
880
  $screen = get_current_screen();
881
  $ignore_php_version = is_admin() && isset( $screen->id ) && 'post' == $screen->id;
882
 
883
- // Add filters.
884
  $description = apply_filters( 'aioseop_description', $description, false, $ignore_php_version );
885
- // Add placholders.
886
  $settings[ "{$prefix}title" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title );
887
  $settings[ "{$prefix}desc" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $description );
888
  }
@@ -920,7 +919,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
920
  */
921
  function override_options( $options, $location, $settings ) {
922
  global $aioseop_options;
923
- // Prepare default and prefix.
924
  $prefix = $this->get_prefix( $location ) . $location . '_';
925
  $opts = array();
926
 
@@ -933,11 +932,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
933
  switch ( $k ) {
934
  case $prefix . 'category':
935
  if ( empty( $v ) ) {
936
- // Get post type.
937
  $type = isset( get_current_screen()->post_type )
938
  ? get_current_screen()->post_type
939
  : null;
940
- // Assign default from plugin options.
941
  if ( ! empty( $type )
942
  && isset( $aioseop_options['modules'] )
943
  && isset( $aioseop_options['modules']['aiosp_opengraph_options'] )
@@ -955,7 +954,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
955
  }
956
  $options = wp_parse_args( $options, $opts );
957
 
958
- // @issue #1013 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1013 ).
959
  $post_types = $this->get_post_type_titles();
960
  foreach ( $post_types as $slug => $name ) {
961
  $field = 'aiosp_opengraph_' . $slug . '_fb_object_type';
@@ -1013,7 +1012,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1013
  }
1014
 
1015
  function add_attributes( $output ) {
1016
- // avoid having duplicate meta tags.
1017
  $type = $this->type;
1018
  if ( empty( $type ) ) {
1019
  $type = 'website';
@@ -1048,8 +1047,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1048
  }
1049
 
1050
  $attributes = apply_filters(
1051
- $this->prefix . 'attributes',
1052
- array(
1053
  'prefix="og: http://ogp.me/ns#"',
1054
  )
1055
  );
@@ -1111,6 +1109,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1111
  $extra_params = array();
1112
 
1113
  $setmeta = $this->options['aiosp_opengraph_setmeta'];
 
1114
  if ( is_front_page() ) {
1115
  $title = $this->options['aiosp_opengraph_hometitle'];
1116
  if ( $first_page ) {
@@ -1155,10 +1154,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1155
  if ( empty( $description ) && $first_page ) {
1156
  $description = get_bloginfo( 'description' );
1157
  }
1158
- } elseif (
1159
- is_singular() && $this->option_isset( 'types' ) &&
1160
- is_array( $this->options['aiosp_opengraph_types'] ) &&
1161
- in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
 
 
 
 
 
 
 
 
 
 
 
 
1162
  ) {
1163
 
1164
  if ( $type == 'article' ) {
@@ -1197,8 +1208,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1197
  $description = $metabox['aioseop_opengraph_settings_desc'];
1198
 
1199
  // Let's make a note of manually provided descriptions/titles as they might need special handling.
1200
- // @issue #808 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/808 ).
1201
- // @issue #2296 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2296 ).
1202
  $title_from_main_settings = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_title', true ) ) );
1203
  $desc_from_main_settings = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
1204
  if ( empty( $title ) && empty( $title_from_main_settings ) ) {
@@ -1285,7 +1296,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1285
  $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1286
  $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1287
  }
1288
- // Add default title.
1289
  if ( empty( $title ) ) {
1290
  $title = get_the_title();
1291
  }
@@ -1294,7 +1305,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1294
  $description = get_queried_object()->description;
1295
  }
1296
  if ( empty( $type ) ) {
1297
- // Pro Issue #321 ( https://github.com/semperfiwebdesign/aioseop-pro/issues/321 ).
1298
  if ( AIOSEOPPRO && ( is_category() || is_tag() || is_tax() ) ) {
1299
  $og_options = $aioseop_options['modules'][ $this->prefix . 'options' ];
1300
  $current_post_type = get_post_type();
@@ -1471,7 +1482,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1471
  $card = $metabox['aioseop_opengraph_settings_setcard'];
1472
  }
1473
 
1474
- // support for changing legacy twitter cardtype-photo to summary large image.
1475
  if ( $card == 'photo' ) {
1476
  $card = 'summary_large_image';
1477
  }
@@ -1537,21 +1548,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1537
  ),
1538
  );
1539
 
1540
- // Issue #1848 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1848 ).
1541
  if ( is_ssl() ) {
1542
  $meta['facebook'] += array( 'thumbnail_1' => 'og:image:secure_url' );
1543
  $thumbnail_1 = $thumbnail;
1544
  }
1545
 
1546
  $tags = array(
1547
- 'facebook' => array(
1548
- 'name' => 'property',
1549
- 'value' => 'content',
1550
- ),
1551
- 'twitter' => array(
1552
- 'name' => 'name',
1553
- 'value' => 'content',
1554
- ),
1555
  );
1556
 
1557
  foreach ( $meta as $t => $data ) {
@@ -1580,7 +1585,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1580
 
1581
  /**
1582
  * This is to accomodate multiple fb:admins on separate lines.
1583
- *
1584
  * @TODO Eventually we'll want to put this in its own function so things like images work too.
1585
  */
1586
  if ( 'key' === $k ) {
@@ -1598,11 +1602,41 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1598
  }
1599
  }
1600
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1601
  }
1602
 
1603
  /**
1604
  * Do / adds opengraph properties to meta.
1605
- *
1606
  * @since 2.3.11
1607
  *
1608
  * @global array $aioseop_options AIOSEOP plugin options.
@@ -1656,31 +1690,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1656
  add_filter( $this->prefix . 'display_settings', array( &$this, 'filter_settings' ), 10, 3 );
1657
  add_filter( $this->prefix . 'override_options', array( &$this, 'override_options' ), 10, 3 );
1658
  add_filter(
1659
- $this->get_prefix( 'settings' ) . 'default_options',
1660
- array(
1661
  &$this,
1662
  'filter_default_options',
1663
- ),
1664
- 10,
1665
- 2
1666
  );
1667
  add_filter(
1668
- $this->get_prefix( 'settings' ) . 'filter_metabox_options',
1669
- array(
1670
  &$this,
1671
  'filter_metabox_options',
1672
- ),
1673
- 10,
1674
- 3
1675
  );
1676
  add_filter(
1677
- $this->get_prefix( 'settings' ) . 'filter_term_metabox_options',
1678
- array(
1679
  &$this,
1680
  'filter_metabox_options',
1681
- ),
1682
- 10,
1683
- 3
1684
  );
1685
  $post_types = $this->get_post_type_titles();
1686
  $rempost = array(
@@ -1741,7 +1766,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1741
  $images = array();
1742
  if ( ! empty( $image ) ) {
1743
  foreach ( $image as $k => $v ) {
1744
- $images[ $v ] = '<img alt="" height=150 src="' . $v . '">';
1745
  }
1746
  }
1747
 
@@ -1820,7 +1845,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1820
 
1821
  /**
1822
  * Enqueue our file upload scripts and styles.
1823
- *
1824
  * @param $hook
1825
  */
1826
  function og_admin_enqueue_scripts( $hook ) {
@@ -1867,7 +1891,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1867
  /**
1868
  * Returns the placeholder filtered and ready for DOM display.
1869
  * filter:aioseop_opengraph_placeholder
1870
- *
1871
  * @since 2.4.14
1872
  *
1873
  * @param mixed $placeholder Placeholder to be filtered.
@@ -1882,7 +1905,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1882
  /**
1883
  * Returns filtered default options.
1884
  * filter:{prefix}default_options
1885
- *
1886
  * @since 2.4.13
1887
  *
1888
  * @param array $options Default options.
@@ -1893,7 +1915,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1893
  public function filter_default_options( $options, $location ) {
1894
  if ( $location === 'settings' ) {
1895
  $prefix = $this->get_prefix( $location ) . $location . '_';
1896
- // Add image checker as default.
1897
  $options[ $prefix . 'customimg_checker' ] = 0;
1898
  }
1899
  return $options;
2
  /**
3
  * The Opengraph class.
4
  *
5
+ * @package All-in-One-SEO-Pack
6
  * @version 2.3.16
7
  */
 
8
  if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
 
 
 
 
 
 
9
  class All_in_One_SEO_Pack_Opengraph extends All_in_One_SEO_Pack_Module {
 
 
 
 
 
 
 
10
  var $fb_object_types;
 
 
 
 
 
 
 
 
11
  var $type;
12
 
13
  /**
19
  function __construct() {
20
  add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
21
 
22
+ $this->name = __( 'Social Meta', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
23
+ $this->prefix = 'aiosp_opengraph_'; // option prefix
24
+ $this->file = __FILE__; // the current file
25
  $this->fb_object_types = array(
26
  'Activities' => array(
27
  'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
92
  }
93
  // Set variables after WordPress load.
94
  add_action( 'init', array( &$this, 'init' ), 999999 );
95
+ add_filter( 'jetpack_enable_open_graph', '__return_false' ); // Avoid having duplicate meta tags
 
96
  add_filter( $this->prefix . 'meta', array( $this, 'handle_meta_tag' ), 10, 5 );
97
  // Force refresh of Facebook cache.
98
  add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
99
  add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
100
  add_action( 'edited_term', array( &$this, 'save_tax_data' ), 10, 3 );
101
+ // Adds special filters
102
  add_filter( 'aioseop_opengraph_placeholder', array( &$this, 'filter_placeholder' ) );
103
  add_action( 'aiosp_activate_opengraph', array( $this, 'activate_module' ) );
104
  add_action( 'created_term', array( $this, 'created_term' ), 10, 3 );
105
+ // Call to init to generate menus
106
  $this->init();
107
  }
108
 
122
  function handle_meta_tag( $value, $network, $meta_tag, $network_meta_tag, $extra_params ) {
123
  switch ( $meta_tag ) {
124
  case 'type':
125
+ // https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1013
126
  if ( 'blog' === $value ) {
127
  $value = 'website';
128
  }
136
  *
137
  * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/808
138
  * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2296
 
139
  *
140
  * @param bool The value that is proposed to be shown in the tag.
141
  * @param string $network The social network.
150
  if ( isset( $extra_params['auto_generate_desc'] ) && $extra_params['auto_generate_desc'] ) {
151
  switch ( $network_meta_tag ) {
152
  case 'twitter:title':
153
+ // https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.html
154
  $value = trim( $this->substr( $value, 0, 70 ) );
155
  break;
156
  case 'og:description':
190
  $object_type = null;
191
  if ( ! $terms ) {
192
  $terms = get_terms(
193
+ $taxonomy_name, array(
 
194
  'meta_query' => array(
195
  array(
196
+ 'key' => '_' . $prefix . $k,
197
  'compare' => 'NOT EXISTS',
198
  ),
199
  ),
200
+ 'number' => PHP_INT_MAX,
201
+ 'fields' => 'ids',
202
  'hide_empty' => false,
203
  )
204
  );
215
  $posts = get_posts(
216
  array(
217
  'numberposts' => 1,
218
+ 'post_type' => 'any',
219
+ 'tax_query' => array(
220
  array(
221
  'taxonomy' => $taxonomy_name,
222
+ 'field' => 'term_id',
223
+ 'terms' => $terms,
224
  ),
225
  ),
226
  )
288
  */
289
  public function init() {
290
  $count_desc = __( ' characters. We recommend a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
291
+ // Create default options
292
  $this->default_options = array(
293
  'scan_header' => array(
294
  'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
324
  'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
325
  'default' => '',
326
  'type' => 'text',
327
+ 'class' => 'aioseop_count_chars',
328
  'count' => true,
329
  'count_desc' => $count_desc,
330
  'size' => 95,
340
  'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
341
  'default' => '',
342
  'type' => 'textarea',
343
+ 'class' => 'aioseop_count_chars',
344
  'count' => true,
345
  'count_desc' => $count_desc,
346
  'size' => 200,
455
  'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
456
 
457
  /*
458
+ REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
459
+ 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
460
+ */
461
  ),
462
  ),
463
  'setcard' => array(
468
  'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
469
 
470
  /*
471
+ REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
472
+ 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
473
+ */
474
  ),
475
  ),
476
  'twitter_site' => array(
511
  'types' => array(
512
  'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
513
  'type' => 'multicheckbox',
514
+ 'default' => array( 'post' => 'post', 'page' => 'page' ),
 
 
 
515
  'initial_options' => $this->get_post_type_titles( array( '_builtin' => false ) ),
516
  ),
517
  'title' => array(
543
  'type' => 'html',
544
  'save' => false,
545
  'default' => '<a
546
+ name="aioseop_opengraph_settings_facebook_debug"
547
  id="aioseop_opengraph_settings_facebook_debug"
548
  class="button-primary"
549
  href=""
569
  'facebook_author' => array(
570
  'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ),
571
  ),
572
+ 'profile_links' => array(
573
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
574
+ 'type' => 'textarea',
575
+ 'cols' => 60,
576
+ 'rows' => 5,
577
+ ),
578
+ 'person_or_org' => array(
579
+ 'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
580
+ 'type' => 'radio',
581
+ 'initial_options' => array(
582
+ 'person' => __( 'Person', 'all-in-one-seo-pack' ),
583
+ 'org' => __( 'Organization', 'all-in-one-seo-pack' ),
584
+ ),
585
+ ),
586
+ 'social_name' => array(
587
+ 'name' => __( 'Associated Name', 'all-in-one-seo-pack' ),
588
+ 'type' => 'text',
589
+ 'default' => '',
590
+ ),
591
  );
592
+ // load initial options / set defaults
593
  $this->update_options();
594
  $display = array();
595
  if ( isset( $this->options['aiosp_opengraph_types'] ) && ! empty( $this->options['aiosp_opengraph_types'] ) ) {
619
  'dimgheight',
620
  'meta_key',
621
  'defcard',
622
+ 'profile_links',
623
+ 'person_or_org',
624
+ 'social_name',
625
  'twitter_site',
626
  'twitter_creator',
627
  'twitter_domain',
670
  'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
671
  'options' => array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
672
  ),
673
+ 'links' => array(
674
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
675
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
676
+ 'options' => array( 'profile_links', 'person_or_org', 'social_name' ),
677
+ ),
678
  'facebook' => array(
679
  'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
680
  'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
698
  'default' => array(
699
  'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
700
  'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
701
+ 'options' => array(), // this is set below, to the remaining options -- pdb
 
702
  ),
703
  'scan_meta' => array(
704
  'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
740
  if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
741
  $post_url = aioseop_get_permalink( $post->ID );
742
  $endpoint = sprintf(
743
+ 'https://graph.facebook.com/?%s', http_build_query(
 
744
  array(
745
  'id' => $post_url,
746
  'scrape' => true,
768
  if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
769
  $post_url = aioseop_get_permalink( $post_id );
770
  $endpoint = sprintf(
771
+ 'https://graph.facebook.com/?%s', http_build_query(
 
772
  array(
773
  'id' => $post_url,
774
  'scrape' => true,
861
  $title = $info['title'];
862
  $description = $info['description'];
863
 
864
+ // Description options
865
  if ( is_object( $post ) ) {
866
+ // Always show excerpt
867
  $description = empty( $this->options['aiosp_opengraph_generate_descriptions'] )
868
  ? $aiosp->trim_excerpt_without_filters(
869
  $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ),
875
  );
876
  }
877
 
878
+ // #1308 - we want to make sure we are ignoring php version only in the admin area while editing the post, so that it does not impact #932.
 
879
  $screen = get_current_screen();
880
  $ignore_php_version = is_admin() && isset( $screen->id ) && 'post' == $screen->id;
881
 
882
+ // Add filters
883
  $description = apply_filters( 'aioseop_description', $description, false, $ignore_php_version );
884
+ // Add placholders
885
  $settings[ "{$prefix}title" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title );
886
  $settings[ "{$prefix}desc" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $description );
887
  }
919
  */
920
  function override_options( $options, $location, $settings ) {
921
  global $aioseop_options;
922
+ // Prepare default and prefix
923
  $prefix = $this->get_prefix( $location ) . $location . '_';
924
  $opts = array();
925
 
932
  switch ( $k ) {
933
  case $prefix . 'category':
934
  if ( empty( $v ) ) {
935
+ // Get post type
936
  $type = isset( get_current_screen()->post_type )
937
  ? get_current_screen()->post_type
938
  : null;
939
+ // Assign default from plugin options
940
  if ( ! empty( $type )
941
  && isset( $aioseop_options['modules'] )
942
  && isset( $aioseop_options['modules']['aiosp_opengraph_options'] )
954
  }
955
  $options = wp_parse_args( $options, $opts );
956
 
957
+ // https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1013
958
  $post_types = $this->get_post_type_titles();
959
  foreach ( $post_types as $slug => $name ) {
960
  $field = 'aiosp_opengraph_' . $slug . '_fb_object_type';
1012
  }
1013
 
1014
  function add_attributes( $output ) {
1015
+ // avoid having duplicate meta tags
1016
  $type = $this->type;
1017
  if ( empty( $type ) ) {
1018
  $type = 'website';
1047
  }
1048
 
1049
  $attributes = apply_filters(
1050
+ $this->prefix . 'attributes', array(
 
1051
  'prefix="og: http://ogp.me/ns#"',
1052
  )
1053
  );
1109
  $extra_params = array();
1110
 
1111
  $setmeta = $this->options['aiosp_opengraph_setmeta'];
1112
+ $social_links = '';
1113
  if ( is_front_page() ) {
1114
  $title = $this->options['aiosp_opengraph_hometitle'];
1115
  if ( $first_page ) {
1154
  if ( empty( $description ) && $first_page ) {
1155
  $description = get_bloginfo( 'description' );
1156
  }
1157
+ if ( ! empty( $this->options['aiosp_opengraph_profile_links'] ) ) {
1158
+ $social_links = $this->options['aiosp_opengraph_profile_links'];
1159
+ if ( ! empty( $this->options['aiosp_opengraph_social_name'] ) ) {
1160
+ $social_name = $this->options['aiosp_opengraph_social_name'];
1161
+ } else {
1162
+ $social_name = '';
1163
+ }
1164
+ if ( $this->options['aiosp_opengraph_person_or_org'] == 'person' ) {
1165
+ $social_type = 'Person';
1166
+ } else {
1167
+ $social_type = 'Organization';
1168
+ }
1169
+ }
1170
+ } elseif ( is_singular() && $this->option_isset( 'types' )
1171
+ && is_array( $this->options['aiosp_opengraph_types'] )
1172
+ && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1173
  ) {
1174
 
1175
  if ( $type == 'article' ) {
1208
  $description = $metabox['aioseop_opengraph_settings_desc'];
1209
 
1210
  // Let's make a note of manually provided descriptions/titles as they might need special handling.
1211
+ // @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/808
1212
+ // @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2296
1213
  $title_from_main_settings = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_title', true ) ) );
1214
  $desc_from_main_settings = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
1215
  if ( empty( $title ) && empty( $title_from_main_settings ) ) {
1296
  $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1297
  $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1298
  }
1299
+ // Add default title
1300
  if ( empty( $title ) ) {
1301
  $title = get_the_title();
1302
  }
1305
  $description = get_queried_object()->description;
1306
  }
1307
  if ( empty( $type ) ) {
1308
+ // https://github.com/semperfiwebdesign/aioseop-pro/issues/321
1309
  if ( AIOSEOPPRO && ( is_category() || is_tag() || is_tax() ) ) {
1310
  $og_options = $aioseop_options['modules'][ $this->prefix . 'options' ];
1311
  $current_post_type = get_post_type();
1482
  $card = $metabox['aioseop_opengraph_settings_setcard'];
1483
  }
1484
 
1485
+ // support for changing legacy twitter cardtype-photo to summary large image
1486
  if ( $card == 'photo' ) {
1487
  $card = 'summary_large_image';
1488
  }
1548
  ),
1549
  );
1550
 
1551
+ // https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1848
1552
  if ( is_ssl() ) {
1553
  $meta['facebook'] += array( 'thumbnail_1' => 'og:image:secure_url' );
1554
  $thumbnail_1 = $thumbnail;
1555
  }
1556
 
1557
  $tags = array(
1558
+ 'facebook' => array( 'name' => 'property', 'value' => 'content' ),
1559
+ 'twitter' => array( 'name' => 'name', 'value' => 'content' ),
 
 
 
 
 
 
1560
  );
1561
 
1562
  foreach ( $meta as $t => $data ) {
1585
 
1586
  /**
1587
  * This is to accomodate multiple fb:admins on separate lines.
 
1588
  * @TODO Eventually we'll want to put this in its own function so things like images work too.
1589
  */
1590
  if ( 'key' === $k ) {
1602
  }
1603
  }
1604
  }
1605
+ $social_link_schema = '';
1606
+ if ( ! empty( $social_links ) ) {
1607
+ $home_url = esc_url( get_home_url() );
1608
+ $social_links = explode( "\n", $social_links );
1609
+ foreach ( $social_links as $k => $v ) {
1610
+ $v = trim( $v );
1611
+ if ( empty( $v ) ) {
1612
+ unset( $social_links[ $k ] );
1613
+ } else {
1614
+ $v = esc_url( $v );
1615
+ $social_links[ $k ] = $v;
1616
+ }
1617
+ }
1618
+ $social_links = join( '","', $social_links );
1619
+ $social_link_schema = <<<END
1620
+ <script type="application/ld+json">
1621
+ { "@context" : "https://schema.org",
1622
+ "@type" : "{$social_type}",
1623
+ "name" : "{$social_name}",
1624
+ "url" : "{$home_url}",
1625
+ "sameAs" : ["{$social_links}"]
1626
+ }
1627
+ </script>
1628
+
1629
+ END;
1630
+ }
1631
+
1632
+ // Only show if "use schema.org markup is checked".
1633
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
1634
+ echo apply_filters( 'aiosp_opengraph_social_link_schema', $social_link_schema );
1635
+ }
1636
  }
1637
 
1638
  /**
1639
  * Do / adds opengraph properties to meta.
 
1640
  * @since 2.3.11
1641
  *
1642
  * @global array $aioseop_options AIOSEOP plugin options.
1690
  add_filter( $this->prefix . 'display_settings', array( &$this, 'filter_settings' ), 10, 3 );
1691
  add_filter( $this->prefix . 'override_options', array( &$this, 'override_options' ), 10, 3 );
1692
  add_filter(
1693
+ $this->get_prefix( 'settings' ) . 'default_options', array(
 
1694
  &$this,
1695
  'filter_default_options',
1696
+ ), 10, 2
 
 
1697
  );
1698
  add_filter(
1699
+ $this->get_prefix( 'settings' ) . 'filter_metabox_options', array(
 
1700
  &$this,
1701
  'filter_metabox_options',
1702
+ ), 10, 3
 
 
1703
  );
1704
  add_filter(
1705
+ $this->get_prefix( 'settings' ) . 'filter_term_metabox_options', array(
 
1706
  &$this,
1707
  'filter_metabox_options',
1708
+ ), 10, 3
 
 
1709
  );
1710
  $post_types = $this->get_post_type_titles();
1711
  $rempost = array(
1766
  $images = array();
1767
  if ( ! empty( $image ) ) {
1768
  foreach ( $image as $k => $v ) {
1769
+ $images[ $v ] = '<img height=150 src="' . $v . '">';
1770
  }
1771
  }
1772
 
1845
 
1846
  /**
1847
  * Enqueue our file upload scripts and styles.
 
1848
  * @param $hook
1849
  */
1850
  function og_admin_enqueue_scripts( $hook ) {
1891
  /**
1892
  * Returns the placeholder filtered and ready for DOM display.
1893
  * filter:aioseop_opengraph_placeholder
 
1894
  * @since 2.4.14
1895
  *
1896
  * @param mixed $placeholder Placeholder to be filtered.
1905
  /**
1906
  * Returns filtered default options.
1907
  * filter:{prefix}default_options
 
1908
  * @since 2.4.13
1909
  *
1910
  * @param array $options Default options.
1915
  public function filter_default_options( $options, $location ) {
1916
  if ( $location === 'settings' ) {
1917
  $prefix = $this->get_prefix( $location ) . $location . '_';
1918
+ // Add image checker as default
1919
  $options[ $prefix . 'customimg_checker' ] = 0;
1920
  }
1921
  return $options;
modules/aioseop_performance.php CHANGED
@@ -2,35 +2,15 @@
2
  /**
3
  * The Performance class.
4
  *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
 
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
10
 
11
- /**
12
- * Class All_in_One_SEO_Pack_Performance
13
- *
14
- * @since ?
15
- */
16
  class All_in_One_SEO_Pack_Performance extends All_in_One_SEO_Pack_Module {
17
 
18
- /**
19
- * Module Info
20
- *
21
- * @since ?
22
- *
23
- * @var array $module_info
24
- */
25
  protected $module_info = array();
26
 
27
- /**
28
- * All_in_One_SEO_Pack_Performance constructor.
29
- *
30
- * @since ?
31
- *
32
- * @param $mod
33
- */
34
  function __construct( $mod ) {
35
  $this->name = __( 'Performance', 'all-in-one-seo-pack' ); // Human-readable name of the plugin.
36
  $this->prefix = 'aiosp_performance_'; // Option prefix.
@@ -85,18 +65,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
85
  );
86
 
87
  $system_status = array(
88
- 'status' => array(
89
- 'default' => '',
90
- 'type' => 'html',
91
- 'label' => 'none',
92
- 'save' => false,
93
- ),
94
- 'send_email' => array(
95
- 'default' => '',
96
- 'type' => 'html',
97
- 'label' => 'none',
98
- 'save' => false,
99
- ),
100
  );
101
 
102
  $this->layout['system_status'] = array(
@@ -112,15 +82,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
112
  add_action( $this->prefix . 'settings_update', array( $this, 'settings_update_action' ), 10, 2 );
113
  }
114
 
115
- /**
116
- * Update Options Filter
117
- *
118
- * @since ?
119
- *
120
- * @param $options
121
- * @param $location
122
- * @return mixed
123
- */
124
  function update_options_filter( $options, $location ) {
125
  if ( $location == null && isset( $options[ $this->prefix . 'force_rewrites' ] ) ) {
126
  unset( $options[ $this->prefix . 'force_rewrites' ] );
@@ -129,15 +90,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
129
  return $options;
130
  }
131
 
132
- /**
133
- * Display Options Filter
134
- *
135
- * @since ?
136
- *
137
- * @param $options
138
- * @param $location
139
- * @return mixed
140
- */
141
  function display_options_filter( $options, $location ) {
142
  if ( $location == null ) {
143
  $options[ $this->prefix . 'force_rewrites' ] = 1;
@@ -148,14 +100,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
148
  return $options;
149
  }
150
 
151
- /**
152
- * Settings Update Action
153
- *
154
- * @since ?
155
- *
156
- * @param $options
157
- * @param $location
158
- */
159
  function settings_update_action( $options, $location ) {
160
  if ( $location == null && isset( $_POST[ $this->prefix . 'force_rewrites' ] ) ) {
161
  $force_rewrites = $_POST[ $this->prefix . 'force_rewrites' ];
@@ -169,11 +113,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
169
  }
170
  }
171
 
172
- /**
173
- * Add Page Hooks
174
- *
175
- * @since ?
176
- */
177
  function add_page_hooks() {
178
  $memory_usage = memory_get_peak_usage() / 1024 / 1024;
179
  if ( $memory_usage > 32 ) {
@@ -192,34 +131,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
192
  parent::add_page_hooks();
193
  }
194
 
195
- /**
196
- * Settings Page Initialization
197
- *
198
- * @since ?
199
- */
200
  function settings_page_init() {
201
  $this->default_options['status']['default'] = $this->get_serverinfo();
202
  $this->default_options['send_email']['default'] = $this->get_email_input();
203
  }
204
 
205
- /**
206
- * Menu Order
207
- *
208
- * @since ?
209
- *
210
- * @return int
211
- */
212
  function menu_order() {
213
  return 7;
214
  }
215
 
216
- /**
217
- * Get Server Info
218
- *
219
- * @since ?
220
- *
221
- * @return mixed|string|void
222
- */
223
  function get_serverinfo() {
224
  global $wpdb;
225
  global $wp_version;
@@ -300,14 +220,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
300
  $blog_public = get_option( 'blog_public' );
301
  $perm_struct = get_option( 'permalink_structure' );
302
 
303
- // TODO Change array keys to NOT be translations. Try to use a separate array for translations.
304
- $debug_info = array(
305
  __( 'Operating System', 'all-in-one-seo-pack' ) => PHP_OS,
306
- __( 'Server', 'all-in-one-seo-pack' ) => $_SERVER['SERVER_SOFTWARE'],
307
  __( 'Memory usage', 'all-in-one-seo-pack' ) => $memory_usage,
308
  __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
309
- __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
310
- __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
311
  __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
312
  __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
313
  __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
@@ -316,13 +235,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
316
  __( 'PHP Exif support', 'all-in-one-seo-pack' ) => $exif,
317
  __( 'PHP IPTC support', 'all-in-one-seo-pack' ) => $iptc,
318
  __( 'PHP XML support', 'all-in-one-seo-pack' ) => $xml,
319
- __( 'Site URL', 'all-in-one-seo-pack' ) => $siteurl,
320
- __( 'Home URL', 'all-in-one-seo-pack' ) => $homeurl,
321
  __( 'WordPress Version', 'all-in-one-seo-pack' ) => $wp_version,
322
  __( 'WordPress DB Version', 'all-in-one-seo-pack' ) => $db_version,
323
- __( 'Multisite', 'all-in-one-seo-pack' ) => $ms,
324
  __( 'Active Theme', 'all-in-one-seo-pack' ) => $theme['Name'] . ' ' . $theme['Version'],
325
- __( 'Site Title', 'all-in-one-seo-pack' ) => $site_title,
326
  __( 'Site Language', 'all-in-one-seo-pack' ) => $language,
327
  __( 'Front Page Displays', 'all-in-one-seo-pack' ) => $front_displays === 'page' ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays,
328
  __( 'Search Engine Visibility', 'all-in-one-seo-pack' ) => $blog_public,
@@ -378,13 +297,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
378
  if ( $file_handle = @fopen( $file_path, 'w' ) ) {
379
  // @codingStandardsIgnoreEnd
380
  global $aiosp;
 
381
  $buf = '; ' . sprintf(
382
- /* 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. */
383
- __( 'Settings export file for %s', 'all-in-one-seo-pack' ),
384
- AIOSEOP_PLUGIN_NAME
385
  ) . "\n";
386
 
387
- // Adds all settings and posts data to settings file.
388
  add_filter( 'aioseop_export_settings_exporter_post_types', array( $this, 'get_exporter_post_types' ) );
389
  add_filter( 'aioseop_export_settings_exporter_choices', array( $this, 'get_exporter_choices' ) );
390
 
@@ -412,40 +332,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
412
  return $buf;
413
  }
414
 
415
- /**
416
- * Get Email Input
417
- *
418
- * @since ?
419
- *
420
- * @return string
421
- */
422
  function get_email_input() {
423
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
424
- $buf =
425
- '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '" aria-label="' . __( 'Enter the email address provided by Semper Plugins Support to send your debug information', 'all-in-one-seo-pack' ) . '">' .
426
- '<input name="sfwd_debug_nonce" type="hidden" value="' . $nonce . '">' .
427
- '<input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
428
  return $buf;
429
  }
430
 
431
- /**
432
- * Get Exporter Choices
433
- *
434
- * @since 2.3.13
435
- *
436
- * @return array
437
- */
438
  function get_exporter_choices() {
439
  return array( 1, 2 );
440
  }
441
 
442
- /**
443
- * Get Exporter Post Types
444
- *
445
- * @since 2.3.13
446
- *
447
- * @return array
448
- */
449
  function get_exporter_post_types() {
450
  $post_types = $this->get_post_type_titles();
451
  $rempost = array(
2
  /**
3
  * The Performance class.
4
  *
5
+ * @package All-in-One-SEO-Pack
 
6
  */
7
 
8
  if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
9
 
 
 
 
 
 
10
  class All_in_One_SEO_Pack_Performance extends All_in_One_SEO_Pack_Module {
11
 
 
 
 
 
 
 
 
12
  protected $module_info = array();
13
 
 
 
 
 
 
 
 
14
  function __construct( $mod ) {
15
  $this->name = __( 'Performance', 'all-in-one-seo-pack' ); // Human-readable name of the plugin.
16
  $this->prefix = 'aiosp_performance_'; // Option prefix.
65
  );
66
 
67
  $system_status = array(
68
+ 'status' => array( 'default' => '', 'type' => 'html', 'label' => 'none', 'save' => false ),
69
+ 'send_email' => array( 'default' => '', 'type' => 'html', 'label' => 'none', 'save' => false ),
 
 
 
 
 
 
 
 
 
 
70
  );
71
 
72
  $this->layout['system_status'] = array(
82
  add_action( $this->prefix . 'settings_update', array( $this, 'settings_update_action' ), 10, 2 );
83
  }
84
 
 
 
 
 
 
 
 
 
 
85
  function update_options_filter( $options, $location ) {
86
  if ( $location == null && isset( $options[ $this->prefix . 'force_rewrites' ] ) ) {
87
  unset( $options[ $this->prefix . 'force_rewrites' ] );
90
  return $options;
91
  }
92
 
 
 
 
 
 
 
 
 
 
93
  function display_options_filter( $options, $location ) {
94
  if ( $location == null ) {
95
  $options[ $this->prefix . 'force_rewrites' ] = 1;
100
  return $options;
101
  }
102
 
 
 
 
 
 
 
 
 
103
  function settings_update_action( $options, $location ) {
104
  if ( $location == null && isset( $_POST[ $this->prefix . 'force_rewrites' ] ) ) {
105
  $force_rewrites = $_POST[ $this->prefix . 'force_rewrites' ];
113
  }
114
  }
115
 
 
 
 
 
 
116
  function add_page_hooks() {
117
  $memory_usage = memory_get_peak_usage() / 1024 / 1024;
118
  if ( $memory_usage > 32 ) {
131
  parent::add_page_hooks();
132
  }
133
 
 
 
 
 
 
134
  function settings_page_init() {
135
  $this->default_options['status']['default'] = $this->get_serverinfo();
136
  $this->default_options['send_email']['default'] = $this->get_email_input();
137
  }
138
 
 
 
 
 
 
 
 
139
  function menu_order() {
140
  return 7;
141
  }
142
 
 
 
 
 
 
 
 
143
  function get_serverinfo() {
144
  global $wpdb;
145
  global $wp_version;
220
  $blog_public = get_option( 'blog_public' );
221
  $perm_struct = get_option( 'permalink_structure' );
222
 
223
+ $debug_info = array(
 
224
  __( 'Operating System', 'all-in-one-seo-pack' ) => PHP_OS,
225
+ __( 'Server', 'all-in-one-seo-pack' ) => $_SERVER['SERVER_SOFTWARE'],
226
  __( 'Memory usage', 'all-in-one-seo-pack' ) => $memory_usage,
227
  __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
228
+ __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
229
+ __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
230
  __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
231
  __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
232
  __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
235
  __( 'PHP Exif support', 'all-in-one-seo-pack' ) => $exif,
236
  __( 'PHP IPTC support', 'all-in-one-seo-pack' ) => $iptc,
237
  __( 'PHP XML support', 'all-in-one-seo-pack' ) => $xml,
238
+ __( 'Site URL', 'all-in-one-seo-pack' ) => $siteurl,
239
+ __( 'Home URL', 'all-in-one-seo-pack' ) => $homeurl,
240
  __( 'WordPress Version', 'all-in-one-seo-pack' ) => $wp_version,
241
  __( 'WordPress DB Version', 'all-in-one-seo-pack' ) => $db_version,
242
+ __( 'Multisite', 'all-in-one-seo-pack' ) => $ms,
243
  __( 'Active Theme', 'all-in-one-seo-pack' ) => $theme['Name'] . ' ' . $theme['Version'],
244
+ __( 'Site Title', 'all-in-one-seo-pack' ) => $site_title,
245
  __( 'Site Language', 'all-in-one-seo-pack' ) => $language,
246
  __( 'Front Page Displays', 'all-in-one-seo-pack' ) => $front_displays === 'page' ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays,
247
  __( 'Search Engine Visibility', 'all-in-one-seo-pack' ) => $blog_public,
297
  if ( $file_handle = @fopen( $file_path, 'w' ) ) {
298
  // @codingStandardsIgnoreEnd
299
  global $aiosp;
300
+ /* 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. */
301
  $buf = '; ' . sprintf(
302
+ __(
303
+ 'Settings export file for %s', 'all-in-one-seo-pack'
304
+ ), AIOSEOP_PLUGIN_NAME
305
  ) . "\n";
306
 
307
+ // Adds all settings and posts data to settings file
308
  add_filter( 'aioseop_export_settings_exporter_post_types', array( $this, 'get_exporter_post_types' ) );
309
  add_filter( 'aioseop_export_settings_exporter_choices', array( $this, 'get_exporter_choices' ) );
310
 
332
  return $buf;
333
  }
334
 
 
 
 
 
 
 
 
335
  function get_email_input() {
336
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
337
+ $buf = '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '"><input name="sfwd_debug_nonce" type="hidden" value="' .
338
+ $nonce . '"><input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
 
 
339
  return $buf;
340
  }
341
 
 
 
 
 
 
 
 
342
  function get_exporter_choices() {
343
  return array( 1, 2 );
344
  }
345
 
 
 
 
 
 
 
 
346
  function get_exporter_post_types() {
347
  $post_types = $this->get_post_type_titles();
348
  $rempost = array(
modules/aioseop_robots.php CHANGED
@@ -1,41 +1,28 @@
1
  <?php
2
  /**
3
- * Robots Module
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
-
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
10
-
11
- /**
12
- * Class All_in_One_SEO_Pack_Robots
13
- *
14
- * @since ?
15
- */
16
  class All_in_One_SEO_Pack_Robots extends All_in_One_SEO_Pack_Module {
17
 
18
- /**
19
- * All_in_One_SEO_Pack_Robots constructor.
20
- *
21
- * @since ?
22
- */
23
  function __construct() {
24
- // Only for testing.
25
- // phpcs:disable Squiz.Commenting.BlockComment
26
  /*
27
  if ( ! defined( 'AIOSEOP_DO_LOG' ) ) {
28
  define( 'AIOSEOP_DO_LOG', true );
29
  }
30
  */
31
- // phpcs:enable
32
- $this->name = __( 'Robots.txt', 'all-in-one-seo-pack' ); // Human-readable name of the plugin.
33
- $this->prefix = 'aiosp_robots_'; // option prefix.
34
- $this->file = __FILE__; // the current file.
35
  parent::__construct();
36
 
37
  $this->default_options = array(
38
- 'usage' => array(
39
  'type' => 'html',
40
  'label' => 'none',
41
  'default' => __( 'Use the rule builder below to add/delete rules.', 'all-in-one-seo-pack' ),
@@ -43,29 +30,26 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
43
  ),
44
  );
45
 
46
- $this->rule_fields = array(
47
- 'agent' => array(
48
- 'name' => __( 'User Agent', 'all-in-one-seo-pack' ),
49
- 'type' => 'text',
50
- 'label' => 'top',
51
- 'save' => false,
52
- ),
53
- 'type' => array(
54
- 'name' => __( 'Rule', 'all-in-one-seo-pack' ),
55
- 'type' => 'select',
56
- 'initial_options' => array(
57
- 'allow' => __( 'Allow', 'all-in-one-seo-pack' ),
58
- 'disallow' => __( 'Disallow', 'all-in-one-seo-pack' ),
59
- ),
60
  'label' => 'top',
61
  'save' => false,
62
  ),
63
- 'path' => array(
64
- 'name' => __( 'Directory Path', 'all-in-one-seo-pack' ),
65
- 'type' => 'text',
 
66
  'label' => 'top',
67
  'save' => false,
68
  ),
 
 
 
 
 
 
69
  'Submit' => array(
70
  'type' => 'submit',
71
  'class' => 'button-primary add-edit-rule',
@@ -74,13 +58,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
74
  'save' => false,
75
  'value' => 1,
76
  ),
77
- "{$this->prefix}id" => array(
78
  'type' => 'hidden',
79
  'class' => 'edit-rule-id',
80
  'save' => false,
81
  'value' => '',
82
  ),
83
- 'rules' => array(
84
  'name' => __( 'Configured Rules', 'all-in-one-seo-pack' ),
85
  'type' => 'custom',
86
  'save' => true,
@@ -92,19 +76,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
92
  ),
93
  );
94
 
95
- add_filter( $this->prefix . 'submit_options', array( $this, 'submit_options' ), 10, 2 );
96
 
97
  $this->default_options = array_merge( $this->default_options, $this->rule_fields );
98
 
99
- $this->layout = array(
100
  'default' => array(
101
- 'name' => __( 'Create a Robots.txt File', 'all-in-one-seo-pack' ),
102
  'help_link' => 'https://semperplugins.com/documentation/robots-txt-module/',
103
- 'options' => array_merge( array( 'usage' ), array_keys( $this->rule_fields ) ),
104
  ),
105
  );
106
 
107
- // load initial options / set defaults.
108
  $this->update_options();
109
 
110
  add_filter( $this->prefix . 'output_option', array( $this, 'display_custom_options' ), 10, 2 );
@@ -120,11 +104,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
120
  }
121
  }
122
 
123
- /**
124
- * Physical File Check
125
- *
126
- * @since 2.7.1
127
- */
128
  function physical_file_check() {
129
  if ( $this->has_physical_file() ) {
130
  if ( ( is_multisite() && is_network_admin() ) || ( ! is_multisite() && current_user_can( 'manage_options' ) ) ) {
@@ -141,14 +120,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
141
  }
142
  }
143
 
144
- /**
145
- * Filter Display Options
146
- *
147
- * @since 2.7
148
- *
149
- * @param $options
150
- * @return mixed
151
- */
152
  function filter_display_options( $options ) {
153
  $errors = get_transient( "{$this->prefix}errors" . get_current_user_id() );
154
  if ( false !== $errors ) {
@@ -161,11 +132,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
161
  }
162
 
163
  /**
164
- * Import Default Robots
165
- *
166
  * First time import of the default robots.txt rules.
167
- *
168
- * @since 2.7
169
  */
170
  function import_default_robots() {
171
  $options = $this->get_option_for_blog( $this->get_network_id() );
@@ -183,26 +150,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
183
  update_option( 'aioseop_options', $aioseop_options );
184
  }
185
 
186
- /**
187
- * Submit Options
188
- *
189
- * @since 2.7
190
- *
191
- * @param $submit_options
192
- * @param $location
193
- * @return mixed
194
- */
195
  function submit_options( $submit_options, $location ) {
196
  unset( $submit_options['Submit'] );
197
  unset( $submit_options['Submit_Default'] );
198
  return $submit_options;
199
  }
200
 
201
- /**
202
- * AJAX Action Physical File
203
- *
204
- * @since 2.7
205
- */
206
  function ajax_action_physical_file() {
207
  aioseop_ajax_init();
208
  $action = $_POST['options'];
@@ -224,15 +177,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
224
  wp_send_json_success();
225
  }
226
 
227
- /**
228
- * Import Physical File
229
- *
230
- * @since 2.7
231
- *
232
- * @access private
233
- *
234
- * @return bool
235
- */
236
  private function import_physical_file() {
237
  $wp_filesystem = $this->get_filesystem_object();
238
  $file = trailingslashit( $wp_filesystem->abspath() ) . 'robots.txt';
@@ -254,16 +198,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
254
  return true;
255
  }
256
 
257
- /**
258
- * Extract Rules
259
- *
260
- * @since 2.7
261
- *
262
- * @access private
263
- *
264
- * @param array $lines
265
- * @return array
266
- */
267
  private function extract_rules( array $lines ) {
268
  $rules = array();
269
  $user_agent = null;
@@ -304,30 +238,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
304
  return $rules;
305
  }
306
 
307
- /**
308
- * Delete Physical File
309
- *
310
- * @since 2.7
311
- *
312
- * @access private
313
- *
314
- * @return mixed
315
- */
316
  private function delete_physical_file() {
317
  $wp_filesystem = $this->get_filesystem_object();
318
  $file = trailingslashit( $wp_filesystem->abspath() ) . 'robots.txt';
319
  return $wp_filesystem->delete( $file );
320
  }
321
 
322
- /**
323
- * Has Physical Files
324
- *
325
- * @since 2.7
326
- *
327
- * @access private
328
- *
329
- * @return mixed
330
- */
331
  private function has_physical_file() {
332
  $access_type = get_filesystem_method();
333
 
@@ -339,28 +255,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
339
  }
340
  }
341
 
342
- /**
343
- * Robots txt
344
- *
345
- * @since 2.7
346
- *
347
- * @param $output
348
- * @param $public
349
- * @return string
350
- */
351
  function robots_txt( $output, $public ) {
352
  return $output . "\r\n" . $this->get_rules();
353
  }
354
 
355
- /**
356
- * Get Rules
357
- *
358
- * @since 2.7
359
- *
360
- * @access private
361
- *
362
- * @return string
363
- */
364
  private function get_rules() {
365
  $robots = array();
366
  $blog_rules = $this->get_all_rules( is_multisite() ? $this->get_network_id() : null );
@@ -385,15 +283,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
385
  return implode( "\r\n", $robots );
386
  }
387
 
388
- /**
389
- * Get Network ID
390
- *
391
- * @since 2.7
392
- *
393
- * @access private
394
- *
395
- * @return int
396
- */
397
  private function get_network_id() {
398
  if ( is_multisite() ) {
399
  return get_network()->site_id;
@@ -401,16 +290,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
401
  return get_current_blog_id();
402
  }
403
 
404
- /**
405
- * Get Option for Blog
406
- *
407
- * @since 2.7
408
- *
409
- * @access private
410
- *
411
- * @param null $id
412
- * @return array
413
- */
414
  private function get_option_for_blog( $id = null ) {
415
  if ( is_null( $id ) ) {
416
  $id = get_current_blog_id();
@@ -426,16 +305,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
426
  }
427
 
428
  /**
429
- * Get All Rules
430
- *
431
  * Get all rules defined for the blog.
432
- *
433
- * @since 2.7
434
- *
435
- * @access private
436
- *
437
- * @param null $id
438
- * @return array|mixed
439
  */
440
  private function get_all_rules( $id = null ) {
441
  $options = $this->get_option_for_blog( $id );
@@ -443,26 +313,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
443
  }
444
 
445
  /**
446
- * Get Default Rules
447
- *
448
  * Get the default robot rules that were saved in the first initialization.
449
- *
450
- * @since 2.7
451
- *
452
- * @access private
453
- *
454
- * @return array|mixed
455
  */
456
  private function get_default_rules() {
457
  $options = $this->get_option_for_blog( $this->get_network_id() );
458
  return array_key_exists( 'default', $options ) ? $options[ 'default' ] : array();
459
  }
460
 
461
- /**
462
- * AJAX Delete Rule
463
- *
464
- * @since 2.7
465
- */
466
  function ajax_delete_rule() {
467
  aioseop_ajax_init();
468
  $id = $_POST['options'];
@@ -470,16 +327,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
470
  $this->delete_rule( $id );
471
  }
472
 
473
- /**
474
- * Delete Rule
475
- *
476
- * @since 2.7
477
- *
478
- * @access private
479
- *
480
- * @param $id
481
- * @return mixed|null
482
- */
483
  private function delete_rule( $id ) {
484
  global $aioseop_options;
485
 
@@ -499,15 +346,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
499
  return $deleted_rule;
500
  }
501
 
502
- /**
503
- * Add Error
504
- *
505
- * @since 2.7
506
- *
507
- * @access private
508
- *
509
- * @param $error
510
- */
511
  private function add_error( $error ) {
512
  $errors = get_transient( "{$this->prefix}errors" . get_current_user_id() );
513
  if ( false === $errors ) {
@@ -519,11 +357,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
519
  }
520
 
521
  /**
522
- * Filter Options
523
- *
524
- * @since 2.7
525
  *
526
  * @param $options
 
527
  * @return mixed
528
  */
529
  function filter_options( $options ) {
@@ -566,14 +403,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
566
  return $options;
567
  }
568
 
569
- /**
570
- * Sanitize Path
571
- *
572
- * @since 2.7
573
- *
574
- * @param $path
575
- * @return string
576
- */
577
  private function sanitize_path( $path ) {
578
  // if path does not have a trailing wild card (*) or does not refer to a file (with extension), add trailing slash.
579
  if ( '*' !== substr( $path, -1 ) && false === strpos( $path, '.' ) ) {
@@ -591,31 +420,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
591
  return $path;
592
  }
593
 
594
- /**
595
- * Create Rule ID
596
- *
597
- * @since 2.7
598
- *
599
- * @access private
600
- *
601
- * @param $type
602
- * @param $agent
603
- * @param $path
604
- * @return string
605
- */
606
  private function create_rule_id( $type, $agent, $path ) {
607
  return md5( $type . $agent . $path );
608
  }
609
 
610
- /**
611
- * Validate Rule
612
- *
613
- * @since 2.7
614
- *
615
- * @param $rules
616
- * @param $new_rule
617
- * @return array|WP_Error
618
- */
619
  private function validate_rule( $rules, $new_rule ) {
620
  if ( empty( $new_rule[ 'agent' ] ) ) {
621
  return new WP_Error('invalid', __( 'User Agent cannot be empty', 'all-in-one-seo-pack' ) );
@@ -696,16 +504,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
696
  );
697
  }
698
 
699
- /**
700
- * Reorder Rules
701
- *
702
- * @since 2.7
703
- *
704
- * @access private
705
- *
706
- * @param $rules
707
- * @return array
708
- */
709
  private function reorder_rules( $rules ) {
710
  if ( is_array( $rules ) ) {
711
  uasort( $rules, array( $this, 'sort_rules' ) );
@@ -713,39 +511,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
713
  return $rules;
714
  }
715
 
716
- /**
717
- * Sort Rules
718
- *
719
- * @since 2.7
720
- *
721
- * @param $a
722
- * @param $b
723
- * @return bool
724
- */
725
  function sort_rules( $a, $b ) {
726
  return $a['agent'] > $b['agent'];
727
  }
728
 
729
- /**
730
- * Get Display Rules
731
- *
732
- * @since 2.7
733
- *
734
- * @access private
735
- *
736
- * @param $rules
737
- * @return string
738
- */
739
  private function get_display_rules( $rules ) {
740
  $buf = '';
741
  if ( ! empty( $rules ) ) {
742
  $rules = $this->reorder_rules( $rules );
743
- $buf = sprintf( "<table class='aioseop_table' data-edit-label='%s'>\n", __( 'Modify Rule', 'all-in-one-seo-pack' ) . ' &raquo;' );
744
  $row = "\t
745
  <tr>
746
  <td>
747
- <a href='#' class='dashicons dashicons-trash aiosp_robots_delete_rule' data-id='%s' aria-label='" . __('Delete this rule', 'all-in-one-seo-pack') . "'></a>
748
- <a href='#' class='dashicons dashicons-edit aiosp_robots_edit_rule' data-id='%s' data-agent='%s' data-type='%s' data-path='%s' aria-label='" . __('Edit this rule', 'all-in-one-seo-pack') . "'></a>
749
  </td>
750
  <td>%s</td>
751
  <td>%s</td>
@@ -759,13 +538,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
759
  return $buf;
760
  }
761
 
762
- /**
763
- * Do Robots
764
- *
765
- * @since 2.7
766
- *
767
- * @return false|string
768
- */
769
  private function do_robots() {
770
  // disable header warnings.
771
  error_reporting(0);
@@ -779,14 +551,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
779
  }
780
 
781
  /**
782
- * Custom Settings
783
  *
784
  * Displays boxes in a table layout.
785
  *
786
- * @since 2.7
787
- *
788
  * @param $buf
789
  * @param $args
 
790
  * @return string
791
  */
792
  function display_custom_options( $buf, $args ) {
@@ -798,8 +569,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
798
  $buf .= '</div>';
799
  break;
800
  case "{$this->prefix}robots.txt":
801
- $buf .= "<h3>" . __( "Here's how your robots.txt looks:", 'all-in-one-seo-pack' ) . "</h3>";
802
- $buf .= "<textarea disabled id='{$this->prefix}robot-txt' class='large-text robots-text' rows='15' aria-label='" . __('This shows how your robots.txt appears', 'all-in-one-seo-pack') . "'>";
803
  $buf .= $this->do_robots();
804
  $buf .= "</textarea>";
805
  break;
1
  <?php
2
  /**
3
+ * @package All-in-One-SEO-Pack
4
+ */
5
+ /**
6
+ * The Robots class.
7
  */
 
8
  if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
 
 
 
 
 
 
9
  class All_in_One_SEO_Pack_Robots extends All_in_One_SEO_Pack_Module {
10
 
 
 
 
 
 
11
  function __construct() {
12
+ // only for testing
 
13
  /*
14
  if ( ! defined( 'AIOSEOP_DO_LOG' ) ) {
15
  define( 'AIOSEOP_DO_LOG', true );
16
  }
17
  */
18
+
19
+ $this->name = __( 'Robots.txt', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
20
+ $this->prefix = 'aiosp_robots_'; // option prefix
21
+ $this->file = __FILE__; // the current file
22
  parent::__construct();
23
 
24
  $this->default_options = array(
25
+ 'usage' => array(
26
  'type' => 'html',
27
  'label' => 'none',
28
  'default' => __( 'Use the rule builder below to add/delete rules.', 'all-in-one-seo-pack' ),
30
  ),
31
  );
32
 
33
+ $this->rule_fields = array(
34
+ 'agent' => array(
35
+ 'name' => __( 'User Agent', 'all-in-one-seo-pack' ),
36
+ 'type' => 'text',
 
 
 
 
 
 
 
 
 
 
37
  'label' => 'top',
38
  'save' => false,
39
  ),
40
+ 'type' => array(
41
+ 'name' => __( 'Rule', 'all-in-one-seo-pack' ),
42
+ 'type' => 'select',
43
+ 'initial_options' => array( 'allow' => __( 'Allow', 'all-in-one-seo-pack' ), 'disallow' => __( 'Disallow', 'all-in-one-seo-pack' ) ),
44
  'label' => 'top',
45
  'save' => false,
46
  ),
47
+ 'path' => array(
48
+ 'name' => __( 'Directory Path', 'all-in-one-seo-pack' ),
49
+ 'type' => 'text',
50
+ 'label' => 'top',
51
+ 'save' => false,
52
+ ),
53
  'Submit' => array(
54
  'type' => 'submit',
55
  'class' => 'button-primary add-edit-rule',
58
  'save' => false,
59
  'value' => 1,
60
  ),
61
+ "{$this->prefix}id" => array(
62
  'type' => 'hidden',
63
  'class' => 'edit-rule-id',
64
  'save' => false,
65
  'value' => '',
66
  ),
67
+ 'rules' => array(
68
  'name' => __( 'Configured Rules', 'all-in-one-seo-pack' ),
69
  'type' => 'custom',
70
  'save' => true,
76
  ),
77
  );
78
 
79
+ add_filter( $this->prefix . 'submit_options', array( $this, 'submit_options'), 10, 2 );
80
 
81
  $this->default_options = array_merge( $this->default_options, $this->rule_fields );
82
 
83
+ $this->layout = array(
84
  'default' => array(
85
+ 'name' => __( 'Create a Robots.txt File', 'all-in-one-seo-pack' ),
86
  'help_link' => 'https://semperplugins.com/documentation/robots-txt-module/',
87
+ 'options' => array_merge( array( 'usage' ), array_keys( $this->rule_fields ) ),
88
  ),
89
  );
90
 
91
+ // load initial options / set defaults
92
  $this->update_options();
93
 
94
  add_filter( $this->prefix . 'output_option', array( $this, 'display_custom_options' ), 10, 2 );
104
  }
105
  }
106
 
 
 
 
 
 
107
  function physical_file_check() {
108
  if ( $this->has_physical_file() ) {
109
  if ( ( is_multisite() && is_network_admin() ) || ( ! is_multisite() && current_user_can( 'manage_options' ) ) ) {
120
  }
121
  }
122
 
 
 
 
 
 
 
 
 
123
  function filter_display_options( $options ) {
124
  $errors = get_transient( "{$this->prefix}errors" . get_current_user_id() );
125
  if ( false !== $errors ) {
132
  }
133
 
134
  /**
 
 
135
  * First time import of the default robots.txt rules.
 
 
136
  */
137
  function import_default_robots() {
138
  $options = $this->get_option_for_blog( $this->get_network_id() );
150
  update_option( 'aioseop_options', $aioseop_options );
151
  }
152
 
 
 
 
 
 
 
 
 
 
153
  function submit_options( $submit_options, $location ) {
154
  unset( $submit_options['Submit'] );
155
  unset( $submit_options['Submit_Default'] );
156
  return $submit_options;
157
  }
158
 
 
 
 
 
 
159
  function ajax_action_physical_file() {
160
  aioseop_ajax_init();
161
  $action = $_POST['options'];
177
  wp_send_json_success();
178
  }
179
 
 
 
 
 
 
 
 
 
 
180
  private function import_physical_file() {
181
  $wp_filesystem = $this->get_filesystem_object();
182
  $file = trailingslashit( $wp_filesystem->abspath() ) . 'robots.txt';
198
  return true;
199
  }
200
 
 
 
 
 
 
 
 
 
 
 
201
  private function extract_rules( array $lines ) {
202
  $rules = array();
203
  $user_agent = null;
238
  return $rules;
239
  }
240
 
 
 
 
 
 
 
 
 
 
241
  private function delete_physical_file() {
242
  $wp_filesystem = $this->get_filesystem_object();
243
  $file = trailingslashit( $wp_filesystem->abspath() ) . 'robots.txt';
244
  return $wp_filesystem->delete( $file );
245
  }
246
 
 
 
 
 
 
 
 
 
 
247
  private function has_physical_file() {
248
  $access_type = get_filesystem_method();
249
 
255
  }
256
  }
257
 
 
 
 
 
 
 
 
 
 
258
  function robots_txt( $output, $public ) {
259
  return $output . "\r\n" . $this->get_rules();
260
  }
261
 
 
 
 
 
 
 
 
 
 
262
  private function get_rules() {
263
  $robots = array();
264
  $blog_rules = $this->get_all_rules( is_multisite() ? $this->get_network_id() : null );
283
  return implode( "\r\n", $robots );
284
  }
285
 
 
 
 
 
 
 
 
 
 
286
  private function get_network_id() {
287
  if ( is_multisite() ) {
288
  return get_network()->site_id;
290
  return get_current_blog_id();
291
  }
292
 
 
 
 
 
 
 
 
 
 
 
293
  private function get_option_for_blog( $id = null ) {
294
  if ( is_null( $id ) ) {
295
  $id = get_current_blog_id();
305
  }
306
 
307
  /**
 
 
308
  * Get all rules defined for the blog.
 
 
 
 
 
 
 
309
  */
310
  private function get_all_rules( $id = null ) {
311
  $options = $this->get_option_for_blog( $id );
313
  }
314
 
315
  /**
 
 
316
  * Get the default robot rules that were saved in the first initialization.
 
 
 
 
 
 
317
  */
318
  private function get_default_rules() {
319
  $options = $this->get_option_for_blog( $this->get_network_id() );
320
  return array_key_exists( 'default', $options ) ? $options[ 'default' ] : array();
321
  }
322
 
 
 
 
 
 
323
  function ajax_delete_rule() {
324
  aioseop_ajax_init();
325
  $id = $_POST['options'];
327
  $this->delete_rule( $id );
328
  }
329
 
 
 
 
 
 
 
 
 
 
 
330
  private function delete_rule( $id ) {
331
  global $aioseop_options;
332
 
346
  return $deleted_rule;
347
  }
348
 
 
 
 
 
 
 
 
 
 
349
  private function add_error( $error ) {
350
  $errors = get_transient( "{$this->prefix}errors" . get_current_user_id() );
351
  if ( false === $errors ) {
357
  }
358
 
359
  /**
360
+ * Filter options.
 
 
361
  *
362
  * @param $options
363
+ *
364
  * @return mixed
365
  */
366
  function filter_options( $options ) {
403
  return $options;
404
  }
405
 
 
 
 
 
 
 
 
 
406
  private function sanitize_path( $path ) {
407
  // if path does not have a trailing wild card (*) or does not refer to a file (with extension), add trailing slash.
408
  if ( '*' !== substr( $path, -1 ) && false === strpos( $path, '.' ) ) {
420
  return $path;
421
  }
422
 
 
 
 
 
 
 
 
 
 
 
 
 
423
  private function create_rule_id( $type, $agent, $path ) {
424
  return md5( $type . $agent . $path );
425
  }
426
 
 
 
 
 
 
 
 
 
 
427
  private function validate_rule( $rules, $new_rule ) {
428
  if ( empty( $new_rule[ 'agent' ] ) ) {
429
  return new WP_Error('invalid', __( 'User Agent cannot be empty', 'all-in-one-seo-pack' ) );
504
  );
505
  }
506
 
 
 
 
 
 
 
 
 
 
 
507
  private function reorder_rules( $rules ) {
508
  if ( is_array( $rules ) ) {
509
  uasort( $rules, array( $this, 'sort_rules' ) );
511
  return $rules;
512
  }
513
 
 
 
 
 
 
 
 
 
 
514
  function sort_rules( $a, $b ) {
515
  return $a['agent'] > $b['agent'];
516
  }
517
 
 
 
 
 
 
 
 
 
 
 
518
  private function get_display_rules( $rules ) {
519
  $buf = '';
520
  if ( ! empty( $rules ) ) {
521
  $rules = $this->reorder_rules( $rules );
522
+ $buf = sprintf( "<table class='aioseop_table' cellpadding=0 cellspacing=0 data-edit-label='%s'>\n", __( 'Modify Rule', 'all-in-one-seo-pack' ) . ' &raquo;' );
523
  $row = "\t
524
  <tr>
525
  <td>
526
+ <a href='#' class='dashicons dashicons-trash aiosp_robots_delete_rule' data-id='%s'></a>
527
+ <a href='#' class='dashicons dashicons-edit aiosp_robots_edit_rule' data-id='%s' data-agent='%s' data-type='%s' data-path='%s'></a>
528
  </td>
529
  <td>%s</td>
530
  <td>%s</td>
538
  return $buf;
539
  }
540
 
 
 
 
 
 
 
 
541
  private function do_robots() {
542
  // disable header warnings.
543
  error_reporting(0);
551
  }
552
 
553
  /**
554
+ * Custom settings.
555
  *
556
  * Displays boxes in a table layout.
557
  *
 
 
558
  * @param $buf
559
  * @param $args
560
+ *
561
  * @return string
562
  */
563
  function display_custom_options( $buf, $args ) {
569
  $buf .= '</div>';
570
  break;
571
  case "{$this->prefix}robots.txt":
572
+ $buf .= "<textarea disabled id='{$this->prefix}robot-txt' class='large-text robots-text' rows='15'>";
 
573
  $buf .= $this->do_robots();
574
  $buf .= "</textarea>";
575
  break;
modules/aioseop_sitemap.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Sitemap class.
4
  *
5
- * @package All_in_One_SEO_Pack
6
  * @version 2.3.13
7
  */
8
 
@@ -155,8 +155,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
155
 
156
  /**
157
  * All_in_One_SEO_Pack_Sitemap constructor.
158
- *
159
- * @since ?
160
  */
161
  public function __construct() {
162
  if ( get_class( $this ) === 'All_in_One_SEO_Pack_Sitemap' ) { // Set this up only when instantiated as this class.
@@ -184,7 +182,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
184
  'default' => 0,
185
  ),
186
  'indexes' => array(
187
- 'name' => __( 'Enable Sitemap Indexes', 'all-in-one-seo-pack' ),
188
  'default' => 'on',
189
  ),
190
  'max_posts' => array(
@@ -299,9 +297,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
299
  'save' => false,
300
  ),
301
  'addl_url' => array(
302
- 'name' => __( 'Page URL', 'all-in-one-seo-pack' ),
303
- 'type' => 'url',
304
- 'save' => false,
305
  ),
306
  'addl_prio' => array(
307
  'name' => __( 'Page Priority', 'all-in-one-seo-pack' ),
@@ -343,7 +341,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
343
  'type' => 'multiselect',
344
  'class' => 'aioseop-exclude-terms',
345
  ),
346
- 'excl_pages' => array(
347
  'name' => __( 'Excluded Pages', 'all-in-one-seo-pack' ),
348
  'type' => 'text',
349
  ),
@@ -400,7 +398,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
400
  }
401
 
402
  /**
403
- * Sitemap Notices
404
  *
405
  * @todo Move admin notice functions. Possibly to where it is first saved & loaded (`load_sitemap_options`).
406
  *
@@ -453,9 +451,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
453
  }
454
 
455
  /**
456
- * Update Sitemap from Posts
457
- *
458
- * @since 2.3.6
459
  *
460
  * @param $new_status
461
  * @param $old_status
@@ -498,15 +494,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
498
  }
499
 
500
  /**
501
- * Add Cron Schedules
502
  *
503
  * Add new intervals of a week and a month.
504
  *
505
- * @since ?
506
- *
507
  * @link https://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
508
  *
509
  * @param $schedules
 
510
  * @return mixed
511
  */
512
  public function add_cron_schedules( $schedules ) {
@@ -523,9 +518,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
523
  }
524
 
525
  /**
526
- * Cron Update
527
- *
528
- * @since ?
529
  */
530
  public function cron_update() {
531
  add_filter( 'cron_schedules', array( $this, 'add_cron_schedules' ) );
@@ -535,9 +528,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
535
  }
536
 
537
  /**
538
- * Daily Update
539
- *
540
- * @since ?
541
  */
542
  public function daily_update() {
543
  $last_run = get_option( $this->prefix . 'cron_last_run' );
@@ -584,8 +575,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
584
  }
585
 
586
  /**
587
- * Admin Enqueue Styles
588
- *
589
  * Load styles for module.
590
  *
591
  * @since 3.0
@@ -618,11 +607,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
618
  }
619
 
620
  /**
621
- * Load Sitemap Options
622
- *
623
  * Initialize options, after constructor.
624
- *
625
- * @since ?
626
  */
627
  public function load_sitemap_options() {
628
  // Load initial options / set defaults.
@@ -665,26 +650,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
665
  }
666
 
667
  /**
668
- * Display Custom Options
669
  *
670
  * Displays boxes for add pages to sitemap option. Requires WordPress 4.1.
671
  *
672
- * @since ?
673
- *
674
  * @param $buf
675
  * @param $args
 
676
  * @return string
677
  */
678
  public function display_custom_options( $buf, $args ) {
679
  if ( "{$this->prefix}addl_pages" === $args['name'] ) {
680
  $buf .= "<div id='{$this->prefix}addl_pages'>";
681
  if ( ! empty( $args['value'] ) ) {
682
- $buf .= "<table class='aioseop_table'>\n";
683
  foreach ( $args['value'] as $k => $v ) {
684
  if ( is_object( $v ) ) {
685
  $v = (array) $v;
686
  }
687
- $buf .= "\t<tr><td><a href='#' title='$k' class='dashicons dashicons-trash aiosp_delete_url' aria-label='" . __( 'Delete this additional URL', 'all-in-one-seo-pack' ) . "'></a></td><td>{$k}</td><td>{$v['prio']}</td><td>{$v['freq']}</td><td>{$v['mod']}</td></tr>\n";
688
  }
689
  $buf .= "</table>\n";
690
  }
@@ -705,13 +689,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
705
  }
706
 
707
  /**
708
- * Add Post Types
709
- *
710
  * Add post type details for settings once post types have been registered.
711
  *
712
  * @todo This function is being used to set up option values. This could possibly be refactored to something better suited.
713
  *
714
- * @since ?
715
  * @since 3.0 Add custom taxonomy support for Excluding Terms setting. (#240)
716
  */
717
  public function add_post_types() {
@@ -827,11 +808,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
827
  }
828
 
829
  /**
830
- * Add Page Hooks
831
- *
832
  * Set up settings, checking for sitemap conflicts, on settings page.
833
- *
834
- * @since ?
835
  */
836
  public function add_page_hooks() {
837
  $this->flush_rules_hook();
@@ -842,13 +819,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
842
  }
843
 
844
  /**
845
- * Filter Submit
846
  *
847
  * Change settings page submit button to read "Update Sitemap".
848
  *
849
- * @since ?
850
- *
851
  * @param $submit
 
852
  * @return mixed
853
  */
854
  public function filter_submit( $submit ) {
@@ -858,13 +834,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
858
  }
859
 
860
  /**
861
- * Updates Post Data
862
  *
863
  * Disable writing sitemaps to the filesystem for multisite.
864
  *
865
- * @since ?
866
- *
867
  * @param $options
 
868
  * @return mixed
869
  */
870
  public function update_post_data( $options ) {
@@ -876,16 +851,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
876
  }
877
 
878
  /**
879
- * Get Rewrite URL
880
- *
881
- * @since ?
882
- *
883
  * @param $url
 
884
  * @return bool
885
  */
886
  public function get_rewrite_url( $url ) {
887
  global $wp_rewrite;
888
- $url = wp_parse_url( esc_url( $url ), PHP_URL_PATH );
 
889
  $url = ltrim( $url, '/' );
890
  if ( ! empty( $wp_rewrite ) ) {
891
  $rewrite_rules = $wp_rewrite->rewrite_rules();
@@ -900,12 +873,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
900
  }
901
 
902
  /**
903
- * Get Filename
904
- *
905
  * Get the filename prefix for the sitemap file.
906
- * If a value was provided when this prefix was configurable from the settings page, return that instead of the default.
907
  *
908
- * @since 2.6
909
  *
910
  * @return string
911
  */
@@ -926,7 +896,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
926
  }
927
 
928
  /**
929
- * Filter Display Options
930
  *
931
  * Add in options for status display on settings page, sitemap rewriting on multisite.
932
  *
@@ -936,6 +906,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
936
  * @since 3.0 Remove WP < 3.5 old Privacy Settings link
937
  *
938
  * @param $options
 
939
  * @return mixed
940
  */
941
  public function filter_display_options( $options ) {
@@ -990,7 +961,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
990
  }
991
 
992
  /**
993
- * Filter Options
994
  *
995
  * Handle 'all' option for post types / taxonomies, further sanitization of filename, rewrites on for multisite, setting up addl pages option.
996
  *
@@ -1000,6 +971,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1000
  * @since 3.0 Change saving 'excl_terms' to database with tax_query format for custom taxonomy support. (Pro #240)
1001
  *
1002
  * @param $options
 
1003
  * @return mixed
1004
  */
1005
  public function filter_options( $options ) {
@@ -1070,7 +1042,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1070
  if ( ! empty( $_POST[ $this->prefix . 'excl_terms' ] ) ) {
1071
  $raw_excl_terms = filter_input( INPUT_POST, $this->prefix . 'excl_terms', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
1072
 
1073
- // Parse taxonomy terms {$taxonomy_slug}-{$term_id}.
1074
  $excl_terms = array();
1075
  foreach ( $raw_excl_terms as $v1_tax_term ) {
1076
  $term_id = explode( '-', $v1_tax_term );
@@ -1095,12 +1067,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1095
  }
1096
 
1097
  /**
1098
- * Get Child Sitemap URLs
1099
- *
1100
  * Get sitemap urls of child blogs, if any.
1101
  *
1102
- * @since ?
1103
- *
1104
  * @return array
1105
  */
1106
  public function get_child_sitemap_urls() {
@@ -1147,7 +1115,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1147
  }
1148
 
1149
  /**
1150
- * Gets Home Path
1151
  *
1152
  * If we're in wp-admin, use the WordPress function, otherwise we user our own version here.
1153
  * This only applies to static sitemaps.
@@ -1177,14 +1145,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1177
  }
1178
 
1179
  /**
1180
- * Whitelist Static Sitemaps
1181
- *
1182
  * Whitelists files from static sitemap conflict warning.
 
1183
  * For right now, this is just externally produced news sitemaps until we figure out something better.
1184
  *
 
 
1185
  * @since 2.3.10.2
1186
  *
1187
- * @param $file
1188
  * @return string
1189
  */
1190
  public function whitelist_static_sitemaps( $file ) {
@@ -1199,12 +1167,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1199
  }
1200
 
1201
  /**
1202
- * Scan Match Files
1203
- *
1204
  * Scan for sitemaps on filesystem.
1205
  *
1206
- * @since ?
1207
- *
1208
  * @return array
1209
  */
1210
  public function scan_match_files() {
@@ -1235,13 +1199,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1235
  }
1236
 
1237
  /**
1238
- * Do Sitemap Scan
1239
  *
1240
  * Handle deleting / renaming of conflicting sitemap files.
1241
  *
1242
  * @todo Add/Fix nonce.
1243
- *
1244
- * @since ?
1245
  */
1246
  public function do_sitemap_scan() {
1247
  $msg = '';
@@ -1302,12 +1264,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1302
  }
1303
 
1304
  /**
1305
- * Scan Sitemaps
1306
- *
1307
  * Do the scan, return the results.
1308
  *
1309
- * @since ?
1310
- *
1311
  * @return string
1312
  */
1313
  public function scan_sitemaps() {
@@ -1321,15 +1279,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1321
  }
1322
 
1323
  /**
1324
- * Get Problem Files
1325
  *
1326
  * Get the list of potentially conflicting sitemap files, identify whether they came from us, are blank, or are of unknown origin.
1327
  *
1328
- * @since ?
1329
- * @since 2.3.10 Add the ability to see empty sitemap files as well.
1330
- *
1331
  * @param $files
1332
  * @param $msg
 
 
 
1333
  * @return array
1334
  */
1335
  public function get_problem_files( $files, &$msg ) {
@@ -1416,13 +1374,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1416
  }
1417
 
1418
  /**
1419
- * Sitemap Warning
1420
  *
1421
  * Display the warning and the form for conflicting sitemap files.
1422
  *
1423
- * @since ?
1424
- *
1425
  * @param $files
 
1426
  * @return string
1427
  */
1428
  public function sitemap_warning( $files ) {
@@ -1447,14 +1404,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1447
  }
1448
 
1449
  /**
1450
- * Debug Message
1451
- *
1452
  * Updates debug log messages.
1453
  *
1454
  * Deprecated as of 2.3.10 in favor of WP debug log. We should eventually remove this.
1455
  *
1456
- * @since ?
1457
- *
1458
  * @param $msg
1459
  */
1460
  public function debug_message( $msg ) {
@@ -1462,11 +1415,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1462
  }
1463
 
1464
  /**
1465
- * Setup Rewrites
1466
- *
1467
  * Set up hooks for rewrite rules for dynamic sitemap generation.
1468
- *
1469
- * @since ?
1470
  */
1471
  public function setup_rewrites() {
1472
  add_filter( 'rewrite_rules_array', array( $this, 'rewrite_hook' ) );
@@ -1478,22 +1427,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1478
  }
1479
 
1480
  /**
1481
- * Get Rewrite Rules
1482
- *
1483
  * Build and return our rewrite rules.
1484
  *
1485
- * @since ?
1486
- *
1487
  * @param string $prefix_removed_rules_with If rules are being removed, prefix them with this character
1488
  * so that they are flushed properly and are not retained.
1489
  * @return array
1490
  */
1491
  public function get_rewrite_rules( $prefix_removed_rules_with = null ) {
1492
-
1493
- $sitemap_rules = array(
1494
- $this->get_filename() . '.xml' => 'index.php?' . $this->prefix . 'path=root',
1495
- '(.+)-' . $this->get_filename() . '(\d+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]&' . $this->prefix . 'page=$matches[2]',
1496
- '(.+)-' . $this->get_filename() . '.xml' => 'index.php?' . $this->prefix . 'path=$matches[1]',
1497
  );
1498
 
1499
  if ( isset( $this->options[ "{$this->prefix}rss_sitemap" ] ) && $this->options[ "{$this->prefix}rss_sitemap" ] ) {
@@ -1511,13 +1455,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1511
  }
1512
 
1513
  /**
1514
- * Rewrite Hook
1515
- *
1516
  * Add in our rewrite rules.
1517
  *
1518
- * @since ?
1519
- *
1520
  * @param $rules
 
1521
  * @return array
1522
  */
1523
  public function rewrite_hook( $rules ) {
@@ -1530,9 +1471,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1530
  }
1531
 
1532
  /**
1533
- * Flush Rewrite Rule
1534
- *
1535
- * @since ?
1536
  */
1537
  public function flush_rules_hook() {
1538
  global $wp_rewrite;
@@ -1550,13 +1489,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1550
  }
1551
 
1552
  /**
1553
- * Query Var Hook
1554
- *
1555
  * Add our query variable for sitemap generation.
1556
  *
1557
- * @since ?
1558
- *
1559
  * @param $vars
 
1560
  * @return array
1561
  */
1562
  public function query_var_hook( $vars ) {
@@ -1569,11 +1505,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1569
  }
1570
 
1571
  /**
1572
- * Log Start
1573
- *
1574
  * Start timing and get initial memory usage for debug info.
1575
- *
1576
- * @since ?
1577
  */
1578
  public function log_start() {
1579
  $this->start_memory_usage = memory_get_peak_usage();
@@ -1582,8 +1514,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1582
 
1583
 
1584
  /**
1585
- * Log Stats
1586
- *
1587
  * Stop timing and log memory usage for debug info.
1588
  *
1589
  * @since ?
@@ -1606,8 +1536,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1606
  }
1607
 
1608
  /**
1609
- * Sitemaps Output Hook
1610
- *
1611
  * Handle outputting of dynamic sitemaps, logging.
1612
  *
1613
  * @since ?
@@ -1637,7 +1565,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1637
  $content = $this->do_rewrite_sitemap( $sitemap_type, $page );
1638
 
1639
  // if the sitemap has no content, it's probabaly invalid and is being called directly.
1640
- // @issue ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2190 ).
1641
  if ( empty( $content ) ) {
1642
  $query->set_404();
1643
  status_header( 404 );
@@ -1656,9 +1584,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1656
  }
1657
 
1658
  /**
1659
- * Make Dynamic XSL
1660
- *
1661
- * @since ?
1662
  */
1663
  public function make_dynamic_xsl() {
1664
  // Make dynamic xsl file.
@@ -1671,19 +1597,18 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1671
  }
1672
 
1673
  /**
1674
- * Get Sitemap Data
1675
- *
1676
- * @since ?
1677
  *
1678
  * @param $sitemap_type
1679
  * @param int $page
 
1680
  * @return array
1681
  */
1682
  public function get_sitemap_data( $sitemap_type, $page = 0 ) {
1683
  $sitemap_data = array();
1684
 
1685
  if ( 0 === strpos( $sitemap_type, 'rss' ) ) {
1686
- $sitemap_data = $this->get_sitemap_without_indexes();
1687
  } elseif ( $this->options[ "{$this->prefix}indexes" ] ) {
1688
  $posttypes = $this->options[ "{$this->prefix}posttypes" ];
1689
  if ( empty( $posttypes ) ) {
@@ -1714,14 +1639,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1714
  }
1715
  }
1716
  } elseif ( 'root' === $sitemap_type ) {
1717
- $sitemap_data = $this->get_sitemap_without_indexes();
1718
  }
1719
 
1720
  return apply_filters( $this->prefix . 'data', $sitemap_data, $sitemap_type, $page, $this->options );
1721
  }
1722
 
1723
  /**
1724
- * Do Rewrite Sitemap
1725
  *
1726
  * Output sitemaps dynamically based on rewrite rules.
1727
  *
@@ -1740,8 +1665,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1740
  }
1741
 
1742
  /**
1743
- * Get Sitemap URL
1744
- *
1745
  * Build a url to the sitemap.
1746
  *
1747
  * @since 2.3.6
@@ -1757,11 +1680,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1757
  }
1758
 
1759
  /**
1760
- * Do Notify
1761
- *
1762
  * Notify search engines, do logging.
1763
- *
1764
- * @since ?
1765
  */
1766
  public function do_notify() {
1767
 
@@ -1786,8 +1705,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1786
  if ( ! empty( $url ) ) {
1787
  foreach ( $notify_url as $k => $v ) {
1788
  // TODO Change urlencode() to rawurlencode().
1789
- // @link ( http://php.net/manual/en/function.rawurlencode.php ).
1790
- // @link ( http://www.faqs.org/rfcs/rfc3986.html ).
1791
  $response = wp_remote_get( $notify_url[ $k ] . urlencode( $url ) );
1792
  if ( is_array( $response ) && ! empty( $response['response'] ) && ! empty( $response['response']['code'] ) ) {
1793
  if ( 200 !== intval( $response['response']['code'] ) ) {
@@ -1803,11 +1722,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1803
  }
1804
 
1805
  /**
1806
- * Do Robots
1807
- *
1808
  * Add Sitemap parameter to virtual robots.txt file.
1809
- *
1810
- * @since ?
1811
  */
1812
  public function do_robots() {
1813
  $url = $this->get_sitemap_url();
@@ -1816,12 +1731,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1816
  }
1817
 
1818
  /**
1819
- * Do Sitemaps
1820
  *
1821
  * Build static sitemaps on submit if rewrite rules are not in use, do logging.
1822
  *
1823
- * @since ?
1824
- *
1825
  * @param string $message
1826
  */
1827
  public function do_sitemaps( $message = '' ) {
@@ -1866,11 +1779,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1866
  }
1867
 
1868
  /**
1869
- * Add XML Mime Type.
1870
- *
1871
- * @since ?
1872
  *
1873
  * @param $mime
 
1874
  * @return mixed
1875
  */
1876
  public function add_xml_mime_type( $mime ) {
@@ -1882,11 +1794,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1882
  }
1883
 
1884
  /**
1885
- * Write Sitemaps
1886
  *
1887
- * Write multiple sitemaps to the filesystem.
1888
- *
1889
- * @since ?
1890
  *
1891
  * @param $filename
1892
  * @param $contents
@@ -1896,7 +1806,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1896
  }
1897
 
1898
  /**
1899
- * Write Sitemap
1900
  *
1901
  * Write a single sitemap to the filesystem.
1902
  *
@@ -1905,6 +1815,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1905
  *
1906
  * @param $filename
1907
  * @param $contents
 
1908
  * @return bool
1909
  */
1910
  public function write_sitemap( $filename, $contents ) {
@@ -1916,18 +1827,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1916
  }
1917
 
1918
  /**
1919
- * Gets Default Values
1920
  *
1921
  * Helper function for handling default values.
1922
  *
1923
- * @since ?
1924
- *
1925
  * @param $defaults
1926
  * @param $prefix
1927
  * @param $cache
1928
  * @param $item
1929
  * @param bool $nodefaults
1930
  * @param string $type
 
1931
  * @return bool
1932
  */
1933
  public function get_default_values( $defaults, $prefix, &$cache, $item, $nodefaults = false, $type = '' ) {
@@ -1968,15 +1878,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1968
  }
1969
 
1970
  /**
1971
- * Get Default Priority
1972
- *
1973
  * Get priority settings for sitemap entries.
1974
  *
1975
- * @since ?
1976
- *
1977
  * @param $item
1978
  * @param bool $nodefaults
1979
  * @param string $type
 
1980
  * @return bool
1981
  */
1982
  public function get_default_priority( $item, $nodefaults = false, $type = '' ) {
@@ -1996,15 +1903,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1996
  }
1997
 
1998
  /**
1999
- * Get Default Frequency
2000
- *
2001
  * Get frequency settings for sitemap entries.
2002
  *
2003
- * @since ?
2004
- *
2005
  * @param $item
2006
  * @param bool $nodefaults
2007
  * @param string $type
 
2008
  * @return bool
2009
  */
2010
  public function get_default_frequency( $item, $nodefaults = false, $type = '' ) {
@@ -2024,13 +1928,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2024
  }
2025
 
2026
  /**
2027
- * Get Sitemaps Index Filenames
2028
- *
2029
  * Build an index of sitemaps used.
2030
  *
2031
  * @since 2.3.6
2032
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
2033
  * @since 3.0 Changed to exclude noindex post types. #1382
 
2034
  * @return array
2035
  */
2036
  public function get_sitemap_index_filenames() {
@@ -2049,7 +1952,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2049
  $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
2050
  $options[ "{$this->prefix}taxonomies" ] = $this->show_or_hide_taxonomy( array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) ) );
2051
 
2052
- $files[] = array( 'loc' => aioseop_home_url( '/addl-' . $prefix . $suffix ) );
2053
 
2054
  // Get post types selected, and NoIndex post types & Index posts.
2055
  $post_types = $options[ "{$this->prefix}posttypes" ];
@@ -2057,17 +1960,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2057
  foreach ( $post_types as $index => $post_type ) {
2058
  if ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'], true ) ) {
2059
  $args = array(
2060
- 'post_type' => $post_type,
2061
- 'fields' => 'ids',
2062
- 'posts_per_page' => 1,
2063
  'meta_query' => array(
2064
- 'relation' => 'OR',
2065
  array(
2066
  'key' => '_aioseop_noindex',
2067
  'value' => 'off',
2068
  'compare' => '=',
2069
  ),
2070
  ),
 
 
2071
  );
2072
  $q = new WP_Query( $args );
2073
  if ( 0 === $q->post_count ) {
@@ -2085,8 +1988,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2085
  $args = array(
2086
  'post_type' => $post_types,
2087
  'post_status' => 'publish',
2088
- 'meta_query' => array(
2089
- 'relation' => 'OR',
2090
  array(
2091
  'key' => '_aioseop_noindex',
2092
  'value' => 'on',
@@ -2124,21 +2027,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2124
  $count = 1;
2125
  for ( $post_count = 0; $post_count < $post_counts[ $sm ]; $post_count += $this->max_posts ) {
2126
  $files[] = array(
2127
- 'loc' => aioseop_home_url( '/' . $sm . '-' . $prefix . ( $count ++ ) . $suffix ),
2128
  'changefreq' => $freq,
2129
  'priority' => $prio,
2130
  );
2131
  }
2132
  } else {
2133
  $files[] = array(
2134
- 'loc' => aioseop_home_url( '/' . $sm . '-' . $prefix . $suffix ),
2135
  'changefreq' => $freq,
2136
  'priority' => $prio,
2137
  );
2138
  }
2139
  } else {
2140
  $files[] = array(
2141
- 'loc' => aioseop_home_url( '/' . $sm . '-' . $prefix . $suffix ),
2142
  'changefreq' => $freq,
2143
  'priority' => $prio,
2144
  );
@@ -2147,14 +2050,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2147
  }
2148
  if ( $this->option_isset( 'archive' ) ) {
2149
  $files[] = array(
2150
- 'loc' => aioseop_home_url( '/' . 'archive-' . $prefix . $suffix ),
2151
  'changefreq' => $this->get_default_frequency( 'archive' ),
2152
  'priority' => $this->get_default_priority( 'archive' ),
2153
  );
2154
  }
2155
  if ( $this->option_isset( 'author' ) ) {
2156
  $files[] = array(
2157
- 'loc' => aioseop_home_url( '/' . 'author-' . $prefix . $suffix ),
2158
  'changefreq' => $this->get_default_frequency( 'author' ),
2159
  'priority' => $this->get_default_priority( 'author' ),
2160
  );
@@ -2172,21 +2075,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2172
  $count = 1;
2173
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
2174
  $files[] = array(
2175
- 'loc' => aioseop_home_url( '/' . $v1_taxonomy . '-' . $prefix . ( $count ++ ) . $suffix ),
2176
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
2177
  'priority' => $this->get_default_priority( 'taxonomies' ),
2178
  );
2179
  }
2180
  } else {
2181
  $files[] = array(
2182
- 'loc' => aioseop_home_url( '/' . $v1_taxonomy . '-' . $prefix . $suffix ),
2183
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
2184
  'priority' => $this->get_default_priority( 'taxonomies' ),
2185
  );
2186
  }
2187
  } else {
2188
  $files[] = array(
2189
- 'loc' => aioseop_home_url( '/' . $v1_taxonomy . '-' . $prefix . $suffix ),
2190
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
2191
  'priority' => $this->get_default_priority( 'taxonomies' ),
2192
  );
@@ -2204,44 +2107,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2204
 
2205
  $files = apply_filters( 'aioseop_sitemap_index_filenames', $files, $prefix, $suffix );
2206
 
2207
- // Remove Additional Pages index if all pages are static and no extra pages are specified.
2208
- if ( ! $this->does_addl_sitemap_contain_urls() ) {
2209
- $page_to_remove = array( get_site_url() . '/addl-sitemap.xml' );
2210
- $files = $this->remove_urls_from_sitemap_page( $files, $page_to_remove );
2211
- }
2212
-
2213
  return $files;
2214
  }
2215
 
2216
  /**
2217
- * The does_addl_sitemap_contain_urls() function.
2218
- *
2219
- * Checks whether the Additional Pages index will contain URLs.
2220
- * This will not be the case if there is both a static homepage/posts page and there are no additional pages specified.
2221
- *
2222
- * @since 3.2.0
2223
- *
2224
- * @return bool
2225
- */
2226
- private function does_addl_sitemap_contain_urls() {
2227
- $is_addl_pages = ! empty( $this->options['aiosp_sitemap_addl_pages'] );
2228
- if ( ! $is_addl_pages &&
2229
- ( 0 !== (int) get_option( 'page_on_front' ) ) &&
2230
- ( 0 !== (int) get_option( 'page_for_posts' ) ) ) {
2231
- return false;
2232
- }
2233
- return true;
2234
- }
2235
-
2236
- /**
2237
- * Build the Sitemap
2238
- *
2239
- * @since ?
2240
  *
2241
  * @param $sitemap_type
2242
  * @param int $page
2243
  * @param string $filename
2244
  * @param string $comment
 
2245
  * @return string
2246
  */
2247
  public function do_build_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
@@ -2274,12 +2150,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2274
  }
2275
 
2276
  /**
2277
- * Do Write Sitemaps
2278
- *
2279
  * Write the sitemap.
2280
  *
2281
- * @since ?
2282
- *
2283
  * @param $sitemap_type
2284
  * @param int $page
2285
  * @param string $filename
@@ -2290,7 +2162,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2290
  if ( 'root' === $sitemap_type ) {
2291
  $filename = $this->get_filename();
2292
  } else {
2293
- $filename = $sitemap_type . '-' . $this->get_filename();
2294
  }
2295
  }
2296
  if ( empty( $comment ) ) {
@@ -2300,11 +2172,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2300
  }
2301
 
2302
  /**
2303
- * Do Indexed Sitemaps
2304
- *
2305
  * Build all the indexes.
2306
- *
2307
- * @since ?
2308
  */
2309
  public function do_indexed_sitemaps() {
2310
  $this->start_memory_usage = memory_get_peak_usage();
@@ -2343,7 +2211,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2343
  if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) && ( $post_counts[ $posttype ] > $this->max_posts ) ) {
2344
  $count = 1;
2345
  for ( $post_count = 0; $post_count < $post_counts[ $posttype ]; $post_count += $this->max_posts ) {
2346
- $this->do_write_sitemap( $posttype, $count - 1, "{$posttype}-" . $this->get_filename() . "{$count}" );
2347
  $count ++;
2348
  }
2349
  } else {
@@ -2360,7 +2228,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2360
  if ( $term_count > $this->max_posts ) {
2361
  $count = 1;
2362
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
2363
- $this->do_write_sitemap( $taxonomy, $tc, "{$taxonomy}-" . $this->get_filename() . "{$count}" );
2364
  $count ++;
2365
  }
2366
  } else {
@@ -2375,14 +2243,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2375
  $this->log_stats( 'indexed', false );
2376
  }
2377
 
2378
- /**
2379
- * Remove Posts Page
2380
- *
2381
- * @since 2.3.11
2382
- *
2383
- * @param $postspageid
2384
- * @return bool
2385
- */
2386
  public function remove_posts_page( $postspageid ) {
2387
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
2388
  if ( in_array( $postspageid, $this->excludes ) ) {
@@ -2397,14 +2257,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2397
  return false;
2398
  }
2399
 
2400
- /**
2401
- * Remove Homepage
2402
- *
2403
- * @since 2.3.11
2404
- *
2405
- * @param $homepage_id
2406
- * @return bool
2407
- */
2408
  public function remove_homepage( $homepage_id ) {
2409
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
2410
  if ( in_array( $homepage_id, $this->excludes ) ) {
@@ -2420,28 +2272,23 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2420
  }
2421
 
2422
  /**
2423
- * The get_sitemap_without_indexes() function.
2424
- *
2425
- * Fetches data for sitemap without indexes.
2426
  *
2427
  * @since 2.3.6
2428
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
2429
- * @since 3.2.0 Improved function and variable naming.
2430
  *
2431
  * @return array
2432
  */
2433
- public function get_sitemap_without_indexes() {
2434
- $child_urls = $this->get_child_sitemap_urls();
2435
  $options = $this->options;
2436
-
2437
  if ( is_array( $options[ "{$this->prefix}posttypes" ] ) ) {
2438
  $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
2439
  }
2440
  if ( is_array( $options[ "{$this->prefix}taxonomies" ] ) ) {
2441
  $options[ "{$this->prefix}taxonomies" ] = array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) );
2442
  }
2443
-
2444
- $urls = $this->get_all_post_priority_data( $options[ "{$this->prefix}posttypes" ] );
2445
 
2446
  // It's 0 if posts are on homepage, otherwise it's the id of the posts page.
2447
  $posts = (int) get_option( 'page_for_posts' );
@@ -2468,99 +2315,88 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2468
  }
2469
 
2470
  if ( $this->option_isset( 'archive' ) ) {
2471
- $urls = array_merge( $urls, $this->get_date_archive_prio_data() );
2472
  }
2473
  if ( $this->option_isset( 'author' ) ) {
2474
- $urls = array_merge( $urls, $this->get_author_prio_data() );
2475
  }
2476
- foreach ( $urls as $k => $p ) {
2477
  if ( untrailingslashit( $p['loc'] ) === untrailingslashit( $home['loc'] ) ) {
2478
- $urls[ $k ]['priority'] = '1.0';
2479
  $home = null;
2480
  break;
2481
  }
2482
  }
2483
  if ( ( null !== $posts ) && isset( $posts['loc'] ) ) {
2484
- foreach ( $urls as $k => $p ) {
2485
  if ( $p['loc'] === $posts['loc'] ) {
2486
- $urls[ $k ]['changefreq'] = $this->get_default_frequency( 'blog' );
2487
- $urls[ $k ]['priority'] = $this->get_default_priority( 'blog' );
2488
  $posts = null;
2489
  break;
2490
  }
2491
  }
2492
  }
2493
  if ( is_array( $posts ) && $this->remove_posts_page( $postspageid ) !== true ) {
2494
- array_unshift( $urls, $posts );
2495
  }
2496
 
2497
  if ( is_array( $home ) ) {
2498
- array_unshift( $urls, $home );
2499
  }
2500
  $terms = get_terms( $this->get_tax_args( $options[ "{$this->prefix}taxonomies" ] ) );
2501
- $urls2 = $this->get_term_priority_data( $terms );
2502
- $urls3 = $this->get_addl_pages_only();
2503
- $urls = array_merge( $child_urls, $urls, $urls2, $urls3 );
2504
  if ( is_array( $this->extra_sitemaps ) ) {
2505
  foreach ( $this->extra_sitemaps as $sitemap_type ) {
2506
  $sitemap_data = array();
2507
  $sitemap_data = apply_filters( $this->prefix . 'custom_' . $sitemap_type, $sitemap_data, $page, $this_options );
2508
- $urls = array_merge( $urls, $sitemap_data );
2509
  }
2510
  }
2511
 
2512
- $urls = $this->get_homepage_timestamp( $urls );
2513
- $urls = $this->get_posts_page_timestamp( $urls );
2514
-
2515
- return $urls;
2516
  }
2517
 
2518
  /**
2519
- * Do Simple Sitemap
2520
- *
2521
  * Build a single, stand-alone sitemap without indexes.
2522
  *
2523
- * @since ?
2524
- *
2525
  * @param string $comment
 
2526
  * @return string
2527
  */
2528
  public function do_simple_sitemap( $comment = '' ) {
2529
- $sitemap_data = $this->get_sitemap_without_indexes();
2530
  $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'root', 0, $this->options );
2531
 
2532
  return $this->build_sitemap( $sitemap_data, '', $comment );
2533
  }
2534
 
2535
  /**
2536
- * Do Simple Sitemap RSS
2537
- *
2538
  * Build a single stand-alone RSS sitemap without indexes.
2539
  *
2540
- * @since 2.9
2541
- *
2542
  * @param string $comment
 
2543
  * @return string
2544
  */
2545
  public function do_simple_sitemap_rss( $comment = '' ) {
2546
- $sitemap_data = $this->get_sitemap_without_indexes();
2547
  $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'rss', 0, $this->options );
2548
 
2549
  return $this->build_sitemap( $sitemap_data, 'rss', $comment );
2550
  }
2551
 
2552
  /**
2553
- * Get Sitemap XSL
2554
- *
2555
  * Gets the sitemap URL.
2556
  *
2557
  * Has a filter for using something other than the dynamically generated one.
2558
  * Using the filter you need the full path to the custom xsl file.
2559
  *
 
 
2560
  * @since 2.3.6
2561
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
2562
- *
2563
- * @see https://semperplugins.com/documentation/aioseop_sitemap_xsl_url/
2564
  */
2565
  public function get_sitemap_xsl() {
2566
 
@@ -2568,12 +2404,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2568
  }
2569
 
2570
  /**
2571
- * Output RSS
2572
- *
2573
  * Output the RSS for a sitemap, full or latest.
2574
  *
2575
- * @since 2.9
2576
- *
2577
  * @param $urls
2578
  * @param string $sitemap_type The type of RSS sitemap viz. rss or rss_latest.
2579
  * @param string $comment
@@ -2623,8 +2455,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2623
  }
2624
 
2625
  /**
2626
- * Include in RSS
2627
- *
2628
  * Remove elements not containing the rss element.
2629
  *
2630
  * @since 2.9
@@ -2637,15 +2467,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2637
  }
2638
 
2639
  /**
2640
- * Sort Modified Date Descending
2641
- *
2642
  * Sort on the basis of modified date.
2643
- *
2644
- * @since 2.9
2645
- *
2646
- * @param $array1
2647
- * @param $array2
2648
- * @return bool|int
2649
  */
2650
  public function sort_modifed_date_descending( $array1, $array2 ) {
2651
  if ( ! isset( $array1['rss'] ) || ! isset( $array2['rss'] ) ) {
@@ -2655,15 +2477,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2655
  }
2656
 
2657
  /**
2658
- * Output Sitemap
2659
- *
2660
  * Output the XML for a sitemap.
2661
  *
2662
- * @since ?
2663
- *
2664
  * @param $urls
2665
  * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2666
  * @param string $comment
 
2667
  * @return null
2668
  */
2669
  private function output_sitemap( $urls, $sitemap_type, $comment = '' ) {
@@ -2681,7 +2500,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2681
  // TODO Add esc_* function.
2682
  echo '<!-- ' . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date( 'D, d M Y H:i:s e' ) ) . " -->\r\n";
2683
  $plugin_path = $this->plugin_path['url'];
2684
- $plugin_url = wp_parse_url( $plugin_path );
 
2685
  $current_host = $_SERVER['HTTP_HOST'];
2686
  if ( empty( $current_host ) ) {
2687
  $current_host = $_SERVER['SERVER_NAME'];
@@ -2781,14 +2601,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2781
  }
2782
 
2783
  /**
2784
- * Output Sitemap Index
2785
- *
2786
  * Output the XML for a sitemap index.
2787
  *
2788
- * @since ?
2789
- *
2790
  * @param $urls
2791
  * @param string $comment
 
2792
  * @return null
2793
  */
2794
  public function output_sitemap_index( $urls, $comment = '' ) {
@@ -2831,14 +2648,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2831
  }
2832
 
2833
  /**
2834
- * Build Sitemap Index
2835
- *
2836
  * Return an XML sitemap index as a string.
2837
  *
2838
- * @since ?
2839
- *
2840
  * @param $urls
2841
  * @param string $comment
 
2842
  * @return string
2843
  */
2844
  public function build_sitemap_index( $urls, $comment = '' ) {
@@ -2849,15 +2663,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2849
  }
2850
 
2851
  /**
2852
- * Build Sitemap
2853
- *
2854
  * Return an XML sitemap as a string.
2855
  *
2856
- * @since ?
2857
- *
2858
  * @param $urls
2859
  * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2860
  * @param string $comment
 
2861
  * @return string
2862
  */
2863
  public function build_sitemap( $urls, $sitemap_type, $comment = '' ) {
@@ -2868,13 +2679,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2868
  }
2869
 
2870
  /**
2871
- * Get Term Priority Data
2872
- *
2873
  * Return sitemap data for an array of terms.
2874
  *
2875
- * @since ?
2876
- *
2877
  * @param $terms
 
2878
  * @return array
2879
  */
2880
  public function get_term_priority_data( $terms ) {
@@ -2885,7 +2693,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2885
  foreach ( $terms as $term ) {
2886
  $pr_info = array();
2887
  $pr_info['loc'] = $this->get_term_link( $term, $term->taxonomy );
2888
- $pr_info['lastmod'] = $this->get_tax_term_timestamp( $term );
2889
  if (
2890
  ( 'sel' === $this->options[ $this->prefix . 'freq_taxonomies' ] )
2891
  && isset( $this->options[ $this->prefix . 'freq_taxonomies_' . $term->taxonomy ] )
@@ -2921,54 +2728,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2921
  }
2922
 
2923
  /**
2924
- * The get_tax_term_timestamp() function.
2925
- *
2926
- * Gets the Last Change timestamp for a taxonomy term.
2927
- *
2928
- * @since 3.2.0
2929
- *
2930
- * @param object $term
2931
- * @return string $lastmod
2932
- */
2933
- private function get_tax_term_timestamp( $term ) {
2934
- $taxonomy_object = get_taxonomy( $term->taxonomy );
2935
-
2936
- $lastmod = '';
2937
-
2938
- // Loop through all attached post types and get timestamp of last modified assigned post.
2939
- foreach ( $taxonomy_object->object_type as $object_type ) {
2940
- $latest_modified_post = new WP_Query(
2941
- array(
2942
- 'post_type' => $object_type,
2943
- 'post_status' => 'publish',
2944
- 'posts_per_page' => 1,
2945
- 'orderby' => 'modified',
2946
- 'order' => 'DESC',
2947
- 'taxonomy' => $term->taxonomy,
2948
- 'term' => $term->name,
2949
- )
2950
- );
2951
-
2952
- if ( $latest_modified_post->have_posts() ) {
2953
- $temp_lastmod = $latest_modified_post->posts[0]->post_modified_gmt;
2954
- if ( '' === $lastmod || ( $temp_lastmod > $lastmod ) ) {
2955
- $lastmod = $temp_lastmod;
2956
- }
2957
- }
2958
- }
2959
-
2960
- $lastmod = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $lastmod ) );
2961
- return $lastmod;
2962
- }
2963
-
2964
- /**
2965
- * Get Date for Term
2966
- *
2967
  * Return the date of the latest post in the given taxonomy term.
2968
  *
2969
- * @since 2.9
2970
- *
2971
  * @param WP_Term $term The taxonomy term.
 
2972
  * @return string
2973
  */
2974
  private function get_date_for_term( $term ) {
@@ -2998,13 +2761,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2998
  }
2999
 
3000
  /**
3001
- * Get Term Permalinks
3002
- *
3003
  * Return a list of permalinks for an array of terms.
3004
  *
3005
- * @since ?
3006
- *
3007
  * @param $terms
 
3008
  * @return array
3009
  */
3010
  public function get_term_permalinks( $terms ) {
@@ -3020,13 +2780,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3020
  }
3021
 
3022
  /**
3023
- * Get Archive Permalinks
3024
- *
3025
  * Return permalinks for archives.
3026
  *
3027
- * @since ?
3028
- *
3029
  * @param $posts
 
3030
  * @return array
3031
  */
3032
  public function get_archive_permalinks( $posts ) {
@@ -3049,13 +2806,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3049
  }
3050
 
3051
  /**
3052
- * Get Author Permalink
3053
- *
3054
  * Return permalinks for authors.
3055
  *
3056
- * @since ?
3057
- *
3058
  * @param $posts
 
3059
  * @return array
3060
  */
3061
  public function get_author_permalinks( $posts ) {
@@ -3075,13 +2829,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3075
  }
3076
 
3077
  /**
3078
- * Get Post Permalink
3079
- *
3080
  * Return permalinks for posts.
3081
  *
3082
- * @since ?
3083
- *
3084
  * @param $posts
 
3085
  * @return array
3086
  */
3087
  public function get_post_permalinks( $posts ) {
@@ -3098,16 +2849,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3098
  }
3099
 
3100
  /**
3101
- * Unparse URL
3102
- *
3103
  * Convert back from parse_url.
3104
- * Props to thomas at gielfeldt dot com.
3105
  *
3106
- * @since ?
3107
  *
3108
  * @link http://www.php.net/manual/en/function.parse-url.php#106731
3109
  *
3110
  * @param $parsed_url
 
3111
  * @return string
3112
  */
3113
  public function unparse_url( $parsed_url ) {
@@ -3128,8 +2877,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3128
  }
3129
 
3130
  /**
3131
- * Get Additional Page Only
3132
- *
3133
  * Return data for user entered additional pages.
3134
  *
3135
  * @since 2.3.6
@@ -3140,10 +2888,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3140
  public function get_addl_pages_only() {
3141
  $pages = array();
3142
  if ( ! empty( $this->options[ $this->prefix . 'addl_pages' ] ) ) {
3143
- $siteurl = wp_parse_url( aioseop_home_url() );
 
3144
  foreach ( $this->options[ $this->prefix . 'addl_pages' ] as $k => $v ) {
3145
  $k = aiosp_common::make_url_valid_smartly( $k );
3146
- $url = wp_parse_url( $k );
 
3147
  if ( empty( $url['host'] ) ) {
3148
  $url['host'] = $siteurl['host'];
3149
  }
@@ -3183,13 +2933,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3183
  }
3184
 
3185
  /**
3186
- * Get Additional Pages
3187
- *
3188
  * Return data for user entered additional pages and extra pages.
3189
  *
3190
  * @since 2.3.6
3191
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
3192
- * @since 3.2.0 Do not include static homepage/posts page - #2126.
3193
  *
3194
  * @return array
3195
  */
@@ -3226,196 +2973,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3226
  }
3227
  $pages = apply_filters( $this->prefix . 'addl_pages', $pages );
3228
 
3229
- $pages = $this->get_homepage_timestamp( $pages );
3230
- $pages = $this->remove_addl_static_pages( $pages );
3231
-
3232
- return $pages;
3233
- }
3234
-
3235
- /**
3236
- * The remove_addl_static_pages() function.
3237
- *
3238
- * Removes the homepage/posts page from the Additional Pages index if it is static - #2126.
3239
- *
3240
- * @since 3.2.0
3241
- *
3242
- * @param array $pages
3243
- * @return array $pages
3244
- */
3245
- private function remove_addl_static_pages( $pages ) {
3246
- $pages_to_remove = array();
3247
- if ( 0 !== (int) get_option( 'page_on_front' ) ) {
3248
- $homepage_url = get_site_url() . '/';
3249
- array_push( $pages_to_remove, $homepage_url );
3250
- }
3251
-
3252
- $static_posts_page_id = (int) get_option( 'page_for_posts' );
3253
- if ( 0 !== $static_posts_page_id ) {
3254
- array_push( $pages_to_remove, get_permalink( $static_posts_page_id ) );
3255
- }
3256
-
3257
- if ( count( $pages_to_remove ) > 0 ) {
3258
- return $this->remove_urls_from_sitemap_page( $pages, $pages_to_remove );
3259
- }
3260
- return $pages;
3261
- }
3262
-
3263
- /**
3264
- * The remove_urls_from_sitemap_page() function.
3265
- *
3266
- * Removes URLs from a sitemap page. This is used both for indexes and pages within indexes.
3267
- *
3268
- * @since 3.2.0
3269
- *
3270
- * @param array $pages
3271
- * @param array $pages_to_remove
3272
- * @return array $pages
3273
- */
3274
- private function remove_urls_from_sitemap_page( $pages, $pages_to_remove ) {
3275
- $count = count( $pages );
3276
- for ( $i = 0; $i < $count; $i++ ) {
3277
- if ( in_array( $pages[ $i ]['loc'], $pages_to_remove, true ) ) {
3278
- unset( $pages[ $i ] );
3279
- }
3280
- }
3281
  return $pages;
3282
  }
3283
 
3284
  /**
3285
- * The get_homepage_timestamp() function.
3286
- *
3287
- * Gets the Last Change timestamp for the homepage if it isn't static.
3288
- *
3289
- * @since 3.2.0
3290
- *
3291
- * @param array $urls
3292
- * @return array $urls
3293
- */
3294
- private function get_homepage_timestamp( $urls ) {
3295
- if ( 0 !== (int) get_option( 'page_on_front' ) ) {
3296
- return $urls;
3297
- }
3298
-
3299
- $homepage_url = get_site_url() . '/';
3300
- $urls = $this->update_static_page_timestamp( $urls, $homepage_url );
3301
-
3302
- return $urls;
3303
- }
3304
-
3305
- /**
3306
- * The get_posts_page_timestamp() function.
3307
- *
3308
- * Gets the Last Change timestamp for the posts page.
3309
- *
3310
- * @since 3.2.0
3311
- *
3312
- * @param array $urls
3313
- * @return array $urls
3314
- */
3315
- private function get_posts_page_timestamp( $urls ) {
3316
- $posts_page_id = (int) get_option( 'page_for_posts' );
3317
- if ( 0 === $posts_page_id ) {
3318
- return $urls;
3319
- }
3320
-
3321
- $posts_page_url = get_permalink( $posts_page_id );
3322
- $urls = $this->update_static_page_timestamp( $urls, $posts_page_url );
3323
-
3324
- return $urls;
3325
- }
3326
-
3327
- /**
3328
- * The update_static_page_timestamp() function.
3329
- *
3330
- * Update the timestamp attribute for a static page.
3331
- *
3332
- * @since 3.2.0
3333
- *
3334
- * @param array $urls
3335
- * @param string $static_page_url
3336
- * @return array $urls
3337
- */
3338
- private function update_static_page_timestamp( $urls, $static_page_url ) {
3339
- $lastmod = $this->get_last_modified_post_timestamp( 'post' );
3340
- if ( false === $lastmod ) {
3341
- return $urls;
3342
- }
3343
-
3344
- $url_locs = array_combine( array_keys( $urls ), wp_list_pluck( $urls, 'loc' ) );
3345
- $index = array_search( $static_page_url, $url_locs );
3346
- if ( false === $index ) {
3347
- return $urls;
3348
- }
3349
-
3350
- $urls[ $index ] = $this->insert_timestamp_as_second_attribute( $urls[ $index ], $lastmod );
3351
- return $urls;
3352
- }
3353
-
3354
- /**
3355
- * The get_last_modified_post_timestamp() function.
3356
- *
3357
- * Gets the last modified post.
3358
- *
3359
- * @since 3.2.0
3360
- *
3361
- * @param string $post_type
3362
- * @return mixed Timestamp of the last modified post or false if there is none.
3363
- */
3364
- private function get_last_modified_post_timestamp( $post_type ) {
3365
- $last_modified_post = new WP_Query(
3366
- array(
3367
- 'post_type' => $post_type,
3368
- 'post_status' => 'publish',
3369
- 'posts_per_page' => 1,
3370
- 'orderby' => 'modified',
3371
- 'order' => 'DESC',
3372
- )
3373
- );
3374
-
3375
- if ( $last_modified_post->have_posts() ) {
3376
- return $this->format_timestamp_as_lastmod_attribute( $last_modified_post );
3377
- }
3378
- return false;
3379
- }
3380
-
3381
- /**
3382
- * The format_timestamp_as_lastmod_attribute() function.
3383
- *
3384
- * Formats the timestamp for a sitemap record in order to have valid sitemap schema.
3385
- *
3386
- * @since 3.2.0
3387
- *
3388
- * @param object $last_modified_post WP_Query for the last modified post.
3389
- * @return string $lastmod
3390
- */
3391
- private function format_timestamp_as_lastmod_attribute( $last_modified_post ) {
3392
- $lastmod = $last_modified_post->posts[0]->post_modified_gmt;
3393
- return date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $lastmod ) );
3394
- }
3395
-
3396
- /**
3397
- * The insert_timestamp_as_second_attribute() function.
3398
- *
3399
- * Inserts the timestamp for a sitemap record as the second attribute.
3400
- * The lastmod subtag has to be inserted as second attribute in order to have valid schema.
3401
- *
3402
- * @since 3.2.0
3403
- *
3404
- * @param array $url
3405
- * @param string $lastmod
3406
- * @return array $url
3407
- */
3408
- private function insert_timestamp_as_second_attribute( $url, $lastmod ) {
3409
- return array_slice( $url, 0, 1, true ) + array( 'lastmod' => $lastmod ) + array_slice( $url, 1, null, true );
3410
- }
3411
-
3412
- /**
3413
- * Get Additional Page Links
3414
- *
3415
  * Return links for user entered additional pages.
3416
  *
3417
- * @since ?
3418
- *
3419
  * @return array
3420
  */
3421
  public function get_addl_page_links() {
@@ -3427,14 +2990,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3427
  }
3428
 
3429
  /**
3430
- * Get Priority Calculation
3431
- *
3432
  * Scores posts based on date and relative comment count, if any.
3433
  *
3434
- * @since ?
3435
- *
3436
  * @param $date
3437
  * @param mixed $stats
 
3438
  * @return array
3439
  */
3440
  public function get_prio_calc( $date, $stats ) {
@@ -3496,13 +3056,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3496
  }
3497
 
3498
  /**
3499
- * Get Date Archive Priority from Posts
3500
- *
3501
  * Generate sitemap priority data for date archives from an array of posts.
3502
  *
3503
- * @since ?
3504
- *
3505
  * @param $posts
 
3506
  * @return array
3507
  */
3508
  public function get_date_archive_prio_from_posts( $posts ) {
@@ -3541,14 +3098,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3541
  }
3542
 
3543
  /**
3544
- * Get Archive Priority from Posts
3545
- *
3546
  * Generate sitemap priority data for archives from an array of posts.
3547
  *
3548
- * @since ?
3549
- * @since 3.2.0 Don't fetch WooCommerce shop page twice - #2126
3550
- *
3551
  * @param $posts
 
3552
  * @return array
3553
  */
3554
  private function get_archive_prio_from_posts( $posts ) {
@@ -3557,13 +3110,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3557
  $posttypes = $this->options[ "{$this->prefix}posttypes" ];
3558
  }
3559
 
3560
- if ( aioseop_is_woocommerce_active() ) {
3561
- if ( in_array( 'product', $posttypes ) ) {
3562
- $index = array_search( 'product', $posttypes );
3563
- unset( $posttypes[ $index ] );
3564
- }
3565
- }
3566
-
3567
  $types_supporting_archives = get_post_types(
3568
  array(
3569
  'has_archive' => true,
@@ -3579,7 +3125,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3579
  $types[ $p->post_type ] = $p;
3580
  }
3581
 
3582
- $archive_pages = array();
3583
  $types = apply_filters( "{$this->prefix}include_post_types_archives", $types );
3584
  if ( $types ) {
3585
  foreach ( $types as $post_type => $p ) {
@@ -3587,51 +3133,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3587
  if ( ! ( in_array( $post_type, $posttypes ) && in_array( $post_type, $types_supporting_archives ) ) ) {
3588
  continue;
3589
  }
3590
- $temp_archive_pages = $this->get_prio_from_posts(
3591
- array( $p ),
3592
- $this->get_default_priority( 'archive', true ),
3593
- $this->get_default_frequency( 'archive', true ),
3594
- array(
3595
- $this,
3596
- 'get_archive_link_from_post',
 
 
 
3597
  )
3598
  );
3599
-
3600
- if ( ! empty( $temp_archive_pages ) ) {
3601
- $temp_archive_pages = $this->get_archive_page_timestamp( $temp_archive_pages, $post_type );
3602
- }
3603
-
3604
- $archive_pages = array_merge(
3605
- $archive_pages,
3606
- $temp_archive_pages
3607
- );
3608
  }
3609
  }
3610
- return $archive_pages;
3611
- }
3612
-
3613
- /**
3614
- * The get_archive_page_timestamp() function.
3615
- *
3616
- * Get the Last Change timestamp for archive pages.
3617
- *
3618
- * @since 3.2.0
3619
- *
3620
- * @param array $urls
3621
- * @param string $post_type
3622
- * @return array $urls
3623
- */
3624
- private function get_archive_page_timestamp( $urls, $post_type ) {
3625
- $lastmod = $this->get_last_modified_post_timestamp( $post_type );
3626
- if ( false === $lastmod ) {
3627
- return $urls;
3628
- }
3629
-
3630
- $count = count( $urls );
3631
- for ( $i = 0; $i < $count; $i++ ) {
3632
- $urls[ $i ] = $this->insert_timestamp_as_second_attribute( $urls[ $i ], $lastmod );
3633
- }
3634
- return $urls;
3635
  }
3636
 
3637
  /**
@@ -3646,13 +3162,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3646
  }
3647
 
3648
  /**
3649
- * Get Date Archive Link from Post
3650
- *
3651
  * Return a date archive link for a post.
3652
  *
3653
- * @since ?
3654
- *
3655
  * @param $post
 
3656
  * @return bool|string
3657
  */
3658
  public function get_date_archive_link_from_post( $post ) {
@@ -3666,13 +3179,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3666
  }
3667
 
3668
  /**
3669
- * Get Author Priority from Posts
3670
- *
3671
  * Generate sitemap priority data for authors from an array of posts.
3672
  *
3673
- * @since ?
3674
- *
3675
  * @param $posts
 
3676
  * @return array
3677
  */
3678
  public function get_author_prio_from_posts( $posts ) {
@@ -3705,13 +3215,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3705
  }
3706
 
3707
  /**
3708
- * Get Author Link from Post
3709
- *
3710
  * Return an author link from a post.
3711
  *
3712
- * @since ?
3713
- *
3714
  * @param $post
 
3715
  * @return string
3716
  */
3717
  public function get_author_link_from_post( $post ) {
@@ -3719,13 +3226,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3719
  }
3720
 
3721
  /**
3722
- * Get Comment Count Stats
3723
- *
3724
  * Return comment statistics on an array of posts.
3725
  *
3726
- * @since ?
3727
- *
3728
  * @param $posts
 
3729
  * @return array|int
3730
  */
3731
  public function get_comment_count_stats( $posts ) {
@@ -3764,17 +3268,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3764
  }
3765
 
3766
  /**
3767
- * Get Priority from Posts
3768
- *
3769
  * Generate sitemap priority data from an array of posts.
3770
  *
3771
- * @since ?
3772
- *
3773
  * @param $posts
3774
  * @param bool $prio_override
3775
  * @param bool $freq_override
3776
  * @param string $linkfunc
3777
  * @param string $type Type of entity being fetched viz. author, post etc.
 
3778
  * @return array
3779
  */
3780
  public function get_prio_from_posts( $posts, $prio_override = false, $freq_override = false, $linkfunc = 'get_permalink', $type = 'post' ) {
@@ -3899,14 +3400,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3899
  }
3900
 
3901
  /**
3902
- * Get Images from Term
3903
- *
3904
  * Return the images attached to the term.
3905
  *
 
 
3906
  * @since 2.4
3907
  * @since 3.0 remove check for WP 4.4
3908
  *
3909
- * @param WP_Term $term the term object.
3910
  * @return array
3911
  */
3912
  private function get_images_from_term( $term ) {
@@ -3932,8 +3432,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3932
  }
3933
 
3934
  /**
3935
- * Get Images from Post
3936
- *
3937
  * Return the images from the post.
3938
  *
3939
  * @todo Add ~`get_attachment_postid_to_url()` function.
@@ -4096,7 +3594,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4096
  if ( ! empty( $post_image_urls ) ) {
4097
  foreach ( $post_image_urls as $v1_image_url ) {
4098
  $rtn_image_attributes[] = array(
4099
- 'image:loc' => $v1_image_url,
4100
  );
4101
  }
4102
  }
@@ -4109,8 +3607,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4109
  }
4110
 
4111
  /**
4112
- * Set Transient Attachment IDs => URLS
4113
- *
4114
  * Set Transient for Image IDs => URLs
4115
  *
4116
  * @since 2.11
@@ -4124,8 +3620,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4124
  }
4125
 
4126
  /**
4127
- * Get Gallery Images
4128
- *
4129
  * Fetch images from WP, Jetpack and WooCommerce galleries.
4130
  *
4131
  * @since 2.4.2
@@ -4141,16 +3635,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4141
 
4142
  // Check images galleries in the content. DO NOT run the_content filter here as it might cause issues with other shortcodes.
4143
  if ( has_shortcode( $post->post_content, 'gallery' ) ) {
 
 
4144
  /*
4145
- * TODO Investigate other alternatives to retrieve ID instead. Specifically Jetpack data.
4146
- *
4147
  * Is this even necessary? Jetpack uses many of the WP functions, some of which may already be in use.
4148
  * This is also limited to 1 source, and doesn't check other sources once a value is obtained.
4149
  *
4150
  * @link https://hayashikejinan.com/wp-content/uploads/jetpack_api/classes/Jetpack_PostImages.html
4151
  */
4152
  if ( class_exists( 'Jetpack_PostImages' ) ) {
4153
- // Get the jetpack gallery images.
4154
  $jetpack = Jetpack_PostImages::get_images( $post->ID );
4155
  if ( $jetpack ) {
4156
  foreach ( $jetpack as $jetpack_image ) {
@@ -4222,14 +3715,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4222
  }
4223
 
4224
  /**
4225
- * Get Content from Galleries
4226
- *
4227
  * Parses the content to find out if specified images galleries exist and if they do, parse them for images.
4228
  * Supports NextGen.
4229
  *
 
 
4230
  * @since 2.4.2
4231
  *
4232
- * @param string $content The post content.
4233
  * @return string
4234
  */
4235
  private function get_content_from_galleries( $content ) {
@@ -4298,13 +3790,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4298
  }
4299
 
4300
  /**
4301
- * AIOSEOP Clean URL
4302
- *
4303
  * Cleans the URL so that its acceptable in the sitemap.
4304
  *
 
 
4305
  * @since 2.4.1
4306
  *
4307
- * @param string $url The image url.
4308
  * @return string
4309
  */
4310
  public function aioseop_clean_url( $url ) {
@@ -4318,17 +3809,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4318
  }
4319
 
4320
  /**
4321
- * The is_image_url_valid() function.
 
 
4322
  *
4323
- * Checks whether the image URL is valid.
4324
  *
4325
  * @since 2.4.1
4326
  * @since 2.4.3 Compatibility with Pre v4.7 wp_parse_url().
4327
- * @since 2.11.0 Sitemap Optimization #2008 - Changed to a more appropriate name.
4328
- * @since 3.0.0 Remove checks for old WP versions.
4329
- * @since 3.2.0 Remove redundant code.
4330
  *
4331
- * @param string $image The image src.
4332
  * @return bool
4333
  */
4334
  public function is_image_url_valid( $image ) {
@@ -4337,16 +3828,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4337
  return false;
4338
  }
4339
 
 
 
 
 
4340
  $image = aiosp_common::absolutize_url( $image );
4341
- $extn = pathinfo( $image, PATHINFO_EXTENSION );
 
4342
  $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions );
4343
  // Bail if image does not refer to an image file otherwise Google Search Console might reject the sitemap.
4344
  if ( ! in_array( $extn, $allowed, true ) ) {
4345
  return false;
4346
  }
4347
 
4348
- $image_host = wp_parse_url( $image, PHP_URL_HOST );
4349
- $host = wp_parse_url( home_url(), PHP_URL_HOST );
 
4350
 
4351
  if ( $image_host !== $host ) {
4352
  // Allowed hosts will be provided in a wildcard format i.e. img.yahoo.* or *.akamai.*.
@@ -4368,12 +3865,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4368
  }
4369
 
4370
  /**
4371
- * Parse Content for Images
4372
- *
4373
  * Parse the post for images.
4374
  *
4375
- * @since 2.9.1
4376
- *
4377
  * @param string $content the post content.
4378
  * @param array $images the array of images.
4379
  */
@@ -4393,7 +3886,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4393
  $dom->loadHTML( $content );
4394
  libxml_clear_errors();
4395
 
4396
- // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
4397
  $dom->preserveWhiteSpace = false;
4398
 
4399
  $matches = $dom->getElementsByTagName( 'img' );
@@ -4438,8 +3930,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4438
 
4439
  $args['taxonomy'] = $this->show_or_hide_taxonomy( $taxonomies );
4440
 
4441
- $args['exclude'] = array();
4442
  if ( $this->option_isset( 'excl_terms' ) ) {
 
4443
  foreach ( $taxonomies as $v1_taxonomy ) {
4444
  if ( isset( $this->options[ $this->prefix . 'excl_terms' ][ $v1_taxonomy ] ) ) {
4445
  $args['exclude'] = array_merge( $args['exclude'], $this->options[ $this->prefix . 'excl_terms' ][ $v1_taxonomy ]['terms'] );
@@ -4447,20 +3939,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4447
  }
4448
  }
4449
 
4450
- /**
4451
- * The aioseop_sitemap_exclude_tax_terms filter hook.
4452
- *
4453
- * Allows users to exclude (or include) taxonomy terms from the sitemap.
4454
- *
4455
- * @since 2.9
4456
- * @since 3.2.0 Rename filter hook & remove redundant params.
4457
- *
4458
- * @param array $args {
4459
- * @type array $taxonomy Name of the taxonomy that is being included in the sitemap.
4460
- * @type array $exclude IDs of taxonomy terms of the relevant taxonomy that need to be excluded.
4461
- * }
4462
- */
4463
- $args = apply_filters( 'aioseop_sitemap_exclude_tax_terms', $args );
4464
 
4465
  return $args;
4466
  }
@@ -4499,12 +3978,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4499
  }
4500
 
4501
  /**
4502
- * Get Data Archive Priority Data
4503
- *
4504
  * Return sitemap data for date archives.
4505
  *
4506
- * @since ?
4507
- *
4508
  * @return array
4509
  */
4510
  public function get_date_archive_prio_data() {
@@ -4519,12 +3994,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4519
  }
4520
 
4521
  /**
4522
- * Get Author Priority Data
4523
- *
4524
  * Return sitemap data for authors.
4525
  *
4526
- * @since ?
4527
- *
4528
  * @return array
4529
  */
4530
  public function get_author_prio_data() {
@@ -4539,16 +4010,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4539
  }
4540
 
4541
  /**
4542
- * Get All Post Priority Data
4543
- *
4544
  * Return sitemap data for posts.
4545
  *
4546
- * @since ?
4547
- * @since 3.2.0 Update Last Change timestamp for WooCommerce shop page.
4548
- *
4549
  * @param string $include
4550
  * @param string $status
4551
  * @param int $page
 
4552
  * @return array
4553
  */
4554
  public function get_all_post_priority_data( $include = 'any', $status = 'publish', $page = 0 ) {
@@ -4580,103 +4047,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4580
 
4581
  $links = $this->get_prio_from_posts( $posts, $this->get_default_priority( 'post', true ), $this->get_default_frequency( 'post', true ) );
4582
  $links = array_merge( $links, $this->get_archive_prio_from_posts( $posts ) );
4583
-
4584
- $is_sitemap_indexes_disabled = empty( $this->options['aiosp_sitemap_indexes'] );
4585
- if ( $is_sitemap_indexes_disabled || ( ! $is_sitemap_indexes_disabled && 'page' === $include ) ) {
4586
- $links = $this->get_posts_page_timestamp( $links );
4587
- $links = $this->get_prio_freq_static_homepage( $links );
4588
- $links = $this->update_woocommerce_shop_timestamp( $links );
4589
- }
4590
-
4591
- return $links;
4592
- }
4593
-
4594
- /**
4595
- * The get_prio_freq_static_homepage() function.
4596
- *
4597
- * Sets the priority and frequency for the homepage if it is static.
4598
- *
4599
- * @since 3.2.0
4600
- *
4601
- * @param array $links
4602
- * @return array $links
4603
- */
4604
- private function get_prio_freq_static_homepage( $links ) {
4605
- if ( 0 === (int) get_option( 'page_on_front' ) ) {
4606
- return $links;
4607
- }
4608
- $prio = $this->options['aiosp_sitemap_prio_homepage'];
4609
- $freq = $this->options['aiosp_sitemap_freq_homepage'];
4610
-
4611
- $homepage_url = get_site_url() . '/';
4612
- $homepage_index = array_search( $homepage_url, array_column( $links, 'loc' ) );
4613
-
4614
- if ( ! $homepage_url ) {
4615
- return $links;
4616
- }
4617
-
4618
- if ( 'no' !== $prio ) {
4619
- $links[ $homepage_index ]['priority'] = $prio;
4620
- }
4621
- if ( 'no' !== $freq ) {
4622
- $links[ $homepage_index ]['changefreq'] = $freq;
4623
- }
4624
-
4625
  return $links;
4626
  }
4627
 
4628
  /**
4629
- * The update_woocommerce_shop_timestamp() function.
4630
- *
4631
- * Updates the Last Change timestamp for the WooCommerce shop page based on the last modified product - #2126.
4632
- *
4633
- * @since 3.2.0
4634
- *
4635
- * @param array $links
4636
- * @return array $links
4637
- */
4638
- private function update_woocommerce_shop_timestamp( $links ) {
4639
- if ( ! aioseop_is_woocommerce_active() ) {
4640
- return $links;
4641
- }
4642
-
4643
- $shop_page_url = get_permalink( wc_get_page_id( 'shop' ) );
4644
- $shop_page_index = array_search( $shop_page_url, array_column( $links, 'loc' ) );
4645
-
4646
- if ( ! $shop_page_index ) {
4647
- return $links;
4648
- }
4649
-
4650
- // TODO Use get_last_modified_post_timestamp() instead when #2721 is merged.
4651
- $latest_modified_product = new WP_Query(
4652
- array(
4653
- 'post_type' => 'product',
4654
- 'post_status' => 'publish',
4655
- 'posts_per_page' => 1,
4656
- 'orderby' => 'modified',
4657
- 'order' => 'DESC',
4658
- )
4659
- );
4660
-
4661
- if ( $latest_modified_product->have_posts() ) {
4662
- $timestamp = $latest_modified_product->posts[0]->post_modified_gmt;
4663
- $lastmod = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $timestamp ) );
4664
- // Last Change timestamp needs to be inserted as second attribute in order to have valid sitemap schema.
4665
- // TODO Use insert_timestamp_as_second_attribute() instead when #2721 is merged.
4666
- $links[ $shop_page_index ] = array_slice( $links[ $shop_page_index ], 0, 1, true ) + array( 'lastmod' => $lastmod ) + array_slice( $links[ $shop_page_index ], 1, null, true );
4667
- }
4668
- return $links;
4669
- }
4670
-
4671
- /**
4672
- * Get All Permalinks
4673
- *
4674
  * Return a list of all permalinks.
4675
  *
4676
- * @since ?
4677
- *
4678
  * @param string $include
4679
  * @param string $status
 
4680
  * @return array
4681
  */
4682
  public function get_all_permalinks( $include = 'any', $status = 'publish' ) {
@@ -4698,13 +4077,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4698
  }
4699
 
4700
  /**
4701
- * Cache Structure
4702
- *
4703
  * Static memory cache for permalink_structure option.
4704
  *
4705
- * @since ?
4706
- *
4707
  * @param $pre
 
4708
  * @return null
4709
  */
4710
  public function cache_structure( $pre ) {
@@ -4712,13 +4088,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4712
  }
4713
 
4714
  /**
4715
- * Cache Home
4716
- *
4717
  * Static memory cache for home option.
4718
  *
4719
- * @since ?
4720
- *
4721
  * @param $pre
 
4722
  * @return null
4723
  */
4724
  public function cache_home( $pre ) {
@@ -4726,11 +4099,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4726
  }
4727
 
4728
  /**
4729
- * Cache Options
4730
- *
4731
  * Cache permalink_structure and home for repeated sitemap queries.
4732
- *
4733
- * @since ?
4734
  */
4735
  public function cache_options() {
4736
  static $start = true;
@@ -4748,14 +4117,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4748
  }
4749
 
4750
  /**
4751
- * Get Term Link
4752
- *
4753
  * Call get_term_link with caching in place.
4754
  *
4755
- * @since ?
4756
- *
4757
  * @param $term
4758
  * @param string $taxonomy
 
4759
  * @return string|WP_Error
4760
  */
4761
  public function get_term_link( $term, $taxonomy = '' ) {
@@ -4769,13 +4135,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4769
  }
4770
 
4771
  /**
4772
- * Get Permalink
4773
- *
4774
  * Call get_permalink with caching in place.
4775
  *
4776
- * @since ?
4777
- *
4778
  * @param $post
 
4779
  * @return false|string
4780
  */
4781
  public function get_permalink( $post ) {
@@ -4809,13 +4172,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4809
  }
4810
 
4811
  /**
4812
- * Get All Terms Counts
4813
- *
4814
  * Return term counts using wp_count_terms().
4815
  *
4816
- * @since ?
4817
- *
4818
  * @param $args
 
4819
  * @return array|int|mixed|null|WP_Error
4820
  */
4821
  public function get_all_term_counts( $args ) {
@@ -4842,14 +4202,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4842
  }
4843
 
4844
  /**
4845
- * Get All Post Counts
4846
- *
4847
  * Return post counts.
4848
  *
4849
- * @since ?
4850
  * @since 2.4.3 Refactored to use get_post_count() instead of wp_count_posts().
4851
- *
4852
  * @param $args
 
4853
  * @return array
4854
  */
4855
  public function get_all_post_counts( $args ) {
@@ -4879,12 +4236,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4879
  }
4880
 
4881
  /**
4882
- * Modify Post Params for External Plugins
4883
- *
4884
  * Modify the post arguments in case third-party plugins are being used e.g. WPML.
4885
  *
4886
- * @since 2.4.5
4887
- *
4888
  * @param $args
4889
  */
4890
  public function modify_post_params_for_external_plugins( &$args ) {
@@ -4897,13 +4250,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4897
  }
4898
 
4899
  /**
4900
- * Get Post Count
4901
- *
4902
  * Return post counts for the specified arguments.
4903
  *
4904
- * @since ?
4905
- *
4906
  * @param $args
 
4907
  * @return int
4908
  */
4909
  public function get_post_count( $args ) {
@@ -4942,8 +4292,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4942
  }
4943
 
4944
  /**
4945
- * Get All Post Type Data
4946
- *
4947
  * Return post data using get_posts().
4948
  *
4949
  * @since ?
@@ -5036,8 +4384,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
5036
  // for example, exclude post type, but include certain posts.
5037
  // NOTE: Do NOT use this for basic including. It's best to avoid an additional query.
5038
  $args_include = array(
5039
- 'post_type' => array(),
5040
- 'meta_query' => array(
5041
  'relation' => 'OR',
5042
  array(
5043
  'key' => '_aioseop_noindex',
@@ -5096,6 +4444,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
5096
  * @see get_posts()
5097
  * @link https://developer.wordpress.org/reference/functions/get_posts/
5098
  * }
 
5099
  */
5100
  $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
5101
 
2
  /**
3
  * Sitemap class.
4
  *
5
+ * @package All-in-One-SEO-Pack
6
  * @version 2.3.13
7
  */
8
 
155
 
156
  /**
157
  * All_in_One_SEO_Pack_Sitemap constructor.
 
 
158
  */
159
  public function __construct() {
160
  if ( get_class( $this ) === 'All_in_One_SEO_Pack_Sitemap' ) { // Set this up only when instantiated as this class.
182
  'default' => 0,
183
  ),
184
  'indexes' => array(
185
+ 'name' => __( 'Enable Sitemap Indexes', 'all-in-one-seo-pack' ),
186
  'default' => 'on',
187
  ),
188
  'max_posts' => array(
297
  'save' => false,
298
  ),
299
  'addl_url' => array(
300
+ 'name' => __( 'Page URL', 'all-in-one-seo-pack' ),
301
+ 'type' => 'url',
302
+ 'save' => false,
303
  ),
304
  'addl_prio' => array(
305
  'name' => __( 'Page Priority', 'all-in-one-seo-pack' ),
341
  'type' => 'multiselect',
342
  'class' => 'aioseop-exclude-terms',
343
  ),
344
+ 'excl_pages' => array(
345
  'name' => __( 'Excluded Pages', 'all-in-one-seo-pack' ),
346
  'type' => 'text',
347
  ),
398
  }
399
 
400
  /**
401
+ * Sitemap notices.
402
  *
403
  * @todo Move admin notice functions. Possibly to where it is first saved & loaded (`load_sitemap_options`).
404
  *
451
  }
452
 
453
  /**
454
+ * Update sitemap from posts.
 
 
455
  *
456
  * @param $new_status
457
  * @param $old_status
494
  }
495
 
496
  /**
497
+ * Add cron schedules.
498
  *
499
  * Add new intervals of a week and a month.
500
  *
 
 
501
  * @link https://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
502
  *
503
  * @param $schedules
504
+ *
505
  * @return mixed
506
  */
507
  public function add_cron_schedules( $schedules ) {
518
  }
519
 
520
  /**
521
+ * Cron update.
 
 
522
  */
523
  public function cron_update() {
524
  add_filter( 'cron_schedules', array( $this, 'add_cron_schedules' ) );
528
  }
529
 
530
  /**
531
+ * Daily update.
 
 
532
  */
533
  public function daily_update() {
534
  $last_run = get_option( $this->prefix . 'cron_last_run' );
575
  }
576
 
577
  /**
 
 
578
  * Load styles for module.
579
  *
580
  * @since 3.0
607
  }
608
 
609
  /**
 
 
610
  * Initialize options, after constructor.
 
 
611
  */
612
  public function load_sitemap_options() {
613
  // Load initial options / set defaults.
650
  }
651
 
652
  /**
653
+ * Custom settings.
654
  *
655
  * Displays boxes for add pages to sitemap option. Requires WordPress 4.1.
656
  *
 
 
657
  * @param $buf
658
  * @param $args
659
+ *
660
  * @return string
661
  */
662
  public function display_custom_options( $buf, $args ) {
663
  if ( "{$this->prefix}addl_pages" === $args['name'] ) {
664
  $buf .= "<div id='{$this->prefix}addl_pages'>";
665
  if ( ! empty( $args['value'] ) ) {
666
+ $buf .= "<table class='aioseop_table' cellpadding=0 cellspacing=0>\n";
667
  foreach ( $args['value'] as $k => $v ) {
668
  if ( is_object( $v ) ) {
669
  $v = (array) $v;
670
  }
671
+ $buf .= "\t<tr><td><a href='#' title='$k' class='dashicons dashicons-trash aiosp_delete_url'></a> {$k}</td><td>{$v['prio']}</td><td>{$v['freq']}</td><td>{$v['mod']}</td></tr>\n";
672
  }
673
  $buf .= "</table>\n";
674
  }
689
  }
690
 
691
  /**
 
 
692
  * Add post type details for settings once post types have been registered.
693
  *
694
  * @todo This function is being used to set up option values. This could possibly be refactored to something better suited.
695
  *
 
696
  * @since 3.0 Add custom taxonomy support for Excluding Terms setting. (#240)
697
  */
698
  public function add_post_types() {
808
  }
809
 
810
  /**
 
 
811
  * Set up settings, checking for sitemap conflicts, on settings page.
 
 
812
  */
813
  public function add_page_hooks() {
814
  $this->flush_rules_hook();
819
  }
820
 
821
  /**
822
+ * Filter submit button.
823
  *
824
  * Change settings page submit button to read "Update Sitemap".
825
  *
 
 
826
  * @param $submit
827
+ *
828
  * @return mixed
829
  */
830
  public function filter_submit( $submit ) {
834
  }
835
 
836
  /**
837
+ * Updates post data.
838
  *
839
  * Disable writing sitemaps to the filesystem for multisite.
840
  *
 
 
841
  * @param $options
842
+ *
843
  * @return mixed
844
  */
845
  public function update_post_data( $options ) {
851
  }
852
 
853
  /**
 
 
 
 
854
  * @param $url
855
+ *
856
  * @return bool
857
  */
858
  public function get_rewrite_url( $url ) {
859
  global $wp_rewrite;
860
+ // TODO Change to wp_parse_url.
861
+ $url = parse_url( esc_url( $url ), PHP_URL_PATH );
862
  $url = ltrim( $url, '/' );
863
  if ( ! empty( $wp_rewrite ) ) {
864
  $rewrite_rules = $wp_rewrite->rewrite_rules();
873
  }
874
 
875
  /**
 
 
876
  * Get the filename prefix for the sitemap file.
 
877
  *
878
+ * If a value was provided when this prefix was configurable from the settings page, return that instead of the default.
879
  *
880
  * @return string
881
  */
896
  }
897
 
898
  /**
899
+ * Filter display options.
900
  *
901
  * Add in options for status display on settings page, sitemap rewriting on multisite.
902
  *
906
  * @since 3.0 Remove WP < 3.5 old Privacy Settings link
907
  *
908
  * @param $options
909
+ *
910
  * @return mixed
911
  */
912
  public function filter_display_options( $options ) {
961
  }
962
 
963
  /**
964
+ * Filter options.
965
  *
966
  * Handle 'all' option for post types / taxonomies, further sanitization of filename, rewrites on for multisite, setting up addl pages option.
967
  *
971
  * @since 3.0 Change saving 'excl_terms' to database with tax_query format for custom taxonomy support. (Pro #240)
972
  *
973
  * @param $options
974
+ *
975
  * @return mixed
976
  */
977
  public function filter_options( $options ) {
1042
  if ( ! empty( $_POST[ $this->prefix . 'excl_terms' ] ) ) {
1043
  $raw_excl_terms = filter_input( INPUT_POST, $this->prefix . 'excl_terms', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
1044
 
1045
+ // Parse taxonomy terms {$taxonomy_slug}-{$term_id}
1046
  $excl_terms = array();
1047
  foreach ( $raw_excl_terms as $v1_tax_term ) {
1048
  $term_id = explode( '-', $v1_tax_term );
1067
  }
1068
 
1069
  /**
 
 
1070
  * Get sitemap urls of child blogs, if any.
1071
  *
 
 
1072
  * @return array
1073
  */
1074
  public function get_child_sitemap_urls() {
1115
  }
1116
 
1117
  /**
1118
+ * Gets the home path.
1119
  *
1120
  * If we're in wp-admin, use the WordPress function, otherwise we user our own version here.
1121
  * This only applies to static sitemaps.
1145
  }
1146
 
1147
  /**
 
 
1148
  * Whitelists files from static sitemap conflict warning.
1149
+ *
1150
  * For right now, this is just externally produced news sitemaps until we figure out something better.
1151
  *
1152
+ * @param $file
1153
+ *
1154
  * @since 2.3.10.2
1155
  *
 
1156
  * @return string
1157
  */
1158
  public function whitelist_static_sitemaps( $file ) {
1167
  }
1168
 
1169
  /**
 
 
1170
  * Scan for sitemaps on filesystem.
1171
  *
 
 
1172
  * @return array
1173
  */
1174
  public function scan_match_files() {
1199
  }
1200
 
1201
  /**
1202
+ * Scan for sitemaps.
1203
  *
1204
  * Handle deleting / renaming of conflicting sitemap files.
1205
  *
1206
  * @todo Add/Fix nonce.
 
 
1207
  */
1208
  public function do_sitemap_scan() {
1209
  $msg = '';
1264
  }
1265
 
1266
  /**
 
 
1267
  * Do the scan, return the results.
1268
  *
 
 
1269
  * @return string
1270
  */
1271
  public function scan_sitemaps() {
1279
  }
1280
 
1281
  /**
1282
+ * Get problem files.
1283
  *
1284
  * Get the list of potentially conflicting sitemap files, identify whether they came from us, are blank, or are of unknown origin.
1285
  *
 
 
 
1286
  * @param $files
1287
  * @param $msg
1288
+ *
1289
+ * In 2.3.10 we added the ability to see empty sitemap files as well.
1290
+ *
1291
  * @return array
1292
  */
1293
  public function get_problem_files( $files, &$msg ) {
1374
  }
1375
 
1376
  /**
1377
+ * Display sitemap warning.
1378
  *
1379
  * Display the warning and the form for conflicting sitemap files.
1380
  *
 
 
1381
  * @param $files
1382
+ *
1383
  * @return string
1384
  */
1385
  public function sitemap_warning( $files ) {
1404
  }
1405
 
1406
  /**
 
 
1407
  * Updates debug log messages.
1408
  *
1409
  * Deprecated as of 2.3.10 in favor of WP debug log. We should eventually remove this.
1410
  *
 
 
1411
  * @param $msg
1412
  */
1413
  public function debug_message( $msg ) {
1415
  }
1416
 
1417
  /**
 
 
1418
  * Set up hooks for rewrite rules for dynamic sitemap generation.
 
 
1419
  */
1420
  public function setup_rewrites() {
1421
  add_filter( 'rewrite_rules_array', array( $this, 'rewrite_hook' ) );
1427
  }
1428
 
1429
  /**
 
 
1430
  * Build and return our rewrite rules.
1431
  *
 
 
1432
  * @param string $prefix_removed_rules_with If rules are being removed, prefix them with this character
1433
  * so that they are flushed properly and are not retained.
1434
  * @return array
1435
  */
1436
  public function get_rewrite_rules( $prefix_removed_rules_with = null ) {
1437
+ $sitemap_rules = array(
1438
+ $this->get_filename() . '.xml' => 'index.php?' . $this->prefix . 'path=root',
1439
+ $this->get_filename() . '_(.+)_(\d+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]&' . $this->prefix . 'page=$matches[2]',
1440
+ $this->get_filename() . '_(.+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]',
 
1441
  );
1442
 
1443
  if ( isset( $this->options[ "{$this->prefix}rss_sitemap" ] ) && $this->options[ "{$this->prefix}rss_sitemap" ] ) {
1455
  }
1456
 
1457
  /**
 
 
1458
  * Add in our rewrite rules.
1459
  *
 
 
1460
  * @param $rules
1461
+ *
1462
  * @return array
1463
  */
1464
  public function rewrite_hook( $rules ) {
1471
  }
1472
 
1473
  /**
1474
+ * Flush rewrite rules when necessary.
 
 
1475
  */
1476
  public function flush_rules_hook() {
1477
  global $wp_rewrite;
1489
  }
1490
 
1491
  /**
 
 
1492
  * Add our query variable for sitemap generation.
1493
  *
 
 
1494
  * @param $vars
1495
+ *
1496
  * @return array
1497
  */
1498
  public function query_var_hook( $vars ) {
1505
  }
1506
 
1507
  /**
 
 
1508
  * Start timing and get initial memory usage for debug info.
 
 
1509
  */
1510
  public function log_start() {
1511
  $this->start_memory_usage = memory_get_peak_usage();
1514
 
1515
 
1516
  /**
 
 
1517
  * Stop timing and log memory usage for debug info.
1518
  *
1519
  * @since ?
1536
  }
1537
 
1538
  /**
 
 
1539
  * Handle outputting of dynamic sitemaps, logging.
1540
  *
1541
  * @since ?
1565
  $content = $this->do_rewrite_sitemap( $sitemap_type, $page );
1566
 
1567
  // if the sitemap has no content, it's probabaly invalid and is being called directly.
1568
+ // @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2190
1569
  if ( empty( $content ) ) {
1570
  $query->set_404();
1571
  status_header( 404 );
1584
  }
1585
 
1586
  /**
1587
+ * Make dynamic xsl.
 
 
1588
  */
1589
  public function make_dynamic_xsl() {
1590
  // Make dynamic xsl file.
1597
  }
1598
 
1599
  /**
1600
+ * Get sitemap data.
 
 
1601
  *
1602
  * @param $sitemap_type
1603
  * @param int $page
1604
+ *
1605
  * @return array
1606
  */
1607
  public function get_sitemap_data( $sitemap_type, $page = 0 ) {
1608
  $sitemap_data = array();
1609
 
1610
  if ( 0 === strpos( $sitemap_type, 'rss' ) ) {
1611
+ $sitemap_data = $this->get_simple_sitemap();
1612
  } elseif ( $this->options[ "{$this->prefix}indexes" ] ) {
1613
  $posttypes = $this->options[ "{$this->prefix}posttypes" ];
1614
  if ( empty( $posttypes ) ) {
1639
  }
1640
  }
1641
  } elseif ( 'root' === $sitemap_type ) {
1642
+ $sitemap_data = $this->get_simple_sitemap();
1643
  }
1644
 
1645
  return apply_filters( $this->prefix . 'data', $sitemap_data, $sitemap_type, $page, $this->options );
1646
  }
1647
 
1648
  /**
1649
+ * Rewrite sitemap.
1650
  *
1651
  * Output sitemaps dynamically based on rewrite rules.
1652
  *
1665
  }
1666
 
1667
  /**
 
 
1668
  * Build a url to the sitemap.
1669
  *
1670
  * @since 2.3.6
1680
  }
1681
 
1682
  /**
 
 
1683
  * Notify search engines, do logging.
 
 
1684
  */
1685
  public function do_notify() {
1686
 
1705
  if ( ! empty( $url ) ) {
1706
  foreach ( $notify_url as $k => $v ) {
1707
  // TODO Change urlencode() to rawurlencode().
1708
+ // @link http://php.net/manual/en/function.rawurlencode.php
1709
+ // @link http://www.faqs.org/rfcs/rfc3986.html
1710
  $response = wp_remote_get( $notify_url[ $k ] . urlencode( $url ) );
1711
  if ( is_array( $response ) && ! empty( $response['response'] ) && ! empty( $response['response']['code'] ) ) {
1712
  if ( 200 !== intval( $response['response']['code'] ) ) {
1722
  }
1723
 
1724
  /**
 
 
1725
  * Add Sitemap parameter to virtual robots.txt file.
 
 
1726
  */
1727
  public function do_robots() {
1728
  $url = $this->get_sitemap_url();
1731
  }
1732
 
1733
  /**
1734
+ * Build static sitemaps.
1735
  *
1736
  * Build static sitemaps on submit if rewrite rules are not in use, do logging.
1737
  *
 
 
1738
  * @param string $message
1739
  */
1740
  public function do_sitemaps( $message = '' ) {
1779
  }
1780
 
1781
  /**
1782
+ * Add mime type.
 
 
1783
  *
1784
  * @param $mime
1785
+ *
1786
  * @return mixed
1787
  */
1788
  public function add_xml_mime_type( $mime ) {
1794
  }
1795
 
1796
  /**
1797
+ * Write multiple sitemaps.
1798
  *
1799
+ * Write sitemaps to the filesystem.
 
 
1800
  *
1801
  * @param $filename
1802
  * @param $contents
1806
  }
1807
 
1808
  /**
1809
+ * Write single sitemap.
1810
  *
1811
  * Write a single sitemap to the filesystem.
1812
  *
1815
  *
1816
  * @param $filename
1817
  * @param $contents
1818
+ *
1819
  * @return bool
1820
  */
1821
  public function write_sitemap( $filename, $contents ) {
1827
  }
1828
 
1829
  /**
1830
+ * Gets the default values.
1831
  *
1832
  * Helper function for handling default values.
1833
  *
 
 
1834
  * @param $defaults
1835
  * @param $prefix
1836
  * @param $cache
1837
  * @param $item
1838
  * @param bool $nodefaults
1839
  * @param string $type
1840
+ *
1841
  * @return bool
1842
  */
1843
  public function get_default_values( $defaults, $prefix, &$cache, $item, $nodefaults = false, $type = '' ) {
1878
  }
1879
 
1880
  /**
 
 
1881
  * Get priority settings for sitemap entries.
1882
  *
 
 
1883
  * @param $item
1884
  * @param bool $nodefaults
1885
  * @param string $type
1886
+ *
1887
  * @return bool
1888
  */
1889
  public function get_default_priority( $item, $nodefaults = false, $type = '' ) {
1903
  }
1904
 
1905
  /**
 
 
1906
  * Get frequency settings for sitemap entries.
1907
  *
 
 
1908
  * @param $item
1909
  * @param bool $nodefaults
1910
  * @param string $type
1911
+ *
1912
  * @return bool
1913
  */
1914
  public function get_default_frequency( $item, $nodefaults = false, $type = '' ) {
1928
  }
1929
 
1930
  /**
 
 
1931
  * Build an index of sitemaps used.
1932
  *
1933
  * @since 2.3.6
1934
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
1935
  * @since 3.0 Changed to exclude noindex post types. #1382
1936
+ *
1937
  * @return array
1938
  */
1939
  public function get_sitemap_index_filenames() {
1952
  $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
1953
  $options[ "{$this->prefix}taxonomies" ] = $this->show_or_hide_taxonomy( array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) ) );
1954
 
1955
+ $files[] = array( 'loc' => aioseop_home_url( '/' . $prefix . '_addl' . $suffix ) );
1956
 
1957
  // Get post types selected, and NoIndex post types & Index posts.
1958
  $post_types = $options[ "{$this->prefix}posttypes" ];
1960
  foreach ( $post_types as $index => $post_type ) {
1961
  if ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'], true ) ) {
1962
  $args = array(
1963
+ 'post_type' => $post_type,
 
 
1964
  'meta_query' => array(
1965
+ 'relation' => 'OR',
1966
  array(
1967
  'key' => '_aioseop_noindex',
1968
  'value' => 'off',
1969
  'compare' => '=',
1970
  ),
1971
  ),
1972
+ 'fields' => 'ids',
1973
+ 'posts_per_page' => 1,
1974
  );
1975
  $q = new WP_Query( $args );
1976
  if ( 0 === $q->post_count ) {
1988
  $args = array(
1989
  'post_type' => $post_types,
1990
  'post_status' => 'publish',
1991
+ 'meta_query' => array(
1992
+ 'relation' => 'OR',
1993
  array(
1994
  'key' => '_aioseop_noindex',
1995
  'value' => 'on',
2027
  $count = 1;
2028
  for ( $post_count = 0; $post_count < $post_counts[ $sm ]; $post_count += $this->max_posts ) {
2029
  $files[] = array(
2030
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ),
2031
  'changefreq' => $freq,
2032
  'priority' => $prio,
2033
  );
2034
  }
2035
  } else {
2036
  $files[] = array(
2037
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ),
2038
  'changefreq' => $freq,
2039
  'priority' => $prio,
2040
  );
2041
  }
2042
  } else {
2043
  $files[] = array(
2044
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ),
2045
  'changefreq' => $freq,
2046
  'priority' => $prio,
2047
  );
2050
  }
2051
  if ( $this->option_isset( 'archive' ) ) {
2052
  $files[] = array(
2053
+ 'loc' => aioseop_home_url( '/' . $prefix . '_archive' . $suffix ),
2054
  'changefreq' => $this->get_default_frequency( 'archive' ),
2055
  'priority' => $this->get_default_priority( 'archive' ),
2056
  );
2057
  }
2058
  if ( $this->option_isset( 'author' ) ) {
2059
  $files[] = array(
2060
+ 'loc' => aioseop_home_url( '/' . $prefix . '_author' . $suffix ),
2061
  'changefreq' => $this->get_default_frequency( 'author' ),
2062
  'priority' => $this->get_default_priority( 'author' ),
2063
  );
2075
  $count = 1;
2076
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
2077
  $files[] = array(
2078
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $v1_taxonomy . '_' . ( $count ++ ) . $suffix ),
2079
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
2080
  'priority' => $this->get_default_priority( 'taxonomies' ),
2081
  );
2082
  }
2083
  } else {
2084
  $files[] = array(
2085
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $v1_taxonomy . $suffix ),
2086
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
2087
  'priority' => $this->get_default_priority( 'taxonomies' ),
2088
  );
2089
  }
2090
  } else {
2091
  $files[] = array(
2092
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $v1_taxonomy . $suffix ),
2093
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
2094
  'priority' => $this->get_default_priority( 'taxonomies' ),
2095
  );
2107
 
2108
  $files = apply_filters( 'aioseop_sitemap_index_filenames', $files, $prefix, $suffix );
2109
 
 
 
 
 
 
 
2110
  return $files;
2111
  }
2112
 
2113
  /**
2114
+ * Build the sitemap.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2115
  *
2116
  * @param $sitemap_type
2117
  * @param int $page
2118
  * @param string $filename
2119
  * @param string $comment
2120
+ *
2121
  * @return string
2122
  */
2123
  public function do_build_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
2150
  }
2151
 
2152
  /**
 
 
2153
  * Write the sitemap.
2154
  *
 
 
2155
  * @param $sitemap_type
2156
  * @param int $page
2157
  * @param string $filename
2162
  if ( 'root' === $sitemap_type ) {
2163
  $filename = $this->get_filename();
2164
  } else {
2165
+ $filename = $this->get_filename() . '_' . $sitemap_type;
2166
  }
2167
  }
2168
  if ( empty( $comment ) ) {
2172
  }
2173
 
2174
  /**
 
 
2175
  * Build all the indexes.
 
 
2176
  */
2177
  public function do_indexed_sitemaps() {
2178
  $this->start_memory_usage = memory_get_peak_usage();
2211
  if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) && ( $post_counts[ $posttype ] > $this->max_posts ) ) {
2212
  $count = 1;
2213
  for ( $post_count = 0; $post_count < $post_counts[ $posttype ]; $post_count += $this->max_posts ) {
2214
+ $this->do_write_sitemap( $posttype, $count - 1, $this->get_filename() . "_{$posttype}_{$count}" );
2215
  $count ++;
2216
  }
2217
  } else {
2228
  if ( $term_count > $this->max_posts ) {
2229
  $count = 1;
2230
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
2231
+ $this->do_write_sitemap( $taxonomy, $tc, $this->get_filename() . "_{$taxonomy}_{$count}" );
2232
  $count ++;
2233
  }
2234
  } else {
2243
  $this->log_stats( 'indexed', false );
2244
  }
2245
 
 
 
 
 
 
 
 
 
2246
  public function remove_posts_page( $postspageid ) {
2247
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
2248
  if ( in_array( $postspageid, $this->excludes ) ) {
2257
  return false;
2258
  }
2259
 
 
 
 
 
 
 
 
 
2260
  public function remove_homepage( $homepage_id ) {
2261
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
2262
  if ( in_array( $homepage_id, $this->excludes ) ) {
2272
  }
2273
 
2274
  /**
2275
+ * Get simple sitemap.
 
 
2276
  *
2277
  * @since 2.3.6
2278
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
 
2279
  *
2280
  * @return array
2281
  */
2282
+ public function get_simple_sitemap() {
2283
+ $child = $this->get_child_sitemap_urls();
2284
  $options = $this->options;
 
2285
  if ( is_array( $options[ "{$this->prefix}posttypes" ] ) ) {
2286
  $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
2287
  }
2288
  if ( is_array( $options[ "{$this->prefix}taxonomies" ] ) ) {
2289
  $options[ "{$this->prefix}taxonomies" ] = array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) );
2290
  }
2291
+ $prio = $this->get_all_post_priority_data( $options[ "{$this->prefix}posttypes" ] );
 
2292
 
2293
  // It's 0 if posts are on homepage, otherwise it's the id of the posts page.
2294
  $posts = (int) get_option( 'page_for_posts' );
2315
  }
2316
 
2317
  if ( $this->option_isset( 'archive' ) ) {
2318
+ $prio = array_merge( $prio, $this->get_date_archive_prio_data() );
2319
  }
2320
  if ( $this->option_isset( 'author' ) ) {
2321
+ $prio = array_merge( $prio, $this->get_author_prio_data() );
2322
  }
2323
+ foreach ( $prio as $k => $p ) {
2324
  if ( untrailingslashit( $p['loc'] ) === untrailingslashit( $home['loc'] ) ) {
2325
+ $prio[ $k ]['priority'] = '1.0';
2326
  $home = null;
2327
  break;
2328
  }
2329
  }
2330
  if ( ( null !== $posts ) && isset( $posts['loc'] ) ) {
2331
+ foreach ( $prio as $k => $p ) {
2332
  if ( $p['loc'] === $posts['loc'] ) {
2333
+ $prio[ $k ]['changefreq'] = $this->get_default_frequency( 'blog' );
2334
+ $prio[ $k ]['priority'] = $this->get_default_priority( 'blog' );
2335
  $posts = null;
2336
  break;
2337
  }
2338
  }
2339
  }
2340
  if ( is_array( $posts ) && $this->remove_posts_page( $postspageid ) !== true ) {
2341
+ array_unshift( $prio, $posts );
2342
  }
2343
 
2344
  if ( is_array( $home ) ) {
2345
+ array_unshift( $prio, $home );
2346
  }
2347
  $terms = get_terms( $this->get_tax_args( $options[ "{$this->prefix}taxonomies" ] ) );
2348
+ $prio2 = $this->get_term_priority_data( $terms );
2349
+ $prio3 = $this->get_addl_pages_only();
2350
+ $prio = array_merge( $child, $prio, $prio2, $prio3 );
2351
  if ( is_array( $this->extra_sitemaps ) ) {
2352
  foreach ( $this->extra_sitemaps as $sitemap_type ) {
2353
  $sitemap_data = array();
2354
  $sitemap_data = apply_filters( $this->prefix . 'custom_' . $sitemap_type, $sitemap_data, $page, $this_options );
2355
+ $prio = array_merge( $prio, $sitemap_data );
2356
  }
2357
  }
2358
 
2359
+ return $prio;
 
 
 
2360
  }
2361
 
2362
  /**
 
 
2363
  * Build a single, stand-alone sitemap without indexes.
2364
  *
 
 
2365
  * @param string $comment
2366
+ *
2367
  * @return string
2368
  */
2369
  public function do_simple_sitemap( $comment = '' ) {
2370
+ $sitemap_data = $this->get_simple_sitemap();
2371
  $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'root', 0, $this->options );
2372
 
2373
  return $this->build_sitemap( $sitemap_data, '', $comment );
2374
  }
2375
 
2376
  /**
 
 
2377
  * Build a single stand-alone RSS sitemap without indexes.
2378
  *
 
 
2379
  * @param string $comment
2380
+ *
2381
  * @return string
2382
  */
2383
  public function do_simple_sitemap_rss( $comment = '' ) {
2384
+ $sitemap_data = $this->get_simple_sitemap();
2385
  $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'rss', 0, $this->options );
2386
 
2387
  return $this->build_sitemap( $sitemap_data, 'rss', $comment );
2388
  }
2389
 
2390
  /**
 
 
2391
  * Gets the sitemap URL.
2392
  *
2393
  * Has a filter for using something other than the dynamically generated one.
2394
  * Using the filter you need the full path to the custom xsl file.
2395
  *
2396
+ * @see https://semperplugins.com/documentation/aioseop_sitemap_xsl_url/
2397
+ *
2398
  * @since 2.3.6
2399
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
 
 
2400
  */
2401
  public function get_sitemap_xsl() {
2402
 
2404
  }
2405
 
2406
  /**
 
 
2407
  * Output the RSS for a sitemap, full or latest.
2408
  *
 
 
2409
  * @param $urls
2410
  * @param string $sitemap_type The type of RSS sitemap viz. rss or rss_latest.
2411
  * @param string $comment
2455
  }
2456
 
2457
  /**
 
 
2458
  * Remove elements not containing the rss element.
2459
  *
2460
  * @since 2.9
2467
  }
2468
 
2469
  /**
 
 
2470
  * Sort on the basis of modified date.
 
 
 
 
 
 
2471
  */
2472
  public function sort_modifed_date_descending( $array1, $array2 ) {
2473
  if ( ! isset( $array1['rss'] ) || ! isset( $array2['rss'] ) ) {
2477
  }
2478
 
2479
  /**
 
 
2480
  * Output the XML for a sitemap.
2481
  *
 
 
2482
  * @param $urls
2483
  * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2484
  * @param string $comment
2485
+ *
2486
  * @return null
2487
  */
2488
  private function output_sitemap( $urls, $sitemap_type, $comment = '' ) {
2500
  // TODO Add esc_* function.
2501
  echo '<!-- ' . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date( 'D, d M Y H:i:s e' ) ) . " -->\r\n";
2502
  $plugin_path = $this->plugin_path['url'];
2503
+ // TODO Change to wp_parse_url().
2504
+ $plugin_url = parse_url( $plugin_path );
2505
  $current_host = $_SERVER['HTTP_HOST'];
2506
  if ( empty( $current_host ) ) {
2507
  $current_host = $_SERVER['SERVER_NAME'];
2601
  }
2602
 
2603
  /**
 
 
2604
  * Output the XML for a sitemap index.
2605
  *
 
 
2606
  * @param $urls
2607
  * @param string $comment
2608
+ *
2609
  * @return null
2610
  */
2611
  public function output_sitemap_index( $urls, $comment = '' ) {
2648
  }
2649
 
2650
  /**
 
 
2651
  * Return an XML sitemap index as a string.
2652
  *
 
 
2653
  * @param $urls
2654
  * @param string $comment
2655
+ *
2656
  * @return string
2657
  */
2658
  public function build_sitemap_index( $urls, $comment = '' ) {
2663
  }
2664
 
2665
  /**
 
 
2666
  * Return an XML sitemap as a string.
2667
  *
 
 
2668
  * @param $urls
2669
  * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2670
  * @param string $comment
2671
+ *
2672
  * @return string
2673
  */
2674
  public function build_sitemap( $urls, $sitemap_type, $comment = '' ) {
2679
  }
2680
 
2681
  /**
 
 
2682
  * Return sitemap data for an array of terms.
2683
  *
 
 
2684
  * @param $terms
2685
+ *
2686
  * @return array
2687
  */
2688
  public function get_term_priority_data( $terms ) {
2693
  foreach ( $terms as $term ) {
2694
  $pr_info = array();
2695
  $pr_info['loc'] = $this->get_term_link( $term, $term->taxonomy );
 
2696
  if (
2697
  ( 'sel' === $this->options[ $this->prefix . 'freq_taxonomies' ] )
2698
  && isset( $this->options[ $this->prefix . 'freq_taxonomies_' . $term->taxonomy ] )
2728
  }
2729
 
2730
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2731
  * Return the date of the latest post in the given taxonomy term.
2732
  *
 
 
2733
  * @param WP_Term $term The taxonomy term.
2734
+ *
2735
  * @return string
2736
  */
2737
  private function get_date_for_term( $term ) {
2761
  }
2762
 
2763
  /**
 
 
2764
  * Return a list of permalinks for an array of terms.
2765
  *
 
 
2766
  * @param $terms
2767
+ *
2768
  * @return array
2769
  */
2770
  public function get_term_permalinks( $terms ) {
2780
  }
2781
 
2782
  /**
 
 
2783
  * Return permalinks for archives.
2784
  *
 
 
2785
  * @param $posts
2786
+ *
2787
  * @return array
2788
  */
2789
  public function get_archive_permalinks( $posts ) {
2806
  }
2807
 
2808
  /**
 
 
2809
  * Return permalinks for authors.
2810
  *
 
 
2811
  * @param $posts
2812
+ *
2813
  * @return array
2814
  */
2815
  public function get_author_permalinks( $posts ) {
2829
  }
2830
 
2831
  /**
 
 
2832
  * Return permalinks for posts.
2833
  *
 
 
2834
  * @param $posts
2835
+ *
2836
  * @return array
2837
  */
2838
  public function get_post_permalinks( $posts ) {
2849
  }
2850
 
2851
  /**
 
 
2852
  * Convert back from parse_url.
 
2853
  *
2854
+ * Props to thomas at gielfeldt dot com.
2855
  *
2856
  * @link http://www.php.net/manual/en/function.parse-url.php#106731
2857
  *
2858
  * @param $parsed_url
2859
+ *
2860
  * @return string
2861
  */
2862
  public function unparse_url( $parsed_url ) {
2877
  }
2878
 
2879
  /**
2880
+ * Gets additional pages.
 
2881
  * Return data for user entered additional pages.
2882
  *
2883
  * @since 2.3.6
2888
  public function get_addl_pages_only() {
2889
  $pages = array();
2890
  if ( ! empty( $this->options[ $this->prefix . 'addl_pages' ] ) ) {
2891
+ // TODO Change to wp_parse_url().
2892
+ $siteurl = parse_url( aioseop_home_url() );
2893
  foreach ( $this->options[ $this->prefix . 'addl_pages' ] as $k => $v ) {
2894
  $k = aiosp_common::make_url_valid_smartly( $k );
2895
+ // TODO Change to wp_parse_url().
2896
+ $url = parse_url( $k );
2897
  if ( empty( $url['host'] ) ) {
2898
  $url['host'] = $siteurl['host'];
2899
  }
2933
  }
2934
 
2935
  /**
 
 
2936
  * Return data for user entered additional pages and extra pages.
2937
  *
2938
  * @since 2.3.6
2939
  * @since 2.3.12.3 Refactored to use aioseop_home_url() for compatibility purposes.
 
2940
  *
2941
  * @return array
2942
  */
2973
  }
2974
  $pages = apply_filters( $this->prefix . 'addl_pages', $pages );
2975
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2976
  return $pages;
2977
  }
2978
 
2979
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2980
  * Return links for user entered additional pages.
2981
  *
 
 
2982
  * @return array
2983
  */
2984
  public function get_addl_page_links() {
2990
  }
2991
 
2992
  /**
 
 
2993
  * Scores posts based on date and relative comment count, if any.
2994
  *
 
 
2995
  * @param $date
2996
  * @param mixed $stats
2997
+ *
2998
  * @return array
2999
  */
3000
  public function get_prio_calc( $date, $stats ) {
3056
  }
3057
 
3058
  /**
 
 
3059
  * Generate sitemap priority data for date archives from an array of posts.
3060
  *
 
 
3061
  * @param $posts
3062
+ *
3063
  * @return array
3064
  */
3065
  public function get_date_archive_prio_from_posts( $posts ) {
3098
  }
3099
 
3100
  /**
 
 
3101
  * Generate sitemap priority data for archives from an array of posts.
3102
  *
 
 
 
3103
  * @param $posts
3104
+ *
3105
  * @return array
3106
  */
3107
  private function get_archive_prio_from_posts( $posts ) {
3110
  $posttypes = $this->options[ "{$this->prefix}posttypes" ];
3111
  }
3112
 
 
 
 
 
 
 
 
3113
  $types_supporting_archives = get_post_types(
3114
  array(
3115
  'has_archive' => true,
3125
  $types[ $p->post_type ] = $p;
3126
  }
3127
 
3128
+ $archives = array();
3129
  $types = apply_filters( "{$this->prefix}include_post_types_archives", $types );
3130
  if ( $types ) {
3131
  foreach ( $types as $post_type => $p ) {
3133
  if ( ! ( in_array( $post_type, $posttypes ) && in_array( $post_type, $types_supporting_archives ) ) ) {
3134
  continue;
3135
  }
3136
+ $archives = array_merge(
3137
+ $archives,
3138
+ $this->get_prio_from_posts(
3139
+ array( $p ),
3140
+ $this->get_default_priority( 'archive', true ),
3141
+ $this->get_default_frequency( 'archive', true ),
3142
+ array(
3143
+ $this,
3144
+ 'get_archive_link_from_post',
3145
+ )
3146
  )
3147
  );
 
 
 
 
 
 
 
 
 
3148
  }
3149
  }
3150
+ return $archives;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3151
  }
3152
 
3153
  /**
3162
  }
3163
 
3164
  /**
 
 
3165
  * Return a date archive link for a post.
3166
  *
 
 
3167
  * @param $post
3168
+ *
3169
  * @return bool|string
3170
  */
3171
  public function get_date_archive_link_from_post( $post ) {
3179
  }
3180
 
3181
  /**
 
 
3182
  * Generate sitemap priority data for authors from an array of posts.
3183
  *
 
 
3184
  * @param $posts
3185
+ *
3186
  * @return array
3187
  */
3188
  public function get_author_prio_from_posts( $posts ) {
3215
  }
3216
 
3217
  /**
 
 
3218
  * Return an author link from a post.
3219
  *
 
 
3220
  * @param $post
3221
+ *
3222
  * @return string
3223
  */
3224
  public function get_author_link_from_post( $post ) {
3226
  }
3227
 
3228
  /**
 
 
3229
  * Return comment statistics on an array of posts.
3230
  *
 
 
3231
  * @param $posts
3232
+ *
3233
  * @return array|int
3234
  */
3235
  public function get_comment_count_stats( $posts ) {
3268
  }
3269
 
3270
  /**
 
 
3271
  * Generate sitemap priority data from an array of posts.
3272
  *
 
 
3273
  * @param $posts
3274
  * @param bool $prio_override
3275
  * @param bool $freq_override
3276
  * @param string $linkfunc
3277
  * @param string $type Type of entity being fetched viz. author, post etc.
3278
+ *
3279
  * @return array
3280
  */
3281
  public function get_prio_from_posts( $posts, $prio_override = false, $freq_override = false, $linkfunc = 'get_permalink', $type = 'post' ) {
3400
  }
3401
 
3402
  /**
 
 
3403
  * Return the images attached to the term.
3404
  *
3405
+ * @param WP_Term $term the term object.
3406
+ *
3407
  * @since 2.4
3408
  * @since 3.0 remove check for WP 4.4
3409
  *
 
3410
  * @return array
3411
  */
3412
  private function get_images_from_term( $term ) {
3432
  }
3433
 
3434
  /**
 
 
3435
  * Return the images from the post.
3436
  *
3437
  * @todo Add ~`get_attachment_postid_to_url()` function.
3594
  if ( ! empty( $post_image_urls ) ) {
3595
  foreach ( $post_image_urls as $v1_image_url ) {
3596
  $rtn_image_attributes[] = array(
3597
+ 'image:loc' => $v1_image_url,
3598
  );
3599
  }
3600
  }
3607
  }
3608
 
3609
  /**
 
 
3610
  * Set Transient for Image IDs => URLs
3611
  *
3612
  * @since 2.11
3620
  }
3621
 
3622
  /**
 
 
3623
  * Fetch images from WP, Jetpack and WooCommerce galleries.
3624
  *
3625
  * @since 2.4.2
3635
 
3636
  // Check images galleries in the content. DO NOT run the_content filter here as it might cause issues with other shortcodes.
3637
  if ( has_shortcode( $post->post_content, 'gallery' ) ) {
3638
+ // Get the jetpack gallery images.
3639
+ // TODO Investigate other alternatives to retrieve ID instead. Specifically Jetpack data.
3640
  /*
 
 
3641
  * Is this even necessary? Jetpack uses many of the WP functions, some of which may already be in use.
3642
  * This is also limited to 1 source, and doesn't check other sources once a value is obtained.
3643
  *
3644
  * @link https://hayashikejinan.com/wp-content/uploads/jetpack_api/classes/Jetpack_PostImages.html
3645
  */
3646
  if ( class_exists( 'Jetpack_PostImages' ) ) {
 
3647
  $jetpack = Jetpack_PostImages::get_images( $post->ID );
3648
  if ( $jetpack ) {
3649
  foreach ( $jetpack as $jetpack_image ) {
3715
  }
3716
 
3717
  /**
 
 
3718
  * Parses the content to find out if specified images galleries exist and if they do, parse them for images.
3719
  * Supports NextGen.
3720
  *
3721
+ * @param string $content The post content.
3722
+ *
3723
  * @since 2.4.2
3724
  *
 
3725
  * @return string
3726
  */
3727
  private function get_content_from_galleries( $content ) {
3790
  }
3791
 
3792
  /**
 
 
3793
  * Cleans the URL so that its acceptable in the sitemap.
3794
  *
3795
+ * @param string $url The image url.
3796
+ *
3797
  * @since 2.4.1
3798
  *
 
3799
  * @return string
3800
  */
3801
  public function aioseop_clean_url( $url ) {
3809
  }
3810
 
3811
  /**
3812
+ * Validate the image.
3813
+ * NOTE: We will use parse_url here instead of wp_parse_url as we will correct the URLs beforehand and
3814
+ * this saves us the need to check PHP version support.
3815
  *
3816
+ * @param string $image The image src.
3817
  *
3818
  * @since 2.4.1
3819
  * @since 2.4.3 Compatibility with Pre v4.7 wp_parse_url().
3820
+ * @since 2.11 Sitemap Optimization #2008 - Changed to a more appropriate name.
3821
+ * @since 3.0 remove checks for old WP versions
 
3822
  *
 
3823
  * @return bool
3824
  */
3825
  public function is_image_url_valid( $image ) {
3828
  return false;
3829
  }
3830
 
3831
+ $component = PHP_URL_PATH;
3832
+ $url = wp_parse_url( $image, $component );
3833
+
3834
+ // Make the url absolute, if its relative.
3835
  $image = aiosp_common::absolutize_url( $image );
3836
+ // TODO Change to wp_parse_url().
3837
+ $extn = pathinfo( parse_url( $image, PHP_URL_PATH ), PATHINFO_EXTENSION );
3838
  $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions );
3839
  // Bail if image does not refer to an image file otherwise Google Search Console might reject the sitemap.
3840
  if ( ! in_array( $extn, $allowed, true ) ) {
3841
  return false;
3842
  }
3843
 
3844
+ // TODO Change to wp_parse_url().
3845
+ $image_host = parse_url( $image, PHP_URL_HOST );
3846
+ $host = parse_url( home_url(), PHP_URL_HOST );
3847
 
3848
  if ( $image_host !== $host ) {
3849
  // Allowed hosts will be provided in a wildcard format i.e. img.yahoo.* or *.akamai.*.
3865
  }
3866
 
3867
  /**
 
 
3868
  * Parse the post for images.
3869
  *
 
 
3870
  * @param string $content the post content.
3871
  * @param array $images the array of images.
3872
  */
3886
  $dom->loadHTML( $content );
3887
  libxml_clear_errors();
3888
 
 
3889
  $dom->preserveWhiteSpace = false;
3890
 
3891
  $matches = $dom->getElementsByTagName( 'img' );
3930
 
3931
  $args['taxonomy'] = $this->show_or_hide_taxonomy( $taxonomies );
3932
 
 
3933
  if ( $this->option_isset( 'excl_terms' ) ) {
3934
+ $args['exclude'] = array();
3935
  foreach ( $taxonomies as $v1_taxonomy ) {
3936
  if ( isset( $this->options[ $this->prefix . 'excl_terms' ][ $v1_taxonomy ] ) ) {
3937
  $args['exclude'] = array_merge( $args['exclude'], $this->options[ $this->prefix . 'excl_terms' ][ $v1_taxonomy ]['terms'] );
3939
  }
3940
  }
3941
 
3942
+ $args = apply_filters( $this->prefix . 'tax_args', $args, $page, $this->options );
 
 
 
 
 
 
 
 
 
 
 
 
 
3943
 
3944
  return $args;
3945
  }
3978
  }
3979
 
3980
  /**
 
 
3981
  * Return sitemap data for date archives.
3982
  *
 
 
3983
  * @return array
3984
  */
3985
  public function get_date_archive_prio_data() {
3994
  }
3995
 
3996
  /**
 
 
3997
  * Return sitemap data for authors.
3998
  *
 
 
3999
  * @return array
4000
  */
4001
  public function get_author_prio_data() {
4010
  }
4011
 
4012
  /**
 
 
4013
  * Return sitemap data for posts.
4014
  *
 
 
 
4015
  * @param string $include
4016
  * @param string $status
4017
  * @param int $page
4018
+ *
4019
  * @return array
4020
  */
4021
  public function get_all_post_priority_data( $include = 'any', $status = 'publish', $page = 0 ) {
4047
 
4048
  $links = $this->get_prio_from_posts( $posts, $this->get_default_priority( 'post', true ), $this->get_default_frequency( 'post', true ) );
4049
  $links = array_merge( $links, $this->get_archive_prio_from_posts( $posts ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4050
  return $links;
4051
  }
4052
 
4053
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4054
  * Return a list of all permalinks.
4055
  *
 
 
4056
  * @param string $include
4057
  * @param string $status
4058
+ *
4059
  * @return array
4060
  */
4061
  public function get_all_permalinks( $include = 'any', $status = 'publish' ) {
4077
  }
4078
 
4079
  /**
 
 
4080
  * Static memory cache for permalink_structure option.
4081
  *
 
 
4082
  * @param $pre
4083
+ *
4084
  * @return null
4085
  */
4086
  public function cache_structure( $pre ) {
4088
  }
4089
 
4090
  /**
 
 
4091
  * Static memory cache for home option.
4092
  *
 
 
4093
  * @param $pre
4094
+ *
4095
  * @return null
4096
  */
4097
  public function cache_home( $pre ) {
4099
  }
4100
 
4101
  /**
 
 
4102
  * Cache permalink_structure and home for repeated sitemap queries.
 
 
4103
  */
4104
  public function cache_options() {
4105
  static $start = true;
4117
  }
4118
 
4119
  /**
 
 
4120
  * Call get_term_link with caching in place.
4121
  *
 
 
4122
  * @param $term
4123
  * @param string $taxonomy
4124
+ *
4125
  * @return string|WP_Error
4126
  */
4127
  public function get_term_link( $term, $taxonomy = '' ) {
4135
  }
4136
 
4137
  /**
 
 
4138
  * Call get_permalink with caching in place.
4139
  *
 
 
4140
  * @param $post
4141
+ *
4142
  * @return false|string
4143
  */
4144
  public function get_permalink( $post ) {
4172
  }
4173
 
4174
  /**
 
 
4175
  * Return term counts using wp_count_terms().
4176
  *
 
 
4177
  * @param $args
4178
+ *
4179
  * @return array|int|mixed|null|WP_Error
4180
  */
4181
  public function get_all_term_counts( $args ) {
4202
  }
4203
 
4204
  /**
 
 
4205
  * Return post counts.
4206
  *
 
4207
  * @since 2.4.3 Refactored to use get_post_count() instead of wp_count_posts().
 
4208
  * @param $args
4209
+ *
4210
  * @return array
4211
  */
4212
  public function get_all_post_counts( $args ) {
4236
  }
4237
 
4238
  /**
 
 
4239
  * Modify the post arguments in case third-party plugins are being used e.g. WPML.
4240
  *
 
 
4241
  * @param $args
4242
  */
4243
  public function modify_post_params_for_external_plugins( &$args ) {
4250
  }
4251
 
4252
  /**
 
 
4253
  * Return post counts for the specified arguments.
4254
  *
 
 
4255
  * @param $args
4256
+ *
4257
  * @return int
4258
  */
4259
  public function get_post_count( $args ) {
4292
  }
4293
 
4294
  /**
 
 
4295
  * Return post data using get_posts().
4296
  *
4297
  * @since ?
4384
  // for example, exclude post type, but include certain posts.
4385
  // NOTE: Do NOT use this for basic including. It's best to avoid an additional query.
4386
  $args_include = array(
4387
+ 'post_type' => array(),
4388
+ 'meta_query' => array(
4389
  'relation' => 'OR',
4390
  array(
4391
  'key' => '_aioseop_noindex',
4444
  * @see get_posts()
4445
  * @link https://developer.wordpress.org/reference/functions/get_posts/
4446
  * }
4447
+ *
4448
  */
4449
  $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
4450
 
modules/aioseop_video_sitemap.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
3
  * Loads video sitemap class.
4
  *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
  */
8
 
9
  if ( AIOSEOPPRO ) {
2
  /**
3
  * Loads video sitemap class.
4
  *
5
+ * @package All-in-One-SEO-Pack
6
+ *
7
  */
8
 
9
  if ( AIOSEOPPRO ) {
public/front.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Class for public facing code
4
  *
5
- * @package All_in_One_SEO_Pack
6
  * @since 2.3.6
7
  */
8
 
@@ -17,8 +17,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
17
 
18
  /**
19
  * All_in_One_SEO_Pack_Front constructor.
20
- *
21
- * @since 2.3.6
22
  */
23
  public function __construct() {
24
 
@@ -28,34 +26,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
28
  }
29
 
30
  /**
31
- * The noindex_follow_rss() function.
32
- *
33
- * Adds "noindex,follow" as HTTP header for RSS feeds.
34
  *
35
- * @since 2.3.6
36
- * @since 3.2.0 Added noindex_rss filter hook.
37
  */
38
  public function noindex_follow_rss() {
39
  if ( is_feed() && headers_sent() === false ) {
40
- /**
41
- * The aioseop_noindex_rss filter hook.
42
- *
43
- * Filter whether RSS feeds should or shouldn't have HTTP noindex header.
44
- *
45
- * @since 3.2.0
46
- *
47
- * @param bool
48
- */
49
- $noindex = apply_filters( 'aioseop_noindex_rss', true );
50
- if ( $noindex ) {
51
- header( 'X-Robots-Tag: noindex, follow', true );
52
- }
53
  }
54
  }
55
 
56
  /**
57
- * Redirect Attachment
58
- *
59
  * Redirect attachment to parent post.
60
  *
61
  * @since 2.3.9
2
  /**
3
  * Class for public facing code
4
  *
5
+ * @package All-in-One-SEO-Pack
6
  * @since 2.3.6
7
  */
8
 
17
 
18
  /**
19
  * All_in_One_SEO_Pack_Front constructor.
 
 
20
  */
21
  public function __construct() {
22
 
26
  }
27
 
28
  /**
29
+ * Noindex and follow RSS feeds.
 
 
30
  *
31
+ * @Since 2.3.6
 
32
  */
33
  public function noindex_follow_rss() {
34
  if ( is_feed() && headers_sent() === false ) {
35
+ header( 'X-Robots-Tag: noindex, follow', true );
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
  }
38
 
39
  /**
 
 
40
  * Redirect attachment to parent post.
41
  *
42
  * @since 2.3.9
public/google-analytics.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Google Analytice
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since ?
7
- */
8
 
9
  if ( ! class_exists( 'aioseop_google_analytics' ) ) {
10
 
@@ -21,26 +15,21 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
21
  // @codingStandardsIgnoreEnd
22
 
23
  /**
24
- * TODO Rather than extending the module base class,
25
  * we should find a better way for the shared functions
26
  * like moving them to our common functions class.
27
  */
28
 
29
  /**
30
- * Constructor
31
- *
32
  * Default module constructor.
33
- *
34
- * @since 2.3.9.2
35
  */
36
  public function __construct() {
37
  $this->google_analytics();
38
  }
39
 
40
  /**
41
- * Google Analytics
42
  *
43
- * @since 2.3.9.2
44
  * @since 2.3.14 Refactored to work with autotrack.js.
45
  *
46
  * @link https://github.com/googleanalytics/autotrack
@@ -81,7 +70,7 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
81
  );
82
  ?><script async src="<?php echo $autotrack; ?>"></script>
83
  <?php
84
- // Requested indent #921.
85
  }
86
  $analytics = ob_get_clean();
87
  }
@@ -91,17 +80,13 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
91
  }
92
 
93
  /**
94
- * Universal Analytics
95
- *
96
  * Adds analytics.
97
  *
98
- * @since 2.3.9.2
99
  * @since 2.3.15 Added aioseop_ga_attributes filter hook for attributes.
100
  * @since 2.3.14 Refactored to work with autotrack.js and code optimized.
101
  *
102
  * @global array $aioseop_options All-in-on-seo saved settings/options.
103
- *
104
- * @return false|string
105
  */
106
  public function universal_analytics() {
107
  global $aioseop_options;
@@ -168,7 +153,7 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
168
  $js_options = empty( $js_options )
169
  ? ''
170
  : ', { ' . implode( ',', $js_options ) . ' } ';
171
- // Prepare analytics.
172
  $analytics_id = esc_js( $aioseop_options['aiosp_google_analytics_id'] );
173
  ob_start()
174
  ?>
@@ -189,10 +174,6 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
189
  }
190
 
191
  /**
192
- * Get Analytics Domain
193
- *
194
- * @since 2.3.9.2
195
- *
196
  * @return mixed|string
197
  */
198
  function get_analytics_domain() {
1
  <?php
 
 
 
 
 
 
2
 
3
  if ( ! class_exists( 'aioseop_google_analytics' ) ) {
4
 
15
  // @codingStandardsIgnoreEnd
16
 
17
  /**
18
+ * @todo Rather than extending the module base class,
19
  * we should find a better way for the shared functions
20
  * like moving them to our common functions class.
21
  */
22
 
23
  /**
 
 
24
  * Default module constructor.
 
 
25
  */
26
  public function __construct() {
27
  $this->google_analytics();
28
  }
29
 
30
  /**
31
+ * Inits Google Analytics.
32
  *
 
33
  * @since 2.3.14 Refactored to work with autotrack.js.
34
  *
35
  * @link https://github.com/googleanalytics/autotrack
70
  );
71
  ?><script async src="<?php echo $autotrack; ?>"></script>
72
  <?php
73
+ // Requested indent #921
74
  }
75
  $analytics = ob_get_clean();
76
  }
80
  }
81
 
82
  /**
83
+ * Handle Universal Analytics.
 
84
  * Adds analytics.
85
  *
 
86
  * @since 2.3.15 Added aioseop_ga_attributes filter hook for attributes.
87
  * @since 2.3.14 Refactored to work with autotrack.js and code optimized.
88
  *
89
  * @global array $aioseop_options All-in-on-seo saved settings/options.
 
 
90
  */
91
  public function universal_analytics() {
92
  global $aioseop_options;
153
  $js_options = empty( $js_options )
154
  ? ''
155
  : ', { ' . implode( ',', $js_options ) . ' } ';
156
+ // Prepare analytics
157
  $analytics_id = esc_js( $aioseop_options['aiosp_google_analytics_id'] );
158
  ob_start()
159
  ?>
174
  }
175
 
176
  /**
 
 
 
 
177
  * @return mixed|string
178
  */
179
  function get_analytics_domain() {
public/opengraph.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Public Opengraph
4
- *
5
- * @package All_in_One_SEO_Pack
6
- * @since 2.3.5
7
- */
8
 
9
  if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
10
 
@@ -14,22 +8,21 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
14
  * Handles the public-facing duties of opengraph things
15
  *
16
  * @since 2.3.5
 
17
  */
18
  class AIOSEOP_Opengraph_Public {
19
 
20
  /**
21
- * Prepare Twitter Username
22
- *
23
  * Prepare twitter username for public display.
24
  *
25
  * We do things like strip out the URL, etc and return just (at)username.
26
  * At the moment, we'll check for 1 of 3 things... (at)username, username, and https://twitter.com/username.
27
  * In the future, we'll need to start validating the information on the way in, so we don't have to do it one the way out.
28
  *
29
- * @since 2.3.5
30
- *
31
  * @param $twitter_profile
 
32
  * @return string
 
33
  */
34
  public static function prepare_twitter_username( $twitter_profile ) {
35
 
@@ -42,7 +35,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
42
  return $twitter_profile;
43
  }
44
 
45
- // check if it has twitter.com.
46
  if ( strpos( $twitter_profile, 'twitter.com' ) ) {
47
 
48
  $twitter_profile = esc_url( $twitter_profile );
@@ -57,19 +50,18 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
57
  }
58
  }
59
 
60
- // if all else fails, just send it back.
61
  return $twitter_profile;
62
 
63
  }
64
 
 
65
  /**
66
- * Twitter URL to User
67
  *
 
68
  * @since 2.3.5
69
  * @since 2.3.5.1 Bail if < WordPress 4.4 for now.
70
- *
71
- * @param $twitter_profile
72
- * @return mixed
73
  */
74
  public static function twitter_url_to_user( $twitter_profile ) {
75
 
@@ -78,7 +70,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
78
  return $twitter_profile;
79
  }
80
 
81
- // extract the twitter username from the url.
82
  $parsed_twitter_profile = wp_parse_url( $twitter_profile );
83
 
84
  $path = $parsed_twitter_profile['path'];
@@ -89,18 +81,17 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
89
 
90
  }
91
 
 
92
  /**
93
- * Validate Twitter Profile
94
- *
95
- * TODO- this claims to just validate, but it's actually validating and adding the AT symbol as needed rather than returning true/false
96
  *
 
97
  * @since 2.3.5
98
  *
99
- * @param $twitter_profile
100
- * @return string
101
  */
102
  public static function validate_twitter_profile( $twitter_profile ) {
103
- // test for valid twitter username, with or without @.
104
  if ( preg_match( '/^(\@)?[A-Za-z0-9_]+$/', $twitter_profile ) ) {
105
 
106
  $twitter_profile = self::prepend_at_symbol( $twitter_profile );
@@ -109,16 +100,15 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
109
  }
110
  }
111
 
 
112
  /**
113
- * Prepend at Symbol
114
- *
115
- * @since 2.3.5
116
- *
117
  * @param $twitter_profile
 
118
  * @return string
 
119
  */
120
  public static function prepend_at_symbol( $twitter_profile ) {
121
- // checks for @ in the beginning, if it's not there adds it.
122
  if ( '@' !== $twitter_profile[0] ) {
123
  $twitter_profile = '@' . $twitter_profile;
124
  }
1
  <?php
 
 
 
 
 
 
2
 
3
  if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
4
 
8
  * Handles the public-facing duties of opengraph things
9
  *
10
  * @since 2.3.5
11
+ *
12
  */
13
  class AIOSEOP_Opengraph_Public {
14
 
15
  /**
 
 
16
  * Prepare twitter username for public display.
17
  *
18
  * We do things like strip out the URL, etc and return just (at)username.
19
  * At the moment, we'll check for 1 of 3 things... (at)username, username, and https://twitter.com/username.
20
  * In the future, we'll need to start validating the information on the way in, so we don't have to do it one the way out.
21
  *
 
 
22
  * @param $twitter_profile
23
+ *
24
  * @return string
25
+ * @since 2.3.5
26
  */
27
  public static function prepare_twitter_username( $twitter_profile ) {
28
 
35
  return $twitter_profile;
36
  }
37
 
38
+ // check if it has twitter.com
39
  if ( strpos( $twitter_profile, 'twitter.com' ) ) {
40
 
41
  $twitter_profile = esc_url( $twitter_profile );
50
  }
51
  }
52
 
53
+ // if all else fails, just send it back
54
  return $twitter_profile;
55
 
56
  }
57
 
58
+
59
  /**
60
+ * @param $twitter_profile
61
  *
62
+ * @return mixed
63
  * @since 2.3.5
64
  * @since 2.3.5.1 Bail if < WordPress 4.4 for now.
 
 
 
65
  */
66
  public static function twitter_url_to_user( $twitter_profile ) {
67
 
70
  return $twitter_profile;
71
  }
72
 
73
+ // extract the twitter username from the url
74
  $parsed_twitter_profile = wp_parse_url( $twitter_profile );
75
 
76
  $path = $parsed_twitter_profile['path'];
81
 
82
  }
83
 
84
+
85
  /**
86
+ * @param $twitter_profile
 
 
87
  *
88
+ * @return string
89
  * @since 2.3.5
90
  *
91
+ * TODO- this claims to just validate, but it's actually validating and adding the AT symbol as needed rather than returning true/false
 
92
  */
93
  public static function validate_twitter_profile( $twitter_profile ) {
94
+ // test for valid twitter username, with or without @
95
  if ( preg_match( '/^(\@)?[A-Za-z0-9_]+$/', $twitter_profile ) ) {
96
 
97
  $twitter_profile = self::prepend_at_symbol( $twitter_profile );
100
  }
101
  }
102
 
103
+
104
  /**
 
 
 
 
105
  * @param $twitter_profile
106
+ *
107
  * @return string
108
+ * @since 2.3.5
109
  */
110
  public static function prepend_at_symbol( $twitter_profile ) {
111
+ // checks for @ in the beginning, if it's not there adds it
112
  if ( '@' !== $twitter_profile[0] ) {
113
  $twitter_profile = '@' . $twitter_profile;
114
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hallsofmontezuma, semperplugins, wpsmort, arnaudbroes
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
- Stable tag: 3.2.1
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
@@ -25,7 +25,6 @@ First created in 2007, see why AIOSEO is one of the all time most downloaded plu
25
  * Image XML Sitemap submitted to Google and Bing to improve your Image SEO
26
  * Google AMP support (Accelerated Mobile Pages)
27
  * Google Analytics support
28
- * Schema.org Markup
29
  * Support for SEO on Custom Post Types
30
  * Advanced Canonical URLs
31
  * Redirect attachment pages to parent post
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
+ Stable tag: 3.0.4
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
25
  * Image XML Sitemap submitted to Google and Bing to improve your Image SEO
26
  * Google AMP support (Accelerated Mobile Pages)
27
  * Google Analytics support
 
28
  * Support for SEO on Custom Post Types
29
  * Advanced Canonical URLs
30
  * Redirect attachment pages to parent post