You appear to be a bot. Output may be restricted
Description
JavaScript code for a specific survey / poll.
Usage
CrowdsignalShortcode::get_async_code( $settings, $survey_link, $survey_url );
Parameters
- $settings
- ( array ) required – Array of information about a survey / poll.
- $survey_link
- ( string ) required – HTML link tag for a specific survey or poll.
- $survey_url
- ( string ) required – Link to the survey or poll.
Returns
void
Source
File name: jetpack/modules/shortcodes/crowdsignal.php
Lines:
1 to 20 of 20
private function get_async_code( array $settings, $survey_link, $survey_url ) { wp_enqueue_script( 'crowdsignal-survey' ); if ( 'button' === $settings['type'] ) { $placeholder = sprintf( '<a class="cs-embed pd-embed" href="%1$s" data-settings="%2$s">%3$s</a>', esc_url( $survey_url ), esc_attr( wp_json_encode( $settings ) ), esc_html( $settings['title'] ) ); } else { $placeholder = sprintf( '<div class="cs-embed pd-embed" data-settings="%1$s"></div><noscript>%2$s</noscript>', esc_attr( wp_json_encode( $settings ) ), $survey_link ); } return $placeholder; }