Plugin Directory

Changeset 1636258


Ignore:
Timestamp:
04/12/2017 06:18:14 PM (9 years ago)
Author:
wplizer
Message:

test

Location:
admin-private-note-on-users/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin-private-note-on-users/trunk/admin_private_note.php

    r1636239 r1636258  
    88Text Domain: admin-private-note
    99Domain Path: /languages/
    10 Version: 1.1
     10Version: 1.0
    1111*/
    1212
     
    3333            <td>
    3434            <?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 ) ),
    3636            'rsf_admin_note' ,
    3737            array('teeny'=>true,'media_buttons'=>false,'textarea_rows'=>5));
     
    4444
    4545function rsf_save_apn( $user_id ) {
    46    
    4746    if ( !current_user_can( 'edit_user', $user_id ) )
    4847    {
     
    5453    }
    5554}
    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');
    9455?>
  • admin-private-note-on-users/trunk/readme.txt

    r1636239 r1636258  
    22Contributors: wplizer
    33Donate link: http://wplizer.com/donate
    4 Tags: note, hidden, private, invisible, description, users, admin ,users list
     4Tags: note, hidden, private, invisible, description, users
    55Requires at least: 3.0.1
    6 Tested up to: 4.7.3
    7 Stable tag: 1.1
     6Tested up to: 4.1
     7Stable tag: 1.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3030just go to users profile and you will see a text editor for private noting...
    3131
    32 = How can I see hidden notes?  =
    33 
    34 the notes are in the users list page in Admin area...
    35 
    3632== Screenshots ==
    37331. Screenshot 1
    3834
    3935== 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!
    4536
    4637= 1.0 =
Note: See TracChangeset for help on using the changeset viewer.