Changeset 2323098
- Timestamp:
- 06/12/2020 01:53:01 PM (6 years ago)
- Location:
- lendingq
- Files:
-
- 22 added
- 5 deleted
- 5 edited
-
tags/0.95 (added)
-
tags/0.95/includes (added)
-
tags/0.95/includes/jquery.validate.min.js (added)
-
tags/0.95/lendingq.css (added)
-
tags/0.95/lendingq.js (added)
-
tags/0.95/lendingq.php (added)
-
tags/0.95/readme.txt (added)
-
tags/0.95/template_cancel_hold_form.php (added)
-
tags/0.95/template_cancel_stock_form.php (added)
-
tags/0.95/template_cancel_stock_form_checked_out.php (added)
-
tags/0.95/template_check_in_form.php (added)
-
tags/0.95/template_check_in_list.php (added)
-
tags/0.95/template_check_out_form.php (added)
-
tags/0.95/template_check_out_list.php (added)
-
tags/0.95/template_contact_hold_form.php (added)
-
tags/0.95/template_no_item_types.php (added)
-
tags/0.95/template_no_locations.php (added)
-
tags/0.95/template_no_stock.php (added)
-
tags/0.95/template_post_hold.php (added)
-
tags/0.95/template_post_item.php (added)
-
tags/0.95/template_quick_widget.php (added)
-
tags/0.95/widget.css (added)
-
trunk/lendingq.css (modified) (1 diff)
-
trunk/lendingq.php (modified) (12 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/template_bad_nonce.php (deleted)
-
trunk/template_check_in_col.php (deleted)
-
trunk/template_check_in_list.php (modified) (2 diffs)
-
trunk/template_check_in_out.php (deleted)
-
trunk/template_check_out_col.php (deleted)
-
trunk/template_check_out_list.php (modified) (2 diffs)
-
trunk/template_request.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
lendingq/trunk/lendingq.css
r2320869 r2323098 25 25 } 26 26 27 .lending_table_col tr:nth-child( 2) {27 .lending_table_col tr:nth-child(even) { 28 28 background: #F5F5F5; 29 } 30 .lending_table_col tr:nth-child(odd) { 31 background: #FFF; 29 32 } 30 33 .lendingq_column { -
lendingq/trunk/lendingq.php
r2320869 r2323098 4 4 Plugin URI: https://wordpress.org/plugins/lendingq/ 5 5 Description: A simple system to manage the lending of items (like hotspots) with an integrated waiting list. 6 Version: 0.9 46 Version: 0.95 7 7 License: GPLv2 or later 8 8 Text Domain: lendingq … … 63 63 add_action( 'init', array( $this, 'post_setup_custom') ); 64 64 add_action( 'pre_get_posts', array( $this, 'waiting_list_orderby' ) ); 65 65 66 // If there are any Items that are checked out and missing 66 67 // Lending Post ID (trashed) then make them available … … 68 69 // Admin Pages and Dashboard Widget setup 69 70 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') ); 71 72 // Enqueue CSS and Javascript 72 73 add_action( 'wp_enqueue_scripts', array( $this, 'lendingq_script_enqueuer' ) ); … … 78 79 // Add our filters to the main list so they can filter by type and location 79 80 add_action( 'restrict_manage_posts', array( $this, 'add_taxonomy_filters' ) ); 81 80 82 // Remove the EDIT option from the bulk action dropdown. 81 83 add_filter( 'bulk_actions-edit-lendingq_hold', '__return_empty_array' ); … … 91 93 add_action( 'admin_post_lendingq_cancel_hold', array( $this, 'handle_cancel_hold' ) ); 92 94 add_filter( 'custom_menu_order', array( $this, 'change_hold_submenu_order' ) ); 95 96 97 98 99 100 101 102 93 103 } // END function __construct() 94 104 // … … 258 268 foreach ($terms as $term) { 259 269 $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>'; 261 272 } 262 273 echo "</select>"; … … 2033 2044 $columns['post_id'] = 'ID'; 2034 2045 $columns['waiting_date'] = 'waiting_date'; 2046 $columns['post_status'] = 'post_status'; 2035 2047 return $columns; 2036 2048 } … … 2071 2083 echo $post_ID; 2072 2084 break; 2085 case 'post_status' : 2086 $post_status = get_post_status_object( get_post_status( $post_ID ) ); 2087 echo $post_status->label; 2088 break; 2073 2089 case 'waiting_date' : 2074 2090 $post_meta = get_post_meta( sanitize_text_field( $post_ID ) ); … … 2083 2099 unset( $columns['date'] ); 2084 2100 unset( $columns['expirationdate'] ); 2101 2085 2102 $new = array( 'post_id' => 'ID' ); 2086 2103 $columns = array_slice( $columns, 0, 1 ) + $new + array_slice( $columns, 1 ); 2087 2104 $columns['waiting_date'] = __( 'Date Added', 'lendingq' ); 2105 $columns['post_status'] = __( 'Status', 'lendingq' ); 2106 2088 2107 return $columns; 2089 2108 } // END function setup_post_columns( $columns ) { … … 2162 2181 } // END function update_locationq_meta_hold( $post_ID ) 2163 2182 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 2166 2190 $orderby = $query->get( 'orderby'); 2167 2191 if( 'waiting_date' == $orderby ) { … … 2169 2193 $query->set('orderby','meta_value_num'); 2170 2194 } 2195 return $query; 2171 2196 } 2172 2197 function widget_dashboard_add() { … … 2175 2200 } // END function widget_dashboard_add() 2176 2201 function widget_display() { 2202 2203 2204 2205 2206 2177 2207 require( LENDINGQ_PATH . '/template_quick_widget.php' ); 2178 2208 } // END function widget_display() -
lendingq/trunk/readme.txt
r2320869 r2323098 4 4 Requires at least: 4.7 5 5 Tested up to: 5.4 6 Stable tag: 0.946 Stable tag: trunk 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 33 33 34 34 == 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 35 42 = 0.94 = 36 43 * Reorganized all functions alphabetically. -
lendingq/trunk/template_check_in_list.php
r2320869 r2323098 32 32 } else { 33 33 ?> 34 <table class="widefat fixed lending_table_col" cellspacing="0">34 <table class="widefat fixed" cellspacing="0"> 35 35 <thead> 36 36 <tr> … … 51 51 </tr> 52 52 </tfoot> 53 <tbody >53 <tbody class="lending_table_col"> 54 54 <?php 55 55 foreach( $holds as $hkey => $hval ) { -
lendingq/trunk/template_check_out_list.php
r2320869 r2323098 64 64 } else { 65 65 ?> 66 <table class="widefat fixed lending_table_col" cellspacing="0">66 <table class="widefat fixed" cellspacing="0"> 67 67 <thead> 68 68 <tr> … … 81 81 </tr> 82 82 </tfoot> 83 <tbody >83 <tbody class="lending_table_col"> 84 84 <?php 85 85 $count = 0;
Note: See TracChangeset
for help on using the changeset viewer.