partials
4 years ago
custom-logo.php
4 years ago
dailymotion.php
4 years ago
elements.php
4 years ago
general.php
5 years ago
go-premium.php
4 years ago
google-calendar.php
4 years ago
license.php
5 years ago
main-template.php
5 years ago
shortcode.php
5 years ago
soundcloud.php
4 years ago
spotify.php
5 years ago
twitch.php
4 years ago
vimeo.php
4 years ago
wistia.php
4 years ago
youtube.php
4 years ago
spotify.php
88 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Spotify Settings page template |
| 4 | * All undefined vars comes from 'render_settings_page' method |
| 5 | * */ |
| 6 | $settings = get_option( EMBEDPRESS_PLG_NAME.':spotify'); |
| 7 | $spotify_theme = isset( $settings['theme']) ? $settings['theme'] : '1'; |
| 8 | $follow_theme = isset( $settings['follow_theme']) ? $settings['follow_theme'] : 'light'; |
| 9 | $follow_layout = isset( $settings['follow_layout']) ? $settings['follow_layout'] : 'detail'; |
| 10 | $follow_count = isset( $settings['follow_count']) ? $settings['follow_count'] : 1; |
| 11 | ?> |
| 12 | |
| 13 | <div class="embedpress__settings background__white radius-25 p40"> |
| 14 | <h3><?php esc_html_e( "Spotify Settings", "embedpress-pro" ); ?></h3> |
| 15 | <div class="embedpress__settings__form"> |
| 16 | <form action="" method="post" class="embedpress-settings-form" > |
| 17 | <?php |
| 18 | do_action( 'embedpress_before_spotify_settings_fields'); |
| 19 | echo $nonce_field ; ?> |
| 20 | <div class="form__group"> |
| 21 | <label class="form__label" for="spotify_theme"><?php esc_html_e( "Player Background Color", "embedpress-pro" ); ?></label> |
| 22 | <div class="form__control__wrap"> |
| 23 | <div class="embedpress__select"> |
| 24 | <span><i class="ep-icon ep-caret-down"></i></span> |
| 25 | <select name="spotify_theme" id="spotify_theme" data-default="<?php echo esc_attr( $spotify_theme ); ?>"> |
| 26 | <option value="1" <?php selected( '1', $spotify_theme); ?> ><?php esc_html_e( "Dynamic", "embedpress-pro" ); ?></option> |
| 27 | <option value="0" <?php selected( '0', $spotify_theme); ?> ><?php esc_html_e( "Black & White", "embedpress-pro" ); ?></option> |
| 28 | </select> |
| 29 | </div> |
| 30 | |
| 31 | <p><?php printf( esc_html__( "Dynamic option will use the most vibrant color from the album art.", 'embedpress'), '<br>'); ?></p> |
| 32 | </div> |
| 33 | </div> |
| 34 | <h3><?php esc_html_e( "Artist Follower Widget", "embedpress" ); ?></h3> |
| 35 | |
| 36 | <div class="form__group"> |
| 37 | <label class="form__label" for="follow_theme"><?php esc_html_e( "Follow Widget Theme", "embedpress-pro" ); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?></label> |
| 38 | <div class="form__control__wrap"> |
| 39 | <div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 40 | <span><i class="ep-icon ep-caret-down"></i></span> |
| 41 | <select name="follow_theme" id="follow_theme" data-default="<?php echo esc_attr( $follow_theme ); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>> |
| 42 | <option value="light" <?php selected( 'light', $follow_theme); ?> ><?php esc_html_e( "For Light Background", "embedpress-pro" ); ?></option> |
| 43 | <option value="dark" <?php selected( 'dark', $follow_theme); ?> ><?php esc_html_e( "For Dark Background", "embedpress-pro" ); ?></option> |
| 44 | </select> |
| 45 | </div> |
| 46 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 47 | |
| 48 | </div> |
| 49 | </div> |
| 50 | |
| 51 | <div class="form__group"> |
| 52 | <label class="form__label" for="follow_layout"><?php esc_html_e( "Follow Widget Layout", "embedpress-pro" ); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?></label> |
| 53 | <div class="form__control__wrap"> |
| 54 | <div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 55 | <span><i class="ep-icon ep-caret-down"></i></span> |
| 56 | <select name="follow_layout" id="follow_layout" data-default="<?php echo esc_attr( $follow_layout ); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>> |
| 57 | <option value="detail" <?php selected( 'detail', $follow_layout); ?> ><?php esc_html_e( "Details", "embedpress-pro" ); ?></option> |
| 58 | <option value="basic" <?php selected( 'basic', $follow_layout); ?> ><?php esc_html_e( "Basic", "embedpress-pro" ); ?></option> |
| 59 | </select> |
| 60 | </div> |
| 61 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 62 | |
| 63 | </div> |
| 64 | </div> |
| 65 | <div class="form__group"> |
| 66 | <label class="form__label" for="follow_count"><?php esc_html_e( "Show Follower Statistics", "embedpress-pro" ); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?></label> |
| 67 | <div class="form__control__wrap"> |
| 68 | <div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 69 | <span><i class="ep-icon ep-caret-down"></i></span> |
| 70 | <select name="follow_count" id="follow_count" data-default="<?php echo esc_attr( $follow_count ); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>> |
| 71 | <option value="1" <?php selected( '1', $follow_count); ?> ><?php esc_html_e( "Yes", "embedpress-pro" ); ?></option> |
| 72 | <option value="0" <?php selected( '0', $follow_count); ?> ><?php esc_html_e( "No", "embedpress-pro" ); ?></option> |
| 73 | </select> |
| 74 | </div> |
| 75 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 76 | </div> |
| 77 | </div> |
| 78 | |
| 79 | <div class="form__group"> |
| 80 | <p class="embedpress-note" style="font-size: 14px; color:#7C8DB5;"><strong><?php esc_html_e( "Note:", "embedpress" ); ?></strong><?php printf( __( "To add follow widget, please add '%s:follow_widget%s' to the end of an artist URL. For details, check out this %s documentation%s.", "embedpress" ), '<strong>','</strong>', '<a class="ep-link" href="https://embedpress.com/docs/how-to-embed-spotify-artist-follower-widget/" target="_blank">', '</a>'); ?></p> |
| 81 | </div> |
| 82 | |
| 83 | <?php do_action( 'embedpress_after_spotify_settings_fields'); ?> |
| 84 | <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="spotify"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button> |
| 85 | </form> |
| 86 | </div> |
| 87 | </div> |
| 88 |