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
settings.php
182 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Settings page |
| 4 | * All undefined vars comes from 'render_settings_page' method |
| 5 | */ |
| 6 | |
| 7 | use EmbedPress\Includes\Classes\Helper; |
| 8 | |
| 9 | $g_settings = get_option(EMBEDPRESS_PLG_NAME); |
| 10 | |
| 11 | $lazy_load = isset($g_settings['g_lazyload']) ? intval($g_settings['g_lazyload']) : 0; |
| 12 | $pdf_custom_color_settings = isset($g_settings['pdf_custom_color_settings']) ? intval($g_settings['pdf_custom_color_settings']) : 0; |
| 13 | $turn_off_rating_help = isset($g_settings['turn_off_rating_help']) ? intval($g_settings['turn_off_rating_help']) : 0; |
| 14 | $turn_off_milestone = isset($g_settings['turn_off_milestone']) ? intval($g_settings['turn_off_milestone']) : 0; |
| 15 | |
| 16 | $custom_color = isset($g_settings['custom_color']) ? sanitize_text_field($g_settings['custom_color']) : '#333333'; |
| 17 | |
| 18 | $enableEmbedResizeHeight = isset($g_settings['enableEmbedResizeHeight']) ? intval($g_settings['enableEmbedResizeHeight']) : 600; |
| 19 | $enableEmbedResizeWidth = isset($g_settings['enableEmbedResizeWidth']) ? intval($g_settings['enableEmbedResizeWidth']) : 600; |
| 20 | |
| 21 | ?> |
| 22 | |
| 23 | <div class="embedpress__settings background__white radius-16 p-24"> |
| 24 | <h3>Global Embed iFrame</h3> |
| 25 | <div class="shortcode-settings-wrapper"> |
| 26 | <div class="embedpress__settings embedpress_general_settings__form"> |
| 27 | <div class="embedpress__settings__form"> |
| 28 | <form action="" method="post" class="embedpress-settings-form"> |
| 29 | <?php |
| 30 | do_action('embedpress_before_general_settings_fields'); |
| 31 | echo $nonce_field; |
| 32 | ?> |
| 33 | <div class="mb-20"> |
| 34 | <div class="form__group"> |
| 35 | <p class="form__label"><?php esc_html_e('Embed iFrame Width', 'embedpress'); ?></p> |
| 36 | <div class="form__control__wrap"> |
| 37 | <div class="input__flex"> |
| 38 | <input type="number" name="enableEmbedResizeWidth" class="form__control" |
| 39 | data-default="<?php echo esc_attr($enableEmbedResizeWidth); ?>" |
| 40 | value="<?php echo esc_attr($enableEmbedResizeWidth); ?>"> |
| 41 | <span class="frame__unit">px</span> |
| 42 | </div> |
| 43 | </div> |
| 44 | </div> |
| 45 | <div class="form__group"> |
| 46 | <p class="form__label"><?php esc_html_e('Embed iFrame Height', 'embedpress'); ?></p> |
| 47 | <div class="form__control__wrap"> |
| 48 | <div class="input__flex"> |
| 49 | <input type="number" name="enableEmbedResizeHeight" class="form__control" |
| 50 | data-default="<?php echo esc_attr($enableEmbedResizeHeight); ?>" |
| 51 | value="<?php echo esc_attr($enableEmbedResizeHeight); ?>"> |
| 52 | <span class="frame__unit">px</span> |
| 53 | </div> |
| 54 | </div> |
| 55 | </div> |
| 56 | <div class="form__group"> |
| 57 | <p class="form__label"><?php esc_html_e('Lazy Load', 'embedpress'); |
| 58 | echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?> </p> |
| 59 | <div class="form__control__wrap"> |
| 60 | <label class="input__switch switch__text <?php echo $pro_active ? '' : 'isPro'; ?>"> |
| 61 | <input type="checkbox" name="g_lazyload" |
| 62 | data-default="<?php echo esc_attr($lazy_load); ?>" |
| 63 | data-value="<?php echo esc_attr($lazy_load); ?>" value="1" <?php echo $pro_active ? '' : 'disabled '; |
| 64 | checked('1', $lazy_load) ?>> |
| 65 | <span></span> |
| 66 | </label> |
| 67 | <?php if (!$pro_active) { |
| 68 | include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; |
| 69 | } ?> |
| 70 | </div> |
| 71 | </div> |
| 72 | <div class="form__group<?php echo !is_embedpress_pro_active() ? ' pdf_custom_color_settings' : ''; ?>"> |
| 73 | <p class="form__label"><?php echo esc_html__('PDF Custom Color', 'embedpress'); ?></p> |
| 74 | <div class="form__control__wrap"> |
| 75 | <label class="input__switch switch__text"> |
| 76 | <input type="checkbox" name="pdf_custom_color_settings" |
| 77 | data-default="<?php echo esc_attr($pdf_custom_color_settings); ?>" |
| 78 | data-value="<?php echo esc_attr($pdf_custom_color_settings); ?>" value="1" |
| 79 | <?php checked('1', $pdf_custom_color_settings) ?>> |
| 80 | <span></span> |
| 81 | <a href="#" |
| 82 | class="logo__adjust__toggler"><?php esc_html_e("Settings", "embedpress"); ?><i |
| 83 | class="ep-icon ep-caret-down"></i></a> |
| 84 | </label> |
| 85 | |
| 86 | <div class="logo__adjust__wrap"> |
| 87 | <div class="form__control__wrap"> |
| 88 | <div class="input__flex"> |
| 89 | <input type="color" id="embedpress_pdf_global_custom_color" |
| 90 | name="custom_color" |
| 91 | data-default="<?php echo esc_attr($custom_color); ?>" |
| 92 | data-value="<?php echo esc_attr($custom_color); ?>" |
| 93 | value="<?php echo esc_attr($custom_color); ?>"> |
| 94 | </div> |
| 95 | </div> |
| 96 | </div> |
| 97 | |
| 98 | </div> |
| 99 | </div> |
| 100 | <div class="form__group turn_off_rating_help"> |
| 101 | <p class="form__label"><?php echo esc_html__('Help', 'embedpress'); ?></p> |
| 102 | <div class="form__control__wrap"> |
| 103 | <label class="input__switch switch__text"> |
| 104 | <input type="checkbox" name="turn_off_rating_help" |
| 105 | data-default="<?php echo esc_attr($turn_off_rating_help); ?>" |
| 106 | data-value="<?php echo esc_attr($turn_off_rating_help); ?>" value="1" |
| 107 | <?php checked('1', $turn_off_rating_help) ?>> |
| 108 | <span></span> |
| 109 | </label> |
| 110 | |
| 111 | </div> |
| 112 | </div> |
| 113 | |
| 114 | <?php |
| 115 | // Check if Pro is active - don't show milestone for Pro users |
| 116 | $license_info = Helper::get_license_info(); |
| 117 | if (isset($license_info['is_pro_active']) && !$license_info['is_pro_active']) { ?> |
| 118 | <div class="form__group turn_off_milestone"> |
| 119 | <p class="form__label"><?php echo esc_html__('Milestone', 'embedpress'); ?></p> |
| 120 | <div class="form__control__wrap"> |
| 121 | <label class="input__switch switch__text"> |
| 122 | <input type="checkbox" name="turn_off_milestone" |
| 123 | data-default="<?php echo esc_attr($turn_off_milestone); ?>" |
| 124 | data-value="<?php echo esc_attr($turn_off_milestone); ?>" value="1" |
| 125 | <?php checked('1', $turn_off_milestone) ?>> |
| 126 | <span></span> |
| 127 | </label> |
| 128 | </div> |
| 129 | </div> |
| 130 | <?php } ?> |
| 131 | |
| 132 | <div class="form__group mb0"> |
| 133 | <p class="form__label"><?php |
| 134 | /*translators: % means coming soon text markup*/ |
| 135 | printf(esc_html__('Loading Animation %s', 'embedpress'), $coming_soon); |
| 136 | |
| 137 | echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?> |
| 138 | </p> |
| 139 | <div class="form__control__wrap"> |
| 140 | <label class="input__switch switch__text isPro"> |
| 141 | <input type="checkbox" name="g_loading_animation" data-default="1" value="1" |
| 142 | disabled> |
| 143 | <span></span> |
| 144 | </label> |
| 145 | <?php include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-coming-soon.php'; ?> |
| 146 | </div> |
| 147 | </div> |
| 148 | </div> |
| 149 | <?php do_action('embedpress_after_general_settings_fields'); ?> |
| 150 | <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" |
| 151 | value="settings"><?php esc_html_e('Save Changes', 'embedpress'); ?></button> |
| 152 | </form> |
| 153 | </div> |
| 154 | </div> |
| 155 | <?php if (empty($pro_active) || !$pro_active) : ?> |
| 156 | <div class="embedpress-upgrade-pro-sidebar"> |
| 157 | <div class="gradient-color"> |
| 158 | <img class="embedpress-banner" src="<?php echo esc_url('https://embedpress.com/wp-content/uploads/2023/10/Mega-Page.gif'); ?>" |
| 159 | alt=""> |
| 160 | <h3 class="cart-title">Upgrade To <span>Pro</span></h3> |
| 161 | <ul class="feature-list"> |
| 162 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Social Share', 'embedpress'); ?></li> |
| 163 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Lazy Loading', 'embedpress'); ?></li> |
| 164 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('SEO Optimized', 'embedpress'); ?></li> |
| 165 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Custom Branding', 'embedpress'); ?></li> |
| 166 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Content Protection', 'embedpress'); ?></li> |
| 167 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Custom Audio & Video Player', 'embedpress'); ?></li> |
| 168 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('PDF & Documents Embedding', 'embedpress'); ?></li> |
| 169 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Embed From 250+ Sources', 'embedpress'); ?></li> |
| 170 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('Wrapper Support', 'embedpress'); ?></li> |
| 171 | <li><img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/check2.svg'); ?>" alt=""><?php echo esc_html__('& Many more...', 'embedpress'); ?></li> |
| 172 | </ul> |
| 173 | |
| 174 | <a class="pro-upgrade-button" target="_blank" |
| 175 | href="<?php echo esc_url('https://wpdeveloper.com/in/upgrade-embedpress'); ?>"><?php echo esc_html__('Upgrade to Pro', 'embedpress'); ?><img |
| 176 | src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/external-white.svg'); ?>" alt=""></a> |
| 177 | </div> |
| 178 | |
| 179 | </div> |
| 180 | <?php endif; ?> |
| 181 | </div> |
| 182 | </div> |