Changeset 3374925
- Timestamp:
- 10/08/2025 09:09:24 AM (4 months ago)
- Location:
- hellobar/trunk
- Files:
-
- 3 edited
-
hellobar.php (modified) (10 diffs)
-
readme.txt (modified) (2 diffs)
-
views/options.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hellobar/trunk/hellobar.php
r3374155 r3374925 8 8 * 9 9 * @author hellobar 10 * @version 1.5 10 * @version 1.5.1 11 11 */ 12 12 /* … … 14 14 Plugin URI: http://www.hellobar.com/ 15 15 Description: The Original Popup Software (Top Bars, Exit Intents, Sliders, & More to Grow Your Email List!) 16 Version: 1.5 16 Version: 1.5.1 17 17 Tested up to: 6.8 18 18 Requires at least: 5.0 … … 33 33 var $shortname = "HelloBar"; 34 34 var $namespace = 'hellobar-for-wordpress'; 35 var $version = '1.5 ';35 var $version = '1.5.1'; 36 36 var $defaults = array('hellobar_code'=>"",'load_hellobar_in'=>'footer'); 37 var $url_path; 38 var $option_name; 39 var $options; 37 40 public static function init() 38 41 { … … 42 45 function __construct() 43 46 { 44 $this->url_path = WP_PLUGIN_URL . '/' . plugin_basename(dirname(__FILE__)); 45 if (isset($_SERVER['HTTPS'])) { 46 if ((boolean) $_SERVER['HTTPS']===true) { 47 $this->url_path = str_replace('http://', 'https://', $this->url_path); 48 } 49 } 47 $this->url_path = plugin_dir_url(__FILE__); 50 48 $this->option_name = '_'.$this->namespace.'--options'; 51 add_action('admin_menu', array( &$this,'admin_menu'));49 add_action('admin_menu', array($this,'admin_menu')); 52 50 if (is_admin()) { 53 51 } else { 54 52 if ($this->get_option('load_hellobar_in') == 'header') { 55 add_action('wp_head', array( &$this,'hellobar_print_script'));56 add_action('wp_head', array( &$this,'hellobar_insert_tags'));53 add_action('wp_head', array($this,'hellobar_print_script')); 54 add_action('wp_head', array($this,'hellobar_insert_tags')); 57 55 } else { 58 56 if (function_exists('wp_print_footer_scripts')) { 59 add_action('wp_print_footer_scripts', array( &$this,'hellobar_print_script'));60 add_action('wp_print_footer_scripts', array( &$this,'hellobar_insert_tags'));57 add_action('wp_print_footer_scripts', array($this,'hellobar_print_script')); 58 add_action('wp_print_footer_scripts', array($this,'hellobar_insert_tags')); 61 59 } else { 62 add_action('wp_footer', array( &$this,'hellobar_print_script'));63 add_action('wp_footer', array( &$this,'hellobar_insert_tags'));60 add_action('wp_footer', array($this,'hellobar_print_script')); 61 add_action('wp_footer', array($this,'hellobar_insert_tags')); 64 62 } 65 63 } … … 113 111 public function admin_menu() 114 112 { 115 add_menu_page($this->shortname, $this->shortname, 'manage_options', basename(__FILE__), array( &$this,'admin_options_page'), ($this->url_path.'/images/icon.png'));113 add_menu_page($this->shortname, $this->shortname, 'manage_options', basename(__FILE__), array($this,'admin_options_page'), ($this->url_path.'/images/icon.png')); 116 114 } 117 115 public function admin_options_page() … … 121 119 } 122 120 if (isset($_POST) && !empty($_POST)) { 123 if ( wp_verify_nonce($_REQUEST[$this->namespace.'_update_wpnonce'], $this->namespace.'_options')) {121 if (isset($_REQUEST[$this->namespace.'_update_wpnonce']) && wp_verify_nonce($_REQUEST[$this->namespace.'_update_wpnonce'], $this->namespace.'_options')) { 124 122 $data = array(); 125 123 foreach ($_POST as $key => $val) { … … 130 128 $options = array( 131 129 'hellobar_code' => (string) $data['hellobar_code'], 132 'load_hellobar_in' => (string) @$data['load_hellobar_in']130 'load_hellobar_in' => (string) (!empty($data['load_hellobar_in']) ? $data['load_hellobar_in'] : 'footer') 133 131 ); 134 132 update_option($this->option_name, $options); … … 173 171 return $str; 174 172 } 175 public function is_script() 176 { 177 $hellobar_code = html_entity_decode($this->get_option('hellobar_code')); 173 public static function is_script() 174 { 175 $options = get_option('_hellobar-for-wordpress--options'); 176 $hellobar_code = ''; 177 if (is_array($options) && isset($options['hellobar_code'])) { 178 $hellobar_code = html_entity_decode($options['hellobar_code']); 179 } 178 180 if ($hellobar_code) { 179 181 $count = preg_match('/src=(["\'])(.*?)\1/', $hellobar_code, $match); … … 194 196 } 195 197 } 196 public function get_api_code($path)198 public static function get_api_code($path) 197 199 { 198 200 $path1 = str_replace('/', '', $path); … … 200 202 return $path2; 201 203 } 202 public function reset_old_api($api)204 public static function reset_old_api($api) 203 205 { 204 206 update_option('hellobar_api_key', $api); -
hellobar/trunk/readme.txt
r3374214 r3374925 6 6 Requires PHP: 7.4 7 7 Tested up to: 6.8 8 Stable tag: 1.5 8 Stable tag: 1.5.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 135 135 136 136 == Changelog == 137 = Hello bar Popup Builder 1.5.1 = 138 * PHP 7.4+ and PHP 8.x compatibility updates 139 * Modernized callbacks and removed deprecated patterns 140 * Enhanced security and URL handling 141 137 142 = Hello bar Popup Builder 1.5 = 138 143 * Capability test with wordpress version 6.8 ready for WP 6.8 -
hellobar/trunk/views/options.php
r2480832 r3374925 3 3 <input type="hidden" name="form_action" value="update_options"> 4 4 <div class="wrap" style="margin:0"> 5 <header><a href="javascript:void(0)" id="helloBasLogo"><img src="<?php echo WP_PLUGIN_URL."/hellobar"; ?>/images/logo.png"></a><br><br><span class="hbhdrTitle"><b>Convert</b> visitors into customers with Hello Bar</span></header>5 <header><a href="javascript:void(0)" id="helloBasLogo"><img src="<?php echo esc_url( $plugin_path . 'images/logo.png' ); ?>"></a><br><br><span class="hbhdrTitle"><b>Convert</b> visitors into customers with Hello Bar</span></header> 6 6 <div class="tool-box"> 7 7 <p><a class="helloBarSiteLink" target="new" href="https://www.hellobar.com">Visit Site to Learn More or Sign Up</a></p> … … 10 10 ?>Congratulations! Hello Bar is now installed on your site.<?php 11 11 } else { 12 ?>Thanks for the install! Glad to have you in the Hello Bar community!<br><br>You’re just a hop and a skip away from converting your site visitors into customers.<br><br>To get Hello Bar live on your WordPress site, you’ll just do a quick and easy “copy and paste” to install the site snippet.<br><br><a href="<?php echo WP_PLUGIN_URL."/hellobar"; ?>/images/demo.png" class="hellobardemoanc open-lightbox"><img class="hellobardemoimg" src="<?php echo WP_PLUGIN_URL . "/hellobar"; ?>/images/demo.png"></a><span class="hellobarInstruct">Here’s how:<br><br>1. Log in to HelloBar.com<br>2. Click on your email address at the top right corner of the screen<br>3. Select “Installation Instructions” from the drop down menu<br>4. Select “I use Wordpress” then click the green “Copy” button.<br><br> Now, your site snipped will be saved and ready to paste into WordPress directly, down below!<br><br>And with that, you’re ready to collect emails, drive traffic, and grow your social community! Kiss those one-time visitors goodbye and say hello to your new conversions with Hello Bar!</span><?php12 ?>Thanks for the install! Glad to have you in the Hello Bar community!<br><br>You’re just a hop and a skip away from converting your site visitors into customers.<br><br>To get Hello Bar live on your WordPress site, you’ll just do a quick and easy “copy and paste” to install the site snippet.<br><br><a href="<?php echo esc_url( $plugin_path . 'images/demo.png' ); ?>" class="hellobardemoanc open-lightbox"><img class="hellobardemoimg" src="<?php echo esc_url( $plugin_path . 'images/demo.png' ); ?>"></a><span class="hellobarInstruct">Here’s how:<br><br>1. Log in to HelloBar.com<br>2. Click on your email address at the top right corner of the screen<br>3. Select “Installation Instructions” from the drop down menu<br>4. Select “I use Wordpress” then click the green “Copy” button.<br><br> Now, your site snipped will be saved and ready to paste into WordPress directly, down below!<br><br>And with that, you’re ready to collect emails, drive traffic, and grow your social community! Kiss those one-time visitors goodbye and say hello to your new conversions with Hello Bar!</span><?php 13 13 } ?></p><?php 14 14 if ($hellobar_code) { … … 19 19 <div class="hbarLl"></div> 20 20 <div class="hbarLr"><a href="javascript:void(0)" class="hbarqtip1 hasTooltip">Locate my site snippet 21 <img src="<?php echo WP_PLUGIN_URL; ?>/hellobar/images/q.png"></a>21 <img src="<?php echo esc_url( $plugin_path . 'images/q.png' ); ?>"></a> 22 22 <div class="hbarqtiptext1">Not quite sure how to follow the yellow brick road to Hello Bar installation? No worries, we’ve got your back! Just click your ruby red slippers together three times and shoot us a message at [email protected], and we’ll work our magic to take you from confusion to conversion!</div> 23 23 </div>
Note: See TracChangeset
for help on using the changeset viewer.