Sitemap - Version 1.0.0

Version Description

  • Initial release;

=

Download this release

Release Info

Developer web-dev
Plugin Icon wp plugin Sitemap
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

Files changed (2) hide show
  1. readme.txt +29 -0
  2. sitemap.php +41 -0
readme.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Sitemap ===
2
+ Contributors: webvitaly
3
+ Donate link: http://web-profile.com.ua/wordpress/plugins/sitemap/
4
+ Plugin URI: http://web-profile.com.ua/wordpress/plugins/sitemap/
5
+ Tags: page, sitemap
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.0.0
10
+
11
+ "Sitemap" plugin helps you show sitemap of your site (tree of pages) with [sitemap] shortcode.
12
+
13
+ == Description ==
14
+
15
+ You can use aditional parameters: [sitemap depth="2" child_of="4" exclude="6,7,8"].
16
+
17
+ Plugin is based on [wp_list_pages('sort_column=menu_order&title_li=')](http://codex.wordpress.org/Template_Tags/wp_list_pages) WordPress function;
18
+
19
+ [WordPress stuff](http://web-profile.com.ua/wordpress/)
20
+
21
+ == Changelog ==
22
+
23
+ = 1.0.0 =
24
+ * Initial release;
25
+
26
+ == Installation ==
27
+
28
+ 1. Install plugin and activate it on the Plugins page;
29
+ 2. Add shortcode [sitemap] to page content;
sitemap.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Sitemap
4
+ Plugin URI: http://web-profile.com.ua/wordpress/plugins/sitemap/
5
+ Description: Show sitemap with [sitemap] shortcode.
6
+ Version: 1.0.0
7
+ Author: webvitaly
8
+ Author Email: webvitaly(at)gmail.com
9
+ Author URI: http://web-profile.com.ua/
10
+ */
11
+
12
+ function sitemap_shortcode( $atts ) {
13
+ extract( shortcode_atts( array(
14
+ 'depth' => '0',
15
+ 'child_of' => '0',
16
+ 'exclude' => '0'
17
+ ), $atts ) );
18
+
19
+ $return = '';
20
+ $list_pages_args = array(
21
+ 'depth' => $depth,
22
+ 'show_date' => '',
23
+ 'date_format' => get_option('date_format'),
24
+ 'child_of' => $child_of,
25
+ 'exclude' => $exclude,
26
+ 'include' => '',
27
+ 'title_li' => '',
28
+ 'echo' => 0,
29
+ 'authors' => '',
30
+ 'sort_column' => 'menu_order, post_title',
31
+ 'link_before' => '',
32
+ 'link_after' => '',
33
+ 'walker' => '' );
34
+
35
+ $list_pages = wp_list_pages( $list_pages_args );
36
+
37
+ $return = '<ul>'.$list_pages.'</ul>';
38
+
39
+ return $return;
40
+ }
41
+ add_shortcode( 'sitemap', 'sitemap_shortcode' );