�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`�
Warning: session_start(): Session cannot be started after headers have already been sent in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 132

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 135

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 547

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 548

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 549

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 550

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 551
%3$s', esc_url( $survey_url ), esc_attr( wp_json_encode( $settings, JSON_HEX_AMP | JSON_UNESCAPED_SLASHES ) ), esc_html( $settings['title'] ) ); } else { $placeholder = sprintf( '
', esc_attr( wp_json_encode( $settings, JSON_HEX_AMP | JSON_UNESCAPED_SLASHES ) ), $survey_link ); } return $placeholder; } /** * Crowdsignal Poll Embed script - transforms code that looks like that: * * * into the [crowdsignal poll=...] shortcode format * * @param string $content Post content. */ public function crowdsignal_embed_to_shortcode( $content ) { if ( ! is_string( $content ) || ! str_contains( $content, 'polldaddy.com/p/' ) ) { return $content; } $regexes = array(); $regexes[] = '#]+?src="https?://(secure|static)\.polldaddy\.com/p/([0-9]+)\.js"[^>]*+>\s*?\r?\n?()?#i'; $regexes[] = '#<script(?:[^&]|&(?!gt;))+?src="https?://(secure|static)\.polldaddy\.com/p/([0-9]+)\.js"(?:[^&]|&(?!gt;))*+>\s*?</script>\r?\n?(<noscript>.*?</noscript>)?#i'; foreach ( $regexes as $regex ) { if ( ! preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) ) { continue; } foreach ( $matches as $match ) { if ( ! isset( $match[2] ) ) { continue; } $id = (int) $match[2]; if ( $id > 0 ) { $content = str_replace( $match[0], " [crowdsignal poll=$id]", $content ); /** This action is documented in modules/shortcodes/youtube.php */ do_action( 'jetpack_embed_to_shortcode', 'crowdsignal', $id ); } } } return $content; } /** * Support for legacy Polldaddy shortcode. * * @param array $atts Shortcode attributes. */ public function polldaddy_shortcode( $atts ) { if ( ! is_array( $atts ) ) { return ''; } $atts['site'] = 'polldaddy.com'; return $this->crowdsignal_shortcode( $atts ); } /** * Shortcode for Crowdsignal * [crowdsignal poll|survey|rating="123456"] * * @param array $atts Shortcode attributes. */ public function crowdsignal_shortcode( $atts ) { global $post; global $content_width; if ( ! is_array( $atts ) ) { return ''; } $attributes = shortcode_atts( array( 'survey' => null, 'link_text' => esc_html__( 'Take Our Survey', 'jetpack' ), 'poll' => 'empty', 'rating' => 'empty', 'unique_id' => null, 'item_id' => null, 'title' => null, 'permalink' => null, 'cb' => 0, // cache buster. Helps with testing. 'type' => 'button', 'body' => '', 'button' => '', 'text_color' => '000000', 'back_color' => 'FFFFFF', 'align' => '', 'style' => '', 'width' => $content_width, 'height' => floor( $content_width * 3 / 4 ), 'delay' => 100, 'visit' => 'single', 'domain' => '', 'id' => '', 'site' => 'crowdsignal.com', ), $atts, 'crowdsignal' ); $inline = ! in_the_loop() && ! Constants::is_defined( 'TESTING_IN_JETPACK' ); $infinite_scroll = false; if ( is_home() && current_theme_supports( 'infinite-scroll' ) ) { $infinite_scroll = true; } if ( function_exists( 'get_option' ) && get_option( 'polldaddy_load_poll_inline' ) ) { $inline = true; } self::$add_script = $infinite_scroll; /* * Rating embed. */ if ( (int) $attributes['rating'] > 0 ) { $post_id = $post instanceof WP_Post ? $post->ID : get_the_ID(); $post_id = $post_id ?? ''; if ( empty( $attributes['unique_id'] ) ) { $attributes['unique_id'] = is_page() ? 'wp-page-' . $post_id : 'wp-post-' . $post_id; } if ( empty( $attributes['item_id'] ) ) { $attributes['item_id'] = is_page() ? '_page_' . $post_id : '_post_' . $post_id; } if ( empty( $attributes['title'] ) ) { $title = $post instanceof WP_Post ? $post->post_title : get_the_title(); /** This filter is documented in core/src/wp-includes/general-template.php */ $attributes['title'] = apply_filters( 'wp_title', $title, '', '' ); } if ( empty( $attributes['permalink'] ) ) { if ( $post_id ) { $attributes['permalink'] = get_permalink( $post_id ); } else { $attributes['permalink'] = home_url( add_query_arg( array() ) ); } } $rating = (int) $attributes['rating']; $unique_id = sanitize_key( wp_strip_all_tags( $attributes['unique_id'] ) ); $item_id = wp_strip_all_tags( $attributes['item_id'] ); $item_id = preg_replace( '/[^_a-z0-9]/i', '', $item_id ); $settings = wp_json_encode( array( 'id' => $rating, 'unique_id' => $unique_id, 'title' => rawurlencode( trim( $attributes['title'] ) ), 'permalink' => esc_url( $attributes['permalink'] ), 'item_id' => $item_id, ), JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ); if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { return sprintf( '%s', esc_url( $attributes['permalink'] ), esc_html( trim( $attributes['title'] ) ) ); } elseif ( $inline ) { $rating_js = ""; wp_enqueue_script( 'crowdsignal-rating' ); wp_add_inline_script( 'crowdsignal-rating', $rating_js, 'before' ); return sprintf( '
', absint( $rating ), esc_attr( $item_id ) ); } else { if ( false === self::$scripts ) { self::$scripts = array(); } $data = array( 'id' => $rating, 'item_id' => $item_id, 'settings' => $settings, ); self::$scripts['rating'][] = $data; add_action( 'wp_footer', array( $this, 'generate_scripts' ) ); if ( $infinite_scroll ) { return sprintf( '
', absint( $rating ), esc_attr( $item_id ), esc_attr( wp_json_encode( $data, JSON_HEX_AMP | JSON_UNESCAPED_SLASHES ) ) ); } else { return sprintf( '
', absint( $rating ), esc_attr( $item_id ) ); } } } elseif ( (int) $attributes['poll'] > 0 ) { /* * Poll embed. */ if ( empty( $attributes['title'] ) ) { $attributes['title'] = esc_html__( 'Take Our Poll', 'jetpack' ); } $poll = (int) $attributes['poll']; if ( 'crowdsignal.com' === $attributes['site'] ) { $poll_url = sprintf( 'https://poll.fm/%d', $poll ); } else { $poll_url = sprintf( 'https://polldaddy.com/p/%d', $poll ); } $poll_js = sprintf( 'https://secure.polldaddy.com/p/%d.js', $poll ); $poll_link = sprintf( '%s', esc_url( $poll_url ), esc_html( $attributes['title'] ) ); if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { return $poll_link; } elseif ( 'slider' === $attributes['type'] && ! $inline ) { // Slider poll. if ( ! in_array( $attributes['visit'], array( 'single', 'multiple' ), true ) ) { $attributes['visit'] = 'single'; } $settings = array( 'type' => 'slider', 'embed' => 'poll', 'delay' => (int) $attributes['delay'], 'visit' => $attributes['visit'], 'id' => $poll, 'site' => $attributes['site'], ); return $this->get_async_code( $settings, $poll_link, $poll_url ); } else { if ( 1 === $attributes['cb'] ) { $attributes['cb'] = '?cb=' . time(); } else { $attributes['cb'] = false; } $margins = ''; $float = ''; if ( in_array( $attributes['align'], array( 'right', 'left' ), true ) ) { $float = sprintf( 'float: %s;', $attributes['align'] ); if ( 'left' === $attributes['align'] ) { $margins = 'margin: 0 10px 0 0;'; } elseif ( 'right' === $attributes['align'] ) { $margins = 'margin: 0 0 0 10px'; } } /* * Force the normal style embed on single posts/pages * otherwise it's not rendered on infinite scroll themed blogs * ('infinite_scroll_render' isn't fired) */ if ( is_singular() ) { $inline = true; } if ( false === $attributes['cb'] && ! $inline ) { if ( false === self::$scripts ) { self::$scripts = array(); } $data = array( 'url' => $poll_js ); self::$scripts['poll'][ $poll ] = $data; add_action( 'wp_footer', array( $this, 'generate_scripts' ) ); wp_enqueue_script( 'crowdsignal-shortcode' ); wp_localize_script( 'crowdsignal-shortcode', 'crowdsignal_shortcode_options', array( 'script_url' => esc_url_raw( Assets::get_file_url_for_environment( '_inc/build/polldaddy-shortcode.min.js', '_inc/polldaddy-shortcode.js' ) ), ) ); /** * Hook into the Crowdsignal shortcode before rendering. * * @since 8.4.0 * * @param int $poll Poll ID. */ do_action( 'crowdsignal_shortcode_before', $poll ); return sprintf( '
', absint( $poll ), esc_attr( wp_json_encode( $data, JSON_HEX_AMP | JSON_UNESCAPED_SLASHES ) ), $float, $margins, $poll_link ); } else { if ( $inline ) { $attributes['cb'] = ''; } wp_enqueue_script( 'crowdsignal-' . absint( $poll ), esc_url( $poll_js . $attributes['cb'] ), array(), JETPACK__VERSION, true ); /** This action is already documented in modules/shortcodes/crowdsignal.php */ do_action( 'crowdsignal_shortcode_before', $poll ); return sprintf( '
', absint( $poll ), $float, $margins, $poll_link ); } } } elseif ( ! empty( $attributes['survey'] ) ) { /* * Survey embed. */ if ( in_array( $attributes['type'], array( 'iframe', 'button', 'banner', 'slider' ), true ) ) { if ( empty( $attributes['title'] ) ) { $attributes['title'] = esc_html__( 'Take Our Survey', 'jetpack' ); if ( ! empty( $attributes['link_text'] ) ) { $attributes['title'] = $attributes['link_text']; } } if ( 'banner' === $attributes['type'] || 'slider' === $attributes['type'] ) { $inline = false; } $survey_url = ''; if ( 'true' !== $attributes['survey'] ) { $survey = preg_replace( '/[^a-f0-9]/i', '', $attributes['survey'] ); if ( 'crowdsignal.com' === $attributes['site'] ) { $survey_url = 'https://survey.fm/' . $survey; } else { $survey_url = 'https://polldaddy.com/s/' . $survey; } } elseif ( isset( $attributes['domain'] ) && isset( $attributes['id'] ) ) { $survey_domain = preg_replace( '/[^a-z0-9\-]/i', '', $attributes['domain'] ); $survey_id = preg_replace( '/[\/\?&\{\}]/', '', $attributes['id'] ); $survey_url = sprintf( 'https://%1$s.survey.fm/%2$s', $survey_domain, $survey_id ); } $survey_link = sprintf( '%s', esc_url( $survey_url ), esc_html( $attributes['title'] ) ); $settings = array(); if ( 'iframe' === $attributes['type'] ) { if ( 'auto' !== $attributes['height'] ) { if ( is_numeric( $content_width ) && $content_width > 0 && is_numeric( $attributes['width'] ) && $attributes['width'] > $content_width ) { $attributes['width'] = $content_width; } if ( empty( $attributes['width'] ) ) { $attributes['width'] = '100%'; } else { $attributes['width'] = (int) $attributes['width']; } if ( ! $attributes['height'] ) { $attributes['height'] = '600'; } else { $attributes['height'] = (int) $attributes['height']; } return sprintf( '', esc_url( $survey_url ), absint( $attributes['width'] ), absint( $attributes['height'] ), $survey_link ); } elseif ( ! empty( $attributes['domain'] ) && ! empty( $attributes['id'] ) ) { $domain = preg_replace( '/[^a-z0-9\-]/i', '', $attributes['domain'] ); $id = preg_replace( '/[\/\?&\{\}]/', '', $attributes['id'] ); $auto_src = esc_url( "https://{$domain}.survey.fm/{$id}" ); $auto_src = wp_parse_url( $auto_src ); if ( ! is_array( $auto_src ) || array() === $auto_src ) { return ''; } if ( ! isset( $auto_src['host'] ) || ! isset( $auto_src['path'] ) ) { return ''; } $domain = $auto_src['host'] . '/'; $id = ltrim( $auto_src['path'], '/' ); $settings = array( 'type' => $attributes['type'], 'auto' => true, 'domain' => $domain, 'id' => $id, 'site' => $attributes['site'], ); } } else { $text_color = sanitize_hex_color_no_hash( $attributes['text_color'] ); $back_color = sanitize_hex_color_no_hash( $attributes['back_color'] ); if ( ! in_array( $attributes['align'], array( 'right', 'left', 'top-left', 'top-right', 'middle-left', 'middle-right', 'bottom-left', 'bottom-right', ), true ) ) { $attributes['align'] = ''; } if ( ! in_array( $attributes['style'], array( 'inline', 'side', 'corner', 'rounded', 'square', ), true ) ) { $attributes['style'] = ''; } $settings = array_filter( array( 'title' => wp_strip_all_tags( $attributes['title'] ), 'type' => $attributes['type'], 'body' => wp_strip_all_tags( $attributes['body'] ), 'button' => wp_strip_all_tags( $attributes['button'] ), 'text_color' => $text_color, 'back_color' => $back_color, 'align' => $attributes['align'], 'style' => $attributes['style'], 'id' => $survey ?? null, 'site' => $attributes['site'], ) ); } if ( empty( $settings ) ) { return ''; } return $this->get_async_code( $settings, $survey_link, $survey_url ); } } else { return ''; } } /** * Enqueue JavaScript containing all ratings / polls on the page. * Hooked into wp_footer */ public function generate_scripts() { if ( is_array( self::$scripts ) ) { if ( isset( self::$scripts['rating'] ) ) { $script = ""; wp_enqueue_script( 'crowdsignal-rating' ); wp_add_inline_script( 'crowdsignal-rating', $script, 'before' ); } if ( isset( self::$scripts['poll'] ) ) { foreach ( self::$scripts['poll'] as $poll_id => $poll ) { wp_enqueue_script( 'crowdsignal-' . absint( $poll_id ), esc_url( $poll['url'] ), array(), JETPACK__VERSION, true ); } } } self::$scripts = false; } /** * Dynamically load the .js, if needed * * This hooks in late (priority 11) to infinite_scroll_render to determine * a posteriori if a shortcode has been called. */ public function crowdsignal_shortcode_infinite() { // only try to load if a shortcode has been called and theme supports infinite scroll. if ( self::$add_script ) { wp_enqueue_script( 'crowdsignal-shortcode' ); wp_localize_script( 'crowdsignal-shortcode', 'crowdsignal_shortcode_options', array( 'script_url' => esc_url_raw( Assets::get_file_url_for_environment( '_inc/build/polldaddy-shortcode.min.js', '_inc/polldaddy-shortcode.js' ) ), ) ); } } } // Kick it all off. new CrowdsignalShortcode(); if ( ! function_exists( 'crowdsignal_link' ) ) { /** * Replace link with shortcode. * Examples: https://poll.fm/10499328 | https://7iger.survey.fm/test-embed * * @param string $content Post content. */ function crowdsignal_link( $content ) { if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { return $content; } // Replace poll links. $content = jetpack_preg_replace_outside_tags( '!(?:\n|\A)https?://(polldaddy\.com/poll|poll\.fm)/([0-9]+?)(/.*)?(?:\n|\Z)!i', '[crowdsignal poll=$2]', $content ); // Replace survey.fm links. $content = jetpack_preg_replace_outside_tags( '!(?:\n|\A)https?:\/\/([^"\'.]+)\.survey\.fm\/([^"\'\/\s]+)(?:\/.*)?(?:\n|\Z)!i', '[crowdsignal type="iframe" survey="true" height="auto" domain="$1" id="$2"]', $content ); return $content; } // higher priority because we need it before auto-link and autop get to it. add_filter( 'the_content', 'crowdsignal_link', 1 ); add_filter( 'the_content_rss', 'crowdsignal_link', 1 ); } }