Version Description
(18/02/2021) = * INFO Add "View my RSS feed" button to SEO, PRO, RSS tab * INFO Improve performance for video xml sitemap * FIX Help tabs missing * FIX Content analysis compatibility for Oxygen Page Builder * FIX Variable products for automatic schema * FIX Product currency property for automatic product schema * FIX Ecommerce tracking on purchases * FIX PHP Fatal error: Uncaught Error: Call to a member function is_type()
Download this release
Release Info
Developer | rainbowgeek |
Plugin | ![]() |
Version | 4.4.0.4 |
Comparing to | |
See all releases |
Code changes from version 4.4.0.3 to 4.4.0.4
- inc/admin/admin-header.php +87 -86
- inc/admin/admin.php +175 -168
- inc/admin/ajax.php +4 -1
- inc/functions/options-google-ecommerce.php +75 -73
- inc/functions/sitemap/template-xml-sitemaps.php +442 -415
- readme.txt +11 -2
- seopress.php +2 -2
- src/ManualHooks/Thirds/WooCommerce/WooCommerceAnalytics.php +0 -4
- src/Thirds/WooCommerce/WooCommerceAnalyticsService.php +0 -88
- vendor/composer/InstalledVersions.php +2 -2
- vendor/composer/installed.php +2 -2
inc/admin/admin-header.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
defined(
|
4 |
|
5 |
function seopress_admin_header() { ?>
|
6 |
<div class="wrap"><h2><!--// hack to get WP notice at the correct place //--></h2></div>
|
@@ -13,23 +13,23 @@ function seopress_admin_header() { ?>
|
|
13 |
</style>
|
14 |
<?php } ?>
|
15 |
<h1>
|
16 |
-
<a href="<?php echo admin_url(
|
17 |
-
<span class="screen-reader-text"><?php _e(
|
18 |
-
<?php if (
|
19 |
<span class="seopress-info-version">
|
20 |
<?php if (defined('SEOPRESS_WL_ADMIN_HEADER_INFO') && SEOPRESS_WL_ADMIN_HEADER_INFO !== '') { ?>
|
21 |
<?php echo SEOPRESS_WL_ADMIN_HEADER_INFO; ?>
|
22 |
<?php } else { ?>
|
23 |
<strong>
|
24 |
-
<?php if (
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
</strong>
|
34 |
<?php } ?>
|
35 |
</span>
|
@@ -40,203 +40,204 @@ function seopress_admin_header() { ?>
|
|
40 |
<div class="seopress-quick-access">
|
41 |
<ul>
|
42 |
<li>
|
43 |
-
<a href="<?php echo admin_url(
|
44 |
<span class="dashicons dashicons-editor-table"></span>
|
45 |
-
<?php _e(
|
46 |
</a>
|
47 |
</li>
|
48 |
<li>
|
49 |
-
<a href="<?php echo admin_url(
|
50 |
<span class="dashicons dashicons-media-spreadsheet"></span>
|
51 |
-
<?php _e(
|
52 |
</a>
|
53 |
</li>
|
54 |
<li>
|
55 |
-
<a href="<?php echo admin_url(
|
56 |
<span class="dashicons dashicons-share"></span>
|
57 |
-
<?php _e(
|
58 |
</a>
|
59 |
</li>
|
60 |
<li>
|
61 |
-
<a href="<?php echo admin_url(
|
62 |
<span class="dashicons dashicons-chart-area"></span>
|
63 |
-
<?php _e(
|
64 |
</a>
|
65 |
</li>
|
66 |
<li>
|
67 |
-
<a href="<?php echo admin_url(
|
68 |
<span class="dashicons dashicons-admin-tools"></span>
|
69 |
-
<?php _e(
|
70 |
</a>
|
71 |
</li>
|
72 |
-
<?php include_once
|
73 |
-
|
74 |
<li>
|
75 |
-
<a href="<?php echo admin_url(
|
76 |
<span class="dashicons dashicons-chart-line"></span>
|
77 |
-
<?php _e(
|
78 |
</a>
|
79 |
</li>
|
80 |
<?php
|
81 |
-
|
82 |
-
|
83 |
<li>
|
84 |
-
<a href="<?php echo admin_url(
|
85 |
<span class="dashicons dashicons-cart"></span>
|
86 |
-
<?php _e(
|
87 |
</a>
|
88 |
</li>
|
89 |
<li>
|
90 |
-
<a href="<?php echo admin_url(
|
91 |
<span class="dashicons dashicons-cart"></span>
|
92 |
-
<?php _e(
|
93 |
</a>
|
94 |
</li>
|
95 |
<li>
|
96 |
-
<a href="<?php echo admin_url(
|
97 |
<span class="dashicons dashicons-store"></span>
|
98 |
-
<?php _e(
|
99 |
</a>
|
100 |
</li>
|
101 |
<li>
|
102 |
-
<a href="<?php echo admin_url(
|
103 |
<span class="dashicons dashicons-welcome-learn-more"></span>
|
104 |
-
<?php _e(
|
105 |
</a>
|
106 |
</li>
|
107 |
<li>
|
108 |
-
<a href="<?php echo admin_url(
|
109 |
<span class="dashicons dashicons-media-spreadsheet"></span>
|
110 |
-
<?php _e(
|
111 |
</a>
|
112 |
</li>
|
113 |
<li>
|
114 |
-
<a href="<?php echo admin_url(
|
115 |
<span class="dashicons dashicons-feedback"></span>
|
116 |
-
<?php _e(
|
117 |
</a>
|
118 |
</li>
|
119 |
<li>
|
120 |
-
<a href="<?php echo admin_url(
|
121 |
<span class="dashicons dashicons-performance"></span>
|
122 |
-
<?php _e(
|
123 |
</a>
|
124 |
</li>
|
125 |
-
<?php if (!is_multisite() || (is_multisite() && defined('SUBDOMAIN_INSTALL') && constant('SUBDOMAIN_INSTALL')
|
126 |
<li>
|
127 |
-
<a href="<?php echo admin_url(
|
128 |
<span class="dashicons dashicons-media-text"></span>
|
129 |
-
<?php _e(
|
130 |
</a>
|
131 |
</li>
|
132 |
<?php } ?>
|
133 |
<li>
|
134 |
-
<a href="<?php echo admin_url(
|
135 |
<span class="dashicons dashicons-admin-post"></span>
|
136 |
-
<?php _e(
|
137 |
</a>
|
138 |
</li>
|
139 |
<li>
|
140 |
-
<a href="<?php echo admin_url(
|
141 |
<span class="dashicons dashicons-admin-links"></span>
|
142 |
-
<?php _e(
|
143 |
</a>
|
144 |
</li>
|
145 |
<li>
|
146 |
-
<a href="<?php echo admin_url(
|
147 |
<span class="dashicons dashicons-admin-generic"></span>
|
148 |
-
<?php _e(
|
149 |
</a>
|
150 |
</li>
|
151 |
<li>
|
152 |
-
<a href="<?php echo admin_url(
|
153 |
<span class="dashicons dashicons-admin-links"></span>
|
154 |
-
<?php _e(
|
155 |
</a>
|
156 |
</li>
|
157 |
-
<?php if (!is_multisite()) { ?>
|
158 |
<li>
|
159 |
-
<a href="<?php echo admin_url(
|
160 |
<span class="dashicons dashicons-tag"></span>
|
161 |
-
<?php _e(
|
162 |
</a>
|
163 |
</li>
|
164 |
<li>
|
165 |
-
<a href="<?php echo admin_url(
|
166 |
<span class="dashicons dashicons-media-text"></span>
|
167 |
-
<?php _e(
|
168 |
</a>
|
169 |
</li>
|
170 |
<?php } ?>
|
171 |
<li>
|
172 |
-
<a href="<?php echo admin_url(
|
173 |
<span class="dashicons dashicons-rss"></span>
|
174 |
-
<?php _e(
|
175 |
</a>
|
176 |
</li>
|
177 |
<li>
|
178 |
-
<a href="<?php echo admin_url(
|
179 |
<span class="dashicons dashicons-admin-network"></span>
|
180 |
-
<?php _e(
|
181 |
</a>
|
182 |
</li>
|
183 |
<?php } ?>
|
184 |
<li>
|
185 |
-
<a href="<?php echo admin_url(
|
186 |
<span class="dashicons dashicons-admin-settings"></span>
|
187 |
-
<?php _e(
|
188 |
</a>
|
189 |
</li>
|
190 |
</ul>
|
191 |
</div>
|
192 |
</h1>
|
193 |
<?php
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
<div id="seopress-notice">
|
208 |
<div class="small">
|
209 |
<a href="<?php echo $seopress_docs_link['changelog']; ?>" target="_blank">
|
210 |
<div class="dashicons dashicons-media-text"></div>
|
211 |
-
<div class="tooltip"><?php _e('See the changelog','wp-seopress'); ?></div>
|
212 |
</a>
|
213 |
<a href="mailto:contact@seopress.org" target="_blank">
|
214 |
<div class="dashicons dashicons-megaphone"></div>
|
215 |
-
<div class="tooltip"><?php _e('Send feedback','wp-seopress'); ?></div>
|
216 |
</a>
|
217 |
<a href="https://www.facebook.com/groups/seopress/" target="_blank">
|
218 |
<div class="dashicons dashicons-facebook"></div>
|
219 |
-
<div class="tooltip"><?php _e('Join our Facebook Community group','wp-seopress'); ?></div>
|
220 |
</a>
|
221 |
<a href="https://twitter.com/wp_seopress" target="_blank">
|
222 |
<div class="dashicons dashicons-twitter"></div>
|
223 |
-
<div class="tooltip"><?php _e('Follow us on Twitter','wp-seopress'); ?></div>
|
224 |
</a>
|
225 |
<a href="https://www.youtube.com/SEOPress" target="_blank">
|
226 |
<div class="dashicons dashicons-video-alt3"></div>
|
227 |
-
<div class="tooltip"><?php _e('Follow us on YouTube','wp-seopress'); ?></div>
|
228 |
</a>
|
229 |
<a href="<?php echo $seopress_docs_link['website']; ?>" target="_blank">
|
230 |
<div class="dashicons dashicons-info"></div>
|
231 |
-
<div class="tooltip"><?php _e('Official website','wp-seopress'); ?></div>
|
232 |
</a>
|
233 |
<a href="<?php echo $seopress_docs_link['support']; ?>" target="_blank">
|
234 |
<div class="dashicons dashicons-editor-help"></div>
|
235 |
-
<div class="tooltip"><?php _e('Support','wp-seopress'); ?></div>
|
236 |
</a>
|
237 |
</div>
|
238 |
</div>
|
239 |
-
<?php
|
|
|
240 |
</div>
|
241 |
</div>
|
242 |
</div>
|
1 |
<?php
|
2 |
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
function seopress_admin_header() { ?>
|
6 |
<div class="wrap"><h2><!--// hack to get WP notice at the correct place //--></h2></div>
|
13 |
</style>
|
14 |
<?php } ?>
|
15 |
<h1>
|
16 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-option'); ?>">
|
17 |
+
<span class="screen-reader-text"><?php _e('SEOPress', 'wp-seopress'); ?></span>
|
18 |
+
<?php if (is_plugin_active('wp-seopress-pro/seopress-pro.php') || is_plugin_active('wp-seopress-insights/seopress-insights.php')) { ?>
|
19 |
<span class="seopress-info-version">
|
20 |
<?php if (defined('SEOPRESS_WL_ADMIN_HEADER_INFO') && SEOPRESS_WL_ADMIN_HEADER_INFO !== '') { ?>
|
21 |
<?php echo SEOPRESS_WL_ADMIN_HEADER_INFO; ?>
|
22 |
<?php } else { ?>
|
23 |
<strong>
|
24 |
+
<?php if (is_plugin_active('wp-seopress-insights/seopress-insights.php')) {
|
25 |
+
_e('Insights', 'wp-seopress');
|
26 |
+
}
|
27 |
+
if (is_plugin_active('wp-seopress-insights/seopress-insights.php') && is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
28 |
+
echo ' + ';
|
29 |
+
}
|
30 |
+
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) {
|
31 |
+
_e('PRO', 'wp-seopress');
|
32 |
+
} ?>
|
33 |
</strong>
|
34 |
<?php } ?>
|
35 |
</span>
|
40 |
<div class="seopress-quick-access">
|
41 |
<ul>
|
42 |
<li>
|
43 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-titles'); ?>">
|
44 |
<span class="dashicons dashicons-editor-table"></span>
|
45 |
+
<?php _e('Titles & Metas', 'wp-seopress'); ?>
|
46 |
</a>
|
47 |
</li>
|
48 |
<li>
|
49 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-xml-sitemap'); ?>">
|
50 |
<span class="dashicons dashicons-media-spreadsheet"></span>
|
51 |
+
<?php _e('XML / HTML Sitemap', 'wp-seopress'); ?>
|
52 |
</a>
|
53 |
</li>
|
54 |
<li>
|
55 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-social'); ?>">
|
56 |
<span class="dashicons dashicons-share"></span>
|
57 |
+
<?php _e('Social Networks', 'wp-seopress'); ?>
|
58 |
</a>
|
59 |
</li>
|
60 |
<li>
|
61 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-google-analytics'); ?>">
|
62 |
<span class="dashicons dashicons-chart-area"></span>
|
63 |
+
<?php _e('Analytics', 'wp-seopress'); ?>
|
64 |
</a>
|
65 |
</li>
|
66 |
<li>
|
67 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-advanced'); ?>">
|
68 |
<span class="dashicons dashicons-admin-tools"></span>
|
69 |
+
<?php _e('Advanced', 'wp-seopress'); ?>
|
70 |
</a>
|
71 |
</li>
|
72 |
+
<?php include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
73 |
+
if (is_plugin_active('wp-seopress-insights/seopress-insights.php')) { ?>
|
74 |
<li>
|
75 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-insights'); ?>">
|
76 |
<span class="dashicons dashicons-chart-line"></span>
|
77 |
+
<?php _e('Insights', 'wp-seopress'); ?>
|
78 |
</a>
|
79 |
</li>
|
80 |
<?php
|
81 |
+
}
|
82 |
+
if (is_plugin_active('wp-seopress-pro/seopress-pro.php')) { ?>
|
83 |
<li>
|
84 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_woocommerce'); ?>">
|
85 |
<span class="dashicons dashicons-cart"></span>
|
86 |
+
<?php _e('WooCommerce', 'wp-seopress'); ?>
|
87 |
</a>
|
88 |
</li>
|
89 |
<li>
|
90 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_edd'); ?>">
|
91 |
<span class="dashicons dashicons-cart"></span>
|
92 |
+
<?php _e('Easy Digital Downloads', 'wp-seopress'); ?>
|
93 |
</a>
|
94 |
</li>
|
95 |
<li>
|
96 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_local_business'); ?>">
|
97 |
<span class="dashicons dashicons-store"></span>
|
98 |
+
<?php _e('Local Business', 'wp-seopress'); ?>
|
99 |
</a>
|
100 |
</li>
|
101 |
<li>
|
102 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_dublin_core'); ?>">
|
103 |
<span class="dashicons dashicons-welcome-learn-more"></span>
|
104 |
+
<?php _e('Dublin Core', 'wp-seopress'); ?>
|
105 |
</a>
|
106 |
</li>
|
107 |
<li>
|
108 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_rich_snippets'); ?>">
|
109 |
<span class="dashicons dashicons-media-spreadsheet"></span>
|
110 |
+
<?php _e('Structured Data Types (schema.org)', 'wp-seopress'); ?>
|
111 |
</a>
|
112 |
</li>
|
113 |
<li>
|
114 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_breadcrumbs'); ?>">
|
115 |
<span class="dashicons dashicons-feedback"></span>
|
116 |
+
<?php _e('Breadcrumbs', 'wp-seopress'); ?>
|
117 |
</a>
|
118 |
</li>
|
119 |
<li>
|
120 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_page_speed'); ?>">
|
121 |
<span class="dashicons dashicons-performance"></span>
|
122 |
+
<?php _e('Google Page Speed', 'wp-seopress'); ?>
|
123 |
</a>
|
124 |
</li>
|
125 |
+
<?php if ( ! is_multisite() || (is_multisite() && defined('SUBDOMAIN_INSTALL') && true === constant('SUBDOMAIN_INSTALL'))) { //subdomains or single site ?>
|
126 |
<li>
|
127 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_robots'); ?>">
|
128 |
<span class="dashicons dashicons-media-text"></span>
|
129 |
+
<?php _e('robots.txt', 'wp-seopress'); ?>
|
130 |
</a>
|
131 |
</li>
|
132 |
<?php } ?>
|
133 |
<li>
|
134 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_news'); ?>">
|
135 |
<span class="dashicons dashicons-admin-post"></span>
|
136 |
+
<?php _e('Google News Sitemap', 'wp-seopress'); ?>
|
137 |
</a>
|
138 |
</li>
|
139 |
<li>
|
140 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_404'); ?>">
|
141 |
<span class="dashicons dashicons-admin-links"></span>
|
142 |
+
<?php _e('Redirections', 'wp-seopress'); ?>
|
143 |
</a>
|
144 |
</li>
|
145 |
<li>
|
146 |
+
<a href="<?php echo admin_url('edit.php?post_type=seopress_bot'); ?>">
|
147 |
<span class="dashicons dashicons-admin-generic"></span>
|
148 |
+
<?php _e('Broken links', 'wp-seopress'); ?>
|
149 |
</a>
|
150 |
</li>
|
151 |
<li>
|
152 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_rewrite'); ?>">
|
153 |
<span class="dashicons dashicons-admin-links"></span>
|
154 |
+
<?php _e('URL Rewriting', 'wp-seopress'); ?>
|
155 |
</a>
|
156 |
</li>
|
157 |
+
<?php if ( ! is_multisite()) { ?>
|
158 |
<li>
|
159 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_white_label'); ?>">
|
160 |
<span class="dashicons dashicons-tag"></span>
|
161 |
+
<?php _e('White Label', 'wp-seopress'); ?>
|
162 |
</a>
|
163 |
</li>
|
164 |
<li>
|
165 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_htaccess'); ?>">
|
166 |
<span class="dashicons dashicons-media-text"></span>
|
167 |
+
<?php _e('.htaccess', 'wp-seopress'); ?>
|
168 |
</a>
|
169 |
</li>
|
170 |
<?php } ?>
|
171 |
<li>
|
172 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-pro-page#tab=tab_seopress_rss'); ?>">
|
173 |
<span class="dashicons dashicons-rss"></span>
|
174 |
+
<?php _e('RSS', 'wp-seopress'); ?>
|
175 |
</a>
|
176 |
</li>
|
177 |
<li>
|
178 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-license'); ?>">
|
179 |
<span class="dashicons dashicons-admin-network"></span>
|
180 |
+
<?php _e('License', 'wp-seopress'); ?>
|
181 |
</a>
|
182 |
</li>
|
183 |
<?php } ?>
|
184 |
<li>
|
185 |
+
<a href="<?php echo admin_url('admin.php?page=seopress-import-export'); ?>">
|
186 |
<span class="dashicons dashicons-admin-settings"></span>
|
187 |
+
<?php _e('Tools', 'wp-seopress'); ?>
|
188 |
</a>
|
189 |
</li>
|
190 |
</ul>
|
191 |
</div>
|
192 |
</h1>
|
193 |
<?php
|
194 |
+
|
195 |
+
if (defined('SEOPRESS_WL_ICONS_HEADER') && SEOPRESS_WL_ICONS_HEADER === false) {
|
196 |
+
//do nothing
|
197 |
+
} else {
|
198 |
+
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
199 |
+
$seopress_docs_link['changelog'] = 'https://www.seopress.org/fr/journal-modifications/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
200 |
+
$seopress_docs_link['website'] = 'https://www.seopress.org/fr/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
201 |
+
$seopress_docs_link['support'] = 'https://www.seopress.org/fr/support/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
202 |
+
} else {
|
203 |
+
$seopress_docs_link['changelog'] = 'https://www.seopress.org/changelog/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
204 |
+
$seopress_docs_link['website'] = 'https://www.seopress.org/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
205 |
+
$seopress_docs_link['support'] = 'https://www.seopress.org/support/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=seopress';
|
206 |
+
} ?>
|
207 |
<div id="seopress-notice">
|
208 |
<div class="small">
|
209 |
<a href="<?php echo $seopress_docs_link['changelog']; ?>" target="_blank">
|
210 |
<div class="dashicons dashicons-media-text"></div>
|
211 |
+
<div class="tooltip"><?php _e('See the changelog', 'wp-seopress'); ?></div>
|
212 |
</a>
|
213 |
<a href="mailto:contact@seopress.org" target="_blank">
|
214 |
<div class="dashicons dashicons-megaphone"></div>
|
215 |
+
<div class="tooltip"><?php _e('Send feedback', 'wp-seopress'); ?></div>
|
216 |
</a>
|
217 |
<a href="https://www.facebook.com/groups/seopress/" target="_blank">
|
218 |
<div class="dashicons dashicons-facebook"></div>
|
219 |
+
<div class="tooltip"><?php _e('Join our Facebook Community group', 'wp-seopress'); ?></div>
|
220 |
</a>
|
221 |
<a href="https://twitter.com/wp_seopress" target="_blank">
|
222 |
<div class="dashicons dashicons-twitter"></div>
|
223 |
+
<div class="tooltip"><?php _e('Follow us on Twitter', 'wp-seopress'); ?></div>
|
224 |
</a>
|
225 |
<a href="https://www.youtube.com/SEOPress" target="_blank">
|
226 |
<div class="dashicons dashicons-video-alt3"></div>
|
227 |
+
<div class="tooltip"><?php _e('Follow us on YouTube', 'wp-seopress'); ?></div>
|
228 |
</a>
|
229 |
<a href="<?php echo $seopress_docs_link['website']; ?>" target="_blank">
|
230 |
<div class="dashicons dashicons-info"></div>
|
231 |
+
<div class="tooltip"><?php _e('Official website', 'wp-seopress'); ?></div>
|
232 |
</a>
|
233 |
<a href="<?php echo $seopress_docs_link['support']; ?>" target="_blank">
|
234 |
<div class="dashicons dashicons-editor-help"></div>
|
235 |
+
<div class="tooltip"><?php _e('Support', 'wp-seopress'); ?></div>
|
236 |
</a>
|
237 |
</div>
|
238 |
</div>
|
239 |
+
<?php
|
240 |
+
} ?>
|
241 |
</div>
|
242 |
</div>
|
243 |
</div>
|
inc/admin/admin.php
CHANGED
@@ -41,180 +41,187 @@ class seopress_options {
|
|
41 |
add_submenu_page('seopress-option', __('Advanced', 'wp-seopress'), __('Advanced', 'wp-seopress'), seopress_capability('manage_options', 'menu'), 'seopress-advanced', [$this, 'seopress_advanced_page']);
|
42 |
add_submenu_page('seopress-option', __('Tools', 'wp-seopress'), __('Tools', 'wp-seopress'), seopress_capability('manage_options', 'menu'), 'seopress-import-export', [$this, 'seopress_import_export_page']);
|
43 |
|
44 |
-
if (function_exists('
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
<ul>
|
50 |
-
<li><span>' . __('%%sep%%', 'wp-seopress') . '</span>' . __('Separator (eg: - )', 'wp-seopress') . '</li>
|
51 |
-
<li><span>' . __('%%sitetitle%% (alias: %%sitename%%)', 'wp-seopress') . '</span>' . __('Site Title', 'wp-seopress') . '</li>
|
52 |
-
<li><span>' . __('%%tagline%% (alias %%sitedesc%%)', 'wp-seopress') . '</span>' . __('Tagline', 'wp-seopress') . '</li>
|
53 |
-
<li><span>' . __('%%post_title%% (alias %%title%%)', 'wp-seopress') . '</span>' . __('Post Title (post, page, custom post type)', 'wp-seopress') . '</li>
|
54 |
-
<li><span>' . __('%%post_excerpt%% (alias %%excerpt%%)', 'wp-seopress') . '</span>' . __('Post excerpt', 'wp-seopress') . '</li>
|
55 |
-
<li><span>' . __('%%post_content%%', 'wp-seopress') . '</span>' . __('Post content / product long description', 'wp-seopress') . '</li>
|
56 |
-
<li><span>' . __('%%post_thumbnail_url%%', 'wp-seopress') . '</span>' . __('Post thumbnail URL', 'wp-seopress') . '</li>
|
57 |
-
<li><span>' . __('%%post_url%%', 'wp-seopress') . '</span>' . __('Post URL (permalink)', 'wp-seopress') . '</li>
|
58 |
-
<li><span>' . __('%%post_date%% (alias %%date%%)', 'wp-seopress') . '</span>' . __('Post date', 'wp-seopress') . '</li>
|
59 |
-
<li><span>' . __('%%post_modified_date%%', 'wp-seopress') . '</span>' . __('Last modified post date', 'wp-seopress') . '</li>
|
60 |
-
<li><span>' . __('%%post_author%%', 'wp-seopress') . '</span>' . __('Post author', 'wp-seopress') . '</li>
|
61 |
-
<li><span>' . __('%%post_category%%', 'wp-seopress') . '</span>' . __('Post category', 'wp-seopress') . '</li>
|
62 |
-
<li><span>' . __('%%post_tag%%', 'wp-seopress') . '</span>' . __('Post tag', 'wp-seopress') . '</li>
|
63 |
-
<li><span>' . __('%%_category_title%%', 'wp-seopress') . '</span>' . __('Category title', 'wp-seopress') . '</li>
|
64 |
-
<li><span>' . __('%%_category_description%%', 'wp-seopress') . '</span>' . __('Category description', 'wp-seopress') . '</li>
|
65 |
-
<li><span>' . __('%%tag_title%%', 'wp-seopress') . '</span>' . __('Tag title', 'wp-seopress') . '</li>
|
66 |
-
<li><span>' . __('%%tag_description%%', 'wp-seopress') . '</span>' . __('Tag description', 'wp-seopress') . '</li>
|
67 |
-
<li><span>' . __('%%term_title%%', 'wp-seopress') . '</span>' . __('Term title', 'wp-seopress') . '</li>
|
68 |
-
<li><span>' . __('%%term_description%%', 'wp-seopress') . '</span>' . __('Term description', 'wp-seopress') . '</li>
|
69 |
-
<li><span>' . __('%%search_keywords%%', 'wp-seopress') . '</span>' . __('Search keywords', 'wp-seopress') . '</li>
|
70 |
-
<li><span>' . __('%%current_pagination%%', 'wp-seopress') . '</span>' . __('Current number page', 'wp-seopress') . '</li>
|
71 |
-
<li><span>' . __('%%page%%', 'wp-seopress') . '</span>' . __('Current page number with context (i.e. page 1 of 3)', 'wp-seopress') . '</li>
|
72 |
-
<li><span>' . __('%%cpt_plural%%', 'wp-seopress') . '</span>' . __('Plural Post Type Archive name', 'wp-seopress') . '</li>
|
73 |
-
<li><span>' . __('%%archive_title%%', 'wp-seopress') . '</span>' . __('Archive title', 'wp-seopress') . '</li>
|
74 |
-
<li><span>' . __('%%archive_date%%', 'wp-seopress') . '</span>' . __('Date Archive', 'wp-seopress') . '</li>
|
75 |
-
<li><span>' . __('%%archive_date_day%%', 'wp-seopress') . '</span>' . __('Day Archive date', 'wp-seopress') . '</li>
|
76 |
-
<li><span>' . __('%%archive_date_month%%', 'wp-seopress') . '</span>' . __('Month Archive title', 'wp-seopress') . '</li>
|
77 |
-
<li><span>' . __('%%archive_date_year%%', 'wp-seopress') . '</span>' . __('Year Archive title', 'wp-seopress') . '</li>
|
78 |
-
<li><span>' . __('%%_cf_your_custom_field_name%%', 'wp-seopress') . '</span>' . __('Custom fields from post, page or post type (replace <span style="color:red;margin:0">your_custom_field_name</span> with your custom field name)', 'wp-seopress') . '</li>
|
79 |
-
<li><span>' . __('%%_ct_your_custom_taxonomy_slug%%', 'wp-seopress') . '</span>' . __('Custom term taxonomy from post, page or post type (replace <span style="color:red;margin:0">your_custom_taxonomy_slug</span> with your custom taxonomy slug)', 'wp-seopress') . '</li>
|
80 |
-
<li><span>' . __('%%wc_single_cat%%', 'wp-seopress') . '</span>' . __('Single product category', 'wp-seopress') . '</li>
|
81 |
-
<li><span>' . __('%%wc_single_tag%%', 'wp-seopress') . '</span>' . __('Single product tag', 'wp-seopress') . '</li>
|
82 |
-
<li><span>' . __('%%wc_single_short_desc%%', 'wp-seopress') . '</span>' . __('Single product short description', 'wp-seopress') . '</li>
|
83 |
-
<li><span>' . __('%%wc_single_price%%', 'wp-seopress') . '</span>' . __('Single product price', 'wp-seopress') . '</li>
|
84 |
-
<li><span>' . __('%%wc_single_price_exc_tax%%', 'wp-seopress') . '</span>' . __('Single product price taxes excluded', 'wp-seopress') . '</li>
|
85 |
-
<li><span>' . __('%%wc_sku%%', 'wp-seopress') . '</span>' . __('Single SKU product', 'wp-seopress') . '</li>
|
86 |
-
<li><span>' . __('%%currentday%%', 'wp-seopress') . '</span>' . __('Current day', 'wp-seopress') . '</li>
|
87 |
-
<li><span>' . __('%%currentmonth%%', 'wp-seopress') . '</span>' . __('Current month', 'wp-seopress') . '</li>
|
88 |
-
<li><span>' . __('%%currentmonth_short%%', 'wp-seopress') . '</span>' . __('Current month in 3 letters, eg: "Jan" for "January"', 'wp-seopress') . '</li>
|
89 |
-
<li><span>' . __('%%currentyear%%', 'wp-seopress') . '</span>' . __('Current year', 'wp-seopress') . '</li>
|
90 |
-
<li><span>' . __('%%currentdate%%', 'wp-seopress') . '</span>' . __('Current date', 'wp-seopress') . '</li>
|
91 |
-
<li><span>' . __('%%currenttime%%', 'wp-seopress') . '</span>' . __('Current time', 'wp-seopress') . '</li>
|
92 |
-
<li><span>' . __('%%author_bio%%', 'wp-seopress') . '</span>' . __('Author biography (description), meta desc only', 'wp-seopress') . '</li>
|
93 |
-
<li><span>' . __('%%currentmonth_num%%', 'wp-seopress') . '</span>' . __('Current month in digital format', 'wp-seopress') . '</li>
|
94 |
-
</ul>
|
95 |
-
' . wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
96 |
-
|
97 |
-
$seopress_titles_help_robots_tab_content = wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
98 |
-
|
99 |
-
$screen->add_help_tab([
|
100 |
-
'id' => 'seopress_titles_help_tab',
|
101 |
-
'title' => __('Templates variables', 'wp-seopress'),
|
102 |
-
'content' => $seopress_titles_help_tab_content,
|
103 |
-
]);
|
104 |
-
|
105 |
-
$screen->add_help_tab([
|
106 |
-
'id' => 'seopress_titles_help_robots_tab',
|
107 |
-
'title' => __('Edit your meta robots', 'wp-seopress'),
|
108 |
-
'content' => $seopress_titles_help_robots_tab_content,
|
109 |
-
]);
|
110 |
-
|
111 |
-
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
112 |
-
$screen->set_help_sidebar(
|
113 |
-
'<ul>
|
114 |
-
<li><a href="https://www.seopress.org/fr/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Browse our guides', 'wp-seopress') . '</a></li>
|
115 |
-
<li><a href="https://www.seopress.org/fr/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our FAQ', 'wp-seopress') . '</a></li>
|
116 |
-
<li><a href="https://www.seopress.org/fr/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Check our website', 'wp-seopress') . '</a></li>
|
117 |
-
</ul>'
|
118 |
-
);
|
119 |
-
} else {
|
120 |
-
$screen->set_help_sidebar(
|
121 |
-
'<ul>
|
122 |
-
<li><a href="https://www.seopress.org/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Browse our guides', 'wp-seopress') . '</a></li>
|
123 |
-
<li><a href="https://www.seopress.org/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our FAQ', 'wp-seopress') . '</a></li>
|
124 |
-
<li><a href="https://www.seopress.org/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Check our website', 'wp-seopress') . '</a></li>
|
125 |
-
</ul>'
|
126 |
-
);
|
127 |
}
|
128 |
}
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
'
|
140 |
-
'
|
141 |
-
'content'
|
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 |
-
add_action('load-' . $seopress_google_analytics_help_tab, 'seopress_google_analytics_help_tab');
|
217 |
}
|
|
|
218 |
}
|
219 |
|
220 |
public function seopress_titles_page() {
|
41 |
add_submenu_page('seopress-option', __('Advanced', 'wp-seopress'), __('Advanced', 'wp-seopress'), seopress_capability('manage_options', 'menu'), 'seopress-advanced', [$this, 'seopress_advanced_page']);
|
42 |
add_submenu_page('seopress-option', __('Tools', 'wp-seopress'), __('Tools', 'wp-seopress'), seopress_capability('manage_options', 'menu'), 'seopress-import-export', [$this, 'seopress_import_export_page']);
|
43 |
|
44 |
+
if (function_exists('seopress_get_toggle_white_label_option')) {
|
45 |
+
$white_label_toggle = seopress_get_toggle_white_label_option();
|
46 |
+
if ('1' === $white_label_toggle) {
|
47 |
+
if ('1' === seopress_white_label_help_links_option()) {
|
48 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
}
|
51 |
+
}
|
52 |
+
|
53 |
+
function seopress_titles_help_tab() {
|
54 |
+
$screen = get_current_screen();
|
55 |
+
|
56 |
+
$seopress_titles_help_tab_content = '
|
57 |
+
<ul>
|
58 |
+
<li><span>' . __('%%sep%%', 'wp-seopress') . '</span>' . __('Separator (eg: - )', 'wp-seopress') . '</li>
|
59 |
+
<li><span>' . __('%%sitetitle%% (alias: %%sitename%%)', 'wp-seopress') . '</span>' . __('Site Title', 'wp-seopress') . '</li>
|
60 |
+
<li><span>' . __('%%tagline%% (alias %%sitedesc%%)', 'wp-seopress') . '</span>' . __('Tagline', 'wp-seopress') . '</li>
|
61 |
+
<li><span>' . __('%%post_title%% (alias %%title%%)', 'wp-seopress') . '</span>' . __('Post Title (post, page, custom post type)', 'wp-seopress') . '</li>
|
62 |
+
<li><span>' . __('%%post_excerpt%% (alias %%excerpt%%)', 'wp-seopress') . '</span>' . __('Post excerpt', 'wp-seopress') . '</li>
|
63 |
+
<li><span>' . __('%%post_content%%', 'wp-seopress') . '</span>' . __('Post content / product long description', 'wp-seopress') . '</li>
|
64 |
+
<li><span>' . __('%%post_thumbnail_url%%', 'wp-seopress') . '</span>' . __('Post thumbnail URL', 'wp-seopress') . '</li>
|
65 |
+
<li><span>' . __('%%post_url%%', 'wp-seopress') . '</span>' . __('Post URL (permalink)', 'wp-seopress') . '</li>
|
66 |
+
<li><span>' . __('%%post_date%% (alias %%date%%)', 'wp-seopress') . '</span>' . __('Post date', 'wp-seopress') . '</li>
|
67 |
+
<li><span>' . __('%%post_modified_date%%', 'wp-seopress') . '</span>' . __('Last modified post date', 'wp-seopress') . '</li>
|
68 |
+
<li><span>' . __('%%post_author%%', 'wp-seopress') . '</span>' . __('Post author', 'wp-seopress') . '</li>
|
69 |
+
<li><span>' . __('%%post_category%%', 'wp-seopress') . '</span>' . __('Post category', 'wp-seopress') . '</li>
|
70 |
+
<li><span>' . __('%%post_tag%%', 'wp-seopress') . '</span>' . __('Post tag', 'wp-seopress') . '</li>
|
71 |
+
<li><span>' . __('%%_category_title%%', 'wp-seopress') . '</span>' . __('Category title', 'wp-seopress') . '</li>
|
72 |
+
<li><span>' . __('%%_category_description%%', 'wp-seopress') . '</span>' . __('Category description', 'wp-seopress') . '</li>
|
73 |
+
<li><span>' . __('%%tag_title%%', 'wp-seopress') . '</span>' . __('Tag title', 'wp-seopress') . '</li>
|
74 |
+
<li><span>' . __('%%tag_description%%', 'wp-seopress') . '</span>' . __('Tag description', 'wp-seopress') . '</li>
|
75 |
+
<li><span>' . __('%%term_title%%', 'wp-seopress') . '</span>' . __('Term title', 'wp-seopress') . '</li>
|
76 |
+
<li><span>' . __('%%term_description%%', 'wp-seopress') . '</span>' . __('Term description', 'wp-seopress') . '</li>
|
77 |
+
<li><span>' . __('%%search_keywords%%', 'wp-seopress') . '</span>' . __('Search keywords', 'wp-seopress') . '</li>
|
78 |
+
<li><span>' . __('%%current_pagination%%', 'wp-seopress') . '</span>' . __('Current number page', 'wp-seopress') . '</li>
|
79 |
+
<li><span>' . __('%%page%%', 'wp-seopress') . '</span>' . __('Current page number with context (i.e. page 1 of 3)', 'wp-seopress') . '</li>
|
80 |
+
<li><span>' . __('%%cpt_plural%%', 'wp-seopress') . '</span>' . __('Plural Post Type Archive name', 'wp-seopress') . '</li>
|
81 |
+
<li><span>' . __('%%archive_title%%', 'wp-seopress') . '</span>' . __('Archive title', 'wp-seopress') . '</li>
|
82 |
+
<li><span>' . __('%%archive_date%%', 'wp-seopress') . '</span>' . __('Date Archive', 'wp-seopress') . '</li>
|
83 |
+
<li><span>' . __('%%archive_date_day%%', 'wp-seopress') . '</span>' . __('Day Archive date', 'wp-seopress') . '</li>
|
84 |
+
<li><span>' . __('%%archive_date_month%%', 'wp-seopress') . '</span>' . __('Month Archive title', 'wp-seopress') . '</li>
|
85 |
+
<li><span>' . __('%%archive_date_year%%', 'wp-seopress') . '</span>' . __('Year Archive title', 'wp-seopress') . '</li>
|
86 |
+
<li><span>' . __('%%_cf_your_custom_field_name%%', 'wp-seopress') . '</span>' . __('Custom fields from post, page or post type (replace <span style="color:red;margin:0">your_custom_field_name</span> with your custom field name)', 'wp-seopress') . '</li>
|
87 |
+
<li><span>' . __('%%_ct_your_custom_taxonomy_slug%%', 'wp-seopress') . '</span>' . __('Custom term taxonomy from post, page or post type (replace <span style="color:red;margin:0">your_custom_taxonomy_slug</span> with your custom taxonomy slug)', 'wp-seopress') . '</li>
|
88 |
+
<li><span>' . __('%%wc_single_cat%%', 'wp-seopress') . '</span>' . __('Single product category', 'wp-seopress') . '</li>
|
89 |
+
<li><span>' . __('%%wc_single_tag%%', 'wp-seopress') . '</span>' . __('Single product tag', 'wp-seopress') . '</li>
|
90 |
+
<li><span>' . __('%%wc_single_short_desc%%', 'wp-seopress') . '</span>' . __('Single product short description', 'wp-seopress') . '</li>
|
91 |
+
<li><span>' . __('%%wc_single_price%%', 'wp-seopress') . '</span>' . __('Single product price', 'wp-seopress') . '</li>
|
92 |
+
<li><span>' . __('%%wc_single_price_exc_tax%%', 'wp-seopress') . '</span>' . __('Single product price taxes excluded', 'wp-seopress') . '</li>
|
93 |
+
<li><span>' . __('%%wc_sku%%', 'wp-seopress') . '</span>' . __('Single SKU product', 'wp-seopress') . '</li>
|
94 |
+
<li><span>' . __('%%currentday%%', 'wp-seopress') . '</span>' . __('Current day', 'wp-seopress') . '</li>
|
95 |
+
<li><span>' . __('%%currentmonth%%', 'wp-seopress') . '</span>' . __('Current month', 'wp-seopress') . '</li>
|
96 |
+
<li><span>' . __('%%currentmonth_short%%', 'wp-seopress') . '</span>' . __('Current month in 3 letters, eg: "Jan" for "January"', 'wp-seopress') . '</li>
|
97 |
+
<li><span>' . __('%%currentyear%%', 'wp-seopress') . '</span>' . __('Current year', 'wp-seopress') . '</li>
|
98 |
+
<li><span>' . __('%%currentdate%%', 'wp-seopress') . '</span>' . __('Current date', 'wp-seopress') . '</li>
|
99 |
+
<li><span>' . __('%%currenttime%%', 'wp-seopress') . '</span>' . __('Current time', 'wp-seopress') . '</li>
|
100 |
+
<li><span>' . __('%%author_bio%%', 'wp-seopress') . '</span>' . __('Author biography (description), meta desc only', 'wp-seopress') . '</li>
|
101 |
+
<li><span>' . __('%%currentmonth_num%%', 'wp-seopress') . '</span>' . __('Current month in digital format', 'wp-seopress') . '</li>
|
102 |
+
</ul>
|
103 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
104 |
+
|
105 |
+
$seopress_titles_help_robots_tab_content = wp_oembed_get('https://www.youtube.com/watch?v=Jretu4Gpgo8', ['width'=>530]);
|
106 |
+
|
107 |
+
$screen->add_help_tab([
|
108 |
+
'id' => 'seopress_titles_help_tab',
|
109 |
+
'title' => __('Templates variables', 'wp-seopress'),
|
110 |
+
'content' => $seopress_titles_help_tab_content,
|
111 |
+
]);
|
112 |
+
|
113 |
+
$screen->add_help_tab([
|
114 |
+
'id' => 'seopress_titles_help_robots_tab',
|
115 |
+
'title' => __('Edit your meta robots', 'wp-seopress'),
|
116 |
+
'content' => $seopress_titles_help_robots_tab_content,
|
117 |
+
]);
|
118 |
+
|
119 |
+
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
120 |
+
$screen->set_help_sidebar(
|
121 |
+
'<ul>
|
122 |
+
<li><a href="https://www.seopress.org/fr/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Browse our guides', 'wp-seopress') . '</a></li>
|
123 |
+
<li><a href="https://www.seopress.org/fr/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our FAQ', 'wp-seopress') . '</a></li>
|
124 |
+
<li><a href="https://www.seopress.org/fr/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Check our website', 'wp-seopress') . '</a></li>
|
125 |
+
</ul>'
|
126 |
+
);
|
127 |
+
} else {
|
128 |
+
$screen->set_help_sidebar(
|
129 |
+
'<ul>
|
130 |
+
<li><a href="https://www.seopress.org/support/guides/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Browse our guides', 'wp-seopress') . '</a></li>
|
131 |
+
<li><a href="https://www.seopress.org/support/faq/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our FAQ', 'wp-seopress') . '</a></li>
|
132 |
+
<li><a href="https://www.seopress.org/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Check our website', 'wp-seopress') . '</a></li>
|
133 |
+
</ul>'
|
134 |
+
);
|
135 |
}
|
136 |
+
}
|
137 |
+
add_action('load-' . $seopress_titles_help_tab, 'seopress_titles_help_tab');
|
138 |
+
|
139 |
+
function seopress_xml_sitemaps_help_tab() {
|
140 |
+
$screen = get_current_screen();
|
141 |
+
|
142 |
+
$seopress_xml_sitemaps_help_tab_content = '
|
143 |
+
<p>' . __('Watch our video to learn how to enable XML sitemaps to improve crawling and them to Google Search Console.', 'wp-seopress') . '</p>
|
144 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=Bjfspe1nusY', ['width'=>530]);
|
145 |
+
|
146 |
+
$screen->add_help_tab([
|
147 |
+
'id' => 'seopress_google_analytics_help_tab',
|
148 |
+
'title' => __('How-to', 'wp-seopress'),
|
149 |
+
'content' => $seopress_xml_sitemaps_help_tab_content,
|
150 |
+
]);
|
151 |
+
|
152 |
+
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
153 |
+
$screen->set_help_sidebar(
|
154 |
+
'<ul>
|
155 |
+
<li><a href="https://www.seopress.org/fr/support/guides/activer-sitemap-xml/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
156 |
+
</ul>'
|
157 |
+
);
|
158 |
+
} else {
|
159 |
+
$screen->set_help_sidebar(
|
160 |
+
'<ul>
|
161 |
+
<li><a href="https://www.seopress.org/support/guides/enable-xml-sitemaps/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
162 |
+
</ul>'
|
163 |
+
);
|
164 |
}
|
165 |
+
}
|
166 |
+
add_action('load-' . $seopress_xml_sitemaps_help_tab, 'seopress_xml_sitemaps_help_tab');
|
167 |
+
|
168 |
+
function seopress_social_networks_help_tab() {
|
169 |
+
$screen = get_current_screen();
|
170 |
+
|
171 |
+
$seopress_social_networks_help_tab_content = '
|
172 |
+
<p>' . __('Watch our video to learn how to edit your Open Graph and Twitters Cards tags to improve social sharing.', 'wp-seopress') . '</p>
|
173 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=TX3AUsI6vKk', ['width'=>530]);
|
174 |
+
|
175 |
+
$screen->add_help_tab([
|
176 |
+
'id' => 'seopress_social_networks_help_tab',
|
177 |
+
'title' => __('How-to', 'wp-seopress'),
|
178 |
+
'content' => $seopress_social_networks_help_tab_content,
|
179 |
+
]);
|
180 |
+
|
181 |
+
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
182 |
+
$screen->set_help_sidebar(
|
183 |
+
'<ul>
|
184 |
+
<li><a href="https://www.seopress.org/fr/support/guides/gerer-les-metas-facebook-open-graph-et-twitter-cards/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
185 |
+
</ul>'
|
186 |
+
);
|
187 |
+
} else {
|
188 |
+
$screen->set_help_sidebar(
|
189 |
+
'<ul>
|
190 |
+
<li><a href="https://www.seopress.org/support/guides/manage-facebook-open-graph-and-twitter-cards-metas/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
191 |
+
</ul>'
|
192 |
+
);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
add_action('load-' . $seopress_social_networks_help_tab, 'seopress_social_networks_help_tab');
|
196 |
+
|
197 |
+
function seopress_google_analytics_help_tab() {
|
198 |
+
$screen = get_current_screen();
|
199 |
+
|
200 |
+
$seopress_google_analytics_help_tab_content = '
|
201 |
+
<p>' . __('Watch our video to learn how to connect your WordPress site with Google Analytics and get statistics right in your dashboard (PRO only).', 'wp-seopress') . '</p>
|
202 |
+
' . wp_oembed_get('https://www.youtube.com/watch?v=2EWdogYuFgs', ['width'=>530]);
|
203 |
+
|
204 |
+
$screen->add_help_tab([
|
205 |
+
'id' => 'seopress_google_analytics_help_tab',
|
206 |
+
'title' => __('How-to', 'wp-seopress'),
|
207 |
+
'content' => $seopress_google_analytics_help_tab_content,
|
208 |
+
]);
|
209 |
+
|
210 |
+
if (function_exists('seopress_get_locale') && 'fr' == seopress_get_locale()) {
|
211 |
+
$screen->set_help_sidebar(
|
212 |
+
'<ul>
|
213 |
+
<li><a href="https://www.seopress.org/fr/support/guides/connectez-site-wordpress-a-google-analytics/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
214 |
+
</ul>'
|
215 |
+
);
|
216 |
+
} else {
|
217 |
+
$screen->set_help_sidebar(
|
218 |
+
'<ul>
|
219 |
+
<li><a href="https://www.seopress.org/support/guides/connect-wordpress-site-google-analytics/?utm_source=plugin&utm_medium=wp-admin-help-tab&utm_campaign=seopress" target="_blank">' . __('Read our guide', 'wp-seopress') . '</a></li>
|
220 |
+
</ul>'
|
221 |
+
);
|
222 |
}
|
|
|
223 |
}
|
224 |
+
add_action('load-' . $seopress_google_analytics_help_tab, 'seopress_google_analytics_help_tab');
|
225 |
}
|
226 |
|
227 |
public function seopress_titles_page() {
|
inc/admin/ajax.php
CHANGED
@@ -96,7 +96,10 @@ function seopress_do_real_preview() {
|
|
96 |
if ('post' == $seopress_origin) { //Default: post type
|
97 |
//Oxygen compatibility
|
98 |
if (is_plugin_active('oxygen/functions.php') && function_exists('ct_template_output')) {
|
99 |
-
$
|
|
|
|
|
|
|
100 |
} else {
|
101 |
$response = wp_remote_get(get_preview_post_link((int) $seopress_get_the_id, ['no_admin_bar' => 1]), $args);
|
102 |
}
|
96 |
if ('post' == $seopress_origin) { //Default: post type
|
97 |
//Oxygen compatibility
|
98 |
if (is_plugin_active('oxygen/functions.php') && function_exists('ct_template_output')) {
|
99 |
+
$post_url = get_permalink((int) $seopress_get_the_id);
|
100 |
+
$post_url = add_query_arg('no_admin_bar', 1, $post_url);
|
101 |
+
|
102 |
+
$response = wp_remote_get($post_url, $args);
|
103 |
} else {
|
104 |
$response = wp_remote_get(get_preview_post_link((int) $seopress_get_the_id, ['no_admin_bar' => 1]), $args);
|
105 |
}
|
inc/functions/options-google-ecommerce.php
CHANGED
@@ -2,91 +2,93 @@
|
|
2 |
|
3 |
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
-
if (
|
6 |
-
|
7 |
-
|
8 |
-
if (
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
}
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
// Set data
|
36 |
-
$items_purchased['id'] = esc_js($item_id);
|
37 |
-
$items_purchased['name'] = esc_js($item->get_name());
|
38 |
-
$items_purchased['quantity'] = (float) esc_js($item->get_quantity());
|
39 |
-
$items_purchased['price'] = (float) esc_js($order->get_item_total($item));
|
40 |
-
|
41 |
-
// Categories and Variations
|
42 |
-
$categories = get_the_terms($item_id, 'product_cat');
|
43 |
-
if ($item->get_variation_id()) {
|
44 |
-
$variation_id = $item->get_variation_id();
|
45 |
-
$variation_data = wc_get_product_variation_attributes($variation_id);
|
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 |
-
'transaction_id' => esc_js($order_id),
|
71 |
-
'affiliation' => esc_js(get_bloginfo('name')),
|
72 |
-
'value' => (float) esc_js($order->get_total()),
|
73 |
-
'currency' => esc_js($order->get_currency()),
|
74 |
-
'tax' => (float) esc_js($order->get_total_tax()),
|
75 |
-
'shipping' => (float) esc_js($order->get_shipping_total()),
|
76 |
-
'items' => $final,
|
77 |
-
];
|
78 |
-
|
79 |
-
$seopress_google_analytics_click_event['purchase_tracking'] = 'gtag(\'event\', \'purchase\',';
|
80 |
-
$seopress_google_analytics_click_event['purchase_tracking'] .= json_encode($global_purchase);
|
81 |
-
$seopress_google_analytics_click_event['purchase_tracking'] .= ');';
|
82 |
-
$seopress_google_analytics_click_event['purchase_tracking'] = apply_filters('seopress_gtag_ec_purchases_ev', $seopress_google_analytics_click_event['purchase_tracking']);
|
83 |
-
|
84 |
-
update_post_meta($order_id, '_seopress_ga_tracked', true);
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
}
|
88 |
}
|
|
|
|
|
89 |
|
|
|
|
|
90 |
// ADD TO CART
|
91 |
if (seopress_google_analytics_add_to_cart_option()) {
|
92 |
// Listing page
|
2 |
|
3 |
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
+
if (is_plugin_active('woocommerce/woocommerce.php')) {
|
6 |
+
// Measure Purchases
|
7 |
+
if (seopress_google_analytics_purchases_option()) {
|
8 |
+
if (function_exists('is_order_received_page') && is_order_received_page()) {
|
9 |
+
global $wp;
|
10 |
+
$order_id = isset($wp->query_vars['order-received']) ? $wp->query_vars['order-received'] : 0;
|
11 |
+
|
12 |
+
if (0 < $order_id && 1 != get_post_meta($order_id, '_seopress_ga_tracked', true)) {
|
13 |
+
$order = wc_get_order($order_id);
|
14 |
+
|
15 |
+
//Check order status
|
16 |
+
if (method_exists($order, 'get_status') && ('processing' === $order->get_status()) || 'completed' === $order->get_status()) {
|
17 |
+
$items_purchased = [];
|
18 |
+
foreach ($order->get_items() as $item) {
|
19 |
+
// Get Product object
|
20 |
+
$_product = wc_get_product($item->get_product_id());
|
21 |
+
|
22 |
+
if ( ! is_a($_product, 'WC_Product')) {
|
23 |
+
continue;
|
24 |
+
}
|
|
|
25 |
|
26 |
+
// init vars
|
27 |
+
$item_id = $_product->get_id();
|
28 |
+
$variation_id = 0;
|
29 |
+
$variation_data = null;
|
30 |
+
$categories_js = null;
|
31 |
+
$categories_out = [];
|
32 |
+
$variant_js = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
+
// Set data
|
35 |
+
$items_purchased['id'] = esc_js($item_id);
|
36 |
+
$items_purchased['name'] = esc_js($item->get_name());
|
37 |
+
$items_purchased['quantity'] = (float) esc_js($item->get_quantity());
|
38 |
+
$items_purchased['price'] = (float) esc_js($order->get_item_total($item));
|
39 |
+
|
40 |
+
// Categories and Variations
|
41 |
+
$categories = get_the_terms($item_id, 'product_cat');
|
42 |
+
if ($item->get_variation_id()) {
|
43 |
+
$variation_id = $item->get_variation_id();
|
44 |
+
$variation_data = wc_get_product_variation_attributes($variation_id);
|
45 |
+
}
|
46 |
|
47 |
+
// Variations
|
48 |
+
if (is_array($variation_data) && ! empty($variation_data)) {
|
49 |
+
$variant_js = esc_js(wc_get_formatted_variation($variation_data, true));
|
50 |
+
$categories = get_the_terms($item_id, 'product_cat');
|
51 |
+
$item_id = $variation_id;
|
52 |
+
|
53 |
+
$items_purchased['variant'] = esc_js($variant_js);
|
54 |
+
}
|
55 |
+
// Categories
|
56 |
+
if ($categories) {
|
57 |
+
foreach ($categories as $category) {
|
58 |
+
$categories_out[] = $category->name;
|
59 |
}
|
60 |
+
$categories_js = esc_js(implode('/', $categories_out));
|
61 |
|
62 |
+
$items_purchased['category'] = esc_js($categories_js);
|
63 |
}
|
64 |
|
65 |
+
$final[] = $items_purchased;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
+
|
68 |
+
$global_purchase = [
|
69 |
+
'transaction_id' => esc_js($order_id),
|
70 |
+
'affiliation' => esc_js(get_bloginfo('name')),
|
71 |
+
'value' => (float) esc_js($order->get_total()),
|
72 |
+
'currency' => esc_js($order->get_currency()),
|
73 |
+
'tax' => (float) esc_js($order->get_total_tax()),
|
74 |
+
'shipping' => (float) esc_js($order->get_shipping_total()),
|
75 |
+
'items' => $final,
|
76 |
+
];
|
77 |
+
|
78 |
+
$seopress_google_analytics_click_event['purchase_tracking'] = 'gtag(\'event\', \'purchase\',';
|
79 |
+
$seopress_google_analytics_click_event['purchase_tracking'] .= json_encode($global_purchase);
|
80 |
+
$seopress_google_analytics_click_event['purchase_tracking'] .= ');';
|
81 |
+
$seopress_google_analytics_click_event['purchase_tracking'] = apply_filters('seopress_gtag_ec_purchases_ev', $seopress_google_analytics_click_event['purchase_tracking']);
|
82 |
+
|
83 |
+
update_post_meta($order_id, '_seopress_ga_tracked', true);
|
84 |
}
|
85 |
}
|
86 |
}
|
87 |
+
}
|
88 |
+
}
|
89 |
|
90 |
+
if (apply_filters('seopress_fallback_woocommerce_analytics', false)) {
|
91 |
+
if (is_plugin_active('woocommerce/woocommerce.php')) {
|
92 |
// ADD TO CART
|
93 |
if (seopress_google_analytics_add_to_cart_option()) {
|
94 |
// Listing page
|
inc/functions/sitemap/template-xml-sitemaps.php
CHANGED
@@ -1,435 +1,462 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
|
4 |
//XML Index sitemaps
|
5 |
|
6 |
//Headers
|
7 |
if (function_exists('seopress_sitemaps_headers')) {
|
8 |
-
|
9 |
}
|
10 |
|
11 |
//WPML
|
12 |
-
add_filter(
|
13 |
|
14 |
-
add_filter(
|
15 |
global $sitepress, $sitepress_settings;
|
16 |
|
17 |
$sitepress_settings['auto_adjust_ids'] = 0;
|
18 |
-
remove_filter(
|
19 |
-
remove_filter(
|
20 |
|
21 |
return $args;
|
22 |
});
|
23 |
|
24 |
-
add_action(
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
});
|
32 |
|
33 |
function seopress_xml_sitemap_index() {
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
$home_url = site_url().'/';
|
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 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
+
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
|
4 |
|
5 |
//XML Index sitemaps
|
6 |
|
7 |
//Headers
|
8 |
if (function_exists('seopress_sitemaps_headers')) {
|
9 |
+
seopress_sitemaps_headers();
|
10 |
}
|
11 |
|
12 |
//WPML
|
13 |
+
add_filter('wpml_get_home_url', 'seopress_remove_wpml_home_url_filter', 20, 5);
|
14 |
|
15 |
+
add_filter('seopress_sitemaps_index_cpt_query', function ($args) {
|
16 |
global $sitepress, $sitepress_settings;
|
17 |
|
18 |
$sitepress_settings['auto_adjust_ids'] = 0;
|
19 |
+
remove_filter('terms_clauses', [$sitepress, 'terms_clauses']);
|
20 |
+
remove_filter('category_link', [$sitepress, 'category_link_adjust_id'], 1);
|
21 |
|
22 |
return $args;
|
23 |
});
|
24 |
|
25 |
+
add_action('the_post', function ($post) {
|
26 |
+
$language = apply_filters(
|
27 |
+
'wpml_element_language_code',
|
28 |
+
null,
|
29 |
+
['element_id' => $post->ID, 'element_type' => 'page']
|
30 |
+
);
|
31 |
+
do_action('wpml_switch_language', $language);
|
32 |
});
|
33 |
|
34 |
function seopress_xml_sitemap_index() {
|
35 |
+
$home_url = home_url() . '/';
|
36 |
+
|
37 |
+
if (function_exists('pll_home_url')) {
|
38 |
+
$home_url = site_url() . '/';
|
39 |
+
}
|
40 |
+
|
41 |
+
$home_url = apply_filters('seopress_sitemaps_home_url', $home_url);
|
42 |
+
|
43 |
+
$seopress_sitemaps ='<?xml version="1.0" encoding="UTF-8"?>';
|
44 |
+
$seopress_sitemaps .= '<?xml-stylesheet type="text/xsl" href="' . $home_url . 'sitemaps_xsl.xsl"?>';
|
45 |
+
$seopress_sitemaps .= "\n";
|
46 |
+
$seopress_sitemaps .= '<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
|
47 |
+
|
48 |
+
//CPT
|
49 |
+
if ('' != seopress_xml_sitemap_post_types_list_option()) {
|
50 |
+
foreach (seopress_xml_sitemap_post_types_list_option() as $cpt_key => $cpt_value) {
|
51 |
+
foreach ($cpt_value as $_cpt_key => $_cpt_value) {
|
52 |
+
if ('1' == $_cpt_value) {
|
53 |
+
$args = [
|
54 |
+
'posts_per_page' => -1,
|
55 |
+
'post_type' => $cpt_key,
|
56 |
+
'post_status' => 'publish',
|
57 |
+
'meta_query' => [
|
58 |
+
'relation' => 'OR',
|
59 |
+
[
|
60 |
+
'key' => '_seopress_robots_index',
|
61 |
+
'value' => '',
|
62 |
+
'compare' => 'NOT EXISTS',
|
63 |
+
],
|
64 |
+
[
|
65 |
+
'key' => '_seopress_robots_index',
|
66 |
+
'value' => 'yes',
|
67 |
+
'compare' => '!=',
|
68 |
+
],
|
69 |
+
],
|
70 |
+
'fields' => 'ids',
|
71 |
+
'lang' => '',
|
72 |
+
'has_password' => false,
|
73 |
+
];
|
74 |
+
|
75 |
+
$args = apply_filters('seopress_sitemaps_index_post_types_query', $args, $cpt_key);
|
76 |
+
|
77 |
+
$count_posts = count(get_posts($args));
|
78 |
+
|
79 |
+
//Max posts per paginated sitemap
|
80 |
+
$max = 1000;
|
81 |
+
$max = apply_filters('seopress_sitemaps_max_posts_per_sitemap', $max);
|
82 |
+
|
83 |
+
if ($count_posts >= $max) {
|
84 |
+
$max_loop = $count_posts / $max;
|
85 |
+
} else {
|
86 |
+
$max_loop = 1;
|
87 |
+
}
|
88 |
+
|
89 |
+
$paged ='';
|
90 |
+
$i = '';
|
91 |
+
for ($i=0; $i < $max_loop; ++$i) {
|
92 |
+
if (isset($offset) && absint($offset) && '' != $offset && 0 != $offset) {
|
93 |
+
$offset = ((($i) * $max));
|
94 |
+
} else {
|
95 |
+
$offset = 0;
|
96 |
+
}
|
97 |
+
|
98 |
+
if ($i >= 1 && $i <= $max_loop) {
|
99 |
+
$paged = $i + 1;
|
100 |
+
} else {
|
101 |
+
$paged = 1;
|
102 |
+
}
|
103 |
+
|
104 |
+
$seopress_sitemaps .= "\n";
|
105 |
+
$seopress_sitemaps .= '<sitemap>';
|
106 |
+
$seopress_sitemaps .= "\n";
|
107 |
+
$seopress_sitemaps .= '<loc>';
|
108 |
+
$seopress_sitemaps .= $home_url . 'sitemaps/' . $cpt_key . '-sitemap' . $paged . '.xml';
|
109 |
+
$seopress_sitemaps .= '</loc>';
|
110 |
+
$seopress_sitemaps .= "\n";
|
111 |
+
|
112 |
+
//Remove lastmod column in index sitemap for lage sitemap
|
113 |
+
$display_lastmod = apply_filters('seopress_sitemaps_index_lastmod', false);
|
114 |
+
|
115 |
+
if (true == $display_lastmod) {
|
116 |
+
$args = [
|
117 |
+
'post_type' => $cpt_key,
|
118 |
+
'offset' => $offset,
|
119 |
+
'post_status' => 'publish',
|
120 |
+
'ignore_sticky_posts' => true,
|
121 |
+
'posts_per_page' => 1,
|
122 |
+
'meta_query' => [
|
123 |
+
'relation' => 'OR',
|
124 |
+
[
|
125 |
+
'key' => '_seopress_robots_index',
|
126 |
+
'value' => '',
|
127 |
+
'compare' => 'NOT EXISTS',
|
128 |
+
],
|
129 |
+
[
|
130 |
+
'key' => '_seopress_robots_index',
|
131 |
+
'value' => 'yes',
|
132 |
+
'compare' => '!=',
|
133 |
+
],
|
134 |
+
],
|
135 |
+
'order' => 'DESC',
|
136 |
+
'orderby' => 'modified',
|
137 |
+
'lang' => '',
|
138 |
+
'has_password' => false,
|
139 |
+
];
|
140 |
+
|
141 |
+
$args = apply_filters('seopress_sitemaps_index_cpt_query', $args, $cpt_key);
|
142 |
+
|
143 |
+
$get_latest_post = new WP_Query($args);
|
144 |
+
|
145 |
+
if ($get_latest_post->have_posts()) {
|
146 |
+
$seopress_sitemaps .= '<lastmod>';
|
147 |
+
$seopress_sitemaps .= date('c', strtotime($get_latest_post->posts[0]->post_modified));
|
148 |
+
$seopress_sitemaps .= '</lastmod>';
|
149 |
+
$seopress_sitemaps .= "\n";
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
$seopress_sitemaps .= '</sitemap>';
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
//Taxonomies
|
161 |
+
if ('' != seopress_xml_sitemap_taxonomies_list_option()) {
|
162 |
+
//Init
|
163 |
+
$seopress_xml_terms_list = [];
|
164 |
+
foreach (seopress_xml_sitemap_taxonomies_list_option() as $tax_key => $tax_value) {
|
165 |
+
foreach ($tax_value as $_tax_key => $_tax_value) {
|
166 |
+
if ('1' == $_tax_value) {
|
167 |
+
$args = [
|
168 |
+
'taxonomy' => $tax_key,
|
169 |
+
'hide_empty' => false,
|
170 |
+
'lang' => '',
|
171 |
+
'fields' => 'ids',
|
172 |
+
'meta_query' => [
|
173 |
+
'relation' => 'OR',
|
174 |
+
[
|
175 |
+
'key' => '_seopress_robots_index',
|
176 |
+
'value' => '',
|
177 |
+
'compare' => 'NOT EXISTS',
|
178 |
+
],
|
179 |
+
[
|
180 |
+
'key' => '_seopress_robots_index',
|
181 |
+
'value' => 'yes',
|
182 |
+
'compare' => '!=',
|
183 |
+
],
|
184 |
+
],
|
185 |
+
];
|
186 |
+
|
187 |
+
$args = apply_filters('seopress_sitemaps_index_tax_query', $args, $tax_key);
|
188 |
+
|
189 |
+
$count_terms = count(get_terms($args));
|
190 |
+
|
191 |
+
//Max terms per paginated sitemap
|
192 |
+
$max = 1000;
|
193 |
+
$max = apply_filters('seopress_sitemaps_max_terms_per_sitemap', $max);
|
194 |
+
|
195 |
+
if ($count_terms >= $max) {
|
196 |
+
$max_loop = $count_terms / $max;
|
197 |
+
} else {
|
198 |
+
$max_loop = 1;
|
199 |
+
}
|
200 |
+
|
201 |
+
$paged ='';
|
202 |
+
$i = '';
|
203 |
+
for ($i=0; $i < $max_loop; ++$i) {
|
204 |
+
if (isset($offset) && absint($offset) && '' != $offset && 0 != $offset) {
|
205 |
+
$offset = ((($i) * $max));
|
206 |
+
} else {
|
207 |
+
$offset = 0;
|
208 |
+
}
|
209 |
+
|
210 |
+
if ($i >= 1 && $i <= $max_loop) {
|
211 |
+
$paged = $i + 1;
|
212 |
+
} else {
|
213 |
+
$paged = 1;
|
214 |
+
}
|
215 |
+
|
216 |
+
$seopress_sitemaps .= "\n";
|
217 |
+
$seopress_sitemaps .= '<sitemap>';
|
218 |
+
$seopress_sitemaps .= "\n";
|
219 |
+
$seopress_sitemaps .= '<loc>';
|
220 |
+
$seopress_sitemaps .= $home_url . 'sitemaps/' . $tax_key . '-sitemap' . $paged . '.xml';
|
221 |
+
$seopress_sitemaps .= '</loc>';
|
222 |
+
$seopress_sitemaps .= "\n";
|
223 |
+
$seopress_sitemaps .= '</sitemap>';
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
//Google News
|
231 |
+
if (function_exists('seopress_xml_sitemap_news_enable_option') && '' != seopress_xml_sitemap_news_enable_option()
|
232 |
+
&& function_exists('seopress_get_toggle_option') && '1' == seopress_get_toggle_option('news')) {
|
233 |
+
//Include Custom Post Types
|
234 |
+
function seopress_xml_sitemap_news_cpt_option() {
|
235 |
+
$seopress_xml_sitemap_news_cpt_option = get_option('seopress_pro_option_name');
|
236 |
+
if ( ! empty($seopress_xml_sitemap_news_cpt_option)) {
|
237 |
+
foreach ($seopress_xml_sitemap_news_cpt_option as $key => $seopress_xml_sitemap_news_cpt_value) {
|
238 |
+
$options[$key] = $seopress_xml_sitemap_news_cpt_value;
|
239 |
+
}
|
240 |
+
if (isset($seopress_xml_sitemap_news_cpt_option['seopress_news_name_post_types_list'])) {
|
241 |
+
return $seopress_xml_sitemap_news_cpt_option['seopress_news_name_post_types_list'];
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
245 |
+
if ('' != seopress_xml_sitemap_news_cpt_option()) {
|
246 |
+
$seopress_xml_sitemap_news_cpt_array = [];
|
247 |
+
foreach (seopress_xml_sitemap_news_cpt_option() as $cpt_key => $cpt_value) {
|
248 |
+
foreach ($cpt_value as $_cpt_key => $_cpt_value) {
|
249 |
+
if ('1' == $_cpt_value) {
|
250 |
+
array_push($seopress_xml_sitemap_news_cpt_array, $cpt_key);
|
251 |
+
}
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
$args = [
|
257 |
+
'post_type' => $seopress_xml_sitemap_news_cpt_array,
|
258 |
+
'post_status' => 'publish',
|
259 |
+
'ignore_sticky_posts' => true,
|
260 |
+
'posts_per_page' => 1,
|
261 |
+
'orderby' => 'modified',
|
262 |
+
'meta_query' => [
|
263 |
+
[
|
264 |
+
'key' => '_seopress_robots_index',
|
265 |
+
'value' => 'yes',
|
266 |
+
'compare' => 'NOT EXISTS',
|
267 |
+
],
|
268 |
+
],
|
269 |
+
'order' => 'DESC',
|
270 |
+
'lang' => '',
|
271 |
+
'has_password' => false,
|
272 |
+
];
|
273 |
+
|
274 |
+
$args = apply_filters('seopress_sitemaps_index_gnews_query', $args);
|
275 |
+
|
276 |
+
$get_latest_post = new WP_Query($args);
|
277 |
+
if ($get_latest_post->have_posts()) {
|
278 |
+
$seopress_sitemaps .= "\n";
|
279 |
+
$seopress_sitemaps .= '<sitemap>';
|
280 |
+
$seopress_sitemaps .= "\n";
|
281 |
+
$seopress_sitemaps .= '<loc>';
|
282 |
+
$seopress_sitemaps .= $home_url . 'sitemaps/news.xml';
|
283 |
+
$seopress_sitemaps .= '</loc>';
|
284 |
+
$seopress_sitemaps .= "\n";
|
285 |
+
$seopress_sitemaps .= '<lastmod>';
|
286 |
+
$seopress_sitemaps .= date('c', strtotime($get_latest_post->posts[0]->post_modified));
|
287 |
+
$seopress_sitemaps .= '</lastmod>';
|
288 |
+
$seopress_sitemaps .= "\n";
|
289 |
+
$seopress_sitemaps .= '</sitemap>';
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
//Video sitemap
|
294 |
+
if (function_exists('seopress_xml_sitemap_video_enable_option') && '' != seopress_xml_sitemap_video_enable_option()) {
|
295 |
+
if ('' != seopress_xml_sitemap_post_types_list_option()) {
|
296 |
+
$cpt = [];
|
297 |
+
foreach (seopress_xml_sitemap_post_types_list_option() as $cpt_key => $cpt_value) {
|
298 |
+
foreach ($cpt_value as $_cpt_key => $_cpt_value) {
|
299 |
+
if ('1' == $_cpt_value) {
|
300 |
+
$cpt[] = $cpt_key;
|
301 |
+
}
|
302 |
+
}
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
$args = [
|
307 |
+
'post_type' => $cpt,
|
308 |
+
'post_status' => 'publish',
|
309 |
+
'ignore_sticky_posts' => true,
|
310 |
+
'posts_per_page' => -1,
|
311 |
+
'meta_query' => [
|
312 |
+
'relation' => 'AND',
|
313 |
+
[
|
314 |
+
'relation' => 'OR',
|
315 |
+
[
|
316 |
+
'key' => '_seopress_robots_index',
|
317 |
+
'value' => '',
|
318 |
+
'compare' => 'NOT EXISTS',
|
319 |
+
],
|
320 |
+
[
|
321 |
+
'key' => '_seopress_robots_index',
|
322 |
+
'value' => 'yes',
|
323 |
+
'compare' => '!=',
|
324 |
+
],
|
325 |
+
],
|
326 |
+
[
|
327 |
+
'key' => '_seopress_video',
|
328 |
+
'compare' => 'EXISTS',
|
329 |
+
],
|
330 |
+
],
|
331 |
+
'lang' => '',
|
332 |
+
'has_password' => false,
|
333 |
+
'fields' => 'ids',
|
334 |
+
];
|
335 |
+
|
336 |
+
$args = apply_filters('seopress_sitemaps_index_video_query', $args, $cpt_key);
|
337 |
+
|
338 |
+
$ids = get_posts($args);
|
339 |
+
|
340 |
+
$args = [
|
341 |
+
'post_type' => $cpt,
|
342 |
+
'post_status' => 'publish',
|
343 |
+
'posts_per_page' => -1,
|
344 |
+
'post__in' => $ids,
|
345 |
+
'meta_query' => [
|
346 |
+
[
|
347 |
+
'relation' => 'OR',
|
348 |
+
[
|
349 |
+
'key' => '_seopress_video_disabled',
|
350 |
+
'value' => '',
|
351 |
+
'compare' => 'NOT EXISTS',
|
352 |
+
],
|
353 |
+
[
|
354 |
+
'key' => '_seopress_video_disabled',
|
355 |
+
'value' => 'yes',
|
356 |
+
'compare' => '!=',
|
357 |
+
],
|
358 |
+
],
|
359 |
+
],
|
360 |
+
'lang' => '',
|
361 |
+
'fields' => 'ids',
|
362 |
+
];
|
363 |
+
|
364 |
+
$posts = get_posts($args);
|
365 |
+
$count_posts = count($posts);
|
366 |
+
|
367 |
+
foreach ($posts as $key => $postID) {
|
368 |
+
$seopress_video = get_post_meta($postID, '_seopress_video', true);
|
369 |
+
if ( ! $seopress_video) {
|
370 |
+
--$count_posts;
|
371 |
+
unset($posts[$key]);
|
372 |
+
continue;
|
373 |
+
}
|
374 |
+
|
375 |
+
if (empty($seopress_video[0]['url'])) {
|
376 |
+
--$count_posts;
|
377 |
+
unset($posts[$key]);
|
378 |
+
}
|
379 |
+
}
|
380 |
+
$idsVideos = get_transient('_seopress_sitemap_ids_video');
|
381 |
+
if ( ! $idsVideos) {
|
382 |
+
set_transient('_seopress_sitemap_ids_video', $posts, 3600);
|
383 |
+
}
|
384 |
+
|
385 |
+
//Max posts per paginated sitemap
|
386 |
+
$max = 1000;
|
387 |
+
$max = apply_filters('seopress_sitemaps_max_videos_per_sitemap', $max);
|
388 |
+
|
389 |
+
if ($count_posts >= $max) {
|
390 |
+
$max_loop = $count_posts / $max;
|
391 |
+
} else {
|
392 |
+
$max_loop = 1;
|
393 |
+
}
|
394 |
+
|
395 |
+
$paged ='';
|
396 |
+
$i = '';
|
397 |
+
for ($i=0; $i < $max_loop; ++$i) {
|
398 |
+
if (isset($offset) && absint($offset) && '' != $offset && 0 != $offset) {
|
399 |
+
$offset = ((($i) * $max));
|
400 |
+
} else {
|
401 |
+
$offset = 0;
|
402 |
+
}
|
403 |
+
|
404 |
+
if ($i >= 1 && $i <= $max_loop) {
|
405 |
+
$paged = $i + 1;
|
406 |
+
} else {
|
407 |
+
$paged = 1;
|
408 |
+
}
|
409 |
+
|
410 |
+
$seopress_sitemaps .= "\n";
|
411 |
+
$seopress_sitemaps .= '<sitemap>';
|
412 |
+
$seopress_sitemaps .= "\n";
|
413 |
+
$seopress_sitemaps .= '<loc>';
|
414 |
+
$seopress_sitemaps .= $home_url . 'sitemaps/video' . $paged . '.xml';
|
415 |
+
$seopress_sitemaps .= '</loc>';
|
416 |
+
$seopress_sitemaps .= "\n";
|
417 |
+
$seopress_sitemaps .= '</sitemap>';
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
//Author sitemap
|
422 |
+
if (function_exists('seopress_xml_sitemap_author_enable_option') && '' != seopress_xml_sitemap_author_enable_option()) {
|
423 |
+
$seopress_sitemaps .= "\n";
|
424 |
+
$seopress_sitemaps .= '<sitemap>';
|
425 |
+
$seopress_sitemaps .= "\n";
|
426 |
+
$seopress_sitemaps .= '<loc>';
|
427 |
+
$seopress_sitemaps .= $home_url . 'sitemaps/author.xml';
|
428 |
+
$seopress_sitemaps .= '</loc>';
|
429 |
+
$seopress_sitemaps .= "\n";
|
430 |
+
$seopress_sitemaps .= '</sitemap>';
|
431 |
+
}
|
432 |
+
|
433 |
+
//Custom sitemap
|
434 |
+
$custom_sitemap = null;
|
435 |
+
$custom_sitemap = apply_filters('seopress_sitemaps_external_link', $custom_sitemap);
|
436 |
+
if (isset($custom_sitemap)) {
|
437 |
+
foreach ($custom_sitemap as $key => $sitemap) {
|
438 |
+
$seopress_sitemaps .= "\n";
|
439 |
+
$seopress_sitemaps .= '<sitemap>';
|
440 |
+
$seopress_sitemaps .= "\n";
|
441 |
+
$seopress_sitemaps .= '<loc>';
|
442 |
+
$seopress_sitemaps .= $sitemap['sitemap_url'];
|
443 |
+
$seopress_sitemaps .= '</loc>';
|
444 |
+
if (isset($sitemap['sitemap_last_mod'])) {
|
445 |
+
$seopress_sitemaps .= "\n";
|
446 |
+
$seopress_sitemaps .= '<lastmod>';
|
447 |
+
$seopress_sitemaps .= $sitemap['sitemap_last_mod'];
|
448 |
+
$seopress_sitemaps .= '</lastmod>';
|
449 |
+
}
|
450 |
+
$seopress_sitemaps .= "\n";
|
451 |
+
$seopress_sitemaps .= '</sitemap>';
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
$seopress_sitemaps .= "\n";
|
456 |
+
$seopress_sitemaps .= '</sitemapindex>';
|
457 |
+
|
458 |
+
$seopress_sitemaps = apply_filters('seopress_sitemaps_xml_index', $seopress_sitemaps);
|
459 |
+
|
460 |
+
return $seopress_sitemaps;
|
461 |
+
}
|
462 |
+
echo seopress_xml_sitemap_index();
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
|
|
6 |
Requires at least: 4.7+
|
7 |
Tested up to: 5.6
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.4.0.
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -319,7 +319,16 @@ You're theme is probably using a deprecated function to handle the title. <a hre
|
|
319 |
8. Installation Wizard
|
320 |
9. Schemas metabox
|
321 |
|
322 |
-
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
= 4.4.0.3 (12/02/2021) =
|
324 |
* FIX Fatal errors in posts list
|
325 |
= 4.4.0.2 (12/02/2021) =
|
6 |
Requires at least: 4.7+
|
7 |
Tested up to: 5.6
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.4.0.4
|
10 |
License: GPLv2 or later
|
11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
319 |
8. Installation Wizard
|
320 |
9. Schemas metabox
|
321 |
|
322 |
+
== Changelog ==
|
323 |
+
= 4.4.0.4 (18/02/2021) =
|
324 |
+
* INFO Add "View my RSS feed" button to SEO, PRO, RSS tab
|
325 |
+
* INFO Improve performance for video xml sitemap
|
326 |
+
* FIX Help tabs missing
|
327 |
+
* FIX Content analysis compatibility for Oxygen Page Builder
|
328 |
+
* FIX Variable products for automatic schema
|
329 |
+
* FIX Product currency property for automatic product schema
|
330 |
+
* FIX Ecommerce tracking on purchases
|
331 |
+
* FIX PHP Fatal error: Uncaught Error: Call to a member function is_type()
|
332 |
= 4.4.0.3 (12/02/2021) =
|
333 |
* FIX Fatal errors in posts list
|
334 |
= 4.4.0.2 (12/02/2021) =
|
seopress.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: SEOPress
|
|
4 |
Plugin URI: https://www.seopress.org/
|
5 |
Description: One of the best SEO plugins for WordPress.
|
6 |
Author: SEOPress
|
7 |
-
Version: 4.4.0.
|
8 |
Author URI: https://www.seopress.org/
|
9 |
License: GPLv2
|
10 |
Text Domain: wp-seopress
|
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
|
|
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56 |
//Define
|
57 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
-
define('SEOPRESS_VERSION', '4.4.0.
|
59 |
define('SEOPRESS_AUTHOR', 'Benjamin Denis');
|
60 |
define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
|
61 |
define('SEOPRESS_TEMPLATE_DIR', SEOPRESS_PLUGIN_DIR_PATH . 'templates');
|
4 |
Plugin URI: https://www.seopress.org/
|
5 |
Description: One of the best SEO plugins for WordPress.
|
6 |
Author: SEOPress
|
7 |
+
Version: 4.4.0.4
|
8 |
Author URI: https://www.seopress.org/
|
9 |
License: GPLv2
|
10 |
Text Domain: wp-seopress
|
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56 |
//Define
|
57 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
define('SEOPRESS_VERSION', '4.4.0.4');
|
59 |
define('SEOPRESS_AUTHOR', 'Benjamin Denis');
|
60 |
define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
|
61 |
define('SEOPRESS_TEMPLATE_DIR', SEOPRESS_PLUGIN_DIR_PATH . 'templates');
|
src/ManualHooks/Thirds/WooCommerce/WooCommerceAnalytics.php
CHANGED
@@ -21,10 +21,6 @@ class WooCommerceAnalytics {
|
|
21 |
return;
|
22 |
}
|
23 |
|
24 |
-
if (seopress_google_analytics_purchases_option()) {
|
25 |
-
$this->wooCommerceAnalytics->measurePurchase();
|
26 |
-
}
|
27 |
-
|
28 |
if (seopress_google_analytics_add_to_cart_option()) {
|
29 |
// Listing page
|
30 |
add_action('woocommerce_after_shop_loop_item', [$this, 'addToCart']);
|
21 |
return;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
24 |
if (seopress_google_analytics_add_to_cart_option()) {
|
25 |
// Listing page
|
26 |
add_action('woocommerce_after_shop_loop_item', [$this, 'addToCart']);
|
src/Thirds/WooCommerce/WooCommerceAnalyticsService.php
CHANGED
@@ -7,94 +7,6 @@ if ( ! defined('ABSPATH')) {
|
|
7 |
}
|
8 |
|
9 |
class WooCommerceAnalyticsService {
|
10 |
-
/**
|
11 |
-
* @since 4.4.0
|
12 |
-
*
|
13 |
-
* @return void
|
14 |
-
*/
|
15 |
-
public function measurePurchase() {
|
16 |
-
if ( ! function_exists('is_order_received_page') || ! is_order_received_page()) {
|
17 |
-
return;
|
18 |
-
}
|
19 |
-
global $wp;
|
20 |
-
$order_id = isset($wp->query_vars['order-received']) ? $wp->query_vars['order-received'] : 0;
|
21 |
-
|
22 |
-
if (0 < $order_id && 1 != get_post_meta($order_id, '_seopress_ga_tracked', true)) {
|
23 |
-
$order = wc_get_order($order_id);
|
24 |
-
|
25 |
-
//Check order status
|
26 |
-
if (method_exists($order, 'get_status') && ('processing' === $order->get_status()) || 'completed' === $order->get_status()) {
|
27 |
-
$items_purchased = [];
|
28 |
-
foreach ($order->get_items() as $item) {
|
29 |
-
// Get Product object
|
30 |
-
$_product = wc_get_product($item->get_product_id());
|
31 |
-
|
32 |
-
if ( ! is_a($_product, 'WC_Product')) {
|
33 |
-
continue;
|
34 |
-
}
|
35 |
-
|
36 |
-
// init vars
|
37 |
-
$item_id = $_product->get_id();
|
38 |
-
$variation_id = 0;
|
39 |
-
$variation_data = null;
|
40 |
-
$categories_js = null;
|
41 |
-
$categories_out = [];
|
42 |
-
$variant_js = null;
|
43 |
-
|
44 |
-
// Set data
|
45 |
-
$items_purchased['id'] = esc_js($item_id);
|
46 |
-
$items_purchased['name'] = esc_js($item->get_name());
|
47 |
-
$items_purchased['quantity'] = (float) esc_js($item->get_quantity());
|
48 |
-
$items_purchased['price'] = (float) esc_js($order->get_item_total($item));
|
49 |
-
|
50 |
-
// Categories and Variations
|
51 |
-
$categories = get_the_terms($item_id, 'product_cat');
|
52 |
-
if ($item->get_variation_id()) {
|
53 |
-
$variation_id = $item->get_variation_id();
|
54 |
-
$variation_data = wc_get_product_variation_attributes($variation_id);
|
55 |
-
}
|
56 |
-
|
57 |
-
// Variations
|
58 |
-
if (is_array($variation_data) && ! empty($variation_data)) {
|
59 |
-
$variant_js = esc_js(wc_get_formatted_variation($variation_data, true));
|
60 |
-
$categories = get_the_terms($item_id, 'product_cat');
|
61 |
-
$item_id = $variation_id;
|
62 |
-
|
63 |
-
$items_purchased['variant'] = esc_js($variant_js);
|
64 |
-
}
|
65 |
-
// Categories
|
66 |
-
if ($categories) {
|
67 |
-
foreach ($categories as $category) {
|
68 |
-
$categories_out[] = $category->name;
|
69 |
-
}
|
70 |
-
$categories_js = esc_js(implode('/', $categories_out));
|
71 |
-
|
72 |
-
$items_purchased['category'] = esc_js($categories_js);
|
73 |
-
}
|
74 |
-
|
75 |
-
$final[] = $items_purchased;
|
76 |
-
}
|
77 |
-
|
78 |
-
$global_purchase = [
|
79 |
-
'transaction_id' => esc_js($order_id),
|
80 |
-
'affiliation' => esc_js(get_bloginfo('name')),
|
81 |
-
'value' => (float) esc_js($order->get_total()),
|
82 |
-
'currency' => esc_js($order->get_currency()),
|
83 |
-
'tax' => (float) esc_js($order->get_total_tax()),
|
84 |
-
'shipping' => (float) esc_js($order->get_shipping_total()),
|
85 |
-
'items' => $final,
|
86 |
-
];
|
87 |
-
|
88 |
-
$seopress_google_analytics_click_event['purchase_tracking'] = 'gtag(\'event\', \'purchase\',';
|
89 |
-
$seopress_google_analytics_click_event['purchase_tracking'] .= json_encode($global_purchase);
|
90 |
-
$seopress_google_analytics_click_event['purchase_tracking'] .= ');';
|
91 |
-
$seopress_google_analytics_click_event['purchase_tracking'] = apply_filters('seopress_gtag_ec_purchases_ev', $seopress_google_analytics_click_event['purchase_tracking']);
|
92 |
-
|
93 |
-
update_post_meta($order_id, '_seopress_ga_tracked', true);
|
94 |
-
}
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
/**
|
99 |
* @since 4.4.0
|
100 |
*
|
7 |
}
|
8 |
|
9 |
class WooCommerceAnalyticsService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* @since 4.4.0
|
12 |
*
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -29,7 +29,7 @@ private static $installed = array (
|
|
29 |
'aliases' =>
|
30 |
array (
|
31 |
),
|
32 |
-
'reference' => '
|
33 |
'name' => 'wp-seopress/wp-seopress',
|
34 |
),
|
35 |
'versions' =>
|
@@ -41,7 +41,7 @@ private static $installed = array (
|
|
41 |
'aliases' =>
|
42 |
array (
|
43 |
),
|
44 |
-
'reference' => '
|
45 |
),
|
46 |
),
|
47 |
);
|
29 |
'aliases' =>
|
30 |
array (
|
31 |
),
|
32 |
+
'reference' => '923da49ddad43494367e847503093a9e645167f0',
|
33 |
'name' => 'wp-seopress/wp-seopress',
|
34 |
),
|
35 |
'versions' =>
|
41 |
'aliases' =>
|
42 |
array (
|
43 |
),
|
44 |
+
'reference' => '923da49ddad43494367e847503093a9e645167f0',
|
45 |
),
|
46 |
),
|
47 |
);
|
vendor/composer/installed.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'wp-seopress/wp-seopress',
|
11 |
),
|
12 |
'versions' =>
|
@@ -18,7 +18,7 @@
|
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
21 |
-
'reference' => '
|
22 |
),
|
23 |
),
|
24 |
);
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '923da49ddad43494367e847503093a9e645167f0',
|
10 |
'name' => 'wp-seopress/wp-seopress',
|
11 |
),
|
12 |
'versions' =>
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
21 |
+
'reference' => '923da49ddad43494367e847503093a9e645167f0',
|
22 |
),
|
23 |
),
|
24 |
);
|