WordPress.org

Forums

YOP Poll
[resolved] Disable "Yop Poll" Button (6 posts)

  1. epanda06
    Member
    Posted 10 months ago #

    Hi,

    Is there a way to disable to "Yop Poll" button in the wysiwyg editor when we edit a page or post ?

    Thanks forehand for your help.

    Regards.

    https://wordpress.org/plugins/yop-poll/

  2. YOP
    Member
    Plugin Author

    Posted 10 months ago #

    Hi epanda06,

    Edit yop_poll_model.php and in return_poll_html() function, specifically in if(!is_voted) add

    $actual_link =  "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
                            if($actual_link=="your archive url"){
                                $template = str_ireplace( '%POLL-VOTE-BUTTON%', '<button style="visibility:hidden" class="yop_poll_vote_button" id="yop_poll_vote-button-' . $poll_id . $unique_id . '" onclick="yop_poll_register_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\'); return false;">' . $poll_options['vote_button_label'] . '</button>', $template );

    Best wishes,

    YOP Team

  3. epanda06
    Member
    Posted 9 months ago #

    Hi YOP,

    Thanks for your quick reply, but are we talking about the "Yop Poll" button who insert the yop_poll shordcode in text editor when create or edit a post/apge ? It is this one i want to hide ;)

    Regards.

  4. YOP
    Member
    Plugin Author

    Posted 9 months ago #

    Hey epanda06,

    Edit admin.php and comment the "if" located in load_editor_functions( $hook )

    Please let us know if you need more help.

    Regards,

    YOP Team

  5. epanda06
    Member
    Posted 7 months ago #

    Sorry for my very late answer and big thanks for your reply.

    Is there a way to remove it from my theme functions.php with a remove_action or something like this ?

    Thanks forehand for your precious help
    Regards

  6. YOP
    Member
    Plugin Author

    Posted 6 months ago #

    Hi,

    Please be more specific and give as many details as you can so we may assist.

    Best wishes,

    YOP Team

Reply

You must log in to post.

About this Plugin

About this Topic

Tags