partials
8 months ago
ads.php
7 months ago
bnr-img.png
11 months ago
calendly.php
9 months ago
custom-logo.php
9 months ago
dailymotion.php
2 years ago
elements.php
7 months ago
general.php
6 months ago
go-premium.php
7 months ago
google-calendar.php
2 years ago
hub.php
7 months ago
instagram.php
6 months ago
license.php
5 years ago
main-template.php
8 months ago
opensea.php
2 years ago
premium.php
2 years ago
settings.php
6 months ago
shortcode.php
7 months ago
soundcloud.php
2 years ago
sources.php
9 months ago
spotify.php
2 years ago
twitch.php
2 years ago
vimeo.php
2 years ago
wistia.php
2 years ago
youtube.php
1 year ago
dailymotion.php
162 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Dailymotion Settings page |
| 4 | * All undefined vars comes from 'render_settings_page' method |
| 5 | * */ |
| 6 | $dm_settings = get_option( EMBEDPRESS_PLG_NAME.':dailymotion'); |
| 7 | |
| 8 | $start_time = isset($dm_settings['start_time']) ? intval($dm_settings['start_time']) : 0; |
| 9 | |
| 10 | $autoplay = isset($dm_settings['autoplay']) ? sanitize_text_field($dm_settings['autoplay']) : ''; |
| 11 | $play_on_mobile = isset($dm_settings['play_on_mobile']) ? sanitize_text_field($dm_settings['play_on_mobile']) : ''; |
| 12 | $mute = isset($dm_settings['mute']) ? sanitize_text_field($dm_settings['mute']) : ''; |
| 13 | $controls = isset($dm_settings['controls']) ? intval($dm_settings['controls']) : 1; |
| 14 | $video_info = isset($dm_settings['video_info']) ? intval($dm_settings['video_info']) : 1; |
| 15 | $color = isset($dm_settings['color']) ? sanitize_text_field($dm_settings['color']) : '#dd3333'; |
| 16 | // pro |
| 17 | $start_time = isset($dm_settings['start_time']) ? intval($dm_settings['start_time']) : 0; |
| 18 | $show_logo = isset($dm_settings['show_logo']) ? intval($dm_settings['show_logo']) : 1; |
| 19 | |
| 20 | |
| 21 | ?> |
| 22 | |
| 23 | <div class="embedpress__settings background__white radius-25 p40"> |
| 24 | <h3><?php esc_html_e( "Dailymotion Settings", "embedpress" ); ?></h3> |
| 25 | <div class="embedpress__settings__form"> |
| 26 | <form action="" method="post" class="embedpress-settings-form" > |
| 27 | <?php |
| 28 | do_action( 'embedpress_before_dailymotion_settings_fields'); |
| 29 | echo $nonce_field ; ?> |
| 30 | <div class="form__group"> |
| 31 | <p class="form__label" ><?php esc_html_e( "Start Time (In Seconds)", "embedpress" ); ?> </p> |
| 32 | <div class="form__control__wrap"> |
| 33 | <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); ?>" > |
| 34 | <p><?php esc_html_e( "You can put a custom time in seconds to start the video. Example: 500", "embedpress" ); ?></p> |
| 35 | </div> |
| 36 | |
| 37 | </div> |
| 38 | |
| 39 | <div class="form__group"> |
| 40 | <p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p> |
| 41 | <div class="form__control__wrap"> |
| 42 | <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>"> |
| 43 | <label class="input__radio"> |
| 44 | <input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>> |
| 45 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 46 | </label> |
| 47 | <label class="input__radio"> |
| 48 | <input type="radio" name="autoplay" value="1" <?php checked( '1', $autoplay); ?>> |
| 49 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 50 | </label> |
| 51 | </div> |
| 52 | <p><?php esc_html_e( "Automatically start to play the videos when the player loads.", "embedpress" ); ?></p> |
| 53 | </div> |
| 54 | </div> |
| 55 | |
| 56 | <div class="form__group"> |
| 57 | <p class="form__label"><?php esc_html_e( "Autoplay On Mobile", "embedpress" ); ?></p> |
| 58 | <div class="form__control__wrap"> |
| 59 | <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $play_on_mobile ); ?>" data-value="<?php echo esc_attr( $play_on_mobile ); ?>"> |
| 60 | <label class="input__radio"> |
| 61 | <input type="radio" name="play_on_mobile" value="" <?php checked( '', $play_on_mobile); ?>> |
| 62 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 63 | </label> |
| 64 | <label class="input__radio"> |
| 65 | <input type="radio" name="play_on_mobile" value="1" <?php checked( '1', $play_on_mobile); ?>> |
| 66 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 67 | </label> |
| 68 | </div> |
| 69 | <p><?php esc_html_e( "You can control autoplay on mobile. Only works if Autoplay option is enabled.", "embedpress" ); ?></p> |
| 70 | </div> |
| 71 | </div> |
| 72 | |
| 73 | <div class="form__group"> |
| 74 | <p class="form__label"><?php esc_html_e( "Mute", "embedpress" ); ?></p> |
| 75 | <div class="form__control__wrap"> |
| 76 | <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $mute ); ?>" data-value="<?php echo esc_attr( $mute ); ?>"> |
| 77 | <label class="input__radio"> |
| 78 | <input type="radio" name="mute" value="" <?php checked( '', $mute); ?>> |
| 79 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 80 | </label> |
| 81 | <label class="input__radio"> |
| 82 | <input type="radio" name="mute" value="1" <?php checked( '1', $mute); ?>> |
| 83 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 84 | </label> |
| 85 | </div> |
| 86 | <p><?php esc_html_e( "Mute the video that is auto played", "embedpress" ); ?></p> |
| 87 | </div> |
| 88 | </div> |
| 89 | |
| 90 | |
| 91 | |
| 92 | <div class="form__group"> |
| 93 | <p class="form__label"><?php esc_html_e( "Display Player Controls", "embedpress" ); ?></p> |
| 94 | <div class="form__control__wrap"> |
| 95 | <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $controls ); ?>" data-value="<?php echo esc_attr( $controls ); ?>"> |
| 96 | <label class="input__radio"> |
| 97 | <input type="radio" name="controls" value="" <?php checked( '', $controls); ?>> |
| 98 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 99 | </label> |
| 100 | <label class="input__radio"> |
| 101 | <input type="radio" name="controls" value="1" <?php checked( '1', $controls); ?>> |
| 102 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 103 | </label> |
| 104 | </div> |
| 105 | <p><?php esc_html_e( 'Indicates whether the video player controls are displayed.', 'embedpress'); ?> </p> |
| 106 | </div> |
| 107 | </div> |
| 108 | |
| 109 | |
| 110 | <div class="form__group"> |
| 111 | <p class="form__label"><?php esc_html_e( "Display Video Info", "embedpress" ); ?></p> |
| 112 | <div class="form__control__wrap"> |
| 113 | <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $video_info ); ?>" data-value="<?php echo esc_attr( $video_info ); ?>"> |
| 114 | <label class="input__radio"> |
| 115 | <input type="radio" name="video_info" value="" <?php checked( '', $video_info); ?>> |
| 116 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 117 | </label> |
| 118 | <label class="input__radio"> |
| 119 | <input type="radio" name="video_info" value="1" <?php checked( '1', $video_info); ?>> |
| 120 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 121 | </label> |
| 122 | </div> |
| 123 | <p><?php esc_html_e( 'Indicates whether the video information is displayed.', 'embedpress'); ?> </p> |
| 124 | </div> |
| 125 | </div> |
| 126 | |
| 127 | |
| 128 | <div class="form__group"> |
| 129 | <p class="form__label"><?php esc_html_e( "Show Logo", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?></p> |
| 130 | <div class="form__control__wrap"> |
| 131 | <div class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>" data-default="<?php echo esc_attr( $show_logo ); ?>" data-value="<?php echo esc_attr( $show_logo ); ?>"> |
| 132 | <label class="input__radio"> |
| 133 | <input type="radio" name="show_logo" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $show_logo); ?>> |
| 134 | <span><?php esc_html_e( "No", "embedpress" ); ?></span> |
| 135 | </label> |
| 136 | <label class="input__radio"> |
| 137 | <input type="radio" name="show_logo" value="1" <?php echo !$pro_active ? 'disabled ' : ''; checked( '1', $show_logo);?>> |
| 138 | <span><?php esc_html_e( "Yes", "embedpress" ); ?></span> |
| 139 | </label> |
| 140 | </div> |
| 141 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 142 | </div> |
| 143 | </div> |
| 144 | |
| 145 | |
| 146 | |
| 147 | <div class="form__group"> |
| 148 | <p class="form__label"><?php esc_html_e( "Controls Color", "embedpress" ); ?></p> |
| 149 | <div class="form__control__wrap"> |
| 150 | <input type="text" class="form__control ep-color-picker" name="color" value="<?php echo esc_attr( $color); ?>" data-default="<?php echo esc_attr( $color ); ?>"> |
| 151 | |
| 152 | <p><?php esc_html_e( "Specify the color of the video controls.", "embedpress" ); ?></p> |
| 153 | </div> |
| 154 | </div> |
| 155 | |
| 156 | |
| 157 | <?php do_action( 'embedpress_after_dailymotion_settings_fields'); ?> |
| 158 | <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="dailymotion"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button> |
| 159 | </form> |
| 160 | </div> |
| 161 | </div> |
| 162 |