Plugin Directory

Changeset 956140


Ignore:
Timestamp:
07/28/2014 05:35:28 PM (12 years ago)
Author:
rolice
Message:

v.1.4.1 Candidate

Added option to disable sorting of administrative lists with posts.

Location:
post-sorter
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • post-sorter/trunk/page/general.php

    r804473 r956140  
    2020                    <td>
    2121                        <input name="post_sorter_enabled" id="post_sorter_enabled" type="checkbox" <?php checked( 1, get_option( 'post_sorter_enabled' ) )?> />
    22                         <span class="hint"><?php _e( 'The plugin will only work on the client side, if it is enabled', 'post_sorter' ) ?></span>
     22                        <span class="hint"><?php _e( 'Enable sorting on the front-end', 'post_sorter' ) ?></span>
     23                    </td>
     24                </tr>
     25
     26                <tr valign="top">
     27                    <th scope="row"><label for="post_sorter_no_admin_sort"><?php _e( 'Disable Admin Sorting', 'post_sorter' ) ?></label>:</th>
     28                    <td>
     29                        <input name="post_sorter_no_admin_sort" id="post_sorter_no_admin_sort" type="checkbox" <?php checked( 1, get_option( 'post_sorter_no_admin_sort' ) )?> />
     30                        <span class="hint"><?php _e( 'The plugin will not sort administrative post lists', 'post_sorter' ) ?></span>
    2331                    </td>
    2432                </tr>
  • post-sorter/trunk/post_sorter.php

    r804473 r956140  
    44  Plugin URI: http://intellisys.org/
    55  Description: Plugin for easy sorting of posts and pages by numeric value, both ascending and descending.
    6   Version: 1.4
     6  Version: 1.4.1
    77  Author: Lyubomir Gardev
    88  Author URI: http://rolice.intellisys.info/
     
    7777    public function activate() {
    7878        update_option( 'post_sorter_enabled', TRUE );
     79        update_option( 'post_sorter_no_admin_sort', FALSE );
    7980        update_option( 'post_sorter_direction', 'ASC' );
    8081        update_option( 'post_sorter_enabled_roles', array( 'administrator' ) );
     
    218219        if ( !get_option( 'post_sorter_enabled' ) )
    219220            return $sql;
     221
     222        if( get_option( 'post_sorter_no_admin_sort' ) && is_admin() )
     223            return $sql;
    220224       
    221225        // If we have some hooks apply them - other plugins, etc.
     
    241245        // Plugin disabled - nothing to do
    242246        if ( !get_option('post_sorter_enabled') )
     247            return $sql;
     248
     249        if( get_option( 'post_sorter_no_admin_sort' ) && is_admin() )
    243250            return $sql;
    244251       
     
    367374
    368375        update_option( 'post_sorter_enabled', isset( $_POST['post_sorter_enabled'] ) );
     376        update_option( 'post_sorter_no_admin_sort', isset( $_POST['post_sorter_no_admin_sort'] ) );
    369377        update_option( 'post_sorter_direction', isset( $_POST['post_sorter_direction'] ) && mb_strtoupper( $_POST['post_sorter_direction'] ) == 'DESC' ? 'DESC' : ''    );
    370378
  • post-sorter/trunk/readme.txt

    r956032 r956140  
    66664. A screenshot of updated Post Sorter settings.
    67675. Permissions screen where you can authorize roles to operate with Post Sorter.
     686. Screenshot of v1.4.1 settings - option to disable sorting inside the administrative lists added
    6869
    6970== Changelog ==
Note: See TracChangeset for help on using the changeset viewer.