Version Description
New: Split posts by year to improve generate speed and priority settings. Many new options. Ping search engines. Bugfixes.
=
Download this release
Release Info
Developer | RavanH |
Plugin | XML Sitemap & Google News feeds |
Version | 4.1.4 |
Comparing to | |
See all releases |
Code changes from version 3.9.2 to 4.1.4
- XMLSitemapFeed.class.php +0 -223
- feed-sitemap-news.php +0 -84
- feed-sitemap.php +0 -151
- hacks.php +202 -191
- sitemapxml.gif → images/sitemapxml.gif +0 -0
- includes/admin.php +402 -0
- includes/core.php +766 -0
- includes/feed-sitemap-home.php +46 -0
- includes/feed-sitemap-news.php +146 -0
- includes/feed-sitemap-post_type.php +59 -0
- includes/feed-sitemap-taxonomy.php +105 -0
- includes/feed-sitemap.php +63 -0
- includes/xsl/sitemap-index.xsl.php +54 -0
- includes/xsl/sitemap-news.xsl.php +52 -0
- includes/xsl/sitemap.xsl.php +54 -0
- languages/instructions.txt +27 -0
- languages/xml-sitemap-feed-fr_FR.mo +0 -0
- languages/xml-sitemap-feed-fr_FR.po +217 -0
- languages/xml-sitemap-feed-nl_NL.mo +0 -0
- languages/xml-sitemap-feed-nl_NL.po +244 -0
- languages/xml-sitemap-feed-sr_RS.mo +0 -0
- languages/xml-sitemap-feed-sr_RS.po +264 -0
- languages/xml-sitemap-feed-ua_UA.mo +0 -0
- languages/xml-sitemap-feed-ua_UA.po +86 -0
- languages/xml-sitemap-feed-xx_XX.po +212 -0
- languages/xml-sitemap-feed.pot +206 -0
- readme.txt +117 -82
- sitemap-news.xsl.php +0 -8
- sitemap.xsl.php +0 -8
- xml-sitemap.php +71 -30
XMLSitemapFeed.class.php
DELETED
@@ -1,223 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* ------------------------------
|
3 |
-
* XMLSitemapFeed CLASS
|
4 |
-
* ------------------------------ */
|
5 |
-
|
6 |
-
class XMLSitemapFeed {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* FEEDS
|
10 |
-
*/
|
11 |
-
|
12 |
-
// set up the sitemap template
|
13 |
-
public static function load_template() {
|
14 |
-
load_template( XMLSF_PLUGIN_DIR . '/feed-sitemap.php' );
|
15 |
-
}
|
16 |
-
|
17 |
-
// set up the news sitemap template
|
18 |
-
public static function load_template_news() {
|
19 |
-
load_template( XMLSF_PLUGIN_DIR . '/feed-sitemap-news.php' );
|
20 |
-
}
|
21 |
-
|
22 |
-
// override default feed limit
|
23 |
-
public static function filter_limits( $limits ) {
|
24 |
-
return 'LIMIT 0, 49999';
|
25 |
-
}
|
26 |
-
|
27 |
-
// Create a new filtering function that will add a where clause to the query,
|
28 |
-
// used for the Google News Sitemap
|
29 |
-
public static function filter_news_where($where = '') {
|
30 |
-
//posts from the last 2 days (48 hours + 1 hour to be sure)
|
31 |
-
return $where . " AND post_date > '" . date('Y-m-d', strtotime('-49 hours')) . "'";
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* REWRITES
|
36 |
-
*/
|
37 |
-
|
38 |
-
// add sitemap rewrite rules
|
39 |
-
public static function rewrite($wp_rewrite) {
|
40 |
-
$feed_rules = array(
|
41 |
-
XMLSF_NAME . '$' => $wp_rewrite->index . '?feed=sitemap',
|
42 |
-
XMLSF_NEWS_NAME . '$' => $wp_rewrite->index . '?feed=sitemap-news',
|
43 |
-
);
|
44 |
-
$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Remove the trailing slash from permalinks that have an extension,
|
49 |
-
* such as /sitemap.xml (thanks to Permalink Editor plugin for WordPress)
|
50 |
-
*
|
51 |
-
* @param string $request
|
52 |
-
*/
|
53 |
-
|
54 |
-
public static function trailingslash($request) {
|
55 |
-
if (pathinfo($request, PATHINFO_EXTENSION)) {
|
56 |
-
return untrailingslashit($request);
|
57 |
-
}
|
58 |
-
return $request; //trailingslashit($request);
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* ROBOTSTXT
|
63 |
-
*/
|
64 |
-
|
65 |
-
// add sitemap location in robots.txt generated by WP
|
66 |
-
// available filter : xml_sitemap_url
|
67 |
-
public static function robots() {
|
68 |
-
|
69 |
-
// hook for filter 'xml_sitemap_url' provides an array here and MUST get an array returned
|
70 |
-
$blog_url = trailingslashit(get_bloginfo('url'));
|
71 |
-
$sitemap_array = apply_filters('xml_sitemap_url',array($blog_url.XMLSF_NAME,$blog_url.XMLSF_NEWS_NAME));
|
72 |
-
|
73 |
-
echo "\n# XML Sitemap Feed ".XMLSF_VERSION." (http://status301.net/wordpress-plugins/xml-sitemap-feed/)";
|
74 |
-
|
75 |
-
if ( is_array($sitemap_array) && !empty($sitemap_array) )
|
76 |
-
foreach ( $sitemap_array as $url )
|
77 |
-
echo "\nSitemap: " . $url;
|
78 |
-
else
|
79 |
-
echo "\n# Warning: xml sitemap url is missing, was filtered out or filter did not return an array.";
|
80 |
-
|
81 |
-
echo "\n\n";
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* DE-ACTIVATION
|
86 |
-
*/
|
87 |
-
|
88 |
-
public static function deactivate() {
|
89 |
-
remove_filter('generate_rewrite_rules', array(__CLASS__, 'rewrite') );
|
90 |
-
delete_option('xml-sitemap-feed-version');
|
91 |
-
global $wp_rewrite;
|
92 |
-
$wp_rewrite->flush_rules();
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* REQUEST FILTER
|
97 |
-
*/
|
98 |
-
|
99 |
-
public static function filter_request( $request ) {
|
100 |
-
if (isset($request['feed'])) {
|
101 |
-
if ( $request['feed'] == 'sitemap' ) {
|
102 |
-
add_filter( 'post_limits', array( __CLASS__, 'filter_limits' ) );
|
103 |
-
|
104 |
-
$types_arr = explode(',',XMLSF_POST_TYPE);
|
105 |
-
$request['post_type'] = (in_array('any',$types_arr)) ? 'any' : $types_arr;
|
106 |
-
$request['orderby'] = 'modified';
|
107 |
-
}
|
108 |
-
if ( $request['feed'] == 'sitemap-news' ) {
|
109 |
-
add_filter( 'post_limits', array( __CLASS__, 'filter_limits' ) );
|
110 |
-
add_filter( 'posts_where', array( __CLASS__, 'filter_news_where' ), 10, 1 );
|
111 |
-
|
112 |
-
$types_arr = explode(',',XMLSF_NEWS_POST_TYPE);
|
113 |
-
$request['post_type'] = (in_array('any',$types_arr)) ? 'any' : $types_arr;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
return $request;
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* MULTI-LANGUAGE PLUGIN FILTERS
|
122 |
-
*/
|
123 |
-
|
124 |
-
// Polylang
|
125 |
-
public static function polylang($input) {
|
126 |
-
global $polylang;
|
127 |
-
$options = get_option('polylang');
|
128 |
-
|
129 |
-
if (is_array($input)) { // got an array? return one!
|
130 |
-
if ('1' == $options['force_lang'] )
|
131 |
-
foreach ( $input as $url )
|
132 |
-
foreach($polylang->get_languages_list() as $language)
|
133 |
-
$return[] = $polylang->add_language_to_link($url,$language);
|
134 |
-
else
|
135 |
-
foreach ( $input as $url )
|
136 |
-
foreach($polylang->get_languages_list() as $language)
|
137 |
-
$return[] = add_query_arg('lang', $language->slug, $url);
|
138 |
-
} else { // not an array? do nothing, Polylang does all the work :)
|
139 |
-
$return = $input;
|
140 |
-
}
|
141 |
-
|
142 |
-
return $return;
|
143 |
-
}
|
144 |
-
|
145 |
-
// qTranslate
|
146 |
-
public static function qtranslate($input) {
|
147 |
-
global $q_config;
|
148 |
-
|
149 |
-
if (is_array($input)) // got an array? return one!
|
150 |
-
foreach ( $input as $url )
|
151 |
-
foreach($q_config['enabled_languages'] as $language)
|
152 |
-
$return[] = qtrans_convertURL($url,$language);
|
153 |
-
else // not an array? just convert the string.
|
154 |
-
$return = qtrans_convertURL($input);
|
155 |
-
|
156 |
-
return $return;
|
157 |
-
}
|
158 |
-
|
159 |
-
// xLanguage
|
160 |
-
public static function xlanguage($input) {
|
161 |
-
global $xlanguage;
|
162 |
-
|
163 |
-
if (is_array($input)) // got an array? return one!
|
164 |
-
foreach ( $input as $url )
|
165 |
-
foreach($xlanguage->options['language'] as $language)
|
166 |
-
$return[] = $xlanguage->filter_link_in_lang($url,$language['code']);
|
167 |
-
else // not an array? just convert the string.
|
168 |
-
$return = $xlanguage->filter_link($input);
|
169 |
-
|
170 |
-
return $return;
|
171 |
-
}
|
172 |
-
|
173 |
-
public static function init() {
|
174 |
-
|
175 |
-
global $wpdb, $query;
|
176 |
-
|
177 |
-
if ( '0' == get_option( 'blog_public' ) || ( $wpdb->blogid && function_exists('get_site_option') && get_site_option('tags_blog_id') == $wpdb->blogid ) )
|
178 |
-
return;
|
179 |
-
// we are on a blog that blocks spiders! >> create NO sitemap
|
180 |
-
// - OR -
|
181 |
-
// we are on wpmu and this is a tags blog! >> create NO sitemap
|
182 |
-
// since it will be full of links outside the blogs own domain...
|
183 |
-
|
184 |
-
// DE-ACTIVATION
|
185 |
-
register_deactivation_hook( XMLSF_PLUGIN_DIR . '/xml-sitemap.php', array(__CLASS__, 'deactivate') );
|
186 |
-
|
187 |
-
// FEEDS
|
188 |
-
add_action('do_feed_sitemap', array(__CLASS__, 'load_template'), 10, 1);
|
189 |
-
add_action('do_feed_sitemap-news', array(__CLASS__, 'load_template_news'), 10, 1);
|
190 |
-
|
191 |
-
// REWRITES
|
192 |
-
add_filter('generate_rewrite_rules', array(__CLASS__, 'rewrite') );
|
193 |
-
add_filter('user_trailingslashit', array(__CLASS__, 'trailingslash') );
|
194 |
-
|
195 |
-
// FLUSH RULES after (site wide) plugin upgrade
|
196 |
-
if (get_option('xml-sitemap-feed-version') != XMLSF_VERSION) {
|
197 |
-
update_option('xml-sitemap-feed-version', XMLSF_VERSION);
|
198 |
-
global $wp_rewrite;
|
199 |
-
$wp_rewrite->flush_rules();
|
200 |
-
// TODO fix PHP Fatal error:Call to a member function flush_rules() on a non-object in /var/www/wordpress/wp-content/plugins/xml-sitemap-feed/XMLSitemapFeed.class.php after (any?) plugin upgrade
|
201 |
-
}
|
202 |
-
|
203 |
-
// ROBOTSTXT
|
204 |
-
add_action('do_robotstxt', array(__CLASS__, 'robots') );
|
205 |
-
|
206 |
-
// REQUEST
|
207 |
-
add_filter('request', array(__CLASS__, 'filter_request'), 1 );
|
208 |
-
|
209 |
-
|
210 |
-
// LANGUAGE PLUGINS
|
211 |
-
// check for Polylang and add filter
|
212 |
-
global $polylang;
|
213 |
-
if (isset($polylang))
|
214 |
-
add_filter('xml_sitemap_url', array(__CLASS__, 'polylang'), 99);
|
215 |
-
// check for qTranslate and add filter
|
216 |
-
elseif (defined('QT_LANGUAGE'))
|
217 |
-
add_filter('xml_sitemap_url', array(__CLASS__, 'qtranslate'), 99);
|
218 |
-
// check for xLanguage and add filter
|
219 |
-
elseif (defined('xLanguageTagQuery'))
|
220 |
-
add_filter('xml_sitemap_url', array(__CLASS__, 'xlanguage'), 99);
|
221 |
-
}
|
222 |
-
|
223 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
feed-sitemap-news.php
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Google News Sitemap Feed Template
|
4 |
-
*
|
5 |
-
* @package XML Sitemap Feed plugin for WordPress
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( !have_posts() ) :
|
9 |
-
|
10 |
-
// No posts? Temporary redirect to the main xml sitemap.
|
11 |
-
wp_redirect( 'sitemap.xml' ); // default 302... maybe 304 not modified is better?
|
12 |
-
exit;
|
13 |
-
|
14 |
-
// ALTERNATIVE:
|
15 |
-
// No posts? Then go and get at least one last post to prevent GWT validation error.
|
16 |
-
// Remove the filtering functions
|
17 |
-
remove_filter( 'posts_where', array( 'XMLSitemapFeed', 'filter_news_where' ), 10, 1 );
|
18 |
-
remove_filter( 'post_limits', array( 'XMLSitemapFeed', 'filter_limits' ) );
|
19 |
-
|
20 |
-
// Perform the alternative query
|
21 |
-
query_posts( 'posts_per_page=1' );
|
22 |
-
|
23 |
-
global $wp_query;
|
24 |
-
$wp_query->is_404 = false; // force is_404() condition to false when on site without posts
|
25 |
-
$wp_query->is_feed = true; // force is_feed() condition to true so WP Super Cache includes
|
26 |
-
// the sitemap in its feeds cache
|
27 |
-
|
28 |
-
endif;
|
29 |
-
|
30 |
-
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
|
31 |
-
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
|
32 |
-
|
33 |
-
echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?><?xml-stylesheet type="text/xsl" href="' . plugins_url('',__FILE__) . '/sitemap-news.xsl.php?ver=' . XMLSF_VERSION . '"?>
|
34 |
-
<!-- generated-on="'.date('Y-m-d\TH:i:s+00:00').'" -->
|
35 |
-
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
36 |
-
<!-- generator-url="http://4visions.nl/wordpress-plugins/xml-sitemap-feed/" -->
|
37 |
-
<!-- generator-version="'.XMLSF_VERSION.'" -->
|
38 |
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">';
|
39 |
-
|
40 |
-
$maxURLS = 1000; // maximum number of URLs allowed in a news sitemap.
|
41 |
-
|
42 |
-
// editing below here is not advised!
|
43 |
-
|
44 |
-
// prepare counter to limit the number of URLs to the absolute max of $maxURLS
|
45 |
-
$counter = 1;
|
46 |
-
|
47 |
-
// loop away!
|
48 |
-
while ( have_posts() && $counter < $maxURLS ) : the_post();
|
49 |
-
|
50 |
-
// check if we are not dealing with an external URL :: Thanks, Francois Deschenes :)
|
51 |
-
if(!preg_match('/^' . preg_quote(home_url(), '/') . '/i', get_permalink())) continue;
|
52 |
-
|
53 |
-
// get the article tags
|
54 |
-
$keys_arr = get_the_tags();
|
55 |
-
|
56 |
-
// TODO : include categories too ??
|
57 |
-
|
58 |
-
?>
|
59 |
-
<url><loc><?php echo esc_url( get_permalink() ) ?></loc><news:news><news:publication><news:name><?php if(defined('XMLSF_GOOGLE_NEWS_NAME')) echo strip_tags(XMLSF_GOOGLE_NEWS_NAME); else echo strip_tags(get_bloginfo('name')); ?></news:name><news:language><?php echo reset(explode('-', get_bloginfo_rss('language'))); /*bloginfo_rss('language') returns impropper format*/ ?></news:language></news:publication><news:publication_date><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date><news:title><?php echo strip_tags(get_the_title(get_the_ID())); ?></news:title><news:keywords><?php $comma = 0; if ($keys_arr) foreach($keys_arr as $key) { if ( $comma == 1 ) { echo ', '; } echo $key->name; $comma = 1; } ?></news:keywords><news:genres>Blog</news:genres></news:news></url><?php
|
60 |
-
|
61 |
-
$counter++;
|
62 |
-
|
63 |
-
endwhile;
|
64 |
-
|
65 |
-
// Now what if there are no posts less than 48 hours old? We get an urlset without url nodes...
|
66 |
-
// ... resulting in an error by Google Webmaster Tools :(
|
67 |
-
// But what can we do? Nothing, I suppose.
|
68 |
-
|
69 |
-
//else :
|
70 |
-
|
71 |
-
// echo '<url><loc></loc><news:news><news:publication><news:name>';
|
72 |
-
// bloginfo('name');
|
73 |
-
// echo '</news:name><news:language>' . get_option('rss_language') . '</news:language></news:publication><news:publication_date></news:publication_date><news:title></news:title><news:keywords></news:keywords><news:genres>Blog</news:genres></news:news></url>';
|
74 |
-
|
75 |
-
// TODO see what we can do for :
|
76 |
-
//<news:access>Subscription</news:access> (for now always leave off)
|
77 |
-
// and
|
78 |
-
//<news:genres>Blog</news:genres> (for now leave as Blog)
|
79 |
-
// http://www.google.com/support/news_pub/bin/answer.py?answer=93992
|
80 |
-
|
81 |
-
// lees over indienen:
|
82 |
-
// http://www.google.com/support/news_pub/bin/answer.py?hl=nl&answer=74289
|
83 |
-
|
84 |
-
?></urlset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
feed-sitemap.php
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* XML Sitemap Feed Template for displaying an XML Sitemap feed.
|
4 |
-
*
|
5 |
-
* @package XML Sitemap Feed plugin for WordPress
|
6 |
-
*/
|
7 |
-
|
8 |
-
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
|
9 |
-
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
|
10 |
-
|
11 |
-
echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?><?xml-stylesheet type="text/xsl" href="' . plugins_url('/sitemap.xsl.php',XMLSF_PLUGIN_DIR . '/feed-sitemap.php') . '?ver=' . XMLSF_VERSION . '"?>
|
12 |
-
<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->
|
13 |
-
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
14 |
-
<!-- generator-url="http://4visions.nl/wordpress-plugins/xml-sitemap-feed/" -->
|
15 |
-
<!-- generator-version="' . XMLSF_VERSION . '" -->
|
16 |
-
';
|
17 |
-
|
18 |
-
// PRESETS are changable -- please read comments:
|
19 |
-
|
20 |
-
$max_priority = 1.0; // Maximum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
21 |
-
$min_priority = 0; // Minimum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
22 |
-
// NOTE: Changing these values will influence each URL's priority. Priority values are taken by
|
23 |
-
// search engines to represent RELATIVE priority within the site domain. Forcing all URLs
|
24 |
-
// to a priority of above 0.5 or even fixing them all to 1.0 - for example - is useless.
|
25 |
-
$frontpage_priority = 1.0; // Your front page priority, usually the same as max priority but if you have any reason
|
26 |
-
// to change it, please be my guest; set to any other value between 0 and 1.
|
27 |
-
|
28 |
-
//$maxURLS = 50000; // maximum number of URLs allowed in any sitemap.
|
29 |
-
$level_weight = 0.1; // Makes a sub-page loose 10% for each level; set to any other value between 0 and 1.
|
30 |
-
$month_weight = 0.1; // Fall-back value normally ignored by automatic priority calculation, which
|
31 |
-
// makes a post loose 10% of priority monthly; set to any other value between 0 and 1.
|
32 |
-
|
33 |
-
// EDITING below here is NOT ADVISED!
|
34 |
-
|
35 |
-
// Memory issue fix will try to increase allowed PHP memory size to XMLSF_MEMORY_LIMIT constant
|
36 |
-
// as set in xml-sitemap.php if the current memory limit is lower than that.
|
37 |
-
if ( function_exists('memory_get_usage') ) {
|
38 |
-
echo '<!-- memory-limit="' . @ini_get('memory_limit') . '" -->
|
39 |
-
';
|
40 |
-
if ( (int) @ini_get('memory_limit') < abs(intval(XMLSF_MEMORY_LIMIT)) ) {
|
41 |
-
if ( $memory_limit = @ini_set('memory_limit', XMLSF_MEMORY_LIMIT) )
|
42 |
-
echo '<!-- memory-limit increased ' . ( abs(intval(XMLSF_MEMORY_LIMIT)) - (int) $memory_limit ) . 'M to ' . abs(intval(XMLSF_MEMORY_LIMIT)) . 'M successfully -->
|
43 |
-
';
|
44 |
-
else
|
45 |
-
echo '<!-- memory-limit increase failed, trying anyway... -->
|
46 |
-
';
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
// setup site variables
|
51 |
-
$_post_count = wp_count_posts('post');
|
52 |
-
$_page_count = wp_count_posts('page');
|
53 |
-
$_totalcommentcount = wp_count_comments();
|
54 |
-
|
55 |
-
$lastmodified_gmt = get_lastmodified('GMT'); // last posts or page modified date
|
56 |
-
$lastmodified = mysql2date('U',$lastmodified_gmt); // last posts or page modified date in Unix seconds
|
57 |
-
$firstmodified = mysql2date('U',get_firstmodified('GMT')); // uses new get_firstmodified() function defined in xml-sitemap/hacks.php !
|
58 |
-
|
59 |
-
// calculated presets
|
60 |
-
if ($_totalcommentcount->approved > 0)
|
61 |
-
$comment_weight = ($max_priority - $min_priority) / $_totalcommentcount->approved;
|
62 |
-
else
|
63 |
-
$comment_weight = 0;
|
64 |
-
|
65 |
-
if ($_post_count->publish > $_page_count->publish) { // site emphasis on posts
|
66 |
-
$post_priority = 0.7;
|
67 |
-
$page_priority = 0.3;
|
68 |
-
} else { // site emphasis on pages
|
69 |
-
$post_priority = 0.4;
|
70 |
-
$page_priority = 0.8;
|
71 |
-
}
|
72 |
-
|
73 |
-
if ( $lastmodified > $firstmodified ) // valid blog age found ?
|
74 |
-
$age_weight = ($post_priority - $min_priority) / ($lastmodified - $firstmodified); // calculate relative age weight
|
75 |
-
else
|
76 |
-
$age_weight = $month_weight / 2629744 ; // else just do 10% per month (that's a month in seconds)
|
77 |
-
|
78 |
-
// prepare counter to limit the number of URLs to the absolute max of 50.000
|
79 |
-
//$counter = 1;
|
80 |
-
|
81 |
-
// start with the main URL
|
82 |
-
?>
|
83 |
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"><url><loc><?php
|
84 |
-
// hook for filter 'xml_sitemap_url' provides a string here and MUST get a string returned
|
85 |
-
$url = apply_filters( 'xml_sitemap_url', trailingslashit(home_url()) );
|
86 |
-
if ( is_string($url) ) echo esc_url( $url ); else echo esc_url( trailingslashit(home_url()) );
|
87 |
-
?></loc><lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified_gmt, false); ?></lastmod><changefreq>daily</changefreq><priority>1.0</priority></url><?php
|
88 |
-
|
89 |
-
// then loop away!
|
90 |
-
if ( have_posts() ) : while ( have_posts() /* && $counter < $maxURLS */ ) : the_post();
|
91 |
-
|
92 |
-
// check if we are not dealing with an external URL :: Thanks, Francois Deschenes :)
|
93 |
-
if(!preg_match('/^' . preg_quote(home_url(), '/') . '/i', get_permalink())) continue;
|
94 |
-
|
95 |
-
$thispostmodified_gmt = $post->post_modified_gmt; // post GMT timestamp
|
96 |
-
$thispostmodified = mysql2date('U',$thispostmodified_gmt); // post Unix timestamp
|
97 |
-
$lastcomment = array();
|
98 |
-
|
99 |
-
if ($post->comment_count && $post->comment_count > 0) {
|
100 |
-
$lastcomment = get_comments( array(
|
101 |
-
'status' => 'approve',
|
102 |
-
'$number' => 1,
|
103 |
-
'post_id' => $post->ID,
|
104 |
-
) );
|
105 |
-
$lastcommentsdate = mysql2date('U',$lastcomment[0]->comment_date_gmt); // last comment timestamp
|
106 |
-
if ( $lastcommentsdate > $thispostmodified ) {
|
107 |
-
$thispostmodified = $lastcommentsdate; // replace post with comment Unix timestamp
|
108 |
-
$thispostmodified_gmt = $lastcomment[0]->comment_date_gmt; // and replace modified GMT timestamp
|
109 |
-
}
|
110 |
-
}
|
111 |
-
$lastactivityage = (gmdate('U') - $thispostmodified); // post age
|
112 |
-
|
113 |
-
if($post->post_type == "page") {
|
114 |
-
if ($post->ID == get_option('page_on_front')) // check if we are not doing the front page twice
|
115 |
-
continue;
|
116 |
-
|
117 |
-
if (!is_array($post->ancestors)) { // $post->ancestors seems always empty (something to do with http://core.trac.wordpress.org/ticket/10381 ?) so we probably need to do it ourselves...
|
118 |
-
$page_obj = $post;
|
119 |
-
$ancestors = array();
|
120 |
-
while($page_obj->post_parent!=0) {
|
121 |
-
$page_obj = get_page($page_obj->post_parent);
|
122 |
-
$ancestors[] = $page_obj->ID;
|
123 |
-
}
|
124 |
-
} else {
|
125 |
-
$ancestors = $post->ancestors;
|
126 |
-
}
|
127 |
-
$offset = (($post->comment_count - $average_commentcount) * $comment_weight) - (count($ancestors) * $level_weight);
|
128 |
-
$priority = $page_priority + $offset;
|
129 |
-
} else {
|
130 |
-
if(is_sticky($post->ID))
|
131 |
-
$offset = $max_priority - $post_priority;
|
132 |
-
else
|
133 |
-
$offset = (($post->comment_count - $average_commentcount) * $comment_weight) - (($lastmodified - $thispostmodified) * $age_weight);
|
134 |
-
$priority = $post_priority + $offset;
|
135 |
-
}
|
136 |
-
// trim priority
|
137 |
-
$priority = ($priority > $max_priority) ? $max_priority : $priority;
|
138 |
-
$priority = ($priority < $min_priority) ? $min_priority : $priority; ?>
|
139 |
-
<url><loc><?php echo esc_url( get_permalink() ) ?></loc><lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $thispostmodified_gmt, false) ?></lastmod><changefreq><?php
|
140 |
-
if(($lastactivityage/86400) < 7) { // last activity less than 1 week old
|
141 |
-
?>daily<?php
|
142 |
-
} else if(($lastactivityage/604800) < 12) { // last activity between 1 and 12 weeks old
|
143 |
-
?>weekly<?php
|
144 |
-
} else if(($lastactivityage/604800) < 52) { // last activity between 12 and 52 weeks old
|
145 |
-
?>monthly<?php
|
146 |
-
} else { ?>yearly<?php
|
147 |
-
} ?></changefreq><priority><?php echo number_format($priority,1) ?></priority></url><?php
|
148 |
-
// $counter++;
|
149 |
-
|
150 |
-
endwhile; endif;
|
151 |
-
?></urlset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hacks.php
CHANGED
@@ -3,6 +3,26 @@
|
|
3 |
* MISSING WORDPRESS FUNCTIONS
|
4 |
* ------------------------------------- */
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
/**
|
7 |
* Retrieve last page modified date depending on timezone.
|
8 |
*
|
@@ -10,91 +30,64 @@
|
|
10 |
* server time. The 'blog' value is just when the last post was modified. The
|
11 |
* 'gmt' is when the last post was modified in GMT time.
|
12 |
*
|
13 |
-
*
|
14 |
*
|
15 |
-
* @uses $wpdb
|
16 |
-
* @uses $blog_id
|
17 |
* @uses apply_filters() Calls 'get_lastpagemodified' filter
|
18 |
*
|
19 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
20 |
* @return string The date the post was last modified.
|
21 |
-
|
22 |
if( !function_exists('get_lastpagemodified') ) {
|
23 |
function get_lastpagemodified($timezone = 'server') {
|
24 |
-
|
25 |
-
|
26 |
-
$add_seconds_server = date('Z');
|
27 |
-
$timezone = strtolower( $timezone );
|
28 |
-
|
29 |
-
$lastpagemodified = wp_cache_get( "lastpagemodified:$timezone", 'timeinfo' );
|
30 |
-
if ( $lastpagemodified )
|
31 |
-
return apply_filters( 'get_lastpagemodified', $lastpagemodified, $timezone );
|
32 |
-
|
33 |
-
switch ( strtolower($timezone) ) {
|
34 |
-
case 'gmt':
|
35 |
-
$lastpagemodified = $wpdb->get_var("SELECT post_modified_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_modified_gmt DESC LIMIT 1");
|
36 |
-
break;
|
37 |
-
case 'blog':
|
38 |
-
$lastpagemodified = $wpdb->get_var("SELECT post_modified FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_modified_gmt DESC LIMIT 1");
|
39 |
-
break;
|
40 |
-
case 'server':
|
41 |
-
$lastpagemodified = $wpdb->get_var("SELECT DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_modified_gmt DESC LIMIT 1");
|
42 |
-
break;
|
43 |
-
}
|
44 |
|
45 |
$lastpagedate = get_lastpagedate($timezone);
|
46 |
if ( $lastpagedate > $lastpagemodified )
|
47 |
$lastpagemodified = $lastpagedate;
|
48 |
|
49 |
-
if ( $lastpagemodified )
|
50 |
-
wp_cache_set( "lastpagemodified:$timezone", $lastpagemodified, 'timeinfo' );
|
51 |
-
|
52 |
return apply_filters( 'get_lastpagemodified', $lastpagemodified, $timezone );
|
53 |
}
|
54 |
-
}
|
55 |
|
56 |
/**
|
57 |
-
* Retrieve the date that the
|
58 |
*
|
59 |
* The server timezone is the default and is the difference between GMT and
|
60 |
* server time. The 'blog' value is the date when the last post was posted. The
|
61 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
62 |
*
|
63 |
-
*
|
64 |
*
|
65 |
-
* @uses
|
66 |
-
*
|
67 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
*
|
69 |
-
* @
|
70 |
-
* @global mixed $pagenow The current page being viewed
|
71 |
*
|
72 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
73 |
* @return string The date of the last post.
|
74 |
-
|
75 |
-
if( !function_exists('
|
76 |
-
function
|
77 |
-
|
78 |
-
$add_seconds_server = date('Z');
|
79 |
-
if ( !isset($cache_lastpagedate[$blog_id][$timezone]) ) {
|
80 |
-
switch(strtolower($timezone)) {
|
81 |
-
case 'gmt':
|
82 |
-
$lastpagedate = $wpdb->get_var("SELECT post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_date_gmt DESC LIMIT 1");
|
83 |
-
break;
|
84 |
-
case 'blog':
|
85 |
-
$lastpagedate = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_date_gmt DESC LIMIT 1");
|
86 |
-
break;
|
87 |
-
case 'server':
|
88 |
-
$lastpagedate = $wpdb->get_var("SELECT DATE_ADD(post_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_date_gmt DESC LIMIT 1");
|
89 |
-
break;
|
90 |
-
}
|
91 |
-
$cache_lastpagedate[$blog_id][$timezone] = $lastpagedate;
|
92 |
-
} else {
|
93 |
-
$lastpagedate = $cache_lastpagedate[$blog_id][$timezone];
|
94 |
-
}
|
95 |
-
return apply_filters( 'get_lastpagedate', $lastpagedate, $timezone );
|
96 |
}
|
97 |
-
}
|
98 |
|
99 |
/**
|
100 |
* Retrieve first post modified date depending on timezone.
|
@@ -105,45 +98,22 @@ if( !function_exists('get_lastpagedate') ) {
|
|
105 |
*
|
106 |
* Reverse of get_lastpostmodified defined in wp-includes/post.php since WP 1.2.0
|
107 |
*
|
108 |
-
* @uses $wpdb
|
109 |
* @uses apply_filters() Calls 'get_firstpostmodified' filter
|
110 |
*
|
111 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
112 |
* @return string The date of the oldest modified post.
|
113 |
-
|
114 |
if( !function_exists('get_firstpostmodified') ) {
|
115 |
function get_firstpostmodified($timezone = 'server') {
|
116 |
-
|
117 |
-
|
118 |
-
$add_seconds_server = date('Z');
|
119 |
-
$timezone = strtolower( $timezone );
|
120 |
-
|
121 |
-
$firstpostmodified = wp_cache_get( "firstpostmodified:$timezone", 'timeinfo' );
|
122 |
-
if ( $firstpostmodified )
|
123 |
-
return apply_filters( 'get_firstpostmodified', $firstpostmodified, $timezone );
|
124 |
-
|
125 |
-
switch ( strtolower($timezone) ) {
|
126 |
-
case 'gmt':
|
127 |
-
$firstpostmodified = $wpdb->get_var("SELECT post_modified_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_modified_gmt ASC LIMIT 1");
|
128 |
-
break;
|
129 |
-
case 'blog':
|
130 |
-
$firstpostmodified = $wpdb->get_var("SELECT post_modified FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_modified_gmt ASC LIMIT 1");
|
131 |
-
break;
|
132 |
-
case 'server':
|
133 |
-
$firstpostmodified = $wpdb->get_var("SELECT DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_modified_gmt ASC LIMIT 1");
|
134 |
-
break;
|
135 |
-
}
|
136 |
|
137 |
$firstpostdate = get_firstpostdate($timezone);
|
138 |
if ( $firstpostdate > $firstpostmodified )
|
139 |
$firstpostmodified = $firstpostdate;
|
140 |
|
141 |
-
if ( $firstpostmodified )
|
142 |
-
wp_cache_set( "firstpostmodified:$timezone", $firstpostmodified, 'timeinfo' );
|
143 |
-
|
144 |
return apply_filters( 'get_firstpostmodified', $firstpostmodified, $timezone );
|
145 |
}
|
146 |
-
}
|
147 |
|
148 |
/**
|
149 |
* Retrieve first page modified date depending on timezone.
|
@@ -152,151 +122,83 @@ if( !function_exists('get_firstpostmodified') ) {
|
|
152 |
* server time. The 'blog' value is the date when the last post was posted. The
|
153 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
154 |
*
|
155 |
-
*
|
156 |
*
|
157 |
-
* @uses $wpdb
|
158 |
* @uses apply_filters() Calls 'get_firstpagemodified' filter
|
159 |
*
|
160 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
161 |
* @return string The date of the oldest modified page.
|
162 |
-
|
163 |
if( !function_exists('get_firstpagemodified') ) {
|
164 |
function get_firstpagemodified($timezone = 'server') {
|
165 |
-
|
166 |
-
|
167 |
-
$add_seconds_server = date('Z');
|
168 |
-
$timezone = strtolower( $timezone );
|
169 |
-
|
170 |
-
$firstpagemodified = wp_cache_get( "firstpagemodified:$timezone", 'timeinfo' );
|
171 |
-
if ( $firstpagemodified )
|
172 |
-
return apply_filters( 'get_firstpagemodified', $firstpagemodified, $timezone );
|
173 |
-
|
174 |
-
switch ( strtolower($timezone) ) {
|
175 |
-
case 'gmt':
|
176 |
-
$firstpagemodified = $wpdb->get_var("SELECT post_modified_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_modified_gmt ASC LIMIT 1");
|
177 |
-
break;
|
178 |
-
case 'blog':
|
179 |
-
$firstpagemodified = $wpdb->get_var("SELECT post_modified FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_modified_gmt ASC LIMIT 1");
|
180 |
-
break;
|
181 |
-
case 'server':
|
182 |
-
$firstpagemodified = $wpdb->get_var("SELECT DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_modified_gmt ASC LIMIT 1");
|
183 |
-
break;
|
184 |
-
}
|
185 |
|
186 |
$firstpagedate = get_firstpagedate($timezone);
|
187 |
if ( $firstpagedate > $firstpagemodified )
|
188 |
$firstpagemodified = $firstpagedate;
|
189 |
|
190 |
-
if ( $firstpagemodified )
|
191 |
-
wp_cache_set( "firstpagemodified:$timezone", $firstpagemodified, 'timeinfo' );
|
192 |
-
|
193 |
return apply_filters( 'get_firstpagemodified', $firstpagemodified, $timezone );
|
194 |
}
|
195 |
-
}
|
196 |
|
197 |
/**
|
198 |
-
* Retrieve the date that the first post was published.
|
199 |
*
|
200 |
* The server timezone is the default and is the difference between GMT and
|
201 |
* server time. The 'blog' value is the date when the last post was posted. The
|
202 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
203 |
*
|
204 |
-
*
|
205 |
-
*
|
206 |
-
* @uses $wpdb
|
207 |
-
* @uses $cache_firstpostdate
|
208 |
-
* @uses $blog_id
|
209 |
-
* @uses apply_filters() Calls 'get_firstpostdate' filter
|
210 |
*
|
211 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
|
|
212 |
* @return string The date of the last post.
|
213 |
*/
|
214 |
-
if( !function_exists('
|
215 |
-
function
|
216 |
-
|
217 |
-
$add_seconds_server = date('Z');
|
218 |
-
if ( !isset($cache_firstpostdate[$blog_id][$timezone]) ) {
|
219 |
-
switch(strtolower($timezone)) {
|
220 |
-
case 'gmt':
|
221 |
-
$firstpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date_gmt ASC LIMIT 1");
|
222 |
-
break;
|
223 |
-
case 'blog':
|
224 |
-
$firstpostdate = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date_gmt ASC LIMIT 1");
|
225 |
-
break;
|
226 |
-
case 'server':
|
227 |
-
$firstpostdate = $wpdb->get_var("SELECT DATE_ADD(post_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date_gmt ASC LIMIT 1");
|
228 |
-
break;
|
229 |
-
}
|
230 |
-
$cache_firstpostdate[$blog_id][$timezone] = $firstpostdate;
|
231 |
-
} else {
|
232 |
-
$firstpostdate = $cache_firstpostdate[$blog_id][$timezone];
|
233 |
-
}
|
234 |
-
return apply_filters( 'get_firstpostdate', $firstpostdate, $timezone );
|
235 |
}
|
236 |
}
|
237 |
|
238 |
/**
|
239 |
-
* Retrieve
|
240 |
*
|
241 |
* The server timezone is the default and is the difference between GMT and
|
242 |
* server time. The 'blog' value is the date when the last post was posted. The
|
243 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
244 |
*
|
245 |
-
*
|
246 |
-
*
|
247 |
-
* @uses $wpdb
|
248 |
-
* @uses $cache_firstpagedate
|
249 |
-
* @uses $blog_id
|
250 |
-
* @uses apply_filters() Calls 'get_firstpagedate' filter
|
251 |
*
|
252 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
253 |
-
* @return string The date of the
|
254 |
-
|
255 |
-
if( !function_exists('
|
256 |
-
function
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
case 'blog':
|
265 |
-
$firstpagedate = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_date_gmt ASC LIMIT 1");
|
266 |
-
break;
|
267 |
-
case 'server':
|
268 |
-
$firstpagedate = $wpdb->get_var("SELECT DATE_ADD(post_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_date_gmt ASC LIMIT 1");
|
269 |
-
break;
|
270 |
-
}
|
271 |
-
$cache_firstpagedate[$blog_id][$timezone] = $firstpagedate;
|
272 |
-
} else {
|
273 |
-
$firstpagedate = $cache_firstpagedate[$blog_id][$timezone];
|
274 |
-
}
|
275 |
-
return apply_filters( 'get_firstpagedate', $firstpagedate, $timezone );
|
276 |
}
|
277 |
-
}
|
278 |
|
279 |
/**
|
280 |
-
* Retrieve
|
281 |
*
|
282 |
* The server timezone is the default and is the difference between GMT and
|
283 |
* server time. The 'blog' value is the date when the last post was posted. The
|
284 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
285 |
*
|
286 |
-
*
|
287 |
-
* defined in this file
|
288 |
*
|
289 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
290 |
-
* @return string The date of the
|
291 |
*/
|
292 |
-
if( !function_exists('
|
293 |
-
function
|
294 |
-
|
295 |
-
$firstpagemodified = get_firstpagemodified($timezone);
|
296 |
-
if ( mysql2date('U',$firstpostmodified) < mysql2date('U',$firstpagemodified) )
|
297 |
-
return $firstpostmodified;
|
298 |
-
else
|
299 |
-
return $firstpagemodified;
|
300 |
}
|
301 |
}
|
302 |
|
@@ -307,19 +209,128 @@ if( !function_exists('get_firstmodified') ) {
|
|
307 |
* server time. The 'blog' value is the date when the last post was posted. The
|
308 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
309 |
*
|
310 |
-
*
|
311 |
-
* defined in wp-includes/post.php since WP 1.2.0
|
312 |
*
|
313 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
314 |
* @return string The date of the oldest modified post.
|
315 |
*/
|
316 |
if( !function_exists('get_lastmodified') ) {
|
317 |
-
function get_lastmodified($timezone = 'server') {
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
|
|
324 |
}
|
325 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* MISSING WORDPRESS FUNCTIONS
|
4 |
* ------------------------------------- */
|
5 |
|
6 |
+
/**
|
7 |
+
* Retrieve the date that the last page was published.
|
8 |
+
*
|
9 |
+
* The server timezone is the default and is the difference between GMT and
|
10 |
+
* server time. The 'blog' value is the date when the last post was posted. The
|
11 |
+
* 'gmt' is when the last post was posted in GMT formatted date.
|
12 |
+
*
|
13 |
+
* Variation of get_lastpostdate defined in wp-includes/post.php since 0.71
|
14 |
+
*
|
15 |
+
* @uses apply_filters() Calls 'get_lastpagedate' filter
|
16 |
+
*
|
17 |
+
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
18 |
+
* @return string The date of the last post.
|
19 |
+
|
20 |
+
if( !function_exists('get_lastpagedate') ) {
|
21 |
+
function get_lastpagedate($timezone = 'server') {
|
22 |
+
return apply_filters( 'get_lastpagedate', _get_time( $timezone, 'date', 'page' ), $timezone );
|
23 |
+
}
|
24 |
+
} */
|
25 |
+
|
26 |
/**
|
27 |
* Retrieve last page modified date depending on timezone.
|
28 |
*
|
30 |
* server time. The 'blog' value is just when the last post was modified. The
|
31 |
* 'gmt' is when the last post was modified in GMT time.
|
32 |
*
|
33 |
+
* Variation of get_lastpostmodified defined in wp-includes/post.php since 1.2.0
|
34 |
*
|
|
|
|
|
35 |
* @uses apply_filters() Calls 'get_lastpagemodified' filter
|
36 |
*
|
37 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
38 |
* @return string The date the post was last modified.
|
39 |
+
|
40 |
if( !function_exists('get_lastpagemodified') ) {
|
41 |
function get_lastpagemodified($timezone = 'server') {
|
42 |
+
$lastpagemodified = _get_time( $timezone, 'modified', 'page' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
$lastpagedate = get_lastpagedate($timezone);
|
45 |
if ( $lastpagedate > $lastpagemodified )
|
46 |
$lastpagemodified = $lastpagedate;
|
47 |
|
|
|
|
|
|
|
48 |
return apply_filters( 'get_lastpagemodified', $lastpagemodified, $timezone );
|
49 |
}
|
50 |
+
} */
|
51 |
|
52 |
/**
|
53 |
+
* Retrieve the date that the first post was published.
|
54 |
*
|
55 |
* The server timezone is the default and is the difference between GMT and
|
56 |
* server time. The 'blog' value is the date when the last post was posted. The
|
57 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
58 |
*
|
59 |
+
* Reverse of get_lastpostdate defined in wp-includes/post.php since 0.71
|
60 |
*
|
61 |
+
* @uses apply_filters() Calls 'get_firstpostdate' filter
|
62 |
+
*
|
63 |
+
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
64 |
+
* @return string The date of the last post.
|
65 |
+
|
66 |
+
if( !function_exists('get_firstpostdate') ) {
|
67 |
+
function get_firstpostdate($timezone = 'server') {
|
68 |
+
return apply_filters( 'get_firstpostdate', _get_time( $timezone, 'date', 'post', 'first' ), $timezone );
|
69 |
+
}
|
70 |
+
} */
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Retrieve the date that the first page was published.
|
74 |
+
*
|
75 |
+
* The server timezone is the default and is the difference between GMT and
|
76 |
+
* server time. The 'blog' value is the date when the last post was posted. The
|
77 |
+
* 'gmt' is when the last post was posted in GMT formatted date.
|
78 |
+
*
|
79 |
+
* Adaptation of get_firstpostdate defined in this file
|
80 |
*
|
81 |
+
* @uses apply_filters() Calls 'get_firstpagedate' filter
|
|
|
82 |
*
|
83 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
84 |
* @return string The date of the last post.
|
85 |
+
|
86 |
+
if( !function_exists('get_firstpagedate') ) {
|
87 |
+
function get_firstpagedate($timezone = 'server') {
|
88 |
+
return apply_filters( 'get_firstpagedate', _get_time( $timezone, 'date', 'page', 'first' ), $timezone );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
+
} */
|
91 |
|
92 |
/**
|
93 |
* Retrieve first post modified date depending on timezone.
|
98 |
*
|
99 |
* Reverse of get_lastpostmodified defined in wp-includes/post.php since WP 1.2.0
|
100 |
*
|
|
|
101 |
* @uses apply_filters() Calls 'get_firstpostmodified' filter
|
102 |
*
|
103 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
104 |
* @return string The date of the oldest modified post.
|
105 |
+
|
106 |
if( !function_exists('get_firstpostmodified') ) {
|
107 |
function get_firstpostmodified($timezone = 'server') {
|
108 |
+
$firstpostmodified = _get_time( $timezone, 'modified', 'post', 'first' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
$firstpostdate = get_firstpostdate($timezone);
|
111 |
if ( $firstpostdate > $firstpostmodified )
|
112 |
$firstpostmodified = $firstpostdate;
|
113 |
|
|
|
|
|
|
|
114 |
return apply_filters( 'get_firstpostmodified', $firstpostmodified, $timezone );
|
115 |
}
|
116 |
+
} */
|
117 |
|
118 |
/**
|
119 |
* Retrieve first page modified date depending on timezone.
|
122 |
* server time. The 'blog' value is the date when the last post was posted. The
|
123 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
124 |
*
|
125 |
+
* Variation of get_firstpostmodified defined in this file
|
126 |
*
|
|
|
127 |
* @uses apply_filters() Calls 'get_firstpagemodified' filter
|
128 |
*
|
129 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
130 |
* @return string The date of the oldest modified page.
|
131 |
+
|
132 |
if( !function_exists('get_firstpagemodified') ) {
|
133 |
function get_firstpagemodified($timezone = 'server') {
|
134 |
+
$firstpagemodified = _get_time( $timezone, 'modified', 'page', 'first' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
$firstpagedate = get_firstpagedate($timezone);
|
137 |
if ( $firstpagedate > $firstpagemodified )
|
138 |
$firstpagemodified = $firstpagedate;
|
139 |
|
|
|
|
|
|
|
140 |
return apply_filters( 'get_firstpagemodified', $firstpagemodified, $timezone );
|
141 |
}
|
142 |
+
} */
|
143 |
|
144 |
/**
|
145 |
+
* Retrieve the date that the first post/page was published.
|
146 |
*
|
147 |
* The server timezone is the default and is the difference between GMT and
|
148 |
* server time. The 'blog' value is the date when the last post was posted. The
|
149 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
150 |
*
|
151 |
+
* @uses apply_filters() Calls 'get_firstdate' filter
|
|
|
|
|
|
|
|
|
|
|
152 |
*
|
153 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
154 |
+
* @param string $post_type Post type to check.
|
155 |
* @return string The date of the last post.
|
156 |
*/
|
157 |
+
if( !function_exists('get_firstdate') ) {
|
158 |
+
function get_firstdate($timezone = 'server', $post_type = 'any') {
|
159 |
+
return apply_filters( 'get_firstdate', _get_time( $timezone, 'date', $post_type, 'first' ), $timezone );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
}
|
161 |
}
|
162 |
|
163 |
/**
|
164 |
+
* Retrieve first post/page modified date depending on timezone.
|
165 |
*
|
166 |
* The server timezone is the default and is the difference between GMT and
|
167 |
* server time. The 'blog' value is the date when the last post was posted. The
|
168 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
169 |
*
|
170 |
+
* @uses apply_filters() Calls 'get_firstmodified' filter
|
|
|
|
|
|
|
|
|
|
|
171 |
*
|
172 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
173 |
+
* @return string The date of the oldest modified post or page.
|
174 |
+
|
175 |
+
if( !function_exists('get_firstmodified') ) {
|
176 |
+
function get_firstmodified($timezone = 'server') {
|
177 |
+
$firstmodified = _get_time( $timezone, 'modified', 'any', 'first' );
|
178 |
+
|
179 |
+
$firstdate = get_firstdate($timezone);
|
180 |
+
if ( $firstdate > $firstmodified )
|
181 |
+
$firstmodified = $firstdate;
|
182 |
+
|
183 |
+
return apply_filters( 'get_firstmodified', $firstmodified, $timezone );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
+
} */
|
186 |
|
187 |
/**
|
188 |
+
* Retrieve the date that the last post/page was published.
|
189 |
*
|
190 |
* The server timezone is the default and is the difference between GMT and
|
191 |
* server time. The 'blog' value is the date when the last post was posted. The
|
192 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
193 |
*
|
194 |
+
* @uses apply_filters() Calls 'get_lastdate' filter
|
|
|
195 |
*
|
196 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
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', $m = false) {
|
201 |
+
return apply_filters( 'get_lastdate', _get_time( $timezone, 'date', $post_type, 'last', $m ), $timezone );
|
|
|
|
|
|
|
|
|
|
|
202 |
}
|
203 |
}
|
204 |
|
209 |
* server time. The 'blog' value is the date when the last post was posted. The
|
210 |
* 'gmt' is when the last post was posted in GMT formatted date.
|
211 |
*
|
212 |
+
* @uses apply_filters() Calls 'get_lastmodified' filter
|
|
|
213 |
*
|
214 |
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
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', $m = false) {
|
219 |
+
//$lastmodified = _get_time( $timezone, 'modified', $post_type, 'last', $m );
|
220 |
+
|
221 |
+
//$lastdate = get_lastdate($timezone, $post_type, $m);
|
222 |
+
//if ( $lastdate > $lastmodified )
|
223 |
+
// $lastmodified = $lastdate;
|
224 |
+
|
225 |
+
return apply_filters( 'get_lastmodified', _get_time( $timezone, 'modified', $post_type, 'last', $m ), $timezone );
|
226 |
}
|
227 |
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Retrieve first or last post type date data based on timezone.
|
231 |
+
* Variation of function _get_last_post_time
|
232 |
+
*
|
233 |
+
* @access private
|
234 |
+
*
|
235 |
+
* @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'.
|
236 |
+
* @param string $field Field to check. Can be 'date' or 'modified'.
|
237 |
+
* @param string $post_type Post type to check. Defaults to 'any'.
|
238 |
+
* @param string $which Which to check. Can be 'first' or 'last'. Defaults to 'last'.
|
239 |
+
* @return string The date.
|
240 |
+
*/
|
241 |
+
if( !function_exists('_get_time') ) {
|
242 |
+
function _get_time( $timezone, $field, $post_type = 'any', $which = 'last', $m = 0 ) {
|
243 |
+
global $wpdb;
|
244 |
+
|
245 |
+
if ( !in_array( $field, array( 'date', 'modified' ) ) )
|
246 |
+
return false;
|
247 |
+
|
248 |
+
$timezone = strtolower( $timezone );
|
249 |
+
|
250 |
+
$order = ( $which == 'last' ) ? 'DESC' : 'ASC';
|
251 |
+
|
252 |
+
$key = ( $post_type == 'any' ) ? "{$which}post{$field}{$m}:$timezone" : "{$which}posttype{$post_type}{$field}{$m}:$timezone";
|
253 |
+
|
254 |
+
$date = wp_cache_get( $key, 'timeinfo' );
|
255 |
+
|
256 |
+
if ( !$date ) {
|
257 |
+
$add_seconds_server = date('Z');
|
258 |
+
|
259 |
+
if ( $post_type == 'any' ) {
|
260 |
+
$post_types = get_post_types( array( 'public' => true ) );
|
261 |
+
array_walk( $post_types, array( &$wpdb, 'escape_by_ref' ) );
|
262 |
+
$post_types = "'" . implode( "', '", $post_types ) . "'";
|
263 |
+
} elseif ( is_array($post_type) ) {
|
264 |
+
$types = get_post_types( array( 'public' => true ) );
|
265 |
+
foreach ( $post_type as $type )
|
266 |
+
if ( !in_array( $type, $types ) )
|
267 |
+
return false;
|
268 |
+
array_walk( $post_type, array( &$wpdb, 'escape_by_ref' ) );
|
269 |
+
$post_types = "'" . implode( "', '", $post_type ) . "'";
|
270 |
+
} else {
|
271 |
+
if ( !in_array( $post_type, get_post_types( array( 'public' => true ) ) ) )
|
272 |
+
return false;
|
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 $where ORDER BY $wpdb->posts.post_{$field}_gmt {$order} LIMIT 1");
|
288 |
+
break;
|
289 |
+
case 'blog':
|
290 |
+
$date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE $where ORDER BY $wpdb->posts.post_{$field}_gmt {$order} LIMIT 1");
|
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 $where ORDER BY $wpdb->posts.post_{$field}_gmt {$order} LIMIT 1");
|
294 |
+
break;
|
295 |
+
}
|
296 |
+
|
297 |
+
|
298 |
+
if ( $date )
|
299 |
+
wp_cache_set( $key, $date, 'timeinfo' );
|
300 |
+
}
|
301 |
+
|
302 |
+
return $date;
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
/* By gunter [dot] sammet [at] gmail [dot] com http://www.php.net/manual/en/function.htmlentities.php#88169 */
|
307 |
+
$entity_custom_from = false;
|
308 |
+
$entity_custom_to = false;
|
309 |
+
function html_entity_decode_encode_rss($data) {
|
310 |
+
global $entity_custom_from, $entity_custom_to;
|
311 |
+
|
312 |
+
if(!is_array($entity_custom_from) || !is_array($entity_custom_to)) {
|
313 |
+
$array_position = 0;
|
314 |
+
foreach (get_html_translation_table(HTML_ENTITIES) as $key => $value) {
|
315 |
+
switch ($value) {
|
316 |
+
case ' ':
|
317 |
+
break;
|
318 |
+
case '>':
|
319 |
+
case '<':
|
320 |
+
case '"':
|
321 |
+
case ''':
|
322 |
+
case '&':
|
323 |
+
$entity_custom_from[$array_position] = $key;
|
324 |
+
$entity_custom_to[$array_position] = $value;
|
325 |
+
$array_position++;
|
326 |
+
break;
|
327 |
+
default:
|
328 |
+
$entity_custom_from[$array_position] = $value;
|
329 |
+
$entity_custom_to[$array_position] = $key;
|
330 |
+
$array_position++;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
}
|
334 |
+
return str_replace($entity_custom_from, $entity_custom_to, $data);
|
335 |
+
}
|
336 |
+
|
sitemapxml.gif → images/sitemapxml.gif
RENAMED
File without changes
|
includes/admin.php
ADDED
@@ -0,0 +1,402 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* ------------------------------
|
3 |
+
* XMLSF Admin CLASS
|
4 |
+
* ------------------------------ */
|
5 |
+
|
6 |
+
class XMLSF_Admin extends XMLSitemapFeed {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* SETTINGS
|
10 |
+
*/
|
11 |
+
|
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="'.sprintf(__('Donate to keep the free %s plugin development & support going!','easy-fancybox'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:left;margin:4px 10px 0 0" alt="'.sprintf(__('Donate to keep the free %s plugin development & support going!','easy-fancybox'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'" width="92" height="26" /></a>'.sprintf(__('These settings control the XML Sitemaps generated by the %s plugin.','xml-sitemap-feed'),__('XML Sitemap & Google News Feeds','xml-sitemap-feed')).'<br/>';
|
16 |
+
echo ('1' == get_option('blog_public')) ? sprintf(__('XML Sitemaps will be disabled automatically when you set the option %1$s (above) to %2$s.','xml-sitemap-feed'),'<strong>'.__('Search Engine Visibility').'</strong>','<strong>'.__('Discourage search engines from indexing this site').'</strong>') : '<span style="color: red" class="error">'.sprintf(__('XML Sitemaps are disabled because you have set the option %1$s (above) to %2$s.','xml-sitemap-feed'),'<strong>'.__('Search Engine Visibility').'</strong>','<strong>'.__('Discourage search engines from indexing this site').'</strong>').'</span>';
|
17 |
+
echo '</p>
|
18 |
+
<script type="text/javascript">
|
19 |
+
jQuery( document ).ready( function() {
|
20 |
+
jQuery( "input[name=\'blog_public\']" ).on( \'change\', function() {
|
21 |
+
jQuery("#xmlsf_sitemaps input").each(function() {
|
22 |
+
var $this = jQuery(this);
|
23 |
+
$this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
|
24 |
+
});
|
25 |
+
});
|
26 |
+
jQuery( "#xmlsf_sitemaps_index" ).on( \'change\', function() {
|
27 |
+
jQuery("#xmlsf_post_types input:not([type=\'hidden\']),#xmlsf_post_types select,#xmlsf_taxonomies input:not([type=\'hidden\']),#xmlsf_ping input").each(function() {
|
28 |
+
var $this = jQuery(this);
|
29 |
+
$this.attr("disabled") ? $this.removeAttr("disabled") : $this.attr("disabled", "disabled");
|
30 |
+
});
|
31 |
+
});
|
32 |
+
});
|
33 |
+
</script>';
|
34 |
+
}
|
35 |
+
|
36 |
+
public function sitemaps_settings_field() {
|
37 |
+
$options = parent::get_sitemaps();
|
38 |
+
$disabled = ('1' == get_option('blog_public')) ? false : true;
|
39 |
+
|
40 |
+
echo '<fieldset id="xmlsf_sitemaps"><legend class="screen-reader-text">'.__('XML Sitemaps','xml-sitemap-feed').'</legend>
|
41 |
+
<p><label><input type="checkbox" name="xmlsf_sitemaps[sitemap]" id="xmlsf_sitemaps_index" value="'.XMLSF_NAME.'" '.checked(isset($options['sitemap']), true, false).' '.disabled($disabled, true, false).' /> '.__('Regular XML Sitemaps','xml-sitemap-feed').'</label>';
|
42 |
+
if (isset($options['sitemap']))
|
43 |
+
echo '<span class="description"> – <a href="'.trailingslashit(get_bloginfo('url')). ( ('' == get_option('permalink_structure')) ? '?feed=sitemap' : $options['sitemap'] ) .'" target="_blank">'.__('View').'</a></span>';
|
44 |
+
|
45 |
+
//__('Note: if you do not include any post or taxonomy types below, the sitemap will only contain your sites root url.','xml-sitemap-feed')
|
46 |
+
echo '</p>
|
47 |
+
<p><label><input type="checkbox" name="xmlsf_sitemaps[sitemap-news]" id="xmlsf_sitemaps_news" value="'.XMLSF_NEWS_NAME.'" '.checked(isset($options['sitemap-news']), true, false).' '.disabled($disabled, true, false).' /> '.__('Google News Sitemap','xml-sitemap-feed').'</label>';
|
48 |
+
if (isset($options['sitemap-news']))
|
49 |
+
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>';
|
50 |
+
echo '</p>
|
51 |
+
</fieldset>';
|
52 |
+
}
|
53 |
+
|
54 |
+
public function post_types_settings_field() {
|
55 |
+
$options = parent::get_post_types();
|
56 |
+
$defaults = parent::defaults('post_types');
|
57 |
+
$do_note = false;
|
58 |
+
|
59 |
+
echo '<fieldset id="xmlsf_post_types"><legend class="screen-reader-text">'.__('Include post types','xml-sitemap-feed').'</legend>
|
60 |
+
';
|
61 |
+
foreach ( get_post_types(array('public'=>true),'objects') as $post_type ) {
|
62 |
+
$count = wp_count_posts( $post_type->name );
|
63 |
+
|
64 |
+
echo '
|
65 |
+
<p><input type="hidden" name="xmlsf_post_types['.
|
66 |
+
$post_type->name.'][name]" value="'.
|
67 |
+
$post_type->name.'" />';
|
68 |
+
|
69 |
+
echo '
|
70 |
+
<label><input type="checkbox" name="xmlsf_post_types['.
|
71 |
+
$post_type->name.'][active]" id="xmlsf_post_types_'.
|
72 |
+
$post_type->name.'" value="1" '.
|
73 |
+
checked( !empty($options[$post_type->name]["active"]), true, false).' /> '.
|
74 |
+
$post_type->label.'</label> ('.
|
75 |
+
$count->publish.')';
|
76 |
+
|
77 |
+
if (!empty($options[$post_type->name]['active'])) {
|
78 |
+
/* Find a better way...
|
79 |
+
if ( !empty($options[$post_type->name]["tags"]) )
|
80 |
+
foreach ( (array)$options[$post_type->name]["tags"] as $tag )
|
81 |
+
echo '
|
82 |
+
<input type="hidden" name="xmlsf_post_types['.
|
83 |
+
$post_type->name.'][tags][]" value="'.$tag.'" />';
|
84 |
+
else
|
85 |
+
echo '
|
86 |
+
<input type="hidden" name="xmlsf_post_types['.
|
87 |
+
$post_type->name.'][tags][]" value="image" />
|
88 |
+
<input type="hidden" name="xmlsf_post_types['.
|
89 |
+
$post_type->name.'][tags][]" value="video" />';*/
|
90 |
+
|
91 |
+
echo ' – <span class="description"><a id="xmlsf_post_types_'.$post_type->name.'_link" href="#xmlsf_post_types_'.$post_type->name.'_settings">'.__('Settings').'</a></span></p>
|
92 |
+
<script type="text/javascript">
|
93 |
+
jQuery( document ).ready( function() {
|
94 |
+
jQuery("#xmlsf_post_types_'.$post_type->name.'_settings").hide();
|
95 |
+
jQuery("#xmlsf_post_types_'.$post_type->name.'_link").click( function(event) {
|
96 |
+
event.preventDefault();
|
97 |
+
jQuery("#xmlsf_post_types_'.$post_type->name.'_settings").toggle("slow");
|
98 |
+
});
|
99 |
+
});
|
100 |
+
</script>
|
101 |
+
<ul style="margin-left:18px" id="xmlsf_post_types_'.$post_type->name.'_settings">';
|
102 |
+
|
103 |
+
|
104 |
+
if ( isset($defaults[$post_type->name]['archive']) ) {
|
105 |
+
$archives = array (
|
106 |
+
'yearly' => __('year of publication','xml-sitemap-feed'),
|
107 |
+
'monthly' => __('month of publication','xml-sitemap-feed')
|
108 |
+
);
|
109 |
+
$archive = !empty($options[$post_type->name]['archive']) ? $options[$post_type->name]['archive'] : $defaults[$post_type->name]['archive'];
|
110 |
+
echo '
|
111 |
+
<li><label>'.__('Split by','xml-sitemap-feed').' <select name="xmlsf_post_types['.
|
112 |
+
$post_type->name.'][archive]" id="xmlsf_post_types_'.
|
113 |
+
$post_type->name.'_archive">
|
114 |
+
<option value=""></option>';
|
115 |
+
foreach ($archives as $value => $translation)
|
116 |
+
echo '
|
117 |
+
<option value="'.$value.'" '.
|
118 |
+
selected( $archive == $value, true, false).
|
119 |
+
'>'.$translation.'</option>';
|
120 |
+
echo '</select>
|
121 |
+
</label> <span class="description"> '.__('Split by year if you experience slow or blank sitemaps. In very rare cases, split by month is needed.','xml-sitemap-feed').'</span></li>';
|
122 |
+
}
|
123 |
+
|
124 |
+
$priority_val = !empty($options[$post_type->name]['priority']) ? $options[$post_type->name]['priority'] : $defaults[$post_type->name]['priority'];
|
125 |
+
echo '
|
126 |
+
<li><label>'.__('Priority','xml-sitemap-feed').' <input type="number" step="0.1" min="0.1" max="0.9" name="xmlsf_post_types['.
|
127 |
+
$post_type->name.'][priority]" id="xmlsf_post_types_'.
|
128 |
+
$post_type->name.'_priority" value="'.$priority_val.'" class="small-text"></label> <span class="description">'.__('Priority can be overridden on individual posts.','xml-sitemap-feed').' '.__('Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count.','xml-sitemap-feed').'</span></li>';
|
129 |
+
|
130 |
+
echo '
|
131 |
+
<li><label><input type="checkbox" name="xmlsf_post_types['.
|
132 |
+
$post_type->name.'][dynamic_priority]" value="1" '.
|
133 |
+
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>';
|
134 |
+
|
135 |
+
echo '
|
136 |
+
<li><label><input type="checkbox" name="xmlsf_post_types['.
|
137 |
+
$post_type->name.'][update_lastmod_on_comments]" value="1" '.
|
138 |
+
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>
|
139 |
+
</ul>';
|
140 |
+
} else {
|
141 |
+
echo '</p>';
|
142 |
+
}
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
echo '
|
147 |
+
<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').'</p>';
|
148 |
+
echo '
|
149 |
+
</fieldset>';
|
150 |
+
}
|
151 |
+
|
152 |
+
public function taxonomies_settings_field() {
|
153 |
+
$options = parent::get_taxonomies();
|
154 |
+
$active = parent::get_option('post_types');
|
155 |
+
$skipped_all = true;
|
156 |
+
|
157 |
+
echo '<fieldset id="xmlsf_taxonomies"><legend class="screen-reader-text">'.__('Include taxonomies','xml-sitemap-feed').'</legend>
|
158 |
+
';
|
159 |
+
foreach ( get_taxonomies(array('public'=>true),'objects') as $taxonomy ) {
|
160 |
+
|
161 |
+
$skip = true;
|
162 |
+
foreach ( $taxonomy->object_type as $post_type)
|
163 |
+
if (!empty($active[$post_type]['active']) && $active[$post_type]['active'] == '1')
|
164 |
+
$skip = false;
|
165 |
+
if ($skip) continue; // skip if none of the associated post types are active
|
166 |
+
|
167 |
+
$skipped_all = false;
|
168 |
+
$count = wp_count_terms( $taxonomy->name );
|
169 |
+
echo '
|
170 |
+
<label><input type="checkbox" name="xmlsf_taxonomies['.
|
171 |
+
$taxonomy->name.']" id="xmlsf_taxonomies_'.
|
172 |
+
$taxonomy->name.'" value="'.
|
173 |
+
$taxonomy->name.'"'.
|
174 |
+
checked(in_array($taxonomy->name,$options), true, false).' /> '.
|
175 |
+
$taxonomy->label.'</label> ('.
|
176 |
+
$count.')<br />';
|
177 |
+
}
|
178 |
+
|
179 |
+
if ($skipped_all)
|
180 |
+
echo '
|
181 |
+
<p style="color: red" class="error">'.__('No taxonomies available for the currently included post types.','xml-sitemap-feed').'</p>';
|
182 |
+
|
183 |
+
echo '
|
184 |
+
<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 by adding specific robots.txt rules below.','xml-sitemap-feed');
|
185 |
+
echo '</p>
|
186 |
+
</fieldset>';
|
187 |
+
}
|
188 |
+
|
189 |
+
public function ping_settings_field() {
|
190 |
+
$options = parent::get_ping();
|
191 |
+
$pings = parent::get_pings();
|
192 |
+
// search engines
|
193 |
+
$se = array(
|
194 |
+
'google' => __('Google','xml-sitemap-feed'),
|
195 |
+
'bing' => __('Bing','xml-sitemap-feed'),
|
196 |
+
);
|
197 |
+
|
198 |
+
echo '
|
199 |
+
<fieldset id="xmlsf_ping"><legend class="screen-reader-text">'.__('Ping on Publish','xml-sitemap-feed').'</legend>
|
200 |
+
';
|
201 |
+
foreach ( $options as $name => $values ) {
|
202 |
+
|
203 |
+
echo '
|
204 |
+
<input type="hidden" name="xmlsf_ping['.
|
205 |
+
$name.'][uri]" value="'.
|
206 |
+
$values['uri'].'" />';
|
207 |
+
|
208 |
+
echo '
|
209 |
+
<label><input type="checkbox" name="xmlsf_ping['.
|
210 |
+
$name.'][active]" id="xmlsf_ping_'.
|
211 |
+
$name.'" value="1"'.
|
212 |
+
checked( !empty($options[$name]["active"]), true, false).' /> '.
|
213 |
+
$se[$name].'</label>';
|
214 |
+
|
215 |
+
echo ' <span class="description">';
|
216 |
+
if (isset($pings[$name]))
|
217 |
+
foreach ((array)$pings[$name] as $pretty => $time)
|
218 |
+
echo sprintf(__('Successfully pinged for %1$s on %2$s GMT.','xml-sitemap-feed'),$pretty, $time).' ';
|
219 |
+
echo '</span><br />';
|
220 |
+
}
|
221 |
+
|
222 |
+
echo '
|
223 |
+
</fieldset>';
|
224 |
+
}
|
225 |
+
|
226 |
+
public function robots_settings_field() {
|
227 |
+
echo '<label>'.sprintf(__('Rules to append to the %s generated by WordPress.','xml-sitemap-feed'),'<a href="'.trailingslashit(get_bloginfo('url')).'robots.txt" target="_blank">robots.txt</a>').'<br /><textarea name="xmlsf_robots" id="xmlsf_robots" class="large-text" cols="50" rows="5" />'.esc_attr( parent::get_robots() ).'</textarea></label>
|
228 |
+
<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>';
|
229 |
+
}
|
230 |
+
|
231 |
+
public function reset_settings_field() {
|
232 |
+
|
233 |
+
echo '
|
234 |
+
<label><input type="checkbox" name="xmlsf_sitemaps[reset]" value="1" /> '.
|
235 |
+
__('Clear all XML Sitemap Feed options from the database and start fresh with the default settings.','xml-sitemap-feed').'</label>';
|
236 |
+
echo '
|
237 |
+
<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>';
|
238 |
+
}
|
239 |
+
|
240 |
+
//sanitize callback functions
|
241 |
+
|
242 |
+
public function sanitize_robots_settings($new) {
|
243 |
+
return trim(strip_tags($new));
|
244 |
+
}
|
245 |
+
|
246 |
+
public function sanitize_sitemaps_settings($new) {
|
247 |
+
$old = parent::get_sitemaps();
|
248 |
+
if (isset($new['reset']) && $new['reset'] == '1') // if reset is checked, set transient to clear all settings
|
249 |
+
set_transient('xmlsf_clear_settings','');
|
250 |
+
elseif ($old != $new) // when sitemaps are added or removed, set transient to flush rewrite rules
|
251 |
+
set_transient('xmlsf_flush_rewrite_rules','');
|
252 |
+
return $new;
|
253 |
+
}
|
254 |
+
|
255 |
+
public function sanitize_post_types_settings( $new = array() ) {
|
256 |
+
$old = parent::get_post_types();
|
257 |
+
$defaults = parent::defaults('post_types');
|
258 |
+
$sanitized = $new;
|
259 |
+
$flush = false;
|
260 |
+
|
261 |
+
foreach ($new as $post_type => $settings) {
|
262 |
+
|
263 |
+
// when post types are (de)activated, set transient to flush rewrite rules
|
264 |
+
if ( ( !empty($old[$post_type]['active']) && empty($settings['active']) ) || ( empty($old[$post_type]['active']) && !empty($settings['active']) ) )
|
265 |
+
$flush = true;
|
266 |
+
|
267 |
+
if ( isset($settings['priority']) && is_numeric($settings['priority']) ) {
|
268 |
+
if ($settings['priority'] <= 0)
|
269 |
+
$sanitized[$post_type]['priority'] = '0.1';
|
270 |
+
elseif ($settings['priority'] >= 1)
|
271 |
+
$sanitized[$post_type]['priority'] = '0.9';
|
272 |
+
} else {
|
273 |
+
$sanitized[$post_type]['priority'] = $defaults[$post_type]['priority'];
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
if ($flush)
|
278 |
+
set_transient('xmlsf_flush_rewrite_rules','');
|
279 |
+
|
280 |
+
return $sanitized;
|
281 |
+
}
|
282 |
+
|
283 |
+
public function sanitize_taxonomies_settings($new) {
|
284 |
+
$old = parent::get_taxonomies();
|
285 |
+
if ($old != $new) // when taxonomy types are added or removed, set transient to flush rewrite rules
|
286 |
+
set_transient('xmlsf_flush_rewrite_rules','');
|
287 |
+
return $new;
|
288 |
+
}
|
289 |
+
|
290 |
+
public function sanitize_ping_settings($new) {
|
291 |
+
return $new;
|
292 |
+
}
|
293 |
+
|
294 |
+
public function add_action_link( $links ) {
|
295 |
+
$settings_link = '<a href="' . admin_url('options-reading.php') . '#xmlsf">' . __('Settings') . '</a>';
|
296 |
+
array_unshift( $links, $settings_link );
|
297 |
+
return $links;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* META BOX
|
302 |
+
*/
|
303 |
+
|
304 |
+
/* Adds a box to the side column */
|
305 |
+
public function add_meta_box()
|
306 |
+
{
|
307 |
+
foreach (parent::get_post_types() as $post_type)
|
308 |
+
if (isset($post_type["active"]))
|
309 |
+
add_meta_box(
|
310 |
+
'xmlsf_section',
|
311 |
+
__( 'XML Sitemap', 'xml-sitemap-feed' ),
|
312 |
+
array($this,'meta_box'),
|
313 |
+
$post_type['name'],
|
314 |
+
'side'
|
315 |
+
);
|
316 |
+
}
|
317 |
+
|
318 |
+
|
319 |
+
public function meta_box($post)
|
320 |
+
{
|
321 |
+
// Use nonce for verification
|
322 |
+
wp_nonce_field( plugin_basename( __FILE__ ), 'xmlsf_sitemap_nonce' );
|
323 |
+
|
324 |
+
// The actual fields for data entry
|
325 |
+
// Use get_post_meta to retrieve an existing value from the database and use the value for the form
|
326 |
+
$value = get_post_meta( $post->ID, '_xmlsf_priority', true );
|
327 |
+
echo '<p><label>';
|
328 |
+
_e('Priority','xml-sitemap-feed');
|
329 |
+
echo ' <input type="number" step="0.1" min="0" max="1" name="xmlsf_priority" id="xmlsf_priority" value="'.$value.'" class="small-text"></label> <span class="description">'.sprintf(__('Leave empty for automatic Priority as configured on %1$s > %2$s.','xml-sitemap-feed'),__('Settings'),__('Reading')).'</span></p>';
|
330 |
+
}
|
331 |
+
|
332 |
+
/* When the post is saved, save our meta data */
|
333 |
+
function save_metadata( $post_id )
|
334 |
+
{
|
335 |
+
if ( !isset($post_id) )
|
336 |
+
$post_id = (int)$_REQUEST['post_ID'];
|
337 |
+
|
338 |
+
if ( !current_user_can( 'edit_post', $post_id ) || !isset($_POST['xmlsf_sitemap_nonce']) || !wp_verify_nonce($_POST['xmlsf_sitemap_nonce'], plugin_basename( __FILE__ )) )
|
339 |
+
return;
|
340 |
+
|
341 |
+
if ( isset($_POST['xmlsf_priority']) && $_POST['xmlsf_priority'] != '' && is_numeric($_POST['xmlsf_priority']) ) {
|
342 |
+
if ($_POST['xmlsf_priority'] <= 0)
|
343 |
+
update_post_meta($post_id, 'priority', '0');
|
344 |
+
elseif ($_POST['xmlsf_priority'] >= 1)
|
345 |
+
update_post_meta($post_id, '_xmlsf_priority', '1');
|
346 |
+
else
|
347 |
+
update_post_meta($post_id, '_xmlsf_priority', $_POST['xmlsf_priority']);
|
348 |
+
} else {
|
349 |
+
delete_post_meta($post_id, '_xmlsf_priority');
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* CONSTRUCTOR
|
355 |
+
*/
|
356 |
+
|
357 |
+
function __construct() {
|
358 |
+
|
359 |
+
// SETTINGS
|
360 |
+
add_settings_section('xmlsf_main_section', '<a name="xmlsf"></a>'.__('XML Sitemaps','xml-sitemap-feed'), array($this,'privacy_settings_section'), 'reading');
|
361 |
+
// sitemaps
|
362 |
+
register_setting('reading', 'xmlsf_sitemaps', array($this,'sanitize_sitemaps_settings') );
|
363 |
+
add_settings_field('xmlsf_sitemaps', __('Enable XML sitemaps','xml-sitemap-feed'), array($this,'sitemaps_settings_field'), 'reading', 'xmlsf_main_section');
|
364 |
+
|
365 |
+
$sitemaps = parent::get_sitemaps();
|
366 |
+
if (isset($sitemaps['sitemap'])) {
|
367 |
+
// post_types
|
368 |
+
register_setting('reading', 'xmlsf_post_types', array($this,'sanitize_post_types_settings') );
|
369 |
+
add_settings_field('xmlsf_post_types', __('Include post types','xml-sitemap-feed'), array($this,'post_types_settings_field'), 'reading', 'xmlsf_main_section');
|
370 |
+
// taxonomies
|
371 |
+
register_setting('reading', 'xmlsf_taxonomies', array($this,'sanitize_taxonomies_settings') );
|
372 |
+
add_settings_field('xmlsf_taxonomies', __('Include taxonomies','xml-sitemap-feed'), array($this,'taxonomies_settings_field'), 'reading', 'xmlsf_main_section');
|
373 |
+
// pings
|
374 |
+
register_setting('reading', 'xmlsf_ping', array($this,'sanitize_ping_settings') );
|
375 |
+
add_settings_field('xmlsf_ping', __('Ping on Publish','xml-sitemap-feed'), array($this,'ping_settings_field'), 'reading', 'xmlsf_main_section');
|
376 |
+
}
|
377 |
+
|
378 |
+
//robots only when permalinks are set
|
379 |
+
if(''!=get_option('permalink_structure')) {
|
380 |
+
register_setting('reading', 'xmlsf_robots', array($this,'sanitize_robots_settings') );
|
381 |
+
add_settings_field('xmlsf_robots', __('Additional robots.txt rules','xml-sitemap-feed'), array($this,'robots_settings_field'), 'reading', 'xmlsf_main_section');
|
382 |
+
}
|
383 |
+
|
384 |
+
add_settings_field('xmlsf_reset', __('Reset XML sitemaps','xml-sitemap-feed'), array($this,'reset_settings_field'), 'reading', 'xmlsf_main_section');
|
385 |
+
|
386 |
+
// POST META BOX
|
387 |
+
add_action( 'add_meta_boxes', array($this,'add_meta_box') );
|
388 |
+
add_action( 'save_post', array($this,'save_metadata') );
|
389 |
+
|
390 |
+
// ACTION LINK
|
391 |
+
add_filter('plugin_action_links_' . XMLSF_PLUGIN_BASENAME, array($this, 'add_action_link') );
|
392 |
+
}
|
393 |
+
|
394 |
+
}
|
395 |
+
|
396 |
+
/* ----------------------
|
397 |
+
* INSTANTIATE
|
398 |
+
* ---------------------- */
|
399 |
+
|
400 |
+
if ( class_exists('XMLSitemapFeed') )
|
401 |
+
$xmlsf_admin = new XMLSF_Admin();
|
402 |
+
|
includes/core.php
ADDED
@@ -0,0 +1,766 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* ------------------------------
|
3 |
+
* XMLSitemapFeed CLASS
|
4 |
+
* ------------------------------ */
|
5 |
+
|
6 |
+
class XMLSitemapFeed {
|
7 |
+
|
8 |
+
/**
|
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 |
+
|
26 |
+
// Global values used for priority and changefreq calculation
|
27 |
+
private $firstdate;
|
28 |
+
private $lastmodified;
|
29 |
+
private $postmodified = array();
|
30 |
+
|
31 |
+
private function build_defaults()
|
32 |
+
{
|
33 |
+
// sitemaps
|
34 |
+
if ( '1' == get_option('blog_public') )
|
35 |
+
$this->defaults['sitemaps'] = array(
|
36 |
+
'sitemap' => XMLSF_NAME
|
37 |
+
);
|
38 |
+
else
|
39 |
+
$this->defaults['sitemaps'] = array();
|
40 |
+
|
41 |
+
// post_types
|
42 |
+
$this->defaults['post_types'] = array();
|
43 |
+
foreach ( get_post_types(array('public'=>true),'names') as $name ) {
|
44 |
+
$this->defaults['post_types'][$name] = array(
|
45 |
+
'name' => $name,
|
46 |
+
'active' => '',
|
47 |
+
'priority' => '0.5',
|
48 |
+
'dynamic_priority' => '',
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( defined('XMLSF_POST_TYPE') && XMLSF_POST_TYPE != 'any' )
|
53 |
+
$active_arr = array_map('trim',explode(',',XMLSF_POST_TYPE));
|
54 |
+
else
|
55 |
+
$active_arr = array('post','page');
|
56 |
+
|
57 |
+
foreach ( $active_arr as $name )
|
58 |
+
if ( isset($this->defaults['post_types'][$name]) )
|
59 |
+
$this->defaults['post_types'][$name]['active'] = '1';
|
60 |
+
|
61 |
+
if ( isset($this->defaults['post_types']['post']) ) {
|
62 |
+
if (wp_count_posts('post')->publish > 500)
|
63 |
+
$this->defaults['post_types']['post']['archive'] = 'yearly';
|
64 |
+
else
|
65 |
+
$this->defaults['post_types']['post']['archive'] = '';
|
66 |
+
//$this->defaults['post_types']['post']['tags'] => array('news','image','video');
|
67 |
+
$this->defaults['post_types']['post']['priority'] = '0.7';
|
68 |
+
$this->defaults['post_types']['post']['dynamic_priority'] = '1';
|
69 |
+
}
|
70 |
+
|
71 |
+
if ( isset($this->defaults['post_types']['page']) ) {
|
72 |
+
//$this->defaults['post_types']['page']['tags'] => array('image','video');
|
73 |
+
$this->defaults['post_types']['page']['priority'] = '0.3';
|
74 |
+
}
|
75 |
+
|
76 |
+
// taxonomies
|
77 |
+
$this->defaults['taxonomies'] = array();// by default do not include any taxonomies
|
78 |
+
|
79 |
+
// ping search engines
|
80 |
+
$this->defaults['ping'] = array(
|
81 |
+
'google' => array (
|
82 |
+
'active' => '1',
|
83 |
+
'uri' => 'http://www.google.com/webmasters/tools/ping?sitemap=',
|
84 |
+
),
|
85 |
+
'bing' => array (
|
86 |
+
'active' => '1',
|
87 |
+
'uri' => 'http://www.bing.com/ping?sitemap=',
|
88 |
+
),
|
89 |
+
);
|
90 |
+
|
91 |
+
$this->defaults['pings'] = array(); // for storing last ping timestamps and status
|
92 |
+
|
93 |
+
// robots
|
94 |
+
$this->defaults['robots'] = "Disallow: /xmlrpc.php\nDisallow: /wp-\nDisallow: /trackback/\nDisallow: ?wptheme=\nDisallow: ?comments=\nDisallow: ?replytocom\nDisallow: /comment-page-\nDisallow: /?s=\nDisallow: /wp-content/\nAllow: /wp-content/uploads/\n";
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
public function defaults($key = false)
|
99 |
+
{
|
100 |
+
if (empty($this->defaults))
|
101 |
+
$this->build_defaults();
|
102 |
+
|
103 |
+
if (!$key)
|
104 |
+
$return = $this->defaults;
|
105 |
+
else
|
106 |
+
$return = $this->defaults[$key];
|
107 |
+
|
108 |
+
return apply_filters( 'xmlsf_defaults', $return, $key );
|
109 |
+
}
|
110 |
+
|
111 |
+
public function get_option($option)
|
112 |
+
{
|
113 |
+
return get_option($this->prefix.$option, $this->defaults($option));
|
114 |
+
}
|
115 |
+
|
116 |
+
public function get_sitemaps()
|
117 |
+
{
|
118 |
+
$return = $this->get_option('sitemaps');
|
119 |
+
|
120 |
+
// make sure it's an array we are returning
|
121 |
+
return (is_array($return)) ? (array)$return : array();
|
122 |
+
}
|
123 |
+
|
124 |
+
public function get_ping()
|
125 |
+
{
|
126 |
+
$return = $this->get_option('ping');
|
127 |
+
|
128 |
+
// make sure it's an array we are returning
|
129 |
+
return (!empty($return)) ? (array)$return : array();
|
130 |
+
}
|
131 |
+
|
132 |
+
public function get_pings()
|
133 |
+
{
|
134 |
+
$return = $this->get_option('pings');
|
135 |
+
|
136 |
+
// make sure it's an array we are returning
|
137 |
+
return (!empty($return)) ? (array)$return : array();
|
138 |
+
}
|
139 |
+
|
140 |
+
public function get_post_types()
|
141 |
+
{
|
142 |
+
$return = $this->get_option('post_types');
|
143 |
+
|
144 |
+
// make sure it's an array we are returning
|
145 |
+
return (!empty($return)) ? (array)$return : array();
|
146 |
+
}
|
147 |
+
|
148 |
+
public function have_post_types()
|
149 |
+
{
|
150 |
+
$post_types = $this->get_option('post_types');
|
151 |
+
$return = array();
|
152 |
+
|
153 |
+
|
154 |
+
foreach ( $post_types as $type => $values ) {
|
155 |
+
if(!empty($values['active'])) {
|
156 |
+
$count = wp_count_posts( $values['name'] );
|
157 |
+
if ($count->publish > 0) {
|
158 |
+
$values['count'] = $count->publish;
|
159 |
+
|
160 |
+
$return[$type] = $values;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
// make sure it's an array we are returning
|
166 |
+
return (!empty($return)) ? (array)$return : array();
|
167 |
+
}
|
168 |
+
|
169 |
+
public function get_taxonomies()
|
170 |
+
{
|
171 |
+
$return = $this->get_option('taxonomies');
|
172 |
+
|
173 |
+
// make sure it's an array we are returning
|
174 |
+
return (!empty($return)) ? (array)$return : array();
|
175 |
+
}
|
176 |
+
|
177 |
+
public function get_archives($post_type = 'post', $type = '')
|
178 |
+
{
|
179 |
+
global $wpdb;
|
180 |
+
$return = array();
|
181 |
+
if ( 'monthly' == $type ) {
|
182 |
+
$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";
|
183 |
+
$key = md5($query);
|
184 |
+
$cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
|
185 |
+
if ( !isset( $cache[ $key ] ) ) {
|
186 |
+
$arcresults = $wpdb->get_results($query);
|
187 |
+
$cache[ $key ] = $arcresults;
|
188 |
+
wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
|
189 |
+
} else {
|
190 |
+
$arcresults = $cache[ $key ];
|
191 |
+
}
|
192 |
+
if ( $arcresults ) {
|
193 |
+
foreach ( (array) $arcresults as $arcresult ) {
|
194 |
+
$return[$arcresult->year.$arcresult->month] = $this->get_index_url( 'posttype', $post_type, $arcresult->year . $arcresult->month );
|
195 |
+
}
|
196 |
+
}
|
197 |
+
} elseif ('yearly' == $type) {
|
198 |
+
$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";
|
199 |
+
$key = md5($query);
|
200 |
+
$cache = wp_cache_get( 'xmlsf_get_archives' , 'general');
|
201 |
+
if ( !isset( $cache[ $key ] ) ) {
|
202 |
+
$arcresults = $wpdb->get_results($query);
|
203 |
+
$cache[ $key ] = $arcresults;
|
204 |
+
wp_cache_set( 'xmlsf_get_archives', $cache, 'general' );
|
205 |
+
} else {
|
206 |
+
$arcresults = $cache[ $key ];
|
207 |
+
}
|
208 |
+
if ($arcresults) {
|
209 |
+
foreach ( (array) $arcresults as $arcresult) {
|
210 |
+
$return[$arcresult->year] = $this->get_index_url( 'posttype', $post_type, $arcresult->year );
|
211 |
+
}
|
212 |
+
}
|
213 |
+
} else {
|
214 |
+
$return[0] = $this->get_index_url('posttype', $post_type); // $sitemap = 'home', $type = false, $param = false
|
215 |
+
}
|
216 |
+
return $return;
|
217 |
+
}
|
218 |
+
|
219 |
+
public function get_robots()
|
220 |
+
{
|
221 |
+
return ( $robots = $this->get_option('robots') ) ? $robots : '';
|
222 |
+
}
|
223 |
+
|
224 |
+
public function get_do_tags( $type = 'post' )
|
225 |
+
{
|
226 |
+
$return = $this->get_option('post_types');
|
227 |
+
|
228 |
+
// make sure it's an array we are returning
|
229 |
+
return (!empty($return[$type]['tags'])) ? (array)$return[$type]['tags'] : array();
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
/**
|
234 |
+
* TEMPLATE FUNCTIONS
|
235 |
+
*/
|
236 |
+
|
237 |
+
public function postmodified()
|
238 |
+
{
|
239 |
+
global $post;
|
240 |
+
|
241 |
+
if ( empty($this->postmodified[$post->ID]) ) {
|
242 |
+
$postmodified = get_post_modified_time( 'Y-m-d H:i:s', true, $post->ID );
|
243 |
+
$options = $this->get_option('post_types');
|
244 |
+
|
245 |
+
if( !empty($options[$post->post_type]['update_lastmod_on_comments']) )
|
246 |
+
$lastcomment = get_comments( array(
|
247 |
+
'status' => 'approve',
|
248 |
+
'number' => 1,
|
249 |
+
'post_id' => $post->ID,
|
250 |
+
) );
|
251 |
+
|
252 |
+
if ( isset($lastcomment[0]->comment_date_gmt) )
|
253 |
+
if ( mysql2date( 'U', $lastcomment[0]->comment_date_gmt ) > mysql2date( 'U', $postmodified ) )
|
254 |
+
$postmodified = $lastcomment[0]->comment_date_gmt;
|
255 |
+
|
256 |
+
$this->postmodified[$post->ID] = $postmodified;
|
257 |
+
}
|
258 |
+
|
259 |
+
return $this->postmodified[$post->ID];
|
260 |
+
}
|
261 |
+
|
262 |
+
public function get_lastmod()
|
263 |
+
{
|
264 |
+
return mysql2date('Y-m-d\TH:i:s+00:00', $this->postmodified(), false);
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
public function get_changefreq()
|
269 |
+
{
|
270 |
+
$lastactivityage = ( gmdate('U') - mysql2date( 'U', $this->postmodified() ) ); // post age
|
271 |
+
|
272 |
+
if ( ($lastactivityage/86400) < 1 ) { // last activity less than 1 day old
|
273 |
+
$changefreq = 'hourly';
|
274 |
+
} else if ( ($lastactivityage/86400) < 7 ) { // last activity less than 1 week old
|
275 |
+
$changefreq = 'daily';
|
276 |
+
} else if ( ($lastactivityage/86400) < 30 ) { // last activity less than one month old
|
277 |
+
$changefreq = 'weekly';
|
278 |
+
} else if ( ($lastactivityage/86400) < 365 ) { // last activity less than 1 year old
|
279 |
+
$changefreq = 'monthly';
|
280 |
+
} else {
|
281 |
+
$changefreq = 'yearly'; // over a year old...
|
282 |
+
}
|
283 |
+
|
284 |
+
return $changefreq;
|
285 |
+
}
|
286 |
+
|
287 |
+
public function get_priority()
|
288 |
+
{
|
289 |
+
global $post;
|
290 |
+
$options = $this->get_option('post_types');
|
291 |
+
$defaults = $this->defaults('post_types');
|
292 |
+
$priority_meta = get_metadata('post', $post->ID, '_xmlsf_priority' , true);
|
293 |
+
|
294 |
+
if ( !empty($priority_meta) ) {
|
295 |
+
|
296 |
+
$priority = $priority_meta;
|
297 |
+
|
298 |
+
} elseif ( !empty($options[$post->post_type]['dynamic_priority']) ) {
|
299 |
+
|
300 |
+
$post_modified = mysql2date('U',$post->post_modified_gmt);
|
301 |
+
|
302 |
+
if ( empty($this->lastmodified) )
|
303 |
+
$this->lastmodified = mysql2date('U',get_lastmodified('GMT',$post->post_type));
|
304 |
+
// last posts or page modified date in Unix seconds
|
305 |
+
// uses get_lastmodified() function defined in xml-sitemap/hacks.php !
|
306 |
+
|
307 |
+
if ( empty($this->firstdate) )
|
308 |
+
$this->firstdate = mysql2date('U',get_firstdate('GMT',$post->post_type));
|
309 |
+
// uses get_firstdate() function defined in xml-sitemap/hacks.php !
|
310 |
+
|
311 |
+
if ( isset($options[$post->post_type]['priority']) )
|
312 |
+
$priority_value = $options[$post->post_type]['priority'];
|
313 |
+
else
|
314 |
+
$priority_value = $defaults[$post->post_type]['priority'];
|
315 |
+
|
316 |
+
// reduce by age
|
317 |
+
if ( is_sticky($post->ID) )
|
318 |
+
$priority = $priority_value;
|
319 |
+
else
|
320 |
+
$priority = ( $this->lastmodified > $this->firstdate ) ? $priority_value - $priority_value * ( $this->lastmodified - $post_modified ) / ( $this->lastmodified - $this->firstdate ) : $priority_value;
|
321 |
+
|
322 |
+
if ( $post->comment_count > 0 )
|
323 |
+
$priority = $priority + 0.1 + ( 0.9 - $priority ) * $post->comment_count / wp_count_comments($post->post_type)->approved;
|
324 |
+
|
325 |
+
// and a final trim for cases where we end up above 1 (sticky posts with many comments)
|
326 |
+
if ($priority > 1)
|
327 |
+
$priority = 1;
|
328 |
+
|
329 |
+
} else {
|
330 |
+
|
331 |
+
$priority = ( isset($options[$post->post_type]['priority']) && is_numeric($options[$post->post_type]['priority']) ) ? $options[$post->post_type]['priority'] : $defaults[$post->post_type]['priority'];
|
332 |
+
|
333 |
+
}
|
334 |
+
|
335 |
+
return number_format($priority,1);
|
336 |
+
}
|
337 |
+
|
338 |
+
public function get_home_urls()
|
339 |
+
{
|
340 |
+
$urls = array();
|
341 |
+
|
342 |
+
global $polylang,$q_config;
|
343 |
+
|
344 |
+
if ( isset($polylang) )
|
345 |
+
foreach ($polylang->get_languages_list() as $term)
|
346 |
+
$urls[] = $polylang->get_home_url($term);
|
347 |
+
else
|
348 |
+
$urls[] = home_url();
|
349 |
+
|
350 |
+
return $urls;
|
351 |
+
}
|
352 |
+
|
353 |
+
public function get_excluded($post_type)
|
354 |
+
{
|
355 |
+
global $polylang;
|
356 |
+
$exclude = array();
|
357 |
+
|
358 |
+
if ( $post_type == 'page' && $id = get_option('page_on_front') ) {
|
359 |
+
$exclude[] = $id;
|
360 |
+
if ( isset($polylang) )
|
361 |
+
$exclude = $polylang->get_translations('post', $id);
|
362 |
+
}
|
363 |
+
|
364 |
+
return $exclude;
|
365 |
+
}
|
366 |
+
|
367 |
+
public function get_index_url( $sitemap = 'home', $type = false, $param = false )
|
368 |
+
{
|
369 |
+
$root = esc_url( trailingslashit(home_url()) );
|
370 |
+
$name = $this->base_name.'-'.$sitemap;
|
371 |
+
|
372 |
+
if ( $type )
|
373 |
+
$name .= '-'.$type;
|
374 |
+
|
375 |
+
if ( '' == get_option('permalink_structure') || '1' != get_option('blog_public')) {
|
376 |
+
$name = '?feed='.$name;
|
377 |
+
$name .= $param ? '&m='.$param : '';
|
378 |
+
} else {
|
379 |
+
$name .= $param ? '.'.$param : '';
|
380 |
+
$name .= '.'.$this->extension;
|
381 |
+
}
|
382 |
+
|
383 |
+
return $root . $name;
|
384 |
+
}
|
385 |
+
|
386 |
+
|
387 |
+
/**
|
388 |
+
* ROBOTSTXT
|
389 |
+
*/
|
390 |
+
|
391 |
+
// add sitemap location in robots.txt generated by WP
|
392 |
+
public function robots($output)
|
393 |
+
{
|
394 |
+
echo "\n# XML Sitemap & Google News Feeds version ".XMLSF_VERSION." - http://status301.net/wordpress-plugins/xml-sitemap-feed/";
|
395 |
+
|
396 |
+
if ( '1' != get_option('blog_public') ) {
|
397 |
+
echo "\n# XML Sitemaps are disabled. Please see Site Visibility on Settings > Reading.";
|
398 |
+
} else {
|
399 |
+
foreach ( $this->get_sitemaps() as $pretty )
|
400 |
+
echo "\nSitemap: " . trailingslashit(get_bloginfo('url')) . $pretty;
|
401 |
+
|
402 |
+
if ( empty($pretty) )
|
403 |
+
echo "\n# No XML Sitemaps are enabled. Please see XML Sitemaps on Settings > Reading.";
|
404 |
+
}
|
405 |
+
echo "\n\n";
|
406 |
+
}
|
407 |
+
|
408 |
+
// add robots.txt rules
|
409 |
+
public function robots_txt($output)
|
410 |
+
{
|
411 |
+
return $output . $this->get_option('robots') ;
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* REWRITES
|
416 |
+
*/
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Remove the trailing slash from permalinks that have an extension,
|
420 |
+
* such as /sitemap.xml (thanks to Permalink Editor plugin for WordPress)
|
421 |
+
*
|
422 |
+
* @param string $request
|
423 |
+
*/
|
424 |
+
|
425 |
+
public function trailingslash($request)
|
426 |
+
{
|
427 |
+
if (pathinfo($request, PATHINFO_EXTENSION)) {
|
428 |
+
return untrailingslashit($request);
|
429 |
+
}
|
430 |
+
return $request; // trailingslashit($request);
|
431 |
+
}
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Add sitemap rewrite rules
|
435 |
+
*
|
436 |
+
* @param string $wp_rewrite
|
437 |
+
*/
|
438 |
+
|
439 |
+
public function rewrite_rules($wp_rewrite)
|
440 |
+
{
|
441 |
+
$xmlsf_rules = array();
|
442 |
+
$sitemaps = $this->get_sitemaps();
|
443 |
+
|
444 |
+
foreach ( $sitemaps as $name => $pretty )
|
445 |
+
$xmlsf_rules[ preg_quote($pretty) . '$' ] = $wp_rewrite->index . '?feed=' . $name;
|
446 |
+
|
447 |
+
if (!empty($sitemaps['sitemap'])) {
|
448 |
+
// home urls
|
449 |
+
$xmlsf_rules[ $this->base_name . '-home\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-home';
|
450 |
+
|
451 |
+
// add rules for post types (can be split by month or year)
|
452 |
+
foreach ( $this->get_post_types() as $post_type )
|
453 |
+
if ( isset($post_type['active']) && '1' == $post_type['active'] )
|
454 |
+
$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]';
|
455 |
+
|
456 |
+
// add rules for taxonomies
|
457 |
+
foreach ( $this->get_taxonomies() as $taxonomy )
|
458 |
+
$xmlsf_rules[ $this->base_name . '-taxonomy-' . $taxonomy . '\.' . $this->extension . '$' ] = $wp_rewrite->index . '?feed=sitemap-taxonomy-' . $taxonomy; //&taxonomy=
|
459 |
+
|
460 |
+
}
|
461 |
+
|
462 |
+
$wp_rewrite->rules = $xmlsf_rules + $wp_rewrite->rules;
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* REQUEST FILTER
|
467 |
+
*/
|
468 |
+
|
469 |
+
public function filter_request( $request )
|
470 |
+
{
|
471 |
+
if ( isset($request['feed']) && strpos($request['feed'],'sitemap') == 0 ) {
|
472 |
+
|
473 |
+
if ( $request['feed'] == 'sitemap' ) {
|
474 |
+
// setup actions and filters
|
475 |
+
add_action('do_feed_sitemap', array($this, 'load_template_index'), 10, 1);
|
476 |
+
|
477 |
+
return $request;
|
478 |
+
}
|
479 |
+
|
480 |
+
if ( $request['feed'] == 'sitemap-news' ) {
|
481 |
+
// disable caching
|
482 |
+
define( 'DONOTCACHEPAGE', 1 ); // wp super cache -- or does super cache always clear feeds after new posts??
|
483 |
+
// TODO w3tc
|
484 |
+
|
485 |
+
// setup actions and filters
|
486 |
+
add_action('do_feed_sitemap-news', array($this, 'load_template_news'), 10, 1);
|
487 |
+
add_filter('post_limits', array($this, 'filter_news_limits') );
|
488 |
+
add_filter('posts_where', array($this, 'filter_news_where'), 10, 1);
|
489 |
+
|
490 |
+
// modify request parameters
|
491 |
+
$types_arr = explode(',',XMLSF_NEWS_POST_TYPE);
|
492 |
+
$request['post_type'] = (in_array('any',$types_arr)) ? 'any' : $types_arr;
|
493 |
+
|
494 |
+
$request['no_found_rows'] = true;
|
495 |
+
$request['update_post_meta_cache'] = false;
|
496 |
+
//$request['update_post_term_cache'] = false; // << TODO test: can we disable or do we need this for terms?
|
497 |
+
|
498 |
+
return $request;
|
499 |
+
}
|
500 |
+
|
501 |
+
if ( $request['feed'] == 'sitemap-home' ) {
|
502 |
+
// setup actions and filters
|
503 |
+
add_action('do_feed_sitemap-home', array($this, 'load_template_base'), 10, 1);
|
504 |
+
|
505 |
+
return $request;
|
506 |
+
}
|
507 |
+
|
508 |
+
if ( strpos($request['feed'],'sitemap-posttype') == 0 ) {
|
509 |
+
foreach ( $this->get_post_types() as $post_type ) {
|
510 |
+
if ( $request['feed'] == 'sitemap-posttype-'.$post_type['name'] ) {
|
511 |
+
// setup actions and filters
|
512 |
+
add_action('do_feed_sitemap-posttype-'.$post_type['name'], array($this, 'load_template'), 10, 1);
|
513 |
+
add_filter( 'post_limits', array($this, 'filter_limits') );
|
514 |
+
|
515 |
+
// modify request parameters
|
516 |
+
$request['post_type'] = $post_type['name'];
|
517 |
+
$request['orderby'] = 'modified';
|
518 |
+
$request['lang'] = '';
|
519 |
+
$request['no_found_rows'] = true;
|
520 |
+
$request['update_post_meta_cache'] = false;
|
521 |
+
$request['update_post_term_cache'] = false;
|
522 |
+
|
523 |
+
return $request;
|
524 |
+
}
|
525 |
+
}
|
526 |
+
}
|
527 |
+
|
528 |
+
if ( strpos($request['feed'],'sitemap-taxonomy') == 0 ) {
|
529 |
+
foreach ( $this->get_taxonomies() as $taxonomy ) {
|
530 |
+
if ( $request['feed'] == 'sitemap-taxonomy-'.$taxonomy ) {
|
531 |
+
// setup actions and filters
|
532 |
+
add_action('do_feed_sitemap-taxonomy-'.$taxonomy, array($this, 'load_template_taxonomy'), 10, 1);
|
533 |
+
|
534 |
+
// modify request parameters
|
535 |
+
$request['taxonomy'] = $taxonomy;
|
536 |
+
$request['lang'] = '';
|
537 |
+
$request['no_found_rows'] = true;
|
538 |
+
$request['update_post_meta_cache'] = false;
|
539 |
+
$request['update_post_term_cache'] = false;
|
540 |
+
$request['post_status'] = 'publish';
|
541 |
+
|
542 |
+
return $request;
|
543 |
+
}
|
544 |
+
}
|
545 |
+
}
|
546 |
+
}
|
547 |
+
|
548 |
+
return $request;
|
549 |
+
}
|
550 |
+
|
551 |
+
/**
|
552 |
+
* FEED TEMPLATES
|
553 |
+
*/
|
554 |
+
|
555 |
+
// set up the sitemap index template
|
556 |
+
public function load_template_index()
|
557 |
+
{
|
558 |
+
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap.php' );
|
559 |
+
}
|
560 |
+
|
561 |
+
// set up the sitemap home page(s) template
|
562 |
+
public function load_template_base()
|
563 |
+
{
|
564 |
+
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-home.php' );
|
565 |
+
}
|
566 |
+
|
567 |
+
// set up the post types sitemap template
|
568 |
+
public function load_template()
|
569 |
+
{
|
570 |
+
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-post_type.php' );
|
571 |
+
}
|
572 |
+
|
573 |
+
// set up the taxonomy sitemap template
|
574 |
+
public function load_template_taxonomy()
|
575 |
+
{
|
576 |
+
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-taxonomy.php' );
|
577 |
+
}
|
578 |
+
|
579 |
+
// set up the news sitemap template
|
580 |
+
public function load_template_news()
|
581 |
+
{
|
582 |
+
load_template( XMLSF_PLUGIN_DIR . '/includes/feed-sitemap-news.php' );
|
583 |
+
}
|
584 |
+
|
585 |
+
/**
|
586 |
+
* LIMITS
|
587 |
+
*/
|
588 |
+
|
589 |
+
// override default feed limit
|
590 |
+
public function filter_limits( $limits )
|
591 |
+
{
|
592 |
+
return 'LIMIT 0, 50000';
|
593 |
+
}
|
594 |
+
|
595 |
+
// override default feed limit for taxonomy sitemaps
|
596 |
+
public function filter_limits_taxonomy( $limits )
|
597 |
+
{
|
598 |
+
return 'LIMIT 0, 1';
|
599 |
+
}
|
600 |
+
|
601 |
+
// override default feed limit for GN
|
602 |
+
public function filter_news_limits( $limits )
|
603 |
+
{
|
604 |
+
return 'LIMIT 0, 1000';
|
605 |
+
}
|
606 |
+
|
607 |
+
// Create a new filtering function that will add a where clause to the query,
|
608 |
+
// used for the Google News Sitemap
|
609 |
+
public function filter_news_where( $where = '' )
|
610 |
+
{
|
611 |
+
// only posts from the last 2 days
|
612 |
+
return $where . " AND post_date > '" . date('Y-m-d H:i:s', strtotime('-49 hours')) . "'";
|
613 |
+
}
|
614 |
+
|
615 |
+
|
616 |
+
/**
|
617 |
+
* PINGING
|
618 |
+
*/
|
619 |
+
|
620 |
+
public function ping($uri, $timeout = 3)
|
621 |
+
{
|
622 |
+
$options = array();
|
623 |
+
$options['timeout'] = $timeout;
|
624 |
+
|
625 |
+
$response = wp_remote_request( $uri, $options );
|
626 |
+
|
627 |
+
if ( '200' == wp_remote_retrieve_response_code($response) )
|
628 |
+
$succes = true;
|
629 |
+
else
|
630 |
+
$succes = false;
|
631 |
+
|
632 |
+
return $succes;
|
633 |
+
}
|
634 |
+
|
635 |
+
public function do_pings($post_ID)
|
636 |
+
{
|
637 |
+
$sitemaps = $this->get_sitemaps();
|
638 |
+
foreach ($this->get_ping() as $se => $data) {
|
639 |
+
if(empty($data['active']) || '1' != $data['active']) continue;
|
640 |
+
|
641 |
+
foreach ( $sitemaps as $pretty ) {
|
642 |
+
if ( $this->ping( $data['uri'].urlencode(trailingslashit(get_bloginfo('url')) . $pretty) ) ) {
|
643 |
+
$pings = $this->get_pings();
|
644 |
+
$pings[$se][$pretty] = mysql2date('Y-m-d H:i:s', 'now', false);
|
645 |
+
update_option($this->prefix.'pings',$pings);
|
646 |
+
}
|
647 |
+
}
|
648 |
+
}
|
649 |
+
|
650 |
+
return $post_ID;
|
651 |
+
}
|
652 |
+
|
653 |
+
/**
|
654 |
+
* DE-ACTIVATION
|
655 |
+
*/
|
656 |
+
|
657 |
+
public function clear_settings()
|
658 |
+
{
|
659 |
+
delete_option('xmlsf_version');
|
660 |
+
foreach ( $this->defaults() as $option => $settings )
|
661 |
+
delete_option('xmlsf_'.$option);
|
662 |
+
|
663 |
+
remove_action('generate_rewrite_rules', array($this, 'rewrite_rules') );
|
664 |
+
global $wp_rewrite;
|
665 |
+
$wp_rewrite->flush_rules();
|
666 |
+
}
|
667 |
+
|
668 |
+
/**
|
669 |
+
* INITIALISATION
|
670 |
+
*/
|
671 |
+
|
672 |
+
public function plugins_loaded()
|
673 |
+
{
|
674 |
+
// TEXT DOMAIN
|
675 |
+
|
676 |
+
if ( is_admin() ) // text domain on plugins_loaded even if it is for admin only
|
677 |
+
load_plugin_textdomain('xml-sitemap-feed', false, dirname(dirname(plugin_basename( __FILE__ ))) . '/languages' );
|
678 |
+
|
679 |
+
if (get_option('xmlsf_version') != XMLSF_VERSION) {
|
680 |
+
// rewrite rules not available on plugins_loaded
|
681 |
+
// and don't flush rules from init as Polylang chokes on that
|
682 |
+
// just remove the rules and let WP renew them when ready...
|
683 |
+
delete_option('rewrite_rules');
|
684 |
+
|
685 |
+
$this->yes_mother = true;
|
686 |
+
|
687 |
+
update_option('xmlsf_version', XMLSF_VERSION);
|
688 |
+
}
|
689 |
+
|
690 |
+
}
|
691 |
+
|
692 |
+
private function flush_rules($hard = false)
|
693 |
+
{
|
694 |
+
if ($this->yes_mother)
|
695 |
+
return;
|
696 |
+
|
697 |
+
global $wp_rewrite;
|
698 |
+
// don't need hard flush by default
|
699 |
+
$wp_rewrite->flush_rules($hard);
|
700 |
+
|
701 |
+
$this->yes_mother = true;
|
702 |
+
}
|
703 |
+
|
704 |
+
public function admin_init()
|
705 |
+
{
|
706 |
+
// UPGRADE RULES after plugin upgrade (is this needed since we do this on plugins_loaded too?)
|
707 |
+
if (get_option('xmlsf_version') != XMLSF_VERSION) {
|
708 |
+
$this->flush_rules();
|
709 |
+
update_option('xmlsf_version', XMLSF_VERSION);
|
710 |
+
}
|
711 |
+
|
712 |
+
// CATCH TRANSIENT for reset
|
713 |
+
if (delete_transient('xmlsf_clear_settings'))
|
714 |
+
$this->clear_settings();
|
715 |
+
|
716 |
+
// CATCH TRANSIENT for flushing rewrite rules after the sitemaps setting has changed
|
717 |
+
if (delete_transient('xmlsf_flush_rewrite_rules'))
|
718 |
+
$this->flush_rules();
|
719 |
+
|
720 |
+
// Include the admin class file
|
721 |
+
include_once( XMLSF_PLUGIN_DIR . '/includes/admin.php' );
|
722 |
+
|
723 |
+
}
|
724 |
+
|
725 |
+
// for debugging
|
726 |
+
public function _e_usage()
|
727 |
+
{
|
728 |
+
if (defined('WP_DEBUG') && WP_DEBUG == true) {
|
729 |
+
echo '<!-- Queries executed '.get_num_queries();
|
730 |
+
if(function_exists('memory_get_peak_usage'))
|
731 |
+
echo ' | Peak memory usage '.round(memory_get_peak_usage()/1024/1024,2).'M';
|
732 |
+
echo ' -->';
|
733 |
+
}
|
734 |
+
}
|
735 |
+
|
736 |
+
/**
|
737 |
+
* CONSTRUCTOR
|
738 |
+
*/
|
739 |
+
|
740 |
+
function __construct()
|
741 |
+
{
|
742 |
+
// REQUEST main filtering function
|
743 |
+
add_filter('request', array($this, 'filter_request'), 1 );
|
744 |
+
|
745 |
+
// TEXT DOMAIN, LANGUAGE PLUGIN FILTERS ...
|
746 |
+
add_action('plugins_loaded', array($this,'plugins_loaded'), 11 );
|
747 |
+
|
748 |
+
// REWRITES
|
749 |
+
add_action('generate_rewrite_rules', array($this, 'rewrite_rules') );
|
750 |
+
add_filter('user_trailingslashit', array($this, 'trailingslash') );
|
751 |
+
|
752 |
+
// REGISTER SETTINGS, SETTINGS FIELDS, UPGRADE checks...
|
753 |
+
add_action('admin_init', array($this,'admin_init'));
|
754 |
+
|
755 |
+
// ROBOTSTXT
|
756 |
+
add_action('do_robotstxt', array($this, 'robots'), 0 );
|
757 |
+
add_filter('robots_txt', array($this, 'robots_txt'), 0 );
|
758 |
+
|
759 |
+
// PINGING
|
760 |
+
add_action('publish_post', array($this, 'do_pings'));
|
761 |
+
|
762 |
+
// DE-ACTIVATION
|
763 |
+
register_deactivation_hook( XMLSF_PLUGIN_DIR . '/xml-sitemap.php', array($this, 'clear_settings') );
|
764 |
+
}
|
765 |
+
|
766 |
+
}
|
includes/feed-sitemap-home.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* XML Sitemap Feed Template for displaying an XML Sitemap feed.
|
4 |
+
*
|
5 |
+
* @package XML Sitemap Feed plugin for WordPress
|
6 |
+
*/
|
7 |
+
|
8 |
+
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
|
9 |
+
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
|
10 |
+
|
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') . '" -->
|
14 |
+
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
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 |
+
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 |
+
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', $lastmodified, false); ?></lastmod>
|
31 |
+
<changefreq><?php
|
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(); ?>
|
includes/feed-sitemap-news.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google News Sitemap Feed Template
|
4 |
+
*
|
5 |
+
* @package XML Sitemap Feed plugin for WordPress
|
6 |
+
*/
|
7 |
+
global $xmlsf;
|
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 |
+
|
11 |
+
echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?>
|
12 |
+
<?xml-stylesheet type="text/xsl" href="' . plugins_url('xsl/sitemap-news.xsl.php',__FILE__) . '?ver=' . XMLSF_VERSION . '"?>
|
13 |
+
<!-- generated-on="'.date('Y-m-d\TH:i:s+00:00').'" -->
|
14 |
+
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
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 |
+
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
|
19 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
20 |
+
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
21 |
+
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
|
22 |
+
http://www.google.com/schemas/sitemap-news/0.9
|
23 |
+
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd">
|
24 |
+
';
|
25 |
+
|
26 |
+
// get site language for default language
|
27 |
+
// bloginfo_rss('language') returns improper format so
|
28 |
+
// we explode on hyphen and use only first part.
|
29 |
+
// TODO this workaround breaks (simplified) chinese :(
|
30 |
+
$language = reset(explode('-', get_bloginfo_rss('language')));
|
31 |
+
if ( empty($language) )
|
32 |
+
$language = 'en';
|
33 |
+
|
34 |
+
// loop away!
|
35 |
+
if ( have_posts() ) :
|
36 |
+
while ( have_posts() ) :
|
37 |
+
the_post();
|
38 |
+
|
39 |
+
// check if we are not dealing with an external URL :: Thanks, Francois Deschenes :)
|
40 |
+
if(!preg_match('/^' . preg_quote(home_url(), '/') . '/i', get_permalink())) continue;
|
41 |
+
|
42 |
+
$thispostmodified_gmt = $post->post_modified_gmt; // post GMT timestamp
|
43 |
+
$thispostmodified = mysql2date('U',$thispostmodified_gmt); // post Unix timestamp
|
44 |
+
$lastcomment = array();
|
45 |
+
|
46 |
+
if ($post->comment_count && $post->comment_count > 0) {
|
47 |
+
$lastcomment = get_comments( array(
|
48 |
+
'status' => 'approve',
|
49 |
+
'$number' => 1,
|
50 |
+
'post_id' => $post->ID,
|
51 |
+
) );
|
52 |
+
$lastcommentsdate = mysql2date('U',$lastcomment[0]->comment_date_gmt); // last comment timestamp
|
53 |
+
if ( $lastcommentsdate > $thispostmodified ) {
|
54 |
+
$thispostmodified = $lastcommentsdate; // replace post with comment Unix timestamp
|
55 |
+
$thispostmodified_gmt = $lastcomment[0]->comment_date_gmt; // and replace modified GMT timestamp
|
56 |
+
}
|
57 |
+
}
|
58 |
+
$lastactivityage = (gmdate('U') - $thispostmodified); // post age
|
59 |
+
|
60 |
+
// get the article keywords from categories and tags
|
61 |
+
$keys_arr = get_the_category();
|
62 |
+
if (get_the_tags())
|
63 |
+
$keys_arr = array_merge($keys_arr,get_the_tags());
|
64 |
+
|
65 |
+
?>
|
66 |
+
<url>
|
67 |
+
<loc><?php the_permalink_rss() ?></loc>
|
68 |
+
<news:news>
|
69 |
+
<news:publication>
|
70 |
+
<news:name><?php
|
71 |
+
if(defined('XMLSF_GOOGLE_NEWS_NAME'))
|
72 |
+
echo apply_filters('the_title_rss', XMLSF_GOOGLE_NEWS_NAME);
|
73 |
+
else
|
74 |
+
echo bloginfo_rss('name'); ?></news:name>
|
75 |
+
<news:language><?php
|
76 |
+
$lang = reset(get_the_terms($post->ID,'language'));
|
77 |
+
echo (is_object($lang)) ? $lang->slug : $language; ?></news:language>
|
78 |
+
</news:publication>
|
79 |
+
<news:publication_date><?php
|
80 |
+
echo mysql2date('Y-m-d\TH:i:s+00:00', $post->post_date_gmt, false); ?></news:publication_date>
|
81 |
+
<news:title><?php the_title_rss() ?></news:title>
|
82 |
+
<news:keywords><?php
|
83 |
+
$do_comma = false;
|
84 |
+
$keys_arr = get_the_category();
|
85 |
+
foreach($keys_arr as $key) {
|
86 |
+
echo ( $do_comma ) ? ', ' : '' ;
|
87 |
+
echo apply_filters('the_title_rss', $key->name);
|
88 |
+
$do_comma = true;
|
89 |
+
} ?></news:keywords>
|
90 |
+
<?php
|
91 |
+
// TODO: create the new taxonomy "Google News Genre" with some genres preset
|
92 |
+
if ( taxonomy_exists('gn_genre') && get_the_terms($post->ID,'gn_genre') ) {
|
93 |
+
?>
|
94 |
+
<news:genres><?php
|
95 |
+
$do_comma = false;
|
96 |
+
foreach(get_the_terms($post->ID,'gn_genre') as $key) {
|
97 |
+
echo ( $do_comma ) ? ', ' : '' ;
|
98 |
+
echo apply_filters('the_title_rss', $key->name);
|
99 |
+
$do_comma = true;
|
100 |
+
} ?></news:genres>
|
101 |
+
<?php
|
102 |
+
}
|
103 |
+
?>
|
104 |
+
</news:news>
|
105 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $thispostmodified_gmt, false); ?></lastmod>
|
106 |
+
<changefreq><?php
|
107 |
+
if(($lastactivityage/86400) < 1) { // last activity less than 1 day old
|
108 |
+
echo 'hourly';
|
109 |
+
} else {
|
110 |
+
echo 'daily';
|
111 |
+
} ?></changefreq>
|
112 |
+
<priority>1.0</priority>
|
113 |
+
</url>
|
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>
|
122 |
+
<loc><?php
|
123 |
+
// hook for filter 'xml_sitemap_url' provides a string here and MUST get a string returned
|
124 |
+
$url = apply_filters( 'xml_sitemap_url', trailingslashit(home_url()) );
|
125 |
+
if ( is_string($url) )
|
126 |
+
echo esc_url( $url );
|
127 |
+
else
|
128 |
+
echo esc_url( trailingslashit(home_url()) ); ?></loc>
|
129 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified_gmt, false); ?></lastmod>
|
130 |
+
<changefreq>daily</changefreq>
|
131 |
+
<priority>1.0</priority>
|
132 |
+
</url>
|
133 |
+
<?php
|
134 |
+
endif;
|
135 |
+
|
136 |
+
// TODO see what we can do for :
|
137 |
+
//<news:access>Subscription</news:access> (for now always leave off)
|
138 |
+
// and
|
139 |
+
//<news:genres>Blog</news:genres> (for now leave up to external taxonomy plugin to set up 'gn_genre')
|
140 |
+
// http://www.google.com/support/news_pub/bin/answer.py?answer=93992
|
141 |
+
|
142 |
+
// Submit:
|
143 |
+
// http://www.google.com/support/news_pub/bin/answer.py?hl=nl&answer=74289
|
144 |
+
|
145 |
+
?></urlset>
|
146 |
+
<?php $xmlsf->_e_usage(); ?>
|
includes/feed-sitemap-post_type.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* XML Sitemap Feed Template for displaying an XML Sitemap feed.
|
4 |
+
*
|
5 |
+
* @package XML Sitemap Feed plugin for WordPress
|
6 |
+
*/
|
7 |
+
|
8 |
+
status_header('200'); // force header('HTTP/1.1 200 OK') even for sites without posts
|
9 |
+
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
|
10 |
+
|
11 |
+
global $xmlsf;
|
12 |
+
$post_type = get_query_var('post_type');
|
13 |
+
foreach ( $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') . '" -->
|
19 |
+
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
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 !empty($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 !empty($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 |
+
// any ID's we need to exclude?
|
36 |
+
$excluded = $xmlsf->get_excluded($post_type);
|
37 |
+
|
38 |
+
// loop away!
|
39 |
+
if ( have_posts() ) :
|
40 |
+
while ( have_posts() ) :
|
41 |
+
the_post();
|
42 |
+
|
43 |
+
// check if we are not dealing with an external URL :: Thanks to Francois Deschenes :)
|
44 |
+
// or if page is in the exclusion list (like front pages)
|
45 |
+
if ( !preg_match('/^' . preg_quote(home_url(), '/') . '/i', get_permalink()) || in_array($post->ID, $excluded) )
|
46 |
+
continue;
|
47 |
+
// TODO news, image & video tags
|
48 |
+
?>
|
49 |
+
<url>
|
50 |
+
<loc><?php the_permalink_rss(); ?></loc>
|
51 |
+
<lastmod><?php echo $xmlsf->get_lastmod(); ?></lastmod>
|
52 |
+
<changefreq><?php echo $xmlsf->get_changefreq(); ?></changefreq>
|
53 |
+
<priority><?php echo $xmlsf->get_priority(); ?></priority>
|
54 |
+
</url>
|
55 |
+
<?php
|
56 |
+
endwhile;
|
57 |
+
endif;
|
58 |
+
?></urlset>
|
59 |
+
<?php $xmlsf->_e_usage(); ?>
|
includes/feed-sitemap-taxonomy.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google News Sitemap Feed Template
|
4 |
+
*
|
5 |
+
* @package XML Sitemap Feed plugin for WordPress
|
6 |
+
*/
|
7 |
+
|
8 |
+
global $xmlsf;
|
9 |
+
|
10 |
+
status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
|
11 |
+
// TODO test if we can do without it
|
12 |
+
header('Content-Type: text/xml; charset=' . get_bloginfo('charset', 'UTF-8'), true);
|
13 |
+
|
14 |
+
echo '<?xml version="1.0" encoding="'.get_bloginfo('charset', 'UTF-8').'"?>
|
15 |
+
<?xml-stylesheet type="text/xsl" href="' . plugins_url('xsl/sitemap.xsl.php',__FILE__) . '?ver=' . XMLSF_VERSION . '"?>
|
16 |
+
<!-- generated-on="'.date('Y-m-d\TH:i:s+00:00').'" -->
|
17 |
+
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
18 |
+
<!-- generator-url="http://status310.net/wordpress-plugins/xml-sitemap-feed/" -->
|
19 |
+
<!-- generator-version="'.XMLSF_VERSION.'" -->
|
20 |
+
|
21 |
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
22 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
23 |
+
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
24 |
+
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
25 |
+
';
|
26 |
+
|
27 |
+
// PRESETS are changable -- please read comments:
|
28 |
+
|
29 |
+
$max_priority = 0.4; // Maximum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
30 |
+
$min_priority = 0.0; // Minimum priority value for any URL in the sitemap; set to any other value between 0 and 1.
|
31 |
+
// NOTE: Changing these values will influence each URL's priority. Priority values are taken by
|
32 |
+
// search engines to represent RELATIVE priority within the site domain. Forcing all URLs
|
33 |
+
// to a priority of above 0.5 or even fixing them all to 1.0 - for example - is useless.
|
34 |
+
|
35 |
+
$taxonomy = get_query_var('taxonomy');
|
36 |
+
$lang = get_query_var('lang');
|
37 |
+
echo "<!-- taxonomy: $taxonomy -->";
|
38 |
+
$tax_obj = get_taxonomy($taxonomy);
|
39 |
+
$postcount = 0;
|
40 |
+
foreach ( $tax_obj->object_type as $post_type) {
|
41 |
+
$_post_count = wp_count_posts($post_type);
|
42 |
+
$postcount += $_post_count->publish;
|
43 |
+
}
|
44 |
+
|
45 |
+
//$_terms_count = wp_count_terms(get_query_var('taxonomy'));
|
46 |
+
//$average_count = $_post_count->publish / $_terms_count;
|
47 |
+
|
48 |
+
$terms = get_terms( $taxonomy, array(
|
49 |
+
'orderby' => 'count',
|
50 |
+
'order' => 'DESC',
|
51 |
+
'lang' => $lang,
|
52 |
+
'hierachical' => 0,
|
53 |
+
'pad_counts' => true, // count child term post count too...
|
54 |
+
'number' => 50000 ) );
|
55 |
+
|
56 |
+
if ( $terms ) :
|
57 |
+
|
58 |
+
foreach ( $terms as $term ) :
|
59 |
+
|
60 |
+
// calculate priority based on number of posts
|
61 |
+
// or maybe take child taxonomy terms into account.?
|
62 |
+
|
63 |
+
$priority = $min_priority + ( $max_priority * $term->count / $postcount );
|
64 |
+
|
65 |
+
// get the latest post in this taxonomy item, to use its post_date as lastmod
|
66 |
+
$posts = get_posts ( array(
|
67 |
+
'numberposts' => 1,
|
68 |
+
'no_found_rows' => true,
|
69 |
+
'update_post_meta_cache' => false,
|
70 |
+
'update_post_term_cache' => false,
|
71 |
+
'update_cache' => false,
|
72 |
+
'tax_query' => array(
|
73 |
+
array(
|
74 |
+
'taxonomy' => $term->taxonomy,
|
75 |
+
'field' => 'slug',
|
76 |
+
'terms' => $term->slug
|
77 |
+
)
|
78 |
+
)
|
79 |
+
)
|
80 |
+
);
|
81 |
+
?>
|
82 |
+
<url>
|
83 |
+
<loc><?php echo get_term_link( $term ); ?></loc>
|
84 |
+
<priority><?php echo number_format($priority,1) ?></priority>
|
85 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $posts[0]->post_date_gmt, false); ?></lastmod>
|
86 |
+
<changefreq><?php
|
87 |
+
$lastactivityage = (gmdate('U') - mysql2date('U', $posts[0]->post_date_gmt));
|
88 |
+
if(($lastactivityage/86400) < 1) { // last activity less than 1 day old
|
89 |
+
echo 'hourly';
|
90 |
+
} else if(($lastactivityage/86400) < 7) { // last activity less than 1 week old
|
91 |
+
echo 'daily';
|
92 |
+
} else if(($lastactivityage/86400) < 30) { // last activity between 1 week and one month old
|
93 |
+
echo 'weekly';
|
94 |
+
} else if(($lastactivityage/86400) < 365) { // last activity between 1 month and 1 year old
|
95 |
+
echo 'monthly';
|
96 |
+
} else {
|
97 |
+
echo 'yearly';
|
98 |
+
} ?></changefreq>
|
99 |
+
</url>
|
100 |
+
<?php
|
101 |
+
endforeach;
|
102 |
+
endif;
|
103 |
+
|
104 |
+
?></urlset>
|
105 |
+
<?php $xmlsf->_e_usage(); ?>
|
includes/feed-sitemap.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google News Sitemap Feed Template
|
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 |
+
|
11 |
+
echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?><?xml-stylesheet type="text/xsl" href="' . plugins_url('xsl/sitemap-index.xsl.php',__FILE__) . '?ver=' . XMLSF_VERSION . '"?>
|
12 |
+
<!-- generated-on="'.date('Y-m-d\TH:i:s+00:00').'" -->
|
13 |
+
<!-- generator="XML & Google News Sitemap Feed plugin for WordPress" -->
|
14 |
+
<!-- generator-url="http://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
|
15 |
+
<!-- generator-version="'.XMLSF_VERSION.'" -->
|
16 |
+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
17 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
18 |
+
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
19 |
+
http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
|
20 |
+
';
|
21 |
+
|
22 |
+
global $xmlsf;
|
23 |
+
?>
|
24 |
+
<sitemap>
|
25 |
+
<loc><?php echo $xmlsf->get_index_url('home'); ?></loc>
|
26 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastdate( 'gmt' ), false); ?></lastmod>
|
27 |
+
</sitemap>
|
28 |
+
<?php
|
29 |
+
// add rules for custom public post types
|
30 |
+
foreach ( $xmlsf->have_post_types() as $post_type ) {
|
31 |
+
|
32 |
+
if (!empty($post_type['archive']))
|
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 echo $url; ?></loc>
|
40 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastmodified( 'gmt', $post_type['name'], $m ), false); ?></lastmod>
|
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 |
+
$obj = get_taxonomy($taxonomy);
|
52 |
+
?>
|
53 |
+
<sitemap>
|
54 |
+
<loc><?php echo $xmlsf->get_index_url('taxonomy', $taxonomy); ?></loc>
|
55 |
+
<lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', get_lastdate( 'gmt', $obj->object_type[0] ), false); ?></lastmod>
|
56 |
+
</sitemap>
|
57 |
+
<?php
|
58 |
+
// TODO add lastmod ?
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
?></sitemapindex>
|
63 |
+
<?php $xmlsf->_e_usage(); ?>
|
includes/xsl/sitemap-index.xsl.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* ------------------------------------------
|
3 |
+
XML News Sitemap Feed Styleheet Template
|
4 |
+
------------------------------------------ */
|
5 |
+
|
6 |
+
header('Content-Type: text/xsl; charset=utf-8', true);
|
7 |
+
|
8 |
+
echo '<?xml version="1.0" encoding="UTF-8"?>
|
9 |
+
'; ?>
|
10 |
+
<xsl:stylesheet version="2.0"
|
11 |
+
xmlns:html="http://www.w3.org/TR/REC-html40"
|
12 |
+
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
|
13 |
+
sitemap:news="http://www.google.com/schemas/sitemap-news/0.9"
|
14 |
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
15 |
+
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
16 |
+
<xsl:template match="/">
|
17 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
18 |
+
<head>
|
19 |
+
<title>XML Sitemap Feed - Index</title>
|
20 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
21 |
+
<style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style>
|
22 |
+
</head>
|
23 |
+
<body>
|
24 |
+
<h1>XML Sitemap Feed - Index</h1>
|
25 |
+
<div id="header">
|
26 |
+
<p>This is the XML Sitemap Index to aid search engines like <a href="http://www.google.com">Google</a>, <a href="http://www.bing.com/">Bing</a>, <a href="http://www.yahoo.com">Yahoo!</a> and <a href="http://www.ask.com">Ask</a> indexing your site better. If you have a <a href="http://www.google.com/webmasters/tools/">Google Webmaster Tools</a> and/or <a href="http://www.bing.com/toolbox/webmaster">Bing Webmaster Tools</a> account, please submit <strong><em>this index file</em></strong> as your sitemap. Read more about XML sitemaps on <a href="http://sitemaps.org">Sitemaps.org</a>.</p>
|
27 |
+
</div>
|
28 |
+
<div id="content">
|
29 |
+
<table cellpadding="5">
|
30 |
+
<tr class="high">
|
31 |
+
<th>#</th>
|
32 |
+
<th>XML Sitemap</th>
|
33 |
+
<th>Last Changed</th>
|
34 |
+
</tr>
|
35 |
+
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
|
36 |
+
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
|
37 |
+
<xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
|
38 |
+
<tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if>
|
39 |
+
<td><xsl:value-of select="position()"/></td>
|
40 |
+
<td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
|
41 |
+
<a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a>
|
42 |
+
</td>
|
43 |
+
<td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td>
|
44 |
+
</tr>
|
45 |
+
</xsl:for-each>
|
46 |
+
</table>
|
47 |
+
</div>
|
48 |
+
<div id="footer">
|
49 |
+
<p><img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname(dirname(dirname($_SERVER['SCRIPT_NAME']))); ?>/images/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://status301.net/wordpress-plugins/xml-sitemap-feed/" title="XML Sitemap Feed plugin for WordPress">XML & Google News Sitemap Feed <?php echo (preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] )) ? $_GET['ver'] : ''; ?></a> running on <a href="http://wordpress.org/">WordPress</a>.</p>
|
50 |
+
</div>
|
51 |
+
</body>
|
52 |
+
</html>
|
53 |
+
</xsl:template>
|
54 |
+
</xsl:stylesheet>
|
includes/xsl/sitemap-news.xsl.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* ------------------------------------------
|
3 |
+
XML News Sitemap Feed Styleheet Template
|
4 |
+
------------------------------------------ */
|
5 |
+
|
6 |
+
header('Content-Type: text/xsl; charset=utf-8', true);
|
7 |
+
|
8 |
+
echo '<?xml version="1.0" encoding="UTF-8"?>
|
9 |
+
'; ?>
|
10 |
+
<xsl:stylesheet version="2.0"
|
11 |
+
xmlns:html="http://www.w3.org/TR/REC-html40"
|
12 |
+
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
|
13 |
+
sitemap:news="http://www.google.com/schemas/sitemap-news/0.9"
|
14 |
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
15 |
+
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
16 |
+
<xsl:template match="/">
|
17 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
18 |
+
<head>
|
19 |
+
<title>Google News Sitemap Feed</title>
|
20 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
21 |
+
<style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style>
|
22 |
+
</head>
|
23 |
+
<body>
|
24 |
+
<h1>Google News Sitemap Feed</h1>
|
25 |
+
<div id="header">
|
26 |
+
<p>This is a Google News Sitemap to aid <a href="http://news.google.com">Google News</a> finding news on your website. Please note that <strong><em>only posts from the last 48 hours</em></strong> will be processed by Google News. Read more about <a href="http://www.google.com/schemas/sitemap-news/0.9/">Google News Sitemaps</a>, submit your site via <a href="http://www.google.com/support/news_pub/bin/request.py?contact_type=suggest_content">Google propose news content</a> and add it in your <a href="https://www.google.com/webmasters/tools/">Google Webmaster Tools</a> account.</p>
|
27 |
+
</div>
|
28 |
+
<div id="content">
|
29 |
+
<table cellpadding="5">
|
30 |
+
<tr class="high">
|
31 |
+
<th>#</th>
|
32 |
+
<th>URL</th>
|
33 |
+
</tr>
|
34 |
+
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
|
35 |
+
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
|
36 |
+
<xsl:for-each select="sitemap:urlset/sitemap:url">
|
37 |
+
<tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if>
|
38 |
+
<td><xsl:value-of select="position()"/></td>
|
39 |
+
<td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
|
40 |
+
<a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
</xsl:for-each>
|
44 |
+
</table>
|
45 |
+
</div>
|
46 |
+
<div id="footer">
|
47 |
+
<p><img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname(dirname(dirname($_SERVER['SCRIPT_NAME']))); ?>/images/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://status301.net/wordpress-plugins/xml-sitemap-feed/" title="XML Sitemap Feed plugin for WordPress">XML & Google News Sitemap Feed <?php echo (preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] )) ? $_GET['ver'] : ''; ?></a> running on <a href="http://wordpress.org/">WordPress</a>.</p>
|
48 |
+
</div>
|
49 |
+
</body>
|
50 |
+
</html>
|
51 |
+
</xsl:template>
|
52 |
+
</xsl:stylesheet>
|
includes/xsl/sitemap.xsl.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* -------------------------------------
|
3 |
+
XML Sitemap Feed Styleheet Template
|
4 |
+
------------------------------------- */
|
5 |
+
|
6 |
+
header('Content-Type: text/xsl; charset=utf-8', true);
|
7 |
+
|
8 |
+
echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
|
9 |
+
<xsl:stylesheet version="2.0"
|
10 |
+
xmlns:html="http://www.w3.org/TR/REC-html40"
|
11 |
+
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
|
12 |
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
13 |
+
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
14 |
+
<xsl:template match="/">
|
15 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
16 |
+
<head>
|
17 |
+
<title>XML Sitemap Feed</title>
|
18 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
19 |
+
<style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style>
|
20 |
+
</head>
|
21 |
+
<body>
|
22 |
+
<h1>XML Sitemap Feed</h1>
|
23 |
+
<div id="header">
|
24 |
+
<p>This is an XML Sitemap to aid search engines like <a href="http://www.google.com">Google</a>, <a href="http://www.bing.com/">Bing</a>, <a href="http://www.yahoo.com">Yahoo!</a> and <a href="http://www.ask.com">Ask</a> indexing your site better. Read more about XML sitemaps on <a href="http://sitemaps.org">Sitemaps.org</a>.</p>
|
25 |
+
</div>
|
26 |
+
<div id="content">
|
27 |
+
<table cellpadding="5">
|
28 |
+
<tr class="high">
|
29 |
+
<th>#</th>
|
30 |
+
<th>URL</th>
|
31 |
+
<th>Priority</th>
|
32 |
+
<th>Change Frequency</th>
|
33 |
+
<th>Last Changed</th>
|
34 |
+
</tr>
|
35 |
+
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
|
36 |
+
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
|
37 |
+
<xsl:for-each select="sitemap:urlset/sitemap:url">
|
38 |
+
<tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if>
|
39 |
+
<td><xsl:value-of select="position()"/></td>
|
40 |
+
<td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td>
|
41 |
+
<td><xsl:value-of select="concat(sitemap:priority*100,'%')"/></td>
|
42 |
+
<td><xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/></td>
|
43 |
+
<td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td>
|
44 |
+
</tr>
|
45 |
+
</xsl:for-each>
|
46 |
+
</table>
|
47 |
+
</div>
|
48 |
+
<div id="footer">
|
49 |
+
<p><img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname(dirname(dirname($_SERVER['SCRIPT_NAME']))); ?>/images/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://status301.net/wordpress-plugins/xml-sitemap-feed/" title="XML Sitemap Feed plugin for WordPress">XML & Google News Sitemap Feed <?php echo (preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] )) ? $_GET['ver'] : ''; ?></a> running on <a href="http://wordpress.org/">WordPress</a>.</p>
|
50 |
+
</div>
|
51 |
+
</body>
|
52 |
+
</html>
|
53 |
+
</xsl:template>
|
54 |
+
</xsl:stylesheet>
|
languages/instructions.txt
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== XML Sitemap & Google News Sitemap Feeds ===
|
2 |
+
|
3 |
+
== Translation ==
|
4 |
+
|
5 |
+
1. Install PoEdit on your computer.
|
6 |
+
|
7 |
+
2. Go to this plugins /languages/ directory.
|
8 |
+
|
9 |
+
3. If there is no .po file that corresponds with your language yet, rename the template translation database xml-sitemap-feed-xx_XX.po by replacing the xx with your language code and XX with your country code.
|
10 |
+
|
11 |
+
4. Open the .po file of your language with PoEdit.
|
12 |
+
|
13 |
+
5. Go to Edit > Preferences and on the tab Editor check the option to compile a .mo database on save automatically. Close with OK.
|
14 |
+
|
15 |
+
6. Go to Catalog > Settings and set your name, e-mail address, language and country. Close with OK.
|
16 |
+
|
17 |
+
7. Go to Catalog > Update from POT-file and select the main xml-sitemap-feed.pot file. Then accept all new and removed translation strings with OK.
|
18 |
+
|
19 |
+
8. Now go ahead and start translating all the texts listed in PoEdit.
|
20 |
+
|
21 |
+
9. When done, go to File > Save to Save.
|
22 |
+
|
23 |
+
10. Upload the automatically created xml-sitemap-feed-xx_XX.mo database file (where xx_XX should now be your language and country code) to the plugins /languages/ directory on your WordPress site.
|
24 |
+
|
25 |
+
11. After verifying the translations work on your site, send the .mo file and, if you're willing to share it, your original .po file to ravanhagen@gmail.com and don't forget to tell me how and with what link you would like to be mentioned in the credits!
|
26 |
+
|
27 |
+
Thanks for sharing your translation :)
|
languages/xml-sitemap-feed-fr_FR.mo
ADDED
Binary file
|
languages/xml-sitemap-feed-fr_FR.po
ADDED
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-26 15:31+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-26 15:34+0100\n"
|
7 |
+
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: \n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_n\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-Language: French\n"
|
16 |
+
"X-Poedit-Country: FRANCE\n"
|
17 |
+
|
18 |
+
#: ../includes/admin.php:15
|
19 |
+
#, php-format
|
20 |
+
msgid "Donate to keep the free %s plugin development & support going!"
|
21 |
+
msgstr "Faites un don pour aider le développement et support de l'extension %s. Merci !"
|
22 |
+
|
23 |
+
#: ../includes/admin.php:15
|
24 |
+
#: ../includes/admin.php:237
|
25 |
+
msgid "XML Sitemap & Google News Feeds"
|
26 |
+
msgstr "Flux XML Sitemap & Google News"
|
27 |
+
|
28 |
+
#: ../includes/admin.php:15
|
29 |
+
#, php-format
|
30 |
+
msgid "These settings control the XML Sitemaps generated by the %s plugin."
|
31 |
+
msgstr "Ces options contrôlent le XML Sitemap par l'extension %s."
|
32 |
+
|
33 |
+
#: ../includes/admin.php:16
|
34 |
+
#, php-format
|
35 |
+
msgid "XML Sitemaps will be disabled automatically when you set the option %1$s (above) to %2$s."
|
36 |
+
msgstr "Les XML Sitemaps seront désactivé automatiquement si l'option %1$s (en haut) est mis à %2$s."
|
37 |
+
|
38 |
+
#: ../includes/admin.php:16
|
39 |
+
msgid "Search Engine Visibility"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../includes/admin.php:16
|
43 |
+
msgid "Discourage search engines from indexing this site"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: ../includes/admin.php:16
|
47 |
+
#, php-format
|
48 |
+
msgid "XML Sitemaps are disabled because you have set the option %1$s (above) to %2$s."
|
49 |
+
msgstr "Les XML Sitemaps sont désactivé parce-que l'option %1$s (en haut) est mis à %2$s."
|
50 |
+
|
51 |
+
#: ../includes/admin.php:40
|
52 |
+
#: ../includes/admin.php:360
|
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:43
|
61 |
+
#: ../includes/admin.php:49
|
62 |
+
msgid "View"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../includes/admin.php:47
|
66 |
+
msgid "Google News Sitemap"
|
67 |
+
msgstr "Google News Sitemap"
|
68 |
+
|
69 |
+
#: ../includes/admin.php:59
|
70 |
+
#: ../includes/admin.php:369
|
71 |
+
msgid "Include post types"
|
72 |
+
msgstr "Types d'articles à inclure"
|
73 |
+
|
74 |
+
#: ../includes/admin.php:91
|
75 |
+
#: ../includes/admin.php:295
|
76 |
+
#: ../includes/admin.php:329
|
77 |
+
msgid "Settings"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../includes/admin.php:106
|
81 |
+
msgid "year of publication"
|
82 |
+
msgstr "année de la publication"
|
83 |
+
|
84 |
+
#: ../includes/admin.php:107
|
85 |
+
msgid "month of publication"
|
86 |
+
msgstr "mois de la publication"
|
87 |
+
|
88 |
+
#: ../includes/admin.php:111
|
89 |
+
msgid "Split by"
|
90 |
+
msgstr "Trier par"
|
91 |
+
|
92 |
+
#: ../includes/admin.php:121
|
93 |
+
msgid "Split by year if you experience slow or blank sitemaps. In very rare cases, split by month is needed."
|
94 |
+
msgstr "Trie par an si tu vois des sitemaps blancs ou très lentes. Aux très rares cas, un trie par mois est nécessaire."
|
95 |
+
|
96 |
+
#: ../includes/admin.php:126
|
97 |
+
#: ../includes/admin.php:328
|
98 |
+
msgid "Priority"
|
99 |
+
msgstr "Priorité"
|
100 |
+
|
101 |
+
#: ../includes/admin.php:128
|
102 |
+
msgid "Priority can be overridden on individual posts."
|
103 |
+
msgstr "La Priorité peut être remplacée par article."
|
104 |
+
|
105 |
+
#: ../includes/admin.php:128
|
106 |
+
msgid "Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count."
|
107 |
+
msgstr "La Priorité maximum (1.0) est réservé à la page d'accueil, articles individuels et, si permis, articles avec beaucoup des commentaires."
|
108 |
+
|
109 |
+
#: ../includes/admin.php:133
|
110 |
+
msgid "Automatically adjusts Priority according to relative age and comment count."
|
111 |
+
msgstr "Ajuste la Priorité automatiquement selon l'âge relatif et le nombre des commentaires."
|
112 |
+
|
113 |
+
#: ../includes/admin.php:133
|
114 |
+
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
115 |
+
msgstr "Articles mise en avant ne seront pas soumis à la réduction selon l'âge. Articles avec Priorité fixe garderont cette valeur."
|
116 |
+
|
117 |
+
#: ../includes/admin.php:138
|
118 |
+
msgid "Update Lastmod and Changefreq on comments."
|
119 |
+
msgstr "Mise à jour de Lastmod et Changefreq à la soumission des commentaires."
|
120 |
+
|
121 |
+
#: ../includes/admin.php:138
|
122 |
+
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
123 |
+
msgstr "Configurez ceci si la discussion sur votre site nécessite la ré-indexation après chaque nouveau commentaire."
|
124 |
+
|
125 |
+
#: ../includes/admin.php:147
|
126 |
+
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."
|
127 |
+
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."
|
128 |
+
|
129 |
+
#: ../includes/admin.php:157
|
130 |
+
#: ../includes/admin.php:372
|
131 |
+
msgid "Include taxonomies"
|
132 |
+
msgstr "Taxonomies à inclure"
|
133 |
+
|
134 |
+
#: ../includes/admin.php:181
|
135 |
+
msgid "No taxonomies available for the currently included post types."
|
136 |
+
msgstr "Aucun taxonomie disponible pour les types d'articles actuellement inclus."
|
137 |
+
|
138 |
+
#: ../includes/admin.php:184
|
139 |
+
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."
|
140 |
+
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 en ajoutant des règles spécifiques robots.txt ci-dessous."
|
141 |
+
|
142 |
+
#: ../includes/admin.php:194
|
143 |
+
msgid "Google"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: ../includes/admin.php:195
|
147 |
+
msgid "Bing"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: ../includes/admin.php:199
|
151 |
+
#: ../includes/admin.php:375
|
152 |
+
msgid "Ping on Publish"
|
153 |
+
msgstr "Ping en Publiant"
|
154 |
+
|
155 |
+
#: ../includes/admin.php:218
|
156 |
+
#, php-format
|
157 |
+
msgid "Successfully pinged for %1$s on %2$s GMT."
|
158 |
+
msgstr "Pingé avec succès pour %1$s le %2$s GMT."
|
159 |
+
|
160 |
+
#: ../includes/admin.php:227
|
161 |
+
#, php-format
|
162 |
+
msgid "Rules to append to the %s generated by WordPress."
|
163 |
+
msgstr "Règles à ajouter au %s produit par WordPress."
|
164 |
+
|
165 |
+
#: ../includes/admin.php:228
|
166 |
+
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
167 |
+
msgstr "Ajoutez des règles ici seulement si vous saviez le faire, vous risquez bloquer l'accès aux moteurs de recherche."
|
168 |
+
|
169 |
+
#: ../includes/admin.php:228
|
170 |
+
msgid "These rules will not have effect when you are using a static robots.txt file."
|
171 |
+
msgstr "Ces règles ne seront pas effectué si vous utilisez un fichier robots.txt statique."
|
172 |
+
|
173 |
+
#: ../includes/admin.php:235
|
174 |
+
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
175 |
+
msgstr "Supprimez tous les options Flux XML Sitemap et redémarrez avec les valeurs par défaut."
|
176 |
+
|
177 |
+
#: ../includes/admin.php:237
|
178 |
+
#, php-format
|
179 |
+
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
180 |
+
msgstr "La désactivation et la réactivation de l'extension % s auront le même effet."
|
181 |
+
|
182 |
+
#: ../includes/admin.php:311
|
183 |
+
msgid "XML Sitemap"
|
184 |
+
msgstr "XML Sitemap"
|
185 |
+
|
186 |
+
#: ../includes/admin.php:329
|
187 |
+
#, php-format
|
188 |
+
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
189 |
+
msgstr "Laissez vide pour la Priorité automatique comme configuré dans %1$s > %2$s."
|
190 |
+
|
191 |
+
#: ../includes/admin.php:329
|
192 |
+
msgid "Reading"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: ../includes/admin.php:363
|
196 |
+
msgid "Enable XML sitemaps"
|
197 |
+
msgstr "Activez XML Sitemaps"
|
198 |
+
|
199 |
+
#: ../includes/admin.php:381
|
200 |
+
msgid "Additional robots.txt rules"
|
201 |
+
msgstr "Règles robots.txt additionelles"
|
202 |
+
|
203 |
+
#: ../includes/admin.php:384
|
204 |
+
msgid "Reset XML sitemaps"
|
205 |
+
msgstr "Remise à nouveau"
|
206 |
+
|
207 |
+
#~ msgid "Note:"
|
208 |
+
#~ msgstr "Attention :"
|
209 |
+
|
210 |
+
#~ msgid "year"
|
211 |
+
#~ msgstr "an"
|
212 |
+
|
213 |
+
#~ msgid "month"
|
214 |
+
#~ msgstr "mois"
|
215 |
+
|
216 |
+
#~ msgid "Divide by"
|
217 |
+
#~ msgstr "Trier par"
|
languages/xml-sitemap-feed-nl_NL.mo
ADDED
Binary file
|
languages/xml-sitemap-feed-nl_NL.po
ADDED
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-26 15:31+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-26 15:36+0100\n"
|
7 |
+
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: \n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_n\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-Language: Dutch\n"
|
16 |
+
"X-Poedit-Country: NETHERLANDS\n"
|
17 |
+
|
18 |
+
#: ../includes/admin.php:15
|
19 |
+
#, php-format
|
20 |
+
msgid "Donate to keep the free %s plugin development & support going!"
|
21 |
+
msgstr "Doneer om de ontwikkeling en ondersteuning van de %s plugin gaande te houden!"
|
22 |
+
|
23 |
+
#: ../includes/admin.php:15
|
24 |
+
#: ../includes/admin.php:237
|
25 |
+
msgid "XML Sitemap & Google News Feeds"
|
26 |
+
msgstr "XML Sitemap & Google News Feeds"
|
27 |
+
|
28 |
+
#: ../includes/admin.php:15
|
29 |
+
#, php-format
|
30 |
+
msgid "These settings control the XML Sitemaps generated by the %s plugin."
|
31 |
+
msgstr "Deze instellingen beheersen de XML Sitemaps gegenereerd door de %s plugin."
|
32 |
+
|
33 |
+
#: ../includes/admin.php:16
|
34 |
+
#, php-format
|
35 |
+
msgid "XML Sitemaps will be disabled automatically when you set the option %1$s (above) to %2$s."
|
36 |
+
msgstr "XML Sitemaps worden automatisch uitgeschakeld als je de optie %1$s (boven) op %2$s zet."
|
37 |
+
|
38 |
+
#: ../includes/admin.php:16
|
39 |
+
msgid "Search Engine Visibility"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../includes/admin.php:16
|
43 |
+
msgid "Discourage search engines from indexing this site"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: ../includes/admin.php:16
|
47 |
+
#, php-format
|
48 |
+
msgid "XML Sitemaps are disabled because you have set the option %1$s (above) to %2$s."
|
49 |
+
msgstr "XML Sitemaps zijn uitgeschakeld omdat de optie %1$s (boven) op %2$s staat."
|
50 |
+
|
51 |
+
#: ../includes/admin.php:40
|
52 |
+
#: ../includes/admin.php:360
|
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:43
|
61 |
+
#: ../includes/admin.php:49
|
62 |
+
msgid "View"
|
63 |
+
msgstr "Weergave"
|
64 |
+
|
65 |
+
#: ../includes/admin.php:47
|
66 |
+
msgid "Google News Sitemap"
|
67 |
+
msgstr "Google News Sitemap"
|
68 |
+
|
69 |
+
#: ../includes/admin.php:59
|
70 |
+
#: ../includes/admin.php:369
|
71 |
+
msgid "Include post types"
|
72 |
+
msgstr "Post types bijsluiten"
|
73 |
+
|
74 |
+
#: ../includes/admin.php:91
|
75 |
+
#: ../includes/admin.php:295
|
76 |
+
#: ../includes/admin.php:329
|
77 |
+
msgid "Settings"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../includes/admin.php:106
|
81 |
+
msgid "year of publication"
|
82 |
+
msgstr "jaar van publicatie"
|
83 |
+
|
84 |
+
#: ../includes/admin.php:107
|
85 |
+
msgid "month of publication"
|
86 |
+
msgstr "maand van publicatie"
|
87 |
+
|
88 |
+
#: ../includes/admin.php:111
|
89 |
+
msgid "Split by"
|
90 |
+
msgstr "Verdeel naar"
|
91 |
+
|
92 |
+
#: ../includes/admin.php:121
|
93 |
+
msgid "Split by year if you experience slow or blank sitemaps. In very rare cases, split by month is needed."
|
94 |
+
msgstr "Verdeel naar jaar als je trage of lege sitemaps ondervindt. In zeldzame gevallen is een verdeling naar maand nodig."
|
95 |
+
|
96 |
+
#: ../includes/admin.php:126
|
97 |
+
#: ../includes/admin.php:328
|
98 |
+
msgid "Priority"
|
99 |
+
msgstr "Prioriteit"
|
100 |
+
|
101 |
+
#: ../includes/admin.php:128
|
102 |
+
msgid "Priority can be overridden on individual posts."
|
103 |
+
msgstr "De Priority kan per post worden aangepast."
|
104 |
+
|
105 |
+
#: ../includes/admin.php:128
|
106 |
+
msgid "Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count."
|
107 |
+
msgstr "Maximum Priority (1.0) is gereserveerd voor de voorpagina, individuele posts en, indien toegestaan, posts met veel commentaren."
|
108 |
+
|
109 |
+
#: ../includes/admin.php:133
|
110 |
+
msgid "Automatically adjusts Priority according to relative age and comment count."
|
111 |
+
msgstr "Pas de Priority automatisch aan naar relatieve leeftijd en aantal commentaren."
|
112 |
+
|
113 |
+
#: ../includes/admin.php:133
|
114 |
+
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
115 |
+
msgstr "Sticky posts worden niet onderworpen aan een reductie naar leeftijd. Posts met een vastgezette Priority behouden deze."
|
116 |
+
|
117 |
+
#: ../includes/admin.php:138
|
118 |
+
msgid "Update Lastmod and Changefreq on comments."
|
119 |
+
msgstr "Pas de Lastmod en Changefreq aan bij commentaren."
|
120 |
+
|
121 |
+
#: ../includes/admin.php:138
|
122 |
+
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
123 |
+
msgstr "Activeer dit als discussies op je site het waard zijn om na ieder commentaar opnieuw geïndexeerd te worden."
|
124 |
+
|
125 |
+
#: ../includes/admin.php:147
|
126 |
+
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."
|
127 |
+
msgstr "Priority 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."
|
128 |
+
|
129 |
+
#: ../includes/admin.php:157
|
130 |
+
#: ../includes/admin.php:372
|
131 |
+
msgid "Include taxonomies"
|
132 |
+
msgstr "Taxonomieën bijsluiten"
|
133 |
+
|
134 |
+
#: ../includes/admin.php:181
|
135 |
+
msgid "No taxonomies available for the currently included post types."
|
136 |
+
msgstr "Geen taxonomieën beschikbaar voor de huidige bijgesloten post types."
|
137 |
+
|
138 |
+
#: ../includes/admin.php:184
|
139 |
+
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."
|
140 |
+
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 door specifieke robots.txt regels hieronder toe te voegen."
|
141 |
+
|
142 |
+
#: ../includes/admin.php:194
|
143 |
+
msgid "Google"
|
144 |
+
msgstr "Google"
|
145 |
+
|
146 |
+
#: ../includes/admin.php:195
|
147 |
+
msgid "Bing"
|
148 |
+
msgstr "Bing"
|
149 |
+
|
150 |
+
#: ../includes/admin.php:199
|
151 |
+
#: ../includes/admin.php:375
|
152 |
+
msgid "Ping on Publish"
|
153 |
+
msgstr "Ping bij Publiceren"
|
154 |
+
|
155 |
+
#: ../includes/admin.php:218
|
156 |
+
#, php-format
|
157 |
+
msgid "Successfully pinged for %1$s on %2$s GMT."
|
158 |
+
msgstr "Succesvol gepinged voor %1$s op %2$s GMT."
|
159 |
+
|
160 |
+
#: ../includes/admin.php:227
|
161 |
+
#, php-format
|
162 |
+
msgid "Rules to append to the %s generated by WordPress."
|
163 |
+
msgstr "Regels om aan de WordPress gegenereerde %s toe te voegen."
|
164 |
+
|
165 |
+
#: ../includes/admin.php:228
|
166 |
+
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
167 |
+
msgstr "Definieer hier alleen regels als je weet wat je doet, anders zou je de toegang tot je site kunnen verstoren."
|
168 |
+
|
169 |
+
#: ../includes/admin.php:228
|
170 |
+
msgid "These rules will not have effect when you are using a static robots.txt file."
|
171 |
+
msgstr "Deze regels hebben geen effect als je een statisch robots.txt bestand gebruikt."
|
172 |
+
|
173 |
+
#: ../includes/admin.php:235
|
174 |
+
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
175 |
+
msgstr "Wis alle XML Sitemap Feed opties van de database en start opnieuw met de standaard instellingen."
|
176 |
+
|
177 |
+
#: ../includes/admin.php:237
|
178 |
+
#, php-format
|
179 |
+
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
180 |
+
msgstr "Uit- en weer inschakelen van de %s plugin heeft hetzelfde effect."
|
181 |
+
|
182 |
+
#: ../includes/admin.php:311
|
183 |
+
msgid "XML Sitemap"
|
184 |
+
msgstr "XML Sitemap"
|
185 |
+
|
186 |
+
#: ../includes/admin.php:329
|
187 |
+
#, php-format
|
188 |
+
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
189 |
+
msgstr "Laat leeg voor automatische Priority zoals geconfigureerd op %1$s > %2$s."
|
190 |
+
|
191 |
+
#: ../includes/admin.php:329
|
192 |
+
msgid "Reading"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: ../includes/admin.php:363
|
196 |
+
msgid "Enable XML sitemaps"
|
197 |
+
msgstr "XML sitemaps activeren"
|
198 |
+
|
199 |
+
#: ../includes/admin.php:381
|
200 |
+
msgid "Additional robots.txt rules"
|
201 |
+
msgstr "Aanvullende robots.txt regels"
|
202 |
+
|
203 |
+
#: ../includes/admin.php:384
|
204 |
+
msgid "Reset XML sitemaps"
|
205 |
+
msgstr "XML sitemaps resetten"
|
206 |
+
|
207 |
+
#~ msgid "Note:"
|
208 |
+
#~ msgstr "Opmerking:"
|
209 |
+
|
210 |
+
#~ msgid "year"
|
211 |
+
#~ msgstr "jaar"
|
212 |
+
|
213 |
+
#~ msgid "month"
|
214 |
+
#~ msgstr "maand"
|
215 |
+
|
216 |
+
#~ msgid "Divide by"
|
217 |
+
#~ msgstr "Verdeel naar"
|
218 |
+
|
219 |
+
#~ msgid "Maximum priority is reserved for sticky posts and the front page."
|
220 |
+
#~ msgstr ""
|
221 |
+
#~ "Maximale prioriteit is gereserveerd voor de homepagina en sticky posts."
|
222 |
+
|
223 |
+
#~ msgid "Use a %s priority"
|
224 |
+
#~ msgstr "Gebruik een %s prioriteit"
|
225 |
+
|
226 |
+
#~ msgid "dynamic"
|
227 |
+
#~ msgstr "dynamisch"
|
228 |
+
|
229 |
+
#~ msgid "static"
|
230 |
+
#~ msgstr "statisch"
|
231 |
+
|
232 |
+
#~ msgid "with initial value %s"
|
233 |
+
#~ msgstr "met beginwaarde %s"
|
234 |
+
|
235 |
+
#~ msgid ""
|
236 |
+
#~ "Dynamic priority is calculated by the initial value ajusted according to "
|
237 |
+
#~ "the relative last modification age and comment count. Sticky posts always "
|
238 |
+
#~ "get the maximum initial priority value of 1. A different priority can be "
|
239 |
+
#~ "set on a post by post basis."
|
240 |
+
#~ msgstr ""
|
241 |
+
#~ "Dynamische prioriteit wordt berekend aan de hand van de beginwaarde, "
|
242 |
+
#~ "aangepast aan de relatieve leeftijd van laatste bewerking en het aantal "
|
243 |
+
#~ "commentaren. Sticky posts krijgen altijd de maximum beginwaarde van 1. "
|
244 |
+
#~ "Een aangepaste prioriteit kan per artikel ingesteld worden."
|
languages/xml-sitemap-feed-sr_RS.mo
ADDED
Binary file
|
languages/xml-sitemap-feed-sr_RS.po
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-24 22:36+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-28 15:45+0100\n"
|
7 |
+
"Last-Translator: Diana <diana@wpdiscounts.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_n\n"
|
13 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
+
"X-Generator: Poedit 1.5.3\n"
|
15 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
16 |
+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
17 |
+
"Language: sr_RS\n"
|
18 |
+
|
19 |
+
#: ../includes/admin.php:15
|
20 |
+
#, php-format
|
21 |
+
msgid "Donate to keep the free %s plugin development & support going!"
|
22 |
+
msgstr ""
|
23 |
+
"Doniraj da bi se uspesno nastavilo besplatno razvijanje %s plagina i "
|
24 |
+
"podrske! "
|
25 |
+
|
26 |
+
#: ../includes/admin.php:15 ../includes/admin.php:237
|
27 |
+
msgid "XML Sitemap & Google News Feeds"
|
28 |
+
msgstr "XML Sitemap & Google News Feeds"
|
29 |
+
|
30 |
+
#: ../includes/admin.php:15
|
31 |
+
#, php-format
|
32 |
+
msgid "These settings control the XML Sitemaps generated by the %s plugin."
|
33 |
+
msgstr ""
|
34 |
+
"Ova podesavanje kontrolisu XML Sitemaps generisanje od strane %s plagina"
|
35 |
+
|
36 |
+
#: ../includes/admin.php:16 ../includes/admin.php:147
|
37 |
+
#: ../includes/admin.php:184 ../includes/admin.php:228
|
38 |
+
#: ../includes/admin.php:237
|
39 |
+
msgid "Note:"
|
40 |
+
msgstr "Beleska:"
|
41 |
+
|
42 |
+
#: ../includes/admin.php:16
|
43 |
+
#, php-format
|
44 |
+
msgid ""
|
45 |
+
"XML Sitemaps will be disabled if you set the option %1$s (above) to %2$s."
|
46 |
+
msgstr ""
|
47 |
+
"XML Sitemaps ce biti onemogucene ukoliko podesite opciju %1$s (iznad) na "
|
48 |
+
"%2$s."
|
49 |
+
|
50 |
+
#: ../includes/admin.php:16
|
51 |
+
msgid "Search Engine Visibility"
|
52 |
+
msgstr "Vidljivost alata za pretragu"
|
53 |
+
|
54 |
+
#: ../includes/admin.php:16
|
55 |
+
msgid "Discourage search engines from indexing this site"
|
56 |
+
msgstr "Obeshrabri alate za pretragu da indeksuju ovaj sajt"
|
57 |
+
|
58 |
+
#: ../includes/admin.php:16
|
59 |
+
#, php-format
|
60 |
+
msgid ""
|
61 |
+
"XML Sitemaps are disabled because you have set the option %1$s (above) to "
|
62 |
+
"%2$s."
|
63 |
+
msgstr ""
|
64 |
+
"XML Sitemaps su onemoguceni sato sto ste podesili opciju %1$s (iznad) na %2$s"
|
65 |
+
|
66 |
+
#: ../includes/admin.php:40 ../includes/admin.php:360
|
67 |
+
msgid "XML Sitemaps"
|
68 |
+
msgstr "XML Sitemaps"
|
69 |
+
|
70 |
+
#: ../includes/admin.php:41
|
71 |
+
msgid "Regular XML Sitemaps"
|
72 |
+
msgstr "Regularne XML Sitemaps"
|
73 |
+
|
74 |
+
#: ../includes/admin.php:43 ../includes/admin.php:49
|
75 |
+
msgid "View"
|
76 |
+
msgstr "Vidi"
|
77 |
+
|
78 |
+
#: ../includes/admin.php:47
|
79 |
+
msgid "Google News Sitemap"
|
80 |
+
msgstr "Google Vesti Sitemap"
|
81 |
+
|
82 |
+
#: ../includes/admin.php:59 ../includes/admin.php:369
|
83 |
+
msgid "Include post types"
|
84 |
+
msgstr "Ukljuci tipove postova"
|
85 |
+
|
86 |
+
#: ../includes/admin.php:91 ../includes/admin.php:295
|
87 |
+
#: ../includes/admin.php:329
|
88 |
+
msgid "Settings"
|
89 |
+
msgstr "Podesavanja"
|
90 |
+
|
91 |
+
#: ../includes/admin.php:106
|
92 |
+
msgid "year"
|
93 |
+
msgstr "godina"
|
94 |
+
|
95 |
+
#: ../includes/admin.php:107
|
96 |
+
msgid "month"
|
97 |
+
msgstr "mesec"
|
98 |
+
|
99 |
+
#: ../includes/admin.php:111
|
100 |
+
msgid "Divide by"
|
101 |
+
msgstr "Podeli po"
|
102 |
+
|
103 |
+
#: ../includes/admin.php:121
|
104 |
+
msgid ""
|
105 |
+
"Set division by year if you experience slow or blank sitemaps. In very rare "
|
106 |
+
"cases, division by month is needed."
|
107 |
+
msgstr ""
|
108 |
+
"Podesite podelu po godini ukoliko se desavaju spore ili prazne sitemaps. U "
|
109 |
+
"veoma retkim slucajevima, potrebna je podela po mesecima. "
|
110 |
+
|
111 |
+
#: ../includes/admin.php:126 ../includes/admin.php:328
|
112 |
+
msgid "Priority"
|
113 |
+
msgstr "Prioritet"
|
114 |
+
|
115 |
+
#: ../includes/admin.php:128
|
116 |
+
msgid "Priority can be overridden on individual posts."
|
117 |
+
msgstr "Prioritet moze biti zanemaren u individualnim postovima"
|
118 |
+
|
119 |
+
#: ../includes/admin.php:128
|
120 |
+
msgid ""
|
121 |
+
"Maximum Priority (1.0) is reserved for the front page, individual posts and, "
|
122 |
+
"when allowed, posts with high comment count."
|
123 |
+
msgstr ""
|
124 |
+
"Maksimalni prioritet (1.0) je rezervisan za naslovnu stranicu, individualne "
|
125 |
+
"postove i, kada je to dozvoljeno, za postove za velikim brojem komentara."
|
126 |
+
|
127 |
+
#: ../includes/admin.php:133
|
128 |
+
msgid ""
|
129 |
+
"Automatically adjusts Priority according to relative age and comment count."
|
130 |
+
msgstr ""
|
131 |
+
"Automatski podesi prioritet prema relativnoj starosti i broju komentara"
|
132 |
+
|
133 |
+
#: ../includes/admin.php:133
|
134 |
+
msgid ""
|
135 |
+
"Sticky posts will not be subject to reduction by age. Individual posts with "
|
136 |
+
"fixed Priority will always keep that value."
|
137 |
+
msgstr ""
|
138 |
+
"Sticky postovi nede buti redukovani po starosti. Individualni postobi sa "
|
139 |
+
"fiksiranim prioritetom ce uvek zadrzati tu vrednost. "
|
140 |
+
|
141 |
+
#: ../includes/admin.php:138
|
142 |
+
msgid "Update Lastmod and Changefreq on comments."
|
143 |
+
msgstr "Azuriraj Lastmod i Changefreq u komentarima"
|
144 |
+
|
145 |
+
#: ../includes/admin.php:138
|
146 |
+
msgid ""
|
147 |
+
"Set this if discussion on your site warrants reindexation upon each new "
|
148 |
+
"comment."
|
149 |
+
msgstr ""
|
150 |
+
"Podesi ovo ukoliko diskusija na vasem sajtu garantuje reindeksaciju nakon "
|
151 |
+
"svakog novog komentara."
|
152 |
+
|
153 |
+
#: ../includes/admin.php:147
|
154 |
+
msgid ""
|
155 |
+
"Priority settings do not affect ranking in search results in any way. They "
|
156 |
+
"are only meant to suggest search engines which URLs to index first. Once a "
|
157 |
+
"URL has been indexed, its Priority becomes meaningless until its Lastmod is "
|
158 |
+
"updated."
|
159 |
+
msgstr ""
|
160 |
+
"Podesavanja prioriteta ne uticu na kotiranje u rezultatima pretrage na ni "
|
161 |
+
"jedan nacin. Oni sluze samo da bi sugestirali alatima za pretragu koji URL "
|
162 |
+
"najpre da indeksuju. Jednom kada je URL indeksovan, njegov prioritet postaje "
|
163 |
+
"beznacajan sve dok Lastmod nije azuriran. "
|
164 |
+
|
165 |
+
#: ../includes/admin.php:157 ../includes/admin.php:372
|
166 |
+
msgid "Include taxonomies"
|
167 |
+
msgstr "Ukljuci taksonomije"
|
168 |
+
|
169 |
+
#: ../includes/admin.php:181
|
170 |
+
msgid "No taxonomies available for the currently included post types."
|
171 |
+
msgstr "Nema raspolozivih taksonomija za trenutno ukljucene tipove postova."
|
172 |
+
|
173 |
+
#: ../includes/admin.php:184
|
174 |
+
msgid ""
|
175 |
+
"It is generally not recommended to include taxonomy pages, unless their "
|
176 |
+
"content brings added value. For example, when you use category descriptions "
|
177 |
+
"with information that is not present elsewhere on your site or if taxonomy "
|
178 |
+
"pages list posts with an excerpt that is different from, but complementary "
|
179 |
+
"to the post content. In these cases you might consider including certain "
|
180 |
+
"taxonomies. Otherwise, you might even consider disallowing indexation by "
|
181 |
+
"adding specific robots.txt rules below."
|
182 |
+
msgstr ""
|
183 |
+
"Generalno nije preporucljivo ukljucivati stranice taksonomije, osim ako "
|
184 |
+
"njihov sadrzaj ne donosi dodatnu vrednost. Na primer, kada koristite opise "
|
185 |
+
"kategorija sa informacijama koje nisu dostupne nigde drugo na vasem sajtu, "
|
186 |
+
"ili ako stranica taksonomije postuje izvod koji je u drugacijoj formi, ali "
|
187 |
+
"komplementarnoj sadrzaju posta. U ovim slucajevim, amozete razmotriti "
|
188 |
+
"ukljucivanje odredjenih taksonomija. U suprotnom, mozete can razmotriti "
|
189 |
+
"onemogucavanje indeksacije tako sto cete dodati odredjena robot.txt pravila "
|
190 |
+
"ispod. "
|
191 |
+
|
192 |
+
#: ../includes/admin.php:194
|
193 |
+
msgid "Google"
|
194 |
+
msgstr "Google"
|
195 |
+
|
196 |
+
#: ../includes/admin.php:195
|
197 |
+
msgid "Bing"
|
198 |
+
msgstr "Bing"
|
199 |
+
|
200 |
+
#: ../includes/admin.php:199 ../includes/admin.php:375
|
201 |
+
msgid "Ping on Publish"
|
202 |
+
msgstr "Pink pri objavi "
|
203 |
+
|
204 |
+
#: ../includes/admin.php:218
|
205 |
+
#, php-format
|
206 |
+
msgid "Successfully pinged for %1$s on %2$s GMT."
|
207 |
+
msgstr "Uspesno pingovan za %1$s na %2$s GMT."
|
208 |
+
|
209 |
+
#: ../includes/admin.php:227
|
210 |
+
#, php-format
|
211 |
+
msgid "Rules to append to the %s generated by WordPress."
|
212 |
+
msgstr "Pravila za dodavanje na %s generisano od strane WordPress-a"
|
213 |
+
|
214 |
+
#: ../includes/admin.php:228
|
215 |
+
msgid ""
|
216 |
+
"Only add rules here when you know what you are doing, otherwise you might "
|
217 |
+
"break search engine access to your site."
|
218 |
+
msgstr ""
|
219 |
+
"Dodajte pravila ovde samo ukoliko znate sta radite, u suprotnom mozete "
|
220 |
+
"prekinuti pristum alata za pretragu vasem sajtu."
|
221 |
+
|
222 |
+
#: ../includes/admin.php:228
|
223 |
+
msgid ""
|
224 |
+
"These rules will not have effect when you are using a static robots.txt file."
|
225 |
+
msgstr ""
|
226 |
+
"Ova pravila nece imati efekta kada budete koristili staticni robots.txt fajl"
|
227 |
+
|
228 |
+
#: ../includes/admin.php:235
|
229 |
+
msgid ""
|
230 |
+
"Clear all XML Sitemap Feed options from the database and start fresh with "
|
231 |
+
"the default settings."
|
232 |
+
msgstr ""
|
233 |
+
"Izbrisi sve XML Sitemap Feed opcije iz baze podataka i zapocni ponovo sa "
|
234 |
+
"standardnim podesavanjima"
|
235 |
+
|
236 |
+
#: ../includes/admin.php:237
|
237 |
+
#, php-format
|
238 |
+
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
239 |
+
msgstr "Onemigucavanje i ponovno omogucavanje %s plagina ce imati isti efekat."
|
240 |
+
|
241 |
+
#: ../includes/admin.php:311
|
242 |
+
msgid "XML Sitemap"
|
243 |
+
msgstr "XML Sitemap"
|
244 |
+
|
245 |
+
#: ../includes/admin.php:329
|
246 |
+
#, php-format
|
247 |
+
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
248 |
+
msgstr "Ostavi prazno za automatsk prioritet konfigurisan na %1$s > %2$s."
|
249 |
+
|
250 |
+
#: ../includes/admin.php:329
|
251 |
+
msgid "Reading"
|
252 |
+
msgstr "Citanje"
|
253 |
+
|
254 |
+
#: ../includes/admin.php:363
|
255 |
+
msgid "Enable XML sitemaps"
|
256 |
+
msgstr "Omoguci XML Sitemaps"
|
257 |
+
|
258 |
+
#: ../includes/admin.php:381
|
259 |
+
msgid "Additional robots.txt rules"
|
260 |
+
msgstr "Dodatna robots.txt pravila"
|
261 |
+
|
262 |
+
#: ../includes/admin.php:384
|
263 |
+
msgid "Reset XML sitemaps"
|
264 |
+
msgstr "Resetuj XML Sitemaps"
|
languages/xml-sitemap-feed-ua_UA.mo
ADDED
Binary file
|
languages/xml-sitemap-feed-ua_UA.po
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-02-22 16:43+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-07 12:22+0200\n"
|
7 |
+
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
+
"Language-Team: cmd soft <tmosbyd@gmail.com>\n"
|
9 |
+
"Language: ua_UA\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_n\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Generator: Poedit 1.5.5\n"
|
16 |
+
|
17 |
+
#: ../includes/admin.php:15
|
18 |
+
msgid ""
|
19 |
+
"Donate to keep the free XML Sitemap Feeds plugin development & support going!"
|
20 |
+
msgstr ""
|
21 |
+
"Пожертвувати тримати вільні XML Sitemap Стрічки розвитку та підтримки "
|
22 |
+
"плагінів збираюся!"
|
23 |
+
|
24 |
+
#: ../includes/admin.php:15
|
25 |
+
msgid "These settings control the XML Sitemap generation."
|
26 |
+
msgstr "Ці параметри керують XML покоління Sitemap."
|
27 |
+
|
28 |
+
#: ../includes/admin.php:15
|
29 |
+
#, php-format
|
30 |
+
msgid "XML Sitemaps are disabled if you have set the option %s (above) to %s."
|
31 |
+
msgstr "XML Sitemaps відключаються, якщо ви встановите опцію %s (Вище) %s."
|
32 |
+
|
33 |
+
#: ../includes/admin.php:15
|
34 |
+
msgid "Site Visibility"
|
35 |
+
msgstr "Видимість сайту"
|
36 |
+
|
37 |
+
#: ../includes/admin.php:15
|
38 |
+
msgid "Discourage search engines from indexing this site"
|
39 |
+
msgstr "Перешкоджати пошуковики індексувати цей сайт"
|
40 |
+
|
41 |
+
#: ../includes/admin.php:39
|
42 |
+
msgid "Regular XML Sitemaps"
|
43 |
+
msgstr "Регулярні XML мапи сайту"
|
44 |
+
|
45 |
+
#: ../includes/admin.php:41 ../includes/admin.php:47
|
46 |
+
msgid "View"
|
47 |
+
msgstr "Бачити"
|
48 |
+
|
49 |
+
#: ../includes/admin.php:45
|
50 |
+
msgid "Google News Sitemap"
|
51 |
+
msgstr "Новини Google Sitemap"
|
52 |
+
|
53 |
+
#: ../includes/admin.php:123
|
54 |
+
#, php-format
|
55 |
+
msgid "Rules to append to %s generated by WordPress."
|
56 |
+
msgstr "Правила для додавання до %s породжених WordPress."
|
57 |
+
|
58 |
+
#: ../includes/admin.php:123
|
59 |
+
msgid ""
|
60 |
+
"Warning: Only set rules here when you know what you are doing, otherwise you "
|
61 |
+
"might break access to your site.<br />Note: These rules will not have effect "
|
62 |
+
"when you are using a static robots.txt file."
|
63 |
+
msgstr ""
|
64 |
+
"Увага: тільки встановлювати правила тут, коли ви знаєте, що робите, інакше "
|
65 |
+
"ви можете порушити доступ до вашого сайту.<br />Примітка: Ці правила не "
|
66 |
+
"матимуть ефекту, якщо ви використовуєте статичний файл robots.txt."
|
67 |
+
|
68 |
+
#: ../includes/admin.php:185
|
69 |
+
msgid "XML Sitemaps"
|
70 |
+
msgstr "XML Sitemaps"
|
71 |
+
|
72 |
+
#: ../includes/admin.php:188
|
73 |
+
msgid "Enable XML sitemaps"
|
74 |
+
msgstr "Включення XML карти сайту"
|
75 |
+
|
76 |
+
#: ../includes/admin.php:191
|
77 |
+
msgid "Include post types"
|
78 |
+
msgstr "Включіть повідомлення типу"
|
79 |
+
|
80 |
+
#: ../includes/admin.php:194
|
81 |
+
msgid "Include taxonomies"
|
82 |
+
msgstr "Включіть таксономії"
|
83 |
+
|
84 |
+
#: ../includes/admin.php:201
|
85 |
+
msgid "Additional robots.txt rules"
|
86 |
+
msgstr "Додаткові правила robots.txt"
|
languages/xml-sitemap-feed-xx_XX.po
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-24 22:36+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-24 22:37+0100\n"
|
7 |
+
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: \n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_n\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
|
16 |
+
#: ../includes/admin.php:15
|
17 |
+
#, php-format
|
18 |
+
msgid "Donate to keep the free %s plugin development & support going!"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: ../includes/admin.php:15
|
22 |
+
#: ../includes/admin.php:237
|
23 |
+
msgid "XML Sitemap & Google News Feeds"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: ../includes/admin.php:15
|
27 |
+
#, php-format
|
28 |
+
msgid "These settings control the XML Sitemaps generated by the %s plugin."
|
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:16
|
45 |
+
msgid "Search Engine Visibility"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../includes/admin.php:16
|
49 |
+
msgid "Discourage search engines from indexing this site"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../includes/admin.php:16
|
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:43
|
67 |
+
#: ../includes/admin.php:49
|
68 |
+
msgid "View"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../includes/admin.php:47
|
72 |
+
msgid "Google News Sitemap"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../includes/admin.php:59
|
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 "Successfully pinged for %1$s on %2$s GMT."
|
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:237
|
184 |
+
#, php-format
|
185 |
+
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: ../includes/admin.php:311
|
189 |
+
msgid "XML Sitemap"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: ../includes/admin.php:329
|
193 |
+
#, php-format
|
194 |
+
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../includes/admin.php:329
|
198 |
+
msgid "Reading"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../includes/admin.php:363
|
202 |
+
msgid "Enable XML sitemaps"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../includes/admin.php:381
|
206 |
+
msgid "Additional robots.txt rules"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: ../includes/admin.php:384
|
210 |
+
msgid "Reset XML sitemaps"
|
211 |
+
msgstr ""
|
212 |
+
|
languages/xml-sitemap-feed.pot
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: XML Sitemap and Google News feeds/4.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-26 15:31+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-26 15:31+0100\n"
|
7 |
+
"Last-Translator: RavanH <ravanhagen@gmail.com>\n"
|
8 |
+
"Language-Team: <ravanhagen@gmail.com>\n"
|
9 |
+
"Language: \n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_n\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../includes/admin.php:15
|
19 |
+
#, php-format
|
20 |
+
msgid "Donate to keep the free %s plugin development & support going!"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: ../includes/admin.php:15
|
24 |
+
#: ../includes/admin.php:237
|
25 |
+
msgid "XML Sitemap & Google News Feeds"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../includes/admin.php:15
|
29 |
+
#, php-format
|
30 |
+
msgid "These settings control the XML Sitemaps generated by the %s plugin."
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: ../includes/admin.php:16
|
34 |
+
#, php-format
|
35 |
+
msgid "XML Sitemaps will be disabled automatically when you set the option %1$s (above) to %2$s."
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: ../includes/admin.php:16
|
39 |
+
msgid "Search Engine Visibility"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../includes/admin.php:16
|
43 |
+
msgid "Discourage search engines from indexing this site"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: ../includes/admin.php:16
|
47 |
+
#, php-format
|
48 |
+
msgid "XML Sitemaps are disabled because you have set the option %1$s (above) to %2$s."
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: ../includes/admin.php:40
|
52 |
+
#: ../includes/admin.php:360
|
53 |
+
msgid "XML Sitemaps"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../includes/admin.php:41
|
57 |
+
msgid "Regular XML Sitemaps"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../includes/admin.php:43
|
61 |
+
#: ../includes/admin.php:49
|
62 |
+
msgid "View"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../includes/admin.php:47
|
66 |
+
msgid "Google News Sitemap"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../includes/admin.php:59
|
70 |
+
#: ../includes/admin.php:369
|
71 |
+
msgid "Include post types"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: ../includes/admin.php:91
|
75 |
+
#: ../includes/admin.php:295
|
76 |
+
#: ../includes/admin.php:329
|
77 |
+
msgid "Settings"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../includes/admin.php:106
|
81 |
+
msgid "year of publication"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: ../includes/admin.php:107
|
85 |
+
msgid "month of publication"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: ../includes/admin.php:111
|
89 |
+
msgid "Split by"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: ../includes/admin.php:121
|
93 |
+
msgid "Split by year if you experience slow or blank sitemaps. In very rare cases, split by month is needed."
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: ../includes/admin.php:126
|
97 |
+
#: ../includes/admin.php:328
|
98 |
+
msgid "Priority"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: ../includes/admin.php:128
|
102 |
+
msgid "Priority can be overridden on individual posts."
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: ../includes/admin.php:128
|
106 |
+
msgid "Maximum Priority (1.0) is reserved for the front page, individual posts and, when allowed, posts with high comment count."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../includes/admin.php:133
|
110 |
+
msgid "Automatically adjusts Priority according to relative age and comment count."
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../includes/admin.php:133
|
114 |
+
msgid "Sticky posts will not be subject to reduction by age. Individual posts with fixed Priority will always keep that value."
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../includes/admin.php:138
|
118 |
+
msgid "Update Lastmod and Changefreq on comments."
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../includes/admin.php:138
|
122 |
+
msgid "Set this if discussion on your site warrants reindexation upon each new comment."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../includes/admin.php:147
|
126 |
+
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."
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../includes/admin.php:157
|
130 |
+
#: ../includes/admin.php:372
|
131 |
+
msgid "Include taxonomies"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: ../includes/admin.php:181
|
135 |
+
msgid "No taxonomies available for the currently included post types."
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: ../includes/admin.php:184
|
139 |
+
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."
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: ../includes/admin.php:194
|
143 |
+
msgid "Google"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: ../includes/admin.php:195
|
147 |
+
msgid "Bing"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: ../includes/admin.php:199
|
151 |
+
#: ../includes/admin.php:375
|
152 |
+
msgid "Ping on Publish"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: ../includes/admin.php:218
|
156 |
+
#, php-format
|
157 |
+
msgid "Successfully pinged for %1$s on %2$s GMT."
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: ../includes/admin.php:227
|
161 |
+
#, php-format
|
162 |
+
msgid "Rules to append to the %s generated by WordPress."
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../includes/admin.php:228
|
166 |
+
msgid "Only add rules here when you know what you are doing, otherwise you might break search engine access to your site."
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../includes/admin.php:228
|
170 |
+
msgid "These rules will not have effect when you are using a static robots.txt file."
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../includes/admin.php:235
|
174 |
+
msgid "Clear all XML Sitemap Feed options from the database and start fresh with the default settings."
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../includes/admin.php:237
|
178 |
+
#, php-format
|
179 |
+
msgid "Disabling and reenabling the %s plugin will have the same effect."
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: ../includes/admin.php:311
|
183 |
+
msgid "XML Sitemap"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: ../includes/admin.php:329
|
187 |
+
#, php-format
|
188 |
+
msgid "Leave empty for automatic Priority as configured on %1$s > %2$s."
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: ../includes/admin.php:329
|
192 |
+
msgid "Reading"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: ../includes/admin.php:363
|
196 |
+
msgid "Enable XML sitemaps"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: ../includes/admin.php:381
|
200 |
+
msgid "Additional robots.txt rules"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: ../includes/admin.php:384
|
204 |
+
msgid "Reset XML sitemaps"
|
205 |
+
msgstr ""
|
206 |
+
|
readme.txt
CHANGED
@@ -1,28 +1,24 @@
|
|
1 |
-
=== XML & Google News
|
2 |
Contributors: RavanH
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&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, Google, Google News, Yahoo, Bing,
|
5 |
-
Requires at least: 2
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag:
|
8 |
|
9 |
-
Feeds that comply with the XML and Google News
|
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 |
-
The
|
18 |
|
19 |
Please read the FAQ's for info on how to get your articles listed on Google News.
|
20 |
|
21 |
-
**
|
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 hungry, impatient (!) spiders. Read the FAQ's for WP Super Cache instructions.
|
24 |
-
|
25 |
-
**qTranslate and xLanguage compatible!** Tested in Pre-Path Mode and Query Mode. Each language on your site will have its own XML Sitemap.
|
26 |
|
27 |
**NOTES:**
|
28 |
|
@@ -30,32 +26,31 @@ Please read the FAQ's for info on how to get your articles listed on Google News
|
|
30 |
|
31 |
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.
|
32 |
|
33 |
-
=
|
34 |
-
|
35 |
-
* 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!
|
36 |
-
* Completely **automatic** post URL _priority_ and _change frequency_ calculation based on post modification age and comment and trackback activity.
|
37 |
-
* Works out-of-the-box, even on **multi-site / shared codebase / multi-blog setups** like WordPress MU, WP 3+ in MultiSite mode (WPMS) and others.
|
38 |
-
* Also works upon **Network Activate** or placed in **/mu-plugins/** on WP 3+ in MS mode and WPMU and even takes care to exclude any tags blogs to avoid malus points for link spamming.
|
39 |
-
* Compatible with multi-lingual sites using **qTranslate** or **xLanguage** to allow all languages to be indexed equally.
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
* The feed contains the front page and all posts and pages but _excludes_ category, tag and other dynamic archive pages. This should not be a problem and by most it is even _advised_ to exclude them. There are SEO plugins around that actively block these archive pages from search engines.
|
44 |
-
* 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.
|
45 |
-
* Because the feed is dynamically created, on 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**.
|
46 |
-
* 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.
|
47 |
|
48 |
= Translations =
|
49 |
|
50 |
-
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
Since 3.8.5, there is a FILTER hook `xml_sitemap_url` available that lets you filter the URL for the sitemap reference in the generated robots.txt and the home URL in the sitemap. It sends both string (for single url) and array (for multiple urls) and should receive the same. See pre-packaged examples of it's use in xml-sitemap.php for the qTranslate and xLanguage plugins.
|
55 |
|
56 |
= Credits =
|
57 |
|
58 |
-
XML Sitemap Feed was originally based on the discontinued plugin Standard XML Sitemap Generator by Patrick Chia.
|
59 |
|
60 |
|
61 |
== Installation ==
|
@@ -76,7 +71,7 @@ Follow these steps:
|
|
76 |
|
77 |
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.
|
78 |
|
79 |
-
3. Activate the plugin on the
|
80 |
|
81 |
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.
|
82 |
|
@@ -95,13 +90,9 @@ Installed alongside [WordPress MU Sitewide Tags Pages](http://wordpress.org/exte
|
|
95 |
|
96 |
== Frequently Asked Questions ==
|
97 |
|
98 |
-
=
|
99 |
-
|
100 |
-
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.
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
Yes. Upload the complete /xml-sitemap-feed/ directory to /wp-content/mu-plugins/ and move the file xml-sitemap.php one dir up.
|
105 |
|
106 |
= How do I get my latest articles listed on Google News? =
|
107 |
|
@@ -109,40 +100,25 @@ Go to [Suggest News Content for Google News](http://www.google.com/support/news_
|
|
109 |
|
110 |
You will also want to add the sitemap to your [Google Webmasters Tools account](https://www.google.com/webmasters/tools/) to check its validity and performance. Create an account if you don't have one yet.
|
111 |
|
112 |
-
=
|
113 |
-
|
114 |
-
Even though the WP Super Cache time-stamp at the bottom of the feed source shows just fine, reloading the sitemap will show a new (different) timestamp. This is true for all feeds, not just the sitemap feed provided by this plugin.
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
= The Google News Sitemap gets redirected to the XML Sitemap! =
|
119 |
-
|
120 |
-
The rules of the Google News game are that you do not feed the hungry spider any stale food. Older than 2 days is bad. You need to bake her some fresh flies ;)
|
121 |
-
|
122 |
-
= How are the values for priority and changefreq calculated? =
|
123 |
-
|
124 |
-
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).
|
125 |
-
|
126 |
-
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.
|
127 |
-
|
128 |
-
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.
|
129 |
-
|
130 |
-
Dynamic pages like category pages, tag pages and archive pages are not listed in the XML Sitemap.
|
131 |
|
132 |
= Can I manipulate values for priority and changefreq? =
|
133 |
|
134 |
-
Yes
|
135 |
-
|
136 |
-
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).
|
137 |
-
|
138 |
-
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.
|
139 |
|
140 |
= Do I need to submit the sitemap to search engines? =
|
141 |
|
142 |
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.
|
143 |
-
( Read more about _Ping-O-Matic_ under **Does this plugin ping search engines** (below) to make sure your site is under _normal circumstances_ ;) )
|
144 |
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
= Do I need to change my robots.txt? =
|
148 |
|
@@ -154,7 +130,7 @@ Or if you have WP installed in a subdirectory, on a server without rewrite_rules
|
|
154 |
|
155 |
= My WordPress powered blog is installed in a subdirectory. Does that change anything? =
|
156 |
|
157 |
-
That depends on where the index.php of your installation
|
158 |
`
|
159 |
Sitemap: http://yourblogurl.tld/subdir/sitemap.xml
|
160 |
`
|
@@ -165,9 +141,9 @@ If you already have a robots.txt file with another Sitemap reference like it, ju
|
|
165 |
|
166 |
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:
|
167 |
|
168 |
-
Check to see if the URL
|
169 |
`
|
170 |
-
Sitemap: http://
|
171 |
|
172 |
User-agent: *
|
173 |
Allow: /
|
@@ -176,7 +152,7 @@ You can also choose to notify major search engines of your new XML sitemap manua
|
|
176 |
|
177 |
= Can I change the sitemap name/URL? =
|
178 |
|
179 |
-
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 `
|
180 |
|
181 |
= Where can I customize the xml output? =
|
182 |
|
@@ -190,7 +166,7 @@ The sitemap is dynamically generated just like a feed. There is no actual file c
|
|
190 |
|
191 |
= I see a sitemap.xml file in site root but it does not seem to get updated! =
|
192 |
|
193 |
-
You are most likely looking at a sitemap.xml file that has been created by another XML Sitemap plugin before you started using this
|
194 |
|
195 |
If that's not the case, you are probably using a caching plugin or your browser does not update to the latest feed output. Please verify.
|
196 |
|
@@ -200,6 +176,8 @@ Some caching plugins have the option to switch on/off caching of feeds. Make sur
|
|
200 |
|
201 |
Frederick Townes, developer of **W3 Total Cache**, says: "There's a checkbox option on the page cache settings tab to cache feeds. They will expire according to the expires field value on the browser cache setting for HTML."
|
202 |
|
|
|
|
|
203 |
= I get an ERROR when opening the sitemap or robots.txt! =
|
204 |
|
205 |
The absolute first thing you need to check is your blogs privacy settings. Go to **Settings > Privacy** and make sure you are **allowing search engines to index your site**. If they are blocked, your sitemap will _not_ be available.
|
@@ -208,7 +186,7 @@ If that did not solve the issue, check the following errors that might be encoun
|
|
208 |
|
209 |
**404 page instead of my sitemap.xml**
|
210 |
|
211 |
-
Try to refresh the Permalink structure in WordPress. Go to Settings > Permalinks and re-save them. Then reload the XML Sitemap in your browser with a clean browser cache.
|
212 |
|
213 |
**404 page instead of both sitemap.xml and robots.txt**
|
214 |
|
@@ -225,7 +203,7 @@ There is a know issue with WordPress (at least up to 2.8) not generating a robot
|
|
225 |
|
226 |
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:
|
227 |
`
|
228 |
-
Sitemap: http://
|
229 |
|
230 |
User-agent: *
|
231 |
Allow: /
|
@@ -238,9 +216,36 @@ On some setups (usually using the WordPress MU Domain Mapping plugin) this error
|
|
238 |
|
239 |
= I see only a BLANK (white) page when opening the sitemap =
|
240 |
|
241 |
-
You might be experiencing an issue with your servers PHP memory limit.
|
|
|
|
|
242 |
|
243 |
-
Read more on
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
|
246 |
== Screenshots ==
|
@@ -251,25 +256,55 @@ Read more on (Increasing memory allocated to PHP)[http://codex.wordpress.org/Edi
|
|
251 |
|
252 |
== Upgrade Notice ==
|
253 |
|
254 |
-
=
|
255 |
-
|
|
|
256 |
|
257 |
== Changelog ==
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
= 3.9.2 =
|
260 |
-
* BUGFIX: Google News language not rendered on WP 3.4
|
261 |
-
* Changeable XML Sitemap and News feed names (through constants)
|
262 |
-
* Basic support for Custom Post Types for News feed (through constant)
|
263 |
-
* Basic Polylang compatibility
|
264 |
* Basic Google News feed stylesheet
|
265 |
* improvement on XSS vulnerability fix
|
266 |
* Fixed trailing slash
|
267 |
-
* Speed improvement: removed extra query_posts()
|
268 |
-
* Sticky posts get max priority
|
269 |
-
* BUGFIX: PHP4 construct
|
270 |
|
271 |
= 3.9.1 =
|
272 |
-
* SECURITY
|
273 |
|
274 |
= 3.9 =
|
275 |
* Google News Sitemap
|
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: sitemap, xml sitemap, news sitemap, sitemap.xml, robots.txt, Google, Google News, Yahoo, Bing, seo, feed, polylang
|
5 |
+
Requires at least: 3.2
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 4.1.4
|
8 |
|
9 |
+
Feeds that comply with the XML Sitemap and Google News protocol for the hungry spiders. Multisite compatible.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
This plugin dynamically creates feeds that comply with the **XML Sitemap** and the **Google News Sitemap** protocol. **Multisite** and **Polylang** compatible and there are no files created. Options can be found on **Settings > Reading** to control which sitemaps, which post and taxonomy types are included, how priority is calculated, who to ping and set additional robots.txt rules.
|
14 |
|
15 |
+
You or site owners on your Multisite network will not be bothered with complicated settings like most other XML Sitemap plugins. The default settings will suffice in most cases and XML sitemap values like ChangeFreq and URL Priority are auto-calculated based on post age and comment activity.
|
16 |
|
17 |
+
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.
|
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 impatient (aren't we all when hungry?) 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 |
+
= Features =
|
|
|
|
|
|
|
|
|
|
|
|
|
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 tweaking difficult plugin options.
|
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 |
+
* Pings Google and Bing on new post publication.
|
37 |
+
* Options to define which post types and taxonomies get included in the sitemap and automatic priority calculation rules.
|
38 |
+
* Set priority per post.
|
39 |
+
* 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.
|
40 |
|
|
|
|
|
|
|
|
|
41 |
|
42 |
= Translations =
|
43 |
|
44 |
+
- **Dutch** * Author: [R.A. van Hagen](http://status301.net) (version 4.1)
|
45 |
+
- **French** * Author: [R.A. van Hagen](http://status301.net) (version 4.1)
|
46 |
+
- **Serbian** * Author: [WPdiscounts](http://wpdiscounts.com) (version 4.1)
|
47 |
+
- **Ukrainian** * Author: [Cmd Software](http://www.cmd-soft.com/) (version 4.0)
|
48 |
|
49 |
+
New transtations will be accepted and listed here. See translation instructions under [Other Notes](http://wordpress.org/extend/plugins/xml-sitemap-feed/other_notes).
|
|
|
|
|
50 |
|
51 |
= Credits =
|
52 |
|
53 |
+
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.
|
54 |
|
55 |
|
56 |
== Installation ==
|
71 |
|
72 |
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.
|
73 |
|
74 |
+
3. Activate the plugin on the Plugins page.
|
75 |
|
76 |
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.
|
77 |
|
90 |
|
91 |
== Frequently Asked Questions ==
|
92 |
|
93 |
+
= Where are the options? =
|
|
|
|
|
94 |
|
95 |
+
See the XML Sitemaps section on **Settings > Reading**.
|
|
|
|
|
96 |
|
97 |
= How do I get my latest articles listed on Google News? =
|
98 |
|
100 |
|
101 |
You will also want to add the sitemap to your [Google Webmasters Tools account](https://www.google.com/webmasters/tools/) to check its validity and performance. Create an account if you don't have one yet.
|
102 |
|
103 |
+
= My Google News Sitemap is empty! =
|
|
|
|
|
104 |
|
105 |
+
The rules of the Google News Game are that you do not feed the monster any stale food. Older than 2 days is bad. You need to bake him some fresh bread ;)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
= Can I manipulate values for priority and changefreq? =
|
108 |
|
109 |
+
Yes. You can find default settings for priority, changefreq and lastmod on **Settings > Reading**. A fixed priority can be set on a post by post basis too.
|
|
|
|
|
|
|
|
|
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 |
+
Besides that, Google and Bing are pinged upon each new publication.
|
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 |
+
Yes, Google and Bing are pinged upon each new publication. Unless you disable this feature on **Settings > Reading**.
|
122 |
|
123 |
= Do I need to change my robots.txt? =
|
124 |
|
130 |
|
131 |
= My WordPress powered blog is installed in a subdirectory. Does that change anything? =
|
132 |
|
133 |
+
That depends on where the index.php and .htaccess of your installation reside. If they are in the root while the rest of the WP files are installed in a subdir, so the site is accessible from your domain root, you do not have to do anything. It should work out of the box. But if the index.php is together with your wp-config.php and all other WP files in a subdir, meaning your blog is only accessible via that subdir, you need to manage your own robots.txt file in your **domain root**. It _has_ to be in the root (!) and needs a line starting with `Sitemap:` followed by the full URL to the sitemap feed provided by XML Sitemap Feed plugin. Like:
|
134 |
`
|
135 |
Sitemap: http://yourblogurl.tld/subdir/sitemap.xml
|
136 |
`
|
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 yourblog.url/?feed=sitemap does produce a feed. Now manually upload your own robots.txt file to your website root containing:
|
145 |
`
|
146 |
+
Sitemap: http://yourblog.url/?feed=sitemap
|
147 |
|
148 |
User-agent: *
|
149 |
Allow: /
|
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 `yourblog.url/?feed=sitemap`.
|
156 |
|
157 |
= Where can I customize the xml output? =
|
158 |
|
166 |
|
167 |
= I see a sitemap.xml file in site root but it does not seem to get updated! =
|
168 |
|
169 |
+
You are most likely looking at a sitemap.xml file that has been created by another XML Sitemap plugin before you started using this one. Remove that file and let the plugin dynamically generate it just like a feed. There will not be any actual files created.
|
170 |
|
171 |
If that's not the case, you are probably using a caching plugin or your browser does not update to the latest feed output. Please verify.
|
172 |
|
176 |
|
177 |
Frederick Townes, developer of **W3 Total Cache**, says: "There's a checkbox option on the page cache settings tab to cache feeds. They will expire according to the expires field value on the browser cache setting for HTML."
|
178 |
|
179 |
+
The Google News sitemap is designed to NOT be cached.
|
180 |
+
|
181 |
= I get an ERROR when opening the sitemap or robots.txt! =
|
182 |
|
183 |
The absolute first thing you need to check is your blogs privacy settings. Go to **Settings > Privacy** and make sure you are **allowing search engines to index your site**. If they are blocked, your sitemap will _not_ be available.
|
186 |
|
187 |
**404 page instead of my sitemap.xml**
|
188 |
|
189 |
+
Try to refresh the Permalink structure in WordPress. Go to Settings > Permalinks and re-save them. Then reload the XML Sitemap in your browser with a clean browser cache. ( Try Ctrl+R to bypass the browser cache -- this works on most but not all browsers. )
|
190 |
|
191 |
**404 page instead of both sitemap.xml and robots.txt**
|
192 |
|
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://yourblog.url/sitemap.xml
|
207 |
|
208 |
User-agent: *
|
209 |
Allow: /
|
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.0.1 both with normal activation and with Network Activate / Site Wide Activate.
|
228 |
+
|
229 |
+
= Can I run this plugin from /mu-plugins/ on WP3.0 MS or WPMU? =
|
230 |
+
|
231 |
+
Yes. Upload the complete /xml-sitemap-feed/ directory to /wp-content/mu-plugins/ and move the file xml-sitemap.php one dir up.
|
232 |
+
|
233 |
+
|
234 |
+
== Translation ==
|
235 |
+
|
236 |
+
1. Install PoEdit on your computer.
|
237 |
+
1. Go to this plugins /languages/ directory.
|
238 |
+
1. If there is no .po file that corresponds with your language yet, rename the template translation database xml-sitemap-feed-xx_XX.po by replacing the xx with your language code and XX with your country code.
|
239 |
+
1. Open the .po file of your language with PoEdit.
|
240 |
+
1. Go to Edit > Preferences and on the tab Editor check the option to compile a .mo database on save automatically. Close with OK.
|
241 |
+
1. Go to Catalog > Settings and set your name, e-mail address, language and country. Close with OK.
|
242 |
+
1. 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.
|
243 |
+
1. Now go ahead and start translating all the texts listed in PoEdit.
|
244 |
+
1. When done, go to File > Save to Save.
|
245 |
+
1. 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.
|
246 |
+
1. 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!
|
247 |
+
|
248 |
+
Thanks for sharing your translation :)
|
249 |
|
250 |
|
251 |
== Screenshots ==
|
256 |
|
257 |
== Upgrade Notice ==
|
258 |
|
259 |
+
= 4.1.4 =
|
260 |
+
New: Split posts by year to improve generate speed and priority settings. Many new options. Ping search engines. Bugfixes.
|
261 |
+
|
262 |
|
263 |
== Changelog ==
|
264 |
|
265 |
+
= 4.1.4 =
|
266 |
+
* BUGFIX: Pass by reference fatal error in PHP 5.4
|
267 |
+
* BUGFIX: issue with Polylang language code in pretty permalinks setting
|
268 |
+
* BUGFIX: unselected post types in sitemap
|
269 |
+
* BUGFIX: 1+ Priority for sticky posts with comments
|
270 |
+
* Dutch and French translations updated
|
271 |
+
|
272 |
+
= 4.1 =
|
273 |
+
* NEW: Ping Google and Bing on new publications
|
274 |
+
* NEW: Set priority per post
|
275 |
+
* NEW: Priority calculation options
|
276 |
+
* NEW: Option to split posts by year or month for faster generation of each sitemap
|
277 |
+
* Reduced queries to increase performance
|
278 |
+
* Improved Lastmod and Changefreq calculations
|
279 |
+
* Core class improvements
|
280 |
+
* Dropped qTranslate support
|
281 |
+
* Dropped PHP4 support
|
282 |
+
* BUGFIX: removed several PHP notices
|
283 |
+
|
284 |
+
= 4.0.1 =
|
285 |
+
* NEW: Dutch and French translations
|
286 |
+
* BUGFIX: Non public sites still have sitemap by default
|
287 |
+
* BUGFIX: Invalid argument supplied for foreach() when all post types are off
|
288 |
+
* BUGFIX: Wrong translation dir
|
289 |
+
|
290 |
+
= 4.0.0 =
|
291 |
+
* Moved to sitemap index and seperated post/page sitemaps
|
292 |
+
* NEW: options to dswitch off sitemap and news sitemap
|
293 |
+
* NEW: select which post types to include
|
294 |
+
* NEW: select which taxonomies to include
|
295 |
+
* NEW: set additional robots.txt rules
|
296 |
+
* NEW: Translation POT catalogue
|
297 |
+
* Improved Polylang support
|
298 |
+
* Dropped xLanguage support
|
299 |
+
* qTranslate currently untested
|
300 |
+
|
301 |
= 3.9.2 =
|
|
|
|
|
|
|
|
|
302 |
* Basic Google News feed stylesheet
|
303 |
* improvement on XSS vulnerability fix
|
304 |
* Fixed trailing slash
|
|
|
|
|
|
|
305 |
|
306 |
= 3.9.1 =
|
307 |
+
* SECURITY: XSS vulnerability in sitemap.xsl.php
|
308 |
|
309 |
= 3.9 =
|
310 |
* Google News Sitemap
|
sitemap-news.xsl.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* ------------------------------------------
|
3 |
-
XML News Sitemap Feed Styleheet Template
|
4 |
-
------------------------------------------ */
|
5 |
-
|
6 |
-
header('Content-Type: text/xsl; charset=utf-8', true);
|
7 |
-
|
8 |
-
echo '<?xml version="1.0" encoding="UTF-8"?>'; ?><xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/><xsl:template match="/"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Google News Sitemap Feed</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style></head><body><h1>Google News Sitemap Feed</h1><div id="header">This is a Google News Sitemap to aid <a href="http://news.google.com">Google News</a> finding news from the <strong><em>last 48 hours</em></strong> on your website. Read more about <a href="http://www.google.com/schemas/sitemap-news/0.9/">Google News Sitemaps</a>, submit your site via <a href="http://www.google.com/support/news_pub/bin/request.py?contact_type=suggest_content">Google propose news content</a> and add it in your <a href="https://www.google.com/webmasters/tools/">Google Webmaster Tools</a> account.</div><div id="content"><table cellpadding="5"><tr style="border-bottom:1px black solid;"><th>#</th><th>URL</th></tr><xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/><xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/><xsl:for-each select="sitemap:urlset/sitemap:url"><tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if><td><xsl:value-of select="position()"/></td><td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td></tr></xsl:for-each></table></div><div id="footer"><img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']); ?>/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://status301.net/wordpress-plugins/xml-sitemap-feed/" title="XML Sitemap Feed plugin for WordPress">XML & Google News Sitemap Feed <?php echo (preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] )) ? $_GET['ver'] : ''; ?></a> running on <a href="http://wordpress.org/">WordPress</a>.</div></body></html></xsl:template></xsl:stylesheet>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sitemap.xsl.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* -------------------------------------
|
3 |
-
XML Sitemap Feed Styleheet Template
|
4 |
-
------------------------------------- */
|
5 |
-
|
6 |
-
header('Content-Type: text/xsl; charset=utf-8', true);
|
7 |
-
|
8 |
-
echo '<?xml version="1.0" encoding="UTF-8"?>'; ?><xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/><xsl:template match="/"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>XML Sitemap Feed</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style></head><body><h1>XML Sitemap Feed</h1><div id="header">This is an XML Sitemap to aid search engines like <a href="http://www.google.com">Google</a>, <a href="http://www.bing.com/">Bing</a>, <a href="http://www.yahoo.com">Yahoo!</a> and <a href="http://www.ask.com">Ask</a> indexing your site better. Read more about XML sitemaps on <a href="http://sitemaps.org">Sitemaps.org</a>.</div><div id="content"><table cellpadding="5"><tr style="border-bottom:1px black solid;"><th>#</th><th>URL</th><th>Priority</th><th>Change Frequency</th><th>Last Changed</th></tr><xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/><xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/><xsl:for-each select="sitemap:urlset/sitemap:url"><tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if><td><xsl:value-of select="position()"/></td><td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td><td><xsl:value-of select="concat(sitemap:priority*100,'%')"/></td><td><xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/></td><td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td></tr></xsl:for-each></table></div><div id="footer"><img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']); ?>/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://status301.net/wordpress-plugins/xml-sitemap-feed/" title="XML Sitemap Feed plugin for WordPress">XML & Google News Sitemap Feed <?php echo (preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] )) ? $_GET['ver'] : ''; ?></a> running on <a href="http://wordpress.org/">WordPress</a>.</div></body></html></xsl:template></xsl:stylesheet>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xml-sitemap.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: XML Sitemap
|
4 |
Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
|
5 |
-
Description:
|
6 |
Text Domain: xml-sitemap-feed
|
7 |
-
Version:
|
8 |
Author: RavanH
|
9 |
Author URI: http://status301.net/
|
10 |
*/
|
11 |
|
12 |
-
/* Copyright
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
@@ -20,10 +20,6 @@ Author URI: http://status301.net/
|
|
20 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
|
29 |
/* --------------------
|
@@ -32,54 +28,92 @@ Author URI: http://status301.net/
|
|
32 |
*
|
33 |
* FILTERS
|
34 |
* xml_sitemap_url -> Filters the URL used in the sitemap reference in robots.txt
|
35 |
-
*
|
36 |
* and for the home URL in the sitemap (receives a STRING and MUST
|
37 |
* return one) itself. Useful for multi language plugins or other
|
38 |
* plugins that affect the blogs main URL... See pre-defined filter
|
39 |
* XMLSitemapFeed::qtranslate() in XMLSitemapFeed.class.php as an
|
40 |
* example.
|
|
|
|
|
41 |
* ACTIONS
|
42 |
* [ none at this point, but feel free to request, suggest or submit one :) ]
|
43 |
*
|
44 |
*/
|
45 |
|
46 |
if(!empty($_SERVER['SCRIPT_FILENAME']) && 'xml-sitemap.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
47 |
-
die('You
|
48 |
|
49 |
/* --------------------
|
50 |
* CONSTANTS
|
51 |
* -------------------- */
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
if ( file_exists ( dirname(__FILE__).'/xml-sitemap-feed' ) )
|
56 |
-
define('XMLSF_PLUGIN_DIR', dirname(__FILE__) . '/xml-sitemap-feed');
|
57 |
-
else
|
58 |
-
define('XMLSF_PLUGIN_DIR', dirname(__FILE__));
|
59 |
|
60 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
-
if ( !defined('XMLSF_POST_TYPE') )
|
66 |
-
define('XMLSF_POST_TYPE', 'any');
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
if ( !defined('XMLSF_NEWS_POST_TYPE') )
|
69 |
define('XMLSF_NEWS_POST_TYPE', 'post');
|
70 |
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
73 |
|
74 |
-
if ( !defined('XMLSF_NEWS_NAME') )
|
75 |
-
define('XMLSF_NEWS_NAME', 'sitemap-news.xml');
|
76 |
|
77 |
-
/*
|
78 |
-
* CLASS
|
79 |
-
* ----------------- */
|
80 |
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
/* -------------------------------------
|
85 |
* MISSING WORDPRESS FUNCTIONS
|
@@ -87,3 +121,10 @@ if ( class_exists('XMLSitemapFeed') || include( XMLSF_PLUGIN_DIR . '/XMLSitemapF
|
|
87 |
|
88 |
include_once(XMLSF_PLUGIN_DIR . '/hacks.php');
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: XML Sitemap & Google News Feeds
|
4 |
Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
|
5 |
+
Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols. Happy with the results? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&item_number=4%2e0&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">tip</a></strong> for continued development and support. Thanks :)
|
6 |
Text Domain: xml-sitemap-feed
|
7 |
+
Version: 4.1.4
|
8 |
Author: RavanH
|
9 |
Author URI: http://status301.net/
|
10 |
*/
|
11 |
|
12 |
+
/* Copyright 2013 RavanH http://status301.net/ email: ravanhagen@gmail.com
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
20 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
23 |
*/
|
24 |
|
25 |
/* --------------------
|
28 |
*
|
29 |
* FILTERS
|
30 |
* xml_sitemap_url -> Filters the URL used in the sitemap reference in robots.txt
|
31 |
+
* (deprecated) (receives an ARRAY and MUST return one; can be multiple urls)
|
32 |
* and for the home URL in the sitemap (receives a STRING and MUST
|
33 |
* return one) itself. Useful for multi language plugins or other
|
34 |
* plugins that affect the blogs main URL... See pre-defined filter
|
35 |
* XMLSitemapFeed::qtranslate() in XMLSitemapFeed.class.php as an
|
36 |
* example.
|
37 |
+
* xmlsf_defaults -> Filters the default array values for different option groups.
|
38 |
+
|
39 |
* ACTIONS
|
40 |
* [ none at this point, but feel free to request, suggest or submit one :) ]
|
41 |
*
|
42 |
*/
|
43 |
|
44 |
if(!empty($_SERVER['SCRIPT_FILENAME']) && 'xml-sitemap.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
45 |
+
die('You may not access this file directly!');
|
46 |
|
47 |
/* --------------------
|
48 |
* CONSTANTS
|
49 |
* -------------------- */
|
50 |
|
51 |
+
/* The following constants can be used to change plugin defaults by defining them in wp-config.php */
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
/*
|
54 |
+
* XMLSF_POST_TYPE
|
55 |
+
*
|
56 |
+
* Comma seperated list of post types.
|
57 |
+
* default: 'any'
|
58 |
+
*
|
59 |
+
* example:
|
60 |
+
* define('XMLSF_POST_TYPE', 'post,page');
|
61 |
+
*/
|
62 |
+
|
63 |
+
/*
|
64 |
+
* XMLSF_NAME
|
65 |
+
*
|
66 |
+
* Pretty permalink name for the main sitemap (index)
|
67 |
+
*/
|
68 |
+
if ( !defined('XMLSF_NAME') )
|
69 |
+
define('XMLSF_NAME', 'sitemap.xml');
|
70 |
|
71 |
+
/*
|
72 |
+
* XMLSF_POST_TYPE_NEWS_TAGS
|
73 |
+
*
|
74 |
+
* Post types to append sitemap news tags to in regular sitemaps.
|
75 |
+
* Does not have effect when News sitemap is switched of in site settings.
|
76 |
+
* default: 'post'
|
77 |
+
*
|
78 |
+
* example:
|
79 |
+
* define('XMLSF_POST_TYPE_NEWS_TAGS', 'post,mycustomtype');
|
80 |
+
*/
|
81 |
|
|
|
|
|
82 |
|
83 |
+
/*
|
84 |
+
* XMLSF_NEWS_NAME
|
85 |
+
*
|
86 |
+
* Pretty permalink name for the news sitemap
|
87 |
+
*/
|
88 |
+
if ( !defined('XMLSF_NEWS_NAME') )
|
89 |
+
define('XMLSF_NEWS_NAME', 'sitemap-news.xml');
|
90 |
+
|
91 |
+
/*
|
92 |
+
* XMLSF_NEWS_POST_TYPE
|
93 |
+
*
|
94 |
+
* Post types to include in dedicated news sitemap
|
95 |
+
*/
|
96 |
if ( !defined('XMLSF_NEWS_POST_TYPE') )
|
97 |
define('XMLSF_NEWS_POST_TYPE', 'post');
|
98 |
|
99 |
+
/*
|
100 |
+
* XMLSF_GOOGLE_NEWS_TITLE
|
101 |
+
*
|
102 |
+
* Google News name, if different than site name
|
103 |
+
* TODO
|
104 |
+
*/
|
105 |
|
|
|
|
|
106 |
|
107 |
+
/* The following constants should not be changed */
|
|
|
|
|
108 |
|
109 |
+
define('XMLSF_VERSION', '4.1.4');
|
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 |
+
define('XMLSF_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
117 |
|
118 |
/* -------------------------------------
|
119 |
* MISSING WORDPRESS FUNCTIONS
|
121 |
|
122 |
include_once(XMLSF_PLUGIN_DIR . '/hacks.php');
|
123 |
|
124 |
+
/* ----------------------
|
125 |
+
* INSTANTIATE
|
126 |
+
* ---------------------- */
|
127 |
+
|
128 |
+
if ( class_exists('XMLSitemapFeed') || include_once( XMLSF_PLUGIN_DIR . '/includes/core.php' ) )
|
129 |
+
$xmlsf = new XMLSitemapFeed();
|
130 |
+
|