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
twitch.php
115 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Twitch Settings page |
| 4 | * All undefined vars comes from 'render_settings_page' method |
| 5 | * */ |
| 6 | $twitch_settings = get_option( EMBEDPRESS_PLG_NAME.':twitch'); |
| 7 | $start_time = isset( $twitch_settings['start_time']) ? $twitch_settings['start_time'] : 0; |
| 8 | |
| 9 | $autoplay = isset( $twitch_settings['embedpress_pro_twitch_autoplay']) ? $twitch_settings['embedpress_pro_twitch_autoplay'] : 'no'; |
| 10 | $show_chat = isset( $twitch_settings['embedpress_pro_twitch_chat']) ? $twitch_settings['embedpress_pro_twitch_chat'] : 'no'; |
| 11 | $theme = isset( $twitch_settings['embedpress_pro_twitch_theme']) ? $twitch_settings['embedpress_pro_twitch_theme'] : 'dark'; |
| 12 | $fs = isset( $twitch_settings['embedpress_pro_fs']) ? $twitch_settings['embedpress_pro_fs'] : 'yes'; |
| 13 | $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_settings['embedpress_pro_twitch_mute'] : 'yes'; |
| 14 | |
| 15 | ?> |
| 16 | |
| 17 | <div class="embedpress__settings background__white radius-25 p40"> |
| 18 | <h3><?php esc_html_e( "Twitch Settings", "embedpress" ); ?></h3> |
| 19 | <div class="embedpress__settings__form"> |
| 20 | <form action="" method="post" class="embedpress-settings-form"> |
| 21 | <?php |
| 22 | do_action( 'embedpress_before_twitch_settings_fields'); |
| 23 | echo $nonce_field ; ?> |
| 24 | <div class="form__group"> |
| 25 | <p class="form__label" ><?php esc_html_e( "Start Time (In Seconds)", "embedpress" ); ?> </p> |
| 26 | <div class="form__control__wrap"> |
| 27 | <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); ?>" > |
| 28 | <p><?php esc_html_e( "You can put a custom time in seconds to start video. Example: 500", "embedpress" ); ?></p> |
| 29 | </div> |
| 30 | |
| 31 | </div> |
| 32 | <div class="form__group"> |
| 33 | <p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p> |
| 34 | <div class="form__control__wrap"> |
| 35 | <div data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>" class="input__flex input__radio_wrap"> |
| 36 | <label class="input__radio"> |
| 37 | <input type="radio" name="autoplay" value="no" <?php checked( 'no', $autoplay); ?>> |
| 38 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 39 | </label> |
| 40 | <label class="input__radio"> |
| 41 | <input type="radio" name="autoplay" value="yes" <?php checked( 'yes', $autoplay); ?>> |
| 42 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 43 | </label> |
| 44 | </div> |
| 45 | <p><?php esc_html_e( "Automatically start to play the videos when the player loads.", "embedpress" ); ?></p> |
| 46 | </div> |
| 47 | </div> |
| 48 | <div class="form__group"> |
| 49 | <p class="form__label"><?php esc_html_e( "Show Chat", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p> |
| 50 | <div class="form__control__wrap"> |
| 51 | <div data-default="<?php echo esc_attr( $show_chat ); ?>" data-value="<?php echo esc_attr( $show_chat ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 52 | <label class="input__radio"> |
| 53 | <input type="radio" name="show_chat" value="no" <?php echo $pro_active ? '' : 'disabled'; checked( 'no', $show_chat); ?>> |
| 54 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 55 | </label> |
| 56 | <label class="input__radio"> |
| 57 | <input type="radio" name="show_chat" value="yes" <?php echo $pro_active ? '' : 'disabled'; checked( 'yes', $show_chat); ?>> |
| 58 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 59 | </label> |
| 60 | </div> |
| 61 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 62 | <p><?php esc_html_e( "You can show or hide chat using this setting", "embedpress" ); ?></p> |
| 63 | </div> |
| 64 | </div> |
| 65 | <div class="form__group"> |
| 66 | <p class="form__label"><?php esc_html_e( "Theme", "embedpress" );?> </p> |
| 67 | <div class="form__control__wrap"> |
| 68 | <div class="embedpress__select"> |
| 69 | <span><i class="ep-icon ep-caret-down"></i></span> |
| 70 | <select name="theme" data-default="<?php echo esc_attr( $theme); ?>"> |
| 71 | <option value="dark" <?php selected( 'dark', $theme); ?>><?php esc_html_e( "Dark", "embedpress" ); ?></option> |
| 72 | <option value="light" <?php selected( 'light', $theme); ?>><?php esc_html_e( "Light", "embedpress" ); ?></option> |
| 73 | </select> |
| 74 | </div> |
| 75 | <p><?php esc_html_e( "Set dark or light theme for the twitch comment.", "embedpress" ); ?></p> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div class="form__group"> |
| 79 | <p class="form__label"><?php esc_html_e( "Enable Fullscreen Button", "embedpress" ); ?></p> |
| 80 | <div class="form__control__wrap"> |
| 81 | <div data-default="<?php echo esc_attr( $fs ); ?>" data-value="<?php echo esc_attr( $fs ); ?>" class="input__flex input__radio_wrap"> |
| 82 | <label class="input__radio"> |
| 83 | <input type="radio" name="fs" value="no" <?php checked( 'no', $fs); ?>> |
| 84 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 85 | </label> |
| 86 | <label class="input__radio"> |
| 87 | <input type="radio" name="fs" value="yes" <?php checked( 'yes', $fs); ?>> |
| 88 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 89 | </label> |
| 90 | </div> |
| 91 | <p><?php esc_html_e( "Indicates whether the fullscreen button is enabled.", "embedpress" ); ?></p> |
| 92 | </div> |
| 93 | </div> |
| 94 | <div class="form__group"> |
| 95 | <p class="form__label"><?php esc_html_e( "Mute On Start", "embedpress" ); ?> </p> |
| 96 | <div class="form__control__wrap"> |
| 97 | <div data-default="<?php echo esc_attr( $mute ); ?>" data-value="<?php echo esc_attr( $mute ); ?>" class="input__flex input__radio_wrap "> |
| 98 | <label class="input__radio"> |
| 99 | <input type="radio" name="mute" value="no" <?php checked( 'no', $mute); ?>> |
| 100 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 101 | </label> |
| 102 | <label class="input__radio"> |
| 103 | <input type="radio" name="mute" value="yes" <?php checked( 'yes', $mute); ?>> |
| 104 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 105 | </label> |
| 106 | </div> |
| 107 | <p><?php esc_html_e( "Set it to Yes to mute the video on start.", "embedpress" ); ?></p> |
| 108 | </div> |
| 109 | </div> |
| 110 | <?php do_action( 'embedpress_after_twitch_settings_fields'); ?> |
| 111 | <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="twitch"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button> |
| 112 | </form> |
| 113 | </div> |
| 114 | </div> |
| 115 |