| @@ -5,13 +5,12 @@ | ||
| 5 | 5 | "</head><body>\r\n<h1>Not Found</h1>\r\n<p>The requested URL " . $_SERVER['SCRIPT_NAME'] . " was not found on ". |
| 6 | 6 | "this server.</p>\r\n</body></html>"); |
| 7 | 7 | } |
| 8 | 8 | ?> |
| 9 | - | |
| 10 | 9 | <div class="wrap"> |
| 11 | 10 | <h2>VdoCipher Options</h2> |
| 12 | 11 | |
| 13 | -<form method="post" action="options.php"> | |
| 12 | +<form method="post" action="options.php"> | |
| 14 | 13 | <?php |
| 15 | 14 | settings_fields('vdo_option-group'); |
| 16 | 15 | do_settings_sections('vdo_option-group'); |
| 17 | 16 | ?> |
| @@ -22,11 +21,11 @@ | ||
| 22 | 21 | <tr valign="top"> |
| 23 | 22 | <th scope="row">Client Secret Key</th> |
| 24 | 23 | <td><input type="text" name="vdo_client_key" |
| 25 | 24 | value="<?php echo esc_attr(get_option('vdo_client_key')); ?>" |
| 26 | - max-length="64" style="width: 640px" id="vdo_client_key" /></td> | |
| 25 | + max-length="64" size="60" id="vdo_client_key" /></td> | |
| 27 | 26 | </tr> |
| 28 | - | |
| 27 | + | |
| 29 | 28 | <tr valign="top"> |
| 30 | 29 | <th scope="row">Default Width</th> |
| 31 | 30 | <td><input type="text" name="vdo_default_width" |
| 32 | 31 | value="<?php echo esc_attr(get_option('vdo_default_width')); ?>" |
| @@ -31,9 +30,9 @@ | ||
| 31 | 30 | <td><input type="text" name="vdo_default_width" |
| 32 | 31 | value="<?php echo esc_attr(get_option('vdo_default_width')); ?>" |
| 33 | 32 | /></td> |
| 34 | 33 | </tr> |
| 35 | - | |
| 34 | + | |
| 36 | 35 | <tr valign="top"> |
| 37 | 36 | <th scope="row">Default Height</th> |
| 38 | 37 | <td><input type="text" name="vdo_default_height" |
| 39 | 38 | value="<?php echo esc_attr(get_option('vdo_default_height')); ?>" |
| @@ -38,90 +37,20 @@ | ||
| 38 | 37 | <td><input type="text" name="vdo_default_height" |
| 39 | 38 | value="<?php echo esc_attr(get_option('vdo_default_height')); ?>" |
| 40 | 39 | /></td> |
| 41 | 40 | </tr> |
| 42 | - | |
| 43 | - <!-- Version Number --> | |
| 44 | - <?php | |
| 45 | - if ((get_option('vdo_embed_version')) == false) { | |
| 46 | - update_option('vdo_embed_version', '1.5.0'); | |
| 47 | - } | |
| 48 | - ?> | |
| 41 | + | |
| 49 | 42 | <tr valign="top"> |
| 50 | - <th scope="row">Player Version</th> | |
| 51 | - <td> | |
| 52 | - <?php $vdo_embed_version_vars = array('0.5', '1.0.0', '1.1.0', '1.1.3', '1.2.7', '1.3.3', '1.4.5','1.5.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.5.0'){ | |
| 66 | - $version_old_new = ' (newest player)' ; } | |
| 67 | - else { | |
| 68 | - $version_old_new = ' (new player)' ; } | |
| 69 | - ?> | |
| 70 | - <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> > | |
| 71 | - <?php echo $vdo_embed_version_var . $version_old_new ; ?> | |
| 72 | - </option> | |
| 73 | - <?php } ?> | |
| 74 | - </select> | |
| 75 | - <p class="description">It is recommended that you use the latest player version for best video playback.</p> | |
| 76 | - </td> | |
| 77 | - </tr> | |
| 78 | - | |
| 79 | - <!-- Player Theme Options --> | |
| 80 | - <?php | |
| 81 | - if ((get_option('vdo_player_theme')) == false) { | |
| 82 | - update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); | |
| 83 | - } | |
| 84 | - ?> | |
| 85 | - <tr valign="top"> | |
| 86 | - <th scope="row">Player Theme</th> | |
| 87 | - <td> | |
| 88 | - <input type="text" name="vdo_player_theme" | |
| 89 | - value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>" max-length = "32" style="width: 320px" | |
| 90 | - /> | |
| 91 | - <p class="description">Player theme is not available for old player version(0.5). The default theme will be applied for old player.</p> | |
| 92 | - </td> | |
| 93 | - </tr> | |
| 94 | - | |
| 95 | - <tr valign="top"> | |
| 96 | 43 | <th scope="row">Annotation Statement</th> |
| 97 | 44 | <td> |
| 98 | - <div style="display: inline-flex;"> | |
| 99 | - <textarea name="vdo_annotate_code" id="vdo_watermarkjson" type="textarea" rows="6" cols="55" style="display: float-left"> <?php | |
| 45 | + <textarea name="vdo_annotate_code" type="textarea" rows="5" cols="60"><?php | |
| 100 | 46 | if (get_option('vdo_annotate_code') != "") { |
| 101 | - echo get_option('vdo_annotate_code'); | |
| 102 | - $vdo_annotation_code = get_option('vdo_annotate_code'); | |
| 103 | - } | |
| 104 | - ?> | |
| 105 | - </textarea> | |
| 106 | - <p class="description" style="margin-left:20px; position: relative"> | |
| 107 | - <span style="color:purple"><b>Sample Code for Dynamic Watermark</b></span><br/> | |
| 108 | - [{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'17','interval':'5000'}] <br/> | |
| 109 | - <span style="color:purple"><b>Sample Code for Static Watermark</b></span><br/> | |
| 110 | - [{'type':'text', 'text':'{ip}', 'alpha':'0.5' , 'x':'10', 'y':'100', 'color':'0xFF0000', 'size':'12'}] <br/> | |
| 111 | - </p> | |
| 112 | - </div> | |
| 113 | - <p class="description" id="vdojsonvalidator"></p> | |
| 114 | - <p class="description">Leave this text blank in case you do not need watermark over all videos. For details on writing the annotation code <a href="https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/" target="_blank">check this out</a></p> | |
| 47 | + echo get_option('vdo_annotate_code'); | |
| 48 | + } | |
| 49 | + ?></textarea> | |
| 50 | + <p class="description">Leave this text blank in case you do not need watermark over all Videos</p> | |
| 115 | 51 | </td> |
| 116 | 52 | </tr> |
| 117 | 53 | </table> |
| 118 | - <?php | |
| 119 | - wp_enqueue_script('vdo_change_player_version',plugin_dir_url(__FILE__).'js/validatewatermark.js'); | |
| 120 | - wp_localize_script('vdo_change_player_version', 'vdoVersionData', array( | |
| 121 | - 'vdoWatermark' => $vdo_annotation_code | |
| 122 | - ) | |
| 123 | - ); | |
| 124 | - ?> | |
| 125 | 54 | <?php submit_button(); ?> |
| 126 | 55 | </form> |
| 127 | 56 | </div> |