Changeset 1636266
- Timestamp:
- 04/12/2017 06:26:09 PM (9 years ago)
- Location:
- admin-private-note-on-users/trunk
- Files:
-
- 3 added
- 2 edited
-
admin_private_note.php (modified) (4 diffs)
-
assets (added)
-
assets/base.js (added)
-
assets/readmore.min.js (added)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-private-note-on-users/trunk/admin_private_note.php
r1636258 r1636266 8 8 Text Domain: admin-private-note 9 9 Domain Path: /languages/ 10 Version: 1. 010 Version: 1.1 11 11 */ 12 12 … … 33 33 <td> 34 34 <?php wp_editor( 35 esc_attr( get_the_author_meta( 'rsf_admin_note', $user->ID ) ),35 ( 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 46 47 if ( !current_user_can( 'edit_user', $user_id ) ) 47 48 { … … 53 54 } 54 55 } 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 else 74 { 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'); 55 94 ?> -
admin-private-note-on-users/trunk/readme.txt
r1636258 r1636266 2 2 Contributors: wplizer 3 3 Donate link: http://wplizer.com/donate 4 Tags: note, hidden, private, invisible, description, users 4 Tags: note, hidden, private, invisible, description, users, admin ,users list 5 5 Requires at least: 3.0.1 6 Tested up to: 4. 17 Stable tag: 1. 06 Tested up to: 4.7.3 7 Stable tag: 1.1 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 32 36 == Screenshots == 33 37 1. Screenshot 1 34 38 35 39 == Changelog == 40 41 = 1.1 = 42 1. Added Admin Note Column to users list page at admin area 43 2. Now you can save html notes with editor for your users 44 3. load more button in users list to avoid lenghy notes make the page long! 36 45 37 46 = 1.0 =
Note: See TracChangeset
for help on using the changeset viewer.