• Resolved MNetto

    (@netto)


    Hi,
    is it possible to allow editors to use TTfP?

    Per default Polylang’s string translation is enabled for editor role. But TTfP is not.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    Are you sure?
    I checked it now.
    As editor I’m trying open this page:
    wp-admin/admin.php?page=mlang – polylang page
    and I have “Sorry, you are not allowed to access this page.”

    Thread Starter MNetto

    (@netto)

    Sorry ??. In fact it’s not default in Polylang.
    I had overlooked that I once gave editors permission to Polyang in functions.php:

    add_action( 'admin_menu', function() {
      if ( ! current_user_can( 'manage_options' ) && function_exists( 'PLL' ) ) {
        add_menu_page( __( 'Strings translations', 'polylang' ), __( 'Languages', 'polylang' ), 'edit_pages', 'mlang_strings', array( PLL(), 'languages_page' ), 'dashicons-translation' );
      }
    } );

    But still, it would be handy to optionally allow editors (translators) to use TTfP.

    Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    ok, You can ovveride access in TTfP too, for example:

    add_action('init', 'custom_init');
    
    function custom_init()
    {
        if (Polylang_TT_access::get_instance()->is_polylang_page()) {
                $plugin_obj = new Polylang_Theme_Translation();
                $plugin_obj->run();
        }
    }
    Thread Starter MNetto

    (@netto)

    Works. Thank you!

    Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    great, please rate my plugin if you haven’t done so yet ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘access for editor role’ is closed to new replies.