Sitemap - Version 2.7

Version Description

  • make excerpt link if there is no title;
Download this release

Release Info

Developer webvitaly
Plugin Icon wp plugin Sitemap
Version 2.7
Comparing to
See all releases

Code changes from version 2.6 to 2.7

Files changed (2) hide show
  1. readme.txt +23 -20
  2. sitemap.php +11 -7
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.6
9
 
10
  "Sitemap" plugin helps you to show list of pages with [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes.
11
 
@@ -86,56 +86,59 @@ You can use aditional parameters: **`[pagelist_ext child_of="4" exclude="6,7,8"
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
 
95
  = 2.4 =
96
- * Escaping attributes in title in [pagelist_ext];
97
 
98
  = 2.3 =
99
- * Fixed [pagelist_ext] with showing excerpt of the page if it is not empty, else showing content;
100
 
101
  = 2.2 =
102
- * Fixed offset parameter;
103
 
104
  = 2.1 =
105
- * Fixed number parameter;
106
 
107
  = 2.0 =
108
- * Fixed crash bug with [pagelist_ext] if theme does not have thumbnail feature;
109
 
110
  = 1.9 =
111
- * Added show_child_count parameter;
112
- * Added show_meta_key parameter;
113
 
114
  = 1.8 =
115
- * Added screenshots;
116
- * Improved parameter parsing;
117
 
118
  = 1.7 =
119
- * Added strip_tags parameter;
120
 
121
  = 1.6 =
122
- * Improved [pagelist_ext] shortcode: added content to list, added toggle show and limit content parameters;
123
 
124
  = 1.5 =
125
- * Added [pagelist_ext] shortcode - list of pages with featured image;
126
 
127
  = 1.4 =
128
- * Added exclude="current" parameter;
129
 
130
  = 1.3.0 =
131
- * Added class to ul elements by default;
132
- * Added "class" option (thanks to Arvind);
133
 
134
  = 1.2.0 =
135
- * Added [subpages] and [siblings] shortcodes;
136
 
137
  = 1.0.0 =
138
- * Initial release;
139
 
140
  == Installation ==
141
 
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.7
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.7 =
90
+ * make excerpt link if there is no title;
91
+
92
  = 2.6 =
93
+ * fixed [pagelist_ext] "parent" parameter;
94
 
95
  = 2.5 =
96
+ * adding spaces between lines when tags are stripped in [pagelist_ext];
97
 
98
  = 2.4 =
99
+ * escaping attributes in title in [pagelist_ext];
100
 
101
  = 2.3 =
102
+ * fixed [pagelist_ext] with showing excerpt of the page if it is not empty, else showing content;
103
 
104
  = 2.2 =
105
+ * fixed offset parameter;
106
 
107
  = 2.1 =
108
+ * fixed number parameter;
109
 
110
  = 2.0 =
111
+ * fixed crash bug with [pagelist_ext] if theme does not have thumbnail feature;
112
 
113
  = 1.9 =
114
+ * added show_child_count parameter;
115
+ * added show_meta_key parameter;
116
 
117
  = 1.8 =
118
+ * added screenshots;
119
+ * improved parameter parsing;
120
 
121
  = 1.7 =
122
+ * added strip_tags parameter;
123
 
124
  = 1.6 =
125
+ * improved [pagelist_ext] shortcode: added content to list, added toggle show and limit content parameters;
126
 
127
  = 1.5 =
128
+ * added [pagelist_ext] shortcode - list of pages with featured image;
129
 
130
  = 1.4 =
131
+ * added exclude="current" parameter;
132
 
133
  = 1.3.0 =
134
+ * added class to ul elements by default;
135
+ * added "class" option (thanks to Arvind);
136
 
137
  = 1.2.0 =
138
+ * added [subpages] and [siblings] shortcodes;
139
 
140
  = 1.0.0 =
141
+ * initial release;
142
 
143
  == Installation ==
144
 
sitemap.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
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,7 +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.6', 'all' );
20
  }
21
 
22
  if ( !function_exists('pagelist_shortcode') ) {
@@ -66,7 +66,7 @@ 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,7 +126,7 @@ if ( !function_exists('subpages_shortcode') ) {
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,7 +190,7 @@ if ( !function_exists('siblings_shortcode') ) {
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 = '';
@@ -302,7 +302,11 @@ if ( !function_exists('pagelist_ext_shortcode') ) {
302
  $text_content = $page->post_content;
303
  }
304
  $content = page_list_parse_content( $text_content, $limit_content, $strip_tags );
 
 
 
305
  $list_pages_html .= '<div class="page-list-ext-item-content">'.$content.'</div>';
 
306
  }
307
  if( $show_child_count == 1 ){
308
  $count_subpages = count(get_pages("child_of=".$page->ID));
@@ -335,7 +339,7 @@ if ( !function_exists('pagelist_ext_shortcode') ) {
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 = '';
1
  <?php
2
  /*
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], [siblings] and [pagelist_ext] shortcodes.
6
+ Version: 2.7
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.7', '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.7 (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.7 (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.7 (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 = '';
302
  $text_content = $page->post_content;
303
  }
304
  $content = page_list_parse_content( $text_content, $limit_content, $strip_tags );
305
+ if( $show_title == 0 ){ // make excerpt link if there is no title
306
+ $content = '<a href="'.$link.'">'.$content.'</a>';
307
+ }
308
  $list_pages_html .= '<div class="page-list-ext-item-content">'.$content.'</div>';
309
+
310
  }
311
  if( $show_child_count == 1 ){
312
  $count_subpages = count(get_pages("child_of=".$page->ID));
339
  }
340
  }
341
  if ($list_pages_html) {
342
+ $return = "\n".'<!-- powered by Page-list plugin ver.2.7 (wordpress.org/extend/plugins/page-list/) -->'."\n";
343
  $return .= '<div class="page-list page-list-ext '.$class.'">'."\n".$list_pages_html."\n".'</div>';
344
  }else{
345
  $return = '';