Changeset 2017101
- Timestamp:
- 01/22/2019 07:12:28 PM (7 years ago)
- Location:
- interact-quiz-embed
- Files:
-
- 2 edited
- 3 copied
-
tags/3.0.6 (copied) (copied from interact-quiz-embed/trunk)
-
tags/3.0.6/interact-quiz-embed.php (copied) (copied from interact-quiz-embed/trunk/interact-quiz-embed.php) (4 diffs)
-
tags/3.0.6/readme.txt (copied) (copied from interact-quiz-embed/trunk/readme.txt) (2 diffs)
-
trunk/interact-quiz-embed.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
interact-quiz-embed/tags/3.0.6/interact-quiz-embed.php
r1975142 r2017101 5 5 Description: Use this plugin to embed your Interact quiz into your Wordpress site. 6 6 Author: The Quiz Collective Inc. 7 Version: 3.0. 57 Version: 3.0.6 8 8 Author URI: https://www.tryinteract.com 9 9 … … 67 67 shortcode_atts(array('id'=>'', 'type'=>'quiz', 'w'=>'800', 'h'=>'800', 'no_cover'=>'false'), $atts); 68 68 69 wp_enqueue_script('interact-embed-script'); 70 69 71 if(isset($atts['w'])) { $width = $atts['w']; } else { $width = '800'; } 70 72 if(isset($atts['h'])) { $height = $atts['h']; } else { $height = '800'; } … … 125 127 function interact_scripts(){ 126 128 global $post; 127 128 // embed script if shortcode exists on page content129 if(is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'interact')) {130 ?>131 <script type="text/javascript">132 (function(d, t){133 var s=d.createElement(t);134 s.src='https://i.tryinteract.com/embed/app.js';135 s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs)if(rs!='complete')if(rs!='loaded')return;};136 var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr);137 })(document,'script');138 </script>139 <?php140 }141 129 142 130 // promotion script … … 157 145 158 146 147 148 /* 149 * 150 * Register the Script 151 * 152 */ 153 154 function interact_enqueue_scripts(){ 155 wp_register_script('interact-embed-script', plugins_url('interact-embed.js', __FILE__), null, '1.0', true); 156 } 157 158 add_action( 'wp_enqueue_scripts', 'interact_enqueue_scripts' ); 159 160 161 159 162 /* 160 163 * -
interact-quiz-embed/tags/3.0.6/readme.txt
r1975142 r2017101 3 3 Tags: interact, quiz, poll, giveaway, embed, shortcode, promotion 4 4 Requires at least: 3.0.1 5 Tested up to: 4.9.86 Stable tag: 3.0. 55 Tested up to: 5.0.3 6 Stable tag: 3.0.6 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 = 3.0.6 = 54 * Bug fixes. 55 53 56 = 3.0.5 = 54 57 * Added shortcode attribute redirect="host" to enable top-level browser redirection outside iframe. -
interact-quiz-embed/trunk/interact-quiz-embed.php
r1975142 r2017101 5 5 Description: Use this plugin to embed your Interact quiz into your Wordpress site. 6 6 Author: The Quiz Collective Inc. 7 Version: 3.0. 57 Version: 3.0.6 8 8 Author URI: https://www.tryinteract.com 9 9 … … 67 67 shortcode_atts(array('id'=>'', 'type'=>'quiz', 'w'=>'800', 'h'=>'800', 'no_cover'=>'false'), $atts); 68 68 69 wp_enqueue_script('interact-embed-script'); 70 69 71 if(isset($atts['w'])) { $width = $atts['w']; } else { $width = '800'; } 70 72 if(isset($atts['h'])) { $height = $atts['h']; } else { $height = '800'; } … … 125 127 function interact_scripts(){ 126 128 global $post; 127 128 // embed script if shortcode exists on page content129 if(is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'interact')) {130 ?>131 <script type="text/javascript">132 (function(d, t){133 var s=d.createElement(t);134 s.src='https://i.tryinteract.com/embed/app.js';135 s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs)if(rs!='complete')if(rs!='loaded')return;};136 var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr);137 })(document,'script');138 </script>139 <?php140 }141 129 142 130 // promotion script … … 157 145 158 146 147 148 /* 149 * 150 * Register the Script 151 * 152 */ 153 154 function interact_enqueue_scripts(){ 155 wp_register_script('interact-embed-script', plugins_url('interact-embed.js', __FILE__), null, '1.0', true); 156 } 157 158 add_action( 'wp_enqueue_scripts', 'interact_enqueue_scripts' ); 159 160 161 159 162 /* 160 163 * -
interact-quiz-embed/trunk/readme.txt
r1975142 r2017101 3 3 Tags: interact, quiz, poll, giveaway, embed, shortcode, promotion 4 4 Requires at least: 3.0.1 5 Tested up to: 4.9.86 Stable tag: 3.0. 55 Tested up to: 5.0.3 6 Stable tag: 3.0.6 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 = 3.0.6 = 54 * Bug fixes. 55 53 56 = 3.0.5 = 54 57 * Added shortcode attribute redirect="host" to enable top-level browser redirection outside iframe.
Note: See TracChangeset
for help on using the changeset viewer.