XML Sitemap & Google News feeds - Version 5.0.7

Version Description

Bugfix release.

=

Download this release

Release Info

Developer RavanH
Plugin Icon 128x128 XML Sitemap & Google News feeds
Version 5.0.7
Comparing to
See all releases

Code changes from version 4.9.4 to 5.0.7

Files changed (107) hide show
  1. controllers/admin/main.php +527 -0
  2. controllers/admin/notices.php +58 -0
  3. controllers/admin/sitemap-news.php +212 -0
  4. controllers/admin/sitemap.php +224 -0
  5. controllers/global.php +238 -0
  6. controllers/main.php +178 -0
  7. controllers/public/shared.php +34 -0
  8. controllers/public/sitemap-news.php +9 -0
  9. controllers/public/sitemap.php +106 -0
  10. includes/class-xmlsitemapfeed-admin.php +0 -1127
  11. includes/class-xmlsitemapfeed.php +0 -1905
  12. includes/feed-sitemap-taxonomy.php +0 -43
  13. includes/feed-sitemap.php +0 -72
  14. includes/functions.php +0 -174
  15. languages/instructions.txt +0 -27
  16. languages/xml-sitemap-feed-es_ES.mo +0 -0
  17. languages/xml-sitemap-feed-es_ES.po +0 -528
  18. languages/xml-sitemap-feed-fr_FR.mo +0 -0
  19. languages/xml-sitemap-feed-fr_FR.po +0 -594
  20. languages/xml-sitemap-feed-ga_GA.mo +0 -0
  21. languages/xml-sitemap-feed-ga_GA.po +0 -77
  22. languages/xml-sitemap-feed-id_ID.mo +0 -0
  23. languages/xml-sitemap-feed-id_ID.po +0 -304
  24. languages/xml-sitemap-feed-it_IT.mo +0 -0
  25. languages/xml-sitemap-feed-it_IT.po +0 -539
  26. languages/xml-sitemap-feed-nl_NL.mo +0 -0
  27. languages/xml-sitemap-feed-nl_NL.po +0 -814
  28. languages/xml-sitemap-feed-sr_RS.mo +0 -0
  29. languages/xml-sitemap-feed-sr_RS.po +0 -264
  30. languages/xml-sitemap-feed-ua_UA.mo +0 -0
  31. languages/xml-sitemap-feed-ua_UA.po +0 -86
  32. languages/xml-sitemap-feed-xx_XX.po +0 -539
  33. languages/xml-sitemap-feed.pot +0 -544
  34. models/admin/main.php +157 -0
  35. models/admin/sitemap-news.php +34 -0
  36. models/admin/sitemap.php +104 -0
  37. models/class-xmlsitemapfeed.php +276 -0
  38. models/global.php +81 -0
  39. models/main.php +106 -0
  40. models/public/shared.php +123 -0
  41. models/public/sitemap-news.php +131 -0
  42. models/public/sitemap.php +648 -0
  43. readme.txt +83 -43
  44. uninstall.php +19 -13
  45. views/_generator.php +4 -0
  46. views/_usage.php +1 -0
  47. views/admin/field-news-categories.php +12 -0
  48. views/admin/field-news-image.php +10 -0
  49. views/admin/field-news-labels.php +6 -0
  50. views/admin/field-news-name.php +7 -0
  51. views/admin/field-news-post-type.php +23 -0
  52. views/admin/field-ping.php +16 -0
  53. views/admin/field-robots.php +7 -0
  54. views/admin/field-sitemap-custom.php +7 -0
  55. views/admin/field-sitemap-domains.php +7 -0
  56. views/admin/field-sitemap-post-type.php +78 -0
  57. views/admin/field-sitemap-taxonomies.php +20 -0
  58. views/admin/field-sitemap-taxonomy-settings.php +36 -0
  59. views/admin/field-sitemap-urls.php +7 -0
  60. views/admin/field-sitemaps.php +37 -0
  61. views/admin/help-tab-advanced.php +17 -0
  62. views/admin/help-tab-allowed-domains.php +4 -0
  63. views/admin/help-tab-news-categories.php +3 -0
  64. views/admin/help-tab-news-images.php +7 -0
  65. views/admin/help-tab-news-labels.php +8 -0
  66. views/admin/help-tab-news-name.php +4 -0
  67. views/admin/help-tab-news-sidebar.php +12 -0
  68. views/admin/help-tab-news.php +4 -0
  69. views/admin/help-tab-ping.php +10 -0
  70. views/admin/help-tab-post-types.php +15 -0
  71. views/admin/help-tab-robots.php +7 -0
  72. views/admin/help-tab-sidebar.php +9 -0
  73. views/admin/help-tab-sitemaps.php +3 -0
  74. views/admin/help-tab-support.php +18 -0
  75. views/admin/help-tab-taxonomies.php +10 -0
  76. views/admin/help-tab-tools.php +8 -0
  77. views/admin/meta-box-news.php +7 -0
  78. views/admin/meta-box.php +15 -0
  79. views/admin/notice-cleared.php +5 -0
  80. views/admin/notice-date-redirect.php +22 -0
  81. views/admin/notice-deleted.php +5 -0
  82. views/admin/notice-failed.php +8 -0
  83. views/admin/notice-nonce-error.php +5 -0
  84. views/admin/notice-none-found.php +5 -0
  85. views/admin/notice-not-allowed.php +5 -0
  86. views/admin/notice-static-files.php +27 -0
  87. views/admin/notice-wpseo-date-redirect.php +23 -0
  88. views/admin/notice-wpseo-sitemap.php +22 -0
  89. views/admin/notice.php +26 -0
  90. views/admin/page-sitemap-news.php +54 -0
  91. views/admin/page-sitemap.php +57 -0
  92. views/admin/sidebar-contribute.php +19 -0
  93. views/admin/sidebar-help.php +8 -0
  94. {includes → views}/feed-sitemap-custom.php +15 -21
  95. {includes → views}/feed-sitemap-home.php +8 -12
  96. {includes → views}/feed-sitemap-news.php +17 -90
  97. {includes → views}/feed-sitemap-post_type.php +17 -15
  98. views/feed-sitemap-taxonomy.php +36 -0
  99. views/feed-sitemap.php +76 -0
  100. {images → views/images}/sitemapxml.gif +0 -0
  101. views/robots.php +19 -0
  102. views/styles/admin.css +19 -0
  103. {includes/xsl → views/styles}/sitemap-index.xsl +0 -0
  104. {includes/xsl → views/styles}/sitemap-news.xsl +0 -6
  105. views/styles/sitemap-taxonomy.xsl +46 -0
  106. {includes/xsl → views/styles}/sitemap.xsl +0 -0
  107. xml-sitemap.php +30 -62
controllers/admin/main.php ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* ------------------------------
3
+ * XMLSF Admin CLASS
4
+ * ------------------------------ */
5
+
6
+ class XMLSF_Admin_Controller
7
+ {
8
+ /**
9
+ * Static files conflicting with this plugin
10
+ * @var array
11
+ */
12
+ public static $static_files = null;
13
+
14
+ /**
15
+ * CONSTRUCTOR
16
+ * Runs on init
17
+ */
18
+
19
+ function __construct()
20
+ {
21
+ require XMLSF_DIR . '/models/admin/main.php';
22
+ require XMLSF_DIR . '/controllers/admin/notices.php';
23
+
24
+ $sitemaps = (array) get_option( 'xmlsf_sitemaps' );
25
+
26
+ if ( isset($sitemaps['sitemap']) ) {
27
+ require XMLSF_DIR . '/models/admin/sitemap.php';
28
+ require XMLSF_DIR . '/controllers/admin/sitemap.php';
29
+ }
30
+
31
+ if ( isset($sitemaps['sitemap-news']) ) {
32
+ require XMLSF_DIR . '/models/admin/sitemap-news.php';
33
+ require XMLSF_DIR . '/controllers/admin/sitemap-news.php';
34
+ }
35
+
36
+ // NGINX HELPER PURGE URLS
37
+ add_filter( 'rt_nginx_helper_purge_urls', 'xmlsf_nginx_helper_purge_urls', 10, 2 );
38
+
39
+ // ACTION LINK
40
+ add_filter( 'plugin_action_links_' . XMLSF_BASENAME, 'xmlsf_add_action_link' );
41
+
42
+ add_action( 'admin_init', array( $this, 'notices_actions' ) );
43
+ add_action( 'admin_init', array( $this, 'transients_actions' ) );
44
+ add_action( 'admin_init', array( $this, 'tools_actions' ) );
45
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
46
+ add_action( 'admin_init', array( $this, 'register_meta_boxes' ) );
47
+ if ( ( !is_multisite() && current_user_can( 'manage_options' ) ) || is_super_admin() )
48
+ add_action( 'admin_init', array( $this, 'static_files' ) );
49
+ add_action( 'admin_init', array( $this, 'verify_wpseo_settings' ) );
50
+ }
51
+
52
+ /**
53
+ * SETTINGS
54
+ */
55
+
56
+ /**
57
+ * Register settings and add settings fields
58
+ */
59
+
60
+ public function register_settings()
61
+ {
62
+ $sitemaps = (array) get_option( 'xmlsf_sitemaps' );
63
+
64
+ // sitemaps
65
+ register_setting( 'reading', 'xmlsf_sitemaps', array('XMLSF_Admin_Sanitize','sitemaps_settings') );
66
+ add_settings_field( 'xmlsf_sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading' );
67
+
68
+ // custom domains, only when any sitemap is active
69
+ if ( isset($sitemaps['sitemap']) || isset($sitemaps['sitemap-news']) ) {
70
+ register_setting( 'reading', 'xmlsf_domains', array('XMLSF_Admin_Sanitize','domains_settings') );
71
+ add_settings_field( 'xmlsf_domains', __('Allowed domains','xml-sitemap-feed'), array($this,'domains_settings_field'), 'reading' );
72
+ }
73
+
74
+ // help tab
75
+ add_action( 'load-options-reading.php', array($this,'xml_sitemaps_help') );
76
+
77
+ // robots rules, only when permalinks are set
78
+ $rules = get_option( 'rewrite_rules' );
79
+ if( ! xmlsf()->plain_permalinks() && isset( $rules['robots\.txt$'] ) ) {
80
+ register_setting( 'reading', 'xmlsf_robots', array('XMLSF_Admin_Sanitize','robots_settings') );
81
+ add_settings_field( 'xmlsf_robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading' );
82
+ }
83
+
84
+ // ping, only when any sitemap is active
85
+ if ( isset($sitemaps['sitemap']) || isset($sitemaps['sitemap-news']) ) {
86
+ register_setting( 'writing', 'xmlsf_ping', array('XMLSF_Admin_Sanitize','ping_settings') );
87
+ add_settings_field( 'xmlsf_ping', __('Ping Services','xml-sitemap-feed'), array($this,'ping_settings_field'), 'writing' );
88
+ add_action( 'load-options-writing.php', array($this,'ping_settings_help') );
89
+ }
90
+ }
91
+
92
+ /* SITEMAPS */
93
+
94
+ public function xml_sitemaps_help()
95
+ {
96
+ ob_start();
97
+ include XMLSF_DIR . '/views/admin/help-tab-sitemaps.php';
98
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
99
+ $content = ob_get_clean();
100
+
101
+ get_current_screen()->add_help_tab( array(
102
+ 'id' => 'sitemap-settings',
103
+ 'title' => __( 'Enable XML sitemaps', 'xml-sitemap-feed' ),
104
+ 'content' => $content,
105
+ 'priority' => 11
106
+ ) );
107
+
108
+ ob_start();
109
+ include XMLSF_DIR . '/views/admin/help-tab-allowed-domains.php';
110
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
111
+ $content = ob_get_clean();
112
+
113
+ get_current_screen()->add_help_tab( array(
114
+ 'id' => 'allowed-domains',
115
+ 'title' =>__( 'Allowed domains', 'xml-sitemap-feed' ),
116
+ 'content' => $content,
117
+ 'priority' => 11
118
+ ) );
119
+
120
+ ob_start();
121
+ include XMLSF_DIR . '/views/admin/help-tab-robots.php';
122
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
123
+ $content = ob_get_clean();
124
+
125
+ get_current_screen()->add_help_tab( array(
126
+ 'id' => 'robots',
127
+ 'title' => __( 'Additional robots.txt rules', 'xml-sitemap-feed' ),
128
+ 'content' => $content,
129
+ 'priority' => 11
130
+ ) );
131
+ }
132
+
133
+ /**
134
+ * Sitemap settings fields
135
+ */
136
+
137
+ public function sitemaps_settings_field()
138
+ {
139
+ if ( 1 == get_option('blog_public') ) :
140
+
141
+ $options = (array) get_option( 'xmlsf_sitemaps' );
142
+
143
+ // The actual fields for data entry
144
+ include XMLSF_DIR . '/views/admin/field-sitemaps.php';
145
+
146
+ else :
147
+
148
+ _e( 'XML Sitemaps are not available because of your site&#8217;s visibility settings (above).', 'xml-sitemap-feed' );
149
+
150
+ endif;
151
+ }
152
+
153
+ /**
154
+ * Domain settings field
155
+ */
156
+
157
+ public function domains_settings_field()
158
+ {
159
+ $domains = get_option('xmlsf_domains');
160
+ if ( !is_array($domains) ) $domains = array();
161
+
162
+ // The actual fields for data entry
163
+ include XMLSF_DIR . '/views/admin/field-sitemap-domains.php';
164
+ }
165
+
166
+ /* ROBOTS */
167
+
168
+ public function robots_settings_field()
169
+ {
170
+ // The actual fields for data entry
171
+ include XMLSF_DIR . '/views/admin/field-robots.php';
172
+ }
173
+
174
+ /* PING SETTINGS */
175
+
176
+ public function ping_settings_help()
177
+ {
178
+ ob_start();
179
+ include XMLSF_DIR . '/views/admin/help-tab-ping.php';
180
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
181
+ $content = ob_get_clean();
182
+
183
+ get_current_screen()->add_help_tab( array(
184
+ 'id' => 'ping-services',
185
+ 'title' => __( 'Ping Services', 'xml-sitemap-feed' ),
186
+ 'content' => $content,
187
+ 'priority' => 11
188
+ ) );
189
+ }
190
+
191
+ public function ping_settings_field()
192
+ {
193
+ $options = get_option( 'xmlsf_ping' );
194
+
195
+ // The actual fields for data entry
196
+ include XMLSF_DIR . '/views/admin/field-ping.php';
197
+ }
198
+
199
+ /**
200
+ * META BOXES
201
+ */
202
+
203
+ /**
204
+ * Register settings and add settings fields
205
+ */
206
+
207
+ public function register_meta_boxes()
208
+ {
209
+ $sitemaps = (array) get_option( 'xmlsf_sitemaps' );
210
+
211
+ if ( isset($sitemaps['sitemap-news']) ) {
212
+ // post meta box
213
+ add_action( 'add_meta_boxes', array($this,'add_meta_box_news') );
214
+ }
215
+
216
+ if ( isset($sitemaps['sitemap']) ) {
217
+ // post meta box
218
+ add_action( 'add_meta_boxes', array($this,'add_meta_box') );
219
+ }
220
+
221
+ if ( isset($sitemaps['sitemap']) || isset($sitemaps['sitemap-news']) ) {
222
+ // save post meta box settings
223
+ add_action( 'save_post', array($this,'save_metadata') );
224
+ }
225
+ }
226
+
227
+ /* Adds a XML Sitemap box to the side column */
228
+ public function add_meta_box ()
229
+ {
230
+ $post_types = get_option( 'xmlsf_post_types' );
231
+ if ( !is_array( $post_types ) ) return;
232
+
233
+ foreach ( $post_types as $post_type => $settings ) {
234
+ // Only include metaboxes on post types that are included
235
+ if ( isset( $settings["active"] ) )
236
+ add_meta_box(
237
+ 'xmlsf_section',
238
+ __( 'XML Sitemap', 'xml-sitemap-feed' ),
239
+ array( $this, 'meta_box' ),
240
+ $post_type,
241
+ 'side',
242
+ 'low'
243
+ );
244
+ }
245
+ }
246
+
247
+ public function meta_box( $post )
248
+ {
249
+ // Use nonce for verification
250
+ wp_nonce_field( XMLSF_BASENAME, '_xmlsf_nonce' );
251
+
252
+ // Use get_post_meta to retrieve an existing value from the database and use the value for the form
253
+ $exclude = get_post_meta( $post->ID, '_xmlsf_exclude', true );
254
+ $priority = get_post_meta( $post->ID, '_xmlsf_priority', true );
255
+ $disabled = false;
256
+
257
+ // disable options and (visibly) set excluded to true for private posts
258
+ if ( 'private' == $post->post_status ) {
259
+ $disabled = true;
260
+ $exclude = true;
261
+ }
262
+
263
+ // disable options and (visibly) set priority to 1 for front page
264
+ if ( $post->ID == get_option('page_on_front') ) {
265
+ $disabled = true;
266
+ $exclude = false;
267
+ $priority = '1'; // force priority to 1 for front page
268
+ }
269
+
270
+ $description = sprintf(
271
+ __('Leave empty for automatic Priority as configured on %1$s > %2$s.','xml-sitemap-feed'),
272
+ translate('Settings'),
273
+ '<a href="' . admin_url('options-general.php') . '?page=xmlsf">' . __('XML Sitemap','xml-sitemap-feed') . '</a>'
274
+ );
275
+
276
+ // The actual fields for data entry
277
+ include XMLSF_DIR . '/views/admin/meta-box.php';
278
+ }
279
+
280
+ /* Adds a News Sitemap box to the side column */
281
+ public function add_meta_box_news ()
282
+ {
283
+ $news_tags = get_option('xmlsf_news_tags');
284
+ $news_post_types = !empty($news_tags['post_type']) && is_array($news_tags['post_type']) ? $news_tags['post_type'] : array('post');
285
+
286
+ foreach ( $news_post_types as $post_type ) {
287
+ // Only include metabox on post types that are included
288
+ add_meta_box(
289
+ 'xmlsf_news_section',
290
+ __( 'Google News', 'xml-sitemap-feed' ),
291
+ array($this,'meta_box_news'),
292
+ $post_type,
293
+ 'side'
294
+ );
295
+ }
296
+ }
297
+
298
+ public function meta_box_news( $post )
299
+ {
300
+ // Use nonce for verification
301
+ wp_nonce_field( XMLSF_BASENAME, '_xmlsf_nonce' );
302
+
303
+ // Use get_post_meta to retrieve an existing value from the database and use the value for the form
304
+ $exclude = 'private' == $post->post_status || get_post_meta( $post->ID, '_xmlsf_news_exclude', true );
305
+ $disabled = 'private' == $post->post_status;
306
+
307
+ // The actual fields for data entry
308
+ include XMLSF_DIR . '/views/admin/meta-box-news.php';
309
+ }
310
+
311
+ /* When the post is saved, save our meta data */
312
+ public function save_metadata( $post_id )
313
+ {
314
+ if ( !isset($post_id) )
315
+ $post_id = (int)$_REQUEST['post_ID'];
316
+
317
+ if ( !current_user_can( 'edit_post', $post_id ) || !isset($_POST['_xmlsf_nonce']) || !wp_verify_nonce($_POST['_xmlsf_nonce'], XMLSF_BASENAME) )
318
+ return;
319
+
320
+ // _xmlsf_priority
321
+ if ( empty($_POST['xmlsf_priority']) && '0' !== $_POST['xmlsf_priority'] ) {
322
+ delete_post_meta($post_id, '_xmlsf_priority');
323
+ } else {
324
+ update_post_meta($post_id, '_xmlsf_priority', XMLSF_Admin_Sitemap_Sanitize::priority($_POST['xmlsf_priority']) );
325
+ }
326
+
327
+ // _xmlsf_exclude
328
+ if ( isset($_POST['xmlsf_exclude']) && $_POST['xmlsf_exclude'] != '' ) {
329
+ update_post_meta($post_id, '_xmlsf_exclude', $_POST['xmlsf_exclude']);
330
+ } else {
331
+ delete_post_meta($post_id, '_xmlsf_exclude');
332
+ }
333
+
334
+ // _xmlsf_news_exclude
335
+ if ( isset($_POST['xmlsf_news_exclude']) && $_POST['xmlsf_news_exclude'] != '' ) {
336
+ update_post_meta($post_id, '_xmlsf_news_exclude', $_POST['xmlsf_news_exclude']);
337
+ } else {
338
+ delete_post_meta($post_id, '_xmlsf_news_exclude');
339
+ }
340
+ }
341
+
342
+ /**
343
+ * Clear settings
344
+ */
345
+ public function clear_settings()
346
+ {
347
+ if ( !isset( $_POST['_xmlsf_help_nonce'] ) || !wp_verify_nonce( $_POST['_xmlsf_help_nonce'], XMLSF_BASENAME.'-help' ) ) {
348
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','notice_nonce_fail') );
349
+ return;
350
+ }
351
+
352
+ $defaults = xmlsf()->defaults();
353
+ unset($defaults['sitemaps']);
354
+
355
+ foreach ( $defaults as $option => $settings ) {
356
+ update_option( 'xmlsf_' . $option, $settings );
357
+ }
358
+
359
+ delete_option( 'xmlsf_static_files' );
360
+ delete_option( 'xmlsf_pong' );
361
+
362
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','notice_clear_settings') );
363
+ }
364
+
365
+ /**
366
+ * Delete static sitemap files
367
+ */
368
+
369
+ public function delete_static_files()
370
+ {
371
+ if ( !isset( $_POST['_xmlsf_notice_nonce'] ) || !wp_verify_nonce( $_POST['_xmlsf_notice_nonce'], XMLSF_BASENAME.'-notice' ) ) {
372
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','notice_nonce_fail') );
373
+ return;
374
+ }
375
+
376
+ if ( empty($_POST['xmlsf-delete']) ) {
377
+ return;
378
+ }
379
+
380
+ $allowed_files = array('sitemap.xml','sitemap-news.xml','robots.txt');
381
+
382
+ $this->static_files();
383
+
384
+ $i = '1';
385
+ foreach ( $_POST['xmlsf-delete'] as $name ) {
386
+ if ( !in_array($name,$allowed_files) ) {
387
+ unset(self::$static_files[$name]);
388
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','static_files_not_allowed'), $i );
389
+ continue;
390
+ }
391
+ if ( !isset(self::$static_files[$name]) ) {
392
+ // do nothing and be quiet about it...
393
+ continue;
394
+ }
395
+ if ( unlink(self::$static_files[$name]) ) {
396
+ unset(self::$static_files[$name]);
397
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','static_files_deleted'), $i );
398
+ } else {
399
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','static_files_failed'), $i );
400
+ }
401
+ $i ++;
402
+ }
403
+
404
+ $this->check_static_files();
405
+ }
406
+
407
+ /**
408
+ * Check for conflicting WPSEO settings
409
+ */
410
+ public function verify_wpseo_settings()
411
+ {
412
+ // WP SEO Plugin conflict notice
413
+ if ( is_plugin_active('wordpress-seo/wp-seo.php') ) {
414
+ // check date archive redirection
415
+ $wpseo_titles = get_option( 'wpseo_titles' );
416
+ if ( !empty( $wpseo_titles['disable-date'] ) ) {
417
+ // check is Split by option is set anywhere
418
+ foreach ( (array) get_option( 'xmlsf_post_types' ) as $type => $settings ) {
419
+ if ( is_array( $settings ) && !empty( $settings['archive'] ) ) {
420
+ add_action( 'admin_notices', array( 'XMLSF_Admin_Notices', 'notice_wpseo_date_redirect' ) );
421
+ break;
422
+ }
423
+ }
424
+ }
425
+ // check wpseo sitemap option
426
+ $wpseo = get_option( 'wpseo' );
427
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
428
+ if ( !empty( $wpseo['enable_xml_sitemap'] ) && !empty( $sitemaps['sitemap'] ) ) {
429
+ add_action( 'admin_notices', array( 'XMLSF_Admin_Notices', 'notice_wpseo_sitemap' ) );
430
+ }
431
+ }
432
+ }
433
+
434
+ /**
435
+ * Check for static sitemap files
436
+ */
437
+ public function static_files()
438
+ {
439
+ if ( null === self::$static_files )
440
+ self::$static_files = get_option( 'xmlsf_static_files', array() );
441
+
442
+ if ( !empty(self::$static_files) )
443
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','notice_static_files') );
444
+ }
445
+
446
+ /**
447
+ * Check for static sitemap files
448
+ */
449
+ public function check_static_files()
450
+ {
451
+ $home_path = trailingslashit( get_home_path() );
452
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
453
+ self::$static_files = array();
454
+ $check_for = is_array($sitemaps) ? $sitemaps : array();
455
+ if ( get_option('xmlsf_robots') ) {
456
+ $check_for['robots'] = 'robots.txt';
457
+ }
458
+
459
+ foreach ( $check_for as $name => $pretty ) {
460
+ if ( file_exists( $home_path . $pretty ) ) {
461
+ self::$static_files[$pretty] = $home_path . $pretty;
462
+ }
463
+ }
464
+
465
+ if ( !empty( self::$static_files ) ) {
466
+ update_option( 'xmlsf_static_files', self::$static_files, false );
467
+ } else {
468
+ delete_option( 'xmlsf_static_files' );
469
+ }
470
+ }
471
+
472
+ public function tools_actions()
473
+ {
474
+ if ( isset( $_POST['xmlsf-clear-settings'] ) ) {
475
+ $this->clear_settings();
476
+ }
477
+
478
+ if ( isset( $_POST['xmlsf-delete-submit'] ) ) {
479
+ $this->delete_static_files();
480
+ }
481
+
482
+ if ( isset( $_POST['xmlsf-check-conflicts'] ) ) {
483
+ if ( isset( $_POST['_xmlsf_help_nonce'] ) && wp_verify_nonce( $_POST['_xmlsf_help_nonce'], XMLSF_BASENAME.'-help' ) ) {
484
+ // reset ignored warnings
485
+ delete_user_meta( get_current_user_id(), 'xmlsf_dismissed' );
486
+
487
+ $this->check_static_files();
488
+ if ( empty( self::$static_files ) )
489
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','static_files_none_found') );
490
+
491
+ $this->verify_wpseo_settings();
492
+
493
+ } else {
494
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','notice_nonce_fail') );
495
+ }
496
+ }
497
+ }
498
+
499
+ public function notices_actions()
500
+ {
501
+ if ( isset( $_POST['xmlsf-dismiss'] ) ) {
502
+ if ( isset( $_POST['_xmlsf_notice_nonce'] ) && wp_verify_nonce( $_POST['_xmlsf_notice_nonce'], XMLSF_BASENAME.'-notice' ) ) {
503
+ add_user_meta( get_current_user_id(), 'xmlsf_dismissed', $_POST['xmlsf-dismiss'], false );
504
+ } else {
505
+ add_action( 'admin_notices', array('XMLSF_Admin_Notices','notice_nonce_fail') );
506
+ }
507
+ }
508
+ }
509
+
510
+ public function transients_actions()
511
+ {
512
+ // CATCH TRANSIENT for flushing rewrite rules after the sitemaps setting has changed
513
+ if ( delete_transient('xmlsf_flush_rewrite_rules') ) {
514
+ flush_rewrite_rules();
515
+ if ( defined('WP_DEBUG') && WP_DEBUG == true ) {
516
+ error_log('Rewrite rules flushed by XML Sitemap Feeds.');
517
+ }
518
+ }
519
+
520
+ // CATCH TRANSIENT for static file check
521
+ if ( delete_transient('xmlsf_check_static_files') ) {
522
+ $this->check_static_files();
523
+ }
524
+ }
525
+ }
526
+
527
+ new XMLSF_Admin_Controller();
controllers/admin/notices.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class XMLSF_Admin_Notices extends XMLSF_Admin_Controller
4
+ {
5
+ function __construct() {}
6
+
7
+ public static function notice_clear_settings()
8
+ {
9
+ include XMLSF_DIR . '/views/admin/notice-cleared.php';
10
+ }
11
+
12
+ public static function static_files_deleted()
13
+ {
14
+ include XMLSF_DIR . '/views/admin/notice-deleted.php';
15
+ }
16
+
17
+ public static function static_files_not_allowed()
18
+ {
19
+ include XMLSF_DIR . '/views/admin/notice-not-allowed.php';
20
+ }
21
+
22
+ public static function static_files_none_found()
23
+ {
24
+ include XMLSF_DIR . '/views/admin/notice-none-found.php';
25
+ }
26
+
27
+ public static function static_files_failed()
28
+ {
29
+ include XMLSF_DIR . '/views/admin/notice-failed.php';
30
+ }
31
+
32
+ public static function notice_nonce_fail()
33
+ {
34
+ include XMLSF_DIR . '/views/admin/notice-nonce-error.php';
35
+ }
36
+
37
+ public static function notice_static_files()
38
+ {
39
+ if ( !in_array( 'static_files', get_user_meta( get_current_user_id(), 'xmlsf_dismissed' ) ) ) {
40
+ if ( $number = count(parent::$static_files) )
41
+ include XMLSF_DIR . '/views/admin/notice-static-files.php';
42
+ }
43
+ }
44
+
45
+ public static function notice_wpseo_date_redirect()
46
+ {
47
+ if ( !in_array( 'date_redirect', get_user_meta( get_current_user_id(), 'xmlsf_dismissed' ) ) ) {
48
+ include XMLSF_DIR . '/views/admin/notice-wpseo-date-redirect.php';
49
+ }
50
+ }
51
+
52
+ public static function notice_wpseo_sitemap()
53
+ {
54
+ if ( !in_array( 'wpseo_sitemap', get_user_meta( get_current_user_id(), 'xmlsf_dismissed' ) ) ) {
55
+ include XMLSF_DIR . '/views/admin/notice-wpseo-sitemap.php';
56
+ }
57
+ }
58
+ }
controllers/admin/sitemap-news.php ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class XMLSF_Admin_Sitemap_News
4
+ {
5
+ /**
6
+ * Holds the values to be used in the fields callbacks
7
+ */
8
+ private $screen_id;
9
+
10
+ /**
11
+ * Holds the values to be used in the fields callbacks
12
+ */
13
+ private $options;
14
+
15
+ /**
16
+ * Start up
17
+ */
18
+ public function __construct()
19
+ {
20
+ add_action( 'admin_menu', array( $this, 'add_settings_page' ) );
21
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
22
+ }
23
+
24
+ /**
25
+ * Add options page
26
+ */
27
+ public function add_settings_page()
28
+ {
29
+ // This page will be under "Settings"
30
+ $this->screen_id = add_options_page(
31
+ __('Google News Sitemap','xml-sitemap-feed'),
32
+ __('Google News','xml-sitemap-feed'),
33
+ 'manage_options',
34
+ 'xmlsf-news',
35
+ array( $this, 'settings_page' )
36
+ );
37
+ }
38
+
39
+ /**
40
+ * Options page callback
41
+ */
42
+ public function settings_page()
43
+ {
44
+ $this->options = get_option( 'xmlsf_news_tags', array() );
45
+
46
+ // SECTION
47
+ add_settings_section( 'news_sitemap_section', /* '<a name="xmlnf"></a>'.__('Google News Sitemap','xml-sitemap-feed') */ '', '', 'xmlsf-news' );
48
+
49
+ // SETTINGS
50
+ add_settings_field( 'xmlsf_news_name', '<label for="xmlsf_news_name">'.__('Publication name','xml-sitemap-feed').'</label>', array($this,'name_field'), 'xmlsf-news', 'news_sitemap_section' );
51
+ add_settings_field( 'xmlsf_news_post_type', __('Post type','xml-sitemap-feed'), array($this,'post_type_field'), 'xmlsf-news', 'news_sitemap_section' );
52
+
53
+ global $wp_taxonomies;
54
+ $news_post_type = isset( $this->options['post_type'] ) && !empty( $this->options['post_type'] ) ? (array) $this->options['post_type'] : array('post');
55
+ $post_types = ( isset( $wp_taxonomies['category'] ) ) ? $wp_taxonomies['category']->object_type : array();
56
+
57
+ foreach ( $news_post_type as $post_type ) {
58
+ if ( in_array( $post_type, $post_types ) ) {
59
+ add_settings_field( 'xmlsf_news_categories', translate('Categories'), array($this,'categories_field'), 'xmlsf-news', 'news_sitemap_section' );
60
+ break;
61
+ }
62
+ }
63
+
64
+ add_settings_field( 'xmlsf_news_image', translate('Images'), array( $this,'image_field' ), 'xmlsf-news', 'news_sitemap_section' );
65
+ add_settings_field( 'xmlsf_news_labels', __('Source labels', 'xml-sitemap-feed' ), array($this,'labels_field'), 'xmlsf-news', 'news_sitemap_section' );
66
+
67
+ $options = (array) get_option( 'xmlsf_sitemaps' );
68
+ $url = trailingslashit(get_bloginfo('url')) . ( xmlsf()->plain_permalinks() ? '?feed=sitemap-news' : $options['sitemap-news'] );
69
+
70
+ include XMLSF_DIR . '/views/admin/page-sitemap-news.php';
71
+ }
72
+
73
+ /**
74
+ * Register and add settings
75
+ */
76
+ public function register_settings()
77
+ {
78
+ // Help tab
79
+ add_action( 'load-'.$this->screen_id, array($this,'help_tab') );
80
+
81
+ register_setting( 'xmlsf-news', 'xmlsf_news_tags', array('XMLSF_Admin_Sitemap_News_Sanitize','news_tags_settings') );
82
+ }
83
+
84
+ /**
85
+ * GOOGLE NEWS SITEMAP SECTION
86
+ */
87
+
88
+ public function help_tab() {
89
+ $screen = get_current_screen();
90
+
91
+ ob_start();
92
+ include XMLSF_DIR . '/views/admin/help-tab-news.php';
93
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
94
+ $content = ob_get_clean();
95
+
96
+ $screen->add_help_tab( array(
97
+ 'id' => 'sitemap-news-settings',
98
+ 'title' => __( 'Google News Sitemap', 'xml-sitemap-feed' ),
99
+ 'content' => $content
100
+ ) );
101
+
102
+ ob_start();
103
+ include XMLSF_DIR . '/views/admin/help-tab-news-name.php';
104
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
105
+ $content = ob_get_clean();
106
+
107
+ $screen->add_help_tab( array(
108
+ 'id' => 'sitemap-news-name',
109
+ 'title' => __( 'Publication name', 'xml-sitemap-feed' ),
110
+ 'content' => $content
111
+ ) );
112
+
113
+ ob_start();
114
+ include XMLSF_DIR . '/views/admin/help-tab-news-images.php';
115
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
116
+ $content = ob_get_clean();
117
+
118
+ $screen->add_help_tab( array(
119
+ 'id' => 'sitemap-news-images',
120
+ 'title' => translate('Images'),
121
+ 'content' => $content
122
+ ) );
123
+
124
+ ob_start();
125
+ include XMLSF_DIR . '/views/admin/help-tab-news-categories.php';
126
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
127
+ $content = ob_get_clean();
128
+
129
+ $screen->add_help_tab( array(
130
+ 'id' => 'sitemap-news-categories',
131
+ 'title' => translate('Categories'),
132
+ 'content' => $content
133
+ ) );
134
+
135
+ ob_start();
136
+ include XMLSF_DIR . '/views/admin/help-tab-news-labels.php';
137
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
138
+ $content = ob_get_clean();
139
+
140
+ $screen->add_help_tab( array(
141
+ 'id' => 'sitemap-news-labels',
142
+ 'title' => __( 'Source labels', 'xml-sitemap-feed' ),
143
+ 'content' => $content
144
+ ) );
145
+
146
+ ob_start();
147
+ include XMLSF_DIR . '/views/admin/help-tab-news-sidebar.php';
148
+ $content = ob_get_clean();
149
+
150
+ $screen->set_help_sidebar( $content );
151
+ }
152
+
153
+ public function name_field()
154
+ {
155
+ $name = !empty($this->options['name']) ? $this->options['name'] : '';
156
+
157
+ // The actual fields for data entry
158
+ include XMLSF_DIR . '/views/admin/field-news-name.php';
159
+ }
160
+
161
+ public function post_type_field()
162
+ {
163
+ global $wp_taxonomies;
164
+ $post_types = apply_filters( 'xmlsf_news_post_types', get_post_types( array( 'public' => true ) /*,'objects'*/) );
165
+
166
+ if ( is_array($post_types) && !empty($post_types) ) :
167
+
168
+ $news_post_type = isset($this->options['post_type']) && !empty( $this->options['post_type'] ) ? (array) $this->options['post_type'] : array('post');
169
+
170
+ $type = ( 1 == count( $news_post_type ) ) ? 'radio' : 'checkbox';
171
+
172
+ $allowed = ( !empty( $this->options['categories'] ) && isset( $wp_taxonomies['category'] ) ) ? $wp_taxonomies['category']->object_type : $post_types;
173
+
174
+ $do_warning = !empty( $this->options['categories'] ) && count($post_types) > 1 ? true : false;
175
+
176
+ // The actual fields for data entry
177
+ include XMLSF_DIR . '/views/admin/field-news-post-type.php';
178
+
179
+ else :
180
+
181
+ echo '<p class="description warning">'.__('There appear to be no post types available.','xml-sitemap-feed').'</p>';
182
+
183
+ endif;
184
+ }
185
+
186
+ public function categories_field()
187
+ {
188
+ $selected_categories = isset( $this->options['categories'] ) && is_array( $this->options['categories'] ) ? $this->options['categories'] : array();
189
+
190
+ $cat_list = str_replace('name="post_category[]"','name="'.'xmlsf_news_tags[categories][]"', wp_terms_checklist( null, array( 'taxonomy' => 'category', 'selected_cats' => $selected_categories, 'echo' => false ) ) );
191
+
192
+ // The actual fields for data entry
193
+ include XMLSF_DIR . '/views/admin/field-news-categories.php';
194
+ }
195
+
196
+ public function image_field() {
197
+ $options = get_option( 'xmlsf_news_tags' );
198
+
199
+ $image = !empty( $options['image'] ) ? $options['image'] : '';
200
+
201
+ // The actual fields for data entry
202
+ include XMLSF_DIR . '/views/admin/field-news-image.php';
203
+ }
204
+
205
+ public function labels_field() {
206
+ // The actual fields for data entry
207
+ include XMLSF_DIR . '/views/admin/field-news-labels.php';
208
+ }
209
+
210
+ }
211
+
212
+ new XMLSF_Admin_Sitemap_News();
controllers/admin/sitemap.php ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class XMLSF_Admin_Sitemap
4
+ {
5
+ /**
6
+ * Holds the values to be used in the fields callbacks
7
+ */
8
+ private $screen_id;
9
+
10
+ /**
11
+ * Holds the public taxonomies array
12
+ */
13
+ private $public_taxonomies;
14
+
15
+ /**
16
+ * Start up
17
+ */
18
+ public function __construct()
19
+ {
20
+ add_action( 'admin_menu', array( $this, 'add_settings_page' ) );
21
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
22
+ }
23
+
24
+ /**
25
+ * Gets public taxonomies
26
+ */
27
+ public function public_taxonomies()
28
+ {
29
+ if ( !isset( $this->public_taxonomies ) ) {
30
+ include XMLSF_DIR . '/models/public/sitemap.php';
31
+ $this->public_taxonomies = xmlsf_public_taxonomies();
32
+ }
33
+
34
+ return $this->public_taxonomies;
35
+ }
36
+
37
+ /**
38
+ * Add options page
39
+ */
40
+ public function add_settings_page()
41
+ {
42
+ // This page will be under "Settings"
43
+ $this->screen_id = add_options_page(
44
+ __('XML Sitemap','xml-sitemap-feed'),
45
+ __('XML Sitemap','xml-sitemap-feed'),
46
+ 'manage_options',
47
+ 'xmlsf',
48
+ array( $this, 'settings_page' )
49
+ );
50
+ }
51
+
52
+ /**
53
+ * Options page callback
54
+ */
55
+ public function settings_page()
56
+ {
57
+ // SECTIONS & SETTINGS
58
+ // post_types
59
+ add_settings_section( 'xml_sitemap_post_types_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_post_types' );
60
+ $post_types = apply_filters( 'xmlsf_post_types', get_post_types( array( 'public' => true ) /*,'objects'*/) );
61
+
62
+ if ( is_array($post_types) && !empty($post_types) ) :
63
+ foreach ( $post_types as $post_type ) {
64
+ $obj = get_post_type_object( $post_type );
65
+ if ( !is_object( $obj ) )
66
+ continue;
67
+ add_settings_field( 'xmlsf_post_type_'.$obj->name, $obj->label, array($this,'post_types_settings_field'), 'xmlsf_post_types', 'xml_sitemap_post_types_section', $post_type );
68
+ // Note: (ab)using section name parameter to pass post type name
69
+ }
70
+ endif;
71
+
72
+ // taxonomies
73
+ add_settings_section( 'xml_sitemap_taxonomies_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_taxonomies' );
74
+ add_settings_field( 'xmlsf_taxonomy_settings', translate('General'), array($this,'taxonomy_settings_field'), 'xmlsf_taxonomies', 'xml_sitemap_taxonomies_section' );
75
+ $taxonomy_settings = get_option( 'xmlsf_taxonomy_settings' );
76
+ if ( !empty( $taxonomy_settings['active'] ) && get_option( 'xmlsf_taxonomies' ) )
77
+ add_settings_field( 'xmlsf_taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_field'), 'xmlsf_taxonomies', 'xml_sitemap_taxonomies_section' );
78
+
79
+ add_settings_section( 'xml_sitemap_advanced_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_advanced' );
80
+ // custom urls
81
+ add_settings_field( 'xmlsf_urls', __('External web pages','xml-sitemap-feed'), array($this,'urls_settings_field'), 'xmlsf_advanced', 'xml_sitemap_advanced_section' );
82
+ // custom sitemaps
83
+ add_settings_field( 'xmlsf_custom_sitemaps', __('External XML Sitemaps','xml-sitemap-feed'), array($this,'custom_sitemaps_settings_field'), 'xmlsf_advanced', 'xml_sitemap_advanced_section' );
84
+
85
+ $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'post_types';
86
+
87
+ $options = (array) get_option( 'xmlsf_sitemaps' );
88
+ $url = trailingslashit(get_bloginfo('url')) . ( xmlsf()->plain_permalinks() ? '?feed=sitemap' : $options['sitemap'] );
89
+
90
+ include XMLSF_DIR . '/views/admin/page-sitemap.php';
91
+ }
92
+
93
+ /**
94
+ * Register and add settings
95
+ */
96
+ public function register_settings()
97
+ {
98
+ // Help tab
99
+ add_action( 'load-'.$this->screen_id, array($this,'help_tab') );
100
+
101
+ // post_types
102
+ register_setting( 'xmlsf_post_types', 'xmlsf_post_types', array('XMLSF_Admin_Sitemap_Sanitize','post_types_settings') );
103
+ // taxonomies
104
+ register_setting( 'xmlsf_taxonomies', 'xmlsf_taxonomy_settings', array('XMLSF_Admin_Sitemap_Sanitize','taxonomy_settings') );
105
+ register_setting( 'xmlsf_taxonomies', 'xmlsf_taxonomies', array('XMLSF_Admin_Sitemap_Sanitize','taxonomies') );
106
+ // custom urls
107
+ register_setting( 'xmlsf_advanced', 'xmlsf_urls', array('XMLSF_Admin_Sitemap_Sanitize','custom_urls_settings') );
108
+ // custom sitemaps
109
+ register_setting( 'xmlsf_advanced', 'xmlsf_custom_sitemaps', array('XMLSF_Admin_Sitemap_Sanitize','custom_sitemaps_settings') );
110
+ }
111
+
112
+ /**
113
+ * XML SITEMAP SECTION
114
+ */
115
+
116
+ public function help_tab()
117
+ {
118
+ $screen = get_current_screen();
119
+
120
+ ob_start();
121
+ include XMLSF_DIR . '/views/admin/help-tab-sitemaps.php';
122
+ include XMLSF_DIR . '/views/admin/help-tab-support.php';
123
+ $content = ob_get_clean();
124
+
125
+ $screen->add_help_tab( array(
126
+ 'id' => 'sitemap-settings',
127
+ 'title' => __( 'XML Sitemap', 'xml-sitemap-feed' ),
128
+ 'content' => $content
129
+ ) );
130
+
131
+ ob_start();
132
+ include XMLSF_DIR . '/views/admin/help-tab-post-types.php';
133
+ $content = ob_get_clean();
134
+
135
+ $screen->add_help_tab( array(
136
+ 'id' => 'sitemap-settings-post-types',
137
+ 'title' => __( 'Post types', 'xml-sitemap-feed' ),
138
+ 'content' => $content
139
+ ) );
140
+
141
+ ob_start();
142
+ include XMLSF_DIR . '/views/admin/help-tab-taxonomies.php';
143
+ $content = ob_get_clean();
144
+
145
+ $screen->add_help_tab( array(
146
+ 'id' => 'sitemap-settings-taxonomies',
147
+ 'title' => __( 'Taxonomies', 'xml-sitemap-feed' ),
148
+ 'content' => $content,
149
+ ) );
150
+
151
+ ob_start();
152
+ include XMLSF_DIR . '/views/admin/help-tab-advanced.php';
153
+ $content = ob_get_clean();
154
+
155
+ $screen->add_help_tab( array(
156
+ 'id' => 'sitemap-settings-advanced',
157
+ 'title' => translate( 'Advanced' ),
158
+ 'content' => $content
159
+ ) );
160
+
161
+ ob_start();
162
+ include XMLSF_DIR . '/views/admin/help-tab-sidebar.php';
163
+ $content = ob_get_clean();
164
+
165
+ $screen->set_help_sidebar( $content );
166
+ }
167
+
168
+ public function post_types_settings_field( $post_type )
169
+ {
170
+ // post type slug passed as section name
171
+ $obj = get_post_type_object( $post_type );
172
+
173
+ $count = wp_count_posts( $obj->name );
174
+
175
+ $options = get_option('xmlsf_post_types');
176
+
177
+ // The actual fields for data entry
178
+ include XMLSF_DIR . '/views/admin/field-sitemap-post-type.php';
179
+ }
180
+
181
+ public function taxonomy_settings_field()
182
+ {
183
+ $taxonomies = get_option( 'xmlsf_taxonomies' );
184
+ $taxonomy_settings = get_option( 'xmlsf_taxonomy_settings' );
185
+
186
+ // The actual fields for data entry
187
+ include XMLSF_DIR . '/views/admin/field-sitemap-taxonomy-settings.php';
188
+ }
189
+
190
+ public function taxonomies_field()
191
+ {
192
+ $taxonomies = get_option( 'xmlsf_taxonomies' );
193
+
194
+ // The actual fields for data entry
195
+ include XMLSF_DIR . '/views/admin/field-sitemap-taxonomies.php';
196
+ }
197
+
198
+ public function custom_sitemaps_settings_field()
199
+ {
200
+ $custom_sitemaps = get_option( 'xmlsf_custom_sitemaps' );
201
+ $lines = is_array($custom_sitemaps) ? implode( PHP_EOL, $custom_sitemaps ) : $custom_sitemaps;
202
+
203
+ // The actual fields for data entry
204
+ include XMLSF_DIR . '/views/admin/field-sitemap-custom.php';
205
+ }
206
+
207
+ public function urls_settings_field() {
208
+ $urls = get_option('xmlsf_urls');
209
+ $lines = array();
210
+
211
+ if( is_array($urls) && !empty($urls) ) {
212
+ foreach( $urls as $arr ) {
213
+ if( is_array($arr) )
214
+ $lines[] = implode( " ", $arr );
215
+ }
216
+ }
217
+
218
+ // The actual fields for data entry
219
+ include XMLSF_DIR . '/views/admin/field-sitemap-urls.php';
220
+ }
221
+
222
+ }
223
+
224
+ new XMLSF_Admin_Sitemap();
controllers/global.php ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* --------------------------
4
+ * INITIALIZE
5
+ * -------------------------- */
6
+
7
+ function xmlsf_init() {
8
+
9
+ xmlsf_maybe_upgrade();
10
+
11
+ if ( is_admin() ) {
12
+ require XMLSF_DIR . '/controllers/admin/main.php';
13
+ }
14
+
15
+ // include sitemaps if any enabled
16
+ if ( get_option( 'xmlsf_sitemaps' ) ) {
17
+
18
+ // include main controller functions
19
+ require XMLSF_DIR . '/controllers/main.php';
20
+
21
+ add_action( 'clean_post_cache', 'xmlsf_clean_post_cache', 99, 2 );
22
+
23
+ // PINGING
24
+ add_action( 'transition_post_status', 'xmlsf_do_pings', 10, 3 );
25
+
26
+ // Update term meta lastmod date
27
+ add_action( 'transition_post_status', 'update_term_modified_meta', 10, 3 );
28
+
29
+ // add rewrite rules
30
+ xmlsf_rewrite_rules();
31
+
32
+ // include main model functions
33
+ require XMLSF_DIR . '/models/main.php';
34
+
35
+ // MAIN REQUEST filter
36
+ add_filter( 'request', 'xmlsf_filter_request', 1 );
37
+
38
+ // force remove url trailing slash
39
+ add_filter( 'user_trailingslashit', 'xmlsf_untrailingslash' );
40
+
41
+ // common sitemap element filters
42
+ add_filter( 'the_title_xmlsitemap', 'strip_tags' );
43
+ add_filter( 'the_title_xmlsitemap', 'ent2ncr', 8 );
44
+ add_filter( 'the_title_xmlsitemap', 'esc_html' );
45
+
46
+ add_filter( 'xmlsf_news_post_types', 'xmlsf_news_filter_post_types' );
47
+ add_filter( 'xmlsf_post_types', 'xmlsf_filter_post_types' );
48
+
49
+ // include and instantiate class
50
+ xmlsf();
51
+ }
52
+
53
+ // add robots.txt filter
54
+ add_filter( 'robots_txt', 'xmlsf_robots_txt', 9 );
55
+ }
56
+
57
+ /**
58
+ * Upgrade/install, maybe...
59
+ *
60
+ * @since 5.0
61
+ * @return void
62
+ */
63
+ function xmlsf_maybe_upgrade() {
64
+ $db_version = get_option( 'xmlsf_version', 0 );
65
+
66
+ if ( version_compare( XMLSF_VERSION, $db_version, '=' ) ) {
67
+ return;
68
+ }
69
+
70
+ // don't flush rules from init as Polylang chokes on that
71
+ // just remove the db option and let WP regenerate them when ready...
72
+ delete_option( 'rewrite_rules' );
73
+ // ... but make sure rules are regenerated when admin is visited.
74
+ set_transient( 'xmlsf_flush_rewrite_rules', '' );
75
+ // static files checking
76
+ set_transient( 'xmlsf_check_static_files', '' );
77
+
78
+ // upgrade or install
79
+ if ( $db_version ) :
80
+
81
+ if ( version_compare( '4.4', $db_version, '>' ) ) {
82
+ // remove robots.txt rules blocking stylesheets
83
+ if ( $robot_rules = get_option( 'xmlsf_robots' ) ) {
84
+ $robot_rules = str_replace( array('Disallow: */wp-content/','Allow: */wp-content/uploads/'), '', $robot_rules );
85
+ delete_option( 'xmlsf_robots' );
86
+ add_option( 'xmlsf_robots', $robot_rules, null, false );
87
+ }
88
+
89
+ // make sure custom sitemaps is an array
90
+ $urls = get_option('xmlsf_custom_sitemaps');
91
+ if ( !is_array($urls) ) {
92
+ $urls = explode( PHP_EOL, $urls );
93
+ update_option('xmlsf_custom_sitemaps',$urls);
94
+ }
95
+
96
+ // register location taxonomies then delete all terms
97
+ register_taxonomy( 'gn-location-3', null );
98
+ $terms = get_terms( 'gn-location-3', array('hide_empty' => false) );
99
+ foreach ( $terms as $term ) {
100
+ wp_delete_term( $term->term_id, 'gn-location-3' );
101
+ }
102
+
103
+ register_taxonomy( 'gn-location-2', null );
104
+ $terms = get_terms( 'gn-location-2',array( 'hide_empty' => false ) );
105
+ foreach ( $terms as $term ) {
106
+ wp_delete_term( $term->term_id, 'gn-location-2' );
107
+ }
108
+
109
+ register_taxonomy( 'gn-location-1', null );
110
+ $terms = get_terms( 'gn-location-1',array( 'hide_empty' => false ) );
111
+ foreach ( $terms as $term ) {
112
+ wp_delete_term( $term->term_id, 'gn-location-1' );
113
+ }
114
+ }
115
+
116
+ if ( version_compare( '5.0.1', $db_version, '>' ) ) {
117
+ // delete all taxonomy terms
118
+ register_taxonomy( 'gn-genre', null );
119
+
120
+ $terms = get_terms( 'gn-genre', array( 'hide_empty' => false ) );
121
+
122
+ if ( is_array( $terms ) )
123
+ foreach ( $terms as $term )
124
+ wp_delete_term( $term->term_id, 'gn-genre' );
125
+
126
+ // new taxonomy settings
127
+ $taxonomies = get_option( 'xmlsf_taxonomies' );
128
+ if ( empty($taxonomies) ) {
129
+ $active = '';
130
+ } else {
131
+ $available = 0;
132
+ $checked = count($taxonomies);
133
+ foreach ( (array) get_option( 'xmlsf_post_types' ) as $post_type => $settings ) {
134
+ if ( empty($settings['active']) ) continue;
135
+ $taxonomies = get_object_taxonomies( $post_type, 'objects' );
136
+ // check each tax public flag and term count and append name to array
137
+ foreach ( $taxonomies as $taxonomy ) {
138
+ if ( !empty( $taxonomy->public ) && !in_array( $taxonomy->name, xmlsf()->disabled_taxonomies() ) )
139
+ $available++;
140
+ }
141
+ }
142
+ if ( $checked == $available )
143
+ update_option( 'xmlsf_taxonomies', '' );
144
+ $active = '1';
145
+ }
146
+ $taxonomy_settings = array(
147
+ 'active' => $active,
148
+ 'priority' => '0.3',
149
+ 'dynamic_priority' => '1',
150
+ 'term_limit' => '5000'
151
+ );
152
+ add_option( 'xmlsf_taxonomy_settings', $taxonomy_settings );
153
+
154
+ // update ping option
155
+ $ping = get_option( 'xmlsf_ping' );
156
+ $new = array( 'google', 'bing' );
157
+ if ( is_array($ping) ) {
158
+ foreach ( $ping as $key => $value ) {
159
+ if ( is_array($value) && empty( $value['active'] ) && isset( $new[$key] ) ) {
160
+ unset( $new[$key] );
161
+ }
162
+ }
163
+ }
164
+ update_option( 'xmlsf_ping', $new, false );
165
+
166
+ // make sure no pong option remains
167
+ delete_option( 'xmlsf_pong');
168
+
169
+ // update or create robots option
170
+ $robots = get_option( 'xmlsf_robots', '' );
171
+ delete_option( 'xmlsf_robots');
172
+ add_option( 'xmlsf_robots', $robots, null, false );
173
+ }
174
+
175
+ if ( version_compare( '5.0.2', $db_version, '>' ) ) {
176
+ $defaults = xmlsf()->defaults();
177
+
178
+ foreach ( $defaults as $option => $default ) {
179
+ if ( get_option( 'xmlsf_'.$option ) ) continue;
180
+ if ( in_array( $option, array('ping','robots') ) )
181
+ add_option( 'xmlsf_'.$option, $default, null, false );
182
+ else
183
+ add_option( 'xmlsf_'.$option, $default );
184
+ }
185
+
186
+ delete_option( 'xmlsf_version' );
187
+ }
188
+
189
+ if ( defined('WP_DEBUG') && WP_DEBUG ) {
190
+ error_log('XML Sitemap Feeds upgraded from '.$db_version.' to '.XMLSF_VERSION);
191
+ };
192
+
193
+ else :
194
+
195
+ $defaults = xmlsf()->defaults();
196
+
197
+ foreach ( $defaults as $option => $default ) {
198
+ delete_option( 'xmlsf_'.$option );
199
+ if ( in_array( $option, array('ping','robots') ) )
200
+ add_option( 'xmlsf_'.$option, $default, null, false );
201
+ else
202
+ add_option( 'xmlsf_'.$option, $default );
203
+ }
204
+
205
+ if ( defined('WP_DEBUG') && WP_DEBUG ) {
206
+ error_log('XML Sitemap Feeds version '.XMLSF_VERSION.' installed.');
207
+ };
208
+
209
+ endif;
210
+
211
+ update_option( 'xmlsf_version', XMLSF_VERSION );
212
+ }
213
+
214
+ /**
215
+ * Plugin activation
216
+ *
217
+ * @since 5.0
218
+ * @return void
219
+ */
220
+
221
+ function xmlsf_activate() {
222
+ delete_option( 'rewrite_rules' );
223
+ set_transient( 'xmlsf_flush_rewrite_rules', '' );
224
+ set_transient( 'xmlsf_check_static_files', '' );
225
+ }
226
+
227
+ /**
228
+ * Plugin de-activation
229
+ *
230
+ * @since 5.0
231
+ * @return void
232
+ */
233
+
234
+ function xmlsf_deactivate() {
235
+ delete_transient( 'xmlsf_flush_rewrite_rules' );
236
+ delete_transient( 'xmlsf_check_static_files' );
237
+ flush_rewrite_rules();
238
+ }
controllers/main.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Add sitemap rewrite rules
5
+ *
6
+ * @uses object $wp_rewrite
7
+ *
8
+ * @return void
9
+ */
10
+ function xmlsf_rewrite_rules() {
11
+ global $wp_rewrite;
12
+
13
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
14
+
15
+ if ( isset($sitemaps['sitemap']) ) {
16
+ /* One rule to ring them all */
17
+ add_rewrite_rule('sitemap([a-z0-9_-]+)?\.([0-9]+)?\.?xml$', $wp_rewrite->index . '?feed=sitemap$matches[1]&m=$matches[2]', 'top');
18
+ }
19
+
20
+ if( isset($sitemaps['sitemap-news']) ) {
21
+ add_rewrite_rule('sitemap-news\.xml$', $wp_rewrite->index . '?feed=sitemap-news', 'top');
22
+ }
23
+ }
24
+
25
+ /**
26
+ * Cache delete on clean_post_cache
27
+ *
28
+ * @param $post_ID
29
+ * @param $post
30
+ */
31
+ function xmlsf_clean_post_cache( $post_ID, $post ) {
32
+ // are we moving the post in or out of published status?
33
+ wp_cache_delete('xmlsf_get_archives', 'general');
34
+
35
+ // TODO get year / month here to delete specific keys too !!!!
36
+ $m = mysql2date('Ym',$post->post_date_gmt, false);
37
+ $y = substr($m, 0, 4);
38
+
39
+ // clear possible last post modified cache keys
40
+ wp_cache_delete( 'lastpostmodified:gmt', 'timeinfo' ); // should be handled by WP core?
41
+ wp_cache_delete( 'lastpostmodified'.$y.':gmt', 'timeinfo' );
42
+ wp_cache_delete( 'lastpostmodified'.$m.':gmt', 'timeinfo' );
43
+ wp_cache_delete( 'lastpostmodified'.$y.':gmt:'.$post->post_type, 'timeinfo' );
44
+ wp_cache_delete( 'lastpostmodified'.$m.':gmt:'.$post->post_type, 'timeinfo' );
45
+
46
+ // clear possible last post date cache keys
47
+ wp_cache_delete( 'lastpostdate:gmt', 'timeinfo' );
48
+ wp_cache_delete( 'lastpostdate:gmt:'.$post->post_type, 'timeinfo' );
49
+
50
+ // clear possible fist post date cache keys
51
+ wp_cache_delete( 'firstpostdate:gmt', 'timeinfo' );
52
+ wp_cache_delete( 'firstpostdate:gmt:'.$post->post_type, 'timeinfo' );
53
+ }
54
+
55
+ /**
56
+ * Do pings, hooked to transition post status
57
+ *
58
+ * @param $new_status
59
+ * @param $old_status
60
+ * @param $post
61
+ */
62
+ function xmlsf_do_pings( $new_status, $old_status, $post ) {
63
+ // are we publishing?
64
+ if ( $old_status == 'publish' || $new_status != 'publish' )
65
+ return;
66
+
67
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
68
+ $ping = get_option( 'xmlsf_ping' );
69
+
70
+ if ( !is_array($sitemaps) || empty($sitemaps) || !is_array($ping) || empty($ping) )
71
+ return;
72
+
73
+ if ( isset( $sitemaps['sitemap-news'] ) ) {
74
+
75
+ // check if we've got a post type that is included in our news sitemap
76
+ $news_tags = get_option('xmlsf_news_tags');
77
+ if ( !empty($news_tags['post_type']) && is_array($news_tags['post_type']) && in_array($post->post_type,$news_tags['post_type']) ) {
78
+
79
+ // Google ?
80
+ if ( in_array( 'google', $ping ) ) {
81
+ // check if we did not ping already within the last hour
82
+ if ( false === get_transient('xmlsf_ping_google_sitemap_news') ) {
83
+ // Ping !
84
+ $uri = add_query_arg( 'sitemap', urlencode( trailingslashit( get_bloginfo( 'url' ) ) . $sitemaps['sitemap-news'] ), 'https://www.google.com/ping' );
85
+ $response = wp_remote_request( $uri );
86
+ $code = wp_remote_retrieve_response_code( $response );
87
+ if ( 200 === $code ) {
88
+ set_transient( 'xmlsf_ping_google_sitemap_news', $sitemaps['sitemap-news'], 5 * MINUTE_IN_SECONDS );
89
+ } elseif ( defined('WP_DEBUG') && WP_DEBUG == true ) {
90
+ error_log( 'Ping to '. $uri .' failed with response code: ' . $code );
91
+ }
92
+ } elseif ( defined('WP_DEBUG') && WP_DEBUG == true ) {
93
+ error_log( 'Ping skipped: previous News Sitemap was sent to Google less than ' . 5 * MINUTE_IN_SECONDS . ' seconds ago.' );
94
+ }
95
+ }
96
+
97
+ // Bing ?
98
+ // nope...
99
+ }
100
+ }
101
+
102
+ if ( isset( $sitemaps['sitemap'] ) ) {
103
+
104
+ // check if we've got a post type that is included in our sitemap
105
+ $post_types = get_option( 'xmlsf_post_types' );
106
+ if ( is_array( $post_types ) && array_key_exists( $post->post_type, $post_types ) ) {
107
+
108
+ // Google ?
109
+ if ( in_array( 'google', $ping ) ) {
110
+ // check if we did not ping already within the last hour
111
+ if ( false === get_transient('xmlsf_ping_google_sitemap') ) {
112
+ // Ping !
113
+ $uri = add_query_arg( 'sitemap', urlencode( trailingslashit( get_bloginfo( 'url' ) ) . $sitemaps['sitemap'] ), 'https://www.google.com/ping' );
114
+ $response = wp_remote_request( $uri );
115
+ $code = wp_remote_retrieve_response_code( $response );
116
+ if ( 200 === $code ) {
117
+ set_transient( 'xmlsf_ping_google_sitemap', $sitemaps['sitemap'], HOUR_IN_SECONDS );
118
+ } elseif ( defined('WP_DEBUG') && WP_DEBUG == true ) {
119
+ error_log( 'Ping to '. $uri .' failed with response code: ' . $code );
120
+ }
121
+ } elseif ( defined('WP_DEBUG') && WP_DEBUG == true ) {
122
+ error_log( 'Ping skipped: previous XML Sitemap was sent to Google less than ' . HOUR_IN_SECONDS . ' seconds ago.' );
123
+ }
124
+ }
125
+
126
+ // Bing ?
127
+ if ( in_array( 'bing', $ping ) ) {
128
+ // check if we did not ping already within the last hour
129
+ if ( false === get_transient('xmlsf_ping_bing_sitemap') ) {
130
+ // Ping !
131
+ $uri = add_query_arg( 'sitemap', urlencode( trailingslashit( get_bloginfo( 'url' ) ) . $sitemaps['sitemap'] ), 'https://www.bing.com/ping' );
132
+ $response = wp_remote_request( $uri );
133
+ $code = wp_remote_retrieve_response_code( $response );
134
+ if ( 200 === $code ) {
135
+ set_transient( 'xmlsf_ping_bing_sitemap', $sitemaps['sitemap'], HOUR_IN_SECONDS );
136
+ } elseif ( defined('WP_DEBUG') && WP_DEBUG == true ) {
137
+ error_log( 'Ping to '. $uri .' failed with response code: ' . $code );
138
+ }
139
+ } elseif ( defined('WP_DEBUG') && WP_DEBUG == true ) {
140
+ error_log( 'Ping skipped: previous XML Sitemap was sent to Bing less than ' . HOUR_IN_SECONDS . ' seconds ago.' );
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ /**
148
+ * Update term modified meta, hooked to transition post status
149
+ *
150
+ * @param $new_status
151
+ * @param $old_status
152
+ * @param $post
153
+ */
154
+ function update_term_modified_meta( $new_status, $old_status, $post ) {
155
+
156
+ $taxonomies = get_option( 'xmlsf_taxonomies' );
157
+
158
+ if ( empty( $taxonomies ) )
159
+ return;
160
+
161
+ // are we not publishing or unpublishing?
162
+ if ( $old_status == $new_status || $old_status != 'publish' && $new_status != 'publish' )
163
+ return;
164
+
165
+ $term_ids = array();
166
+ foreach ( $taxonomies as $tax_name ) {
167
+ $terms = wp_get_post_terms( $post->ID, $tax_name, array( 'fields' => 'ids' ));
168
+ if ( !is_wp_error($terms) ) {
169
+ $term_ids = array_merge( $term_ids, $terms );
170
+ }
171
+ }
172
+
173
+ $time = date('Y-m-d H:i:s');
174
+
175
+ foreach( $term_ids as $id ) {
176
+ update_term_meta( $id, 'term_modified_gmt', $time );
177
+ }
178
+ }
controllers/public/shared.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * WPML: switch language
5
+ * @see https://wpml.org/wpml-hook/wpml_post_language_details/
6
+ */
7
+ function xmlsf_wpml_language_switcher() {
8
+ global $sitepress, $post;
9
+ if ( isset( $sitepress ) ) {
10
+ $post_language = apply_filters( 'wpml_post_language_details', NULL, $post->ID );
11
+ $sitepress->switch_lang( $post_language['language_code'] );
12
+ }
13
+ }
14
+
15
+ /**
16
+ * Generator info
17
+ */
18
+ function xmlsf_generator() {
19
+ $date = date('Y-m-d\TH:i:s+00:00');
20
+
21
+ require XMLSF_DIR . '/views/_generator.php';
22
+ }
23
+
24
+ /**
25
+ * Usage info for debugging
26
+ */
27
+ function xmlsf_usage() {
28
+ if ( defined('WP_DEBUG') && WP_DEBUG == true ) {
29
+ $num = get_num_queries();
30
+ $mem = function_exists('memory_get_peak_usage') ? round(memory_get_peak_usage()/1024/1024,2) : 0;
31
+
32
+ require XMLSF_DIR . '/views/_usage.php';
33
+ }
34
+ }
controllers/public/sitemap-news.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * set up the news sitemap template
4
+ */
5
+ function xmlsf_load_template_news() {
6
+ load_template( XMLSF_DIR . '/views/feed-sitemap-news.php' );
7
+ }
8
+
9
+ add_action('do_feed_sitemap-news', 'xmlsf_load_template_news', 10, 1);
controllers/public/sitemap.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * FEED TEMPLATES
4
+ */
5
+
6
+ /**
7
+ * Set up the sitemap index template
8
+ */
9
+ function xmlsf_load_template_index() {
10
+ load_template( XMLSF_DIR . '/views/feed-sitemap.php' );
11
+ }
12
+
13
+ /**
14
+ * set up the sitemap home page(s) template
15
+ */
16
+ function xmlsf_load_template_home() {
17
+ load_template( XMLSF_DIR . '/views/feed-sitemap-home.php' );
18
+ }
19
+
20
+ /**
21
+ * set up the post types sitemap template
22
+ */
23
+ function xmlsf_load_template() {
24
+ load_template( XMLSF_DIR . '/views/feed-sitemap-post_type.php' );
25
+ }
26
+
27
+ /**
28
+ * set up the taxonomy sitemap template
29
+ */
30
+ function xmlsf_load_template_taxonomy() {
31
+ load_template( XMLSF_DIR . '/views/feed-sitemap-taxonomy.php' );
32
+ }
33
+
34
+ /**
35
+ * set up the custom sitemap template
36
+ */
37
+ function xmlsf_load_template_custom() {
38
+ load_template( XMLSF_DIR . '/views/feed-sitemap-custom.php' );
39
+ }
40
+
41
+ /**
42
+ * Do feed templates
43
+ */
44
+ function xmlsf_feed_templates() {
45
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
46
+
47
+ if ( is_array($sitemaps) && isset($sitemaps['sitemap'])) {
48
+ // setup feed templates
49
+ add_action( 'do_feed_sitemap', 'xmlsf_load_template_index', 10, 1 );
50
+ add_action( 'do_feed_sitemap_index', 'xmlsf_load_template_index', 10, 1 );
51
+ add_action( 'do_feed_sitemap-home', 'xmlsf_load_template_home', 10, 1 );
52
+ add_action( 'do_feed_sitemap-custom', 'xmlsf_load_template_custom', 10, 1 );
53
+
54
+ $post_types = get_option('xmlsf_post_types');
55
+ if ( is_array($post_types) ) {
56
+ foreach ( $post_types as $post_type => $settings ) {
57
+ if ( !empty($settings['active']) )
58
+ add_action( 'do_feed_sitemap-posttype-'.$post_type, 'xmlsf_load_template', 10, 1 );
59
+ }
60
+ }
61
+ foreach ( xmlsf_get_taxonomies() as $name ) {
62
+ add_action( 'do_feed_sitemap-taxonomy-'.$name, 'xmlsf_load_template_taxonomy', 10, 1 );
63
+ }
64
+ }
65
+ }
66
+
67
+ /* -------------------------------------
68
+ * MISSING WORDPRESS FUNCTIONS
69
+ * ------------------------------------- */
70
+
71
+ /**
72
+ * Retrieve the date that the first post/page was published.
73
+ * Variation of function get_lastpostdate, uses _get_post_time
74
+ *
75
+ * The server timezone is the default and is the difference between GMT and
76
+ * server time. The 'blog' value is the date when the last post was posted. The
77
+ * 'gmt' is when the last post was posted in GMT formatted date.
78
+ *
79
+ * @uses apply_filters() Calls 'get_firstpostdate' filter
80
+ * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
81
+ * @param string $post_type Post type to check.
82
+ * @return string The date of the last post.
83
+ */
84
+ if( !function_exists('get_firstpostdate') ) {
85
+ function get_firstpostdate($timezone = 'server', $post_type = 'any') {
86
+ return apply_filters( 'get_firstpostdate', _get_post_time( $timezone, 'date', $post_type, 'first' ), $timezone );
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Retrieve last post/page modified date depending on timezone.
92
+ * Variation of function get_lastpostmodified, uses _get_post_time
93
+ *
94
+ * The server timezone is the default and is the difference between GMT and
95
+ * server time. The 'blog' value is the date when the last post was posted. The
96
+ * 'gmt' is when the last post was posted in GMT formatted date.
97
+ *
98
+ * @uses apply_filters() Calls 'get_lastmodified' filter
99
+ * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
100
+ * @return string The date of the oldest modified post.
101
+ */
102
+ if( !function_exists('get_lastmodified') ) {
103
+ function get_lastmodified( $timezone = 'server', $post_type = 'any', $m = '' ) {
104
+ return apply_filters( 'get_lastmodified', _get_post_time( $timezone, 'modified', $post_type, 'last', $m ), $timezone );
105
+ }
106
+ }
includes/class-xmlsitemapfeed-admin.php DELETED
@@ -1,1127 +0,0 @@
1
- <?php
2
- /* ------------------------------
3
- * XMLSF Admin CLASS
4
- * ------------------------------ */
5
-
6
- class XMLSitemapFeed_Admin extends XMLSitemapFeed {
7
-
8
- /**
9
- * SETTINGS
10
- */
11
-
12
- // TODO refer to support forum + invite plugin rating !
13
-
14
- /**
15
- * Sitemaps
16
- * settings field
17
- */
18
- public function sitemaps_settings_field() {
19
- $options = parent::get_sitemaps();
20
- $disabled = ('1' == get_option('blog_public')) ? false : true;
21
-
22
- echo '<fieldset id="xmlsf_sitemaps"><legend class="screen-reader-text">'.__('XML Sitemaps','xml-sitemap-feed').'</legend>
23
- <label><input type="checkbox" name="'.$this->prefix.'sitemaps[sitemap]" id="xmlsf_sitemaps_index" value="'.htmlspecialchars(XMLSF_NAME).'" '.checked(isset($options['sitemap']), true, false).' '.disabled($disabled, true, false).' /> '.__('XML Sitemap Index','xml-sitemap-feed').'</label>';//xmlsf
24
- if (isset($options['sitemap']))
25
- echo '<span class="description"> &nbsp;&ndash;&nbsp; <a href="#xmlsf" id="xmlsf_link">'.translate('Settings').'</a> &nbsp;&ndash;&nbsp; <a href="'.trailingslashit(get_bloginfo('url')). ( ('' == get_option('permalink_structure')) ? '?feed=sitemap' : $options['sitemap'] ) .'" target="_blank">'.translate('View').'</a></span>';
26
-
27
- echo '<br>
28
- <label><input type="checkbox" name="'.$this->prefix.'sitemaps[sitemap-news]" id="xmlsf_sitemaps_news" value="'.htmlspecialchars(XMLSF_NEWS_NAME).'" '.checked(isset($options['sitemap-news']), true, false).' '.disabled($disabled, true, false).' /> '.__('Google News Sitemap','xml-sitemap-feed').'</label>';
29
- if (isset($options['sitemap-news']))
30
- echo '<span class="description"> &nbsp;&ndash;&nbsp; <a href="#xmlnf" id="xmlnf_link">'.translate('Settings').'</a> &nbsp;&ndash;&nbsp; <a href="'.trailingslashit(get_bloginfo('url')). ( ('' == get_option('permalink_structure')) ? '?feed=sitemap-news' : $options['sitemap-news'] ) .'" target="_blank">'.translate('View').'</a></span>';
31
-
32
- echo '
33
- </fieldset>';
34
- echo '
35
- <script type="text/javascript">
36
- jQuery( document ).ready( function() {
37
- jQuery( "input[name=\'blog_public\']" ).on( \'change\', function() {
38
- jQuery("#xmlsf_sitemaps input").each(function() {
39
- var $this = jQuery(this);
40
- $this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
41
- });
42
- jQuery("#xmlsf_ping input").each(function() {
43
- var $this = jQuery(this);
44
- $this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
45
- });
46
- });
47
- jQuery( "#xmlsf_link" ).click( function(event) {
48
- event.preventDefault();
49
- jQuery("html, body").animate({
50
- scrollTop: jQuery("a[name=\'xmlsf\']").offset().top - 30
51
- }, 1000);
52
- });
53
- jQuery( "#xmlnf_link" ).click( function(event) {
54
- event.preventDefault();
55
- jQuery("html, body").animate({
56
- scrollTop: jQuery("a[name=\'xmlnf\']").offset().top - 30
57
- }, 1000);
58
- });
59
- });
60
- </script>';
61
- }
62
-
63
- /* PINGS */
64
-
65
- public function ping_settings_field() {
66
- $options = parent::get_ping();
67
- $defaults = parent::defaults('ping');
68
- $update_services = get_option('ping_sites');
69
-
70
- $names = array(
71
- 'google' => array (
72
- 'name' => __('Google','xml-sitemap-feed'),
73
- ),
74
- 'bing' => array (
75
- 'name' => __('Bing & Yahoo','xml-sitemap-feed'),
76
- ),
77
- 'yandex' => array (
78
- 'name' => __('Yandex','xml-sitemap-feed'),
79
- ),
80
- 'baidu' => array (
81
- 'name' => __('Baidu','xml-sitemap-feed'),
82
- ),
83
- 'others' => array (
84
- 'name' => __('Ping-O-Matic','xml-sitemap-feed'),
85
- )
86
- );
87
- foreach ( $names as $key => $values ) {
88
- if (array_key_exists($key,$defaults) && is_array($values))
89
- $defaults[$key] += $values;
90
- }
91
-
92
- echo '
93
- <fieldset id="xmlsf_ping"><legend class="screen-reader-text">'.translate('Update Services').'</legend>
94
- ';
95
-
96
- foreach ( $defaults as $key => $values ) {
97
- if ( isset($values['type']) && $values['type'] == 'RPC' ) {
98
- $active = ( strpos($update_services,untrailingslashit($values['uri'])) === false ) ? false : true;
99
- } else {
100
- $active = !empty($options[$key]['active']) ? true : false;
101
- }
102
- echo '
103
- <label><input type="checkbox" name="'.$this->prefix.'ping['.
104
- $key.'][active]" id="xmlsf_ping_'.
105
- $key.'" value="1"'.
106
- checked( $active, true, false).' /> ';
107
- echo isset($names[$key]) && !empty($names[$key]['name']) ? $names[$key]['name'] : $key ;
108
- echo '</label>';
109
-
110
- echo '
111
- <input type="hidden" name="'.$this->prefix.'ping['.
112
- $key.'][uri]" value="'.
113
- $values['uri'].'" />';
114
- echo '
115
- <input type="hidden" name="'.$this->prefix.'ping['.
116
- $key.'][type]" value="'.
117
- $values['type'].'" />';
118
- if (isset($values['news']))
119
- echo '
120
- <input type="hidden" name="'.$this->prefix.'ping['.
121
- $key.'][news]" value="'.
122
- $values['news'].'" />';
123
-
124
- echo ' <span class="description">';
125
- if (!empty($options[$key]['pong'])) {
126
- if ( $tzstring = get_option('timezone_string') ) {
127
- // use same timezoneformat as translatable examples in options-general.php
128
- $timezone_format = translate_with_gettext_context('Y-m-d G:i:s', 'timezone date format');
129
- date_default_timezone_set($tzstring);
130
- } else {
131
- $timezone_format = 'Y-m-d G:i:s T';
132
- }
133
-
134
- foreach ((array)$options[$key]['pong'] as $pretty => $time) {
135
- echo '
136
- <input type="hidden" name="'.$this->prefix.'ping['.
137
- $key.'][pong]['.$pretty.']" value="'.
138
- $time.'" />';
139
- if ( !empty($time) )
140
- echo sprintf(__('Successfully sent %1$s on %2$s.','xml-sitemap-feed'),$pretty, date($timezone_format,$time)).' ';
141
- }
142
- date_default_timezone_set('UTC');
143
- }
144
- echo '</span><br>';
145
- }
146
-
147
- echo '
148
- </fieldset>';
149
- }
150
-
151
- public function sanitize_ping_settings($new) {
152
- $defaults = parent::defaults('ping');
153
- $old = parent::get_option('ping');
154
- $sanitized = array();
155
- $update_services = get_option('ping_sites');
156
- $update_services_new = $update_services;
157
-
158
- foreach ($defaults as $key => $values) {
159
- if(!isset($new[$key]))
160
- continue;
161
-
162
- if ( isset($values['type']) && $values['type']=='RPC' && isset($values['uri']) ) {
163
- // did we toggle the option?
164
- $changed = true;
165
- if ( isset($old[$key]) ) {
166
- $old_active = isset($old[$key]['active']) ? $old[$key]['active'] : '';
167
- $new_active = isset($new[$key]['active']) ? $new[$key]['active'] : '';
168
- if ( $old_active == $new_active )
169
- $changed = false;
170
- }
171
-
172
- if ( $changed ) {
173
- // then change the ping_sites list according to option
174
- if ( !empty($new[$key]['active']) && strpos($update_services,untrailingslashit($values['uri'])) === false )
175
- $update_services_new .= "\n" . $values['uri'];
176
- elseif ( empty($new[$key]['active']) && strpos($update_services,untrailingslashit($values['uri'])) !== false )
177
- $update_services_new = str_replace(array(trailingslashit($values['uri']),untrailingslashit($values['uri'])),'',$update_services_new);
178
- } else {
179
- // or change the option according to ping_sites
180
- if ( strpos($update_services,untrailingslashit($values['uri'])) !== false )
181
- $new[$key]['active'] = '1';
182
- else
183
- unset($new[$key]['active']);
184
- }
185
- }
186
- if ( is_array($new[$key]) ) {
187
- $sanitized += array( $key => $new[$key] );
188
- }
189
- }
190
-
191
- if($update_services_new != $update_services)
192
- update_option('ping_sites',$update_services_new);
193
-
194
- return $sanitized;
195
- }
196
-
197
- /* ROBOTS */
198
-
199
- public function robots_settings_field() {
200
- echo '
201
- <fieldset><legend class="screen-reader-text">'.__('Additional robots.txt rules','xml-sitemap-feed').'</legend>
202
- <label>'.sprintf(__('Rules that will be appended to the %s generated by WordPress:','xml-sitemap-feed'),'<a href="'.trailingslashit(get_bloginfo('url')).'robots.txt" target="_blank">robots.txt</a>').'<br><textarea name="'.$this->prefix.'robots" id="xmlsf_robots" class="large-text" cols="50" rows="6" />'.esc_attr( parent::get_robots() ).'</textarea></label>
203
- <p class="description">'.__('These rules will not have effect when you are using a static robots.txt file.','xml-sitemap-feed').'<br><span style="color: red" class="warning">'.__('Only add rules here when you know what you are doing, otherwise you might break search engine access to your site.','xml-sitemap-feed').'</span></p>
204
- </fieldset>';
205
- }
206
-
207
- public function reset_settings_field() {
208
- echo '
209
- <fieldset><legend class="screen-reader-text">'.__('Reset XML sitemaps','xml-sitemap-feed').'</legend>
210
- <label><input type="checkbox" name="'.$this->prefix.'sitemaps[reset]" value="1" onchange="if(this.checked){if(!confirm(\''.
211
- __('Selecting this will clear all XML Sitemap & Google News Sitemap settings after Save Changes. Are you sure?','xml-sitemap-feed').'\')){this.checked=false}}" /> '.
212
- __('Clear all XML Sitemap & Google News Sitemap settings.','xml-sitemap-feed').'</label>
213
- </fieldset>';
214
- echo '
215
- <p class="description">'.__('Check this option and Save Changes to start fresh with the default settings.','xml-sitemap-feed').'</p>';
216
- }
217
-
218
- /**
219
- * XML SITEMAP SECTION
220
- */
221
-
222
- public function xml_sitemap_settings() {
223
- echo '<p><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feeds&item_number='.XMLSF_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8" title="'.
224
- sprintf(__('Donate to keep the free %s plugin development & support going!','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:4px 0 0 10px" alt="'.
225
- sprintf(__('Donate to keep the free %s plugin development & support going!','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'" width="92" height="26" /></a>'.
226
- sprintf(__('These settings control the XML Sitemaps generated by the %s plugin.','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).' '.
227
- sprintf(__('For ping options, go to %s.','xml-sitemap-feed'),'<a href="options-writing.php">'.translate('Writing Settings').'</a>').'</p>';
228
- }
229
-
230
- public function post_types_settings_field() {
231
- $options = parent::get_post_types();
232
- $defaults = parent::defaults('post_types');
233
- $do_note = false;
234
-
235
- $post_types = get_post_types(array('public'=>true),'objects');
236
- if ( !is_array($post_types) || is_wp_error($post_types) )
237
- return;
238
-
239
- echo '<fieldset id="xmlsf_post_types"><legend class="screen-reader-text">'.__('XML Sitemaps for post types','xml-sitemap-feed').'</legend>
240
- ';
241
- foreach ( $post_types as $post_type ) {
242
- // skip unallowed post types
243
- if (in_array($post_type->name,parent::disabled_post_types()))
244
- continue;
245
-
246
- $count = wp_count_posts( $post_type->name );
247
-
248
- echo '
249
- <input type="hidden" name="'.$this->prefix.'post_types['.
250
- $post_type->name.'][name]" value="'.
251
- $post_type->name.'" />';
252
-
253
- echo '
254
- <label><input type="checkbox" name="'.$this->prefix.'post_types['.
255
- $post_type->name.'][active]" id="xmlsf_post_types_'.
256
- $post_type->name.'" value="1" '.
257
- checked( !empty($options[$post_type->name]["active"]), true, false).' /> '.
258
- $post_type->label.'</label> ('.
259
- $count->publish.')';
260
-
261
- if (!empty($options[$post_type->name]['active'])) {
262
-
263
- echo ' &nbsp;&ndash;&nbsp; <span class="description"><a id="xmlsf_post_types_'.$post_type->name.'_link" href="#xmlsf_post_types_'.$post_type->name.'_settings">'.translate('Settings').'</a></span><br>
264
- <script type="text/javascript">
265
- jQuery( document ).ready( function() {
266
- jQuery("#xmlsf_post_types_'.$post_type->name.'_settings").hide();
267
- jQuery("#xmlsf_post_types_'.$post_type->name.'_link").click( function(event) {
268
- event.preventDefault();
269
- jQuery("#xmlsf_post_types_'.$post_type->name.'_settings").toggle("slow");
270
- });
271
- });
272
- </script>
273
- <ul style="margin-left:18px" id="xmlsf_post_types_'.$post_type->name.'_settings">';
274
-
275
-
276
- if ( isset($defaults[$post_type->name]['archive']) ) {
277
- $archives = array (
278
- 'yearly' => __('Year','xml-sitemap-feed'),
279
- 'monthly' => __('Month','xml-sitemap-feed')
280
- );
281
- $archive = !empty($options[$post_type->name]['archive']) ? $options[$post_type->name]['archive'] : $defaults[$post_type->name]['archive'];
282
- echo '
283
- <li><label>'.__('Split by','xml-sitemap-feed').' <select name="'.$this->prefix.'post_types['.
284
- $post_type->name.'][archive]" id="xmlsf_post_types_'.
285
- $post_type->name.'_archive">
286
- <option value="">'.translate('None').'</option>';
287
- foreach ($archives as $value => $translation)
288
- echo '
289
- <option value="'.$value.'" '.
290
- selected( $archive == $value, true, false).
291
- '>'.$translation.'</option>';
292
- echo '</select>
293
- </label> <span class="description"> '.__('Split by year if you experience errors or slow sitemaps. In very rare cases, split by month is needed.','xml-sitemap-feed').'</span></li>';
294
- }
295
-
296
- $priority_val = !empty($options[$post_type->name]['priority']) ? $options[$post_type->name]['priority'] : $defaults[$post_type->name]['priority'];
297
- echo '
298
- <li><label>'.__('Priority','xml-sitemap-feed').' <input type="number" step="0.1" min="0.1" max="0.9" name="'.$this->prefix.'post_types['.
299
- $post_type->name.'][priority]" id="xmlsf_post_types_'.
300
- $post_type->name.'_priority" value="'.$priority_val.'" class="small-text"></label> <span class="description">'.__('Priority can be overridden on individual posts.','xml-sitemap-feed').' *</span></li>';
301
-
302
- echo '
303
- <li><label><input type="checkbox" name="'.$this->prefix.'post_types['.
304
- $post_type->name.'][dynamic_priority]" value="1" '.
305
- checked( !empty($options[$post_type->name]['dynamic_priority']), true, false).' /> '.__('Automatic Priority calculation.','xml-sitemap-feed').'</label> <span class="description">'.__('Adjusts the Priority based on factors like age, comments, sticky post or blog page. Individual posts with fixed Priority will always keep that value.','xml-sitemap-feed').'</span></li>';
306
-
307
- echo '
308
- <li><label><input type="checkbox" name="'.$this->prefix.'post_types['.
309
- $post_type->name.'][update_lastmod_on_comments]" value="1" '.
310
- checked( !empty($options[$post_type->name]["update_lastmod_on_comments"]), true, false).' /> '.__('Update Lastmod on comments.','xml-sitemap-feed').'</label> <span class="description">'.__('Set this if discussion on your site warrants reindexation upon each new comment.','xml-sitemap-feed').'</li>';
311
-
312
- $image = isset($options[$post_type->name]['tags']['image']) ? $options[$post_type->name]['tags']['image'] : $defaults[$post_type->name]['tags']['image'];
313
- $context = ( $post_type->name === 'page' ) ? 'page' : 'post';
314
- echo '
315
- <li><label>'.__('Add image tags for','xml-sitemap-feed').' <select name="'.$this->prefix.'post_types['.
316
- $post_type->name.'][tags][image]">
317
- <option value="">'.translate('None').'</option>
318
- <option value="featured" '.
319
- selected( $image == "featured", true, false).
320
- '>'.translate_with_gettext_context('Featured Image',$context).'</option>
321
- <option value="attached" '.
322
- selected( $image == "attached", true, false).
323
- '>'.__('Attached images','xml-sitemap-feed').'</option>
324
- </select></label></li>
325
-
326
- </ul>';
327
- } else {
328
- echo '<br>';
329
- }
330
- }
331
-
332
- echo '
333
- <p class="description">* '.__('Priority settings do not affect ranking in search results in any way. They are only meant to suggest search engines which URLs to index first. Once a URL has been indexed, its Priority becomes meaningless until its Lastmod is updated.','xml-sitemap-feed').' <a href="#xmlsf_post_types_note_1_more" id="xmlsf_post_types_note_1_link">'.translate('Read more...').'</a>
334
- <span id="xmlsf_post_types_note_1_more">'.__('Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count.','xml-sitemap-feed').' '.__('Priority values are taken as relative values. Setting all to the same (high) value is pointless.','xml-sitemap-feed').'</span></p>
335
- <script type="text/javascript">
336
- jQuery( document ).ready( function() {
337
- jQuery("#xmlsf_post_types_note_1_more").hide();
338
- jQuery("#xmlsf_post_types_note_1_link").click( function(event) {
339
- event.preventDefault();
340
- jQuery("#xmlsf_post_types_note_1_link").hide();
341
- jQuery("#xmlsf_post_types_note_1_more").show("slow");
342
- });
343
- });
344
- </script>';
345
- echo '
346
- </fieldset>';
347
- }
348
-
349
- public function taxonomies_settings_field() {
350
- $options = parent::get_taxonomies();
351
- $active = parent::get_option('post_types');
352
- $output = '';
353
-
354
- foreach ( get_taxonomies(array('public'=>true),'objects') as $taxonomy ) {
355
- // skip unallowed post types
356
- if (in_array($taxonomy->name,parent::disabled_taxonomies()))
357
- continue;
358
-
359
- $skip = true;
360
- foreach ( $taxonomy->object_type as $post_type)
361
- if (!empty($active[$post_type]['active']) && $active[$post_type]['active'] == '1')
362
- $skip = false;
363
- if ($skip) continue; // skip if none of the associated post types are active
364
-
365
- $count = wp_count_terms( $taxonomy->name );
366
- $output .= '
367
- <label><input type="checkbox" name="'.$this->prefix.'taxonomies['.
368
- $taxonomy->name.']" id="xmlsf_taxonomies_'.
369
- $taxonomy->name.'" value="'.
370
- $taxonomy->name.'"'.
371
- checked(in_array($taxonomy->name,$options), true, false).' /> '.
372
- $taxonomy->label.'</label> ('.
373
- $count.') ';
374
-
375
- // if ( in_array($taxonomy->name,$options) && empty($taxonomy->show_tagcloud) )
376
- // echo '<span class="description error" style="color: red">'.__('This taxonomy type might not be suitable for public use. Please check the urls in the taxonomy sitemap.','xml-sitemap-feed').'</span>';
377
-
378
- $output .= '
379
- <br>';
380
- }
381
-
382
- if ($output) {
383
- echo '
384
- <fieldset id="xmlsf_taxonomies"><legend class="screen-reader-text">'.__('XML Sitemaps for taxonomies','xml-sitemap-feed').'</legend>
385
- ';
386
-
387
- echo $output;
388
-
389
- echo '
390
- <p class="description">'.__('It is generally not recommended to include taxonomy pages, unless their content brings added value.','xml-sitemap-feed').' <a href="#xmlsf_taxonomies_note_1_more" id="xmlsf_taxonomies_note_1_link">'.translate('Read more...').'</a>
391
- <span id="xmlsf_taxonomies_note_1_more">'.__('For example, when you use category descriptions with information that is not present elsewhere on your site or if taxonomy pages list posts with an excerpt that is different from, but complementary to the post content. In these cases you might consider including certain taxonomies. Otherwise, if you fear <a href="http://moz.com/learn/seo/duplicate-content">negative affects of duplicate content</a> or PageRank spread, you might even consider disallowing indexation of taxonomies.','xml-sitemap-feed').' '.
392
- sprintf(__('You can do this by adding specific robots.txt rules in the %s field above.','xml-sitemap-feed'),'<strong>'.__('Additional robots.txt rules','xml-sitemap-feed').'</strong>');
393
- echo '</span></p>
394
- <script type="text/javascript">
395
- jQuery( document ).ready( function() {
396
- jQuery("#xmlsf_taxonomies_note_1_more").hide();
397
- jQuery("#xmlsf_taxonomies_note_1_link").click( function(event) {
398
- event.preventDefault();
399
- jQuery("#xmlsf_taxonomies_note_1_link").hide();
400
- jQuery("#xmlsf_taxonomies_note_1_more").show("slow");
401
- });
402
- });
403
- </script>
404
- </fieldset>';
405
- } else {
406
- echo '
407
- <p style="color: red" class="warning">'.__('No taxonomies available for the currently included post types.','xml-sitemap-feed').'</p>';
408
- }
409
- }
410
-
411
- public function custom_sitemaps_settings_field() {
412
- $lines = parent::get_custom_sitemaps();
413
-
414
- echo '
415
- <fieldset><legend class="screen-reader-text">'.__('Include custom XML Sitemaps','xml-sitemap-feed').'</legend>
416
- <label>'.__('Additional XML Sitemaps to append to the main XML Sitemap Index:','xml-sitemap-feed').'<br>
417
- <textarea name="'.$this->prefix.'custom_sitemaps" id="xmlsf_custom_sitemaps" class="large-text" cols="50" rows="4" />'. implode("\n",$lines) .'</textarea></label>
418
- <p class="description">'.__('Add the full URL, including protocol (http/https) and domain, of any XML Sitemap that you want to append to the Sitemap Index. Start each URL on a new line.','xml-sitemap-feed').'<br><span style="color: red" class="warning">'.__('Only valid sitemaps are allowed in the Sitemap Index. Use your Google/Bing Webmaster Tools to verify!','xml-sitemap-feed').'</span></p>
419
- </fieldset>';
420
-
421
- }
422
-
423
- public function urls_settings_field() {
424
- $urls = parent::get_urls();
425
- $lines = array();
426
-
427
- if(!empty($urls)) {
428
- foreach($urls as $arr) {
429
- if(is_array($arr))
430
- $lines[] = implode(" ",$arr);
431
- }
432
- }
433
-
434
- echo '
435
- <fieldset><legend class="screen-reader-text">'.__('Include custom URLs','xml-sitemap-feed').'</legend>
436
- <label>'.__('Additional URLs to append in an extra XML Sitemap:','xml-sitemap-feed').'<br>
437
- <textarea name="'.$this->prefix.'urls" id="xmlsf_urls" class="large-text" cols="50" rows="4" />'. implode("\n",$lines) .'</textarea></label>
438
- <p class="description">'.__('Add the full URL, including protocol (http/https) and domain, of any (static) page that you want to append to the ones already included by WordPress. Optionally add a priority value between 0 and 1, separated with a space after the URL. Start each URL on a new line.','xml-sitemap-feed').'</p>
439
- </fieldset>';
440
-
441
- }
442
-
443
- public function domains_settings_field() {
444
- $default = parent::domain();
445
- $domains = (array) parent::get_option('domains');
446
-
447
- echo '
448
- <fieldset><legend class="screen-reader-text">'.__('Allowed domains','xml-sitemap-feed').'</legend>
449
- <label>'.__('Additional domains to allow in the XML Sitemaps:','xml-sitemap-feed').'<br><textarea name="'.$this->prefix.'domains" id="xmlsf_domains" class="large-text" cols="50" rows="4" />'. implode("\n",$domains) .'</textarea></label>
450
- <p class="description">'.sprintf(__('By default, only the domain %s as used in your WordPress site address is allowed. This means that all URLs that use another domain (custom URLs or using a plugin like Page Links To) are filtered from the XML Sitemap. However, if you are the verified owner of other domains in your Google/Bing Webmaster Tools account, you can include these in the same sitemap. Add these domains, without protocol (http/https) each on a new line. Note that if you enter a domain with www, all URLs without it or with other subdomains will be filtered.','xml-sitemap-feed'),'<strong>'.$default.'</strong>').'</p>
451
- </fieldset>';
452
-
453
- }
454
-
455
-
456
- /**
457
- * GOOGLE NEWS SITEMAP SECTION
458
- */
459
-
460
- public function news_sitemap_settings() {
461
- echo '<p><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feeds&item_number='.XMLSF_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8" title="'.
462
- sprintf(__('Donate to keep the free %s plugin development & support going!','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:4px 0 0 10px" alt="'.
463
- sprintf(__('Donate to keep the free %s plugin development & support going!','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'" width="92" height="26" /></a>'.
464
- sprintf(__('These settings control the Google News Sitemap generated by the %s plugin.','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).' '.
465
- __('When you are done configuring and preparing your news content and you are convinced your site adheres to the <a href="https://support.google.com/news/publisher/answer/40787" target="_blank">Google News guidelines</a>, go ahead and <a href="https://partnerdash.google.com/partnerdash/d/news" target="_blank">submit your site for inclusion</a>!','xml-sitemap-feed').' '.
466
- __('It is strongly recommended to submit your news sitemap to your Google Webmasters Tools account to monitor for warnings or errors. Read more on how to <a href="https://support.google.com/webmasters/answer/183669" target="_blank">Manage sitemaps with the Sitemaps page</a>.','xml-sitemap-feed').' '.
467
- sprintf(__('For ping options, go to %s.','xml-sitemap-feed'),'<a href="options-writing.php">'.translate('Writing Settings').'</a>').'</p>';
468
-
469
- }
470
-
471
- //TODO: publication name allow tag %category% ... post_types (+ exclusion per post or none + allow inclusion per post), limit to category ...
472
- public function news_name_field() {
473
- $options = parent::get_option('news_tags');
474
-
475
- $name = !empty($options['name']) ? $options['name'] : '';
476
- echo '
477
- <fieldset><legend class="screen-reader-text">'.__('Publication name','xml-sitemap-feed').'</legend>
478
- <input type="text" name="'.$this->prefix.'news_tags[name]" id="xmlsf_news_name" value="'.$name.'" class="regular-text"> <span class="description">'.sprintf(__('By default, the general %s setting will be used.','xml-sitemap-feed'),'<a href="options-general.php">'.translate('Site Title').'</a>').'</span><p class="description">' .
479
- __('The publication name should match the name submitted on the Google News Publisher Center. If you wish to change it, please read <a href="https://support.google.com/news/publisher/answer/40402" target="_blank">Updated publication name</a>.','xml-sitemap-feed') . '</p>
480
- </fieldset>';
481
- }
482
-
483
- public function news_post_type_field() {
484
- $defaults = parent::defaults('news_tags');
485
- $options = parent::get_option('news_tags');
486
-
487
- $news_post_type = isset($options['post_type']) && !empty($options['post_type']) ? $options['post_type'] : $defaults['post_type'];
488
-
489
- $post_types = get_post_types(array('publicly_queryable' =>true),'objects');
490
-
491
-
492
- // check for valid post types
493
- if ( !is_array($post_types) || empty($post_types) || is_wp_error($post_types) ) {
494
- echo '
495
- <p style="color: red" class="error">'.__('Error: There where no valid post types found. Without at least one public post type, a Google News Sitemap cannot be created by this plugin. Please deselect the option Google News Sitemap at <a href="#xmlsf_sitemaps">Enable XML sitemaps</a> and choose another method.','xml-sitemap-feed').'</p>';
496
- } else {
497
- echo '
498
- <fieldset><legend class="screen-reader-text">'.__('Include post types','xml-sitemap-feed').'</legend>';
499
-
500
- foreach ( $post_types as $post_type ) {
501
- // skip unallowed post types
502
- if ( !is_object($post_type) || in_array($post_type->name,parent::disabled_post_types()) )
503
- continue;
504
-
505
- $checked = in_array($post_type->name,$news_post_type) ? true : false;
506
- $disabled = false;
507
- if ( isset($options['categories']) && is_array($options['categories']) ) {
508
- // need to disable all post types that do not have the category taxonomy
509
- $taxonomies = get_object_taxonomies($post_type->name,'names');
510
- if ( !in_array('category',(array)$taxonomies) ) {
511
- $disabled = true;
512
- $checked = false;
513
- }
514
- }
515
-
516
- echo '
517
- <label><input type="checkbox" name="'.$this->prefix.'news_tags[post_type][]" id="xmlsf_post_type_'.
518
- $post_type->name.'" value="'.$post_type->name.'" '.
519
- checked( $checked, true, false).' '.
520
- disabled( $disabled, true, false).' /> '.
521
- $post_type->label.'</label><br>';
522
- }
523
- echo '
524
- <p class="description">'.sprintf(__('At least one post type must be selected. By default, the post type %s will be used.','xml-sitemap-feed'),translate('Posts')).'</p>
525
- </fieldset>';
526
- }
527
-
528
- }
529
-
530
- public function news_categories_field() {
531
- $options = parent::get_option('news_tags');
532
-
533
- if ( !empty($options['post_type']) && array( 'post' ) !== (array)$options['post_type'] ) {
534
- echo '
535
- <p class="description">' . sprintf(__('Selection based on categories will be available when <strong>only</strong> the post type %s is included above.','xml-sitemap-feed'),translate('Posts')) . '</p>';
536
- return;
537
- }
538
-
539
- $all_categories = get_terms( 'category', array('hide_empty' => 0,'hierachical' => true) );
540
- $selected_categories = isset($options['categories']) && is_array($options['categories']) ? $options['categories'] : array();
541
- $count = count($all_categories);
542
-
543
- if ($count==0) {
544
- echo '
545
- <p class="description">' . translate('No categories') . '</p>';
546
- return;
547
- } else {
548
- echo '
549
- <fieldset><legend class="screen-reader-text">'.translate('Categories').'</legend>';
550
-
551
- $size = $count < 15 ? $count : 15;
552
- echo '
553
- <label>'.__('Limit to posts in these post categories:','xml-sitemap-feed').'<br>
554
- <select multiple name="'.$this->prefix.'news_tags[categories][]" size="'.$size.'">';
555
-
556
- foreach($all_categories as $category) {
557
- $depth = count( explode( '%#%', get_category_parents($category, false, '%#%') ) ) - 2;
558
- $pad = str_repeat('&nbsp;', $depth * 3);
559
-
560
- $cat_name = apply_filters('list_cats', $category->name, $category);
561
- echo '
562
- <option class="depth-'.$depth.'" value="'.$category->term_id.'" '.
563
- selected( in_array($category->term_id,$selected_categories), true, false ).
564
- '>'.$pad.$cat_name.'</option>';
565
- }
566
- echo '
567
- </select>
568
- </label>
569
- <p class="description">'.__('If you wish to limit posts that will feature in your News Sitemap to certain categories, select them here. If no categories are selected, posts of all categories will be included in your News Sitemap.','xml-sitemap-feed').' '.__('Use the Ctrl/Cmd key plus click to select more than one or to deselect.','xml-sitemap-feed');
570
- echo '
571
- </fieldset>';
572
- }
573
- }
574
-
575
- public function news_image_field() {
576
- $options = parent::get_option('news_tags');
577
-
578
- $image = !empty($options['image']) ? $options['image'] : '';
579
- echo '
580
- <fieldset><legend class="screen-reader-text">'.translate('Images').'</legend>
581
- <label>'.__('Add image tags for','xml-sitemap-feed').' <select name="'.$this->prefix.'news_tags[image]">
582
- <option value="">'.translate('None').'</option>
583
- <option value="featured" '.
584
- selected( $image == "featured", true, false).
585
- '>'.translate_with_gettext_context('Featured Image','post').'</option>
586
- <option value="attached" '.
587
- selected( $image == "attached", true, false).
588
- '>'.__('Attached images','xml-sitemap-feed').'</option>
589
- ';
590
- echo '</select></label>
591
- <p class="description">'.__('Note: Google News prefers at most one image per article in the News Sitemap. If multiple valid images are specified, the crawler will have to pick one arbitrarily. Images in News Sitemaps should be in jpeg or png format.','xml-sitemap-feed').' <a href="https://support.google.com/news/publisher/answer/13369" target="_blank">'.translate('Read more...').'</a></p>
592
- </fieldset>';
593
- }
594
-
595
- public function news_labels_field() {
596
- echo '
597
- <fieldset id="xmlsf_news_labels"><legend class="screen-reader-text">' . __('Source labels','xml-sitemap-feed') . '</legend>
598
- <p>' . __('Source labels provide more information about the content of your articles.','xml-sitemap-feed') . '</p>';
599
-
600
- $options = parent::get_option('news_tags');
601
-
602
- // access tag
603
- $access = !empty($options['access']) ? $options['access'] : '';
604
- $access_default = !empty($access['default']) ? $access['default'] : '';
605
- $access_password = !empty($access['password']) ? $access['password'] : '';
606
- echo '
607
- <fieldset id="xmlsf_news_labels_access"><legend class="screen-reader-text">&lt;access&gt;</legend>
608
- <p>'.sprintf(__('The %4$s tag specifies whether an article is available to all readers (%1$s), or only to those with a free (%2$s) or paid membership (%3$s) to your site.','xml-sitemap-feed'),translate('Public'),__('Registration','xml-sitemap-feed'),__('Subscription','xml-sitemap-feed'),'<strong>&lt;access&gt;</strong>').'
609
- '.__('You can assign a different access level when writing a post.','xml-sitemap-feed') . '</p>
610
- <ul>';
611
-
612
- echo '
613
- <li><label>'.__('Tag normal posts as','xml-sitemap-feed').' <select name="'.$this->prefix.'news_tags[access][default]" id="xmlsf_news_tags_access_default">
614
- <option value="">'.translate('Public').'</option>
615
- <option value="Registration" '.selected( "Registration" == $access_default, true, false).'>'.__('Free registration','xml-sitemap-feed').'</option>
616
- <option value="Subscription" '.selected( "Subscription" == $access_default, true, false).'>'.__('Paid subscription','xml-sitemap-feed').'</option>
617
- </select></label></li>';
618
- echo '
619
- <li><label>'.__('Tag Password Protected posts as','xml-sitemap-feed').' <select name="'.$this->prefix.'news_tags[access][password]" id="xmlsf_news_tags_access_password">
620
- <option value="Registration" '.selected( "Registration" == $access_password, true, false).'>'.__('Free registration','xml-sitemap-feed').'</option>
621
- <option value="Subscription" '.selected( "Subscription" == $access_password, true, false).'>'.__('Paid subscription','xml-sitemap-feed').'</option>
622
- </select></label></li>';
623
- echo '
624
- </ul>
625
- </fieldset>';
626
-
627
- // genres tag
628
- $gn_translations = array(
629
- 'PressRelease' => __('PressRelease','xml-sitemap-feed'),
630
- 'Satire' => __('Satire','xml-sitemap-feed'),
631
- 'Blog' => __('Blog','xml-sitemap-feed'),
632
- 'OpEd' => __('OpEd','xml-sitemap-feed'),
633
- 'Opinion' => __('Opinion','xml-sitemap-feed'),
634
- 'UserGenerated' => __('UserGenerated','xml-sitemap-feed'),
635
- 'FactCheck' => __('FactCheck','xml-sitemap-feed')
636
- );
637
- $genres = !empty($options['genres']) ? $options['genres'] : array();
638
- $genres_default = !empty($genres['default']) ? (array)$genres['default'] : array();
639
-
640
- echo '
641
- <fieldset id="xmlsf_news_labels_genres"><legend class="screen-reader-text">&lt;genres&gt;</legend>
642
- <p>'.sprintf(__('The %s tag specifies one or more properties for an article, namely, whether it is a press release, a blog post, an opinion, an op-ed piece, user-generated content, or satire.','xml-sitemap-feed'),'<strong>&lt;genres&gt;</strong>').' '.__('You can assign different genres when writing a post.','xml-sitemap-feed');
643
-
644
- echo '</p>
645
- <p class="description">'.__('Use Ctrl plus click to select more than one or to deselect.','xml-sitemap-feed').' '.__('The FactCheck label may be applied if you publish stories with fact-checking content that\'s indicated by schema.org ClaimReview markup.','xml-sitemap-feed').' '.sprintf(__('Read more about source labels on %s','xml-sitemap-feed'),'<a href="https://support.google.com/news/publisher/answer/4582731" target="_blank">'.__('What does each source label mean?','xml-sitemap-feed').'</a>').'</p>
646
- <ul>
647
- <li><label>'.__('Default genre:','xml-sitemap-feed').'<br><select multiple name="'.$this->prefix.'news_tags[genres][default][]" id="xmlsf_news_tags_genres_default" size="'.count($this->gn_genres).'">';
648
- foreach ( $this->gn_genres as $name ) {
649
- echo '<option value="'.$name.'" '.selected( in_array($name,$genres_default), true, false ).'>' . ( isset($gn_translations[$name]) && !empty($gn_translations[$name]) ? $gn_translations[$name] : $name ) . '&nbsp;</option>';
650
- }
651
- echo '
652
- </select></label></li>
653
- </ul>
654
- </fieldset>';
655
-
656
- // keywords
657
- $keywords = !empty($options['keywords']) ? $options['keywords'] : array();
658
- $keywords_from = !empty($keywords['from']) ? $keywords['from'] : '';
659
- echo '
660
- <fieldset id="xmlsf_news_keywords"><legend class="screen-reader-text">&lt;keywords&gt;</legend>
661
- <p>'.sprintf(__('The %s tag is used to help classify the articles you submit to Google News by <strong>topic</strong>.','xml-sitemap-feed'),'<strong>&lt;keywords&gt;</strong>').'</p>
662
- <ul>
663
- <li><label>'.sprintf(__('Use %s for topics.','xml-sitemap-feed'),' <select name="'.$this->prefix.'news_tags[keywords][from]" id="xmlsf_news_tags_keywords_from">
664
- <option value="">'.translate('None').'</option>
665
- <option value="category" '.selected( "category" == $keywords_from, true, false).'>'.translate('Categories').'</option>
666
- <option value="post_tag" '.selected( "post_tag" == $keywords_from, true, false).'>'.translate('Tags').'</option>
667
- </select>').'</label></li>';
668
- if ("category" !== $keywords_from) {
669
- echo '
670
- <li><label>'.__('Default topic(s):','xml-sitemap-feed').' <input type="text" name="'.$this->prefix.'news_tags[keywords][default]" id="xmlsf_news_tags_keywords_default" value="';
671
- echo !empty($keywords['default']) ? $keywords['default'] : '';
672
- echo '" class="regular-text"></label> <span class="description">'.__('Separate with a comma.','xml-sitemap-feed').'</span></li>';
673
- }
674
- echo '
675
- </ul>
676
- <p class="description">'.__('Keywords may be drawn from, but are not limited to, the list of <a href="https://support.google.com/news/publisher/answer/116037" target="_blank">existing Google News keywords</a>.','xml-sitemap-feed').'</p>
677
- </fieldset>';
678
- }
679
-
680
- //sanitize callback functions
681
-
682
- public function sanitize_robots_settings($new) {
683
- // clean up input
684
- if(is_array($new)) {
685
- $new = array_filter($new);
686
- $new = reset($new);
687
- }
688
- return trim(strip_tags($new));
689
- }
690
-
691
- public function sanitize_sitemaps_settings($new) {
692
- $old = parent::get_sitemaps();
693
-
694
- if (isset($new['reset']) && $new['reset'] == '1') // if reset is checked, set transient to clear all settings
695
- set_transient('xmlsf_clear_settings','');
696
-
697
- if( '1' == get_option('blog_public') ) {
698
- if ($old != $new && !isset($new['reset'])) // when sitemaps are added or removed, set transient to flush rewrite rules
699
- set_transient('xmlsf_flush_rewrite_rules','');
700
-
701
- if (empty($old['sitemap-news']) && !empty($new['sitemap-news']))
702
- set_transient('xmlsf_create_genres','');
703
-
704
- $sanitized = $new;
705
- } else {
706
- $sanitized = $old;
707
- }
708
-
709
- return $sanitized;
710
- }
711
-
712
- public function sanitize_post_types_settings( $new = array() ) {
713
- $old = parent::get_post_types();
714
- $defaults = parent::defaults('post_types');
715
- $sanitized = $new;
716
-
717
- foreach ($new as $post_type => $settings) {
718
- // when post types are (de)activated, set transient to flush rewrite rules
719
- if ( ( !empty($old[$post_type]['active']) && empty($settings['active']) ) || ( empty($old[$post_type]['active']) && !empty($settings['active']) ) )
720
- set_transient('xmlsf_flush_rewrite_rules','');
721
-
722
- if ( isset($settings['priority']) && is_numeric($settings['priority']) )
723
- $sanitized[$post_type]['priority'] = $this->sanitize_priority($settings['priority'],0.1,0.9);
724
- else
725
- $sanitized[$post_type]['priority'] = $defaults[$post_type]['priority'];
726
- }
727
-
728
- return $sanitized;
729
- }
730
-
731
- private function sanitize_priority($priority, $min = 0.0, $max = 1.0) {
732
- $priority = floatval(str_replace(",",".",$priority));
733
- if ($priority <= (float)$min)
734
- return number_format($min,1);
735
- elseif ($priority >= (float)$max)
736
- return number_format($max,1);
737
- else
738
- return number_format($priority,1);
739
- }
740
-
741
- public function sanitize_taxonomies_settings($new) {
742
- $old = parent::get_taxonomies();
743
-
744
- if ($old != $new) // when taxonomy types are added or removed, set transient to flush rewrite rules
745
- set_transient('xmlsf_flush_rewrite_rules','');
746
-
747
- return $new;
748
- }
749
-
750
- public function sanitize_custom_sitemaps_settings($new) {
751
- $old = parent::get_custom_sitemaps();
752
- $callback = create_function('$a','return filter_var($a,FILTER_VALIDATE_URL);');
753
-
754
- // clean up input
755
- if(is_array($new)) {
756
- $new = array_filter($new);
757
- $new = reset($new);
758
- }
759
- $input = $new ? explode("\n",trim(strip_tags($new))) : array();
760
-
761
- // build sanitized output
762
- $sanitized = array();
763
- foreach ($input as $line) {
764
- $line = filter_var(esc_url(trim($line)),FILTER_VALIDATE_URL,FILTER_FLAG_PATH_REQUIRED);
765
- if(!empty($line))
766
- $sanitized[] = $line;
767
- }
768
-
769
- return $sanitized;
770
- }
771
-
772
- public function sanitize_urls_settings($new) {
773
- $old = parent::get_urls();
774
-
775
- // clean up input
776
- if(is_array($new)) {
777
- $new = array_filter($new);
778
- $new = reset($new);
779
- }
780
- $input = $new ? explode("\n",trim(strip_tags($new))) : array();
781
-
782
- // build sanitized output
783
- $sanitized = array();
784
- $callback = create_function('$a','return filter_var($a,FILTER_VALIDATE_URL) || is_numeric($a);');
785
-
786
- foreach ($input as $line) {
787
- if(empty($line))
788
- continue;
789
-
790
- $arr = array_values(array_filter(explode(" ",trim($line)),$callback));
791
-
792
- if(isset($arr[0])) {
793
- if(isset($arr[1]))
794
- $arr[1] = $this->sanitize_priority($arr[1]);
795
- else
796
- $arr[1] = '0.5';
797
-
798
- $sanitized[] = array( esc_url($arr[0]) , $arr[1] );
799
- }
800
- }
801
-
802
- if (empty($old)) {
803
- if (!empty($sanitized))
804
- set_transient('xmlsf_flush_rewrite_rules','');
805
- } else if (empty($sanitized)) {
806
- set_transient('xmlsf_flush_rewrite_rules','');
807
- }
808
-
809
- return (!empty($sanitized)) ? $sanitized : '';
810
- }
811
-
812
- public function sanitize_domains_settings($new) {
813
- $default = parent::domain();
814
-
815
- // clean up input
816
- if(is_array($new)) {
817
- $new = array_filter($new);
818
- $new = reset($new);
819
- }
820
- $input = $new ? explode("\n",trim(strip_tags($new))) : array();
821
-
822
- // build sanitized output
823
- $sanitized = array();
824
- foreach ($input as $line) {
825
- $line = trim($line);
826
- $parsed_url = parse_url(trim(filter_var($line,FILTER_SANITIZE_URL)));
827
- // Before PHP version 5.4.7, parse_url will return the domain as path when scheme is omitted so we do:
828
- if ( !empty($parsed_url['host']) ) {
829
- $domain = trim( $parsed_url['host'] );
830
- } else {
831
- $domain_arr = explode('/', $parsed_url['path']);
832
- $domain_arr = array_filter($domain_arr);
833
- $domain = array_shift( $domain_arr );
834
- $domain = trim( $domain );
835
- }
836
-
837
- // filter out empties and default domain
838
- if(!empty($domain) && $domain !== $default && strpos($domain,".".$default) === false)
839
- $sanitized[] = $domain;
840
- }
841
-
842
- return (!empty($sanitized)) ? $sanitized : '';
843
- }
844
-
845
- public function sanitize_news_tags_settings($new) {
846
- // TODO default post type : to 'post' when none are selected
847
- return $new;
848
- }
849
-
850
-
851
- // action links
852
-
853
- public function add_action_link( $links ) {
854
- $settings_link = '<a href="' . admin_url('options-reading.php') . '#blog_public">' . translate('Settings') . '</a>';
855
- array_unshift( $links, $settings_link );
856
- return $links;
857
- }
858
-
859
- /**
860
- * META BOXES
861
- */
862
-
863
- /* Adds a XML Sitemap box to the side column */
864
- public function add_meta_box () {
865
- foreach ( parent::get_post_types() as $post_type ) {
866
- // Only include metaboxes on post types that are included
867
- if (isset($post_type["active"]))
868
- add_meta_box(
869
- 'xmlsf_section',
870
- __( 'XML Sitemap', 'xml-sitemap-feed' ),
871
- array($this,'meta_box'),
872
- $post_type['name'],
873
- 'side',
874
- 'low'
875
- );
876
- }
877
- }
878
-
879
- public function meta_box($post) {
880
- // Use nonce for verification
881
- wp_nonce_field( $this->plugin_basename, 'xmlsf_sitemap_nonce' );
882
-
883
- // The actual fields for data entry
884
- // Use get_post_meta to retrieve an existing value from the database and use the value for the form
885
- $exclude = get_post_meta( $post->ID, '_xmlsf_exclude', true );
886
- $priority = get_post_meta( $post->ID, '_xmlsf_priority', true );
887
- $disabled = '';
888
-
889
- // disable options and (visibly) set excluded to true for private posts
890
- if ( 'private' == $post->post_status ) {
891
- $disabled = ' disabled="disabled"';
892
- $exclude = true;
893
- }
894
-
895
- // disable options and (visibly) set priority to 1 for front page
896
- if ( $post->ID == get_option('page_on_front') ) {
897
- $disabled = ' disabled="disabled"';
898
- $priority = '1'; // force excluded to true for private posts
899
- }
900
-
901
- echo '<p><label>';
902
- _e('Priority','xml-sitemap-feed');
903
- echo ' <input type="number" step="0.1" min="0" max="1" name="xmlsf_priority" id="xmlsf_priority" value="'.$priority.'" class="small-text"'.$disabled.'></label> <span class="description">';
904
- printf(__('Leave empty for automatic Priority as configured on %1$s > %2$s.','xml-sitemap-feed'),translate('Settings'),'<a href="' . admin_url('options-reading.php') . '#xmlsf">' . translate('Reading') . '</a>');
905
- echo '</span></p>';
906
-
907
- echo '<p><label><input type="checkbox" name="xmlsf_exclude" id="xmlsf_exclude" value="1"'.checked(!empty($exclude), true, false).$disabled.' > ';
908
- _e('Exclude from XML Sitemap','xml-sitemap-feed');
909
- echo '</label></p>';
910
- }
911
-
912
- /* Adds a News Sitemap box to the side column */
913
- public function add_meta_box_news () {
914
- $news_tags = parent::get_option('news_tags');
915
- $defaults = parent::defaults('news_tags');
916
- $news_post_type = isset($news_tags['post_type']) && !empty($news_tags['post_type']) ? $news_tags['post_type'] : $defaults['post_type'];
917
-
918
- foreach ( (array)$news_post_type as $post_type ) {
919
- // Only include metabox on post types that are included
920
- add_meta_box(
921
- 'xmlsf_news_section',
922
- __( 'Google News', 'xml-sitemap-feed' ),
923
- array($this,'meta_box_news'),
924
- $post_type,
925
- 'side'
926
- );
927
- }
928
- }
929
-
930
- public function meta_box_news($post) {
931
- // Use nonce for verification
932
- wp_nonce_field( $this->plugin_basename, 'xmlsf_sitemap_nonce' );
933
-
934
- // The actual fields for data entry
935
- // Use get_post_meta to retrieve an existing value from the database and use the value for the form
936
- $exclude = get_post_meta( $post->ID, '_xmlsf_news_exclude', true );
937
- $access = get_post_meta( $post->ID, '_xmlsf_news_access', true );
938
- $disabled = '';
939
-
940
- // disable options and (visibly) set excluded to true for private posts
941
- if ( 'private' == $post->post_status ) {
942
- $disabled = ' disabled="disabled"';
943
- $exclude = true;
944
- }
945
-
946
- echo '<p><label>'.__('Access','xml-sitemap-feed').'
947
- <select name="xmlsf_news_access" id="xmlsf_news_access">
948
- <option value="">'.translate('Default').'</option>
949
- <option value="Public" '.selected( "Public" == $access, true, false).'>'.translate('Public').'</option>
950
- <option value="Registration" '.selected( "Registration" == $access, true, false).'>'.__('Registration','xml-sitemap-feed').'</option>
951
- <option value="Subscription" '.selected( "Subscription" == $access, true, false).'>'.__('Subscription','xml-sitemap-feed').'</option>
952
- </select></label></p>';
953
-
954
- echo '<p><label><input type="checkbox" name="xmlsf_news_exclude" id="xmlsf_news_exclude" value="1"'.checked(!empty($exclude), true, false).$disabled.' > ';
955
- _e('Exclude from Google News Sitemap.','xml-sitemap-feed');
956
- echo '</label></p>';
957
- }
958
-
959
- /* When the post is saved, save our meta data */
960
- function save_metadata( $post_id ) {
961
- if ( !isset($post_id) )
962
- $post_id = (int)$_REQUEST['post_ID'];
963
-
964
- if ( !current_user_can( 'edit_post', $post_id ) || !isset($_POST['xmlsf_sitemap_nonce']) || !wp_verify_nonce($_POST['xmlsf_sitemap_nonce'], $this->plugin_basename) )
965
- return;
966
-
967
- // _xmlsf_priority
968
- if ( isset($_POST['xmlsf_priority']) && is_numeric($_POST['xmlsf_priority']) ) {
969
- update_post_meta($post_id, '_xmlsf_priority', $this->sanitize_priority($_POST['xmlsf_priority']) );
970
- } else {
971
- delete_post_meta($post_id, '_xmlsf_priority');
972
- }
973
-
974
- // _xmlsf_exclude
975
- if ( isset($_POST['xmlsf_exclude']) && $_POST['xmlsf_exclude'] != '' ) {
976
- update_post_meta($post_id, '_xmlsf_exclude', $_POST['xmlsf_exclude']);
977
- } else {
978
- delete_post_meta($post_id, '_xmlsf_exclude');
979
- }
980
-
981
- // _xmlsf_news_exclude
982
- if ( isset($_POST['xmlsf_news_exclude']) && $_POST['xmlsf_news_exclude'] != '' ) {
983
- update_post_meta($post_id, '_xmlsf_news_exclude', $_POST['xmlsf_news_exclude']);
984
- } else {
985
- delete_post_meta($post_id, '_xmlsf_news_exclude');
986
- }
987
-
988
- // _xmlsf_news_access
989
- if ( isset($_POST['xmlsf_news_access']) && $_POST['xmlsf_news_access'] != '' ) {
990
- update_post_meta($post_id, '_xmlsf_news_access', $_POST['xmlsf_news_access']);
991
- } else {
992
- delete_post_meta($post_id, '_xmlsf_news_access');
993
- }
994
- }
995
-
996
- /**
997
- * Catch transient flags
998
- */
999
-
1000
- function handle_flags() {
1001
- // CATCH TRANSIENT for reset
1002
- if ( delete_transient('xmlsf_clear_settings') ) {
1003
- $this->clear_settings();
1004
- }
1005
-
1006
- // CATCH TRANSIENT for flushing rewrite rules after the sitemaps setting has changed
1007
- if ( delete_transient('xmlsf_flush_rewrite_rules') ) {
1008
- $this->flush_rules();
1009
- }
1010
-
1011
- // CATCH TRANSIENT for recreating terms
1012
- if ( delete_transient('xmlsf_create_genres') && taxonomy_exists('gn-genre') ) {
1013
-
1014
- // check and update existing or delete not allowed terms
1015
- $terms = get_terms( 'gn-genre', array('hide_empty' => false) );
1016
- if ( is_array($terms) && !empty($terms) ) {
1017
- foreach ( $terms as $term ) {
1018
- if ( in_array($term->name,$this->gn_genres) ) {
1019
- $slug = strtolower($term->name);
1020
- if ( $term->slug !== $slug )
1021
- wp_update_term( $term->term_id, 'gn-genre', array(
1022
- 'slug' => $slug
1023
- ) );
1024
- } else {
1025
- wp_delete_term( $term->term_id, 'gn-genre' );
1026
- }
1027
- }
1028
- }
1029
-
1030
- // add any new ones
1031
- foreach ($this->gn_genres as $name) {
1032
- wp_insert_term( $name, 'gn-genre' );
1033
- }
1034
- }
1035
-
1036
- // CATCH TRANSIENT for static file warning
1037
- $files = get_transient('xmlsf_static_files_found');
1038
- if ( !empty($files) ) {
1039
- // TODO admin message about static files: explode(', ',$files);
1040
- // with option to ignore or delete files or check again...
1041
- }
1042
- }
1043
-
1044
- /**
1045
- * Register settings and add settings fields
1046
- */
1047
-
1048
- function register_settings() {
1049
- $sitemaps = parent::get_sitemaps();
1050
-
1051
- // sitemaps
1052
- register_setting('reading', $this->prefix.'sitemaps', array($this,'sanitize_sitemaps_settings') );
1053
- add_settings_field($this->prefix.'sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading');
1054
-
1055
- // robots rules only when permalinks are set
1056
- $rules = get_option( 'rewrite_rules' );
1057
- if( get_option('permalink_structure') && isset( $rules['robots\.txt$'] ) ) {
1058
- register_setting('reading', $this->prefix.'robots', array($this,'sanitize_robots_settings') );
1059
- add_settings_field($this->prefix.'robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading');
1060
- }
1061
-
1062
- // stop here if blog is not public
1063
- if ( !get_option('blog_public') ) { return; }
1064
-
1065
- if ( is_multisite() ) {
1066
- add_settings_field($this->prefix.'reset', __('Reset XML sitemaps','xml-sitemap-feed'), array($this,'reset_settings_field'), 'reading');
1067
- }
1068
-
1069
- if ( isset($sitemaps['sitemap-news']) ) {
1070
- // XML SITEMAP SETTINGS
1071
- add_settings_section('news_sitemap_section', '<a name="xmlnf"></a>'.__('Google News Sitemap','xml-sitemap-feed'), array($this,'news_sitemap_settings'), 'reading');
1072
- // tags
1073
- register_setting('reading', $this->prefix.'news_tags', array($this,'sanitize_news_tags_settings') );
1074
- add_settings_field($this->prefix.'news_name', '<label for="xmlsf_news_name">'.__('Publication name','xml-sitemap-feed').'</label>', array($this,'news_name_field'), 'reading', 'news_sitemap_section');
1075
- add_settings_field($this->prefix.'news_post_type', __('Include post types','xml-sitemap-feed'), array($this,'news_post_type_field'), 'reading', 'news_sitemap_section');
1076
- add_settings_field($this->prefix.'news_categories', translate('Categories'), array($this,'news_categories_field'), 'reading', 'news_sitemap_section');
1077
- add_settings_field($this->prefix.'news_image', translate('Images'), array($this,'news_image_field'), 'reading', 'news_sitemap_section');
1078
- add_settings_field($this->prefix.'news_labels', __('Source labels','xml-sitemap-feed'), array($this,'news_labels_field'), 'reading', 'news_sitemap_section');
1079
- // post meta box
1080
- add_action( 'add_meta_boxes', array($this,'add_meta_box_news') );
1081
- }
1082
-
1083
- if ( isset($sitemaps['sitemap']) ) {
1084
- // XML SITEMAP SETTINGS
1085
- add_settings_section('xml_sitemap_section', '<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed'), array($this,'xml_sitemap_settings'), 'reading');
1086
- // post_types
1087
- register_setting('reading', $this->prefix.'post_types', array($this,'sanitize_post_types_settings') );
1088
- add_settings_field($this->prefix.'post_types', __('Include post types','xml-sitemap-feed'), array($this,'post_types_settings_field'), 'reading', 'xml_sitemap_section');
1089
- // taxonomies
1090
- register_setting('reading', $this->prefix.'taxonomies', array($this,'sanitize_taxonomies_settings') );
1091
- add_settings_field($this->prefix.'taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_settings_field'), 'reading', 'xml_sitemap_section');
1092
- // custom domains
1093
- register_setting('reading', $this->prefix.'domains', array($this,'sanitize_domains_settings') );
1094
- add_settings_field($this->prefix.'domains', __('Allowed domains','xml-sitemap-feed'), array($this,'domains_settings_field'), 'reading', 'xml_sitemap_section');
1095
- // custom urls
1096
- register_setting('reading', $this->prefix.'urls', array($this,'sanitize_urls_settings') );
1097
- add_settings_field($this->prefix.'urls', __('Include custom URLs','xml-sitemap-feed'), array($this,'urls_settings_field'), 'reading', 'xml_sitemap_section');
1098
- // custom sitemaps
1099
- register_setting('reading', $this->prefix.'custom_sitemaps', array($this,'sanitize_custom_sitemaps_settings') );
1100
- add_settings_field($this->prefix.'custom_sitemaps', __('Include custom XML Sitemaps','xml-sitemap-feed'), array($this,'custom_sitemaps_settings_field'), 'reading', 'xml_sitemap_section');
1101
- // post meta box
1102
- add_action( 'add_meta_boxes', array($this,'add_meta_box') );
1103
- }
1104
-
1105
- if ( isset($sitemaps['sitemap']) || isset($sitemaps['sitemap-news']) ) {
1106
- register_setting('writing', $this->prefix.'ping', array($this,'sanitize_ping_settings') );
1107
- add_settings_field($this->prefix.'ping', translate('Update Services'), array($this,'ping_settings_field'), 'writing');
1108
- // save post meta box settings
1109
- add_action( 'save_post', array($this,'save_metadata') );
1110
- }
1111
- }
1112
-
1113
- /**
1114
- * CONSTRUCTOR
1115
- */
1116
-
1117
- function __construct( $basename = 'xml-sitemap-feed/xml-sitemap.php' ) {
1118
- $this->plugin_basename = $basename;
1119
-
1120
- // ACTION LINK
1121
- add_filter('plugin_action_links_' . $this->plugin_basename, array($this, 'add_action_link') );
1122
-
1123
- $this->handle_flags();
1124
-
1125
- $this->register_settings();
1126
- }
1127
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-xmlsitemapfeed.php DELETED
@@ -1,1905 +0,0 @@
1
- <?php
2
- /* ------------------------------
3
- * XMLSitemapFeed CLASS
4
- * ------------------------------ */
5
-
6
- class XMLSitemapFeed {
7
-
8
- /**
9
- * Plugin base name
10
- * @var string
11
- */
12
- public $plugin_basename;
13
-
14
- /**
15
- * Pretty permalinks base name
16
- * @var string
17
- */
18
- public $base_name = 'sitemap';
19
-
20
- /**
21
- * Pretty permalinks extension
22
- * @var string
23
- */
24
- public $extension = 'xml';
25
-
26
- /**
27
- * Signifies whether the request has been filtered.
28
- * @var bool
29
- */
30
- public $request_filtered = false;
31
-
32
- /**
33
- * Signifies whether the current query is for a sitemap feed.
34
- * @var bool
35
- */
36
- public $is_sitemap = false;
37
-
38
- /**
39
- * Signifies whether the current query is for a news feed.
40
- * @var bool
41
- */
42
- public $is_news = false;
43
-
44
- /**
45
- * Database options prefix
46
- * @var string
47
- */
48
- protected $prefix = 'xmlsf_';
49
-
50
- /**
51
- * Default language
52
- * @var null $blog_language
53
- */
54
- private $blog_language = null;
55
-
56
- /**
57
- * Flushed flag
58
- * @var bool
59
- */
60
- private $yes_mother = false;
61
-
62
- /**
63
- * Defaults
64
- * @var array
65
- */
66
- private $defaults = array();
67
-
68
- /**
69
- * Excluded post types
70
- *
71
- * attachment post type is disabled
72
- * images are included via tags in the post and page sitemaps
73
- * @var array
74
- */
75
- private $disabled_post_types = array('attachment');
76
-
77
- /**
78
- * Excluded taxonomies
79
- *
80
- * post format taxonomy is disabled
81
- * @var array
82
- */
83
- private $disabled_taxonomies = array('post_format');
84
-
85
- /**
86
- * Google News genres
87
- * @var array
88
- */
89
- protected $gn_genres = array(
90
- 'PressRelease',
91
- 'Satire',
92
- 'Blog',
93
- 'OpEd',
94
- 'Opinion',
95
- 'UserGenerated'
96
- //'FactCheck'
97
- );
98
-
99
- /**
100
- * Global values used for allowed urls, priority and changefreq calculation
101
- */
102
- private $domain;
103
- private $scheme;
104
- private $home_url;
105
- private $firstdate;
106
- private $lastmodified; // unused at the moment
107
- private $postmodified = array();
108
- private $termmodified = array();
109
- private $frontpages = null;
110
- private $blogpages = null;
111
- private $images = array();
112
-
113
- /**
114
- * Get sitemap feed conditional
115
- * @return bool
116
- */
117
- public function is_sitemap() {
118
- return (bool) $this->is_sitemap;
119
- }
120
-
121
- /**
122
- * Get news feed conditional
123
- * @return bool
124
- */
125
- public function is_news() {
126
- return (bool) $this->is_news;
127
- }
128
-
129
- /**
130
- * Get gn_genres
131
- * @return array
132
- */
133
- public function gn_genres() {
134
- return $this->gn_genres;
135
- }
136
-
137
- /**
138
- * Get domain
139
- * @return string
140
- */
141
- public function domain() {
142
- // allowed domain
143
- if ( empty($this->domain) ) {
144
- $host = parse_url( $this->home_url(), PHP_URL_HOST );
145
- $this->domain = str_replace( 'www.', '', $host );
146
- }
147
-
148
- return $this->domain;
149
- }
150
-
151
- /**
152
- * Get scheme
153
- * @return string
154
- */
155
- public function scheme() {
156
- // scheme to use
157
- if ( empty($this->scheme) ) {
158
- $scheme = parse_url( $this->home_url(), PHP_URL_SCHEME );
159
- $this->scheme = $scheme ? $scheme : 'http';
160
- }
161
-
162
- return $this->scheme;
163
- }
164
-
165
- /**
166
- * Get home URL
167
- * @return string
168
- */
169
- public function home_url() {
170
- return empty($this->home_url) ? home_url() : $this->home_url;
171
- }
172
-
173
- /**
174
- * Set default options
175
- *
176
- * @return void
177
- */
178
- private function set_defaults() {
179
- // sitemaps
180
- if ( '1' == get_option('blog_public') ) {
181
- $this->defaults['sitemaps'] = array(
182
- 'sitemap' => XMLSF_NAME
183
- );
184
- } else {
185
- $this->defaults['sitemaps'] = array();
186
- }
187
-
188
- // post_types
189
- $this->defaults['post_types'] = array();
190
-
191
- foreach ( get_post_types(array('public'=>true),'names') as $name ) { // want 'publicly_queryable' but that excludes pages for some weird reason
192
- // skip unallowed post types
193
- if (in_array($name,$this->disabled_post_types)) {
194
- continue;
195
- }
196
-
197
- $this->defaults['post_types'][$name] = array(
198
- 'name' => $name,
199
- 'active' => '',
200
- 'archive' => '',
201
- 'priority' => '0.5',
202
- 'dynamic_priority' => '',
203
- 'tags' => array('image' => 'attached'/*,'video' => ''*/)
204
- );
205
- }
206
-
207
- $active_arr = array('post','page');
208
-
209
- foreach ( $active_arr as $name ) {
210
- if ( isset($this->defaults['post_types'][$name]) ) {
211
- $this->defaults['post_types'][$name]['active'] = '1';
212
- }
213
- }
214
-
215
- if ( isset($this->defaults['post_types']['post']) ) {
216
- $this->defaults['post_types']['post']['archive'] = 'yearly';
217
- $this->defaults['post_types']['post']['priority'] = '0.7';
218
- $this->defaults['post_types']['post']['dynamic_priority'] = '1';
219
- }
220
-
221
- if ( isset($this->defaults['post_types']['page']) ) {
222
- unset($this->defaults['post_types']['page']['archive']);
223
- $this->defaults['post_types']['page']['priority'] = '0.3';
224
- $this->defaults['post_types']['page']['dynamic_priority'] = '1';
225
- }
226
-
227
- // taxonomies
228
- $this->defaults['taxonomies'] = array(); // by default do not include any taxonomies
229
-
230
- // news sitemap settings
231
- $this->defaults['news_sitemap'] = array();
232
-
233
- // search engines to ping
234
- $this->defaults['ping'] = array(
235
- 'google' => array (
236
- 'active' => '1',
237
- 'uri' => 'http://www.google.com/ping',
238
- 'type' => 'GET',
239
- 'req' => 'sitemap',
240
- 'news' => '1'
241
- ),
242
- 'bing' => array (
243
- 'active' => '1',
244
- 'uri' => 'http://www.bing.com/ping',
245
- 'type' => 'GET',
246
- 'req' => 'sitemap',
247
- 'news' => '1'
248
- ),
249
- 'yandex' => array (
250
- 'active' => '',
251
- 'uri' => 'http://ping.blogs.yandex.ru/RPC2',
252
- 'type' => 'RPC',
253
- ),
254
- 'baidu' => array (
255
- 'active' => '',
256
- 'uri' => 'http://ping.baidu.com/ping/RPC2',
257
- 'type' => 'RPC',
258
- ),
259
- 'others' => array (
260
- 'active' => '1',
261
- 'uri' => 'http://rpc.pingomatic.com/',
262
- 'type' => 'RPC',
263
- ),
264
- );
265
-
266
- // robots
267
- $this->defaults['robots'] = '';
268
-
269
- // additional urls
270
- $this->defaults['urls'] = array();
271
-
272
- // additional custom_sitemaps
273
- $this->defaults['custom_sitemaps'] = array();
274
-
275
- // additional allowed domains
276
- $this->defaults['domains'] = array();
277
-
278
- // news sitemap tags settings
279
- $this->defaults['news_tags'] = array(
280
- 'name' => '',
281
- 'post_type' => array('post'),
282
- 'categories' => '',
283
- 'image' => 'featured',
284
- 'access' => array(
285
- 'default' => '',
286
- //'private' => 'Registration', // private posts do not show up in feeds when not logged in. no point in setting access level then...
287
- 'password' => 'Subscription'
288
- ),
289
- 'genres' => array(
290
- 'default' => ''
291
- ),
292
- 'keywords' => array(
293
- 'from' => 'category',
294
- 'default' => ''
295
- )
296
- );
297
- }
298
-
299
- /**
300
- * Get defaults
301
- *
302
- * @param bool|false $key
303
- *
304
- * @return array
305
- */
306
- protected function defaults($key = false) {
307
- if ( empty($this->defaults) ) {
308
- $this->set_defaults();
309
- }
310
-
311
- if ( $key ) {
312
- $return = ( isset($this->defaults[$key]) ) ? $this->defaults[$key] : '';
313
- } else {
314
- $return = $this->defaults;
315
- }
316
-
317
- return apply_filters( 'xmlsf_defaults', $return, $key );
318
- }
319
-
320
- /**
321
- * Get option
322
- *
323
- * @param $option
324
- *
325
- * @return array
326
- */
327
- public function get_option($option) {
328
- return get_option( $this->prefix.$option, $this->defaults($option) );
329
- }
330
-
331
- /**
332
- * Get sitemaps
333
- * @return array
334
- */
335
- public function get_sitemaps() {
336
- $return = $this->get_option('sitemaps');
337
-
338
- // make very sure it's an array we are returning
339
- return !empty($return) ? (array)$return : array();
340
- }
341
-
342
- /**
343
- * Get ping
344
- * @return array
345
- */
346
- public function get_ping() {
347
- $return = $this->get_option('ping');
348
-
349
- // make very sure it's an array we are returning
350
- return !empty($return) ? (array)$return : array();
351
- }
352
-
353
- /**
354
- * Get disabled post types
355
- * @return array
356
- */
357
- protected function disabled_post_types() {
358
- return $this->disabled_post_types;
359
- }
360
-
361
- /**
362
- * Get disabled taxonomies
363
- * @return array
364
- */
365
- protected function disabled_taxonomies() {
366
- return $this->disabled_taxonomies;
367
- }
368
-
369
- /**
370
- * QUERY FUNCTIONS
371
- */
372
-
373
- /**
374
- * Get post types
375
- * @return array
376
- */
377
- public function get_post_types() {
378
- $return = $this->get_option('post_types');
379
-
380
- // make sure it's an array we are returning
381
- return !empty($return) ? (array)$return : array();
382
- }
383
-
384
- /**
385
- * Have post types
386
- * @return array
387
- */
388
- public function have_post_types() {
389
- $return = array();
390
-
391
- foreach ( $this->get_post_types() as $type => $values ) {
392
- if ( !empty($values['active']) ) {
393
- $count = wp_count_posts( $values['name'] );
394
- if ( $count->publish > 0 ) {
395
- $values['count'] = $count->publish;
396
- $return[$type] = $values;
397
- }
398
- }
399
- }
400
-
401
- return $return;
402
- }
403
-
404
- /**
405
- * Get taxonomies
406
- * @return array
407
- */
408
- public function get_taxonomies() {
409
- $return = $this->get_option('taxonomies');
410
-
411
- // make sure it's an array we are returning
412
- return !empty($return) ? (array)$return : array();
413
- }
414
-
415
- /**
416
- * Get custom sitemaps
417
- * @return array
418
- */
419
- public function get_custom_sitemaps() {
420
- $urls = $this->get_option('custom_sitemaps');
421
- // make sure it's an array we are returning
422
- if (!empty($urls)) {
423
- $return = ( !is_array($urls) ) ? explode( PHP_EOL, $urls ) : $urls;
424
- } else {
425
- $return = array();
426
- }
427
- return apply_filters( 'xmlsf_custom_sitemaps', $return );
428
- }
429
-
430
- /**
431
- * Get urls
432
- * @return array
433
- */
434
- public function get_urls() {
435
- $urls = $this->get_option('urls');
436
- // make sure it's an array we are returning
437
- if ( !empty($urls) ) {
438
- $return = ( !is_array($urls) ) ? explode( PHP_EOL, $urls ) : $urls;
439
- } else {
440
- $return = array();
441
- }
442
- return apply_filters( 'xmlsf_custom_urls', $return );
443
- }
444
-
445
- /**
446
- * Get domains
447
- * @return array
448
- */
449
- public function get_domains() {
450
- $domains = $this->get_option('domains');
451
- if ( !empty($domains) && is_array($domains) ) {
452
- return array_merge( array( $this->domain() ), $domains );
453
- } else {
454
- return array( $this->domain() );
455
- }
456
- }
457
-
458
- /**
459
- * Get archives
460
- *
461
- * @param string $post_type
462
- * @param string $type
463
- *
464
- * @return array
465
- */
466
- public function get_archives( $post_type = 'post', $type = '' ) {
467
- global $wpdb;
468
- $return = array();
469
-
470
- if ( 'monthly' == $type ) :
471
-
472
- $query = "SELECT YEAR(post_date) AS `year`, LPAD(MONTH(post_date),2,'0') AS `month`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC";
473
- $key = md5($query);
474
- $cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
475
-
476
- if ( !isset( $cache[ $key ] ) ) {
477
- $arcresults = $wpdb->get_results($query);
478
- $cache[ $key ] = $arcresults;
479
- wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
480
- } else {
481
- $arcresults = $cache[ $key ];
482
- }
483
-
484
- if ( $arcresults ) {
485
- foreach ( (array) $arcresults as $arcresult ) {
486
- $return[$arcresult->year.$arcresult->month] = $this->get_index_url( 'posttype', $post_type, $arcresult->year . $arcresult->month );
487
- }
488
- };
489
-
490
- elseif ( 'yearly' == $type ) :
491
-
492
- $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC";
493
- $key = md5($query);
494
- $cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
495
-
496
- if ( !isset( $cache[ $key ] ) ) {
497
- $arcresults = $wpdb->get_results($query);
498
- $cache[ $key ] = $arcresults;
499
- wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
500
- } else {
501
- $arcresults = $cache[ $key ];
502
- }
503
-
504
- if ($arcresults) {
505
- foreach ( (array) $arcresults as $arcresult) {
506
- $return[$arcresult->year] = $this->get_index_url( 'posttype', $post_type, $arcresult->year );
507
- }
508
- };
509
-
510
- else :
511
-
512
- $return[0] = $this->get_index_url('posttype', $post_type); // $sitemap = 'home', $type = false, $param = false
513
-
514
- endif;
515
-
516
- return $return;
517
- }
518
-
519
- /**
520
- * Get robots
521
- * @return string
522
- */
523
- public function get_robots() {
524
- return ( $robots = $this->get_option('robots') ) ? $robots : '';
525
- }
526
-
527
- /**
528
- * Do tags
529
- *
530
- * @param string $type
531
- *
532
- * @return array
533
- */
534
- public function do_tags( $type = 'post' ) {
535
- $return = $this->get_post_types();
536
-
537
- // make sure it's an array we are returning
538
- return (
539
- is_string($type) &&
540
- isset($return[$type]) &&
541
- !empty($return[$type]['tags'])
542
- ) ? (array) $return[$type]['tags'] : array();
543
- }
544
-
545
- /**
546
- * Get translations
547
- *
548
- * @param $post_id
549
- *
550
- * @return array
551
- */
552
- private function get_translations( $post_id ) {
553
- $translation_ids = array();
554
- // Polylang compat
555
- if ( function_exists('pll_get_post_translations') ) {
556
- $translations = pll_get_post_translations($post_id);
557
- foreach ( $translations as $slug => $id ) {
558
- if ( $post_id != $id ) $translation_ids[] = $id;
559
- }
560
- }
561
- // WPML compat
562
- global $sitepress;
563
- if ( isset($sitepress) && is_object($sitepress) && method_exists($sitepress, 'get_languages') && method_exists($sitepress, 'get_object_id') ) {
564
- foreach ( array_keys ( $sitepress->get_languages(false,true) ) as $term ) {
565
- $id = $sitepress->get_object_id($post_id,'page',false,$term);
566
- if ( $post_id != $id ) $translation_ids[] = $id;
567
- }
568
- }
569
-
570
- return $translation_ids;
571
- }
572
-
573
- /**
574
- * Get blog_pages
575
- * @return array
576
- */
577
- private function get_blogpages() {
578
- if ( null === $this->blogpages ) :
579
- $blogpages = array();
580
- if ( 'page' == get_option('show_on_front') ) {
581
- $blogpage = (int)get_option('page_for_posts');
582
- if ( !empty($blogpage) ) {
583
- $blogpages = array_merge( (array)$blogpage, $this->get_translations($blogpage) );
584
- }
585
- }
586
- $this->blogpages = $blogpages;
587
- endif;
588
-
589
- return $this->blogpages;
590
- }
591
-
592
- /**
593
- * Get front pages
594
- * @return array
595
- */
596
- private function get_frontpages() {
597
- if ( null === $this->frontpages ) :
598
- $frontpages = array();
599
- if ( 'page' == get_option('show_on_front') ) {
600
- $frontpage = (int)get_option('page_on_front');
601
- $frontpages = array_merge( (array)$frontpage, $this->get_translations($frontpage) );
602
- }
603
- $this->frontpages = $frontpages;
604
- endif;
605
-
606
- return $this->frontpages;
607
- }
608
-
609
- /**
610
- * Is home?
611
- *
612
- * @param $post_id
613
- *
614
- * @return bool
615
- */
616
- private function is_home( $post_id ) {
617
- return in_array( $post_id, $this->get_blogpages() );
618
- }
619
-
620
- /**
621
- * TEMPLATE FUNCTIONS
622
- */
623
-
624
- /**
625
- * Template headers
626
- *
627
- * @return string
628
- */
629
- public function head( $style = '' ) {
630
- $output = '';
631
-
632
- // check if headers are already sent (bad) and set up a warning in admin (how?)
633
- if ( headers_sent($filename, $linenum) )
634
- $output = "<!-- WARNING: Headers already sent by $filename on line $linenum. Please fix! -->\n";
635
-
636
- // which style sheet
637
- switch ($style) {
638
- case 'index':
639
- $style_sheet = plugins_url('xsl/sitemap-index.xsl',__FILE__);
640
- break;
641
-
642
- case 'news':
643
- $style_sheet = plugins_url('xsl/sitemap-news.xsl',__FILE__);
644
- break;
645
-
646
- default:
647
- $style_sheet = plugins_url('xsl/sitemap.xsl',__FILE__);
648
- }
649
-
650
- $output .= '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>' . PHP_EOL;
651
- $output .= '<?xml-stylesheet type="text/xsl" href="' . $style_sheet . '?ver=' . XMLSF_VERSION .'"?>' . PHP_EOL;
652
- $output .= '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . PHP_EOL;
653
- $output .= '<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->' . PHP_EOL;
654
- $output .= '<!-- generator-url="https://status301.net/wordpress-plugins/xml-sitemap-feed/" -->' . PHP_EOL;
655
- $output .= '<!-- generator-version="' . XMLSF_VERSION . '" -->' . PHP_EOL;
656
-
657
- // return output
658
- return $output;
659
- }
660
-
661
- /**
662
- * Modified
663
- *
664
- * @param string $sitemap
665
- * @param string $term
666
- *
667
- * @return string
668
- */
669
- public function modified( $sitemap = 'post_type', $term = '' ) {
670
- global $post;
671
-
672
- if ( 'post_type' == $sitemap ) :
673
-
674
- // if blog page then look for last post date
675
- if ( $post->post_type == 'page' && $this->is_home($post->ID) )
676
- return get_lastpostmodified('gmt'); // TODO limit to sitemap included post types...
677
-
678
- if ( empty($this->postmodified[$post->ID]) ) {
679
- $postmodified = get_post_modified_time( 'Y-m-d H:i:s', true, $post->ID );
680
- $options = $this->get_post_types();
681
-
682
- if( !empty($options[$post->post_type]['update_lastmod_on_comments']) )
683
- $lastcomment = get_comments( array(
684
- 'status' => 'approve',
685
- 'number' => 1,
686
- 'post_id' => $post->ID,
687
- ) );
688
-
689
- if ( isset($lastcomment[0]->comment_date_gmt) )
690
- if ( mysql2date( 'U', $lastcomment[0]->comment_date_gmt, false ) > mysql2date( 'U', $postmodified, false ) )
691
- $postmodified = $lastcomment[0]->comment_date_gmt;
692
-
693
- // make sure lastmod is not older than publication date (happens on scheduled posts)
694
- if ( isset($post->post_date_gmt) && strtotime($post->post_date_gmt) > strtotime($postmodified) )
695
- $postmodified = $post->post_date_gmt;
696
-
697
- $this->postmodified[$post->ID] = $postmodified;
698
- }
699
-
700
- return $this->postmodified[$post->ID];
701
-
702
- elseif ( !empty($term) ) :
703
-
704
- if ( is_object($term) ) {
705
- if ( !isset($this->termmodified[$term->term_id]) ) {
706
- // get the latest post in this taxonomy item, to use its post_date as lastmod
707
- $posts = get_posts (
708
- array(
709
- 'post_type' => 'any',
710
- 'numberposts' => 1,
711
- 'no_found_rows' => true,
712
- 'update_post_meta_cache' => false,
713
- 'update_post_term_cache' => false,
714
- 'update_cache' => false,
715
- 'tax_query' => array(
716
- array(
717
- 'taxonomy' => $term->taxonomy,
718
- 'field' => 'slug',
719
- 'terms' => $term->slug
720
- )
721
- )
722
- )
723
- );
724
- $this->termmodified[$term->term_id] = isset($posts[0]->post_date_gmt) ? $posts[0]->post_date_gmt : '';
725
- }
726
- return $this->termmodified[$term->term_id];
727
- } else {
728
- $obj = get_taxonomy($term);
729
-
730
- $lastmodified = array();
731
- foreach ( (array)$obj->object_type as $object_type ) {
732
- $lastmodified[] = get_lastpostdate( 'gmt', $object_type );
733
- // returns last post date, not last modified date... (TODO consider making this an opion)
734
- }
735
-
736
- sort($lastmodified);
737
- $lastmodified = array_filter($lastmodified);
738
-
739
- return end($lastmodified);
740
- }
741
-
742
- endif;
743
-
744
- return '';
745
- }
746
-
747
- /**
748
- * Get absolute URL
749
- * Converts path or protocol relative URLs to absolute ones.
750
- *
751
- * @param string $url
752
- *
753
- * @return string|bool
754
- */
755
- public function get_absolute_url( $url = false ) {
756
- // have a string or return false
757
- if ( empty( $url ) || ! is_string( $url ) ) {
758
- return false;
759
- }
760
-
761
- // check for scheme
762
- if ( strpos( $url, 'http' ) !== 0 ) {
763
- // check for relative url path
764
- if ( strpos( $url, '//' ) !== 0 ) {
765
- return $this->home_url() . $url;
766
- }
767
- return $this->scheme() . ':' . $url;
768
- }
769
-
770
- return $url;
771
- }
772
-
773
- /**
774
- * Get images
775
- *
776
- * @param string $sitemap
777
- *
778
- * @return array|bool
779
- */
780
- public function get_images( $sitemap = '' ) {
781
- global $post;
782
-
783
- if ( empty($this->images[$post->ID]) ) :
784
-
785
- if ( 'news' == $sitemap ) {
786
- $options = $this->get_option('news_tags');
787
- $which = isset($options['image']) ? $options['image'] : '';
788
- } else {
789
- $options = $this->get_post_types();
790
- $which = isset($options[$post->post_type]['tags']['image']) ? $options[$post->post_type]['tags']['image'] : '';
791
- }
792
-
793
- if ( 'attached' == $which ) {
794
- $args = array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'numberposts' => -1, 'post_status' =>'inherit', 'post_parent' => $post->ID );
795
- $attachments = get_posts($args);
796
- if ( $attachments ) {
797
- foreach ( $attachments as $attachment ) {
798
- $url = wp_get_attachment_image_url( $attachment->ID, 'full' );
799
- $url = $this->get_absolute_url( $url );
800
- if ( !empty($url) ) {
801
- $this->images[$post->ID][] = array(
802
- 'loc' => esc_attr( esc_url_raw( $url ) ),
803
- 'title' => apply_filters( 'the_title_xmlsitemap', $attachment->post_title ),
804
- 'caption' => apply_filters( 'the_title_xmlsitemap', $attachment->post_excerpt )
805
- // 'caption' => apply_filters( 'the_title_xmlsitemap', get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ) )
806
- );
807
- }
808
- }
809
- }
810
- } elseif ( 'featured' == $which ) {
811
- if ( has_post_thumbnail( $post->ID ) ) {
812
- $attachment = get_post( get_post_thumbnail_id( $post->ID ) );
813
- $url = wp_get_attachment_image_url( get_post_thumbnail_id( $post->ID ), 'full' );
814
- $url = $this->get_absolute_url( $url );
815
- if ( !empty($url) ) {
816
- $this->images[$post->ID][] = array(
817
- 'loc' => esc_attr( esc_url_raw( $url ) ),
818
- 'title' => apply_filters( 'the_title_xmlsitemap', $attachment->post_title ),
819
- 'caption' => apply_filters( 'the_title_xmlsitemap', $attachment->post_excerpt )
820
- // 'caption' => apply_filters( 'the_title_xmlsitemap', get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ) )
821
- );
822
- }
823
- }
824
- }
825
-
826
- endif;
827
-
828
- return ( isset($this->images[$post->ID]) ) ? $this->images[$post->ID] : false;
829
- }
830
-
831
- /**
832
- * Get last modified
833
- *
834
- * @param string $sitemap
835
- * @param string $term
836
- *
837
- * @return string
838
- */
839
- public function get_lastmod( $sitemap = 'post_type', $term = '' ) {
840
- $return = trim( mysql2date( 'Y-m-d\TH:i:s+00:00', $this->modified( $sitemap, $term ), false ) );
841
- return !empty($return) ? ' <lastmod>'.$return.'</lastmod>
842
- ' : '';
843
- }
844
-
845
- /**
846
- * Get priority
847
- *
848
- * @param string $sitemap
849
- * @param WP_Term|string $term
850
- *
851
- * @return string
852
- */
853
- public function get_priority( $sitemap = 'post_type', $term = '' ) {
854
-
855
- if ( 'post_type' == $sitemap ) :
856
-
857
- global $post;
858
- $options = $this->get_post_types();
859
- $defaults = $this->defaults('post_types');
860
- $priority_meta = get_metadata('post', $post->ID, '_xmlsf_priority' , true);
861
-
862
- if ( !empty($priority_meta) || $priority_meta == '0' ) {
863
- $priority = floatval(str_replace(',','.',$priority_meta));
864
- } elseif ( !empty($options[$post->post_type]['dynamic_priority']) ) {
865
- $post_modified = mysql2date('U',$post->post_modified_gmt, false);
866
-
867
- if ( empty($this->lastmodified) ) {
868
- $this->lastmodified = mysql2date('U',get_lastpostmodified('gmt',$post->post_type),false);
869
- // last posts or page modified date in Unix seconds
870
- }
871
-
872
- if ( empty($this->firstdate) ) {
873
- $this->firstdate = mysql2date('U',get_firstpostdate('gmt',$post->post_type),false);
874
- // uses get_firstpostdate() function defined in xml-sitemap/hacks.php !
875
- }
876
-
877
- if ( isset($options[$post->post_type]['priority']) ) {
878
- $priority_value = floatval(str_replace(',','.',$options[$post->post_type]['priority']));
879
- } else {
880
- $priority_value = floatval($defaults[$post->post_type]['priority']);
881
- }
882
-
883
- // reduce by age
884
- // NOTE : home/blog page gets same treatment as sticky post, i.e. no reduction by age
885
- if ( is_sticky($post->ID) || $this->is_home($post->ID) ) {
886
- $priority = $priority_value;
887
- } else {
888
- $priority = ( $this->lastmodified > $this->firstdate ) ? $priority_value - $priority_value * ( $this->lastmodified - $post_modified ) / ( $this->lastmodified - $this->firstdate ) : $priority_value;
889
- }
890
-
891
- if ( $post->comment_count > 0 ) {
892
- $priority = $priority + 0.1 + ( 0.9 - $priority ) * $post->comment_count / wp_count_comments($post->post_type)->approved;
893
- }
894
- } else {
895
- $priority = ( isset($options[$post->post_type]['priority']) && is_numeric($options[$post->post_type]['priority']) ) ? $options[$post->post_type]['priority'] : $defaults[$post->post_type]['priority'];
896
- }
897
-
898
- elseif ( ! empty($term) ) :
899
-
900
- $max_priority = 0.4;
901
- $min_priority = 0.0;
902
- // TODO make these values optional?
903
-
904
- $tax_obj = get_taxonomy($term->taxonomy);
905
- $postcount = 0;
906
- foreach ($tax_obj->object_type as $post_type) {
907
- $_post_count = wp_count_posts($post_type);
908
- $postcount += $_post_count->publish;
909
- }
910
-
911
- $priority = ( $postcount > 0 ) ? $min_priority + ( $max_priority * $term->count / $postcount ) : $min_priority;
912
-
913
- else :
914
-
915
- $priority = 0.5;
916
-
917
- endif;
918
-
919
- // make sure we're not below zero or cases where we ended up above 1 (sticky posts with many comments)
920
- $priority = filter_var( $priority, FILTER_VALIDATE_INT, array(
921
- 'options' => array(
922
- 'default' => .5,
923
- 'min_range' => 0,
924
- 'max_range' => 1
925
- )
926
- )
927
- );
928
-
929
- return number_format( $priority, 1 );
930
- }
931
-
932
- /**
933
- * Get home urls
934
- * @return array
935
- */
936
- public function get_home_urls() {
937
- $urls = array();
938
-
939
- global $sitepress; // Polylang and WPML compat
940
- if ( function_exists('pll_the_languages') ) {
941
- $languages = pll_the_languages( array( 'raw' => 1 ) );
942
- if ( is_array($languages) ) {
943
- foreach ( $languages as $language ) {
944
- $urls[] = pll_home_url( $language['slug'] );
945
- }
946
- } else {
947
- $urls[] = $this->home_url();
948
- }
949
- } elseif ( isset($sitepress) && is_object($sitepress) && method_exists($sitepress, 'get_languages') && method_exists($sitepress, 'language_url') ) {
950
- foreach ( array_keys ( $sitepress->get_languages(false,true) ) as $term ) {
951
- $urls[] = $sitepress->language_url($term);
952
- }
953
- } else {
954
- $urls[] = $this->home_url();
955
- }
956
-
957
- return $urls;
958
- }
959
-
960
- /**
961
- * Is excluded
962
- *
963
- * @param null $post_id
964
- *
965
- * @return bool
966
- */
967
- public function is_excluded( $post_id = null ) {
968
- // no ID, try and get it from global post object
969
- if ( null == $post_id ) {
970
- global $post;
971
- if ( is_object($post) && isset($post->ID)) {
972
- $post_id = $post->ID;
973
- } else {
974
- return false;
975
- }
976
- }
977
-
978
- $excluded = get_post_meta($post_id,'_xmlsf_exclude',true) || in_array($post_id,$this->get_frontpages()) ? true : false;
979
-
980
- return apply_filters( 'xmlsf_excluded', $excluded, $post_id );
981
- }
982
-
983
- /**
984
- * Is allowed domain
985
- *
986
- * @param $url
987
- *
988
- * @return mixed|void
989
- */
990
- public function is_allowed_domain( $url ) {
991
- $domains = $this->get_domains();
992
- $return = false;
993
- $parsed_url = parse_url($url);
994
-
995
- if (isset($parsed_url['host'])) {
996
- foreach( $domains as $domain ) {
997
- if( $parsed_url['host'] == $domain || strpos($parsed_url['host'],'.'.$domain) !== false ) {
998
- $return = true;
999
- break;
1000
- }
1001
- }
1002
- }
1003
-
1004
- return apply_filters( 'xmlsf_allowed_domain', $return, $url );
1005
- }
1006
-
1007
- /**
1008
- * Get index url
1009
- *
1010
- * @param string $sitemap
1011
- * @param bool|false $type
1012
- * @param bool|false $param
1013
- *
1014
- * @return string
1015
- */
1016
- public function get_index_url( $sitemap = 'home', $type = false, $param = false ) {
1017
- $split_url = explode('?', $this->home_url());
1018
-
1019
- if ( '' == get_option('permalink_structure') || '1' != get_option('blog_public')) {
1020
- $name = '?feed='.$name;
1021
- $name .= $param ? '&m='.$param : '';
1022
- $name .= isset($split_url[1]) && !empty($split_url[1]) ? '&' . $split_url[1] : '';
1023
- } else {
1024
- $name = $this->base_name.'-'.$sitemap;
1025
- $name .= $type ? '-'.$type : '';
1026
- $name .= $param ? '.'.$param : '';
1027
- $name .= '.'.$this->extension;
1028
- $name .= isset($split_url[1]) && !empty($split_url[1]) ? '?' . $split_url[1] : '';
1029
- }
1030
-
1031
- return esc_url( trailingslashit($split_url[0]) . $name );
1032
- }
1033
-
1034
- /**
1035
- * Get site language
1036
- *
1037
- * @return string
1038
- */
1039
- public function get_blog_language() {
1040
- if ( empty($this->blog_language) ) {
1041
- // get site language for default language
1042
- $blog_language = $this->parse_language_string( get_bloginfo('language') );
1043
-
1044
- $this->blog_language = !empty($blog_language) ? $blog_language : 'en';
1045
- }
1046
-
1047
- return $this->blog_language;
1048
- }
1049
-
1050
- /**
1051
- * Get site language
1052
- *
1053
- * @param string $lang unformatted language string
1054
- *
1055
- * @return string
1056
- */
1057
- public function parse_language_string( $lang ) {
1058
- $lang = convert_chars( strtolower( strip_tags( $lang ) ) );
1059
-
1060
- // no underscores
1061
- if ( strpos( $lang, '_' ) ) {
1062
- $expl = explode('_', $lang);
1063
- $lang = $expl[0];
1064
- }
1065
-
1066
- // no hyphens except...
1067
- if ( strpos( $lang, '-' ) && !in_array( $lang, array('zh-cn','zh-tw') ) ) {
1068
- // explode on hyphen and use only first part
1069
- $expl = explode('-', $lang);
1070
- $lang = $expl[0];
1071
- }
1072
-
1073
- return $lang;
1074
- }
1075
-
1076
- /**
1077
- * Get language
1078
- *
1079
- * @param $post_id
1080
- *
1081
- * @return null|string
1082
- */
1083
- public function get_language( $post_id ) {
1084
- $language = $this->get_blog_language();
1085
-
1086
- // Polylang
1087
- if ( function_exists('pll_get_post_language') ) {
1088
- $lang = pll_get_post_language( $post_id, 'slug' );
1089
- if ( !empty($lang) )
1090
- $language = $this->parse_language_string( $lang );
1091
- }
1092
-
1093
- // WPML compat
1094
- global $sitepress;
1095
- if ( isset($sitepress) && is_object($sitepress) && method_exists($sitepress, 'get_language_for_element') ) {
1096
- $post_type = (array) get_query_var( 'post_type', 'post' );
1097
- $lang = $sitepress->get_language_for_element( $post_id, 'post_'.$post_type[0] );
1098
- //apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $post_id, 'element_type' => $post_type ) );
1099
- if ( !empty($lang) )
1100
- $language = $this->parse_language_string( $lang );
1101
- }
1102
-
1103
- return apply_filters( 'xmlsf_post_language', $language, $post_id );
1104
- }
1105
-
1106
-
1107
- /**
1108
- * ROBOTSTXT
1109
- */
1110
-
1111
- // add sitemap location in robots.txt generated by WP
1112
- public function robots($output) {
1113
- echo '# XML Sitemap & Google News Feeds version ' . XMLSF_VERSION . ' - http://status301.net/wordpress-plugins/xml-sitemap-feed/' . PHP_EOL;
1114
-
1115
- if ( '1' != get_option('blog_public') ) {
1116
- echo '# XML Sitemaps are disabled. Please see Site Visibility on Settings > Reading.';
1117
- } else {
1118
- foreach ( $this->get_sitemaps() as $pretty )
1119
- echo 'Sitemap: ' . trailingslashit(get_bloginfo('url')) . $pretty . PHP_EOL;
1120
-
1121
- if ( empty($pretty) )
1122
- echo '# No XML Sitemaps are enabled. Please see XML Sitemaps on Settings > Reading.' . PHP_EOL;
1123
- }
1124
-
1125
- echo PHP_EOL;
1126
- }
1127
-
1128
- /**
1129
- * add robots.txt rules
1130
- *
1131
- * @param $output
1132
- *
1133
- * @return string
1134
- */
1135
- public function robots_txt($output) {
1136
- return $output . $this->get_option('robots');
1137
- }
1138
-
1139
- /**
1140
- * REWRITES
1141
- */
1142
-
1143
- /**
1144
- * Remove the trailing slash from permalinks that have an extension,
1145
- * such as /sitemap.xml (thanks to Permalink Editor plugin for WordPress)
1146
- *
1147
- * @param string $request
1148
- *
1149
- * @return mixed
1150
- */
1151
- public function trailingslash($request) {
1152
- return pathinfo($request, PATHINFO_EXTENSION) ? untrailingslashit($request) : $request;
1153
- }
1154
-
1155
- /**
1156
- * Add sitemap rewrite rules
1157
- *
1158
- * @param string $wp_rewrite
1159
- *
1160
- * @return void
1161
- */
1162
- public function rewrite_rules($wp_rewrite) {
1163
- $xmlsf_rules = array();
1164
- $sitemaps = $this->get_sitemaps();
1165
-
1166
- foreach ( $sitemaps as $name => $pretty ) {
1167
- $xmlsf_rules[ preg_quote($pretty) . '$' ] = $wp_rewrite->index . '?feed=' . $name;
1168
- }
1169
-
1170
- if (!empty($sitemaps['sitemap'])) {
1171
- // home urls
1172
- $xmlsf_rules[ $this->base_name . '-home\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-home';
1173
-
1174
- // add rules for post types (can be split by month or year)
1175
- foreach ( $this->get_post_types() as $post_type ) {
1176
- if ( isset($post_type['active']) && '1' == $post_type['active'] ) {
1177
- $xmlsf_rules[ $this->base_name . '-posttype-' . $post_type['name'] . '\.([0-9]+)?\.?' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-posttype-' . $post_type['name'] . '&m=$matches[1]';
1178
- }
1179
- }
1180
-
1181
- // add rules for taxonomies
1182
- foreach ( $this->get_taxonomies() as $taxonomy ) {
1183
- $xmlsf_rules[ $this->base_name . '-taxonomy-' . $taxonomy . '\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-taxonomy-' . $taxonomy;
1184
- }
1185
-
1186
- $urls = $this->get_urls();
1187
- if(!empty($urls)) {
1188
- $xmlsf_rules[ $this->base_name . '-custom\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-custom';
1189
- }
1190
-
1191
- }
1192
-
1193
- $wp_rewrite->rules = $xmlsf_rules + $wp_rewrite->rules;
1194
- }
1195
-
1196
- /**
1197
- * WPML: switch language
1198
- * @see https://wpml.org/wpml-hook/wpml_post_language_details/
1199
- */
1200
- public function wpml_language_switcher() {
1201
- global $sitepress,$post;
1202
- if( isset( $sitepress ) ) {
1203
- $post_language = apply_filters( 'wpml_post_language_details', NULL, $post->ID );
1204
- $sitepress->switch_lang($post_language['language_code']);
1205
- }
1206
- }
1207
-
1208
- /**
1209
- * Filter request
1210
- *
1211
- * @param $request
1212
- *
1213
- * @return mixed
1214
- */
1215
- public function filter_request( $request ) {
1216
- $this->request_filtered = true;
1217
-
1218
- if ( isset($request['feed']) && strpos($request['feed'],'sitemap') === 0 ) :
1219
-
1220
- // set the normal sitemap conditional tag
1221
- $this->is_sitemap = true;
1222
-
1223
- // REPSONSE HEADERS filtering
1224
- add_filter( 'wp_headers', array($this, 'headers') );
1225
-
1226
- // modify request parameters
1227
- $request['post_status'] = 'publish';
1228
- $request['no_found_rows'] = true;
1229
- $request['cache_results'] = false;
1230
- $request['update_post_term_cache'] = false;
1231
- $request['update_post_meta_cache'] = false;
1232
-
1233
- // Polylang compat
1234
- $request['lang'] = '';
1235
- // WPML compat
1236
- global $wpml_query_filter;
1237
- if ( isset($wpml_query_filter) && is_object($wpml_query_filter) ) {
1238
- remove_filter( 'posts_join', array( $wpml_query_filter, 'posts_join_filter' ) );
1239
- remove_filter( 'posts_where', array( $wpml_query_filter, 'posts_where_filter' ) );
1240
- add_action( 'the_post', array( $this, 'wpml_language_switcher' ) );
1241
- }
1242
-
1243
- // prepare for news and return modified request
1244
- if ( $request['feed'] == 'sitemap-news' ) {
1245
- $defaults = $this->defaults('news_tags');
1246
- $options = $this->get_option('news_tags');
1247
- $news_post_types = isset($options['post_type']) && !empty($options['post_type']) ? (array)$options['post_type'] : $defaults['post_type'];
1248
-
1249
- // disable caching
1250
- define('DONOTCACHEPAGE', true);
1251
- define('DONOTCACHEDB', true);
1252
-
1253
- // set up query filters
1254
- $live = false;
1255
- foreach ($news_post_types as $news_post_type) {
1256
- if ( get_lastpostdate('gmt', $news_post_type) > date('Y-m-d H:i:s', strtotime('-48 hours')) ) {
1257
- $live = true;
1258
- break;
1259
- }
1260
- }
1261
- if ( $live ) {
1262
- add_filter('post_limits', array($this, 'filter_news_limits'));
1263
- add_filter('posts_where', array($this, 'filter_news_where'), 10, 1);
1264
- } else {
1265
- add_filter('post_limits', array($this, 'filter_no_news_limits'));
1266
- }
1267
-
1268
- // post type
1269
- $request['post_type'] = $news_post_types;
1270
-
1271
- // categories
1272
- if ( isset($options['categories']) && is_array($options['categories']) ) {
1273
- $request['cat'] = implode(',',$options['categories']);
1274
- }
1275
-
1276
- // set the news sitemap conditional tag
1277
- $this->is_news = true;
1278
-
1279
- return $request;
1280
- }
1281
-
1282
- $options = $this->get_post_types();
1283
-
1284
- foreach ( $options as $post_type ) {
1285
- if( !empty($post_type['update_lastmod_on_comments']) ) {
1286
- $request['withcomments'] = true;
1287
- break;
1288
- }
1289
- }
1290
-
1291
- // prepare for post types and return modified request
1292
- if ( strpos($request['feed'],'sitemap-posttype') === 0 ) {
1293
- foreach ( $options as $post_type ) {
1294
- if ( $request['feed'] == 'sitemap-posttype-'.$post_type['name'] ) {
1295
- // setup filter
1296
- add_filter( 'post_limits', array($this, 'filter_limits') );
1297
-
1298
- $request['post_type'] = $post_type['name'];
1299
- $request['orderby'] = 'modified';
1300
- $request['is_date'] = false;
1301
-
1302
- return $request;
1303
- }
1304
- }
1305
- }
1306
-
1307
- // for index and custom sitemap, nothing (else) to do (yet)
1308
-
1309
- // prepare for taxonomies and return modified request
1310
- if ( strpos($request['feed'],'sitemap-taxonomy') === 0 ) {
1311
- foreach ( $this->get_taxonomies() as $taxonomy ) {
1312
- if ( $request['feed'] == 'sitemap-taxonomy-'.$taxonomy ) {
1313
-
1314
- $request['taxonomy'] = $taxonomy;
1315
-
1316
- // WPML compat
1317
- global $sitepress;
1318
- if ( isset($sitepress) && is_object($sitepress) ) {
1319
- remove_filter( 'get_terms_args', array($sitepress, 'get_terms_args_filter') );
1320
- remove_filter( 'get_term', array($sitepress,'get_term_adjust_id'), 1 );
1321
- remove_filter( 'terms_clauses', array($sitepress,'terms_clauses') );
1322
- $sitepress->switch_lang('all');
1323
- }
1324
-
1325
- return $request;
1326
- }
1327
- }
1328
- }
1329
-
1330
- endif;
1331
-
1332
- return $request;
1333
- }
1334
-
1335
- /**
1336
- * Response headers filter
1337
- * Does not check if we are really in a sitemap feed.
1338
- *
1339
- * @param $headers
1340
- *
1341
- * @return array
1342
- */
1343
- function headers( $headers ) {
1344
- // set noindex
1345
- $headers['X-Robots-Tag'] = 'noindex, follow';
1346
- $headers['Content-Type'] = 'text/xml; charset=' . get_bloginfo('charset');
1347
- return $headers;
1348
- }
1349
-
1350
- /**
1351
- * FEED TEMPLATES
1352
- */
1353
-
1354
- /**
1355
- * Set up the sitemap index template
1356
- */
1357
- public function load_template_index() {
1358
- load_template( dirname( __FILE__ ) . '/feed-sitemap.php' );
1359
- }
1360
-
1361
- /**
1362
- * set up the sitemap home page(s) template
1363
- */
1364
- public function load_template_base() {
1365
- load_template( dirname( __FILE__ ) . '/feed-sitemap-home.php' );
1366
- }
1367
-
1368
- /**
1369
- * set up the post types sitemap template
1370
- */
1371
- public function load_template() {
1372
- load_template( dirname( __FILE__ ) . '/feed-sitemap-post_type.php' );
1373
- }
1374
-
1375
- /**
1376
- * set up the taxonomy sitemap template
1377
- */
1378
- public function load_template_taxonomy() {
1379
- load_template( dirname( __FILE__ ) . '/feed-sitemap-taxonomy.php' );
1380
- }
1381
-
1382
- /**
1383
- * set up the news sitemap template
1384
- */
1385
- public function load_template_news() {
1386
- load_template( dirname( __FILE__ ) . '/feed-sitemap-news.php' );
1387
- }
1388
-
1389
- /**
1390
- * set up the custom sitemap template
1391
- */
1392
- public function load_template_custom() {
1393
- load_template( dirname( __FILE__ ) . '/feed-sitemap-custom.php' );
1394
- }
1395
-
1396
- /**
1397
- * LIMITS
1398
- */
1399
-
1400
- /**
1401
- * Filter limits
1402
- * override default feed limit
1403
- * @return string
1404
- */
1405
- public function filter_limits( $limit ) {
1406
- return 'LIMIT 0, 50000';
1407
- }
1408
-
1409
- /**
1410
- * Filter news WHERE
1411
- * only posts from the last 48 hours
1412
- *
1413
- * @param string $where
1414
- *
1415
- * @return string
1416
- */
1417
- public function filter_news_where( $where = '' ) {
1418
- return $where . ' AND post_date_gmt > \'' . date('Y-m-d H:i:s', strtotime('-48 hours')) . '\'';
1419
- }
1420
-
1421
- /**
1422
- * Filter news limits
1423
- * override default feed limit for GN
1424
- * @return string
1425
- */
1426
- public function filter_news_limits( $limits ) {
1427
- return 'LIMIT 0, 1000';
1428
- }
1429
-
1430
- /**
1431
- * Filter no news limits
1432
- * in case there is no news, just take the latest post
1433
- * @return string
1434
- */
1435
- public function filter_no_news_limits( $limits ) {
1436
- return 'LIMIT 0, 1';
1437
- }
1438
-
1439
- /**
1440
- * PINGING
1441
- */
1442
-
1443
- /**
1444
- * Ping
1445
- *
1446
- * @param $uri
1447
- * @param int $timeout
1448
- *
1449
- * @return bool
1450
- */
1451
- public function ping($uri, $timeout = 3) {
1452
- $response = wp_remote_request( $uri, array('timeout'=>$timeout) );
1453
-
1454
- return ( '200' == wp_remote_retrieve_response_code($response) ) ? true : false;
1455
- }
1456
-
1457
- /**
1458
- * Do pings
1459
- *
1460
- * @param $new_status
1461
- * @param $old_status
1462
- * @param $post
1463
- */
1464
- public function do_pings($new_status, $old_status, $post) {
1465
- $sitemaps = $this->get_sitemaps();
1466
- $to_ping = $this->get_ping();
1467
- $update = false;
1468
-
1469
- // first check if news sitemap is set
1470
- if ( !empty($sitemaps['sitemap-news']) ) {
1471
- // then check if we've got a post type that is included in our news sitemap
1472
- $news_tags = $this->get_option('news_tags');
1473
- if ( !empty($news_tags['post_type']) && is_array($news_tags['post_type']) && in_array($post->post_type,$news_tags['post_type']) ) {
1474
-
1475
- // TODO: check if we're posting to an included category!
1476
-
1477
- // are we publishing?
1478
- if ( $old_status != 'publish' && $new_status == 'publish' ) {
1479
- // loop through ping targets
1480
- foreach ($to_ping as $se => $data) {
1481
- // check active switch
1482
- if( empty($data['active']) || empty($data['news']) ) {
1483
- continue;
1484
- }
1485
- // and if we did not ping already within the last 5 minutes
1486
- if( !empty($data['pong']) && is_array($data['pong']) && !empty($data['pong'][$sitemaps['sitemap-news']]) && (int)$data['pong'][$sitemaps['sitemap-news']] + 300 > time() ) {
1487
- continue;
1488
- }
1489
- // ping !
1490
- if ( $this->ping( add_query_arg( $data['req'], urlencode(trailingslashit(get_bloginfo('url')).$sitemaps['sitemap-news']), $data['uri'] ) ) ) {
1491
- $to_ping[$se]['pong'][$sitemaps['sitemap-news']] = time();
1492
- $update = true;
1493
- }
1494
- }
1495
- }
1496
- }
1497
- }
1498
-
1499
- // first check if regular sitemap is set
1500
- if ( !empty($sitemaps['sitemap']) ) {
1501
- // then check if we've got a post type that is included in our sitemap
1502
- foreach($this->get_post_types() as $post_type) {
1503
- if ( !empty($post_type) && is_array($post_type) && in_array($post->post_type,$post_type) ) {
1504
- // are we publishing?
1505
- if ( $old_status != 'publish' && $new_status == 'publish' ) {
1506
- foreach ($to_ping as $se => $data) {
1507
- // check active switch
1508
- if ( empty($data['active']) || empty($data['type']) || $data['type']!='GET' ) {
1509
- continue;
1510
- }
1511
- // and if we did not ping already within the last hour
1512
- if ( !empty($data['pong']) && is_array($data['pong']) && !empty($data['pong'][$sitemaps['sitemap']]) && (int)$data['pong'][$sitemaps['sitemap']] + 3600 > time() ) {
1513
- continue;
1514
- }
1515
- // ping !
1516
- if ( $this->ping( add_query_arg( $data['req'], urlencode(trailingslashit(get_bloginfo('url')).$sitemaps['sitemap']), $data['uri'] ) ) ) {
1517
- $to_ping[$se]['pong'][$sitemaps['sitemap']] = time();
1518
- $update = true;
1519
- }
1520
- }
1521
- }
1522
- }
1523
- }
1524
- }
1525
-
1526
- if ( $update ) update_option($this->prefix.'ping',$to_ping);
1527
- }
1528
-
1529
- /**
1530
- * CLEARING & PURGING
1531
- */
1532
-
1533
- /**
1534
- * Clear settings
1535
- */
1536
- public function clear_settings() {
1537
- delete_option( 'xmlsf_version' );
1538
- foreach ( $this->defaults() as $option => $settings ) {
1539
- delete_option( 'xmlsf_' . $option );
1540
- }
1541
-
1542
- if ( defined('WP_DEBUG') && WP_DEBUG ) {
1543
- error_log( 'XML Sitemap Feeds settings cleared' );
1544
- }
1545
- }
1546
-
1547
- /**
1548
- * Cache delete on clean_post_cache
1549
- *
1550
- * @param $post_ID
1551
- * @param $post
1552
- */
1553
- public function clean_post_cache( $post_ID, $post ) {
1554
- // are we moving the post in or out of published status?
1555
- wp_cache_delete('xmlsf_get_archives', 'general');
1556
-
1557
- // TODO get year / month here to delete specific keys too !!!!
1558
- $m = mysql2date('Ym',$post->post_date_gmt, false);
1559
- $y = substr($m, 0, 4);
1560
-
1561
- // clear possible last post modified cache keys
1562
- wp_cache_delete( 'lastpostmodified:gmt', 'timeinfo' ); // should be handled by WP core?
1563
- wp_cache_delete( 'lastpostmodified'.$y.':gmt', 'timeinfo' );
1564
- wp_cache_delete( 'lastpostmodified'.$m.':gmt', 'timeinfo' );
1565
- wp_cache_delete( 'lastpostmodified'.$y.':gmt:'.$post->post_type, 'timeinfo' );
1566
- wp_cache_delete( 'lastpostmodified'.$m.':gmt:'.$post->post_type, 'timeinfo' );
1567
-
1568
- // clear possible last post date cache keys
1569
- wp_cache_delete( 'lastpostdate:gmt', 'timeinfo' );
1570
- wp_cache_delete( 'lastpostdate:gmt:'.$post->post_type, 'timeinfo' );
1571
-
1572
- // clear possible fist post date cache keys
1573
- wp_cache_delete( 'firstpostdate:gmt', 'timeinfo' );
1574
- wp_cache_delete( 'firstpostdate:gmt:'.$post->post_type, 'timeinfo' );
1575
- }
1576
-
1577
- /**
1578
- * Nginx helper purge urls
1579
- * adds sitemap urls to the purge array.
1580
- *
1581
- * @param $urls array
1582
- * @param $redis bool|false
1583
- *
1584
- * @return $urls array
1585
- */
1586
- public function nginx_helper_purge_urls( $urls = array(), $redis = false ) {
1587
- // are permalinks set, blog public and $urls an array?
1588
- if ( '' == get_option('permalink_structure') || '1' != get_option('blog_public') || ! is_array( $urls ) ) {
1589
- return $urls;
1590
- }
1591
-
1592
- if ( $redis ) {
1593
- // wildcard allowed, this makes everything simple
1594
- $urls[] = '/sitemap*.xml';
1595
- } else {
1596
- // no wildcard, go through the motions
1597
- foreach ( $this->get_sitemaps() as $pretty ) {
1598
-
1599
- if ( 'sitemap.xml' == $pretty ) {
1600
-
1601
- // add home sitemap
1602
- $urls[] = parse_url( $this->get_index_url('home'), PHP_URL_PATH);
1603
-
1604
- // add public post types sitemaps
1605
- foreach ( $this->have_post_types() as $post_type ) {
1606
- $archive = !empty($post_type['archive']) ? $post_type['archive'] : '';
1607
- foreach ( $this->get_archives($post_type['name'],$archive) as $url ) {
1608
- $urls[] = parse_url( $url, PHP_URL_PATH);
1609
- }
1610
- }
1611
-
1612
- // add public post taxonomies sitemaps
1613
- foreach ( $this->get_taxonomies() as $taxonomy ) {
1614
- $urls[] = parse_url( $this->get_index_url('taxonomy',$taxonomy), PHP_URL_PATH);
1615
- }
1616
-
1617
- // add custom URLs sitemap
1618
- $custom_urls = $this->get_urls();
1619
- if ( !empty( $custom_urls ) ) {
1620
- $urls[] = parse_url( $this->get_index_url('custom'), PHP_URL_PATH);
1621
- }
1622
-
1623
- // custom sitemaps
1624
- foreach ($this->get_custom_sitemaps() as $url) {
1625
- if ( !empty($url) && $this->is_allowed_domain($url) ) {
1626
- $urls[] = parse_url( esc_url($url), PHP_URL_PATH);
1627
- }
1628
- }
1629
- }
1630
- }
1631
-
1632
- $urls[] = '/' . $pretty;
1633
- }
1634
-
1635
- return $urls;
1636
- }
1637
-
1638
- /**
1639
- * INITIALISATION
1640
- */
1641
-
1642
- /**
1643
- * Upgrade
1644
- */
1645
- public function upgrade( $old_version ) {
1646
- // rewrite rules not available on plugins_loaded
1647
- // and don't flush rules from init as Polylang chokes on that
1648
- // just remove the db option and let WP regenerate them when ready...
1649
- delete_option( 'rewrite_rules' );
1650
- // ... but make sure rules are regenerated when admin is visited.
1651
- set_transient( 'xmlsf_flush_rewrite_rules', '' );
1652
-
1653
- // set this up with a transient too !! get_home_path function not available on init !?!
1654
- //$this->check_static_files();
1655
-
1656
- if ( $old_version !== 0 ) :
1657
-
1658
- if ( version_compare('4.4', $old_version, '>') ) {
1659
- // remove robots.txt rules blocking stylesheets
1660
- if ( $robot_rules = get_option($this->prefix.'robots') ) {
1661
- $robot_rules = str_replace(array('Disallow: */wp-content/','Allow: */wp-content/uploads/'),'',$robot_rules);
1662
- delete_option( $this->prefix.'robots' );
1663
- add_option( $this->prefix.'robots', $robot_rules, '', 'no' );
1664
- }
1665
-
1666
- // upgrade pings
1667
- if ( $pong = get_option( $this->prefix.'pong' ) and is_array($pong) ) { // use 'and' here for precedence of the assignement operator, thanks @kitchin
1668
- $ping = $this->get_ping();
1669
- foreach ( $pong as $se => $arr) {
1670
- if ( is_array( $arr ) ) {
1671
- // convert formatted time to unix time
1672
- foreach ( $arr as $pretty => $date ) {
1673
- $time = strtotime($date);
1674
- $arr[$pretty] = (int)$time < time() ? $time : '';
1675
- }
1676
- // and set array
1677
- $ping[$se]['pong'] = $arr;
1678
- }
1679
- }
1680
- delete_option( $this->prefix.'pong' );
1681
- delete_option( $this->prefix.'ping' );
1682
- add_option( $this->prefix.'ping', array_merge( $this->defaults('ping'), $ping ), '', 'no' );
1683
- }
1684
- }
1685
-
1686
- if ( version_compare('4.4.1', $old_version, '>') ) {
1687
- // register location taxonomies then delete all terms
1688
- register_taxonomy( 'gn-location-3', null );
1689
- $terms = get_terms( 'gn-location-3', array('hide_empty' => false) );
1690
- foreach ( $terms as $term ) {
1691
- wp_delete_term( $term->term_id, 'gn-location-3' );
1692
- }
1693
-
1694
- register_taxonomy( 'gn-location-2', null );
1695
- $terms = get_terms( 'gn-location-2',array('hide_empty' => false) );
1696
- foreach ( $terms as $term ) {
1697
- wp_delete_term( $term->term_id, 'gn-location-2' );
1698
- }
1699
-
1700
- register_taxonomy( 'gn-location-1', null );
1701
- $terms = get_terms( 'gn-location-1',array('hide_empty' => false) );
1702
- foreach ( $terms as $term ) {
1703
- wp_delete_term( $term->term_id, 'gn-location-1' );
1704
- }
1705
- }
1706
-
1707
- if ( version_compare('4.9', $old_version) || version_compare('4.9.1', $old_version) ) {
1708
- // flag to rebuild taxonomy terms
1709
- set_transient('xmlsf_create_genres','');
1710
- };
1711
-
1712
- endif;
1713
-
1714
- update_option( $this->prefix.'version', XMLSF_VERSION );
1715
-
1716
- if ( defined('WP_DEBUG') && WP_DEBUG ) {
1717
- error_log('XML Sitemap Feeds upgraded from '.$old_version.' to '.XMLSF_VERSION);
1718
- }
1719
- }
1720
-
1721
- /**
1722
- * Plugins loaded: load text domain
1723
- */
1724
- public function plugins_loaded() {
1725
- // TEXT DOMAIN
1726
- if ( is_admin() ) { // text domain needed on admin only
1727
- load_plugin_textdomain('xml-sitemap-feed', false, dirname( $this->plugin_basename ) . '/languages' );
1728
- }
1729
- }
1730
-
1731
- /**
1732
- * Check for static sitemap files
1733
- */
1734
- public function check_static_files() {
1735
- $files = array();
1736
-
1737
- if ( !is_multisite() || is_main_site() || is_network_admin() ) {
1738
- $home_path = trailingslashit( get_home_path() );
1739
- $sitemaps = $this->get_sitemaps();
1740
- foreach ( $sitemaps as $name => $pretty ) {
1741
- if ( file_exists( $home_path . $pretty ) ) {
1742
- $files[] = $home_path . $pretty;
1743
- }
1744
- }
1745
- }
1746
-
1747
- if ( !empty($files) ) {
1748
- set_transient('xmlsf_static_files_found', $files);
1749
- }
1750
- }
1751
-
1752
-
1753
- /**
1754
- * Init
1755
- */
1756
- public function init() {
1757
- // UPGRADE
1758
- $version = get_option( 'xmlsf_version', 0 );
1759
-
1760
- if ( version_compare(XMLSF_VERSION, $version, '>') ) {
1761
- $this->upgrade($version);
1762
- }
1763
-
1764
- $sitemaps = $this->get_sitemaps();
1765
-
1766
- if (isset($sitemaps['sitemap'])) {
1767
- // setup feed templates
1768
- add_action( 'do_feed_sitemap', array($this, 'load_template_index'), 10, 1 );
1769
- add_action( 'do_feed_sitemap-home', array($this, 'load_template_base'), 10, 1 );
1770
- add_action( 'do_feed_sitemap-custom', array($this, 'load_template_custom'), 10, 1 );
1771
- foreach ( $this->get_post_types() as $post_type ) {
1772
- add_action( 'do_feed_sitemap-posttype-'.$post_type['name'], array($this, 'load_template'), 10, 1 );
1773
- }
1774
- foreach ( $this->get_taxonomies() as $taxonomy ) {
1775
- add_action( 'do_feed_sitemap-taxonomy-'.$taxonomy, array($this, 'load_template_taxonomy'), 10, 1 );
1776
- }
1777
- }
1778
-
1779
- if (isset($sitemaps['sitemap-news'])) {
1780
- // setup feed template
1781
- add_action('do_feed_sitemap-news', array($this, 'load_template_news'), 10, 1);
1782
-
1783
- // register the taxonomies
1784
- $this->register_gn_taxonomies();
1785
- }
1786
- }
1787
-
1788
- /**
1789
- * Admin init
1790
- */
1791
- public function admin_init() {
1792
- // Include the admin class file
1793
- include_once( dirname( __FILE__ ) . '/class-xmlsitemapfeed-admin.php' );
1794
-
1795
- new XMLSitemapFeed_Admin( $this->plugin_basename );
1796
- }
1797
-
1798
- /**
1799
- * Flush rules
1800
- *
1801
- * @param bool|false $hard
1802
- */
1803
- public function flush_rules( $hard = false ) {
1804
- // did you flush already?
1805
- if ( $this->yes_mother ) {
1806
- return; // yes, mother!
1807
- }
1808
-
1809
- flush_rewrite_rules($hard);
1810
-
1811
- if ( defined('WP_DEBUG') && WP_DEBUG ) {
1812
- error_log('XML Sitemap Feeds rewrite rules flushed');
1813
- }
1814
-
1815
- $this->yes_mother = true;
1816
- }
1817
-
1818
- /**
1819
- * register google news taxonomies
1820
- */
1821
- public function register_gn_taxonomies() {
1822
- $defaults = $this->defaults('news_tags');
1823
- $options = $this->get_option('news_tags');
1824
-
1825
- $post_types = !empty($options['post_type']) ? $options['post_type'] : $defaults['post_type'];
1826
-
1827
- register_taxonomy( 'gn-genre', $post_types, array(
1828
- 'hierarchical' => true,
1829
- 'labels' => array(
1830
- 'name' => __('Google News Genres','xml-sitemap-feed'),
1831
- 'singular_name' => __('Google News Genre','xml-sitemap-feed'),
1832
- 'all_items' => translate('All') // __('All Genres','xml-sitemap-feed')
1833
- //'menu_name' => __('GN Genres','xml-sitemap-feed'),
1834
- ),
1835
- 'public' => false,
1836
- 'show_ui' => true,
1837
- 'show_tagcloud' => false,
1838
- 'query_var' => false,
1839
- 'capabilities' => array( // prevent creation / deletion
1840
- 'manage_terms' => 'nobody',
1841
- 'edit_terms' => 'nobody',
1842
- 'delete_terms' => 'nobody',
1843
- 'assign_terms' => 'edit_posts'
1844
- )
1845
- ));
1846
- }
1847
-
1848
- /**
1849
- * Echo usage info
1850
- * for debugging
1851
- */
1852
- public function _e_usage() {
1853
- if ( defined('WP_DEBUG') && WP_DEBUG == true ) {
1854
- echo '<!-- Queries executed '.get_num_queries();
1855
- if(function_exists('memory_get_peak_usage')) {
1856
- echo ' | Peak memory usage '.round(memory_get_peak_usage()/1024/1024,2).'M';
1857
- }
1858
- echo ' -->';
1859
- }
1860
- }
1861
-
1862
- /**
1863
- * CONSTRUCTOR
1864
- */
1865
-
1866
- function __construct( $basename = 'xml-sitemap-feed/xml-sitemap.php' ) {
1867
- $this->plugin_basename = $basename;
1868
-
1869
- // sitemap element filters
1870
- add_filter( 'the_title_xmlsitemap', 'strip_tags' );
1871
- add_filter( 'the_title_xmlsitemap', 'ent2ncr', 8 );
1872
- add_filter( 'the_title_xmlsitemap', 'esc_html' );
1873
- add_filter( 'bloginfo_xmlsitemap', 'ent2ncr', 8 );
1874
-
1875
- // main REQUEST filtering function
1876
- add_filter( 'request', array($this, 'filter_request'), 1 );
1877
-
1878
- // TEXT DOMAIN...
1879
- add_action( 'plugins_loaded', array($this,'plugins_loaded'), 11 );
1880
-
1881
- // REWRITES
1882
- add_action( 'generate_rewrite_rules', array($this, 'rewrite_rules') );
1883
- add_filter( 'user_trailingslashit', array($this, 'trailingslash') );
1884
-
1885
- // TAXONOMIES, ACTIONS, UPGRADE...
1886
- add_action( 'init', array($this,'init'), 0 );
1887
-
1888
- // REGISTER SETTINGS, SETTINGS FIELDS...
1889
- add_action( 'admin_init', array($this,'admin_init'), 0 );
1890
-
1891
- // ROBOTSTXT
1892
- add_action( 'do_robotstxt', array($this, 'robots'), 0 );
1893
- add_filter( 'robots_txt', array($this, 'robots_txt'), 9 );
1894
-
1895
- // PINGING
1896
- add_action( 'transition_post_status', array($this, 'do_pings'), 10, 3 );
1897
-
1898
- // CLEAR OBJECT CACHE KEYS
1899
- add_action( 'clean_post_cache', array($this, 'clean_post_cache'), 99, 2 );
1900
-
1901
- // NGINX HELPER PURGE URLS
1902
- add_filter( 'rt_nginx_helper_purge_urls', array($this, 'nginx_helper_purge_urls'), 10, 2 );
1903
- }
1904
-
1905
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/feed-sitemap-taxonomy.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * Google News Sitemap Feed Template
4
- *
5
- * @package XML Sitemap Feed plugin for WordPress
6
- */
7
-
8
- if ( ! defined( 'WPINC' ) ) die;
9
-
10
- global $xmlsf;
11
-
12
- // start output
13
- echo $xmlsf->head();
14
- ?>
15
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
16
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
18
- http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
19
- <?php
20
- $taxonomy = get_query_var('taxonomy');
21
-
22
- $terms = get_terms( $taxonomy, array(
23
- 'orderby' => 'count',
24
- 'order' => 'DESC',
25
- 'lang' => '',
26
- 'hierachical' => 0,
27
- 'pad_counts' => true, // count child term post count too...
28
- 'number' => 50000 ) );
29
-
30
- if ( $terms ) :
31
- foreach ( $terms as $term ) :
32
- ?>
33
- <url>
34
- <loc><?php echo get_term_link( $term ); ?></loc>
35
- <priority><?php echo $xmlsf->get_priority('taxonomy',$term); ?></priority>
36
- <?php echo $xmlsf->get_lastmod('taxonomy',$term); ?>
37
- </url>
38
- <?php
39
- endforeach;
40
- endif;
41
-
42
- ?></urlset>
43
- <?php $xmlsf->_e_usage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/feed-sitemap.php DELETED
@@ -1,72 +0,0 @@
1
- <?php
2
- /**
3
- * XML Sitemap Index Feed Template
4
- *
5
- * @package XML Sitemap Feed plugin for WordPress
6
- */
7
-
8
- if ( ! defined( 'WPINC' ) ) die;
9
-
10
- global $xmlsf;
11
-
12
- // start output
13
- echo $xmlsf->head('index');
14
- ?>
15
- <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
16
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
18
- http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
19
- <sitemap>
20
- <loc><?php echo $xmlsf->get_index_url('home'); ?></loc>
21
- <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastpostdate( 'gmt' ), false); ?></lastmod>
22
- </sitemap>
23
- <?php
24
- // add rules for public post types
25
- foreach ( $xmlsf->have_post_types() as $post_type ) {
26
- $archive = isset($post_type['archive']) ? $post_type['archive'] : '';
27
-
28
- foreach ( $xmlsf->get_archives($post_type['name'],$archive) as $m => $url ) {
29
- ?>
30
- <sitemap>
31
- <loc><?php echo $url; ?></loc>
32
- <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastmodified( 'gmt', $post_type['name'], $m ), false); ?></lastmod>
33
- </sitemap>
34
- <?php
35
- }
36
- }
37
-
38
- // add rules for public taxonomies
39
- foreach ( $xmlsf->get_taxonomies() as $taxonomy ) {
40
- if ( wp_count_terms( $taxonomy, array('hide_empty'=>true) ) > 0 ) {
41
- ?>
42
- <sitemap>
43
- <loc><?php echo $xmlsf->get_index_url('taxonomy',$taxonomy); ?></loc>
44
- <?php echo $xmlsf->get_lastmod('taxonomy',$taxonomy); ?></sitemap>
45
- <?php
46
- }
47
- }
48
-
49
- // custom URLs sitemap
50
- $urls = $xmlsf->get_urls();
51
- if ( !empty($urls) ) {
52
- ?>
53
- <sitemap>
54
- <loc><?php echo $xmlsf->get_index_url('custom'); ?></loc>
55
- </sitemap>
56
- <?php
57
- }
58
-
59
- // custom sitemaps
60
- $custom_sitemaps = $xmlsf->get_custom_sitemaps();
61
- foreach ($custom_sitemaps as $url) {
62
- if (empty($url) || !$xmlsf->is_allowed_domain($url))
63
- continue;
64
- ?>
65
- <sitemap>
66
- <loc><?php echo esc_url($url); ?></loc>
67
- </sitemap>
68
- <?php
69
- }
70
-
71
- ?></sitemapindex>
72
- <?php $xmlsf->_e_usage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/functions.php DELETED
@@ -1,174 +0,0 @@
1
- <?php
2
- /* -------------------------------------
3
- * CONDITIONAL FUNCTIONS
4
- * ------------------------------------- */
5
-
6
- /**
7
- * Is the query for a sitemap?
8
- *
9
- * @since 4.8
10
- *
11
- * @global XMLSitemapFeed $xmlsf Global XML Sitemap Feed instance.
12
- * @return bool
13
- */
14
- function is_sitemap() {
15
- global $xmlsf;
16
-
17
- if ( ! is_object( $xmlsf ) || $xmlsf->request_filtered === false ) {
18
- _doing_it_wrong( __FUNCTION__, __( 'Conditional sitemap tags do not work before the sitemap request filter is run. Before then, they always return false.', 'xml-sitemap-feed' ), '4.8' );
19
- return false;
20
- }
21
-
22
- return $xmlsf->is_sitemap();
23
- }
24
-
25
- /**
26
- * Is the query for a news sitemap?
27
- *
28
- * @since 4.8
29
- *
30
- * @global XMLSitemapFeed $xmlsf Global XML Sitemap Feed instance.
31
- * @return bool
32
- */
33
- function is_news() {
34
- global $xmlsf;
35
-
36
- if ( ! is_object( $xmlsf ) || $xmlsf->request_filtered === false ) {
37
- _doing_it_wrong( __FUNCTION__, __( 'Conditional sitemap tags do not work before the sitemap request filter is run. Before then, they always return false.', 'xml-sitemap-feed' ), '4.8' );
38
- return false;
39
- }
40
-
41
- return $xmlsf->is_news();
42
- }
43
-
44
- /* -------------------------------------
45
- * MISSING WORDPRESS FUNCTIONS
46
- * ------------------------------------- */
47
-
48
- /**
49
- * Retrieve the date that the first post/page was published.
50
- * Variation of function get_lastpostdate, uses _get_post_time
51
- *
52
- * The server timezone is the default and is the difference between GMT and
53
- * server time. The 'blog' value is the date when the last post was posted. The
54
- * 'gmt' is when the last post was posted in GMT formatted date.
55
- *
56
- * @uses apply_filters() Calls 'get_firstpostdate' filter
57
- *
58
- * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
59
- * @param string $post_type Post type to check.
60
- * @return string The date of the last post.
61
- */
62
- if( !function_exists('get_firstpostdate') ) {
63
- function get_firstpostdate($timezone = 'server', $post_type = 'any') {
64
- return apply_filters( 'get_firstpostdate', _get_post_time( $timezone, 'date', $post_type, 'first' ), $timezone );
65
- }
66
- }
67
-
68
- /**
69
- * Retrieve last post/page modified date depending on timezone.
70
- * Variation of function get_lastpostmodified, uses _get_post_time
71
- *
72
- * The server timezone is the default and is the difference between GMT and
73
- * server time. The 'blog' value is the date when the last post was posted. The
74
- * 'gmt' is when the last post was posted in GMT formatted date.
75
- *
76
- * @uses apply_filters() Calls 'get_lastmodified' filter
77
- *
78
- * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
79
- * @return string The date of the oldest modified post.
80
- */
81
- if( !function_exists('get_lastmodified') ) {
82
- function get_lastmodified( $timezone = 'server', $post_type = 'any', $m = '' ) {
83
- return apply_filters( 'get_lastmodified', _get_post_time( $timezone, 'modified', $post_type, 'last', $m ), $timezone );
84
- }
85
- }
86
-
87
- /**
88
- * Retrieve first or last post type date data based on timezone.
89
- * Variation of function _get_last_post_time
90
- *
91
- * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
92
- * @param string $field Field to check. Can be 'date' or 'modified'.
93
- * @param string $post_type Post type to check. Defaults to 'any'.
94
- * @param string $which Which to check. Can be 'first' or 'last'. Defaults to 'last'.
95
- * @param string $m year, month or day period. Can be empty or integer.
96
- * @return string The date.
97
- */
98
- if( !function_exists('_get_post_time') ) {
99
- function _get_post_time( $timezone, $field, $post_type = 'any', $which = 'last', $m = '' ) {
100
- global $wpdb;
101
-
102
- if ( !in_array( $field, array( 'date', 'modified' ) ) ) {
103
- return false;
104
- }
105
-
106
- $timezone = strtolower( $timezone );
107
-
108
- $m = preg_replace('|[^0-9]|', '', $m);
109
-
110
- $key = "{$which}post{$field}{$m}:$timezone";
111
-
112
- if ( 'any' !== $post_type ) {
113
- $key .= ':' . sanitize_key( $post_type );
114
- }
115
-
116
- $date = wp_cache_get( $key, 'timeinfo' );
117
- if ( false !== $date ) {
118
- return $date;
119
- }
120
-
121
- if ( $post_type === 'any' ) {
122
- $post_types = get_post_types( array( 'public' => true ) );
123
- array_walk( $post_types, array( &$wpdb, 'escape_by_ref' ) );
124
- $post_types = "'" . implode( "', '", $post_types ) . "'";
125
- } elseif ( is_array($post_type) ) {
126
- $types = get_post_types( array( 'public' => true ) );
127
- foreach ( $post_type as $type )
128
- if ( !in_array( $type, $types ) )
129
- return false;
130
- array_walk( $post_type, array( &$wpdb, 'escape_by_ref' ) );
131
- $post_types = "'" . implode( "', '", $post_type ) . "'";
132
- } else {
133
- if ( !in_array( $post_type, get_post_types( array( 'public' => true ) ) ) )
134
- return false;
135
- $post_types = "'" . addslashes($post_type) . "'";
136
- }
137
-
138
- $where = "post_status='publish' AND post_type IN ({$post_types}) AND post_date_gmt";
139
-
140
- // If a period is specified in the querystring, add that to the query
141
- if ( !empty($m) ) {
142
- $where .= " AND YEAR(post_date)=" . substr($m, 0, 4);
143
- if ( strlen($m) > 5 ) {
144
- $where .= " AND MONTH(post_date)=" . substr($m, 4, 2);
145
- if ( strlen($m) > 7 ) {
146
- $where .= " AND DAY(post_date)=" . substr($m, 6, 2);
147
- }
148
- }
149
- }
150
-
151
- $order = ( $which == 'last' ) ? 'DESC' : 'ASC';
152
-
153
- switch ( $timezone ) {
154
- case 'gmt':
155
- $date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE $where ORDER BY post_{$field}_gmt $order LIMIT 1");
156
- break;
157
- case 'blog':
158
- $date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE $where ORDER BY post_{$field}_gmt $order LIMIT 1");
159
- break;
160
- case 'server':
161
- $add_seconds_server = date('Z');
162
- $date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE $where ORDER BY post_{$field}_gmt $order LIMIT 1");
163
- break;
164
- }
165
-
166
- if ( $date ) {
167
- wp_cache_set( $key, $date, 'timeinfo' );
168
-
169
- return $date;
170
- }
171
-
172
- return false;
173
- }
174
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/instructions.txt DELETED
@@ -1,27 +0,0 @@
1
- === XML Sitemap & Google News Sitemap Feeds ===
2
-
3
- == Translation ==
4
-
5
- 1. Install PoEdit on your computer.
6
-
7
- 2. Go to this plugins /languages/ directory.
8
-
9
- 3. If there is no .po file that corresponds with your language yet, rename the template translation database xml-sitemap-feed-xx_XX.po by replacing the xx with your language code and XX with your country code.
10
-
11
- 4. Open the .po file of your language with PoEdit.
12
-
13
- 5. Go to Edit > Preferences and on the tab Editor check the option to compile a .mo database on save automatically. Close with OK.
14
-
15
- 6. Go to Catalog > Settings and set your name, e-mail address, language and country. Close with OK.
16
-
17
- 7. Go to Catalog > Update from POT-file and select the main xml-sitemap-feed.pot file. Then accept all new and removed translation strings with OK.
18
-
19
- 8. Now go ahead and start translating all the texts listed in PoEdit.
20
-
21
- 9. When done, go to File > Save to Save.
22
-
23
- 10. Upload the automatically created xml-sitemap-feed-xx_XX.mo database file (where xx_XX should now be your language and country code) to the plugins /languages/ directory on your WordPress site.
24
-
25
- 11. After verifying the translations work on your site, send the .mo file and, if you're willing to share it, your original .po file to ravanhagen@gmail.com and don't forget to tell me how and with what link you would like to be mentioned in the credits!
26
-
27
- Thanks for sharing your translation :)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-es_ES.mo DELETED
Binary file
languages/xml-sitemap-feed-es_ES.po DELETED
@@ -1,528 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-09-01 16:38+0100\n"
6
- "PO-Revision-Date: 2013-11-29 11:45+0100\n"
7
- "Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e;_n\n"
13
- "X-Poedit-SourceCharset: UTF-8\n"
14
- "X-Generator: Poedit 1.5.5\n"
15
-
16
- #: ../includes/admin.php:19
17
- msgid "XML Sitemaps"
18
- msgstr "Mapas de Sitios XML"
19
-
20
- #: ../includes/admin.php:20
21
- msgid "XML Sitemap Index"
22
- msgstr "Índice de Mapas de Sitios XML"
23
-
24
- #: ../includes/admin.php:25 ../includes/admin.php:820
25
- msgid "Google News Sitemap"
26
- msgstr "Mapa de Sitio Noticias Google"
27
-
28
- #: ../includes/admin.php:69
29
- msgid "Google"
30
- msgstr "Google"
31
-
32
- #: ../includes/admin.php:72
33
- msgid "Bing & Yahoo"
34
- msgstr "Bing & Yahoo"
35
-
36
- #: ../includes/admin.php:75
37
- msgid "Yandex"
38
- msgstr "Yandex"
39
-
40
- #: ../includes/admin.php:78
41
- msgid "Baidu"
42
- msgstr "Baidu"
43
-
44
- #: ../includes/admin.php:81
45
- msgid "Ping-O-Matic"
46
- msgstr "Ping-O-Matic"
47
-
48
- #: ../includes/admin.php:89 ../includes/admin.php:778
49
- msgid "Ping on Publish"
50
- msgstr "Ping on Publish"
51
-
52
- #: ../includes/admin.php:113
53
- #, php-format
54
- msgid "Successfully pinged for %1$s on %2$s GMT."
55
- msgstr "Pinged exitosamente para %1$s en %2$s GMT."
56
-
57
- #: ../includes/admin.php:123
58
- #, php-format
59
- msgid "Rules to append to the %s generated by WordPress."
60
- msgstr "Reglas para anexar a los %s generados por WordPress"
61
-
62
- #: ../includes/admin.php:124
63
- msgid ""
64
- "Only add rules here when you know what you are doing, otherwise you might "
65
- "break search engine access to your site."
66
- msgstr ""
67
- "Únicamente añada reglas aquí cuando sepa lo que está haciendo, de otro modo "
68
- "puede cortar el acceso del motor de búsqueda a su sitio."
69
-
70
- #: ../includes/admin.php:124
71
- msgid ""
72
- "These rules will not have effect when you are using a static robots.txt file."
73
- msgstr ""
74
- "Estas reglas no tendrán efecto cuando utilice un archivo robots.txt estático."
75
-
76
- #: ../includes/admin.php:131
77
- msgid ""
78
- "Clear all XML Sitemap Feed options from the database and start fresh with "
79
- "the default settings."
80
- msgstr ""
81
- "Limpie todas las opciones de Alimentación al Mapa de Sitio XML de la base de "
82
- "datos y comience de nuevo con la configuración por omisión."
83
-
84
- #: ../includes/admin.php:133
85
- #, php-format
86
- msgid "Disabling and reenabling the %s plugin will have the same effect."
87
- msgstr "Deshabilitar y rehabilitar el plugin %s tendrá el mismo efecto."
88
-
89
- #: ../includes/admin.php:133 ../includes/admin.php:141
90
- #: ../includes/admin.php:352
91
- msgid "XML Sitemap & Google News Feeds"
92
- msgstr "Mapa de sitio XML & Noticias Google"
93
-
94
- #: ../includes/admin.php:141 ../includes/admin.php:352
95
- #, php-format
96
- msgid "Donate to keep the free %s plugin development & support going!"
97
- msgstr "Done para conservar gratutio el desarrollo del plugin %s ¡y apóyelo!"
98
-
99
- #: ../includes/admin.php:141
100
- #, php-format
101
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
102
- msgstr ""
103
- "Estos parámetros controlan los Mapas de Sitio XML generados por el plugin %s."
104
-
105
- #: ../includes/admin.php:150
106
- msgid "XML Sitemaps for post types"
107
- msgstr "Mapas de Sitio XML para tipos de publicaciones."
108
-
109
- #: ../includes/admin.php:189
110
- msgid "Year"
111
- msgstr "Año"
112
-
113
- #: ../includes/admin.php:190
114
- msgid "Month"
115
- msgstr "Mes"
116
-
117
- #: ../includes/admin.php:194
118
- msgid "Split by"
119
- msgstr "Dividir por"
120
-
121
- #: ../includes/admin.php:204
122
- msgid ""
123
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
124
- "split by month is needed."
125
- msgstr ""
126
- "Dividir por año si experimenta errores o más de sitio lentos. En casos "
127
- "raros, divida por mes si es necesario."
128
-
129
- #: ../includes/admin.php:209 ../includes/admin.php:725
130
- msgid "Priority"
131
- msgstr "Prioridad"
132
-
133
- #: ../includes/admin.php:211
134
- msgid "Priority can be overridden on individual posts."
135
- msgstr "La Prioridad se puede anteponer a publicaciones individuales."
136
-
137
- #: ../includes/admin.php:216
138
- msgid ""
139
- "Automatically adjusts Priority according to relative age and comment count."
140
- msgstr ""
141
- "Ajusta la Prioridad automáticamente de acuerdo a edad relativa y cantidad de "
142
- "comentarios."
143
-
144
- #: ../includes/admin.php:216
145
- msgid ""
146
- "Sticky posts will not be subject to reduction by age. Individual posts with "
147
- "fixed Priority will always keep that value."
148
- msgstr ""
149
- "Las publicaciones no estarán sujetas a reducción por edad. Las publicaciones "
150
- "individuales siempre conservarán ese valor."
151
-
152
- #: ../includes/admin.php:221
153
- msgid "Update Lastmod and Changefreq on comments."
154
- msgstr "Actualizar Lastmod y Changefreq en comentarios."
155
-
156
- #: ../includes/admin.php:221
157
- msgid ""
158
- "Set this if discussion on your site warrants reindexation upon each new "
159
- "comment."
160
- msgstr ""
161
- "Establezca esto si la discusión en su sitio garantiza la reindexación en "
162
- "cada nuevo comentario."
163
-
164
- #: ../includes/admin.php:225 ../includes/admin.php:371
165
- msgid "Add image tags for"
166
- msgstr "Añada etiquetas de imagen para"
167
-
168
- #: ../includes/admin.php:233 ../includes/admin.php:378
169
- msgid "Attached images"
170
- msgstr "Imágenes adjuntas"
171
-
172
- #: ../includes/admin.php:243
173
- msgid ""
174
- "Priority settings do not affect ranking in search results in any way. They "
175
- "are only meant to suggest search engines which URLs to index first. Once a "
176
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
177
- "updated."
178
- msgstr ""
179
- "Los parámetros de prioridad no afectan la clasificación en los resultados. "
180
- "Sólo sugieren a los motores de búsqueda cuáles URLs encontrar primero. Una "
181
- "vez que la URL ha sido indexada, su Prioridad se vuelve insignificante hasta "
182
- "que su Lastmod sea actualizada."
183
-
184
- #: ../includes/admin.php:243
185
- msgid ""
186
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
187
- "when allowed, posts with high comment count."
188
- msgstr ""
189
- "Prioridad Máxima (1.0) está reservada para la página frontal, publicaciones "
190
- "individuales y, cuando sea permitido, publicaciones con gran número de "
191
- "comentarios."
192
-
193
- #: ../includes/admin.php:243
194
- msgid ""
195
- "Priority values are taken as relative values. Setting all to the same (high) "
196
- "value is pointless."
197
- msgstr ""
198
- "Los valores de prioridad se toman como valores relativos. Fijar todos al "
199
- "mismo valor (alto) es innecesario."
200
-
201
- #: ../includes/admin.php:294
202
- msgid "XML Sitemaps for taxonomies"
203
- msgstr "Mapas de Sitios XML para taxonomías."
204
-
205
- #: ../includes/admin.php:300
206
- msgid ""
207
- "It is generally not recommended to include taxonomy pages, unless their "
208
- "content brings added value."
209
- msgstr ""
210
- "No es recomendado generalmente incluir páginas de taxonomía, a menos que su "
211
- "contenido proporcione valor agregado."
212
-
213
- #: ../includes/admin.php:300
214
- msgid ""
215
- "For example, when you use category descriptions with information that is not "
216
- "present elsewhere on your site or if taxonomy pages list posts with an "
217
- "excerpt that is different from, but complementary to the post content. In "
218
- "these cases you might consider including certain taxonomies. Otherwise, if "
219
- "you fear <a href=\"http://moz.com/learn/seo/duplicate-content\">negative "
220
- "affects of duplicate content</a> or PageRank spread, you might even consider "
221
- "disallowing indexation of taxonomies."
222
- msgstr ""
223
- "Por ejemplo, cuando se utilizan descripciones de las categorías con "
224
- "información que no está presente en otros lugares en su sitio o si la lista "
225
- "de páginas de taxonomía enlista las publicaciones con un extracto que es "
226
- "diferente, pero complementario al contenido de la publicación. En estos "
227
- "casos, es posible considerar la inclusión de ciertas taxonomías. De lo "
228
- "contrario, si teme <a href=\"http://moz.com/learn/seo/duplicate-content\"> "
229
- "afecta negativamente al contenido duplicado </ a> o propagación PageRank, "
230
- "incluso podría considerar no permitir la indexación de las taxonomías ."
231
-
232
- #: ../includes/admin.php:300
233
- #, php-format
234
- msgid ""
235
- "You can do this by adding specific robots.txt rules in the %s field above."
236
- msgstr ""
237
- "Puede hacer esto añadiendo reglas específicas robots.txt en el campo %s de "
238
- "arriba."
239
-
240
- #: ../includes/admin.php:300 ../includes/admin.php:789
241
- msgid "Additional robots.txt rules"
242
- msgstr "Reglas robots.txt adicionales"
243
-
244
- #: ../includes/admin.php:315
245
- msgid "No taxonomies available for the currently included post types."
246
- msgstr ""
247
- "No hay taxonomías disponibles para los tipos de publicaciones incluidas "
248
- "actualmente."
249
-
250
- #: ../includes/admin.php:331
251
- msgid "Additional URLs to append to the XML Sitemap."
252
- msgstr "URLs adicionales para anexar al Mapa de Sitio XML."
253
-
254
- #: ../includes/admin.php:332
255
- msgid ""
256
- "Add the full URL, including protocol (http/https) and domain, of any static "
257
- "page or WordPress page that you want to append to the ones already included "
258
- "by the settings above. Optionally add a priority value between 0 and 1, "
259
- "separated with a space, after the URL. Start each URL on a new line."
260
- msgstr ""
261
- "Añada la URL completa incluyendo el protocolo (http/https) y el dominio de "
262
- "cualquier página estática o página de WordPress que desee anexar a las ya "
263
- "incluidas por los parámetros de arriba. Opcionalmente, añada un valor de "
264
- "prioridad entre 0 y , separados por un espacio después de la URL. Comience "
265
- "cada URL en un nuevo renglón."
266
-
267
- #: ../includes/admin.php:341
268
- msgid "Additional domains to allow in the XML Sitemap."
269
- msgstr "Dominios adicionales para permitir en el Mapa de Sitio XML."
270
-
271
- #: ../includes/admin.php:342
272
- #, php-format
273
- msgid ""
274
- "By default, only the domain %s as used in your WordPress site address is "
275
- "allowed. This means that all URLs that use another domain (custom URLs or "
276
- "using a plugin like Page Links To) are filtered from the XML Sitemap. "
277
- "However, if you are the verified owner of other domains in your Google/Bing "
278
- "Webmaster Tools account, you can include these in the same sitemap. Add "
279
- "these domains, without protocol (http/https) each on a new line. Note that "
280
- "if you enter a domain with www, all URLs without it or with other subdomains "
281
- "will be filtered."
282
- msgstr ""
283
- "Por defecto, sólo se permite el dominio %s como se utiliza en la dirección "
284
- "del sitio de WordPress. Esto significa que todas las URL que utilizan otro "
285
- "dominio (URL personalizadas o usar un plugin como Page Links a) se filtran "
286
- "desde el Mapa de Sitio XML. Sin embargo, si usted es el propietario "
287
- "verificado de otros dominios en su cuenta de Herramientas para webmasters de "
288
- "Google / Bing, puede incluirlos en el mismo mapa del sitio. Añada estos "
289
- "dominios, sin protocolo (http / https) cada uno en una línea nueva. Tenga en "
290
- "cuenta que si usted entra en un dominio con www, se filtrarán todos los URL "
291
- "sin ella o con otros subdominios."
292
-
293
- #: ../includes/admin.php:352
294
- #, php-format
295
- msgid ""
296
- "These settings control the Google News Sitemap generated by the %s plugin."
297
- msgstr ""
298
- "Estos parámetros controlan el Mapa de Sitio Noticias Google generado por el "
299
- "plugin %s."
300
-
301
- #: ../includes/admin.php:352
302
- msgid ""
303
- "When you are done configuring and preparing your news content and you are "
304
- "convinced your site adheres to the <a href=\"https://support.google.com/news/"
305
- "publisher/answer/40787?ref_topic=2484652\" target=\"_blank\">Google News "
306
- "guidelines</a>, go ahead and <a href=\"https://support.google.com/news/"
307
- "publisher/troubleshooter/3179220?#ts=3179198\" target=\"_blank\">submit your "
308
- "site for inclusion</a>!"
309
- msgstr ""
310
- "Cuando haya terminado de configurar y preparar su contenido de noticias y "
311
- "usted está convencido de que su sitio se adhiere a las <a href=\"https://"
312
- "support.google.com/news/publisher/answer/40787?ref_topic=2484652\" target="
313
- "\"_blank\">Google News guidelines</a>, go ahead and <a href=\"https://"
314
- "support.google.com/news/publisher/troubleshooter/3179220?#ts=3179198\" "
315
- "target=\"_blank\">submit your site for inclusion</a>!"
316
-
317
- #: ../includes/admin.php:362
318
- #, php-format
319
- msgid "By default, the general %s setting will be used."
320
- msgstr "Por defecto, serán utilizados los parámetros generales %s."
321
-
322
- #: ../includes/admin.php:392 ../includes/admin.php:826
323
- msgid "Access (&lt;access&gt; tag)"
324
- msgstr "Acceso (&lt;access&gt; tag)"
325
-
326
- #: ../includes/admin.php:393
327
- #, php-format
328
- msgid ""
329
- "The &lt;access&gt; tag specifies whether an article is available to all "
330
- "readers (%1$s), or only to those with a free (%2$s) or paid membership "
331
- "(%3$s) to your site."
332
- msgstr ""
333
- "The &lt;access&gt; especifica si un artículo se encuentra disponible a "
334
- "todos los lectores (%1$s), o sólo a aquellos con una membrecía gratuita "
335
- "(%2$s) o pagada (%3$s) a su sitio."
336
-
337
- #: ../includes/admin.php:393 ../includes/admin.php:400
338
- #: ../includes/admin.php:413
339
- msgid "Registration"
340
- msgstr "Registro"
341
-
342
- #: ../includes/admin.php:393 ../includes/admin.php:401
343
- #: ../includes/admin.php:414
344
- msgid "Subscription"
345
- msgstr "Subscripción"
346
-
347
- #: ../includes/admin.php:398
348
- msgid "Tag normal posts as"
349
- msgstr "Etiquete publicaciones normales como"
350
-
351
- #: ../includes/admin.php:412
352
- #, php-format
353
- msgid "Tag %s posts as"
354
- msgstr "Etiquete publicaciones %s como"
355
-
356
- #: ../includes/admin.php:419
357
- msgid ""
358
- "Note: The &lt;access&gt; tag is required when applicable. Do not leave it to "
359
- "Public when your content is not."
360
- msgstr ""
361
- "Nota: La etiqueta &lt;Access&gt; es requerida cuando sea necesaria. No le "
362
- "deje en Pública cuando su contenido no lo es."
363
-
364
- #: ../includes/admin.php:439 ../includes/admin.php:827
365
- msgid "Genres (&lt;genres&gt; tag)"
366
- msgstr "Géneros (&lt;genres&gt; tag)"
367
-
368
- #: ../includes/admin.php:440
369
- msgid ""
370
- "The &lt;genres&gt; tag specifies one or more properties for an article, "
371
- "namely, whether it is a press release, a blog post, an opinion, an op-ed "
372
- "piece, user-generated content, or satire."
373
- msgstr ""
374
- "La etiqueta &lt;genres&gt; especifica una o más propiedades de un artículo, "
375
- "a saber, si se trata de un comunicado de prensa, un blog, una opinión, una "
376
- "columna de opinión, el contenido generado por el usuario, o sátira."
377
-
378
- #: ../includes/admin.php:440
379
- msgid "You can assign Google News genres when writing a new post."
380
- msgstr ""
381
- "Puede asignar géneros de Noticias Google al escribir una nueva publicación."
382
-
383
- #: ../includes/admin.php:451
384
- msgid "Default genre:"
385
- msgstr "Género por defecto:"
386
-
387
- #: ../includes/admin.php:460
388
- msgid ""
389
- "Note: The &lt;genres&gt; tag is required when applicable and restricted to "
390
- "the list provided above."
391
- msgstr ""
392
- "Nota: La etiqueta &lt;genres&gt; es requerida cuando sea necesaria y "
393
- "restringida a la lista proporcionad arriba."
394
-
395
- #: ../includes/admin.php:472 ../includes/admin.php:828
396
- msgid "Topics (&lt;keywords&gt; tag)"
397
- msgstr "Temas (&lt;keywords&gt; etiqueta)"
398
-
399
- #: ../includes/admin.php:473
400
- msgid ""
401
- "The &lt;keywords&gt; tag is used to help classify the articles you submit to "
402
- "Google News by <strong>topic</strong>."
403
- msgstr ""
404
- "La etiqueta &lt;keywords&gt; se usa para ayudarle a clasificar los artículos "
405
- "que envíe a Noticias Google por <strong>topic</strong>."
406
-
407
- #: ../includes/admin.php:475
408
- #, php-format
409
- msgid "Use %s for topics."
410
- msgstr "Utilice %s para temas"
411
-
412
- #: ../includes/admin.php:480
413
- msgid "Default topic(s):"
414
- msgstr "Tema(s) por defecto:"
415
-
416
- #: ../includes/admin.php:482 ../includes/admin.php:503
417
- msgid "Separate with a comma."
418
- msgstr "Separar con una coma."
419
-
420
- #: ../includes/admin.php:484
421
- msgid ""
422
- "Keywords may be drawn from, but are not limited to, the list of <a href="
423
- "\"http://www.google.com/support/news_pub/bin/answer.py?answer=116037\" "
424
- "target=\"_blank\">existing Google News keywords</a>."
425
- msgstr ""
426
- "Las palabras clave pueden extraerse de, pero no se limitan a, la lista de <a "
427
- "href=\"http://www.google.com/support/news_pub/bin/answer.py?answer=116037\" "
428
- "target=\"_blank\">existing Google News keywords</a>."
429
-
430
- #: ../includes/admin.php:494 ../includes/admin.php:829
431
- msgid "Locations (&lt;geo_locations&gt; tag)"
432
- msgstr "Localizaciones (&lt;geo_locations&gt; tag)"
433
-
434
- #: ../includes/admin.php:495
435
- msgid ""
436
- "The &lt;geo_locations&gt; tag is used identify the geographic location of "
437
- "your articles."
438
- msgstr ""
439
- "La etiqueta &lt;geo_locations&gt; se utiliza para identificar la "
440
- "localización geográfica de sus artículos."
441
-
442
- #: ../includes/admin.php:495
443
- msgid "You can assign locations when writing a new post."
444
- msgstr "Puede asignar localizaciones al escribir una nueva publicación."
445
-
446
- #: ../includes/admin.php:501
447
- msgid "Default location:"
448
- msgstr "Localización por defecto:"
449
-
450
- #: ../includes/admin.php:505
451
- msgid ""
452
- "You should list location entities from smallest entity to largest. For "
453
- "example: <code>Detroit, Michigan, USA</code> or <code>Rhône-Alpes, France</"
454
- "code>."
455
- msgstr ""
456
- "Se deben poner las entidades de ubicación de entidad menor a mayor. Por "
457
- "ejemplo: <code> Detroit, Michigan, EE.UU. </ code> o <code> Ródano-Alpes, "
458
- "Francia </ code>."
459
-
460
- #: ../includes/admin.php:689 ../includes/admin.php:798
461
- msgid "XML Sitemap"
462
- msgstr "Mapa de Sitio XML"
463
-
464
- #: ../includes/admin.php:721
465
- msgid "Exclude from XML Sitemap"
466
- msgstr "Excluir del Mapa de Sitio XML"
467
-
468
- #: ../includes/admin.php:727
469
- #, php-format
470
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
471
- msgstr "Deje vacío para Prioridad automática como se configuró en %1$s > %2$s."
472
-
473
- #: ../includes/admin.php:773
474
- msgid "Enable XML sitemaps"
475
- msgstr "Habilitar Mapas de Sitio XML"
476
-
477
- #: ../includes/admin.php:794
478
- msgid "Reset XML sitemaps"
479
- msgstr "Restaurar Mapas de Sitio XML"
480
-
481
- #: ../includes/admin.php:801
482
- msgid "Include post types"
483
- msgstr "Incluir tipos de publicaciones"
484
-
485
- #: ../includes/admin.php:804
486
- msgid "Include taxonomies"
487
- msgstr "Incluir taxonomías"
488
-
489
- #: ../includes/admin.php:807
490
- msgid "Include custom URLs"
491
- msgstr "Incluir URLs personalizadas"
492
-
493
- #: ../includes/admin.php:811
494
- msgid "Additional allowed domains"
495
- msgstr "Dominios permitidos adicionales"
496
-
497
- #: ../includes/admin.php:824
498
- msgid "Publication name"
499
- msgstr "Nombre de la publicación"
500
-
501
- #: ../includes/core.php:1059
502
- msgid "Google News Genres"
503
- msgstr "Géneros de Noticias Google"
504
-
505
- #: ../includes/core.php:1060
506
- msgid "Google News Genre"
507
- msgstr "Género de Noticias Google"
508
-
509
- #: ../includes/core.php:1078
510
- msgid "Google News Country"
511
- msgstr "País de Noticias Google"
512
-
513
- #: ../includes/core.php:1080 ../includes/core.php:1099
514
- #: ../includes/core.php:1118
515
- msgid ""
516
- "Only one allowed. Must be consistent with other Google News location "
517
- "entities (if set)."
518
- msgstr ""
519
- "Sólo uno permitido. Debe ser consistente con otras entidades de localización "
520
- "de Noticias Google (si se establecen)."
521
-
522
- #: ../includes/core.php:1097
523
- msgid "Google News State/Province"
524
- msgstr "Estado/Provincia de Noticias Google"
525
-
526
- #: ../includes/core.php:1116
527
- msgid "Google News City"
528
- msgstr "Ciudad de Noticias Google"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-fr_FR.mo DELETED
Binary file
languages/xml-sitemap-feed-fr_FR.po DELETED
@@ -1,594 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-01-05 04:05+0100\n"
6
- "PO-Revision-Date: 2015-06-09 21:29+0100\n"
7
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
- "Language-Team: \n"
9
- "Language: fr_FR\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e;_n\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.7.5\n"
16
-
17
- #: ../includes/core.php:1186
18
- msgid "Google News Genres"
19
- msgstr "Genres Google News"
20
-
21
- #: ../includes/core.php:1187
22
- msgid "Google News Genre"
23
- msgstr "Google News Genre"
24
-
25
- #: ../includes/core.php:1205
26
- msgid "Google News Country"
27
- msgstr "Google News Pays"
28
-
29
- #: ../includes/core.php:1207 ../includes/core.php:1226
30
- #: ../includes/core.php:1245
31
- msgid ""
32
- "Only one allowed. Must be consistent with other Google News location "
33
- "entities (if set)."
34
- msgstr ""
35
-
36
- #: ../includes/core.php:1224
37
- msgid "Google News State/Province"
38
- msgstr "Google News Région"
39
-
40
- #: ../includes/core.php:1243
41
- msgid "Google News City"
42
- msgstr "Google News Ville"
43
-
44
- #: ../includes/admin.php:19
45
- msgid "XML Sitemaps"
46
- msgstr "XML Sitemaps"
47
-
48
- #: ../includes/admin.php:20
49
- msgid "XML Sitemap Index"
50
- msgstr "Index XML Sitemap"
51
-
52
- #: ../includes/admin.php:25 ../includes/admin.php:988
53
- msgid "Google News Sitemap"
54
- msgstr "Google News Sitemap"
55
-
56
- #: ../includes/admin.php:69
57
- msgid "Google"
58
- msgstr "Google"
59
-
60
- #: ../includes/admin.php:72
61
- msgid "Bing & Yahoo"
62
- msgstr ""
63
-
64
- #: ../includes/admin.php:75
65
- msgid "Yandex"
66
- msgstr ""
67
-
68
- #: ../includes/admin.php:78
69
- msgid "Baidu"
70
- msgstr ""
71
-
72
- #: ../includes/admin.php:81
73
- msgid "Ping-O-Matic"
74
- msgstr ""
75
-
76
- #: ../includes/admin.php:136
77
- #, php-format
78
- msgid "Successfully sent %1$s on %2$s."
79
- msgstr "Le %1$s est envoyé avec succès le %2$s."
80
-
81
- #: ../includes/admin.php:197 ../includes/admin.php:387
82
- #: ../includes/admin.php:955
83
- msgid "Additional robots.txt rules"
84
- msgstr "Règles robots.txt additionelles"
85
-
86
- #: ../includes/admin.php:198
87
- #, php-format
88
- msgid "Rules that will be appended to the %s generated by WordPress:"
89
- msgstr "Règles à ajouter au %s produit par WordPress."
90
-
91
- #: ../includes/admin.php:199
92
- msgid ""
93
- "These rules will not have effect when you are using a static robots.txt file."
94
- msgstr ""
95
- "Ces règles ne seront pas effectué si vous utilisez un fichier robots.txt "
96
- "statique."
97
-
98
- #: ../includes/admin.php:199
99
- msgid ""
100
- "Only add rules here when you know what you are doing, otherwise you might "
101
- "break search engine access to your site."
102
- msgstr ""
103
- "Ajoutez des règles ici seulement si vous saviez le faire, vous risquez "
104
- "bloquer l'accès aux moteurs de recherche."
105
-
106
- #: ../includes/admin.php:205 ../includes/admin.php:960
107
- msgid "Reset XML sitemaps"
108
- msgstr "Remise à nouveau"
109
-
110
- #: ../includes/admin.php:207
111
- msgid "Clear all XML Sitemap Feed settings from the database."
112
- msgstr "Supprimez tous les options Flux XML Sitemap."
113
-
114
- #: ../includes/admin.php:210
115
- msgid ""
116
- "You can use this to start fresh with the default settings or to remove all "
117
- "XML Sitemap and Google News settings and taxonomy terms before uninstalling."
118
- msgstr ""
119
-
120
- #: ../includes/admin.php:219 ../includes/admin.php:220
121
- #: ../includes/admin.php:457 ../includes/admin.php:458
122
- #, php-format
123
- msgid "Donate to keep the free %s plugin development & support going!"
124
- msgstr ""
125
- "Faites un don pour aider le développement et support de l'extension %s. "
126
- "Merci !"
127
-
128
- #: ../includes/admin.php:219 ../includes/admin.php:220
129
- #: ../includes/admin.php:221 ../includes/admin.php:457
130
- #: ../includes/admin.php:458 ../includes/admin.php:459
131
- msgid "XML Sitemap & Google News Feeds"
132
- msgstr "Flux XML Sitemap & Google News"
133
-
134
- #: ../includes/admin.php:221
135
- #, php-format
136
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
137
- msgstr "Ces options contrôlent le XML Sitemap par l'extension %s."
138
-
139
- #: ../includes/admin.php:222 ../includes/admin.php:460
140
- #, php-format
141
- msgid "For ping options, go to %s."
142
- msgstr ""
143
-
144
- #: ../includes/admin.php:235
145
- msgid "XML Sitemaps for post types"
146
- msgstr ""
147
-
148
- #: ../includes/admin.php:274
149
- msgid "Year"
150
- msgstr "Année"
151
-
152
- #: ../includes/admin.php:275
153
- msgid "Month"
154
- msgstr "Mois"
155
-
156
- #: ../includes/admin.php:279
157
- msgid "Split by"
158
- msgstr "Découper par"
159
-
160
- #: ../includes/admin.php:289
161
- msgid ""
162
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
163
- "split by month is needed."
164
- msgstr ""
165
- "A utiliser si vous constatez des erreurs ou des lenteurs dans vos sitemaps. "
166
- "Dans de rares cas, le découpage par mois peut être nécessaire."
167
-
168
- #: ../includes/admin.php:294 ../includes/admin.php:908
169
- msgid "Priority"
170
- msgstr "Priorité"
171
-
172
- #: ../includes/admin.php:296
173
- msgid "Priority can be overridden on individual posts."
174
- msgstr "La Priorité peut être remplacée par article."
175
-
176
- #: ../includes/admin.php:301
177
- msgid ""
178
- "Automatically adjusts Priority according to relative age and comment count."
179
- msgstr ""
180
- "Ajuste la Priorité automatiquement selon l'âge relatif et le nombre des "
181
- "commentaires."
182
-
183
- #: ../includes/admin.php:301
184
- msgid ""
185
- "Sticky posts will not be subject to reduction by age. Individual posts with "
186
- "fixed Priority will always keep that value."
187
- msgstr ""
188
- "Articles mise en avant ne seront pas soumis à la réduction selon l'âge. "
189
- "Articles avec Priorité fixe garderont cette valeur."
190
-
191
- #: ../includes/admin.php:306
192
- msgid "Update Lastmod and Changefreq on comments."
193
- msgstr "Mise à jour de Lastmod et Changefreq à la soumission des commentaires."
194
-
195
- #: ../includes/admin.php:306
196
- msgid ""
197
- "Set this if discussion on your site warrants reindexation upon each new "
198
- "comment."
199
- msgstr ""
200
- "Configurez ceci si la discussion sur votre site nécessite la ré-indexation "
201
- "après chaque nouveau commentaire."
202
-
203
- #: ../includes/admin.php:310 ../includes/admin.php:568
204
- msgid "Add image tags for"
205
- msgstr "Ajouter des balises d'image pour"
206
-
207
- #: ../includes/admin.php:318 ../includes/admin.php:575
208
- msgid "Attached images"
209
- msgstr "Images attachées"
210
-
211
- #: ../includes/admin.php:328
212
- msgid ""
213
- "Priority settings do not affect ranking in search results in any way. They "
214
- "are only meant to suggest search engines which URLs to index first. Once a "
215
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
216
- "updated."
217
- msgstr ""
218
- "Les paramètres de Priorité n'affectent pas le classement dans les résultats "
219
- "de recherche. Ils ont pour seul but de proposer des moteurs de recherche les "
220
- "URL à premier indice. Une fois qu'un URL a été indexé, sa priorité devient "
221
- "vide de sens jusqu'à le moment son Lastmod est mis à jour."
222
-
223
- #: ../includes/admin.php:329
224
- msgid ""
225
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
226
- "when allowed, posts with high comment count."
227
- msgstr ""
228
- "La Priorité maximum (1.0) est réservé à la page d'accueil, articles "
229
- "individuels et, si permis, articles avec beaucoup des commentaires."
230
-
231
- #: ../includes/admin.php:329
232
- msgid ""
233
- "Priority values are taken as relative values. Setting all to the same (high) "
234
- "value is pointless."
235
- msgstr ""
236
-
237
- #: ../includes/admin.php:379
238
- msgid "XML Sitemaps for taxonomies"
239
- msgstr ""
240
-
241
- #: ../includes/admin.php:385
242
- msgid ""
243
- "It is generally not recommended to include taxonomy pages, unless their "
244
- "content brings added value."
245
- msgstr ""
246
-
247
- #: ../includes/admin.php:386
248
- msgid ""
249
- "For example, when you use category descriptions with information that is not "
250
- "present elsewhere on your site or if taxonomy pages list posts with an "
251
- "excerpt that is different from, but complementary to the post content. In "
252
- "these cases you might consider including certain taxonomies. Otherwise, if "
253
- "you fear <a href=\"http://moz.com/learn/seo/duplicate-content\">negative "
254
- "affects of duplicate content</a> or PageRank spread, you might even consider "
255
- "disallowing indexation of taxonomies."
256
- msgstr ""
257
-
258
- #: ../includes/admin.php:387
259
- #, php-format
260
- msgid ""
261
- "You can do this by adding specific robots.txt rules in the %s field above."
262
- msgstr ""
263
-
264
- #: ../includes/admin.php:402
265
- msgid "No taxonomies available for the currently included post types."
266
- msgstr ""
267
- "Aucun taxonomie disponible pour les types d'articles actuellement inclus."
268
-
269
- #: ../includes/admin.php:410 ../includes/admin.php:979
270
- msgid "Include custom XML Sitemaps"
271
- msgstr "Inclure des XML Sitemaps externes"
272
-
273
- #: ../includes/admin.php:411
274
- msgid "Additional XML Sitemaps to append to the main XML Sitemap Index:"
275
- msgstr ""
276
-
277
- #: ../includes/admin.php:413
278
- msgid ""
279
- "Add the full URL, including protocol (http/https) and domain, of any XML "
280
- "Sitemap that you want to append to the Sitemap Index. Start each URL on a "
281
- "new line."
282
- msgstr ""
283
-
284
- #: ../includes/admin.php:413
285
- msgid ""
286
- "Only valid sitemaps are allowed in the Sitemap Index. Use your Google/Bing "
287
- "Webmaster Tools to verify!"
288
- msgstr ""
289
-
290
- #: ../includes/admin.php:430 ../includes/admin.php:976
291
- msgid "Include custom URLs"
292
- msgstr "Inclure des URLs externes"
293
-
294
- #: ../includes/admin.php:431
295
- msgid "Additional URLs to append in an extra XML Sitemap:"
296
- msgstr ""
297
-
298
- #: ../includes/admin.php:433
299
- msgid ""
300
- "Add the full URL, including protocol (http/https) and domain, of any "
301
- "(static) page that you want to append to the ones already included by "
302
- "WordPress. Optionally add a priority value between 0 and 1, separated with a "
303
- "space after the URL. Start each URL on a new line."
304
- msgstr ""
305
-
306
- #: ../includes/admin.php:443 ../includes/admin.php:973
307
- msgid "Allowed domains"
308
- msgstr ""
309
-
310
- #: ../includes/admin.php:444
311
- msgid "Additional domains to allow in the XML Sitemaps:"
312
- msgstr ""
313
-
314
- #: ../includes/admin.php:445
315
- #, php-format
316
- msgid ""
317
- "By default, only the domain %s as used in your WordPress site address is "
318
- "allowed. This means that all URLs that use another domain (custom URLs or "
319
- "using a plugin like Page Links To) are filtered from the XML Sitemap. "
320
- "However, if you are the verified owner of other domains in your Google/Bing "
321
- "Webmaster Tools account, you can include these in the same sitemap. Add "
322
- "these domains, without protocol (http/https) each on a new line. Note that "
323
- "if you enter a domain with www, all URLs without it or with other subdomains "
324
- "will be filtered."
325
- msgstr ""
326
-
327
- #: ../includes/admin.php:459
328
- #, php-format
329
- msgid ""
330
- "These settings control the Google News Sitemap generated by the %s plugin."
331
- msgstr "Ces options contrôlent le Google News Sitemap par l'extension %s."
332
-
333
- #: ../includes/admin.php:459
334
- msgid ""
335
- "When you are done configuring and preparing your news content and you are "
336
- "convinced your site adheres to the <a href=\"https://support.google.com/news/"
337
- "publisher/answer/40787?ref_topic=2484652\" target=\"_blank\">Google News "
338
- "guidelines</a>, go ahead and <a href=\"https://support.google.com/news/"
339
- "publisher/troubleshooter/3179220?#ts=3179198\" target=\"_blank\">submit your "
340
- "site for inclusion</a>!"
341
- msgstr ""
342
-
343
- #: ../includes/admin.php:470 ../includes/admin.php:992
344
- msgid "Publication name"
345
- msgstr ""
346
-
347
- #: ../includes/admin.php:471
348
- #, php-format
349
- msgid "By default, the general %s setting will be used."
350
- msgstr ""
351
-
352
- #: ../includes/admin.php:488
353
- msgid ""
354
- "Error: There where no valid post types found. Without at least one public "
355
- "post type, a Google News Sitemap cannot be created by this plugin. Please "
356
- "deselect the option Google News Sitemap at <a href=\"#xmlsf_sitemaps"
357
- "\">Enable XML sitemaps</a> and choose another method."
358
- msgstr ""
359
-
360
- #: ../includes/admin.php:491 ../includes/admin.php:967
361
- #: ../includes/admin.php:993
362
- msgid "Include post types"
363
- msgstr "Types d'articles à inclure"
364
-
365
- #: ../includes/admin.php:517
366
- #, php-format
367
- msgid ""
368
- "At least one post type must be selected. By default, the post type %s will "
369
- "be used."
370
- msgstr ""
371
-
372
- #: ../includes/admin.php:540
373
- msgid "Limit to posts in these post categories:"
374
- msgstr ""
375
-
376
- #: ../includes/admin.php:556
377
- msgid ""
378
- "If you wish to limit posts that will feature in your News Sitemap to certain "
379
- "categories, select them here. Use the Ctrl/Cmd key plus click to select more "
380
- "than one or to deselect. If no categories are selected, posts of all "
381
- "categories will be included in your News Sitemap."
382
- msgstr ""
383
-
384
- #: ../includes/admin.php:556
385
- msgid ""
386
- "Please be aware that limiting by post category will rule out all custom post "
387
- "types that do not use post categories, even if you selected them to be "
388
- "included (above)."
389
- msgstr ""
390
-
391
- #: ../includes/admin.php:578
392
- msgid ""
393
- "Note: Google News prefers at most one image per article in the News Sitemap. "
394
- "If multiple valid images are specified, the crawler will have to pick one "
395
- "arbitrarily. Images in News Sitemaps should be in jpeg or png format."
396
- msgstr ""
397
-
398
- #: ../includes/admin.php:590 ../includes/admin.php:996
399
- msgid "Access (&lt;access&gt; tag)"
400
- msgstr ""
401
-
402
- #: ../includes/admin.php:591
403
- #, php-format
404
- msgid ""
405
- "The &lt;access&gt; tag specifies whether an article is available to all "
406
- "readers (%1$s), or only to those with a free (%2$s) or paid membership "
407
- "(%3$s) to your site."
408
- msgstr ""
409
-
410
- #: ../includes/admin.php:591 ../includes/admin.php:598
411
- #: ../includes/admin.php:604
412
- msgid "Registration"
413
- msgstr ""
414
-
415
- #: ../includes/admin.php:591 ../includes/admin.php:599
416
- #: ../includes/admin.php:605
417
- msgid "Subscription"
418
- msgstr ""
419
-
420
- #: ../includes/admin.php:596
421
- msgid "Tag normal posts as"
422
- msgstr ""
423
-
424
- #: ../includes/admin.php:603
425
- #, php-format
426
- msgid "Tag %s posts as"
427
- msgstr ""
428
-
429
- #: ../includes/admin.php:610
430
- msgid ""
431
- "Note: The &lt;access&gt; tag is required when applicable. Do not leave it to "
432
- "Public when your content is not."
433
- msgstr ""
434
-
435
- #: ../includes/admin.php:630 ../includes/admin.php:997
436
- msgid "Genres (&lt;genres&gt; tag)"
437
- msgstr ""
438
-
439
- #: ../includes/admin.php:631
440
- msgid ""
441
- "The &lt;genres&gt; tag specifies one or more properties for an article, "
442
- "namely, whether it is a press release, a blog post, an opinion, an op-ed "
443
- "piece, user-generated content, or satire."
444
- msgstr ""
445
-
446
- #: ../includes/admin.php:631
447
- msgid "You can assign Google News genres when writing a new post."
448
- msgstr ""
449
-
450
- #: ../includes/admin.php:642
451
- msgid "Default genre:"
452
- msgstr ""
453
-
454
- #: ../includes/admin.php:651
455
- msgid ""
456
- "Note: The &lt;genres&gt; tag is required when applicable and restricted to "
457
- "the list provided above."
458
- msgstr ""
459
-
460
- #: ../includes/admin.php:663 ../includes/admin.php:998
461
- msgid "Topics (&lt;keywords&gt; tag)"
462
- msgstr ""
463
-
464
- #: ../includes/admin.php:664
465
- msgid ""
466
- "The &lt;keywords&gt; tag is used to help classify the articles you submit to "
467
- "Google News by <strong>topic</strong>."
468
- msgstr ""
469
-
470
- #: ../includes/admin.php:666
471
- #, php-format
472
- msgid "Use %s for topics."
473
- msgstr ""
474
-
475
- #: ../includes/admin.php:673
476
- msgid "Default topic(s):"
477
- msgstr ""
478
-
479
- #: ../includes/admin.php:675 ../includes/admin.php:698
480
- msgid "Separate with a comma."
481
- msgstr ""
482
-
483
- #: ../includes/admin.php:679
484
- msgid ""
485
- "Keywords may be drawn from, but are not limited to, the list of <a href="
486
- "\"http://www.google.com/support/news_pub/bin/answer.py?answer=116037\" "
487
- "target=\"_blank\">existing Google News keywords</a>."
488
- msgstr ""
489
-
490
- #: ../includes/admin.php:689 ../includes/admin.php:999
491
- msgid "Locations (&lt;geo_locations&gt; tag)"
492
- msgstr ""
493
-
494
- #: ../includes/admin.php:690
495
- msgid ""
496
- "The &lt;geo_locations&gt; tag is used identify the geographic location of "
497
- "your articles."
498
- msgstr ""
499
-
500
- #: ../includes/admin.php:690
501
- msgid "You can assign locations when writing a new post."
502
- msgstr ""
503
-
504
- #: ../includes/admin.php:696
505
- msgid "Default location:"
506
- msgstr ""
507
-
508
- #: ../includes/admin.php:700
509
- msgid ""
510
- "You should list location entities from smallest entity to largest. For "
511
- "example: <code>Detroit, Michigan, USA</code> or <code>Rhône-Alpes, France</"
512
- "code>."
513
- msgstr ""
514
-
515
- #: ../includes/admin.php:872 ../includes/admin.php:964
516
- msgid "XML Sitemap"
517
- msgstr "XML Sitemap"
518
-
519
- #: ../includes/admin.php:904
520
- msgid "Exclude from XML Sitemap"
521
- msgstr "Exclure de l'XML Sitemap"
522
-
523
- #: ../includes/admin.php:910
524
- #, php-format
525
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
526
- msgstr ""
527
- "Laissez vide pour la Priorité automatique comme configuré dans %1$s > %2$s."
528
-
529
- #: ../includes/admin.php:949
530
- msgid "Enable XML sitemaps"
531
- msgstr "Activez XML Sitemaps"
532
-
533
- #: ../includes/admin.php:970
534
- msgid "Include taxonomies"
535
- msgstr "Taxonomies à inclure"
536
-
537
- #~ msgid ""
538
- #~ "XML Sitemaps will be disabled automatically when you check the option "
539
- #~ "%1$s at %2$s above."
540
- #~ msgstr ""
541
- #~ "Les XML Sitemaps seront désactivés automatiquement si l'option %1$s sous "
542
- #~ "%2$s en haut est activée."
543
-
544
- #~ msgid ""
545
- #~ "XML Sitemaps are disabled because you have checked the option %1$s at "
546
- #~ "%2$s above."
547
- #~ msgstr ""
548
- #~ "Les XML Sitemaps sont désactivés parce-que l'option %1$s sous %2$s en "
549
- #~ "haut est activée."
550
-
551
- #~ msgid "Regular XML Sitemaps"
552
- #~ msgstr "XML Sitemaps normaux"
553
-
554
- #~ msgid "Include:"
555
- #~ msgstr "Inclure :"
556
-
557
- #~ msgid ""
558
- #~ "Only set when your site has been or will soon be accepted by Google News. "
559
- #~ "**"
560
- #~ msgstr ""
561
- #~ "Seulement si ton site est (ou sera bientôt) accepté par Google News. **"
562
-
563
- #~ msgid ""
564
- #~ "** Google recommends using a seperate news sitemap. You can do this by "
565
- #~ "checking the option %1$s at %2$s above."
566
- #~ msgstr ""
567
- #~ "** Google recommande un sitemap dédié News. Utilise l'option %1$s sous "
568
- #~ "%2$s en haut pour cela."
569
-
570
- #~ msgid "Bing"
571
- #~ msgstr "Bing"
572
-
573
- #~ msgid "Ping on Publish"
574
- #~ msgstr "Ping en Publiant"
575
-
576
- #~ msgid "Disabling and reenabling the %s plugin will have the same effect."
577
- #~ msgstr ""
578
- #~ "La désactivation et la réactivation de l'extension % s auront le même "
579
- #~ "effet."
580
-
581
- #~ msgid "year of publication"
582
- #~ msgstr "année de la publication"
583
-
584
- #~ msgid "month of publication"
585
- #~ msgstr "mois de la publication"
586
-
587
- #~ msgid "Note:"
588
- #~ msgstr "Attention :"
589
-
590
- #~ msgid "year"
591
- #~ msgstr "an"
592
-
593
- #~ msgid "Divide by"
594
- #~ msgstr "Trier par"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-ga_GA.mo DELETED
Binary file
languages/xml-sitemap-feed-ga_GA.po DELETED
@@ -1,77 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-02-22 16:43+0100\n"
6
- "PO-Revision-Date: 2017-04-20 00:35+0200\n"
7
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
- "Language-Team: ChameleonJohn.com <jordan.silaen@chameleonjohn.com>\n"
9
- "Language: ga_GA\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e;_n\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.8.9\n"
16
-
17
- #: ../includes/admin.php:15
18
- msgid "Donate to keep the free XML Sitemap Feeds plugin development & support going!"
19
- msgstr "Síntiúis a choinneáil ar an XML saor in aisce Fothaí Mapa an Láithreáin forbartha plugin & tacaíocht ag dul!"
20
-
21
- #: ../includes/admin.php:15
22
- msgid "These settings control the XML Sitemap generation."
23
- msgstr "Tá na socruithe rialú an ghlúin XML Mapa an Láithreáin."
24
-
25
- #: ../includes/admin.php:15
26
- #, php-format
27
- msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
28
- msgstr "Tá Sitemaps XML faoi mhíchumas má tá tú a leagtar ar an rogha %s (thuas) chun %s ."
29
-
30
- #: ../includes/admin.php:15
31
- msgid "Site Visibility"
32
- msgstr "suíomh Léargas"
33
-
34
- #: ../includes/admin.php:15
35
- msgid "Discourage search engines from indexing this site"
36
- msgstr "Cur in innill chuardaigh as innéacsú suíomh seo"
37
-
38
- #: ../includes/admin.php:39
39
- msgid "Regular XML Sitemaps"
40
- msgstr "Sitemaps XML rialta"
41
-
42
- #: ../includes/admin.php:41 ../includes/admin.php:47
43
- msgid "View"
44
- msgstr "Amharc"
45
-
46
- #: ../includes/admin.php:45
47
- msgid "Google News Sitemap"
48
- msgstr "Google News Mapa an tSuímh"
49
-
50
- #: ../includes/admin.php:123
51
- #, php-format
52
- msgid "Rules to append to %s generated by WordPress."
53
- msgstr "Rialacha chur mar aguisín le %s ginte ag WordPress."
54
-
55
- #: ../includes/admin.php:123
56
- msgid "Warning: Only set rules here when you know what you are doing, otherwise you might break access to your site.<br />Note: These rules will not have effect when you are using a static robots.txt file."
57
- msgstr "Rabhadh: Níl ach rialacha a leagtar anseo nuair a fhios agat cad tá á dhéanamh, ar shlí eile d'fhéadfadh tú rochtain sos ar do láithreán <br /> Tabhair faoi deara:. Ní bheidh na rialacha éifeacht leis nuair a bhíonn tú ag baint úsáide as comhad robots.txt statach."
58
-
59
- #: ../includes/admin.php:185
60
- msgid "XML Sitemaps"
61
- msgstr "Sitemaps XML"
62
-
63
- #: ../includes/admin.php:188
64
- msgid "Enable XML sitemaps"
65
- msgstr "Cumasaigh sitemaps XML"
66
-
67
- #: ../includes/admin.php:191
68
- msgid "Include post types"
69
- msgstr "I measc na gcineálacha post"
70
-
71
- #: ../includes/admin.php:194
72
- msgid "Include taxonomies"
73
- msgstr "I measc na tacsanomaíochtaí"
74
-
75
- #: ../includes/admin.php:201
76
- msgid "Additional robots.txt rules"
77
- msgstr "Rialacha breise robots.txt"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-id_ID.mo DELETED
Binary file
languages/xml-sitemap-feed-id_ID.po DELETED
@@ -1,304 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-04-29 19:59+0100\n"
6
- "PO-Revision-Date: 2013-07-21 01:07+0800\n"
7
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
- "Language-Team: <nasrulhaq81@gmail.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e;_n\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.5.7\n"
16
- "Language: id_ID\n"
17
- "X-Poedit-SearchPath-0: ..\n"
18
-
19
- #: ../includes/admin.php:15
20
- #, php-format
21
- msgid "Donate to keep the free %s plugin development & support going!"
22
- msgstr ""
23
- "Donasi untuk menjaga pengembangan & dukungan plugin gratis %s berlangsung "
24
-
25
- #: ../includes/admin.php:15 ../includes/admin.php:269
26
- msgid "XML Sitemap & Google News Feeds"
27
- msgstr "XML Sitemap & Google News Feeds"
28
-
29
- #: ../includes/admin.php:15
30
- #, php-format
31
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
32
- msgstr ""
33
- "Pengaturan ini mengontrol untuk menghasilkan XML Sitemaps oleh plugin %s"
34
-
35
- #: ../includes/admin.php:16
36
- #, php-format
37
- msgid ""
38
- "XML Sitemaps will be disabled automatically when you check the option %1$s "
39
- "at %2$s above."
40
- msgstr ""
41
- "XML Sitemap akan dimatikan otomatis ketika anda mencentang pilihan %1$s di "
42
- "%2$s atas"
43
-
44
- #: ../includes/admin.php:16
45
- msgid "Discourage search engines from indexing this site"
46
- msgstr "Halangi mesin pencari mengindex situs ini"
47
-
48
- #: ../includes/admin.php:16
49
- msgid "Search Engine Visibility"
50
- msgstr "Kenampakan mesin pencari"
51
-
52
- #: ../includes/admin.php:16
53
- #, php-format
54
- msgid ""
55
- "XML Sitemaps are disabled because you have checked the option %1$s at %2$s "
56
- "above."
57
- msgstr ""
58
- "XML Sitemap dimatikan karena anda mencentang pilihan %1$s pada %2$s diatas."
59
-
60
- #: ../includes/admin.php:40 ../includes/admin.php:410
61
- msgid "XML Sitemaps"
62
- msgstr "XML Sitemaps"
63
-
64
- #: ../includes/admin.php:41
65
- msgid "Regular XML Sitemaps"
66
- msgstr "XML Sitemap Reguler"
67
-
68
- #: ../includes/admin.php:43 ../includes/admin.php:48
69
- msgid "View"
70
- msgstr "Lihat"
71
-
72
- #: ../includes/admin.php:46 ../includes/admin.php:173
73
- msgid "Google News Sitemap"
74
- msgstr "Google News Sitemap"
75
-
76
- #: ../includes/admin.php:58 ../includes/admin.php:419
77
- msgid "Include post types"
78
- msgstr "Termasuk tipe post"
79
-
80
- #: ../includes/admin.php:82 ../includes/admin.php:327
81
- #: ../includes/admin.php:369
82
- msgid "Settings"
83
- msgstr "Pengaturan"
84
-
85
- #: ../includes/admin.php:97
86
- msgid "Year"
87
- msgstr "Tahun"
88
-
89
- #: ../includes/admin.php:98
90
- msgid "Month"
91
- msgstr "Bulan"
92
-
93
- #: ../includes/admin.php:102
94
- msgid "Split by"
95
- msgstr "Dipilah oleh"
96
-
97
- #: ../includes/admin.php:105 ../includes/admin.php:140
98
- msgid "None"
99
- msgstr "Tidak ada"
100
-
101
- #: ../includes/admin.php:112
102
- msgid ""
103
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
104
- "split by month is needed."
105
- msgstr ""
106
- "Pilah berdasarkan tahun jika sitemap mengalami kesalahan atau lambat. Kasus "
107
- "yang jarang terjadi, pilah berdasarkan bulan dibutuhkan."
108
-
109
- #: ../includes/admin.php:117 ../includes/admin.php:365
110
- msgid "Priority"
111
- msgstr "Prioritas"
112
-
113
- #: ../includes/admin.php:119
114
- msgid "Priority can be overridden on individual posts. *"
115
- msgstr "Prioritas dapat ditimpa pada tiap post"
116
-
117
- #: ../includes/admin.php:124
118
- msgid ""
119
- "Automatically adjusts Priority according to relative age and comment count."
120
- msgstr ""
121
- "Otomatis menyesuaikan Prioritas mengikuti usia post dan jumlah komentar"
122
-
123
- #: ../includes/admin.php:124
124
- msgid ""
125
- "Sticky posts will not be subject to reduction by age. Individual posts with "
126
- "fixed Priority will always keep that value."
127
- msgstr ""
128
- "Post terbaru tidak menjadi subyek mereduksi umur post, Tiap post dengan "
129
- "Prioritas yang jelas akan selalu menjadi nilai."
130
-
131
- #: ../includes/admin.php:129
132
- msgid "Update Lastmod and Changefreq on comments."
133
- msgstr "Perbarui Lastmod dan Changefreq di komentar."
134
-
135
- #: ../includes/admin.php:129
136
- msgid ""
137
- "Set this if discussion on your site warrants reindexation upon each new "
138
- "comment."
139
- msgstr ""
140
- "Atur ini jika diskusi di situs anda mengingatkan index ulang atas setiap "
141
- "komentar baru."
142
-
143
- #: ../includes/admin.php:133
144
- msgid "Include:"
145
- msgstr "Termasuk:"
146
-
147
- #: ../includes/admin.php:138
148
- msgid "Image tags for"
149
- msgstr "Tag gambar untuk"
150
-
151
- #: ../includes/admin.php:143
152
- msgid "Featured Image"
153
- msgstr "Fitur Gambar"
154
-
155
- #: ../includes/admin.php:146
156
- msgid "Attached images"
157
- msgstr "Gambar terlampir"
158
-
159
- #: ../includes/admin.php:154
160
- msgid "Google News tags"
161
- msgstr "Tag Google News"
162
-
163
- #: ../includes/admin.php:154
164
- msgid ""
165
- "Only set when your site has been or will soon be accepted by Google News. **"
166
- msgstr ""
167
- "Atur ini hanya jika situs anda telah diterima atau akan diteriima oleh "
168
- "Google News. **"
169
-
170
- #: ../includes/admin.php:171
171
- msgid ""
172
- "* Priority settings do not affect ranking in search results in any way. They "
173
- "are only meant to suggest search engines which URLs to index first. Once a "
174
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
175
- "updated."
176
- msgstr ""
177
- "* Pengaturan Prioritas tidak berefek pada peringkat hasil pencarian. "
178
- "Prioritas dimaksudkan hanya menyarankan mesin pencari dengan URL agar "
179
- "diindex terlebih dahulu. ketika URL terindex, Prioritas tidak bermakna "
180
- "hingga Lastmod diperbaharui"
181
-
182
- #: ../includes/admin.php:171
183
- msgid ""
184
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
185
- "when allowed, posts with high comment count."
186
- msgstr ""
187
- "Prioritas Maksimum (1.0) tersedia dihalaman depan, tiap posting, dan jika "
188
- "diijinkan, posting dengan komentar tinggi terhitung."
189
-
190
- #: ../includes/admin.php:173
191
- #, php-format
192
- msgid ""
193
- "** Google recommends using a seperate news sitemap. You can do this by "
194
- "checking the option %1$s at %2$s above."
195
- msgstr ""
196
- "** Google merekomendasikan memakai sitemap terpisah. Anda dapat melakukannya "
197
- "dengan mencentang pilihan %1$s pada %2$s diatas."
198
-
199
- #: ../includes/admin.php:173 ../includes/admin.php:413
200
- msgid "Enable XML sitemaps"
201
- msgstr "Aktifkan XML sitemap"
202
-
203
- #: ../includes/admin.php:183 ../includes/admin.php:422
204
- msgid "Include taxonomies"
205
- msgstr "Ikutkan Taxonomi"
206
-
207
- #: ../includes/admin.php:213
208
- msgid "No taxonomies available for the currently included post types."
209
- msgstr "Tidak taxonomi tersedia tipe post yang diikutkan saat ini."
210
-
211
- #: ../includes/admin.php:216
212
- msgid ""
213
- "It is generally not recommended to include taxonomy pages, unless their "
214
- "content brings added value. For example, when you use category descriptions "
215
- "with information that is not present elsewhere on your site or if taxonomy "
216
- "pages list posts with an excerpt that is different from, but complementary "
217
- "to the post content. In these cases you might consider including certain "
218
- "taxonomies. Otherwise, you might even consider disallowing indexation to "
219
- "prevent a possible duplicate content penalty. You can do this by adding "
220
- "specific robots.txt rules below."
221
- msgstr ""
222
- "Secara umum tidak merekomendasikan mengikutkan taksonomi halaman, kecuali "
223
- "kontennya memberi nilai. Sebagai contoh, ketika anda menggunakan deskripsi "
224
- "kategori dengan informasi yang tidak ada dibagian lain disitus anda atau "
225
- "jika taksonomi halaman diposting dengan kutipan dalam bentuk berbeda. akan "
226
- "tetapi menjadi pelengkap pada isi posting. Dalam kasus ini anda diharapkan "
227
- "mengikutkan beberapa taksonomi. Sebaliknya, anda bisa tidak menginkan "
228
- "indeksasi untuk menjaga kemungkinan pinalti konten ganda. Anda dapat "
229
- "melakukan dengan menambah aturan spesifik robots.txt dibawah."
230
-
231
- #: ../includes/admin.php:226
232
- msgid "Google"
233
- msgstr "Google"
234
-
235
- #: ../includes/admin.php:227
236
- msgid "Bing"
237
- msgstr "Bing"
238
-
239
- #: ../includes/admin.php:231 ../includes/admin.php:425
240
- msgid "Ping on Publish"
241
- msgstr "Ping saat Publikasi"
242
-
243
- #: ../includes/admin.php:250
244
- #, php-format
245
- msgid "Successfully pinged for %1$s on %2$s GMT."
246
- msgstr "Sukses ping untuk %1$s pada %2$s GMT."
247
-
248
- #: ../includes/admin.php:259
249
- #, php-format
250
- msgid "Rules to append to the %s generated by WordPress."
251
- msgstr "Aturan yang ditambahkan %s dihasilkan oleh WordPress"
252
-
253
- #: ../includes/admin.php:260
254
- msgid ""
255
- "Only add rules here when you know what you are doing, otherwise you might "
256
- "break search engine access to your site."
257
- msgstr ""
258
- "Tambah aturan disini jika hanya anda memahami, sebaliknya anda bisa saja "
259
- "menghentikan akses mesin pencari ke situs anda. "
260
-
261
- #: ../includes/admin.php:260
262
- msgid ""
263
- "These rules will not have effect when you are using a static robots.txt file."
264
- msgstr ""
265
- "Pengaturan tidak memiliki efek jika anda menggunakan file statis robots.txt"
266
-
267
- #: ../includes/admin.php:267
268
- msgid ""
269
- "Clear all XML Sitemap Feed options from the database and start fresh with "
270
- "the default settings."
271
- msgstr ""
272
- "Hapus semua pilihan XML Sitemap Feed dari database dan mulai yang baru "
273
- "melalui pengaturan awal"
274
-
275
- #: ../includes/admin.php:269
276
- #, php-format
277
- msgid "Disabling and reenabling the %s plugin will have the same effect."
278
- msgstr "Mengaktifkan dan menyalakan plugin %s akan berdampak sama."
279
-
280
- #: ../includes/admin.php:344
281
- msgid "XML Sitemap"
282
- msgstr "XML Sitemap"
283
-
284
- #: ../includes/admin.php:361
285
- msgid "Exclude from XML Sitemap"
286
- msgstr "Mengecualikan dari XML Sitemap"
287
-
288
- #: ../includes/admin.php:369
289
- #, php-format
290
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
291
- msgstr ""
292
- "Biarkan kosong untuk Prioritas otomatis seperti dikonfigurasi di %1$s > %2$s."
293
-
294
- #: ../includes/admin.php:369
295
- msgid "Reading"
296
- msgstr "Membaca"
297
-
298
- #: ../includes/admin.php:431
299
- msgid "Additional robots.txt rules"
300
- msgstr "Aturan tambahan robots.txt"
301
-
302
- #: ../includes/admin.php:434
303
- msgid "Reset XML sitemaps"
304
- msgstr "Atur ulang XML Sitemaps"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-it_IT.mo DELETED
Binary file
languages/xml-sitemap-feed-it_IT.po DELETED
@@ -1,539 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-09-01 16:38+0100\n"
6
- "PO-Revision-Date: 2014-05-29 12:46+0200\n"
7
- "Last-Translator: Raffaello Tesi <info@raffaellotesi.com>\n"
8
- "Language-Team: Raffaello Tesi <info@raffaellotesi.com>\n"
9
- "Language: it_IT\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e;_n\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.6.5\n"
16
-
17
- #: ../includes/admin.php:19
18
- msgid "XML Sitemaps"
19
- msgstr "Sitemap XML"
20
-
21
- #: ../includes/admin.php:20
22
- msgid "XML Sitemap Index"
23
- msgstr "Sitemap XML del sito"
24
-
25
- #: ../includes/admin.php:25 ../includes/admin.php:820
26
- msgid "Google News Sitemap"
27
- msgstr "Sitemap per Google News"
28
-
29
- #: ../includes/admin.php:69
30
- msgid "Google"
31
- msgstr "Google"
32
-
33
- #: ../includes/admin.php:72
34
- msgid "Bing & Yahoo"
35
- msgstr "Bing & Yahoo"
36
-
37
- #: ../includes/admin.php:75
38
- msgid "Yandex"
39
- msgstr "Yandex"
40
-
41
- #: ../includes/admin.php:78
42
- msgid "Baidu"
43
- msgstr "Baidu"
44
-
45
- #: ../includes/admin.php:81
46
- msgid "Ping-O-Matic"
47
- msgstr "Ping-O-Matic"
48
-
49
- #: ../includes/admin.php:89 ../includes/admin.php:778
50
- msgid "Ping on Publish"
51
- msgstr "Ping on Publish"
52
-
53
- #: ../includes/admin.php:113
54
- #, php-format
55
- msgid "Successfully pinged for %1$s on %2$s GMT."
56
- msgstr "Ping a %1$s effettuato con successo alle %2$s GMT."
57
-
58
- #: ../includes/admin.php:123
59
- #, php-format
60
- msgid "Rules to append to the %s generated by WordPress."
61
- msgstr "Regole da aggiungere al %s generato da WordPress."
62
-
63
- #: ../includes/admin.php:124
64
- msgid ""
65
- "Only add rules here when you know what you are doing, otherwise you might "
66
- "break search engine access to your site."
67
- msgstr ""
68
- "Inserire nuove regole solo se si sa cosa si sta facendo, dal momento che "
69
- "tali regole potrebbero impedire l'accesso dei motori di ricerca a questo "
70
- "sito."
71
-
72
- #: ../includes/admin.php:124
73
- msgid ""
74
- "These rules will not have effect when you are using a static robots.txt file."
75
- msgstr "Queste regole non hanno effetto se si usa un file robots.txt statico"
76
-
77
- #: ../includes/admin.php:131
78
- msgid ""
79
- "Clear all XML Sitemap Feed options from the database and start fresh with "
80
- "the default settings."
81
- msgstr ""
82
- "Rimuovi tutte le opzioni per i feed della sitemap XML dal database e "
83
- "reimposta i valori di default."
84
-
85
- #: ../includes/admin.php:133
86
- #, php-format
87
- msgid "Disabling and reenabling the %s plugin will have the same effect."
88
- msgstr ""
89
- "La stessa azione può essere ottenuta disabilitando e abilitando di nuovo il "
90
- "plugin %s."
91
-
92
- #: ../includes/admin.php:133 ../includes/admin.php:141
93
- #: ../includes/admin.php:352
94
- msgid "XML Sitemap & Google News Feeds"
95
- msgstr "XML Sitemap & Google News Feeds"
96
-
97
- #: ../includes/admin.php:141 ../includes/admin.php:352
98
- #, php-format
99
- msgid "Donate to keep the free %s plugin development & support going!"
100
- msgstr ""
101
- "Effettua una donazione per mantenere gratuito lo sviluppo e il supporto al "
102
- "plugin %s!"
103
-
104
- #: ../includes/admin.php:141
105
- #, php-format
106
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
107
- msgstr "Queste impostazioni controllano le sitemap XML generate dal plugin %s."
108
-
109
- #: ../includes/admin.php:150
110
- msgid "XML Sitemaps for post types"
111
- msgstr "Sitemap XML per tipi di post"
112
-
113
- #: ../includes/admin.php:189
114
- msgid "Year"
115
- msgstr "Anno"
116
-
117
- #: ../includes/admin.php:190
118
- msgid "Month"
119
- msgstr "Mese"
120
-
121
- #: ../includes/admin.php:194
122
- msgid "Split by"
123
- msgstr "Dividi per"
124
-
125
- #: ../includes/admin.php:204
126
- msgid ""
127
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
128
- "split by month is needed."
129
- msgstr ""
130
- "Dividere per mese se le sitemap generate risultano lente o errate. In alcuni "
131
- "rari casi è necessario dividere per mese."
132
-
133
- #: ../includes/admin.php:209 ../includes/admin.php:725
134
- msgid "Priority"
135
- msgstr "Priorità"
136
-
137
- #: ../includes/admin.php:211
138
- msgid "Priority can be overridden on individual posts."
139
- msgstr "La priorità può essere modificata in ogni singolo post."
140
-
141
- #: ../includes/admin.php:216
142
- msgid ""
143
- "Automatically adjusts Priority according to relative age and comment count."
144
- msgstr ""
145
- "Selezionare la priorità automaticamente in base all'età del post e al numero "
146
- "di commenti."
147
-
148
- #: ../includes/admin.php:216
149
- msgid ""
150
- "Sticky posts will not be subject to reduction by age. Individual posts with "
151
- "fixed Priority will always keep that value."
152
- msgstr ""
153
- "Nel caso di post evidenziati, l'età non ha effetto nel calcolo della "
154
- "priorità. La priorità resterà invariata anche per singoli post ai quali è "
155
- "stata assegnata una priorità specifica."
156
-
157
- #: ../includes/admin.php:221
158
- msgid "Update Lastmod and Changefreq on comments."
159
- msgstr ""
160
- "Aggiorna data ultima modifica (Lastmod) e frequenza (Changefreq) nei "
161
- "commenti."
162
-
163
- #: ../includes/admin.php:221
164
- msgid ""
165
- "Set this if discussion on your site warrants reindexation upon each new "
166
- "comment."
167
- msgstr ""
168
- "Selezionare questa impostazione nel caso in cui questo sito effettui la "
169
- "reindicizzazione della discussione tutte le volte che un nuovo commento "
170
- "viene inserito."
171
-
172
- #: ../includes/admin.php:225 ../includes/admin.php:371
173
- msgid "Add image tags for"
174
- msgstr "Aggiungi tag immagine per"
175
-
176
- #: ../includes/admin.php:233 ../includes/admin.php:378
177
- msgid "Attached images"
178
- msgstr "Immagini allegate"
179
-
180
- #: ../includes/admin.php:243
181
- msgid ""
182
- "Priority settings do not affect ranking in search results in any way. They "
183
- "are only meant to suggest search engines which URLs to index first. Once a "
184
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
185
- "updated."
186
- msgstr ""
187
- "Le impostazioni di priorità non influiscono in alcun modo sul rank nei "
188
- "risultati dei motori di ricerca. Tali impostazioni servono solo a suggerire "
189
- "quali URL debbano essere indicizzate per prime. Una volta che l'URL è "
190
- "indicizzata. la sua priorità non ha più alcun effetto fintantoché la data di "
191
- "ultima modifica (Lastmod) non venga modificata."
192
-
193
- #: ../includes/admin.php:243
194
- msgid ""
195
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
196
- "when allowed, posts with high comment count."
197
- msgstr ""
198
- "La massima priorità (1.0) è riservata alla pagina principale, a post "
199
- "individuali e, se consentita, a post con un alto numero di commenti."
200
-
201
- #: ../includes/admin.php:243
202
- msgid ""
203
- "Priority values are taken as relative values. Setting all to the same (high) "
204
- "value is pointless."
205
- msgstr ""
206
- "I valori di priorità sono valori relativi. Non ha senso impostarli tutti "
207
- "allo stesso valore (massimo)."
208
-
209
- #: ../includes/admin.php:294
210
- msgid "XML Sitemaps for taxonomies"
211
- msgstr "Sitemap XML per tassonomie"
212
-
213
- #: ../includes/admin.php:300
214
- msgid ""
215
- "It is generally not recommended to include taxonomy pages, unless their "
216
- "content brings added value."
217
- msgstr ""
218
- "Normalmente non è consigliato includere le pagine di tassonomia, a meno che "
219
- "il loro contenuto non costituisca un valore aggiunto."
220
-
221
- #: ../includes/admin.php:300
222
- msgid ""
223
- "For example, when you use category descriptions with information that is not "
224
- "present elsewhere on your site or if taxonomy pages list posts with an "
225
- "excerpt that is different from, but complementary to the post content. In "
226
- "these cases you might consider including certain taxonomies. Otherwise, if "
227
- "you fear <a href=\"http://moz.com/learn/seo/duplicate-content\">negative "
228
- "affects of duplicate content</a> or PageRank spread, you might even consider "
229
- "disallowing indexation of taxonomies."
230
- msgstr ""
231
- "Si può decidere di includere le tassonomie nella sitemap se ad esempio le "
232
- "categorie dei post contengano testi descrittivi non presenti in altre parti "
233
- "del sito, oppure se le pagine di tassonomia includano liste di post con un "
234
- "riassunto diverso nella forma, ma complementare al contenuto del post. Se "
235
- "comunque si pensa che l'indicizzazione delle tassonomie crei <a href="
236
- "\"http://moz.com/learn/seo/duplicate-content\">un effetto negativo a causa "
237
- "di contenuti duplicati</a> o la propagazione del PageRank spread, è "
238
- "consigliato mantenere l'indicizzazione disabilitata."
239
-
240
- #: ../includes/admin.php:300
241
- #, php-format
242
- msgid ""
243
- "You can do this by adding specific robots.txt rules in the %s field above."
244
- msgstr ""
245
- "Questo può essere effettuato aggiungendo specifiche regole nel robots.txt "
246
- "nei campi %s qui sopra."
247
-
248
- #: ../includes/admin.php:300 ../includes/admin.php:789
249
- msgid "Additional robots.txt rules"
250
- msgstr "Regole addizionali per robots.txt"
251
-
252
- #: ../includes/admin.php:315
253
- msgid "No taxonomies available for the currently included post types."
254
- msgstr "Non risultano tassonomie per i tipi di post inclusi al momento."
255
-
256
- #: ../includes/admin.php:331
257
- msgid "Additional URLs to append to the XML Sitemap."
258
- msgstr "URL addizionali da inserire nella sitemap XML."
259
-
260
- #: ../includes/admin.php:332
261
- msgid ""
262
- "Add the full URL, including protocol (http/https) and domain, of any static "
263
- "page or WordPress page that you want to append to the ones already included "
264
- "by the settings above. Optionally add a priority value between 0 and 1, "
265
- "separated with a space, after the URL. Start each URL on a new line."
266
- msgstr ""
267
- "Inserire l'URL per intero, includendo anche il tipo di protocollo (http/"
268
- "https) e il dominio di ogni pagina statica di WordPress che si desideri "
269
- "aggiungere a quelle già incluse in base alle impostazioni qui sopra. È "
270
- "possibile aggiungere anche un valore di priorità da 0 a 1 dopo l'URL, "
271
- "separato da uno spazio. Inserire una URL per riga."
272
-
273
- #: ../includes/admin.php:341
274
- msgid "Additional domains to allow in the XML Sitemap."
275
- msgstr "Domini addizionali da includere nella sitemap XML."
276
-
277
- #: ../includes/admin.php:342
278
- #, php-format
279
- msgid ""
280
- "By default, only the domain %s as used in your WordPress site address is "
281
- "allowed. This means that all URLs that use another domain (custom URLs or "
282
- "using a plugin like Page Links To) are filtered from the XML Sitemap. "
283
- "However, if you are the verified owner of other domains in your Google/Bing "
284
- "Webmaster Tools account, you can include these in the same sitemap. Add "
285
- "these domains, without protocol (http/https) each on a new line. Note that "
286
- "if you enter a domain with www, all URLs without it or with other subdomains "
287
- "will be filtered."
288
- msgstr ""
289
- "Solo il dominio di questo sito WordPress (%s) è consentito di default. Ciò "
290
- "significa che tutte le URL relative ad altri domini (URL personalizzate o "
291
- "create tramite plugin come Page Links To) sono escluse dalla sitemap XML. "
292
- "Nel caso in cui tali URL siano relative a domini in tuo possesso e "
293
- "verificati tramite un account Google o Bing Webmaster Tools, è possibile "
294
- "includerle nella stessa sitemap. Aggiungere un dominio per riga senza il "
295
- "protocollo (http/https). Si noti che nel caso in cui il dominio venga "
296
- "inserito con il prefisso www, tutte le URL prive di www oppure relative a "
297
- "sottodomini verranno escluse."
298
-
299
- #: ../includes/admin.php:352
300
- #, php-format
301
- msgid ""
302
- "These settings control the Google News Sitemap generated by the %s plugin."
303
- msgstr ""
304
- "Queste impostazioni controllano la sitemap per Google News generata dal "
305
- "plugin %s."
306
-
307
- #: ../includes/admin.php:352
308
- msgid ""
309
- "When you are done configuring and preparing your news content and you are "
310
- "convinced your site adheres to the <a href=\"https://support.google.com/news/"
311
- "publisher/answer/40787?ref_topic=2484652\" target=\"_blank\">Google News "
312
- "guidelines</a>, go ahead and <a href=\"https://support.google.com/news/"
313
- "publisher/troubleshooter/3179220?#ts=3179198\" target=\"_blank\">submit your "
314
- "site for inclusion</a>!"
315
- msgstr ""
316
- "Dopo aver effettuato le impostazioni e preparato il contenuto delle news, e "
317
- "una volta assicuratosi che il sito sia conforme alle <a href=\"https://"
318
- "support.google.com/news/publisher/answer/40787?ref_topic=2484652&hl=it\" "
319
- "target=\"_blank\">linee guida di Google News</a>, proseguire con la <a href="
320
- "\"https://support.google.com/news/publisher/troubleshooter/3179220?"
321
- "hl=it#ts=3179198\" target=\"_blank\">richiesta di inclusione del sito</a>!"
322
-
323
- #: ../includes/admin.php:362
324
- #, php-format
325
- msgid "By default, the general %s setting will be used."
326
- msgstr "Le impostazioni generali presenti in %s sono utilizzate di default."
327
-
328
- #: ../includes/admin.php:392 ../includes/admin.php:826
329
- msgid "Access (&lt;access&gt; tag)"
330
- msgstr "Accesso (tag &lt;access&gt;)"
331
-
332
- #: ../includes/admin.php:393
333
- #, php-format
334
- msgid ""
335
- "The &lt;access&gt; tag specifies whether an article is available to all "
336
- "readers (%1$s), or only to those with a free (%2$s) or paid membership "
337
- "(%3$s) to your site."
338
- msgstr ""
339
- "Il tag &lt;access&gt; specifica se un articolo è disponibile per tutti i "
340
- "lettori (%1$s), oppure soltanto per chi si è iscritto gratuitamente (%2$s) o "
341
- "a pagamento (%3$s) al sito."
342
-
343
- #: ../includes/admin.php:393 ../includes/admin.php:400
344
- #: ../includes/admin.php:413
345
- msgid "Registration"
346
- msgstr "Registration"
347
-
348
- #: ../includes/admin.php:393 ../includes/admin.php:401
349
- #: ../includes/admin.php:414
350
- msgid "Subscription"
351
- msgstr "Subscription"
352
-
353
- #: ../includes/admin.php:398
354
- msgid "Tag normal posts as"
355
- msgstr "Taggare i post normali come"
356
-
357
- #: ../includes/admin.php:412
358
- #, php-format
359
- msgid "Tag %s posts as"
360
- msgstr "Taggare i post %s come"
361
-
362
- #: ../includes/admin.php:419
363
- msgid ""
364
- "Note: The &lt;access&gt; tag is required when applicable. Do not leave it to "
365
- "Public when your content is not."
366
- msgstr ""
367
- "Nota: il tag &lt;access&gt; è richiesto quando applicabile. Non lasciare il "
368
- "tag impostato come \"pubblico\" se il contenuto non lo è."
369
-
370
- #: ../includes/admin.php:439 ../includes/admin.php:827
371
- msgid "Genres (&lt;genres&gt; tag)"
372
- msgstr "Genere (tag &lt;genres&gt;)"
373
-
374
- #: ../includes/admin.php:440
375
- msgid ""
376
- "The &lt;genres&gt; tag specifies one or more properties for an article, "
377
- "namely, whether it is a press release, a blog post, an opinion, an op-ed "
378
- "piece, user-generated content, or satire."
379
- msgstr ""
380
- "Il tag &lt;genres&gt; specifica una o più proprietà di un articolo, cioè se "
381
- "si tratta di un comunicato stampa, un post di un blog, un'opinione, un "
382
- "editoriale, contenuti generati dagli utenti o satira."
383
-
384
- #: ../includes/admin.php:440
385
- msgid "You can assign Google News genres when writing a new post."
386
- msgstr ""
387
- "È possibile suggerire un genere a Google News tutte le volte che viene "
388
- "scritto un nuovo post."
389
-
390
- #: ../includes/admin.php:451
391
- msgid "Default genre:"
392
- msgstr "Genere di default:"
393
-
394
- #: ../includes/admin.php:460
395
- msgid ""
396
- "Note: The &lt;genres&gt; tag is required when applicable and restricted to "
397
- "the list provided above."
398
- msgstr ""
399
- "Nota: il tag &lt;genres&gt; è richiesto quando applicabile e selezionabile "
400
- "in base alla lista elencata qui sopra."
401
-
402
- #: ../includes/admin.php:472 ../includes/admin.php:828
403
- msgid "Topics (&lt;keywords&gt; tag)"
404
- msgstr "Argomento (tag &lt;keywords&gt;)"
405
-
406
- #: ../includes/admin.php:473
407
- msgid ""
408
- "The &lt;keywords&gt; tag is used to help classify the articles you submit to "
409
- "Google News by <strong>topic</strong>."
410
- msgstr ""
411
- "Il tag &lt;keywords&gt; serve per facilitare la classificazione per "
412
- "<strong>argomento</strong> degli articoli inviati a Google News."
413
-
414
- #: ../includes/admin.php:475
415
- #, php-format
416
- msgid "Use %s for topics."
417
- msgstr "Utilizzare %s per gli argomenti."
418
-
419
- #: ../includes/admin.php:480
420
- msgid "Default topic(s):"
421
- msgstr "Argomento/i di default:"
422
-
423
- #: ../includes/admin.php:482 ../includes/admin.php:503
424
- msgid "Separate with a comma."
425
- msgstr "Separare con una virgola."
426
-
427
- #: ../includes/admin.php:484
428
- msgid ""
429
- "Keywords may be drawn from, but are not limited to, the list of <a href="
430
- "\"http://www.google.com/support/news_pub/bin/answer.py?answer=116037\" "
431
- "target=\"_blank\">existing Google News keywords</a>."
432
- msgstr ""
433
- "Una lista di keyword è disponibile su <a href=\"https://support.google.com/"
434
- "news/publisher/answer/116037?hl=it\" target=\"_blank\">Google News</a> ma la "
435
- "scelta non è limitata ad esse."
436
-
437
- #: ../includes/admin.php:494 ../includes/admin.php:829
438
- msgid "Locations (&lt;geo_locations&gt; tag)"
439
- msgstr "Ubicazione (tag &lt;geo_location&gt;)"
440
-
441
- #: ../includes/admin.php:495
442
- msgid ""
443
- "The &lt;geo_locations&gt; tag is used identify the geographic location of "
444
- "your articles."
445
- msgstr ""
446
- "Il tag &lt;geo_location&gt; è utilizzato per identificare la posizione "
447
- "geografica dell'articolo."
448
-
449
- #: ../includes/admin.php:495
450
- msgid "You can assign locations when writing a new post."
451
- msgstr ""
452
- "È possibile assegnare l'ubicazione tutte le volte che si scrive un nuovo "
453
- "post."
454
-
455
- #: ../includes/admin.php:501
456
- msgid "Default location:"
457
- msgstr "Ubicazione di default:"
458
-
459
- #: ../includes/admin.php:505
460
- msgid ""
461
- "You should list location entities from smallest entity to largest. For "
462
- "example: <code>Detroit, Michigan, USA</code> or <code>Rhône-Alpes, France</"
463
- "code>."
464
- msgstr ""
465
- "Le entità locali devono essere scritte dalla più piccola alla più grande. Ad "
466
- "esempio: <code>Detroit, Michigan, USA</code> or <code>Rhône-Alpes, France</"
467
- "code>."
468
-
469
- #: ../includes/admin.php:689 ../includes/admin.php:798
470
- msgid "XML Sitemap"
471
- msgstr "Sitemap XML"
472
-
473
- #: ../includes/admin.php:721
474
- msgid "Exclude from XML Sitemap"
475
- msgstr "Escludi dalla sitemap XML"
476
-
477
- #: ../includes/admin.php:727
478
- #, php-format
479
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
480
- msgstr ""
481
- "Lasciare vuoto per utilizzare la priorità automatica configurata in %1$s > "
482
- "%2$s."
483
-
484
- #: ../includes/admin.php:773
485
- msgid "Enable XML sitemaps"
486
- msgstr "Abilita sitemap XML"
487
-
488
- #: ../includes/admin.php:794
489
- msgid "Reset XML sitemaps"
490
- msgstr "Azzera sitemap XML"
491
-
492
- #: ../includes/admin.php:801
493
- msgid "Include post types"
494
- msgstr "Tipi di post da includere"
495
-
496
- #: ../includes/admin.php:804
497
- msgid "Include taxonomies"
498
- msgstr "Includi tassonomie"
499
-
500
- #: ../includes/admin.php:807
501
- msgid "Include custom URLs"
502
- msgstr "Includi URL personalizzate"
503
-
504
- #: ../includes/admin.php:811
505
- msgid "Additional allowed domains"
506
- msgstr "Domini addizionali consentiti"
507
-
508
- #: ../includes/admin.php:824
509
- msgid "Publication name"
510
- msgstr "Nome pubblicazione"
511
-
512
- #: ../includes/core.php:1059
513
- msgid "Google News Genres"
514
- msgstr "Google News: Generi"
515
-
516
- #: ../includes/core.php:1060
517
- msgid "Google News Genre"
518
- msgstr "Google News: Genere"
519
-
520
- #: ../includes/core.php:1078
521
- msgid "Google News Country"
522
- msgstr "Google News: Stato"
523
-
524
- #: ../includes/core.php:1080 ../includes/core.php:1099
525
- #: ../includes/core.php:1118
526
- msgid ""
527
- "Only one allowed. Must be consistent with other Google News location "
528
- "entities (if set)."
529
- msgstr ""
530
- "Solo uno consentito. Deve essere coerente con l'entità di localizzazione (se "
531
- "impostata)."
532
-
533
- #: ../includes/core.php:1097
534
- msgid "Google News State/Province"
535
- msgstr "Google News: Provincia"
536
-
537
- #: ../includes/core.php:1116
538
- msgid "Google News City"
539
- msgstr "Google News: Città"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-nl_NL.mo DELETED
Binary file
languages/xml-sitemap-feed-nl_NL.po DELETED
@@ -1,814 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.4\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-05-06 02:08+0200\n"
6
- "PO-Revision-Date: 2016-05-06 02:16+0200\n"
7
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
- "Language-Team: RavanH <ravanhagen@gmail.com>\n"
9
- "Language: nl_NL\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e;_n\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.8.7.1\n"
16
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
-
18
- #: ../includes/class-xmlsitemapfeed-admin.php:23
19
- msgid "XML Sitemaps"
20
- msgstr "XML Sitemaps"
21
-
22
- #: ../includes/class-xmlsitemapfeed-admin.php:24
23
- msgid "XML Sitemap Index"
24
- msgstr "XML Sitemap Index"
25
-
26
- #: ../includes/class-xmlsitemapfeed-admin.php:29
27
- #: ../includes/class-xmlsitemapfeed-admin.php:1010
28
- msgid "Google News Sitemap"
29
- msgstr "Google Nieuws Sitemap"
30
-
31
- #: ../includes/class-xmlsitemapfeed-admin.php:73
32
- msgid "Google"
33
- msgstr "Google"
34
-
35
- #: ../includes/class-xmlsitemapfeed-admin.php:76
36
- msgid "Bing & Yahoo"
37
- msgstr "Bing & Yahoo"
38
-
39
- #: ../includes/class-xmlsitemapfeed-admin.php:79
40
- msgid "Yandex"
41
- msgstr "Yandex"
42
-
43
- #: ../includes/class-xmlsitemapfeed-admin.php:82
44
- msgid "Baidu"
45
- msgstr "Baidu"
46
-
47
- #: ../includes/class-xmlsitemapfeed-admin.php:85
48
- msgid "Ping-O-Matic"
49
- msgstr "Ping-O-Matic"
50
-
51
- #: ../includes/class-xmlsitemapfeed-admin.php:140
52
- #, php-format
53
- msgid "Successfully sent %1$s on %2$s."
54
- msgstr "Succesvolle verzending van %1$s op %2$s."
55
-
56
- #: ../includes/class-xmlsitemapfeed-admin.php:201
57
- #: ../includes/class-xmlsitemapfeed-admin.php:392
58
- #: ../includes/class-xmlsitemapfeed-admin.php:995
59
- msgid "Additional robots.txt rules"
60
- msgstr "Aanvullende robots.txt regels"
61
-
62
- #: ../includes/class-xmlsitemapfeed-admin.php:202
63
- #, php-format
64
- msgid "Rules that will be appended to the %s generated by WordPress:"
65
- msgstr "Regels die aan de WordPress-gegenereerde %s zullen worden toegevoegd:"
66
-
67
- #: ../includes/class-xmlsitemapfeed-admin.php:203
68
- msgid ""
69
- "These rules will not have effect when you are using a static robots.txt file."
70
- msgstr ""
71
- "Deze regels hebben geen effect als je een statisch robots.txt bestand "
72
- "gebruikt."
73
-
74
- #: ../includes/class-xmlsitemapfeed-admin.php:203
75
- msgid ""
76
- "Only add rules here when you know what you are doing, otherwise you might "
77
- "break search engine access to your site."
78
- msgstr ""
79
- "Definieer hier alleen regels als je weet wat je doet, anders zou je de "
80
- "toegang tot je site kunnen verstoren."
81
-
82
- #: ../includes/class-xmlsitemapfeed-admin.php:209
83
- #: ../includes/class-xmlsitemapfeed-admin.php:1005
84
- msgid "Reset XML sitemaps"
85
- msgstr "XML sitemaps resetten"
86
-
87
- #: ../includes/class-xmlsitemapfeed-admin.php:211
88
- msgid ""
89
- "Selecting this will clear all XML Sitemap & Google News Sitemap settings "
90
- "after Save Changes. Are you sure?"
91
- msgstr ""
92
- "Met deze optie zullen alle XML Sitemap & Google Nieuws instellingen gewist "
93
- "worden na Opslaan. Weet je het zeker?"
94
-
95
- #: ../includes/class-xmlsitemapfeed-admin.php:212
96
- msgid "Clear all XML Sitemap & Google News Sitemap settings."
97
- msgstr "Verwijder alle XML Sitemap & Google Nieuws Feeds instellingen."
98
-
99
- #: ../includes/class-xmlsitemapfeed-admin.php:215
100
- msgid ""
101
- "Check this option and Save Changes to start fresh with the default settings."
102
- msgstr ""
103
- "Selecteer deze optie en vervolgens Opslaan op opnieuw te beginnen met de "
104
- "default instellingen."
105
-
106
- #: ../includes/class-xmlsitemapfeed-admin.php:224
107
- #: ../includes/class-xmlsitemapfeed-admin.php:225
108
- #: ../includes/class-xmlsitemapfeed-admin.php:462
109
- #: ../includes/class-xmlsitemapfeed-admin.php:463
110
- #, php-format
111
- msgid "Donate to keep the free %s plugin development & support going!"
112
- msgstr ""
113
- "Doneer om de ontwikkeling en ondersteuning van de %s plugin gaande te houden!"
114
-
115
- #: ../includes/class-xmlsitemapfeed-admin.php:224
116
- #: ../includes/class-xmlsitemapfeed-admin.php:225
117
- #: ../includes/class-xmlsitemapfeed-admin.php:226
118
- #: ../includes/class-xmlsitemapfeed-admin.php:462
119
- #: ../includes/class-xmlsitemapfeed-admin.php:463
120
- #: ../includes/class-xmlsitemapfeed-admin.php:464
121
- msgid "XML Sitemap & Google News Feeds"
122
- msgstr "XML Sitemap & Google Nieuws Feeds"
123
-
124
- #: ../includes/class-xmlsitemapfeed-admin.php:226
125
- #, php-format
126
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
127
- msgstr ""
128
- "Deze instellingen beheersen de XML Sitemaps gegenereerd door de %s plugin."
129
-
130
- #: ../includes/class-xmlsitemapfeed-admin.php:227
131
- #: ../includes/class-xmlsitemapfeed-admin.php:467
132
- #, php-format
133
- msgid "For ping options, go to %s."
134
- msgstr "Ga naar %s voor Ping instellingen."
135
-
136
- #: ../includes/class-xmlsitemapfeed-admin.php:240
137
- msgid "XML Sitemaps for post types"
138
- msgstr "XML Sitemaps voor berichttypen"
139
-
140
- #: ../includes/class-xmlsitemapfeed-admin.php:279
141
- msgid "Year"
142
- msgstr "Jaar"
143
-
144
- #: ../includes/class-xmlsitemapfeed-admin.php:280
145
- msgid "Month"
146
- msgstr "Maand"
147
-
148
- #: ../includes/class-xmlsitemapfeed-admin.php:284
149
- msgid "Split by"
150
- msgstr "Verdeel naar"
151
-
152
- #: ../includes/class-xmlsitemapfeed-admin.php:294
153
- msgid ""
154
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
155
- "split by month is needed."
156
- msgstr ""
157
- "Verdeel naar jaar als je errors of trage sitemaps ondervindt. In zeldzame "
158
- "gevallen is een verdeling naar maand nodig."
159
-
160
- #: ../includes/class-xmlsitemapfeed-admin.php:299
161
- #: ../includes/class-xmlsitemapfeed-admin.php:884
162
- msgid "Priority"
163
- msgstr "Prioriteit"
164
-
165
- #: ../includes/class-xmlsitemapfeed-admin.php:301
166
- msgid "Priority can be overridden on individual posts."
167
- msgstr "De Priority kan per bericht worden aangepast."
168
-
169
- #: ../includes/class-xmlsitemapfeed-admin.php:306
170
- msgid "Automatic Priority calculation."
171
- msgstr "Automatische Priority berekening."
172
-
173
- #: ../includes/class-xmlsitemapfeed-admin.php:306
174
- msgid ""
175
- "Adjusts the Priority based on factors like age, comments, sticky post or "
176
- "blog page. Individual posts with fixed Priority will always keep that value."
177
- msgstr ""
178
- "Stelt Priority bij aan de hand van factoren als leeftijd, commentaren, "
179
- "sticky posts of blogpagina. Berichten met een vastgezette prioriteit "
180
- "behouden deze."
181
-
182
- #: ../includes/class-xmlsitemapfeed-admin.php:311
183
- msgid "Update Lastmod and Changefreq on comments."
184
- msgstr "Pas de Lastmod en Changefreq aan bij commentaren."
185
-
186
- #: ../includes/class-xmlsitemapfeed-admin.php:311
187
- msgid ""
188
- "Set this if discussion on your site warrants reindexation upon each new "
189
- "comment."
190
- msgstr ""
191
- "Activeer dit als discussies op je site het waard zijn om na ieder commentaar "
192
- "opnieuw geïndexeerd te worden."
193
-
194
- #: ../includes/class-xmlsitemapfeed-admin.php:315
195
- #: ../includes/class-xmlsitemapfeed-admin.php:582
196
- msgid "Add image tags for"
197
- msgstr "Voeg afbeeldingstags toe voor"
198
-
199
- #: ../includes/class-xmlsitemapfeed-admin.php:323
200
- #: ../includes/class-xmlsitemapfeed-admin.php:589
201
- msgid "Attached images"
202
- msgstr "Bijgevoegde afbeeldingen"
203
-
204
- #: ../includes/class-xmlsitemapfeed-admin.php:333
205
- msgid ""
206
- "Priority settings do not affect ranking in search results in any way. They "
207
- "are only meant to suggest search engines which URLs to index first. Once a "
208
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
209
- "updated."
210
- msgstr ""
211
- "Priority beïnvloed de positie in zoekresultaten op geen enkele wijze. Het is "
212
- "dient om zoekmachines aan te geven welke URLs het eerst te indexeren. Zodra "
213
- "een URL geïndexeerd is, wordt de prioriteit betekenisloos totdat de Lastmod "
214
- "is veranderd."
215
-
216
- #: ../includes/class-xmlsitemapfeed-admin.php:334
217
- msgid ""
218
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
219
- "when allowed, posts with high comment count."
220
- msgstr ""
221
- "Maximum Priority (1.0) is gereserveerd voor de voorpagina, individuele posts "
222
- "en, indien toegestaan, posts met veel commentaren."
223
-
224
- #: ../includes/class-xmlsitemapfeed-admin.php:334
225
- msgid ""
226
- "Priority values are taken as relative values. Setting all to the same (high) "
227
- "value is pointless."
228
- msgstr ""
229
- "Priority is een relatieve waarde. Het is zinloos om ze allemaal dezelfde "
230
- "(hoge) waarde te geven."
231
-
232
- #: ../includes/class-xmlsitemapfeed-admin.php:384
233
- msgid "XML Sitemaps for taxonomies"
234
- msgstr "XML Sitemaps voor taxonomieën"
235
-
236
- #: ../includes/class-xmlsitemapfeed-admin.php:390
237
- msgid ""
238
- "It is generally not recommended to include taxonomy pages, unless their "
239
- "content brings added value."
240
- msgstr ""
241
- "Het is over het algemeen niet aangeraden om taxonomie-pagina's bij te "
242
- "sluiten, tenzij ze een toegevoegde waarde hebben."
243
-
244
- #: ../includes/class-xmlsitemapfeed-admin.php:391
245
- msgid ""
246
- "For example, when you use category descriptions with information that is not "
247
- "present elsewhere on your site or if taxonomy pages list posts with an "
248
- "excerpt that is different from, but complementary to the post content. In "
249
- "these cases you might consider including certain taxonomies. Otherwise, if "
250
- "you fear <a href=\"http://moz.com/learn/seo/duplicate-content\">negative "
251
- "affects of duplicate content</a> or PageRank spread, you might even consider "
252
- "disallowing indexation of taxonomies."
253
- msgstr ""
254
- "Bijvoorbeeld als je categoriebeschrijvingen gebruikt die unieke informatie "
255
- "bevatten of als samenvattingen op taxonomiepagina's aanvullend zijn op de "
256
- "inhoud van de artikelen. In deze gevallen zou je kunnen overwegen bepaalde "
257
- "taxonomieën bij te sluiten. Maar in andere gevallen zou je, als je de <a "
258
- "href=\"http://moz.com/learn/seo/duplicate-content\">negatieve effecten van "
259
- "dubbele inhoud</a> of verspeiding van PageRank vreest, zelfs kunnen "
260
- "overwegen om indexatie van taxonomieën te verbieden."
261
-
262
- #: ../includes/class-xmlsitemapfeed-admin.php:392
263
- #, php-format
264
- msgid ""
265
- "You can do this by adding specific robots.txt rules in the %s field above."
266
- msgstr ""
267
- "Je kunt dit doen door specifieke robots.txt-regels in het veld %s hierboven "
268
- "toe te voegen."
269
-
270
- #: ../includes/class-xmlsitemapfeed-admin.php:407
271
- msgid "No taxonomies available for the currently included post types."
272
- msgstr "Geen taxonomieën beschikbaar voor de huidige bijgesloten berichttypes."
273
-
274
- #: ../includes/class-xmlsitemapfeed-admin.php:415
275
- #: ../includes/class-xmlsitemapfeed-admin.php:1039
276
- msgid "Include custom XML Sitemaps"
277
- msgstr "Aangepaste XML Sitemaps toevoegen"
278
-
279
- #: ../includes/class-xmlsitemapfeed-admin.php:416
280
- msgid "Additional XML Sitemaps to append to the main XML Sitemap Index:"
281
- msgstr "Extra URL's om in de XML Sitemap Index bij te sluiten:"
282
-
283
- #: ../includes/class-xmlsitemapfeed-admin.php:418
284
- msgid ""
285
- "Add the full URL, including protocol (http/https) and domain, of any XML "
286
- "Sitemap that you want to append to the Sitemap Index. Start each URL on a "
287
- "new line."
288
- msgstr ""
289
- "Voer de volledige URL in, inclusief protocol (http/https) en domein, van XML "
290
- "Sitemaps die je wil toevoegen aan de Sitemap Index. Begin iedere URL op een "
291
- "nieuwe regel."
292
-
293
- #: ../includes/class-xmlsitemapfeed-admin.php:418
294
- msgid ""
295
- "Only valid sitemaps are allowed in the Sitemap Index. Use your Google/Bing "
296
- "Webmaster Tools to verify!"
297
- msgstr ""
298
- "Alleen valide sitemaps zijn toegestaan in de Sitemap Index. Gebruik je "
299
- "Google/Bing Webmaster Tools om ze te verifiëren!"
300
-
301
- #: ../includes/class-xmlsitemapfeed-admin.php:435
302
- #: ../includes/class-xmlsitemapfeed-admin.php:1036
303
- msgid "Include custom URLs"
304
- msgstr "Aangepaste URL's bijsluiten"
305
-
306
- #: ../includes/class-xmlsitemapfeed-admin.php:436
307
- msgid "Additional URLs to append in an extra XML Sitemap:"
308
- msgstr "Extra URL's om in een extra XML Sitemap bij te sluiten:"
309
-
310
- #: ../includes/class-xmlsitemapfeed-admin.php:438
311
- msgid ""
312
- "Add the full URL, including protocol (http/https) and domain, of any "
313
- "(static) page that you want to append to the ones already included by "
314
- "WordPress. Optionally add a priority value between 0 and 1, separated with a "
315
- "space after the URL. Start each URL on a new line."
316
- msgstr ""
317
- "Voer de volledige URL in, inclusief protocol (http/https) en domein, van "
318
- "(statische) pagina's die je wil voegen bij die die door WordPress worden "
319
- "gegenereerd. Geef eventueel een Priority-waarde tussen 0 en 1 met een spatie "
320
- "gescheiden achter de URL. Begin iedere URL op een nieuwe regel."
321
-
322
- #: ../includes/class-xmlsitemapfeed-admin.php:448
323
- #: ../includes/class-xmlsitemapfeed-admin.php:1033
324
- msgid "Allowed domains"
325
- msgstr "Toegestane domeinen"
326
-
327
- #: ../includes/class-xmlsitemapfeed-admin.php:449
328
- msgid "Additional domains to allow in the XML Sitemaps:"
329
- msgstr "Extra domeinen om in de XML Sitemap toe te staan:"
330
-
331
- #: ../includes/class-xmlsitemapfeed-admin.php:450
332
- #, php-format
333
- msgid ""
334
- "By default, only the domain %s as used in your WordPress site address is "
335
- "allowed. This means that all URLs that use another domain (custom URLs or "
336
- "using a plugin like Page Links To) are filtered from the XML Sitemap. "
337
- "However, if you are the verified owner of other domains in your Google/Bing "
338
- "Webmaster Tools account, you can include these in the same sitemap. Add "
339
- "these domains, without protocol (http/https) each on a new line. Note that "
340
- "if you enter a domain with www, all URLs without it or with other subdomains "
341
- "will be filtered."
342
- msgstr ""
343
- "Standaard wordt alleen het domein %s zoals gebruikt in je WordPress "
344
- "siteadres, toegestaan. Dit betekent dat alle URL's met een ander domein "
345
- "(Aangepaste URL's of bij gebruik van een plugin als Page Links To) uit de "
346
- "XML Sitemap worden gefilterd. Maar als je de geverifieerde eigenaar van "
347
- "andere domeinen in je Google/Bing Webmaster Tools account bent, dan kun je "
348
- "deze in de sitemap bijsluiten. Voer deze domeinen in, zonder protocol (http/"
349
- "https), ieder op een nieuwe regel. Let op: als je een domein met www "
350
- "gebruikt dan worden URL's zonder www of met andere subdomeinen, gefilterd."
351
-
352
- #: ../includes/class-xmlsitemapfeed-admin.php:464
353
- #, php-format
354
- msgid ""
355
- "These settings control the Google News Sitemap generated by the %s plugin."
356
- msgstr ""
357
- "Deze instellingen beheersen de XML Sitemaps gegenereerd door de %s plugin."
358
-
359
- #: ../includes/class-xmlsitemapfeed-admin.php:465
360
- msgid ""
361
- "When you are done configuring and preparing your news content and you are "
362
- "convinced your site adheres to the <a href=\"https://support.google.com/news/"
363
- "publisher/answer/40787\" target=\"_blank\">Google News guidelines</a>, go "
364
- "ahead and <a href=\"https://partnerdash.google.com/partnerdash/d/news\" "
365
- "target=\"_blank\">submit your site for inclusion</a>!"
366
- msgstr ""
367
- "Als je klaar bent met configureren en voorbereiden van nieuwsberichten en je "
368
- "overtuigd bent dat je site overeenstemt met de <a href=\"https://support."
369
- "google.com/news/publisher/answer/40787\" target=\"_blank\">Google Nieuws "
370
- "richtlijnen</a>, dan kun je <a href=\"https://partnerdash.google.com/"
371
- "partnerdash/d/news\" target=\"_blank\">je site voor insluiting indienen</a>!"
372
-
373
- #: ../includes/class-xmlsitemapfeed-admin.php:466
374
- msgid ""
375
- "It is strongly recommended to submit your news sitemap to your Google "
376
- "Webmasters Tools account to monitor for warnings or errors. Read more on how "
377
- "to <a href=\"https://support.google.com/webmasters/answer/183669\" target="
378
- "\"_blank\">Manage sitemaps with the Sitemaps page</a>."
379
- msgstr ""
380
- "Het is sterk aangeraden om je nieuws sitemap in je Google Webmaster Tools "
381
- "account toe te voegen om eventuele fouten op te sporen. Leer meer op <a href="
382
- "\"https://support.google.com/webmasters/answer/183669\" target=\"_blank"
383
- "\">Sitemaps beheren met het rapport Sitemaps</a>."
384
-
385
- #: ../includes/class-xmlsitemapfeed-admin.php:477
386
- #: ../includes/class-xmlsitemapfeed-admin.php:1013
387
- msgid "Publication name"
388
- msgstr "Publicatienaam"
389
-
390
- #: ../includes/class-xmlsitemapfeed-admin.php:478
391
- #, php-format
392
- msgid "By default, the general %s setting will be used."
393
- msgstr "Standaard wordt de algemene %s instelling gebruikt."
394
-
395
- #: ../includes/class-xmlsitemapfeed-admin.php:479
396
- msgid ""
397
- "The publication name should match the name submitted on the Google News "
398
- "Publisher Center. If you wish to change it, please read <a href=\"https://"
399
- "support.google.com/news/publisher/answer/40402\" target=\"_blank\">Updated "
400
- "publication name</a>."
401
- msgstr ""
402
- "De publicatienaam dient overeen te komen met de naam die is ingediend bij "
403
- "het Uitgeverscentrum van Google Nieuws. Als je deze wil veranderen, lees dan "
404
- "<a href=\"https://support.google.com/news/publisher/answer/40402\" target="
405
- "\"_blank\">Bijgewerkte publicatienaam</a>."
406
-
407
- #: ../includes/class-xmlsitemapfeed-admin.php:496
408
- msgid ""
409
- "Error: There where no valid post types found. Without at least one public "
410
- "post type, a Google News Sitemap cannot be created by this plugin. Please "
411
- "deselect the option Google News Sitemap at <a href=\"#xmlsf_sitemaps"
412
- "\">Enable XML sitemaps</a> and choose another method."
413
- msgstr ""
414
- "Fout: Er zijn geen geldige posttypes gevonden. Zonder tenminste één posttype "
415
- "kan deze plugin geen Google Nieuws Sitemap creëren. Schakel de optie Google "
416
- "Nieuws Sitemap uit bij <a href=\"#xmlsf_sitemaps\">XML sitemaps inschakelen</"
417
- "a> en kies een andere methode."
418
-
419
- #: ../includes/class-xmlsitemapfeed-admin.php:499
420
- #: ../includes/class-xmlsitemapfeed-admin.php:1014
421
- #: ../includes/class-xmlsitemapfeed-admin.php:1027
422
- msgid "Include post types"
423
- msgstr "Berichttypes bijsluiten"
424
-
425
- #: ../includes/class-xmlsitemapfeed-admin.php:525
426
- #, php-format
427
- msgid ""
428
- "At least one post type must be selected. By default, the post type %s will "
429
- "be used."
430
- msgstr ""
431
- "Er moet ten minste één post type zijn geselecteerd. Standaard wordt %s "
432
- "gebruikt."
433
-
434
- #: ../includes/class-xmlsitemapfeed-admin.php:536
435
- #, php-format
436
- msgid ""
437
- "Selection based on categories will be available when <strong>only</strong> "
438
- "the post type %s is included above."
439
- msgstr ""
440
- "Selectie op basis van categorieën komt beschikbaar als <strong>alleen</"
441
- "strong> de posttype %s hierboven is geselecteerd."
442
-
443
- #: ../includes/class-xmlsitemapfeed-admin.php:554
444
- msgid "Limit to posts in these post categories:"
445
- msgstr "Beperk tot berichten in deze bericht-categorieën:"
446
-
447
- #: ../includes/class-xmlsitemapfeed-admin.php:570
448
- msgid ""
449
- "If you wish to limit posts that will feature in your News Sitemap to certain "
450
- "categories, select them here. If no categories are selected, posts of all "
451
- "categories will be included in your News Sitemap."
452
- msgstr ""
453
- "Als je berichten in je Nieuws Sitemap wil beperken tot bepaalde categorieën, "
454
- "selecteer die hier. Als er geen categorieën geselecteerd zijn, worden "
455
- "artikelen uit alle categorieën in de Nieuws Sitemap bijgesloten."
456
-
457
- #: ../includes/class-xmlsitemapfeed-admin.php:570
458
- #: ../includes/class-xmlsitemapfeed-admin.php:650
459
- msgid "Use the Ctrl/Cmd key plus click to select more than one or to deselect."
460
- msgstr ""
461
- "Gebruik de Ctrl/Cmd toets plus click om meerdere te selecteren of te "
462
- "verwijderen."
463
-
464
- #: ../includes/class-xmlsitemapfeed-admin.php:592
465
- msgid ""
466
- "Note: Google News prefers at most one image per article in the News Sitemap. "
467
- "If multiple valid images are specified, the crawler will have to pick one "
468
- "arbitrarily. Images in News Sitemaps should be in jpeg or png format."
469
- msgstr ""
470
- "Let op: Google Nieuws prefereert maximaal één afbeelding per bericht in de "
471
- "News Sitemap. Bij meerder afbeeldingen zal de zoekmachine er willekeurig één "
472
- "uitlichten. Afbeeldingen in News Sitemaps dienen van het jpeg of png formaat "
473
- "te zijn."
474
-
475
- #: ../includes/class-xmlsitemapfeed-admin.php:592
476
- #: ../includes/class-xmlsitemapfeed-admin.php:599
477
- msgid "More information&hellip;"
478
- msgstr "Meer informatie&hellip;"
479
-
480
- #: ../includes/class-xmlsitemapfeed-admin.php:598
481
- #: ../includes/class-xmlsitemapfeed-admin.php:1017
482
- msgid "Source labels"
483
- msgstr "Bronlabels"
484
-
485
- #: ../includes/class-xmlsitemapfeed-admin.php:599
486
- #, php-format
487
- msgid ""
488
- "You can use the %1$s and %2$s tags to provide Google more information about "
489
- "the content of your articles."
490
- msgstr ""
491
- "Gebruik de %1$s en %2$s labels om meer informatie over de inhoud van je "
492
- "artikelen aan Google te verstrekken."
493
-
494
- #: ../includes/class-xmlsitemapfeed-admin.php:611
495
- #, php-format
496
- msgid ""
497
- "The %4$s tag specifies whether an article is available to all readers "
498
- "(%1$s), or only to those with a free (%2$s) or paid membership (%3$s) to "
499
- "your site."
500
- msgstr ""
501
- "De %4$s tag geeft aan of een artikel toegankelijk is voor iedereen (%1$s), "
502
- "of alleen via een gratis (%2$s) of betaalde inschrijving (%3$s) op je site."
503
-
504
- #: ../includes/class-xmlsitemapfeed-admin.php:611
505
- #: ../includes/class-xmlsitemapfeed-admin.php:931
506
- msgid "Registration"
507
- msgstr "Registratie"
508
-
509
- #: ../includes/class-xmlsitemapfeed-admin.php:611
510
- #: ../includes/class-xmlsitemapfeed-admin.php:932
511
- msgid "Subscription"
512
- msgstr "Abonnement"
513
-
514
- #: ../includes/class-xmlsitemapfeed-admin.php:612
515
- msgid "You can assign a different access level when writing a post."
516
- msgstr ""
517
- "Je kunt een ander toegangsniveau instellen bij het schrijven van een artikel."
518
-
519
- #: ../includes/class-xmlsitemapfeed-admin.php:616
520
- msgid "Tag normal posts as"
521
- msgstr "Normale artikelen taggen als"
522
-
523
- #: ../includes/class-xmlsitemapfeed-admin.php:618
524
- #: ../includes/class-xmlsitemapfeed-admin.php:623
525
- msgid "Free registration"
526
- msgstr "Gratis registratie"
527
-
528
- #: ../includes/class-xmlsitemapfeed-admin.php:619
529
- #: ../includes/class-xmlsitemapfeed-admin.php:624
530
- msgid "Paid subscription"
531
- msgstr "Betaald abonnement"
532
-
533
- #: ../includes/class-xmlsitemapfeed-admin.php:622
534
- msgid "Tag Password Protected posts as"
535
- msgstr "Wachtwoord beschermde artikelen markeren als"
536
-
537
- #: ../includes/class-xmlsitemapfeed-admin.php:637
538
- #, php-format
539
- msgid ""
540
- "The %s tag specifies one or more properties for an article, namely, whether "
541
- "it is a press release, a blog post, an opinion, an op-ed piece, user-"
542
- "generated content, or satire."
543
- msgstr ""
544
- "De %s tag geeft één of meer kenmerken aan een artikel, met name of het een "
545
- "persbericht, een blog artikel, een mening, een zogenaamd op-ed stuk, "
546
- "gebruiker-gegenereerde inhoud, of satire is."
547
-
548
- #: ../includes/class-xmlsitemapfeed-admin.php:637
549
- msgid "You can assign different genres when writing a post."
550
- msgstr "Je kunt andere genres toewijzen bij het opstellen van een artikel."
551
-
552
- #: ../includes/class-xmlsitemapfeed-admin.php:641
553
- msgid "Default genre:"
554
- msgstr "Standaard genre:"
555
-
556
- #: ../includes/class-xmlsitemapfeed-admin.php:650
557
- #, php-format
558
- msgid "Read more about source labels on %s"
559
- msgstr "Lees meer over bronlabels op %s"
560
-
561
- #: ../includes/class-xmlsitemapfeed-admin.php:650
562
- msgid "What does each source label mean?"
563
- msgstr "Wat betekent elke bronlabel?"
564
-
565
- #: ../includes/class-xmlsitemapfeed-admin.php:659
566
- #, php-format
567
- msgid ""
568
- "The %s tag is used to help classify the articles you submit to Google News "
569
- "by <strong>topic</strong>."
570
- msgstr ""
571
- "De %s tag wordt gebruikt om artikelen ingediend bij Google Nieuws, te "
572
- "classificeren naar <strong>onderwerp</strong>."
573
-
574
- #: ../includes/class-xmlsitemapfeed-admin.php:661
575
- #, php-format
576
- msgid "Use %s for topics."
577
- msgstr "Gebruik %s voor onderwerpen."
578
-
579
- #: ../includes/class-xmlsitemapfeed-admin.php:668
580
- msgid "Default topic(s):"
581
- msgstr "Standaard onderwerpen:"
582
-
583
- #: ../includes/class-xmlsitemapfeed-admin.php:670
584
- msgid "Separate with a comma."
585
- msgstr "Scheiden met een komma."
586
-
587
- #: ../includes/class-xmlsitemapfeed-admin.php:674
588
- msgid ""
589
- "Keywords may be drawn from, but are not limited to, the list of <a href="
590
- "\"https://support.google.com/news/publisher/answer/116037\" target=\"_blank"
591
- "\">existing Google News keywords</a>."
592
- msgstr ""
593
- "Zoekwoorden mogen gehaald worden uit, maar zijn niet gelimiteerd tot de "
594
- "lijst van <a href=\"https://support.google.com/news/publisher/"
595
- "answer/116037\" target=\"_blank\">bestaande Google Nieuws zoekwoorden</a>."
596
-
597
- #: ../includes/class-xmlsitemapfeed-admin.php:851
598
- #: ../includes/class-xmlsitemapfeed-admin.php:1024
599
- msgid "XML Sitemap"
600
- msgstr "XML Sitemap"
601
-
602
- #: ../includes/class-xmlsitemapfeed-admin.php:886
603
- #, php-format
604
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
605
- msgstr ""
606
- "Laat leeg voor automatische Priority zoals geconfigureerd op %1$s > %2$s."
607
-
608
- #: ../includes/class-xmlsitemapfeed-admin.php:890
609
- msgid "Exclude from XML Sitemap"
610
- msgstr "Uit in de XML Sitemap houden."
611
-
612
- #: ../includes/class-xmlsitemapfeed-admin.php:902
613
- msgid "Google News"
614
- msgstr "Google Nieuws"
615
-
616
- #: ../includes/class-xmlsitemapfeed-admin.php:927
617
- msgid "Access"
618
- msgstr "Toegang"
619
-
620
- #: ../includes/class-xmlsitemapfeed-admin.php:936
621
- msgid "Exclude from Google News Sitemap."
622
- msgstr "Uit in de Google Nieuws Sitemap houden."
623
-
624
- #: ../includes/class-xmlsitemapfeed-admin.php:988
625
- msgid "Enable XML sitemaps"
626
- msgstr "XML sitemaps activeren"
627
-
628
- #: ../includes/class-xmlsitemapfeed-admin.php:1030
629
- msgid "Include taxonomies"
630
- msgstr "Taxonomieën bijsluiten"
631
-
632
- #: ../includes/class-xmlsitemapfeed.php:1318
633
- msgid "Google News Genres"
634
- msgstr "Google Nieuws Genres"
635
-
636
- #: ../includes/class-xmlsitemapfeed.php:1319
637
- msgid "Google News Genre"
638
- msgstr "Google Nieuws Genre"
639
-
640
- #~ msgid "Clear all XML Sitemap Feed settings from the database."
641
- #~ msgstr "Wis alle XML Sitemap Feed opties van de database."
642
-
643
- #~ msgid ""
644
- #~ "You can use this to start fresh with the default settings or to remove "
645
- #~ "all XML Sitemap and Google News settings and taxonomy terms before "
646
- #~ "uninstalling."
647
- #~ msgstr ""
648
- #~ "Gebruik dit op opnieuw met de default instellingen te beginnen of om alle "
649
- #~ "XML Sitemap en Google Nieuws Sitemap instellingen te verwijderen voor het "
650
- #~ "de-installeren."
651
-
652
- #~ msgid ""
653
- #~ "Automatically adjusts Priority according to relative age and comment "
654
- #~ "count."
655
- #~ msgstr ""
656
- #~ "Pas de Priority automatisch aan naar relatieve leeftijd en aantal "
657
- #~ "commentaren."
658
-
659
- #~ msgid "Google News Country"
660
- #~ msgstr "Google News Land"
661
-
662
- #~ msgid ""
663
- #~ "Only one allowed. Must be consistent with other Google News location "
664
- #~ "entities (if set)."
665
- #~ msgstr ""
666
- #~ "Slechts één toegestaan. Moet consistent zijn met de andere locatie-"
667
- #~ "entiteiten (indien ingevoerd)."
668
-
669
- #~ msgid "Google News State/Province"
670
- #~ msgstr "Google News Staat/Provincie"
671
-
672
- #~ msgid ""
673
- #~ "Please be aware that limiting by post category will rule out all custom "
674
- #~ "post types that do not use post categories, even if you selected them to "
675
- #~ "be included (above)."
676
- #~ msgstr ""
677
- #~ "Let op dat beperken tot bepaalde categorieën alle artikelen van "
678
- #~ "berichttypen die geen bericht-categorieën gebruiken, uitsluit zelfs als "
679
- #~ "je deze hebt geselecteerd voor bijsluiting (boven)."
680
-
681
- #~ msgid "Access (&lt;access&gt; tag)"
682
- #~ msgstr "Toegang (&lt;access&gt; tag)"
683
-
684
- #~ msgid ""
685
- #~ "Note: The &lt;access&gt; tag is required when applicable. Do not leave it "
686
- #~ "to Public when your content is not."
687
- #~ msgstr ""
688
- #~ "Let op: de &lt;access&gt; tag is verplicht wanneer van toepassing. Laat "
689
- #~ "het niet op Public als je inhoud "
690
-
691
- #~ msgid "Genres (&lt;genres&gt; tag)"
692
- #~ msgstr "Genres (&lt;genres&gt; tag)"
693
-
694
- #~ msgid ""
695
- #~ "Note: The &lt;genres&gt; tag is required when applicable and restricted "
696
- #~ "to the list provided above."
697
- #~ msgstr ""
698
- #~ "Let op: de &lt;genres&gt; tag is verplicht wanneer van toepassing en "
699
- #~ "gelimiteerd tot de bovenstaande lijst."
700
-
701
- #~ msgid "Topics (&lt;keywords&gt; tag)"
702
- #~ msgstr "Onderwerpen (&lt;keywords&gt; tag)"
703
-
704
- #~ msgid "Locations (&lt;geo_locations&gt; tag)"
705
- #~ msgstr "Locaties (&lt;geo_locations&gt; tag)"
706
-
707
- #~ msgid ""
708
- #~ "The &lt;geo_locations&gt; tag is used identify the geographic location of "
709
- #~ "your articles."
710
- #~ msgstr ""
711
- #~ "De &lt;geo_locations&gt; tag dient bij het bepalen van de geografische "
712
- #~ "locatie van je artikelen."
713
-
714
- #~ msgid "Default location:"
715
- #~ msgstr "Standaardlocatie:"
716
-
717
- #~ msgid ""
718
- #~ "You should list location entities from smallest entity to largest. For "
719
- #~ "example: <code>Detroit, Michigan, USA</code> or <code>Rhône-Alpes, "
720
- #~ "France</code>."
721
- #~ msgstr ""
722
- #~ "Locatie-eenheden dienen van kleinste naar grootste worden ingevoerd. "
723
- #~ "Bijvoorbeeld: <code>Detroit, Michigan, USA</code> of <code>Rhône-Alpes, "
724
- #~ "France</code>."
725
-
726
- #~ msgid "Ping on Publish"
727
- #~ msgstr "Ping bij Publiceren"
728
-
729
- #~ msgid "Disabling and reenabling the %s plugin will have the same effect."
730
- #~ msgstr "Uit- en weer inschakelen van de %s plugin heeft hetzelfde effect."
731
-
732
- #~ msgid "No categories found."
733
- #~ msgstr "Geen categoriën gevonden."
734
-
735
- #~ msgid ""
736
- #~ "XML Sitemaps will be disabled automatically when you check the option "
737
- #~ "%1$s at %2$s above."
738
- #~ msgstr ""
739
- #~ "XML Sitemaps worden automatisch uitgeschakeld als je de optie %1$s bij "
740
- #~ "%2$s aanvinkt."
741
-
742
- #~ msgid ""
743
- #~ "XML Sitemaps are disabled because you have checked the option %1$s at "
744
- #~ "%2$s above."
745
- #~ msgstr ""
746
- #~ "XML Sitemaps zijn uitgeschakeld omdat de optie %1$s bij %2$s aangevinkt "
747
- #~ "is."
748
-
749
- #~ msgid "Regular XML Sitemaps"
750
- #~ msgstr "Standaard XML Sitemaps"
751
-
752
- #~ msgid "View"
753
- #~ msgstr "Weergave"
754
-
755
- #~ msgid "Include:"
756
- #~ msgstr "Bijsluiten:"
757
-
758
- #~ msgid ""
759
- #~ "Only set when your site has been or will soon be accepted by Google News. "
760
- #~ "**"
761
- #~ msgstr ""
762
- #~ "Alleen als je site door Google News geaccepteerd is of zal worden. **"
763
-
764
- #~ msgid ""
765
- #~ "** Google recommends using a seperate news sitemap. You can do this by "
766
- #~ "checking the option %1$s at %2$s above."
767
- #~ msgstr ""
768
- #~ "** Google raadt het gebruik van een aparte news sitemap aan. Doe dit door "
769
- #~ "de optie %1$s bij %2$s hier boven aan te vinken."
770
-
771
- #~ msgid "Bing"
772
- #~ msgstr "Bing"
773
-
774
- #~ msgid "year of publication"
775
- #~ msgstr "jaar van publicatie"
776
-
777
- #~ msgid "month of publication"
778
- #~ msgstr "maand van publicatie"
779
-
780
- #~ msgid "Note:"
781
- #~ msgstr "Opmerking:"
782
-
783
- #~ msgid "year"
784
- #~ msgstr "jaar"
785
-
786
- #~ msgid "Divide by"
787
- #~ msgstr "Verdeel naar"
788
-
789
- #~ msgid "Maximum priority is reserved for sticky posts and the front page."
790
- #~ msgstr ""
791
- #~ "Maximale prioriteit is gereserveerd voor de homepagina en sticky posts."
792
-
793
- #~ msgid "Use a %s priority"
794
- #~ msgstr "Gebruik een %s prioriteit"
795
-
796
- #~ msgid "dynamic"
797
- #~ msgstr "dynamisch"
798
-
799
- #~ msgid "static"
800
- #~ msgstr "statisch"
801
-
802
- #~ msgid "with initial value %s"
803
- #~ msgstr "met beginwaarde %s"
804
-
805
- #~ msgid ""
806
- #~ "Dynamic priority is calculated by the initial value ajusted according to "
807
- #~ "the relative last modification age and comment count. Sticky posts always "
808
- #~ "get the maximum initial priority value of 1. A different priority can be "
809
- #~ "set on a post by post basis."
810
- #~ msgstr ""
811
- #~ "Dynamische prioriteit wordt berekend aan de hand van de beginwaarde, "
812
- #~ "aangepast aan de relatieve leeftijd van laatste bewerking en het aantal "
813
- #~ "commentaren. Sticky posts krijgen altijd de maximum beginwaarde van 1. "
814
- #~ "Een aangepaste prioriteit kan per artikel ingesteld worden."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-sr_RS.mo DELETED
Binary file
languages/xml-sitemap-feed-sr_RS.po DELETED
@@ -1,264 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-03-24 22:36+0100\n"
6
- "PO-Revision-Date: 2013-03-28 15:45+0100\n"
7
- "Last-Translator: Diana <diana@wpdiscounts.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e;_n\n"
13
- "X-Poedit-SourceCharset: UTF-8\n"
14
- "X-Generator: Poedit 1.5.3\n"
15
- "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
16
- "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
17
- "Language: sr_RS\n"
18
-
19
- #: ../includes/admin.php:15
20
- #, php-format
21
- msgid "Donate to keep the free %s plugin development & support going!"
22
- msgstr ""
23
- "Doniraj da bi se uspesno nastavilo besplatno razvijanje %s plagina i "
24
- "podrske! "
25
-
26
- #: ../includes/admin.php:15 ../includes/admin.php:237
27
- msgid "XML Sitemap & Google News Feeds"
28
- msgstr "XML Sitemap & Google News Feeds"
29
-
30
- #: ../includes/admin.php:15
31
- #, php-format
32
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
33
- msgstr ""
34
- "Ova podesavanje kontrolisu XML Sitemaps generisanje od strane %s plagina"
35
-
36
- #: ../includes/admin.php:16 ../includes/admin.php:147
37
- #: ../includes/admin.php:184 ../includes/admin.php:228
38
- #: ../includes/admin.php:237
39
- msgid "Note:"
40
- msgstr "Beleska:"
41
-
42
- #: ../includes/admin.php:16
43
- #, php-format
44
- msgid ""
45
- "XML Sitemaps will be disabled if you set the option %1$s (above) to %2$s."
46
- msgstr ""
47
- "XML Sitemaps ce biti onemogucene ukoliko podesite opciju %1$s (iznad) na "
48
- "%2$s."
49
-
50
- #: ../includes/admin.php:16
51
- msgid "Search Engine Visibility"
52
- msgstr "Vidljivost alata za pretragu"
53
-
54
- #: ../includes/admin.php:16
55
- msgid "Discourage search engines from indexing this site"
56
- msgstr "Obeshrabri alate za pretragu da indeksuju ovaj sajt"
57
-
58
- #: ../includes/admin.php:16
59
- #, php-format
60
- msgid ""
61
- "XML Sitemaps are disabled because you have set the option %1$s (above) to "
62
- "%2$s."
63
- msgstr ""
64
- "XML Sitemaps su onemoguceni sato sto ste podesili opciju %1$s (iznad) na %2$s"
65
-
66
- #: ../includes/admin.php:40 ../includes/admin.php:360
67
- msgid "XML Sitemaps"
68
- msgstr "XML Sitemaps"
69
-
70
- #: ../includes/admin.php:41
71
- msgid "Regular XML Sitemaps"
72
- msgstr "Regularne XML Sitemaps"
73
-
74
- #: ../includes/admin.php:43 ../includes/admin.php:49
75
- msgid "View"
76
- msgstr "Vidi"
77
-
78
- #: ../includes/admin.php:47
79
- msgid "Google News Sitemap"
80
- msgstr "Google Vesti Sitemap"
81
-
82
- #: ../includes/admin.php:59 ../includes/admin.php:369
83
- msgid "Include post types"
84
- msgstr "Ukljuci tipove postova"
85
-
86
- #: ../includes/admin.php:91 ../includes/admin.php:295
87
- #: ../includes/admin.php:329
88
- msgid "Settings"
89
- msgstr "Podesavanja"
90
-
91
- #: ../includes/admin.php:106
92
- msgid "year"
93
- msgstr "godina"
94
-
95
- #: ../includes/admin.php:107
96
- msgid "month"
97
- msgstr "mesec"
98
-
99
- #: ../includes/admin.php:111
100
- msgid "Divide by"
101
- msgstr "Podeli po"
102
-
103
- #: ../includes/admin.php:121
104
- msgid ""
105
- "Set division by year if you experience slow or blank sitemaps. In very rare "
106
- "cases, division by month is needed."
107
- msgstr ""
108
- "Podesite podelu po godini ukoliko se desavaju spore ili prazne sitemaps. U "
109
- "veoma retkim slucajevima, potrebna je podela po mesecima. "
110
-
111
- #: ../includes/admin.php:126 ../includes/admin.php:328
112
- msgid "Priority"
113
- msgstr "Prioritet"
114
-
115
- #: ../includes/admin.php:128
116
- msgid "Priority can be overridden on individual posts."
117
- msgstr "Prioritet moze biti zanemaren u individualnim postovima"
118
-
119
- #: ../includes/admin.php:128
120
- msgid ""
121
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
122
- "when allowed, posts with high comment count."
123
- msgstr ""
124
- "Maksimalni prioritet (1.0) je rezervisan za naslovnu stranicu, individualne "
125
- "postove i, kada je to dozvoljeno, za postove za velikim brojem komentara."
126
-
127
- #: ../includes/admin.php:133
128
- msgid ""
129
- "Automatically adjusts Priority according to relative age and comment count."
130
- msgstr ""
131
- "Automatski podesi prioritet prema relativnoj starosti i broju komentara"
132
-
133
- #: ../includes/admin.php:133
134
- msgid ""
135
- "Sticky posts will not be subject to reduction by age. Individual posts with "
136
- "fixed Priority will always keep that value."
137
- msgstr ""
138
- "Sticky postovi nede buti redukovani po starosti. Individualni postobi sa "
139
- "fiksiranim prioritetom ce uvek zadrzati tu vrednost. "
140
-
141
- #: ../includes/admin.php:138
142
- msgid "Update Lastmod and Changefreq on comments."
143
- msgstr "Azuriraj Lastmod i Changefreq u komentarima"
144
-
145
- #: ../includes/admin.php:138
146
- msgid ""
147
- "Set this if discussion on your site warrants reindexation upon each new "
148
- "comment."
149
- msgstr ""
150
- "Podesi ovo ukoliko diskusija na vasem sajtu garantuje reindeksaciju nakon "
151
- "svakog novog komentara."
152
-
153
- #: ../includes/admin.php:147
154
- msgid ""
155
- "Priority settings do not affect ranking in search results in any way. They "
156
- "are only meant to suggest search engines which URLs to index first. Once a "
157
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
158
- "updated."
159
- msgstr ""
160
- "Podesavanja prioriteta ne uticu na kotiranje u rezultatima pretrage na ni "
161
- "jedan nacin. Oni sluze samo da bi sugestirali alatima za pretragu koji URL "
162
- "najpre da indeksuju. Jednom kada je URL indeksovan, njegov prioritet postaje "
163
- "beznacajan sve dok Lastmod nije azuriran. "
164
-
165
- #: ../includes/admin.php:157 ../includes/admin.php:372
166
- msgid "Include taxonomies"
167
- msgstr "Ukljuci taksonomije"
168
-
169
- #: ../includes/admin.php:181
170
- msgid "No taxonomies available for the currently included post types."
171
- msgstr "Nema raspolozivih taksonomija za trenutno ukljucene tipove postova."
172
-
173
- #: ../includes/admin.php:184
174
- msgid ""
175
- "It is generally not recommended to include taxonomy pages, unless their "
176
- "content brings added value. For example, when you use category descriptions "
177
- "with information that is not present elsewhere on your site or if taxonomy "
178
- "pages list posts with an excerpt that is different from, but complementary "
179
- "to the post content. In these cases you might consider including certain "
180
- "taxonomies. Otherwise, you might even consider disallowing indexation by "
181
- "adding specific robots.txt rules below."
182
- msgstr ""
183
- "Generalno nije preporucljivo ukljucivati stranice taksonomije, osim ako "
184
- "njihov sadrzaj ne donosi dodatnu vrednost. Na primer, kada koristite opise "
185
- "kategorija sa informacijama koje nisu dostupne nigde drugo na vasem sajtu, "
186
- "ili ako stranica taksonomije postuje izvod koji je u drugacijoj formi, ali "
187
- "komplementarnoj sadrzaju posta. U ovim slucajevim, amozete razmotriti "
188
- "ukljucivanje odredjenih taksonomija. U suprotnom, mozete can razmotriti "
189
- "onemogucavanje indeksacije tako sto cete dodati odredjena robot.txt pravila "
190
- "ispod. "
191
-
192
- #: ../includes/admin.php:194
193
- msgid "Google"
194
- msgstr "Google"
195
-
196
- #: ../includes/admin.php:195
197
- msgid "Bing"
198
- msgstr "Bing"
199
-
200
- #: ../includes/admin.php:199 ../includes/admin.php:375
201
- msgid "Ping on Publish"
202
- msgstr "Pink pri objavi "
203
-
204
- #: ../includes/admin.php:218
205
- #, php-format
206
- msgid "Successfully pinged for %1$s on %2$s GMT."
207
- msgstr "Uspesno pingovan za %1$s na %2$s GMT."
208
-
209
- #: ../includes/admin.php:227
210
- #, php-format
211
- msgid "Rules to append to the %s generated by WordPress."
212
- msgstr "Pravila za dodavanje na %s generisano od strane WordPress-a"
213
-
214
- #: ../includes/admin.php:228
215
- msgid ""
216
- "Only add rules here when you know what you are doing, otherwise you might "
217
- "break search engine access to your site."
218
- msgstr ""
219
- "Dodajte pravila ovde samo ukoliko znate sta radite, u suprotnom mozete "
220
- "prekinuti pristum alata za pretragu vasem sajtu."
221
-
222
- #: ../includes/admin.php:228
223
- msgid ""
224
- "These rules will not have effect when you are using a static robots.txt file."
225
- msgstr ""
226
- "Ova pravila nece imati efekta kada budete koristili staticni robots.txt fajl"
227
-
228
- #: ../includes/admin.php:235
229
- msgid ""
230
- "Clear all XML Sitemap Feed options from the database and start fresh with "
231
- "the default settings."
232
- msgstr ""
233
- "Izbrisi sve XML Sitemap Feed opcije iz baze podataka i zapocni ponovo sa "
234
- "standardnim podesavanjima"
235
-
236
- #: ../includes/admin.php:237
237
- #, php-format
238
- msgid "Disabling and reenabling the %s plugin will have the same effect."
239
- msgstr "Onemigucavanje i ponovno omogucavanje %s plagina ce imati isti efekat."
240
-
241
- #: ../includes/admin.php:311
242
- msgid "XML Sitemap"
243
- msgstr "XML Sitemap"
244
-
245
- #: ../includes/admin.php:329
246
- #, php-format
247
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
248
- msgstr "Ostavi prazno za automatsk prioritet konfigurisan na %1$s > %2$s."
249
-
250
- #: ../includes/admin.php:329
251
- msgid "Reading"
252
- msgstr "Citanje"
253
-
254
- #: ../includes/admin.php:363
255
- msgid "Enable XML sitemaps"
256
- msgstr "Omoguci XML Sitemaps"
257
-
258
- #: ../includes/admin.php:381
259
- msgid "Additional robots.txt rules"
260
- msgstr "Dodatna robots.txt pravila"
261
-
262
- #: ../includes/admin.php:384
263
- msgid "Reset XML sitemaps"
264
- msgstr "Resetuj XML Sitemaps"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-ua_UA.mo DELETED
Binary file
languages/xml-sitemap-feed-ua_UA.po DELETED
@@ -1,86 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-02-22 16:43+0100\n"
6
- "PO-Revision-Date: 2013-03-07 12:22+0200\n"
7
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
- "Language-Team: cmd soft <tmosbyd@gmail.com>\n"
9
- "Language: ua_UA\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e;_n\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.5.5\n"
16
-
17
- #: ../includes/admin.php:15
18
- msgid ""
19
- "Donate to keep the free XML Sitemap Feeds plugin development & support going!"
20
- msgstr ""
21
- "Пожертвувати тримати вільні XML Sitemap Стрічки розвитку та підтримки "
22
- "плагінів збираюся!"
23
-
24
- #: ../includes/admin.php:15
25
- msgid "These settings control the XML Sitemap generation."
26
- msgstr "Ці параметри керують XML покоління Sitemap."
27
-
28
- #: ../includes/admin.php:15
29
- #, php-format
30
- msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
31
- msgstr "XML Sitemaps відключаються, якщо ви встановите опцію %s (Вище) %s."
32
-
33
- #: ../includes/admin.php:15
34
- msgid "Site Visibility"
35
- msgstr "Видимість сайту"
36
-
37
- #: ../includes/admin.php:15
38
- msgid "Discourage search engines from indexing this site"
39
- msgstr "Перешкоджати пошуковики індексувати цей сайт"
40
-
41
- #: ../includes/admin.php:39
42
- msgid "Regular XML Sitemaps"
43
- msgstr "Регулярні XML мапи сайту"
44
-
45
- #: ../includes/admin.php:41 ../includes/admin.php:47
46
- msgid "View"
47
- msgstr "Бачити"
48
-
49
- #: ../includes/admin.php:45
50
- msgid "Google News Sitemap"
51
- msgstr "Новини Google Sitemap"
52
-
53
- #: ../includes/admin.php:123
54
- #, php-format
55
- msgid "Rules to append to %s generated by WordPress."
56
- msgstr "Правила для додавання до %s породжених WordPress."
57
-
58
- #: ../includes/admin.php:123
59
- msgid ""
60
- "Warning: Only set rules here when you know what you are doing, otherwise you "
61
- "might break access to your site.<br />Note: These rules will not have effect "
62
- "when you are using a static robots.txt file."
63
- msgstr ""
64
- "Увага: тільки встановлювати правила тут, коли ви знаєте, що робите, інакше "
65
- "ви можете порушити доступ до вашого сайту.<br />Примітка: Ці правила не "
66
- "матимуть ефекту, якщо ви використовуєте статичний файл robots.txt."
67
-
68
- #: ../includes/admin.php:185
69
- msgid "XML Sitemaps"
70
- msgstr "XML Sitemaps"
71
-
72
- #: ../includes/admin.php:188
73
- msgid "Enable XML sitemaps"
74
- msgstr "Включення XML карти сайту"
75
-
76
- #: ../includes/admin.php:191
77
- msgid "Include post types"
78
- msgstr "Включіть повідомлення типу"
79
-
80
- #: ../includes/admin.php:194
81
- msgid "Include taxonomies"
82
- msgstr "Включіть таксономії"
83
-
84
- #: ../includes/admin.php:201
85
- msgid "Additional robots.txt rules"
86
- msgstr "Додаткові правила robots.txt"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed-xx_XX.po DELETED
@@ -1,539 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: XML Sitemap and Google News feeds/4.4\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-05-06 02:07+0200\n"
6
- "PO-Revision-Date: 2016-05-06 02:07+0200\n"
7
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
- "Language-Team: \n"
9
- "Language: xx\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e;_n\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.8.7.1\n"
16
-
17
- #: ../includes/class-xmlsitemapfeed-admin.php:23
18
- msgid "XML Sitemaps"
19
- msgstr ""
20
-
21
- #: ../includes/class-xmlsitemapfeed-admin.php:24
22
- msgid "XML Sitemap Index"
23
- msgstr ""
24
-
25
- #: ../includes/class-xmlsitemapfeed-admin.php:29
26
- #: ../includes/class-xmlsitemapfeed-admin.php:1010
27
- msgid "Google News Sitemap"
28
- msgstr ""
29
-
30
- #: ../includes/class-xmlsitemapfeed-admin.php:73
31
- msgid "Google"
32
- msgstr ""
33
-
34
- #: ../includes/class-xmlsitemapfeed-admin.php:76
35
- msgid "Bing & Yahoo"
36
- msgstr ""
37
-
38
- #: ../includes/class-xmlsitemapfeed-admin.php:79
39
- msgid "Yandex"
40
- msgstr ""
41
-
42
- #: ../includes/class-xmlsitemapfeed-admin.php:82
43
- msgid "Baidu"
44
- msgstr ""
45
-
46
- #: ../includes/class-xmlsitemapfeed-admin.php:85
47
- msgid "Ping-O-Matic"
48
- msgstr ""
49
-
50
- #: ../includes/class-xmlsitemapfeed-admin.php:140
51
- #, php-format
52
- msgid "Successfully sent %1$s on %2$s."
53
- msgstr ""
54
-
55
- #: ../includes/class-xmlsitemapfeed-admin.php:201
56
- #: ../includes/class-xmlsitemapfeed-admin.php:392
57
- #: ../includes/class-xmlsitemapfeed-admin.php:995
58
- msgid "Additional robots.txt rules"
59
- msgstr ""
60
-
61
- #: ../includes/class-xmlsitemapfeed-admin.php:202
62
- #, php-format
63
- msgid "Rules that will be appended to the %s generated by WordPress:"
64
- msgstr ""
65
-
66
- #: ../includes/class-xmlsitemapfeed-admin.php:203
67
- msgid ""
68
- "These rules will not have effect when you are using a static robots.txt file."
69
- msgstr ""
70
-
71
- #: ../includes/class-xmlsitemapfeed-admin.php:203
72
- msgid ""
73
- "Only add rules here when you know what you are doing, otherwise you might "
74
- "break search engine access to your site."
75
- msgstr ""
76
-
77
- #: ../includes/class-xmlsitemapfeed-admin.php:209
78
- #: ../includes/class-xmlsitemapfeed-admin.php:1005
79
- msgid "Reset XML sitemaps"
80
- msgstr ""
81
-
82
- #: ../includes/class-xmlsitemapfeed-admin.php:211
83
- msgid ""
84
- "Selecting this will clear all XML Sitemap & Google News Sitemap settings "
85
- "after Save Changes. Are you sure?"
86
- msgstr ""
87
-
88
- #: ../includes/class-xmlsitemapfeed-admin.php:212
89
- msgid "Clear all XML Sitemap & Google News Sitemap settings."
90
- msgstr ""
91
-
92
- #: ../includes/class-xmlsitemapfeed-admin.php:215
93
- msgid ""
94
- "Check this option and Save Changes to start fresh with the default settings."
95
- msgstr ""
96
-
97
- #: ../includes/class-xmlsitemapfeed-admin.php:224
98
- #: ../includes/class-xmlsitemapfeed-admin.php:225
99
- #: ../includes/class-xmlsitemapfeed-admin.php:462
100
- #: ../includes/class-xmlsitemapfeed-admin.php:463
101
- #, php-format
102
- msgid "Donate to keep the free %s plugin development & support going!"
103
- msgstr ""
104
-
105
- #: ../includes/class-xmlsitemapfeed-admin.php:224
106
- #: ../includes/class-xmlsitemapfeed-admin.php:225
107
- #: ../includes/class-xmlsitemapfeed-admin.php:226
108
- #: ../includes/class-xmlsitemapfeed-admin.php:462
109
- #: ../includes/class-xmlsitemapfeed-admin.php:463
110
- #: ../includes/class-xmlsitemapfeed-admin.php:464
111
- msgid "XML Sitemap & Google News Feeds"
112
- msgstr ""
113
-
114
- #: ../includes/class-xmlsitemapfeed-admin.php:226
115
- #, php-format
116
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
117
- msgstr ""
118
-
119
- #: ../includes/class-xmlsitemapfeed-admin.php:227
120
- #: ../includes/class-xmlsitemapfeed-admin.php:467
121
- #, php-format
122
- msgid "For ping options, go to %s."
123
- msgstr ""
124
-
125
- #: ../includes/class-xmlsitemapfeed-admin.php:240
126
- msgid "XML Sitemaps for post types"
127
- msgstr ""
128
-
129
- #: ../includes/class-xmlsitemapfeed-admin.php:279
130
- msgid "Year"
131
- msgstr ""
132
-
133
- #: ../includes/class-xmlsitemapfeed-admin.php:280
134
- msgid "Month"
135
- msgstr ""
136
-
137
- #: ../includes/class-xmlsitemapfeed-admin.php:284
138
- msgid "Split by"
139
- msgstr ""
140
-
141
- #: ../includes/class-xmlsitemapfeed-admin.php:294
142
- msgid ""
143
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
144
- "split by month is needed."
145
- msgstr ""
146
-
147
- #: ../includes/class-xmlsitemapfeed-admin.php:299
148
- #: ../includes/class-xmlsitemapfeed-admin.php:884
149
- msgid "Priority"
150
- msgstr ""
151
-
152
- #: ../includes/class-xmlsitemapfeed-admin.php:301
153
- msgid "Priority can be overridden on individual posts."
154
- msgstr ""
155
-
156
- #: ../includes/class-xmlsitemapfeed-admin.php:306
157
- msgid "Automatic Priority calculation."
158
- msgstr ""
159
-
160
- #: ../includes/class-xmlsitemapfeed-admin.php:306
161
- msgid ""
162
- "Adjusts the Priority based on factors like age, comments, sticky post or "
163
- "blog page. Individual posts with fixed Priority will always keep that value."
164
- msgstr ""
165
-
166
- #: ../includes/class-xmlsitemapfeed-admin.php:311
167
- msgid "Update Lastmod and Changefreq on comments."
168
- msgstr ""
169
-
170
- #: ../includes/class-xmlsitemapfeed-admin.php:311
171
- msgid ""
172
- "Set this if discussion on your site warrants reindexation upon each new "
173
- "comment."
174
- msgstr ""
175
-
176
- #: ../includes/class-xmlsitemapfeed-admin.php:315
177
- #: ../includes/class-xmlsitemapfeed-admin.php:582
178
- msgid "Add image tags for"
179
- msgstr ""
180
-
181
- #: ../includes/class-xmlsitemapfeed-admin.php:323
182
- #: ../includes/class-xmlsitemapfeed-admin.php:589
183
- msgid "Attached images"
184
- msgstr ""
185
-
186
- #: ../includes/class-xmlsitemapfeed-admin.php:333
187
- msgid ""
188
- "Priority settings do not affect ranking in search results in any way. They "
189
- "are only meant to suggest search engines which URLs to index first. Once a "
190
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
191
- "updated."
192
- msgstr ""
193
-
194
- #: ../includes/class-xmlsitemapfeed-admin.php:334
195
- msgid ""
196
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
197
- "when allowed, posts with high comment count."
198
- msgstr ""
199
-
200
- #: ../includes/class-xmlsitemapfeed-admin.php:334
201
- msgid ""
202
- "Priority values are taken as relative values. Setting all to the same (high) "
203
- "value is pointless."
204
- msgstr ""
205
-
206
- #: ../includes/class-xmlsitemapfeed-admin.php:384
207
- msgid "XML Sitemaps for taxonomies"
208
- msgstr ""
209
-
210
- #: ../includes/class-xmlsitemapfeed-admin.php:390
211
- msgid ""
212
- "It is generally not recommended to include taxonomy pages, unless their "
213
- "content brings added value."
214
- msgstr ""
215
-
216
- #: ../includes/class-xmlsitemapfeed-admin.php:391
217
- msgid ""
218
- "For example, when you use category descriptions with information that is not "
219
- "present elsewhere on your site or if taxonomy pages list posts with an "
220
- "excerpt that is different from, but complementary to the post content. In "
221
- "these cases you might consider including certain taxonomies. Otherwise, if "
222
- "you fear <a href=\"http://moz.com/learn/seo/duplicate-content\">negative "
223
- "affects of duplicate content</a> or PageRank spread, you might even consider "
224
- "disallowing indexation of taxonomies."
225
- msgstr ""
226
-
227
- #: ../includes/class-xmlsitemapfeed-admin.php:392
228
- #, php-format
229
- msgid ""
230
- "You can do this by adding specific robots.txt rules in the %s field above."
231
- msgstr ""
232
-
233
- #: ../includes/class-xmlsitemapfeed-admin.php:407
234
- msgid "No taxonomies available for the currently included post types."
235
- msgstr ""
236
-
237
- #: ../includes/class-xmlsitemapfeed-admin.php:415
238
- #: ../includes/class-xmlsitemapfeed-admin.php:1039
239
- msgid "Include custom XML Sitemaps"
240
- msgstr ""
241
-
242
- #: ../includes/class-xmlsitemapfeed-admin.php:416
243
- msgid "Additional XML Sitemaps to append to the main XML Sitemap Index:"
244
- msgstr ""
245
-
246
- #: ../includes/class-xmlsitemapfeed-admin.php:418
247
- msgid ""
248
- "Add the full URL, including protocol (http/https) and domain, of any XML "
249
- "Sitemap that you want to append to the Sitemap Index. Start each URL on a "
250
- "new line."
251
- msgstr ""
252
-
253
- #: ../includes/class-xmlsitemapfeed-admin.php:418
254
- msgid ""
255
- "Only valid sitemaps are allowed in the Sitemap Index. Use your Google/Bing "
256
- "Webmaster Tools to verify!"
257
- msgstr ""
258
-
259
- #: ../includes/class-xmlsitemapfeed-admin.php:435
260
- #: ../includes/class-xmlsitemapfeed-admin.php:1036
261
- msgid "Include custom URLs"
262
- msgstr ""
263
-
264
- #: ../includes/class-xmlsitemapfeed-admin.php:436
265
- msgid "Additional URLs to append in an extra XML Sitemap:"
266
- msgstr ""
267
-
268
- #: ../includes/class-xmlsitemapfeed-admin.php:438
269
- msgid ""
270
- "Add the full URL, including protocol (http/https) and domain, of any "
271
- "(static) page that you want to append to the ones already included by "
272
- "WordPress. Optionally add a priority value between 0 and 1, separated with a "
273
- "space after the URL. Start each URL on a new line."
274
- msgstr ""
275
-
276
- #: ../includes/class-xmlsitemapfeed-admin.php:448
277
- #: ../includes/class-xmlsitemapfeed-admin.php:1033
278
- msgid "Allowed domains"
279
- msgstr ""
280
-
281
- #: ../includes/class-xmlsitemapfeed-admin.php:449
282
- msgid "Additional domains to allow in the XML Sitemaps:"
283
- msgstr ""
284
-
285
- #: ../includes/class-xmlsitemapfeed-admin.php:450
286
- #, php-format
287
- msgid ""
288
- "By default, only the domain %s as used in your WordPress site address is "
289
- "allowed. This means that all URLs that use another domain (custom URLs or "
290
- "using a plugin like Page Links To) are filtered from the XML Sitemap. "
291
- "However, if you are the verified owner of other domains in your Google/Bing "
292
- "Webmaster Tools account, you can include these in the same sitemap. Add "
293
- "these domains, without protocol (http/https) each on a new line. Note that "
294
- "if you enter a domain with www, all URLs without it or with other subdomains "
295
- "will be filtered."
296
- msgstr ""
297
-
298
- #: ../includes/class-xmlsitemapfeed-admin.php:464
299
- #, php-format
300
- msgid ""
301
- "These settings control the Google News Sitemap generated by the %s plugin."
302
- msgstr ""
303
-
304
- #: ../includes/class-xmlsitemapfeed-admin.php:465
305
- msgid ""
306
- "When you are done configuring and preparing your news content and you are "
307
- "convinced your site adheres to the <a href=\"https://support.google.com/news/"
308
- "publisher/answer/40787\" target=\"_blank\">Google News guidelines</a>, go "
309
- "ahead and <a href=\"https://partnerdash.google.com/partnerdash/d/news\" "
310
- "target=\"_blank\">submit your site for inclusion</a>!"
311
- msgstr ""
312
-
313
- #: ../includes/class-xmlsitemapfeed-admin.php:466
314
- msgid ""
315
- "It is strongly recommended to submit your news sitemap to your Google "
316
- "Webmasters Tools account to monitor for warnings or errors. Read more on how "
317
- "to <a href=\"https://support.google.com/webmasters/answer/183669\" target="
318
- "\"_blank\">Manage sitemaps with the Sitemaps page</a>."
319
- msgstr ""
320
-
321
- #: ../includes/class-xmlsitemapfeed-admin.php:477
322
- #: ../includes/class-xmlsitemapfeed-admin.php:1013
323
- msgid "Publication name"
324
- msgstr ""
325
-
326
- #: ../includes/class-xmlsitemapfeed-admin.php:478
327
- #, php-format
328
- msgid "By default, the general %s setting will be used."
329
- msgstr ""
330
-
331
- #: ../includes/class-xmlsitemapfeed-admin.php:479
332
- msgid ""
333
- "The publication name should match the name submitted on the Google News "
334
- "Publisher Center. If you wish to change it, please read <a href=\"https://"
335
- "support.google.com/news/publisher/answer/40402\" target=\"_blank\">Updated "
336
- "publication name</a>."
337
- msgstr ""
338
-
339
- #: ../includes/class-xmlsitemapfeed-admin.php:496
340
- msgid ""
341
- "Error: There where no valid post types found. Without at least one public "
342
- "post type, a Google News Sitemap cannot be created by this plugin. Please "
343
- "deselect the option Google News Sitemap at <a href=\"#xmlsf_sitemaps"
344
- "\">Enable XML sitemaps</a> and choose another method."
345
- msgstr ""
346
-
347
- #: ../includes/class-xmlsitemapfeed-admin.php:499
348
- #: ../includes/class-xmlsitemapfeed-admin.php:1014
349
- #: ../includes/class-xmlsitemapfeed-admin.php:1027
350
- msgid "Include post types"
351
- msgstr ""
352
-
353
- #: ../includes/class-xmlsitemapfeed-admin.php:525
354
- #, php-format
355
- msgid ""
356
- "At least one post type must be selected. By default, the post type %s will "
357
- "be used."
358
- msgstr ""
359
-
360
- #: ../includes/class-xmlsitemapfeed-admin.php:536
361
- #, php-format
362
- msgid ""
363
- "Selection based on categories will be available when <strong>only</strong> "
364
- "the post type %s is included above."
365
- msgstr ""
366
-
367
- #: ../includes/class-xmlsitemapfeed-admin.php:554
368
- msgid "Limit to posts in these post categories:"
369
- msgstr ""
370
-
371
- #: ../includes/class-xmlsitemapfeed-admin.php:570
372
- msgid ""
373
- "If you wish to limit posts that will feature in your News Sitemap to certain "
374
- "categories, select them here. If no categories are selected, posts of all "
375
- "categories will be included in your News Sitemap."
376
- msgstr ""
377
-
378
- #: ../includes/class-xmlsitemapfeed-admin.php:570
379
- #: ../includes/class-xmlsitemapfeed-admin.php:650
380
- msgid "Use the Ctrl/Cmd key plus click to select more than one or to deselect."
381
- msgstr ""
382
-
383
- #: ../includes/class-xmlsitemapfeed-admin.php:592
384
- msgid ""
385
- "Note: Google News prefers at most one image per article in the News Sitemap. "
386
- "If multiple valid images are specified, the crawler will have to pick one "
387
- "arbitrarily. Images in News Sitemaps should be in jpeg or png format."
388
- msgstr ""
389
-
390
- #: ../includes/class-xmlsitemapfeed-admin.php:592
391
- #: ../includes/class-xmlsitemapfeed-admin.php:599
392
- msgid "More information&hellip;"
393
- msgstr ""
394
-
395
- #: ../includes/class-xmlsitemapfeed-admin.php:598
396
- #: ../includes/class-xmlsitemapfeed-admin.php:1017
397
- msgid "Source labels"
398
- msgstr ""
399
-
400
- #: ../includes/class-xmlsitemapfeed-admin.php:599
401
- #, php-format
402
- msgid ""
403
- "You can use the %1$s and %2$s tags to provide Google more information about "
404
- "the content of your articles."
405
- msgstr ""
406
-
407
- #: ../includes/class-xmlsitemapfeed-admin.php:611
408
- #, php-format
409
- msgid ""
410
- "The %4$s tag specifies whether an article is available to all readers "
411
- "(%1$s), or only to those with a free (%2$s) or paid membership (%3$s) to "
412
- "your site."
413
- msgstr ""
414
-
415
- #: ../includes/class-xmlsitemapfeed-admin.php:611
416
- #: ../includes/class-xmlsitemapfeed-admin.php:931
417
- msgid "Registration"
418
- msgstr ""
419
-
420
- #: ../includes/class-xmlsitemapfeed-admin.php:611
421
- #: ../includes/class-xmlsitemapfeed-admin.php:932
422
- msgid "Subscription"
423
- msgstr ""
424
-
425
- #: ../includes/class-xmlsitemapfeed-admin.php:612
426
- msgid "You can assign a different access level when writing a post."
427
- msgstr ""
428
-
429
- #: ../includes/class-xmlsitemapfeed-admin.php:616
430
- msgid "Tag normal posts as"
431
- msgstr ""
432
-
433
- #: ../includes/class-xmlsitemapfeed-admin.php:618
434
- #: ../includes/class-xmlsitemapfeed-admin.php:623
435
- msgid "Free registration"
436
- msgstr ""
437
-
438
- #: ../includes/class-xmlsitemapfeed-admin.php:619
439
- #: ../includes/class-xmlsitemapfeed-admin.php:624
440
- msgid "Paid subscription"
441
- msgstr ""
442
-
443
- #: ../includes/class-xmlsitemapfeed-admin.php:622
444
- msgid "Tag Password Protected posts as"
445
- msgstr ""
446
-
447
- #: ../includes/class-xmlsitemapfeed-admin.php:637
448
- #, php-format
449
- msgid ""
450
- "The %s tag specifies one or more properties for an article, namely, whether "
451
- "it is a press release, a blog post, an opinion, an op-ed piece, user-"
452
- "generated content, or satire."
453
- msgstr ""
454
-
455
- #: ../includes/class-xmlsitemapfeed-admin.php:637
456
- msgid "You can assign different genres when writing a post."
457
- msgstr ""
458
-
459
- #: ../includes/class-xmlsitemapfeed-admin.php:641
460
- msgid "Default genre:"
461
- msgstr ""
462
-
463
- #: ../includes/class-xmlsitemapfeed-admin.php:650
464
- #, php-format
465
- msgid "Read more about source labels on %s"
466
- msgstr ""
467
-
468
- #: ../includes/class-xmlsitemapfeed-admin.php:650
469
- msgid "What does each source label mean?"
470
- msgstr ""
471
-
472
- #: ../includes/class-xmlsitemapfeed-admin.php:659
473
- #, php-format
474
- msgid ""
475
- "The %s tag is used to help classify the articles you submit to Google News "
476
- "by <strong>topic</strong>."
477
- msgstr ""
478
-
479
- #: ../includes/class-xmlsitemapfeed-admin.php:661
480
- #, php-format
481
- msgid "Use %s for topics."
482
- msgstr ""
483
-
484
- #: ../includes/class-xmlsitemapfeed-admin.php:668
485
- msgid "Default topic(s):"
486
- msgstr ""
487
-
488
- #: ../includes/class-xmlsitemapfeed-admin.php:670
489
- msgid "Separate with a comma."
490
- msgstr ""
491
-
492
- #: ../includes/class-xmlsitemapfeed-admin.php:674
493
- msgid ""
494
- "Keywords may be drawn from, but are not limited to, the list of <a href="
495
- "\"https://support.google.com/news/publisher/answer/116037\" target=\"_blank"
496
- "\">existing Google News keywords</a>."
497
- msgstr ""
498
-
499
- #: ../includes/class-xmlsitemapfeed-admin.php:851
500
- #: ../includes/class-xmlsitemapfeed-admin.php:1024
501
- msgid "XML Sitemap"
502
- msgstr ""
503
-
504
- #: ../includes/class-xmlsitemapfeed-admin.php:886
505
- #, php-format
506
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
507
- msgstr ""
508
-
509
- #: ../includes/class-xmlsitemapfeed-admin.php:890
510
- msgid "Exclude from XML Sitemap"
511
- msgstr ""
512
-
513
- #: ../includes/class-xmlsitemapfeed-admin.php:902
514
- msgid "Google News"
515
- msgstr ""
516
-
517
- #: ../includes/class-xmlsitemapfeed-admin.php:927
518
- msgid "Access"
519
- msgstr ""
520
-
521
- #: ../includes/class-xmlsitemapfeed-admin.php:936
522
- msgid "Exclude from Google News Sitemap."
523
- msgstr ""
524
-
525
- #: ../includes/class-xmlsitemapfeed-admin.php:988
526
- msgid "Enable XML sitemaps"
527
- msgstr ""
528
-
529
- #: ../includes/class-xmlsitemapfeed-admin.php:1030
530
- msgid "Include taxonomies"
531
- msgstr ""
532
-
533
- #: ../includes/class-xmlsitemapfeed.php:1318
534
- msgid "Google News Genres"
535
- msgstr ""
536
-
537
- #: ../includes/class-xmlsitemapfeed.php:1319
538
- msgid "Google News Genre"
539
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/xml-sitemap-feed.pot DELETED
@@ -1,544 +0,0 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Project-Id-Version: XML Sitemap and Google News feeds/4.4\n"
5
- "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2017-04-20 00:39+0200\n"
7
- "PO-Revision-Date: 2015-01-05 04:05+0100\n"
8
- "Last-Translator: RavanH <ravanhagen@gmail.com>\n"
9
- "Language-Team: ravanhagen@gmail.com\n"
10
- "Language: en\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-KeywordsList: __;_e;_nx;_x\n"
15
- "X-Poedit-Basepath: ..\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Generator: Poedit 1.8.9\n"
18
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
- "X-Poedit-SearchPath-1: includes\n"
21
-
22
- #: includes/class-xmlsitemapfeed-admin.php:23
23
- msgid "XML Sitemaps"
24
- msgstr ""
25
-
26
- #: includes/class-xmlsitemapfeed-admin.php:24
27
- msgid "XML Sitemap Index"
28
- msgstr ""
29
-
30
- #: includes/class-xmlsitemapfeed-admin.php:29
31
- #: includes/class-xmlsitemapfeed-admin.php:1027
32
- msgid "Google News Sitemap"
33
- msgstr ""
34
-
35
- #: includes/class-xmlsitemapfeed-admin.php:73
36
- msgid "Google"
37
- msgstr ""
38
-
39
- #: includes/class-xmlsitemapfeed-admin.php:76
40
- msgid "Bing & Yahoo"
41
- msgstr ""
42
-
43
- #: includes/class-xmlsitemapfeed-admin.php:79
44
- msgid "Yandex"
45
- msgstr ""
46
-
47
- #: includes/class-xmlsitemapfeed-admin.php:82
48
- msgid "Baidu"
49
- msgstr ""
50
-
51
- #: includes/class-xmlsitemapfeed-admin.php:85
52
- msgid "Ping-O-Matic"
53
- msgstr ""
54
-
55
- #: includes/class-xmlsitemapfeed-admin.php:140
56
- #, php-format
57
- msgid "Successfully sent %1$s on %2$s."
58
- msgstr ""
59
-
60
- #: includes/class-xmlsitemapfeed-admin.php:201
61
- #: includes/class-xmlsitemapfeed-admin.php:392
62
- #: includes/class-xmlsitemapfeed-admin.php:1012
63
- msgid "Additional robots.txt rules"
64
- msgstr ""
65
-
66
- #: includes/class-xmlsitemapfeed-admin.php:202
67
- #, php-format
68
- msgid "Rules that will be appended to the %s generated by WordPress:"
69
- msgstr ""
70
-
71
- #: includes/class-xmlsitemapfeed-admin.php:203
72
- msgid ""
73
- "These rules will not have effect when you are using a static robots.txt file."
74
- msgstr ""
75
-
76
- #: includes/class-xmlsitemapfeed-admin.php:203
77
- msgid ""
78
- "Only add rules here when you know what you are doing, otherwise you might "
79
- "break search engine access to your site."
80
- msgstr ""
81
-
82
- #: includes/class-xmlsitemapfeed-admin.php:209
83
- #: includes/class-xmlsitemapfeed-admin.php:1022
84
- msgid "Reset XML sitemaps"
85
- msgstr ""
86
-
87
- #: includes/class-xmlsitemapfeed-admin.php:211
88
- msgid ""
89
- "Selecting this will clear all XML Sitemap & Google News Sitemap settings "
90
- "after Save Changes. Are you sure?"
91
- msgstr ""
92
-
93
- #: includes/class-xmlsitemapfeed-admin.php:212
94
- msgid "Clear all XML Sitemap & Google News Sitemap settings."
95
- msgstr ""
96
-
97
- #: includes/class-xmlsitemapfeed-admin.php:215
98
- msgid ""
99
- "Check this option and Save Changes to start fresh with the default settings."
100
- msgstr ""
101
-
102
- #: includes/class-xmlsitemapfeed-admin.php:224
103
- #: includes/class-xmlsitemapfeed-admin.php:225
104
- #: includes/class-xmlsitemapfeed-admin.php:462
105
- #: includes/class-xmlsitemapfeed-admin.php:463
106
- #, php-format
107
- msgid "Donate to keep the free %s plugin development & support going!"
108
- msgstr ""
109
-
110
- #: includes/class-xmlsitemapfeed-admin.php:224
111
- #: includes/class-xmlsitemapfeed-admin.php:225
112
- #: includes/class-xmlsitemapfeed-admin.php:226
113
- #: includes/class-xmlsitemapfeed-admin.php:462
114
- #: includes/class-xmlsitemapfeed-admin.php:463
115
- #: includes/class-xmlsitemapfeed-admin.php:464
116
- msgid "XML Sitemap & Google News Feeds"
117
- msgstr ""
118
-
119
- #: includes/class-xmlsitemapfeed-admin.php:226
120
- #, php-format
121
- msgid "These settings control the XML Sitemaps generated by the %s plugin."
122
- msgstr ""
123
-
124
- #: includes/class-xmlsitemapfeed-admin.php:227
125
- #: includes/class-xmlsitemapfeed-admin.php:467
126
- #, php-format
127
- msgid "For ping options, go to %s."
128
- msgstr ""
129
-
130
- #: includes/class-xmlsitemapfeed-admin.php:240
131
- msgid "XML Sitemaps for post types"
132
- msgstr ""
133
-
134
- #: includes/class-xmlsitemapfeed-admin.php:279
135
- msgid "Year"
136
- msgstr ""
137
-
138
- #: includes/class-xmlsitemapfeed-admin.php:280
139
- msgid "Month"
140
- msgstr ""
141
-
142
- #: includes/class-xmlsitemapfeed-admin.php:284
143
- msgid "Split by"
144
- msgstr ""
145
-
146
- #: includes/class-xmlsitemapfeed-admin.php:294
147
- msgid ""
148
- "Split by year if you experience errors or slow sitemaps. In very rare cases, "
149
- "split by month is needed."
150
- msgstr ""
151
-
152
- #: includes/class-xmlsitemapfeed-admin.php:299
153
- #: includes/class-xmlsitemapfeed-admin.php:901
154
- msgid "Priority"
155
- msgstr ""
156
-
157
- #: includes/class-xmlsitemapfeed-admin.php:301
158
- msgid "Priority can be overridden on individual posts."
159
- msgstr ""
160
-
161
- #: includes/class-xmlsitemapfeed-admin.php:306
162
- msgid "Automatic Priority calculation."
163
- msgstr ""
164
-
165
- #: includes/class-xmlsitemapfeed-admin.php:306
166
- msgid ""
167
- "Adjusts the Priority based on factors like age, comments, sticky post or "
168
- "blog page. Individual posts with fixed Priority will always keep that value."
169
- msgstr ""
170
-
171
- #: includes/class-xmlsitemapfeed-admin.php:311
172
- msgid "Update Lastmod and Changefreq on comments."
173
- msgstr ""
174
-
175
- #: includes/class-xmlsitemapfeed-admin.php:311
176
- msgid ""
177
- "Set this if discussion on your site warrants reindexation upon each new "
178
- "comment."
179
- msgstr ""
180
-
181
- #: includes/class-xmlsitemapfeed-admin.php:315
182
- #: includes/class-xmlsitemapfeed-admin.php:582
183
- msgid "Add image tags for"
184
- msgstr ""
185
-
186
- #: includes/class-xmlsitemapfeed-admin.php:323
187
- #: includes/class-xmlsitemapfeed-admin.php:589
188
- msgid "Attached images"
189
- msgstr ""
190
-
191
- #: includes/class-xmlsitemapfeed-admin.php:333
192
- msgid ""
193
- "Priority settings do not affect ranking in search results in any way. They "
194
- "are only meant to suggest search engines which URLs to index first. Once a "
195
- "URL has been indexed, its Priority becomes meaningless until its Lastmod is "
196
- "updated."
197
- msgstr ""
198
-
199
- #: includes/class-xmlsitemapfeed-admin.php:334
200
- msgid ""
201
- "Maximum Priority (1.0) is reserved for the front page, individual posts and, "
202
- "when allowed, posts with high comment count."
203
- msgstr ""
204
-
205
- #: includes/class-xmlsitemapfeed-admin.php:334
206
- msgid ""
207
- "Priority values are taken as relative values. Setting all to the same (high) "
208
- "value is pointless."
209
- msgstr ""
210
-
211
- #: includes/class-xmlsitemapfeed-admin.php:384
212
- msgid "XML Sitemaps for taxonomies"
213
- msgstr ""
214
-
215
- #: includes/class-xmlsitemapfeed-admin.php:390
216
- msgid ""
217
- "It is generally not recommended to include taxonomy pages, unless their "
218
- "content brings added value."
219
- msgstr ""
220
-
221
- #: includes/class-xmlsitemapfeed-admin.php:391
222
- msgid ""
223
- "For example, when you use category descriptions with information that is not "
224
- "present elsewhere on your site or if taxonomy pages list posts with an "
225
- "excerpt that is different from, but complementary to the post content. In "
226
- "these cases you might consider including certain taxonomies. Otherwise, if "
227
- "you fear <a href=\"http://moz.com/learn/seo/duplicate-content\">negative "
228
- "affects of duplicate content</a> or PageRank spread, you might even consider "
229
- "disallowing indexation of taxonomies."
230
- msgstr ""
231
-
232
- #: includes/class-xmlsitemapfeed-admin.php:392
233
- #, php-format
234
- msgid ""
235
- "You can do this by adding specific robots.txt rules in the %s field above."
236
- msgstr ""
237
-
238
- #: includes/class-xmlsitemapfeed-admin.php:407
239
- msgid "No taxonomies available for the currently included post types."
240
- msgstr ""
241
-
242
- #: includes/class-xmlsitemapfeed-admin.php:415
243
- #: includes/class-xmlsitemapfeed-admin.php:1056
244
- msgid "Include custom XML Sitemaps"
245
- msgstr ""
246
-
247
- #: includes/class-xmlsitemapfeed-admin.php:416
248
- msgid "Additional XML Sitemaps to append to the main XML Sitemap Index:"
249
- msgstr ""
250
-
251
- #: includes/class-xmlsitemapfeed-admin.php:418
252
- msgid ""
253
- "Add the full URL, including protocol (http/https) and domain, of any XML "
254
- "Sitemap that you want to append to the Sitemap Index. Start each URL on a "
255
- "new line."
256
- msgstr ""
257
-
258
- #: includes/class-xmlsitemapfeed-admin.php:418
259
- msgid ""
260
- "Only valid sitemaps are allowed in the Sitemap Index. Use your Google/Bing "
261
- "Webmaster Tools to verify!"
262
- msgstr ""
263
-
264
- #: includes/class-xmlsitemapfeed-admin.php:435
265
- #: includes/class-xmlsitemapfeed-admin.php:1053
266
- msgid "Include custom URLs"
267
- msgstr ""
268
-
269
- #: includes/class-xmlsitemapfeed-admin.php:436
270
- msgid "Additional URLs to append in an extra XML Sitemap:"
271
- msgstr ""
272
-
273
- #: includes/class-xmlsitemapfeed-admin.php:438
274
- msgid ""
275
- "Add the full URL, including protocol (http/https) and domain, of any "
276
- "(static) page that you want to append to the ones already included by "
277
- "WordPress. Optionally add a priority value between 0 and 1, separated with a "
278
- "space after the URL. Start each URL on a new line."
279
- msgstr ""
280
-
281
- #: includes/class-xmlsitemapfeed-admin.php:448
282
- #: includes/class-xmlsitemapfeed-admin.php:1050
283
- msgid "Allowed domains"
284
- msgstr ""
285
-
286
- #: includes/class-xmlsitemapfeed-admin.php:449
287
- msgid "Additional domains to allow in the XML Sitemaps:"
288
- msgstr ""
289
-
290
- #: includes/class-xmlsitemapfeed-admin.php:450
291
- #, php-format
292
- msgid ""
293
- "By default, only the domain %s as used in your WordPress site address is "
294
- "allowed. This means that all URLs that use another domain (custom URLs or "
295
- "using a plugin like Page Links To) are filtered from the XML Sitemap. "
296
- "However, if you are the verified owner of other domains in your Google/Bing "
297
- "Webmaster Tools account, you can include these in the same sitemap. Add "
298
- "these domains, without protocol (http/https) each on a new line. Note that "
299
- "if you enter a domain with www, all URLs without it or with other subdomains "
300
- "will be filtered."
301
- msgstr ""
302
-
303
- #: includes/class-xmlsitemapfeed-admin.php:464
304
- #, php-format
305
- msgid ""
306
- "These settings control the Google News Sitemap generated by the %s plugin."
307
- msgstr ""
308
-
309
- #: includes/class-xmlsitemapfeed-admin.php:465
310
- msgid ""
311
- "When you are done configuring and preparing your news content and you are "
312
- "convinced your site adheres to the <a href=\"https://support.google.com/news/"
313
- "publisher/answer/40787\" target=\"_blank\">Google News guidelines</a>, go "
314
- "ahead and <a href=\"https://partnerdash.google.com/partnerdash/d/news\" "
315
- "target=\"_blank\">submit your site for inclusion</a>!"
316
- msgstr ""
317
-
318
- #: includes/class-xmlsitemapfeed-admin.php:466
319
- msgid ""
320
- "It is strongly recommended to submit your news sitemap to your Google "
321
- "Webmasters Tools account to monitor for warnings or errors. Read more on how "
322
- "to <a href=\"https://support.google.com/webmasters/answer/183669\" target="
323
- "\"_blank\">Manage sitemaps with the Sitemaps page</a>."
324
- msgstr ""
325
-
326
- #: includes/class-xmlsitemapfeed-admin.php:477
327
- #: includes/class-xmlsitemapfeed-admin.php:1030
328
- msgid "Publication name"
329
- msgstr ""
330
-
331
- #: includes/class-xmlsitemapfeed-admin.php:478
332
- #, php-format
333
- msgid "By default, the general %s setting will be used."
334
- msgstr ""
335
-
336
- #: includes/class-xmlsitemapfeed-admin.php:479
337
- msgid ""
338
- "The publication name should match the name submitted on the Google News "
339
- "Publisher Center. If you wish to change it, please read <a href=\"https://"
340
- "support.google.com/news/publisher/answer/40402\" target=\"_blank\">Updated "
341
- "publication name</a>."
342
- msgstr ""
343
-
344
- #: includes/class-xmlsitemapfeed-admin.php:496
345
- msgid ""
346
- "Error: There where no valid post types found. Without at least one public "
347
- "post type, a Google News Sitemap cannot be created by this plugin. Please "
348
- "deselect the option Google News Sitemap at <a href=\"#xmlsf_sitemaps"
349
- "\">Enable XML sitemaps</a> and choose another method."
350
- msgstr ""
351
-
352
- #: includes/class-xmlsitemapfeed-admin.php:499
353
- #: includes/class-xmlsitemapfeed-admin.php:1031
354
- #: includes/class-xmlsitemapfeed-admin.php:1044
355
- msgid "Include post types"
356
- msgstr ""
357
-
358
- #: includes/class-xmlsitemapfeed-admin.php:525
359
- #, php-format
360
- msgid ""
361
- "At least one post type must be selected. By default, the post type %s will "
362
- "be used."
363
- msgstr ""
364
-
365
- #: includes/class-xmlsitemapfeed-admin.php:536
366
- #, php-format
367
- msgid ""
368
- "Selection based on categories will be available when <strong>only</strong> "
369
- "the post type %s is included above."
370
- msgstr ""
371
-
372
- #: includes/class-xmlsitemapfeed-admin.php:554
373
- msgid "Limit to posts in these post categories:"
374
- msgstr ""
375
-
376
- #: includes/class-xmlsitemapfeed-admin.php:570
377
- msgid ""
378
- "If you wish to limit posts that will feature in your News Sitemap to certain "
379
- "categories, select them here. If no categories are selected, posts of all "
380
- "categories will be included in your News Sitemap."
381
- msgstr ""
382
-
383
- #: includes/class-xmlsitemapfeed-admin.php:570
384
- #: includes/class-xmlsitemapfeed-admin.php:650
385
- msgid "Use the Ctrl/Cmd key plus click to select more than one or to deselect."
386
- msgstr ""
387
-
388
- #: includes/class-xmlsitemapfeed-admin.php:592
389
- msgid ""
390
- "Note: Google News prefers at most one image per article in the News Sitemap. "
391
- "If multiple valid images are specified, the crawler will have to pick one "
392
- "arbitrarily. Images in News Sitemaps should be in jpeg or png format."
393
- msgstr ""
394
-
395
- #: includes/class-xmlsitemapfeed-admin.php:592
396
- #: includes/class-xmlsitemapfeed-admin.php:599
397
- msgid "More information&hellip;"
398
- msgstr ""
399
-
400
- #: includes/class-xmlsitemapfeed-admin.php:598
401
- #: includes/class-xmlsitemapfeed-admin.php:1034
402
- msgid "Source labels"
403
- msgstr ""
404
-
405
- #: includes/class-xmlsitemapfeed-admin.php:599
406
- #, php-format
407
- msgid ""
408
- "You can use the %1$s and %2$s tags to provide Google more information about "
409
- "the content of your articles."
410
- msgstr ""
411
-
412
- #: includes/class-xmlsitemapfeed-admin.php:611
413
- #, php-format
414
- msgid ""
415
- "The %4$s tag specifies whether an article is available to all readers "
416
- "(%1$s), or only to those with a free (%2$s) or paid membership (%3$s) to "
417
- "your site."
418
- msgstr ""
419
-
420
- #: includes/class-xmlsitemapfeed-admin.php:611
421
- #: includes/class-xmlsitemapfeed-admin.php:948
422
- msgid "Registration"
423
- msgstr ""
424
-
425
- #: includes/class-xmlsitemapfeed-admin.php:611
426
- #: includes/class-xmlsitemapfeed-admin.php:949
427
- msgid "Subscription"
428
- msgstr ""
429
-
430
- #: includes/class-xmlsitemapfeed-admin.php:612
431
- msgid "You can assign a different access level when writing a post."
432
- msgstr ""
433
-
434
- #: includes/class-xmlsitemapfeed-admin.php:616
435
- msgid "Tag normal posts as"
436
- msgstr ""
437
-
438
- #: includes/class-xmlsitemapfeed-admin.php:618
439
- #: includes/class-xmlsitemapfeed-admin.php:623
440
- msgid "Free registration"
441
- msgstr ""
442
-
443
- #: includes/class-xmlsitemapfeed-admin.php:619
444
- #: includes/class-xmlsitemapfeed-admin.php:624
445
- msgid "Paid subscription"
446
- msgstr ""
447
-
448
- #: includes/class-xmlsitemapfeed-admin.php:622
449
- msgid "Tag Password Protected posts as"
450
- msgstr ""
451
-
452
- #: includes/class-xmlsitemapfeed-admin.php:637
453
- #, php-format
454
- msgid ""
455
- "The %s tag specifies one or more properties for an article, namely, whether "
456
- "it is a press release, a blog post, an opinion, an op-ed piece, user-"
457
- "generated content, or satire."
458
- msgstr ""
459
-
460
- #: includes/class-xmlsitemapfeed-admin.php:637
461
- msgid "You can assign different genres when writing a post."
462
- msgstr ""
463
-
464
- #: includes/class-xmlsitemapfeed-admin.php:641
465
- msgid "Default genre:"
466
- msgstr ""
467
-
468
- #: includes/class-xmlsitemapfeed-admin.php:650
469
- #, php-format
470
- msgid "Read more about source labels on %s"
471
- msgstr ""
472
-
473
- #: includes/class-xmlsitemapfeed-admin.php:650
474
- msgid "What does each source label mean?"
475
- msgstr ""
476
-
477
- #: includes/class-xmlsitemapfeed-admin.php:659
478
- #, php-format
479
- msgid ""
480
- "The %s tag is used to help classify the articles you submit to Google News "
481
- "by <strong>topic</strong>."
482
- msgstr ""
483
-
484
- #: includes/class-xmlsitemapfeed-admin.php:661
485
- #, php-format
486
- msgid "Use %s for topics."
487
- msgstr ""
488
-
489
- #: includes/class-xmlsitemapfeed-admin.php:668
490
- msgid "Default topic(s):"
491
- msgstr ""
492
-
493
- #: includes/class-xmlsitemapfeed-admin.php:670
494
- msgid "Separate with a comma."
495
- msgstr ""
496
-
497
- #: includes/class-xmlsitemapfeed-admin.php:674
498
- msgid ""
499
- "Keywords may be drawn from, but are not limited to, the list of <a href="
500
- "\"https://support.google.com/news/publisher/answer/116037\" target=\"_blank"
501
- "\">existing Google News keywords</a>."
502
- msgstr ""
503
-
504
- #: includes/class-xmlsitemapfeed-admin.php:868
505
- #: includes/class-xmlsitemapfeed-admin.php:1041
506
- msgid "XML Sitemap"
507
- msgstr ""
508
-
509
- #: includes/class-xmlsitemapfeed-admin.php:903
510
- #, php-format
511
- msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
512
- msgstr ""
513
-
514
- #: includes/class-xmlsitemapfeed-admin.php:907
515
- msgid "Exclude from XML Sitemap"
516
- msgstr ""
517
-
518
- #: includes/class-xmlsitemapfeed-admin.php:919
519
- msgid "Google News"
520
- msgstr ""
521
-
522
- #: includes/class-xmlsitemapfeed-admin.php:944
523
- msgid "Access"
524
- msgstr ""
525
-
526
- #: includes/class-xmlsitemapfeed-admin.php:953
527
- msgid "Exclude from Google News Sitemap."
528
- msgstr ""
529
-
530
- #: includes/class-xmlsitemapfeed-admin.php:1005
531
- msgid "Enable XML sitemaps"
532
- msgstr ""
533
-
534
- #: includes/class-xmlsitemapfeed-admin.php:1047
535
- msgid "Include taxonomies"
536
- msgstr ""
537
-
538
- #: includes/class-xmlsitemapfeed.php:1426
539
- msgid "Google News Genres"
540
- msgstr ""
541
-
542
- #: includes/class-xmlsitemapfeed.php:1427
543
- msgid "Google News Genre"
544
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/admin/main.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Nginx helper purge urls
5
+ * adds sitemap urls to the purge array.
6
+ *
7
+ * @param $urls array
8
+ * @param $redis bool|false
9
+ *
10
+ * @return $urls array
11
+ */
12
+ function xmlsf_nginx_helper_purge_urls( $urls = array(), $redis = false ) {
13
+
14
+ if ( $redis ) {
15
+ // wildcard allowed, this makes everything simple
16
+ $urls[] = '/sitemap*.xml';
17
+ } else {
18
+ // no wildcard, go through the motions
19
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
20
+
21
+ if ( !empty( $sitemaps['sitemap-news'] ) ) {
22
+ $urls[] = '/sitemap-news.xml';
23
+ }
24
+
25
+ if ( !empty( $sitemaps['sitemap'] ) ) {
26
+ $urls[] = '/sitemap.xml';
27
+ $urls[] = '/sitemap-home.xml';
28
+ $urls[] = '/sitemap-custom.xml';
29
+
30
+ include_once XMLSF_DIR . '/models/public/sitemap.php';
31
+
32
+ // add public post types sitemaps
33
+ $post_types = get_option( 'xmlsf_post_types' );
34
+ if ( is_array($post_types) )
35
+ foreach ( $post_types as $post_type => $settings ) {
36
+ $archive = !empty($settings['archive']) ? $settings['archive'] : '';
37
+ foreach ( xmlsf_get_archives($post_type,$archive) as $url )
38
+ $urls[] = parse_url( $url, PHP_URL_PATH);
39
+ };
40
+
41
+ // add public post taxonomies sitemaps
42
+ $taxonomies = get_option('xmlsf_taxonomies');
43
+ if ( is_array($taxonomies) )
44
+ foreach ( $taxonomies as $taxonomy ) {
45
+ $urls[] = parse_url( xmlsf_get_index_url('taxonomy',$taxonomy), PHP_URL_PATH);
46
+ };
47
+ }
48
+ }
49
+
50
+ return $urls;
51
+ }
52
+
53
+ // plugin action links
54
+
55
+ function xmlsf_add_action_link( $links ) {
56
+ $settings_link = '<a href="' . admin_url('options-reading.php') . '#blog_public">' . translate('Settings') . '</a>';
57
+ array_unshift( $links, $settings_link );
58
+ return $links;
59
+ }
60
+
61
+ class XMLSF_Admin_Sanitize
62
+ {
63
+
64
+ public static function sitemaps_settings( $new )
65
+ {
66
+ if ( '1' !== get_option('blog_public') ) {
67
+ return '';
68
+ }
69
+
70
+ $old = get_option( 'xmlsf_sitemaps' );
71
+ $sanitized = array();
72
+
73
+ if ( $old !== $new ) {
74
+ // when sitemaps are added or removed, set transients
75
+ set_transient('xmlsf_flush_rewrite_rules','');
76
+ set_transient('xmlsf_check_static_files','');
77
+
78
+ // switched on news sitemap
79
+ if ( !empty($new['sitemap-news']) && empty($old['sitemap-news'] ) ) {
80
+ // check news tag settings
81
+ if ( !get_option( 'xmlsf_news_tags' ) ) {
82
+ add_option( 'xmlsf_news_tags', array(
83
+ 'name' => '',
84
+ 'post_type' => array('post'),
85
+ 'categories' => '',
86
+ 'image' => 'featured'
87
+ ) );
88
+ }
89
+ }
90
+ }
91
+
92
+ if ( !empty($new['sitemap']) ) {
93
+ $sanitized['sitemap'] = apply_filters( 'xmlsf_sitemap_filename', $new['sitemap'] );
94
+ }
95
+
96
+ if ( !empty($new['sitemap-news']) ) {
97
+ $sanitized['sitemap-news'] = apply_filters( 'xmlsf_sitemap_news_filename', $new['sitemap-news'] );
98
+ }
99
+
100
+ return $sanitized;
101
+ }
102
+
103
+ public static function domains_settings( $new )
104
+ {
105
+ $default = parse_url( home_url(), PHP_URL_HOST );
106
+
107
+ // clean up input
108
+ if(is_array($new)) {
109
+ $new = array_filter($new);
110
+ $new = reset($new);
111
+ }
112
+ $input = $new ? explode( PHP_EOL, sanitize_textarea_field( $new ) ) : array();
113
+
114
+ // build sanitized output
115
+ $sanitized = array();
116
+ foreach ($input as $line) {
117
+ $line = trim($line);
118
+ $parsed_url = parse_url( trim( filter_var( $line, FILTER_SANITIZE_URL ) ) );
119
+ // Before PHP version 5.4.7, parse_url will return the domain as path when scheme is omitted so we do:
120
+ if ( !empty($parsed_url['host']) ) {
121
+ $domain = trim( $parsed_url['host'] );
122
+ } else {
123
+ $domain_arr = explode('/', $parsed_url['path']);
124
+ $domain_arr = array_filter($domain_arr);
125
+ $domain = array_shift( $domain_arr );
126
+ $domain = trim( $domain );
127
+ }
128
+
129
+ // filter out empties and default domain
130
+ if(!empty($domain) && $domain !== $default && strpos($domain,".".$default) === false)
131
+ $sanitized[] = $domain;
132
+ }
133
+
134
+ return (!empty($sanitized)) ? $sanitized : '';
135
+ }
136
+
137
+ public static function ping_settings( $new )
138
+ {
139
+ return is_array($new) ? $new : array();
140
+ }
141
+
142
+ public static function robots_settings( $new )
143
+ {
144
+ $old = get_option('xmlsf_robots');
145
+
146
+ // clean up input
147
+ if ( is_array( $new ) ) {
148
+ $new = array_filter( $new );
149
+ $new = reset( $new );
150
+ }
151
+
152
+ if ( empty($old) && !empty($new) )
153
+ set_transient('xmlsf_check_static_files','');
154
+
155
+ return sanitize_textarea_field( $new );
156
+ }
157
+ }
models/admin/sitemap-news.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class XMLSF_Admin_Sitemap_News_Sanitize
4
+ {
5
+ public static function news_tags_settings( $new )
6
+ {
7
+ $sanitized = is_array( $new ) ? $new : array();
8
+
9
+ // at least one, default post type
10
+ if ( empty( $sanitized['post_type'] ) || !is_array( $sanitized['post_type'] ) ) {
11
+ $sanitized['post_type'] = array('post');
12
+ }
13
+
14
+ // if there are categories selected, then test
15
+ // if we have post types selected that do not use the post category taxonomy
16
+ if ( !empty( $sanitized['categories'] ) ) {
17
+ global $wp_taxonomies;
18
+ $post_types = ( isset( $wp_taxonomies['category'] ) ) ? $wp_taxonomies['category']->object_type : array();
19
+
20
+ $disabled = false;
21
+ foreach ( $sanitized['post_type'] as $post_type ) {
22
+ if ( !in_array( $post_type, $post_types ) ) {
23
+ $disabled = true;
24
+ break;
25
+ }
26
+ }
27
+ // suppress category selection
28
+ if ( $disabled )
29
+ unset( $sanitized['categories'] );
30
+ }
31
+
32
+ return $sanitized;
33
+ }
34
+ }
models/admin/sitemap.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class XMLSF_Admin_Sitemap_Sanitize
4
+ {
5
+ public static function taxonomies( $new )
6
+ {
7
+ return $new;
8
+ }
9
+
10
+ public static function taxonomy_settings( $new )
11
+ {
12
+ $sanitized = array();
13
+
14
+ $sanitized['active'] = !empty($new['active']) ? '1' : '';
15
+ $sanitized['priority'] = isset($new['priority']) ? self::priority($new['priority'],'0.1','0.9') : '0.3';
16
+ $sanitized['dynamic_priority'] = !empty($new['dynamic_priority']) ? '1' : '';
17
+ $sanitized['term_limit'] = isset($new['term_limit']) ? intval($new['term_limit']) : 5000;
18
+ if ( $sanitized['term_limit'] < 1 || $sanitized['term_limit'] > 50000 ) $sanitized['term_limit'] = 50000;
19
+
20
+ return $sanitized;
21
+ }
22
+
23
+ public static function post_types_settings( $new = array() )
24
+ {
25
+ $sanitized = is_array($new) ? $new : array();
26
+
27
+ foreach ($sanitized as $post_type => $settings) {
28
+ $sanitized[$post_type]['priority'] = isset($settings['priority']) ? self::priority($settings['priority'],'0.1','0.9') : '0.5';
29
+ }
30
+
31
+ return $sanitized;
32
+ }
33
+
34
+ public static function priority( $priority, $min = 0, $max = 1 )
35
+ {
36
+ // make sure we have the proper locale setting for calculations
37
+ setlocale( LC_NUMERIC, 'C' );
38
+
39
+ $priority = floatval(str_replace(',','.',$priority));
40
+
41
+ if ( $priority <= (float) $min ) {
42
+ return number_format( $min, 1 );
43
+ } elseif ( $priority >= (float) $max ) {
44
+ return number_format( $max, 1 );
45
+ } else {
46
+ return number_format( $priority, 1 );
47
+ }
48
+ }
49
+
50
+ public static function custom_sitemaps_settings( $new )
51
+ {
52
+ // clean up input
53
+ if ( is_array( $new ) ) {
54
+ $new = array_filter($new);
55
+ $new = reset($new);
56
+ }
57
+
58
+ if ( empty($new) )
59
+ return '';
60
+
61
+ // build sanitized output
62
+ $input = explode( PHP_EOL, sanitize_textarea_field($new) );
63
+ $sanitized = array();
64
+ foreach ( $input as $line ) {
65
+ $line = filter_var( esc_url( trim( $line ) ), FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED );
66
+ if ( ! empty( $line ) )
67
+ $sanitized[] = $line;
68
+ }
69
+
70
+ return !empty($sanitized) ? $sanitized : '';
71
+ }
72
+
73
+ public static function custom_urls_settings( $new )
74
+ {
75
+ // clean up input
76
+ if ( is_array( $new ) ) {
77
+ $new = array_filter($new);
78
+ $new = reset($new);
79
+ }
80
+
81
+ if ( empty($new) )
82
+ return '';
83
+
84
+ $input = explode( PHP_EOL, sanitize_textarea_field( $new ) );
85
+
86
+ // build sanitized output
87
+ $sanitized = array();
88
+ foreach ( $input as $line ) {
89
+ if ( empty( $line ) )
90
+ continue;
91
+
92
+ $arr = explode( " ", trim( $line ) );
93
+
94
+ $url = filter_var( esc_url( trim( $arr[0] ) ), FILTER_VALIDATE_URL );
95
+
96
+ if ( !empty( $url ) ) {
97
+ $priority = isset( $arr[1] ) ? self::priority($arr[1]) : '0.5';
98
+ $sanitized[] = array( $url, $priority );
99
+ }
100
+ }
101
+
102
+ return !empty($sanitized) ? $sanitized : '';
103
+ }
104
+ }
models/class-xmlsitemapfeed.php ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class XMLSitemapFeed {
4
+
5
+ /**
6
+ * Defaults
7
+ * @var array
8
+ */
9
+ private $defaults = array();
10
+
11
+ /**
12
+ * Front pages
13
+ *
14
+ * @var null/array $frontpages
15
+ */
16
+ public $frontpages = null;
17
+
18
+ /**
19
+ * Signifies whether the request has been filtered.
20
+ * @var bool
21
+ */
22
+ public $request_filtered = false;
23
+
24
+ /**
25
+ * Signifies whether the current query is for a sitemap feed.
26
+ * @var bool
27
+ */
28
+ public $is_sitemap = false;
29
+
30
+ /**
31
+ * Signifies whether the current query is for a news feed.
32
+ * @var bool
33
+ */
34
+ public $is_news = false;
35
+
36
+ /**
37
+ * Default language
38
+ * @var null/string $blog_language
39
+ */
40
+ public $blog_language = null;
41
+
42
+ /**
43
+ * Allowed domain names
44
+ *
45
+ * @var null|array $domains
46
+ */
47
+ private $domains = null;
48
+
49
+ /**
50
+ * Site public scheme
51
+ *
52
+ * @var string $domain
53
+ */
54
+ private $scheme;
55
+
56
+ /**
57
+ * Are we using plain permalinks
58
+ *
59
+ * @var bool $plain_permalinks
60
+ */
61
+ private $plain_permalinks = null;
62
+
63
+ /**
64
+ * Excluded post types
65
+ *
66
+ * post format taxonomy is disabled
67
+ * @var array
68
+ */
69
+ private $disabled_post_types = array('attachment','reply');
70
+
71
+ /**
72
+ * Excluded taxonomies
73
+ *
74
+ * post format taxonomy is disabled
75
+ * @var array
76
+ */
77
+ private $disabled_taxonomies = array('post_format','product_shipping_class');
78
+
79
+ /**
80
+ * Maximum number of posts in any taxonomy term
81
+ *
82
+ * @var null/int $taxonomy_termmaxposts
83
+ */
84
+ public $taxonomy_termmaxposts = null;
85
+
86
+ /**
87
+ * Unix last modified date
88
+ *
89
+ * @var int $lastmodified
90
+ */
91
+ public $lastmodified;
92
+
93
+ /**
94
+ * Unix time spanning first post date and last modified date
95
+ *
96
+ * @var int $timespan
97
+ */
98
+ public $timespan = 0;
99
+
100
+ /**
101
+ * Blog pages
102
+ *
103
+ * @var null/array $blogpages
104
+ */
105
+ public $blogpages = null;
106
+
107
+ /**
108
+ * METHODS
109
+ */
110
+
111
+ /**
112
+ * Constructor
113
+ * @return void
114
+ */
115
+ function __construct() {}
116
+
117
+ /**
118
+ * Default options
119
+ *
120
+ * @param $key
121
+ * @return array
122
+ */
123
+ public function defaults( $key = false ) {
124
+
125
+ if ( empty($this->defaults) ) :
126
+
127
+ // sitemaps
128
+ $sitemaps = ( '1' !== get_option('blog_public') ) ? '' : array(
129
+ 'sitemap' => 'sitemap.xml'
130
+ );
131
+
132
+ $this->defaults = array(
133
+ 'sitemaps' => $sitemaps,
134
+ 'post_types' => array(
135
+ 'post' => array(
136
+ 'active' => '1',
137
+ 'archive' => 'yearly',
138
+ 'priority' => '0.7',
139
+ 'dynamic_priority' => '1',
140
+ 'tags' => array(
141
+ 'image' => 'attached'
142
+ /*'video' => ''*/
143
+ )
144
+ ),
145
+ 'page' => array(
146
+ 'active' => '1',
147
+ 'priority' => '0.5',
148
+ 'dynamic_priority' => '',
149
+ 'tags' => array(
150
+ 'image' => 'attached'
151
+ /*'video' => ''*/
152
+ )
153
+ )
154
+ ),
155
+ 'taxonomies' => '',
156
+ 'taxonomy_settings' => array(
157
+ 'active' => '1',
158
+ 'priority' => '0.3',
159
+ 'dynamic_priority' => '1',
160
+ 'term_limit' => '5000'
161
+ ),
162
+ 'ping' => array(
163
+ 'google',
164
+ 'bing'
165
+ ),
166
+ 'robots' => '',
167
+ 'urls' => '',
168
+ 'custom_sitemaps' => '',
169
+ 'domains' => ''
170
+ );
171
+
172
+ $post_types = apply_filters( 'xmlsf_post_types', get_post_types(array('public'=>true,'_builtin'=>false),'names') );
173
+
174
+ // append public post_types defaults
175
+ if ( is_array($post_types) )
176
+ foreach ( $post_types as $name )
177
+ $this->defaults['post_types'][$name] = array(
178
+ //'name' => $name,
179
+ 'active' => '',
180
+ 'archive' => '',
181
+ 'priority' => '0.5',
182
+ 'dynamic_priority' => '',
183
+ 'tags' => array( 'image' => 'attached' )
184
+ );
185
+
186
+ endif;
187
+
188
+ if ( $key ) {
189
+ $return = ( isset($this->defaults[$key]) ) ? $this->defaults[$key] : '';
190
+ } else {
191
+ $return = $this->defaults;
192
+ }
193
+
194
+ return apply_filters( 'xmlsf_defaults', $return, $key );
195
+ }
196
+
197
+ /**
198
+ * Get domain
199
+ * @return string
200
+ */
201
+ public function get_allowed_domains() {
202
+ // allowed domain
203
+ if ( null === $this->domains ) {
204
+
205
+ $host = parse_url( home_url(), PHP_URL_HOST );
206
+
207
+ $this->domains = ( !empty($host) ) ? (array) $host : array();
208
+
209
+ $domains = get_option('xmlsf_domains');
210
+
211
+ if ( !empty( $domains ) )
212
+ $this->domains = array_merge( $this->domains, (array) $domains );
213
+ }
214
+
215
+ return $this->domains;
216
+ }
217
+
218
+ /**
219
+ * Whether or not to use plain permalinks
220
+ * Used for sitemap index and admin page
221
+ *
222
+ * @return bool
223
+ */
224
+ public function plain_permalinks() {
225
+ if ( null === $this->plain_permalinks ) {
226
+ $permalink_structure = get_option('permalink_structure');
227
+ $this->plain_permalinks = ('' == $permalink_structure || 0 === strpos($permalink_structure,'/index.php') ) ? true : false;
228
+ }
229
+ return $this->plain_permalinks;
230
+ }
231
+
232
+ /**
233
+ * Get scheme
234
+ * @return string
235
+ */
236
+ public function blog_language() {
237
+ if ( $this->blog_language === null ) {
238
+ // get site language for default language
239
+ $this->blog_language = xmlsf_parse_language_string( get_bloginfo('language') );
240
+ }
241
+
242
+ return $this->blog_language;
243
+ }
244
+
245
+
246
+
247
+ /**
248
+ * Get scheme
249
+ * @return string
250
+ */
251
+ public function scheme() {
252
+ // scheme to use
253
+ if ( empty($this->scheme) ) {
254
+ $scheme = parse_url( home_url(), PHP_URL_SCHEME );
255
+ $this->scheme = $scheme ? $scheme : 'http';
256
+ }
257
+
258
+ return $this->scheme;
259
+ }
260
+
261
+ /**
262
+ * Get disabled post types
263
+ * @return array
264
+ */
265
+ public function disabled_post_types() {
266
+ return $this->disabled_post_types;
267
+ }
268
+
269
+ /**
270
+ * Get disabled taxonomies
271
+ * @return array
272
+ */
273
+ public function disabled_taxonomies() {
274
+ return $this->disabled_taxonomies;
275
+ }
276
+ }
models/global.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Filter robots.txt rules
5
+ *
6
+ * @param $output
7
+ * @return string
8
+ */
9
+ function xmlsf_robots_txt( $output ) {
10
+ $url = trailingslashit( get_bloginfo('url') );
11
+
12
+ $sitemaps = get_option( 'xmlsf_sitemaps' );
13
+
14
+ $pre = '# XML Sitemap & Google News version ' . XMLSF_VERSION . ' - https://status301.net/wordpress-plugins/xml-sitemap-feed/' . PHP_EOL;
15
+ if ( '1' != get_option('blog_public') )
16
+ $pre .= '# XML Sitemaps are disabled because of this site\'s privacy settings.' . PHP_EOL;
17
+ elseif( !is_array($sitemaps) || empty( $sitemaps ) )
18
+ $pre .= '# No XML Sitemaps are enabled on this site.' . PHP_EOL;
19
+ else
20
+ foreach ( $sitemaps as $pretty )
21
+ $pre .= 'Sitemap: ' . $url . $pretty . PHP_EOL;
22
+ $pre .= PHP_EOL;
23
+
24
+ $post = get_option('xmlsf_robots');
25
+
26
+ return $pre . $output . $post;
27
+ }
28
+
29
+ /**
30
+ * Get instantiated sitemap class
31
+ *
32
+ * @since 5.0
33
+ * @global XMLSitemapFeed $xmlsf
34
+ * @return XMLSitemapFeed object
35
+ */
36
+ function xmlsf() {
37
+ global $xmlsf;
38
+
39
+ if ( ! isset( $xmlsf ) ) {
40
+ if ( ! class_exists( 'XMLSitemapFeed' ) )
41
+ require XMLSF_DIR . '/models/class-xmlsitemapfeed.php';
42
+
43
+ $xmlsf = new XMLSitemapFeed();
44
+ }
45
+
46
+ return $xmlsf;
47
+ }
48
+
49
+ /* -------------------------------------
50
+ * CONDITIONAL FUNCTIONS
51
+ * ------------------------------------- */
52
+
53
+ /**
54
+ * Is the query for a sitemap?
55
+ *
56
+ * @since 4.8
57
+ * @return bool
58
+ */
59
+ function is_sitemap() {
60
+ global $xmlsf;
61
+ if ( ! is_object( $xmlsf ) || $xmlsf->request_filtered === false ) {
62
+ _doing_it_wrong( __FUNCTION__, __( 'Conditional sitemap tags do not work before the sitemap request filter is run. Before then, they always return false.', 'xml-sitemap-feed' ), '4.8' );
63
+ return false;
64
+ }
65
+ return $xmlsf->is_sitemap;
66
+ }
67
+
68
+ /**
69
+ * Is the query for a news sitemap?
70
+ *
71
+ * @since 4.8
72
+ * @return bool
73
+ */
74
+ function is_news() {
75
+ global $xmlsf;
76
+ if ( ! is_object( $xmlsf ) || $xmlsf->request_filtered === false ) {
77
+ _doing_it_wrong( __FUNCTION__, __( 'Conditional sitemap tags do not work before the sitemap request filter is run. Before then, they always return false.', 'xml-sitemap-feed' ), '4.8' );
78
+ return false;
79
+ }
80
+ return $xmlsf->is_news;
81
+ }
models/main.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Filter request
5
+ *
6
+ * @param $request
7
+ *
8
+ * @return mixed
9
+ */
10
+ function xmlsf_filter_request( $request ) {
11
+
12
+ if ( isset($request['feed']) && strpos($request['feed'],'sitemap') === 0 ) :
13
+
14
+ // make sure we have the proper locale setting for calculations
15
+ setlocale( LC_NUMERIC, 'C' );
16
+
17
+ require_once XMLSF_DIR . '/controllers/public/shared.php';
18
+ require_once XMLSF_DIR . '/models/public/shared.php';
19
+
20
+ // set the sitemap conditional flag
21
+ xmlsf()->is_sitemap = true;
22
+
23
+ // REPSONSE HEADERS filtering
24
+ add_filter( 'wp_headers', 'xmlsf_headers');
25
+
26
+ // modify request parameters
27
+ $request['post_status'] = 'publish';
28
+ $request['no_found_rows'] = true;
29
+ $request['cache_results'] = false;
30
+ $request['update_post_term_cache'] = false;
31
+ $request['update_post_meta_cache'] = false;
32
+
33
+ // Polylang compat
34
+ $request['lang'] = '';
35
+ // WPML compat
36
+ global $wpml_query_filter;
37
+ if ( is_object($wpml_query_filter) ) {
38
+ remove_filter( 'posts_join', array( $wpml_query_filter, 'posts_join_filter' ) );
39
+ remove_filter( 'posts_where', array( $wpml_query_filter, 'posts_where_filter' ) );
40
+ add_action( 'the_post', 'xmlsf_wpml_language_switcher' );
41
+ }
42
+
43
+ if ( $request['feed'] == 'sitemap-news' ) {
44
+ // set the news sitemap conditional flag
45
+ xmlsf()->is_news = true;
46
+
47
+ require_once XMLSF_DIR . '/controllers/public/sitemap-news.php';
48
+ require_once XMLSF_DIR . '/models/public/sitemap-news.php';
49
+ $request = xmlsf_sitemap_news_filter_request( $request );
50
+ } else {
51
+ require_once XMLSF_DIR . '/controllers/public/sitemap.php';
52
+ require_once XMLSF_DIR . '/models/public/sitemap.php';
53
+ xmlsf_feed_templates();
54
+ $request = xmlsf_sitemap_filter_request( $request );
55
+ }
56
+
57
+ endif;
58
+
59
+ xmlsf()->request_filtered = true;
60
+
61
+ return $request;
62
+ }
63
+
64
+ /**
65
+ * Remove the trailing slash from permalinks that have an extension,
66
+ * such as /sitemap.xml (thanks to Permalink Editor plugin for WordPress)
67
+ *
68
+ * @param string $request
69
+ *
70
+ * @return mixed
71
+ */
72
+ function xmlsf_untrailingslash( $request ) {
73
+ return pathinfo($request, PATHINFO_EXTENSION) ? untrailingslashit($request) : $request;
74
+ }
75
+
76
+ /**
77
+ * Filter sitemap post types
78
+ *
79
+ * @since 5.0
80
+ * @param $post_types array
81
+ * @return array
82
+ */
83
+ function xmlsf_filter_post_types( $post_types ) {
84
+ foreach ( xmlsf()->disabled_post_types() as $post_type ) {
85
+ if ( isset( $post_types[$post_type]) )
86
+ unset( $post_types[$post_type] );
87
+ }
88
+
89
+ return array_filter( $post_types );
90
+ }
91
+
92
+ /**
93
+ * Filter news post types
94
+ *
95
+ * @since 5.0
96
+ * @param $post_types array
97
+ * @return array
98
+ */
99
+ function xmlsf_news_filter_post_types( $post_types ) {
100
+ foreach ( array('attachment','page') as $post_type ) {
101
+ if ( isset( $post_types[$post_type]) )
102
+ unset( $post_types[$post_type] );
103
+ }
104
+
105
+ return array_filter( $post_types );
106
+ }
models/public/shared.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Response headers filter
5
+ * Does not check if we are really in a sitemap feed.
6
+ *
7
+ * @param $headers
8
+ *
9
+ * @return array
10
+ */
11
+ function xmlsf_headers( $headers ) {
12
+ // set noindex
13
+ $headers['X-Robots-Tag'] = 'noindex, follow';
14
+ $headers['Content-Type'] = 'text/xml; charset=' . get_bloginfo('charset');
15
+ return $headers;
16
+ }
17
+
18
+ /**
19
+ * Get images
20
+ *
21
+ * @param string $sitemap
22
+ *
23
+ * @return array|bool
24
+ */
25
+ function xmlsf_get_images( $sitemap = '' ) {
26
+ global $post;
27
+ $images = array();
28
+
29
+ if ( 'news' == $sitemap ) {
30
+ $options = get_option('xmlsf_news_tags');
31
+ $which = isset($options['image']) ? $options['image'] : '';
32
+ } else {
33
+ $options = get_option('xmlsf_post_types');
34
+ $which = is_array($options) && isset($options[$post->post_type]['tags']['image']) ? $options[$post->post_type]['tags']['image'] : '';
35
+ }
36
+
37
+ if ( 'attached' == $which ) {
38
+ $args = array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'numberposts' => -1, 'post_status' =>'inherit', 'post_parent' => $post->ID );
39
+ $attachments = get_posts($args);
40
+ if ( $attachments ) {
41
+ foreach ( $attachments as $attachment ) {
42
+ $url = wp_get_attachment_image_url( $attachment->ID, 'full' );
43
+ $url = xmlsf_get_absolute_url( $url );
44
+ if ( !empty($url) ) {
45
+ $images[] = array(
46
+ 'loc' => esc_attr( esc_url_raw( $url ) ),
47
+ 'title' => apply_filters( 'the_title_xmlsitemap', $attachment->post_title ),
48
+ 'caption' => apply_filters( 'the_title_xmlsitemap', $attachment->post_excerpt )
49
+ // 'caption' => apply_filters( 'the_title_xmlsitemap', get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ) )
50
+ );
51
+ }
52
+ }
53
+ }
54
+ } elseif ( 'featured' == $which ) {
55
+ if ( has_post_thumbnail( $post->ID ) ) {
56
+ $attachment = get_post( get_post_thumbnail_id( $post->ID ) );
57
+ $url = wp_get_attachment_image_url( get_post_thumbnail_id( $post->ID ), 'full' );
58
+ $url = xmlsf_get_absolute_url( $url );
59
+ if ( !empty($url) ) {
60
+ $images[] = array(
61
+ 'loc' => esc_attr( esc_url_raw( $url ) ),
62
+ 'title' => apply_filters( 'the_title_xmlsitemap', $attachment->post_title ),
63
+ 'caption' => apply_filters( 'the_title_xmlsitemap', $attachment->post_excerpt )
64
+ // 'caption' => apply_filters( 'the_title_xmlsitemap', get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ) )
65
+ );
66
+ }
67
+ }
68
+ }
69
+
70
+ return $images;
71
+ }
72
+
73
+ /**
74
+ * Get absolute URL
75
+ * Converts path or protocol relative URLs to absolute ones.
76
+ *
77
+ * @param string $url
78
+ *
79
+ * @return string|bool
80
+ */
81
+ function xmlsf_get_absolute_url( $url = false ) {
82
+ // have a string or return false
83
+ if ( empty( $url ) || ! is_string( $url ) ) {
84
+ return false;
85
+ }
86
+
87
+ // check for scheme
88
+ if ( strpos( $url, 'http' ) !== 0 ) {
89
+ // check for relative url path
90
+ if ( strpos( $url, '//' ) !== 0 ) {
91
+ return ( strpos( $url, '/' ) === 0 ) ? untrailingslashit( home_url() ) . $url : trailingslashit( home_url() ) . $url;
92
+ }
93
+ return xmlsf()->scheme() . ':' . $url;
94
+ }
95
+
96
+ return $url;
97
+ }
98
+
99
+ /**
100
+ * Is allowed domain
101
+ *
102
+ * @param $url
103
+ *
104
+ * @return mixed|void
105
+ */
106
+ function xmlsf_is_allowed_domain( $url ) {
107
+
108
+ $domains = xmlsf()->get_allowed_domains();
109
+
110
+ $return = false;
111
+ $parsed_url = parse_url($url);
112
+
113
+ if (isset($parsed_url['host'])) {
114
+ foreach ( $domains as $domain ) {
115
+ if ( $parsed_url['host'] == $domain || strpos($parsed_url['host'],'.'.$domain) !== false ) {
116
+ $return = true;
117
+ break;
118
+ }
119
+ }
120
+ }
121
+
122
+ return apply_filters( 'xmlsf_allowed_domain', $return, $url );
123
+ }
models/public/sitemap-news.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Filter news WHERE
5
+ * only posts from the last 48 hours
6
+ *
7
+ * @param string $where
8
+ *
9
+ * @return string
10
+ */
11
+ function xmlsf_news_filter_where( $where = '' ) {
12
+ return $where . ' AND post_date_gmt > \'' . date('Y-m-d H:i:s', strtotime('-48 hours')) . '\'';
13
+ }
14
+
15
+ /**
16
+ * Filter news limits
17
+ * override default feed limit for GN
18
+ * @return string
19
+ */
20
+ function xmlsf_news_filter_limits( $limits ) {
21
+ return 'LIMIT 0, 1000';
22
+ }
23
+
24
+ /**
25
+ * Filter no news limits
26
+ * in case there is no news, just take the latest post
27
+ * @return string
28
+ */
29
+ function xmlsf_news_filter_no_news_limits( $limits ) {
30
+ return 'LIMIT 0, 1';
31
+ }
32
+
33
+ /**
34
+ * Filter request
35
+ *
36
+ * @param $request
37
+ *
38
+ * @return mixed
39
+ */
40
+ function xmlsf_sitemap_news_filter_request( $request ) {
41
+
42
+ // prepare for news and return modified request
43
+ $options = get_option( 'xmlsf_news_tags' );
44
+ $post_types = is_array($options) && !empty($options['post_type']) ? $options['post_type'] : array('post');
45
+ $post_types = apply_filters( 'xmlsf_news_post_types', $post_types);
46
+
47
+ // disable caching
48
+ define('DONOTCACHEPAGE', true);
49
+ define('DONOTCACHEDB', true);
50
+
51
+ // set up query filters
52
+ $live = false;
53
+ foreach ($post_types as $post_type) {
54
+ if ( get_lastpostdate('gmt', $post_type) > date('Y-m-d H:i:s', strtotime('-48 hours')) ) {
55
+ $live = true;
56
+ break;
57
+ }
58
+ }
59
+
60
+ if ( $live ) {
61
+ add_filter( 'post_limits', 'xmlsf_news_filter_limits' );
62
+ add_filter( 'posts_where', 'xmlsf_news_filter_where', 10, 1 );
63
+ } else {
64
+ add_filter( 'post_limits', 'xmlsf_news_filter_no_news_limits' );
65
+ }
66
+
67
+ // post type
68
+ $request['post_type'] = $post_types;
69
+
70
+ // categories
71
+ if ( is_array($options) && isset($options['categories']) && is_array($options['categories']) ) {
72
+ $request['cat'] = implode( ',', $options['categories'] );
73
+ }
74
+
75
+ return $request;
76
+ }
77
+
78
+ /**
79
+ * Get language used in News Sitemap
80
+ *
81
+ * @param $post_id
82
+ *
83
+ * @return string
84
+ */
85
+ function xmlsf_get_language( $post_id ) {
86
+
87
+ $language = xmlsf()->blog_language();
88
+
89
+ // WPML compat
90
+ global $sitepress;
91
+ // Polylang
92
+ if ( function_exists('pll_get_post_language') ) {
93
+ $lang = pll_get_post_language( $post_id, 'slug' );
94
+ if ( !empty($lang) )
95
+ $language = xmlsf_parse_language_string( $lang );
96
+ } elseif ( is_object($sitepress) && method_exists($sitepress, 'get_language_for_element') ) {
97
+ $post_type = (array) get_query_var( 'post_type', 'post' );
98
+ $lang = $sitepress->get_language_for_element( $post_id, 'post_'.$post_type[0] );
99
+ //apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $post_id, 'element_type' => $post_type ) );
100
+ if ( !empty($lang) )
101
+ $language = xmlsf_parse_language_string( $lang );
102
+ }
103
+
104
+ return apply_filters( 'xmlsf_post_language', $language, $post_id );
105
+ }
106
+
107
+ /**
108
+ * Parse language string
109
+ *
110
+ * @param string $lang unformatted language string
111
+ *
112
+ * @return string
113
+ */
114
+ function xmlsf_parse_language_string( $lang ) {
115
+ $lang = convert_chars( strtolower( strip_tags( $lang ) ) );
116
+
117
+ // no underscores
118
+ if ( strpos( $lang, '_' ) ) {
119
+ $expl = explode('_', $lang);
120
+ $lang = $expl[0];
121
+ }
122
+
123
+ // no hyphens except...
124
+ if ( strpos( $lang, '-' ) && !in_array( $lang, array('zh-cn','zh-tw') ) ) {
125
+ // explode on hyphen and use only first part
126
+ $expl = explode('-', $lang);
127
+ $lang = $expl[0];
128
+ }
129
+
130
+ return !empty($lang) ? $lang : 'en';
131
+ }
models/public/sitemap.php ADDED
@@ -0,0 +1,648 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Get index url
5
+ *
6
+ * @param string $sitemap
7
+ * @param string $type
8
+ * @param string $parm
9
+ *
10
+ * @return string
11
+ */
12
+ function xmlsf_get_index_url( $sitemap = 'home', $type = false, $param = false ) {
13
+
14
+ if ( xmlsf()->plain_permalinks() ) {
15
+ $name = '?feed=sitemap-'.$sitemap;
16
+ $name .= $type ? '-'.$type : '';
17
+ $name .= $param ? '&m='.$param : '';
18
+ } else {
19
+ $name = 'sitemap-'.$sitemap;
20
+ $name .= $type ? '-'.$type : '';
21
+ $name .= $param ? '.'.$param : '';
22
+ $name .= '.xml';
23
+ }
24
+
25
+ return esc_url( trailingslashit( home_url() ) . $name );
26
+ }
27
+
28
+ /**
29
+ * Get last modified date
30
+ *
31
+ * @param string $sitemap
32
+ * @param string $term
33
+ *
34
+ * @return string|bool date|false
35
+ */
36
+ function xmlsf_get_lastmod( $sitemap = 'post_type', $term = '' ) {
37
+ $modified = trim( mysql2date( 'Y-m-d\TH:i:s+00:00', xmlsf_modified( $sitemap, $term ), false ) );
38
+ return !empty($modified) ? $modified : false;
39
+ }
40
+
41
+ /**
42
+ * Get root pages data
43
+ * @return array
44
+ */
45
+ function xmlsf_get_root_data() {
46
+ // language roots
47
+ global $sitepress;
48
+ // Polylang and WPML compat
49
+ if ( function_exists('pll_the_languages') && function_exists('pll_home_url') ) {
50
+ $languages = pll_the_languages( array( 'raw' => 1 ) );
51
+ if ( is_array($languages) ) {
52
+ foreach ( $languages as $language ) {
53
+ $url = pll_home_url( $language['slug'] );
54
+ $data[$url] = array(
55
+ 'priority' => '1.0',
56
+ 'lastmod' => mysql2date( 'Y-m-d\TH:i:s+00:00', get_lastpostdate('gmt'), false )
57
+ // TODO make lastmod date language specific
58
+ );
59
+ }
60
+ }
61
+ } elseif ( is_object($sitepress) && method_exists($sitepress, 'get_languages') && method_exists($sitepress, 'language_url') ) {
62
+ foreach ( array_keys ( $sitepress->get_languages(false,true) ) as $term ) {
63
+ $url = $sitepress->language_url($term);
64
+ $data[$url] = array(
65
+ 'priority' => '1.0',
66
+ 'lastmod' => mysql2date( 'Y-m-d\TH:i:s+00:00', get_lastpostdate('gmt'), false )
67
+ // TODO make lastmod date language specific
68
+ );
69
+ }
70
+ } else {
71
+ // single site root
72
+ $data = array(
73
+ trailingslashit( home_url() ) => array(
74
+ 'priority' => '1.0',
75
+ 'lastmod' => mysql2date( 'Y-m-d\TH:i:s+00:00', get_lastpostdate('gmt'), false )
76
+ )
77
+ );
78
+ }
79
+
80
+ // TODO custom post type root pages here
81
+
82
+ return $data;
83
+ }
84
+
85
+ /**
86
+ * Do tags
87
+ *
88
+ * @param string $type
89
+ *
90
+ * @return array
91
+ */
92
+ function xmlsf_do_tags( $type = 'post' ) {
93
+ $post_types = get_option( 'xmlsf_post_types' );
94
+
95
+ // make sure it's an array we are returning
96
+ return (
97
+ is_string($type) &&
98
+ is_array($post_types) &&
99
+ !empty($post_types[$type]['tags'])
100
+ ) ? (array) $post_types[$type]['tags'] : array();
101
+ }
102
+
103
+ /**
104
+ * Get front pages
105
+ * @return array
106
+ */
107
+ function xmlsf_get_frontpages() {
108
+ if ( null === xmlsf()->frontpages ) :
109
+ $frontpages = array();
110
+ if ( 'page' == get_option('show_on_front') ) {
111
+ $frontpage = (int) get_option('page_on_front');
112
+ $frontpages = array_merge( (array) $frontpage, xmlsf_get_translations($frontpage) );
113
+ }
114
+ xmlsf()->frontpages = $frontpages;
115
+ endif;
116
+
117
+ return xmlsf()->frontpages;
118
+ }
119
+
120
+ /**
121
+ * Get translations
122
+ *
123
+ * @param $post_id
124
+ *
125
+ * @return array
126
+ */
127
+ function xmlsf_get_translations( $post_id ) {
128
+ $translation_ids = array();
129
+
130
+ // WPML compat
131
+ global $sitepress;
132
+ // Polylang compat
133
+ if ( function_exists('pll_get_post_translations') ) {
134
+ $translations = pll_get_post_translations($post_id);
135
+ foreach ( $translations as $slug => $id ) {
136
+ if ( $post_id != $id ) $translation_ids[] = $id;
137
+ }
138
+ } elseif ( is_object($sitepress) && method_exists($sitepress, 'get_languages') && method_exists($sitepress, 'get_object_id') ) {
139
+ foreach ( array_keys ( $sitepress->get_languages(false,true) ) as $term ) {
140
+ $id = $sitepress->get_object_id($post_id,'page',false,$term);
141
+ if ( $post_id != $id ) $translation_ids[] = $id;
142
+ }
143
+ }
144
+
145
+ return $translation_ids;
146
+ }
147
+
148
+ /**
149
+ * Get blog_pages
150
+ * @return array
151
+ */
152
+ function xmlsf_get_blogpages() {
153
+ if ( null === xmlsf()->blogpages ) :
154
+ $blogpages = array();
155
+ if ( 'page' == get_option('show_on_front') ) {
156
+ $blogpage = (int) get_option('page_for_posts');
157
+ if ( !empty($blogpage) ) {
158
+ $blogpages = array_merge( (array) $blogpage, xmlsf_get_translations($blogpage) );
159
+ }
160
+ }
161
+ xmlsf()->blogpages = $blogpages;
162
+ endif;
163
+
164
+ return xmlsf()->blogpages;
165
+ }
166
+
167
+ /**
168
+ * Is home?
169
+ *
170
+ * @param $post_id
171
+ *
172
+ * @return bool
173
+ */
174
+ function xmlsf_is_home( $post_id ) {
175
+ return in_array( $post_id, xmlsf_get_blogpages() ) || in_array( $post_id, xmlsf_get_frontpages() );
176
+ }
177
+
178
+ /**
179
+ * Modified
180
+ *
181
+ * @param string $sitemap
182
+ * @param string $term
183
+ *
184
+ * @return string
185
+ */
186
+ function xmlsf_modified( $sitemap = 'post_type', $term = '' ) {
187
+ $lastmod = '';
188
+
189
+ if ( 'post_type' == $sitemap ) :
190
+ global $post;
191
+
192
+ // if blog page then look for last post date
193
+ if ( $post->post_type == 'page' && xmlsf_is_home($post->ID) ) {
194
+ return get_lastpostmodified('gmt');
195
+ }
196
+
197
+ $lastmod = get_post_modified_time( 'Y-m-d H:i:s', true, $post->ID );
198
+
199
+ $options = get_option('xmlsf_post_types');
200
+
201
+ if ( is_array($options) && !empty($options[$post->post_type]['update_lastmod_on_comments']) ) {
202
+ $lastcomment = get_comments( array(
203
+ 'status' => 'approve',
204
+ 'number' => 1,
205
+ 'post_id' => $post->ID,
206
+ ) );
207
+
208
+ if ( isset($lastcomment[0]->comment_date_gmt) )
209
+ if ( mysql2date( 'U', $lastcomment[0]->comment_date_gmt, false ) > mysql2date( 'U', $lastmod, false ) )
210
+ $lastmod = $lastcomment[0]->comment_date_gmt;
211
+ }
212
+
213
+ // make sure lastmod is not older than publication date (happens on scheduled posts)
214
+ if ( isset($post->post_date_gmt) && strtotime($post->post_date_gmt) > strtotime($lastmod) ) {
215
+ $lastmod = $post->post_date_gmt;
216
+ };
217
+
218
+ elseif ( 'taxonomy' == $sitemap ) :
219
+
220
+ if ( is_object($term) ) {
221
+ $lastmod = get_term_meta( $term->term_id, 'term_modified_gmt', true );
222
+
223
+ if ( empty($lastmod) ) {
224
+ // get the latest post in this taxonomy item, to use its post_date as lastmod
225
+ $posts = get_posts (
226
+ array(
227
+ 'post_type' => 'any',
228
+ 'numberposts' => 1,
229
+ 'no_found_rows' => true,
230
+ 'update_post_meta_cache' => false,
231
+ 'update_post_term_cache' => false,
232
+ 'update_cache' => false,
233
+ 'tax_query' => array(
234
+ array(
235
+ 'taxonomy' => $term->taxonomy,
236
+ 'field' => 'slug',
237
+ 'terms' => $term->slug
238
+ )
239
+ )
240
+ )
241
+ );
242
+ $lastmod = isset($posts[0]->post_date_gmt) ? $posts[0]->post_date_gmt : '';
243
+ // get post date here, not modified date because we're only
244
+ // concerned about new entries on the (first) taxonomy page
245
+
246
+ update_term_meta( $term->term_id, 'term_modified_gmt', $lastmod );
247
+ }
248
+ } else {
249
+
250
+ $obj = get_taxonomy($term);
251
+
252
+ $lastmodified = array();
253
+ foreach ( (array)$obj->object_type as $object_type ) {
254
+ $lastmodified[] = get_lastpostdate( 'gmt', $object_type );
255
+ // get post date here, not modified date because we're only
256
+ // concerned about new entries on the (first) taxonomy page
257
+ }
258
+
259
+ sort($lastmodified);
260
+ $lastmodified = array_filter($lastmodified);
261
+ $lastmod = end( $lastmodified );
262
+ };
263
+
264
+ endif;
265
+
266
+ return $lastmod;
267
+ }
268
+
269
+ /**
270
+ * Get priority
271
+ *
272
+ * @param string $sitemap
273
+ * @param WP_Term|string $term
274
+ *
275
+ * @return floatval
276
+ */
277
+ function xmlsf_get_priority( $sitemap = 'post_type', $term = '' ) {
278
+
279
+ // locale LC_NUMERIC should be set to C for these calculations
280
+ // it is assumed to be done at the request filter
281
+ //setlocale( LC_NUMERIC, 'C' );
282
+
283
+ $priority = 0.5;
284
+
285
+ if ( 'post_type' == $sitemap ) :
286
+
287
+ global $post;
288
+ $options = get_option( 'xmlsf_post_types' );
289
+ $priority = isset($options[$post->post_type]['priority']) && is_numeric($options[$post->post_type]['priority']) ? floatval($options[$post->post_type]['priority']) : 0.5;
290
+
291
+ if ( $priority_meta = get_metadata( 'post', $post->ID, '_xmlsf_priority', true ) ) {
292
+ $priority = floatval(str_replace(',','.',$priority_meta));
293
+ } elseif ( !empty($options[$post->post_type]['dynamic_priority']) ) {
294
+ $post_modified = mysql2date('U',$post->post_modified_gmt, false);
295
+
296
+ // reduce by age
297
+ // NOTE : home/blog page gets same treatment as sticky post, i.e. no reduction by age
298
+ if ( !is_sticky($post->ID) && !xmlsf_is_home($post->ID) && xmlsf()->timespan > 0 ) {
299
+ $priority -= $priority * ( xmlsf()->lastmodified - $post_modified ) / xmlsf()->timespan;
300
+ }
301
+
302
+ // increase by relative comment count
303
+ if ( $post->comment_count > 0 && $priority <= 0.9 ) {
304
+ $priority += 0.1 + ( 0.9 - $priority ) * $post->comment_count / wp_count_comments($post->post_type)->approved;
305
+ }
306
+ }
307
+
308
+ $priority = apply_filters( 'xmlsf_post_priority', $priority, $post->ID );
309
+
310
+ elseif ( 'taxonomy' == $sitemap ) :
311
+
312
+ $options = get_option( 'xmlsf_taxonomy_settings' );
313
+ $priority = isset( $options['priority'] ) && is_numeric( $options['priority'] ) ? floatval( $options['priority'] ) : 0.5 ;
314
+
315
+ if ( !empty($options['dynamic_priority']) && $priority > 0.1 && is_object($term) ) {
316
+ // set first and highest term post count as maximum
317
+ if ( null == xmlsf()->taxonomy_termmaxposts ) {
318
+ xmlsf()->taxonomy_termmaxposts = $term->count;
319
+ }
320
+
321
+ $priority -= ( xmlsf()->taxonomy_termmaxposts - $term->count ) * ( $priority - 0.1 ) / xmlsf()->taxonomy_termmaxposts;
322
+ }
323
+
324
+ $priority = apply_filters( 'xmlsf_term_priority', $priority, $term->slug );
325
+
326
+ endif;
327
+
328
+ // a final check for limits
329
+ if ( (float) $priority < 0.1 ) {
330
+ $priority = 0.1;
331
+ }
332
+ if ( (float) $priority > 1 ) {
333
+ $priority = 1;
334
+ }
335
+
336
+ return round( (float) $priority, 1 );
337
+ }
338
+
339
+ /**
340
+ * Filter limits
341
+ * override default feed limit
342
+ * @return string
343
+ */
344
+ function xmlsf_filter_limits( $limit ) {
345
+ return 'LIMIT 0, 50000';
346
+ }
347
+
348
+ /**
349
+ * Terms arguments filter
350
+ * Does not check if we are really in a sitemap feed.
351
+ *
352
+ * @param $args
353
+ *
354
+ * @return array
355
+ */
356
+ function xmlsf_set_terms_args( $args ) {
357
+ // https://developer.wordpress.org/reference/classes/wp_term_query/__construct/
358
+ $options = get_option('xmlsf_taxonomy_settings');
359
+ $args['number'] = isset($options['term_limit']) ? intval($options['term_limit']) : 5000;
360
+ if ( $args['number'] < 1 || $args['number'] > 50000 ) $args['number'] = 50000;
361
+ $args['order'] = 'DESC';
362
+ $args['orderby'] = 'count';
363
+ $args['pad_counts'] = true;
364
+ $args['lang'] = '';
365
+ $args['hierachical'] = 0;
366
+ $args['suppress_filter'] = true;
367
+
368
+ return $args;
369
+ }
370
+
371
+ /**
372
+ * Filter request
373
+ *
374
+ * @param $request
375
+ *
376
+ * @return mixed
377
+ */
378
+ function xmlsf_sitemap_filter_request( $request ) {
379
+
380
+ $feed = explode( '-' ,$request['feed'], 3 );
381
+
382
+ if ( !isset( $feed[1] ) ) return $request;
383
+
384
+ switch( $feed[1] ) {
385
+
386
+ case 'posttype':
387
+
388
+ if ( !isset( $feed[2] ) ) break;
389
+
390
+ $options = get_option( 'xmlsf_post_types' );
391
+
392
+ // prepare priority calculation
393
+ if ( is_array($options) && !empty($options[$feed[2]]['dynamic_priority']) ) {
394
+ // last posts or page modified date in Unix seconds
395
+ xmlsf()->lastmodified = mysql2date( 'U', get_lastpostmodified('gmt',$feed[2]), false );
396
+ // uses get_firstpostdate() function defined in xml-sitemap/inc/functions.php !
397
+ xmlsf()->timespan = xmlsf()->lastmodified - mysql2date( 'U', get_firstpostdate('gmt',$feed[2]), false );
398
+ };
399
+
400
+ // setup filter
401
+ add_filter( 'post_limits', 'xmlsf_filter_limits' );
402
+
403
+ $request['post_type'] = $feed[2];
404
+ $request['orderby'] = 'modified';
405
+ $request['is_date'] = false;
406
+
407
+ break;
408
+
409
+ case 'taxonomy':
410
+
411
+ if ( !isset( $feed[2] ) ) break;
412
+
413
+ // WPML compat
414
+ global $sitepress;
415
+ if ( is_object($sitepress) ) {
416
+ remove_filter( 'get_terms_args', array($sitepress,'get_terms_args_filter') );
417
+ remove_filter( 'get_term', array($sitepress,'get_term_adjust_id'), 1 );
418
+ remove_filter( 'terms_clauses', array($sitepress,'terms_clauses') );
419
+ $sitepress->switch_lang('all');
420
+ }
421
+
422
+ add_filter( 'get_terms_args', 'xmlsf_set_terms_args' );
423
+
424
+ // pass on taxonomy name via request
425
+ $request['taxonomy'] = $feed[2];
426
+
427
+ break;
428
+
429
+ default:
430
+ // do nothing
431
+ }
432
+
433
+ return $request;
434
+ }
435
+
436
+ /**
437
+ * Get archives
438
+ *
439
+ * @param string $post_type
440
+ * @param string $type
441
+ *
442
+ * @return array
443
+ */
444
+ function xmlsf_get_archives( $post_type = 'post', $type = '' ) {
445
+ global $wpdb;
446
+ $return = array();
447
+
448
+ if ( 'monthly' == $type ) :
449
+
450
+ $query = "SELECT YEAR(post_date) AS `year`, LPAD(MONTH(post_date),2,'0') AS `month`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC";
451
+ $key = md5($query);
452
+ $cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
453
+
454
+ if ( !isset( $cache[ $key ] ) ) {
455
+ $arcresults = $wpdb->get_results($query);
456
+ $cache[ $key ] = $arcresults;
457
+ wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
458
+ } else {
459
+ $arcresults = $cache[ $key ];
460
+ }
461
+
462
+ if ( $arcresults ) {
463
+ foreach ( (array) $arcresults as $arcresult ) {
464
+ $return[$arcresult->year.$arcresult->month] = xmlsf_get_index_url( 'posttype', $post_type, $arcresult->year . $arcresult->month );
465
+ }
466
+ };
467
+
468
+ elseif ( 'yearly' == $type ) :
469
+
470
+ $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC";
471
+ $key = md5($query);
472
+ $cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
473
+
474
+ if ( !isset( $cache[ $key ] ) ) {
475
+ $arcresults = $wpdb->get_results($query);
476
+ $cache[ $key ] = $arcresults;
477
+ wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
478
+ } else {
479
+ $arcresults = $cache[ $key ];
480
+ }
481
+
482
+ if ( $arcresults ) {
483
+ foreach ( (array) $arcresults as $arcresult) {
484
+ $return[$arcresult->year] = xmlsf_get_index_url( 'posttype', $post_type, $arcresult->year );
485
+ }
486
+ };
487
+
488
+ else :
489
+
490
+ $return[0] = xmlsf_get_index_url('posttype', $post_type); // $sitemap = 'home', $type = false, $param = false
491
+
492
+ endif;
493
+
494
+ return $return;
495
+ }
496
+
497
+ /**
498
+ * Get taxonomies
499
+ * Returns an array of taxonomy names to be included in the index
500
+ *
501
+ * @since 5.0
502
+ * @param void
503
+ * @return array
504
+ */
505
+ function xmlsf_get_taxonomies() {
506
+ $taxonomy_settings = get_option('xmlsf_taxonomy_settings');
507
+ $tax_array = array();
508
+ if ( !empty( $taxonomy_settings['active'] ) ) {
509
+ $taxonomies = get_option('xmlsf_taxonomies');
510
+ if ( is_array($taxonomies) ) {
511
+ foreach ( $taxonomies as $taxonomy ) {
512
+ $count = wp_count_terms( $taxonomy, array('hide_empty'=>true) );
513
+ if ( !is_wp_error($count) && $count > 0 )
514
+ $tax_array[] = $taxonomy;
515
+ }
516
+ } else {
517
+ foreach ( xmlsf_public_taxonomies() as $name => $label )
518
+ if ( 0 < wp_count_terms( $name, array('hide_empty'=>true) ) )
519
+ $tax_array[] = $name;
520
+ }
521
+ }
522
+ return $tax_array;
523
+ }
524
+
525
+ /**
526
+ * Get all public (and not empty) taxonomies
527
+ * Returns an array associated taxonomy object names and labels.
528
+ *
529
+ * @since 5.0
530
+ * @param void
531
+ * @return array
532
+ */
533
+ function xmlsf_public_taxonomies() {
534
+ $tax_array = array();
535
+
536
+ foreach ( (array) get_option( 'xmlsf_post_types' ) as $post_type => $settings ) {
537
+ if ( empty($settings['active']) ) continue;
538
+
539
+ $taxonomies = get_object_taxonomies( $post_type, 'objects' );
540
+ // check each tax public flag and term count and append name to array
541
+ foreach ( $taxonomies as $taxonomy ) {
542
+ if ( !empty( $taxonomy->public ) && !in_array( $taxonomy->name, xmlsf()->disabled_taxonomies() ) )
543
+ $tax_array[$taxonomy->name] = $taxonomy->label;
544
+ }
545
+ }
546
+
547
+ return $tax_array;
548
+ }
549
+
550
+ /* -------------------------------------
551
+ * MISSING WORDPRESS FUNCTIONS
552
+ * ------------------------------------- */
553
+
554
+ /**
555
+ * Retrieve first or last post type date data based on timezone.
556
+ * Variation of function _get_last_post_time
557
+ *
558
+ * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
559
+ * @param string $field Field to check. Can be 'date' or 'modified'.
560
+ * @param string $post_type Post type to check. Defaults to 'any'.
561
+ * @param string $which Which to check. Can be 'first' or 'last'. Defaults to 'last'.
562
+ * @param string $m year, month or day period. Can be empty or integer.
563
+ * @return string The date.
564
+ */
565
+ if( !function_exists('_get_post_time') ) {
566
+ function _get_post_time( $timezone, $field, $post_type = 'any', $which = 'last', $m = '' ) {
567
+ global $wpdb;
568
+
569
+ if ( !in_array( $field, array( 'date', 'modified' ) ) ) {
570
+ return false;
571
+ }
572
+
573
+ $timezone = strtolower( $timezone );
574
+
575
+ $m = preg_replace('|[^0-9]|', '', $m);
576
+
577
+ $key = "{$which}post{$field}{$m}:$timezone";
578
+
579
+ if ( 'any' !== $post_type ) {
580
+ $key .= ':' . sanitize_key( $post_type );
581
+ }
582
+
583
+ $date = wp_cache_get( $key, 'timeinfo' );
584
+ if ( false !== $date ) {
585
+ return $date;
586
+ }
587
+
588
+ if ( $post_type === 'any' ) {
589
+ $post_types = get_post_types( array( 'public' => true ) );
590
+ array_walk( $post_types, array( &$wpdb, 'escape_by_ref' ) );
591
+ $post_types = "'" . implode( "', '", $post_types ) . "'";
592
+ } elseif ( is_array($post_type) ) {
593
+ $types = get_post_types( array( 'public' => true ) );
594
+ foreach ( $post_type as $type )
595
+ if ( !in_array( $type, $types ) )
596
+ return false;
597
+ array_walk( $post_type, array( &$wpdb, 'escape_by_ref' ) );
598
+ $post_types = "'" . implode( "', '", $post_type ) . "'";
599
+ } else {
600
+ if ( !in_array( $post_type, get_post_types( array( 'public' => true ) ) ) )
601
+ return false;
602
+ $post_types = "'" . addslashes($post_type) . "'";
603
+ }
604
+
605
+ $where = "post_status='publish' AND post_type IN ({$post_types}) AND post_date_gmt";
606
+
607
+ // If a period is specified in the querystring, add that to the query
608
+ if ( !empty($m) ) {
609
+ $where .= " AND YEAR(post_date)=" . substr($m, 0, 4);
610
+ if ( strlen($m) > 5 ) {
611
+ $where .= " AND MONTH(post_date)=" . substr($m, 4, 2);
612
+ if ( strlen($m) > 7 ) {
613
+ $where .= " AND DAY(post_date)=" . substr($m, 6, 2);
614
+ }
615
+ }
616
+ }
617
+
618
+ $order = ( $which == 'last' ) ? 'DESC' : 'ASC';
619
+
620
+ switch ( $timezone ) {
621
+ case 'gmt':
622
+ $date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE $where ORDER BY post_{$field}_gmt $order LIMIT 1");
623
+ break;
624
+ case 'blog':
625
+ $date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE $where ORDER BY post_{$field}_gmt $order LIMIT 1");
626
+ break;
627
+ case 'server':
628
+ $add_seconds_server = date('Z');
629
+ $date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE $where ORDER BY post_{$field}_gmt $order LIMIT 1");
630
+ break;
631
+ }
632
+
633
+ if ( $date ) {
634
+ wp_cache_set( $key, $date, 'timeinfo' );
635
+
636
+ return $date;
637
+ }
638
+
639
+ return false;
640
+ }
641
+ }
642
+ /* CODE SUGGESTION BY Frédéric Demarle
643
+ * to make this language aware.
644
+
645
+ "SELECT post_{$field}_gmt FROM $wpdb->posts" . PLL()->model->post->join_clause()
646
+ ."WHERE post_status = 'publish' AND post_type IN ({$post_types})" . PLL()->model->post->where_clause( $lang )
647
+ . ORDER BY post_{$field}_gmt DESC LIMIT 1
648
+ */
readme.txt CHANGED
@@ -1,22 +1,23 @@
1
- === XML Sitemap & Google News feeds ===
2
  Contributors: RavanH
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed
4
  Tags: sitemap, xml sitemap, news sitemap, sitemap.xml, robots.txt, Google, Google News, Yahoo, Bing, Yandex, Baidu, seo, feed, Polylang, WPML, image sitemap
5
- Requires at least: 3.2
6
- Tested up to: 4.9
7
- Stable tag: 4.9.4
 
8
 
9
  XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
10
 
11
  == Description ==
12
 
13
- This plugin dynamically creates feeds that comply with the **XML Sitemap** and the **Google News Sitemap** protocol. **Multisite**, **Polylang** and **WPML** compatible and there are no files created. Options can be found on **Settings > Reading** to control which sitemaps, which post and taxonomy types are included, how priority is calculated, who to ping and set additional robots.txt rules.
14
 
15
  The main advantage of this plugin over other XML Sitemap plugins is **simplicity**. No need to change file or folder permissions, move files or spend time tweaking difficult plugin options.
16
 
17
- You, or site owners on your Multisite network, will not be bothered with overly complicated settings like most other XML Sitemap plugins. The default settings will suffice in most cases and XML sitemap values like ChangeFreq and URL Priority are auto-calculated based on post age and comment activity.
18
 
19
- An XML Sitemap Index becomes instantly available on **yourblog.url/sitemap.xml** (or yourblog.url/?feed=sitemap if you're not using a 'fancy' permalink structure) containing references to posts and pages by default, ready for indexing by search engines like Google, Bing, Yahoo, AOL and Ask. When the Google News Sitemap is activated, it will become available on **yourblog.url/sitemap-news.xml** (or yourblog.url/?feed=sitemap-news), ready for indexing by Google News. Both are automatically referenced in the dynamically created **robots.txt** on **yourblog.url/robots.txt** to tell search engines where to find your XML Sitemaps. Google and Bing can be pinged on each new publication.
20
 
21
  Please read the FAQ's for info on how to get your articles listed on Google News.
22
 
@@ -30,39 +31,50 @@ Please read the FAQ's for info on how to get your articles listed on Google News
30
 
31
  = Features =
32
 
 
 
 
 
33
  **XML Sitemap**
34
 
35
  * Sitemap Index with optional inclusion of sitemaps for custom post types, categories and tags.
36
  * Sitemap with custom URLs optional.
37
  * Custom/static sitemaps can be added to the index.
38
- * Completely **automatic** post URL _priority_ and _change frequency_ calculation based on post age and comment and trackback activity.
39
  * Works out-of-the-box, even on **Multisite** installations.
40
  * Optionally include Image tags with caption and title for featured images or attached images.
41
- * Pings Google, Bing & Yahoo, Yandex and Baidu on new post publication.
42
- * Options to define which post types and taxonomies get included in the sitemap and automatic priority calculation rules.
43
- * Set priority per post.
44
- * Exclude individual posts or pages.
 
45
 
46
  **Google News Sitemap**
47
 
48
  * Optionally include Image tags with caption and title for featured images or attached images.
49
  * Options to: set a different News Publication Name, include custom post types or limit inclusion to certain post categories.
50
- * Configure <access>, <genres> and <keywords> tags both globally and post by post
51
  * Pings both Google and Bing on new publications.
52
 
53
- **More**
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
- * Compatible with multi-lingual sites using **Polylang** or **WPML** to allow all languages to be indexed equally.
56
- * Option to add new robots.txt rules. These can be used to further control (read: limit) the indexation of various parts of your site and subsequent spread of pagerank across your sites pages.
57
- * Includes XLS stylesheets for human readable sitemaps.
58
 
59
  = Contribute =
60
 
61
- If you're happy with this plugin as it is, please consider writing a quick [rating](https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/#new-post) or helping other users out on the [support forum](https://wordpress.org/support/plugin/xml-sitemap-feed).
62
 
63
  If you wish to help build this plugin, you're very welcome to [translate it into your language](https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed/) or contribute code on [Github](https://github.com/RavanH/xml-sitemap-feed/).
64
 
65
-
66
  = Credits =
67
 
68
  XML Sitemap Feed was originally based on the discontinued plugin Standard XML Sitemap Generator by Patrick Chia. Since then, it has been completely rewritten and extended in many ways.
@@ -102,7 +114,7 @@ Installed alongside [WordPress MU Sitewide Tags Pages](http://wordpress.org/plug
102
 
103
  = Uninstallation =
104
 
105
- Upon uninstalling the plugin from the Admin > Plugins page, most plugins optiosn will be cleared from the database. However, since by that time the plugin itself is already deactivated, some taxonomies cannot be removed and will remain dormant in the database. See notes in the uninstall.php file.
106
 
107
  On multisite, the uninstall.php *can* loop through all sites in the network to perform the uninstalltion process for each site. However, this does not scale for large networks so it *only* does a per-site uninstallation when `define('XMLSF_MULTISITE_UNINSTALL', true);` is explicitly set in wp-config.php.
108
 
@@ -110,7 +122,11 @@ On multisite, the uninstall.php *can* loop through all sites in the network to p
110
 
111
  = Where are the options? =
112
 
113
- See the XML Sitemaps section on **Settings > Reading**.
 
 
 
 
114
 
115
  = How do I get my latest articles listed on Google News? =
116
 
@@ -118,29 +134,27 @@ Go to [Suggest News Content for Google News](http://www.google.com/support/news_
118
 
119
  You will also want to add the sitemap to your [Google Webmasters Tools account](https://www.google.com/webmasters/tools/) to check its validity and performance. Create an account if you don't have one yet.
120
 
121
- = My Google News Sitemap is empty! =
122
-
123
- The rules of the Google News game are that you do not feed the monster any stale food. Older than 2 days is bad. You need to whip up some fresh chow ;)
124
 
125
- = Can I manipulate values for priority and changefreq? =
126
 
127
- Yes. You can find default settings for priority, changefreq and lastmod on **Settings > Reading**. A fixed priority can be set on a post by post basis too.
128
 
129
  = Do I need to submit the sitemap to search engines? =
130
 
131
  No. In normal circumstances, your site will be indexed by the major search engines before you know it. The search engines will be looking for a robots.txt file and (with this plugin activated) find a pointer in it to the XML Sitemap on your blog. The search engines will return on a regular basis to see if your site has updates.
132
 
133
- Besides that, Google and Bing are pinged upon each new publication.
134
 
135
  **NOTE:** If you have a server _without rewrite rules_, use your blog _without fancy URLs_ (meaning, you have WordPress Permalinks set to the old default value) or have it installed in a _subdirectory_, then read **Do I need to change my robots.txt** for more instructions.
136
 
137
  = Does this plugin ping search engines? =
138
 
139
- Yes, Google and Bing are pinged upon each new publication. Unless you disable this feature on **Settings > Reading**.
140
 
141
  = Do I need to change my robots.txt? =
142
 
143
- That depends. In normal circumstances, if you have no physical robots.txt file in your site root, the new sitemap url will be automatically added to the dynamic robots.txt that is generated by WordPress. But in some cases this might not be the case.
144
 
145
  If you use a static robots.txt file in your website root, you will need to open it in a text editor. If there is already a line with `Sitemap: http://yourblogurl.tld/sitemap.xml` you can just leave it like it is. But if there is no sitemap referrence there, add it (adapted to your site url) to make search engines find your XML Sitemap.
146
 
@@ -148,7 +162,9 @@ Or if you have WP installed in a subdirectory, on a server without rewrite_rules
148
 
149
  = My WordPress powered blog is installed in a subdirectory. Does that change anything? =
150
 
151
- That depends on where the index.php and .htaccess of your installation reside. If they are in the root while the rest of the WP files are installed in a subdir, so the site is accessible from your domain root, you do not have to do anything. It should work out of the box. But if the index.php is together with your wp-config.php and all other WP files in a subdir, meaning your blog is only accessible via that subdir, you need to manage your own robots.txt file in your **domain root**. It _has_ to be in the root (!) and needs a line starting with `Sitemap:` followed by the full URL to the sitemap feed provided by XML Sitemap Feed plugin. Like:
 
 
152
  `
153
  Sitemap: http://yourblogurl.tld/subdir/sitemap.xml
154
  `
@@ -172,14 +188,6 @@ You can also choose to notify major search engines of your new XML sitemap manua
172
 
173
  No. If you have fancy URL's turned ON in WordPress (Permalinks), the sitemap url that you manually submit to Google (if you are impatient) should be `yourblogurl.tld/sitemap.xml` but if you have the Permalinks' Default option set the feed is only available via `yourblog.url/?feed=sitemap`.
174
 
175
- = Where can I customize the xml output? =
176
-
177
- You may edit the XML output in `xml-sitemap-feed/feed-sitemap.php` but be careful not to break Sitemap protocol compliance. Read more on [Sitemaps XML format](http://www.sitemaps.org/protocol.php).
178
-
179
- The stylesheet (to make the sitemap human readable) can be edited in `xml-sitemap-feed/sitemap.xsl.php`.
180
-
181
- Note: your modifications will be overwritten upon the next plugin upgrade!
182
-
183
  = I see no sitemap.xml file in my site root! =
184
 
185
  There is no actual file created. The sitemap is dynamically generated just like a feed.
@@ -225,7 +233,7 @@ Reactivate your plugins one by one to find out which one is causing the problem.
225
 
226
  **404 page instead of robots.txt while sitemap.xml works fine**
227
 
228
- There is a know issue with WordPress (at least up to 2.8) not generating a robots.txt when there are _no posts_ with _published_ status. If you use WordPress as a CMS with only _pages_, this will affect you.
229
 
230
  To get around this, you might either at least write one post and give it _Private_ status or alternatively create your own robots.txt file containing:
231
  `
@@ -254,7 +262,7 @@ A. If you see strange output in the first few lines (head tags) of the source, t
254
 
255
  B. If the source is empty or incomplete then you're probably experiencing an issue with your servers PHP memory limit. In those cases, you should see a messages like `PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted.` in your server/account error log file.
256
 
257
- This can happen on large sites. To avoid these issues, there is an option to split posts over different sitemaps on Settings > Reading. Try different settings, each time revisiting the main sitemap index file and open different sitemaps listed there to check.
258
 
259
  Read more on [Increasing memory allocated to PHP](http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP) (try a value higher than 256M) or ask your hosting provider what you can do.
260
 
@@ -271,14 +279,46 @@ Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3+ both
271
 
272
  == Upgrade Notice ==
273
 
274
- = 4.9.4 =
275
- Bugfixes: double content type filtering and missing featured images (thanks @flyerua)
276
 
 
277
 
278
  == Changelog ==
279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  = 4.9.4 =
281
- * FIX: missing featured images, thanks @flyerua
282
  * FIX: double content type response header filtering
283
 
284
  = 4.9.3 =
1
+ === XML Sitemap & Google News ===
2
  Contributors: RavanH
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed
4
  Tags: sitemap, xml sitemap, news sitemap, sitemap.xml, robots.txt, Google, Google News, Yahoo, Bing, Yandex, Baidu, seo, feed, Polylang, WPML, image sitemap
5
+ Requires at least: 4.4
6
+ Requires PHP: 5.4
7
+ Tested up to: 5.0
8
+ Stable tag: 5.0.7
9
 
10
  XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
11
 
12
  == Description ==
13
 
14
+ This plugin dynamically creates feeds that comply with the **XML Sitemap** and the **Google News Sitemap** protocol. **Multisite**, **Polylang** and **WPML** compatible and there are no files created. There are options to control which sitemaps are enabled, which Post and Taxonomy types are included, how Priority and Lastmod are calculated, who to ping and a possibility to set additional robots.txt rules from within the WordPress admin.
15
 
16
  The main advantage of this plugin over other XML Sitemap plugins is **simplicity**. No need to change file or folder permissions, move files or spend time tweaking difficult plugin options.
17
 
18
+ You, or site owners on your Multisite network, will not be bothered with overly complicated settings like most other XML Sitemap plugins. The default settings will suffice in most cases.
19
 
20
+ An XML Sitemap Index becomes instantly available on **yourblog.url/sitemap.xml** (or yourblog.url/?feed=sitemap if you're not using a 'fancy' permalink structure) containing references to posts and pages by default, ready for indexing by search engines like Google, Bing, Yahoo, AOL and Ask. When the Google News Sitemap is activated, it will become available on **yourblog.url/sitemap-news.xml** (or yourblog.url/?feed=sitemap-news), ready for indexing by Google News. Both are automatically referenced in the dynamically created **robots.txt** on **yourblog.url/robots.txt** to tell search engines where to find your XML Sitemaps. Google and Bing will be pinged on each new publication.
21
 
22
  Please read the FAQ's for info on how to get your articles listed on Google News.
23
 
31
 
32
  = Features =
33
 
34
+ * Compatible with multi-lingual sites using **Polylang** or **WPML** to allow all languages to be indexed equally.
35
+ * Option to add new robots.txt rules. These can be used to further control (read: limit) the indexation of various parts of your site and subsequent spread of pagerank across your sites pages.
36
+ * Includes XLS stylesheets for human readable sitemaps.
37
+
38
  **XML Sitemap**
39
 
40
  * Sitemap Index with optional inclusion of sitemaps for custom post types, categories and tags.
41
  * Sitemap with custom URLs optional.
42
  * Custom/static sitemaps can be added to the index.
 
43
  * Works out-of-the-box, even on **Multisite** installations.
44
  * Optionally include Image tags with caption and title for featured images or attached images.
45
+ * Pings Google, Bing & Yahoo on new post publication.
46
+ * Options to define which post types and if taxonomies get included in the sitemap
47
+ * Updates Lastmod on post modification or on comments.
48
+ * Set Priority per post type, per taxonomy and per individual post.
49
+ * Exclude individual posts and pages.
50
 
51
  **Google News Sitemap**
52
 
53
  * Optionally include Image tags with caption and title for featured images or attached images.
54
  * Options to: set a different News Publication Name, include custom post types or limit inclusion to certain post categories.
 
55
  * Pings both Google and Bing on new publications.
56
 
57
+ = Privacy / GDPR =
58
+
59
+ This plugin does not collect any user or visitor data nor set browser cookies. Using this plugin should not impact your site privacy policy in any way.
60
+
61
+ **Data that is published**
62
+
63
+ An XML Sitemap index, referencing other sitemaps containing your web site's public post URLs of selected post types that are already public, along with their last modification date and associated image URLs, and any selected public archive URLs.
64
+
65
+ A Google News Sitemap containing your web site's public and recent (last 48 hours) URLs of selected news post type, along with their publication time stamp and associated image URL.
66
+
67
+ **Data that is transmitted**
68
+
69
+ Data actively transmitted to search engines is your sitemap location and time of publication. This happens upon each post publication when at least one of the Ping options on Settings > Writing is enabled. In this case, the selected search engines are alerted of the location and updated state of your sitemap.
70
 
 
 
 
71
 
72
  = Contribute =
73
 
74
+ If you're happy with this plugin as it is, please consider writing a quick [rating](https://wordpress.org/support/plugin/xml-sitemap-feed/review/#new-post) or helping other users out on the [support forum](https://wordpress.org/support/plugin/xml-sitemap-feed).
75
 
76
  If you wish to help build this plugin, you're very welcome to [translate it into your language](https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed/) or contribute code on [Github](https://github.com/RavanH/xml-sitemap-feed/).
77
 
 
78
  = Credits =
79
 
80
  XML Sitemap Feed was originally based on the discontinued plugin Standard XML Sitemap Generator by Patrick Chia. Since then, it has been completely rewritten and extended in many ways.
114
 
115
  = Uninstallation =
116
 
117
+ Upon uninstalling the plugin from the Admin > Plugins page, most plugins options will be cleared from the database. Only specific per post settings like post priority or explude option, and taxonomy term lastmod dates will remain dormant in the database. See notes in the uninstall.php file.
118
 
119
  On multisite, the uninstall.php *can* loop through all sites in the network to perform the uninstalltion process for each site. However, this does not scale for large networks so it *only* does a per-site uninstallation when `define('XMLSF_MULTISITE_UNINSTALL', true);` is explicitly set in wp-config.php.
120
 
122
 
123
  = Where are the options? =
124
 
125
+ On **Settings > Reading** you can enable the XML Sitemap Index and (if needed) the Google News Sitemap. There is also an Additional robots.txt rules field.
126
+
127
+ Once a sitemap is enabled, its options can be found on **Settings > XML Sitemap** or on **Settings > Google News**.
128
+
129
+ Ping settings can be found on **Settings > Writing**.
130
 
131
  = How do I get my latest articles listed on Google News? =
132
 
134
 
135
  You will also want to add the sitemap to your [Google Webmasters Tools account](https://www.google.com/webmasters/tools/) to check its validity and performance. Create an account if you don't have one yet.
136
 
137
+ = Can I manipulate values for Priority and Changefreq? =
 
 
138
 
139
+ You can find default settings for Priority on **Settings > XML Sitemap**. A fixed priority can be set on a post by post basis too.
140
 
141
+ Changefreq has been dropped since version 4.9 because it is no longer taken into account by Google.
142
 
143
  = Do I need to submit the sitemap to search engines? =
144
 
145
  No. In normal circumstances, your site will be indexed by the major search engines before you know it. The search engines will be looking for a robots.txt file and (with this plugin activated) find a pointer in it to the XML Sitemap on your blog. The search engines will return on a regular basis to see if your site has updates.
146
 
147
+ Besides that, Google and Bing are pinged upon each new publication by default.
148
 
149
  **NOTE:** If you have a server _without rewrite rules_, use your blog _without fancy URLs_ (meaning, you have WordPress Permalinks set to the old default value) or have it installed in a _subdirectory_, then read **Do I need to change my robots.txt** for more instructions.
150
 
151
  = Does this plugin ping search engines? =
152
 
153
+ Yes, Google and Bing are pinged upon each new publication. Unless you disable this feature on **Settings > Writing**.
154
 
155
  = Do I need to change my robots.txt? =
156
 
157
+ In normal circumstances, if you have no static robots.txt file in your site root, the new sitemap url will be automatically added to the dynamic robots.txt that is generated by WordPress.
158
 
159
  If you use a static robots.txt file in your website root, you will need to open it in a text editor. If there is already a line with `Sitemap: http://yourblogurl.tld/sitemap.xml` you can just leave it like it is. But if there is no sitemap referrence there, add it (adapted to your site url) to make search engines find your XML Sitemap.
160
 
162
 
163
  = My WordPress powered blog is installed in a subdirectory. Does that change anything? =
164
 
165
+ That depends on where the index.php and .htaccess of your installation reside. If they are in the root while the rest of the WP files are installed in a subdir, so the site is accessible from your domain root, you do not have to do anything. It should work out of the box.
166
+
167
+ But if the index.php is together with your wp-config.php and all other WP files in a subdir, meaning your blog is only accessible via that subdir, you need to manage your own robots.txt file in your **domain root**. It _has_ to be in the root (!) and needs a line starting with `Sitemap:` followed by the full URL to the sitemap feed provided by XML Sitemap Feed plugin. Like:
168
  `
169
  Sitemap: http://yourblogurl.tld/subdir/sitemap.xml
170
  `
188
 
189
  No. If you have fancy URL's turned ON in WordPress (Permalinks), the sitemap url that you manually submit to Google (if you are impatient) should be `yourblogurl.tld/sitemap.xml` but if you have the Permalinks' Default option set the feed is only available via `yourblog.url/?feed=sitemap`.
190
 
 
 
 
 
 
 
 
 
191
  = I see no sitemap.xml file in my site root! =
192
 
193
  There is no actual file created. The sitemap is dynamically generated just like a feed.
233
 
234
  **404 page instead of robots.txt while sitemap.xml works fine**
235
 
236
+ There is a known issue with WordPress (at least up to 2.8) not generating a robots.txt when there are _no posts_ with _published_ status. If you use WordPress as a CMS with only _pages_, this will affect you.
237
 
238
  To get around this, you might either at least write one post and give it _Private_ status or alternatively create your own robots.txt file containing:
239
  `
262
 
263
  B. If the source is empty or incomplete then you're probably experiencing an issue with your servers PHP memory limit. In those cases, you should see a messages like `PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted.` in your server/account error log file.
264
 
265
+ This can happen on large sites. To avoid these issues, there is an option to split posts over different sitemaps on Settings > XML Sitemap. Try different settings, each time revisiting the main sitemap index file and open different sitemaps listed there to check.
266
 
267
  Read more on [Increasing memory allocated to PHP](http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP) (try a value higher than 256M) or ask your hosting provider what you can do.
268
 
279
 
280
  == Upgrade Notice ==
281
 
282
+ = 5.0.7 =
 
283
 
284
+ Bugfix release.
285
 
286
  == Changelog ==
287
 
288
+ = 5.0.7 =
289
+ * Allowed domains back to Settings > Reading
290
+ * FIX static files check on activation
291
+ * NEW Admin warning on conflicting plugin settings
292
+ * FIX Empty post priority saved as 0.0
293
+ * FIX Call to undefined function xmlsf_get_archives()
294
+ * FIX force LC_NUMERIC locale to C
295
+ * FIX Call to private method
296
+ * FIX Custom post types with a hyphen not showing
297
+ * FIX Admin static files message fatal error, thanks @kitchin
298
+ * FIX Improper if statement in upgrade routine, thanks @kitchin
299
+ * FIX PHP 5.4 compatibility issues
300
+
301
+ = 5.0 =
302
+ * Complete code restructure and cleanup: MVC and JIT inclusion
303
+ * Fewer DB queries, much smaller memory footprint on normal queries
304
+ * NEW Admin interface with dedicated options pages and help tabs
305
+ * NEW Taxonomy term options: priority and automatic calculation
306
+ * NEW Admin warning on conflicting static files
307
+ * NEW Option to delete conflicting static files
308
+ * NEW Filters for post types: xmlsf_post_types and xmlsf_news_post_types
309
+ * NEW Filters for priority values: xmlsf_post_priority and xmlsf_term_priority
310
+ * Removal of Genre, Keywords and Access tags as Google dropped support
311
+ * Taxonomy term sitemaps speed improvent: get lastmod date from database
312
+ * Exclude Woocommerce product_shipping_class taxonomy
313
+ * PHP 7.2+ compat: create_function deprecated
314
+ * No more domain filtering for custom URLs and sitemaps
315
+ * FIX Gutenberg editor GN genre taxonomy not showing
316
+ * FIX Plain and /index.php/ permalink structure
317
+ * FIX Clear all options on uninstall
318
+ * FIX Pings
319
+
320
  = 4.9.4 =
321
+ * FIX: missing featured images, thanks @flyerua
322
  * FIX: double content type response header filtering
323
 
324
  = 4.9.3 =
uninstall.php CHANGED
@@ -1,5 +1,17 @@
1
  <?php
2
- // if uninstall not called from WordPress exit
 
 
 
 
 
 
 
 
 
 
 
 
3
  if ( !defined('WP_UNINSTALL_PLUGIN') )
4
  exit();
5
 
@@ -15,7 +27,8 @@ class XMLSitemapFeed_Uninstall {
15
  *
16
  * @since 4.4
17
  */
18
- function __construct() {
 
19
  global $wpdb;
20
 
21
  // check if it is a multisite and if XMLSF_MULTISITE_UNINSTALL constant is defined
@@ -37,22 +50,15 @@ class XMLSitemapFeed_Uninstall {
37
  *
38
  * @since 4.4
39
  */
40
- function uninstall($blog_id = false) {
41
- // delete all taxonomy terms
42
- register_taxonomy( 'gn-genre', null );
43
-
44
- $terms = get_terms( 'gn-genre', array('hide_empty' => false) );
45
-
46
- if ( is_array($terms) )
47
- foreach ( $terms as $term )
48
- wp_delete_term( $term->term_id, 'gn-genre' );
49
-
50
  // remove plugin settings
 
51
  delete_option('xmlsf_version');
52
  delete_option('xmlsf_sitemaps');
53
  delete_option('xmlsf_post_types');
54
  delete_option('xmlsf_taxonomies');
55
- delete_option('xmlsf_news_sitemap');
56
  delete_option('xmlsf_ping');
57
  delete_option('xmlsf_robots');
58
  delete_option('xmlsf_urls');
1
  <?php
2
+ /**
3
+ * XMLSF_MULTISITE_UNINSTALL
4
+ *
5
+ * Set this constant in wp-config.php if you want to allow looping over each site
6
+ * in the network to run XMLSitemapFeed_Uninstall->uninstall() defined in uninstall.php
7
+ *
8
+ * Be careful: There is NO batch-processing so it does not scale on large networks!
9
+ *
10
+ * example:
11
+ * define('XMLSF_MULTISITE_UNINSTALL', true);
12
+ */
13
+
14
+ // exit if uninstall not called from WordPress
15
  if ( !defined('WP_UNINSTALL_PLUGIN') )
16
  exit();
17
 
27
  *
28
  * @since 4.4
29
  */
30
+ function __construct()
31
+ {
32
  global $wpdb;
33
 
34
  // check if it is a multisite and if XMLSF_MULTISITE_UNINSTALL constant is defined
50
  *
51
  * @since 4.4
52
  */
53
+ function uninstall($blog_id = false)
54
+ {
 
 
 
 
 
 
 
 
55
  // remove plugin settings
56
+ delete_option('xmlsf_static_files');
57
  delete_option('xmlsf_version');
58
  delete_option('xmlsf_sitemaps');
59
  delete_option('xmlsf_post_types');
60
  delete_option('xmlsf_taxonomies');
61
+ delete_option('xmlsf_taxonomy_settings');
62
  delete_option('xmlsf_ping');
63
  delete_option('xmlsf_robots');
64
  delete_option('xmlsf_urls');
views/_generator.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <!-- generated-on="<?php echo $date; ?>" -->
2
+ <!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
3
+ <!-- generator-url="https://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
4
+ <!-- generator-version="<?php echo XMLSF_VERSION; ?>" -->
views/_usage.php ADDED
@@ -0,0 +1 @@
 
1
+ <!-- Queries executed: <?php echo $num; if ( $mem ) { ?> | Peak memory usage: <?php echo $mem; } ?> -->
views/admin/field-news-categories.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php echo translate('Categories'); ?></legend>
3
+ <p>
4
+ <?php _e('Limit to posts in these post categories:','xml-sitemap-feed'); ?>
5
+ </p>
6
+ <style type"text/css">
7
+ ul.children { padding-left: 1em }
8
+ </style>
9
+ <ul class="cat-checklist">
10
+ <?php echo $cat_list; ?>
11
+ </ul>
12
+ </fieldset>
views/admin/field-news-image.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php echo translate('Images'); ?></legend>
3
+ <label><?php _e('Add image tags for','xml-sitemap-feed'); ?>
4
+ <select name="xmlsf_news_tags[image]">
5
+ <option value=""><?php echo translate('None'); ?></option>
6
+ <option value="featured"<?php echo selected( $image == "featured", true, false); ?>><?php echo translate_with_gettext_context('Featured Image','post'); ?></option>
7
+ <option value="attached"<?php echo selected( $image == "attached", true, false); ?>><?php _e('Attached images','xml-sitemap-feed'); ?></option>
8
+ </select>
9
+ </label>
10
+ </fieldset>
views/admin/field-news-labels.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <fieldset id="xmlsf_news_labels">
2
+ <legend class="screen-reader-text"><?php _e('Source labels','xml-sitemap-feed'); ?></legend>
3
+ <p class="description">
4
+ <?php printf(__('Source labels inside a News Sitemap are no longer supported by Google News. To manage your site\'s labels, please go to the %s.','xml-sitemap-feed'),'<a href="https://news.google.com/publisher" target="_blank">'.__('Google News Publisher Center','xml-sitemap-feed').'</a>'); ?>
5
+ </p>
6
+ </fieldset>
views/admin/field-news-name.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php _e( 'Publication name', 'xml-sitemap-feed' ); ?></legend>
3
+ <input type="text" name="xmlsf_news_tags[name]" id="xmlsf_news_name" value="<?php echo $name; ?>" class="regular-text">
4
+ <p class="description">
5
+ <?php printf( /* translators: Site Title linked to Options > General */ __( 'By default, the general %s setting will be used.', 'xml-sitemap-feed' ), '<a href="options-general.php">'.translate('Site Title').'</a>' ); ?>
6
+ </p>
7
+ </fieldset>
views/admin/field-news-post-type.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php _e('Post type','xml-sitemap-feed'); ?></legend>
3
+ <?php
4
+ foreach ( $post_types as $post_type ) :
5
+ $obj = get_post_type_object( $post_type );
6
+ if ( !is_object( $obj ) )
7
+ continue;
8
+ ?>
9
+ <label>
10
+ <input type="<?php echo $type; ?>" name="xmlsf_news_tags[post_type][]" id="xmlsf_post_type_<?php echo $obj->name; ?>" value="<?php echo $obj->name; ?>"<?php checked( in_array($obj->name, $news_post_type), true ) . disabled( !in_array($obj->name,$allowed), true ); ?> />
11
+ <?php echo $obj->label; ?>
12
+ </label>
13
+ <br/>
14
+ <?php
15
+ endforeach;
16
+ ?>
17
+ <?php //printf(__('At least one post type must be selected. By default, the post type %s will be used.','xml-sitemap-feed'),translate('Posts')); ?>
18
+ <?php if ( $do_warning ) { ?>
19
+ <p class="description">
20
+ <?php _e('Custom post types that do <strong>not</strong> use the post category taxonomy cannot be included as long as any category is selected below.','xml-sitemap-feed'); ?>
21
+ </p>
22
+ <?php } ?>
23
+ </fieldset>
views/admin/field-ping.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset id="xmlsf_ping">
2
+ <legend class="screen-reader-text"><?php echo __('Ping Services','xml-sitemap-feed'); ?></legend>
3
+
4
+ <label>
5
+ <input type="checkbox" name="xmlsf_ping[]" id="xmlsf_ping_google" value="google"<?php echo checked( is_array($options) && in_array('google',$options), true, false); ?> />
6
+ <?php _e('Google','xml-sitemap-feed'); ?>
7
+ </label>
8
+
9
+ <br>
10
+
11
+ <label>
12
+ <input type="checkbox" name="xmlsf_ping[]" id="xmlsf_ping_bing" value="bing"<?php echo checked( is_array($options) && in_array('bing',$options), true, false); ?> />
13
+ <?php _e('Bing & Yahoo','xml-sitemap-feed'); ?>
14
+ </label>
15
+
16
+ </fieldset>
views/admin/field-robots.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php _e('Additional robots.txt rules','xml-sitemap-feed'); ?></legend>
3
+
4
+ <label for="xmlsf_robots"><?php printf(__('Rules that will be appended to the %s generated by WordPress:','xml-sitemap-feed'),'<a href="'.trailingslashit(get_bloginfo('url')).'robots.txt" target="_blank">robots.txt</a>'); ?></label>
5
+ <br/>
6
+ <textarea name="xmlsf_robots" id="xmlsf_robots" class="large-text" cols="50" rows="6"><?php echo esc_attr( trim( get_option('xmlsf_robots','') ) ); ?></textarea>
7
+ </fieldset>
views/admin/field-sitemap-custom.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php _e('External XML Sitemaps','xml-sitemap-feed'); ?></legend>
3
+
4
+ <label for="xmlsf_custom_sitemaps"><?php _e('Additional XML Sitemaps to append to the main XML Sitemap Index:','xml-sitemap-feed'); ?></label>
5
+ <br/>
6
+ <textarea name="xmlsf_custom_sitemaps" id="xmlsf_custom_sitemaps" class="large-text" cols="50" rows="4"><?php echo $lines; ?></textarea>
7
+ </fieldset>
views/admin/field-sitemap-domains.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php _e('Allowed domains','xml-sitemap-feed'); ?></legend>
3
+
4
+ <label for="xmlsf_domains"><?php _e('Additional domains to allow in the XML Sitemaps:','xml-sitemap-feed'); ?></label>
5
+ <br/>
6
+ <textarea name="xmlsf_domains" id="xmlsf_domains" class="large-text" cols="50" rows="4"><?php echo implode("\n",$domains); ?></textarea>
7
+ </fieldset>
views/admin/field-sitemap-post-type.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset id="xmlsf_post_type_<?php echo $obj->name; ?>">
2
+ <legend class="screen-reader-text">
3
+ <?php echo $obj->label; ?>
4
+ </legend>
5
+
6
+ <p>
7
+ <label>
8
+ <input type="checkbox" name="xmlsf_post_types[<?php echo $obj->name; ?>][active]" id="xmlsf_post_types_<?php echo $obj->name; ?>" value="1"<?php checked( !empty($options[$obj->name]["active"]), true); ?> />
9
+ <?php printf( /* translators: Post type name and post count */ __('Include %s', 'xml-sitemap-feed'), $obj->label ); ?> (<?php echo $count->publish; ?>)
10
+ </label>
11
+ </p>
12
+
13
+ <?php
14
+ if ( empty($obj->hierarchical) ) {
15
+ $archive = isset($options[$obj->name]['archive']) ? $options[$obj->name]['archive'] : 'yearly';
16
+ ?>
17
+ <p>
18
+ <label><?php _e('Split by','xml-sitemap-feed'); ?>
19
+ <select name="xmlsf_post_types[<?php echo $obj->name; ?>][archive]" id="xmlsf_post_types_'<?php echo $obj->name; ?>_archive">
20
+ <option value="">
21
+ <?php echo translate('None'); ?>
22
+ </option>
23
+ <option value="yearly"<?php echo selected( $archive == 'yearly', true, false); ?>>
24
+ <?php echo __('Year','xml-sitemap-feed'); ?>
25
+ </option>
26
+ <option value="monthly"<?php echo selected( $archive == 'monthly', true, false); ?>>
27
+ <?php echo __('Month','xml-sitemap-feed'); ?>
28
+ </option>
29
+
30
+ </select>
31
+ </label>
32
+ </p>
33
+ <?php
34
+ }
35
+
36
+ $priority_val = !empty($options[$obj->name]['priority']) ? $options[$obj->name]['priority'] : '0.5';
37
+ $image = isset($options[$obj->name]['tags']['image']) ? $options[$obj->name]['tags']['image'] : 'attached';
38
+ $context = ( $obj->name === 'page' ) ? 'page' : 'post';
39
+ ?>
40
+
41
+ <p>
42
+ <label><?php echo __('Priority','xml-sitemap-feed'); ?>
43
+ <input type="number" step="0.1" min="0.1" max="0.9" name="xmlsf_post_types[<?php echo $obj->name; ?>][priority]" id="xmlsf_post_types_<?php echo $obj->name; ?>_priority" value="<?php echo $priority_val; ?>" class="small-text" />
44
+ </label>
45
+ </p>
46
+
47
+ <p>
48
+ <label>
49
+ <input type="checkbox" name="xmlsf_post_types[<?php echo $obj->name; ?>][dynamic_priority]" value="1"<?php echo checked( !empty($options[$obj->name]['dynamic_priority']), true, false); ?> />
50
+ <?php echo __('Automatic Priority calculation.','xml-sitemap-feed'); ?>
51
+ </label>
52
+ </p>
53
+
54
+ <p>
55
+ <label>
56
+ <input type="checkbox" name="xmlsf_post_types[<?php echo $obj->name; ?>][update_lastmod_on_comments]" value="1"<?php echo checked( !empty($options[$obj->name]["update_lastmod_on_comments"]), true, false); ?> />
57
+ <?php echo __('Update the Last Changed date on each new comment.','xml-sitemap-feed'); ?>
58
+ </label>
59
+ </p>
60
+
61
+ <p>
62
+ <label>
63
+ <?php echo __('Add image tags for','xml-sitemap-feed'); ?>
64
+ <select name="xmlsf_post_types[<?php echo $obj->name; ?>][tags][image]">
65
+ <option value="">
66
+ <?php echo translate('None'); ?>
67
+ </option>
68
+ <option value="featured"<?php echo selected( $image == "featured", true, false); ?>>
69
+ <?php echo translate_with_gettext_context('Featured Image',$context); ?>
70
+ </option>
71
+ <option value="attached"<?php echo selected( $image == "attached", true, false); ?>>
72
+ <?php echo __('Attached images','xml-sitemap-feed'); ?>
73
+ </option>
74
+ </select>
75
+ </label>
76
+ </p>
77
+
78
+ </fieldset>
views/admin/field-sitemap-taxonomies.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset id="xmlsf_taxonomies">
2
+ <legend class="screen-reader-text">
3
+ <?php _e( 'Include taxonomies', 'xml-sitemap-feed' ); ?>
4
+ </legend>
5
+
6
+ <?php
7
+ foreach ( $this->public_taxonomies() as $name => $label ) {
8
+ $tax_list[] = '<label><input type="checkbox" name="'.'xmlsf_taxonomies[]" id="xmlsf_taxonomies_' . $name . '" value="' . $name . '"' .
9
+ checked( in_array( $name, (array) $taxonomies ), true, false ).' /> ' . $label . ' (' . wp_count_terms( $name ) . ')</label>';
10
+ } ?>
11
+ <?php
12
+ echo implode( '<br/>', $tax_list );
13
+ ?>
14
+
15
+ <?php if ( ! $this->public_taxonomies() ) { ?>
16
+ <p class="description warning" style="color: red;">
17
+ <?php _e( 'No taxonomies available for the currently included post types.', 'xml-sitemap-feed' ); ?>
18
+ </p>
19
+ <?php } ?>
20
+ </fieldset>
views/admin/field-sitemap-taxonomy-settings.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset id="xmlsf_taxonomies">
2
+ <legend class="screen-reader-text">
3
+ <?php echo translate( 'General' ); ?>
4
+ </legend>
5
+
6
+ <p>
7
+ <label>
8
+ <input type="checkbox" name="xmlsf_taxonomy_settings[active]" id="xmlsf_taxonomy_active" value="1"<?php checked( !empty( $taxonomy_settings['active'] ), true); ?> />
9
+ <?php _e( 'Include taxonomies', 'xml-sitemap-feed' ); ?> (<?php echo count( $this->public_taxonomies() ); ?>)
10
+ </label>
11
+ <?php if ( ! $this->public_taxonomies() ) { ?>
12
+ <p class="description warning" style="color: red;">
13
+ <?php _e( 'No taxonomies available for the currently included post types.', 'xml-sitemap-feed' ); ?>
14
+ </p>
15
+ <?php } ?>
16
+ </p>
17
+ <p>
18
+ <label>
19
+ <?php _e('Priority','xml-sitemap-feed'); ?>
20
+ <input type="number" step="0.1" min="0.1" max="0.9" name="xmlsf_taxonomy_settings[priority]" id="xmlsf_taxonomy_priority" value="<?php echo ( isset($taxonomy_settings['priority']) ? $taxonomy_settings['priority'] : '' ); ?>" class="small-text" />
21
+ </label>
22
+ </p>
23
+ <p>
24
+ <label>
25
+ <input type="checkbox" name="xmlsf_taxonomy_settings[dynamic_priority]" id="xmlsf_taxonomy_dynamic_priority" value="1"<?php echo checked( !empty($taxonomy_settings['dynamic_priority']), true, false ); ?> />
26
+ <?php _e('Automatic Priority calculation.','xml-sitemap-feed'); ?>
27
+ </label>
28
+ </p>
29
+ <p>
30
+ <label>
31
+ <?php _e('Maximum per sitemap','xml-sitemap-feed'); ?>
32
+ <input type="number" step="1" min="0" max="50000" name="xmlsf_taxonomy_settings[term_limit]" id="xmlsf_taxonomy_term_limit" value="<?php echo ( isset($taxonomy_settings['term_limit']) ? $taxonomy_settings['term_limit'] : '' ); ?>" class="medium-text" />
33
+ </label>
34
+ </p>
35
+
36
+ </fieldset>
views/admin/field-sitemap-urls.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <fieldset>
2
+ <legend class="screen-reader-text"><?php _e('External web pages','xml-sitemap-feed'); ?></legend>
3
+
4
+ <label for="xmlsf_urls"><?php _e('Additional web pages to append in an extra XML Sitemap:','xml-sitemap-feed'); ?></label>
5
+ <br/>
6
+ <textarea name="xmlsf_urls" id="xmlsf_urls" class="large-text" cols="50" rows="4"><?php echo implode("\n",$lines); ?></textarea>
7
+ </fieldset>
views/admin/field-sitemaps.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <fieldset id="xmlsf_sitemaps">
2
+ <legend class="screen-reader-text">
3
+ <?php _e('Enable XML sitemaps','xml-sitemap-feed'); ?>
4
+ </legend>
5
+ <label>
6
+ <input type="checkbox" name="xmlsf_sitemaps[sitemap]" id="xmlsf_sitemaps_index" value="sitemap.xml"<?php echo checked(isset($options['sitemap']), true, false); ?> />
7
+ <?php _e('XML Sitemap Index','xml-sitemap-feed'); ?>
8
+ </label>
9
+
10
+ <?php if ( isset($options['sitemap']) ) {
11
+ $sitemap_url = trailingslashit(get_bloginfo('url')) . ( xmlsf()->plain_permalinks() ? '?feed=sitemap' : $options['sitemap'] );
12
+ ?>
13
+ <span class="description">
14
+ &nbsp;&ndash;&nbsp;
15
+ <a href="<?php echo admin_url('options-general.php'); ?>?page=xmlsf" id="xmlsf_link"><?php echo translate('Settings'); ?></a> |
16
+ <a href="<?php echo $sitemap_url; ?>" target="_blank"><?php echo translate('View'); ?></a>
17
+ </span>
18
+ <?php } ?>
19
+
20
+ <br>
21
+
22
+ <label>
23
+ <input type="checkbox" name="xmlsf_sitemaps[sitemap-news]" id="xmlsf_sitemaps_news" value="sitemap-news.xml"<?php echo checked(isset($options['sitemap-news']), true, false); ?> />
24
+ <?php _e('Google News Sitemap','xml-sitemap-feed'); ?>
25
+ </label>
26
+
27
+ <?php if (isset($options['sitemap-news'])) {
28
+ $news_url = trailingslashit(get_bloginfo('url')) . ( xmlsf()->plain_permalinks() ? '?feed=sitemap-news' : $options['sitemap-news'] );
29
+ ?>
30
+ <span class="description">
31
+ &nbsp;&ndash;&nbsp;
32
+ <a href="<?php echo admin_url('options-general.php'); ?>?page=xmlsf-news" id="xmlsf_news_link"><?php echo translate('Settings'); ?></a> |
33
+ <a href="<?php echo $news_url; ?>" target="_blank"><?php echo translate('View'); ?></a>
34
+ </span>
35
+ <?php } ?>
36
+
37
+ </fieldset>
views/admin/help-tab-advanced.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <strong><?php _e( 'External web pages', 'xml-sitemap-feed' ); ?></strong>
3
+ <br />
4
+ <?php _e( 'Add the full URL, including protocol (http/https) and domain.', 'xml-sitemap-feed' ); ?>
5
+ <?php _e( 'Optionally add a priority value between 0 and 1, separated with a space after the URL.', 'xml-sitemap-feed' ); ?>
6
+ <?php _e( 'Start each URL on a new line.', 'xml-sitemap-feed' ); ?>
7
+ </p>
8
+ <p>
9
+ <strong><?php _e( 'External XML Sitemaps', 'xml-sitemap-feed' ); ?></strong>
10
+ <br />
11
+ <?php _e('Add the full URL, including protocol (http/https) and domain.','xml-sitemap-feed'); ?>
12
+ <?php _e('Start each URL on a new line.','xml-sitemap-feed'); ?>
13
+ <br>
14
+ <span style="color: red" class="warning">
15
+ <?php _e('Only valid sitemaps are allowed in the Sitemap Index. Use your Google/Bing Webmaster Tools to verify!','xml-sitemap-feed'); ?>
16
+ </span>
17
+ </p>
views/admin/help-tab-allowed-domains.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <p>
2
+ <?php printf( /* translators: WordPress site domain */ __( 'By default, only the domain %s as used in your WordPress site address is allowed.','xml-sitemap-feed'), '<strong>'.parse_url( home_url(), PHP_URL_HOST ).'</strong>' ); ?>
3
+ <?php _e( 'This means that all URLs that use another domain (custom URLs or using a plugin like Page Links To) are filtered from the XML Sitemap. However, if you are the verified owner of other domains in your Google/Bing Webmaster Tools account, you can include these in the same sitemap. Add these domains, without protocol (http/https) each on a new line. Note that if you enter a domain with www, all URLs without it or with other subdomains will be filtered.','xml-sitemap-feed'); ?>
4
+ </p>
views/admin/help-tab-news-categories.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <p>
2
+ <?php _e('If you wish to limit posts that will feature in your News Sitemap to certain categories, select them here. If no categories are selected, posts of all categories will be included in your News Sitemap.','xml-sitemap-feed'); ?>
3
+ </p>
views/admin/help-tab-news-images.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p>
2
+ <?php _e( 'Google News displays images associated with articles included in their index.', 'xml-sitemap-feed' ); ?>
3
+ </p>
4
+ <p>
5
+ <?php _e( 'Note: Google News prefers at most one image per article in the News Sitemap. If multiple valid images are specified, the crawler will have to pick one arbitrarily. Images in News Sitemaps should be in jpeg or png format.', 'xml-sitemap-feed' ); ?>
6
+ <?php printf( /* translators: Prevent missing or incorrect images help page */ __( 'Read more on %s.', 'xml-sitemap-feed' ), '<a href="https://support.google.com/news/publisher/answer/13369" target="_blank">'.__( /* translators: PAge title https://support.google.com/news/publisher/answer/13369 */ 'Prevent missing or incorrect images','xml-sitemap-feed').'</a>' ); ?>
7
+ </p>
views/admin/help-tab-news-labels.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <?php _e('Source labels provide more information about the content of your articles.','xml-sitemap-feed'); ?>
3
+ </p>
4
+ <p>
5
+ <?php printf(__('Source labels inside a News Sitemap are no longer supported by Google News. To manage your site\'s labels, please go to the %s.','xml-sitemap-feed'),'<a href="https://news.google.com/publisher" target="_blank">'.__('Google News Publisher Center','xml-sitemap-feed').'</a>'); ?>
6
+ <?php _e('The FactCheck label may only be applied if you publish stories with fact-checking content that\'s indicated by schema.org ClaimReview markup.','xml-sitemap-feed'); ?>
7
+ <?php printf(__('Read more about source labels on %s','xml-sitemap-feed'),'<a href="https://support.google.com/news/publisher/answer/4582731" target="_blank">'.__('What does each source label mean?','xml-sitemap-feed').'</a>'); ?>
8
+ </p>
views/admin/help-tab-news-name.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <p>
2
+ <?php printf( /* translators: Site Title linked to Options > General */ __( 'By default, the general %s setting will be used.', 'xml-sitemap-feed' ), '<a href="options-general.php">'.translate('Site Title').'</a>' ); ?>
3
+ <?php _e( 'The publication name should match the name submitted on the Google News Publisher Center. If you wish to change it, please read <a href="https://support.google.com/news/publisher/answer/40402" target="_blank">Updated publication name</a>.', 'xml-sitemap-feed' ); ?>
4
+ </p>
views/admin/help-tab-news-sidebar.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <strong><?php echo translate('For more information:'); ?></strong>
3
+ </p>
4
+ <p>
5
+ <a href="https://support.google.com/webmasters/answer/183669" target="_blank"><?php _e( /* https://support.google.com/webmasters/answer/183669 */ 'Manage sitemaps with the Sitemaps report', 'xml-sitemap-feed' ); ?></a>
6
+ </p>
7
+ <p>
8
+ <a href="https://support.google.com/news/publisher/answer/13369" target="_blank"><?php _e( /* https://support.google.com/news/publisher-center/answer/13369 */ 'Prevent missing or incorrect images', 'xml-sitemap-feed' ); ?></a>
9
+ </p>
10
+ <p>
11
+ <a href="https://support.google.com/news/publisher-center/topic/9010385" target="_blank"><?php _e( /* https://support.google.com/news/publisher-center/topic/9010385 */ 'Troubleshoot an issue', 'xml-sitemap-feed' ); ?></a>
12
+ </p>
views/admin/help-tab-news.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <p>
2
+ <?php _e('When you are done configuring and preparing your news content and you are convinced your site adheres to the <a href="https://support.google.com/news/publisher/answer/40787" target="_blank">Google News guidelines</a>, go ahead and <a href="https://partnerdash.google.com/partnerdash/d/news" target="_blank">submit your site for inclusion</a>!','xml-sitemap-feed'); ?>
3
+ <?php _e('It is strongly recommended to submit your news sitemap to your Google Webmasters Tools account to monitor for warnings or errors.','xml-sitemap-feed'); ?>
4
+ </p>
views/admin/help-tab-ping.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <?php printf (
3
+ /* translators: Plugin name, Reading Settings URL */
4
+ __( 'If desired, %1$s will automatically alert search engines of your updated <a href="%2$s">XML Sitemaps</a> upon each new publication.', 'xml-sitemap-feed' ),
5
+ __('XML Sitemap & Google News','xml-sitemap-feed'), admin_url('options-reading.php')
6
+ ); ?>
7
+ </p>
8
+ <p>
9
+ <?php _e('Pings are limited to once per hour for your XML Sitemap and once per 5 minutes for your Google News Sitemap.', 'xml-sitemap-feed'); ?>
10
+ </p>
views/admin/help-tab-post-types.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <strong><?php _e( 'Split by', 'xml-sitemap-feed' ); ?></strong>
3
+ <br />
4
+ <?php _e( /* "Split by" and "Month" are used in the option */ 'Choose Split by Month if you experience errors or slow sitemaps.', 'xml-sitemap-feed' ); ?>
5
+ </p>
6
+ <p>
7
+ <strong><?php _e( 'Priority', 'xml-sitemap-feed' ); ?></strong>
8
+ <br />
9
+ <?php echo __( 'Priority can be overridden on individual posts.', 'xml-sitemap-feed' ); ?>
10
+ </p>
11
+ <p>
12
+ <strong><?php _e( 'Automatic Priority calculation.', 'xml-sitemap-feed' ); ?></strong>
13
+ <br />
14
+ <?php echo __( 'Adjusts the Priority based on factors like age, comments, sticky post or blog page.', 'xml-sitemap-feed' ); ?>
15
+ </p>
views/admin/help-tab-robots.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p>
2
+ <?php _e('These rules will not have effect when you are using a static robots.txt file.','xml-sitemap-feed'); ?>
3
+ <br>
4
+ <span style="color: red" class="warning">
5
+ <?php _e('Only add rules here when you know what you are doing, otherwise you might break search engine access to your site.','xml-sitemap-feed'); ?>
6
+ </span>
7
+ </p>
views/admin/help-tab-sidebar.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <strong><?php echo translate('For more information:'); ?></strong>
3
+ </p>
4
+ <p>
5
+ <a href="https://support.google.com/webmasters/answer/156184" target="_blank"><?php _e( /* https://support.google.com/webmasters/answer/156184 */ 'Learn more about sitemaps on Google Search Console Help', 'xml-sitemap-feed' ); ?></a>
6
+ </p>
7
+ <p>
8
+ <a href="https://moz.com/blog/xml-sitemaps" target="_blank"><?php _e( /* https://moz.com/blog/xml-sitemaps */ 'XML Sitemaps: The Most Misunderstood Tool in the SEO\'s Toolbox', 'xml-sitemap-feed' ); ?></a>
9
+ </p>
views/admin/help-tab-sitemaps.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <p>
2
+ <?php _e( /* https://support.google.com/webmasters/answer/156184 */ 'XML sitemaps list the web pages of your site to tell search engines about the organization of your site content. Search engine web crawlers read this file to more intelligently crawl your site.', 'xml-sitemap-feed' ); ?>
3
+ </p>
views/admin/help-tab-support.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <hr />
2
+ <p class="description">
3
+ <?php printf (
4
+ /* translators: Plugin name, Support forum URL on WordPress.org */
5
+ __( 'These options are provided by %1$s. For help, please go to <a href="%2$s" target="_blank">Support</a>.', 'xml-sitemap-feed' ),
6
+ '<strong>'.__('XML Sitemap & Google News','xml-sitemap-feed') . '</strong>', 'https://wordpress.org/support/plugin/xml-sitemap-feed'
7
+ ); ?>
8
+ <?php printf (
9
+ /* translators: Review page URL and Translation page URL on WordPress.org */
10
+ __( 'If you would like to contribute and share with the rest of the WordPress community, please consider writing a quick <a href="%1$s" target="_blank">Review</a> or help out with <a href="%2$s" target="_blank">Translating</a>!', 'xml-sitemap-feed' ),
11
+ 'https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/', 'https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed'
12
+ ); ?>
13
+ <?php printf (
14
+ /* translators: Github project URL */
15
+ __( 'For feature requests, reporting issues or contributing code, you can find and fork this plugin on <a href="%s" target="_blank">Github</a>.', 'xml-sitemap-feed' ),
16
+ 'https://github.com/RavanH/xml-sitemap-feed'
17
+ ); ?>
18
+ </p>
views/admin/help-tab-taxonomies.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <strong><?php _e( 'Automatic Priority calculation.', 'xml-sitemap-feed' ); ?></strong>
3
+ <br />
4
+ <?php echo __('Adjusts the Priority of each taxonomy term based on the relative number of attributed posts.','xml-sitemap-feed'); ?>
5
+ </p>
6
+ <p>
7
+ <strong><?php _e( 'Maximum per sitemap', 'xml-sitemap-feed' ); ?></strong>
8
+ <br />
9
+ <?php _e( 'The absolute maximum allowed is 50.000 per sitemap. Reduce this number if you experience errors or slow sitemaps.', 'xml-sitemap-feed' ); ?>
10
+ </p>
views/admin/help-tab-tools.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <strong><?php echo translate('Tools'); ?></strong>
3
+ </p>
4
+ <form action="" method="post">
5
+ <?php wp_nonce_field( XMLSF_BASENAME.'-help', '_xmlsf_help_nonce' ); ?>
6
+ <input type="submit" name="xmlsf-check-conflicts" class="button button-small" value="<?php _e( 'Check for conflicts', 'xml-sitemap-feed' ); ?>" /> &nbsp;
7
+ <input type="submit" name="xmlsf-clear-settings" class="button button-small" value="<?php _e( 'Reset all XML Sitemap settings', 'xml-sitemap-feed' ); ?>" onclick="javascript:return confirm('<?php _e('Clear all XML Sitemap & Google News Sitemap settings.','xml-sitemap-feed'); ?> <?php _e('This will revert all your sitemap settings to the plugin defaults.','xml-sitemap-feed'); ?>\n\n<?php echo translate('Are you sure you want to do this?'); ?>')" />
8
+ </form>
views/admin/meta-box-news.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p>
2
+ <label>
3
+ <input type="checkbox" name="xmlsf_news_exclude" id="xmlsf_news_exclude" value="1"<?php echo checked( !empty($exclude ), true, false) . disabled( $disabled, true, false); ?> />
4
+ <?php _e('Exclude from Google News Sitemap','xml-sitemap-feed'); ?>
5
+ </label>
6
+ </p>
7
+
views/admin/meta-box.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <label>
3
+ <?php _e('Priority','xml-sitemap-feed'); ?>
4
+ <input type="number" step="0.1" min="0" max="1" name="xmlsf_priority" id="xmlsf_priority" value="<?php echo $priority; ?>" class="small-text"<?php echo disabled( $disabled, true, false )?> />
5
+ </label>
6
+ <span class="description">
7
+ <?php echo $description; ?>
8
+ </span>
9
+ </p>
10
+ <p>
11
+ <label>
12
+ <input type="checkbox" name="xmlsf_exclude" id="xmlsf_exclude" value="1"<?php echo checked( !empty($exclude ), true, false) . disabled( $disabled, true, false ); ?> />
13
+ <?php _e('Exclude from XML Sitemap','xml-sitemap-feed'); ?>
14
+ </label>
15
+ </p>
views/admin/notice-cleared.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="notice notice-success fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('All XML Sitemap & Google News settings reset to the plugin defaults.','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ </div>
views/admin/notice-date-redirect.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="notice notice-error fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('XML Sitemap & Google News','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ <p>
6
+ <?php printf( /* translators: Date archives, Archives (linked to WP SEO plugin settings), Split by, None, Included post types (linked to Sitemap settings) */
7
+ __( 'A setting in the WordPress SEO plugin causes all date based sitemaps to redirect to the main page. Please either enable <strong>%1$s</strong> under %2$s in your SEO settings or set all <strong>%3$s</strong> options to <strong>%4$s</strong> under %5$s in your XML Sitemap settings.', 'xml-sitemap-feed'),
8
+ translate('Date archives','wordpress-seo'),
9
+ '<a href="' . admin_url('admin.php') . '?page=wpseo_titles#top#archives">' . translate('Archives','wordpress-seo') . '</a>',
10
+ __('Split by','xml-sitemap-feed'),
11
+ translate('None'),
12
+ '<a href="' . admin_url('options-general.php') . '?page=xmlsf">' . __('Included post types','xml-sitemap-feed') . '</a>'
13
+ );
14
+ ?>
15
+ </p>
16
+ <form action="" method="post">
17
+ <?php wp_nonce_field( XMLSF_BASENAME.'-notice', '_xmlsf_notice_nonce' ); ?>
18
+ <p>
19
+ <input type="submit" class="button button-small" name="xmlsf-date-dismiss" value="<?php echo translate('Dismiss'); ?>" />
20
+ </p>
21
+ </form>
22
+ </div>
views/admin/notice-deleted.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="notice notice-success fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('File deleted.','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ </div>
views/admin/notice-failed.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <div class="notice notice-error fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('Failed to delete file.','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ <p>
6
+ <?php _e('This is possibly due to insufficient rights. Please try via FTP or your hosting provider control panel.','xml-sitemap-feed'); ?></strong>
7
+ </p>
8
+ </div>
views/admin/notice-nonce-error.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="notice notice-error fade is-dismissible">
2
+ <p>
3
+ <strong><?php echo translate('Security check failed.') ?></strong>
4
+ </p>
5
+ </div>
views/admin/notice-none-found.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="notice notice-info fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('No conflicting static files found.','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ </div>
views/admin/notice-not-allowed.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="notice notice-error fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('File not in the list of allowed files!','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ </div>
views/admin/notice-static-files.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="notice notice-warning fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('XML Sitemap & Google News','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ <p>
6
+ <?php printf( /* translators: %1$s number of files, %2$s is Reading Settings URL */ _n(
7
+ 'The following static file has been found. Either delete it or disable the conflicting <a href="%2$s">sitemap</a>.',
8
+ 'The following %1$s static files have been found. Either delete them or disable the conflicting <a href="%2$s">sitemaps</a>.',
9
+ $number,'xml-sitemap-feed'), number_format_i18n($number), admin_url('options-reading.php') . '#blog_public' ); ?>
10
+ </p>
11
+ <form action="" method="post">
12
+ <?php wp_nonce_field( XMLSF_BASENAME.'-notice', '_xmlsf_notice_nonce' ); ?>
13
+ <ul>
14
+ <?php foreach (parent::$static_files as $name => $file) { ?>
15
+ <li>
16
+ <label><input type="checkbox" name="xmlsf-delete[]" value="<?php echo $name; ?>" /> <strong><?php echo $name; ?></strong> (<?php echo $file; ?>)</label>
17
+ </li>
18
+ <?php } ?>
19
+ </ul>
20
+ <p>
21
+ <input type="submit" class="button button-small" name="xmlsf-delete-submit" value="<?php _e('Delete selected files','xml-sitemap-feed'); ?>" onclick="return confirm('<?php _e('Attempt to delete selected conflicting files.','xml-sitemap-feed'); ?>\n\n<?php echo translate('Are you sure you want to do this?'); ?>')" />
22
+ &nbsp;
23
+ <input type="hidden" name="xmlsf-dismiss" value="static_files" />
24
+ <input type="submit" class="button button-small" name="xmlsf-static-dismiss" value="<?php echo translate('Dismiss'); ?>" />
25
+ </p>
26
+ </form>
27
+ </div>
views/admin/notice-wpseo-date-redirect.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="notice notice-error fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('XML Sitemap & Google News','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ <p>
6
+ <?php printf( /* translators: Date archives, Archives (linked to WP SEO plugin settings), Split by, None, Included post types (linked to Sitemap settings) */
7
+ __( 'A setting in the WordPress SEO plugin causes all date based sitemaps to redirect to the main page. Please either enable <strong>%1$s</strong> under %2$s in your SEO settings or set all <strong>%3$s</strong> options to <strong>%4$s</strong> under %5$s in your XML Sitemap settings.', 'xml-sitemap-feed'),
8
+ translate('Date archives','wordpress-seo'),
9
+ '<a href="' . admin_url('admin.php') . '?page=wpseo_titles#top#archives">' . translate('Archives','wordpress-seo') . '</a>',
10
+ __('Split by','xml-sitemap-feed'),
11
+ translate('None'),
12
+ '<a href="' . admin_url('options-general.php') . '?page=xmlsf">' . __('Included post types','xml-sitemap-feed') . '</a>'
13
+ );
14
+ ?>
15
+ </p>
16
+ <form action="" method="post">
17
+ <?php wp_nonce_field( XMLSF_BASENAME.'-notice', '_xmlsf_notice_nonce' ); ?>
18
+ <p>
19
+ <input type="hidden" name="xmlsf-dismiss" value="date_redirect" />
20
+ <input type="submit" class="button button-small" name="xmlsf-date-dismiss" value="<?php echo translate('Dismiss'); ?>" />
21
+ </p>
22
+ </form>
23
+ </div>
views/admin/notice-wpseo-sitemap.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="notice notice-warning fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('XML Sitemap & Google News','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ <p>
6
+ <?php printf( /* translators: Plugn name, Features (linked to WP SEO plugin settings), XML Sitemap Index, Reading Settings admin page (linked to Reading settings) */
7
+ __( 'The WordPress SEO plugin may be used in conjunction with %1$s but it is not advised to have the same feature enabled in both plugins. Please either disable the Yoast sitemap under %2$s in your SEO settings or disable the option %3$s on %4$s.', 'xml-sitemap-feed'),
8
+ __('XML Sitemap & Google News','xml-sitemap-feed'),
9
+ '<a href="' . admin_url('admin.php') . '?page=wpseo_dashboard#top#features">' . translate('Features','wordpress-seo') . '</a>',
10
+ __('XML Sitemap Index','xml-sitemap-feed'),
11
+ '<a href="' . admin_url('options-reading.php') . '#blog_public">' . translate('Reading Settings') . '</a>'
12
+ );
13
+ ?>
14
+ </p>
15
+ <form action="" method="post">
16
+ <?php wp_nonce_field( XMLSF_BASENAME.'-notice', '_xmlsf_notice_nonce' ); ?>
17
+ <p>
18
+ <input type="hidden" name="xmlsf-dismiss" value="wpseo_sitemap" />
19
+ <input type="submit" class="button button-small" name="xmlsf-dismiss-submit" value="<?php echo translate('Dismiss'); ?>" />
20
+ </p>
21
+ </form>
22
+ </div>
views/admin/notice.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="notice notice-warning fade is-dismissible">
2
+ <p>
3
+ <strong><?php _e('XML Sitemap & Google News','xml-sitemap-feed'); ?></strong>
4
+ </p>
5
+ <p>
6
+ <?php printf( /* translators: %1$s number of files, %2$s is Reading Settings URL */ _n(
7
+ 'The following static file has been found. Either delete it or disable the conflicting <a href="%2$s">sitemap</a>.',
8
+ 'The following %1$s static files have been found. Either delete them or disable the conflicting <a href="%2$s">sitemaps</a>.',
9
+ $number,'xml-sitemap-feed'), number_format_i18n($number), admin_url('options-reading.php') . '#blog_public' ); ?>
10
+ </p>
11
+ <form action="" method="post">
12
+ <?php wp_nonce_field( XMLSF_BASENAME.'-notice', '_xmlsf_notice_nonce' ); ?>
13
+ <ul>
14
+ <?php foreach (parent::$static_files as $name => $file) { ?>
15
+ <li>
16
+ <label><input type="checkbox" name="xmlsf-delete[]" value="<?php echo $name; ?>" /> <strong><?php echo $name; ?></strong> (<?php echo $file; ?>)</label>
17
+ </li>
18
+ <?php } ?>
19
+ </ul>
20
+ <p>
21
+ <input type="submit" class="button button-small" name="xmlsf-delete-submit" value="<?php _e('Delete selected files','xml-sitemap-feed'); ?>" onclick="return confirm('<?php _e('Attempt to delete selected conflicting files.','xml-sitemap-feed'); ?>\n\n<?php echo translate('Are you sure you want to do this?'); ?>')" />
22
+ &nbsp;
23
+ <input type="submit" class="button button-small" name="xmlsf-static-dismiss" value="<?php echo translate('Dismiss'); ?>" />
24
+ </p>
25
+ </form>
26
+ </div>
views/admin/page-sitemap-news.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style type="text/css">
2
+ <?php include XMLSF_DIR . '/views/styles/admin.css'; ?>
3
+ </style>
4
+ <div class="wrap">
5
+
6
+ <h1><?php _e('Google News Sitemap','xml-sitemap-feed'); ?></h1>
7
+
8
+ <p>
9
+ <?php printf( __( 'These settings control the Google News Sitemap generated by the %s plugin.', 'xml-sitemap-feed' ), __( 'XML Sitemap & Google News', 'xml-sitemap-feed' ) ); ?>
10
+ <?php printf( /* translators: Writing Settings URL */ __( 'For ping options, go to %s.', 'xml-sitemap-feed' ), '<a href="options-writing.php">'.translate('Writing Settings').'</a>' ); ?>
11
+ </p>
12
+
13
+ <?php do_action('xmlsf_news_settings_before'); ?>
14
+
15
+ <div class="main">
16
+ <form method="post" action="options.php">
17
+
18
+ <?php settings_fields( 'xmlsf-news' ); ?>
19
+
20
+ <?php do_settings_sections( 'xmlsf-news' ); ?>
21
+
22
+ <?php do_action('xmlsf_news_settings_after'); ?>
23
+
24
+ <?php submit_button(); ?>
25
+
26
+ </form>
27
+ </div>
28
+
29
+ <div class="sidebar">
30
+ <h3><span class="dashicons dashicons-welcome-view-site"></span> <?php echo translate('View'); ?></h3>
31
+ <p>
32
+ <?php
33
+ printf (
34
+ /* translators: Sitemap name with URL */
35
+ __( 'Open your %s', 'xml-sitemap-feed' ),
36
+ '<strong><a href="'.$url.'" target="_blank">'.__('Google News Sitemap','xml-sitemap-feed') . '</a></strong><span class="dashicons dashicons-external"></span>'
37
+ ); ?>
38
+ </p>
39
+
40
+ <h3><span class="dashicons dashicons-admin-tools"></span> <?php echo translate('Tools'); ?></h3>
41
+ <form action="" method="post">
42
+ <?php wp_nonce_field( XMLSF_BASENAME.'-help', '_xmlsf_help_nonce' ); ?>
43
+ <input type="submit" name="xmlsf-check-conflicts" class="button button-small" value="<?php _e( 'Check for conflicts', 'xml-sitemap-feed' ); ?>" />
44
+ </form>
45
+
46
+ <?php include XMLSF_DIR . '/views/admin/sidebar-help.php'; ?>
47
+
48
+ <?php include XMLSF_DIR . '/views/admin/help-tab-news-sidebar.php'; ?>
49
+
50
+ <?php include XMLSF_DIR . '/views/admin/sidebar-contribute.php'; ?>
51
+
52
+ </div>
53
+
54
+ </div>
views/admin/page-sitemap.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style type="text/css">
2
+ <?php include XMLSF_DIR . '/views/styles/admin.css'; ?>
3
+ </style>
4
+ <div class="wrap">
5
+
6
+ <h1><?php _e('XML Sitemap','xml-sitemap-feed'); ?></h1>
7
+
8
+ <p>
9
+ <?php printf( /* translators: Plugin name */ __('These settings control the XML Sitemaps generated by the %s plugin.','xml-sitemap-feed'),__('XML Sitemap & Google News','xml-sitemap-feed')); ?>
10
+ <?php printf( /* translators: Writing Settings URL */ __('For ping options, go to %s.','xml-sitemap-feed'),'<a href="options-writing.php">'.translate('Writing Settings').'</a>'); ?>
11
+ </p>
12
+
13
+ <nav class="nav-tab-wrapper">
14
+ <a href="?page=xmlsf&tab=post_types" class="nav-tab <?php echo $active_tab == 'post_types' ? 'nav-tab-active' : ''; ?>"><?php _e('Post types','xml-sitemap-feed'); ?></a>
15
+ <a href="?page=xmlsf&tab=taxonomies" class="nav-tab <?php echo $active_tab == 'taxonomies' ? 'nav-tab-active' : ''; ?>"><?php _e('Taxonomies','xml-sitemap-feed'); ?></a>
16
+ <a href="?page=xmlsf&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>"><?php echo translate('Advanced'); ?></a>
17
+ </nav>
18
+
19
+ <div class="main">
20
+ <form method="post" action="options.php">
21
+
22
+ <?php settings_fields( 'xmlsf_'.$active_tab ); ?>
23
+
24
+ <?php do_settings_sections( 'xmlsf_'.$active_tab ); ?>
25
+
26
+ <?php submit_button(); ?>
27
+
28
+ </form>
29
+ </div>
30
+
31
+ <div class="sidebar">
32
+ <h3><span class="dashicons dashicons-welcome-view-site"></span> <?php echo translate('View'); ?></h3>
33
+ <p>
34
+ <?php
35
+ printf (
36
+ /* translators: Sitemap name with URL */
37
+ __( 'Open your %s', 'xml-sitemap-feed' ),
38
+ '<strong><a href="'.$url.'" target="_blank">'.__('XML Sitemap Index','xml-sitemap-feed') . '</a></strong><span class="dashicons dashicons-external"></span>'
39
+ ); ?>
40
+ </p>
41
+
42
+ <h3><span class="dashicons dashicons-admin-tools"></span> <?php echo translate('Tools'); ?></h3>
43
+ <form action="" method="post">
44
+ <?php wp_nonce_field( XMLSF_BASENAME.'-help', '_xmlsf_help_nonce' ); ?>
45
+ <input type="submit" name="xmlsf-check-conflicts" class="button button-small" value="<?php _e( 'Check for conflicts', 'xml-sitemap-feed' ); ?>" /> &nbsp;
46
+ <input type="submit" name="xmlsf-clear-settings" class="button button-small" value="<?php _e( 'Reset XML sitemaps', 'xml-sitemap-feed' ); ?>" onclick="javascript:return confirm('<?php _e('Clear all XML Sitemap & Google News Sitemap settings.','xml-sitemap-feed'); ?> <?php _e('This will revert all your sitemap settings to the plugin defaults.','xml-sitemap-feed'); ?>\n\n<?php echo translate('Are you sure you want to do this?'); ?>')" />
47
+ </form>
48
+
49
+ <?php include XMLSF_DIR . '/views/admin/sidebar-help.php'; ?>
50
+
51
+ <?php include XMLSF_DIR . '/views/admin/help-tab-sidebar.php'; ?>
52
+
53
+ <?php include XMLSF_DIR . '/views/admin/sidebar-contribute.php'; ?>
54
+
55
+ </div>
56
+
57
+ </div>
views/admin/sidebar-contribute.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h3><span class="dashicons dashicons-thumbs-up"></span> <?php _e('Contribute','xml-sitemap-feed'); ?></h3>
2
+ <p>
3
+ <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feeds&item_number=version%20<?php echo XMLSF_VERSION; ?>&no_shipping=0&tax=0&charset=UTF%2d8"
4
+ title="<?php printf(__('Donate to keep the free %s plugin development & support going!','xml-sitemap-feed'),__('XML Sitemap & Google News','xml-sitemap-feed')); ?>">
5
+ <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:4px 0 0 10px" width="92" height="26" />
6
+ </a>
7
+ <?php printf (
8
+ /* translators: Review page URL and Translation page URL on WordPress.org */
9
+ __( 'If you would like to contribute and share with the rest of the WordPress community, please consider writing a quick <a href="%1$s" target="_blank">Review</a> or help out with <a href="%2$s" target="_blank">Translating</a>!', 'xml-sitemap-feed' ),
10
+ 'https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/', 'https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed'
11
+ ); ?>
12
+ </p>
13
+ <p>
14
+ <?php printf (
15
+ /* translators: Github project URL */
16
+ __( 'For feature requests, reporting issues or contributing code, you can find and fork this plugin on <a href="%s" target="_blank">Github</a>.', 'xml-sitemap-feed' ),
17
+ 'https://github.com/RavanH/xml-sitemap-feed'
18
+ ); ?>
19
+ </p>
views/admin/sidebar-help.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <h3><span class="dashicons dashicons-sos"></span> <?php echo translate('Help'); ?></h3>
2
+ <p>
3
+ <?php printf (
4
+ /* translators: Support forum URL on WordPress.org */
5
+ __( 'You can find instructions on the help tab above. If you still have questions, please go to the <a href="%s" target="_blank">Support forum</a>.', 'xml-sitemap-feed' ),
6
+ 'https://wordpress.org/support/plugin/xml-sitemap-feed'
7
+ ); ?>
8
+ </p>
{includes → views}/feed-sitemap-custom.php RENAMED
@@ -7,11 +7,10 @@
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
- global $xmlsf;
11
-
12
- // start output
13
- echo $xmlsf->head();
14
- ?>
15
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
16
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
@@ -19,25 +18,20 @@ echo $xmlsf->head();
19
  <?php
20
 
21
  // get our custom urls array
22
- $urls = $xmlsf->get_urls();
23
-
24
- // and loop away!
25
- foreach ( $urls as $url ) {
26
- if (empty($url[0]))
27
- continue;
28
-
29
- if ( $xmlsf->is_allowed_domain( $url[0] ) ) {
30
- ?>
31
  <url>
32
  <loc><?php echo esc_url( $url[0] ); ?></loc>
33
  <priority><?php echo ( isset($url[1]) && is_numeric($url[1]) ) ? $url[1] : '0.5'; ?></priority>
34
  </url>
35
  <?php
36
- } else {
37
- ?>
38
- <!-- URL <?php echo esc_url( $url[0] ); ?> skipped: Not within allowed domains. -->
39
- <?php
40
- }
41
- }
42
  ?></urlset>
43
- <?php $xmlsf->_e_usage();
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
11
+ <?xml-stylesheet type="text/xsl" href="' . plugins_url('views/styles/sitemap-taxonomy.xsl',XMLSF_BASENAME) . '?ver=' . XMLSF_VERSION . '"?>
12
+ '; ?>
13
+ <?php xmlsf_generator(); ?>
 
14
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
15
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16
  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
18
  <?php
19
 
20
  // get our custom urls array
21
+ $urls = apply_filters( 'xmlsf_custom_urls', get_option('xmlsf_urls') );
22
+ if ( is_array($urls) ) :
23
+ // and loop away!
24
+ foreach ( $urls as $url ) {
25
+ if (empty($url[0]))
26
+ continue;
27
+ ?>
 
 
28
  <url>
29
  <loc><?php echo esc_url( $url[0] ); ?></loc>
30
  <priority><?php echo ( isset($url[1]) && is_numeric($url[1]) ) ? $url[1] : '0.5'; ?></priority>
31
  </url>
32
  <?php
33
+ };
34
+
35
+ endif;
 
 
 
36
  ?></urlset>
37
+ <?php xmlsf_usage(); ?>
{includes → views}/feed-sitemap-home.php RENAMED
@@ -7,28 +7,24 @@
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
- global $xmlsf;
11
-
12
- // start output
13
- echo $xmlsf->head();
14
- ?>
15
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
16
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
18
  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
19
  <?php
20
-
21
- $lastmodified = get_lastpostdate( 'gmt' ); // TODO take language into account !! Dont't use get_lastpostdate but pull one post for each language instead?
22
- $lastactivityage = ( gmdate('U') - mysql2date( 'U', $lastmodified ) );
23
- foreach ( $xmlsf->get_home_urls() as $url ) {
24
  ?>
25
  <url>
26
  <loc><?php echo esc_url( $url ); ?></loc>
27
- <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified, false); ?></lastmod>
28
- <priority>1.0</priority>
29
  </url>
30
  <?php
31
  }
32
  ?>
33
  </urlset>
34
- <?php $xmlsf->_e_usage();
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
11
+ <?xml-stylesheet type="text/xsl" href="' . plugins_url('views/styles/sitemap.xsl',XMLSF_BASENAME) . '?ver=' . XMLSF_VERSION . '"?>
12
+ '; ?>
13
+ <?php xmlsf_generator(); ?>
 
14
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
15
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16
  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
17
  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
18
  <?php
19
+ foreach ( xmlsf_get_root_data() as $url => $data ) {
 
 
 
20
  ?>
21
  <url>
22
  <loc><?php echo esc_url( $url ); ?></loc>
23
+ <priority><?php echo $data['priority']; ?></priority>
24
+ <lastmod><?php echo $data['lastmod']; ?></lastmod>
25
  </url>
26
  <?php
27
  }
28
  ?>
29
  </urlset>
30
+ <?php xmlsf_usage(); ?>
{includes → views}/feed-sitemap-news.php RENAMED
@@ -7,9 +7,8 @@
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
- global $xmlsf;
11
-
12
- $options = $xmlsf->get_option('news_tags');
13
 
14
  if ( !empty($options['image']) ) {
15
  $image_xmlns = ' xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'.PHP_EOL;
@@ -21,9 +20,10 @@ if ( !empty($options['image']) ) {
21
  $image_schema = '';
22
  }
23
 
24
- // start output
25
- echo $xmlsf->head('news');
26
- ?>
 
27
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
28
  xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
29
  <?php echo $image_xmlns; ?>
@@ -44,8 +44,11 @@ if ( have_posts() ) :
44
 
45
  // check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
46
  // or if post meta says "exclude me please"
47
- $exclude = get_post_meta( $post->ID, '_xmlsf_news_exclude', true );
48
- if ( !empty($exclude) || !$xmlsf->is_allowed_domain(get_permalink()) )
 
 
 
49
  continue;
50
 
51
  $have_posts = true;
@@ -55,98 +58,23 @@ if ( have_posts() ) :
55
  <news:news>
56
  <news:publication>
57
  <news:name><?php
58
- if(!empty($options['name']))
59
  echo apply_filters( 'the_title_xmlsitemap', $options['name'] );
60
  elseif(defined('XMLSF_GOOGLE_NEWS_NAME'))
61
  echo apply_filters( 'the_title_xmlsitemap', XMLSF_GOOGLE_NEWS_NAME );
62
  else
63
  echo apply_filters( 'the_title_xmlsitemap', get_bloginfo('name') ); ?></news:name>
64
- <news:language><?php echo $xmlsf->get_language($post->ID); ?></news:language>
65
  </news:publication>
66
  <news:publication_date><?php
67
  echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date>
68
  <news:title><?php echo apply_filters( 'the_title_xmlsitemap', get_the_title() ); ?></news:title>
69
- <?php
70
- // access tag
71
- $access = get_post_meta( $post->ID, '_xmlsf_news_access', true );
72
-
73
- if (empty($access)) // if not set per meta, let's get global settings
74
- if (!empty($options['access']))
75
- if ( post_password_required() )
76
- if (!empty($options['access']['password']))
77
- $access = $options['access']['password'];
78
- else
79
- if (!empty($options['access']['default']))
80
- $access = $options['access']['default'];
81
-
82
- if (!empty($access) && $access != 'Public' ) {
83
- ?>
84
- <news:access><?php echo $access; ?></news:access>
85
- <?php
86
- }
87
-
88
- // genres tag
89
- $genres = '';
90
- $terms = get_the_terms($post->ID,'gn-genre');
91
- if ( is_array($terms) ) {
92
- $sep = '';
93
- foreach($terms as $obj) {
94
- if (!empty($obj->name)) {
95
- $genres .= $sep . $obj->name;
96
- $sep = ', ';
97
- }
98
- }
99
- }
100
-
101
- $genres = trim(apply_filters('the_title_xmlsitemap', $genres));
102
-
103
- if ( empty($genres) && !empty($options['genres']) && !empty($options['genres']['default']) ) {
104
- $genres = implode( ', ', (array)$options['genres']['default'] );
105
- }
106
-
107
- if ( !empty($genres) ) {
108
- ?>
109
- <news:genres><?php echo $genres; ?></news:genres>
110
- <?php
111
- }
112
-
113
- // keywords tag
114
- $keywords = '';
115
- if( !empty($options['keywords']) ) {
116
- if ( !empty($options['keywords']['from']) ) {
117
- $terms = get_the_terms( $post->ID, $options['keywords']['from'] );
118
- if ( is_array($terms) ) {
119
- $sep = '';
120
- foreach($terms as $obj) {
121
- if (!empty($obj->name)) {
122
- $keywords .= $sep . $obj->name;
123
- $sep = ', ';
124
- }
125
- }
126
- }
127
- }
128
-
129
- $keywords = trim(apply_filters('the_title_xmlsitemap', $keywords));
130
-
131
- if ( empty($keywords) && !empty($options['keywords']['default']) ) {
132
- $keywords = trim(apply_filters('the_title_xmlsitemap', $options['keywords']['default']));
133
- }
134
 
135
- }
136
-
137
- if ( !empty($keywords) ) {
138
- ?>
139
- <news:keywords><?php echo $keywords; ?></news:keywords>
140
- <?php
141
- }
142
-
143
- /* xmlsf_news_tags_after action hook */
144
- do_action( 'xmlsf_news_tags_after' );
145
- ?>
146
  </news:news>
147
  <?php
148
- if ( !empty($options['image']) && $xmlsf->get_images('news') ) :
149
- foreach ( $xmlsf->get_images() as $image ) {
150
  if ( empty($image['loc']) )
151
  continue;
152
  ?>
@@ -182,6 +110,5 @@ if ( !$have_posts ) :
182
  </url>
183
  <?php
184
  endif;
185
-
186
  ?></urlset>
187
- <?php $xmlsf->_e_usage();
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
+ $options = get_option('xmlsf_news_tags');
11
+ if ( !is_array($options) ) $options = array();
 
12
 
13
  if ( !empty($options['image']) ) {
14
  $image_xmlns = ' xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'.PHP_EOL;
20
  $image_schema = '';
21
  }
22
 
23
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
24
+ <?xml-stylesheet type="text/xsl" href="' . plugins_url('views/styles/sitemap-news.xsl',XMLSF_BASENAME) . '?ver=' . XMLSF_VERSION . '"?>
25
+ '; ?>
26
+ <?php xmlsf_generator(); ?>
27
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
28
  xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
29
  <?php echo $image_xmlns; ?>
44
 
45
  // check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
46
  // or if post meta says "exclude me please"
47
+ if ( apply_filters(
48
+ 'xmlsf_news_excluded',
49
+ get_post_meta( $post->ID, '_xmlsf_news_exclude', true ),
50
+ $post->ID
51
+ ) || !xmlsf_is_allowed_domain( get_permalink() ) )
52
  continue;
53
 
54
  $have_posts = true;
58
  <news:news>
59
  <news:publication>
60
  <news:name><?php
61
+ if( !empty($options['name']) )
62
  echo apply_filters( 'the_title_xmlsitemap', $options['name'] );
63
  elseif(defined('XMLSF_GOOGLE_NEWS_NAME'))
64
  echo apply_filters( 'the_title_xmlsitemap', XMLSF_GOOGLE_NEWS_NAME );
65
  else
66
  echo apply_filters( 'the_title_xmlsitemap', get_bloginfo('name') ); ?></news:name>
67
+ <news:language><?php echo xmlsf_get_language($post->ID); ?></news:language>
68
  </news:publication>
69
  <news:publication_date><?php
70
  echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date>
71
  <news:title><?php echo apply_filters( 'the_title_xmlsitemap', get_the_title() ); ?></news:title>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
+ <?php do_action( 'xmlsf_news_tags_after' ); ?>
 
 
 
 
 
 
 
 
 
 
74
  </news:news>
75
  <?php
76
+ if ( !empty($options['image']) ) :
77
+ foreach ( xmlsf_get_images('news') as $image ) {
78
  if ( empty($image['loc']) )
79
  continue;
80
  ?>
110
  </url>
111
  <?php
112
  endif;
 
113
  ?></urlset>
114
+ <?php xmlsf_usage(); ?>
{includes → views}/feed-sitemap-post_type.php RENAMED
@@ -7,10 +7,7 @@
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
- global $xmlsf;
11
-
12
- foreach ( $xmlsf->do_tags( get_query_var('post_type') ) as $tag => $setting )
13
- ${$tag} = $setting;
14
 
15
  if ( !empty($image) ) {
16
  $image_xmlns = ' xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'.PHP_EOL;
@@ -22,9 +19,10 @@ if ( !empty($image) ) {
22
  $image_schema = '';
23
  }
24
 
25
- // start output
26
- echo $xmlsf->head();
27
- ?>
 
28
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
29
  <?php echo $image_xmlns; ?>
30
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -42,20 +40,24 @@ if ( have_posts() ) :
42
 
43
  // check if page is in the exclusion list (like front page or post meta)
44
  // or if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
45
- if ( $xmlsf->is_excluded($post->ID) || !$xmlsf->is_allowed_domain(get_permalink()) )
 
 
 
 
46
  continue;
47
 
48
  $have_posts = true;
49
-
50
- // TODO more image tags & video tags
51
  ?>
52
  <url>
53
  <loc><?php echo esc_url( get_permalink() ); ?></loc>
54
- <?php echo $xmlsf->get_lastmod(); ?>
55
- <priority><?php echo $xmlsf->get_priority(); ?></priority>
 
 
56
  <?php
57
- if ( !empty($image) && $xmlsf->get_images() ) :
58
- foreach ( $xmlsf->get_images() as $image ) {
59
  if ( empty($image['loc']) )
60
  continue;
61
  ?>
@@ -93,4 +95,4 @@ if ( !$have_posts ) :
93
  <?php
94
  endif;
95
  ?></urlset>
96
- <?php $xmlsf->_e_usage();
7
 
8
  if ( ! defined( 'WPINC' ) ) die;
9
 
10
+ extract ( xmlsf_do_tags( get_query_var('post_type') ) );
 
 
 
11
 
12
  if ( !empty($image) ) {
13
  $image_xmlns = ' xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'.PHP_EOL;
19
  $image_schema = '';
20
  }
21
 
22
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
23
+ <?xml-stylesheet type="text/xsl" href="' . plugins_url('views/styles/sitemap.xsl',XMLSF_BASENAME) . '?ver=' . XMLSF_VERSION . '"?>
24
+ '; ?>
25
+ <?php xmlsf_generator(); ?>
26
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
27
  <?php echo $image_xmlns; ?>
28
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
40
 
41
  // check if page is in the exclusion list (like front page or post meta)
42
  // or if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
43
+ if ( apply_filters(
44
+ 'xmlsf_excluded',
45
+ get_post_meta( $post->ID, '_xmlsf_exclude', true ),
46
+ $post->ID
47
+ ) || !xmlsf_is_allowed_domain( get_permalink() ) )
48
  continue;
49
 
50
  $have_posts = true;
 
 
51
  ?>
52
  <url>
53
  <loc><?php echo esc_url( get_permalink() ); ?></loc>
54
+ <priority><?php echo xmlsf_get_priority(); ?></priority>
55
+ <?php if ( $lastmod = xmlsf_get_lastmod() ) { ?>
56
+ <lastmod><?php echo $lastmod; ?></lastmod>
57
+ <?php } ?>
58
  <?php
59
+ if ( !empty($image) ) :
60
+ foreach ( xmlsf_get_images() as $image ) {
61
  if ( empty($image['loc']) )
62
  continue;
63
  ?>
95
  <?php
96
  endif;
97
  ?></urlset>
98
+ <?php xmlsf_usage(); ?>
views/feed-sitemap-taxonomy.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Google News Sitemap Feed Template
4
+ *
5
+ * @package XML Sitemap Feed plugin for WordPress
6
+ */
7
+
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
11
+ <?xml-stylesheet type="text/xsl" href="' . plugins_url('views/styles/sitemap-taxonomy.xsl',XMLSF_BASENAME) . '?ver=' . XMLSF_VERSION . '"?>
12
+ '; ?>
13
+ <?php xmlsf_generator(); ?>
14
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
15
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
17
+ http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
18
+ <?php
19
+ $terms = get_terms( get_query_var('taxonomy') );
20
+
21
+ if ( is_array($terms) ) :
22
+ foreach ( $terms as $term ) :
23
+ ?>
24
+ <url>
25
+ <loc><?php echo get_term_link( $term ); ?></loc>
26
+ <priority><?php echo xmlsf_get_priority('taxonomy',$term); ?></priority>
27
+ <?php if ( $lastmod = xmlsf_get_lastmod('taxonomy',$term) ) { ?>
28
+ <lastmod><?php echo $lastmod; ?></lastmod>
29
+ <?php } ?>
30
+ </url>
31
+ <?php
32
+ endforeach;
33
+ endif;
34
+
35
+ ?></urlset>
36
+ <?php xmlsf_usage(); ?>
views/feed-sitemap.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XML Sitemap Index Feed Template
4
+ *
5
+ * @package XML Sitemap Feed plugin for WordPress
6
+ */
7
+
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
11
+ <?xml-stylesheet type="text/xsl" href="' . plugins_url('views/styles/sitemap-index.xsl',XMLSF_BASENAME) . '?ver=' . XMLSF_VERSION . '"?>
12
+ '; ?>
13
+ <?php xmlsf_generator(); ?>
14
+ <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
15
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
17
+ http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
18
+ <sitemap>
19
+ <loc><?php echo xmlsf_get_index_url('home'); ?></loc>
20
+ <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastpostdate( 'gmt' ), false); ?></lastmod>
21
+ </sitemap>
22
+ <?php
23
+ // add rules for public post types
24
+ $post_types = apply_filters( 'xmlsf_post_types', get_option( 'xmlsf_post_types' ) );
25
+ if ( is_array($post_types) ) :
26
+ foreach ( $post_types as $post_type => $settings ) {
27
+ if ( empty($settings['active']) )
28
+ continue;
29
+
30
+ $archive = isset($settings['archive']) ? $settings['archive'] : '';
31
+
32
+ foreach ( xmlsf_get_archives($post_type,$archive) as $m => $url ) {
33
+ ?>
34
+ <sitemap>
35
+ <loc><?php echo $url; ?></loc>
36
+ <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastmodified( 'gmt', $post_type, $m ), false); ?></lastmod>
37
+ </sitemap>
38
+ <?php
39
+ }
40
+ }
41
+ endif;
42
+
43
+ // add rules for public taxonomies
44
+ foreach ( xmlsf_get_taxonomies() as $taxonomy ) : ?>
45
+ <sitemap>
46
+ <loc><?php echo xmlsf_get_index_url('taxonomy',$taxonomy); ?></loc>
47
+ <?php if ( $lastmod = xmlsf_get_lastmod('taxonomy',$taxonomy) ) { ?>
48
+ <lastmod><?php echo $lastmod; ?></lastmod>
49
+ <?php } ?>
50
+ </sitemap>
51
+ <?php
52
+ endforeach;
53
+
54
+ // custom URLs sitemap
55
+ if ( apply_filters( 'xmlsf_custom_urls', get_option('xmlsf_urls') ) ) :
56
+ ?>
57
+ <sitemap>
58
+ <loc><?php echo xmlsf_get_index_url('custom'); ?></loc>
59
+ </sitemap>
60
+ <?php
61
+ endif;
62
+
63
+ // custom sitemaps
64
+ $custom_sitemaps = apply_filters( 'xmlsf_custom_sitemaps', get_option('xmlsf_custom_sitemaps', array()) );
65
+ if ( is_array($custom_sitemaps) ) :
66
+ foreach ( $custom_sitemaps as $url ) {
67
+ if (empty($url)) continue;
68
+ ?>
69
+ <sitemap>
70
+ <loc><?php echo esc_url($url); ?></loc>
71
+ </sitemap>
72
+ <?php
73
+ }
74
+ endif;
75
+ ?></sitemapindex>
76
+ <?php xmlsf_usage(); ?>
{images → views/images}/sitemapxml.gif RENAMED
File without changes
views/robots.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # XML Sitemap & Google News version <?php echo XMLSF_VERSION ?> - https://status301.net/wordpress-plugins/xml-sitemap-feed/
2
+ <?php switch ( $case ) {
3
+ case 'private' : ?>
4
+ # XML Sitemaps are disabled because of this site's privacy settings.
5
+
6
+ <?php break;
7
+ case 'disabled' : ?>
8
+ # No XML Sitemaps are enabled on this site.
9
+
10
+ <?php break;
11
+ default :
12
+ foreach ( $sitemaps as $pretty ) { ?>
13
+ Sitemap: <?php echo $url . $pretty; ?>
14
+
15
+ <?php } ?>
16
+
17
+ <?php break;
18
+ }
19
+ ?>
views/styles/admin.css ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ div.main {
2
+ width: 68%;
3
+ float: left;
4
+ }
5
+ div.sidebar {
6
+ width: 29%;
7
+ padding: .9em 0 2em 2%;
8
+ border-left: 1px solid #ccc;
9
+ float: right;
10
+ background: linear-gradient(to right, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
11
+ }
12
+ @media screen and (max-width: 600px) {
13
+ div.main, div.sidebar {
14
+ width: 100%;
15
+ float: none;
16
+ border: none;
17
+ padding: 0
18
+ }
19
+ }
{includes/xsl → views/styles}/sitemap-index.xsl RENAMED
File without changes
{includes/xsl → views/styles}/sitemap-news.xsl RENAMED
@@ -26,9 +26,6 @@
26
  <th>#</th>
27
  <th>Title</th>
28
  <th>Language</th>
29
- <th>Access</th>
30
- <th>Genre(s)</th>
31
- <th>Keyword(s)</th>
32
  <th>Image(s)</th>
33
  <th>Publication Date (GMT)</th>
34
  </tr>
@@ -41,9 +38,6 @@
41
  <a href="{$itemURL}"><xsl:value-of select="news:news/news:title"/></a>
42
  </td>
43
  <td><xsl:value-of select="news:news/news:publication/news:language"/></td>
44
- <td><xsl:value-of select="news:news/news:access"/></td>
45
- <td><xsl:value-of select="news:news/news:genres"/></td>
46
- <td><xsl:value-of select="news:news/news:keywords"/></td>
47
  <td><xsl:value-of select="count(image:image)"/></td>
48
  <td><xsl:value-of select="concat(substring(news:news/news:publication_date,0,11),concat(' ', substring(news:news/news:publication_date,12,8)))"/></td>
49
  </tr>
26
  <th>#</th>
27
  <th>Title</th>
28
  <th>Language</th>
 
 
 
29
  <th>Image(s)</th>
30
  <th>Publication Date (GMT)</th>
31
  </tr>
38
  <a href="{$itemURL}"><xsl:value-of select="news:news/news:title"/></a>
39
  </td>
40
  <td><xsl:value-of select="news:news/news:publication/news:language"/></td>
 
 
 
41
  <td><xsl:value-of select="count(image:image)"/></td>
42
  <td><xsl:value-of select="concat(substring(news:news/news:publication_date,0,11),concat(' ', substring(news:news/news:publication_date,12,8)))"/></td>
43
  </tr>
views/styles/sitemap-taxonomy.xsl ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0"
3
+ xmlns:html="http://www.w3.org/TR/REC-html40"
4
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
5
+ xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
6
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8
+ <xsl:template match="/">
9
+ <html xmlns="http://www.w3.org/1999/xhtml">
10
+ <head>
11
+ <title>XML Sitemap Feed</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style>
14
+ </head>
15
+ <body>
16
+ <h1>XML Sitemap Feed</h1>
17
+ <div id="header">
18
+ <p>This is an XML Sitemap to aid search engines like <a href="https://www.google.com">Google</a>, <a href="https://www.bing.com/">Bing</a>, <a href="https://www.yahoo.com">Yahoo!</a> and <a href="https://www.ask.com">Ask</a> indexing your site better. Read more about XML sitemaps on <a href="https://www.sitemaps.org/">Sitemaps.org</a>.</p>
19
+ </div>
20
+ <div id="content">
21
+ <table cellpadding="5">
22
+ <tr class="high">
23
+ <th>#</th>
24
+ <th>URL</th>
25
+ <th>Priority</th>
26
+ <th>Last Changed</th>
27
+ </tr>
28
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
29
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
30
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
31
+ <tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if>
32
+ <td><xsl:value-of select="position()"/></td>
33
+ <td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td>
34
+ <td><xsl:value-of select="concat(sitemap:priority*100,'%')"/></td>
35
+ <td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td>
36
+ </tr>
37
+ </xsl:for-each>
38
+ </table>
39
+ </div>
40
+ <div id="footer">
41
+ <p><img src="data:image/gif;base64,R0lGODlhUAAPAJEAAGZmZv////9mAImOeSwAAAAAUAAPAAACoISPqcvtD0+YtNqLs968myCE4kiW5jkGw8q27gvDwYfWdq3G+i7T9w/M8Ya7GQAUoiSTEyYSKYA2nSKhdXUdCIlaXzRVDVdB0+dS2lJZ1bkt0Sgti6NysvM5jbq2ai2WywJHYrZUaEhIWJXm99foNiRI9XUoV4g4GJjJyEgBGAkEivIIyPUZeppCqorlheo6ulr00UFba3uLEaG7y9urUAAAOw%3D%3D" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="https://status301.net/wordpress-plugins/xml-sitemap-feed/" title="XML Sitemap Feed plugin for WordPress">XML Sitemap &amp; Google News Feeds</a> running on <a href="https://wordpress.org/">WordPress</a>.</p>
42
+ </div>
43
+ </body>
44
+ </html>
45
+ </xsl:template>
46
+ </xsl:stylesheet>
{includes/xsl → views/styles}/sitemap.xsl RENAMED
File without changes
xml-sitemap.php CHANGED
@@ -1,15 +1,17 @@
1
  <?php
2
  /*
3
- Plugin Name: XML Sitemap & Google News feeds
4
  Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
5
  Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols. Happy with the results? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed">tip</a></strong> for continued development and support. Thanks :)
6
  Text Domain: xml-sitemap-feed
7
- Version: 4.9.4
8
- Requires PHP: 5.6
9
  Author: RavanH
10
  Author URI: http://status301.net/
11
  */
12
 
 
 
13
  /* Copyright 2018 RavanH
14
  http://status301.net/
15
  mailto: ravanhagen@gmail.com
@@ -28,91 +30,57 @@ Author URI: http://status301.net/
28
  * AVAILABLE HOOKS
29
  * --------------------
30
  *
31
- * FILTERS
32
  * xmlsf_defaults -> Filters the default array values for different option groups.
33
  * xmlsf_allowed_domain -> Filters the response when checking the url against allowed domains.
34
  * Passes variable $url; must return true or false.
35
- * xmlsf_excluded -> Filters the response when checking the post for exclusion flags.
36
- * Passes variable $post_id; must return true or false.
37
- * the_title_xmlsitemap -> Filters the Google News publication name, title and keywords
38
- * plus the Image title and caption tags
 
 
39
  * xmlsf_custom_urls -> Filters the custom urls array
40
  * xmlsf_custom_sitemaps -> Filters the custom sitemaps array
41
  * xmlsf_post_language -> Filters the post language tag used in the news sitemap.
42
  * Passes variable $post_id; must return a 2 or 3 letter
43
  * language ISO 639 code with the exception of zh-cn and zh-tw.
 
 
 
 
 
 
44
  *
45
- * ACTIONS
46
  * xmlsf_news_tags_after -> Fired inside the Google News Sitemap loop at the end of the news
47
  * tags, just before each closing </news:news> is generated. Can be used to
48
  * echo custom tags or trigger another action in the background.
 
 
49
  *
50
  * --------------------
51
  * AVAILABLE FUNCTIONS
52
  * --------------------
 
53
  * is_sitemap() -> conditional, returns bolean, true if the request is for an xml sitemap
54
  * is_news() -> conditional, returns bolean, true if the request is for an xml news sitemap
55
  *
56
- * Feel free to request, suggest or submit more :)
57
  */
58
 
59
  if ( ! defined( 'WPINC' ) ) die;
60
 
61
- /* --------------------
62
- * CONSTANTS
63
- * -------------------- */
64
-
65
- define('XMLSF_VERSION', '4.9.4');
66
-
67
- /*
68
- * The following constants can be used to change plugin defaults
69
- * by defining them in wp-config.php
70
- */
71
-
72
- /*
73
- * XMLSF_NAME
74
- *
75
- * Pretty permalink name for the main sitemap (index)
76
- */
77
-
78
- if ( !defined('XMLSF_NAME') )
79
- define('XMLSF_NAME', 'sitemap.xml');
80
-
81
- /*
82
- * XMLSF_NEWS_NAME
83
- *
84
- * Pretty permalink name for the news sitemap
85
- */
86
-
87
- if ( !defined('XMLSF_NEWS_NAME') )
88
- define('XMLSF_NEWS_NAME', 'sitemap-news.xml');
89
-
90
- /*
91
- * XMLSF_MULTISITE_UNINSTALL
92
- *
93
- * Set this constant in wp-config.php if you want to allow looping over each site
94
- * in the network to run XMLSitemapFeed_Uninstall->uninstall() defined in uninstall.php
95
- *
96
- * Be careful: There is NO batch-processing so it does not scale on large networks!
97
- *
98
- * example:
99
- * define('XMLSF_MULTISITE_UNINSTALL', true);
100
- */
101
 
102
- /* -------------------------------------
103
- * INCLUDE HACKS & CLASS
104
- * ------------------------------------- */
105
 
106
- $xmlsf_dir = plugin_dir_path( __FILE__ );
107
 
108
- if ( file_exists ( $xmlsf_dir . 'xml-sitemap-feed' ) )
109
- $xmlsf_dir .= 'xml-sitemap-feed/';
110
 
111
- include_once( $xmlsf_dir . 'includes/functions.php' );
112
- include_once( $xmlsf_dir . 'includes/class-xmlsitemapfeed.php' );
113
 
114
- /* ----------------------
115
- * INSTANTIATE
116
- * ---------------------- */
117
 
118
- $xmlsf = new XMLSitemapFeed( plugin_basename(__FILE__) );
1
  <?php
2
  /*
3
+ Plugin Name: XML Sitemap & Google News
4
  Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
5
  Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols. Happy with the results? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed">tip</a></strong> for continued development and support. Thanks :)
6
  Text Domain: xml-sitemap-feed
7
+ Version: 5.0.7
8
+ Requires PHP: 5.4
9
  Author: RavanH
10
  Author URI: http://status301.net/
11
  */
12
 
13
+ define( 'XMLSF_VERSION', '5.0.7' );
14
+
15
  /* Copyright 2018 RavanH
16
  http://status301.net/
17
  mailto: ravanhagen@gmail.com
30
  * AVAILABLE HOOKS
31
  * --------------------
32
  *
33
+ * FILTERS
34
  * xmlsf_defaults -> Filters the default array values for different option groups.
35
  * xmlsf_allowed_domain -> Filters the response when checking the url against allowed domains.
36
  * Passes variable $url; must return true or false.
37
+ * xmlsf_excluded -> Filters the response when checking the post for exclusion flags in
38
+ * XML Sitemap context. Passes variable $post_id; must return true or false.
39
+ * xmlsf_news_excluded -> Filters the response when checking the post for exclusion flags in
40
+ * Google News sitemap context. Passes variable $post_id; must return true or false.
41
+ * the_title_xmlsitemap -> Filters the Google News publication name and title, plus
42
+ * the Image title and caption tags.
43
  * xmlsf_custom_urls -> Filters the custom urls array
44
  * xmlsf_custom_sitemaps -> Filters the custom sitemaps array
45
  * xmlsf_post_language -> Filters the post language tag used in the news sitemap.
46
  * Passes variable $post_id; must return a 2 or 3 letter
47
  * language ISO 639 code with the exception of zh-cn and zh-tw.
48
+ * xmlsf_post_types -> Filters the post types array for the XML sitemaps index.
49
+ * xmlsf_post_priority -> Filters a post priority value. Passes variables $priority and $post->ID.
50
+ * Must return a float value between 0.1 and 1.0
51
+ * xmlsf_term_priority -> Filters a taxonomy term priority value. Passes variables $priority and $term->slug.
52
+ * Must return a float value between 0.1 and 1.0
53
+ * xmlsf_news_post_types -> Filters the post types array for the Google News sitemap.
54
  *
55
+ * ACTIONS
56
  * xmlsf_news_tags_after -> Fired inside the Google News Sitemap loop at the end of the news
57
  * tags, just before each closing </news:news> is generated. Can be used to
58
  * echo custom tags or trigger another action in the background.
59
+ * xmlsf_news_settings_before -> Fired before the Google News Sitemap settings form
60
+ * xmlsf_news_settings_after -> Fired after the Google News Sitemap settings form
61
  *
62
  * --------------------
63
  * AVAILABLE FUNCTIONS
64
  * --------------------
65
+ *
66
  * is_sitemap() -> conditional, returns bolean, true if the request is for an xml sitemap
67
  * is_news() -> conditional, returns bolean, true if the request is for an xml news sitemap
68
  *
69
+ * Feel free to request, suggest or submit more :)
70
  */
71
 
72
  if ( ! defined( 'WPINC' ) ) die;
73
 
74
+ define( 'XMLSF_DIR', dirname(__FILE__) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
+ define( 'XMLSF_BASENAME', plugin_basename(__FILE__) );
 
 
77
 
78
+ require XMLSF_DIR . '/models/global.php';
79
 
80
+ require XMLSF_DIR . '/controllers/global.php';
 
81
 
82
+ add_action( 'init', 'xmlsf_init' );
 
83
 
84
+ register_activation_hook( __FILE__, 'xmlsf_activate' );
 
 
85
 
86
+ register_deactivation_hook( __FILE__, 'xmlsf_deactivate' );