PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 4.6.3
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v4.6.3
4.6.3 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / EmbedPress / Ends / Back / Settings / templates / hub.php
embedpress / EmbedPress / Ends / Back / Settings / templates Last commit date
partials 2 months ago ads.php 4 days ago bnr-img.png 1 year ago calendly.php 2 months ago custom-logo.php 4 days ago dailymotion.php 2 years ago elements.php 1 month ago general.php 7 months ago go-premium.php 8 months ago google-calendar.php 2 months ago hub.php 4 days ago instagram.php 2 months ago license.php 5 years ago main-template.php 2 months ago opensea.php 2 years ago player-engagement.php 3 months ago premium.php 2 years ago settings.php 2 months ago shortcode.php 2 months ago soundcloud.php 2 years ago sources.php 10 months ago spotify.php 2 years ago twitch.php 2 years ago vimeo.php 2 years ago wistia.php 2 months ago youtube.php 1 year ago
hub.php
578 lines
1 <?php
2 /*
3 * Hub Settings page
4 * All undefined vars comes from 'render_settings_page' method
5 */
6
7 // Check pro plugin status and license
8
9 // Get comprehensive license information
10 $license_info = \EmbedPress\Includes\Classes\Helper::get_license_info();
11 $is_pro_active = $license_info['is_pro_active'];
12 $license_status = $license_info['license_status'];
13 $license_key = $license_info['license_key'];
14 $is_features_enabled = $license_info['is_features_enabled'];
15 $status_message = $license_info['status_message'];
16
17 $is_banner_dismissed = get_option('embedpress_hub_banner_dismissed', false);
18
19 // Version-based popup logic
20 $stored_version = get_option('embedpress_last_popup_version', '');
21 $current_version = EMBEDPRESS_VERSION;
22 $is_popup_dismissed = false;
23
24 // Show popup if version has changed (for all users)
25 if ($stored_version !== $current_version) {
26 // Reset popup dismissed status for new version
27 $is_popup_dismissed = false;
28 } else {
29 // Check if popup was dismissed for current version
30 $is_popup_dismissed = get_option('embedpress_hub_popup_dismissed', false);
31 }
32
33 // First-visit delay for the Pro upgrade popup — fresh installs only.
34 //
35 // A brand-new user completes the 3-step onboarding and is redirected to this
36 // Hub dashboard; showing the upgrade popup on that very first load stacks it
37 // right on top of the onboarding and feels pushy. So for a genuine fresh
38 // install we arm a 2-day timer on the first dashboard render *after onboarding
39 // is finished* and show nothing — the popup only becomes eligible on a later
40 // dashboard visit once that window has elapsed. Existing users (updating from
41 // an older version) are unaffected and keep the current behaviour.
42 // 'embedpress_install_type' is set to 'fresh' vs 'existing' by
43 // EmbedpressSettings on the first load after (re)activation.
44 //
45 // Two conditions deliberately bypass the delay:
46 //
47 // 1. Onboarding not finished yet. The window must start from the moment the
48 // user lands on the Hub post-onboarding, NOT from an earlier stray visit to
49 // the menu — otherwise the 2 days can elapse while the user is still in the
50 // wizard, and the popup greets them on the very screen this delay exists to
51 // keep clean.
52 // 2. The plugin version actually changed. The block above resets
53 // $is_popup_dismissed on a version bump so the popup re-appears for every
54 // user; a still-live delay window must not silently swallow that re-show.
55 // Note this means a *real* bump: an empty $stored_version is the
56 // never-stamped initial state of a fresh install (the option is only
57 // written when the popup is dismissed), not an upgrade — treating it as a
58 // version change would disable the delay entirely.
59 $version_changed = ($stored_version !== '' && $stored_version !== $current_version);
60
61 $is_popup_delayed = false;
62 if (
63 get_option('embedpress_install_type', false) === 'fresh'
64 && ! $version_changed
65 ) {
66 if (! get_option('embedpress_onboarding_complete', false)) {
67 // Still in the wizard — suppress, but do NOT start the countdown yet.
68 $is_popup_delayed = true;
69 } else {
70 $popup_delay_until = get_option('embedpress_hub_popup_delay_until', false);
71 if ($popup_delay_until === false) {
72 // First dashboard render after onboarding — start the 2-day
73 // countdown and suppress the popup for this visit.
74 update_option('embedpress_hub_popup_delay_until', time() + (2 * DAY_IN_SECONDS));
75 $is_popup_delayed = true;
76 } else {
77 // Still within the delay window? Keep it hidden until it passes.
78 $is_popup_delayed = time() < (int) $popup_delay_until;
79
80 // Window has passed — drop the now-meaningless autoloaded option.
81 if (! $is_popup_delayed) {
82 delete_option('embedpress_hub_popup_delay_until');
83 }
84 }
85 }
86 }
87
88 // Check if Black Friday banner should be shown (until December 5, 2025)
89 $show_bfriday_banner = (time() < strtotime('2025-12-04 23:59:59'));
90
91 // Get global brand settings
92 $global_brand_settings = get_option(EMBEDPRESS_PLG_NAME . ':global_brand', []);
93 $global_brand_logo_url = isset($global_brand_settings['logo_url']) ? $global_brand_settings['logo_url'] : '';
94 $global_brand_logo_id = isset($global_brand_settings['logo_id']) ? $global_brand_settings['logo_id'] : '';
95
96 // Dynamic username for personalization
97 $current_user = wp_get_current_user();
98 $username = $current_user->display_name ? $current_user->display_name : $current_user->user_login;
99
100
101 ?>
102
103 <section class="embedpress-hub-section">
104 <div class="embedpress-banner-wrapper <?php echo $is_pro_active ? 'pro-plugin-active' : ''; ?>">
105 <?php if (!$is_pro_active): ?>
106 <!-- Free Version Banner -->
107 <div class="embedpress-banner embedpress-banner-active">
108 <div class="embedpress-row">
109 <div class=" embdpress-col-6 ">
110 <div class="embedpress-flex embedpress-item-center embedpress-banner-box embedpress-plan-wrapper">
111 <div class="embedpress-left-content">
112 <div class="embedpress-flex embedpress-mb-16 embedpress-item-center">
113 <div class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
114 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/lock.svg'); ?>" alt="<?php esc_attr_e('Lock Icon', 'embedpress'); ?>">
115 </div>
116
117 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('Free Plan', 'embedpress'); ?></h2>
118 </div>
119 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-banner-sub-header">
120 <?php
121 printf(
122 /* translators: %s: "View upgrades" link */
123 esc_html__('You’re using the free version with access to 250+ sources, basic updates, and forum support. %s.', 'embedpress'),
124 '<a href="' . esc_url('https://wpdeveloper.com/in/upgrade-embedpress') . '" target="_blank" class="embdpress-hilight-text">' . esc_html__('View upgrades', 'embedpress') . '</a>'
125 );
126 ?>
127 </p>
128 </div>
129 <div class="embedpress-right-content">
130 <div class="embedpress-img-wrapper">
131 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/stAllproduct.png'); ?>" alt="<?php esc_attr_e('All Products Image', 'embedpress'); ?>">
132 </div>
133 </div>
134 </div>
135 </div>
136 <div class=" embdpress-col-6 ">
137 <div class="embedpress-flex embedpress-item-center embedpress-brand-wrapper">
138 <div class="embedpress-left-content">
139 <div class="embedpress-flex embedpress-mb-16 embedpress-item-center ">
140 <div class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
141 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/brand-icon.png'); ?>" alt="<?php esc_attr_e('Brand Icon', 'embedpress'); ?>">
142 </div>
143
144 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('Brand Your Work', 'embedpress'); ?></h2>
145 </div>
146 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-banner-sub-header">
147 <?php
148 printf(
149 /* translators: %s: link to upgrade page */
150 esc_html__('Stand out with every embed. Add your logo and drive traffic back to your site. %s', 'embedpress'),
151 '<a href="' . esc_url('https://wpdeveloper.com/in/upgrade-embedpress') . '" target="_blank" class="embdpress-hilight-text"> ' . esc_html__('Upgrade now to unlock branding!', 'embedpress') . ' </a>'
152 );
153 ?>
154 </p>
155 </div>
156 <div class="embedpress-right-content">
157 <div class="embedpress-preview-area embedpress-height-95">
158 <div class=" embedpress-font-m embedpress-tag"><?php esc_html_e('Premium', 'embedpress'); ?></div>
159 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/img-in.png'); ?>" alt="<?php esc_attr_e('Premium Feature Preview', 'embedpress'); ?>">
160 </div>
161 </div>
162 </div>
163 </div>
164 </div>
165 </div>
166
167
168 <?php elseif ($is_pro_active && !$is_features_enabled): ?>
169 <!-- Pro Installed but License Not Valid (covers empty, invalid, expired, etc.) -->
170 <div class="embedpress-banner embedpress-banner-active">
171 <div class="embedpress-row">
172 <div class=" embdpress-col-6 ">
173 <div class=" embedpress-banner-box embedpress-license-wrapper">
174 <span class="embedpress-flex embedpress-mb-16 embedpress-item-center">
175 <span class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
176 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/lock-inactive.png'); ?>" alt="<?php esc_attr_e('License Inactive Icon', 'embedpress'); ?>">
177 </span>
178 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header">
179 <?php echo $license_status === 'expired' ? __('License Expired', 'embedpress') : __('License Required', 'embedpress'); ?>
180 </h2>
181 </span>
182 <h3 class="embedpress-font-l embdpress-hilight-text embedpress-font-family-dmsans embedpress-banner-secondary-header"><?php
183 /* translators: %s: WordPress username */
184 printf(esc_html__('%s, you’ve installed EmbedPress Pro!', 'embedpress'), esc_html($username));
185 ?></h3>
186 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-mb-16 embedpress-font-m embedpress-banner-sub-header">
187 <?php esc_html_e('Activate your license key to enable EmbedPress Pro’s features and to start receiving automatic updates and premium support.', 'embedpress'); ?> </p>
188 <a href="<?php echo esc_url(admin_url('admin.php?page=embedpress&page_type=license')); ?>" class="embedpress-btn embedpress-license-btn embedpress-activate-license-btn ">
189 <span class="embedpress-line-height-0 ">
190 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/key-removebg-preview 1.png'); ?>" alt="<?php esc_attr_e('License Key Icon', 'embedpress'); ?>">
191 </span>
192 <?php echo esc_html__('Activate License', 'embedpress'); ?>
193 </a>
194 </div>
195 </div>
196 <div class=" embdpress-col-6 ">
197 <div class="embedpress-flex embedpress-item-center embedpress-banner-box embedpress-upload-brand-wrapper">
198 <div class="embedpress-left-content">
199 <div class="embedpress-flex embedpress-mb-16 embedpress-item-center">
200 <div class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
201 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/brand-icon.png'); ?>" alt="<?php esc_attr_e('Brand Icon', 'embedpress'); ?>">
202
203 </div>
204
205 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('Brand Your Work', 'embedpress'); ?></h2>
206 </div>
207 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-banner-sub-header"><?php esc_html_e('Upload your custom logo to apply branding to your embeds. You can override the logo per content type from the individual source settings.', 'embedpress'); ?> </p>
208 <a href="#" class="embedpress-btn embedpress-branding-options-btn <?php echo !$is_features_enabled ? 'disabled' : ''; ?>" <?php echo !$is_features_enabled ? 'style="opacity: 0.5; pointer-events: none;"' : ''; ?>>
209 <?php echo !$is_features_enabled ? __('Branding Options (Disabled)', 'embedpress') : __('Branding Options', 'embedpress'); ?>
210 </a>
211 </div>
212 <div class="embedpress-right-content embedpress-branding-preview-wrapper">
213 <div class="brand-preview-area">
214 <div class="embedpress-preview-area" id="globalBrandPreview">
215 <?php if (!empty($global_brand_logo_url)): ?>
216 <img src="<?php echo esc_url($global_brand_logo_url); ?>" alt="Global Brand Logo" class="embedpress-global-brand-preview-img">
217 <?php endif; ?>
218 </div>
219 <input type="hidden" id="globalBrandLogoUrl" value="<?php echo esc_attr($global_brand_logo_url); ?>">
220 <input type="hidden" id="globalBrandLogoId" value="<?php echo esc_attr($global_brand_logo_id); ?>">
221 </div>
222 <div class="preview-actions-button">
223 <button type="button" id="globalBrandUploadBtn" class="embedpress-font-sm embedpress-font-family-dmsans embedpress-upload-btn" <?php echo !$is_features_enabled ? 'disabled style="opacity: 0.5;"' : ''; ?>>
224 <?php echo !empty($global_brand_logo_url) ? esc_html__('Replace', 'embedpress') : esc_html__('Upload', 'embedpress'); ?>
225 </button>
226 <?php if (!empty($global_brand_logo_url)): ?>
227 <button type="button" id="globalBrandRemoveBtn" class="embedpress-font-sm embedpress-font-family-dmsans embedpress-upload-btn remove-btn" <?php echo !$is_features_enabled ? 'disabled style="opacity: 0.5;"' : ''; ?>><?php esc_html_e('Remove', 'embedpress'); ?></button>
228 <?php endif; ?>
229 </div>
230 </div>
231 </div>
232 </div>
233 </div>
234 </div>
235
236
237 <?php elseif ($is_pro_active && $license_status === 'expired'): ?>
238 <!-- Pro Active but License Expired -->
239 <div class="embedpress-banner embedpress-banner-active">
240 <div class="embedpress-row">
241 <div class=" embdpress-col-6 ">
242 <div class=" embedpress-banner-box embedpress-license-wrapper">
243 <span class="embedpress-flex embedpress-mb-16 embedpress-item-center">
244 <span class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
245 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/lock-inactive.png'); ?>" alt="<?php esc_attr_e('License Inactive Icon', 'embedpress'); ?>">
246 </span>
247 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('License Key', 'embedpress'); ?></h2>
248 </span>
249 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-mb-16 embedpress-font-m embedpress-banner-sub-header error-msg">
250 You‘re currently receiving regular plugin updates and support.</p>
251 <div class="embedpress-license-input-wrapper ">
252 <input type="text" class="embedpress-license-input " value="<?php echo esc_attr(\EmbedPress\Includes\Classes\Helper::mask_license_key($license_key)); ?>" disabled>
253 <button class="embedpress-font-m embedpress-font-family-dmsans embedpress-active-btn ">
254 <span class="embedpress-line-height-0">
255 <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
256 <path d="M8.917 0.916077L3.66699 7.99941L0.916992 5.91608L0.166992 6.91608L3.91699 9.74941L9.91699 1.66608L8.917 0.916077Z" />
257 </svg>
258 </span>
259 <?php esc_html_e('Active', 'embedpress'); ?>
260 </button>
261 </div>
262
263 <!-- Add the class embedpress-manage-license-btn to the target button (or appropriate element).
264 Update the button text/content to: "Manage License".
265 Add the class embedpress-banner-active to the wrapper element with class embedpress-license-input-wrapper.
266 If the license is enabled/valid, also add this class to the button: embedpress-manage-license-btn-enable. -->
267
268 <a href="<?php echo esc_url('https://store.wpdeveloper.com'); ?>" target="_blank" class="embedpress-btn embedpress-license-btn embedpress-manages-license-btn ">
269 <span class="embedpress-line-height-0 ">
270 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/key-removebg-preview 2.svg'); ?>" alt="<?php esc_attr_e('License Key Icon', 'embedpress'); ?>">
271 </span>
272 <?php esc_html_e('Manage License', 'embedpress'); ?>
273 </a>
274 </div>
275 </div>
276 <div class=" embdpress-col-6 ">
277 <div class="embedpress-flex embedpress-item-center embedpress-banner-box embedpress-upload-brand-wrapper">
278 <div class="embedpress-left-content">
279 <div class="embedpress-flex embedpress-mb-16 embedpress-item-center">
280 <div class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
281 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/brand-icon.png'); ?>" alt="<?php esc_attr_e('Brand Icon', 'embedpress'); ?>">
282 </div>
283
284 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('Brand Your Work', 'embedpress'); ?></h2>
285 </div>
286 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-banner-sub-header"><?php esc_html_e('Upload your custom logo to apply branding to your embeds. You can override the logo per content type from the individual source settings.', 'embedpress'); ?> </p>
287 <a href="#" class="embedpress-btn embedpress-branding-options-btn"><?php esc_html_e('Branding Options', 'embedpress'); ?></a>
288 </div>
289
290 <div class="embedpress-right-content embedpress-branding-preview-wrapper">
291 <div class="brand-preview-area">
292 <div class="embedpress-preview-area" id="globalBrandPreviewExpired">
293 <?php if (!empty($global_brand_logo_url)): ?>
294 <img src="<?php echo esc_url($global_brand_logo_url); ?>" alt="Global Brand Logo" class="embedpress-global-brand-preview-img">
295 <?php endif; ?>
296 </div>
297 <input type="hidden" id="globalBrandLogoUrlExpired" value="<?php echo esc_attr($global_brand_logo_url); ?>">
298 <input type="hidden" id="globalBrandLogoIdExpired" value="<?php echo esc_attr($global_brand_logo_id); ?>">
299 </div>
300 <div class="preview-actions-button">
301 <button type="button" id="globalBrandUploadBtn" class="embedpress-font-sm embedpress-font-family-dmsans embedpress-upload-btn" <?php echo !$is_features_enabled ? 'disabled style="opacity: 0.5;"' : ''; ?>>
302 <?php echo !empty($global_brand_logo_url) ? esc_html__('Replace', 'embedpress') : esc_html__('Upload', 'embedpress'); ?>
303 </button>
304 <?php if (!empty($global_brand_logo_url)): ?>
305 <button type="button" id="globalBrandRemoveBtn" class="embedpress-font-sm embedpress-font-family-dmsans embedpress-upload-btn remove-btn" <?php echo !$is_features_enabled ? 'disabled style="opacity: 0.5;"' : ''; ?>><?php esc_html_e('Remove', 'embedpress'); ?></button>
306 <?php endif; ?>
307 </div>
308 </div>
309 </div>
310 </div>
311 </div>
312 </div>
313
314 <?php elseif ($is_pro_active && $license_status === 'valid'): ?>
315 <!-- Pro Active with Valid License -->
316 <div class="embedpress-banner embedpress-banner-active">
317 <div class="embedpress-row">
318 <div class=" embdpress-col-6 ">
319 <div class=" embedpress-banner-box embedpress-license-wrapper">
320 <span class="embedpress-flex embedpress-mb-16 embedpress-item-center">
321 <span class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
322 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/lock-active.png'); ?>" alt="<?php esc_attr_e('License Inactive Icon', 'embedpress'); ?>">
323 </span>
324 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('License Key', 'embedpress'); ?></h2>
325 </span>
326 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-mb-16 embedpress-font-m embedpress-banner-sub-header valid-msg">
327 You‘re currently receiving regular plugin updates and support.</p>
328 <div class="embedpress-license-input-wrapper ">
329 <input type="text" class="embedpress-license-input " value="<?php echo esc_attr(\EmbedPress\Includes\Classes\Helper::mask_license_key($license_key)); ?>" disabled>
330 <button class="embedpress-font-m embedpress-font-family-dmsans embedpress-active-btn">
331 <span class="embedpress-line-height-0">
332 <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
333 <path d="M8.917 0.916077L3.66699 7.99941L0.916992 5.91608L0.166992 6.91608L3.91699 9.74941L9.91699 1.66608L8.917 0.916077Z" />
334 </svg>
335 </span>
336 <?php esc_html_e('Active', 'embedpress'); ?>
337 </button>
338 </div>
339
340 <!-- Add the class embedpress-manage-license-btn to the target button (or appropriate element).
341 Update the button text/content to: "Manage License".
342 Add the class embedpress-banner-active to the wrapper element with class embedpress-license-input-wrapper.
343 If the license is enabled/valid, also add this class to the button: embedpress-manage-license-btn-enable. -->
344
345 <a href="<?php echo esc_url(admin_url('admin.php?page=embedpress&page_type=license')); ?>" class="embedpress-btn embedpress-license-btn embedpress-manages-license-btn ">
346 <span class="embedpress-line-height-0 ">
347 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/key-removebg-preview 2.svg'); ?>" alt="<?php esc_attr_e('License Key Icon', 'embedpress'); ?>">
348 </span>
349 <?php esc_html_e('Manage License', 'embedpress'); ?>
350 </a>
351 </div>
352 </div>
353 <div class=" embdpress-col-6 ">
354 <div class="embedpress-flex embedpress-item-center embedpress-banner-box embedpress-upload-brand-wrapper">
355 <div class="embedpress-left-content">
356 <div class="embedpress-flex embedpress-mb-16 embedpress-item-center">
357 <div class="embedpress-line-height-0 embedpress-mr-4 banner-icon">
358 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/brand-icon.png'); ?>" alt="<?php esc_attr_e('Brand Icon', 'embedpress'); ?>">
359 </div>
360
361 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-banner-header"><?php esc_html_e('Brand Your Work', 'embedpress'); ?></h2>
362 </div>
363 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-banner-sub-header"><?php esc_html_e('Upload your custom logo to apply branding to your embeds. You can override the logo per content type from the individual source settings.', 'embedpress'); ?> </p>
364 <a href="<?php echo esc_url(admin_url('admin.php?page=embedpress&page_type=custom-logo')); ?>" class="embedpress-btn embedpress-branding-options-btn"><?php esc_html_e('Branding Options', 'embedpress'); ?></a>
365 </div>
366 <div class="embedpress-right-content embedpress-branding-preview-wrapper">
367 <div class="brand-preview-area">
368 <div class="embedpress-preview-area" id="globalBrandPreview">
369 <?php if (!empty($global_brand_logo_url)): ?>
370 <img src="<?php echo esc_url($global_brand_logo_url); ?>" alt="Global Brand Logo" class="embedpress-global-brand-preview-img">
371 <?php endif; ?>
372 </div>
373 <input type="hidden" id="globalBrandLogoUrlValid" value="<?php echo esc_attr($global_brand_logo_url); ?>">
374 <input type="hidden" id="globalBrandLogoIdValid" value="<?php echo esc_attr($global_brand_logo_id); ?>">
375 </div>
376 <div class="preview-actions-button">
377 <button type="button" id="globalBrandUploadBtn" class="embedpress-font-sm embedpress-font-family-dmsans embedpress-upload-btn" <?php echo !$is_features_enabled ? 'disabled style="opacity: 0.5;"' : ''; ?>>
378 <?php echo !empty($global_brand_logo_url) ? esc_html__('Replace', 'embedpress') : esc_html__('Upload', 'embedpress'); ?>
379 </button>
380 <?php if (!empty($global_brand_logo_url)): ?>
381 <button type="button" id="globalBrandRemoveBtn" class="embedpress-font-sm embedpress-font-family-dmsans embedpress-upload-btn remove-btn" <?php echo !$is_features_enabled ? 'disabled style="opacity: 0.5;"' : ''; ?>><?php esc_html_e('Remove', 'embedpress'); ?></button>
382 <?php endif; ?>
383 </div>
384 </div>
385 </div>
386 </div>
387 </div>
388 </div>
389 <?php endif; ?>
390 </div>
391
392
393 <?php if (!$is_popup_dismissed && !$is_pro_active && !$is_popup_delayed): ?>
394 <div class="embedpress-pop-up">
395 <div class="embedpress-flex embedpress-pop-up-content">
396 <div class="pop-up-left-content">
397 <?php if ($show_bfriday_banner): ?>
398 <div class="bfriday-deal-campaign">
399 <a href="https://embedpress.com/in/bfcm2025-unlock-premium-features" target="_blank">
400 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/bfcm2025-banner.png'); ?>" alt="Black Friday Sale">
401 </a>
402 </div>
403 <?php endif; ?>
404 <span class="premium-tag"><?php esc_html_e('Premium', 'embedpress'); ?></span>
405 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-pop-up-header"><?php esc_html_e('Unlock More Power in Every Embed', 'embedpress'); ?></h2>
406 <p class="embedpress-font-m embedpress-font-family-dmsans embedpress-pop-up-sub-header">
407 <?php echo wp_kses(__('Take full control of your embeds, Customize every detail, protect your<br> content, and unlock monetization features to grow your business.', 'embedpress'), ['br' => []]); ?>
408 </p>
409 <ul class="embedpress-premium-features-list">
410 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Add your own logo', 'embedpress'); ?></li>
411 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Lock content for members', 'embedpress'); ?></li>
412 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Apply lazy loading', 'embedpress'); ?></li>
413 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Control PDF usage', 'embedpress'); ?></li>
414 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Control video playback', 'embedpress'); ?></li>
415 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Show custom ads in embeds', 'embedpress'); ?></li>
416 <li class="embedpress-font-m embedpress-font-family-dmsans embedpress-premium-features-list-item"><?php esc_html_e('Advanced analytics', 'embedpress'); ?></li>
417 </ul>
418 <a target="_blank" href="<?php echo esc_url('https://embedpress.com/in/unlock-premium-features'); ?>" class="embedpress-btn embedpress-btn-primary embedpress-pop-up-btn">
419 <span class="embedpress-line-height-0 embedpress-mr-4 pop-up-btn-icon">
420 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/crown.png'); ?>" alt="<?php esc_attr_e('Premium Crown Icon', 'embedpress'); ?>">
421 </span>
422 <span><?php esc_html_e('Unlock Premium Features', 'embedpress'); ?></span>
423 </a>
424 <div class="embedpress-font-m embedpress-font-family-dmsans embedpress-flex embedpress-item-center embedpress-guarantee "><span class="embedpress-line-height-0 embedpress-mr-4">
425 <svg width="11" height="13" viewBox="0 0 11 13" fill="none" xmlns="http://www.w3.org/2000/svg">
426 <path d="M10.9477 3.34726C10.9411 2.99628 10.9347 2.66471 10.9347 2.34394C10.9347 2.09265 10.731 1.88891 10.4797 1.88891C8.53363 1.88891 7.05198 1.32965 5.81696 0.128843C5.64029 -0.0429779 5.35914 -0.0429172 5.18252 0.128843C3.94762 1.32965 2.46622 1.88891 0.520311 1.88891C0.269012 1.88891 0.065278 2.09265 0.065278 2.34394C0.065278 2.66477 0.0589682 2.99646 0.0522337 3.34751C-0.0101362 6.6138 -0.0955608 11.0871 5.3507 12.9749C5.399 12.9917 5.44935 13 5.49971 13C5.55007 13 5.60049 12.9917 5.64872 12.9749C11.0954 11.0871 11.0101 6.61361 10.9477 3.34726ZM5.49977 12.0621C0.828885 10.3653 0.899506 6.64832 0.962179 3.36486C0.965941 3.1678 0.969581 2.97681 0.972129 2.78957C2.79469 2.71264 4.25213 2.16035 5.49977 1.07349C6.74753 2.16035 8.20522 2.7127 10.0279 2.78957C10.0304 2.97674 10.0341 3.16762 10.0378 3.36455C10.1005 6.64814 10.171 10.3653 5.49977 12.0621Z" fill="#666666" />
427 <path d="M7.06673 4.91926L4.8705 7.11537L3.93331 6.17819C3.75561 6.00054 3.46748 6.00054 3.28983 6.17819C3.11213 6.35595 3.11213 6.64402 3.28983 6.82172L4.54876 8.08065C4.63758 8.16947 4.75407 8.21388 4.8705 8.21388C4.98693 8.21388 5.10342 8.16947 5.19224 8.08065L7.71015 5.5628C7.88792 5.38509 7.88792 5.09697 7.71021 4.91932C7.53256 4.74161 7.24444 4.74155 7.06673 4.91926Z" fill="#666666" />
428 </svg>
429
430 </span><span><?php esc_html_e('No risk 14-day money-back guarantee included.', 'embedpress'); ?></span></div>
431
432 </div>
433 <div class="pop-up-right-content">
434 <button class="embedpress-font-m embedpress-font-family-dmsans embedpress-cancel-button"><?php esc_html_e('Dismiss', 'embedpress'); ?></button>
435 <div class="embedpress-img-wrapper">
436 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/right-content-img.png'); ?>" alt="<?php esc_attr_e('Premium Features Image', 'embedpress'); ?>">
437 </div>
438 <div class="embedress-text-wrapper">
439 <p class="embedpress-font-m embedpress-font-family-dmsans"><?php esc_html_e('Premium users get full branding, control, and monetization', 'embedpress'); ?></p>
440 </div>
441 </div>
442 </div>
443 </div>
444 <?php endif; ?>
445
446 <!-- Popular Content Section (always visible) -->
447 <div class="embedpress-popular-content-wrapper">
448 <div class="embedpress-popular-content-header">
449 <div class="embedpress-flex embedpress-item-center embedpress-justify-between">
450 <span class="embedpress-flex embedpress-item-center">
451 <span class="embedpress-line-height-0 embedpress-mr-4">
452 <img src="<?php echo esc_url(EMBEDPRESS_URL_ASSETS . 'images/icons/source-control 1.svg'); ?>" alt="<?php esc_attr_e('Source Control Icon', 'embedpress'); ?>">
453 </span>
454 <h2 class="embedpress-font-xl embedpress-font-family-dmsans embedpress-popular-types-header"><?php esc_html_e('Most Popular Content Types', 'embedpress'); ?></h2>
455 </span>
456 <a href="<?php echo esc_url(admin_url('admin.php?page=embedpress&page_type=sources')); ?>" class="embedpress-font-m embedpress-font-family-dmsans embdpress-underline"><?php esc_html_e('Discover all sources', 'embedpress'); ?></a>
457 </div>
458 </div>
459
460 <?php
461 // Array of most popular sources based on sources.php with exact icon paths
462 $icon_src = EMBEDPRESS_URL_ASSETS . "images/sources/icons";
463
464 $popular_sources = [
465 // PDFs & Docs
466 'docs' => [
467 'title' => __('PDFs & Docs', 'embedpress'),
468 'icon' => EMBEDPRESS_URL_ASSETS . 'images/icons/docs-icon 1.png',
469 'sources' => [
470 ['name' => 'PDF', 'provider' => 'pdf', 'icon' => $icon_src . '/pdf.svg', 'settings_url' => '', 'doc_url' => 'https://wpdeveloper.com/embed-pdf-documents-wordpress', 'arival_status' => 'popular'],
471 ['name' => 'Google Docs', 'provider' => 'google-docs', 'icon' => $icon_src . '/google-docs.svg', 'settings_url' => '', 'doc_url' => 'https://embedpress.com/docs/embed-google-docs-wordpress/', 'arival_status' => 'popular'],
472 ['name' => 'Google Slides', 'provider' => 'google-slides', 'icon' => $icon_src . '/google-slides.svg', 'settings_url' => '', 'doc_url' => 'https://embedpress.com/docs/embed-google-slides-wordpress/', 'arival_status' => 'popular'],
473
474 ]
475 ],
476 // Video Sources
477 'video' => [
478 'title' => __('Audio & Video', 'embedpress'),
479 'icon' => EMBEDPRESS_URL_ASSETS . 'images/sources/audio-video.svg',
480 'sources' => [
481 ['name' => 'YouTube', 'provider' => 'youtube', 'icon' => $icon_src . '/youtube.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=youtube')), 'doc_url' => 'https://embedpress.com/docs/embed-youtube-wordpress/', 'arival_status' => 'popular'],
482 ['name' => 'Vimeo', 'provider' => 'vimeo', 'icon' => $icon_src . '/vimeo.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=vimeo')), 'doc_url' => 'https://embedpress.com/docs/embed-vimeo-videos-wordpress/', 'arival_status' => 'popular'],
483 ['name' => 'Wistia', 'provider' => 'wistia', 'icon' => $icon_src . '/wistia.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=wistia')), 'doc_url' => 'https://embedpress.com/docs/embed-wistia-videos-wordpress/', 'arival_status' => 'popular'],
484 ['name' => 'Spotify', 'provider' => 'spotify', 'icon' => $icon_src . '/spotify.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=spotify')), 'doc_url' => 'https://embedpress.com/docs/embed-spotify-audios-wordpress/', 'arival_status' => 'popular'],
485 ['name' => 'SoundCloud', 'provider' => 'soundcloud', 'icon' => $icon_src . '/soundcloud.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=soundcloud')), 'doc_url' => 'https://embedpress.com/docs/embed-soundcloud-audio-wordpress/'],
486 ]
487 ],
488 // Social Media
489 'social' => [
490 'title' => __('Social Media', 'embedpress'),
491 'icon' => EMBEDPRESS_URL_ASSETS . 'images/sources/social.svg',
492 'sources' => [
493 ['name' => 'Facebook', 'provider' => 'facebook', 'icon' => $icon_src . '/facebook.svg', 'settings_url' => '', 'doc_url' => 'https://embedpress.com/docs/embed-facebook-posts-wordpress/', 'arival_status' => 'popular'],
494 ['name' => 'Facebook Live', 'provider' => 'facebook-live', 'icon' => $icon_src . '/facebooklive.png', 'settings_url' => '', 'doc_url' => 'https://embedpress.com/docs/embed-facebook-posts-wordpress/', 'arival_status' => 'popular'],
495 ['name' => 'Instagram', 'provider' => 'instagram', 'icon' => $icon_src . '/instagram.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=instagram')), 'doc_url' => 'https://embedpress.com/docs/embed-instagram-wordpress/', 'arival_status' => 'popular'],
496 ['name' => 'OpenSea NFT', 'provider' => 'opensea', 'icon' => $icon_src . '/opensea.svg', 'settings_url' => esc_url(admin_url('admin.php?page=embedpress&page_type=opensea')), 'doc_url' => 'https://embedpress.com/docs/embed-opensea-nft-collections-wordpress/', 'arival_status' => 'popular'],
497 ]
498 ],
499 // Audio & Music
500 'audio' => [
501 'title' => __('Others', 'embedpress'),
502 'icon' => EMBEDPRESS_URL_ASSETS . 'images//sources/automations.svg',
503 'sources' => [
504 ['name' => 'Google Photos', 'provider' => 'google-photos', 'icon' => $icon_src . '/google-photos.svg', 'settings_url' => '', 'doc_url' => 'https://embedpress.com/docs/embed-google-photos-in-wordpress/', 'arival_status' => 'popular'],
505 ['name' => 'Google Maps', 'provider' => 'google-maps', 'icon' => $icon_src . '/map.svg', 'settings_url' => '', 'doc_url' => 'https://embedpress.com/docs/embed-google-maps-wordpress/', 'arival_status' => 'popular'],
506 ]
507 ]
508 ];
509 ?>
510
511 <div class="embedpress-popular-content-body">
512 <div class="embedpress-row">
513 <?php foreach ($popular_sources as $category_key => $category): ?>
514 <div class="embdpress-col-3">
515 <div class="embedpress-popular-content-cards">
516 <div class="embedpress-flex embedpress-item-center embedpress-card-header-wrapper">
517 <span class="embedpress-line-height-0 embedpress-mr-4 banner-icon-l">
518 <img src="<?php echo esc_url($category['icon']); ?>" alt="<?php echo esc_attr($category['title']); ?>">
519 </span>
520 <h3 class="embedpress-font-m embedpress-content-card-header"><?php echo esc_html($category['title']); ?></h3>
521 </div>
522 <ul class="embedpress-popular-content-list">
523 <?php foreach ($category['sources'] as $source): ?>
524 <li class="embedpress-popular-content-list-item">
525 <div class="embedpress-flex embedpress-item-center content-item-wrapper">
526 <span class="embedpress-line-height-0 popular-content-icon <?php echo esc_attr($source['provider']); ?>">
527 <img src="<?php echo esc_url($source['icon']); ?>" alt="<?php echo esc_attr($source['name']); ?>">
528 </span>
529 <span class="embedpress-font-m"><?php echo esc_html($source['name']); ?></span>
530 </div>
531 <div class="embedpress-hub-item-actions">
532
533 <?php if (!empty($source['settings_url'])): ?>
534 <a href="<?php echo esc_url($source['settings_url']); ?>" class="embedpress-hub-item-link" title="<?php esc_attr_e('Settings', 'embedpress'); ?>">
535 <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
536 <g clip-path="url(#a)" stroke="#988FBD" stroke-linecap="round" stroke-linejoin="round">
537 <path d="M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58a1.149 1.149 0 0 0 1.715-.71Z" />
538 <path d="M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0Z" />
539 </g>
540 <defs>
541 <clipPath id="a">
542 <path fill="#fff" d="M0 0h16v16H0z" />
543 </clipPath>
544 </defs>
545 </svg>
546 </a>
547 <?php endif; ?>
548
549 <?php if (!empty($source['doc_url'])): ?>
550 <a href="<?php echo esc_url($source['doc_url']); ?>" target="_blank" class="embedpress-hub-item-link" title="<?php esc_attr_e('Documentation', 'embedpress'); ?>">
551 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
552 <g clip-path="url(#a)" stroke="#988FBD" stroke-linecap="round" stroke-linejoin="round">
553 <path d="M9.333 2v2.667a.667.667 0 0 0 .667.666h2.666" />
554 <path d="M11.333 14H4.666a1.334 1.334 0 0 1-1.333-1.333V3.333A1.333 1.333 0 0 1 4.666 2h4.667l3.333 3.333v7.334A1.333 1.333 0 0 1 11.333 14ZM6 11.333h4M6 8.667h4" />
555 </g>
556 <defs>
557 <clipPath id="a">
558 <path fill="#fff" d="M0 0h16v16H0z" />
559 </clipPath>
560 </defs>
561 </svg>
562 </a>
563 <?php endif; ?>
564 </div>
565
566 <?php if (!empty($source['arival_status']) && $source['arival_status'] !== 'popular'): ?>
567 <div class="ribbon-container <?php echo esc_attr($source['arival_status']); ?>"><?php echo esc_html($source['arival_status']); ?></div>
568 <?php endif; ?>
569 </li>
570 <?php endforeach; ?>
571 </ul>
572 </div>
573 </div>
574 <?php endforeach; ?>
575 </div>
576 </div>
577 </div>
578 </section>