Changeset 1636258
- Timestamp:
- 04/12/2017 06:18:14 PM (9 years ago)
- Location:
- admin-private-note-on-users/trunk
- Files:
-
- 2 edited
-
admin_private_note.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-private-note-on-users/trunk/admin_private_note.php
r1636239 r1636258 8 8 Text Domain: admin-private-note 9 9 Domain Path: /languages/ 10 Version: 1. 110 Version: 1.0 11 11 */ 12 12 … … 33 33 <td> 34 34 <?php wp_editor( 35 ( get_the_author_meta( 'rsf_admin_note', $user->ID ) ),35 esc_attr( get_the_author_meta( 'rsf_admin_note', $user->ID ) ), 36 36 'rsf_admin_note' , 37 37 array('teeny'=>true,'media_buttons'=>false,'textarea_rows'=>5)); … … 44 44 45 45 function rsf_save_apn( $user_id ) { 46 47 46 if ( !current_user_can( 'edit_user', $user_id ) ) 48 47 { … … 54 53 } 55 54 } 56 57 add_filter('manage_users_columns', 'rsf_admin_note_column');58 function rsf_admin_note_column($columns) {59 $columns['rsf_admin_note'] = 'Admin Note';60 return $columns;61 }62 63 add_action('manage_users_custom_column', 'rsf_admin_note_column_content', 10, 3);64 function rsf_admin_note_column_content($value, $column_name, $user_id) {65 $user = get_userdata( $user_id );66 if ( 'rsf_admin_note' == $column_name )67 {68 $note=( get_the_author_meta( 'rsf_admin_note', $user_id ) );69 if($note)70 {71 return "<div style='max-height:60px;overflow:hidden;' class='admin_note_more' title=''>".$note.'</div>';72 }73 else74 {75 return '';76 }77 78 }79 else{80 return $value;81 }82 83 84 }85 86 87 88 function pw_load_scripts($hook) {89 wp_enqueue_script( 'rsf_readmore', plugin_dir_url( __FILE__ ). 'assets/readmore.min.js', array('jquery') );90 wp_enqueue_script( 'rsf_admin_note_js', plugin_dir_url( __FILE__ ). 'assets/base.js',array('rsf_readmore') );91 92 }93 add_action('admin_enqueue_scripts', 'pw_load_scripts');94 55 ?> -
admin-private-note-on-users/trunk/readme.txt
r1636239 r1636258 2 2 Contributors: wplizer 3 3 Donate link: http://wplizer.com/donate 4 Tags: note, hidden, private, invisible, description, users , admin ,users list4 Tags: note, hidden, private, invisible, description, users 5 5 Requires at least: 3.0.1 6 Tested up to: 4. 7.37 Stable tag: 1. 16 Tested up to: 4.1 7 Stable tag: 1.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 30 30 just go to users profile and you will see a text editor for private noting... 31 31 32 = How can I see hidden notes? =33 34 the notes are in the users list page in Admin area...35 36 32 == Screenshots == 37 33 1. Screenshot 1 38 34 39 35 == Changelog == 40 41 = 1.1 =42 1. Added Admin Note Column to users list page at admin area43 2. Now you can save html notes with editor for your users44 3. load more button in users list to avoid lenghy notes make the page long!45 36 46 37 = 1.0 =
Note: See TracChangeset
for help on using the changeset viewer.