partials
5 years ago
custom-logo.php
5 years ago
elements.php
5 years ago
general.php
5 years ago
go-premium.php
5 years ago
license.php
5 years ago
main-template.php
5 years ago
twitch.php
5 years ago
vimeo.php
5 years ago
wistia.php
5 years ago
youtube.php
5 years ago
custom-logo.php
150 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Custom Logo Settings page |
| 4 | * All undefined vars comes from 'render_settings_page' method |
| 5 | * |
| 6 | * */ |
| 7 | |
| 8 | $option_name = EMBEDPRESS_PLG_NAME.':youtube'; |
| 9 | $yt_settings = get_option( $option_name); |
| 10 | $gen_settings = get_option( EMBEDPRESS_PLG_NAME); |
| 11 | $yt_logo_xpos = isset( $yt_settings['logo_xpos']) ? intval( $yt_settings['logo_xpos']) : 10; |
| 12 | $yt_logo_ypos = isset( $yt_settings['logo_ypos']) ? intval( $yt_settings['logo_ypos']) : 10; |
| 13 | $yt_logo_opacity = isset( $yt_settings['logo_opacity']) ? intval( $yt_settings['logo_opacity']) : 50; |
| 14 | $yt_logo_id = isset( $yt_settings['logo_id']) ? intval( $yt_settings['logo_id']) : 0; |
| 15 | $yt_logo_url = isset( $yt_settings['logo_url']) ? esc_url( $yt_settings['logo_url']) : ''; |
| 16 | $yt_cta_url = isset( $yt_settings['cta_url']) ? esc_url( $yt_settings['cta_url']) : ''; |
| 17 | $yt_branding = isset( $yt_settings['branding']) ? sanitize_text_field( $yt_settings['branding']) : (!empty( $yt_logo_url) ? 'yes': 'no'); |
| 18 | |
| 19 | |
| 20 | $embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powered_by']) ? sanitize_text_field( $gen_settings['embedpress_document_powered_by']) : 'yes'; |
| 21 | ?> |
| 22 | |
| 23 | <div class="embedpress__settings background__white radius-25 p40"> |
| 24 | <h3><?php esc_html_e( "Global Branding Settings", "embedpress" ); ?></h3> |
| 25 | <div class="embedpress__settings__form"> |
| 26 | <form action="" method="post" enctype="multipart/form-data" class="embedpress-settings-form"> |
| 27 | <?php |
| 28 | do_action( 'embedpress_before_custom_branding_settings_fields'); |
| 29 | echo $nonce_field ; ?> |
| 30 | <div class="form__group"> |
| 31 | <p class="form__label">Powered by EmbedPress</p> |
| 32 | <div class="form__control__wrap"> |
| 33 | <label class="input__switch switch__text"> |
| 34 | <input type="checkbox" data-default="<?php echo esc_attr( $embedpress_document_powered_by ); ?>" data-value="<?php echo esc_attr( $embedpress_document_powered_by ); ?>" value="yes" name="embedpress_document_powered_by" <?php checked( 'yes', $embedpress_document_powered_by );?>> |
| 35 | <span></span> |
| 36 | </label> |
| 37 | </div> |
| 38 | </div> |
| 39 | <h3><?php esc_html_e( "Custom Logo", "embedpress" ); ?></h3> |
| 40 | <div class="form__group"> |
| 41 | <p class="form__label"><?php esc_html_e( "YouTube Custom Branding", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">Pro</span>'; ?></p> |
| 42 | <div class="form__control__wrap"> |
| 43 | <label class="input__switch switch__text <?php echo $pro_active ? '': 'isPro'; ?>"> |
| 44 | <input type="checkbox" name="yt_branding" data-default="<?php echo esc_attr( $yt_branding ); ?>" data-value="<?php echo esc_attr( $yt_branding ); ?>" value="yes" <?php checked( 'yes', $yt_branding);?> <?php echo $pro_active ? '': ' disabled'; ?>> |
| 45 | <span></span> |
| 46 | </label> |
| 47 | |
| 48 | <div class="logo__adjust__wrap <?php echo $pro_active ? '': 'proOverlay'; ?>" style="<?php if ( ('yes' !== $yt_branding) || !$pro_active ) { echo 'display:none;'; } ?>"> |
| 49 | <label class="logo__upload" id="yt_logo_upload_wrap" style="<?php if (!empty( $yt_logo_url)) { echo 'display:none;'; } ?>"> |
| 50 | <input type="hidden" class="preview__logo__input" name="yt_logo_url" id="yt_logo_url" data-default="<?php echo esc_attr( $yt_logo_url ); ?>" value="<?php echo $yt_logo_url; ?>"> |
| 51 | <input type="hidden" class="preview__logo__input_id" name="yt_logo_id" id="yt_logo_id" data-default="<?php echo esc_attr( $yt_logo_id ); ?>" value="<?php echo $yt_logo_id; ?>"> |
| 52 | <span class="icon"><i class="ep-icon ep-upload"></i></span> |
| 53 | <span class="text"><?php esc_html_e( "Click To Upload", "embedpress" ); ?></span> |
| 54 | </label> |
| 55 | <div class="logo__upload__preview" id="yt_logo__upload__preview" style="<?php if ( empty( $yt_logo_url) ) { echo 'display:none'; } ?> "> |
| 56 | <div class="instant__preview"> |
| 57 | <a href="#" id="yt_preview__remove" class="preview__remove"><i class="ep-icon ep-cross"></i></a> |
| 58 | <img id="yt_logo_preview" src="<?php echo $yt_logo_url; ?>" alt=""> |
| 59 | </div> |
| 60 | </div> |
| 61 | |
| 62 | <div class="logo__adjust"> |
| 63 | <div class="logo__adjust__controller"> |
| 64 | <div class="logo__adjust__controller__item"> |
| 65 | <span class="controller__label">Logo Opacity (%)</span> |
| 66 | <div class="logo__adjust__controller__inputs"> |
| 67 | <input type="range" max="100" data-default="<?php echo esc_attr( $yt_logo_opacity ); ?>" value="<?php echo $yt_logo_opacity; ?>" class="opacity__range" name="yt_logo_opacity"> |
| 68 | <input readonly type="number" class="form__control range__value" data-default="<?php echo esc_attr( $yt_logo_opacity ); ?>" value="<?php echo $yt_logo_opacity; ?>"> |
| 69 | </div> |
| 70 | </div> |
| 71 | <div class="logo__adjust__controller__item"> |
| 72 | <span class="controller__label">Logo X Position (%)</span> |
| 73 | <div class="logo__adjust__controller__inputs"> |
| 74 | <input type="range" max="100" data-default="<?php echo esc_attr( $yt_logo_xpos ); ?>" value="<?php echo $yt_logo_xpos; ?>" class="x__range" name="yt_logo_xpos"> |
| 75 | <input readonly type="number" class="form__control range__value" data-default="<?php echo esc_attr( $yt_logo_xpos ); ?>" value="<?php echo $yt_logo_xpos; ?>"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div class="logo__adjust__controller__item"> |
| 79 | <span class="controller__label">Logo Y Position (%)</span> |
| 80 | <div class="logo__adjust__controller__inputs"> |
| 81 | <input type="range" max="100" data-default="<?php echo esc_attr( $yt_logo_ypos ); ?>" value="<?php echo esc_attr( $yt_logo_ypos ); ?>" class="y__range" name="yt_logo_ypos" > |
| 82 | <input readonly type="number" class="form__control range__value" data-default="<?php echo esc_attr( $yt_logo_ypos ); ?>" value="<?php echo esc_attr( $yt_logo_ypos ); ?>"> |
| 83 | </div> |
| 84 | </div> |
| 85 | <div class="logo__adjust__controller__item"> |
| 86 | <label class="controller__label" for="yt_cta_url" ><?php esc_html_e( "Call to Action Link", "embedpress" );?> </label> |
| 87 | <div> |
| 88 | <input type="url" name="yt_cta_url" id="yt_cta_url" class="form__control" data-default="<?php echo esc_attr( $yt_cta_url ); ?>" value="<?php echo esc_attr( $yt_cta_url); ?>"> |
| 89 | |
| 90 | <p><?php esc_html_e( "You may link the logo to any CTA link.", "embedpress" ); ?></p> |
| 91 | </div> |
| 92 | </div> |
| 93 | </div> |
| 94 | <div class="logo__adjust__preview"> |
| 95 | <span class="title"><?php esc_html_e( "Live Preview", "embedpress" ); ?></span> |
| 96 | <div class="preview__box"> |
| 97 | <iframe src="https://www.youtube.com/embed/2u0HRUdLHxo" frameborder="0"></iframe> |
| 98 | <img src="<?php echo $yt_logo_url; ?>" class="preview__logo" style="bottom:<?php echo esc_attr( $yt_logo_ypos); ?>%; right:<?php echo esc_attr( $yt_logo_xpos); ?>%; opacity:<?php echo ($yt_logo_opacity/100); ?>;" alt=""> |
| 99 | </div> |
| 100 | </div> |
| 101 | </div> |
| 102 | </div> |
| 103 | <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?> |
| 104 | </div> |
| 105 | </div> |
| 106 | <div class="form__group"> |
| 107 | <p class="form__label"><?php |
| 108 | printf( esc_html__( 'Vimeo Custom Branding %s', 'embedpress'), $coming_soon); |
| 109 | echo $pro_active ? '': ' <span class="isPro">Pro</span>'; ?> |
| 110 | </p> |
| 111 | <div class="form__control__wrap"> |
| 112 | <label class="input__switch switch__text isPro"> |
| 113 | <input type="checkbox" disabled> |
| 114 | <span></span> |
| 115 | </label> |
| 116 | <?php include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-coming-soon.php'; ?> |
| 117 | </div> |
| 118 | </div> |
| 119 | <div class="form__group"> |
| 120 | <p class="form__label"><?php |
| 121 | printf( esc_html__( 'Wistia Custom Branding %s', 'embedpress'), $coming_soon); |
| 122 | echo $pro_active ? '': ' <span class="isPro">Pro</span>'; |
| 123 | ?></p> |
| 124 | <div class="form__control__wrap"> |
| 125 | <label class="input__switch switch__text isPro"> |
| 126 | <input type="checkbox" disabled> |
| 127 | <span></span> |
| 128 | </label> |
| 129 | <?php include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-coming-soon.php'; ?> |
| 130 | |
| 131 | </div> |
| 132 | </div> |
| 133 | <div class="form__group"> |
| 134 | <p class="form__label"><?php |
| 135 | printf( esc_html__( 'Twitch Custom Branding %s', 'embedpress'), $coming_soon); |
| 136 | echo $pro_active ? '': ' <span class="isPro">Pro</span>'; ?></p> |
| 137 | <div class="form__control__wrap"> |
| 138 | <label class="input__switch switch__text isPro"> |
| 139 | <input type="checkbox" disabled> |
| 140 | <span></span> |
| 141 | </label> |
| 142 | <?php include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-coming-soon.php'; ?> |
| 143 | |
| 144 | </div> |
| 145 | </div> |
| 146 | <?php do_action( 'embedpress_after_custom_branding_settings_fields'); ?> |
| 147 | <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="custom_logo"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button> |
| 148 | </form> |
| 149 | </div> |
| 150 | </div> |