partials
3 years ago
custom-logo.php
3 years ago
dailymotion.php
4 years ago
elements.php
3 years ago
general.php
3 years ago
go-premium.php
4 years ago
google-calendar.php
3 years ago
license.php
5 years ago
main-template.php
5 years ago
opensea.php
3 years ago
shortcode.php
5 years ago
soundcloud.php
4 years ago
spotify.php
4 years ago
twitch.php
4 years ago
vimeo.php
3 years ago
wistia.php
4 years ago
youtube.php
3 years ago
vimeo.php
162 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Vimeo Settings page |
| 4 | * All undefined vars comes from 'render_settings_page' method |
| 5 | * */ |
| 6 | $vm_settings = get_option( EMBEDPRESS_PLG_NAME.':vimeo' ); |
| 7 | $start_time = isset( $vm_settings['start_time']) ? $vm_settings['start_time'] : 0; |
| 8 | |
| 9 | |
| 10 | $autoplay = isset( $vm_settings['autoplay']) ? $vm_settings['autoplay'] : ''; |
| 11 | $loop = isset( $vm_settings['loop']) ? $vm_settings['loop'] : ''; |
| 12 | $autopause = isset( $vm_settings['autopause']) ? $vm_settings['autopause'] : ''; |
| 13 | $vimeo_dnt = isset( $vm_settings['vimeo_dnt']) ? $vm_settings['vimeo_dnt'] : 1; |
| 14 | $color = isset( $vm_settings['color']) ? $vm_settings['color'] : '#5b4e96';//@TODO; ask to confirm #00adef. |
| 15 | $display_title = isset( $vm_settings['display_title']) ? $vm_settings['display_title'] : 1; |
| 16 | $display_author = isset( $vm_settings['display_author']) ? $vm_settings['display_author'] : 1; |
| 17 | $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display_avatar'] : 1; |
| 18 | ?> |
| 19 | <div class="embedpress__settings background__white radius-25 p40"> |
| 20 | <h3><?php esc_html_e( "Vimeo Settings", "embedpress" ); ?></h3> |
| 21 | <div class="embedpress__settings__form"> |
| 22 | <form action="" method="post" class="embedpress-settings-form" > |
| 23 | <?php |
| 24 | do_action( 'embedpress_before_vimeo_settings_fields'); |
| 25 | echo $nonce_field ; ?> |
| 26 | <div class="form__group"> |
| 27 | <p class="form__label" ><?php esc_html_e( "Start Time (In Seconds)", "embedpress" ); ?> </p> |
| 28 | <div class="form__control__wrap"> |
| 29 | <input type="number" name="start_time" id="start_time" class="form__control" data-default="<?php echo esc_attr( $start_time); ?>" value="<?php echo esc_attr( $start_time); ?>" > |
| 30 | <p><?php esc_html_e( "You can put a custom time in seconds to start video. Example: 500", "embedpress" ); ?></p> |
| 31 | </div> |
| 32 | |
| 33 | </div> |
| 34 | <div class="form__group"> |
| 35 | <p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p> |
| 36 | <div class="form__control__wrap"> |
| 37 | <div data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>" class="input__flex input__radio_wrap"> |
| 38 | <label class="input__radio"> |
| 39 | <input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>> |
| 40 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 41 | </label> |
| 42 | <label class="input__radio"> |
| 43 | <input type="radio" name="autoplay" value="1" <?php checked( '1', $autoplay); ?>> |
| 44 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 45 | </label> |
| 46 | </div> |
| 47 | <p><?php esc_html_e( "Automatically start to play the videos when the player loads.", "embedpress" ); ?></p> |
| 48 | </div> |
| 49 | </div> |
| 50 | <div class="form__group"> |
| 51 | <p class="form__label"><?php esc_html_e( "Loop", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p> |
| 52 | <div class="form__control__wrap"> |
| 53 | <div data-default="<?php echo esc_attr( $loop ); ?>" data-value="<?php echo esc_attr( $loop ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 54 | <label class="input__radio"> |
| 55 | <input type="radio" name="loop" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $loop); ?>> |
| 56 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 57 | </label> |
| 58 | <label class="input__radio"> |
| 59 | <input type="radio" name="loop" value="1" <?php echo !$pro_active ? 'disabled ' : ''; checked( '1', $loop); ?>> |
| 60 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 61 | </label> |
| 62 | </div> |
| 63 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 64 | <p><?php esc_html_e( "Play the video again automatically when it reaches the end.", "embedpress" ); ?></p> |
| 65 | </div> |
| 66 | </div> |
| 67 | <div class="form__group"> |
| 68 | <p class="form__label"><?php esc_html_e( "Auto Pause", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p> |
| 69 | <div class="form__control__wrap"> |
| 70 | <div data-default="<?php echo esc_attr( $autopause ); ?>" data-value="<?php echo esc_attr( $autopause ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 71 | <label class="input__radio"> |
| 72 | <input type="radio" name="autopause" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $autopause); ?>> |
| 73 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 74 | </label> |
| 75 | <label class="input__radio"> |
| 76 | <input type="radio" name="autopause" value="1" <?php echo !$pro_active ? 'disabled ' : ''; checked( '1', $autopause); ?>> |
| 77 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 78 | </label> |
| 79 | </div> |
| 80 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 81 | <p><?php esc_html_e( "Automatically stop the current video from playing when another one starts.", "embedpress" ); ?></p> |
| 82 | </div> |
| 83 | </div> |
| 84 | <div class="form__group"> |
| 85 | <p class="form__label"><?php esc_html_e( "DNT", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p> |
| 86 | <div class="form__control__wrap"> |
| 87 | <div data-default="<?php echo esc_attr( $vimeo_dnt ); ?>" data-value="<?php echo esc_attr( $vimeo_dnt ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 88 | <label class="input__radio"> |
| 89 | <input type="radio" name="vimeo_dnt" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $vimeo_dnt); ?>> |
| 90 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 91 | </label> |
| 92 | <label class="input__radio"> |
| 93 | <input type="radio" name="vimeo_dnt" value="1" <?php echo !$pro_active ? 'disabled ' : ''; checked( '1', $vimeo_dnt); ?>> |
| 94 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 95 | </label> |
| 96 | </div> |
| 97 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 98 | <p><?php esc_html_e( 'Set this parameter to "yes" will block tracking any session data, including cookies. If Auto Pause is enabled this will not work.', "embedpress" ); ?></p> |
| 99 | </div> |
| 100 | </div> |
| 101 | <div class="form__group"> |
| 102 | <p class="form__label"><?php esc_html_e( "Color", "embedpress" ); ?></p> |
| 103 | <div class="form__control__wrap"> |
| 104 | <input type="text" class="form__control ep-color-picker" name="color" value="<?php echo esc_attr( $color); ?>" data-default="<?php echo esc_attr( $color ); ?>"> |
| 105 | |
| 106 | <p><?php esc_html_e( "Specify the color of the video controls.", "embedpress" ); ?></p> |
| 107 | </div> |
| 108 | </div> |
| 109 | <div class="form__group"> |
| 110 | <p class="form__label"><?php esc_html_e( "Display Title", "embedpress" ); ?></p> |
| 111 | <div class="form__control__wrap"> |
| 112 | <div data-default="<?php echo esc_attr( $display_title ); ?>" data-value="<?php echo esc_attr( $display_title ); ?>" class="input__flex input__radio_wrap"> |
| 113 | <label class="input__radio"> |
| 114 | <input type="radio" name="display_title" value="" <?php checked( '', $display_title); ?>> |
| 115 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 116 | </label> |
| 117 | <label class="input__radio"> |
| 118 | <input type="radio" name="display_title" value="1" <?php checked( '1', $display_title); ?>> |
| 119 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 120 | </label> |
| 121 | </div> |
| 122 | <p><?php esc_html_e( "Indicates whether the title is displayed.", "embedpress" ); ?></p> |
| 123 | </div> |
| 124 | </div> |
| 125 | <div class="form__group"> |
| 126 | <p class="form__label"><?php esc_html_e( "Display Author", "embedpress" ); ?></p> |
| 127 | <div class="form__control__wrap"> |
| 128 | <div data-default="<?php echo esc_attr( $display_author ); ?>" data-value="<?php echo esc_attr( $display_author ); ?>" class="input__flex input__radio_wrap"> |
| 129 | <label class="input__radio"> |
| 130 | <input type="radio" name="display_author" value="" <?php checked( '', $display_author); ?>> |
| 131 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 132 | </label> |
| 133 | <label class="input__radio"> |
| 134 | <input type="radio" name="display_author" value="1" <?php checked( '1', $display_author); ?>> |
| 135 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 136 | </label> |
| 137 | </div> |
| 138 | <p><?php esc_html_e( "Indicates whether the author is displayed.", "embedpress" ); ?></p> |
| 139 | </div> |
| 140 | </div> |
| 141 | <div class="form__group"> |
| 142 | <p class="form__label"><?php esc_html_e( "Display Avatar", "embedpress" );?></p> |
| 143 | <div class="form__control__wrap"> |
| 144 | <div data-default="<?php echo esc_attr( $display_avatar ); ?>" data-value="<?php echo esc_attr( $display_avatar ); ?>" class="input__flex input__radio_wrap"> |
| 145 | <label class="input__radio"> |
| 146 | <input type="radio" name="display_avatar" value="" <?php checked( '', $display_avatar); ?>> |
| 147 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 148 | </label> |
| 149 | <label class="input__radio"> |
| 150 | <input type="radio" name="display_avatar" value="1" <?php checked( '1', $display_avatar); ?>> |
| 151 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 152 | </label> |
| 153 | </div> |
| 154 | <p><?php esc_html_e( "Indicates whether the avatar is displayed.", "embedpress" ); ?></p> |
| 155 | </div> |
| 156 | </div> |
| 157 | <?php do_action( 'embedpress_after_vimeo_settings_fields'); ?> |
| 158 | <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="vimeo"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button> |
| 159 | </form> |
| 160 | </div> |
| 161 | </div> |
| 162 |