Version Description
- Escaped some strings to address security issues.
- Added "suppress_filters => false" to make the plugin WPML compatible.
- Fixed uninstall hook as was incorrectly used.
Download this release
Release Info
Developer | Rincewind |
Plugin | WP Realtime Sitemap |
Version | 1.5.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6
- readme.txt +9 -4
- wp-realtime-sitemap.php +38 -34
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Realtime Sitemap ===
|
2 |
Contributors: Rincewind
|
3 |
Donate link: http://goo.gl/mmUuGj
|
4 |
-
Tags: seo, navigation, site, map, sitemap, sitemaps, posts, pages, custom, post, types, wpmu, wordpress, multisite, multiuser, bilingual, i18n, l10n, language, multilanguage, multilingual, translation, qtranslate
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.5.3
|
7 |
-
Stable tag: 1.5.
|
8 |
|
9 |
A sitemap plugin to make it easier for your site to show all your pages, posts, archives, categories and tags in an easy to read format.
|
10 |
|
@@ -26,7 +26,7 @@ A sitemap plugin to make it easier for your site to show all your pages, posts,
|
|
26 |
1. Supports I18n for translation.
|
27 |
1. Supports use of the wordpress shortcode for including the sitemap in pages and posts.
|
28 |
1. Supports menus created with the inbuilt WordPress Menu Editor.
|
29 |
-
1. Works on WordPress Multisite (WPMU) blogs.
|
30 |
1. Comes with an uninstaller, if you dont want it anymore just deactivate the plugin and delete it from within wordpress and it will delete all of its settings itself.
|
31 |
|
32 |
I cant think of anything else that I personally would need this plugin to do for my own use, if anyone feels it doesn't meet what they need, or has any suggestions as to how to make it better then do please get in touch with me and I will see what I can do to accomodate your requests.
|
@@ -42,7 +42,7 @@ WP Realtime Sitemap is available in:-
|
|
42 |
* Russian by [ssvictors](http://wordpress.org/support/profile/ssvictors) and [Igor Dubilej](http://www.itransition.com).
|
43 |
* Spanish by Francois-Xavier Gonzalez. **needs updating**
|
44 |
|
45 |
-
Please rate this plugin and/or make a [donation](http://goo.gl/
|
46 |
|
47 |
== Installation ==
|
48 |
|
@@ -151,6 +151,11 @@ Full details of producing a translation can be found in this [guide to translati
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
= 1.5.5 =
|
155 |
* Fixed reported issue of not being able to change "Header Settings".
|
156 |
* Fixed broken donation link.
|
1 |
=== WP Realtime Sitemap ===
|
2 |
Contributors: Rincewind
|
3 |
Donate link: http://goo.gl/mmUuGj
|
4 |
+
Tags: seo, navigation, site, map, sitemap, sitemaps, posts, pages, custom, post, types, wpmu, wpml, wordpress, multisite, multiuser, bilingual, i18n, l10n, language, multilanguage, multilingual, translation, qtranslate
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.5.3
|
7 |
+
Stable tag: 1.5.6
|
8 |
|
9 |
A sitemap plugin to make it easier for your site to show all your pages, posts, archives, categories and tags in an easy to read format.
|
10 |
|
26 |
1. Supports I18n for translation.
|
27 |
1. Supports use of the wordpress shortcode for including the sitemap in pages and posts.
|
28 |
1. Supports menus created with the inbuilt WordPress Menu Editor.
|
29 |
+
1. Works on WordPress Multisite (WPMU, WPML) blogs.
|
30 |
1. Comes with an uninstaller, if you dont want it anymore just deactivate the plugin and delete it from within wordpress and it will delete all of its settings itself.
|
31 |
|
32 |
I cant think of anything else that I personally would need this plugin to do for my own use, if anyone feels it doesn't meet what they need, or has any suggestions as to how to make it better then do please get in touch with me and I will see what I can do to accomodate your requests.
|
42 |
* Russian by [ssvictors](http://wordpress.org/support/profile/ssvictors) and [Igor Dubilej](http://www.itransition.com).
|
43 |
* Spanish by Francois-Xavier Gonzalez. **needs updating**
|
44 |
|
45 |
+
Please rate this plugin and/or make a [donation](http://goo.gl/mmUuGj "PayPal donation") if you find it useful, thank you.
|
46 |
|
47 |
== Installation ==
|
48 |
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 1.5.6 =
|
155 |
+
* Escaped some strings to address security issues.
|
156 |
+
* Added "suppress_filters => false" to make the plugin WPML compatible.
|
157 |
+
* Fixed uninstall hook as was incorrectly used.
|
158 |
+
|
159 |
= 1.5.5 =
|
160 |
* Fixed reported issue of not being able to change "Header Settings".
|
161 |
* Fixed broken donation link.
|
wp-realtime-sitemap.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: WP Realtime Sitemap
|
5 |
Plugin URI: http://goo.gl/ri9xU
|
6 |
Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add `[wp-realtime-sitemap]` to any page or post and the site map will be added there. Use Settings->WP Realtime Sitemap to set options.
|
7 |
-
Version: 1.5.
|
8 |
Author: Daniel Tweedy
|
9 |
Author URI: http://goo.gl/jdOfL
|
10 |
License: GPL2
|
@@ -26,7 +26,7 @@ License: GPL2
|
|
26 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
|
29 |
-
define('WPRealtimeSitemap_Version', '1.5.
|
30 |
|
31 |
if (!class_exists('WPRealtimeSitemap')) {
|
32 |
class WPRealtimeSitemap {
|
@@ -68,8 +68,11 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
68 |
// Install Settings - Doesn't fire on Updates!!
|
69 |
register_activation_hook(__FILE__, array(&$this, 'installSettings'));
|
70 |
|
71 |
-
// Uninstall Settings
|
72 |
-
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
function addInit() {
|
@@ -856,7 +859,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
856 |
if (isset($values) && is_array($values)) {
|
857 |
$optionFormat = '<option value="%s"%s>%s</option>';
|
858 |
|
859 |
-
$output = '<select name="plugin_wp_realtime_sitemap_settings[' . $args['dbfield'] . ']">';
|
860 |
|
861 |
foreach ($values as $key => $label) {
|
862 |
$output .= sprintf($optionFormat, $key, selected($$args['dbfield'], $key, false), $label);
|
@@ -875,7 +878,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
875 |
$infotext = $this->_formInfoText($args);
|
876 |
|
877 |
if (array_key_exists('dbfield', $args) && isset($infotext)) {
|
878 |
-
echo '<input name="plugin_wp_realtime_sitemap_settings[' . $args['dbfield'] . ']" size="30" type="text" value="' . $$args['dbfield'] . '" /><br />' . $infotext;
|
879 |
}
|
880 |
}
|
881 |
|
@@ -1564,7 +1567,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1564 |
if (($all_options['show_menu'] != 'No' && $all_options['show_menu'] != 'Off') && ($show == 'menu' || $show == 'all')) {
|
1565 |
$menu_header = (empty($menu_header)) ? __('Menu', 'wp-realtime-sitemap') : $menu_header;
|
1566 |
|
1567 |
-
$menu = '<div id="wp-realtime-sitemap-menu"><h3>' . $menu_header . '</h3>';
|
1568 |
$menu .= '<ul>' . wp_nav_menu(array('menu' => $menu_id, 'container' => false, 'items_wrap' => '%3$s', 'echo' => '0')) . '</ul>';
|
1569 |
$menu .= '</div>';
|
1570 |
}
|
@@ -1573,7 +1576,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1573 |
if (($all_options['show_pages'] != 'No' && $all_options['show_pages'] != 'Off') && ($show == 'pages' || $show == 'all')) {
|
1574 |
$pages_header = (empty($pages_header)) ? __('Pages', 'wp-realtime-sitemap') : $pages_header;
|
1575 |
|
1576 |
-
$pages = '<div id="wp-realtime-sitemap-pages"><h3>' . $pages_header . '</h3>';
|
1577 |
$pages .= '<ul>' . wp_list_pages(array('sort_column' => $page_sort_column, 'sort_order' => $page_sort_order, 'exclude' => $page_exclude, 'depth' => $page_depth, 'show_date' => $page_show_date, 'title_li' => '', 'echo' => '0')) . '</ul></div>';
|
1578 |
}
|
1579 |
|
@@ -1588,16 +1591,17 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1588 |
if (count($thecategories) > 0) {
|
1589 |
foreach($thecategories as $category) {
|
1590 |
|
1591 |
-
$posts .= '<li><a href="' . get_category_link($category->term_id) . '" title="' . $category->category_description . '">' . $category->name . '</a><ul>';
|
1592 |
|
1593 |
// Set options for post query
|
1594 |
$theposts = get_posts(array(
|
1595 |
-
'numberposts'
|
1596 |
-
'category'
|
1597 |
-
'orderby'
|
1598 |
-
'order'
|
1599 |
-
'exclude'
|
1600 |
-
'post_type'
|
|
|
1601 |
));
|
1602 |
|
1603 |
if (count($theposts) > 0) {
|
@@ -1620,17 +1624,18 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1620 |
|
1621 |
$posts_header = (empty($posts_header)) ? __('Posts', 'wp-realtime-sitemap') : $posts_header;
|
1622 |
|
1623 |
-
$posts = '<div id="wp-realtime-sitemap-posts"><h3>' . $posts_header . '</h3><ul>' . $posts . '</ul></div>';
|
1624 |
}
|
1625 |
|
1626 |
} else {
|
1627 |
// Set options for post query
|
1628 |
$theposts = get_posts(array(
|
1629 |
-
'numberposts'
|
1630 |
-
'orderby'
|
1631 |
-
'order'
|
1632 |
-
'exclude'
|
1633 |
-
'post_type'
|
|
|
1634 |
));
|
1635 |
|
1636 |
if (count($theposts) > 0) {
|
@@ -1649,7 +1654,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1649 |
|
1650 |
$posts_header = (empty($posts_header)) ? __('Posts', 'wp-realtime-sitemap') : $posts_header;
|
1651 |
|
1652 |
-
$posts = '<div id="wp-realtime-sitemap-posts"><h3>' . $posts_header . '</h3><ul>' . $posts . '</ul></div>';
|
1653 |
}
|
1654 |
}
|
1655 |
}
|
@@ -1663,11 +1668,12 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1663 |
|
1664 |
// Set options for post query
|
1665 |
$theposts = get_posts(array(
|
1666 |
-
'numberposts'
|
1667 |
-
'orderby'
|
1668 |
-
'order'
|
1669 |
-
'exclude'
|
1670 |
-
'post_type'
|
|
|
1671 |
));
|
1672 |
|
1673 |
if (count($theposts) > 0) {
|
@@ -1694,7 +1700,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1694 |
if (($all_options['show_archives'] != 'No' && $all_options['show_archives'] != 'Off') && ($show == 'archives' || $show == 'all')) {
|
1695 |
$archives_header = (empty($archives_header)) ? __('Archives', 'wp-realtime-sitemap') : $archives_header;
|
1696 |
|
1697 |
-
$archives = '<div id="wp-realtime-sitemap-archives"><h3>' . $archives_header . '</h3>';
|
1698 |
$archives .= '<ul>' . wp_get_archives(array('type' => $archive_type, 'limit' => $archive_limit, 'show_post_count' => $archive_show_post_count, 'echo' => 0)) . '</ul></div>';
|
1699 |
}
|
1700 |
|
@@ -1702,7 +1708,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1702 |
if (($all_options['show_categories'] != 'No' && $all_options['show_categories'] != 'Off') && ($show == 'categories' || $show == 'all')) {
|
1703 |
$categories_header = (empty($categories_header)) ? __('Categories', 'wp-realtime-sitemap') : $categories_header;
|
1704 |
|
1705 |
-
$categories = '<div id="wp-realtime-sitemap-categories"><h3>' . $categories_header . '</h3>';
|
1706 |
|
1707 |
// Tag Cloud: Yes/No?
|
1708 |
if ($all_options['category_tagcloud'] != 'No' && $all_options['category_tagcloud'] != 'Off') {
|
@@ -1718,7 +1724,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1718 |
if (($all_options['show_tags'] != 'No' && $all_options['show_tags'] != 'Off') && ($show == 'tags' || $show == 'all')) {
|
1719 |
$tags_header = (empty($tags_header)) ? __('Tags', 'wp-realtime-sitemap') : $tags_header;
|
1720 |
|
1721 |
-
$tags = '<div id="wp-realtime-sitemap-tags"><h3>' . $tags_header . '</h3>';
|
1722 |
|
1723 |
// Tag Cloud: Yes/No?
|
1724 |
if ($all_options['tags_tagcloud'] != 'No' && $all_options['tags_tagcloud'] != 'Off') {
|
@@ -1863,7 +1869,7 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1863 |
echo '<div class="wprs-update-nag">' . sprintf(__('WP Realtime Sitemap was just updated... Please visit the %sPlugin Options Page%s and re-save your preferences.', 'wp-realtime-sitemap'), '<a href="options-general.php?page=wp-realtime-sitemap.php" style="color: #ca0c01">', '</a>') . '</div>';
|
1864 |
}
|
1865 |
|
1866 |
-
function
|
1867 |
global $wpdb, $wp_roles, $wp_version;
|
1868 |
|
1869 |
delete_option('plugin_wp_realtime_sitemap_settings');
|
@@ -1897,6 +1903,4 @@ if (!class_exists('WPRealtimeSitemap')) {
|
|
1897 |
}
|
1898 |
|
1899 |
if( class_exists('WPRealtimeSitemap') )
|
1900 |
-
$wpRealtimeSitemap = new WPRealtimeSitemap();
|
1901 |
-
|
1902 |
-
?>
|
4 |
Plugin Name: WP Realtime Sitemap
|
5 |
Plugin URI: http://goo.gl/ri9xU
|
6 |
Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add `[wp-realtime-sitemap]` to any page or post and the site map will be added there. Use Settings->WP Realtime Sitemap to set options.
|
7 |
+
Version: 1.5.6
|
8 |
Author: Daniel Tweedy
|
9 |
Author URI: http://goo.gl/jdOfL
|
10 |
License: GPL2
|
26 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
|
29 |
+
define('WPRealtimeSitemap_Version', '1.5.6');
|
30 |
|
31 |
if (!class_exists('WPRealtimeSitemap')) {
|
32 |
class WPRealtimeSitemap {
|
68 |
// Install Settings - Doesn't fire on Updates!!
|
69 |
register_activation_hook(__FILE__, array(&$this, 'installSettings'));
|
70 |
|
71 |
+
// Uninstall Settings - Doesn't fire on Uninstall!!
|
72 |
+
//register_deactivation_hook(__FILE__, array(&$this, 'UninstallSettings'));
|
73 |
+
|
74 |
+
// Uninstall Settings - Doesn't fire on Deactivations!!
|
75 |
+
register_uninstall_hook(__FILE__, 'WPRealtimeSitemapUninstallSettings');
|
76 |
}
|
77 |
|
78 |
function addInit() {
|
859 |
if (isset($values) && is_array($values)) {
|
860 |
$optionFormat = '<option value="%s"%s>%s</option>';
|
861 |
|
862 |
+
$output = '<select name="plugin_wp_realtime_sitemap_settings[' . esc_attr( $args['dbfield'] ) . ']">';
|
863 |
|
864 |
foreach ($values as $key => $label) {
|
865 |
$output .= sprintf($optionFormat, $key, selected($$args['dbfield'], $key, false), $label);
|
878 |
$infotext = $this->_formInfoText($args);
|
879 |
|
880 |
if (array_key_exists('dbfield', $args) && isset($infotext)) {
|
881 |
+
echo '<input name="plugin_wp_realtime_sitemap_settings[' . esc_attr( $args['dbfield'] ) . ']" size="30" type="text" value="' . esc_attr( $$args['dbfield'] ) . '" /><br />' . $infotext;
|
882 |
}
|
883 |
}
|
884 |
|
1567 |
if (($all_options['show_menu'] != 'No' && $all_options['show_menu'] != 'Off') && ($show == 'menu' || $show == 'all')) {
|
1568 |
$menu_header = (empty($menu_header)) ? __('Menu', 'wp-realtime-sitemap') : $menu_header;
|
1569 |
|
1570 |
+
$menu = '<div id="wp-realtime-sitemap-menu"><h3>' . esc_html( $menu_header ) . '</h3>';
|
1571 |
$menu .= '<ul>' . wp_nav_menu(array('menu' => $menu_id, 'container' => false, 'items_wrap' => '%3$s', 'echo' => '0')) . '</ul>';
|
1572 |
$menu .= '</div>';
|
1573 |
}
|
1576 |
if (($all_options['show_pages'] != 'No' && $all_options['show_pages'] != 'Off') && ($show == 'pages' || $show == 'all')) {
|
1577 |
$pages_header = (empty($pages_header)) ? __('Pages', 'wp-realtime-sitemap') : $pages_header;
|
1578 |
|
1579 |
+
$pages = '<div id="wp-realtime-sitemap-pages"><h3>' . esc_html( $pages_header ) . '</h3>';
|
1580 |
$pages .= '<ul>' . wp_list_pages(array('sort_column' => $page_sort_column, 'sort_order' => $page_sort_order, 'exclude' => $page_exclude, 'depth' => $page_depth, 'show_date' => $page_show_date, 'title_li' => '', 'echo' => '0')) . '</ul></div>';
|
1581 |
}
|
1582 |
|
1591 |
if (count($thecategories) > 0) {
|
1592 |
foreach($thecategories as $category) {
|
1593 |
|
1594 |
+
$posts .= '<li><a href="' . get_category_link($category->term_id) . '" title="' . esc_attr( $category->category_description ) . '">' . esc_html( $category->name ) . '</a><ul>';
|
1595 |
|
1596 |
// Set options for post query
|
1597 |
$theposts = get_posts(array(
|
1598 |
+
'numberposts' => $post_numberposts,
|
1599 |
+
'category' => $category->cat_ID,
|
1600 |
+
'orderby' => $post_orderby,
|
1601 |
+
'order' => $post_order,
|
1602 |
+
'exclude' => $post_exclude,
|
1603 |
+
'post_type' => 'post',
|
1604 |
+
'suppress_filters' => false
|
1605 |
));
|
1606 |
|
1607 |
if (count($theposts) > 0) {
|
1624 |
|
1625 |
$posts_header = (empty($posts_header)) ? __('Posts', 'wp-realtime-sitemap') : $posts_header;
|
1626 |
|
1627 |
+
$posts = '<div id="wp-realtime-sitemap-posts"><h3>' . esc_html( $posts_header ) . '</h3><ul>' . $posts . '</ul></div>';
|
1628 |
}
|
1629 |
|
1630 |
} else {
|
1631 |
// Set options for post query
|
1632 |
$theposts = get_posts(array(
|
1633 |
+
'numberposts' => $post_numberposts,
|
1634 |
+
'orderby' => $post_orderby,
|
1635 |
+
'order' => $post_order,
|
1636 |
+
'exclude' => $post_exclude,
|
1637 |
+
'post_type' => 'post',
|
1638 |
+
'suppress_filters' => false
|
1639 |
));
|
1640 |
|
1641 |
if (count($theposts) > 0) {
|
1654 |
|
1655 |
$posts_header = (empty($posts_header)) ? __('Posts', 'wp-realtime-sitemap') : $posts_header;
|
1656 |
|
1657 |
+
$posts = '<div id="wp-realtime-sitemap-posts"><h3>' . esc_html( $posts_header ) . '</h3><ul>' . $posts . '</ul></div>';
|
1658 |
}
|
1659 |
}
|
1660 |
}
|
1668 |
|
1669 |
// Set options for post query
|
1670 |
$theposts = get_posts(array(
|
1671 |
+
'numberposts' => $post_numberposts,
|
1672 |
+
'orderby' => $post_orderby,
|
1673 |
+
'order' => $post_order,
|
1674 |
+
'exclude' => $post_exclude,
|
1675 |
+
'post_type' => $post_type->name,
|
1676 |
+
'suppress_filters' => false
|
1677 |
));
|
1678 |
|
1679 |
if (count($theposts) > 0) {
|
1700 |
if (($all_options['show_archives'] != 'No' && $all_options['show_archives'] != 'Off') && ($show == 'archives' || $show == 'all')) {
|
1701 |
$archives_header = (empty($archives_header)) ? __('Archives', 'wp-realtime-sitemap') : $archives_header;
|
1702 |
|
1703 |
+
$archives = '<div id="wp-realtime-sitemap-archives"><h3>' . esc_html( $archives_header ) . '</h3>';
|
1704 |
$archives .= '<ul>' . wp_get_archives(array('type' => $archive_type, 'limit' => $archive_limit, 'show_post_count' => $archive_show_post_count, 'echo' => 0)) . '</ul></div>';
|
1705 |
}
|
1706 |
|
1708 |
if (($all_options['show_categories'] != 'No' && $all_options['show_categories'] != 'Off') && ($show == 'categories' || $show == 'all')) {
|
1709 |
$categories_header = (empty($categories_header)) ? __('Categories', 'wp-realtime-sitemap') : $categories_header;
|
1710 |
|
1711 |
+
$categories = '<div id="wp-realtime-sitemap-categories"><h3>' . esc_html( $categories_header ) . '</h3>';
|
1712 |
|
1713 |
// Tag Cloud: Yes/No?
|
1714 |
if ($all_options['category_tagcloud'] != 'No' && $all_options['category_tagcloud'] != 'Off') {
|
1724 |
if (($all_options['show_tags'] != 'No' && $all_options['show_tags'] != 'Off') && ($show == 'tags' || $show == 'all')) {
|
1725 |
$tags_header = (empty($tags_header)) ? __('Tags', 'wp-realtime-sitemap') : $tags_header;
|
1726 |
|
1727 |
+
$tags = '<div id="wp-realtime-sitemap-tags"><h3>' . esc_html( $tags_header ) . '</h3>';
|
1728 |
|
1729 |
// Tag Cloud: Yes/No?
|
1730 |
if ($all_options['tags_tagcloud'] != 'No' && $all_options['tags_tagcloud'] != 'Off') {
|
1869 |
echo '<div class="wprs-update-nag">' . sprintf(__('WP Realtime Sitemap was just updated... Please visit the %sPlugin Options Page%s and re-save your preferences.', 'wp-realtime-sitemap'), '<a href="options-general.php?page=wp-realtime-sitemap.php" style="color: #ca0c01">', '</a>') . '</div>';
|
1870 |
}
|
1871 |
|
1872 |
+
function WPRealtimeSitemapUninstallSettings() {
|
1873 |
global $wpdb, $wp_roles, $wp_version;
|
1874 |
|
1875 |
delete_option('plugin_wp_realtime_sitemap_settings');
|
1903 |
}
|
1904 |
|
1905 |
if( class_exists('WPRealtimeSitemap') )
|
1906 |
+
$wpRealtimeSitemap = new WPRealtimeSitemap();
|
|
|
|