WordPress.org

Support

Support » Plugins and Hacks » image field in profile

image field in profile

  • somtam
    Participant

    @somtam

    I use the hook pre_get_posts with this code, that let the author see, from the media overlay, only the images that the owner uploaded.

    add_action('pre_get_posts', 'my_filter_posts_list');
    function my_filter_posts_list($query) {
       if ( isset( $_REQUEST['action'] ) ){
            if( 'admin-ajax.php' == $pagenow || $_REQUEST['action'] == 'query-attachments' ){
                 $query->set('author', $current_user->ID);
            }
       }
    }

    but since I do that, the image field I insert into the profile page didn’t show up anymore 🙁
    Only for admin is still there!
    thanks so much for helping!

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  • The topic ‘image field in profile’ is closed to new replies.