X7ROOT File Manager
Current Path:
/home/oakwood/public_html/wp-content/plugins/popup-builder/com/classes
home
/
oakwood
/
public_html
/
wp-content
/
plugins
/
popup-builder
/
com
/
classes
/
ðŸ“
..
📄
Actions.php
(63.7 KB)
📄
Ajax.php
(41.64 KB)
📄
ConditionBuilder.php
(5.5 KB)
📄
ConditionCreator.php
(23.13 KB)
📄
ConvertToNewVersion.php
(45.57 KB)
📄
Feedback.php
(6.29 KB)
📄
Filters.php
(30.11 KB)
📄
Installer.php
(7.35 KB)
📄
Javascript.php
(3.32 KB)
📄
MediaButton.php
(3.34 KB)
📄
Notification.php
(2 KB)
📄
NotificationCenter.php
(9.1 KB)
📄
PopupChecker.php
(16.54 KB)
📄
PopupGroupFilter.php
(3.72 KB)
📄
PopupInstaller.php
(52 B)
📄
PopupLoader.php
(5.02 KB)
📄
PopupType.php
(578 B)
📄
RegisterPostType.php
(12.88 KB)
📄
SGPBRequirementsChecker.php
(527 B)
📄
ScriptsLoader.php
(11.99 KB)
📄
Style.php
(2.86 KB)
📄
Updates.php
(6.54 KB)
ðŸ“
_detection
ðŸ“
components
ðŸ“
dataTable
ðŸ“
extension
ðŸ“
popups
Editing: MediaButton.php
<?php namespace sgpb; class MediaButton { private $hideMediaButton = true; public function __toString() { return $this->render(); } public function __construct($hideMediaButton = true) { $this->hideMediaButton = $hideMediaButton; } public static function allowToShow() { global $pagenow, $typenow; $allowToShow = false; $pages = array( 'page.php', 'post-new.php', 'post-edit.php', 'widgets.php' ); $checkPage = in_array( $pagenow, $pages ); // for show in plugins page when package is pro if (SGPB_POPUP_PKG !== SGPB_POPUP_PKG_FREE) { array_push($pages, 'post.php'); } return ($pages && $typenow != 'download'); } private function allowToShowJsVariable() { return get_post_type() == SG_POPUP_POST_TYPE; } public function render() { if (!$this->hideMediaButton && $this->allowToShowJsVariable()) { return ''; } $output = $this->mediaButton(); $output .= $this->insertJsVariable(); return $output; } private function insertJsVariable() { if (!$this->allowToShowJsVariable()){ return ''; } $buttonTitle = __('Insert custom JS variable', 'popup-builder'); ob_start(); @include(SG_POPUP_VIEWS_PATH.'jsVariableView.php'); $jsVariableContent = ob_get_contents(); ob_end_clean(); $img = '<span class="dashicons dashicons-welcome-widgets-menus" style="padding: 3px 2px 0px 0px"></span>'; $output = '<a data-id="sgpb-js-variable-wrapper" href="javascript:void(0);" class="button sgpb-insert-js-variable" title="'.$buttonTitle.'" style="padding-left: .4em;">'. $img.$buttonTitle.'</a>'; if (!$this->hideMediaButton) { $output = ''; } return $output.$jsVariableContent; } private function mediaButton() { $allowToShow = MediaButton::allowToShow(); if (!$allowToShow) { $output = ''; return $output; } $currentPostType = AdminHelper::getCurrentPostType(); $mediaButtonContent = ''; if (!empty($currentPostType) && $currentPostType == SG_POPUP_POST_TYPE) { global $post; $elementorContent = get_post_meta($post->ID, '_elementor_edit_mode', true); if (!empty($elementorContent) && $elementorContent == 'builder'){ ob_start(); @include(SG_POPUP_VIEWS_PATH.'htmlCustomButtonElement.php'); $mediaButtonContent = ob_get_contents(); ob_end_clean(); }else { add_action('admin_footer', function() { require_once(SG_POPUP_VIEWS_PATH.'htmlCustomButtonElement.php'); }); } } ob_start(); @include(SG_POPUP_VIEWS_PATH.'mediaButton.php'); $mediaButtonContent .= ob_get_contents(); ob_end_clean(); $showCurrentUser = AdminHelper::showMenuForCurrentUser(); $screen = get_current_screen(); $hideInNewsletter = isset($screen) ? $screen->id === 'popupbuilder_page_sgpbNewsletter' : false; if (!$showCurrentUser || $hideInNewsletter) { return ''; } $buttonTitle = __('Insert popup', 'popup-builder'); $img = '<span class="dashicons dashicons-welcome-widgets-menus" style="padding: 3px 2px 0px 0px"></span>'; $output = '<a data-id="sgpb-hidden-media-popup" href="javascript:void(0);" class="button sgpb-insert-media-button-js" title="'.$buttonTitle.'" style="padding-left: .4em;">'. $img.$buttonTitle.'</a>'; if (!$this->hideMediaButton) { $output = ''; } return $output.$mediaButtonContent; } }
Upload File
Create Folder