Plugin Directory

Changeset 2323098


Ignore:
Timestamp:
06/12/2020 01:53:01 PM (6 years ago)
Author:
chuhpl
Message:
  • Deactivated the test holder Dashboard Widget.
  • Fixed the alternating rows CSS for Check in and Check out lists.
  • Removed an extra quote in the option list for filters.
  • Added the post status and made it sortable to the All Holds list.
  • Removed unwanted test files.
Location:
lendingq
Files:
22 added
5 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • lendingq/trunk/lendingq.css

    r2320869 r2323098  
    2525}
    2626
    27 .lending_table_col tr:nth-child(2) {
     27.lending_table_col tr:nth-child(even) {
    2828    background: #F5F5F5;
     29}
     30.lending_table_col tr:nth-child(odd) {
     31    background: #FFF;
    2932}
    3033.lendingq_column {
  • lendingq/trunk/lendingq.php

    r2320869 r2323098  
    44Plugin URI: https://wordpress.org/plugins/lendingq/
    55Description: A simple system to manage the lending of items (like hotspots) with an integrated waiting list.
    6 Version: 0.94
     6Version: 0.95
    77License: GPLv2 or later
    88Text Domain: lendingq
     
    6363            add_action( 'init',                             array( $this, 'post_setup_custom') );
    6464            add_action( 'pre_get_posts',                    array( $this, 'waiting_list_orderby' ) );
     65
    6566            // If there are any Items that are checked out and missing
    6667            // Lending Post ID (trashed) then make them available
     
    6869            // Admin Pages and Dashboard Widget setup
    6970            add_action( 'admin_menu',                       array( $this, 'admin_menu_add_pages' ) );
    70             add_action( 'wp_dashboard_setup',               array( $this, 'widget_dashboard_add') );
     71            #add_action( 'wp_dashboard_setup',              array( $this, 'widget_dashboard_add') );
    7172            // Enqueue CSS and Javascript
    7273            add_action( 'wp_enqueue_scripts',               array( $this, 'lendingq_script_enqueuer' ) );
     
    7879            // Add our filters to the main list so they can filter by type and location
    7980            add_action( 'restrict_manage_posts',            array( $this, 'add_taxonomy_filters' ) );
     81           
    8082            // Remove the EDIT option from the bulk action dropdown.
    8183            add_filter( 'bulk_actions-edit-lendingq_hold',  '__return_empty_array' );   
     
    9193            add_action( 'admin_post_lendingq_cancel_hold',  array( $this, 'handle_cancel_hold' ) );
    9294            add_filter( 'custom_menu_order',                array( $this, 'change_hold_submenu_order' ) );
     95           
     96           
     97           
     98           
     99       
     100           
     101           
     102           
    93103        } // END function __construct()
    94104        //
     
    258268                        foreach ($terms as $term) {
    259269                            $selected = ( $_GET[$slug] == $term->slug ) ? " selected=\"selected\"" : null;
    260                             echo '<option value="'. $term->slug .'"'. $selected . '">' . $term->name . '</option>';                             
     270                            #echo '<option value="'. $term->slug .'"'. $selected . '">' . $term->name . '</option>';                               
     271                            echo '<option value="'. $term->slug .'"'. $selected . '>' . $term->name . '</option>';
    261272                        } 
    262273                        echo "</select>"; 
     
    20332044            $columns['post_id'] = 'ID';
    20342045            $columns['waiting_date'] = 'waiting_date';
     2046            $columns['post_status'] = 'post_status';
    20352047            return $columns;
    20362048        }
     
    20712083                    echo $post_ID;
    20722084                    break;
     2085                case 'post_status' :
     2086                    $post_status = get_post_status_object( get_post_status( $post_ID ) );
     2087                    echo $post_status->label;
     2088                    break;
    20732089                case 'waiting_date' :
    20742090                    $post_meta  = get_post_meta( sanitize_text_field( $post_ID ) );
     
    20832099            unset( $columns['date'] );
    20842100            unset( $columns['expirationdate'] );
     2101           
    20852102            $new = array( 'post_id' => 'ID' );
    20862103            $columns = array_slice( $columns, 0, 1 ) + $new + array_slice( $columns, 1 );
    20872104            $columns['waiting_date'] = __( 'Date Added', 'lendingq' );
     2105            $columns['post_status'] = __( 'Status', 'lendingq' );
     2106           
    20882107            return $columns;   
    20892108        } // END function setup_post_columns( $columns ) {
     
    21622181        } // END function update_locationq_meta_hold( $post_ID )         
    21632182        function waiting_list_orderby( $query ) {
    2164             if( ! is_admin() )
    2165                 return;
     2183
     2184            if( !is_admin() && !$query->is_main_query() && !in_array( $query->get('post_type'), array('lendingq_stock','lendingq_hold') ) ) {
     2185                return false;
     2186               
     2187            }
     2188       
     2189       
    21662190            $orderby = $query->get( 'orderby');
    21672191            if( 'waiting_date' == $orderby ) {
     
    21692193                $query->set('orderby','meta_value_num');
    21702194            }
     2195            return $query;
    21712196        }
    21722197        function widget_dashboard_add() {
     
    21752200        } // END function widget_dashboard_add()
    21762201        function widget_display() {
     2202           
     2203           
     2204           
     2205           
     2206           
    21772207            require( LENDINGQ_PATH . '/template_quick_widget.php' );
    21782208        } // END function widget_display()
  • lendingq/trunk/readme.txt

    r2320869 r2323098  
    44Requires at least: 4.7
    55Tested up to: 5.4
    6 Stable tag: 0.94
     6Stable tag: trunk
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    3333
    3434== Changelog ==
     35= 0.95 =
     36* Deactivated the test holder Dashboard Widget.
     37* Fixed the alternating rows CSS for Check in and Check out lists.
     38* Removed an extra quote in the option list for filters.
     39* Added the post status and made it sortable to the All Holds list.
     40* Removed unwanted test files.
     41
    3542= 0.94 =
    3643* Reorganized all functions alphabetically.
  • lendingq/trunk/template_check_in_list.php

    r2320869 r2323098  
    3232        } else {
    3333    ?>
    34     <table class="widefat fixed lending_table_col" cellspacing="0">
     34    <table class="widefat fixed" cellspacing="0">
    3535        <thead>
    3636            <tr>
     
    5151            </tr>
    5252        </tfoot>
    53         <tbody>
     53        <tbody class="lending_table_col">
    5454            <?php
    5555            foreach( $holds as $hkey => $hval ) {
  • lendingq/trunk/template_check_out_list.php

    r2320869 r2323098  
    6464            } else {
    6565    ?>
    66     <table class="widefat fixed lending_table_col" cellspacing="0">
     66    <table class="widefat fixed" cellspacing="0">
    6767        <thead>
    6868            <tr>
     
    8181            </tr>
    8282            </tfoot>
    83             <tbody>
     83            <tbody class="lending_table_col">
    8484        <?php
    8585                $count = 0;
Note: See TracChangeset for help on using the changeset viewer.