Sitemap - Version 4.1

Version Description

  • 2013.01.27 =
  • change the type of output the image thumbnail in [pagelist_ext] shortcode
Download this release

Release Info

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

Code changes from version 4.0 to 4.1

Files changed (3) hide show
  1. css/page-list.css +3 -0
  2. readme.txt +15 -11
  3. sitemap.php +13 -8
css/page-list.css CHANGED
@@ -9,6 +9,9 @@ http://wordpress.org/extend/plugins/page-list/
9
  }
10
 
11
  /* default styles for [pagelist_ext] */
 
 
 
12
  .page-list-ext .page-list-ext-item {
13
  clear: both;
14
  margin: 10px 0 20px 0;
9
  }
10
 
11
  /* default styles for [pagelist_ext] */
12
+ .page-list-ext {
13
+ clear: both;
14
+ }
15
  .page-list-ext .page-list-ext-item {
16
  clear: both;
17
  margin: 10px 0 20px 0;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webvitaly
3
  Donate link: http://web-profile.com.ua/donate/
4
  Tags: page, page-list, pagelist, sitemap, subpages, siblings
5
  Requires at least: 3.0
6
- Tested up to: 3.5
7
- Stable tag: 4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,6 +14,9 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
15
  **Code moved to [page-list plugin](http://wordpress.org/extend/plugins/page-list/)** Please, delete Sitemap plugin and install [Pagelist plugin](http://wordpress.org/extend/plugins/page-list/). Don't be afraid, the functionality of these plugins is the same.
16
 
 
 
 
17
 
18
  = shortcodes: =
19
 
@@ -22,17 +25,15 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
22
  * **[siblings]** - hierarchical tree of sibling pages to the current page;
23
  * **[pagelist_ext]** - list of pages with featured image and with excerpt;
24
 
25
- = aditional parameters examples: =
26
 
27
- * `[pagelist depth="2" child_of="4" exclude="6,7,8"]`
28
  * `[pagelist_ext child_of="4" exclude="6,7,8" image_width="50" image_height="50"]`
29
  * **[all Page-list params](http://wordpress.org/extend/plugins/page-list/other_notes/)**
30
 
31
- **[Page-list support page](http://web-profile.com.ua/wordpress/plugins/page-list/)**
32
-
33
  = Useful plugins: =
34
- * ["Iframe" - embed iframe with shortcode](http://wordpress.org/extend/plugins/iframe/ "embed iframe")
35
  * ["Anti-spam" - block spam in comments](http://wordpress.org/extend/plugins/anti-spam/ "no spam, no captcha")
 
36
  * ["Filenames to latin" - sanitize filenames to latin during upload](http://wordpress.org/extend/plugins/filenames-to-latin/ "sanitize filenames to latin")
37
 
38
  == Other Notes ==
@@ -103,7 +104,7 @@ Shortcode [pagelist_ext] is based on [get_pages()](http://codex.wordpress.org/Fu
103
 
104
  = What is the difference between [pagelist], [subpages] and [siblings]? =
105
 
106
- Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The only difference is that [subpages] and [siblings] not accept `child_of` parameter, because [subpages] shows subpages to the current page and [siblings] shows subpages to the parent page.
107
 
108
  = How to create sitemap.xml? =
109
  To create sitemap.xml you can use [Google XML Sitemaps](http://wordpress.org/extend/plugins/google-sitemap-generator/) plugin.
@@ -115,7 +116,7 @@ No, there is no "more-link" feature in the plugin. Because "[more-link](http://w
115
  * **bad for usability.** There is already link on title and "more-link" is an extra no needed element on page. If user cannot understand that the title is the link, than there is a problem in css styles and not in plugin's templates.
116
 
117
  = What to do if you need to change the plugin's code? =
118
- When you changed the plugin's code you should also change the plugin's version to '100' to avoid updates, which could override and delete your code.
119
 
120
  == Screenshots ==
121
 
@@ -124,6 +125,9 @@ When you changed the plugin's code you should also change the plugin's version t
124
 
125
  == Changelog ==
126
 
 
 
 
127
  = 4.0 - 2012.10.30 =
128
  * remove conflict between Pagelist and Sitemap plugins
129
  * remove preg_match_all notice
@@ -220,5 +224,5 @@ When you changed the plugin's code you should also change the plugin's version t
220
 
221
  == Installation ==
222
 
223
- 1. Install and activate the plugin on the Plugins page
224
- 2. Add shortcodes to pages: `[pagelist]`, `[subpages]`, `[siblings]`, `[pagelist_ext]`
3
  Donate link: http://web-profile.com.ua/donate/
4
  Tags: page, page-list, pagelist, sitemap, subpages, siblings
5
  Requires at least: 3.0
6
+ Tested up to: 3.5.1
7
+ Stable tag: 4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  **Code moved to [page-list plugin](http://wordpress.org/extend/plugins/page-list/)** Please, delete Sitemap plugin and install [Pagelist plugin](http://wordpress.org/extend/plugins/page-list/). Don't be afraid, the functionality of these plugins is the same.
16
 
17
+ **[Page-list](http://web-profile.com.ua/wordpress/plugins/page-list/ "Plugin page")** |
18
+ **[all Page-list params](http://wordpress.org/extend/plugins/page-list/other_notes/)** |
19
+ **[Donate](http://web-profile.com.ua/donate/ "Support the development")**
20
 
21
  = shortcodes: =
22
 
25
  * **[siblings]** - hierarchical tree of sibling pages to the current page;
26
  * **[pagelist_ext]** - list of pages with featured image and with excerpt;
27
 
28
+ = examples with aditional parameters: =
29
 
30
+ * `[pagelist child_of="4" depth="2" exclude="6,7,8"]`
31
  * `[pagelist_ext child_of="4" exclude="6,7,8" image_width="50" image_height="50"]`
32
  * **[all Page-list params](http://wordpress.org/extend/plugins/page-list/other_notes/)**
33
 
 
 
34
  = Useful plugins: =
 
35
  * ["Anti-spam" - block spam in comments](http://wordpress.org/extend/plugins/anti-spam/ "no spam, no captcha")
36
+ * ["Iframe" - embed iframe with shortcode](http://wordpress.org/extend/plugins/iframe/ "embed iframe")
37
  * ["Filenames to latin" - sanitize filenames to latin during upload](http://wordpress.org/extend/plugins/filenames-to-latin/ "sanitize filenames to latin")
38
 
39
  == Other Notes ==
104
 
105
  = What is the difference between [pagelist], [subpages] and [siblings]? =
106
 
107
+ Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The only difference is that [subpages] and [siblings] not accept `child_of` parameter, because [subpages] shows subpages to the current page and [siblings] shows subpages to the parent page.
108
 
109
  = How to create sitemap.xml? =
110
  To create sitemap.xml you can use [Google XML Sitemaps](http://wordpress.org/extend/plugins/google-sitemap-generator/) plugin.
116
  * **bad for usability.** There is already link on title and "more-link" is an extra no needed element on page. If user cannot understand that the title is the link, than there is a problem in css styles and not in plugin's templates.
117
 
118
  = What to do if you need to change the plugin's code? =
119
+ When you changed the plugin's code you should also change the plugin's version to '100' (for example) to avoid updates, which could override and delete your code.
120
 
121
  == Screenshots ==
122
 
125
 
126
  == Changelog ==
127
 
128
+ = 4.1 - 2013.01.27 =
129
+ * change the type of output the image thumbnail in [pagelist_ext] shortcode
130
+
131
  = 4.0 - 2012.10.30 =
132
  * remove conflict between Pagelist and Sitemap plugins
133
  * remove preg_match_all notice
224
 
225
  == Installation ==
226
 
227
+ 1. install and activate the plugin on the Plugins page
228
+ 2. add shortcodes to pages: `[pagelist]`, `[subpages]`, `[siblings]`, `[pagelist_ext]`
sitemap.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Sitemap
4
  Plugin URI: http://wordpress.org/extend/plugins/page-list/
5
  Description: [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes
6
- Version: 4.0
7
  Author: webvitaly
8
  Author URI: http://profiles.wordpress.org/webvitaly/
9
  License: GPLv2 or later
@@ -11,13 +11,13 @@ License: GPLv2 or later
11
 
12
  if ( !function_exists('pagelist_unqprfx_add_stylesheet') ) {
13
  function pagelist_unqprfx_add_stylesheet() {
14
- wp_enqueue_style( 'page-list-style', plugins_url( '/css/page-list.css', __FILE__ ), false, '4.0', 'all' );
15
  }
16
  add_action('wp_print_styles', 'pagelist_unqprfx_add_stylesheet');
17
  }
18
 
19
 
20
- $pagelist_unqprfx_powered_line = "\n".'<!-- Page-list plugin v.4.0 wordpress.org/extend/plugins/page-list/ -->'."\n";
21
 
22
 
23
  if ( !function_exists('pagelist_unqprfx_shortcode') ) {
@@ -327,22 +327,27 @@ if ( !function_exists('pagelist_unqprfx_ext_shortcode') ) {
327
  $link = get_permalink( $page->ID );
328
  $list_pages_html .= '<div class="page-list-ext-item">';
329
  if( $show_image == 1 ){
330
- if (function_exists('get_the_post_thumbnail')) {
331
- if( get_the_post_thumbnail($page->ID) ){
332
  $list_pages_html .= '<div class="page-list-ext-image"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">';
333
- $list_pages_html .= get_the_post_thumbnail($page->ID, array($image_width,$image_height));
 
 
 
 
 
334
  $list_pages_html .= '</a></div> ';
335
  }else{
336
  if( $show_first_image == 1 ){
337
  $img_scr = pagelist_unqprfx_get_first_image( $page->post_content );
338
  if( !empty( $img_scr ) ){
339
  $list_pages_html .= '<div class="page-list-ext-image"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">';
340
- $list_pages_html .= '<img src="'.$img_scr.'" width="'.$image_width.'" />'; // not using height="'.$image_height.'" because images could be not square shaped and they will be stretched
341
  $list_pages_html .= '</a></div> ';
342
  }
343
  }
344
  }
345
- }else{
346
  if( $show_first_image == 1 ){
347
  $img_scr = pagelist_unqprfx_get_first_image( $page->post_content );
348
  if( !empty( $img_scr ) ){
3
  Plugin Name: Sitemap
4
  Plugin URI: http://wordpress.org/extend/plugins/page-list/
5
  Description: [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes
6
+ Version: 4.1
7
  Author: webvitaly
8
  Author URI: http://profiles.wordpress.org/webvitaly/
9
  License: GPLv2 or later
11
 
12
  if ( !function_exists('pagelist_unqprfx_add_stylesheet') ) {
13
  function pagelist_unqprfx_add_stylesheet() {
14
+ wp_enqueue_style( 'page-list-style', plugins_url( '/css/page-list.css', __FILE__ ), false, '4.1', 'all' );
15
  }
16
  add_action('wp_print_styles', 'pagelist_unqprfx_add_stylesheet');
17
  }
18
 
19
 
20
+ $pagelist_unqprfx_powered_line = "\n".'<!-- Page-list plugin v.4.1 wordpress.org/extend/plugins/page-list/ -->'."\n";
21
 
22
 
23
  if ( !function_exists('pagelist_unqprfx_shortcode') ) {
327
  $link = get_permalink( $page->ID );
328
  $list_pages_html .= '<div class="page-list-ext-item">';
329
  if( $show_image == 1 ){
330
+ if ( function_exists( 'get_the_post_thumbnail' ) ) { // if we have WordPress 2.9+
331
+ if( get_the_post_thumbnail( $page->ID ) ){ // if there is a featured image
332
  $list_pages_html .= '<div class="page-list-ext-image"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">';
333
+ //$list_pages_html .= get_the_post_thumbnail($page->ID, array($image_width,$image_height)); // doesn't work good with image size
334
+
335
+ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $page->ID ), array($image_width,$image_height) ); // get featured img; 'large'
336
+ $img_url = $image[0]; // get the src of the featured image
337
+ $list_pages_html .= '<img src="'.$img_url.'" width="'.$image_width.'" alt="'.esc_attr($page->post_title).'" />'; // not using height="'.$image_height.'" because images could be not square shaped and they will be stretched
338
+
339
  $list_pages_html .= '</a></div> ';
340
  }else{
341
  if( $show_first_image == 1 ){
342
  $img_scr = pagelist_unqprfx_get_first_image( $page->post_content );
343
  if( !empty( $img_scr ) ){
344
  $list_pages_html .= '<div class="page-list-ext-image"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">';
345
+ $list_pages_html .= '<img src="'.$img_scr.'" width="'.$image_width.'" alt="'.esc_attr($page->post_title).'" />'; // not using height="'.$image_height.'" because images could be not square shaped and they will be stretched
346
  $list_pages_html .= '</a></div> ';
347
  }
348
  }
349
  }
350
+ }else{ // if we have old WordPress 2.8 or lower
351
  if( $show_first_image == 1 ){
352
  $img_scr = pagelist_unqprfx_get_first_image( $page->post_content );
353
  if( !empty( $img_scr ) ){