WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. epanda06
    Member
    Posted 1 month 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 1 month 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 1 month 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 1 month 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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags