Respuestas de foro creadas

Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)
  • Foro: Hacks
    En respuesta a: Información de usuarios privada
    Iniciador del debate corporativo

    (@corporativo)

    También encontre este plugin: view own post media only

    No lo he probado pero espero a alguien le sirva

    Foro: Hacks
    En respuesta a: Información de usuarios privada
    Iniciador del debate corporativo

    (@corporativo)

    Para el que le pueda servir encontré estos códigos que mantiene al usuario solo con la información de sus posts, y no permite ver publicaciones ni contenido de las librerías media de otros usuarios

    http://corpocrat.com/2012/02/11/10-useful-wordpress-user-interface-hacks/

    4. Show only User Specific Posts
    The biggest problem i faced is wordpress by default, shows ALL posts to user, in the admin area. ALL posts means even posts submitted by other users/authors, of course in read only mode. Further wordpress shows total counts of all posts (pending, published, all, drafts) present in the entire blog. This is totally unacceptable and it may present a security risk. You dont want to reveal entire list of blog posts to your users. The solution is to show posts, submitted by the user who is currently logged in and remove all post counts etc.. This is the key to design a best user interface.
    Note: I have designated the default user role as “contributor” when they register. You may want to change this, depending on what user role you set, for example author.
    This code will only show posts submitted by author/user, who is currently logged in:

    //user specific posts in admin area
    function posts_for_current_author($query) {

    if(current_user_can(‘contributor’) && is_admin()) {

    global $user_ID;
    $query->set(‘author’, $user_ID);
    }
    return $query;
    }
    add_filter(‘pre_get_posts’, ‘posts_for_current_author’);

    This post will hide the number counts in brackets:

    // remove pending published above table.
    function jquery_remove_counts()
    {

    if(current_user_can(‘contributor’)) {

    ?>
    <script type=»text/javascript»>
    jQuery(function(){
    jQuery(«li.all»).remove();
    jQuery(«li.publish»).find(«span.count»).remove();
    jQuery(«li.trash»).find(«span.count»).remove();
    jQuery(«li.pending»).find(«span.count»).remove();

    });
    </script>
    <?php }
    }
    add_action(‘admin_footer’, ‘jquery_remove_counts’);

Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)