X7ROOT File Manager
Current Path:
/home/oakwood/public_html/wp-content/plugins/popup-maker/classes
home
/
oakwood
/
public_html
/
wp-content
/
plugins
/
popup-maker
/
classes
/
ðŸ“
..
ðŸ“
Abstract
📄
Activator.php
(796 B)
ðŸ“
Admin
📄
Admin.php
(3.72 KB)
📄
Ajax.php
(1.66 KB)
📄
Analytics.php
(7.79 KB)
📄
AssetCache.php
(19.99 KB)
ðŸ“
Batch
📄
Cache.php
(252 B)
📄
ConditionCallbacks.php
(6.35 KB)
📄
Conditions.php
(14.26 KB)
📄
Cookies.php
(7.67 KB)
ðŸ“
DB
📄
DataStorage.php
(382 B)
📄
Deactivator.php
(594 B)
ðŸ“
Extension
📄
Extensions.php
(5.34 KB)
📄
GA.php
(2.31 KB)
📄
Helpers.php
(8.04 KB)
📄
Install.php
(7.92 KB)
ðŸ“
Integration
📄
Integrations.php
(12.69 KB)
ðŸ“
Interface
📄
Licensing.php
(7.69 KB)
📄
ListTable.php
(41.08 KB)
📄
Logging.php
(266 B)
ðŸ“
Model
ðŸ“
Newsletter
📄
Newsletters.php
(8.85 KB)
📄
Options.php
(308 B)
📄
Popup.php
(240 B)
📄
Popups.php
(787 B)
📄
Previews.php
(3.62 KB)
📄
Privacy.php
(16.22 KB)
ðŸ“
Repository
ðŸ“
Shortcode
📄
Shortcode.php
(11.61 KB)
📄
Shortcodes.php
(1.28 KB)
ðŸ“
Site
📄
Site.php
(4.67 KB)
📄
Telemetry.php
(10.31 KB)
📄
Triggers.php
(10.33 KB)
📄
Types.php
(7.59 KB)
ðŸ“
Upgrade
📄
Upgrades.php
(348 B)
📄
Upsell.php
(7.52 KB)
ðŸ“
Utils
📄
index.php
(116 B)
Editing: Upsell.php
<?php /** * Class for Upsell * * @package PopupMaker * @copyright Copyright (c) 2024, Code Atlantic LLC */ /** * Handles displaying promotional text throughout plugin UI */ class PUM_Upsell { /** * Hooks any needed methods */ public static function init() { add_filter( 'views_edit-popup', [ __CLASS__, 'addon_tabs' ], 10, 1 ); add_filter( 'views_edit-popup_theme', [ __CLASS__, 'addon_tabs' ], 10, 1 ); add_filter( 'pum_popup_settings_fields', [ __CLASS__, 'popup_promotional_fields' ] ); add_filter( 'pum_theme_settings_fields', [ __CLASS__, 'theme_promotional_fields' ] ); add_action( 'in_admin_header', [ __CLASS__, 'notice_bar_display' ] ); } /** * Adds a small notice bar in PM admin areas when not using any extensions * * @since 1.14.0 */ public static function notice_bar_display() { if ( pum_is_all_popups_page() && 0 === count( pum_enabled_extensions() ) ) { $message = sprintf( /* translators: %s - Wraps ending in link to pricing page. */ esc_html__( 'You are using the free version of Popup Maker. To get even more value, consider %1$supgrading to our premium plans%2$s.', 'popup-maker' ), '<a href="https://wppopupmaker.com/pricing/?utm_source=upsell-notice-bar&utm_medium=text-link&utm_campaign=upsell" target="_blank" rel="noopener noreferrer">', '</a>' ); ?> <div class="pum-notice-bar-wrapper"> <div class="pum-notice-bar"> <span class="pum-notice-bar-message"> <?php echo wp_kses( $message, [ 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], ] ); ?> </span> </div> </div> <?php } } /** * Adds messages throughout Popup Settings UI * * @param array $tabs The tabs/fields for popup settings. * @return array */ public static function popup_promotional_fields( $tabs = [] ) { if ( ! pum_extension_enabled( 'forced-interaction' ) ) { /* translators: %s url to product page. */ $message = sprintf( __( 'Want to disable the close button? Check out <a href="%s" target="_blank">Forced Interaction</a>!', 'popup-maker' ), 'https://wppopupmaker.com/extensions/forced-interaction/?utm_source=plugin-theme-editor&utm_medium=text-link&utm_campaign=upsell&utm_content=close-button-settings' ); $promotion = [ 'type' => 'html', 'content' => '<img src="' . pum_asset_url( 'images/upsell-icon-forced-interaction.png' ) . '" />' . $message, 'priority' => 999, 'class' => 'pum-upgrade-tip', ]; $tabs['close']['button']['fi_promotion'] = $promotion; $tabs['close']['forms']['fi_promotion'] = $promotion; $tabs['close']['alternate_methods']['fi_promotion'] = $promotion; } if ( ! pum_extension_enabled( 'advanced-targeting-conditions' ) ) { /* translators: %s url to product page. */ $message = sprintf( __( 'Need more <a href="%s" target="_blank">advanced targeting</a> options?', 'popup-maker' ), 'https://wppopupmaker.com/extensions/advanced-targeting-conditions/?utm_campaign=upsell&utm_source=plugin-popup-editor&utm_medium=text-link&utm_content=conditions-editor' ); $tabs['targeting']['main']['atc_promotion'] = [ 'type' => 'html', 'content' => '<img src="' . pum_asset_url( 'images/logo.png' ) . '" height="28" />' . $message, 'priority' => 999, 'class' => 'pum-upgrade-tip', ]; } return $tabs; } /** * Adds messages throughout Popup Theme UI * * @param array $tabs The tabs/fields for popup theme. * @return array */ public static function theme_promotional_fields( $tabs = [] ) { if ( ! pum_extension_enabled( 'advanced-theme-builder' ) && ! class_exists( 'PUM_ATB' ) ) { foreach ( [ 'overlay', 'container', 'close' ] as $tab ) { /* translators: %s url to product page. */ $message = __( 'Want to use <a href="%s" target="_blank">background images</a>?', 'popup-maker' ); $tabs[ $tab ]['background']['atc_promotion'] = [ 'type' => 'html', 'content' => '<img src="' . pum_asset_url( 'images/upsell-icon-advanted-theme-builder.png' ) . '" height="28" />' . sprintf( $message, 'https://wppopupmaker.com/extensions/advanced-theme-builder/?utm_campaign=upsell&utm_source=plugin-theme-editor&utm_medium=text-link&utm_content=' . $tab . '-settings' ), 'priority' => 999, 'class' => 'pum-upgrade-tip', ]; } } return $tabs; } /** * When the Popup or Popup Theme list table loads, call the function to view our tabs. * * @since 1.8.0 * @param array $views An array of available list table views. * @return mixed */ public static function addon_tabs( $views ) { self::display_addon_tabs(); return $views; } /** * Displays the tabs for 'Popups', 'Popup Themes' and 'Extensions and Integrations' * * @since 1.8.0 */ public static function display_addon_tabs() { $popup_labels = PUM_Types::post_type_labels( __( 'Popup', 'popup-maker' ), __( 'Popups', 'popup-maker' ) ); $theme_labels = PUM_Types::post_type_labels( __( 'Popup Theme', 'popup-maker' ), __( 'Popup Themes', 'popup-maker' ) ); ?> <style> .wrap h1.wp-heading-inline + a.page-title-action { display: none; } .edit-php.post-type-popup .wrap .nav-tab-wrapper .page-title-action, .edit-php.post-type-popup_theme .wrap .nav-tab-wrapper .page-title-action, .popup_page_pum-extensions .wrap .nav-tab-wrapper .page-title-action { top: 7px; margin-left: 5px } @media only screen and (min-width: 0px) and (max-width: 783px) { .edit-php.post-type-popup .wrap .nav-tab-wrapper .page-title-action, .edit-php.post-type-popup_theme .wrap .nav-tab-wrapper .page-title-action, .popup_page_pum-extensions .wrap .nav-tab-wrapper .page-title-action { display: none !important } } </style> <nav class="nav-tab-wrapper"> <?php $tabs = [ 'popups' => [ 'name' => esc_html( $popup_labels['name'] ), 'url' => admin_url( 'edit.php?post_type=popup' ), ], 'themes' => [ 'name' => esc_html( $theme_labels['name'] ), 'url' => admin_url( 'edit.php?post_type=popup_theme' ), ], 'integrations' => [ 'name' => esc_html__( 'Upgrade', 'popup-maker' ), 'url' => admin_url( 'edit.php?post_type=popup&page=pum-extensions&view=integrations' ), ], ]; $tabs = apply_filters( 'pum_add_ons_tabs', $tabs ); $active_tab = false; // Calculate which tab is currently active. // phpcs:disable WordPress.Security.NonceVerification.Recommended if ( isset( $_GET['page'] ) && 'pum-extensions' === $_GET['page'] ) { $active_tab = 'integrations'; } elseif ( ! isset( $_GET['page'] ) && isset( $_GET['post_type'] ) ) { switch ( $_GET['post_type'] ) { case 'popup': $active_tab = 'popups'; break; case 'popup_theme': $active_tab = 'themes'; break; } } // phpcs:enable WordPress.Security.NonceVerification.Recommended // Add each tab, marking the current one as active. foreach ( $tabs as $tab_id => $tab ) { $active = $active_tab === $tab_id ? ' nav-tab-active' : ''; ?> <a href="<?php echo esc_url( $tab['url'] ); ?>" class="nav-tab<?php echo esc_attr( $active ); ?>"> <?php echo esc_html( $tab['name'] ); ?> </a> <?php } ?> <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=popup' ) ); ?>" class="page-title-action"> <?php echo esc_html( $popup_labels['add_new_item'] ); ?> </a> <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=popup_theme' ) ); ?>" class="page-title-action"> <?php echo esc_html( $theme_labels['add_new_item'] ); ?> </a> </nav> <?php } }
Upload File
Create Folder