Plugin Directory

Changeset 1713923


Ignore:
Timestamp:
08/16/2017 05:37:58 AM (9 years ago)
Author:
vibhavsinha
Message:

updating to version 1.13

Location:
vdocipher
Files:
3 edited
4 copied

Legend:

Unmodified
Added
Removed
  • vdocipher/tags/1.13/include/options.php

    r1679687 r1713923  
    77}
    88?>
     9
    910<div class="wrap">
    1011<h2>VdoCipher Options</h2>
    1112
    12 <form method="post" action="options.php"> 
     13<form method="post" action="options.php">
    1314<?php
    1415settings_fields('vdo_option-group');
     
    2324        <td><input type="text" name="vdo_client_key"
    2425          value="<?php echo esc_attr(get_option('vdo_client_key')); ?>"
    25           max-length="64" size="60" id="vdo_client_key" /></td>
     26          max-length="64" style="width: 640px" id="vdo_client_key" /></td>
    2627        </tr>
    27          
     28
    2829        <tr valign="top">
    2930        <th scope="row">Default Width</th>
     
    3233        /></td>
    3334        </tr>
    34        
     35
    3536        <tr valign="top">
    3637        <th scope="row">Default Height</th>
     
    3940        /></td>
    4041        </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
    4293        <tr valign="top">
    4394        <th scope="row">Annotation Statement</th>
  • vdocipher/tags/1.13/readme.txt

    r1684111 r1713923  
    1 === vdocipher ===
     1=== Plugin Name ===
    22Contributors: vibhavsinha
    33Tags: video, DRM, video, sell video, e-learning, movie
    44Requires at least: 3.5.1
    5 Tested up to: 4.8
    6 Stable tag: 1.12
     5Tested up to: 4.8.1
     6Stable tag: 1.13
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 1.13 =
     53* New player with ability to choose player version
     54* Add custom themes from theplayer.io
     55
    5256= 1.8 =
    5357Bug fixes
  • vdocipher/tags/1.13/vdocipher.php

    r1679687 r1713923  
    44 * Plugin URI: http://www.vdocipher.com
    55 * Description: Secured video hosting for wordpress
    6  * Version: 1.12
     6 * Version: 1.13
    77 * Author: VdoCipher
    88 * Author URI: http://www.vdocipher.com
     
    115115        $version = $atts['version'];
    116116    }
    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;
    129158}
    130159
    131160add_shortcode('vdo', 'vdo_shortcode');
    132 
    133161
    134162/// adding the settings link
     
    142170    return $links;
    143171}
    144 
    145172
    146173/// add the menu item and register settings
     
    180207    register_setting('vdo_option-group', 'vdo_default_width');
    181208    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');
    182211}
    183212
     
    194223    delete_option('vdo_default_height');
    195224    delete_option('vdo_annotate_code');
     225    delete_option('vdo_embed_version');
     226    delete_option('vdo_player_theme');
    196227}
    197228function vdo_activate()
    198229{
    199230    if (!get_option('vdo_default_height')) {
    200         update_option('vdo_default_height', '400');
     231        update_option('vdo_default_height', '360');
    201232    }
    202233    if (!get_option('vdo_default_width')) {
    203234        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');
    204241    }
    205242}
  • vdocipher/trunk/include/options.php

    r1679687 r1713923  
    77}
    88?>
     9
    910<div class="wrap">
    1011<h2>VdoCipher Options</h2>
    1112
    12 <form method="post" action="options.php"> 
     13<form method="post" action="options.php">
    1314<?php
    1415settings_fields('vdo_option-group');
     
    2324        <td><input type="text" name="vdo_client_key"
    2425          value="<?php echo esc_attr(get_option('vdo_client_key')); ?>"
    25           max-length="64" size="60" id="vdo_client_key" /></td>
     26          max-length="64" style="width: 640px" id="vdo_client_key" /></td>
    2627        </tr>
    27          
     28
    2829        <tr valign="top">
    2930        <th scope="row">Default Width</th>
     
    3233        /></td>
    3334        </tr>
    34        
     35
    3536        <tr valign="top">
    3637        <th scope="row">Default Height</th>
     
    3940        /></td>
    4041        </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
    4293        <tr valign="top">
    4394        <th scope="row">Annotation Statement</th>
  • vdocipher/trunk/readme.txt

    r1684111 r1713923  
    1 === vdocipher ===
     1=== Plugin Name ===
    22Contributors: vibhavsinha
    33Tags: video, DRM, video, sell video, e-learning, movie
    44Requires at least: 3.5.1
    5 Tested up to: 4.8
    6 Stable tag: 1.12
     5Tested up to: 4.8.1
     6Stable tag: 1.13
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 1.13 =
     53* New player with ability to choose player version
     54* Add custom themes from theplayer.io
     55
    5256= 1.8 =
    5357Bug fixes
  • vdocipher/trunk/vdocipher.php

    r1679687 r1713923  
    44 * Plugin URI: http://www.vdocipher.com
    55 * Description: Secured video hosting for wordpress
    6  * Version: 1.12
     6 * Version: 1.13
    77 * Author: VdoCipher
    88 * Author URI: http://www.vdocipher.com
     
    115115        $version = $atts['version'];
    116116    }
    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;
    129158}
    130159
    131160add_shortcode('vdo', 'vdo_shortcode');
    132 
    133161
    134162/// adding the settings link
     
    142170    return $links;
    143171}
    144 
    145172
    146173/// add the menu item and register settings
     
    180207    register_setting('vdo_option-group', 'vdo_default_width');
    181208    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');
    182211}
    183212
     
    194223    delete_option('vdo_default_height');
    195224    delete_option('vdo_annotate_code');
     225    delete_option('vdo_embed_version');
     226    delete_option('vdo_player_theme');
    196227}
    197228function vdo_activate()
    198229{
    199230    if (!get_option('vdo_default_height')) {
    200         update_option('vdo_default_height', '400');
     231        update_option('vdo_default_height', '360');
    201232    }
    202233    if (!get_option('vdo_default_width')) {
    203234        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');
    204241    }
    205242}
Note: See TracChangeset for help on using the changeset viewer.