Changeset 2943099
- Timestamp:
- 07/25/2023 01:21:06 PM (3 years ago)
- Location:
- twchat/trunk
- Files:
-
- 10 deleted
- 2 edited
-
Assets (deleted)
-
Classes/DBactions.php (deleted)
-
Classes/accessibility.php (deleted)
-
Classes/functions.php (deleted)
-
Classes/install.php (deleted)
-
Classes/woocommerce (deleted)
-
Classes/woocommerce.php (deleted)
-
Pages (deleted)
-
TWChat.php (modified) (2 diffs)
-
helpers/notices.php (modified) (5 diffs)
-
languages/TWCHLANG-fa_IR.mo (deleted)
-
languages/TWCHLANG-fa_IR.po (deleted)
Legend:
- Unmodified
- Added
- Removed
-
twchat/trunk/TWChat.php
r2943088 r2943099 4 4 * Description: Allowing admins to send messages to customers and vice versa through popular chat platforms. 5 5 * Author: Rellaco 6 * Version: 4.0. 06 * Version: 4.0.1 7 7 * Author URI: https://rellaco.com 8 8 * Plugin URI: "https://rellaco.com/product/TwoWayChat" … … 48 48 * @since 1.0.0 49 49 */ 50 defined( 'TWCH_VERSION' ) or define( 'TWCH_VERSION', '4.0. 0' );50 defined( 'TWCH_VERSION' ) or define( 'TWCH_VERSION', '4.0.1' ); 51 51 52 52 // run plugin -
twchat/trunk/helpers/notices.php
r2942750 r2943099 1 1 <?php 2 2 3 /** 3 4 * Manage the notice of the plugin in admin panel … … 10 11 */ 11 12 12 // Exit if accessed directly 13 if ( ! defined( 'ABSPATH' ) ) { exit; } 13 // Exit if accessed directly 14 if (!defined('ABSPATH')) { 15 exit; 16 } 14 17 15 18 class TWChat_notice … … 37 40 $this->dismissible = $dismissible; 38 41 $this->button = $button; 39 // show notice40 42 echo $this->display_notice(); 41 43 } 44 45 42 46 /** 43 47 * Display notice html code with message and type and button … … 58 62 } 59 63 // print notice html 60 printf('<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr($class), $message, $button);64 return sprintf('<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr($class), $message, $button); 61 65 } 62 66 } … … 76 80 function TWChat_notice($message, $type = 'info', $dismissible = true, $button = array()) 77 81 { 78 $notice = new TWChat_notice(); 79 $notice->add_notice($message, $type, $dismissible, $button); 82 // if is admin panel 83 if (is_admin()) { 84 $notice = new TWChat_notice(); 85 $notice->add_notice($message, $type, $dismissible, $button); 86 } 80 87 } 81 88 }
Note: See TracChangeset
for help on using the changeset viewer.