| @@ -1,47 +1,105 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { |
| 3 | 3 | header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); |
| 4 | - exit("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<html><head>\r\n<title>404 Not Found</title>\r\n</head><body>\r\n<h1>Not Found</h1>\r\n<p>The requested URL " . $_SERVER['SCRIPT_NAME'] . " was not found on this server.</p>\r\n</body></html>"); | |
| 4 | + exit("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<html><head>\r\n<title>404 Not Found</title>\r\n". | |
| 5 | + "</head><body>\r\n<h1>Not Found</h1>\r\n<p>The requested URL " . $_SERVER['SCRIPT_NAME'] . " was not found on ". | |
| 6 | + "this server.</p>\r\n</body></html>"); | |
| 5 | 7 | } |
| 6 | 8 | ?> |
| 9 | + | |
| 7 | 10 | <div class="wrap"> |
| 8 | 11 | <h2>VdoCipher Options</h2> |
| 9 | 12 | |
| 10 | -<form method="post" action="options.php"> | |
| 13 | +<form method="post" action="options.php"> | |
| 11 | 14 | <?php |
| 12 | -settings_fields( 'vdo_option-group' ); | |
| 13 | -do_settings_sections( 'vdo_option-group' ); | |
| 15 | +settings_fields('vdo_option-group'); | |
| 16 | +do_settings_sections('vdo_option-group'); | |
| 14 | 17 | ?> |
| 15 | - <div class="updated"> | |
| 16 | - <p><strong>Status : </strong> Ready to use. You can now embed your videos inside posts and pages.</p> | |
| 17 | - </div> | |
| 18 | + <div class="updated"> | |
| 19 | + <p><strong>Status : </strong> Ready to use. You can now embed your videos inside posts and pages.</p> | |
| 20 | + </div> | |
| 18 | 21 | <table class="form-table"> |
| 19 | 22 | <tr valign="top"> |
| 20 | 23 | <th scope="row">Client Secret Key</th> |
| 21 | - <td><input type="text" name="vdo_client_key" value="<?php echo esc_attr( get_option('vdo_client_key') ); ?>" max-length="64" size="60" id="vdo_client_key" /></td> | |
| 24 | + <td><input type="text" name="vdo_client_key" | |
| 25 | + value="<?php echo esc_attr(get_option('vdo_client_key')); ?>" | |
| 26 | + max-length="64" style="width: 640px" id="vdo_client_key" /></td> | |
| 22 | 27 | </tr> |
| 23 | - | |
| 28 | + | |
| 24 | 29 | <tr valign="top"> |
| 25 | 30 | <th scope="row">Default Width</th> |
| 26 | - <td><input type="text" name="vdo_default_width" value="<?php echo esc_attr( get_option('vdo_default_width') ); ?>" /></td> | |
| 31 | + <td><input type="text" name="vdo_default_width" | |
| 32 | + value="<?php echo esc_attr(get_option('vdo_default_width')); ?>" | |
| 33 | + /></td> | |
| 27 | 34 | </tr> |
| 28 | - | |
| 35 | + | |
| 29 | 36 | <tr valign="top"> |
| 30 | 37 | <th scope="row">Default Height</th> |
| 31 | - <td><input type="text" name="vdo_default_height" value="<?php echo esc_attr( get_option('vdo_default_height') ); ?>" /></td> | |
| 38 | + <td><input type="text" name="vdo_default_height" | |
| 39 | + value="<?php echo esc_attr(get_option('vdo_default_height')); ?>" | |
| 40 | + /></td> | |
| 32 | 41 | </tr> |
| 33 | - | |
| 42 | + | |
| 43 | + <!-- Version Number --> | |
| 44 | + <?php | |
| 45 | + if ((get_option('vdo_embed_version')) == false) { | |
| 46 | + update_option('vdo_embed_version', '0.5'); | |
| 47 | + } | |
| 48 | + ?> | |
| 34 | 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', '1.1.0', '1.1.3', '1.2.7', '1.3.3'); ?> | |
| 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 | + else { | |
| 66 | + $version_old_new = ' (new player)' ; } | |
| 67 | + ?> | |
| 68 | + <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> > | |
| 69 | + <?php echo $vdo_embed_version_var . $version_old_new ; ?> | |
| 70 | + </option> | |
| 71 | + <?php } ?> | |
| 72 | + </select> | |
| 73 | + </td> | |
| 74 | + </tr> | |
| 75 | + | |
| 76 | + <!-- Player Theme Options --> | |
| 77 | + <?php | |
| 78 | + if ((get_option('vdo_player_theme')) == false) { | |
| 79 | + update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); | |
| 80 | + } | |
| 81 | + ?> | |
| 82 | + <tr valign="top"> | |
| 83 | + <th scope="row">Player Theme</th> | |
| 84 | + <td> | |
| 85 | + <input type="text" name="vdo_player_theme" | |
| 86 | + value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>" max-length = "32" style="width: 320px" | |
| 87 | + /> | |
| 88 | + <p class="description">Player theme is not available for old player version(0.5). The default theme will be applied for old player.</p> | |
| 89 | + </td> | |
| 90 | + </tr> | |
| 91 | + | |
| 92 | + <tr valign="top"> | |
| 35 | 93 | <th scope="row">Annotation Statement</th> |
| 36 | 94 | <td> |
| 37 | - <textarea name="vdo_annotate_code" type="textarea" rows="5" cols="60"><?php | |
| 38 | - if (get_option(vdo_annotate_code) != "") { | |
| 39 | - echo get_option(vdo_annotate_code); | |
| 40 | - } | |
| 41 | - ?></textarea> | |
| 42 | - <p class="description">Leave this text blank in case you do not need watermark over all Videos</p> | |
| 43 | - </td> | |
| 95 | + <textarea name="vdo_annotate_code" type="textarea" rows="5" cols="60"><?php | |
| 96 | + if (get_option('vdo_annotate_code') != "") { | |
| 97 | + echo get_option('vdo_annotate_code'); | |
| 98 | + } | |
| 99 | + ?></textarea> | |
| 100 | + <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> | |
| 101 | + </td> | |
| 44 | 102 | </tr> |
| 45 | 103 | </table> |
| 46 | 104 | <?php submit_button(); ?> |
| 47 | 105 | </form> |