Changeset 3489881
- Timestamp:
- 03/24/2026 10:52:22 AM (5 days ago)
- Location:
- modal-popup-box
- Files:
-
- 43 added
- 5 deleted
- 2 edited
-
tags/2.0.0 (added)
-
tags/2.0.0/admin (added)
-
tags/2.0.0/admin/css (added)
-
tags/2.0.0/admin/css/mpb-admin.css (added)
-
tags/2.0.0/admin/js (added)
-
tags/2.0.0/admin/js/mpb-admin.js (added)
-
tags/2.0.0/admin/views (added)
-
tags/2.0.0/includes (added)
-
tags/2.0.0/includes/class-mpb-admin.php (added)
-
tags/2.0.0/includes/class-mpb-data.php (added)
-
tags/2.0.0/includes/class-mpb-frontend.php (added)
-
tags/2.0.0/includes/class-mpb-plugin.php (added)
-
tags/2.0.0/includes/class-mpb-settings.php (added)
-
tags/2.0.0/includes/class-mpb-shortcode.php (added)
-
tags/2.0.0/languages (added)
-
tags/2.0.0/languages/modal-popup-box-hi_IN.mo (added)
-
tags/2.0.0/languages/modal-popup-box-hi_IN.po (added)
-
tags/2.0.0/languages/modal-popup-box-hi_IN.pot (added)
-
tags/2.0.0/modal-popup-box.php (added)
-
tags/2.0.0/public (added)
-
tags/2.0.0/public/css (added)
-
tags/2.0.0/public/css/mpb-frontend.css (added)
-
tags/2.0.0/public/js (added)
-
tags/2.0.0/public/js/mpb-modal.js (added)
-
tags/2.0.0/readme.txt (added)
-
trunk/admin (added)
-
trunk/admin/css (added)
-
trunk/admin/css/mpb-admin.css (added)
-
trunk/admin/js (added)
-
trunk/admin/js/mpb-admin.js (added)
-
trunk/admin/views (added)
-
trunk/assets (deleted)
-
trunk/class-tgm-plugin-activation.php (deleted)
-
trunk/featured-plugins (deleted)
-
trunk/include (deleted)
-
trunk/includes (added)
-
trunk/includes/class-mpb-admin.php (added)
-
trunk/includes/class-mpb-data.php (added)
-
trunk/includes/class-mpb-frontend.php (added)
-
trunk/includes/class-mpb-plugin.php (added)
-
trunk/includes/class-mpb-settings.php (added)
-
trunk/includes/class-mpb-shortcode.php (added)
-
trunk/modal-popup-box.php (modified) (1 diff)
-
trunk/our-theme (deleted)
-
trunk/public (added)
-
trunk/public/css (added)
-
trunk/public/css/mpb-frontend.css (added)
-
trunk/public/js (added)
-
trunk/public/js/mpb-modal.js (added)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modal-popup-box/trunk/modal-popup-box.php
r3416191 r3489881 1 1 <?php 2 2 3 /** 3 Plugin Name: Modal Popup Box 4 Plugin URI: https://awplife.com/wordpress-plugins/modal-popup-box-premium/ 5 Description: A set of experimental modal window appearance effects with CSS transitions and animations.An Easy And Powerful modal popup box plugin for WordPress. 6 Version: 1.6.2 7 Author: A WP Life 8 Author URI: https://awplife.com/ 9 License: GPLv2 or later 10 Text Domain: modal-popup-box 11 Domain Path: /languages 12 13 Modal Popup Box is free software: you can redistribute it and/or modify 14 it under the terms of the GNU General Public License as published by 15 the Free Software Foundation, either version 2 of the License, or 16 any later version. 17 18 Modal Popup Box is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with Modal Popup Box. If not, see https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. 4 * Plugin Name: Modal Popup Box New 5 * Plugin URI: https://awplife.com/wordpress-plugins/modal-popup-box-premium/ 6 * Description: Create customizable modal popup boxes with CSS animations. Embed images, videos, forms, shortcodes, and more. 7 * Version: 2.0.0 8 * Author: A WP Life 9 * Author URI: https://awplife.com/ 10 * License: GPLv2 or later 11 * Text Domain: modal-popup-box 12 * Domain Path: /languages 13 * Requires at least: 5.0 14 * Requires PHP: 7.4 15 * 16 * @package ModalPopupBox 25 17 */ 26 18 27 if ( ! class_exists( 'Modal_Popup_Box' ) ) { 19 if (!defined('ABSPATH')) { 20 exit; 21 } 28 22 29 class Modal_Popup_Box { 23 // Prevent duplicate loading. 24 if (defined('MPB_PLUGIN_VER')) { 25 return; 26 } 30 27 31 protected $protected_plugin_api; 32 protected $ajax_plugin_nonce; 28 // ── Plugin Constants ──────────────────────────────── 29 define('MPB_PLUGIN_VER', '2.0.0'); 30 define('MPB_PLUGIN_DIR', plugin_dir_path(__FILE__)); 31 define('MPB_PLUGIN_URL', plugin_dir_url(__FILE__)); 32 define('MPB_PLUGIN_SLUG', 'modalpopupbox'); 33 33 34 public function __construct() { 35 $this->_constants(); 36 $this->_hooks(); 34 // ── Backward Compatibility ────────────────────────── 35 // Keep MPB_TXTDM for any legacy code referencing it. 36 if (!defined('MPB_TXTDM')) { 37 define('MPB_TXTDM', 'modal-popup-box'); 38 } 39 if (!defined('MPB_PLUGIN_NAME')) { 40 define('MPB_PLUGIN_NAME', 'Modal Popup Box'); 41 } 42 43 // ── Legacy Function Stubs ─────────────────────────── 44 // Keep the old function name available so existing themes/snippets don't break. 45 if (!function_exists('mpb_get_safe_settings')) { 46 /** 47 * Legacy wrapper for MPB_Data::get_raw_settings(). 48 * 49 * @param int $post_id Post ID. 50 * @return array Settings array. 51 */ 52 function mpb_get_safe_settings($post_id) 53 { 54 if (class_exists('MPB_Data')) { 55 return MPB_Data::get_raw_settings($post_id); 37 56 } 38 39 protected function _constants() {40 // Plugin Version41 define( 'MPB_PLUGIN_VER', '1.6.2' );42 43 // Plugin Text Domain44 define( 'MPB_TXTDM', 'modal-popup-box' );45 46 // Plugin Name47 define( 'MPB_PLUGIN_NAME', 'Modal Popup Box' );48 49 // Plugin Slug50 define( 'MPB_PLUGIN_SLUG', 'modalpopupbox' );51 52 // Plugin Directory Path53 define( 'MPB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );54 55 // Plugin Directory URL56 define( 'MPB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );57 58 /**59 * Create a key for the .htaccess secure download link.60 *61 * @uses NONCE_KEY Defined in the WP root config.php62 */63 define( 'MPB_SECURE_KEY', md5( NONCE_KEY ) );64 65 } // end of constructor function66 67 protected function _hooks() {68 // Load text domain69 add_action( 'plugins_loaded', array( $this, '_load_textdomain' ) );70 71 // add gallery menu item, change menu filter for multisite72 add_action( 'admin_menu', array( $this, '_srgallery_menu' ), 101 );73 74 // Create Image Gallery Custom Post75 add_action( 'init', array( $this, 'codex_modalpopupbox_init' ) );76 77 // Add meta box to custom post78 add_action( 'add_meta_boxes', array( $this, '_admin_add_meta_box' ) );79 80 // loaded during admin init81 add_action( 'admin_init', array( $this, '_admin_add_meta_box' ) );82 83 // save setting84 add_action( 'save_post', array( &$this, '_mpb_save_settings' ) );85 86 // Shortcode Compatibility in Text Widgets87 add_filter( 'widget_text', 'do_shortcode' );88 89 // add mpbox cpt shortcode column - manage_{$post_type}_posts_columns90 add_filter( 'manage_modalpopupbox_posts_columns', array( &$this, 'set_modalpopupbox_shortcode_column_name' ) );91 92 // add mpbox cpt shortcode column data - manage_{$post_type}_posts_custom_column93 add_action( 'manage_modalpopupbox_posts_custom_column', array( &$this, 'custom_modalpopupbox_shodrcode_data' ), 10, 2 );94 95 add_action( 'wp_enqueue_scripts', array( &$this, 'modal_enqueue_scripts_in_header' ) );96 } // end of hook function97 98 public function modal_enqueue_scripts_in_header() {99 wp_enqueue_script( 'jquery' );100 }101 102 // Modal Box cpt shortcode column before date columns103 public function set_modalpopupbox_shortcode_column_name( $defaults ) {104 $new = array();105 unset( $defaults['tags'] ); // remove it from the columns list106 107 foreach ( $defaults as $key => $value ) {108 if ( $key == 'date' ) { // when we find the date column109 $new['modalpopupbox_shortcode'] = __( 'Shortcode', 'modal-popup-box' ); // put the tags column before it110 }111 $new[ $key ] = $value;112 }113 return $new;114 }115 116 // Modal Box cpt shortcode column data117 public function custom_modalpopupbox_shodrcode_data( $column, $post_id ) {118 switch ( $column ) {119 case 'modalpopupbox_shortcode':120 echo "<input type='text' class='button button-primary' id='modalpopupbox-shortcode-" . esc_attr( $post_id ) . "' value='[MPBOX id=" . esc_attr( $post_id ) . "]' style='font-weight:bold; background-color:#32373C; color:#FFFFFF; text-align:center;' />";121 echo "<input type='button' class='button button-primary' onclick='return MODALCopyShortcode" . esc_attr( $post_id ) . "();' readonly value='Copy' style='margin-left:4px;' />";122 echo "<span id='copy-msg-" . esc_attr( $post_id ) . "' class='button button-primary' style='display:none; background-color:#32CD32; color:#FFFFFF; margin-left:4px; border-radius: 4px;'>copied</span>";123 echo '<script>124 function MODALCopyShortcode' . esc_attr( $post_id ) . "() {125 var copyText = document.getElementById('modalpopupbox-shortcode-" . esc_attr( $post_id ) . "');126 copyText.select();127 document.execCommand('copy');128 129 //fade in and out copied message130 jQuery('#copy-msg-" . esc_attr( $post_id ) . "').fadeIn('1000', 'linear');131 jQuery('#copy-msg-" . esc_attr( $post_id ) . "').fadeOut(2500,'swing');132 }133 </script>134 ";135 break;136 }137 }138 139 public function _load_textdomain() {140 load_plugin_textdomain( 'modal-popup-box', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );141 }142 143 public function _srgallery_menu() {144 $featured_plugin_menu = add_submenu_page( 'edit.php?post_type=' . MPB_PLUGIN_SLUG, __( 'Featured-Plugin', 'modal-popup-box' ), __( 'Featured Plugin', 'modal-popup-box' ), 'administrator', 'sr-featured-plugin-page', array( $this, '_featured_plugin_page' ) );145 $theme_menu = add_submenu_page( 'edit.php?post_type=' . MPB_PLUGIN_SLUG, __( 'Our Theme', 'modal-popup-box' ), __( 'Our Theme', 'modal-popup-box' ), 'administrator', 'sr-theme-page', array( $this, '_theme_page' ) );146 }147 148 // Modal Popup Box Custom Post Type149 function codex_modalpopupbox_init() {150 $labels = array(151 'name' => __( 'Modal Popup Box', 'modal-popup-box' ),152 'singular_name' => __( 'Modal Popup Box', 'modal-popup-box' ),153 'menu_name' => __( 'Modal Popup Box', 'modal-popup-box' ),154 'name_admin_bar' => __( 'Modal Popup Box', 'modal-popup-box' ),155 'add_new' => __( 'Add New', 'modal-popup-box' ),156 'add_new_item' => __( 'Add New Modal Popup Box', 'modal-popup-box' ),157 'new_item' => __( 'New Modal Popup Box', 'modal-popup-box' ),158 'edit_item' => __( 'Edit Modal Popup Box', 'modal-popup-box' ),159 'view_item' => __( 'View Modal Popup Box', 'modal-popup-box' ),160 'all_items' => __( 'All Modal Popup Box', 'modal-popup-box' ),161 'search_items' => __( 'Search Modal Popup Box', 'modal-popup-box' ),162 'parent_item_colon' => __( 'Parent Modal Popup Box', 'modal-popup-box' ),163 'not_found' => __( 'No Modal Popup Box found', 'modal-popup-box' ),164 'not_found_in_trash' => __( 'No Modal Popup Box found in Trash', 'modal-popup-box' ),165 );166 167 $args = array(168 'labels' => $labels,169 'description' => __( 'Description', 'modal-popup-box' ),170 'public' => true,171 'publicly_queryable' => true,172 'show_ui' => true,173 'show_in_menu' => true,174 'query_var' => true,175 'rewrite' => array( 'slug' => 'modalpopupbox' ),176 'capability_type' => 'page',177 'menu_icon' => 'dashicons-archive',178 'has_archive' => true,179 'hierarchical' => false,180 'menu_position' => null,181 'supports' => array( 'title', 'editor' ),182 );183 184 register_post_type( 'modalpopupbox', $args );185 }186 187 public function _admin_add_meta_box() {188 add_meta_box( '1', __( 'Copy Modal Popup Shortcode', 'modal-popup-box' ), array( &$this, '_mpb_shortcode_left_metabox' ), 'modalpopupbox', 'side', 'default' );189 add_meta_box( __( 'Modal Box Settings', 'modal-popup-box' ), __( 'Modal Box Settings', 'modal-popup-box' ), array( &$this, 'mpb_metabox_function' ), 'modalpopupbox', 'normal', 'default' );190 add_meta_box( __( 'Rate Our Plugin', 'modal-popup-box' ), __( 'Rate Our Plugin', 'modal-popup-box' ), array( &$this, 'mpb_rate_plugin' ), 'modalpopupbox', 'side', 'default' );191 }192 // image gallery copy shortcode meta box under publish button193 public function _mpb_shortcode_left_metabox( $post ) { ?>194 <p class="input-text-wrap">195 <input type="text" name="MODALCopyShortcode" id="MODALCopyShortcode" value="<?php echo '[MPBOX id=' . esc_attr( $post->ID ) . ']'; ?>" readonly style="height: 50px; text-align: center; width:100%; font-size: 24px; border: 2px dashed;">196 <p id="mpb-copy-code"><?php esc_html_e( 'Shortcode copied to clipboard!', 'modal-popup-box' ); ?></p>197 <p style="margin-top: 10px"><?php esc_html_e( 'Copy & Embed shotcode into any Page/ Post / Text Widget to display gallery.', 'modal-popup-box' ); ?></p>198 </p>199 <span onclick="copyToClipboard('#MODALCopyShortcode')" class="mpb-copy dashicons dashicons-clipboard"></span>200 <style>201 .mpb-copy {202 position: absolute;203 top: 9px;204 right: 24px;205 font-size: 26px;206 cursor: pointer;207 }208 .ui-sortable-handle > span {209 font-size: 16px !important;210 }211 </style>212 <script>213 jQuery( "#mpb-copy-code" ).hide();214 function copyToClipboard(element) {215 var $temp = jQuery("<input>");216 jQuery("body").append($temp);217 $temp.val(jQuery(element).val()).select();218 document.execCommand("copy");219 $temp.remove();220 jQuery( "#MODALCopyShortcode" ).select();221 jQuery( "#mpb-copy-code" ).fadeIn();222 }223 </script>224 <?php225 }226 227 // meta rate us228 public function mpb_rate_plugin() {229 ?>230 <div style="text-align:center">231 <p><?php esc_html_e( 'If you like our plugin then please', 'modal-popup-box' ); ?> <b><?php esc_html_e( 'Rate us', 'modal-popup-box' ); ?></b><?php esc_html_e( 'on WordPress', 'modal-popup-box' ); ?> </p>232 </div>233 <div style="text-align:center">234 <span class="dashicons dashicons-star-filled"></span>235 <span class="dashicons dashicons-star-filled"></span>236 <span class="dashicons dashicons-star-filled"></span>237 <span class="dashicons dashicons-star-filled"></span>238 <span class="dashicons dashicons-star-filled"></span>239 </div>240 <br>241 <div style="text-align:center">242 <a href="https://wordpress.org/support/plugin/modal-popup-box/reviews/?filter=5" target="_new" class="button button-primary button-large" style="background: #008EC2; text-shadow: none;"><span class="dashicons dashicons-heart" style="line-height:1.4;" ></span><?php esc_html_e( 'Please Rate Us', 'modal-popup-box' ); ?></a>243 </div>244 <?php245 }246 247 public function mpb_metabox_function( $post ) {248 wp_enqueue_style( 'mbp-metabox-css', MPB_PLUGIN_URL . 'assets/css/metabox.css' );249 require_once 'include/modal-popup-box-settings.php';250 } // end of upload multiple image251 252 public function _mpb_save_settings( $post_id ) {253 // Check if user can edit this specific post (allows editors, not just admins)254 if ( ! current_user_can( 'edit_post', $post_id ) ) {255 return;256 }257 258 if ( isset( $_POST['mpb_save_nonce'] ) && wp_verify_nonce( $_POST['mpb_save_nonce'], 'mpb_save_settings' ) ) {259 260 $mpb_show_modal = isset( $_POST['mpb_show_modal'] ) ? sanitize_text_field( $_POST['mpb_show_modal'] ) : 'onclick';261 $mpb_main_button_text = isset( $_POST['mpb_main_button_text'] ) ? sanitize_text_field( $_POST['mpb_main_button_text'] ) : 'Click Me';262 $mpb_main_button_size = isset( $_POST['mpb_main_button_size'] ) ? sanitize_text_field( $_POST['mpb_main_button_size'] ) : 'btn btn-lg';263 $mpb_main_button_color = isset( $_POST['mpb_main_button_color'] ) ? sanitize_text_field( $_POST['mpb_main_button_color'] ) : '#008EC2';264 $mpb_main_button_text_color = isset( $_POST['mpb_main_button_text_color'] ) ? sanitize_text_field( $_POST['mpb_main_button_text_color'] ) : '#ffffff';265 $modal_popup_design = isset( $_POST['modal_popup_design'] ) ? sanitize_text_field( $_POST['modal_popup_design'] ) : 'color_1';266 $mpb_animation_effect_open_btn = isset( $_POST['mpb_animation_effect_open_btn'] ) ? sanitize_text_field( $_POST['mpb_animation_effect_open_btn'] ) : 'md-effect-1';267 $mpb_button2_text = isset( $_POST['mpb_button2_text'] ) ? sanitize_text_field( $_POST['mpb_button2_text'] ) : 'Close Me';268 $mpb_width = isset( $_POST['mpb_width'] ) ? sanitize_text_field( $_POST['mpb_width'] ) : '35';269 $mpb_height = isset( $_POST['mpb_height'] ) ? sanitize_text_field( $_POST['mpb_height'] ) : '350';270 $mpb_bt_ds = isset( $_POST['mpb_bt_ds'] ) ? sanitize_text_field( $_POST['mpb_bt_ds'] ) : 'true';271 $mpb_custom_css = isset( $_POST['mpb_custom_css'] ) ? sanitize_text_field( $_POST['mpb_custom_css'] ) : '';272 273 $modal_popup_box_settings = array(274 'mpb_show_modal' => $mpb_show_modal,275 'mpb_main_button_text' => $mpb_main_button_text,276 'mpb_main_button_size' => $mpb_main_button_size,277 'mpb_main_button_color' => $mpb_main_button_color,278 'mpb_main_button_text_color' => $mpb_main_button_text_color,279 'modal_popup_design' => $modal_popup_design,280 'mpb_animation_effect_open_btn' => $mpb_animation_effect_open_btn,281 'mpb_button2_text' => $mpb_button2_text,282 'mpb_width' => $mpb_width,283 'mpb_height' => $mpb_height,284 'mpb_bt_ds' => $mpb_bt_ds,285 'mpb_custom_css' => $mpb_custom_css,286 );287 288 $awl_modal_popup_box_shortcode_setting = 'awl_mpb_settings_' . $post_id;289 update_post_meta($post_id, $awl_modal_popup_box_shortcode_setting, json_encode($modal_popup_box_settings));290 }291 }//end _mpb_save_settings()292 293 public function _featured_plugin_page() {294 require_once 'featured-plugins/featured-plugins.php';295 }296 297 // theme page298 public function _theme_page() {299 require_once 'our-theme/awp-theme.php';300 }301 } // end of class302 303 /**304 * Safely parse modal popup box settings.305 * Handles both JSON and legacy serialized formats without using unserialize().306 *307 * @param int $post_id The post ID308 * @return array Settings array309 */310 function mpb_get_safe_settings($post_id) {311 $post_id = intval($post_id);312 $meta_key = 'awl_mpb_settings_' . $post_id;313 $raw_data = get_post_meta($post_id, $meta_key, true);314 315 if (empty($raw_data)) {316 return array();317 }318 319 // First, try to decode as JSON (current format)320 $settings = json_decode($raw_data, true);321 if (is_array($settings)) {322 return $settings;323 }324 325 // Check if it's base64 encoded (legacy format)326 $decoded = base64_decode($raw_data, true);327 if ($decoded !== false) {328 // Try JSON decode on decoded data329 $settings = json_decode($decoded, true);330 if (is_array($settings)) {331 // Migrate to new format332 update_post_meta($post_id, $meta_key, json_encode($settings));333 return $settings;334 }335 336 // Legacy serialized format - parse safely with regex (no unserialize!)337 if (strpos($decoded, 'a:') === 0) {338 $settings = mpb_safe_parse_serialized($decoded);339 if (!empty($settings)) {340 // Migrate to JSON format341 update_post_meta($post_id, $meta_key, json_encode($settings));342 return $settings;343 }344 }345 }346 347 57 return array(); 348 58 } 59 } 349 60 61 if (!function_exists('mpb_safe_parse_serialized')) { 350 62 /** 351 * Safely parse a PHP serialized array string without using unserialize(). 352 * Only extracts string and integer values, ignoring any object definitions. 353 * This prevents PHP Object Injection attacks. 354 * 355 * @param string $serialized The serialized string 356 * @return array Extracted key-value pairs 63 * Legacy stub — parsing is now handled internally by MPB_Data. 64 * 65 * @param string $serialized Serialized string. 66 * @return array Empty array (use MPB_Data methods instead). 357 67 */ 358 function mpb_safe_parse_serialized($serialized) { 359 $result = array(); 360 361 // Only process if it looks like a serialized array 362 if (strpos($serialized, 'a:') !== 0) { 363 return $result; 364 } 365 366 // Extract string key-value pairs: s:N:"key";s:N:"value"; 367 $pattern = '/s:\d+:"([^"]+)";s:\d+:"([^"]*)";/'; 368 if (preg_match_all($pattern, $serialized, $matches, PREG_SET_ORDER)) { 369 foreach ($matches as $match) { 370 $result[sanitize_text_field($match[1])] = sanitize_text_field($match[2]); 371 } 372 } 373 374 // Extract string key with integer value: s:N:"key";i:N; 375 $pattern_int = '/s:\d+:"([^"]+)";i:(\d+);/'; 376 if (preg_match_all($pattern_int, $serialized, $matches, PREG_SET_ORDER)) { 377 foreach ($matches as $match) { 378 $result[sanitize_text_field($match[1])] = intval($match[2]); 379 } 380 } 381 382 return $result; 68 function mpb_safe_parse_serialized($serialized) 69 { 70 return array(); 383 71 } 72 } 384 73 385 // register sf scripts 386 function awplife_mpb_register_scripts() { 387 388 // css & JS 389 wp_register_script( 'mbp-modernizr-custom-js', plugin_dir_url( __FILE__ ) . 'assets/js/modal/modernizr.custom.js' ); 390 wp_register_script( 'mbp-classie-js', plugin_dir_url( __FILE__ ) . 'assets/js/modal/classie.js' ); 391 wp_register_script( 'mbp-cssParser-js', plugin_dir_url( __FILE__ ) . 'assets/js/modal/cssParser.js' ); 392 wp_register_style( 'mbp-fronted-bootstrap-css', plugin_dir_url( __FILE__ ) . 'assets/css/fronted-bootstrap.css' ); 393 wp_register_style( 'mbp-animate-css', plugin_dir_url( __FILE__ ) . 'assets/css/animate.css' ); 394 wp_register_style( 'mbp-modal-box-css', plugin_dir_url( __FILE__ ) . 'assets/css/modal-box.css' ); 395 wp_register_style( 'mbp-component-css', plugin_dir_url( __FILE__ ) . 'assets/css/component-update.css' ); 396 // css & JS 397 } 398 add_action( 'wp_enqueue_scripts', 'awplife_mpb_register_scripts' ); 399 400 // Plugin Recommend 401 add_action( 'tgmpa_register', 'MPB_TXTDM_plugin_recommend' ); 402 function MPB_TXTDM_plugin_recommend() { 403 $plugins = array( 404 array( 405 'name' => 'Pricing Table', 406 'slug' => 'abc-pricing-table', 407 'required' => false, 408 ), 409 array( 410 'name' => 'Social Media Icons', 411 'slug' => 'new-social-media-widget', 412 'required' => false, 413 ), 414 array( 415 'name' => 'Team Builder Member Showcase', 416 'slug' => 'team-builder-member-showcase', 417 'required' => false, 418 ), 419 ); 420 tgmpa( $plugins ); 421 } 422 423 /** 424 * Instantiates the Class 425 * 426 * @since 3.0 427 * @global object $Modal_Popup_Box_object 428 */ 429 $mpbox_object = new Modal_Popup_Box(); 430 require_once 'include/modal-popup-box-shortcode.php'; 431 require_once 'class-tgm-plugin-activation.php'; 432 433 } // end of class exists 434 ?> 74 // ── Boot Plugin ───────────────────────────────────── 75 require_once MPB_PLUGIN_DIR . 'includes/class-mpb-plugin.php'; 76 MPB_Plugin::get_instance(); -
modal-popup-box/trunk/readme.txt
r3417027 r3489881 1 === Modal Popup Box : A Flexible Pop Up Box Builder===1 === Modal Popup Box === 2 2 Contributors: awordpresslife, razipathhan, hanif0991, muhammadshahid, fkfaisalkhan007, sharikkhan007, zishlife, FARAZFRANK 3 3 Donate link: https://paypal.me/awplife 4 4 Tags: popup builder, modal popup, pop up box, responsive popups, popup maker 5 Requires at least: 4.05 Requires at least: 5.0 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 1.6.28 Stable tag: 2.0.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Create and manage a customizable pop up box on your WordPress website. Embed anything from videos and images to forms and shortcodes.12 Create and manage customizable modal popup boxes with CSS animations. Embed images, videos, forms, shortcodes, and more. 13 13 14 14 == Description == 15 15 16 Modal Popup Box provides an easy way to add a versatile pop up box to your website. Use it to capture visitor attention, display important announcements, or showcase your content. 17 18 You can trigger the pop up box to appear automatically on page load or manually when a user clicks a specific button. The plugin allows you to embed a wide variety of content types, including: 19 20 * **Media:** Images, Image Galleries, and Sliders. 16 Modal Popup Box provides an easy way to add versatile popup boxes to your WordPress website. Display announcements, capture leads, showcase products, or embed any content inside a beautifully animated modal. 17 18 = Free Version Features = 19 20 * **Two Trigger Modes** — Open on page load or on button click. 21 * **Open Delay Timer** — Set a delay (0–60 seconds) before the modal appears on page load. 22 * **5 Color Presets** — Blue, Red, Green, Purple, and Orange design themes. 23 * **4 Animation Effects** — Fade & Scale, Slide Right, Side Fall, and 3D Flip. 24 * **Overlay Opacity Control** — Adjust background dimming from 0% to 100%. 25 * **Customizable Button** — Control trigger button text, size, and colors. 26 * **Shortcode Support** — Place modals anywhere with a simple shortcode. 27 * **Custom CSS** — Add your own styles for full design control. 28 * **Responsive Design** — Modals look great on all screen sizes. 29 * **Embed Anything** — Images, YouTube/Vimeo videos, Contact Form 7, sliders, galleries, and content from any shortcode-based plugin. 30 * **Modern Admin Dashboard** — Clean, tabbed settings interface. 31 32 = Embed Any Content = 33 34 * **Media:** Images, galleries, and sliders. 21 35 * **Videos:** YouTube and Vimeo embeds. 22 * **Forms:** Works with popular plugins like Contact Form 7 for registration or contact forms. 23 * **Special Offers:** Display coupon codes, discounts, and promotional news. 24 * **Social Media:** Show feeds from Facebook, Twitter, and Flickr. 25 * **Plugin Content:** Embed content from other plugins using their shortcodes. 26 27 The appearance of the pop up box is customizable, with settings for title, dimensions (height and width), and colors, helping you match it to your site's design. 36 * **Forms:** Contact Form 7 and other form plugins. 37 * **Promotions:** Coupon codes, discounts, and announcements. 38 * **Social Media:** Facebook, Twitter, and Instagram feeds. 39 * **Plugin Content:** Anything with a shortcode. 28 40 29 41 == How To Use Free Modal Popup Plugin? == … … 31 43 https://www.youtube.com/watch?v=jbYiZNe6kr4 32 44 33 34 45 == Installation == 35 46 36 1. Install the "Modal Popup Box" through the WordPress plugin directory or by uploading the plugin files to your server.47 1. Install "Modal Popup Box" from the WordPress plugin directory or upload the plugin files. 37 48 2. Activate the plugin. 38 3. Navigate to the "Modal Pop Box" menu in your WordPressdashboard.39 4. Click "Add Modal Pop Box", create your content, and publish it.40 5. Copy the generated shortcode and p lace it on any page, post, or text widget where you want the pop up box to appear.49 3. Go to **Modal Popup Box → Add New Modal Popup Box** in your dashboard. 50 4. Add your content using the WordPress editor, configure your settings, and publish. 51 5. Copy the generated shortcode and paste it into any page, post, or widget. 41 52 42 53 == Frequently Asked Questions == 43 54 44 **Have a question?** 45 Please visit the official [support forum](https://wordpress.org/plugins/modal-popup-box/) to ask questions and get help. 55 = How do I create a modal popup? = 56 Navigate to **Modal Popup Box → Add New Modal Popup Box**, enter your content, configure the trigger and design settings, then publish. 57 58 = Can I show the modal automatically on page load? = 59 Yes. In the **Modal Popup** tab, select "On Page Load" as the trigger. You can also set a delay timer in the **Config** tab. 60 61 = Can I control the overlay darkness? = 62 Yes. The **Overlay Opacity** slider in the **Config** tab lets you adjust from fully transparent (0%) to fully opaque (100%). 63 64 = Does the free version include animations? = 65 Yes. The free version includes 4 animation effects. The premium version unlocks all 19. 66 67 = Can I embed Contact Form 7 inside a modal? = 68 Yes. Simply paste the Contact Form 7 shortcode into the modal content editor. 69 70 = Does it work with page builders? = 71 Yes. Use the shortcode in any page builder that supports shortcodes (Elementor, Beaver Builder, Divi, etc.). 72 73 **Have more questions?** 74 Visit the [support forum](https://wordpress.org/support/plugin/modal-popup-box/) for help. 46 75 47 76 == Premium Version & Demos == 48 77 49 An optional premium version of Modal Popup Box is available with additional features, including more animation effects, advanced responsive settings, and iFrame/Google Maps embedding. 50 51 * [Modal Pop Box Free Version Demo](https://awplife.com/demo/modal-popup-box-free-wordpress-plugin/) 52 * [Modal Pop Box Premium Version Demo](https://awplife.com/demo/model-popup-box-premium/) 78 Upgrade to the premium version for advanced features: 79 80 * **19 Open Animation Effects** — Fall, 3D Slit, Super Scaled, Blur, Rotate, and more. 81 * **Advanced Triggers** — Exit Intent, Scroll Percentage, and User Inactivity. 82 * **Full Color Customization** — Header, content, footer, overlay, and close button colors. 83 * **Header & Content Styling** — Font sizes, alignment, background colors, padding, and animations. 84 * **Dual Footer Buttons** — Two buttons with individual URLs, colors, sizes, and animations. 85 * **Overlay Color Picker** — Choose any color for the overlay background. 86 * **Open/Close Speed Control** — Fine-tune transition timing. 87 * **Border Radius & Box Shadow** — Rounded corners and shadow depth options. 88 * **Close Button Styles** — Icon, text, or both with custom colors. 89 * **Cookie Dismiss** — Hide modal for returning visitors using cookies. 90 * **Page Targeting** — Include or exclude modals on specific pages. 91 * **Scheduling** — Set start/end dates for time-limited modals. 92 * **Auto-Close** — Automatically dismiss the modal after a set time. 93 * **Clone/Duplicate** — Instantly copy modals with all settings. 94 * **Import/Export** — Migrate modal settings between sites via JSON. 95 96 * [Free Version Demo](https://awplife.com/demo/modal-popup-box-free-wordpress-plugin/) 97 * [Premium Version Demo](https://awplife.com/demo/model-popup-box-premium/) 53 98 * [Upgrade to Premium](https://awplife.com/wordpress-plugins/modal-popup-box-wordpress-plugin/) 54 99 … … 63 108 64 109 == Changelog == 110 111 = 2.0.0 = 112 * Enhancement: Removed Bootstrap dependency and replaced with custom lightweight utility classes to improve performance and prevent theme conflicts. 113 * New Feature: Added "Custom" color design option with a modal background color picker for greater design flexibility. 114 * Enhancement: Refined close button customization — removed size selection for a consistent Medium size and added background, text, and icon color settings. 115 * Enhancement: Added a smooth hover effect for the close icon with a matching border color. 116 * Improvement: Modernized settings page layout with a responsive 9/3 column grid and a premium-style action bar. 117 * Major Update: Complete plugin rewrite with modern architecture 118 * New Feature: 5 color presets (Blue, Red, Green, Purple, Orange) 119 * New Feature: 4 animation effects (Fade & Scale, Slide Right, Side Fall, 3D Flip) 120 * New Feature: Open Delay timer (0–60 seconds) for page load trigger 121 * New Feature: Overlay Opacity control (0–100%) 122 * New Feature: Redesigned admin dashboard with premium-style UI 123 * Enhancement: Improved modal centering across all themes 124 * Enhancement: Removed legacy code and unused dependencies 125 * Security: Improved data sanitization and escaping throughout 126 * Security: Fixed PHP Object Injection vulnerability 127 * Security: Fixed XSS vulnerability in custom CSS output 65 128 66 129 = 1.6.2 = … … 76 139 77 140 = 1.6.1 = 78 * Additional changes: None. 79 * Testing plugin for wordpress 6.8.3 141 * Testing plugin for WordPress 6.8.3 80 142 81 143 = 1.6.0 = 82 * Additional changes: None. 83 * Testing plugin for wordpress 6.8.1 144 * Testing plugin for WordPress 6.8.1 84 145 85 146 = 1.5.9 = 86 * Additional changes: None. 87 * Testing plugin for wordpress 6.7.2 147 * Testing plugin for WordPress 6.7.2 88 148 89 149 = 1.5.8 = 90 * Additional changes: None. 91 * Testing plugin for wordpress 6.7.1 150 * Testing plugin for WordPress 6.7.1 92 151 93 152 = 1.5.7 = 94 * wordpress security issues Fixed 95 * Additional changes: None. 96 * Testing plugin for wordpress 6.6.2 153 * WordPress security issues fixed 154 * Testing plugin for WordPress 6.6.2 97 155 98 156 = 1.5.6 = 99 * Testing plugin for wordpress 6.6.2157 * Testing plugin for WordPress 6.6.2 100 158 101 159 = 1.5.5 = 102 * Testing plugin for wordpress 6.5.5103 * Hide show fixed on settings page.104 * Admin Demo link fixed.160 * Testing plugin for WordPress 6.5.5 161 * Hide/show fixed on settings page 162 * Admin demo link fixed 105 163 106 164 = 1.5.4 = 107 108 * Testing plugin for wordpress 6.5.4 165 * Testing plugin for WordPress 6.5.4 109 166 110 167 = 1.5.3 = 111 112 * wordpress security issues Fixed 113 * Additional changes: None. 114 * Testing plugin for wordpress 6.4.3 168 * WordPress security issues fixed 169 * Testing plugin for WordPress 6.4.3 115 170 116 171 = 1.5.2 = 117 118 * Bug Fix: Fixed. 119 * Additional changes: None. 120 * Testing plugin for wordpress 6.4.3 121 172 * Bug Fix 173 * Testing plugin for WordPress 6.4.3 122 174 123 175 = 1.5.1 = 124 125 * Bug Fix: Fixed. 126 * Additional changes: None. 127 * Testing plugin for wordpress 6.4.2 176 * Bug Fix 177 * Testing plugin for WordPress 6.4.2 128 178 129 179 = 1.5.0 = 130 131 * Bug Fix: Fixed. 132 * Additional changes: None. 133 * Testing plugin for wordpress 6.4.2 180 * Bug Fix 181 * Testing plugin for WordPress 6.4.2 134 182 135 183 = 1.4.9 = 136 137 * tested on WordPress version 6.3.2 184 * Tested on WordPress 6.3.2 138 185 139 186 = 1.4.8 = 140 141 * tested on WordPress version 6.3.1 187 * Tested on WordPress 6.3.1 142 188 143 189 = 1.4.7 = 144 145 * tested on WordPress version 6.2.2 190 * Tested on WordPress 6.2.2 146 191 147 192 = 1.4.5 = 148 149 * tested on WordPress version 6.1.1 193 * Tested on WordPress 6.1.1 150 194 151 195 = 1.4.3 = 152 153 * Codding Bugs fixed 154 * tested on WordPress version 6.0.3 155 156 = 1.4.3 = 157 158 * wordpress security issues fixed 196 * Coding bugs fixed 197 * Tested on WordPress 6.0.3 159 198 160 199 = 1.4.2 = 161 162 * Enhancements: Yes, Tested for WordPress 6.0.1 200 * Tested for WordPress 6.0.1 163 201 164 202 = 1.4.1 = 165 166 * Enhancements: Yes, Tested for WordPress 5.9.3 203 * Tested for WordPress 5.9.3 167 204 168 205 = 1.4.0 = 169 170 * Enhancements: Yes, Tested for WordPress 5.9 171 * Disable Bootstrap Css Option Added 206 * Disable Bootstrap CSS option added 207 * Tested for WordPress 5.9 172 208 173 209 == Upgrade Notice == 174 This is an initial release. Start with version 0.0.1 and share your feedback <a href="https://wordpress.org/support/view/plugin-reviews/new-album-gallery//">here</a>. 210 211 = 2.0.1 = 212 Minor update: Removed specific animation effects (Newspaper, Sticky Up, 3D Sign) from the settings UI. 213 214 = 2.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.