Changeset 436897
- Timestamp:
- 09/12/2011 04:26:42 PM (15 years ago)
- Location:
- auto-url/trunk
- Files:
-
- 4 edited
-
auto-url-data.php (modified) (1 diff)
-
auto-url.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
templates/pattern.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
auto-url/trunk/auto-url-data.php
r435918 r436897 3 3 $removeTokens = array( 4 4 '%categories%', 5 '%categorypath%', 5 6 '%tags%', 6 7 ); -
auto-url/trunk/auto-url.php
r435950 r436897 5 5 Plugin URI: http://www.bunchacode.com/programming/auto-url 6 6 Description: generates customized permalinks according to post types, categories and tags 7 Version: 0. 67 Version: 0.7 8 8 Author: Jiong Ye 9 9 Author URI: http://www.bunchacode.com … … 322 322 } 323 323 break; 324 case '%categorypath%': 325 if ($p->post_type == 'post') { 326 $cats = wp_get_post_categories($p->ID); 327 $catName = ''; 328 329 if (count($cats) > 0) { 330 $c = get_category($cats[0]); 331 $catName = $c->slug; 332 333 while (!empty($c->parent)) { 334 $c = get_category($c->parent); 335 $catName = $c->slug . '/' . $catName; 336 } 337 return $catName; 338 } 339 } 340 break; 341 case '%blogname%': 342 return auto_url_generate_slug(get_option('blogname')); 343 break; 324 344 case '%tag%': 325 345 if ($p->post_type == 'post') { -
auto-url/trunk/readme.txt
r435950 r436897 4 4 Requires at least: 3.1 5 5 Tested up to: 3.2.1 6 Stable tag: 0. 66 Stable tag: 0.7 7 7 8 8 Auto URL generates customized permalinks according to post types, categories and tags … … 10 10 == Description == 11 11 12 Auto URL generates customized permalinks according to post types, categories and tags 12 Auto URL generates customized permalinks according to post types, categories and tags. 13 You can generate your own customized url for posts and pages by using different tokens. 14 Your posts and pages will still be accessible via your old permalinks. 13 15 14 16 WP 3.1 and up only. Beta version. Appreciate any feedback. … … 18 20 Tested On: Firefox 5, Chrome 13, IE 7 and IE 8 19 21 22 -Available Tokens- 23 24 %id% 25 The unique ID # of the post, for example 423 26 27 %name% 28 A sanitized version of the title of the post. 29 30 %namepath% 31 A sanitized version of the full title path of a page. Similar to %name% but shows the it's 32 title path which includes title of it's parent. Only available to pages. 33 34 %category% 35 A sanitized version of the category name. Uses only the first category. 36 37 %categories% 38 A sanitized version of the all the category names. 39 40 %categorypath% 41 A sanitized version of the category path name. 42 43 %blogname% 44 A sanitized version of the blog name. 45 46 %tag% 47 A sanitized version of the tag name. Uses only the first tag 48 49 %tags% 50 A sanitized version of all the tag names. 51 52 %author% 53 A sanitized version of the author name. 54 55 %year% 56 The year of the post, four digits, for example 2004 57 58 %monthnum% 59 Month of the year, for example 05 60 61 %day% 62 Day of the month, for example 28 63 64 %hour% 65 Hour of the day, for example 15 66 67 %minute% 68 Minute of the hour, for example 43 69 70 %second% 71 Second of the minute, for example 33 72 20 73 == Installation == 21 74 -
auto-url/trunk/templates/pattern.php
r435918 r436897 8 8 <div>%category%</div> 9 9 <div>%categories%</div> 10 <div>%categorypath%</div> 11 <div>%blogname%</div> 10 12 <div>%tag%</div> 11 13 <div>%tags%</div> … … 72 74 <div>%category%</div> 73 75 <div>%categories%</div> 76 <div>%categorypath%</div> 77 <div>%blogname%</div> 74 78 <div>%tag%</div> 75 79 <div>%tags%</div> … … 102 106 <b>%categories%</b> 103 107 A sanitized version of the all the category names. 108 </div> 109 <div class="formRow"> 110 <b>%categorypath%</b> 111 A sanitized version of the category path name. 112 </div> 113 <div class="formRow"> 114 <b>%blogname%</b> 115 A sanitized version of the blog name. 104 116 </div> 105 117 <div class="formRow">
Note: See TracChangeset
for help on using the changeset viewer.