Plugin Directory

Changeset 2702847


Ignore:
Timestamp:
03/31/2022 05:14:26 PM (4 years ago)
Author:
era404
Message:

Fixed default sort issue discoverd by @biblab (thank you);

Location:
stafflist/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stafflist/trunk/readme.txt

    r2551711 r2702847  
    104104== Changelog ==
    105105
     106= 3.1.2 =
     107* Fixed default sort issue discoverd by @biblab (thank you);
     108
    106109= 3.1.1 =
    107110* Spreadsheet library adjustments per suggestion by @thomasprice61 (thank you);
  • stafflist/trunk/stafflist.php

    r2551711 r2702847  
    44Plugin URI: http://wordpress.org/plugins/stafflist/
    55Description: A super simplified staff directory tool
    6 Version: 3.1.1
     6Version: 3.1.2
    77Author: era404
    88Author URI: http://www.era404.com
     
    11981198**************************************************************************************************/
    11991199function insert_stafflist( $atts ) {
    1200     global  $rows, $messaging;
     1200    global  $rows, $messaging,
     1201            $staffmetadb, $wpdb;
    12011202    $subset = false;
    12021203    $on = "both";
    12031204
     1205    //default sort
     1206    if(!$sort = $wpdb->get_var("SELECT id FROM {$staffmetadb} WHERE active>0 ORDER BY colpos ASC LIMIT 1")) $sort = 1;
    12041207    //number of results rows
    12051208    if(isset($atts['rows']) && is_numeric($atts['rows']) && $atts['rows'] > 0 && $atts['rows'] <= 100) $rows = $atts['rows'];
     
    12161219                <div class='pagerblock'>
    12171220                    <div class='stafflistctl'>
    1218                         <input type='hidden' rel='sl_sort' value='1' autocomplete='Off'>
     1221                        <input type='hidden' rel='sl_sort' value='{$sort}' autocomplete='Off'>
    12191222                        <input type='hidden' rel='sl_page' value='1' autocomplete='Off'>
    12201223                        <input type='hidden' rel='sl_rows' value='{$rows}' autocomplete='Off'>".
Note: See TracChangeset for help on using the changeset viewer.