Page-list - Version 1.3.0

Version Description

  • Added class to ul elements by default;
  • Added "class" option (thanks to Arvind);
Download this release

Release Info

Developer webvitaly
Plugin Icon wp plugin Page-list
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.0 to 1.3.0

Files changed (2) hide show
  1. page-list.php +9 -4
  2. readme.txt +12 -8
page-list.php CHANGED
@@ -3,13 +3,15 @@
3
  Plugin Name: Page-list
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.2.0
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
  - [parents];
14
  */
15
 
@@ -33,6 +35,7 @@ if ( !function_exists('pagelist_shortcode') ) {
33
  'sort_order' => 'ASC',
34
  'link_before' => '',
35
  'link_after' => '',
 
36
  ), $atts ) );
37
 
38
  if( $child_of == 'current' || $child_of == 'this' ){
@@ -66,7 +69,7 @@ if ( !function_exists('pagelist_shortcode') ) {
66
  $list_pages = wp_list_pages( $page_list_args );
67
 
68
  if ($list_pages) {
69
- $return = '<ul>'.$list_pages.'</ul>';
70
  }else{
71
  $return = '';
72
  }
@@ -97,6 +100,7 @@ if ( !function_exists('subpages_shortcode') ) {
97
  'sort_order' => 'ASC',
98
  'link_before' => '',
99
  'link_after' => '',
 
100
  ), $atts ) );
101
 
102
  $page_list_args = array(
@@ -123,7 +127,7 @@ if ( !function_exists('subpages_shortcode') ) {
123
  $list_pages = wp_list_pages( $page_list_args );
124
 
125
  if ($list_pages) {
126
- $return = '<ul>'.$list_pages.'</ul>';
127
  }else{
128
  $return = '';
129
  }
@@ -154,6 +158,7 @@ if ( !function_exists('siblings_shortcode') ) {
154
  'sort_order' => 'ASC',
155
  'link_before' => '',
156
  'link_after' => '',
 
157
  ), $atts ) );
158
 
159
  $page_list_args = array(
@@ -180,7 +185,7 @@ if ( !function_exists('siblings_shortcode') ) {
180
  $list_pages = wp_list_pages( $page_list_args );
181
 
182
  if ($list_pages) {
183
- $return = '<ul>'.$list_pages.'</ul>';
184
  }else{
185
  $return = '';
186
  }
3
  Plugin Name: Page-list
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.3.0
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
 
35
  'sort_order' => 'ASC',
36
  'link_before' => '',
37
  'link_after' => '',
38
+ 'class' => ''
39
  ), $atts ) );
40
 
41
  if( $child_of == 'current' || $child_of == 'this' ){
69
  $list_pages = wp_list_pages( $page_list_args );
70
 
71
  if ($list_pages) {
72
+ $return = '<ul class="page-list '.$class.'">'.$list_pages.'</ul>';
73
  }else{
74
  $return = '';
75
  }
100
  'sort_order' => 'ASC',
101
  'link_before' => '',
102
  'link_after' => '',
103
+ 'class' => ''
104
  ), $atts ) );
105
 
106
  $page_list_args = array(
127
  $list_pages = wp_list_pages( $page_list_args );
128
 
129
  if ($list_pages) {
130
+ $return = '<ul class="page-list subpages-page-list '.$class.'">'.$list_pages.'</ul>';
131
  }else{
132
  $return = '';
133
  }
158
  'sort_order' => 'ASC',
159
  'link_before' => '',
160
  'link_after' => '',
161
+ 'class' => ''
162
  ), $atts ) );
163
 
164
  $page_list_args = array(
185
  $list_pages = wp_list_pages( $page_list_args );
186
 
187
  if ($list_pages) {
188
+ $return = '<ul class="page-list siblings-page-list '.$class.'">'.$list_pages.'</ul>';
189
  }else{
190
  $return = '';
191
  }
readme.txt CHANGED
@@ -1,18 +1,17 @@
1
  === Page-list ===
2
  Contributors: webvitaly
3
- Donate link: http://web-profile.com.ua/wordpress/plugins/page-list/
4
  Plugin URI: http://web-profile.com.ua/wordpress/plugins/page-list/
5
- Tags: page, page-list, pagelist
6
  Author URI: http://web-profile.com.ua/wordpress/
7
  Requires at least: 3.0
8
- Tested up to: 3.1.1
9
- Stable tag: 1.2.0
10
 
11
  "Page-list" plugin helps you to show list of pages with [pagelist], [subpages] and [siblings] shortcodes.
12
 
13
  == Description ==
14
 
15
- You can use aditional parameters: **`[pagelist depth="2" child_of="4" exclude="6,7,8"]`**.
16
 
17
  Plugin is based on [wp_list_pages('title_li=')](http://codex.wordpress.org/Template_Tags/wp_list_pages) function;
18
  = Examples: =
@@ -20,6 +19,8 @@ Plugin is based on [wp_list_pages('title_li=')](http://codex.wordpress.org/Templ
20
  * show hierarchical tree of subpages: `[subpages]`;
21
  * show hierarchical tree of sibling pages: `[siblings]`;
22
 
 
 
23
  [WordPress stuff](http://web-profile.com.ua/wordpress/)
24
 
25
  == Other Notes ==
@@ -48,10 +49,14 @@ Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The
48
  * if you want to change the sort order of the list of pages (either ascending or descending) you can use this shortcode: `[pagelist sort_order="desc"]`; by default sort_order is `asc` (sort_order="asc"); you can use this values for `sort_order` parameter: asc, desc;
49
  * if you want to specify the text or html that precedes the link text inside the link tag you can use this shortcode: `[pagelist link_before="<span>"]`; you may specify html tags only in the `HTML` tab in your Rich-text editor;
50
  * if you want to specify the text or html that follows the link text inside the link tag you can use this shortcode: `[pagelist link_after="</span>"]`; you may specify html tags only in the `HTML` tab in your Rich-text editor;
51
-
52
 
53
  == Changelog ==
54
 
 
 
 
 
55
  = 1.2.0 =
56
  * Added [subpages] and [siblings] shortcodes;
57
 
@@ -61,5 +66,4 @@ Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The
61
  == Installation ==
62
 
63
  1. Install plugin and activate it on the Plugins page;
64
- 2. Add shortcode **`[pagelist]`**, **`[subpages]`** or **`[siblings]`** to page content;
65
-
1
  === Page-list ===
2
  Contributors: webvitaly
 
3
  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.2
8
+ Stable tag: 1.3.0
9
 
10
  "Page-list" plugin helps you to show list of pages with [pagelist], [subpages] and [siblings] shortcodes.
11
 
12
  == Description ==
13
 
14
+ You can use aditional parameters: `[pagelist depth="2" child_of="4" exclude="6,7,8"]`.
15
 
16
  Plugin is based on [wp_list_pages('title_li=')](http://codex.wordpress.org/Template_Tags/wp_list_pages) function;
17
  = Examples: =
19
  * show hierarchical tree of subpages: `[subpages]`;
20
  * show hierarchical tree of sibling pages: `[siblings]`;
21
 
22
+ [Page-list plugin page](http://web-profile.com.ua/wordpress/plugins/page-list/)
23
+
24
  [WordPress stuff](http://web-profile.com.ua/wordpress/)
25
 
26
  == Other Notes ==
49
  * if you want to change the sort order of the list of pages (either ascending or descending) you can use this shortcode: `[pagelist sort_order="desc"]`; by default sort_order is `asc` (sort_order="asc"); you can use this values for `sort_order` parameter: asc, desc;
50
  * if you want to specify the text or html that precedes the link text inside the link tag you can use this shortcode: `[pagelist link_before="<span>"]`; you may specify html tags only in the `HTML` tab in your Rich-text editor;
51
  * if you want to specify the text or html that follows the link text inside the link tag you can use this shortcode: `[pagelist link_after="</span>"]`; you may specify html tags only in the `HTML` tab in your Rich-text editor;
52
+ * if you want to specify the CSS class for list of pages you can use this shortcode: `[pagelist class="listclass"]`; by default the class is empty (class="");
53
 
54
  == Changelog ==
55
 
56
+ = 1.3.0 =
57
+ * Added class to ul elements by default;
58
+ * Added "class" option (thanks to Arvind);
59
+
60
  = 1.2.0 =
61
  * Added [subpages] and [siblings] shortcodes;
62
 
66
  == Installation ==
67
 
68
  1. Install plugin and activate it on the Plugins page;
69
+ 2. Add shortcode `[pagelist]`, `[subpages]` or `[siblings]` to page content;