Version Description
- Added exclude="current" parameter;
Download this release
Release Info
Developer | webvitaly |
Plugin | Sitemap |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.4
- readme.txt +8 -9
- sitemap.php +16 -6
readme.txt
CHANGED
@@ -4,10 +4,10 @@ Plugin URI: http://web-profile.com.ua/wordpress/plugins/page-list/
|
|
4 |
Tags: page, page-list, pagelist, sitemap, subpages
|
5 |
Author URI: http://web-profile.com.ua/wordpress/
|
6 |
Requires at least: 3.0
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 1.
|
9 |
|
10 |
-
"Sitemap" plugin helps you to show list of pages with [
|
11 |
|
12 |
== Description ==
|
13 |
|
@@ -23,7 +23,7 @@ Plugin is based on [wp_list_pages('title_li=')](http://codex.wordpress.org/Templ
|
|
23 |
|
24 |
[Sitemap plugin page](http://web-profile.com.ua/wordpress/plugins/page-list/)
|
25 |
|
26 |
-
[WordPress
|
27 |
|
28 |
== Other Notes ==
|
29 |
|
@@ -39,7 +39,7 @@ Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The
|
|
39 |
* if you want to show subpages of the specific page you can use this shortcode: `[pagelist child_of="4"]` where `4` is the ID of the specific page;
|
40 |
* if you want to show subpages of the current page you can use this shortcodes: `[subpages]` or `[pagelist child_of="current"]` or `[pagelist child_of="this"]`;
|
41 |
* if you want to show sibling pages of the current page you can use this shortcodes: `[siblings]` or `[pagelist child_of="parent"]`;
|
42 |
-
* if you want to exclude some pages from the list you can use this shortcode: `[pagelist exclude="6,7,8"]` where `exclude` parameter accepts comma-separated list of Page IDs;
|
43 |
* if you want to exclude the tree of pages from the list you can use this shortcode: `[pagelist exclude_tree="7,10"]` where `exclude_tree` parameter accepts comma-separated list of Page IDs (all this pages and their subpages will be excluded);
|
44 |
* if you want to include certain pages into the list of pages you can use this shortcode: `[pagelist include="6,7,8"]` where `include` parameter accepts comma-separated list of Page IDs;
|
45 |
* if you want to specify the title of the list of pages you can use this shortcode: `[pagelist title_li="<h2>List of pages</h2>"]`; by default there is no title (title_li="");
|
@@ -55,6 +55,9 @@ Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
58 |
= 1.3.0 =
|
59 |
* Added class to ul elements by default;
|
60 |
* Added "class" option (thanks to Arvind);
|
@@ -62,10 +65,6 @@ Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The
|
|
62 |
= 1.2.0 =
|
63 |
* Added [subpages] and [siblings] shortcodes;
|
64 |
|
65 |
-
= 1.1.0 =
|
66 |
-
* Added "child_of=current" option;
|
67 |
-
* Improving documentation;
|
68 |
-
|
69 |
= 1.0.0 =
|
70 |
* Initial release;
|
71 |
|
4 |
Tags: page, page-list, pagelist, sitemap, subpages
|
5 |
Author URI: http://web-profile.com.ua/wordpress/
|
6 |
Requires at least: 3.0
|
7 |
+
Tested up to: 3.3
|
8 |
+
Stable tag: 1.4
|
9 |
|
10 |
+
"Sitemap" plugin helps you to show list of pages with [pagelist], [subpages] and [siblings] shortcodes.
|
11 |
|
12 |
== Description ==
|
13 |
|
23 |
|
24 |
[Sitemap plugin page](http://web-profile.com.ua/wordpress/plugins/page-list/)
|
25 |
|
26 |
+
[CMS WordPress](http://web-profile.com.ua/wordpress/)
|
27 |
|
28 |
== Other Notes ==
|
29 |
|
39 |
* if you want to show subpages of the specific page you can use this shortcode: `[pagelist child_of="4"]` where `4` is the ID of the specific page;
|
40 |
* if you want to show subpages of the current page you can use this shortcodes: `[subpages]` or `[pagelist child_of="current"]` or `[pagelist child_of="this"]`;
|
41 |
* if you want to show sibling pages of the current page you can use this shortcodes: `[siblings]` or `[pagelist child_of="parent"]`;
|
42 |
+
* if you want to exclude some pages from the list you can use this shortcode: `[pagelist exclude="6,7,8"]` where `exclude` parameter accepts comma-separated list of Page IDs; You may exclude current page with this shortcode: `[pagelist exclude="current"]`;
|
43 |
* if you want to exclude the tree of pages from the list you can use this shortcode: `[pagelist exclude_tree="7,10"]` where `exclude_tree` parameter accepts comma-separated list of Page IDs (all this pages and their subpages will be excluded);
|
44 |
* if you want to include certain pages into the list of pages you can use this shortcode: `[pagelist include="6,7,8"]` where `include` parameter accepts comma-separated list of Page IDs;
|
45 |
* if you want to specify the title of the list of pages you can use this shortcode: `[pagelist title_li="<h2>List of pages</h2>"]`; by default there is no title (title_li="");
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 1.4 =
|
59 |
+
* Added exclude="current" parameter;
|
60 |
+
|
61 |
= 1.3.0 =
|
62 |
* Added class to ul elements by default;
|
63 |
* Added "class" option (thanks to Arvind);
|
65 |
= 1.2.0 =
|
66 |
* Added [subpages] and [siblings] shortcodes;
|
67 |
|
|
|
|
|
|
|
|
|
68 |
= 1.0.0 =
|
69 |
* Initial release;
|
70 |
|
sitemap.php
CHANGED
@@ -3,16 +3,16 @@
|
|
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] and [siblings] shortcodes.
|
6 |
-
Version: 1.
|
7 |
Author: webvitaly
|
8 |
Author Email: webvitaly(at)gmail.com
|
9 |
-
Author URI: http://web-profile.com.ua/
|
10 |
|
11 |
Future features:
|
|
|
12 |
- exclude_by_alias;
|
13 |
- exclude_front_page;
|
14 |
- exclude_post_page;
|
15 |
-
- [parents];
|
16 |
*/
|
17 |
|
18 |
if ( !function_exists('pagelist_shortcode') ) {
|
@@ -44,6 +44,9 @@ if ( !function_exists('pagelist_shortcode') ) {
|
|
44 |
if( $child_of == 'parent' ){
|
45 |
$child_of = $post->post_parent;
|
46 |
}
|
|
|
|
|
|
|
47 |
|
48 |
$page_list_args = array(
|
49 |
'depth' => $depth,
|
@@ -69,7 +72,8 @@ if ( !function_exists('pagelist_shortcode') ) {
|
|
69 |
$list_pages = wp_list_pages( $page_list_args );
|
70 |
|
71 |
if ($list_pages) {
|
72 |
-
$return = '
|
|
|
73 |
}else{
|
74 |
$return = '';
|
75 |
}
|
@@ -127,7 +131,8 @@ if ( !function_exists('subpages_shortcode') ) {
|
|
127 |
$list_pages = wp_list_pages( $page_list_args );
|
128 |
|
129 |
if ($list_pages) {
|
130 |
-
$return = '
|
|
|
131 |
}else{
|
132 |
$return = '';
|
133 |
}
|
@@ -161,6 +166,10 @@ if ( !function_exists('siblings_shortcode') ) {
|
|
161 |
'class' => ''
|
162 |
), $atts ) );
|
163 |
|
|
|
|
|
|
|
|
|
164 |
$page_list_args = array(
|
165 |
'depth' => $depth,
|
166 |
'child_of' => $post->post_parent,
|
@@ -185,7 +194,8 @@ if ( !function_exists('siblings_shortcode') ) {
|
|
185 |
$list_pages = wp_list_pages( $page_list_args );
|
186 |
|
187 |
if ($list_pages) {
|
188 |
-
$return = '
|
|
|
189 |
}else{
|
190 |
$return = '';
|
191 |
}
|
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] and [siblings] shortcodes.
|
6 |
+
Version: 1.4
|
7 |
Author: webvitaly
|
8 |
Author Email: webvitaly(at)gmail.com
|
9 |
+
Author URI: http://web-profile.com.ua/wordpress/
|
10 |
|
11 |
Future features:
|
12 |
+
- add support exclude="current,5";
|
13 |
- exclude_by_alias;
|
14 |
- exclude_front_page;
|
15 |
- exclude_post_page;
|
|
|
16 |
*/
|
17 |
|
18 |
if ( !function_exists('pagelist_shortcode') ) {
|
44 |
if( $child_of == 'parent' ){
|
45 |
$child_of = $post->post_parent;
|
46 |
}
|
47 |
+
if( $exclude == 'current' || $exclude == 'this' ){
|
48 |
+
$exclude = $post->ID;
|
49 |
+
}
|
50 |
|
51 |
$page_list_args = array(
|
52 |
'depth' => $depth,
|
72 |
$list_pages = wp_list_pages( $page_list_args );
|
73 |
|
74 |
if ($list_pages) {
|
75 |
+
$return = "\n".'<!-- powered by Page-list plugin ver. 1.4 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
76 |
+
$return .= '<ul class="page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
77 |
}else{
|
78 |
$return = '';
|
79 |
}
|
131 |
$list_pages = wp_list_pages( $page_list_args );
|
132 |
|
133 |
if ($list_pages) {
|
134 |
+
$return = "\n".'<!-- powered by Page-list plugin ver. 1.4 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
135 |
+
$return .= '<ul class="page-list subpages-page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
136 |
}else{
|
137 |
$return = '';
|
138 |
}
|
166 |
'class' => ''
|
167 |
), $atts ) );
|
168 |
|
169 |
+
if( $exclude == 'current' || $exclude == 'this' ){
|
170 |
+
$exclude = $post->ID;
|
171 |
+
}
|
172 |
+
|
173 |
$page_list_args = array(
|
174 |
'depth' => $depth,
|
175 |
'child_of' => $post->post_parent,
|
194 |
$list_pages = wp_list_pages( $page_list_args );
|
195 |
|
196 |
if ($list_pages) {
|
197 |
+
$return = "\n".'<!-- powered by Page-list plugin ver. 1.4 (wordpress.org/extend/plugins/page-list/) -->'."\n";
|
198 |
+
$return .= '<ul class="page-list siblings-page-list '.$class.'">'."\n".$list_pages."\n".'</ul>';
|
199 |
}else{
|
200 |
$return = '';
|
201 |
}
|