• Resolved anaroes

    (@anaroes)


    Hola a todos! Tengo en mi WP instalado el Jetpack para automatizar en facebook y twitter las publicaciones de redes sociales. En las opciones de configuración activé la opción de ‘Connection available to all administrators, editors, and authors’ para que todos los usuarios de mi WP pudieran publicar en redes directamente. Ahora necesito que esa automatización se restringa en uno de los usuarios o perfiles de mi WP, es decir, que todos los usuarios salvo uno puedan publicar automáticamente en redes sociales.
    He probado a instalar un plugin de configuración de permisos de usuarios, pero no incluyen en concreto esta función que necesito.
    ?Alguien sabe cómo puedo hacerlo por favor? Gracias de antemano.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter anaroes

    (@anaroes)

    Creo que me serviría si alguien sabe si hay algún filtro para desactivar la publicación automatizada en rrss en las entradas de un usuario concreto, igual que puede hacerse de forma manual.

    Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    Hi there,

    We currently provide support in English. For now, I’ll be replying in English. You’re welcome to continue in English or I can enter your message into Google Translate, if you’d prefer.

    You can use the below code snippet to remove any particular user to use the publicize feature. You can use the Code Snippets plugin to apply the below code or paste it to the theme’s functions.php file. More info is here.

    function custom_publicize( $should_publicize, $post ) {
       
    	if (get_current_user_id() == 2) {
    		return false;
    	}
     
        return $should_publicize;
    }
    add_filter( 'publicize_should_publicize_published_post', 'custom_publicize', 10, 2 );

    At the place of 2 after get_current_user_id() == you will need to place actual user id. For example if you want to remove a user whose user id is 10 then you will use 10 there like this: get_current_user_id() == 10

    Here is how you can find user id.

    For us: p1638513734459600-slack-CBG1CP4EN

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restringir divulgar a un usuario de WP’ is closed to new replies.