XML Sitemap & Google News feeds - Version 4.6.1

Version Description

  • Code cleanup
  • POT file update
  • Dutch translation update
Download this release

Release Info

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

Code changes from version 4.6 to 4.6.1

.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.log
2
+ .htaccess
3
+ sitemap.xml
4
+ sitemap.xml.gz
5
+ wp-config.php
6
+ wp-content/advanced-cache.php
7
+ wp-content/backup-db/
8
+ wp-content/backups/
9
+ wp-content/blogs.dir/
10
+ wp-content/cache/
11
+ wp-content/upgrade/
12
+ wp-content/uploads/
13
+ wp-content/wp-cache-config.php
14
+ wp-content/plugins/hello.php
15
+
16
+ /readme.html
17
+ /license.txt
18
+
LICENSE ADDED
@@ -0,0 +1,339 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ {description}
294
+ Copyright (C) {year} {fullname}
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ {signature of Ty Coon}, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
README.md ADDED
@@ -0,0 +1,3 @@
1
+ # XML Sitemap &amp; Google News feeds
2
+
3
+ XML and Google News Sitemaps for WordPress to feed the hungry spiders. Multisite, WP Super Cache and Polylang compatible.
images/sitemapxml.gif CHANGED
File without changes
includes/admin.php CHANGED
@@ -2,7 +2,9 @@
2
/* ------------------------------
3
* XMLSF Admin CLASS
4
* ------------------------------ */
5
-
6
if ( class_exists('XMLSitemapFeed') ) :
7
8
class XMLSF_Admin extends XMLSitemapFeed {
@@ -60,7 +62,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
60
}
61
62
/* PINGS */
63
-
64
public function ping_settings_field() {
65
$options = parent::get_ping();
66
$defaults = parent::defaults('ping');
@@ -104,7 +106,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
104
checked( $active, true, false).' /> ';
105
echo isset($names[$key]) && !empty($names[$key]['name']) ? $names[$key]['name'] : $key ;
106
echo '</label>';
107
-
108
echo '
109
<input type="hidden" name="'.$prefix.'ping['.
110
$key.'][uri]" value="'.
@@ -166,21 +168,21 @@ class XMLSF_Admin extends XMLSitemapFeed {
166
if ( $old_active == $new_active )
167
$changed = false;
168
}
169
-
170
- if ( $changed ) {
171
// then change the ping_sites list according to option
172
if ( !empty($new[$key]['active']) && strpos($update_services,untrailingslashit($values['uri'])) === false )
173
$update_services_new .= "\n" . $values['uri'];
174
elseif ( empty($new[$key]['active']) && strpos($update_services,untrailingslashit($values['uri'])) !== false )
175
$update_services_new = str_replace(array(trailingslashit($values['uri']),untrailingslashit($values['uri'])),'',$update_services_new);
176
- } else {
177
// or change the option according to ping_sites
178
if ( strpos($update_services,untrailingslashit($values['uri'])) !== false )
179
$new[$key]['active'] = '1';
180
else
181
unset($new[$key]['active']);
182
}
183
- }
184
if ( is_array($new[$key]) ) {
185
$sanitized += array( $key => $new[$key] );
186
}
@@ -193,7 +195,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
193
}
194
195
/* ROBOTS */
196
-
197
public function robots_settings_field() {
198
echo '
199
<fieldset><legend class="screen-reader-text">'.__('Additional robots.txt rules','xml-sitemap-feed').'</legend>
@@ -215,7 +217,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
215
/**
216
* XML SITEMAP SECTION
217
*/
218
-
219
public function xml_sitemap_settings() {
220
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="'.
221
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="'.
@@ -223,7 +225,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
223
sprintf(__('These settings control the XML Sitemaps generated by the %s plugin.','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).' '.
224
sprintf(__('For ping options, go to %s.','xml-sitemap-feed'),'<a href="options-writing.php">'.translate('Writing Settings').'</a>').'</p>';
225
}
226
-
227
public function post_types_settings_field() {
228
$options = parent::get_post_types();
229
$defaults = parent::defaults('post_types');
@@ -233,16 +235,16 @@ class XMLSF_Admin extends XMLSitemapFeed {
233
$post_types = get_post_types(array('public'=>true),'objects');
234
if ( !is_array($post_types) || is_wp_error($post_types) )
235
return;
236
-
237
echo '<fieldset id="xmlsf_post_types"><legend class="screen-reader-text">'.__('XML Sitemaps for post types','xml-sitemap-feed').'</legend>
238
';
239
foreach ( $post_types as $post_type ) {
240
// skip unallowed post types
241
if (in_array($post_type->name,parent::disabled_post_types()))
242
continue;
243
-
244
$count = wp_count_posts( $post_type->name );
245
-
246
echo '
247
<input type="hidden" name="'.$prefix.'post_types['.
248
$post_type->name.'][name]" value="'.
@@ -255,9 +257,9 @@ class XMLSF_Admin extends XMLSitemapFeed {
255
checked( !empty($options[$post_type->name]["active"]), true, false).' /> '.
256
$post_type->label.'</label> ('.
257
$count->publish.')';
258
-
259
if (!empty($options[$post_type->name]['active'])) {
260
-
261
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>
262
<script type="text/javascript">
263
jQuery( document ).ready( function() {
@@ -270,14 +272,14 @@ class XMLSF_Admin extends XMLSitemapFeed {
270
</script>
271
<ul style="margin-left:18px" id="xmlsf_post_types_'.$post_type->name.'_settings">';
272
273
-
274
if ( isset($defaults[$post_type->name]['archive']) ) {
275
$archives = array (
276
'yearly' => __('Year','xml-sitemap-feed'),
277
- 'monthly' => __('Month','xml-sitemap-feed')
278
);
279
$archive = !empty($options[$post_type->name]['archive']) ? $options[$post_type->name]['archive'] : $defaults[$post_type->name]['archive'];
280
- echo '
281
<li><label>'.__('Split by','xml-sitemap-feed').' <select name="'.$prefix.'post_types['.
282
$post_type->name.'][archive]" id="xmlsf_post_types_'.
283
$post_type->name.'_archive">
@@ -292,7 +294,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
292
}
293
294
$priority_val = !empty($options[$post_type->name]['priority']) ? $options[$post_type->name]['priority'] : $defaults[$post_type->name]['priority'];
295
- echo '
296
<li><label>'.__('Priority','xml-sitemap-feed').' <input type="number" step="0.1" min="0.1" max="0.9" name="'.$prefix.'post_types['.
297
$post_type->name.'][priority]" id="xmlsf_post_types_'.
298
$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,14 +303,14 @@ class XMLSF_Admin extends XMLSitemapFeed {
301
<li><label><input type="checkbox" name="'.$prefix.'post_types['.
302
$post_type->name.'][dynamic_priority]" value="1" '.
303
checked( !empty($options[$post_type->name]['dynamic_priority']), true, false).' /> '.__('Automatically adjusts Priority according to relative age and comment count.','xml-sitemap-feed').'</label> <span class="description">'.__('Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value.','xml-sitemap-feed').'</span></li>';
304
-
305
echo '
306
<li><label><input type="checkbox" name="'.$prefix.'post_types['.
307
$post_type->name.'][update_lastmod_on_comments]" value="1" '.
308
checked( !empty($options[$post_type->name]["update_lastmod_on_comments"]), true, false).' /> '.__('Update Lastmod and Changefreq 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>';
309
-
310
$image = isset($options[$post_type->name]['tags']['image']) ? $options[$post_type->name]['tags']['image'] : $defaults[$post_type->name]['tags']['image'];
311
- echo '
312
<li><label>'.__('Add image tags for','xml-sitemap-feed').' <select name="'.$prefix.'post_types['.
313
$post_type->name.'][tags][image]">
314
<option value="">'.translate('None').'</option>
@@ -319,7 +321,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
319
selected( $image == "attached", true, false).
320
'>'.__('Attached images','xml-sitemap-feed').'</option>
321
</select></label></li>
322
-
323
</ul>';
324
} else {
325
echo '<br>';
@@ -327,7 +329,7 @@ class XMLSF_Admin extends XMLSitemapFeed {
327
}
328
329
echo '
330
- <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('[more]').'</a>
331
<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>
332
<script type="text/javascript">
333
jQuery( document ).ready( function() {
@@ -356,9 +358,9 @@ jQuery( document ).ready( function() {
356
$skip = true;
357
foreach ( $taxonomy->object_type as $post_type)
358
if (!empty($active[$post_type]['active']) && $active[$post_type]['active'] == '1')
359
- $skip = false;
360
if ($skip) continue; // skip if none of the associated post types are active
361
-
362
$count = wp_count_terms( $taxonomy->name );
363
$output .= '
364
<label><input type="checkbox" name="'.parent::prefix().'taxonomies['.
@@ -375,7 +377,7 @@ jQuery( document ).ready( function() {
375
$output .= '
376
<br>';
377
}
378
-
379
if ($output) {
380
echo '
381
<fieldset id="xmlsf_taxonomies"><legend class="screen-reader-text">'.__('XML Sitemaps for taxonomies','xml-sitemap-feed').'</legend>
@@ -384,7 +386,7 @@ jQuery( document ).ready( function() {
384
echo $output;
385
386
echo '
387
- <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('[more]').'</a>
388
<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').' '.
389
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>');
390
echo '</span></p>
@@ -407,34 +409,34 @@ jQuery( document ).ready( function() {
407
408
public function custom_sitemaps_settings_field() {
409
$lines = parent::get_custom_sitemaps();
410
-
411
echo '
412
<fieldset><legend class="screen-reader-text">'.__('Include custom XML Sitemaps','xml-sitemap-feed').'</legend>
413
<label>'.__('Additional XML Sitemaps to append to the main XML Sitemap Index:','xml-sitemap-feed').'<br>
414
<textarea name="'.parent::prefix().'custom_sitemaps" id="xmlsf_custom_sitemaps" class="large-text" cols="50" rows="4" />'. implode("\n",$lines) .'</textarea></label>
415
<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>
416
</fieldset>';
417
-
418
}
419
420
public function urls_settings_field() {
421
$urls = parent::get_urls();
422
$lines = array();
423
-
424
if(!empty($urls)) {
425
foreach($urls as $arr) {
426
- if(is_array($arr))
427
$lines[] = implode(" ",$arr);
428
}
429
}
430
-
431
echo '
432
<fieldset><legend class="screen-reader-text">'.__('Include custom URLs','xml-sitemap-feed').'</legend>
433
<label>'.__('Additional URLs to append in an extra XML Sitemap:','xml-sitemap-feed').'<br>
434
<textarea name="'.parent::prefix().'urls" id="xmlsf_urls" class="large-text" cols="50" rows="4" />'. implode("\n",$lines) .'</textarea></label>
435
<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>
436
</fieldset>';
437
-
438
}
439
440
public function domains_settings_field() {
@@ -446,14 +448,14 @@ jQuery( document ).ready( function() {
446
<label>'.__('Additional domains to allow in the XML Sitemaps:','xml-sitemap-feed').'<br><textarea name="'.parent::prefix().'domains" id="xmlsf_domains" class="large-text" cols="50" rows="4" />'. implode("\n",$domains) .'</textarea></label>
447
<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>
448
</fieldset>';
449
-
450
}
451
452
453
/**
454
* GOOGLE NEWS SITEMAP SECTION
455
*/
456
-
457
public function news_sitemap_settings() {
458
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="'.
459
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="'.
@@ -465,14 +467,14 @@ jQuery( document ).ready( function() {
465
466
}
467
468
- //TODO: publication name allow tag %category% ... post_types (+ exclusion per post or none + allow inclusion per post), limit to category ...
469
public function news_name_field() {
470
$options = parent::get_option('news_tags');
471
472
$name = !empty($options['name']) ? $options['name'] : '';
473
echo '
474
<fieldset><legend class="screen-reader-text">'.__('Publication name','xml-sitemap-feed').'</legend>
475
- <input type="text" name="'.parent::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">' .
476
__('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>.') . '</p>
477
</fieldset>';
478
}
@@ -498,7 +500,7 @@ jQuery( document ).ready( function() {
498
foreach ( $post_types as $post_type ) {
499
// skip unallowed post types
500
if ( !is_object($post_type) || in_array($post_type->name,parent::disabled_post_types()) )
501
- continue;
502
503
$checked = in_array($post_type->name,$news_post_type) ? true : false;
504
$disabled = false;
@@ -510,7 +512,7 @@ jQuery( document ).ready( function() {
510
$checked = false;
511
}
512
}
513
-
514
echo '
515
<label><input type="checkbox" name="'.$prefix.'news_tags[post_type][]" id="xmlsf_post_type_'.
516
$post_type->name.'" value="'.$post_type->name.'" '.
@@ -522,13 +524,13 @@ jQuery( document ).ready( function() {
522
<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>
523
</fieldset>';
524
}
525
-
526
}
527
528
public function news_categories_field() {
529
- $options = parent::get_option('news_tags');
530
531
- if ( !empty($options['post_type']) && array( 'post' ) !== (array)$options['post_type'] ) {
532
echo '
533
<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>';
534
return;
@@ -550,7 +552,7 @@ jQuery( document ).ready( function() {
550
echo '
551
<label>'.__('Limit to posts in these post categories:','xml-sitemap-feed').'<br>
552
<select multiple name="'.parent::prefix().'news_tags[categories][]" size="'.$size.'">';
553
-
554
foreach($all_categories as $category) {
555
$depth = count( explode( '%#%', get_category_parents($category, false, '%#%') ) ) - 2;
556
$pad = str_repeat('&nbsp;', $depth * 3);
@@ -563,7 +565,7 @@ jQuery( document ).ready( function() {
563
}
564
echo '
565
</select>
566
- </label>
567
<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');
568
echo '
569
</fieldset>';
@@ -585,7 +587,7 @@ jQuery( document ).ready( function() {
585
selected( $image == "attached", true, false).
586
'>'.__('Attached images','xml-sitemap-feed').'</option>
587
';
588
- echo '</select></label>
589
<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">'.__('More information&hellip;','xml-sitemap-feed').'</a></p>
590
</fieldset>';
591
}
@@ -595,7 +597,7 @@ jQuery( document ).ready( function() {
595
<fieldset id="xmlsf_news_labels"><legend class="screen-reader-text">'.__('Source labels','xml-sitemap-feed').'</legend>' .
596
sprintf(__('You can use the %1$s and %2$s tags to provide Google more information about the content of your articles.','xml-sitemap-feed'),'&lt;access&gt;','&lt;genres&gt;') . ' <a href="https://support.google.com/news/publisher/answer/93992" target="_blank">'.__('More information&hellip;','xml-sitemap-feed').'</a>
597
<br><br>';
598
-
599
$options = parent::get_option('news_tags');
600
$prefix = parent::prefix();
601
@@ -605,10 +607,10 @@ jQuery( document ).ready( function() {
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
- '.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') . '
610
<ul>';
611
-
612
echo '
613
<li><label>'.__('Tag normal posts as','xml-sitemap-feed').' <select name="'.$prefix.'news_tags[access][default]" id="xmlsf_news_tags_access_default">
614
<option value="">'.translate('Public').'</option>
@@ -632,20 +634,14 @@ jQuery( document ).ready( function() {
632
echo '
633
<fieldset id="xmlsf_news_labels_genres"><legend class="screen-reader-text">&lt;genres&gt;</legend>
634
'.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');
635
- echo '<input type="hidden" name="'.$prefix.'news_tags[genres][active]" value="';
636
- echo !empty($genres['active']) ? $genres['active'] : '';
637
- echo '" />';
638
- /* echo '
639
- <p><label><input type="checkbox" name="'.$prefix.'news_tags[genres][active]" id="xmlsf_news_tags_genres" value="1"'.
640
- checked( !empty($genres['active']), true, false).' /> '
641
- .__('Use Google News genres','xml-sitemap-feed').'</label> </p>';
642
- */
643
echo '
644
<ul>
645
<li><label>'.__('Default genre:','xml-sitemap-feed').'<br><select multiple name="'.$prefix.'news_tags[genres][default][]" id="xmlsf_news_tags_genres_default" size="'.count($gn_genres).'">';
646
- foreach ( $gn_genres as $name)
647
echo '
648
<option value="'.$name.'" '.selected( in_array($name,$genres_default), true, false ).'>'.$name.'</option>';
649
echo '
650
</select></label></li>
651
</ul>
@@ -653,12 +649,8 @@ jQuery( document ).ready( function() {
653
<p class="description">'.__('Use the Ctrl/Cmd key plus click to select more than one or to deselect.','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>
654
</fieldset>';
655
656
- /* }
657
-
658
- public function news_keywords_field() {
659
- $options = parent::get_option('news_tags');
660
- $prefix = parent::prefix();*/
661
662
$keywords = !empty($options['keywords']) ? $options['keywords'] : array();
663
$keywords_from = !empty($keywords['from']) ? $keywords['from'] : '';
664
echo '
@@ -678,17 +670,17 @@ jQuery( document ).ready( function() {
678
}
679
echo '
680
</ul>
681
- <p class="description">'.__('Keywords may be drawn from, but are not limited to, the list of <a href="http://www.google.com/support/news_pub/bin/answer.py?answer=116037" target="_blank">existing Google News keywords</a>.','xml-sitemap-feed').'</p>
682
</fieldset>';
683
}
684
-
685
//sanitize callback functions
686
687
public function sanitize_robots_settings($new) {
688
if(is_array($new)) $new = array_shift(array_filter($new));
689
return trim(strip_tags($new));
690
}
691
-
692
public function sanitize_sitemaps_settings($new) {
693
$old = parent::get_sitemaps();
694
@@ -698,10 +690,10 @@ jQuery( document ).ready( function() {
698
if( '1' == get_option('blog_public') ) {
699
if ($old != $new && !isset($new['reset'])) // when sitemaps are added or removed, set transient to flush rewrite rules
700
set_transient('xmlsf_flush_rewrite_rules','');
701
-
702
if (empty($old['sitemap-news']) && !empty($new['sitemap-news']))
703
set_transient('xmlsf_create_genres','');
704
-
705
$sanitized = $new;
706
} else {
707
$sanitized = $old;
@@ -709,13 +701,13 @@ jQuery( document ).ready( function() {
709
710
return $sanitized;
711
}
712
-
713
public function sanitize_post_types_settings( $new = array() ) {
714
$old = parent::get_post_types();
715
$defaults = parent::defaults('post_types');
716
$sanitized = $new;
717
$flush = false;
718
-
719
foreach ($new as $post_type => $settings) {
720
721
// when post types are (de)activated, set transient to flush rewrite rules
@@ -728,7 +720,7 @@ jQuery( document ).ready( function() {
728
$sanitized[$post_type]['priority'] = $defaults[$post_type]['priority'];
729
}
730
}
731
-
732
if ($flush)
733
set_transient('xmlsf_flush_rewrite_rules','');
734
@@ -763,7 +755,7 @@ jQuery( document ).ready( function() {
763
764
foreach ($input_arr as $line) {
765
$line = filter_var(esc_url(trim($line)),FILTER_VALIDATE_URL,FILTER_FLAG_PATH_REQUIRED);
766
- if(!empty($line))
767
$sanitized[] = $line;
768
}
769
@@ -778,7 +770,7 @@ jQuery( document ).ready( function() {
778
$callback = create_function('$a','return filter_var($a,FILTER_VALIDATE_URL) || is_numeric($a);');
779
780
foreach ($input_arr as $line) {
781
- if(empty($line))
782
continue;
783
784
$arr = array_values(array_filter(explode(" ",trim($line)),$callback));
@@ -788,7 +780,7 @@ jQuery( document ).ready( function() {
788
$arr[1] = $this->sanitize_priority($arr[1]);
789
else
790
$arr[1] = '0.5';
791
-
792
$sanitized[] = array( esc_url($arr[0]) , $arr[1] );
793
}
794
}
@@ -797,7 +789,7 @@ jQuery( document ).ready( function() {
797
if (!empty($sanitized))
798
set_transient('xmlsf_flush_rewrite_rules','');
799
} else if (empty($sanitized)) {
800
- set_transient('xmlsf_flush_rewrite_rules','');
801
}
802
803
return (!empty($sanitized)) ? $sanitized : '';
@@ -818,15 +810,15 @@ jQuery( document ).ready( function() {
818
} else {
819
$domain_arr = explode('/', $parsed_url['path']);
820
$domain_arr = array_filter($domain_arr);
821
- $domain = array_shift( $domain_arr );
822
$domain = trim( $domain );
823
}
824
-
825
// filter out empties and default domain
826
if(!empty($domain) && $domain !== $default && strpos($domain,".".$default) === false)
827
$sanitized[] = $domain;
828
}
829
-
830
return (!empty($sanitized)) ? $sanitized : '';
831
}
832
@@ -834,24 +826,23 @@ jQuery( document ).ready( function() {
834
return $new;
835
}
836
837
-
838
// action links
839
-
840
public function add_action_link( $links ) {
841
$settings_link = '<a href="' . admin_url('options-reading.php') . '#blog_public">' . translate('Settings') . '</a>';
842
- array_unshift( $links, $settings_link );
843
return $links;
844
}
845
846
/**
847
- * META BOX
848
*/
849
850
- /* Adds a box to the side column */
851
- public function add_meta_boxes()
852
- {
853
- // XML Sitemap
854
- foreach (parent::get_post_types() as $post_type) {
855
// Only include metaboxes on post types that are included
856
if (isset($post_type["active"]))
857
add_meta_box(
@@ -859,24 +850,13 @@ jQuery( document ).ready( function() {
859
__( 'XML Sitemap', 'xml-sitemap-feed' ),
860
array($this,'meta_box'),
861
$post_type['name'],
862
- 'side'
863
);
864
}
865
- // Google News Sitemap
866
- // Only include metaboxes on post types that are included
867
- $news_tags = parent::get_option('news_tags');
868
- foreach ( (array)$news_tags['post_type'] as $post_type ) {
869
- add_meta_box(
870
- 'xmlsf_news_section',
871
- __( 'Google News Sitemap', 'xml-sitemap-feed' ),
872
- array($this,'meta_box_news'),
873
- $post_type,
874
- 'side'
875
- );
876
- }
877
}
878
879
- public function meta_box($post)
880
{
881
// Use nonce for verification
882
wp_nonce_field( plugin_basename( __FILE__ ), 'xmlsf_sitemap_nonce' );
@@ -886,31 +866,47 @@ jQuery( document ).ready( function() {
886
$exclude = get_post_meta( $post->ID, '_xmlsf_exclude', true );
887
$priority = get_post_meta( $post->ID, '_xmlsf_priority', true );
888
$disabled = '';
889
-
890
// disable options and (visibly) set excluded to true for private posts
891
if ( 'private' == $post->post_status ) {
892
$disabled = ' disabled="disabled"';
893
$exclude = true;
894
- }
895
-
896
// disable options and (visibly) set priority to 1 for front page
897
if ( $post->ID == get_option('page_on_front') ) {
898
$disabled = ' disabled="disabled"';
899
$priority = '1'; // force excluded to true for private posts
900
}
901
-
902
- echo '<p><label><input type="checkbox" name="xmlsf_exclude" id="xmlsf_exclude" value="1"'.checked(!empty($exclude), true, false).$disabled.' > ';
903
- _e('Exclude from XML Sitemap','xml-sitemap-feed');
904
- echo '</label></p>';
905
906
echo '<p><label>';
907
_e('Priority','xml-sitemap-feed');
908
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">';
909
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>');
910
echo '</span></p>';
911
}
912
913
- public function meta_box_news($post)
914
{
915
// Use nonce for verification
916
wp_nonce_field( plugin_basename( __FILE__ ), 'xmlsf_sitemap_nonce' );
@@ -920,12 +916,12 @@ jQuery( document ).ready( function() {
920
$exclude = get_post_meta( $post->ID, '_xmlsf_news_exclude', true );
921
$access = get_post_meta( $post->ID, '_xmlsf_news_access', true );
922
$disabled = '';
923
-
924
// disable options and (visibly) set excluded to true for private posts
925
if ( 'private' == $post->post_status ) {
926
$disabled = ' disabled="disabled"';
927
$exclude = true;
928
- }
929
930
echo '<p><label>'.__('Access','xml-sitemap-feed').'
931
<select name="xmlsf_news_access" id="xmlsf_news_access">
@@ -936,12 +932,12 @@ jQuery( document ).ready( function() {
936
</select></label></p>';
937
938
echo '<p><label><input type="checkbox" name="xmlsf_news_exclude" id="xmlsf_news_exclude" value="1"'.checked(!empty($exclude), true, false).$disabled.' > ';
939
- _e('Exclude from Google News Sitemap','xml-sitemap-feed');
940
echo '</label></p>';
941
}
942
-
943
/* When the post is saved, save our meta data */
944
- function save_metadata( $post_id )
945
{
946
if ( !isset($post_id) )
947
$post_id = (int)$_REQUEST['post_ID'];
@@ -955,14 +951,14 @@ jQuery( document ).ready( function() {
955
} else {
956
delete_post_meta($post_id, '_xmlsf_priority');
957
}
958
-
959
// _xmlsf_exclude
960
if ( isset($_POST['xmlsf_exclude']) && $_POST['xmlsf_exclude'] != '' ) {
961
update_post_meta($post_id, '_xmlsf_exclude', $_POST['xmlsf_exclude']);
962
} else {
963
delete_post_meta($post_id, '_xmlsf_exclude');
964
}
965
-
966
// _xmlsf_news_exclude
967
if ( isset($_POST['xmlsf_news_exclude']) && $_POST['xmlsf_news_exclude'] != '' ) {
968
update_post_meta($post_id, '_xmlsf_news_exclude', $_POST['xmlsf_news_exclude']);
@@ -985,7 +981,7 @@ jQuery( document ).ready( function() {
985
function __construct() {
986
$sitemaps = parent::get_sitemaps();
987
$prefix = parent::prefix();
988
-
989
// sitemaps
990
register_setting('reading', $prefix.'sitemaps', array($this,'sanitize_sitemaps_settings') );
991
add_settings_field($prefix.'sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading');
@@ -997,57 +993,58 @@ jQuery( document ).ready( function() {
997
add_settings_field($prefix.'robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading');
998
}
999
1000
- if ( get_option('blog_public') ) {
1001
- if ( is_multisite() && is_plugin_active_for_network(XMLSF_PLUGIN_BASENAME) )
1002
- add_settings_field($prefix.'reset', __('Reset XML sitemaps','xml-sitemap-feed'), array($this,'reset_settings_field'), 'reading');
1003
-
1004
- if ( isset($sitemaps['sitemap']) ) {
1005
- // XML SITEMAP SETTINGS
1006
- add_settings_section('xml_sitemap_section', '<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed'), array($this,'xml_sitemap_settings'), 'reading');
1007
- // post_types
1008
- register_setting('reading', $prefix.'post_types', array($this,'sanitize_post_types_settings') );
1009
- add_settings_field($prefix.'post_types', __('Include post types','xml-sitemap-feed'), array($this,'post_types_settings_field'), 'reading', 'xml_sitemap_section');
1010
- // taxonomies
1011
- register_setting('reading', $prefix.'taxonomies', array($this,'sanitize_taxonomies_settings') );
1012
- add_settings_field($prefix.'taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_settings_field'), 'reading', 'xml_sitemap_section');
1013
- // custom domains
1014
- register_setting('reading', $prefix.'domains', array($this,'sanitize_domains_settings') );
1015
- add_settings_field($prefix.'domains', __('Allowed domains','xml-sitemap-feed'), array($this,'domains_settings_field'), 'reading', 'xml_sitemap_section');
1016
- // custom urls
1017
- register_setting('reading', $prefix.'urls', array($this,'sanitize_urls_settings') );
1018
- add_settings_field($prefix.'urls', __('Include custom URLs','xml-sitemap-feed'), array($this,'urls_settings_field'), 'reading', 'xml_sitemap_section');
1019
- // custom sitemaps
1020
- register_setting('reading', $prefix.'custom_sitemaps', array($this,'sanitize_custom_sitemaps_settings') );
1021
- add_settings_field($prefix.'custom_sitemaps', __('Include custom XML Sitemaps','xml-sitemap-feed'), array($this,'custom_sitemaps_settings_field'), 'reading', 'xml_sitemap_section');
1022
-
1023
- // POST META BOX
1024
- add_action( 'add_meta_boxes', array($this,'add_meta_boxes') );
1025
- add_action( 'save_post', array($this,'save_metadata') );
1026
- }
1027
-
1028
- if ( isset($sitemaps['sitemap-news']) ) {
1029
- // XML SITEMAP SETTINGS
1030
- add_settings_section('news_sitemap_section', '<a name="xmlnf"></a>'.__('Google News Sitemap','xml-sitemap-feed'), array($this,'news_sitemap_settings'), 'reading');
1031
-
1032
- // tags
1033
- register_setting('reading', $prefix.'news_tags', array($this,'sanitize_news_tags_settings') );
1034
- add_settings_field($prefix.'news_name', '<label for="xmlsf_news_name">'.__('Publication name','xml-sitemap-feed').'</label>', array($this,'news_name_field'), 'reading', 'news_sitemap_section');
1035
- add_settings_field($prefix.'news_post_type', __('Include post types','xml-sitemap-feed'), array($this,'news_post_type_field'), 'reading', 'news_sitemap_section');
1036
- add_settings_field($prefix.'news_categories', translate('Categories'), array($this,'news_categories_field'), 'reading', 'news_sitemap_section');
1037
- add_settings_field($prefix.'news_image', translate('Images'), array($this,'news_image_field'), 'reading', 'news_sitemap_section');
1038
- add_settings_field($prefix.'news_labels', __('Source labels','xml-sitemap-feed'), array($this,'news_labels_field'), 'reading', 'news_sitemap_section');
1039
- // add_settings_field($prefix.'news_keywords', __('Topics','xml-sitemap-feed'), array($this,'news_keywords_field'), 'reading', 'news_sitemap_section');
1040
1041
- }
1042
1043
- if ( isset($sitemaps['sitemap']) || isset($sitemaps['sitemap-news']) ) {
1044
- register_setting('writing', $prefix.'ping', array($this,'sanitize_ping_settings') );
1045
- add_settings_field($prefix.'ping', translate('Update Services'), array($this,'ping_settings_field'), 'writing');
1046
- }
1047
}
1048
1049
- // ACTION LINK
1050
- add_filter('plugin_action_links_' . XMLSF_PLUGIN_BASENAME, array($this, 'add_action_link') );
1051
}
1052
1053
}
2
/* ------------------------------
3
* XMLSF Admin CLASS
4
* ------------------------------ */
5
+
6
+ if ( ! defined( 'WPINC' ) ) die;
7
+
8
if ( class_exists('XMLSitemapFeed') ) :
9
10
class XMLSF_Admin extends XMLSitemapFeed {
62
}
63
64
/* PINGS */
65
+
66
public function ping_settings_field() {
67
$options = parent::get_ping();
68
$defaults = parent::defaults('ping');
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="'.$prefix.'ping['.
112
$key.'][uri]" value="'.
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
}
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>
217
/**
218
* XML SITEMAP SECTION
219
*/
220
+
221
public function xml_sitemap_settings() {
222
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="'.
223
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(__('These settings control the XML Sitemaps generated by the %s plugin.','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).' '.
226
sprintf(__('For ping options, go to %s.','xml-sitemap-feed'),'<a href="options-writing.php">'.translate('Writing Settings').'</a>').'</p>';
227
}
228
+
229
public function post_types_settings_field() {
230
$options = parent::get_post_types();
231
$defaults = parent::defaults('post_types');
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="'.$prefix.'post_types['.
250
$post_type->name.'][name]" value="'.
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() {
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="'.$prefix.'post_types['.
284
$post_type->name.'][archive]" id="xmlsf_post_types_'.
285
$post_type->name.'_archive">
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="'.$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>';
303
<li><label><input type="checkbox" name="'.$prefix.'post_types['.
304
$post_type->name.'][dynamic_priority]" value="1" '.
305
checked( !empty($options[$post_type->name]['dynamic_priority']), true, false).' /> '.__('Automatically adjusts Priority according to relative age and comment count.','xml-sitemap-feed').'</label> <span class="description">'.__('Sticky posts will not be subject to reduction by age. 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="'.$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 and Changefreq 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
+ echo '
314
<li><label>'.__('Add image tags for','xml-sitemap-feed').' <select name="'.$prefix.'post_types['.
315
$post_type->name.'][tags][image]">
316
<option value="">'.translate('None').'</option>
321
selected( $image == "attached", true, false).
322
'>'.__('Attached images','xml-sitemap-feed').'</option>
323
</select></label></li>
324
+
325
</ul>';
326
} else {
327
echo '<br>';
329
}
330
331
echo '
332
+ <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('[more]').'</a>
333
<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>
334
<script type="text/javascript">
335
jQuery( document ).ready( function() {
358
$skip = true;
359
foreach ( $taxonomy->object_type as $post_type)
360
if (!empty($active[$post_type]['active']) && $active[$post_type]['active'] == '1')
361
+ $skip = false;
362
if ($skip) continue; // skip if none of the associated post types are active
363
+
364
$count = wp_count_terms( $taxonomy->name );
365
$output .= '
366
<label><input type="checkbox" name="'.parent::prefix().'taxonomies['.
377
$output .= '
378
<br>';
379
}
380
+
381
if ($output) {
382
echo '
383
<fieldset id="xmlsf_taxonomies"><legend class="screen-reader-text">'.__('XML Sitemaps for taxonomies','xml-sitemap-feed').'</legend>
386
echo $output;
387
388
echo '
389
+ <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('[more]').'</a>
390
<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').' '.
391
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>');
392
echo '</span></p>
409
410
public function custom_sitemaps_settings_field() {
411
$lines = parent::get_custom_sitemaps();
412
+
413
echo '
414
<fieldset><legend class="screen-reader-text">'.__('Include custom XML Sitemaps','xml-sitemap-feed').'</legend>
415
<label>'.__('Additional XML Sitemaps to append to the main XML Sitemap Index:','xml-sitemap-feed').'<br>
416
<textarea name="'.parent::prefix().'custom_sitemaps" id="xmlsf_custom_sitemaps" class="large-text" cols="50" rows="4" />'. implode("\n",$lines) .'</textarea></label>
417
<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>
418
</fieldset>';
419
+
420
}
421
422
public function urls_settings_field() {
423
$urls = parent::get_urls();
424
$lines = array();
425
+
426
if(!empty($urls)) {
427
foreach($urls as $arr) {
428
+ if(is_array($arr))
429
$lines[] = implode(" ",$arr);
430
}
431
}
432
+
433
echo '
434
<fieldset><legend class="screen-reader-text">'.__('Include custom URLs','xml-sitemap-feed').'</legend>
435
<label>'.__('Additional URLs to append in an extra XML Sitemap:','xml-sitemap-feed').'<br>
436
<textarea name="'.parent::prefix().'urls" id="xmlsf_urls" class="large-text" cols="50" rows="4" />'. implode("\n",$lines) .'</textarea></label>
437
<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>
438
</fieldset>';
439
+
440
}
441
442
public function domains_settings_field() {
448
<label>'.__('Additional domains to allow in the XML Sitemaps:','xml-sitemap-feed').'<br><textarea name="'.parent::prefix().'domains" id="xmlsf_domains" class="large-text" cols="50" rows="4" />'. implode("\n",$domains) .'</textarea></label>
449
<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>
450
</fieldset>';
451
+
452
}
453
454
455
/**
456
* GOOGLE NEWS SITEMAP SECTION
457
*/
458
+
459
public function news_sitemap_settings() {
460
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="'.
461
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="'.
467
468
}
469
470
+ //TODO: publication name allow tag %category% ... post_types (+ exclusion per post or none + allow inclusion per post), limit to category ...
471
public function news_name_field() {
472
$options = parent::get_option('news_tags');
473
474
$name = !empty($options['name']) ? $options['name'] : '';
475
echo '
476
<fieldset><legend class="screen-reader-text">'.__('Publication name','xml-sitemap-feed').'</legend>
477
+ <input type="text" name="'.parent::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">' .
478
__('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>.') . '</p>
479
</fieldset>';
480
}
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;
512
$checked = false;
513
}
514
}
515
+
516
echo '
517
<label><input type="checkbox" name="'.$prefix.'news_tags[post_type][]" id="xmlsf_post_type_'.
518
$post_type->name.'" value="'.$post_type->name.'" '.
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;
552
echo '
553
<label>'.__('Limit to posts in these post categories:','xml-sitemap-feed').'<br>
554
<select multiple name="'.parent::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);
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>';
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">'.__('More information&hellip;','xml-sitemap-feed').'</a></p>
592
</fieldset>';
593
}
597
<fieldset id="xmlsf_news_labels"><legend class="screen-reader-text">'.__('Source labels','xml-sitemap-feed').'</legend>' .
598
sprintf(__('You can use the %1$s and %2$s tags to provide Google more information about the content of your articles.','xml-sitemap-feed'),'&lt;access&gt;','&lt;genres&gt;') . ' <a href="https://support.google.com/news/publisher/answer/93992" target="_blank">'.__('More information&hellip;','xml-sitemap-feed').'</a>
599
<br><br>';
600
+
601
$options = parent::get_option('news_tags');
602
$prefix = parent::prefix();
603
607
$access_password = !empty($access['password']) ? $access['password'] : '';
608
echo '
609
<fieldset id="xmlsf_news_labels_access"><legend class="screen-reader-text">&lt;access&gt;</legend>
610
+ '.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>').'
611
'.__('You can assign a different access level when writing a post.','xml-sitemap-feed') . '
612
<ul>';
613
+
614
echo '
615
<li><label>'.__('Tag normal posts as','xml-sitemap-feed').' <select name="'.$prefix.'news_tags[access][default]" id="xmlsf_news_tags_access_default">
616
<option value="">'.translate('Public').'</option>
634
echo '
635
<fieldset id="xmlsf_news_labels_genres"><legend class="screen-reader-text">&lt;genres&gt;</legend>
636
'.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');
637
+
638
echo '
639
<ul>
640
<li><label>'.__('Default genre:','xml-sitemap-feed').'<br><select multiple name="'.$prefix.'news_tags[genres][default][]" id="xmlsf_news_tags_genres_default" size="'.count($gn_genres).'">';
641
+ foreach ( $gn_genres as $name) {
642
echo '
643
<option value="'.$name.'" '.selected( in_array($name,$genres_default), true, false ).'>'.$name.'</option>';
644
+ }
645
echo '
646
</select></label></li>
647
</ul>
649
<p class="description">'.__('Use the Ctrl/Cmd key plus click to select more than one or to deselect.','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>
650
</fieldset>';
651
652
653
+ // keywords
654
$keywords = !empty($options['keywords']) ? $options['keywords'] : array();
655
$keywords_from = !empty($keywords['from']) ? $keywords['from'] : '';
656
echo '
670
}
671
echo '
672
</ul>
673
+ <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>
674
</fieldset>';
675
}
676
+
677
//sanitize callback functions
678
679
public function sanitize_robots_settings($new) {
680
if(is_array($new)) $new = array_shift(array_filter($new));
681
return trim(strip_tags($new));
682
}
683
+
684
public function sanitize_sitemaps_settings($new) {
685
$old = parent::get_sitemaps();
686
690
if( '1' == get_option('blog_public') ) {
691
if ($old != $new && !isset($new['reset'])) // when sitemaps are added or removed, set transient to flush rewrite rules
692
set_transient('xmlsf_flush_rewrite_rules','');
693
+
694
if (empty($old['sitemap-news']) && !empty($new['sitemap-news']))
695
set_transient('xmlsf_create_genres','');
696
+
697
$sanitized = $new;
698
} else {
699
$sanitized = $old;
701
702
return $sanitized;
703
}
704
+
705
public function sanitize_post_types_settings( $new = array() ) {
706
$old = parent::get_post_types();
707
$defaults = parent::defaults('post_types');
708
$sanitized = $new;
709
$flush = false;
710
+
711
foreach ($new as $post_type => $settings) {
712
713
// when post types are (de)activated, set transient to flush rewrite rules
720
$sanitized[$post_type]['priority'] = $defaults[$post_type]['priority'];
721
}
722
}
723
+
724
if ($flush)
725
set_transient('xmlsf_flush_rewrite_rules','');
726
755
756
foreach ($input_arr as $line) {
757
$line = filter_var(esc_url(trim($line)),FILTER_VALIDATE_URL,FILTER_FLAG_PATH_REQUIRED);
758
+ if(!empty($line))
759
$sanitized[] = $line;
760
}
761
770
$callback = create_function('$a','return filter_var($a,FILTER_VALIDATE_URL) || is_numeric($a);');
771
772
foreach ($input_arr as $line) {
773
+ if(empty($line))
774
continue;
775
776
$arr = array_values(array_filter(explode(" ",trim($line)),$callback));
780
$arr[1] = $this->sanitize_priority($arr[1]);
781
else
782
$arr[1] = '0.5';
783
+
784
$sanitized[] = array( esc_url($arr[0]) , $arr[1] );
785
}
786
}
789
if (!empty($sanitized))
790
set_transient('xmlsf_flush_rewrite_rules','');
791
} else if (empty($sanitized)) {
792
+ set_transient('xmlsf_flush_rewrite_rules','');
793
}
794
795
return (!empty($sanitized)) ? $sanitized : '';
810
} else {
811
$domain_arr = explode('/', $parsed_url['path']);
812
$domain_arr = array_filter($domain_arr);
813
+ $domain = array_shift( $domain_arr );
814
$domain = trim( $domain );
815
}
816
+
817
// filter out empties and default domain
818
if(!empty($domain) && $domain !== $default && strpos($domain,".".$default) === false)
819
$sanitized[] = $domain;
820
}
821
+
822
return (!empty($sanitized)) ? $sanitized : '';
823
}
824
826
return $new;
827
}
828
829
+
830
// action links
831
+
832
public function add_action_link( $links ) {
833
$settings_link = '<a href="' . admin_url('options-reading.php') . '#blog_public">' . translate('Settings') . '</a>';
834
+ array_unshift( $links, $settings_link );
835
return $links;
836
}
837
838
/**
839
+ * META BOXES
840
*/
841
842
+ /* Adds a XML Sitemap box to the side column */
843
+ public function add_meta_box ()
844
+ {
845
+ foreach ( parent::get_post_types() as $post_type ) {
846
// Only include metaboxes on post types that are included
847
if (isset($post_type["active"]))
848
add_meta_box(
850
__( 'XML Sitemap', 'xml-sitemap-feed' ),
851
array($this,'meta_box'),
852
$post_type['name'],
853
+ 'side',
854
+ 'low'
855
);
856
}
857
}
858
859
+ public function meta_box($post)
860
{
861
// Use nonce for verification
862
wp_nonce_field( plugin_basename( __FILE__ ), 'xmlsf_sitemap_nonce' );
866
$exclude = get_post_meta( $post->ID, '_xmlsf_exclude', true );
867
$priority = get_post_meta( $post->ID, '_xmlsf_priority', true );
868
$disabled = '';
869
+
870
// disable options and (visibly) set excluded to true for private posts
871
if ( 'private' == $post->post_status ) {
872
$disabled = ' disabled="disabled"';
873
$exclude = true;
874
+ }
875
+
876
// disable options and (visibly) set priority to 1 for front page
877
if ( $post->ID == get_option('page_on_front') ) {
878
$disabled = ' disabled="disabled"';
879
$priority = '1'; // force excluded to true for private posts
880
}
881
882
echo '<p><label>';
883
_e('Priority','xml-sitemap-feed');
884
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">';
885
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>');
886
echo '</span></p>';
887
+
888
+ echo '<p><label><input type="checkbox" name="xmlsf_exclude" id="xmlsf_exclude" value="1"'.checked(!empty($exclude), true, false).$disabled.' > ';
889
+ _e('Exclude from XML Sitemap','xml-sitemap-feed');
890
+ echo '</label></p>';
891
}
892
893
+ /* Adds a News Sitemap box to the side column */
894
+ public function add_meta_box_news ()
895
+ {
896
+ $news_tags = parent::get_option('news_tags');
897
+ foreach ( (array)$news_tags['post_type'] as $post_type ) {
898
+ // Only include metabox on post types that are included
899
+ add_meta_box(
900
+ 'xmlsf_news_section',
901
+ __( 'Google News', 'xml-sitemap-feed' ),
902
+ array($this,'meta_box_news'),
903
+ $post_type,
904
+ 'side'
905
+ );
906
+ }
907
+ }
908
+
909
+ public function meta_box_news($post)
910
{
911
// Use nonce for verification
912
wp_nonce_field( plugin_basename( __FILE__ ), 'xmlsf_sitemap_nonce' );
916
$exclude = get_post_meta( $post->ID, '_xmlsf_news_exclude', true );
917
$access = get_post_meta( $post->ID, '_xmlsf_news_access', true );
918
$disabled = '';
919
+
920
// disable options and (visibly) set excluded to true for private posts
921
if ( 'private' == $post->post_status ) {
922
$disabled = ' disabled="disabled"';
923
$exclude = true;
924
+ }
925
926
echo '<p><label>'.__('Access','xml-sitemap-feed').'
927
<select name="xmlsf_news_access" id="xmlsf_news_access">
932
</select></label></p>';
933
934
echo '<p><label><input type="checkbox" name="xmlsf_news_exclude" id="xmlsf_news_exclude" value="1"'.checked(!empty($exclude), true, false).$disabled.' > ';
935
+ _e('Exclude from Google News Sitemap.','xml-sitemap-feed');
936
echo '</label></p>';
937
}
938
+
939
/* When the post is saved, save our meta data */
940
+ function save_metadata( $post_id )
941
{
942
if ( !isset($post_id) )
943
$post_id = (int)$_REQUEST['post_ID'];
951
} else {
952
delete_post_meta($post_id, '_xmlsf_priority');
953
}
954
+
955
// _xmlsf_exclude
956
if ( isset($_POST['xmlsf_exclude']) && $_POST['xmlsf_exclude'] != '' ) {
957
update_post_meta($post_id, '_xmlsf_exclude', $_POST['xmlsf_exclude']);
958
} else {
959
delete_post_meta($post_id, '_xmlsf_exclude');
960
}
961
+
962
// _xmlsf_news_exclude
963
if ( isset($_POST['xmlsf_news_exclude']) && $_POST['xmlsf_news_exclude'] != '' ) {
964
update_post_meta($post_id, '_xmlsf_news_exclude', $_POST['xmlsf_news_exclude']);
981
function __construct() {
982
$sitemaps = parent::get_sitemaps();
983
$prefix = parent::prefix();
984
+
985
// sitemaps
986
register_setting('reading', $prefix.'sitemaps', array($this,'sanitize_sitemaps_settings') );
987
add_settings_field($prefix.'sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading');
993
add_settings_field($prefix.'robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading');
994
}
995
996
+ // ACTION LINK
997
+ add_filter('plugin_action_links_' . XMLSF_PLUGIN_BASENAME, array($this, 'add_action_link') );
998
999
+ // stop here if blog is not public
1000
+ if ( !get_option('blog_public') ) { return; }
1001
+
1002
+ if ( is_multisite() && is_plugin_active_for_network(XMLSF_PLUGIN_BASENAME) ) {
1003
+ add_settings_field($prefix.'reset', __('Reset XML sitemaps','xml-sitemap-feed'), array($this,'reset_settings_field'), 'reading');
1004
+ }
1005
+
1006
+ if ( isset($sitemaps['sitemap-news']) ) {
1007
+ // XML SITEMAP SETTINGS
1008
+ add_settings_section('news_sitemap_section', '<a name="xmlnf"></a>'.__('Google News Sitemap','xml-sitemap-feed'), array($this,'news_sitemap_settings'), 'reading');
1009
+ // tags
1010
+ register_setting('reading', $prefix.'news_tags', array($this,'sanitize_news_tags_settings') );
1011
+ add_settings_field($prefix.'news_name', '<label for="xmlsf_news_name">'.__('Publication name','xml-sitemap-feed').'</label>', array($this,'news_name_field'), 'reading', 'news_sitemap_section');
1012
+ add_settings_field($prefix.'news_post_type', __('Include post types','xml-sitemap-feed'), array($this,'news_post_type_field'), 'reading', 'news_sitemap_section');
1013
+ add_settings_field($prefix.'news_categories', translate('Categories'), array($this,'news_categories_field'), 'reading', 'news_sitemap_section');
1014
+ add_settings_field($prefix.'news_image', translate('Images'), array($this,'news_image_field'), 'reading', 'news_sitemap_section');
1015
+ add_settings_field($prefix.'news_labels', __('Source labels','xml-sitemap-feed'), array($this,'news_labels_field'), 'reading', 'news_sitemap_section');
1016
+ // post meta box
1017
+ add_action( 'add_meta_boxes', array($this,'add_meta_box_news') );
1018
+ }
1019
1020
+ if ( isset($sitemaps['sitemap']) ) {
1021
+ // XML SITEMAP SETTINGS
1022
+ add_settings_section('xml_sitemap_section', '<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed'), array($this,'xml_sitemap_settings'), 'reading');
1023
+ // post_types
1024
+ register_setting('reading', $prefix.'post_types', array($this,'sanitize_post_types_settings') );
1025
+ add_settings_field($prefix.'post_types', __('Include post types','xml-sitemap-feed'), array($this,'post_types_settings_field'), 'reading', 'xml_sitemap_section');
1026
+ // taxonomies
1027
+ register_setting('reading', $prefix.'taxonomies', array($this,'sanitize_taxonomies_settings') );
1028
+ add_settings_field($prefix.'taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_settings_field'), 'reading', 'xml_sitemap_section');
1029
+ // custom domains
1030
+ register_setting('reading', $prefix.'domains', array($this,'sanitize_domains_settings') );
1031
+ add_settings_field($prefix.'domains', __('Allowed domains','xml-sitemap-feed'), array($this,'domains_settings_field'), 'reading', 'xml_sitemap_section');
1032
+ // custom urls
1033
+ register_setting('reading', $prefix.'urls', array($this,'sanitize_urls_settings') );
1034
+ add_settings_field($prefix.'urls', __('Include custom URLs','xml-sitemap-feed'), array($this,'urls_settings_field'), 'reading', 'xml_sitemap_section');
1035
+ // custom sitemaps
1036
+ register_setting('reading', $prefix.'custom_sitemaps', array($this,'sanitize_custom_sitemaps_settings') );
1037
+ add_settings_field($prefix.'custom_sitemaps', __('Include custom XML Sitemaps','xml-sitemap-feed'), array($this,'custom_sitemaps_settings_field'), 'reading', 'xml_sitemap_section');
1038
+ // post meta box
1039
+ add_action( 'add_meta_boxes', array($this,'add_meta_box') );
1040
}
1041
1042
+ if ( isset($sitemaps['sitemap']) || isset($sitemaps['sitemap-news']) ) {
1043
+ register_setting('writing', $prefix.'ping', array($this,'sanitize_ping_settings') );
1044
+ add_settings_field($prefix.'ping', translate('Update Services'), array($this,'ping_settings_field'), 'writing');
1045
+ // save post meta box settings
1046
+ add_action( 'save_post', array($this,'save_metadata') );
1047
+ }
1048
}
1049
1050
}
includes/core.php CHANGED
@@ -3,8 +3,6 @@
3
* XMLSitemapFeed CLASS
4
* ------------------------------ */
5
6
- if ( !class_exists('XMLSitemapFeed') ) :
7
-
8
class XMLSitemapFeed {
9
10
/**
@@ -176,7 +174,6 @@ class XMLSitemapFeed {
176
'password' => 'Subscription'
177
),
178
'genres' => array(
179
- 'active' => '1',
180
'default' => array('Blog')
181
),
182
'keywords' => array(
@@ -1299,6 +1296,7 @@ class XMLSitemapFeed {
1299
'labels' => array(
1300
'name' => __('Google News Genres','xml-sitemap-feed'),
1301
'singular_name' => __('Google News Genre','xml-sitemap-feed'),
1302
//'menu_name' => __('GN Genres','xml-sitemap-feed'),
1303
),
1304
'public' => false,
@@ -1377,5 +1375,3 @@ class XMLSitemapFeed {
1377
1378
}
1379
}
1380
-
1381
- endif;
3
* XMLSitemapFeed CLASS
4
* ------------------------------ */
5
6
class XMLSitemapFeed {
7
8
/**
174
'password' => 'Subscription'
175
),
176
'genres' => array(
177
'default' => array('Blog')
178
),
179
'keywords' => array(
1296
'labels' => array(
1297
'name' => __('Google News Genres','xml-sitemap-feed'),
1298
'singular_name' => __('Google News Genre','xml-sitemap-feed'),
1299
+ 'all_items' => translate('All') // __('All Genres','xml-sitemap-feed')
1300
//'menu_name' => __('GN Genres','xml-sitemap-feed'),
1301
),
1302
'public' => false,
1375
1376
}
1377
}
includes/feed-sitemap-custom.php CHANGED
@@ -5,6 +5,8 @@
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
9
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
10
header('X-Robots-Tag: noindex, follow', true);
@@ -16,8 +18,8 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
16
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
17
<!-- generator-version="' . XMLSF_VERSION . '" -->
18
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
19
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
21
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
22
';
23
@@ -26,7 +28,7 @@ global $xmlsf;
26
$urls = $xmlsf->get_urls();
27
28
// and loop away!
29
- foreach ( $urls as $url ) {
30
if (empty($url[0]))
31
continue;
32
@@ -36,12 +38,12 @@ foreach ( $urls as $url ) {
36
<loc><?php echo esc_url( $url[0] ); ?></loc>
37
<priority><?php echo ( isset($url[1]) && is_numeric($url[1]) ) ? $url[1] : '0.5'; ?></priority>
38
</url>
39
- <?php
40
} else {
41
?>
42
- <!-- URL <?php echo esc_url( $url[0] ); ?> skipped: Not within allowed domains. -->
43
<?php
44
}
45
- }
46
?></urlset>
47
<?php $xmlsf->_e_usage();
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
11
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
12
header('X-Robots-Tag: noindex, follow', true);
18
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
19
<!-- generator-version="' . XMLSF_VERSION . '" -->
20
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
21
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
23
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
24
';
25
28
$urls = $xmlsf->get_urls();
29
30
// and loop away!
31
+ foreach ( $urls as $url ) {
32
if (empty($url[0]))
33
continue;
34
38
<loc><?php echo esc_url( $url[0] ); ?></loc>
39
<priority><?php echo ( isset($url[1]) && is_numeric($url[1]) ) ? $url[1] : '0.5'; ?></priority>
40
</url>
41
+ <?php
42
} else {
43
?>
44
+ <!-- URL <?php echo esc_url( $url[0] ); ?> skipped: Not within allowed domains. -->
45
<?php
46
}
47
+ }
48
?></urlset>
49
<?php $xmlsf->_e_usage();
includes/feed-sitemap-home.php CHANGED
@@ -5,6 +5,8 @@
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
9
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
10
header('X-Robots-Tag: noindex, follow', true);
@@ -15,9 +17,9 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
15
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
16
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
17
<!-- generator-version="' . XMLSF_VERSION . '" -->
18
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
19
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
21
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
22
';
23
@@ -29,14 +31,14 @@ foreach ( $xmlsf->get_home_urls() as $url ) {
29
<url>
30
<loc><?php echo esc_url( $url ); ?></loc>
31
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified, false); ?></lastmod>
32
- <changefreq><?php
33
- if ( ($lastactivityage/86400) < 1 ) { // last activity less than 1 day old
34
echo 'hourly';
35
- } else if ( ($lastactivityage/86400) < 7 ) { // last activity less than 1 week old
36
echo 'daily';
37
- } else { // over a week old
38
echo 'weekly';
39
- }
40
?></changefreq>
41
<priority>1.0</priority>
42
</url>
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
11
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
12
header('X-Robots-Tag: noindex, follow', true);
17
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
18
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
19
<!-- generator-version="' . XMLSF_VERSION . '" -->
20
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
21
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
23
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
24
';
25
31
<url>
32
<loc><?php echo esc_url( $url ); ?></loc>
33
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified, false); ?></lastmod>
34
+ <changefreq><?php
35
+ if ( ($lastactivityage/86400) < 1 ) { // last activity less than 1 day old
36
echo 'hourly';
37
+ } else if ( ($lastactivityage/86400) < 7 ) { // last activity less than 1 week old
38
echo 'daily';
39
+ } else { // over a week old
40
echo 'weekly';
41
+ }
42
?></changefreq>
43
<priority>1.0</priority>
44
</url>
includes/feed-sitemap-news.php CHANGED
@@ -5,6 +5,8 @@
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
global $xmlsf;
9
$options = $xmlsf->get_option('news_tags');
10
@@ -18,26 +20,26 @@ echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?>
18
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
19
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
20
<!-- generator-version="'.XMLSF_VERSION.'" -->
21
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
22
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" ';
23
24
echo !empty($options['image']) ? '
25
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" ' : '';
26
echo '
27
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
28
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
29
- http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
30
- http://www.google.com/schemas/sitemap-news/0.9
31
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd' ;
32
echo !empty($options['image']) ? '
33
- http://www.google.com/schemas/sitemap-image/1.1
34
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd' : '';
35
echo '">
36
';
37
38
// get site language for default language
39
// bloginfo_rss('language') returns improper format so
40
- // we explode on hyphen and use only first part.
41
// TODO this workaround breaks (simplified) chinese :(
42
$language = explode('-', convert_chars(strip_tags(get_bloginfo('language'))));
43
$language = empty($language) ? 'en' : reset($language);
@@ -46,8 +48,8 @@ $language = empty($language) ? 'en' : reset($language);
46
$have_posts = false;
47
48
// loop away!
49
- if ( have_posts() ) :
50
- while ( have_posts() ) :
51
the_post();
52
53
// check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
@@ -62,14 +64,14 @@ if ( have_posts() ) :
62
<loc><?php echo esc_url( get_permalink() ); ?></loc>
63
<news:news>
64
<news:publication>
65
- <news:name><?php
66
if(!empty($options['name']))
67
echo apply_filters( 'the_title_xmlsitemap', $options['name'] );
68
- elseif(defined('XMLSF_GOOGLE_NEWS_NAME'))
69
- echo apply_filters( 'the_title_xmlsitemap', XMLSF_GOOGLE_NEWS_NAME );
70
- else
71
echo apply_filters( 'the_title_xmlsitemap', get_bloginfo('name') ); ?></news:name>
72
- <news:language><?php
73
if ( taxonomy_exists('language') ) {
74
$lang = get_the_terms($post->ID,'language');
75
if ( is_array($lang) ) {
@@ -77,10 +79,10 @@ if ( have_posts() ) :
77
echo is_object($lang) ? $lang->slug : $language;
78
}
79
} else {
80
- echo $language;
81
} ?></news:language>
82
</news:publication>
83
- <news:publication_date><?php
84
echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date>
85
<news:title><?php echo apply_filters( 'the_title_xmlsitemap', get_the_title() ); ?></news:title>
86
<?php
@@ -96,7 +98,7 @@ if ( have_posts() ) :
96
}
97
}
98
endif;
99
-
100
if (!empty($access) && $access != 'Public' ) {
101
?>
102
<news:access><?php echo $access; ?></news:access>
@@ -106,19 +108,19 @@ if ( have_posts() ) :
106
// genres tag
107
$genres = '';
108
$terms = get_the_terms($post->ID,'gn-genre');
109
- if ( is_array($terms) ) {
110
- $sep = '';
111
- foreach($terms as $obj) {
112
if (!empty($obj->name)) {
113
$genres .= $sep . $obj->name;
114
$sep = ', ';
115
}
116
- }
117
- }
118
-
119
$genres = trim(apply_filters('the_title_xmlsitemap', $genres));
120
-
121
- if ( empty($genres) && !empty($options['genres']) && !empty($options['genres']['default']) ) {
122
$genres = implode( ', ', (array)$options['genres']['default'] );
123
}
124
@@ -135,42 +137,42 @@ if ( have_posts() ) :
135
$terms = get_the_terms( $post->ID, $options['keywords']['from'] );
136
if ( is_array($terms) ) {
137
$sep = '';
138
- foreach($terms as $obj) {
139
if (!empty($obj->name)) {
140
$keywords .= $sep . $obj->name;
141
$sep = ', ';
142
}
143
- }
144
}
145
- }
146
-
147
$keywords = trim(apply_filters('the_title_xmlsitemap', $keywords));
148
-
149
if ( empty($keywords) && !empty($options['keywords']['default']) ) {
150
$keywords = trim(apply_filters('the_title_xmlsitemap', $options['keywords']['default']));
151
}
152
-
153
}
154
-
155
if ( !empty($keywords) ) {
156
?>
157
<news:keywords><?php echo $keywords; ?></news:keywords>
158
<?php
159
- }
160
161
/* xmlsf_news_tags_after action hook */
162
do_action( 'xmlsf_news_tags_after' );
163
?>
164
</news:news>
165
<?php
166
- if ( !empty($options['image']) && $xmlsf->get_images('news') ) :
167
- foreach ( $xmlsf->get_images() as $image ) {
168
if ( empty($image['loc']) )
169
continue;
170
?>
171
<image:image>
172
<image:loc><?php echo utf8_uri_encode( $image['loc'] ); ?></image:loc>
173
- <?php
174
if ( !empty($image['title']) ) {
175
?>
176
<image:title><![CDATA[<?php echo str_replace(']]>', ']]&gt;', $image['title']); ?>]]></image:title>
@@ -183,12 +185,12 @@ if ( have_posts() ) :
183
}
184
?>
185
</image:image>
186
- <?php
187
}
188
endif;
189
?>
190
</url>
191
- <?php
192
endwhile;
193
endif;
194
@@ -204,7 +206,7 @@ if ( !$have_posts ) :
204
<priority>1.0</priority>
205
</url>
206
<?php
207
- endif;
208
209
?></urlset>
210
<?php $xmlsf->_e_usage();
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
global $xmlsf;
11
$options = $xmlsf->get_option('news_tags');
12
20
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
21
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
22
<!-- generator-version="'.XMLSF_VERSION.'" -->
23
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
24
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" ';
25
26
echo !empty($options['image']) ? '
27
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" ' : '';
28
echo '
29
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
30
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
31
+ http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
32
+ http://www.google.com/schemas/sitemap-news/0.9
33
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd' ;
34
echo !empty($options['image']) ? '
35
+ http://www.google.com/schemas/sitemap-image/1.1
36
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd' : '';
37
echo '">
38
';
39
40
// get site language for default language
41
// bloginfo_rss('language') returns improper format so
42
+ // we explode on hyphen and use only first part.
43
// TODO this workaround breaks (simplified) chinese :(
44
$language = explode('-', convert_chars(strip_tags(get_bloginfo('language'))));
45
$language = empty($language) ? 'en' : reset($language);
48
$have_posts = false;
49
50
// loop away!
51
+ if ( have_posts() ) :
52
+ while ( have_posts() ) :
53
the_post();
54
55
// check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
64
<loc><?php echo esc_url( get_permalink() ); ?></loc>
65
<news:news>
66
<news:publication>
67
+ <news:name><?php
68
if(!empty($options['name']))
69
echo apply_filters( 'the_title_xmlsitemap', $options['name'] );
70
+ elseif(defined('XMLSF_GOOGLE_NEWS_NAME'))
71
+ echo apply_filters( 'the_title_xmlsitemap', XMLSF_GOOGLE_NEWS_NAME );
72
+ else
73
echo apply_filters( 'the_title_xmlsitemap', get_bloginfo('name') ); ?></news:name>
74
+ <news:language><?php
75
if ( taxonomy_exists('language') ) {
76
$lang = get_the_terms($post->ID,'language');
77
if ( is_array($lang) ) {
79
echo is_object($lang) ? $lang->slug : $language;
80
}
81
} else {
82
+ echo $language;
83
} ?></news:language>
84
</news:publication>
85
+ <news:publication_date><?php
86
echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date>
87
<news:title><?php echo apply_filters( 'the_title_xmlsitemap', get_the_title() ); ?></news:title>
88
<?php
98
}
99
}
100
endif;
101
+
102
if (!empty($access) && $access != 'Public' ) {
103
?>
104
<news:access><?php echo $access; ?></news:access>
108
// genres tag
109
$genres = '';
110
$terms = get_the_terms($post->ID,'gn-genre');
111
+ if ( is_array($terms) ) {
112
+ $sep = '';
113
+ foreach($terms as $obj) {
114
if (!empty($obj->name)) {
115
$genres .= $sep . $obj->name;
116
$sep = ', ';
117
}
118
+ }
119
+ }
120
+
121
$genres = trim(apply_filters('the_title_xmlsitemap', $genres));
122
+
123
+ if ( empty($genres) && !empty($options['genres']) && !empty($options['genres']['default']) ) {
124
$genres = implode( ', ', (array)$options['genres']['default'] );
125
}
126
137
$terms = get_the_terms( $post->ID, $options['keywords']['from'] );
138
if ( is_array($terms) ) {
139
$sep = '';
140
+ foreach($terms as $obj) {
141
if (!empty($obj->name)) {
142
$keywords .= $sep . $obj->name;
143
$sep = ', ';
144
}
145
+ }
146
}
147
+ }
148
+
149
$keywords = trim(apply_filters('the_title_xmlsitemap', $keywords));
150
+
151
if ( empty($keywords) && !empty($options['keywords']['default']) ) {
152
$keywords = trim(apply_filters('the_title_xmlsitemap', $options['keywords']['default']));
153
}
154
+
155
}
156
+
157
if ( !empty($keywords) ) {
158
?>
159
<news:keywords><?php echo $keywords; ?></news:keywords>
160
<?php
161
+ }
162
163
/* xmlsf_news_tags_after action hook */
164
do_action( 'xmlsf_news_tags_after' );
165
?>
166
</news:news>
167
<?php
168
+ if ( !empty($options['image']) && $xmlsf->get_images('news') ) :
169
+ foreach ( $xmlsf->get_images() as $image ) {
170
if ( empty($image['loc']) )
171
continue;
172
?>
173
<image:image>
174
<image:loc><?php echo utf8_uri_encode( $image['loc'] ); ?></image:loc>
175
+ <?php
176
if ( !empty($image['title']) ) {
177
?>
178
<image:title><![CDATA[<?php echo str_replace(']]>', ']]&gt;', $image['title']); ?>]]></image:title>
185
}
186
?>
187
</image:image>
188
+ <?php
189
}
190
endif;
191
?>
192
</url>
193
+ <?php
194
endwhile;
195
endif;
196
206
<priority>1.0</priority>
207
</url>
208
<?php
209
+ endif;
210
211
?></urlset>
212
<?php $xmlsf->_e_usage();
includes/feed-sitemap-post_type.php CHANGED
@@ -5,6 +5,8 @@
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
9
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
10
header('X-Robots-Tag: noindex, follow', true);
@@ -26,11 +28,11 @@ foreach ( $xmlsf->do_tags($post_type) as $tag => $setting )
26
echo !empty($image) ? '
27
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" ' : '';
28
echo '
29
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
30
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
31
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd';
32
echo !empty($image) ? '
33
- http://www.google.com/schemas/sitemap-image/1.1
34
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd' : '';
35
echo '">
36
';
@@ -40,9 +42,9 @@ $excluded = $xmlsf->get_excluded($post_type);
40
41
// loop away!
42
if ( have_posts() ) :
43
- while ( have_posts() ) :
44
the_post();
45
-
46
// check if page is in the exclusion list (like front page)
47
// or if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
48
// or if post meta says "exclude me please"
@@ -54,18 +56,18 @@ if ( have_posts() ) :
54
?>
55
<url>
56
<loc><?php echo esc_url( get_permalink() ); ?></loc>
57
- <?php echo $xmlsf->get_lastmod(); ?>
58
<changefreq><?php echo $xmlsf->get_changefreq(); ?></changefreq>
59
<priority><?php echo $xmlsf->get_priority(); ?></priority>
60
<?php
61
- if ( !empty($image) && $xmlsf->get_images() ) :
62
- foreach ( $xmlsf->get_images() as $image ) {
63
if ( empty($image['loc']) )
64
continue;
65
?>
66
<image:image>
67
<image:loc><?php echo utf8_uri_encode( $image['loc'] ); ?></image:loc>
68
- <?php
69
if ( !empty($image['title']) ) {
70
?>
71
<image:title><![CDATA[<?php echo str_replace(']]>', ']]&gt;', $image['title']); ?>]]></image:title>
@@ -78,13 +80,13 @@ if ( have_posts() ) :
78
}
79
?>
80
</image:image>
81
- <?php
82
}
83
endif;
84
?>
85
</url>
86
- <?php
87
- endwhile;
88
- endif;
89
?></urlset>
90
- <?php $xmlsf->_e_usage();
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
11
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
12
header('X-Robots-Tag: noindex, follow', true);
28
echo !empty($image) ? '
29
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" ' : '';
30
echo '
31
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
32
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
33
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd';
34
echo !empty($image) ? '
35
+ http://www.google.com/schemas/sitemap-image/1.1
36
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd' : '';
37
echo '">
38
';
42
43
// loop away!
44
if ( have_posts() ) :
45
+ while ( have_posts() ) :
46
the_post();
47
+
48
// check if page is in the exclusion list (like front page)
49
// or if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
50
// or if post meta says "exclude me please"
56
?>
57
<url>
58
<loc><?php echo esc_url( get_permalink() ); ?></loc>
59
+ <?php echo $xmlsf->get_lastmod(); ?>
60
<changefreq><?php echo $xmlsf->get_changefreq(); ?></changefreq>
61
<priority><?php echo $xmlsf->get_priority(); ?></priority>
62
<?php
63
+ if ( !empty($image) && $xmlsf->get_images() ) :
64
+ foreach ( $xmlsf->get_images() as $image ) {
65
if ( empty($image['loc']) )
66
continue;
67
?>
68
<image:image>
69
<image:loc><?php echo utf8_uri_encode( $image['loc'] ); ?></image:loc>
70
+ <?php
71
if ( !empty($image['title']) ) {
72
?>
73
<image:title><![CDATA[<?php echo str_replace(']]>', ']]&gt;', $image['title']); ?>]]></image:title>
80
}
81
?>
82
</image:image>
83
+ <?php
84
}
85
endif;
86
?>
87
</url>
88
+ <?php
89
+ endwhile;
90
+ endif;
91
?></urlset>
92
+ <?php $xmlsf->_e_usage();
includes/feed-sitemap-taxonomy.php CHANGED
@@ -5,6 +5,8 @@
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
9
header('Content-Type: text/xml; charset=' . get_bloginfo('charset', 'UTF-8'), true);
10
header('X-Robots-Tag: noindex, follow', true);
@@ -15,9 +17,9 @@ echo '<?xml version="1.0" encoding="'.get_bloginfo('charset', 'UTF-8').'"?>
15
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
16
<!-- generator-url="http://status310.net/wordpress-plugins/xml-sitemap-feed/" -->
17
<!-- generator-version="'.XMLSF_VERSION.'" -->
18
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
19
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
21
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
22
';
23
@@ -34,20 +36,20 @@ $terms = get_terms( $taxonomy, array(
34
'pad_counts' => true, // count child term post count too...
35
'number' => 50000 ) );
36
37
- if ( $terms ) :
38
39
- foreach ( $terms as $term ) :
40
-
41
?>
42
<url>
43
<loc><?php echo get_term_link( $term ); ?></loc>
44
<priority><?php echo $xmlsf->get_priority('taxonomy',$term); ?></priority>
45
- <?php echo $xmlsf->get_lastmod('taxonomy',$term); ?>
46
<changefreq><?php echo $xmlsf->get_changefreq('taxonomy',$term); ?></changefreq>
47
</url>
48
- <?php
49
endforeach;
50
- endif;
51
52
?></urlset>
53
<?php $xmlsf->_e_usage();
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
11
header('Content-Type: text/xml; charset=' . get_bloginfo('charset', 'UTF-8'), true);
12
header('X-Robots-Tag: noindex, follow', true);
17
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
18
<!-- generator-url="http://status310.net/wordpress-plugins/xml-sitemap-feed/" -->
19
<!-- generator-version="'.XMLSF_VERSION.'" -->
20
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
21
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
23
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
24
';
25
36
'pad_counts' => true, // count child term post count too...
37
'number' => 50000 ) );
38
39
+ if ( $terms ) :
40
+
41
+ foreach ( $terms as $term ) :
42
43
?>
44
<url>
45
<loc><?php echo get_term_link( $term ); ?></loc>
46
<priority><?php echo $xmlsf->get_priority('taxonomy',$term); ?></priority>
47
+ <?php echo $xmlsf->get_lastmod('taxonomy',$term); ?>
48
<changefreq><?php echo $xmlsf->get_changefreq('taxonomy',$term); ?></changefreq>
49
</url>
50
+ <?php
51
endforeach;
52
+ endif;
53
54
?></urlset>
55
<?php $xmlsf->_e_usage();
includes/feed-sitemap.php CHANGED
@@ -5,6 +5,8 @@
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
9
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
10
header('X-Robots-Tag: noindex, follow', true);
@@ -17,7 +19,7 @@ echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?>
17
<!-- generator-version="'.XMLSF_VERSION.'" -->
18
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
19
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
21
http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
22
';
23
@@ -38,7 +40,7 @@ foreach ( $xmlsf->have_post_types() as $post_type ) {
38
<loc><?php echo $url; ?></loc>
39
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastmodified( 'gmt', $post_type['name'], $m ), false); ?></lastmod>
40
</sitemap>
41
- <?php
42
}
43
}
44
@@ -49,7 +51,7 @@ foreach ( $xmlsf->get_taxonomies() as $taxonomy ) {
49
<sitemap>
50
<loc><?php echo $xmlsf->get_index_url('taxonomy',$taxonomy); ?></loc>
51
<?php echo $xmlsf->get_lastmod('taxonomy',$taxonomy); ?></sitemap>
52
- <?php
53
}
54
}
55
@@ -60,7 +62,7 @@ if ( !empty($urls) ) {
60
<sitemap>
61
<loc><?php echo $xmlsf->get_index_url('custom'); ?></loc>
62
</sitemap>
63
- <?php
64
}
65
66
// custom sitemaps
@@ -72,8 +74,8 @@ foreach ($custom_sitemaps as $url) {
72
<sitemap>
73
<loc><?php echo esc_url($url); ?></loc>
74
</sitemap>
75
- <?php
76
}
77
78
?></sitemapindex>
79
- <?php $xmlsf->_e_usage();
5
* @package XML Sitemap Feed plugin for WordPress
6
*/
7
8
+ if ( ! defined( 'WPINC' ) ) die;
9
+
10
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
11
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
12
header('X-Robots-Tag: noindex, follow', true);
19
<!-- generator-version="'.XMLSF_VERSION.'" -->
20
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
21
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
23
http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
24
';
25
40
<loc><?php echo $url; ?></loc>
41
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastmodified( 'gmt', $post_type['name'], $m ), false); ?></lastmod>
42
</sitemap>
43
+ <?php
44
}
45
}
46
51
<sitemap>
52
<loc><?php echo $xmlsf->get_index_url('taxonomy',$taxonomy); ?></loc>
53
<?php echo $xmlsf->get_lastmod('taxonomy',$taxonomy); ?></sitemap>
54
+ <?php
55
}
56
}
57
62
<sitemap>
63
<loc><?php echo $xmlsf->get_index_url('custom'); ?></loc>
64
</sitemap>
65
+ <?php
66
}
67
68
// custom sitemaps
74
<sitemap>
75
<loc><?php echo esc_url($url); ?></loc>
76
</sitemap>
77
+ <?php
78
}
79
80
?></sitemapindex>
81
+ <?php $xmlsf->_e_usage();
includes/xsl/sitemap-index.xsl CHANGED
File without changes
includes/xsl/sitemap.xsl CHANGED
File without changes
languages/instructions.txt CHANGED
File without changes
languages/xml-sitemap-feed-es_ES.mo CHANGED
File without changes
languages/xml-sitemap-feed-es_ES.po CHANGED
File without changes
languages/xml-sitemap-feed-id_ID.mo CHANGED
File without changes
languages/xml-sitemap-feed-id_ID.po CHANGED
File without changes
languages/xml-sitemap-feed-it_IT.mo CHANGED
File without changes
languages/xml-sitemap-feed-it_IT.po CHANGED
File without changes
languages/xml-sitemap-feed-nl_NL.mo CHANGED
Binary file
languages/xml-sitemap-feed-nl_NL.po CHANGED
@@ -2,8 +2,8 @@ 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: 2015-01-05 04:05+0100\n"
6
- "PO-Revision-Date: 2015-01-05 04:27+0100\n"
7
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
8
"Language-Team: RavanH <ravanhagen@gmail.com>\n"
9
"Language: nl_NL\n"
@@ -12,93 +12,64 @@ msgstr ""
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.4\n"
16
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
18
- #: ../includes/core.php:1186
19
- msgid "Google News Genres"
20
- msgstr "Google News Genres"
21
-
22
- #: ../includes/core.php:1187
23
- msgid "Google News Genre"
24
- msgstr "Google News Genre"
25
-
26
- #: ../includes/core.php:1205
27
- msgid "Google News Country"
28
- msgstr "Google News Land"
29
-
30
- #: ../includes/core.php:1207 ../includes/core.php:1226
31
- #: ../includes/core.php:1245
32
- msgid ""
33
- "Only one allowed. Must be consistent with other Google News location "
34
- "entities (if set)."
35
- msgstr ""
36
- "Slechts één toegestaan. Moet consistent zijn met de andere locatie-"
37
- "entiteiten (indien ingevoerd)."
38
-
39
- #: ../includes/core.php:1224
40
- msgid "Google News State/Province"
41
- msgstr "Google News Staat/Provincie"
42
-
43
- #: ../includes/core.php:1243
44
- msgid "Google News City"
45
- msgstr "Google News Stad"
46
-
47
- #: ../includes/admin.php:19
48
msgid "XML Sitemaps"
49
msgstr "XML Sitemaps"
50
51
- #: ../includes/admin.php:20
52
msgid "XML Sitemap Index"
53
msgstr "XML Sitemap Index"
54
55
- #: ../includes/admin.php:25 ../includes/admin.php:988
56
msgid "Google News Sitemap"
57
- msgstr "Google News Sitemap"
58
59
- #: ../includes/admin.php:69
60
msgid "Google"
61
msgstr "Google"
62
63
- #: ../includes/admin.php:72
64
msgid "Bing & Yahoo"
65
msgstr "Bing & Yahoo"
66
67
- #: ../includes/admin.php:75
68
msgid "Yandex"
69
msgstr "Yandex"
70
71
- #: ../includes/admin.php:78
72
msgid "Baidu"
73
msgstr "Baidu"
74
75
- #: ../includes/admin.php:81
76
msgid "Ping-O-Matic"
77
msgstr "Ping-O-Matic"
78
79
- #: ../includes/admin.php:136
80
#, php-format
81
msgid "Successfully sent %1$s on %2$s."
82
msgstr "Succesvolle verzending van %1$s op %2$s."
83
84
- #: ../includes/admin.php:197 ../includes/admin.php:387
85
- #: ../includes/admin.php:955
86
msgid "Additional robots.txt rules"
87
msgstr "Aanvullende robots.txt regels"
88
89
- #: ../includes/admin.php:198
90
#, php-format
91
msgid "Rules that will be appended to the %s generated by WordPress:"
92
msgstr "Regels die aan de WordPress-gegenereerde %s zullen worden toegevoegd:"
93
94
- #: ../includes/admin.php:199
95
msgid ""
96
"These rules will not have effect when you are using a static robots.txt file."
97
msgstr ""
98
"Deze regels hebben geen effect als je een statisch robots.txt bestand "
99
"gebruikt."
100
101
- #: ../includes/admin.php:199
102
msgid ""
103
"Only add rules here when you know what you are doing, otherwise you might "
104
"break search engine access to your site."
@@ -106,64 +77,64 @@ msgstr ""
106
"Definieer hier alleen regels als je weet wat je doet, anders zou je de "
107
"toegang tot je site kunnen verstoren."
108
109
- #: ../includes/admin.php:205 ../includes/admin.php:960
110
msgid "Reset XML sitemaps"
111
msgstr "XML sitemaps resetten"
112
113
- #: ../includes/admin.php:207
114
msgid "Clear all XML Sitemap Feed settings from the database."
115
msgstr "Wis alle XML Sitemap Feed opties van de database."
116
117
- #: ../includes/admin.php:210
118
msgid ""
119
"You can use this to start fresh with the default settings or to remove all "
120
"XML Sitemap and Google News settings and taxonomy terms before uninstalling."
121
msgstr ""
122
"Gebruik dit op opnieuw met de default instellingen te beginnen of om alle "
123
- "XML Sitemap and Google News instellingen te verwijderen voor het de-"
124
"installeren."
125
126
- #: ../includes/admin.php:219 ../includes/admin.php:220
127
- #: ../includes/admin.php:457 ../includes/admin.php:458
128
#, php-format
129
msgid "Donate to keep the free %s plugin development & support going!"
130
msgstr ""
131
"Doneer om de ontwikkeling en ondersteuning van de %s plugin gaande te houden!"
132
133
- #: ../includes/admin.php:219 ../includes/admin.php:220
134
- #: ../includes/admin.php:221 ../includes/admin.php:457
135
- #: ../includes/admin.php:458 ../includes/admin.php:459
136
msgid "XML Sitemap & Google News Feeds"
137
- msgstr "XML Sitemap & Google News Feeds"
138
139
- #: ../includes/admin.php:221
140
#, php-format
141
msgid "These settings control the XML Sitemaps generated by the %s plugin."
142
msgstr ""
143
"Deze instellingen beheersen de XML Sitemaps gegenereerd door de %s plugin."
144
145
- #: ../includes/admin.php:222 ../includes/admin.php:460
146
#, php-format
147
msgid "For ping options, go to %s."
148
msgstr "Ga naar %s voor Ping instellingen."
149
150
- #: ../includes/admin.php:235
151
msgid "XML Sitemaps for post types"
152
msgstr "XML Sitemaps voor berichttypen"
153
154
- #: ../includes/admin.php:274
155
msgid "Year"
156
msgstr "Jaar"
157
158
- #: ../includes/admin.php:275
159
msgid "Month"
160
msgstr "Maand"
161
162
- #: ../includes/admin.php:279
163
msgid "Split by"
164
msgstr "Verdeel naar"
165
166
- #: ../includes/admin.php:289
167
msgid ""
168
"Split by year if you experience errors or slow sitemaps. In very rare cases, "
169
"split by month is needed."
@@ -171,22 +142,22 @@ msgstr ""
171
"Verdeel naar jaar als je errors of trage sitemaps ondervindt. In zeldzame "
172
"gevallen is een verdeling naar maand nodig."
173
174
- #: ../includes/admin.php:294 ../includes/admin.php:908
175
msgid "Priority"
176
msgstr "Prioriteit"
177
178
- #: ../includes/admin.php:296
179
msgid "Priority can be overridden on individual posts."
180
msgstr "De Priority kan per bericht worden aangepast."
181
182
- #: ../includes/admin.php:301
183
msgid ""
184
"Automatically adjusts Priority according to relative age and comment count."
185
msgstr ""
186
"Pas de Priority automatisch aan naar relatieve leeftijd en aantal "
187
"commentaren."
188
189
- #: ../includes/admin.php:301
190
msgid ""
191
"Sticky posts will not be subject to reduction by age. Individual posts with "
192
"fixed Priority will always keep that value."
@@ -194,11 +165,11 @@ msgstr ""
194
"Sticky berichten worden niet onderworpen aan een reductie naar leeftijd. "
195
"Berichten met een vastgezette prioriteit behouden deze."
196
197
- #: ../includes/admin.php:306
198
msgid "Update Lastmod and Changefreq on comments."
199
msgstr "Pas de Lastmod en Changefreq aan bij commentaren."
200
201
- #: ../inclu