Changeset 2053454
- Timestamp:
- 03/19/2019 02:21:23 PM (7 years ago)
- Location:
- user-activity/trunk
- Files:
-
- 3 edited
-
classes/class-bu-user-activity-table.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
-
user-activity.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
user-activity/trunk/classes/class-bu-user-activity-table.php
r1968832 r2053454 101 101 * Handle request parameters 102 102 */ 103 $ptype = ( isset( $_REQUEST['ptype'] ) && ! empty( $_REQUEST['ptype'] ) ? $_REQUEST['ptype']: 'all' );104 $startdate = ( isset( $_REQUEST['startdate'] ) ? $_REQUEST['startdate']: '' );105 $enddate = ( isset( $_REQUEST['enddate'] ) ? $_REQUEST['enddate']: '' );106 $username = ( isset( $_REQUEST['s'] ) ? $_REQUEST['s']: '' );103 $ptype = ( isset( $_REQUEST['ptype'] ) && ! empty( $_REQUEST['ptype'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['ptype'] ) ) : 'all' ); 104 $startdate = ( isset( $_REQUEST['startdate'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['startdate'] ) ) : '' ); 105 $enddate = ( isset( $_REQUEST['enddate'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['enddate'] ) ) : '' ); 106 $username = ( isset( $_REQUEST['s'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) : '' ); 107 107 108 108 $prepare_vars = []; … … 125 125 $prepare_vars[] = $ptype; 126 126 } else { 127 $args = [ 'public' => true ];127 $args = [ 'public' => true ]; 128 128 $post_types = get_post_types( $args ); 129 129 $ptype_clause = sprintf( 130 130 'and a.post_type IN (%s)', 131 implode( ',', array_map( function( $a ) { return "'" . $a . "'"; }, $post_types ) ) 131 implode( 132 ',', 133 array_map( 134 function( $a ) { 135 return "'" . $a . "'"; 136 }, 137 $post_types 138 ) 139 ) 132 140 ); 133 141 } … … 251 259 return; 252 260 } 253 $ptype = isset( $_GET['ptype'] ) ? $_GET['ptype']: '';254 $startdate = isset( $_GET['startdate'] ) ? $_GET['startdate']: '';255 $enddate = isset( $_GET['enddate'] ) ? $_GET['enddate']: '';261 $ptype = isset( $_GET['ptype'] ) ? sanitize_text_field( wp_unslash( $_GET['ptype'] ) ) : ''; 262 $startdate = isset( $_GET['startdate'] ) ? sanitize_text_field( wp_unslash( $_GET['startdate'] ) ) : ''; 263 $enddate = isset( $_GET['enddate'] ) ? sanitize_text_field( wp_unslash( $_GET['enddate'] ) ) : ''; 256 264 ?> 257 265 <div class="alignleft actions"> 258 <label class="screen-reader-text" for="ptype"><?php _e( 'Post type…', 'buua' )?></label>266 <label class="screen-reader-text" for="ptype"><?php esc_html_e( 'Post type…', 'buua' ); ?></label> 259 267 <select name="ptype" id="ptype"> 260 <option <?php selected( $ptype, '' ); ?> value=''><?php _e( 'Post type…', 'buua' ); ?></option>268 <option <?php selected( $ptype, '' ); ?> value=''><?php esc_html_e( 'Post type…', 'buua' ); ?></option> 261 269 <?php 262 270 $args = [ 'public' => true ]; … … 266 274 <?php endforeach ?> 267 275 </select> 268 <input placeholder="<?php _e( 'Start date', 'buua' ); ?>" type="text" id="startdate" name="startdate" class="startdate datepicker" value="<?php echo esc_html( $startdate ); ?>" />269 <input placeholder="<?php _e( 'End date', 'buua' ); ?>" type="text" id="enddate" name ="enddate" class="enddate datepicker" value="<?php echo $enddate; ?>" />276 <input placeholder="<?php esc_attr_e( 'Start date', 'buua' ); ?>" type="text" id="startdate" name="startdate" class="startdate datepicker" value="<?php echo esc_html( $startdate ); ?>" /> 277 <input placeholder="<?php esc_attr_e( 'End date', 'buua' ); ?>" type="text" id="enddate" name ="enddate" class="enddate datepicker" value="<?php echo $enddate; ?>" /> 270 278 <?php submit_button( __( 'Filter', 'buua' ), 'button', false, false, [ 'id' => 'post-query-submit' ] ); ?> 271 279 </div> -
user-activity/trunk/readme.txt
r1968832 r2053454 3 3 Donate link: https://www.paypal.me/JonasNordstrom 4 4 Tags: users, list, admin 5 Requires PHP: 5. 45 Requires PHP: 5.6 6 6 Requires at least: 4.7.0 7 Tested up to: 4.9.88 Stable tag: 0.9.37 Tested up to: 5.1.1 8 Stable tag: 1.0.0 9 9 10 10 List number of posts per user. You can limit the search by date, post type and user name. … … 12 12 == Description == 13 13 14 Get an overview o verhow active your users has been during a specified time period. This plugin will list all the users,14 Get an overview of how active your users has been during a specified time period. This plugin will list all the users, 15 15 the number of posts/pages they have created and when their latest post was created. 16 16 … … 39 39 == Changelog == 40 40 41 = 1.0.0 = 42 Version bump and code cleanup 43 44 = 0.9.4 = 45 46 * WP version bump 47 41 48 = 0.9.3 = 42 49 -
user-activity/trunk/user-activity.php
r1968832 r2053454 4 4 Plugin URI: http://jonasnordstrom.se/plugins/ 5 5 Description: List number of posts per user. You can limit the search by date, post type and user name. 6 Version: 0.9.36 Version: 1.0.0 7 7 Author: Jonas Nordström 8 8 Author URI: http://jonasnordstrom.se/
Note: See TracChangeset
for help on using the changeset viewer.