Version Description
- Fixed [pagelist_ext] "parent" parameter;
Download this release
Release Info
Developer | webvitaly |
Plugin | Sitemap |
Version | 2.6 |
Comparing to | |
See all releases |
Code changes from version 2.5 to 2.6
- readme.txt +4 -1
- sitemap.php +18 -19
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: page, page-list, pagelist, sitemap, subpages, siblings
|
|
5 |
Author URI: http://web-profile.com.ua/wordpress/
|
6 |
Requires at least: 3.0
|
7 |
Tested up to: 3.3
|
8 |
-
Stable tag: 2.
|
9 |
|
10 |
"Sitemap" plugin helps you to show list of pages with [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes.
|
11 |
|
@@ -86,6 +86,9 @@ You can use aditional parameters: **`[pagelist_ext child_of="4" exclude="6,7,8"
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
89 |
= 2.5 =
|
90 |
* Adding spaces between lines when tags are stripped in [pagelist_ext];
|
91 |
|
5 |
Author URI: http://web-profile.com.ua/wordpress/
|
6 |
Requires at least: 3.0
|
7 |
Tested up to: 3.3
|
8 |
+
Stable tag: 2.6
|
9 |
|
10 |
"Sitemap" plugin helps you to show list of pages with [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes.
|
11 |
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 2.6 =
|
90 |
+
* Fixed [pagelist_ext] "parent" parameter;
|
91 |
+
|
92 |
= 2.5 =
|
93 |
* Adding spaces between lines when tags are stripped in [pagelist_ext];
|
94 |
|
sitemap.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Sitemap
|
4 |
Plugin URI: http://web-profile.com.ua/wordpress/plugins/page-list/
|
5 |
Description: Show list of pages with [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes.
|
6 |
-
Version: 2.
|
7 |
Author: webvitaly
|
8 |
Author Email: webvitaly(at)gmail.com
|
9 |
Author URI: http://web-profile.com.ua/wordpress/
|
@@ -16,19 +16,7 @@ Future features:
|
|
16 |
|
17 |
add_action('wp_print_styles', 'page_list_add_stylesheet');
|
18 |
function page_list_add_stylesheet() {
|
19 |
-
wp_enqueue_style( 'page-list-style', plugins_url( '/css/page-list.css', __FILE__ ), false, '2.
|
20 |
-
}
|
21 |
-
|
22 |
-
if ( !function_exists('pagelist_norm_params') ) {
|
23 |
-
function pagelist_norm_params( $str ) {
|
24 |
-
global $post;
|
25 |
-
$new_str = $str;
|
26 |
-
$new_str = str_replace('this', $post->ID, $new_str); // exclude this page
|
27 |
-
$new_str = str_replace('current', $post->ID, $new_str); // exclude current page
|
28 |
-
$new_str = str_replace('curent', $post->ID, $new_str); // exclude curent page with mistake
|
29 |
-
$new_str = str_replace('parent', $post->post_parent, $new_str); // exclude parent page
|
30 |
-
return $new_str;
|
31 |
-
}
|
32 |
}
|
33 |
|
34 |
if ( !function_exists('pagelist_shortcode') ) {
|
@@ -78,7 +66,7 @@ if ( !function_exists('pagelist_shortcode') ) {
|
|
78 |
$list_pages = wp_list_pages( $page_list_args );
|
79 |
|
80 |
if ($list_pages) {
|
81 |
-
$return = "\n".'<!-- powered by Page-list plugin ver.2.
|
82 |
$return .= '<ul class="page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
83 |
}else{
|
84 |
$return = '';
|
@@ -138,7 +126,7 @@ if ( !function_exists('subpages_shortcode') ) {
|
|
138 |
$list_pages = wp_list_pages( $page_list_args );
|
139 |
|
140 |
if ($list_pages) {
|
141 |
-
$return = "\n".'<!-- powered by Page-list plugin ver.2.
|
142 |
$return .= '<ul class="page-list subpages-page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
143 |
}else{
|
144 |
$return = '';
|
@@ -202,7 +190,7 @@ if ( !function_exists('siblings_shortcode') ) {
|
|
202 |
$list_pages = wp_list_pages( $page_list_args );
|
203 |
|
204 |
if ($list_pages) {
|
205 |
-
$return = "\n".'<!-- powered by Page-list plugin ver.2.
|
206 |
$return .= '<ul class="page-list siblings-page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
207 |
}else{
|
208 |
$return = '';
|
@@ -266,7 +254,7 @@ if ( !function_exists('pagelist_ext_shortcode') ) {
|
|
266 |
'meta_key' => $meta_key,
|
267 |
'meta_value' => $meta_value,
|
268 |
'authors' => $authors,
|
269 |
-
'parent' => $parent,
|
270 |
'exclude_tree' => $exclude_tree,
|
271 |
'number' => '', // $number - own counter
|
272 |
'offset' => 0, // $offset - own offset
|
@@ -347,7 +335,7 @@ if ( !function_exists('pagelist_ext_shortcode') ) {
|
|
347 |
}
|
348 |
}
|
349 |
if ($list_pages_html) {
|
350 |
-
$return = "\n".'<!-- powered by Page-list plugin ver.2.
|
351 |
$return .= '<div class="page-list page-list-ext '.$class.'">'."\n".$list_pages_html."\n".'</div>';
|
352 |
}else{
|
353 |
$return = '';
|
@@ -357,6 +345,17 @@ if ( !function_exists('pagelist_ext_shortcode') ) {
|
|
357 |
add_shortcode( 'pagelist_ext', 'pagelist_ext_shortcode' );
|
358 |
}
|
359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
|
361 |
if ( !function_exists('page_list_parse_content') ) {
|
362 |
function page_list_parse_content($content, $limit_content = 250, $strip_tags = 1) {
|
3 |
Plugin Name: Sitemap
|
4 |
Plugin URI: http://web-profile.com.ua/wordpress/plugins/page-list/
|
5 |
Description: Show list of pages with [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes.
|
6 |
+
Version: 2.6
|
7 |
Author: webvitaly
|
8 |
Author Email: webvitaly(at)gmail.com
|
9 |
Author URI: http://web-profile.com.ua/wordpress/
|
16 |
|
17 |
add_action('wp_print_styles', 'page_list_add_stylesheet');
|
18 |
function page_list_add_stylesheet() {
|
19 |
+
wp_enqueue_style( 'page-list-style', plugins_url( '/css/page-list.css', __FILE__ ), false, '2.6', 'all' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
|
22 |
if ( !function_exists('pagelist_shortcode') ) {
|
66 |
$list_pages = wp_list_pages( $page_list_args );
|
67 |
|
68 |
if ($list_pages) {
|
69 |
+
$return = "\n".'<!-- powered by Page-list plugin ver.2.6 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
70 |
$return .= '<ul class="page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
71 |
}else{
|
72 |
$return = '';
|
126 |
$list_pages = wp_list_pages( $page_list_args );
|
127 |
|
128 |
if ($list_pages) {
|
129 |
+
$return = "\n".'<!-- powered by Page-list plugin ver.2.6 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
130 |
$return .= '<ul class="page-list subpages-page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
131 |
}else{
|
132 |
$return = '';
|
190 |
$list_pages = wp_list_pages( $page_list_args );
|
191 |
|
192 |
if ($list_pages) {
|
193 |
+
$return = "\n".'<!-- powered by Page-list plugin ver.2.6 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
194 |
$return .= '<ul class="page-list siblings-page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
195 |
}else{
|
196 |
$return = '';
|
254 |
'meta_key' => $meta_key,
|
255 |
'meta_value' => $meta_value,
|
256 |
'authors' => $authors,
|
257 |
+
'parent' => pagelist_norm_params($parent),
|
258 |
'exclude_tree' => $exclude_tree,
|
259 |
'number' => '', // $number - own counter
|
260 |
'offset' => 0, // $offset - own offset
|
335 |
}
|
336 |
}
|
337 |
if ($list_pages_html) {
|
338 |
+
$return = "\n".'<!-- powered by Page-list plugin ver.2.6 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
339 |
$return .= '<div class="page-list page-list-ext '.$class.'">'."\n".$list_pages_html."\n".'</div>';
|
340 |
}else{
|
341 |
$return = '';
|
345 |
add_shortcode( 'pagelist_ext', 'pagelist_ext_shortcode' );
|
346 |
}
|
347 |
|
348 |
+
if ( !function_exists('pagelist_norm_params') ) {
|
349 |
+
function pagelist_norm_params( $str ) {
|
350 |
+
global $post;
|
351 |
+
$new_str = $str;
|
352 |
+
$new_str = str_replace('this', $post->ID, $new_str); // exclude this page
|
353 |
+
$new_str = str_replace('current', $post->ID, $new_str); // exclude current page
|
354 |
+
$new_str = str_replace('curent', $post->ID, $new_str); // exclude curent page with mistake
|
355 |
+
$new_str = str_replace('parent', $post->post_parent, $new_str); // exclude parent page
|
356 |
+
return $new_str;
|
357 |
+
}
|
358 |
+
}
|
359 |
|
360 |
if ( !function_exists('page_list_parse_content') ) {
|
361 |
function page_list_parse_content($content, $limit_content = 250, $strip_tags = 1) {
|