Plugin Directory

Changeset 412510


Ignore:
Timestamp:
07/20/2011 11:57:48 AM (15 years ago)
Author:
Patrick Brouwer
Message:

v1.8 (opt-in enable rewrite slug)

Location:
simple-portfolio
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • simple-portfolio/tags/1.8/extends/rewrite.php

    r411927 r412510  
    1313    $newrules = array();
    1414
    15     if (get_option('use-slug-rewrite')) {
     15    if (get_option('use-slug-rewrite') !== '0') {
    1616        $newrules[$info->rewrite['slug'].'/?$'] = 'index.php?post_type='.$info->name;
    1717        $newrules[$info->rewrite['slug'].'/page/?([0-9]{1,})/?$'] = 'index.php?post_type='.$info->name.'&paged=$matches[1]';
  • simple-portfolio/tags/1.8/extends/settings-panel.php

    r411927 r412510  
    102102        <table class="form-table">
    103103            <tr>
    104                 <th><label><input name="use-slug-rewrite" type="radio" value="0" class="tog" <?php checked('', get_option('use-slug-rewrite')); checked('0', get_option('use-slug-rewrite')); ?> /> <?php _e('Disable'); ?></label></th>
     104                <th><label><input name="use-slug-rewrite" type="radio" value="0" class="tog" <?php checked('0', get_option('use-slug-rewrite')); ?> /> <?php _e('Disable'); ?></label></th>
    105105                <td>List your portfolio projects in <code>a page template</code>. </em><a target="_blank" href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates" title="How to create a Page Template">codex.wordpress.org/Pages</a></em></td>
    106106            </tr>
    107107            <tr>
    108                 <th><label><input name="use-slug-rewrite" type="radio" value="1" class="tog" <?php checked('1', get_option('use-slug-rewrite')); ?> /> <?php _e('Enable'); ?></label></th>
     108                <th><label><input name="use-slug-rewrite" type="radio" value="1" class="tog" <?php checked('', get_option('use-slug-rewrite')); checked('1', get_option('use-slug-rewrite')); ?> /> <?php _e('Enable'); ?></label></th>
    109109                <td>List your portfolio projects in <code>portfolio.php</code></td>
    110110            </tr>
  • simple-portfolio/trunk/extends/rewrite.php

    r411927 r412510  
    1313    $newrules = array();
    1414
    15     if (get_option('use-slug-rewrite')) {
     15    if (get_option('use-slug-rewrite') !== '0') {
    1616        $newrules[$info->rewrite['slug'].'/?$'] = 'index.php?post_type='.$info->name;
    1717        $newrules[$info->rewrite['slug'].'/page/?([0-9]{1,})/?$'] = 'index.php?post_type='.$info->name.'&paged=$matches[1]';
  • simple-portfolio/trunk/extends/settings-panel.php

    r411927 r412510  
    102102        <table class="form-table">
    103103            <tr>
    104                 <th><label><input name="use-slug-rewrite" type="radio" value="0" class="tog" <?php checked('', get_option('use-slug-rewrite')); checked('0', get_option('use-slug-rewrite')); ?> /> <?php _e('Disable'); ?></label></th>
     104                <th><label><input name="use-slug-rewrite" type="radio" value="0" class="tog" <?php checked('0', get_option('use-slug-rewrite')); ?> /> <?php _e('Disable'); ?></label></th>
    105105                <td>List your portfolio projects in <code>a page template</code>. </em><a target="_blank" href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates" title="How to create a Page Template">codex.wordpress.org/Pages</a></em></td>
    106106            </tr>
    107107            <tr>
    108                 <th><label><input name="use-slug-rewrite" type="radio" value="1" class="tog" <?php checked('1', get_option('use-slug-rewrite')); ?> /> <?php _e('Enable'); ?></label></th>
     108                <th><label><input name="use-slug-rewrite" type="radio" value="1" class="tog" <?php checked('', get_option('use-slug-rewrite')); checked('1', get_option('use-slug-rewrite')); ?> /> <?php _e('Enable'); ?></label></th>
    109109                <td>List your portfolio projects in <code>portfolio.php</code></td>
    110110            </tr>
Note: See TracChangeset for help on using the changeset viewer.