Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hi envision_beats,

    We’re happy you like our plugin!
    Can you please give us more details regarding your request?

    YOP Team

    Thread Starter envision_beats

    (@envision_beats)

    Just wondering if it is possible to edit the shortcode that is attached to each poll. As of now it just outputs a number for the id [yop_poll id=”3″], for example. I would like to be able to customize the id number. So I could make it [yop_poll id=”custom-name”]. Does that help?

    Plugin Author YOP

    (@yourownprogrammer)

    Hey envision_beats,

    You can do that but you’ll have to send the poll’s ID to the function that processes the poll.

    Edit inc/public-admin.php and on line 195 you will find the yop_poll_shortcode_function, that processes the ID. The parameters will then be sent to return_yop_poll.

    You can extract the parameters you want to add from the shortcode message, located in yop_poll_shortcode_function

    extract( shortcode_atts( array(
    ‘id’ => -1,
    ‘tr_id’ => ”,
    ‘offset’ => 0,
    ), $atts ) );

    and in the array that contains id, tr_id and offset you can add any other parameter you want.

    Best wishes,

    YOP Team

    Thread Starter envision_beats

    (@envision_beats)

    wow! perfect! Thank you so much. We really appreciate your time and effort. Going above an beyond. Thanks again, have a wonderful weekend!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Poll Shortcode edit’ is closed to new replies.