• Hi Code Mirror block is displaying for admin user only. For other role like subscriber it is not showing on editor ribbon.

    • This topic was modified 4 years, 4 months ago by tgoswami013.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Vicky Agravat

    (@vickyagravat)

    Hi @tgoswami013

    Can you share screenshot or give more info about your problem.

    Thank you.

    Thread Starter tgoswami013

    (@tgoswami013)

    Pls check this https://prntscr.com/vcobbz code editor button highlighted with red. This button is displaying to admin but not to subscriber.
    Also I can not see this button in https://prntscr.com/vcocxp in unused button. Not sure from where to add this for other user.

    Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @tgoswami013

    Thank you for sharing screen shots.
    I got your point.

    This plugin use current_user_can to check current user ability to add/edit post or not.

    As subscriber has no ability to add/edit post. So that buttons will not displayed on subscriber.

    Currently, This plugin only display buttons on Administrator, Editor roles.
    But, i will add support for other roles like Author, Contributor.
    It will not apply on Subscriber.

    And about Toolbars for the Classic Editor and Unused Buttons, you not need to do anything. Buttons will displayed automatically on editor ribbon based on user role.

    Subscriber is not able to add/edit post so he will never get those Buttons.

    Hope you will get it.

    Thank you.

    Thread Starter tgoswami013

    (@tgoswami013)

    Thanks, but what if subscriber wanted to ask any technical question?

    Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @tgoswami013

    If Subscriber have to ask technical question, he will ask in comment section.

    But, he will never edit main post by himself.

    Thread Starter tgoswami013

    (@tgoswami013)

    I have one content type which is Ask Question which is available to subscriber. When subscriber ask question there is title and description. In description section classic editor is present so that subscriber can post in detail. In the ribbon of classic editor I want subscriber can also add code using the codemirror button (the same way admin can add).

    In class-tinymce.php I have removed this line
    `if ( current_user_can( ‘edit_posts’ ) && current_user_can( ‘edit_pages’ ) )

    but still code block is not visible to subscriber. I am new to wordpress and php, could you pls tell me which line to add or remove so that the button is visible to subscriber or every role.

    Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @tgoswami013

    I can’t help here without understand your code.
    How it manage Subscriber role. what permission are given to Subscriber. etc.

    If you want to get technical support, you can share your detail at my Skype id vicky.agravat

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to display this block for other role than admin’ is closed to new replies.