Plugin Directory

Changeset 436897


Ignore:
Timestamp:
09/12/2011 04:26:42 PM (15 years ago)
Author:
dexxaye
Message:

0.7 Commit

Location:
auto-url/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • auto-url/trunk/auto-url-data.php

    r435918 r436897  
    33$removeTokens = array(
    44    '%categories%',
     5    '%categorypath%',
    56    '%tags%', 
    67);
  • auto-url/trunk/auto-url.php

    r435950 r436897  
    55  Plugin URI: http://www.bunchacode.com/programming/auto-url
    66  Description: generates customized permalinks according to post types, categories and tags
    7   Version: 0.6
     7  Version: 0.7
    88  Author: Jiong Ye
    99  Author URI: http://www.bunchacode.com
     
    322322            }
    323323            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;
    324344        case '%tag%':
    325345            if ($p->post_type == 'post') {
  • auto-url/trunk/readme.txt

    r435950 r436897  
    44Requires at least: 3.1
    55Tested up to: 3.2.1
    6 Stable tag: 0.6
     6Stable tag: 0.7
    77
    88Auto URL generates customized permalinks according to post types, categories and tags
     
    1010== Description ==
    1111
    12 Auto URL generates customized permalinks according to post types, categories and tags
     12Auto URL generates customized permalinks according to post types, categories and tags.
     13You can generate your own customized url for posts and pages by using different tokens.
     14Your posts and pages will still be accessible via your old permalinks.
    1315
    1416WP 3.1 and up only. Beta version. Appreciate any feedback.
     
    1820Tested On: Firefox 5, Chrome 13, IE 7 and IE 8
    1921
     22-Available Tokens-
     23
     24%id%
     25The unique ID # of the post, for example 423
     26
     27%name%
     28A sanitized version of the title of the post.
     29
     30%namepath%
     31A sanitized version of the full title path of a page. Similar to %name% but shows the it's
     32title path which includes title of it's parent. Only available to pages.
     33
     34%category%
     35A sanitized version of the category name. Uses only the first category.
     36
     37%categories%
     38A sanitized version of the all the category names.
     39
     40%categorypath%
     41A sanitized version of the category path name.
     42
     43%blogname%
     44A sanitized version of the blog name.
     45
     46%tag%
     47A sanitized version of the tag name. Uses only the first tag
     48
     49%tags%
     50A sanitized version of all the tag names.
     51
     52%author%
     53A sanitized version of the author name.
     54
     55%year%
     56The year of the post, four digits, for example 2004
     57
     58%monthnum%
     59Month of the year, for example 05
     60
     61%day%
     62Day of the month, for example 28
     63
     64%hour%
     65Hour of the day, for example 15
     66
     67%minute%
     68Minute of the hour, for example 43
     69
     70%second%
     71Second of the minute, for example 33
     72   
    2073== Installation ==
    2174
  • auto-url/trunk/templates/pattern.php

    r435918 r436897  
    88        <div>%category%</div>
    99        <div>%categories%</div>
     10        <div>%categorypath%</div>
     11        <div>%blogname%</div>
    1012        <div>%tag%</div>
    1113        <div>%tags%</div>
     
    7274        <div>%category%</div>
    7375        <div>%categories%</div>
     76        <div>%categorypath%</div>
     77        <div>%blogname%</div>
    7478        <div>%tag%</div>
    7579        <div>%tags%</div>
     
    102106        <b>%categories%</b>
    103107        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.
    104116    </div>
    105117    <div class="formRow">
Note: See TracChangeset for help on using the changeset viewer.