Changeset 1713923
- Timestamp:
- 08/16/2017 05:37:58 AM (9 years ago)
- Location:
- vdocipher
- Files:
-
- 3 edited
- 4 copied
-
tags/1.13 (copied) (copied from vdocipher/trunk)
-
tags/1.13/include/options.php (copied) (copied from vdocipher/trunk/include/options.php) (4 diffs)
-
tags/1.13/readme.txt (copied) (copied from vdocipher/trunk/readme.txt) (2 diffs)
-
tags/1.13/vdocipher.php (copied) (copied from vdocipher/trunk/vdocipher.php) (5 diffs)
-
trunk/include/options.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vdocipher.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vdocipher/tags/1.13/include/options.php
r1679687 r1713923 7 7 } 8 8 ?> 9 9 10 <div class="wrap"> 10 11 <h2>VdoCipher Options</h2> 11 12 12 <form method="post" action="options.php"> 13 <form method="post" action="options.php"> 13 14 <?php 14 15 settings_fields('vdo_option-group'); … … 23 24 <td><input type="text" name="vdo_client_key" 24 25 value="<?php echo esc_attr(get_option('vdo_client_key')); ?>" 25 max-length="64" s ize="60" id="vdo_client_key" /></td>26 max-length="64" style="width: 640px" id="vdo_client_key" /></td> 26 27 </tr> 27 28 28 29 <tr valign="top"> 29 30 <th scope="row">Default Width</th> … … 32 33 /></td> 33 34 </tr> 34 35 35 36 <tr valign="top"> 36 37 <th scope="row">Default Height</th> … … 39 40 /></td> 40 41 </tr> 41 42 43 <!-- Version Number --> 44 <?php 45 if (empty(get_option('vdo_embed_version'))) { 46 update_option('vdo_embed_version', '0.5'); 47 } 48 ?> 49 <tr valign="top"> 50 <th scope="row">Player Version</th> 51 <td> 52 <?php $vdo_embed_version_vars = array('0.5', '1.0.0'); ?> 53 <select name="vdo_embed_version" id="vdo_embed_version"> 54 <?php 55 $vdo_embed_version_str = get_option('vdo_embed_version'); 56 ?> 57 <?php 58 foreach($vdo_embed_version_vars as $vdo_embed_version_var) { 59 if ($vdo_embed_version_str == $vdo_embed_version_var) { 60 $selected = 'selected="selected"'; } 61 else { $selected = ''; } 62 63 if($vdo_embed_version_var == '0.5') { 64 $version_old_new = ' (old player)' ; } 65 elseif ($vdo_embed_version_var == '1.0.0') { 66 $version_old_new = ' (new player)' ; } 67 else {'' ; } 68 ?> 69 <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> > 70 <?php echo $vdo_embed_version_var . $version_old_new ; ?> 71 </option> 72 <?php } ?> 73 </select> 74 </td> 75 </tr> 76 77 <!-- Player Theme Options --> 78 <?php 79 if (empty(get_option('vdo_player_theme'))) { 80 update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); 81 } 82 ?> 83 <tr valign="top"> 84 <th scope="row">Player Theme</th> 85 <td> 86 <input type="text" name="vdo_player_theme" 87 value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>" max-length = "32" style="width: 320px" 88 /> 89 <p class="description">Player theme is not available for old player version(0.5). The default theme will be applied for old player.</p> 90 </td> 91 </tr> 92 42 93 <tr valign="top"> 43 94 <th scope="row">Annotation Statement</th> -
vdocipher/tags/1.13/readme.txt
r1684111 r1713923 1 === vdocipher===1 === Plugin Name === 2 2 Contributors: vibhavsinha 3 3 Tags: video, DRM, video, sell video, e-learning, movie 4 4 Requires at least: 3.5.1 5 Tested up to: 4.8 6 Stable tag: 1.1 25 Tested up to: 4.8.1 6 Stable tag: 1.13 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 50 50 == Changelog == 51 51 52 = 1.13 = 53 * New player with ability to choose player version 54 * Add custom themes from theplayer.io 55 52 56 = 1.8 = 53 57 Bug fixes -
vdocipher/tags/1.13/vdocipher.php
r1679687 r1713923 4 4 * Plugin URI: http://www.vdocipher.com 5 5 * Description: Secured video hosting for wordpress 6 * Version: 1.1 26 * Version: 1.13 7 7 * Author: VdoCipher 8 8 * Author URI: http://www.vdocipher.com … … 115 115 $version = $atts['version']; 116 116 } 117 $output = "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; 118 $output .= "<script> (function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){". 119 " (v[o].d=v[o].d||[]).push(a);};"; 120 $output .= "if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0]; a.async=1; ". 121 "a.src=e; m.parentNode.insertBefore(a,m);}"; 122 $output .= " })(window,document,'script','//de122v0opjemw.cloudfront.net/vdo.js','vdo'); vdo.add({ "; 123 $output .= "o: '$OTP', "; 124 if ($version == 32) { 125 $output .= "version: '$version' "; 126 } 127 $output .= "}); </script>"; 128 return $output; 117 if (empty(get_option('vdo_embed_version'))) { 118 update_option('vdo_embed_version', '0.5'); 119 } 120 if (empty(get_option('vdo_player_theme'))) { 121 update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); 122 } 123 $vdo_embed_version_str = get_option('vdo_embed_version'); 124 $vdo_player_theme = get_option('vdo_player_theme'); 125 126 // Old Embed Code 127 if($vdo_embed_version_str === '0.5') { 128 $output = "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; 129 $output .= "<script> (function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){". 130 " (v[o].d=v[o].d||[]).push(a);};"; 131 $output .= "if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0]; a.async=1; ". 132 "a.src=e; m.parentNode.insertBefore(a,m);}"; 133 $output .= " })(window,document,'script','//de122v0opjemw.cloudfront.net/vdo.js','vdo'); vdo.add({ "; 134 $output .= "o: '$OTP', "; 135 if ($version == 32) { 136 $output .= "version: '$version' "; 137 } 138 $output .= "}); </script>"; 139 } 140 //New embed code 141 else { 142 $output .= "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; 143 $output .= "<script>(function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){ (v[o].d=v[o].d||[]).push(a);};"; 144 $output .= "if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0];"; 145 $output .= "a.async=1; a.src=e; m.parentNode.insertBefore(a,m);}"; 146 $output .= "})(window,document,'script','https://d1z78r8i505acl.cloudfront.net/playerAssets/"; 147 $output .= "$vdo_embed_version_str"; 148 $output .= "/vdo.js','vdo');"; 149 $output .= "vdo.add({"; 150 $output .= "otp: '$OTP',"; 151 $output .= "playbackInfo: btoa(JSON.stringify({"; 152 $output .= "videoId: '$video'})),"; 153 $output .= "theme: '$vdo_player_theme',"; 154 $output .= "container: document.querySelector('#vdo$OTP'),});"; 155 $output .= "</script>"; 156 } 157 return $output; 129 158 } 130 159 131 160 add_shortcode('vdo', 'vdo_shortcode'); 132 133 161 134 162 /// adding the settings link … … 142 170 return $links; 143 171 } 144 145 172 146 173 /// add the menu item and register settings … … 180 207 register_setting('vdo_option-group', 'vdo_default_width'); 181 208 register_setting('vdo_option-group', 'vdo_annotate_code'); 209 register_setting('vdo_option-group', 'vdo_embed_version'); 210 register_setting('vdo_option-group', 'vdo_player_theme'); 182 211 } 183 212 … … 194 223 delete_option('vdo_default_height'); 195 224 delete_option('vdo_annotate_code'); 225 delete_option('vdo_embed_version'); 226 delete_option('vdo_player_theme'); 196 227 } 197 228 function vdo_activate() 198 229 { 199 230 if (!get_option('vdo_default_height')) { 200 update_option('vdo_default_height', ' 400');231 update_option('vdo_default_height', '360'); 201 232 } 202 233 if (!get_option('vdo_default_width')) { 203 234 update_option('vdo_default_width', '640'); 235 } 236 if (empty(get_option('vdo_embed_version'))) { 237 update_option('vdo_embed_version', '0.5'); 238 } 239 if (empty(get_option('vdo_player_theme'))) { 240 update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); 204 241 } 205 242 } -
vdocipher/trunk/include/options.php
r1679687 r1713923 7 7 } 8 8 ?> 9 9 10 <div class="wrap"> 10 11 <h2>VdoCipher Options</h2> 11 12 12 <form method="post" action="options.php"> 13 <form method="post" action="options.php"> 13 14 <?php 14 15 settings_fields('vdo_option-group'); … … 23 24 <td><input type="text" name="vdo_client_key" 24 25 value="<?php echo esc_attr(get_option('vdo_client_key')); ?>" 25 max-length="64" s ize="60" id="vdo_client_key" /></td>26 max-length="64" style="width: 640px" id="vdo_client_key" /></td> 26 27 </tr> 27 28 28 29 <tr valign="top"> 29 30 <th scope="row">Default Width</th> … … 32 33 /></td> 33 34 </tr> 34 35 35 36 <tr valign="top"> 36 37 <th scope="row">Default Height</th> … … 39 40 /></td> 40 41 </tr> 41 42 43 <!-- Version Number --> 44 <?php 45 if (empty(get_option('vdo_embed_version'))) { 46 update_option('vdo_embed_version', '0.5'); 47 } 48 ?> 49 <tr valign="top"> 50 <th scope="row">Player Version</th> 51 <td> 52 <?php $vdo_embed_version_vars = array('0.5', '1.0.0'); ?> 53 <select name="vdo_embed_version" id="vdo_embed_version"> 54 <?php 55 $vdo_embed_version_str = get_option('vdo_embed_version'); 56 ?> 57 <?php 58 foreach($vdo_embed_version_vars as $vdo_embed_version_var) { 59 if ($vdo_embed_version_str == $vdo_embed_version_var) { 60 $selected = 'selected="selected"'; } 61 else { $selected = ''; } 62 63 if($vdo_embed_version_var == '0.5') { 64 $version_old_new = ' (old player)' ; } 65 elseif ($vdo_embed_version_var == '1.0.0') { 66 $version_old_new = ' (new player)' ; } 67 else {'' ; } 68 ?> 69 <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> > 70 <?php echo $vdo_embed_version_var . $version_old_new ; ?> 71 </option> 72 <?php } ?> 73 </select> 74 </td> 75 </tr> 76 77 <!-- Player Theme Options --> 78 <?php 79 if (empty(get_option('vdo_player_theme'))) { 80 update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); 81 } 82 ?> 83 <tr valign="top"> 84 <th scope="row">Player Theme</th> 85 <td> 86 <input type="text" name="vdo_player_theme" 87 value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>" max-length = "32" style="width: 320px" 88 /> 89 <p class="description">Player theme is not available for old player version(0.5). The default theme will be applied for old player.</p> 90 </td> 91 </tr> 92 42 93 <tr valign="top"> 43 94 <th scope="row">Annotation Statement</th> -
vdocipher/trunk/readme.txt
r1684111 r1713923 1 === vdocipher===1 === Plugin Name === 2 2 Contributors: vibhavsinha 3 3 Tags: video, DRM, video, sell video, e-learning, movie 4 4 Requires at least: 3.5.1 5 Tested up to: 4.8 6 Stable tag: 1.1 25 Tested up to: 4.8.1 6 Stable tag: 1.13 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 50 50 == Changelog == 51 51 52 = 1.13 = 53 * New player with ability to choose player version 54 * Add custom themes from theplayer.io 55 52 56 = 1.8 = 53 57 Bug fixes -
vdocipher/trunk/vdocipher.php
r1679687 r1713923 4 4 * Plugin URI: http://www.vdocipher.com 5 5 * Description: Secured video hosting for wordpress 6 * Version: 1.1 26 * Version: 1.13 7 7 * Author: VdoCipher 8 8 * Author URI: http://www.vdocipher.com … … 115 115 $version = $atts['version']; 116 116 } 117 $output = "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; 118 $output .= "<script> (function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){". 119 " (v[o].d=v[o].d||[]).push(a);};"; 120 $output .= "if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0]; a.async=1; ". 121 "a.src=e; m.parentNode.insertBefore(a,m);}"; 122 $output .= " })(window,document,'script','//de122v0opjemw.cloudfront.net/vdo.js','vdo'); vdo.add({ "; 123 $output .= "o: '$OTP', "; 124 if ($version == 32) { 125 $output .= "version: '$version' "; 126 } 127 $output .= "}); </script>"; 128 return $output; 117 if (empty(get_option('vdo_embed_version'))) { 118 update_option('vdo_embed_version', '0.5'); 119 } 120 if (empty(get_option('vdo_player_theme'))) { 121 update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); 122 } 123 $vdo_embed_version_str = get_option('vdo_embed_version'); 124 $vdo_player_theme = get_option('vdo_player_theme'); 125 126 // Old Embed Code 127 if($vdo_embed_version_str === '0.5') { 128 $output = "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; 129 $output .= "<script> (function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){". 130 " (v[o].d=v[o].d||[]).push(a);};"; 131 $output .= "if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0]; a.async=1; ". 132 "a.src=e; m.parentNode.insertBefore(a,m);}"; 133 $output .= " })(window,document,'script','//de122v0opjemw.cloudfront.net/vdo.js','vdo'); vdo.add({ "; 134 $output .= "o: '$OTP', "; 135 if ($version == 32) { 136 $output .= "version: '$version' "; 137 } 138 $output .= "}); </script>"; 139 } 140 //New embed code 141 else { 142 $output .= "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; 143 $output .= "<script>(function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){ (v[o].d=v[o].d||[]).push(a);};"; 144 $output .= "if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0];"; 145 $output .= "a.async=1; a.src=e; m.parentNode.insertBefore(a,m);}"; 146 $output .= "})(window,document,'script','https://d1z78r8i505acl.cloudfront.net/playerAssets/"; 147 $output .= "$vdo_embed_version_str"; 148 $output .= "/vdo.js','vdo');"; 149 $output .= "vdo.add({"; 150 $output .= "otp: '$OTP',"; 151 $output .= "playbackInfo: btoa(JSON.stringify({"; 152 $output .= "videoId: '$video'})),"; 153 $output .= "theme: '$vdo_player_theme',"; 154 $output .= "container: document.querySelector('#vdo$OTP'),});"; 155 $output .= "</script>"; 156 } 157 return $output; 129 158 } 130 159 131 160 add_shortcode('vdo', 'vdo_shortcode'); 132 133 161 134 162 /// adding the settings link … … 142 170 return $links; 143 171 } 144 145 172 146 173 /// add the menu item and register settings … … 180 207 register_setting('vdo_option-group', 'vdo_default_width'); 181 208 register_setting('vdo_option-group', 'vdo_annotate_code'); 209 register_setting('vdo_option-group', 'vdo_embed_version'); 210 register_setting('vdo_option-group', 'vdo_player_theme'); 182 211 } 183 212 … … 194 223 delete_option('vdo_default_height'); 195 224 delete_option('vdo_annotate_code'); 225 delete_option('vdo_embed_version'); 226 delete_option('vdo_player_theme'); 196 227 } 197 228 function vdo_activate() 198 229 { 199 230 if (!get_option('vdo_default_height')) { 200 update_option('vdo_default_height', ' 400');231 update_option('vdo_default_height', '360'); 201 232 } 202 233 if (!get_option('vdo_default_width')) { 203 234 update_option('vdo_default_width', '640'); 235 } 236 if (empty(get_option('vdo_embed_version'))) { 237 update_option('vdo_embed_version', '0.5'); 238 } 239 if (empty(get_option('vdo_player_theme'))) { 240 update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); 204 241 } 205 242 }
Note: See TracChangeset
for help on using the changeset viewer.