Version Description
Bugfix release.
=
Download this release
Release Info
Developer | RavanH |
Plugin | XML Sitemap & Google News feeds |
Version | 4.0.1 |
Comparing to | |
See all releases |
Code changes from version 4.2.3 to 4.0.1
- hacks.php +13 -23
- includes/admin.php +89 -350
- includes/core.php +249 -588
- includes/feed-sitemap-home.php +2 -13
- includes/feed-sitemap-news.php +1 -4
- includes/feed-sitemap-post_type.php +148 -54
- includes/feed-sitemap-taxonomy.php +68 -5
- includes/feed-sitemap.php +40 -15
- includes/xsl/sitemap-index.xsl.php +1 -1
- includes/xsl/sitemap-news.xsl.php +1 -1
- includes/xsl/sitemap.xsl.php +1 -1
- languages/instructions.txt +8 -12
- languages/xml-sitemap-feed-fr_FR.mo +0 -0
- languages/xml-sitemap-feed-fr_FR.po +33 -213
- languages/xml-sitemap-feed-id_ID.mo +0 -0
- languages/xml-sitemap-feed-id_ID.po +0 -304
- languages/xml-sitemap-feed-nl_NL.mo +0 -0
- languages/xml-sitemap-feed-nl_NL.po +34 -241
- languages/xml-sitemap-feed-xx_XX.po +25 -159
- languages/xml-sitemap-feed.pot +25 -191
- readme.txt +80 -86
- xml-sitemap.php +11 -11
hacks.php
CHANGED
@@ -197,8 +197,8 @@ if( !function_exists('get_firstmodified') ) {
|
|
197 |
* @return string The date of the last post.
|
198 |
*/
|
199 |
if( !function_exists('get_lastdate') ) {
|
200 |
-
function get_lastdate($timezone = 'server', $post_type = 'any'
|
201 |
-
return apply_filters( 'get_lastdate', _get_time( $timezone, 'date', $post_type
|
202 |
}
|
203 |
}
|
204 |
|
@@ -215,14 +215,14 @@ if( !function_exists('get_lastdate') ) {
|
|
215 |
* @return string The date of the oldest modified post.
|
216 |
*/
|
217 |
if( !function_exists('get_lastmodified') ) {
|
218 |
-
function get_lastmodified($timezone = 'server', $post_type = 'any'
|
219 |
-
|
220 |
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
|
225 |
-
return apply_filters( 'get_lastmodified',
|
226 |
}
|
227 |
}
|
228 |
|
@@ -239,7 +239,7 @@ if( !function_exists('get_lastmodified') ) {
|
|
239 |
* @return string The date.
|
240 |
*/
|
241 |
if( !function_exists('_get_time') ) {
|
242 |
-
function _get_time( $timezone, $field, $post_type = 'any', $which = 'last'
|
243 |
global $wpdb;
|
244 |
|
245 |
if ( !in_array( $field, array( 'date', 'modified' ) ) )
|
@@ -249,7 +249,7 @@ if( !function_exists('_get_time') ) {
|
|
249 |
|
250 |
$order = ( $which == 'last' ) ? 'DESC' : 'ASC';
|
251 |
|
252 |
-
$key = ( $post_type == 'any' ) ? "{$which}post{$field}
|
253 |
|
254 |
$date = wp_cache_get( $key, 'timeinfo' );
|
255 |
|
@@ -273,28 +273,18 @@ if( !function_exists('_get_time') ) {
|
|
273 |
$post_types = "'" . addslashes($post_type) . "'";
|
274 |
}
|
275 |
|
276 |
-
$where = "$wpdb->posts.post_status='publish' AND $wpdb->posts.post_type IN ({$post_types}) AND $wpdb->posts.post_date_gmt ";
|
277 |
-
// If a month is specified in the querystring, load that month
|
278 |
-
$m = preg_replace('|[^0-9]|', '', $m);
|
279 |
-
if ( !empty($m) ) {
|
280 |
-
$where .= " AND YEAR($wpdb->posts.post_date)=" . substr($m, 0, 4);
|
281 |
-
if ( strlen($m) > 5 )
|
282 |
-
$where .= " AND MONTH($wpdb->posts.post_date)=" . substr($m, 4, 2);
|
283 |
-
}
|
284 |
-
|
285 |
switch ( $timezone ) {
|
286 |
case 'gmt':
|
287 |
-
$date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE $
|
288 |
break;
|
289 |
case 'blog':
|
290 |
-
$date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE $
|
291 |
break;
|
292 |
case 'server':
|
293 |
-
$date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE $
|
294 |
break;
|
295 |
}
|
296 |
|
297 |
-
|
298 |
if ( $date )
|
299 |
wp_cache_set( $key, $date, 'timeinfo' );
|
300 |
}
|
197 |
* @return string The date of the last post.
|
198 |
*/
|
199 |
if( !function_exists('get_lastdate') ) {
|
200 |
+
function get_lastdate($timezone = 'server', $post_type = 'any') {
|
201 |
+
return apply_filters( 'get_lastdate', _get_time( $timezone, 'date', $post_type ), $timezone );
|
202 |
}
|
203 |
}
|
204 |
|
215 |
* @return string The date of the oldest modified post.
|
216 |
*/
|
217 |
if( !function_exists('get_lastmodified') ) {
|
218 |
+
function get_lastmodified($timezone = 'server', $post_type = 'any') {
|
219 |
+
$lastmodified = _get_time( $timezone, 'modified', $post_type );
|
220 |
|
221 |
+
$lastdate = get_lastdate($timezone, $post_type);
|
222 |
+
if ( $lastdate > $lastmodified )
|
223 |
+
$lastmodified = $lastdate;
|
224 |
|
225 |
+
return apply_filters( 'get_lastmodified', $lastmodified, $timezone );
|
226 |
}
|
227 |
}
|
228 |
|
239 |
* @return string The date.
|
240 |
*/
|
241 |
if( !function_exists('_get_time') ) {
|
242 |
+
function _get_time( $timezone, $field, $post_type = 'any', $which = 'last' ) {
|
243 |
global $wpdb;
|
244 |
|
245 |
if ( !in_array( $field, array( 'date', 'modified' ) ) )
|
249 |
|
250 |
$order = ( $which == 'last' ) ? 'DESC' : 'ASC';
|
251 |
|
252 |
+
$key = ( $post_type == 'any' ) ? "{$which}post{$field}:$timezone" : "{$which}posttype{$post_type}{$field}:$timezone";
|
253 |
|
254 |
$date = wp_cache_get( $key, 'timeinfo' );
|
255 |
|
273 |
$post_types = "'" . addslashes($post_type) . "'";
|
274 |
}
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
switch ( $timezone ) {
|
277 |
case 'gmt':
|
278 |
+
$date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt {$order} LIMIT 1");
|
279 |
break;
|
280 |
case 'blog':
|
281 |
+
$date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt {$order} LIMIT 1");
|
282 |
break;
|
283 |
case 'server':
|
284 |
+
$date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt {$order} LIMIT 1");
|
285 |
break;
|
286 |
}
|
287 |
|
|
|
288 |
if ( $date )
|
289 |
wp_cache_set( $key, $date, 'timeinfo' );
|
290 |
}
|
includes/admin.php
CHANGED
@@ -12,9 +12,7 @@
|
|
12 |
// add our FancyBox Media Settings Section on Settings > Media admin page
|
13 |
// TODO get a donation button in there and refer to support forum !
|
14 |
public function privacy_settings_section() {
|
15 |
-
echo '<p><a 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¤cy_code=EUR" title="'.
|
16 |
-
echo ('1' == get_option('blog_public')) ? sprintf(__('XML Sitemaps will be disabled automatically when you check the option %1$s at %2$s above.','xml-sitemap-feed'),'<strong>'.__('Discourage search engines from indexing this site').'</strong>','<strong>'.__('Search Engine Visibility').'</strong>') : '<span style="color: red" class="error">'.sprintf(__('XML Sitemaps are disabled because you have checked the option %1$s at %2$s above.','xml-sitemap-feed'),'<strong>'.__('Discourage search engines from indexing this site').'</strong>','<strong>'.__('Search Engine Visibility').'</strong>').'</span>';
|
17 |
-
echo '</p>
|
18 |
<script type="text/javascript">
|
19 |
jQuery( document ).ready( function() {
|
20 |
jQuery( "input[name=\'blog_public\']" ).on( \'change\', function() {
|
@@ -23,446 +21,187 @@
|
|
23 |
$this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
|
24 |
});
|
25 |
});
|
26 |
-
|
27 |
-
|
28 |
-
/* echo '
|
29 |
-
<script type="text/javascript">
|
30 |
-
jQuery( document ).ready( function() {
|
31 |
-
jQuery( "#xmlsf_sitemaps_index" ).on( \'change\', function() {
|
32 |
-
jQuery("#xmlsf_post_types input:not([type=\'hidden\']),#xmlsf_post_types select,#xmlsf_taxonomies input:not([type=\'hidden\']),#xmlsf_ping input").each(function() {
|
33 |
var $this = jQuery(this);
|
34 |
$this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
|
35 |
});
|
36 |
});
|
37 |
});
|
38 |
-
</script>'
|
39 |
}
|
40 |
|
41 |
public function sitemaps_settings_field() {
|
42 |
$options = parent::get_sitemaps();
|
43 |
$disabled = ('1' == get_option('blog_public')) ? false : true;
|
44 |
|
45 |
-
echo '<
|
46 |
-
<
|
47 |
if (isset($options['sitemap']))
|
48 |
-
echo '<span class="description"
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
52 |
if (isset($options['sitemap-news']))
|
53 |
-
echo '<span class="description"
|
54 |
-
echo '
|
55 |
-
</
|
56 |
}
|
57 |
|
58 |
public function post_types_settings_field() {
|
59 |
$options = parent::get_post_types();
|
60 |
-
$
|
61 |
-
$
|
62 |
-
|
|
|
63 |
';
|
64 |
foreach ( get_post_types(array('public'=>true),'objects') as $post_type ) {
|
65 |
-
// skip unallowed post types
|
66 |
-
if (in_array($post_type->name,parent::disabled_post_types()))
|
67 |
-
continue;
|
68 |
-
|
69 |
$count = wp_count_posts( $post_type->name );
|
70 |
-
|
71 |
-
echo '
|
72 |
-
<p><input type="hidden" name="xmlsf_post_types['.
|
73 |
-
$post_type->name.'][name]" value="'.
|
74 |
-
$post_type->name.'" />';
|
75 |
-
|
76 |
echo '
|
77 |
<label><input type="checkbox" name="xmlsf_post_types['.
|
78 |
$post_type->name.'][active]" id="xmlsf_post_types_'.
|
79 |
-
$post_type->name.'" value="1"
|
80 |
-
checked( !empty($options[$post_type->name]["active"]), true, false).
|
|
|
81 |
$post_type->label.'</label> ('.
|
82 |
$count->publish.')';
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
</script>
|
96 |
-
<ul style="margin-left:18px" id="xmlsf_post_types_'.$post_type->name.'_settings">';
|
97 |
-
|
98 |
-
|
99 |
-
if ( isset($defaults[$post_type->name]['archive']) ) {
|
100 |
-
$archives = array (
|
101 |
-
'yearly' => __('Year','xml-sitemap-feed'),
|
102 |
-
'monthly' => __('Month','xml-sitemap-feed')
|
103 |
-
);
|
104 |
-
$archive = !empty($options[$post_type->name]['archive']) ? $options[$post_type->name]['archive'] : $defaults[$post_type->name]['archive'];
|
105 |
-
echo '
|
106 |
-
<li><label>'.__('Split by','xml-sitemap-feed').' <select name="xmlsf_post_types['.
|
107 |
-
$post_type->name.'][archive]" id="xmlsf_post_types_'.
|
108 |
-
$post_type->name.'_archive">
|
109 |
-
<option value="">'.__('None').'</option>';
|
110 |
-
foreach ($archives as $value => $translation)
|
111 |
-
echo '
|
112 |
-
<option value="'.$value.'" '.
|
113 |
-
selected( $archive == $value, true, false).
|
114 |
-
'>'.$translation.'</option>';
|
115 |
-
echo '</select>
|
116 |
-
</label> <span class="description"> '.__('Split by year if you experience errors or slow sitemaps. In very rare cases, split by month is needed.','xml-sitemap-feed').'</span></li>';
|
117 |
-
}
|
118 |
-
|
119 |
-
$priority_val = !empty($options[$post_type->name]['priority']) ? $options[$post_type->name]['priority'] : $defaults[$post_type->name]['priority'];
|
120 |
-
echo '
|
121 |
-
<li><label>'.__('Priority','xml-sitemap-feed').' <input type="number" step="0.1" min="0.1" max="0.9" name="xmlsf_post_types['.
|
122 |
-
$post_type->name.'][priority]" id="xmlsf_post_types_'.
|
123 |
-
$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>';
|
124 |
-
|
125 |
-
echo '
|
126 |
-
<li><label><input type="checkbox" name="xmlsf_post_types['.
|
127 |
-
$post_type->name.'][dynamic_priority]" value="1" '.
|
128 |
-
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>';
|
129 |
-
|
130 |
-
echo '
|
131 |
-
<li><label><input type="checkbox" name="xmlsf_post_types['.
|
132 |
-
$post_type->name.'][update_lastmod_on_comments]" value="1" '.
|
133 |
-
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>';
|
134 |
-
|
135 |
-
if (isset($defaults[$post_type->name]['tags'])) :
|
136 |
-
echo '
|
137 |
-
<li><fieldset id="xmlsf_post_types_tags"><legend><strong>'.__('Include:','xml-sitemap-feed').' </strong></legend>
|
138 |
-
<ul style="margin-left:18px">';
|
139 |
-
|
140 |
-
$image = !empty($options[$post_type->name]['tags']['image']) ? $options[$post_type->name]['tags']['image'] : $defaults[$post_type->name]['tags']['image'];
|
141 |
-
echo '
|
142 |
-
<li><label>'.__('Image tags for','xml-sitemap-feed').' <select name="xmlsf_post_types['.
|
143 |
-
$post_type->name.'][tags][image]">
|
144 |
-
<option value="no">'.__('None').'</option>
|
145 |
-
<option value="featured" '.
|
146 |
-
selected( $image == "featured", true, false).
|
147 |
-
'>'.__('Featured Image').'</option>
|
148 |
-
<option value="attached" '.
|
149 |
-
selected( $image == "attached", true, false).
|
150 |
-
'>'.__('Attached images','xml-sitemap-feed').'</option>
|
151 |
-
';
|
152 |
-
echo '</select></label></li>';
|
153 |
-
|
154 |
-
if (isset($defaults[$post_type->name]['tags']['news'])) {
|
155 |
-
echo '
|
156 |
-
<li><label><input type="checkbox" name="xmlsf_post_types['.
|
157 |
-
$post_type->name.'][tags][news]" value="1" '.
|
158 |
-
checked( !empty($options[$post_type->name]['tags']['news']), true, false).' /> '.__('Google News tags','xml-sitemap-feed').'</label> <span class="description">'.__('Only set when your site has been or will soon be accepted by Google News. **','xml-sitemap-feed').'</span></li>';
|
159 |
-
}
|
160 |
-
|
161 |
-
echo '
|
162 |
-
</ul>
|
163 |
-
</fieldset></li>';
|
164 |
-
endif;
|
165 |
-
|
166 |
echo '
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
-
|
174 |
-
echo '
|
175 |
-
<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">'.__('(more...)').'</a> <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>
|
176 |
-
<script type="text/javascript">
|
177 |
-
jQuery( document ).ready( function() {
|
178 |
-
jQuery("#xmlsf_post_types_note_1_more").hide();
|
179 |
-
jQuery("#xmlsf_post_types_note_1_link").click( function(event) {
|
180 |
-
event.preventDefault();
|
181 |
-
jQuery("#xmlsf_post_types_note_1_link").hide();
|
182 |
-
jQuery("#xmlsf_post_types_note_1_more").show("slow");
|
183 |
-
});
|
184 |
-
});
|
185 |
-
</script>';
|
186 |
echo '
|
187 |
-
|
188 |
-
echo '
|
189 |
-
</fieldset>';
|
190 |
}
|
191 |
|
192 |
public function taxonomies_settings_field() {
|
193 |
$options = parent::get_taxonomies();
|
194 |
-
$
|
195 |
-
$
|
196 |
|
|
|
|
|
197 |
foreach ( get_taxonomies(array('public'=>true),'objects') as $taxonomy ) {
|
198 |
-
|
199 |
-
$skip = true;
|
200 |
-
foreach ( $taxonomy->object_type as $post_type)
|
201 |
-
if (!empty($active[$post_type]['active']) && $active[$post_type]['active'] == '1')
|
202 |
-
$skip = false;
|
203 |
-
if ($skip) continue; // skip if none of the associated post types are active
|
204 |
-
|
205 |
$count = wp_count_terms( $taxonomy->name );
|
206 |
-
|
207 |
<label><input type="checkbox" name="xmlsf_taxonomies['.
|
208 |
$taxonomy->name.']" id="xmlsf_taxonomies_'.
|
209 |
$taxonomy->name.'" value="'.
|
210 |
$taxonomy->name.'"'.
|
211 |
-
checked(in_array($taxonomy->name,$options), true, false).
|
|
|
212 |
$taxonomy->label.'</label> ('.
|
213 |
-
$count.') ';
|
214 |
-
|
215 |
-
// if ( in_array($taxonomy->name,$options) && empty($taxonomy->show_tagcloud) )
|
216 |
-
// echo '<span class="description error" style="color: red">'.__('This taxonomy type might not be suitable for public use. Please check the urls in the taxonomy sitemap.','xml-sitemap-feed').'</span>';
|
217 |
-
|
218 |
-
$output .= '
|
219 |
-
<br />';
|
220 |
-
}
|
221 |
-
|
222 |
-
if ($output) {
|
223 |
-
echo '
|
224 |
-
<fieldset id="xmlsf_taxonomies"><legend class="screen-reader-text">'.__('Include taxonomies','xml-sitemap-feed').'</legend>
|
225 |
-
';
|
226 |
-
|
227 |
-
echo $output;
|
228 |
-
|
229 |
-
echo '
|
230 |
-
<p class="description">'.__('It is generally not recommended to include taxonomy pages, unless their content brings added value. 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, you might even consider disallowing indexation to prevent a possible duplicate content penalty. You can do this by adding specific robots.txt rules below.','xml-sitemap-feed');
|
231 |
-
echo '</p>
|
232 |
-
</fieldset>';
|
233 |
-
} else {
|
234 |
-
echo '
|
235 |
-
<p style="color: red" class="error">'.__('No taxonomies available for the currently included post types.','xml-sitemap-feed').'</p>';
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
public function ping_settings_field() {
|
240 |
-
$options = parent::get_ping();
|
241 |
-
$pings = parent::get_pings();
|
242 |
-
// search engines
|
243 |
-
$se = array(
|
244 |
-
'google' => array (
|
245 |
-
'name' => __('Google','xml-sitemap-feed'),
|
246 |
-
'uri' => 'http://www.google.com/webmasters/tools/ping?sitemap='
|
247 |
-
),
|
248 |
-
'bing' => array (
|
249 |
-
'name' => __('Bing','xml-sitemap-feed'),
|
250 |
-
'uri' => 'http://www.bing.com/ping?sitemap='
|
251 |
-
)
|
252 |
-
);
|
253 |
-
|
254 |
-
echo '
|
255 |
-
<fieldset id="xmlsf_ping"><legend class="screen-reader-text">'.__('Ping on Publish','xml-sitemap-feed').'</legend>
|
256 |
-
';
|
257 |
-
foreach ( $se as $name => $values ) {
|
258 |
-
|
259 |
-
echo '
|
260 |
-
<input type="hidden" name="xmlsf_ping['.
|
261 |
-
$name.'][uri]" value="'.
|
262 |
-
$values['uri'].'" />';
|
263 |
-
|
264 |
-
echo '
|
265 |
-
<label><input type="checkbox" name="xmlsf_ping['.
|
266 |
-
$name.'][active]" id="xmlsf_ping_'.
|
267 |
-
$name.'" value="1"'.
|
268 |
-
checked( !empty($options[$name]["active"]), true, false).' /> '.
|
269 |
-
$values['name'].'</label>';
|
270 |
-
|
271 |
-
echo ' <span class="description">';
|
272 |
-
if (isset($pings[$name]))
|
273 |
-
foreach ((array)$pings[$name] as $pretty => $time)
|
274 |
-
echo sprintf(__('Successfully pinged for %1$s on %2$s GMT.','xml-sitemap-feed'),$pretty, $time).' ';
|
275 |
-
echo '</span><br />';
|
276 |
}
|
277 |
-
|
278 |
echo '
|
279 |
-
</
|
280 |
}
|
281 |
|
282 |
public function robots_settings_field() {
|
283 |
-
echo '<label>'.sprintf(__('Rules to append to
|
284 |
-
<p class="description"><span style="color: red" class="error">'.__('Only add rules here when you know what you are doing, otherwise you might break search engine access to your site.','xml-sitemap-feed').'</span><br />'.__('These rules will not have effect when you are using a static robots.txt file.','xml-sitemap-feed').'</p>';
|
285 |
-
}
|
286 |
-
|
287 |
-
public function reset_settings_field() {
|
288 |
-
|
289 |
-
echo '
|
290 |
-
<label><input type="checkbox" name="xmlsf_sitemaps[reset]" value="1" /> '.
|
291 |
-
__('Clear all XML Sitemap Feed options from the database and start fresh with the default settings.','xml-sitemap-feed').'</label>';
|
292 |
-
echo '
|
293 |
-
<p class="description">'.sprintf(__('Disabling and reenabling the %s plugin will have the same effect.','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'</p>';
|
294 |
}
|
295 |
|
296 |
//sanitize callback functions
|
297 |
-
|
298 |
public function sanitize_robots_settings($new) {
|
299 |
return trim(strip_tags($new));
|
300 |
}
|
301 |
|
302 |
public function sanitize_sitemaps_settings($new) {
|
303 |
$old = parent::get_sitemaps();
|
304 |
-
if (
|
305 |
-
set_transient('xmlsf_clear_settings','');
|
306 |
-
elseif ($old != $new) // when sitemaps are added or removed, set transient to flush rewrite rules
|
307 |
set_transient('xmlsf_flush_rewrite_rules','');
|
308 |
return $new;
|
309 |
}
|
310 |
|
311 |
-
public function sanitize_post_types_settings(
|
312 |
$old = parent::get_post_types();
|
313 |
-
$
|
314 |
-
$sanitized = $new;
|
315 |
-
$flush = false;
|
316 |
-
|
317 |
-
foreach ($new as $post_type => $settings) {
|
318 |
-
|
319 |
-
// when post types are (de)activated, set transient to flush rewrite rules
|
320 |
-
if ( ( !empty($old[$post_type]['active']) && empty($settings['active']) ) || ( empty($old[$post_type]['active']) && !empty($settings['active']) ) )
|
321 |
-
$flush = true;
|
322 |
-
|
323 |
-
if ( isset($settings['priority']) && is_numeric($settings['priority']) ) {
|
324 |
-
if ($settings['priority'] <= 0)
|
325 |
-
$sanitized[$post_type]['priority'] = '0.1';
|
326 |
-
elseif ($settings['priority'] >= 1)
|
327 |
-
$sanitized[$post_type]['priority'] = '0.9';
|
328 |
-
} else {
|
329 |
-
$sanitized[$post_type]['priority'] = $defaults[$post_type]['priority'];
|
330 |
-
}
|
331 |
-
}
|
332 |
-
|
333 |
-
if ($flush)
|
334 |
set_transient('xmlsf_flush_rewrite_rules','');
|
335 |
-
|
336 |
-
return $sanitized;
|
337 |
}
|
338 |
|
339 |
public function sanitize_taxonomies_settings($new) {
|
340 |
$old = parent::get_taxonomies();
|
341 |
-
if ($old != $new) // when taxonomy types are added or removed, set transient to flush rewrite rules
|
342 |
set_transient('xmlsf_flush_rewrite_rules','');
|
343 |
return $new;
|
344 |
}
|
345 |
|
346 |
-
public function
|
347 |
return $new;
|
348 |
}
|
349 |
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
*/
|
359 |
-
|
360 |
-
/* Adds a box to the side column */
|
361 |
-
public function add_meta_box()
|
362 |
-
{
|
363 |
-
// Only include metaboxes on post types that are included
|
364 |
-
foreach (parent::get_post_types() as $post_type)
|
365 |
-
if (isset($post_type["active"]))
|
366 |
-
add_meta_box(
|
367 |
-
'xmlsf_section',
|
368 |
-
__( 'XML Sitemap', 'xml-sitemap-feed' ),
|
369 |
-
array($this,'meta_box'),
|
370 |
-
$post_type['name'],
|
371 |
-
'side'
|
372 |
-
);
|
373 |
-
}
|
374 |
-
|
375 |
-
public function meta_box($post)
|
376 |
-
{
|
377 |
-
// Use nonce for verification
|
378 |
-
wp_nonce_field( plugin_basename( __FILE__ ), 'xmlsf_sitemap_nonce' );
|
379 |
-
|
380 |
-
// The actual fields for data entry
|
381 |
-
// Use get_post_meta to retrieve an existing value from the database and use the value for the form
|
382 |
-
$value = get_post_meta( $post->ID, '_xmlsf_exclude', true );
|
383 |
-
echo '<!-- '.$value.' -->';
|
384 |
-
echo '<p><label><input type="checkbox" name="xmlsf_exclude" id="xmlsf_exclude" value="1"'.checked(!empty($value), true, false).' > ';
|
385 |
-
_e('Exclude from XML Sitemap','xml-sitemap-feed');
|
386 |
-
echo '</label></p>';
|
387 |
-
|
388 |
-
echo '<p><label>';
|
389 |
-
_e('Priority','xml-sitemap-feed');
|
390 |
-
echo ' <input type="number" step="0.1" min="0" max="1" name="xmlsf_priority" id="xmlsf_priority" value="';
|
391 |
-
echo get_post_meta( $post->ID, '_xmlsf_priority', true );
|
392 |
-
echo '" class="small-text"></label> <span class="description">';
|
393 |
-
printf(__('Leave empty for automatic Priority as configured on %1$s > %2$s.','xml-sitemap-feed'),__('Settings'),__('Reading'));
|
394 |
-
echo '</span></p>';
|
395 |
-
}
|
396 |
-
|
397 |
-
/* When the post is saved, save our meta data */
|
398 |
-
function save_metadata( $post_id )
|
399 |
-
{
|
400 |
-
if ( !isset($post_id) )
|
401 |
-
$post_id = (int)$_REQUEST['post_ID'];
|
402 |
-
|
403 |
-
if ( !current_user_can( 'edit_post', $post_id ) || !isset($_POST['xmlsf_sitemap_nonce']) || !wp_verify_nonce($_POST['xmlsf_sitemap_nonce'], plugin_basename( __FILE__ )) )
|
404 |
-
return;
|
405 |
-
|
406 |
-
// _xmlsf_priority
|
407 |
-
if ( isset($_POST['xmlsf_priority']) && $_POST['xmlsf_priority'] != '' && is_numeric($_POST['xmlsf_priority']) ) {
|
408 |
-
if ($_POST['xmlsf_priority'] <= 0)
|
409 |
-
update_post_meta($post_id, 'priority', '0');
|
410 |
-
elseif ($_POST['xmlsf_priority'] >= 1)
|
411 |
-
update_post_meta($post_id, '_xmlsf_priority', '1');
|
412 |
-
else
|
413 |
-
update_post_meta($post_id, '_xmlsf_priority', $_POST['xmlsf_priority']);
|
414 |
-
} else {
|
415 |
-
delete_post_meta($post_id, '_xmlsf_priority');
|
416 |
-
}
|
417 |
-
|
418 |
-
// _xmlsf_exclude
|
419 |
-
if ( isset($_POST['xmlsf_exclude']) && $_POST['xmlsf_exclude'] != '' ) {
|
420 |
-
update_post_meta($post_id, '_xmlsf_exclude', $_POST['xmlsf_exclude']);
|
421 |
} else {
|
422 |
-
|
423 |
}
|
424 |
-
|
|
|
425 |
}
|
|
|
426 |
|
427 |
/**
|
428 |
* CONSTRUCTOR
|
429 |
*/
|
430 |
|
|
|
|
|
|
|
|
|
|
|
431 |
function __construct() {
|
432 |
|
433 |
// SETTINGS
|
434 |
-
add_settings_section('xmlsf_main_section',
|
435 |
// sitemaps
|
436 |
register_setting('reading', 'xmlsf_sitemaps', array($this,'sanitize_sitemaps_settings') );
|
437 |
add_settings_field('xmlsf_sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading', 'xmlsf_main_section');
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
add_settings_field('xmlsf_taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_settings_field'), 'reading', 'xmlsf_main_section');
|
447 |
-
// pings
|
448 |
-
register_setting('reading', 'xmlsf_ping', array($this,'sanitize_ping_settings') );
|
449 |
-
add_settings_field('xmlsf_ping', __('Ping on Publish','xml-sitemap-feed'), array($this,'ping_settings_field'), 'reading', 'xmlsf_main_section');
|
450 |
-
}
|
451 |
|
452 |
//robots only when permalinks are set
|
453 |
if(''!=get_option('permalink_structure')) {
|
454 |
register_setting('reading', 'xmlsf_robots', array($this,'sanitize_robots_settings') );
|
455 |
add_settings_field('xmlsf_robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading', 'xmlsf_main_section');
|
456 |
}
|
457 |
-
|
458 |
-
add_settings_field('xmlsf_reset', __('Reset XML sitemaps','xml-sitemap-feed'), array($this,'reset_settings_field'), 'reading', 'xmlsf_main_section');
|
459 |
-
|
460 |
-
// POST META BOX
|
461 |
-
add_action( 'add_meta_boxes', array($this,'add_meta_box') );
|
462 |
-
add_action( 'save_post', array($this,'save_metadata') );
|
463 |
|
464 |
-
//
|
465 |
-
add_filter('plugin_action_links_' . XMLSF_PLUGIN_BASENAME, array($this, 'add_action_link') );
|
466 |
}
|
467 |
|
468 |
}
|
12 |
// add our FancyBox Media Settings Section on Settings > Media admin page
|
13 |
// TODO get a donation button in there and refer to support forum !
|
14 |
public function privacy_settings_section() {
|
15 |
+
echo '<p><a 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¤cy_code=EUR" title="'.__('Donate to keep the free XML Sitemap Feeds plugin development & support going!','easy-fancybox').'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:5px 0 0 10px" alt="'.__('Donate to keep the free XML Sitemap Feeds plugin development & support going!','easy-fancybox').'" width="92" height="26" /></a>'.__('These settings control the XML Sitemap generation.','xml-sitemap-feed').' '.sprintf(__('XML Sitemaps are disabled if you have set the option %s (above) to %s.','xml-sitemap-feed'),'<strong>'.__('Site Visibility').'</strong>','<strong>'.__('Discourage search engines from indexing this site').'</strong>').'</p>
|
|
|
|
|
16 |
<script type="text/javascript">
|
17 |
jQuery( document ).ready( function() {
|
18 |
jQuery( "input[name=\'blog_public\']" ).on( \'change\', function() {
|
21 |
$this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
|
22 |
});
|
23 |
});
|
24 |
+
jQuery( "#xmlsf_sitemaps_index" ).on( \'change\', function() {
|
25 |
+
jQuery("#xmlsf_post_types input,#xmlsf_taxonomies input").each(function() {
|
|
|
|
|
|
|
|
|
|
|
26 |
var $this = jQuery(this);
|
27 |
$this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
|
28 |
});
|
29 |
});
|
30 |
});
|
31 |
+
</script>';
|
32 |
}
|
33 |
|
34 |
public function sitemaps_settings_field() {
|
35 |
$options = parent::get_sitemaps();
|
36 |
$disabled = ('1' == get_option('blog_public')) ? false : true;
|
37 |
|
38 |
+
echo '<div id="xmlsf_sitemaps">
|
39 |
+
<label><input type="checkbox" name="xmlsf_sitemaps[sitemap]" id="xmlsf_sitemaps_index" value="'.XMLSF_NAME.'" '.checked(XMLSF_NAME, $options['sitemap'], false).' '.disabled($disabled, true, false).' /> '.__('Regular XML Sitemaps','xml-sitemap-feed').'</label>';
|
40 |
if (isset($options['sitemap']))
|
41 |
+
echo '<span class="description"> - <a href="'.trailingslashit(get_bloginfo('url')). ( ('' == get_option('permalink_structure')) ? '?feed=sitemap' : $options['sitemap'] ) .'" target="_blank">'.__('View').'</a></span>';
|
42 |
+
//<a href="#">'.__('Settings').'</a> | <a href="#">'.__('Advanced').'</a> | <a href="#">'.__('Advanced Settings').'</a> | ...
|
43 |
+
//__('Note: if you do not include any post or taxonomy types below, the sitemap will only contain your sites root url.','xml-sitemap-feed')
|
44 |
+
echo '<br />
|
45 |
+
<label><input type="checkbox" name="xmlsf_sitemaps[sitemap-news]" id="xmlsf_sitemaps_news" value="'.XMLSF_NEWS_NAME.'" '.checked(XMLSF_NEWS_NAME, $options['sitemap-news'], false).' '.disabled($disabled, true, false).' /> '.__('Google News Sitemap','xml-sitemap-feed').'</label>';
|
46 |
if (isset($options['sitemap-news']))
|
47 |
+
echo '<span class="description"> - <a href="'.trailingslashit(get_bloginfo('url')). ( ('' == get_option('permalink_structure')) ? '?feed=sitemap-news' : $options['sitemap-news'] ) .'" target="_blank">'.__('View').'</a></span>';
|
48 |
+
echo '
|
49 |
+
</div>';
|
50 |
}
|
51 |
|
52 |
public function post_types_settings_field() {
|
53 |
$options = parent::get_post_types();
|
54 |
+
$sitemaps = parent::get_sitemaps();
|
55 |
+
$disabled = (isset($sitemaps['sitemap'])) ? false : true;
|
56 |
+
|
57 |
+
echo '<div id="xmlsf_post_types">
|
58 |
';
|
59 |
foreach ( get_post_types(array('public'=>true),'objects') as $post_type ) {
|
|
|
|
|
|
|
|
|
60 |
$count = wp_count_posts( $post_type->name );
|
61 |
+
|
|
|
|
|
|
|
|
|
|
|
62 |
echo '
|
63 |
<label><input type="checkbox" name="xmlsf_post_types['.
|
64 |
$post_type->name.'][active]" id="xmlsf_post_types_'.
|
65 |
+
$post_type->name.'" value="1"'.
|
66 |
+
checked( !empty($options[$post_type->name]["active"]), true, false).
|
67 |
+
disabled($disabled, true, false).' /> '.
|
68 |
$post_type->label.'</label> ('.
|
69 |
$count->publish.')';
|
70 |
|
71 |
+
echo '
|
72 |
+
<input type="hidden" name="xmlsf_post_types['.
|
73 |
+
$post_type->name.'][name]" value="'.
|
74 |
+
$post_type->name.'" />';
|
75 |
+
/* Find a better way...
|
76 |
+
if ( !empty($options[$post_type->name]["tags"]) )
|
77 |
+
foreach ( (array)$options[$post_type->name]["tags"] as $tag )
|
78 |
+
echo '
|
79 |
+
<input type="hidden" name="xmlsf_post_types['.
|
80 |
+
$post_type->name.'][tags][]" value="'.$tag.'" />';
|
81 |
+
else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
echo '
|
83 |
+
<input type="hidden" name="xmlsf_post_types['.
|
84 |
+
$post_type->name.'][tags][]" value="image" />
|
85 |
+
<input type="hidden" name="xmlsf_post_types['.
|
86 |
+
$post_type->name.'][tags][]" value="video" />';
|
87 |
+
|
88 |
+
echo ( !empty( $options[$post_type->name]["split_by"] ) ) ? '
|
89 |
+
<input type="hidden" name="xmlsf_post_types['.
|
90 |
+
$post_type->name.'][split_by]" value="'.
|
91 |
+
$options[$post_type->name]["split_by"].'" />' : '';*/
|
92 |
+
echo '
|
93 |
+
<br />';
|
94 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
echo '
|
96 |
+
</div>';
|
|
|
|
|
97 |
}
|
98 |
|
99 |
public function taxonomies_settings_field() {
|
100 |
$options = parent::get_taxonomies();
|
101 |
+
$sitemaps = parent::get_sitemaps();
|
102 |
+
$disabled = (isset($sitemaps['sitemap'])) ? false : true;
|
103 |
|
104 |
+
echo '<div id="xmlsf_taxonomies">
|
105 |
+
';
|
106 |
foreach ( get_taxonomies(array('public'=>true),'objects') as $taxonomy ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
$count = wp_count_terms( $taxonomy->name );
|
108 |
+
echo '
|
109 |
<label><input type="checkbox" name="xmlsf_taxonomies['.
|
110 |
$taxonomy->name.']" id="xmlsf_taxonomies_'.
|
111 |
$taxonomy->name.'" value="'.
|
112 |
$taxonomy->name.'"'.
|
113 |
+
checked(in_array($taxonomy->name,$options), true, false).
|
114 |
+
disabled($disabled, true, false).' /> '.
|
115 |
$taxonomy->label.'</label> ('.
|
116 |
+
$count.')<br />';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
|
|
118 |
echo '
|
119 |
+
</div>';
|
120 |
}
|
121 |
|
122 |
public function robots_settings_field() {
|
123 |
+
echo '<label for="xmlsf_robots">'.sprintf(__('Rules to append to %s generated by WordPress.','xml-sitemap-feed'),'<a href="'.trailingslashit(get_bloginfo('url')).'robots.txt" target="_blank">robots.txt</a>').'</label><br /><textarea name="xmlsf_robots" id="xmlsf_robots" class="large-text"'.disabled($disabled, true, false).' cols="50" rows="5" />'.esc_attr( parent::get_robots() ).'</textarea><p class="description"'.__('Warning: Only set rules here when you know what you are doing, otherwise you might break access to your site.<br />Note: These rules will not have effect when you are using a static robots.txt file.','xml-sitemap-feed').'</p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
//sanitize callback functions
|
127 |
+
|
128 |
public function sanitize_robots_settings($new) {
|
129 |
return trim(strip_tags($new));
|
130 |
}
|
131 |
|
132 |
public function sanitize_sitemaps_settings($new) {
|
133 |
$old = parent::get_sitemaps();
|
134 |
+
if ($old != $new) // when sitemaps are added or removed, set transient to flush rewrite rules after updating
|
|
|
|
|
135 |
set_transient('xmlsf_flush_rewrite_rules','');
|
136 |
return $new;
|
137 |
}
|
138 |
|
139 |
+
public function sanitize_post_types_settings($new) {
|
140 |
$old = parent::get_post_types();
|
141 |
+
if ($old != $new) // when post types are added or removed, set transient to flush rewrite rules after updating
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
set_transient('xmlsf_flush_rewrite_rules','');
|
143 |
+
return $new;
|
|
|
144 |
}
|
145 |
|
146 |
public function sanitize_taxonomies_settings($new) {
|
147 |
$old = parent::get_taxonomies();
|
148 |
+
if ($old != $new) // when taxonomy types are added or removed, set transient to flush rewrite rules after updating
|
149 |
set_transient('xmlsf_flush_rewrite_rules','');
|
150 |
return $new;
|
151 |
}
|
152 |
|
153 |
+
public function sanitize_pings_settings($new) {
|
154 |
return $new;
|
155 |
}
|
156 |
|
157 |
+
// do we need intval some day soon ? maybe for priority calc settings ? or remove ...
|
158 |
+
public function intval($setting = '') {
|
159 |
+
if ($setting == '')
|
160 |
+
return '';
|
161 |
+
|
162 |
+
if (substr($setting, -1) == '%') {
|
163 |
+
$val = intval(substr($setting, 0, -1));
|
164 |
+
$prc = '%';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
} else {
|
166 |
+
$val = intval($setting);
|
167 |
}
|
168 |
+
|
169 |
+
return ( $val != 0 ) ? $val.$prc : 0;
|
170 |
}
|
171 |
+
|
172 |
|
173 |
/**
|
174 |
* CONSTRUCTOR
|
175 |
*/
|
176 |
|
177 |
+
function XMLSitemapFeed() {
|
178 |
+
//constructor in php4
|
179 |
+
$this->__construct(); // just call the php5 one.
|
180 |
+
}
|
181 |
+
|
182 |
function __construct() {
|
183 |
|
184 |
// SETTINGS
|
185 |
+
add_settings_section('xmlsf_main_section', __('XML Sitemaps','xml-sitemap-feed'), array($this,'privacy_settings_section'), 'reading');
|
186 |
// sitemaps
|
187 |
register_setting('reading', 'xmlsf_sitemaps', array($this,'sanitize_sitemaps_settings') );
|
188 |
add_settings_field('xmlsf_sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading', 'xmlsf_main_section');
|
189 |
+
// post_types
|
190 |
+
register_setting('reading', 'xmlsf_post_types', array($this,'sanitize_post_types_settings') );
|
191 |
+
add_settings_field('xmlsf_post_types', __('Include post types','xml-sitemap-feed'), array($this,'post_types_settings_field'), 'reading', 'xmlsf_main_section');
|
192 |
+
// taxonomies
|
193 |
+
register_setting('reading', 'xmlsf_taxonomies', array($this,'sanitize_taxonomies_settings') );
|
194 |
+
add_settings_field('xmlsf_taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_settings_field'), 'reading', 'xmlsf_main_section');
|
195 |
+
// pings
|
196 |
+
//register_setting('privacy', 'xmlsf_pings', array($this,'sanitize_pings_settings') );
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
//robots only when permalinks are set
|
199 |
if(''!=get_option('permalink_structure')) {
|
200 |
register_setting('reading', 'xmlsf_robots', array($this,'sanitize_robots_settings') );
|
201 |
add_settings_field('xmlsf_robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading', 'xmlsf_main_section');
|
202 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
|
204 |
+
//add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'easy_fancybox_add_action_link');
|
|
|
205 |
}
|
206 |
|
207 |
}
|
includes/core.php
CHANGED
@@ -9,469 +9,148 @@ class XMLSitemapFeed {
|
|
9 |
* Plugin variables
|
10 |
*/
|
11 |
|
12 |
-
// Pretty permalinks base name
|
13 |
public $base_name = 'sitemap';
|
14 |
|
15 |
-
// Pretty permalinks extension
|
16 |
public $extension = 'xml';
|
17 |
|
18 |
-
// Database options prefix
|
19 |
-
private $prefix = 'xmlsf_';
|
20 |
-
|
21 |
-
// Flushed flag
|
22 |
private $yes_mother = false;
|
23 |
|
24 |
private $defaults = array();
|
25 |
-
private $disabled_post_types = array('attachment');
|
26 |
-
|
27 |
-
// Global values used for priority and changefreq calculation
|
28 |
-
private $firstdate;
|
29 |
-
private $lastmodified;
|
30 |
-
private $postmodified = array();
|
31 |
-
private $termmodified = array();
|
32 |
-
private $blogpage;
|
33 |
-
private $images = array();
|
34 |
|
35 |
-
private function build_defaults()
|
36 |
-
|
37 |
// sitemaps
|
38 |
-
if ( '1' == get_option('blog_public') )
|
39 |
$this->defaults['sitemaps'] = array(
|
40 |
-
'sitemap' => XMLSF_NAME
|
41 |
);
|
42 |
else
|
43 |
$this->defaults['sitemaps'] = array();
|
44 |
|
45 |
// post_types
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
'
|
54 |
-
'
|
55 |
-
|
56 |
-
|
57 |
-
'
|
58 |
-
'
|
59 |
-
)
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
$this->defaults['post_types'][$name]['active'] = '1';
|
70 |
-
|
71 |
-
if ( isset($this->defaults['post_types']['post']) ) {
|
72 |
-
if (wp_count_posts('post')->publish > 500)
|
73 |
-
$this->defaults['post_types']['post']['archive'] = 'yearly';
|
74 |
-
$this->defaults['post_types']['post']['tags']['image'] = 'featured';
|
75 |
-
$this->defaults['post_types']['post']['priority'] = '0.7';
|
76 |
-
$this->defaults['post_types']['post']['dynamic_priority'] = '1';
|
77 |
-
}
|
78 |
-
|
79 |
-
if ( isset($this->defaults['post_types']['page']) ) {
|
80 |
-
unset($this->defaults['post_types']['page']['archive']);
|
81 |
-
$this->defaults['post_types']['page']['tags'] = array('image' => 'featured');
|
82 |
-
$this->defaults['post_types']['page']['priority'] = '0.3';
|
83 |
}
|
84 |
|
85 |
-
/* attachment post type is disabled... images are included via tags in the post and page sitemaps
|
86 |
-
if ( isset($this->defaults['post_types']['attachment']) ) {
|
87 |
-
$this->defaults['post_types']['attachment']['tags']['image'] = 'attached';
|
88 |
-
$this->defaults['post_types']['attachment']['priority'] = '0.3';
|
89 |
-
}*/
|
90 |
-
|
91 |
// taxonomies
|
92 |
-
$this->defaults['taxonomies'] = array();
|
93 |
-
|
94 |
-
// ping search engines
|
95 |
-
$this->defaults['ping'] = array(
|
96 |
-
'google' => array (
|
97 |
-
'active' => '1',
|
98 |
-
'uri' => 'http://www.google.com/webmasters/tools/ping?sitemap=',
|
99 |
-
),
|
100 |
-
'bing' => array (
|
101 |
-
'active' => '1',
|
102 |
-
'uri' => 'http://www.bing.com/ping?sitemap=',
|
103 |
-
),
|
104 |
-
);
|
105 |
-
|
106 |
-
$this->defaults['pings'] = array(); // for storing last ping timestamps and status
|
107 |
|
108 |
// robots
|
109 |
-
$this->defaults['robots'] =
|
110 |
-
global $blog_id;
|
111 |
-
if ( !is_multisite() || $blog_id == 1 )
|
112 |
-
$this->defaults['robots'] .= "Allow: /wp-content/uploads/\n";
|
113 |
}
|
114 |
|
115 |
-
|
116 |
-
{
|
|
|
117 |
if (empty($this->defaults))
|
118 |
$this->build_defaults();
|
119 |
|
120 |
if (!$key)
|
121 |
-
|
122 |
else
|
123 |
-
|
124 |
-
|
125 |
-
return apply_filters( 'xmlsf_defaults', $return, $key );
|
126 |
-
}
|
127 |
-
|
128 |
-
public function get_option($option)
|
129 |
-
{
|
130 |
-
return get_option($this->prefix.$option, $this->defaults($option));
|
131 |
-
}
|
132 |
-
|
133 |
-
public function get_sitemaps()
|
134 |
-
{
|
135 |
-
$return = $this->get_option('sitemaps');
|
136 |
-
|
137 |
-
// make sure it's an array we are returning
|
138 |
-
return (is_array($return)) ? (array)$return : array();
|
139 |
-
}
|
140 |
-
|
141 |
-
public function get_ping()
|
142 |
-
{
|
143 |
-
$return = $this->get_option('ping');
|
144 |
-
|
145 |
-
// make sure it's an array we are returning
|
146 |
-
return (!empty($return)) ? (array)$return : array();
|
147 |
-
}
|
148 |
-
|
149 |
-
public function get_pings()
|
150 |
-
{
|
151 |
-
$return = $this->get_option('pings');
|
152 |
-
|
153 |
-
// make sure it's an array we are returning
|
154 |
-
return (!empty($return)) ? (array)$return : array();
|
155 |
-
}
|
156 |
-
|
157 |
-
public function disabled_post_types()
|
158 |
-
{
|
159 |
-
return $this->disabled_post_types;
|
160 |
|
161 |
}
|
162 |
|
163 |
-
public function
|
164 |
-
{
|
165 |
-
$return = $this->get_option('post_types');
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
}
|
170 |
|
171 |
-
|
172 |
-
{
|
173 |
-
$post_types = $this->get_option('post_types');
|
174 |
-
$return = array();
|
175 |
-
|
176 |
|
177 |
-
|
178 |
-
if(!empty($values['active'])) {
|
179 |
-
$count = wp_count_posts( $values['name'] );
|
180 |
-
if ($count->publish > 0) {
|
181 |
-
$values['count'] = $count->publish;
|
182 |
-
$return[$type] = $values;
|
183 |
-
}
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
// make sure it's an array we are returning
|
188 |
-
return (!empty($return)) ? (array)$return : array();
|
189 |
}
|
190 |
|
191 |
-
public function
|
192 |
-
{
|
193 |
-
$return = $this->get_option('taxonomies');
|
194 |
|
195 |
-
|
196 |
-
|
197 |
-
}
|
198 |
|
199 |
-
|
200 |
-
{
|
201 |
-
global $wpdb;
|
202 |
-
$return = array();
|
203 |
-
if ( 'monthly' == $type ) {
|
204 |
-
$query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts WHERE post_type = '$post_type' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC";
|
205 |
-
$key = md5($query);
|
206 |
-
$cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
|
207 |
-
if ( !isset( $cache[ $key ] ) ) {
|
208 |
-
$arcresults = $wpdb->get_results($query);
|
209 |
-
$cache[ $key ] = $arcresults;
|
210 |
-
wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
|
211 |
-
} else {
|
212 |
-
$arcresults = $cache[ $key ];
|
213 |
-
}
|
214 |
-
if ( $arcresults ) {
|
215 |
-
foreach ( (array) $arcresults as $arcresult ) {
|
216 |
-
$return[$arcresult->year.$arcresult->month] = $this->get_index_url( 'posttype', $post_type, $arcresult->year . $arcresult->month );
|
217 |
-
}
|
218 |
-
}
|
219 |
-
} elseif ('yearly' == $type) {
|
220 |
-
$query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts WHERE post_type = '$post_type' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC";
|
221 |
-
$key = md5($query);
|
222 |
-
$cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
|
223 |
-
if ( !isset( $cache[ $key ] ) ) {
|
224 |
-
$arcresults = $wpdb->get_results($query);
|
225 |
-
$cache[ $key ] = $arcresults;
|
226 |
-
wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
|
227 |
-
} else {
|
228 |
-
$arcresults = $cache[ $key ];
|
229 |
-
}
|
230 |
-
if ($arcresults) {
|
231 |
-
foreach ( (array) $arcresults as $arcresult) {
|
232 |
-
$return[$arcresult->year] = $this->get_index_url( 'posttype', $post_type, $arcresult->year );
|
233 |
-
}
|
234 |
-
}
|
235 |
-
} else {
|
236 |
-
$return[0] = $this->get_index_url('posttype', $post_type); // $sitemap = 'home', $type = false, $param = false
|
237 |
-
}
|
238 |
-
return $return;
|
239 |
-
}
|
240 |
|
241 |
-
|
242 |
-
{
|
243 |
-
return ( $robots = $this->get_option('robots') ) ? $robots : '';
|
244 |
}
|
|
|
|
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
$return = $this->get_option('post_types');
|
249 |
|
250 |
-
|
251 |
-
return (!empty($return[$type]['tags'])) ? (array)$return[$type]['tags'] : array();
|
252 |
-
}
|
253 |
-
|
254 |
-
public function is_home($id) {
|
255 |
-
|
256 |
-
if ( empty($this->blogpage) ) {
|
257 |
-
$blogpage = get_option('page_for_posts');
|
258 |
-
|
259 |
-
if ( !empty($blogpage) ) {
|
260 |
-
global $polylang;
|
261 |
-
if ( isset($polylang) )
|
262 |
-
$this->blogpage = $polylang->get_translations('post', $blogpage);
|
263 |
-
else
|
264 |
-
$this->blogpage = array($blogpage);
|
265 |
-
} else {
|
266 |
-
$this->blogpage = array('-1');
|
267 |
-
}
|
268 |
-
}
|
269 |
|
270 |
-
|
271 |
-
|
272 |
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* TEMPLATE FUNCTIONS
|
276 |
-
*/
|
277 |
-
|
278 |
-
public function modified($sitemap = 'post_type', $term = '')
|
279 |
-
{
|
280 |
-
if ('post_type' == $sitemap) :
|
281 |
|
282 |
-
|
283 |
|
284 |
-
|
285 |
-
|
286 |
-
//if ( empty($this->lastmodified) )
|
287 |
-
//$this->lastmodified = mysql2date('U',get_lastmodified('GMT','post'));
|
288 |
-
return get_lastmodified('GMT','post'); //$this->lastmodified;
|
289 |
-
}
|
290 |
-
|
291 |
-
if ( empty($this->postmodified[$post->ID]) ) {
|
292 |
-
$postmodified = get_post_modified_time( 'Y-m-d H:i:s', true, $post->ID );
|
293 |
-
$options = $this->get_option('post_types');
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
'status' => 'approve',
|
298 |
-
'number' => 1,
|
299 |
-
'post_id' => $post->ID,
|
300 |
-
) );
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
$this->postmodified[$post->ID] = $postmodified;
|
307 |
-
}
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
elseif ( !empty($term) ) :
|
312 |
-
|
313 |
-
if ( is_object($term) ) {
|
314 |
-
if ( empty($this->termmodified[$term->term_id]) ) {
|
315 |
-
// get the latest post in this taxonomy item, to use its post_date as lastmod
|
316 |
-
$posts = get_posts ( array(
|
317 |
-
'numberposts' => 1,
|
318 |
-
'no_found_rows' => true,
|
319 |
-
'update_post_meta_cache' => false,
|
320 |
-
'update_post_term_cache' => false,
|
321 |
-
'update_cache' => false,
|
322 |
-
'tax_query' => array(
|
323 |
-
array(
|
324 |
-
'taxonomy' => $term->taxonomy,
|
325 |
-
'field' => 'slug',
|
326 |
-
'terms' => $term->slug
|
327 |
-
)
|
328 |
-
)
|
329 |
-
)
|
330 |
-
);
|
331 |
-
$this->termmodified[$term->term_id] = $posts[0]->post_date_gmt;
|
332 |
-
}
|
333 |
-
return $this->termmodified[$term->term_id];
|
334 |
-
} else {
|
335 |
-
$obj = get_taxonomy($term);
|
336 |
-
return get_lastdate( 'gmt', $obj->object_type[0] );
|
337 |
-
// uses get_lastdate() function defined in xml-sitemap/hacks.php !
|
338 |
-
// which is a shortcut: returns last post date, not last modified date...
|
339 |
-
// TODO find the long way around (take tax type, get all terms,
|
340 |
-
// do tax_query with all terms for one post and get its lastmod date)
|
341 |
-
}
|
342 |
-
|
343 |
-
|
344 |
-
else :
|
345 |
-
|
346 |
-
return '0000-00-00 00:00:00';
|
347 |
|
348 |
-
|
349 |
-
|
|
|
350 |
|
351 |
-
|
352 |
-
{
|
353 |
-
global $post;
|
354 |
-
if ( empty($this->images[$post->ID]) ) {
|
355 |
-
$options = $this->get_option('post_types');
|
356 |
-
if('attached' == $options[$post->post_type]['tags']['image']) {
|
357 |
-
$args = array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'numberposts' => -1, 'post_status' =>'inherit', 'post_parent' => $post->ID );
|
358 |
-
$attachments = get_posts($args);
|
359 |
-
if ($attachments) {
|
360 |
-
foreach ( $attachments as $attachment ) {
|
361 |
-
$image = wp_get_attachment_image_src( $attachment->ID, 'full' );
|
362 |
-
$this->images[$post->ID][] = $image[0];
|
363 |
-
}
|
364 |
-
}
|
365 |
-
} elseif ('featured' == $options[$post->post_type]['tags']['image']) {
|
366 |
-
if (has_post_thumbnail( $post->ID ) ) {
|
367 |
-
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
368 |
-
$this->images[$post->ID][] = $image[0];
|
369 |
-
}
|
370 |
-
}
|
371 |
-
}
|
372 |
-
return ( isset($this->images[$post->ID]) ) ? $this->images[$post->ID] : array();
|
373 |
}
|
374 |
|
375 |
-
public function get_lastmod($sitemap = 'post_type', $term = '')
|
376 |
-
{
|
377 |
-
return mysql2date('Y-m-d\TH:i:s+00:00', $this->modified($sitemap,$term), false);
|
378 |
-
}
|
379 |
-
|
380 |
-
public function get_changefreq($sitemap = 'post_type', $term = '')
|
381 |
-
{
|
382 |
-
$lastactivityage = ( gmdate('U') - mysql2date( 'U', $this->modified($sitemap,$term) ) ); // post age
|
383 |
-
|
384 |
-
if ( ($lastactivityage/86400) < 1 ) { // last activity less than 1 day old
|
385 |
-
$changefreq = 'hourly';
|
386 |
-
} else if ( ($lastactivityage/86400) < 7 ) { // last activity less than 1 week old
|
387 |
-
$changefreq = 'daily';
|
388 |
-
} else if ( ($lastactivityage/86400) < 30 ) { // last activity less than one month old
|
389 |
-
$changefreq = 'weekly';
|
390 |
-
} else if ( ($lastactivityage/86400) < 365 ) { // last activity less than 1 year old
|
391 |
-
$changefreq = 'monthly';
|
392 |
-
} else {
|
393 |
-
$changefreq = 'yearly'; // over a year old...
|
394 |
-
}
|
395 |
-
|
396 |
-
return $changefreq;
|
397 |
-
}
|
398 |
-
|
399 |
-
public function get_priority($sitemap = 'post_type', $term = '')
|
400 |
-
{
|
401 |
-
if ( 'post_type' == $sitemap ) :
|
402 |
-
global $post;
|
403 |
-
$options = $this->get_option('post_types');
|
404 |
-
$defaults = $this->defaults('post_types');
|
405 |
-
$priority_meta = get_metadata('post', $post->ID, '_xmlsf_priority' , true);
|
406 |
-
|
407 |
-
if ( !empty($priority_meta) ) {
|
408 |
-
|
409 |
-
$priority = $priority_meta;
|
410 |
-
|
411 |
-
} elseif ( !empty($options[$post->post_type]['dynamic_priority']) ) {
|
412 |
-
|
413 |
-
$post_modified = mysql2date('U',$post->post_modified_gmt);
|
414 |
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
// uses get_lastmodified() function defined in xml-sitemap/hacks.php !
|
419 |
-
|
420 |
-
if ( empty($this->firstdate) )
|
421 |
-
$this->firstdate = mysql2date('U',get_firstdate('GMT',$post->post_type));
|
422 |
-
// uses get_firstdate() function defined in xml-sitemap/hacks.php !
|
423 |
-
|
424 |
-
if ( isset($options[$post->post_type]['priority']) )
|
425 |
-
$priority_value = $options[$post->post_type]['priority'];
|
426 |
-
else
|
427 |
-
$priority_value = $defaults[$post->post_type]['priority'];
|
428 |
-
|
429 |
-
// reduce by age
|
430 |
-
// NOTE : home/blog page gets same treatment as sticky post
|
431 |
-
if ( is_sticky($post->ID) || $this->is_home($post->ID) )
|
432 |
-
$priority = $priority_value;
|
433 |
-
else
|
434 |
-
$priority = ( $this->lastmodified > $this->firstdate ) ? $priority_value - $priority_value * ( $this->lastmodified - $post_modified ) / ( $this->lastmodified - $this->firstdate ) : $priority_value;
|
435 |
-
|
436 |
-
if ( $post->comment_count > 0 )
|
437 |
-
$priority = $priority + 0.1 + ( 0.9 - $priority ) * $post->comment_count / wp_count_comments($post->post_type)->approved;
|
438 |
-
|
439 |
-
// and a final trim for cases where we end up above 1 (sticky posts with many comments)
|
440 |
-
if ($priority > 1)
|
441 |
-
$priority = 1;
|
442 |
-
|
443 |
-
} else {
|
444 |
|
445 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
$max_priority = 0.4;
|
452 |
-
$min_priority = 0.0;
|
453 |
-
// TODO make these values optional
|
454 |
-
|
455 |
-
$tax_obj = get_taxonomy($term->taxonomy);
|
456 |
-
$postcount = 0;
|
457 |
-
foreach ($tax_obj->object_type as $post_type) {
|
458 |
-
$_post_count = wp_count_posts($post_type);
|
459 |
-
$postcount += $_post_count->publish;
|
460 |
-
}
|
461 |
-
|
462 |
-
$priority = ( $postcount > 0 ) ? $min_priority + ( $max_priority * $term->count / $postcount ) : $min_priority;
|
463 |
-
|
464 |
-
else :
|
465 |
-
|
466 |
-
$priority = 0.5;
|
467 |
|
468 |
-
|
469 |
-
|
470 |
-
return number_format($priority,1);
|
471 |
}
|
472 |
|
473 |
-
public function get_home_urls()
|
474 |
-
{
|
475 |
$urls = array();
|
476 |
|
477 |
global $polylang,$q_config;
|
@@ -479,74 +158,93 @@ class XMLSitemapFeed {
|
|
479 |
if ( isset($polylang) )
|
480 |
foreach ($polylang->get_languages_list() as $term)
|
481 |
$urls[] = $polylang->get_home_url($term);
|
|
|
|
|
|
|
482 |
else
|
483 |
-
$urls[] = home_url();
|
484 |
|
485 |
return $urls;
|
486 |
}
|
487 |
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
}
|
499 |
-
|
500 |
-
return $
|
501 |
}
|
502 |
|
503 |
-
|
504 |
-
{
|
505 |
-
$
|
506 |
-
$name = $this->base_name.'-'.$sitemap;
|
507 |
-
|
508 |
-
if ( $type )
|
509 |
-
$name .= '-'.$type;
|
510 |
|
511 |
-
if (
|
512 |
-
$
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
$
|
517 |
-
|
518 |
-
|
519 |
-
return $root . $name;
|
520 |
}
|
521 |
-
|
522 |
|
523 |
/**
|
524 |
* ROBOTSTXT
|
525 |
*/
|
526 |
|
527 |
// add sitemap location in robots.txt generated by WP
|
528 |
-
public function robots($output)
|
529 |
-
|
530 |
-
|
531 |
|
532 |
-
|
533 |
-
echo "\n# XML Sitemaps are disabled. Please see Site Visibility on Settings > Reading.";
|
534 |
-
} else {
|
535 |
-
foreach ( $this->get_sitemaps() as $pretty )
|
536 |
-
echo "\nSitemap: " . trailingslashit(get_bloginfo('url')) . $pretty;
|
537 |
|
538 |
-
|
539 |
-
|
540 |
-
|
|
|
|
|
|
|
541 |
echo "\n\n";
|
542 |
}
|
543 |
|
544 |
// add robots.txt rules
|
545 |
-
public function robots_txt($output)
|
546 |
-
|
547 |
-
return $output . $this->get_option('robots') ;
|
548 |
}
|
549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
/**
|
551 |
* REWRITES
|
552 |
*/
|
@@ -558,8 +256,7 @@ class XMLSitemapFeed {
|
|
558 |
* @param string $request
|
559 |
*/
|
560 |
|
561 |
-
public function trailingslash($request)
|
562 |
-
{
|
563 |
if (pathinfo($request, PATHINFO_EXTENSION)) {
|
564 |
return untrailingslashit($request);
|
565 |
}
|
@@ -572,8 +269,8 @@ class XMLSitemapFeed {
|
|
572 |
* @param string $wp_rewrite
|
573 |
*/
|
574 |
|
575 |
-
public function rewrite_rules($wp_rewrite)
|
576 |
-
|
577 |
$xmlsf_rules = array();
|
578 |
$sitemaps = $this->get_sitemaps();
|
579 |
|
@@ -583,16 +280,20 @@ class XMLSitemapFeed {
|
|
583 |
if (!empty($sitemaps['sitemap'])) {
|
584 |
// home urls
|
585 |
$xmlsf_rules[ $this->base_name . '-home\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-home';
|
|
|
|
|
|
|
|
|
586 |
|
587 |
// add rules for post types (can be split by month or year)
|
588 |
-
foreach ( $this->get_post_types() as $post_type )
|
589 |
-
|
590 |
-
|
591 |
|
592 |
// add rules for taxonomies
|
593 |
-
foreach ( $this->get_taxonomies() as $taxonomy )
|
594 |
-
$xmlsf_rules[ $this->base_name . '-taxonomy-' . $taxonomy . '\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-taxonomy
|
595 |
-
|
596 |
}
|
597 |
|
598 |
$wp_rewrite->rules = $xmlsf_rules + $wp_rewrite->rules;
|
@@ -602,8 +303,7 @@ class XMLSitemapFeed {
|
|
602 |
* REQUEST FILTER
|
603 |
*/
|
604 |
|
605 |
-
public function filter_request( $request )
|
606 |
-
{
|
607 |
if ( isset($request['feed']) && strpos($request['feed'],'sitemap') == 0 ) {
|
608 |
|
609 |
if ( $request['feed'] == 'sitemap' ) {
|
@@ -643,46 +343,59 @@ class XMLSitemapFeed {
|
|
643 |
|
644 |
if ( strpos($request['feed'],'sitemap-posttype') == 0 ) {
|
645 |
foreach ( $this->get_post_types() as $post_type ) {
|
646 |
-
if ( $request['feed'] == 'sitemap-
|
647 |
// setup actions and filters
|
648 |
-
add_action('do_feed_sitemap-
|
649 |
add_filter( 'post_limits', array($this, 'filter_limits') );
|
650 |
|
651 |
// modify request parameters
|
652 |
$request['post_type'] = $post_type['name'];
|
653 |
$request['orderby'] = 'modified';
|
654 |
-
|
|
|
655 |
$request['no_found_rows'] = true;
|
656 |
$request['update_post_meta_cache'] = false;
|
657 |
$request['update_post_term_cache'] = false;
|
658 |
-
/*if ('attachment' == $post_type['name']) {
|
659 |
-
$request['post_status'] = 'inherit';
|
660 |
-
$request['post_mime_type'] = 'image,audio'; // ,video,audio
|
661 |
-
}*/
|
662 |
|
663 |
return $request;
|
664 |
}
|
665 |
}
|
666 |
}
|
667 |
|
668 |
-
if (
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
add_action('do_feed_sitemap-taxonomy-'.$taxonomy, array($this, 'load_template_taxonomy'), 10, 1);
|
673 |
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
$request['no_found_rows'] = true;
|
678 |
-
$request['update_post_meta_cache'] = false;
|
679 |
-
$request['update_post_term_cache'] = false;
|
680 |
-
$request['post_status'] = 'publish';
|
681 |
|
682 |
-
|
683 |
-
|
684 |
-
|
|
|
|
|
|
|
685 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
}
|
687 |
|
688 |
return $request;
|
@@ -693,132 +406,92 @@ class XMLSitemapFeed {
|
|
693 |
*/
|
694 |
|
695 |
// set up the sitemap index template
|
696 |
-
public function load_template_index()
|
697 |
-
{
|
698 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap.php' );
|
699 |
}
|
700 |
|
701 |
// set up the sitemap home page(s) template
|
702 |
-
public function load_template_base()
|
703 |
-
{
|
704 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-home.php' );
|
705 |
}
|
706 |
|
707 |
// set up the post types sitemap template
|
708 |
-
public function load_template()
|
709 |
-
{
|
710 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-post_type.php' );
|
711 |
}
|
712 |
|
713 |
// set up the taxonomy sitemap template
|
714 |
-
public function load_template_taxonomy()
|
715 |
-
{
|
716 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-taxonomy.php' );
|
717 |
}
|
718 |
|
719 |
// set up the news sitemap template
|
720 |
-
public function load_template_news()
|
721 |
-
{
|
722 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-news.php' );
|
723 |
}
|
724 |
|
725 |
/**
|
726 |
-
*
|
727 |
*/
|
728 |
|
729 |
// override default feed limit
|
730 |
-
public function filter_limits( $limits )
|
731 |
-
{
|
732 |
return 'LIMIT 0, 50000';
|
733 |
}
|
734 |
|
735 |
// override default feed limit for taxonomy sitemaps
|
736 |
-
public function filter_limits_taxonomy( $limits )
|
737 |
-
{
|
738 |
return 'LIMIT 0, 1';
|
739 |
}
|
740 |
|
741 |
// override default feed limit for GN
|
742 |
-
public function filter_news_limits( $limits )
|
743 |
-
{
|
744 |
return 'LIMIT 0, 1000';
|
745 |
}
|
746 |
|
747 |
// Create a new filtering function that will add a where clause to the query,
|
748 |
// used for the Google News Sitemap
|
749 |
-
public function filter_news_where( $where = '' )
|
750 |
-
{
|
751 |
// only posts from the last 2 days
|
752 |
return $where . " AND post_date > '" . date('Y-m-d H:i:s', strtotime('-49 hours')) . "'";
|
753 |
}
|
754 |
|
755 |
-
|
756 |
-
/**
|
757 |
-
* PINGING
|
758 |
-
*/
|
759 |
-
|
760 |
-
public function ping($uri, $timeout = 3)
|
761 |
-
{
|
762 |
-
$options = array();
|
763 |
-
$options['timeout'] = $timeout;
|
764 |
-
|
765 |
-
$response = wp_remote_request( $uri, $options );
|
766 |
-
|
767 |
-
if ( '200' == wp_remote_retrieve_response_code($response) )
|
768 |
-
$succes = true;
|
769 |
-
else
|
770 |
-
$succes = false;
|
771 |
-
|
772 |
-
return $succes;
|
773 |
-
}
|
774 |
-
|
775 |
-
public function do_pings($post_ID)
|
776 |
-
{
|
777 |
-
$sitemaps = $this->get_sitemaps();
|
778 |
-
foreach ($this->get_ping() as $se => $data) {
|
779 |
-
if(empty($data['active']) || '1' != $data['active']) continue;
|
780 |
-
|
781 |
-
foreach ( $sitemaps as $pretty ) {
|
782 |
-
if ( $this->ping( $data['uri'].urlencode(trailingslashit(get_bloginfo('url')) . $pretty) ) ) {
|
783 |
-
$pings = $this->get_pings();
|
784 |
-
$pings[$se][$pretty] = mysql2date('Y-m-d H:i:s', 'now', false);
|
785 |
-
update_option($this->prefix.'pings',$pings);
|
786 |
-
}
|
787 |
-
}
|
788 |
-
}
|
789 |
-
|
790 |
-
return $post_ID;
|
791 |
-
}
|
792 |
-
|
793 |
-
/**
|
794 |
-
* DE-ACTIVATION
|
795 |
-
*/
|
796 |
-
|
797 |
-
public function clear_settings()
|
798 |
-
{
|
799 |
-
delete_option('xmlsf_version');
|
800 |
-
foreach ( $this->defaults() as $option => $settings )
|
801 |
-
delete_option('xmlsf_'.$option);
|
802 |
-
|
803 |
-
remove_action('generate_rewrite_rules', array($this, 'rewrite_rules') );
|
804 |
-
global $wp_rewrite;
|
805 |
-
$wp_rewrite->flush_rules();
|
806 |
-
}
|
807 |
-
|
808 |
/**
|
809 |
* INITIALISATION
|
810 |
*/
|
811 |
|
812 |
-
public function plugins_loaded()
|
813 |
-
|
814 |
// TEXT DOMAIN
|
815 |
|
816 |
if ( is_admin() ) // text domain on plugins_loaded even if it is for admin only
|
817 |
load_plugin_textdomain('xml-sitemap-feed', false, dirname(dirname(plugin_basename( __FILE__ ))) . '/languages' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
818 |
|
819 |
if (get_option('xmlsf_version') != XMLSF_VERSION) {
|
820 |
// rewrite rules not available on plugins_loaded
|
821 |
-
//
|
822 |
// just remove the rules and let WP renew them when ready...
|
823 |
delete_option('rewrite_rules');
|
824 |
|
@@ -829,56 +502,47 @@ class XMLSitemapFeed {
|
|
829 |
|
830 |
}
|
831 |
|
832 |
-
private function flush_rules($hard = false)
|
833 |
-
|
|
|
834 |
if ($this->yes_mother)
|
835 |
return;
|
836 |
|
837 |
global $wp_rewrite;
|
838 |
-
// don't need hard flush by default
|
839 |
$wp_rewrite->flush_rules($hard);
|
840 |
|
841 |
$this->yes_mother = true;
|
842 |
}
|
843 |
|
844 |
-
public function admin_init()
|
845 |
-
|
846 |
-
// UPGRADE RULES after plugin upgrade
|
|
|
847 |
if (get_option('xmlsf_version') != XMLSF_VERSION) {
|
848 |
$this->flush_rules();
|
849 |
update_option('xmlsf_version', XMLSF_VERSION);
|
850 |
-
}
|
851 |
-
|
852 |
-
// CATCH TRANSIENT for reset
|
853 |
-
if (delete_transient('xmlsf_clear_settings'))
|
854 |
-
$this->clear_settings();
|
855 |
|
856 |
-
|
857 |
-
if (delete_transient('xmlsf_flush_rewrite_rules'))
|
858 |
$this->flush_rules();
|
|
|
859 |
|
860 |
// Include the admin class file
|
861 |
include_once( XMLSF_PLUGIN_DIR . '/includes/admin.php' );
|
862 |
|
863 |
}
|
864 |
|
865 |
-
// for debugging
|
866 |
-
public function _e_usage()
|
867 |
-
{
|
868 |
-
if (defined('WP_DEBUG') && WP_DEBUG == true) {
|
869 |
-
echo '<!-- Queries executed '.get_num_queries();
|
870 |
-
if(function_exists('memory_get_peak_usage'))
|
871 |
-
echo ' | Peak memory usage '.round(memory_get_peak_usage()/1024/1024,2).'M';
|
872 |
-
echo ' -->';
|
873 |
-
}
|
874 |
-
}
|
875 |
-
|
876 |
/**
|
877 |
* CONSTRUCTOR
|
878 |
*/
|
879 |
|
880 |
-
function
|
881 |
-
|
|
|
|
|
|
|
|
|
|
|
882 |
// REQUEST main filtering function
|
883 |
add_filter('request', array($this, 'filter_request'), 1 );
|
884 |
|
@@ -895,12 +559,9 @@ class XMLSitemapFeed {
|
|
895 |
// ROBOTSTXT
|
896 |
add_action('do_robotstxt', array($this, 'robots'), 0 );
|
897 |
add_filter('robots_txt', array($this, 'robots_txt'), 0 );
|
898 |
-
|
899 |
-
// PINGING
|
900 |
-
add_action('publish_post', array($this, 'do_pings'));
|
901 |
|
902 |
// DE-ACTIVATION
|
903 |
-
register_deactivation_hook( XMLSF_PLUGIN_DIR . '/xml-sitemap.php', array($this, '
|
904 |
}
|
905 |
|
906 |
}
|
9 |
* Plugin variables
|
10 |
*/
|
11 |
|
|
|
12 |
public $base_name = 'sitemap';
|
13 |
|
|
|
14 |
public $extension = 'xml';
|
15 |
|
|
|
|
|
|
|
|
|
16 |
private $yes_mother = false;
|
17 |
|
18 |
private $defaults = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
private function build_defaults() {
|
21 |
+
|
22 |
// sitemaps
|
23 |
+
if ( '1' == get_option('blog_public') )
|
24 |
$this->defaults['sitemaps'] = array(
|
25 |
+
'sitemap' => XMLSF_NAME,
|
26 |
);
|
27 |
else
|
28 |
$this->defaults['sitemaps'] = array();
|
29 |
|
30 |
// post_types
|
31 |
+
if ( defined('XMLSF_POST_TYPE') && XMLSF_POST_TYPE != 'any' ) {
|
32 |
+
$this->defaults['post_types'] = array_map('trim',explode(',',XMLSF_POST_TYPE));
|
33 |
+
} else {
|
34 |
+
$this->defaults['post_types'] = array(
|
35 |
+
'post' => array(
|
36 |
+
'active' => '1',
|
37 |
+
'name' => 'post',
|
38 |
+
//'tags' => array('news','image','video'),
|
39 |
+
//'split_by' => 'year'
|
40 |
+
),
|
41 |
+
'page' => array(
|
42 |
+
'active' => '1',
|
43 |
+
'name' => 'page',
|
44 |
+
//'tags' => array('image','video')
|
45 |
+
)
|
46 |
+
);
|
47 |
+
foreach ( get_post_types(array('public'=>true,'_builtin'=>false),'names') as $custom )
|
48 |
+
$this->defaults['post_types'][$custom] = array(
|
49 |
+
'active' => '1',
|
50 |
+
'name' => $custom,
|
51 |
+
//'tags' => array('image','video')
|
52 |
+
);
|
53 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
// taxonomies
|
57 |
+
$this->defaults['taxonomies'] = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
// robots
|
60 |
+
$this->defaults['robots'] = '';
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
+
|
64 |
+
public function defaults($key = false) {
|
65 |
+
|
66 |
if (empty($this->defaults))
|
67 |
$this->build_defaults();
|
68 |
|
69 |
if (!$key)
|
70 |
+
return apply_filters( 'xmlsf_defaults', $this->defaults, false );
|
71 |
else
|
72 |
+
return apply_filters( 'xmlsf_defaults', $this->defaults[$key], $key );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
}
|
75 |
|
76 |
+
public function get_sitemaps() {
|
|
|
|
|
77 |
|
78 |
+
if (empty($this->defaults))
|
79 |
+
$this->build_defaults();
|
|
|
80 |
|
81 |
+
$return = get_option('xmlsf_sitemaps', $this->defaults['sitemaps']);
|
|
|
|
|
|
|
|
|
82 |
|
83 |
+
return (empty($return)) ? array() : $return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
+
public function get_post_types() {
|
|
|
|
|
87 |
|
88 |
+
if (empty($this->defaults))
|
89 |
+
$this->build_defaults();
|
|
|
90 |
|
91 |
+
$return = get_option('xmlsf_post_types', $this->defaults['post_types']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
return (empty($return)) ? array() : $return;
|
|
|
|
|
94 |
}
|
95 |
+
|
96 |
+
public function get_taxonomies() {
|
97 |
|
98 |
+
if (empty($this->defaults))
|
99 |
+
$this->build_defaults();
|
|
|
100 |
|
101 |
+
$return = get_option('xmlsf_taxonomies', $this->defaults['taxonomies']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
+
return (empty($return)) ? array() : $return;
|
|
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
public function get_robots() {
|
107 |
|
108 |
+
if (empty($this->defaults))
|
109 |
+
$this->build_defaults();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
+
return get_option('xmlsf_robots', $this->defaults['robots']);
|
112 |
+
}
|
|
|
|
|
|
|
|
|
113 |
|
114 |
+
public function get_do_tags( $type = 'post' ) {
|
115 |
+
|
116 |
+
// just return empty array for now...
|
117 |
+
return array();
|
|
|
|
|
118 |
|
119 |
+
$sitemaps = get_option('xmlsf_sitemaps', $this->defaults('sitemaps'));
|
120 |
+
$return = get_option('xmlsf_post_types', $this->defaults('post_types'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
+
// unset news tags if news sitemap is switched off
|
123 |
+
if ( isset($return[$type]['tags']['news']) && !isset($sitemaps['sitemap-news']) )
|
124 |
+
unset($return[$type]['tags']['news']);
|
125 |
|
126 |
+
return $return[$type]['tags'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
+
/**
|
131 |
+
* MULTI-LANGUAGE PLUGIN FUNCTIONS
|
132 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
+
public function get_languages() {
|
135 |
+
/* Only Polylang compatibility for now, rest is rudimentary */
|
136 |
+
global $polylang;
|
137 |
+
if ( isset($polylang) ) {
|
138 |
+
$langs = array();
|
139 |
+
foreach ($polylang->get_languages_list() as $term)
|
140 |
+
$langs[] = $term->slug;
|
141 |
+
|
142 |
+
return $langs;
|
143 |
+
}
|
144 |
|
145 |
+
global $q_config;
|
146 |
+
if (isset($q_config))
|
147 |
+
return $q_config['enabled_languages'];
|
148 |
+
// or return only current language in the array??
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
+
return array();
|
|
|
|
|
151 |
}
|
152 |
|
153 |
+
public function get_home_urls() {
|
|
|
154 |
$urls = array();
|
155 |
|
156 |
global $polylang,$q_config;
|
158 |
if ( isset($polylang) )
|
159 |
foreach ($polylang->get_languages_list() as $term)
|
160 |
$urls[] = $polylang->get_home_url($term);
|
161 |
+
elseif ( isset($q_config) )
|
162 |
+
foreach($q_config['enabled_languages'] as $language)
|
163 |
+
$urls[] = qtrans_convertURL($url,$language);
|
164 |
else
|
165 |
+
$urls[] = esc_url( trailingslashit( home_url()) );
|
166 |
|
167 |
return $urls;
|
168 |
}
|
169 |
|
170 |
+
/**
|
171 |
+
* MULTI-LANGUAGE PLUGIN FILTERS
|
172 |
+
*/
|
173 |
+
|
174 |
+
// Polylang
|
175 |
+
public function polylang($input) {
|
176 |
+
global $polylang;
|
177 |
+
$options = get_option('polylang');
|
178 |
+
|
179 |
+
if (is_array($input)) { // got an array? return one!
|
180 |
+
if ('1' == $options['force_lang'] )
|
181 |
+
foreach ( $input as $url )
|
182 |
+
foreach($polylang->get_languages_list() as $language)
|
183 |
+
$return[] = $polylang->add_language_to_link($url,$language);
|
184 |
+
else
|
185 |
+
foreach ( $input as $url )
|
186 |
+
foreach($polylang->get_languages_list() as $language)
|
187 |
+
$return[] = add_query_arg('lang', $language->slug, $url);
|
188 |
+
} else { // not an array? do nothing, Polylang does all the work :)
|
189 |
+
$return = $input;
|
190 |
}
|
191 |
+
|
192 |
+
return $return;
|
193 |
}
|
194 |
|
195 |
+
// qTranslate
|
196 |
+
public function qtranslate($input) {
|
197 |
+
global $q_config;
|
|
|
|
|
|
|
|
|
198 |
|
199 |
+
if (is_array($input)) // got an array? return one!
|
200 |
+
foreach ( $input as $url )
|
201 |
+
foreach($q_config['enabled_languages'] as $language)
|
202 |
+
$return[] = qtrans_convertURL($url,$language);
|
203 |
+
else // not an array? just convert the string.
|
204 |
+
$return = qtrans_convertURL($input);
|
205 |
+
|
206 |
+
return $return;
|
|
|
207 |
}
|
208 |
+
|
209 |
|
210 |
/**
|
211 |
* ROBOTSTXT
|
212 |
*/
|
213 |
|
214 |
// add sitemap location in robots.txt generated by WP
|
215 |
+
public function robots($output) {
|
216 |
+
|
217 |
+
$sitemaps = get_option('xmlsf_sitemaps', $this->defaults('sitemaps'));
|
218 |
|
219 |
+
echo "\n# XML & Google News Sitemap Feeds - version ".XMLSF_VERSION." (http://status301.net/wordpress-plugins/xml-sitemap-feed/)";
|
|
|
|
|
|
|
|
|
220 |
|
221 |
+
if (!empty($sitemaps))
|
222 |
+
foreach ( $sitemaps as $pretty )
|
223 |
+
echo "\nSitemap: " . trailingslashit(get_bloginfo('url')) . $pretty;
|
224 |
+
else
|
225 |
+
echo "\n# Warning: XML Sitemaps are disabled. Please see your sites XML Sitemap and Privacy settings.";
|
226 |
+
|
227 |
echo "\n\n";
|
228 |
}
|
229 |
|
230 |
// add robots.txt rules
|
231 |
+
public function robots_txt($output) {
|
232 |
+
return $output . get_option('xmlsf_robots') ;
|
|
|
233 |
}
|
234 |
|
235 |
+
/**
|
236 |
+
* DE-ACTIVATION
|
237 |
+
*/
|
238 |
+
|
239 |
+
public function deactivate() {
|
240 |
+
global $wp_rewrite;
|
241 |
+
remove_action('generate_rewrite_rules', array($this, 'rewrite_rules') );
|
242 |
+
$wp_rewrite->flush_rules();
|
243 |
+
delete_option('xmlsf_version');
|
244 |
+
foreach ( $this->defaults() as $option => $settings )
|
245 |
+
delete_option('xmlsf_'.$option);
|
246 |
+
}
|
247 |
+
|
248 |
/**
|
249 |
* REWRITES
|
250 |
*/
|
256 |
* @param string $request
|
257 |
*/
|
258 |
|
259 |
+
public function trailingslash($request) {
|
|
|
260 |
if (pathinfo($request, PATHINFO_EXTENSION)) {
|
261 |
return untrailingslashit($request);
|
262 |
}
|
269 |
* @param string $wp_rewrite
|
270 |
*/
|
271 |
|
272 |
+
public function rewrite_rules($wp_rewrite) {
|
273 |
+
|
274 |
$xmlsf_rules = array();
|
275 |
$sitemaps = $this->get_sitemaps();
|
276 |
|
280 |
if (!empty($sitemaps['sitemap'])) {
|
281 |
// home urls
|
282 |
$xmlsf_rules[ $this->base_name . '-home\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-home';
|
283 |
+
// all urls (still works but redundant)
|
284 |
+
//$xmlsf_rules[ $this->base_name . '-posttype-any\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-any';
|
285 |
+
// rule catch posts split by category (unsupported)
|
286 |
+
//$xmlsf_rules[ $this->base_name . '\.([a-z0-9_-]+)?\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap_post&category_name=$matches[1]';
|
287 |
|
288 |
// add rules for post types (can be split by month or year)
|
289 |
+
foreach ( $this->get_post_types() as $post_type ) {
|
290 |
+
$xmlsf_rules[ $this->base_name . '-posttype-' . $post_type['name'] . '\.([0-9]+)?\.?' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-posttype_' . $post_type['name'] . '&m=$matches[1]';
|
291 |
+
}
|
292 |
|
293 |
// add rules for taxonomies
|
294 |
+
foreach ( $this->get_taxonomies() as $taxonomy ) {
|
295 |
+
$xmlsf_rules[ $this->base_name . '-taxonomy-' . $taxonomy . '\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-taxonomy&taxonomy=' . $taxonomy;
|
296 |
+
}
|
297 |
}
|
298 |
|
299 |
$wp_rewrite->rules = $xmlsf_rules + $wp_rewrite->rules;
|
303 |
* REQUEST FILTER
|
304 |
*/
|
305 |
|
306 |
+
public function filter_request( $request ) {
|
|
|
307 |
if ( isset($request['feed']) && strpos($request['feed'],'sitemap') == 0 ) {
|
308 |
|
309 |
if ( $request['feed'] == 'sitemap' ) {
|
343 |
|
344 |
if ( strpos($request['feed'],'sitemap-posttype') == 0 ) {
|
345 |
foreach ( $this->get_post_types() as $post_type ) {
|
346 |
+
if ( $request['feed'] == 'sitemap-posttype_'.$post_type['name'] ) {
|
347 |
// setup actions and filters
|
348 |
+
add_action('do_feed_sitemap-posttype_'.$post_type['name'], array($this, 'load_template'), 10, 1);
|
349 |
add_filter( 'post_limits', array($this, 'filter_limits') );
|
350 |
|
351 |
// modify request parameters
|
352 |
$request['post_type'] = $post_type['name'];
|
353 |
$request['orderby'] = 'modified';
|
354 |
+
//$request['lang'] = implode( ',', $this->get_languages() );
|
355 |
+
// TODO test this with qTranslate !!
|
356 |
$request['no_found_rows'] = true;
|
357 |
$request['update_post_meta_cache'] = false;
|
358 |
$request['update_post_term_cache'] = false;
|
|
|
|
|
|
|
|
|
359 |
|
360 |
return $request;
|
361 |
}
|
362 |
}
|
363 |
}
|
364 |
|
365 |
+
if ( $request['feed'] == 'sitemap-taxonomy' ) {
|
366 |
+
// setup actions and filters
|
367 |
+
add_action('do_feed_sitemap-taxonomy', array($this, 'load_template_taxonomy'), 10, 1);
|
368 |
+
// add_filter( 'post_limits', array( $this, 'filter_limits_taxonomy' ) );
|
|
|
369 |
|
370 |
+
// modify request parameters
|
371 |
+
$request['lang'] = implode( ',', $this->get_languages() );
|
372 |
+
// TODO test this with qTranslate !!
|
|
|
|
|
|
|
|
|
373 |
|
374 |
+
$request['no_found_rows'] = true;
|
375 |
+
$request['update_post_meta_cache'] = false;
|
376 |
+
$request['update_post_term_cache'] = false;
|
377 |
+
$request['post_status'] = 'publish';
|
378 |
+
|
379 |
+
return $request;
|
380 |
}
|
381 |
+
|
382 |
+
/* Still works, but redundant
|
383 |
+
if ( $request['feed'] == 'sitemap-any' ) {
|
384 |
+
// setup actions and filters
|
385 |
+
add_action('do_feed_sitemap-any', array($this, 'load_template'), 10, 1);
|
386 |
+
add_filter('post_limits', array($this, 'filter_limits'));
|
387 |
+
|
388 |
+
// modify request parameters
|
389 |
+
$request['post_type'] = 'any';
|
390 |
+
$request['orderby'] = 'modified';
|
391 |
+
|
392 |
+
$request['no_found_rows'] = true;
|
393 |
+
$request['update_post_meta_cache'] = false;
|
394 |
+
$request['update_post_term_cache'] = false;
|
395 |
+
|
396 |
+
return $request;
|
397 |
+
}*/
|
398 |
+
|
399 |
}
|
400 |
|
401 |
return $request;
|
406 |
*/
|
407 |
|
408 |
// set up the sitemap index template
|
409 |
+
public function load_template_index() {
|
|
|
410 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap.php' );
|
411 |
}
|
412 |
|
413 |
// set up the sitemap home page(s) template
|
414 |
+
public function load_template_base() {
|
|
|
415 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-home.php' );
|
416 |
}
|
417 |
|
418 |
// set up the post types sitemap template
|
419 |
+
public function load_template() {
|
|
|
420 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-post_type.php' );
|
421 |
}
|
422 |
|
423 |
// set up the taxonomy sitemap template
|
424 |
+
public function load_template_taxonomy() {
|
|
|
425 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-taxonomy.php' );
|
426 |
}
|
427 |
|
428 |
// set up the news sitemap template
|
429 |
+
public function load_template_news() {
|
|
|
430 |
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-news.php' );
|
431 |
}
|
432 |
|
433 |
/**
|
434 |
+
* LIMITES
|
435 |
*/
|
436 |
|
437 |
// override default feed limit
|
438 |
+
public function filter_limits( $limits ) {
|
|
|
439 |
return 'LIMIT 0, 50000';
|
440 |
}
|
441 |
|
442 |
// override default feed limit for taxonomy sitemaps
|
443 |
+
public function filter_limits_taxonomy( $limits ) {
|
|
|
444 |
return 'LIMIT 0, 1';
|
445 |
}
|
446 |
|
447 |
// override default feed limit for GN
|
448 |
+
public function filter_news_limits( $limits ) {
|
|
|
449 |
return 'LIMIT 0, 1000';
|
450 |
}
|
451 |
|
452 |
// Create a new filtering function that will add a where clause to the query,
|
453 |
// used for the Google News Sitemap
|
454 |
+
public function filter_news_where( $where = '' ) {
|
|
|
455 |
// only posts from the last 2 days
|
456 |
return $where . " AND post_date > '" . date('Y-m-d H:i:s', strtotime('-49 hours')) . "'";
|
457 |
}
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
/**
|
460 |
* INITIALISATION
|
461 |
*/
|
462 |
|
463 |
+
public function plugins_loaded() {
|
464 |
+
|
465 |
// TEXT DOMAIN
|
466 |
|
467 |
if ( is_admin() ) // text domain on plugins_loaded even if it is for admin only
|
468 |
load_plugin_textdomain('xml-sitemap-feed', false, dirname(dirname(plugin_basename( __FILE__ ))) . '/languages' );
|
469 |
+
|
470 |
+
// LANGUAGE PLUGINS
|
471 |
+
|
472 |
+
// check for Polylang and add filter
|
473 |
+
global $polylang;
|
474 |
+
if (isset($polylang))
|
475 |
+
add_filter('xml_sitemap_url', array($this, 'polylang'), 99);
|
476 |
+
|
477 |
+
// check for qTranslate and add filter
|
478 |
+
elseif (defined('QT_LANGUAGE'))
|
479 |
+
add_filter('xml_sitemap_url', array($this, 'qtranslate'), 99);
|
480 |
+
|
481 |
+
// some upgrade stuffs, to be removed next version
|
482 |
+
if (delete_option('xml-sitemap-feed-version')) {
|
483 |
+
delete_option('XMLSitemapFeed_option1');
|
484 |
+
delete_option('XMLSitemapFeed_option2');
|
485 |
+
|
486 |
+
}
|
487 |
+
if (get_option('XMLSitemapFeed_robots')) {
|
488 |
+
update_option('xmlsf_robots', get_option('XMLSitemapFeed_robots'));
|
489 |
+
delete_option('XMLSitemapFeed_robots');
|
490 |
+
}
|
491 |
|
492 |
if (get_option('xmlsf_version') != XMLSF_VERSION) {
|
493 |
// rewrite rules not available on plugins_loaded
|
494 |
+
// don't flush rules from init as Polylang chokes on that
|
495 |
// just remove the rules and let WP renew them when ready...
|
496 |
delete_option('rewrite_rules');
|
497 |
|
502 |
|
503 |
}
|
504 |
|
505 |
+
private function flush_rules($hard = false) {
|
506 |
+
// don't need hard flush by default
|
507 |
+
|
508 |
if ($this->yes_mother)
|
509 |
return;
|
510 |
|
511 |
global $wp_rewrite;
|
|
|
512 |
$wp_rewrite->flush_rules($hard);
|
513 |
|
514 |
$this->yes_mother = true;
|
515 |
}
|
516 |
|
517 |
+
public function admin_init() {
|
518 |
+
|
519 |
+
// UPGRADE RULES after plugin upgrade
|
520 |
+
// CATCH TRANSIENT for flushing rewrite rules after the sitemaps setting has changed
|
521 |
if (get_option('xmlsf_version') != XMLSF_VERSION) {
|
522 |
$this->flush_rules();
|
523 |
update_option('xmlsf_version', XMLSF_VERSION);
|
524 |
+
} else
|
|
|
|
|
|
|
|
|
525 |
|
526 |
+
if (delete_transient('xmlsf_flush_rewrite_rules')) {
|
|
|
527 |
$this->flush_rules();
|
528 |
+
}
|
529 |
|
530 |
// Include the admin class file
|
531 |
include_once( XMLSF_PLUGIN_DIR . '/includes/admin.php' );
|
532 |
|
533 |
}
|
534 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
/**
|
536 |
* CONSTRUCTOR
|
537 |
*/
|
538 |
|
539 |
+
function XMLSitemapFeed() {
|
540 |
+
//constructor in php4
|
541 |
+
$this->__construct(); // just call the php5 one.
|
542 |
+
}
|
543 |
+
|
544 |
+
function __construct() {
|
545 |
+
|
546 |
// REQUEST main filtering function
|
547 |
add_filter('request', array($this, 'filter_request'), 1 );
|
548 |
|
559 |
// ROBOTSTXT
|
560 |
add_action('do_robotstxt', array($this, 'robots'), 0 );
|
561 |
add_filter('robots_txt', array($this, 'robots_txt'), 0 );
|
|
|
|
|
|
|
562 |
|
563 |
// DE-ACTIVATION
|
564 |
+
register_deactivation_hook( XMLSF_PLUGIN_DIR . '/xml-sitemap.php', array($this, 'deactivate') );
|
565 |
}
|
566 |
|
567 |
}
|
includes/feed-sitemap-home.php
CHANGED
@@ -21,26 +21,15 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
|
|
21 |
';
|
22 |
|
23 |
global $xmlsf;
|
24 |
-
$lastmodified = get_lastdate( 'gmt' ); // TODO take language into account !! Dont't use get_lastdate but pull one post for each language instead?
|
25 |
-
$lastactivityage = ( gmdate('U') - mysql2date( 'U', $lastmodified ) );
|
26 |
foreach ( $xmlsf->get_home_urls() as $url ) {
|
27 |
?>
|
28 |
<url>
|
29 |
<loc><?php echo esc_url( $url ); ?></loc>
|
30 |
-
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00',
|
31 |
-
<changefreq
|
32 |
-
if ( ($lastactivityage/86400) < 1 ) { // last activity less than 1 day old
|
33 |
-
echo 'hourly';
|
34 |
-
} else if ( ($lastactivityage/86400) < 7 ) { // last activity less than 1 week old
|
35 |
-
echo 'daily';
|
36 |
-
} else { // over a week old
|
37 |
-
echo 'weekly';
|
38 |
-
}
|
39 |
-
?></changefreq>
|
40 |
<priority>1.0</priority>
|
41 |
</url>
|
42 |
<?php
|
43 |
}
|
44 |
?>
|
45 |
</urlset>
|
46 |
-
<?php $xmlsf->_e_usage(); ?>
|
21 |
';
|
22 |
|
23 |
global $xmlsf;
|
|
|
|
|
24 |
foreach ( $xmlsf->get_home_urls() as $url ) {
|
25 |
?>
|
26 |
<url>
|
27 |
<loc><?php echo esc_url( $url ); ?></loc>
|
28 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastdate( 'gmt' ), false); ?></lastmod>
|
29 |
+
<changefreq>hourly</changefreq>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
<priority>1.0</priority>
|
31 |
</url>
|
32 |
<?php
|
33 |
}
|
34 |
?>
|
35 |
</urlset>
|
|
includes/feed-sitemap-news.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
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 |
|
@@ -114,8 +114,6 @@ if ( have_posts() ) :
|
|
114 |
<?php
|
115 |
endwhile;
|
116 |
else :
|
117 |
-
// TODO replace link to home with the last post even if it's older than 2 days...
|
118 |
-
|
119 |
$lastmodified_gmt = get_lastmodified('GMT'); // last posts or page modified date
|
120 |
?>
|
121 |
<url>
|
@@ -143,4 +141,3 @@ endif;
|
|
143 |
// http://www.google.com/support/news_pub/bin/answer.py?hl=nl&answer=74289
|
144 |
|
145 |
?></urlset>
|
146 |
-
<?php $xmlsf->_e_usage(); ?>
|
4 |
*
|
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 |
|
114 |
<?php
|
115 |
endwhile;
|
116 |
else :
|
|
|
|
|
117 |
$lastmodified_gmt = get_lastmodified('GMT'); // last posts or page modified date
|
118 |
?>
|
119 |
<url>
|
141 |
// http://www.google.com/support/news_pub/bin/answer.py?hl=nl&answer=74289
|
142 |
|
143 |
?></urlset>
|
|
includes/feed-sitemap-post_type.php
CHANGED
@@ -8,6 +8,11 @@
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
11 |
echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
|
12 |
<?xml-stylesheet type="text/xsl" href="' . plugins_url('xsl/sitemap.xsl.php',__FILE__) . '?ver=' . XMLSF_VERSION . '"?>
|
13 |
<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->
|
@@ -15,40 +20,77 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
|
|
15 |
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
|
16 |
<!-- generator-version="' . XMLSF_VERSION . '" -->
|
17 |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" ';
|
18 |
-
|
19 |
-
global $xmlsf;
|
20 |
-
$post_type = get_query_var('post_type');
|
21 |
-
|
22 |
-
foreach ( $xmlsf->do_tags($post_type) as $tag => $setting )
|
23 |
-
$$tag = $setting;
|
24 |
-
|
25 |
-
echo !empty($news) ? '
|
26 |
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" ' : '';
|
27 |
-
echo !empty($image) ? '
|
28 |
-
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" ' : '';
|
29 |
echo '
|
30 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
31 |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
32 |
-
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd';
|
33 |
-
echo
|
34 |
http://www.google.com/schemas/sitemap-news/0.9
|
35 |
-
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd' : '';
|
36 |
-
echo !empty($image) ? '
|
37 |
-
http://www.google.com/schemas/sitemap-image/1.1
|
38 |
-
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd' : '';
|
39 |
echo '">
|
40 |
';
|
41 |
|
42 |
-
//
|
43 |
-
|
44 |
-
//
|
45 |
-
//
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
// loop away!
|
54 |
if ( have_posts() ) :
|
@@ -57,30 +99,77 @@ if ( have_posts() ) :
|
|
57 |
|
58 |
// check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
|
59 |
// or if page is in the exclusion list (like front pages)
|
60 |
-
|
61 |
-
$exclude = get_post_meta( $post->ID, '_xmlsf_exclude', true );
|
62 |
-
if ( !empty($exclude) || !preg_match('/^' . preg_quote(home_url(), '/') . '/i', get_permalink()) || in_array($post->ID, $excluded) )
|
63 |
continue;
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
?>
|
67 |
<url>
|
68 |
<loc><?php the_permalink_rss(); ?></loc>
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
<?php
|
73 |
-
if ( !empty($news) && $post->post_date > date('Y-m-d H:i:s', strtotime('-49 hours') ) ) : ?>
|
74 |
<news:news>
|
75 |
<news:publication>
|
76 |
<news:name><?php
|
77 |
-
|
78 |
-
echo apply_filters('the_title_rss', XMLSF_GOOGLE_NEWS_NAME);
|
79 |
-
else
|
80 |
-
echo bloginfo_rss('name'); ?></news:name>
|
81 |
<news:language><?php
|
82 |
$lang = reset(get_the_terms($post->ID,'language'));
|
83 |
-
|
|
|
|
|
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>
|
@@ -94,9 +183,9 @@ if ( !empty($news) && $post->post_date > date('Y-m-d H:i:s', strtotime('-49 hour
|
|
94 |
$do_comma = true;
|
95 |
} ?></news:keywords>
|
96 |
<?php
|
97 |
-
// TODO: create the new taxonomy "Google News Genre" with some genres preset
|
98 |
if ( taxonomy_exists('gn_genre') && get_the_terms($post->ID,'gn_genre') ) {
|
99 |
-
?>
|
100 |
<news:genres><?php
|
101 |
$do_comma = false;
|
102 |
foreach(get_the_terms($post->ID,'gn_genre') as $key) {
|
@@ -106,23 +195,28 @@ if ( !empty($news) && $post->post_date > date('Y-m-d H:i:s', strtotime('-49 hour
|
|
106 |
} ?></news:genres>
|
107 |
<?php
|
108 |
}
|
109 |
-
?>
|
110 |
-
</news:news>
|
111 |
-
<?php
|
112 |
-
endif;
|
113 |
-
if ( !empty($image) && $xmlsf->get_images() ) :
|
114 |
-
foreach ( $xmlsf->get_images() as $loc ) {
|
115 |
?>
|
116 |
-
|
117 |
-
<image:loc><?php echo $loc; ?></image:loc>
|
118 |
-
</image:image>
|
119 |
<?php
|
120 |
-
|
121 |
-
|
122 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
</url>
|
124 |
<?php
|
125 |
endwhile;
|
126 |
endif;
|
127 |
?></urlset>
|
128 |
-
<?php $xmlsf->_e_usage(); ?>
|
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 |
|
11 |
+
global $xmlsf;
|
12 |
+
$post_type = get_query_var('post_type');
|
13 |
+
foreach ( (array)$xmlsf->get_do_tags($post_type) as $tag )
|
14 |
+
$$tag = true;
|
15 |
+
|
16 |
echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>
|
17 |
<?xml-stylesheet type="text/xsl" href="' . plugins_url('xsl/sitemap.xsl.php',__FILE__) . '?ver=' . XMLSF_VERSION . '"?>
|
18 |
<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->
|
20 |
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
|
21 |
<!-- generator-version="' . XMLSF_VERSION . '" -->
|
22 |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" ';
|
23 |
+
echo $do_news ? '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" ' : '';
|
|
|
|
|
25 |
echo '
|
26 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
27 |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
28 |
+
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd ';
|
29 |
+
echo $do_news ? '
|
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 '">
|
33 |
';
|
34 |
|
35 |
+
// PRESETS are changable -- please read comments:
|
36 |
+
|
37 |
+
$max_priority = 0.9; // Maximum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
38 |
+
$min_priority = 0; // Minimum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
39 |
+
// NOTE: Changing these values will influence each URL's priority. Priority values are taken by
|
40 |
+
// search engines to represent RELATIVE priority within the site domain. Forcing all URLs
|
41 |
+
// to a priority of above 0.5 or even fixing them all to 1.0 - for example - is useless.
|
42 |
+
$frontpage_priority = 1.0; // Your front page priority, usually the same as max priority but if you have any reason
|
43 |
+
// to change it, please be my guest; set to any other value between 0 and 1.
|
44 |
+
|
45 |
+
$level_weight = 0.1; // Makes a sub-page gain or loose priority for each level; set to any other value between 0 and 1.
|
46 |
+
$month_weight = -0.1; // Fall-back value normally ignored by automatic priority calculation, which
|
47 |
+
// makes a post loose 10% of priority monthly; set to any other value between 0 and 1.
|
48 |
+
$firstcomment_bonus = 0.1;
|
49 |
+
|
50 |
+
// EDITING below here is NOT ADVISED!
|
51 |
+
|
52 |
+
// setup site variables
|
53 |
+
$_post_count = wp_count_posts('post');
|
54 |
+
$_page_count = wp_count_posts('page');
|
55 |
+
$_totalcommentcount = wp_count_comments();
|
56 |
+
|
57 |
+
$lastmodified_gmt = get_lastmodified('GMT'); // last posts or page modified date
|
58 |
+
$lastmodified = mysql2date('U',$lastmodified_gmt); // last posts or page modified date in Unix seconds
|
59 |
+
$firstdate = mysql2date('U',get_firstdate('GMT')); // uses new get_firstdate() function defined in xml-sitemap/hacks.php !
|
60 |
+
|
61 |
+
// calculated presets
|
62 |
+
if ($_totalcommentcount->approved > 0) {
|
63 |
+
$average_commentcount = $_totalcommentcount->approved/($_post_count->publish + $_page_count->publish);
|
64 |
+
//$comment_weight = $average_commentcount / $_totalcommentcount->approved;
|
65 |
+
} else {
|
66 |
+
//$comment_weight = 0;
|
67 |
+
$average_commentcount = 0;
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( $_post_count->publish > $_page_count->publish ) { // emphasis on posts (blog)
|
71 |
+
$blogbonus = 0.4;
|
72 |
+
$sitebonus = 0;
|
73 |
+
} elseif ( $_post_count->publish==0 ) { // only pages (you're kidding... really?? old style site)
|
74 |
+
$blogbonus = 0;
|
75 |
+
$sitebonus = 0.4;
|
76 |
+
} else { // emphasis on pages (site)
|
77 |
+
$blogbonus = 0;
|
78 |
+
$sitebonus = 0.2;
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( $lastmodified > $firstdate ) // valid blog age found ?
|
82 |
+
$age_weight = ($blogbonus - $min_priority) / ($firstdate - $lastmodified); // calculate relative age weight
|
83 |
+
else
|
84 |
+
$age_weight = $month_weight / 2629744 ; // if not ? malus per month (that's a month in seconds)
|
85 |
|
86 |
+
$exclude = array();
|
87 |
+
if ( $post_type == 'page' ) {
|
88 |
+
$exclude[] = get_option('page_on_front');
|
89 |
+
if ( !empty($exclude) && function_exists('pll_get_post') )
|
90 |
+
foreach ( $xmlsf->get_languages() as $lang )
|
91 |
+
$exclude[] = pll_get_post( $exclude[0], $lang );
|
92 |
+
// TODO : find a better way to exclude all Polylang language front pages : is_front_page() in any language !
|
93 |
+
}
|
94 |
|
95 |
// loop away!
|
96 |
if ( have_posts() ) :
|
99 |
|
100 |
// check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
|
101 |
// or if page is in the exclusion list (like front pages)
|
102 |
+
if ( !preg_match('/^' . preg_quote(home_url(), '/') . '/i', get_permalink()) || ( $post_type == 'page' && in_array($post->ID, $exclude) ) )
|
|
|
|
|
103 |
continue;
|
104 |
+
|
105 |
+
$thispostmodified_gmt = $post->post_modified_gmt; // post GMT timestamp
|
106 |
+
$thispostmodified = mysql2date('U',$thispostmodified_gmt); // post Unix timestamp
|
107 |
+
$lastcomment = array();
|
108 |
+
$priority = 0;
|
109 |
|
110 |
+
if ($post->comment_count && $post->comment_count > 0) {
|
111 |
+
$lastcomment = get_comments( array(
|
112 |
+
'status' => 'approve',
|
113 |
+
'$number' => 1,
|
114 |
+
'post_id' => $post->ID,
|
115 |
+
) );
|
116 |
+
$lastcommentsdate = mysql2date('U',$lastcomment[0]->comment_date_gmt); // last comment timestamp
|
117 |
+
if ( $lastcommentsdate > $thispostmodified ) {
|
118 |
+
$thispostmodified = $lastcommentsdate; // replace post with comment Unix timestamp
|
119 |
+
$thispostmodified_gmt = $lastcomment[0]->comment_date_gmt; // and replace modified GMT timestamp
|
120 |
+
}
|
121 |
+
|
122 |
+
if ($_totalcommentcount->approved > 0)
|
123 |
+
$priority = ( $post->comment_count / ( ( $_totalcommentcount->approved / 2 ) - $average_commentcount ) ) + $firstcomment_bonus;
|
124 |
+
else
|
125 |
+
$priority = ( $min_priority + $max_priority ) / 2 ;
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
if($post->post_type == "page") {
|
130 |
+
|
131 |
+
if (!isset($post->ancestors)) {
|
132 |
+
// could use get_post_ancestors($post) but that creates an
|
133 |
+
// extra db query per sub-page so better do it ourselves...
|
134 |
+
$page_obj = $post;
|
135 |
+
$ancestors = array();
|
136 |
+
while($page_obj->post_parent!=0) {
|
137 |
+
$page_obj = get_page($page_obj->post_parent);
|
138 |
+
$ancestors[] = $page_obj->ID;
|
139 |
+
}
|
140 |
+
} else {
|
141 |
+
$ancestors = $post->ancestors;
|
142 |
+
}
|
143 |
+
|
144 |
+
$priority += (count($ancestors) * $level_weight) + $sitebonus;
|
145 |
+
} else {
|
146 |
+
if(is_sticky($post->ID))
|
147 |
+
$priority = $max_priority;
|
148 |
+
else
|
149 |
+
$priority += (($lastmodified - $thispostmodified) * $age_weight) + $blogbonus;
|
150 |
+
}
|
151 |
+
|
152 |
+
|
153 |
+
$lastactivityage = (gmdate('U') - $thispostmodified); // post age
|
154 |
+
|
155 |
+
// trim priority
|
156 |
+
$priority = ($priority > $max_priority) ? $max_priority : $priority;
|
157 |
+
$priority = ($priority < $min_priority) ? $min_priority : $priority;
|
158 |
?>
|
159 |
<url>
|
160 |
<loc><?php the_permalink_rss(); ?></loc>
|
161 |
+
<?php
|
162 |
+
// Google News tags
|
163 |
+
if ( $news && $post->post_date > date('Y-m-d H:i:s', strtotime('-49 hours') ) ) { ?>
|
|
|
|
|
164 |
<news:news>
|
165 |
<news:publication>
|
166 |
<news:name><?php
|
167 |
+
echo ( defined('XMLSF_GOOGLE_NEWS_TITLE') ) ? apply_filters('the_title_rss', XMLSF_GOOGLE_NEWS_TITLE) : bloginfo_rss('name'); ?></news:name>
|
|
|
|
|
|
|
168 |
<news:language><?php
|
169 |
$lang = reset(get_the_terms($post->ID,'language'));
|
170 |
+
// bloginfo_rss('language') returns improper format
|
171 |
+
// so using explode but that breaks chinese :°(
|
172 |
+
echo ( is_object($lang) ) ? $lang->slug : reset(explode('-', get_bloginfo_rss('language'))); ?></news:language>
|
173 |
</news:publication>
|
174 |
<news:publication_date><?php
|
175 |
echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date>
|
183 |
$do_comma = true;
|
184 |
} ?></news:keywords>
|
185 |
<?php
|
186 |
+
// TODO: create the new taxonomy "Google News Genre" with some genres preset
|
187 |
if ( taxonomy_exists('gn_genre') && get_the_terms($post->ID,'gn_genre') ) {
|
188 |
+
?>
|
189 |
<news:genres><?php
|
190 |
$do_comma = false;
|
191 |
foreach(get_the_terms($post->ID,'gn_genre') as $key) {
|
195 |
} ?></news:genres>
|
196 |
<?php
|
197 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
?>
|
199 |
+
</news:news>
|
|
|
|
|
200 |
<?php
|
201 |
+
// and lastly, set the priority to news priority level
|
202 |
+
$priority = $max_priority;
|
203 |
+
} ?>
|
204 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $thispostmodified_gmt, false); ?></lastmod>
|
205 |
+
<changefreq><?php
|
206 |
+
if(($lastactivityage/86400) < 1) { // last activity less than 1 day old
|
207 |
+
echo 'hourly';
|
208 |
+
} else if(($lastactivityage/86400) < 7) { // last activity less than 1 week old
|
209 |
+
echo 'daily';
|
210 |
+
} else if(($lastactivityage/86400) < 30) { // last activity between 1 week and one month old
|
211 |
+
echo 'weekly';
|
212 |
+
} else if(($lastactivityage/86400) < 365) { // last activity between 1 month and 1 year old
|
213 |
+
echo 'monthly';
|
214 |
+
} else {
|
215 |
+
echo 'yearly'; // never
|
216 |
+
} ?></changefreq>
|
217 |
+
<priority><?php echo number_format($priority,1) ?></priority>
|
218 |
</url>
|
219 |
<?php
|
220 |
endwhile;
|
221 |
endif;
|
222 |
?></urlset>
|
|
includes/feed-sitemap-taxonomy.php
CHANGED
@@ -6,6 +6,7 @@
|
|
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 |
|
11 |
echo '<?xml version="1.0" encoding="'.get_bloginfo('charset', 'UTF-8').'"?>
|
@@ -14,16 +15,39 @@ echo '<?xml version="1.0" encoding="'.get_bloginfo('charset', 'UTF-8').'"?>
|
|
14 |
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
15 |
<!-- generator-url="http://status310.net/wordpress-plugins/xml-sitemap-feed/" -->
|
16 |
<!-- generator-version="'.XMLSF_VERSION.'" -->
|
|
|
17 |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
18 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
19 |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
20 |
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
21 |
';
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
$taxonomy = get_query_var('taxonomy');
|
26 |
$lang = get_query_var('lang');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
$terms = get_terms( $taxonomy, array(
|
29 |
'orderby' => 'count',
|
@@ -37,16 +61,55 @@ if ( $terms ) :
|
|
37 |
|
38 |
foreach ( $terms as $term ) :
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
?>
|
41 |
<url>
|
42 |
<loc><?php echo get_term_link( $term ); ?></loc>
|
43 |
-
<priority><?php echo $
|
44 |
-
<lastmod><?php echo
|
45 |
-
<changefreq><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</url>
|
47 |
<?php
|
48 |
endforeach;
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
endif;
|
50 |
|
51 |
?></urlset>
|
52 |
-
<?php $xmlsf->_e_usage(); ?>
|
6 |
*/
|
7 |
|
8 |
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
|
9 |
+
// TODO test if we can do without it
|
10 |
header('Content-Type: text/xml; charset=' . get_bloginfo('charset', 'UTF-8'), true);
|
11 |
|
12 |
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 |
+
|
19 |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
20 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
21 |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
22 |
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
23 |
';
|
24 |
|
25 |
+
// PRESETS are changable -- please read comments:
|
26 |
+
|
27 |
+
$max_priority = 0.7; // Maximum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
28 |
+
$min_priority = 0.2; // Minimum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
29 |
+
// NOTE: Changing these values will influence each URL's priority. Priority values are taken by
|
30 |
+
// search engines to represent RELATIVE priority within the site domain. Forcing all URLs
|
31 |
+
// to a priority of above 0.5 or even fixing them all to 1.0 - for example - is useless.
|
32 |
+
|
33 |
+
$level_weight = 0.1; // TODO Makes a sub-term gain or loose priority for each level; set to any other value between 0 and 1.
|
34 |
|
35 |
$taxonomy = get_query_var('taxonomy');
|
36 |
$lang = get_query_var('lang');
|
37 |
+
echo "<!-- taxonomy: $taxonomy -->";
|
38 |
+
$tax_obj = get_taxonomy($taxonomy);
|
39 |
+
foreach ( $tax_obj->object_type as $post_type) {
|
40 |
+
echo "<!-- taxonomy post type: $post_type -->
|
41 |
+
";
|
42 |
+
$_post_count = wp_count_posts($post_type);
|
43 |
+
$postcount += $_post_count->publish;
|
44 |
+
}
|
45 |
+
|
46 |
+
//$_terms_count = wp_count_terms(get_query_var('taxonomy'));
|
47 |
+
//$average_count = $_post_count->publish / $_terms_count;
|
48 |
+
|
49 |
+
// Polylang solution on http://wordpress.org/support/topic/query-all-language-terms?replies=6#post-3415389
|
50 |
+
//global $xmlsf;
|
51 |
|
52 |
$terms = get_terms( $taxonomy, array(
|
53 |
'orderby' => 'count',
|
61 |
|
62 |
foreach ( $terms as $term ) :
|
63 |
|
64 |
+
// calculate priority based on number of posts
|
65 |
+
// or maybe take child taxonomy terms into account.?
|
66 |
+
|
67 |
+
$priority = $min_priority + ( $term->count / ( $postcount / 2 ) );
|
68 |
+
$priority = ($priority > $max_priority) ? $max_priority : $priority;
|
69 |
+
|
70 |
+
// get the latest post in this taxonomy item, to use its post_date as lastmod
|
71 |
+
$posts = get_posts ( array(
|
72 |
+
'numberposts' => 1,
|
73 |
+
'no_found_rows' => true,
|
74 |
+
'update_post_meta_cache' => false,
|
75 |
+
'update_post_term_cache' => false,
|
76 |
+
'update_cache' => false,
|
77 |
+
'tax_query' => array(
|
78 |
+
array(
|
79 |
+
'taxonomy' => $term->taxonomy,
|
80 |
+
'field' => 'slug',
|
81 |
+
'terms' => $term->slug
|
82 |
+
)
|
83 |
+
)
|
84 |
+
)
|
85 |
+
);
|
86 |
?>
|
87 |
<url>
|
88 |
<loc><?php echo get_term_link( $term ); ?></loc>
|
89 |
+
<priority><?php echo number_format($priority,1) ?></priority>
|
90 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $posts[0]->post_date_gmt, false); ?></lastmod>
|
91 |
+
<changefreq><?php
|
92 |
+
$lastactivityage = (gmdate('U') - mysql2date('U', $posts[0]->post_date_gmt));
|
93 |
+
if(($lastactivityage/86400) < 1) { // last activity less than 1 day old
|
94 |
+
echo 'hourly';
|
95 |
+
} else if(($lastactivityage/86400) < 7) { // last activity less than 1 week old
|
96 |
+
echo 'daily';
|
97 |
+
} else if(($lastactivityage/86400) < 30) { // last activity between 1 week and one month old
|
98 |
+
echo 'weekly';
|
99 |
+
} else if(($lastactivityage/86400) < 365) { // last activity between 1 month and 1 year old
|
100 |
+
echo 'monthly';
|
101 |
+
} else {
|
102 |
+
echo 'yearly';
|
103 |
+
} ?></changefreq>
|
104 |
</url>
|
105 |
<?php
|
106 |
endforeach;
|
107 |
+
else :
|
108 |
+
?>
|
109 |
+
<url>
|
110 |
+
<loc><?php echo esc_url( trailingslashit(home_url()) ); ?></loc>
|
111 |
+
</url>
|
112 |
+
<?php
|
113 |
endif;
|
114 |
|
115 |
?></urlset>
|
|
includes/feed-sitemap.php
CHANGED
@@ -21,37 +21,63 @@ echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?><?xml-styleshe
|
|
21 |
|
22 |
global $xmlsf;
|
23 |
?>
|
|
|
24 |
<sitemap>
|
25 |
-
<loc><?php
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</sitemap>
|
|
|
28 |
<?php
|
29 |
// add rules for custom public post types
|
30 |
-
foreach ( $xmlsf->
|
31 |
-
|
32 |
-
if (
|
33 |
-
$archive = $post_type['archive'];
|
34 |
-
else
|
35 |
-
$archive = '';
|
36 |
-
foreach ( $xmlsf->get_archives($post_type['name'],$archive) as $m => $url ) {
|
37 |
?>
|
38 |
<sitemap>
|
39 |
-
<loc><?php
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</sitemap>
|
42 |
<?php
|
43 |
}
|
44 |
}
|
45 |
?>
|
|
|
46 |
<?php
|
47 |
// add rules for custom public post taxonomies
|
48 |
foreach ( $xmlsf->get_taxonomies() as $taxonomy ) {
|
49 |
-
|
50 |
if ( wp_count_terms( $taxonomy ) > 0 ) {
|
51 |
?>
|
52 |
<sitemap>
|
53 |
-
<loc><?php
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
</sitemap>
|
56 |
<?php
|
57 |
// TODO add lastmod ?
|
@@ -59,4 +85,3 @@ foreach ( $xmlsf->get_taxonomies() as $taxonomy ) {
|
|
59 |
}
|
60 |
|
61 |
?></sitemapindex>
|
62 |
-
<?php $xmlsf->_e_usage(); ?>
|
21 |
|
22 |
global $xmlsf;
|
23 |
?>
|
24 |
+
<!-- home page(s) -->
|
25 |
<sitemap>
|
26 |
+
<loc><?php
|
27 |
+
// hook for filter 'xml_sitemap_url' provides a string here and MUST get a string returned
|
28 |
+
$url = apply_filters( 'xml_sitemap_url', trailingslashit(home_url()) );
|
29 |
+
if ( is_string($url) )
|
30 |
+
echo esc_url( $url );
|
31 |
+
else
|
32 |
+
echo esc_url( trailingslashit(home_url()) );
|
33 |
+
if (''==get_option('permalink_structure'))
|
34 |
+
echo '?feed='.$xmlsf->base_name.'-home';
|
35 |
+
else
|
36 |
+
echo $xmlsf->base_name.'-home.'.$xmlsf->extension; ?></loc>
|
37 |
</sitemap>
|
38 |
+
<!-- post types -->
|
39 |
<?php
|
40 |
// add rules for custom public post types
|
41 |
+
foreach ( $xmlsf->get_post_types() as $post_type ) {
|
42 |
+
$count = wp_count_posts( $post_type['name'] );
|
43 |
+
if ( $count->publish > 0 && isset($post_type['active']) ) {
|
|
|
|
|
|
|
|
|
44 |
?>
|
45 |
<sitemap>
|
46 |
+
<loc><?php
|
47 |
+
// hook for filter 'xml_sitemap_url' provides a string here and MUST get a string returned
|
48 |
+
$url = apply_filters( 'xml_sitemap_url', trailingslashit(home_url()) );
|
49 |
+
if ( is_string($url) )
|
50 |
+
echo esc_url( $url );
|
51 |
+
else
|
52 |
+
echo esc_url( trailingslashit(home_url()) );
|
53 |
+
if (''==get_option('permalink_structure'))
|
54 |
+
echo '?feed='.$xmlsf->base_name.'-posttype_'.$post_type['name'];
|
55 |
+
else
|
56 |
+
echo $xmlsf->base_name.'-posttype-'.$post_type['name'].'.'.$xmlsf->extension; ?></loc>
|
57 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastdate( 'gmt', $post_type['name'] ), false); ?></lastmod>
|
58 |
</sitemap>
|
59 |
<?php
|
60 |
}
|
61 |
}
|
62 |
?>
|
63 |
+
<!-- taxonomy types -->
|
64 |
<?php
|
65 |
// add rules for custom public post taxonomies
|
66 |
foreach ( $xmlsf->get_taxonomies() as $taxonomy ) {
|
|
|
67 |
if ( wp_count_terms( $taxonomy ) > 0 ) {
|
68 |
?>
|
69 |
<sitemap>
|
70 |
+
<loc><?php
|
71 |
+
// hook for filter 'xml_sitemap_url' provides a string here and MUST get a string returned
|
72 |
+
$url = apply_filters( 'xml_sitemap_url', trailingslashit(home_url()) );
|
73 |
+
if ( is_string($url) )
|
74 |
+
echo esc_url( $url );
|
75 |
+
else
|
76 |
+
echo esc_url( trailingslashit(home_url()) );
|
77 |
+
if (''==get_option('permalink_structure'))
|
78 |
+
echo '?feed='.$xmlsf->base_name.'-taxonomy&taxonomy='.$taxonomy;
|
79 |
+
else
|
80 |
+
echo $xmlsf->base_name.'-taxonomy-'.$taxonomy.'.'.$xmlsf->extension; ?></loc>
|
81 |
</sitemap>
|
82 |
<?php
|
83 |
// TODO add lastmod ?
|
85 |
}
|
86 |
|
87 |
?></sitemapindex>
|
|
includes/xsl/sitemap-index.xsl.php
CHANGED
@@ -27,7 +27,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>
|
|
27 |
</div>
|
28 |
<div id="content">
|
29 |
<table cellpadding="5">
|
30 |
-
<tr
|
31 |
<th>#</th>
|
32 |
<th>XML Sitemap</th>
|
33 |
<th>Last Changed</th>
|
27 |
</div>
|
28 |
<div id="content">
|
29 |
<table cellpadding="5">
|
30 |
+
<tr style="border-bottom:1px black solid;">
|
31 |
<th>#</th>
|
32 |
<th>XML Sitemap</th>
|
33 |
<th>Last Changed</th>
|
includes/xsl/sitemap-news.xsl.php
CHANGED
@@ -27,7 +27,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>
|
|
27 |
</div>
|
28 |
<div id="content">
|
29 |
<table cellpadding="5">
|
30 |
-
<tr
|
31 |
<th>#</th>
|
32 |
<th>URL</th>
|
33 |
</tr>
|
27 |
</div>
|
28 |
<div id="content">
|
29 |
<table cellpadding="5">
|
30 |
+
<tr style="border-bottom:1px black solid;">
|
31 |
<th>#</th>
|
32 |
<th>URL</th>
|
33 |
</tr>
|
includes/xsl/sitemap.xsl.php
CHANGED
@@ -25,7 +25,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
|
|
25 |
</div>
|
26 |
<div id="content">
|
27 |
<table cellpadding="5">
|
28 |
-
<tr
|
29 |
<th>#</th>
|
30 |
<th>URL</th>
|
31 |
<th>Priority</th>
|
25 |
</div>
|
26 |
<div id="content">
|
27 |
<table cellpadding="5">
|
28 |
+
<tr style="border-bottom:1px black solid;">
|
29 |
<th>#</th>
|
30 |
<th>URL</th>
|
31 |
<th>Priority</th>
|
languages/instructions.txt
CHANGED
@@ -4,24 +4,20 @@
|
|
4 |
|
5 |
1. Install PoEdit on your computer.
|
6 |
|
7 |
-
2.
|
8 |
|
9 |
-
3.
|
10 |
|
11 |
-
4.
|
12 |
|
13 |
-
5. Go to
|
14 |
|
15 |
-
6.
|
16 |
|
17 |
-
7.
|
18 |
|
19 |
-
8.
|
20 |
|
21 |
-
9.
|
22 |
-
|
23 |
-
10. Upload the automatically created xml-sitemap-feed-xx_XX.mo database file (where xx_XX should now be your language and country code) to the plugins /languages/ directory on your WordPress site.
|
24 |
-
|
25 |
-
11. After verifying the translations work on your site, send the .mo file and, if you're willing to share it, your original .po file to ravanhagen@gmail.com and don't forget to tell me how and with what link you would like to be mentioned in the credits!
|
26 |
|
27 |
Thanks for sharing your translation :)
|
4 |
|
5 |
1. Install PoEdit on your computer.
|
6 |
|
7 |
+
2. Open the template translation database xml-sitemap-xx_XX.po in this plugins /languages/ directory with PoEdit.
|
8 |
|
9 |
+
3. Go to Edit > Preferences and on the tab Editor check the option to compile a .mo database on save automatically. Close with OK.
|
10 |
|
11 |
+
4. Go to Catalog > Settings and set your name, e-mail address, language and country. Close with OK.
|
12 |
|
13 |
+
5. Go to Catalog > Update from POT-file and select the main xml-sitemap-feed.pot file. Then accept all new and removed translation strings with OK.
|
14 |
|
15 |
+
6. Now go ahead and start translating all the texts listed in PoEdit.
|
16 |
|
17 |
+
7. When done, go to File > Save as... and replace the xx_XX in the file name with the appropriate language and country code for your translation. Leave the rest of the file name the same and Save.
|
18 |
|
19 |
+
8. Upload the automatically created xml-sitemap-feed-xx_XX.mo database file (where xx_XX should now be your language and country code) to the plugins /languages/ directory on your WordPress site.
|
20 |
|
21 |
+
9. After verifying the translations work on your site, send the .mo file to ravanhagen@gmail.com and don't forget to tell me how and with what link you would like to be mentioned in the credits!
|
|
|
|
|
|
|
|
|
22 |
|
23 |
Thanks for sharing your translation :)
|
languages/xml-sitemap-feed-fr_FR.mo
CHANGED
Binary file
|
languages/xml-sitemap-feed-fr_FR.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-
|
6 |
-
"PO-Revision-Date: 2013-
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
@@ -16,245 +16,65 @@ msgstr ""
|
|
16 |
"X-Poedit-Country: FRANCE\n"
|
17 |
|
18 |
#: ../includes/admin.php:15
|
19 |
-
|
20 |
-
|
21 |
-
msgstr "Faites un don pour aider le développement et support de l'extension %s. Merci !"
|
22 |
|
23 |
#: ../includes/admin.php:15
|
24 |
-
|
25 |
-
|
26 |
-
msgstr "Flux XML Sitemap & Google News"
|
27 |
|
28 |
#: ../includes/admin.php:15
|
29 |
#, php-format
|
30 |
-
msgid "
|
31 |
-
msgstr "
|
32 |
-
|
33 |
-
#: ../includes/admin.php:16
|
34 |
-
#, php-format
|
35 |
-
msgid "XML Sitemaps will be disabled automatically when you check the option %1$s at %2$s above."
|
36 |
-
msgstr "Les XML Sitemaps seront désactivés automatiquement si l'option %1$s sous %2$s en haut est activée."
|
37 |
|
38 |
-
#: ../includes/admin.php:
|
39 |
-
msgid "
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: ../includes/admin.php:
|
43 |
-
msgid "
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: ../includes/admin.php:
|
47 |
-
#, php-format
|
48 |
-
msgid "XML Sitemaps are disabled because you have checked the option %1$s at %2$s above."
|
49 |
-
msgstr "Les XML Sitemaps sont désactivés parce-que l'option %1$s sous %2$s en haut est activée."
|
50 |
-
|
51 |
-
#: ../includes/admin.php:40
|
52 |
-
#: ../includes/admin.php:410
|
53 |
-
msgid "XML Sitemaps"
|
54 |
-
msgstr "XML Sitemaps"
|
55 |
-
|
56 |
-
#: ../includes/admin.php:41
|
57 |
msgid "Regular XML Sitemaps"
|
58 |
msgstr "XML Sitemaps normaux"
|
59 |
|
60 |
-
#: ../includes/admin.php:
|
61 |
-
#: ../includes/admin.php:
|
62 |
msgid "View"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: ../includes/admin.php:
|
66 |
-
#: ../includes/admin.php:173
|
67 |
msgid "Google News Sitemap"
|
68 |
msgstr "Google News Sitemap"
|
69 |
|
70 |
-
#: ../includes/admin.php:
|
71 |
-
|
72 |
-
msgid "
|
73 |
-
msgstr "
|
74 |
-
|
75 |
-
#: ../includes/admin.php:82
|
76 |
-
#: ../includes/admin.php:327
|
77 |
-
#: ../includes/admin.php:369
|
78 |
-
msgid "Settings"
|
79 |
-
msgstr ""
|
80 |
-
|
81 |
-
#: ../includes/admin.php:97
|
82 |
-
msgid "Year"
|
83 |
-
msgstr "Année"
|
84 |
-
|
85 |
-
#: ../includes/admin.php:98
|
86 |
-
msgid "Month"
|
87 |
-
msgstr "Mois"
|
88 |
-
|
89 |
-
#: ../includes/admin.php:102
|
90 |
-
msgid "Split by"
|
91 |
-
msgstr "Trier par"
|
92 |
-
|
93 |
-
#: ../includes/admin.php:105
|
94 |
-
#: ../includes/admin.php:140
|
95 |
-
msgid "None"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: ../includes/admin.php:112
|
99 |
-
msgid "Split by year if you experience errors or slow sitemaps. In very rare cases, split by month is needed."
|
100 |
-
msgstr "Trie par an si tu vois des erreurs ou des sitemaps très lentes. Aux très rares cas, un trie par mois est nécessaire."
|
101 |
-
|
102 |
-
#: ../includes/admin.php:117
|
103 |
-
#: ../includes/admin.php:365
|
104 |
-
msgid "Priority"
|
105 |
-
msgstr "Priorité"
|
106 |
-
|
107 |
-
#: ../includes/admin.php:119
|
108 |
-
msgid "Priority can be overridden on individual posts. *"
|
109 |
-
msgstr "La Priorité peut être remplacée par article. *"
|
110 |
-
|
111 |
-
#: ../includes/admin.php:124
|
112 |
-
msgid "Automatically adjusts Priority according to relative age and comment count."
|
113 |
-
msgstr "Ajuste la Priorité automatiquement selon l'âge relatif et le nombre des commentaires."
|
114 |
-
|
115 |
-
#: ../includes/admin.php:124
|
116 |
-
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
117 |
-
msgstr "Articles mise en avant ne seront pas soumis à la réduction selon l'âge. Articles avec Priorité fixe garderont cette valeur."
|
118 |
-
|
119 |
-
#: ../includes/admin.php:129
|
120 |
-
msgid "Update Lastmod and Changefreq on comments."
|
121 |
-
msgstr "Mise à jour de Lastmod et Changefreq à la soumission des commentaires."
|
122 |
-
|
123 |
-
#: ../includes/admin.php:129
|
124 |
-
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
125 |
-
msgstr "Configurez ceci si la discussion sur votre site nécessite la ré-indexation après chaque nouveau commentaire."
|
126 |
-
|
127 |
-
#: ../includes/admin.php:133
|
128 |
-
msgid "Include:"
|
129 |
-
msgstr "Inclure :"
|
130 |
-
|
131 |
-
#: ../includes/admin.php:138
|
132 |
-
msgid "Image tags for"
|
133 |
-
msgstr "Balises d'image pour"
|
134 |
-
|
135 |
-
#: ../includes/admin.php:143
|
136 |
-
msgid "Featured Image"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: ../includes/admin.php:146
|
140 |
-
msgid "Attached images"
|
141 |
-
msgstr "Images attachées"
|
142 |
-
|
143 |
-
#: ../includes/admin.php:154
|
144 |
-
msgid "Google News tags"
|
145 |
-
msgstr "Balises Google News"
|
146 |
-
|
147 |
-
#: ../includes/admin.php:154
|
148 |
-
msgid "Only set when your site has been or will soon be accepted by Google News. **"
|
149 |
-
msgstr "Seulement si ton site est (ou sera bientôt) accepté par Google News. **"
|
150 |
-
|
151 |
-
#: ../includes/admin.php:171
|
152 |
-
msgid "* 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."
|
153 |
-
msgstr "* Les paramètres de Priorité n'affectent pas le classement dans les résultats de recherche. Ils ont pour seul but de proposer des moteurs de recherche les URL à premier indice. Une fois qu'un URL a été indexé, sa priorité devient vide de sens jusqu'à le moment son Lastmod est mis à jour."
|
154 |
|
155 |
-
#: ../includes/admin.php:
|
156 |
-
msgid "
|
157 |
-
msgstr "
|
158 |
|
159 |
-
#: ../includes/admin.php:
|
160 |
-
|
161 |
-
|
162 |
-
msgstr "** Google recommande un sitemap dédié News. Utilise l'option %1$s sous %2$s en haut pour cela."
|
163 |
|
164 |
-
#: ../includes/admin.php:
|
165 |
-
#: ../includes/admin.php:413
|
166 |
msgid "Enable XML sitemaps"
|
167 |
msgstr "Activez XML Sitemaps"
|
168 |
|
169 |
-
#: ../includes/admin.php:
|
170 |
-
|
|
|
|
|
|
|
171 |
msgid "Include taxonomies"
|
172 |
msgstr "Taxonomies à inclure"
|
173 |
|
174 |
-
#: ../includes/admin.php:
|
175 |
-
msgid "No taxonomies available for the currently included post types."
|
176 |
-
msgstr "Aucun taxonomie disponible pour les types d'articles actuellement inclus."
|
177 |
-
|
178 |
-
#: ../includes/admin.php:216
|
179 |
-
msgid "It is generally not recommended to include taxonomy pages, unless their content brings added value. 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, you might even consider disallowing indexation to prevent a possible duplicate content penalty. You can do this by adding specific robots.txt rules below."
|
180 |
-
msgstr "Généralement, il est déconseillé à inclure les pages des taxonomies, sauf si ils représentent une valeur ajoutée. Par exemple, lorsque on utilise des descriptions des catégories que donnent des informations pas présents ailleurs sur le site. Sinon, vous pourriez même envisager interdire l'indexation pour éviter punition 'duplicate content' . Ajoute des règles spécifiques robots.txt ci-dessous pour cela."
|
181 |
-
|
182 |
-
#: ../includes/admin.php:226
|
183 |
-
msgid "Google"
|
184 |
-
msgstr "Google"
|
185 |
-
|
186 |
-
#: ../includes/admin.php:227
|
187 |
-
msgid "Bing"
|
188 |
-
msgstr "Bing"
|
189 |
-
|
190 |
-
#: ../includes/admin.php:231
|
191 |
-
#: ../includes/admin.php:425
|
192 |
-
msgid "Ping on Publish"
|
193 |
-
msgstr "Ping en Publiant"
|
194 |
-
|
195 |
-
#: ../includes/admin.php:250
|
196 |
-
#, php-format
|
197 |
-
msgid "Successfully pinged for %1$s on %2$s GMT."
|
198 |
-
msgstr "Pingé avec succès pour %1$s le %2$s GMT."
|
199 |
-
|
200 |
-
#: ../includes/admin.php:259
|
201 |
-
#, php-format
|
202 |
-
msgid "Rules to append to the %s generated by WordPress."
|
203 |
-
msgstr "Règles à ajouter au %s produit par WordPress."
|
204 |
-
|
205 |
-
#: ../includes/admin.php:260
|
206 |
-
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
207 |
-
msgstr "Ajoutez des règles ici seulement si vous saviez le faire, vous risquez bloquer l'accès aux moteurs de recherche."
|
208 |
-
|
209 |
-
#: ../includes/admin.php:260
|
210 |
-
msgid "These rules will not have effect when you are using a static robots.txt file."
|
211 |
-
msgstr "Ces règles ne seront pas effectué si vous utilisez un fichier robots.txt statique."
|
212 |
-
|
213 |
-
#: ../includes/admin.php:267
|
214 |
-
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
215 |
-
msgstr "Supprimez tous les options Flux XML Sitemap et redémarrez avec les valeurs par défaut."
|
216 |
-
|
217 |
-
#: ../includes/admin.php:269
|
218 |
-
#, php-format
|
219 |
-
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
220 |
-
msgstr "La désactivation et la réactivation de l'extension % s auront le même effet."
|
221 |
-
|
222 |
-
#: ../includes/admin.php:344
|
223 |
-
msgid "XML Sitemap"
|
224 |
-
msgstr "XML Sitemap"
|
225 |
-
|
226 |
-
#: ../includes/admin.php:361
|
227 |
-
msgid "Exclude from XML Sitemap"
|
228 |
-
msgstr "Exclure de l'XML Sitemap"
|
229 |
-
|
230 |
-
#: ../includes/admin.php:369
|
231 |
-
#, php-format
|
232 |
-
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
233 |
-
msgstr "Laissez vide pour la Priorité automatique comme configuré dans %1$s > %2$s."
|
234 |
-
|
235 |
-
#: ../includes/admin.php:369
|
236 |
-
msgid "Reading"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: ../includes/admin.php:431
|
240 |
msgid "Additional robots.txt rules"
|
241 |
msgstr "Règles robots.txt additionelles"
|
242 |
|
243 |
-
#: ../includes/admin.php:434
|
244 |
-
msgid "Reset XML sitemaps"
|
245 |
-
msgstr "Remise à nouveau"
|
246 |
-
|
247 |
-
#~ msgid "year of publication"
|
248 |
-
#~ msgstr "année de la publication"
|
249 |
-
|
250 |
-
#~ msgid "month of publication"
|
251 |
-
#~ msgstr "mois de la publication"
|
252 |
-
|
253 |
-
#~ msgid "Note:"
|
254 |
-
#~ msgstr "Attention :"
|
255 |
-
|
256 |
-
#~ msgid "year"
|
257 |
-
#~ msgstr "an"
|
258 |
-
|
259 |
-
#~ msgid "Divide by"
|
260 |
-
#~ msgstr "Trier par"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-02-22 16:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-02-22 18:03+0100\n"
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
16 |
"X-Poedit-Country: FRANCE\n"
|
17 |
|
18 |
#: ../includes/admin.php:15
|
19 |
+
msgid "Donate to keep the free XML Sitemap Feeds plugin development & support going!"
|
20 |
+
msgstr "Faites un don pour aider le développement et support de l'extension XML Sitemap Feeds. Merci !"
|
|
|
21 |
|
22 |
#: ../includes/admin.php:15
|
23 |
+
msgid "These settings control the XML Sitemap generation."
|
24 |
+
msgstr "Ces options contrôlent le XML Sitemap."
|
|
|
25 |
|
26 |
#: ../includes/admin.php:15
|
27 |
#, php-format
|
28 |
+
msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
|
29 |
+
msgstr "Les XML Sitemaps sont désactivé si l'option %s (en haut) est mis à %s."
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
#: ../includes/admin.php:15
|
32 |
+
msgid "Site Visibility"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../includes/admin.php:15
|
36 |
+
msgid "Discourage search engines from indexing this site"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../includes/admin.php:39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgid "Regular XML Sitemaps"
|
41 |
msgstr "XML Sitemaps normaux"
|
42 |
|
43 |
+
#: ../includes/admin.php:41
|
44 |
+
#: ../includes/admin.php:47
|
45 |
msgid "View"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: ../includes/admin.php:45
|
|
|
49 |
msgid "Google News Sitemap"
|
50 |
msgstr "Google News Sitemap"
|
51 |
|
52 |
+
#: ../includes/admin.php:123
|
53 |
+
#, php-format
|
54 |
+
msgid "Rules to append to %s generated by WordPress."
|
55 |
+
msgstr "Règles à ajouter au %s produit par WordPress."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
#: ../includes/admin.php:123
|
58 |
+
msgid "Warning: Only set rules here when you know what you are doing, otherwise you might break access to your site.<br />Note: These rules will not have effect when you are using a static robots.txt file."
|
59 |
+
msgstr "Attention: Ajoutez des règles ici seulement si vous saviez le faire, vous risquez bloquer l'accès aux moteurs de recherche.<br />Note: Ces règles n'ont pas d'influence si vous utilisez un fichier robots.txt statique."
|
60 |
|
61 |
+
#: ../includes/admin.php:185
|
62 |
+
msgid "XML Sitemaps"
|
63 |
+
msgstr "XML Sitemaps"
|
|
|
64 |
|
65 |
+
#: ../includes/admin.php:188
|
|
|
66 |
msgid "Enable XML sitemaps"
|
67 |
msgstr "Activez XML Sitemaps"
|
68 |
|
69 |
+
#: ../includes/admin.php:191
|
70 |
+
msgid "Include post types"
|
71 |
+
msgstr "Types d'articles à inclure"
|
72 |
+
|
73 |
+
#: ../includes/admin.php:194
|
74 |
msgid "Include taxonomies"
|
75 |
msgstr "Taxonomies à inclure"
|
76 |
|
77 |
+
#: ../includes/admin.php:201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
msgid "Additional robots.txt rules"
|
79 |
msgstr "Règles robots.txt additionelles"
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/xml-sitemap-feed-id_ID.mo
DELETED
Binary file
|
languages/xml-sitemap-feed-id_ID.po
DELETED
@@ -1,304 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-04-29 19:59+0100\n"
|
6 |
-
"PO-Revision-Date: 2013-07-21 01:07+0800\n"
|
7 |
-
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
-
"Language-Team: <nasrulhaq81@gmail.com>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;_n\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
-
"X-Generator: Poedit 1.5.7\n"
|
16 |
-
"Language: id_ID\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
-
|
19 |
-
#: ../includes/admin.php:15
|
20 |
-
#, php-format
|
21 |
-
msgid "Donate to keep the free %s plugin development & support going!"
|
22 |
-
msgstr ""
|
23 |
-
"Donasi untuk menjaga pengembangan & dukungan plugin gratis %s berlangsung "
|
24 |
-
|
25 |
-
#: ../includes/admin.php:15 ../includes/admin.php:269
|
26 |
-
msgid "XML Sitemap & Google News Feeds"
|
27 |
-
msgstr "XML Sitemap & Google News Feeds"
|
28 |
-
|
29 |
-
#: ../includes/admin.php:15
|
30 |
-
#, php-format
|
31 |
-
msgid "These settings control the XML Sitemaps generated by the %s plugin."
|
32 |
-
msgstr ""
|
33 |
-
"Pengaturan ini mengontrol untuk menghasilkan XML Sitemaps oleh plugin %s"
|
34 |
-
|
35 |
-
#: ../includes/admin.php:16
|
36 |
-
#, php-format
|
37 |
-
msgid ""
|
38 |
-
"XML Sitemaps will be disabled automatically when you check the option %1$s "
|
39 |
-
"at %2$s above."
|
40 |
-
msgstr ""
|
41 |
-
"XML Sitemap akan dimatikan otomatis ketika anda mencentang pilihan %1$s di "
|
42 |
-
"%2$s atas"
|
43 |
-
|
44 |
-
#: ../includes/admin.php:16
|
45 |
-
msgid "Discourage search engines from indexing this site"
|
46 |
-
msgstr "Halangi mesin pencari mengindex situs ini"
|
47 |
-
|
48 |
-
#: ../includes/admin.php:16
|
49 |
-
msgid "Search Engine Visibility"
|
50 |
-
msgstr "Kenampakan mesin pencari"
|
51 |
-
|
52 |
-
#: ../includes/admin.php:16
|
53 |
-
#, php-format
|
54 |
-
msgid ""
|
55 |
-
"XML Sitemaps are disabled because you have checked the option %1$s at %2$s "
|
56 |
-
"above."
|
57 |
-
msgstr ""
|
58 |
-
"XML Sitemap dimatikan karena anda mencentang pilihan %1$s pada %2$s diatas."
|
59 |
-
|
60 |
-
#: ../includes/admin.php:40 ../includes/admin.php:410
|
61 |
-
msgid "XML Sitemaps"
|
62 |
-
msgstr "XML Sitemaps"
|
63 |
-
|
64 |
-
#: ../includes/admin.php:41
|
65 |
-
msgid "Regular XML Sitemaps"
|
66 |
-
msgstr "XML Sitemap Reguler"
|
67 |
-
|
68 |
-
#: ../includes/admin.php:43 ../includes/admin.php:48
|
69 |
-
msgid "View"
|
70 |
-
msgstr "Lihat"
|
71 |
-
|
72 |
-
#: ../includes/admin.php:46 ../includes/admin.php:173
|
73 |
-
msgid "Google News Sitemap"
|
74 |
-
msgstr "Google News Sitemap"
|
75 |
-
|
76 |
-
#: ../includes/admin.php:58 ../includes/admin.php:419
|
77 |
-
msgid "Include post types"
|
78 |
-
msgstr "Termasuk tipe post"
|
79 |
-
|
80 |
-
#: ../includes/admin.php:82 ../includes/admin.php:327
|
81 |
-
#: ../includes/admin.php:369
|
82 |
-
msgid "Settings"
|
83 |
-
msgstr "Pengaturan"
|
84 |
-
|
85 |
-
#: ../includes/admin.php:97
|
86 |
-
msgid "Year"
|
87 |
-
msgstr "Tahun"
|
88 |
-
|
89 |
-
#: ../includes/admin.php:98
|
90 |
-
msgid "Month"
|
91 |
-
msgstr "Bulan"
|
92 |
-
|
93 |
-
#: ../includes/admin.php:102
|
94 |
-
msgid "Split by"
|
95 |
-
msgstr "Dipilah oleh"
|
96 |
-
|
97 |
-
#: ../includes/admin.php:105 ../includes/admin.php:140
|
98 |
-
msgid "None"
|
99 |
-
msgstr "Tidak ada"
|
100 |
-
|
101 |
-
#: ../includes/admin.php:112
|
102 |
-
msgid ""
|
103 |
-
"Split by year if you experience errors or slow sitemaps. In very rare cases, "
|
104 |
-
"split by month is needed."
|
105 |
-
msgstr ""
|
106 |
-
"Pilah berdasarkan tahun jika sitemap mengalami kesalahan atau lambat. Kasus "
|
107 |
-
"yang jarang terjadi, pilah berdasarkan bulan dibutuhkan."
|
108 |
-
|
109 |
-
#: ../includes/admin.php:117 ../includes/admin.php:365
|
110 |
-
msgid "Priority"
|
111 |
-
msgstr "Prioritas"
|
112 |
-
|
113 |
-
#: ../includes/admin.php:119
|
114 |
-
msgid "Priority can be overridden on individual posts. *"
|
115 |
-
msgstr "Prioritas dapat ditimpa pada tiap post"
|
116 |
-
|
117 |
-
#: ../includes/admin.php:124
|
118 |
-
msgid ""
|
119 |
-
"Automatically adjusts Priority according to relative age and comment count."
|
120 |
-
msgstr ""
|
121 |
-
"Otomatis menyesuaikan Prioritas mengikuti usia post dan jumlah komentar"
|
122 |
-
|
123 |
-
#: ../includes/admin.php:124
|
124 |
-
msgid ""
|
125 |
-
"Sticky posts will not be subject to reduction by age. Individual posts with "
|
126 |
-
"fixed Priority will always keep that value."
|
127 |
-
msgstr ""
|
128 |
-
"Post terbaru tidak menjadi subyek mereduksi umur post, Tiap post dengan "
|
129 |
-
"Prioritas yang jelas akan selalu menjadi nilai."
|
130 |
-
|
131 |
-
#: ../includes/admin.php:129
|
132 |
-
msgid "Update Lastmod and Changefreq on comments."
|
133 |
-
msgstr "Perbarui Lastmod dan Changefreq di komentar."
|
134 |
-
|
135 |
-
#: ../includes/admin.php:129
|
136 |
-
msgid ""
|
137 |
-
"Set this if discussion on your site warrants reindexation upon each new "
|
138 |
-
"comment."
|
139 |
-
msgstr ""
|
140 |
-
"Atur ini jika diskusi di situs anda mengingatkan index ulang atas setiap "
|
141 |
-
"komentar baru."
|
142 |
-
|
143 |
-
#: ../includes/admin.php:133
|
144 |
-
msgid "Include:"
|
145 |
-
msgstr "Termasuk:"
|
146 |
-
|
147 |
-
#: ../includes/admin.php:138
|
148 |
-
msgid "Image tags for"
|
149 |
-
msgstr "Tag gambar untuk"
|
150 |
-
|
151 |
-
#: ../includes/admin.php:143
|
152 |
-
msgid "Featured Image"
|
153 |
-
msgstr "Fitur Gambar"
|
154 |
-
|
155 |
-
#: ../includes/admin.php:146
|
156 |
-
msgid "Attached images"
|
157 |
-
msgstr "Gambar terlampir"
|
158 |
-
|
159 |
-
#: ../includes/admin.php:154
|
160 |
-
msgid "Google News tags"
|
161 |
-
msgstr "Tag Google News"
|
162 |
-
|
163 |
-
#: ../includes/admin.php:154
|
164 |
-
msgid ""
|
165 |
-
"Only set when your site has been or will soon be accepted by Google News. **"
|
166 |
-
msgstr ""
|
167 |
-
"Atur ini hanya jika situs anda telah diterima atau akan diteriima oleh "
|
168 |
-
"Google News. **"
|
169 |
-
|
170 |
-
#: ../includes/admin.php:171
|
171 |
-
msgid ""
|
172 |
-
"* Priority settings do not affect ranking in search results in any way. They "
|
173 |
-
"are only meant to suggest search engines which URLs to index first. Once a "
|
174 |
-
"URL has been indexed, its Priority becomes meaningless until its Lastmod is "
|
175 |
-
"updated."
|
176 |
-
msgstr ""
|
177 |
-
"* Pengaturan Prioritas tidak berefek pada peringkat hasil pencarian. "
|
178 |
-
"Prioritas dimaksudkan hanya menyarankan mesin pencari dengan URL agar "
|
179 |
-
"diindex terlebih dahulu. ketika URL terindex, Prioritas tidak bermakna "
|
180 |
-
"hingga Lastmod diperbaharui"
|
181 |
-
|
182 |
-
#: ../includes/admin.php:171
|
183 |
-
msgid ""
|
184 |
-
"Maximum Priority (1.0) is reserved for the front page, individual posts and, "
|
185 |
-
"when allowed, posts with high comment count."
|
186 |
-
msgstr ""
|
187 |
-
"Prioritas Maksimum (1.0) tersedia dihalaman depan, tiap posting, dan jika "
|
188 |
-
"diijinkan, posting dengan komentar tinggi terhitung."
|
189 |
-
|
190 |
-
#: ../includes/admin.php:173
|
191 |
-
#, php-format
|
192 |
-
msgid ""
|
193 |
-
"** Google recommends using a seperate news sitemap. You can do this by "
|
194 |
-
"checking the option %1$s at %2$s above."
|
195 |
-
msgstr ""
|
196 |
-
"** Google merekomendasikan memakai sitemap terpisah. Anda dapat melakukannya "
|
197 |
-
"dengan mencentang pilihan %1$s pada %2$s diatas."
|
198 |
-
|
199 |
-
#: ../includes/admin.php:173 ../includes/admin.php:413
|
200 |
-
msgid "Enable XML sitemaps"
|
201 |
-
msgstr "Aktifkan XML sitemap"
|
202 |
-
|
203 |
-
#: ../includes/admin.php:183 ../includes/admin.php:422
|
204 |
-
msgid "Include taxonomies"
|
205 |
-
msgstr "Ikutkan Taxonomi"
|
206 |
-
|
207 |
-
#: ../includes/admin.php:213
|
208 |
-
msgid "No taxonomies available for the currently included post types."
|
209 |
-
msgstr "Tidak taxonomi tersedia tipe post yang diikutkan saat ini."
|
210 |
-
|
211 |
-
#: ../includes/admin.php:216
|
212 |
-
msgid ""
|
213 |
-
"It is generally not recommended to include taxonomy pages, unless their "
|
214 |
-
"content brings added value. For example, when you use category descriptions "
|
215 |
-
"with information that is not present elsewhere on your site or if taxonomy "
|
216 |
-
"pages list posts with an excerpt that is different from, but complementary "
|
217 |
-
"to the post content. In these cases you might consider including certain "
|
218 |
-
"taxonomies. Otherwise, you might even consider disallowing indexation to "
|
219 |
-
"prevent a possible duplicate content penalty. You can do this by adding "
|
220 |
-
"specific robots.txt rules below."
|
221 |
-
msgstr ""
|
222 |
-
"Secara umum tidak merekomendasikan mengikutkan taksonomi halaman, kecuali "
|
223 |
-
"kontennya memberi nilai. Sebagai contoh, ketika anda menggunakan deskripsi "
|
224 |
-
"kategori dengan informasi yang tidak ada dibagian lain disitus anda atau "
|
225 |
-
"jika taksonomi halaman diposting dengan kutipan dalam bentuk berbeda. akan "
|
226 |
-
"tetapi menjadi pelengkap pada isi posting. Dalam kasus ini anda diharapkan "
|
227 |
-
"mengikutkan beberapa taksonomi. Sebaliknya, anda bisa tidak menginkan "
|
228 |
-
"indeksasi untuk menjaga kemungkinan pinalti konten ganda. Anda dapat "
|
229 |
-
"melakukan dengan menambah aturan spesifik robots.txt dibawah."
|
230 |
-
|
231 |
-
#: ../includes/admin.php:226
|
232 |
-
msgid "Google"
|
233 |
-
msgstr "Google"
|
234 |
-
|
235 |
-
#: ../includes/admin.php:227
|
236 |
-
msgid "Bing"
|
237 |
-
msgstr "Bing"
|
238 |
-
|
239 |
-
#: ../includes/admin.php:231 ../includes/admin.php:425
|
240 |
-
msgid "Ping on Publish"
|
241 |
-
msgstr "Ping saat Publikasi"
|
242 |
-
|
243 |
-
#: ../includes/admin.php:250
|
244 |
-
#, php-format
|
245 |
-
msgid "Successfully pinged for %1$s on %2$s GMT."
|
246 |
-
msgstr "Sukses ping untuk %1$s pada %2$s GMT."
|
247 |
-
|
248 |
-
#: ../includes/admin.php:259
|
249 |
-
#, php-format
|
250 |
-
msgid "Rules to append to the %s generated by WordPress."
|
251 |
-
msgstr "Aturan yang ditambahkan %s dihasilkan oleh WordPress"
|
252 |
-
|
253 |
-
#: ../includes/admin.php:260
|
254 |
-
msgid ""
|
255 |
-
"Only add rules here when you know what you are doing, otherwise you might "
|
256 |
-
"break search engine access to your site."
|
257 |
-
msgstr ""
|
258 |
-
"Tambah aturan disini jika hanya anda memahami, sebaliknya anda bisa saja "
|
259 |
-
"menghentikan akses mesin pencari ke situs anda. "
|
260 |
-
|
261 |
-
#: ../includes/admin.php:260
|
262 |
-
msgid ""
|
263 |
-
"These rules will not have effect when you are using a static robots.txt file."
|
264 |
-
msgstr ""
|
265 |
-
"Pengaturan tidak memiliki efek jika anda menggunakan file statis robots.txt"
|
266 |
-
|
267 |
-
#: ../includes/admin.php:267
|
268 |
-
msgid ""
|
269 |
-
"Clear all XML Sitemap Feed options from the database and start fresh with "
|
270 |
-
"the default settings."
|
271 |
-
msgstr ""
|
272 |
-
"Hapus semua pilihan XML Sitemap Feed dari database dan mulai yang baru "
|
273 |
-
"melalui pengaturan awal"
|
274 |
-
|
275 |
-
#: ../includes/admin.php:269
|
276 |
-
#, php-format
|
277 |
-
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
278 |
-
msgstr "Mengaktifkan dan menyalakan plugin %s akan berdampak sama."
|
279 |
-
|
280 |
-
#: ../includes/admin.php:344
|
281 |
-
msgid "XML Sitemap"
|
282 |
-
msgstr "XML Sitemap"
|
283 |
-
|
284 |
-
#: ../includes/admin.php:361
|
285 |
-
msgid "Exclude from XML Sitemap"
|
286 |
-
msgstr "Mengecualikan dari XML Sitemap"
|
287 |
-
|
288 |
-
#: ../includes/admin.php:369
|
289 |
-
#, php-format
|
290 |
-
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
291 |
-
msgstr ""
|
292 |
-
"Biarkan kosong untuk Prioritas otomatis seperti dikonfigurasi di %1$s > %2$s."
|
293 |
-
|
294 |
-
#: ../includes/admin.php:369
|
295 |
-
msgid "Reading"
|
296 |
-
msgstr "Membaca"
|
297 |
-
|
298 |
-
#: ../includes/admin.php:431
|
299 |
-
msgid "Additional robots.txt rules"
|
300 |
-
msgstr "Aturan tambahan robots.txt"
|
301 |
-
|
302 |
-
#: ../includes/admin.php:434
|
303 |
-
msgid "Reset XML sitemaps"
|
304 |
-
msgstr "Atur ulang XML Sitemaps"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/xml-sitemap-feed-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.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-
|
6 |
-
"PO-Revision-Date: 2013-
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
@@ -16,272 +16,65 @@ msgstr ""
|
|
16 |
"X-Poedit-Country: NETHERLANDS\n"
|
17 |
|
18 |
#: ../includes/admin.php:15
|
19 |
-
|
20 |
-
|
21 |
-
msgstr "Doneer om de ontwikkeling en ondersteuning van de %s plugin gaande te houden!"
|
22 |
|
23 |
#: ../includes/admin.php:15
|
24 |
-
|
25 |
-
|
26 |
-
msgstr "XML Sitemap & Google News Feeds"
|
27 |
|
28 |
#: ../includes/admin.php:15
|
29 |
#, php-format
|
30 |
-
msgid "
|
31 |
-
msgstr "
|
32 |
-
|
33 |
-
#: ../includes/admin.php:16
|
34 |
-
#, php-format
|
35 |
-
msgid "XML Sitemaps will be disabled automatically when you check the option %1$s at %2$s above."
|
36 |
-
msgstr "XML Sitemaps worden automatisch uitgeschakeld als je de optie %1$s bij %2$s aanvinkt."
|
37 |
|
38 |
-
#: ../includes/admin.php:
|
39 |
-
msgid "
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: ../includes/admin.php:
|
43 |
-
msgid "
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: ../includes/admin.php:
|
47 |
-
#, php-format
|
48 |
-
msgid "XML Sitemaps are disabled because you have checked the option %1$s at %2$s above."
|
49 |
-
msgstr "XML Sitemaps zijn uitgeschakeld omdat de optie %1$s bij %2$s aangevinkt is."
|
50 |
-
|
51 |
-
#: ../includes/admin.php:40
|
52 |
-
#: ../includes/admin.php:410
|
53 |
-
msgid "XML Sitemaps"
|
54 |
-
msgstr "XML Sitemaps"
|
55 |
-
|
56 |
-
#: ../includes/admin.php:41
|
57 |
msgid "Regular XML Sitemaps"
|
58 |
msgstr "Standaard XML Sitemaps"
|
59 |
|
60 |
-
#: ../includes/admin.php:
|
61 |
-
#: ../includes/admin.php:
|
62 |
msgid "View"
|
63 |
-
msgstr "
|
64 |
|
65 |
-
#: ../includes/admin.php:
|
66 |
-
#: ../includes/admin.php:173
|
67 |
msgid "Google News Sitemap"
|
68 |
msgstr "Google News Sitemap"
|
69 |
|
70 |
-
#: ../includes/admin.php:
|
71 |
-
|
72 |
-
msgid "
|
73 |
-
msgstr "
|
74 |
-
|
75 |
-
#: ../includes/admin.php:82
|
76 |
-
#: ../includes/admin.php:327
|
77 |
-
#: ../includes/admin.php:369
|
78 |
-
msgid "Settings"
|
79 |
-
msgstr ""
|
80 |
-
|
81 |
-
#: ../includes/admin.php:97
|
82 |
-
msgid "Year"
|
83 |
-
msgstr "Jaar"
|
84 |
-
|
85 |
-
#: ../includes/admin.php:98
|
86 |
-
msgid "Month"
|
87 |
-
msgstr "Maand"
|
88 |
-
|
89 |
-
#: ../includes/admin.php:102
|
90 |
-
msgid "Split by"
|
91 |
-
msgstr "Verdeel naar"
|
92 |
-
|
93 |
-
#: ../includes/admin.php:105
|
94 |
-
#: ../includes/admin.php:140
|
95 |
-
msgid "None"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: ../includes/admin.php:112
|
99 |
-
msgid "Split by year if you experience errors or slow sitemaps. In very rare cases, split by month is needed."
|
100 |
-
msgstr "Verdeel naar jaar als je errors of trage sitemaps ondervindt. In zeldzame gevallen is een verdeling naar maand nodig."
|
101 |
-
|
102 |
-
#: ../includes/admin.php:117
|
103 |
-
#: ../includes/admin.php:365
|
104 |
-
msgid "Priority"
|
105 |
-
msgstr "Prioriteit"
|
106 |
-
|
107 |
-
#: ../includes/admin.php:119
|
108 |
-
msgid "Priority can be overridden on individual posts. *"
|
109 |
-
msgstr "De Priority kan per post worden aangepast. *"
|
110 |
-
|
111 |
-
#: ../includes/admin.php:124
|
112 |
-
msgid "Automatically adjusts Priority according to relative age and comment count."
|
113 |
-
msgstr "Pas de Priority automatisch aan naar relatieve leeftijd en aantal commentaren."
|
114 |
-
|
115 |
-
#: ../includes/admin.php:124
|
116 |
-
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
117 |
-
msgstr "Sticky posts worden niet onderworpen aan een reductie naar leeftijd. Posts met een vastgezette Priority behouden deze."
|
118 |
-
|
119 |
-
#: ../includes/admin.php:129
|
120 |
-
msgid "Update Lastmod and Changefreq on comments."
|
121 |
-
msgstr "Pas de Lastmod en Changefreq aan bij commentaren."
|
122 |
-
|
123 |
-
#: ../includes/admin.php:129
|
124 |
-
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
125 |
-
msgstr "Activeer dit als discussies op je site het waard zijn om na ieder commentaar opnieuw geïndexeerd te worden."
|
126 |
-
|
127 |
-
#: ../includes/admin.php:133
|
128 |
-
msgid "Include:"
|
129 |
-
msgstr "Bijsluiten:"
|
130 |
-
|
131 |
-
#: ../includes/admin.php:138
|
132 |
-
msgid "Image tags for"
|
133 |
-
msgstr "Afbeeldingstags voor"
|
134 |
-
|
135 |
-
#: ../includes/admin.php:143
|
136 |
-
msgid "Featured Image"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: ../includes/admin.php:146
|
140 |
-
msgid "Attached images"
|
141 |
-
msgstr "Bijgevoegde afbeeldingen"
|
142 |
-
|
143 |
-
#: ../includes/admin.php:154
|
144 |
-
msgid "Google News tags"
|
145 |
-
msgstr "Google News tags"
|
146 |
-
|
147 |
-
#: ../includes/admin.php:154
|
148 |
-
msgid "Only set when your site has been or will soon be accepted by Google News. **"
|
149 |
-
msgstr "Alleen als je site door Google News geaccepteerd is of zal worden. **"
|
150 |
-
|
151 |
-
#: ../includes/admin.php:171
|
152 |
-
msgid "* 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."
|
153 |
-
msgstr "* Prioriteit beïnvloed de positie in zoekresultaten op geen enkele wijze. Het is slechts bedoeld om aan te geven welke URLs het eerst geïndexeerd dienen te worden. Zodra een URL geïndexeerd is, wordt de prioriteit betekenisloos totdat de Lastmod is veranderd."
|
154 |
|
155 |
-
#: ../includes/admin.php:
|
156 |
-
msgid "
|
157 |
-
msgstr "
|
158 |
|
159 |
-
#: ../includes/admin.php:
|
160 |
-
|
161 |
-
|
162 |
-
msgstr "** Google raadt het gebruik van een aparte news sitemap aan. Doe dit door de optie %1$s bij %2$s hier boven aan te vinken."
|
163 |
|
164 |
-
#: ../includes/admin.php:
|
165 |
-
#: ../includes/admin.php:413
|
166 |
msgid "Enable XML sitemaps"
|
167 |
msgstr "XML sitemaps activeren"
|
168 |
|
169 |
-
#: ../includes/admin.php:
|
170 |
-
|
|
|
|
|
|
|
171 |
msgid "Include taxonomies"
|
172 |
msgstr "Taxonomieën bijsluiten"
|
173 |
|
174 |
-
#: ../includes/admin.php:
|
175 |
-
msgid "No taxonomies available for the currently included post types."
|
176 |
-
msgstr "Geen taxonomieën beschikbaar voor de huidige bijgesloten post types."
|
177 |
-
|
178 |
-
#: ../includes/admin.php:216
|
179 |
-
msgid "It is generally not recommended to include taxonomy pages, unless their content brings added value. 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, you might even consider disallowing indexation to prevent a possible duplicate content penalty. You can do this by adding specific robots.txt rules below."
|
180 |
-
msgstr "Het wordt over het algemeen afgeraden om taxonomieën bij te sluiten, tenzij deze een toegevoegde waarde vertegenwoordigen. Bijvoorbeeld als je categoriebeschrijvingen gebruikt die unieke informatie bevatten of als excerpts op taxonomiepagina's anders maar aanvullend zijn op de inhoud van de artikelen. In deze gevallen zou je kunnen overwegen bepaalde taxonomieën bij te sluiten. Maar in andere gevallen zou je zelfs kunnen overwegen om indexatie te verbieden om mogelijke bestraffing op 'duplicate content' te voorkomen. Dit kan door specifieke robots.txt regels hieronder toe te voegen."
|
181 |
-
|
182 |
-
#: ../includes/admin.php:226
|
183 |
-
msgid "Google"
|
184 |
-
msgstr "Google"
|
185 |
-
|
186 |
-
#: ../includes/admin.php:227
|
187 |
-
msgid "Bing"
|
188 |
-
msgstr "Bing"
|
189 |
-
|
190 |
-
#: ../includes/admin.php:231
|
191 |
-
#: ../includes/admin.php:425
|
192 |
-
msgid "Ping on Publish"
|
193 |
-
msgstr "Ping bij Publiceren"
|
194 |
-
|
195 |
-
#: ../includes/admin.php:250
|
196 |
-
#, php-format
|
197 |
-
msgid "Successfully pinged for %1$s on %2$s GMT."
|
198 |
-
msgstr "Succesvol gepinged voor %1$s op %2$s GMT."
|
199 |
-
|
200 |
-
#: ../includes/admin.php:259
|
201 |
-
#, php-format
|
202 |
-
msgid "Rules to append to the %s generated by WordPress."
|
203 |
-
msgstr "Regels om aan de WordPress gegenereerde %s toe te voegen."
|
204 |
-
|
205 |
-
#: ../includes/admin.php:260
|
206 |
-
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
207 |
-
msgstr "Definieer hier alleen regels als je weet wat je doet, anders zou je de toegang tot je site kunnen verstoren."
|
208 |
-
|
209 |
-
#: ../includes/admin.php:260
|
210 |
-
msgid "These rules will not have effect when you are using a static robots.txt file."
|
211 |
-
msgstr "Deze regels hebben geen effect als je een statisch robots.txt bestand gebruikt."
|
212 |
-
|
213 |
-
#: ../includes/admin.php:267
|
214 |
-
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
215 |
-
msgstr "Wis alle XML Sitemap Feed opties van de database en start opnieuw met de standaard instellingen."
|
216 |
-
|
217 |
-
#: ../includes/admin.php:269
|
218 |
-
#, php-format
|
219 |
-
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
220 |
-
msgstr "Uit- en weer inschakelen van de %s plugin heeft hetzelfde effect."
|
221 |
-
|
222 |
-
#: ../includes/admin.php:344
|
223 |
-
msgid "XML Sitemap"
|
224 |
-
msgstr "XML Sitemap"
|
225 |
-
|
226 |
-
#: ../includes/admin.php:361
|
227 |
-
msgid "Exclude from XML Sitemap"
|
228 |
-
msgstr "Uit in de XML Sitemap houden."
|
229 |
-
|
230 |
-
#: ../includes/admin.php:369
|
231 |
-
#, php-format
|
232 |
-
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
233 |
-
msgstr "Laat leeg voor automatische Priority zoals geconfigureerd op %1$s > %2$s."
|
234 |
-
|
235 |
-
#: ../includes/admin.php:369
|
236 |
-
msgid "Reading"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: ../includes/admin.php:431
|
240 |
msgid "Additional robots.txt rules"
|
241 |
msgstr "Aanvullende robots.txt regels"
|
242 |
|
243 |
-
#: ../includes/admin.php:434
|
244 |
-
msgid "Reset XML sitemaps"
|
245 |
-
msgstr "XML sitemaps resetten"
|
246 |
-
|
247 |
-
#~ msgid "year of publication"
|
248 |
-
#~ msgstr "jaar van publicatie"
|
249 |
-
|
250 |
-
#~ msgid "month of publication"
|
251 |
-
#~ msgstr "maand van publicatie"
|
252 |
-
|
253 |
-
#~ msgid "Note:"
|
254 |
-
#~ msgstr "Opmerking:"
|
255 |
-
|
256 |
-
#~ msgid "year"
|
257 |
-
#~ msgstr "jaar"
|
258 |
-
|
259 |
-
#~ msgid "Divide by"
|
260 |
-
#~ msgstr "Verdeel naar"
|
261 |
-
|
262 |
-
#~ msgid "Maximum priority is reserved for sticky posts and the front page."
|
263 |
-
#~ msgstr ""
|
264 |
-
#~ "Maximale prioriteit is gereserveerd voor de homepagina en sticky posts."
|
265 |
-
|
266 |
-
#~ msgid "Use a %s priority"
|
267 |
-
#~ msgstr "Gebruik een %s prioriteit"
|
268 |
-
|
269 |
-
#~ msgid "dynamic"
|
270 |
-
#~ msgstr "dynamisch"
|
271 |
-
|
272 |
-
#~ msgid "static"
|
273 |
-
#~ msgstr "statisch"
|
274 |
-
|
275 |
-
#~ msgid "with initial value %s"
|
276 |
-
#~ msgstr "met beginwaarde %s"
|
277 |
-
|
278 |
-
#~ msgid ""
|
279 |
-
#~ "Dynamic priority is calculated by the initial value ajusted according to "
|
280 |
-
#~ "the relative last modification age and comment count. Sticky posts always "
|
281 |
-
#~ "get the maximum initial priority value of 1. A different priority can be "
|
282 |
-
#~ "set on a post by post basis."
|
283 |
-
#~ msgstr ""
|
284 |
-
#~ "Dynamische prioriteit wordt berekend aan de hand van de beginwaarde, "
|
285 |
-
#~ "aangepast aan de relatieve leeftijd van laatste bewerking en het aantal "
|
286 |
-
#~ "commentaren. Sticky posts krijgen altijd de maximum beginwaarde van 1. "
|
287 |
-
#~ "Een aangepaste prioriteit kan per artikel ingesteld worden."
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-02-22 16:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-02-22 17:10+0100\n"
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
16 |
"X-Poedit-Country: NETHERLANDS\n"
|
17 |
|
18 |
#: ../includes/admin.php:15
|
19 |
+
msgid "Donate to keep the free XML Sitemap Feeds plugin development & support going!"
|
20 |
+
msgstr "Doneer om de ontwikkeling en ondersteuning van de vrije XML Sitemap Feeds plugin gaande te houden!"
|
|
|
21 |
|
22 |
#: ../includes/admin.php:15
|
23 |
+
msgid "These settings control the XML Sitemap generation."
|
24 |
+
msgstr "Deze instellingen besturen de XML Sitemap generatie."
|
|
|
25 |
|
26 |
#: ../includes/admin.php:15
|
27 |
#, php-format
|
28 |
+
msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
|
29 |
+
msgstr "XML Sitemaps zijn uitgeschakeld als de optie %s (boven) op %s staat."
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
#: ../includes/admin.php:15
|
32 |
+
msgid "Site Visibility"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../includes/admin.php:15
|
36 |
+
msgid "Discourage search engines from indexing this site"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../includes/admin.php:39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgid "Regular XML Sitemaps"
|
41 |
msgstr "Standaard XML Sitemaps"
|
42 |
|
43 |
+
#: ../includes/admin.php:41
|
44 |
+
#: ../includes/admin.php:47
|
45 |
msgid "View"
|
46 |
+
msgstr ""
|
47 |
|
48 |
+
#: ../includes/admin.php:45
|
|
|
49 |
msgid "Google News Sitemap"
|
50 |
msgstr "Google News Sitemap"
|
51 |
|
52 |
+
#: ../includes/admin.php:123
|
53 |
+
#, php-format
|
54 |
+
msgid "Rules to append to %s generated by WordPress."
|
55 |
+
msgstr "Regels om aan de WordPress gegenereerde %s toe te voegen."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
#: ../includes/admin.php:123
|
58 |
+
msgid "Warning: Only set rules here when you know what you are doing, otherwise you might break access to your site.<br />Note: These rules will not have effect when you are using a static robots.txt file."
|
59 |
+
msgstr "Waarschuwing: Definieer hier alleen regels als je weet wat je doet, anders zou je de toegang tot je site kunnen verstoren.<br />Let op: Deze regels hebben geen effect"
|
60 |
|
61 |
+
#: ../includes/admin.php:185
|
62 |
+
msgid "XML Sitemaps"
|
63 |
+
msgstr "XML Sitemaps"
|
|
|
64 |
|
65 |
+
#: ../includes/admin.php:188
|
|
|
66 |
msgid "Enable XML sitemaps"
|
67 |
msgstr "XML sitemaps activeren"
|
68 |
|
69 |
+
#: ../includes/admin.php:191
|
70 |
+
msgid "Include post types"
|
71 |
+
msgstr "Post types bijsluiten"
|
72 |
+
|
73 |
+
#: ../includes/admin.php:194
|
74 |
msgid "Include taxonomies"
|
75 |
msgstr "Taxonomieën bijsluiten"
|
76 |
|
77 |
+
#: ../includes/admin.php:201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
msgid "Additional robots.txt rules"
|
79 |
msgstr "Aanvullende robots.txt regels"
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/xml-sitemap-feed-xx_XX.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-
|
6 |
-
"PO-Revision-Date: 2013-
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
@@ -14,199 +14,65 @@ msgstr ""
|
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
|
16 |
#: ../includes/admin.php:15
|
17 |
-
|
18 |
-
msgid "Donate to keep the free %s plugin development & support going!"
|
19 |
msgstr ""
|
20 |
|
21 |
#: ../includes/admin.php:15
|
22 |
-
|
23 |
-
msgid "XML Sitemap & Google News Feeds"
|
24 |
msgstr ""
|
25 |
|
26 |
#: ../includes/admin.php:15
|
27 |
#, php-format
|
28 |
-
msgid "
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: ../includes/admin.php:16
|
32 |
-
#: ../includes/admin.php:147
|
33 |
-
#: ../includes/admin.php:184
|
34 |
-
#: ../includes/admin.php:228
|
35 |
-
#: ../includes/admin.php:237
|
36 |
-
msgid "Note:"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: ../includes/admin.php:16
|
40 |
-
#, php-format
|
41 |
-
msgid "XML Sitemaps will be disabled if you set the option %1$s (above) to %2$s."
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: ../includes/admin.php:
|
45 |
-
msgid "
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: ../includes/admin.php:
|
49 |
msgid "Discourage search engines from indexing this site"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: ../includes/admin.php:
|
53 |
-
#, php-format
|
54 |
-
msgid "XML Sitemaps are disabled because you have set the option %1$s (above) to %2$s."
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: ../includes/admin.php:40
|
58 |
-
#: ../includes/admin.php:360
|
59 |
-
msgid "XML Sitemaps"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: ../includes/admin.php:41
|
63 |
msgid "Regular XML Sitemaps"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: ../includes/admin.php:
|
67 |
-
#: ../includes/admin.php:
|
68 |
msgid "View"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../includes/admin.php:
|
72 |
msgid "Google News Sitemap"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ../includes/admin.php:
|
76 |
-
#: ../includes/admin.php:369
|
77 |
-
msgid "Include post types"
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: ../includes/admin.php:91
|
81 |
-
#: ../includes/admin.php:295
|
82 |
-
#: ../includes/admin.php:329
|
83 |
-
msgid "Settings"
|
84 |
-
msgstr ""
|
85 |
-
|
86 |
-
#: ../includes/admin.php:106
|
87 |
-
msgid "year"
|
88 |
-
msgstr ""
|
89 |
-
|
90 |
-
#: ../includes/admin.php:107
|
91 |
-
msgid "month"
|
92 |
-
msgstr ""
|
93 |
-
|
94 |
-
#: ../includes/admin.php:111
|
95 |
-
msgid "Divide by"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: ../includes/admin.php:121
|
99 |
-
msgid "Set division by year if you experience slow or blank sitemaps. In very rare cases, division by month is needed."
|
100 |
-
msgstr ""
|
101 |
-
|
102 |
-
#: ../includes/admin.php:126
|
103 |
-
#: ../includes/admin.php:328
|
104 |
-
msgid "Priority"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: ../includes/admin.php:128
|
108 |
-
msgid "Priority can be overridden on individual posts."
|
109 |
-
msgstr ""
|
110 |
-
|
111 |
-
#: ../includes/admin.php:128
|
112 |
-
msgid "Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count."
|
113 |
-
msgstr ""
|
114 |
-
|
115 |
-
#: ../includes/admin.php:133
|
116 |
-
msgid "Automatically adjusts Priority according to relative age and comment count."
|
117 |
-
msgstr ""
|
118 |
-
|
119 |
-
#: ../includes/admin.php:133
|
120 |
-
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
-
#: ../includes/admin.php:138
|
124 |
-
msgid "Update Lastmod and Changefreq on comments."
|
125 |
-
msgstr ""
|
126 |
-
|
127 |
-
#: ../includes/admin.php:138
|
128 |
-
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
129 |
-
msgstr ""
|
130 |
-
|
131 |
-
#: ../includes/admin.php:147
|
132 |
-
msgid "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."
|
133 |
-
msgstr ""
|
134 |
-
|
135 |
-
#: ../includes/admin.php:157
|
136 |
-
#: ../includes/admin.php:372
|
137 |
-
msgid "Include taxonomies"
|
138 |
-
msgstr ""
|
139 |
-
|
140 |
-
#: ../includes/admin.php:181
|
141 |
-
msgid "No taxonomies available for the currently included post types."
|
142 |
-
msgstr ""
|
143 |
-
|
144 |
-
#: ../includes/admin.php:184
|
145 |
-
msgid "It is generally not recommended to include taxonomy pages, unless their content brings added value. 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, you might even consider disallowing indexation by adding specific robots.txt rules below."
|
146 |
-
msgstr ""
|
147 |
-
|
148 |
-
#: ../includes/admin.php:194
|
149 |
-
msgid "Google"
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: ../includes/admin.php:195
|
153 |
-
msgid "Bing"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: ../includes/admin.php:199
|
157 |
-
#: ../includes/admin.php:375
|
158 |
-
msgid "Ping on Publish"
|
159 |
-
msgstr ""
|
160 |
-
|
161 |
-
#: ../includes/admin.php:218
|
162 |
#, php-format
|
163 |
-
msgid "
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
#: ../includes/admin.php:227
|
167 |
-
#, php-format
|
168 |
-
msgid "Rules to append to the %s generated by WordPress."
|
169 |
-
msgstr ""
|
170 |
-
|
171 |
-
#: ../includes/admin.php:228
|
172 |
-
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
173 |
-
msgstr ""
|
174 |
-
|
175 |
-
#: ../includes/admin.php:228
|
176 |
-
msgid "These rules will not have effect when you are using a static robots.txt file."
|
177 |
-
msgstr ""
|
178 |
-
|
179 |
-
#: ../includes/admin.php:235
|
180 |
-
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: ../includes/admin.php:
|
184 |
-
|
185 |
-
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: ../includes/admin.php:
|
189 |
-
msgid "XML
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: ../includes/admin.php:
|
193 |
-
|
194 |
-
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: ../includes/admin.php:
|
198 |
-
msgid "
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: ../includes/admin.php:
|
202 |
-
msgid "
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: ../includes/admin.php:
|
206 |
msgid "Additional robots.txt rules"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: ../includes/admin.php:384
|
210 |
-
msgid "Reset XML sitemaps"
|
211 |
-
msgstr ""
|
212 |
-
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-02-22 16:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-02-22 17:38+0100\n"
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
|
16 |
#: ../includes/admin.php:15
|
17 |
+
msgid "Donate to keep the free XML Sitemap Feeds plugin development & support going!"
|
|
|
18 |
msgstr ""
|
19 |
|
20 |
#: ../includes/admin.php:15
|
21 |
+
msgid "These settings control the XML Sitemap generation."
|
|
|
22 |
msgstr ""
|
23 |
|
24 |
#: ../includes/admin.php:15
|
25 |
#, php-format
|
26 |
+
msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: ../includes/admin.php:15
|
30 |
+
msgid "Site Visibility"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: ../includes/admin.php:15
|
34 |
msgid "Discourage search engines from indexing this site"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: ../includes/admin.php:39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
msgid "Regular XML Sitemaps"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: ../includes/admin.php:41
|
42 |
+
#: ../includes/admin.php:47
|
43 |
msgid "View"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: ../includes/admin.php:45
|
47 |
msgid "Google News Sitemap"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: ../includes/admin.php:123
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
#, php-format
|
52 |
+
msgid "Rules to append to %s generated by WordPress."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../includes/admin.php:123
|
56 |
+
msgid "Warning: Only set rules here when you know what you are doing, otherwise you might break access to your site.<br />Note: These rules will not have effect when you are using a static robots.txt file."
|
|
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../includes/admin.php:185
|
60 |
+
msgid "XML Sitemaps"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ../includes/admin.php:188
|
64 |
+
msgid "Enable XML sitemaps"
|
|
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: ../includes/admin.php:191
|
68 |
+
msgid "Include post types"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ../includes/admin.php:194
|
72 |
+
msgid "Include taxonomies"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../includes/admin.php:201
|
76 |
msgid "Additional robots.txt rules"
|
77 |
msgstr ""
|
78 |
|
|
|
|
|
|
|
|
languages/xml-sitemap-feed.pot
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-
|
6 |
-
"PO-Revision-Date: 2013-
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: <ravanhagen@gmail.com>\n"
|
9 |
"Language: \n"
|
@@ -16,231 +16,65 @@ msgstr ""
|
|
16 |
"X-Poedit-SearchPath-0: ..\n"
|
17 |
|
18 |
#: ../includes/admin.php:15
|
19 |
-
|
20 |
-
msgid "Donate to keep the free %s plugin development & support going!"
|
21 |
msgstr ""
|
22 |
|
23 |
#: ../includes/admin.php:15
|
24 |
-
|
25 |
-
msgid "XML Sitemap & Google News Feeds"
|
26 |
msgstr ""
|
27 |
|
28 |
#: ../includes/admin.php:15
|
29 |
#, php-format
|
30 |
-
msgid "
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: ../includes/admin.php:
|
34 |
-
|
35 |
-
msgid "XML Sitemaps will be disabled automatically when you check the option %1$s at %2$s above."
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: ../includes/admin.php:
|
39 |
msgid "Discourage search engines from indexing this site"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: ../includes/admin.php:
|
43 |
-
msgid "Search Engine Visibility"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: ../includes/admin.php:16
|
47 |
-
#, php-format
|
48 |
-
msgid "XML Sitemaps are disabled because you have checked the option %1$s at %2$s above."
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
#: ../includes/admin.php:40
|
52 |
-
#: ../includes/admin.php:410
|
53 |
-
msgid "XML Sitemaps"
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: ../includes/admin.php:41
|
57 |
msgid "Regular XML Sitemaps"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: ../includes/admin.php:
|
61 |
-
#: ../includes/admin.php:
|
62 |
msgid "View"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: ../includes/admin.php:
|
66 |
-
#: ../includes/admin.php:173
|
67 |
msgid "Google News Sitemap"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: ../includes/admin.php:
|
71 |
-
#: ../includes/admin.php:419
|
72 |
-
msgid "Include post types"
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: ../includes/admin.php:82
|
76 |
-
#: ../includes/admin.php:327
|
77 |
-
#: ../includes/admin.php:369
|
78 |
-
msgid "Settings"
|
79 |
-
msgstr ""
|
80 |
-
|
81 |
-
#: ../includes/admin.php:97
|
82 |
-
msgid "Year"
|
83 |
-
msgstr ""
|
84 |
-
|
85 |
-
#: ../includes/admin.php:98
|
86 |
-
msgid "Month"
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: ../includes/admin.php:102
|
90 |
-
msgid "Split by"
|
91 |
-
msgstr ""
|
92 |
-
|
93 |
-
#: ../includes/admin.php:105
|
94 |
-
#: ../includes/admin.php:140
|
95 |
-
msgid "None"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: ../includes/admin.php:112
|
99 |
-
msgid "Split by year if you experience errors or slow sitemaps. In very rare cases, split by month is needed."
|
100 |
-
msgstr ""
|
101 |
-
|
102 |
-
#: ../includes/admin.php:117
|
103 |
-
#: ../includes/admin.php:365
|
104 |
-
msgid "Priority"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: ../includes/admin.php:119
|
108 |
-
msgid "Priority can be overridden on individual posts. *"
|
109 |
-
msgstr ""
|
110 |
-
|
111 |
-
#: ../includes/admin.php:124
|
112 |
-
msgid "Automatically adjusts Priority according to relative age and comment count."
|
113 |
-
msgstr ""
|
114 |
-
|
115 |
-
#: ../includes/admin.php:124
|
116 |
-
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
117 |
-
msgstr ""
|
118 |
-
|
119 |
-
#: ../includes/admin.php:129
|
120 |
-
msgid "Update Lastmod and Changefreq on comments."
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
-
#: ../includes/admin.php:129
|
124 |
-
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
125 |
-
msgstr ""
|
126 |
-
|
127 |
-
#: ../includes/admin.php:133
|
128 |
-
msgid "Include:"
|
129 |
-
msgstr ""
|
130 |
-
|
131 |
-
#: ../includes/admin.php:138
|
132 |
-
msgid "Image tags for"
|
133 |
-
msgstr ""
|
134 |
-
|
135 |
-
#: ../includes/admin.php:143
|
136 |
-
msgid "Featured Image"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: ../includes/admin.php:146
|
140 |
-
msgid "Attached images"
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
#: ../includes/admin.php:154
|
144 |
-
msgid "Google News tags"
|
145 |
-
msgstr ""
|
146 |
-
|
147 |
-
#: ../includes/admin.php:154
|
148 |
-
msgid "Only set when your site has been or will soon be accepted by Google News. **"
|
149 |
-
msgstr ""
|
150 |
-
|
151 |
-
#: ../includes/admin.php:171
|
152 |
-
msgid "* 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."
|
153 |
-
msgstr ""
|
154 |
-
|
155 |
-
#: ../includes/admin.php:171
|
156 |
-
msgid "Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count."
|
157 |
-
msgstr ""
|
158 |
-
|
159 |
-
#: ../includes/admin.php:173
|
160 |
-
#, php-format
|
161 |
-
msgid "** Google recommends using a seperate news sitemap. You can do this by checking the option %1$s at %2$s above."
|
162 |
-
msgstr ""
|
163 |
-
|
164 |
-
#: ../includes/admin.php:173
|
165 |
-
#: ../includes/admin.php:413
|
166 |
-
msgid "Enable XML sitemaps"
|
167 |
-
msgstr ""
|
168 |
-
|
169 |
-
#: ../includes/admin.php:183
|
170 |
-
#: ../includes/admin.php:422
|
171 |
-
msgid "Include taxonomies"
|
172 |
-
msgstr ""
|
173 |
-
|
174 |
-
#: ../includes/admin.php:213
|
175 |
-
msgid "No taxonomies available for the currently included post types."
|
176 |
-
msgstr ""
|
177 |
-
|
178 |
-
#: ../includes/admin.php:216
|
179 |
-
msgid "It is generally not recommended to include taxonomy pages, unless their content brings added value. 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, you might even consider disallowing indexation to prevent a possible duplicate content penalty. You can do this by adding specific robots.txt rules below."
|
180 |
-
msgstr ""
|
181 |
-
|
182 |
-
#: ../includes/admin.php:226
|
183 |
-
msgid "Google"
|
184 |
-
msgstr ""
|
185 |
-
|
186 |
-
#: ../includes/admin.php:227
|
187 |
-
msgid "Bing"
|
188 |
-
msgstr ""
|
189 |
-
|
190 |
-
#: ../includes/admin.php:231
|
191 |
-
#: ../includes/admin.php:425
|
192 |
-
msgid "Ping on Publish"
|
193 |
-
msgstr ""
|
194 |
-
|
195 |
-
#: ../includes/admin.php:250
|
196 |
#, php-format
|
197 |
-
msgid "
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: ../includes/admin.php:
|
201 |
-
|
202 |
-
msgid "Rules to append to the %s generated by WordPress."
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: ../includes/admin.php:260
|
206 |
-
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: ../includes/admin.php:
|
210 |
-
msgid "
|
211 |
-
msgstr ""
|
212 |
-
|
213 |
-
#: ../includes/admin.php:267
|
214 |
-
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
215 |
-
msgstr ""
|
216 |
-
|
217 |
-
#: ../includes/admin.php:269
|
218 |
-
#, php-format
|
219 |
-
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
220 |
-
msgstr ""
|
221 |
-
|
222 |
-
#: ../includes/admin.php:344
|
223 |
-
msgid "XML Sitemap"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: ../includes/admin.php:
|
227 |
-
msgid "
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: ../includes/admin.php:
|
231 |
-
|
232 |
-
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: ../includes/admin.php:
|
236 |
-
msgid "
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: ../includes/admin.php:
|
240 |
msgid "Additional robots.txt rules"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: ../includes/admin.php:434
|
244 |
-
msgid "Reset XML sitemaps"
|
245 |
-
msgstr ""
|
246 |
-
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-02-22 16:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-02-22 16:44+0100\n"
|
7 |
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
"Language-Team: <ravanhagen@gmail.com>\n"
|
9 |
"Language: \n"
|
16 |
"X-Poedit-SearchPath-0: ..\n"
|
17 |
|
18 |
#: ../includes/admin.php:15
|
19 |
+
msgid "Donate to keep the free XML Sitemap Feeds plugin development & support going!"
|
|
|
20 |
msgstr ""
|
21 |
|
22 |
#: ../includes/admin.php:15
|
23 |
+
msgid "These settings control the XML Sitemap generation."
|
|
|
24 |
msgstr ""
|
25 |
|
26 |
#: ../includes/admin.php:15
|
27 |
#, php-format
|
28 |
+
msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../includes/admin.php:15
|
32 |
+
msgid "Site Visibility"
|
|
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../includes/admin.php:15
|
36 |
msgid "Discourage search engines from indexing this site"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../includes/admin.php:39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgid "Regular XML Sitemaps"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../includes/admin.php:41
|
44 |
+
#: ../includes/admin.php:47
|
45 |
msgid "View"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: ../includes/admin.php:45
|
|
|
49 |
msgid "Google News Sitemap"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: ../includes/admin.php:123
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
#, php-format
|
54 |
+
msgid "Rules to append to %s generated by WordPress."
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: ../includes/admin.php:123
|
58 |
+
msgid "Warning: Only set rules here when you know what you are doing, otherwise you might break access to your site.<br />Note: These rules will not have effect when you are using a static robots.txt file."
|
|
|
|
|
|
|
|
|
|
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: ../includes/admin.php:185
|
62 |
+
msgid "XML Sitemaps"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: ../includes/admin.php:188
|
66 |
+
msgid "Enable XML sitemaps"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: ../includes/admin.php:191
|
70 |
+
msgid "Include post types"
|
|
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: ../includes/admin.php:194
|
74 |
+
msgid "Include taxonomies"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: ../includes/admin.php:201
|
78 |
msgid "Additional robots.txt rules"
|
79 |
msgstr ""
|
80 |
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,26 +1,24 @@
|
|
1 |
=== XML Sitemap & Google News Feeds ===
|
2 |
Contributors: RavanH
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&item_number=3%2e8&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us
|
4 |
-
Tags:
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 4.
|
8 |
|
9 |
-
Feeds that comply with the XML Sitemap and Google News protocol for
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
This plugin dynamically creates feeds that comply with the **XML Sitemap** and the **Google News Sitemap** protocol.
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
The XML Sitemap Index becomes instantly available on yourblog.url/sitemap.xml (or yourblog.url/?feed=sitemap) containing references to posts and pages by default, ready for indexing by search engines like Google, Yahoo, MSN, Ask.com and others. When the Google News Sitemap is activated, it will become available on yourblog.url/sitemap-news.xml (or yourblog.url/?feed=sitemap-news), ready for indexing by Google News. Both are automatically referenced in the dynamically created **robots.txt** on yourblog.url/robots.txt to tell search engines where to find your XML Sitemaps. And both are sent by ping to Google and Bing on each new publication.
|
20 |
|
21 |
Please read the FAQ's for info on how to get your articles listed on Google News.
|
22 |
|
23 |
-
**Compatible with caching plugins** like WP Super Cache, W3 Total Cache and Quick Cache that cache feeds, allowing a faster serving to the impatient (
|
24 |
|
25 |
**NOTES:**
|
26 |
|
@@ -28,33 +26,32 @@ Please read the FAQ's for info on how to get your articles listed on Google News
|
|
28 |
|
29 |
2. On large sites, it is advised to use a good caching plugin like **Quick Cache**, **WP Super Cache** or **W3 Total Cache** to improve your site _and_ sitemap performance.
|
30 |
|
31 |
-
=
|
32 |
|
|
|
33 |
* Completely **automatic** post URL _priority_ and _change frequency_ calculation based on post age and comment and trackback activity.
|
34 |
-
* Works out-of-the-box, even on **multi-site / shared codebase / multi-blog setups** like WordPress MU, WP 3.0 in MultiSite mode and others.
|
35 |
-
*
|
36 |
-
* Supports Google News tags (since version 4.2) in regular sitemaps.
|
37 |
-
* Pings Google and Bing on new post publication.
|
38 |
* Compatible with multi-lingual sites using **Polylang** to allow all languages to be indexed equally.
|
39 |
-
* Options to define which post types and taxonomies get included in the sitemap and automatic priority calculation rules.
|
40 |
-
* Set priority per post.
|
41 |
-
* Exclude individual posts or pages.
|
42 |
-
* Option to add new robots.txt rules. These can be used to further control (read: limit) the indexation of various parts of your site and subsequent spread of pagerank accross your sites pages.
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
= Translations =
|
46 |
|
47 |
-
- **Dutch** * Author: [R.A. van Hagen](http://status301.net) (version 4.
|
48 |
-
- **French** * Author: [R.A. van Hagen](http://status301.net) (version 4.
|
49 |
-
- **Indonesian** * Author: [Nasrulhaq Muiz](http://al-badar.net/) (version 4.2)
|
50 |
-
- **Serbian** * Author: [WPdiscounts](http://wpdiscounts.com) (version 4.1)
|
51 |
- **Ukrainian** * Author: [Cmd Software](http://www.cmd-soft.com/) (version 4.0)
|
52 |
|
53 |
New transtations will be accepted and listed here. See translation instructions under [Other Notes](http://wordpress.org/extend/plugins/xml-sitemap-feed/other_notes).
|
54 |
|
55 |
= Credits =
|
56 |
|
57 |
-
XML Sitemap Feed was originally based on the discontinued plugin Standard XML Sitemap Generator by Patrick Chia. Since then, it has been completely rewritten and extended in many ways.
|
58 |
|
59 |
|
60 |
== Installation ==
|
@@ -75,7 +72,7 @@ Follow these steps:
|
|
75 |
|
76 |
2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favourite FTP client to the /plugins/ folder.
|
77 |
|
78 |
-
3. Activate the plugin on the
|
79 |
|
80 |
4. If you have been using another XML Sitemap plugin before, check your site root and remove any created sitemap.xml file that remained there.
|
81 |
|
@@ -85,14 +82,22 @@ Done! Check your sparkling new XML Sitemap by visiting yourblogurl.tld/sitemap.x
|
|
85 |
|
86 |
Same as above but do a **Network Activate** to make a XML sitemap available for each site on your network.
|
87 |
|
|
|
|
|
|
|
|
|
88 |
Installed alongside [WordPress MU Sitewide Tags Pages](http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/), XML Sitemap Feed will **not** create a sitemap.xml nor change robots.txt for any **tag blogs**. This is done deliberately because they would be full of links outside the tags blogs own domain and subsequently ignored (or worse: penalised) by Google.
|
89 |
|
90 |
|
91 |
== Frequently Asked Questions ==
|
92 |
|
93 |
-
=
|
|
|
|
|
94 |
|
95 |
-
|
|
|
|
|
96 |
|
97 |
= How do I get my latest articles listed on Google News? =
|
98 |
|
@@ -102,23 +107,41 @@ You will also want to add the sitemap to your [Google Webmasters Tools account](
|
|
102 |
|
103 |
= My Google News Sitemap is empty! =
|
104 |
|
105 |
-
The rules of the Google News
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
= Can I manipulate values for priority and changefreq? =
|
108 |
|
109 |
-
Yes.
|
|
|
|
|
|
|
|
|
110 |
|
111 |
= Do I need to submit the sitemap to search engines? =
|
112 |
|
113 |
No. In normal circumstances, your site will be indexed by the major search engines before you know it. The search engines will be looking for a robots.txt file and (with this plugin activated) find a pointer in it to the XML Sitemap on your blog. The search engines will return on a regular basis to see if your site has updates.
|
|
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
**NOTE:** If you have a server _without rewrite rules_, use your blog _without fancy URLs_ (meaning, you have WordPress Permalinks set to the old default value) or have it installed in a _subdirectory_, then read **Do I need to change my robots.txt** for more instructions.
|
118 |
|
119 |
= Does this plugin ping search engines? =
|
120 |
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
= Do I need to change my robots.txt? =
|
124 |
|
@@ -141,9 +164,9 @@ If you already have a robots.txt file with another Sitemap reference like it, ju
|
|
141 |
|
142 |
No. While I would advise you to use any one of the nicer Permalink structures for better indexing, you might not be able to (or don't want to) do that. If so, you can still use this plugin:
|
143 |
|
144 |
-
Check to see if the URL
|
145 |
`
|
146 |
-
Sitemap: http://
|
147 |
|
148 |
User-agent: *
|
149 |
Allow: /
|
@@ -152,7 +175,7 @@ You can also choose to notify major search engines of your new XML sitemap manua
|
|
152 |
|
153 |
= Can I change the sitemap name/URL? =
|
154 |
|
155 |
-
No. If you have fancy URL's turned ON in WordPress (Permalinks), the sitemap url that you manually submit to Google (if you are impatient) should be `yourblogurl.tld/sitemap.xml` but if you have the Permalinks' Default option set the feed is only available via `
|
156 |
|
157 |
= Where can I customize the xml output? =
|
158 |
|
@@ -203,7 +226,7 @@ There is a know issue with WordPress (at least up to 2.8) not generating a robot
|
|
203 |
|
204 |
To get around this, you might either at least write one post and give it _Private_ status or alternatively create your own robots.txt file containing:
|
205 |
`
|
206 |
-
Sitemap: http://
|
207 |
|
208 |
User-agent: *
|
209 |
Allow: /
|
@@ -216,30 +239,30 @@ On some setups (usually using the WordPress MU Domain Mapping plugin) this error
|
|
216 |
|
217 |
= I see only a BLANK (white) page when opening the sitemap =
|
218 |
|
219 |
-
You might be experiencing an issue with your servers PHP memory limit. In those cases, you should see a messages like `PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted.` in your server/account error log file.
|
220 |
-
|
221 |
-
This can happen on large sites. To avoid these issues, there is an option to split posts over different sitemaps on Settings > Reading. Try different settings, each time revisiting the main sitemap index file and open different sitemaps listed there to check.
|
222 |
|
223 |
Read more on [Increasing memory allocated to PHP](http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP) (try a value higher than 256M) or ask your hosting provider what you can do.
|
224 |
|
225 |
-
= Can I run this on a WPMU / WP3+ Multi-Site setup? =
|
226 |
-
|
227 |
-
Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3+ both with normal activation and Network Activate / Site Wide Activate.
|
228 |
-
|
229 |
|
230 |
== Translation ==
|
231 |
|
232 |
1. Install PoEdit on your computer.
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
Thanks for sharing your translation :)
|
245 |
|
@@ -252,41 +275,12 @@ Thanks for sharing your translation :)
|
|
252 |
|
253 |
== Upgrade Notice ==
|
254 |
|
255 |
-
= 4.
|
256 |
-
Bugfix release
|
257 |
|
258 |
|
259 |
== Changelog ==
|
260 |
|
261 |
-
= 4.2.3 =
|
262 |
-
* BUGFIX: Empty ping options after disabling the main sitemap
|
263 |
-
* BUGFIX: Empty language tag for Google News tags in posts sitemap
|
264 |
-
* Small back end changes
|
265 |
-
* NEW: Custom post types split by year/month
|
266 |
-
|
267 |
-
= 4.2 =
|
268 |
-
* NEW: Image & News tags
|
269 |
-
* NEW: Exclude pages/posts
|
270 |
-
|
271 |
-
= 4.1.4 =
|
272 |
-
* BUGFIX: Pass by reference fatal error in PHP 5.4
|
273 |
-
* BUGFIX: issue with Polylang language code in pretty permalinks setting
|
274 |
-
* BUGFIX: unselected post types in sitemap
|
275 |
-
* BUGFIX: 1+ Priority for sticky posts with comments
|
276 |
-
* Dutch and French translations updated
|
277 |
-
|
278 |
-
= 4.1 =
|
279 |
-
* NEW: Ping Google and Bing on new publications
|
280 |
-
* NEW: Set priority per post
|
281 |
-
* NEW: Priority calculation options
|
282 |
-
* NEW: Option to split posts by year or month for faster generation of each sitemap
|
283 |
-
* Reduced queries to increase performance
|
284 |
-
* Improved Lastmod and Changefreq calculations
|
285 |
-
* Core class improvements
|
286 |
-
* Dropped qTranslate support
|
287 |
-
* Dropped PHP4 support
|
288 |
-
* BUGFIX: removed several PHP notices
|
289 |
-
|
290 |
= 4.0.1 =
|
291 |
* NEW: Dutch and French translations
|
292 |
* BUGFIX: Non public sites still have sitemap by default
|
1 |
=== XML Sitemap & Google News Feeds ===
|
2 |
Contributors: RavanH
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&item_number=3%2e8&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us
|
4 |
+
Tags: xml sitemap, news sitemap, sitemap.xml, multisite, Google, Google News, Yahoo, Bing, Live, MSN, seo, wpmu, feed
|
5 |
+
Requires at least: 3.1
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 4.0.1
|
8 |
|
9 |
+
Feeds that comply with the XML Sitemap and Google News protocol for fast indexing by Google, Yahoo, Bing, Ask and others. Multi-Site and Multi-Lingual compatible!
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
This plugin dynamically creates feeds that comply with the **XML Sitemap** and the **Google News Sitemap** protocol. It is Multi-Site and **Polylang** compatible and there are no files created. Some new options under the Privacy settings on **Settings > Reading** allow control over the sitemaps, which post and taxonomy types are included and any additional robots.txt rules.
|
14 |
|
15 |
+
You or site owners on your Multi-site network will not be bothered with complicated settings like other XML Sitemap plugins. XML sitemap values like ChangeFreq and URL Priority are auto-calculated based on post age and comment activity.
|
16 |
|
17 |
+
The feeds become instantly available: One XML Sitemap on yourblogurl.tld/sitemap.xml (or yourblogurl.tld/?feed=sitemap), ready for indexing by search engines like Google, Yahoo, MSN, Ask.com and others. And one Google News Sitemap on yourblogurl.tld/sitemap-news.xml (or yourblogurl.tld/?feed=sitemap-news), ready for indexing by Google News. Both are automatically referenced in the dynamically created **robots.txt** on yourblogurl.tld/robots.txt to tell search engines where to find your XML Sitemaps.
|
|
|
|
|
18 |
|
19 |
Please read the FAQ's for info on how to get your articles listed on Google News.
|
20 |
|
21 |
+
**Compatible with caching plugins** like WP Super Cache, W3 Total Cache and Quick Cache that cache feeds, allowing a faster serving to the hungry, impatient (!) spider.
|
22 |
|
23 |
**NOTES:**
|
24 |
|
26 |
|
27 |
2. On large sites, it is advised to use a good caching plugin like **Quick Cache**, **WP Super Cache** or **W3 Total Cache** to improve your site _and_ sitemap performance.
|
28 |
|
29 |
+
= Advantages =
|
30 |
|
31 |
+
* The main advantage of this plugin over other XML Sitemap plugins is **simplicity**. No need to change file or folder permissions, move files or spend time on a difficult plugin options page. In fact, there are no options at all!
|
32 |
* Completely **automatic** post URL _priority_ and _change frequency_ calculation based on post age and comment and trackback activity.
|
33 |
+
* Works out-of-the-box, even on **multi-site / shared codebase / multi-blog setups** like WordPress MU, WP 3.0 in MultiSite (WPMS) mode and others.
|
34 |
+
* Also works upon **Network Activate** or placed in **/mu-plugins/** on WP 3.0 in MS mode and WPMU and even takes care to exclude any tags blogs to avoid malus points for link spamming.
|
|
|
|
|
35 |
* Compatible with multi-lingual sites using **Polylang** to allow all languages to be indexed equally.
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
= Limitations =
|
38 |
+
|
39 |
+
* Except by _re-saving_ older posts from time to time (keeping the lastmod date fairly recent) there is no way to manually control the priority of individual posts/pages in the sitemap. See the Faq's for more.
|
40 |
+
* This plugin does not ping any search engines. But then, WordPress does this by default already via the Ping-o-Matic service so why bother? See the Faq's for more.
|
41 |
+
* Because the feed is dynamically created, on _very_ large sites the creation process might take a while. Search engines are said to have a short fuse about waiting for a sitemap, so you may want to consider using a cache plugin that also (pre)caches feeds. If you are unfamiliar with caching and server setup start with an easy caching plugin such as **Quick Cache**. For more options (and better performance) you might find solace in **WP Super Cache** or **W3 Total Cache**.
|
42 |
+
* On **VERY** large sites (read: over 10.000 posts) with limited memory assigned to PHP, the generation of the sitemap might cause a problem when the process runs out of memory. See the FAQ's for tips to increase the PHP memory limit on your server.
|
43 |
|
44 |
= Translations =
|
45 |
|
46 |
+
- **Dutch** * Author: [R.A. van Hagen](http://status301.net) (version 4.0)
|
47 |
+
- **French** * Author: [R.A. van Hagen](http://status301.net) (version 4.0)
|
|
|
|
|
48 |
- **Ukrainian** * Author: [Cmd Software](http://www.cmd-soft.com/) (version 4.0)
|
49 |
|
50 |
New transtations will be accepted and listed here. See translation instructions under [Other Notes](http://wordpress.org/extend/plugins/xml-sitemap-feed/other_notes).
|
51 |
|
52 |
= Credits =
|
53 |
|
54 |
+
XML Sitemap Feed was originally based on the discontinued plugin Standard XML Sitemap Generator by Patrick Chia. Many thanks! Since then, it has been completely rewritten and extended in many ways.
|
55 |
|
56 |
|
57 |
== Installation ==
|
72 |
|
73 |
2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favourite FTP client to the /plugins/ folder.
|
74 |
|
75 |
+
3. Activate the plugin on the Plug-ins page.
|
76 |
|
77 |
4. If you have been using another XML Sitemap plugin before, check your site root and remove any created sitemap.xml file that remained there.
|
78 |
|
82 |
|
83 |
Same as above but do a **Network Activate** to make a XML sitemap available for each site on your network.
|
84 |
|
85 |
+
= Wordpress MU =
|
86 |
+
|
87 |
+
The plugin works best from the **/mu-plugins/** folder where it runs quietly in the background without bothering any blog owner with new options or the need for special knowledge of XML Sitemap submission. Just upload the complete package content to /mu-plugins/ and move the file xml-sitemap.php from the new /mu-plugins/xml-sitemap-feed/ to /mu-plugins/.
|
88 |
+
|
89 |
Installed alongside [WordPress MU Sitewide Tags Pages](http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/), XML Sitemap Feed will **not** create a sitemap.xml nor change robots.txt for any **tag blogs**. This is done deliberately because they would be full of links outside the tags blogs own domain and subsequently ignored (or worse: penalised) by Google.
|
90 |
|
91 |
|
92 |
== Frequently Asked Questions ==
|
93 |
|
94 |
+
= Can I run this on a WPMU / WP3+ Multi-Site setup? =
|
95 |
+
|
96 |
+
Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3.0.1 both with normal activation and with Network Activate / Site Wide Activate.
|
97 |
|
98 |
+
= Can I run this plugin from /mu-plugins/ on WP3.0 MS or WPMU ? =
|
99 |
+
|
100 |
+
Yes. Upload the complete /xml-sitemap-feed/ directory to /wp-content/mu-plugins/ and move the file xml-sitemap.php one dir up.
|
101 |
|
102 |
= How do I get my latest articles listed on Google News? =
|
103 |
|
107 |
|
108 |
= My Google News Sitemap is empty! =
|
109 |
|
110 |
+
The rules of the Google News game are that you do not feed the cookie monster any stale food. Older than 2 days is bad. You need to bake him some fresh bread ;)
|
111 |
+
|
112 |
+
= How are the values for priority and changefreq calculated? =
|
113 |
+
|
114 |
+
The front page has a fixed priority of 100% (1.0). When your site has more posts than pages (you must be using WordPress for a blog), pages have a default priority of 40% (0.4) and posts have a default priority of 80% (0.8). If your site has more pages than posts (you must be using WordPress as CMS), pages have a default priority of 80% (0.8) and posts have a default priority of 40% (0.4).
|
115 |
+
|
116 |
+
Page and post priority can vary between 0% (0.0) and 100% (1.0). Page priority depends on the page level (decreasing 10% for each sub-level) and relative number of comments. Post priority depends on relative number of comments and relative last comment age or (when the post has no comments) last post modification age.
|
117 |
+
|
118 |
+
The changefreq of the front page is fixed to daily and calculated for pages and post to either daily, weekly, monthly or yearly depending on age and comment activity.
|
119 |
+
|
120 |
+
Dynamic pages like category pages, tag pages and archive pages are not listed in the XML Sitemap.
|
121 |
|
122 |
= Can I manipulate values for priority and changefreq? =
|
123 |
|
124 |
+
Yes and No. This plugin has no options page so there is no way to manually set the priority of urls in the sitemap. But there is automatic post priority calculation based on _post modifaction date_ and _comment activity_, that can either make post priority go to 100% (1.0) for posts with many and recent comments or 0% (0) for the oldest posts with no comments.
|
125 |
+
|
126 |
+
This feature can be used to your advantage: by re-saving your most important older posts from time to time, keeping the **lastmod date** fairly recent, you can ensure a priority of at least 80% (0.8) for those URLs. And if you have enough comments on on those pages, the priority can even go up to 100% (1.0).
|
127 |
+
|
128 |
+
If you cannot live with these rules, edit the values `$min_priority`, `$max_priority` and `$frontpage_priority` in xml-sitemap-feed/feed-sitemap.php but be careful to NOT do an automatic upgrade or it will overwrite your customisation.
|
129 |
|
130 |
= Do I need to submit the sitemap to search engines? =
|
131 |
|
132 |
No. In normal circumstances, your site will be indexed by the major search engines before you know it. The search engines will be looking for a robots.txt file and (with this plugin activated) find a pointer in it to the XML Sitemap on your blog. The search engines will return on a regular basis to see if your site has updates.
|
133 |
+
( Read more about _Ping-O-Matic_ under **Does this plugin ping search engines** (below) to make sure your site is under _normal circumstances_ ;) )
|
134 |
|
135 |
+
**But** if you have a server _without rewrite rules_, use your blog _without fancy URLs_ (meaning, you have WordPress Permalinks set to the old Default value) or have it installed in a _subdirectory_, read **Do I need to change my robots.txt** for more instructions.
|
|
|
|
|
136 |
|
137 |
= Does this plugin ping search engines? =
|
138 |
|
139 |
+
No. While other XML Sitemap plugins provide pinging to some search engines upon each post edit or publication, this plugin does not. There are two reasons for that:
|
140 |
+
|
141 |
+
1. WordPress has a built-in pinging feature. Go in your WP Admin section to Settings > Writing and make sure that the text area under **Update services** contains at least `http://rpc.pingomatic.com`. Read more on [Ping-O-Matic](http://pingomatic.com) about what excellent service you are actually getting _for free with every WordPress blog_ installation!
|
142 |
+
1. For the average website, in my experience, pinging Google or others after each little change does not benefit anything except a theoretical smaller delay in re-indexation of your website. This is only theoretical because if your site is popular and active, major search engines will likely be crawling your site on a very regular basis anyway. And if, on the other hand, your site is not high on the agenda of the major search engines, they will likely give no priority to your pings at all.
|
143 |
+
|
144 |
+
You can always take a [Google Webmasters Tools account](https://www.google.com/webmasters/tools/) which will tell you many interesting things about your website, sitemap downloads, search terms and your visitors. Try it!
|
145 |
|
146 |
= Do I need to change my robots.txt? =
|
147 |
|
164 |
|
165 |
No. While I would advise you to use any one of the nicer Permalink structures for better indexing, you might not be able to (or don't want to) do that. If so, you can still use this plugin:
|
166 |
|
167 |
+
Check to see if the URL yourblogurl.tld/?feed=sitemap does produce a feed. Now manually upload your own robots.txt file to your website root containing:
|
168 |
`
|
169 |
+
Sitemap: http://yourblogurl.tld/?feed=sitemap
|
170 |
|
171 |
User-agent: *
|
172 |
Allow: /
|
175 |
|
176 |
= Can I change the sitemap name/URL? =
|
177 |
|
178 |
+
No. If you have fancy URL's turned ON in WordPress (Permalinks), the sitemap url that you manually submit to Google (if you are impatient) should be `yourblogurl.tld/sitemap.xml` but if you have the Permalinks' Default option set the feed is only available via `yourblogurl.tld/?feed=sitemap`.
|
179 |
|
180 |
= Where can I customize the xml output? =
|
181 |
|
226 |
|
227 |
To get around this, you might either at least write one post and give it _Private_ status or alternatively create your own robots.txt file containing:
|
228 |
`
|
229 |
+
Sitemap: http://yourblogurl.tld/sitemap.xml
|
230 |
|
231 |
User-agent: *
|
232 |
Allow: /
|
239 |
|
240 |
= I see only a BLANK (white) page when opening the sitemap =
|
241 |
|
242 |
+
You might be experiencing an issue with your servers PHP memory limit. The plugin attempts to increase the memory limit to 256M by itself but in some rare cases that does not work. Or your site is just so big that that is not even enough... In those cases, you should see a messages like `PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted.` in your server/account error log file.
|
|
|
|
|
243 |
|
244 |
Read more on [Increasing memory allocated to PHP](http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP) (try a value higher than 256M) or ask your hosting provider what you can do.
|
245 |
|
|
|
|
|
|
|
|
|
246 |
|
247 |
== Translation ==
|
248 |
|
249 |
1. Install PoEdit on your computer.
|
250 |
+
|
251 |
+
2. Open the template translation database xml-sitemap-xx_XX.po in this plugins /languages/ directory with PoEdit.
|
252 |
+
|
253 |
+
3. Go to Edit > Preferences and on the tab Editor check the option to compile a .mo database on save automatically. Close with OK.
|
254 |
+
|
255 |
+
4. Go to Catalog > Settings and set your name, e-mail address, language and country. Close with OK.
|
256 |
+
|
257 |
+
5. Go to Catalog > Update from POT-file and select the main xml-sitemap-feed.pot file. Then accept all new and removed translation strings with OK.
|
258 |
+
|
259 |
+
6. Now go ahead and start translating all the texts listed in PoEdit.
|
260 |
+
|
261 |
+
7. When done, go to File > Save as... and replace the xx_XX in the file name with the appropriate language and country code for your translation. Leave the rest of the file name the same and Save.
|
262 |
+
|
263 |
+
8. Upload the automatically created xml-sitemap-feed-xx_XX.mo database file (where xx_XX should now be your language and country code) to the plugins /languages/ directory on your WordPress site.
|
264 |
+
|
265 |
+
9. After verifying the translations work on your site, send the .mo file to ravanhagen@gmail.com and don't forget to tell me how and with what link you would like to be mentioned in the credits!
|
266 |
|
267 |
Thanks for sharing your translation :)
|
268 |
|
275 |
|
276 |
== Upgrade Notice ==
|
277 |
|
278 |
+
= 4.0.1 =
|
279 |
+
Bugfix release.
|
280 |
|
281 |
|
282 |
== Changelog ==
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
= 4.0.1 =
|
285 |
* NEW: Dutch and French translations
|
286 |
* BUGFIX: Non public sites still have sitemap by default
|
xml-sitemap.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/*
|
3 |
Plugin Name: XML Sitemap & Google News Feeds
|
4 |
Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
|
5 |
-
Description:
|
6 |
Text Domain: xml-sitemap-feed
|
7 |
-
Version: 4.
|
8 |
Author: RavanH
|
9 |
Author URI: http://status301.net/
|
10 |
*/
|
@@ -48,15 +48,6 @@ if(!empty($_SERVER['SCRIPT_FILENAME']) && 'xml-sitemap.php' == basename($_SERVER
|
|
48 |
* CONSTANTS
|
49 |
* -------------------- */
|
50 |
|
51 |
-
define('XMLSF_VERSION', '4.2.3');
|
52 |
-
|
53 |
-
if ( file_exists ( dirname(__FILE__).'/xml-sitemap-feed' ) )
|
54 |
-
define('XMLSF_PLUGIN_DIR', dirname(__FILE__) . '/xml-sitemap-feed');
|
55 |
-
else
|
56 |
-
define('XMLSF_PLUGIN_DIR', dirname(__FILE__));
|
57 |
-
|
58 |
-
define('XMLSF_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
59 |
-
|
60 |
/* The following constants can be used to change plugin defaults by defining them in wp-config.php */
|
61 |
|
62 |
/*
|
@@ -113,6 +104,15 @@ if ( !defined('XMLSF_NEWS_POST_TYPE') )
|
|
113 |
*/
|
114 |
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
/* -------------------------------------
|
118 |
* MISSING WORDPRESS FUNCTIONS
|
2 |
/*
|
3 |
Plugin Name: XML Sitemap & Google News Feeds
|
4 |
Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
|
5 |
+
Description: Creates a feed that complies with the XML Sitemap protocol ready for indexing by Google, Yahoo, Bing, Ask and others. Happy with it? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&item_number=4%2e0&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">Tip</a></strong> for development and support time. Thanks :)
|
6 |
Text Domain: xml-sitemap-feed
|
7 |
+
Version: 4.0.1
|
8 |
Author: RavanH
|
9 |
Author URI: http://status301.net/
|
10 |
*/
|
48 |
* CONSTANTS
|
49 |
* -------------------- */
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
/* The following constants can be used to change plugin defaults by defining them in wp-config.php */
|
52 |
|
53 |
/*
|
104 |
*/
|
105 |
|
106 |
|
107 |
+
/* The following constants should not be changed */
|
108 |
+
|
109 |
+
define('XMLSF_VERSION', '4.0.1');
|
110 |
+
|
111 |
+
if ( file_exists ( dirname(__FILE__).'/xml-sitemap-feed' ) )
|
112 |
+
define('XMLSF_PLUGIN_DIR', dirname(__FILE__) . '/xml-sitemap-feed');
|
113 |
+
else
|
114 |
+
define('XMLSF_PLUGIN_DIR', dirname(__FILE__));
|
115 |
+
|
116 |
|
117 |
/* -------------------------------------
|
118 |
* MISSING WORDPRESS FUNCTIONS
|