Changeset 2012557
- Timestamp:
- 01/15/2019 08:58:09 AM (7 years ago)
- Location:
- dw-notifications
- Files:
-
- 48 added
- 6 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/._webfonts (added)
-
tags/1.0.2/assets/css (added)
-
tags/1.0.2/assets/css/dw-notifications.css (added)
-
tags/1.0.2/assets/css/multi-select.css (added)
-
tags/1.0.2/assets/images (added)
-
tags/1.0.2/assets/images/image_default.png (added)
-
tags/1.0.2/assets/images/switch.png (added)
-
tags/1.0.2/assets/js (added)
-
tags/1.0.2/assets/js/admin-script.js (added)
-
tags/1.0.2/assets/js/dw-notifications.js (added)
-
tags/1.0.2/assets/js/jquery.multi-select.js (added)
-
tags/1.0.2/dw-notifications.php (added)
-
tags/1.0.2/inc (added)
-
tags/1.0.2/inc/Ajax.php (added)
-
tags/1.0.2/inc/Integrations.php (added)
-
tags/1.0.2/inc/Notification.php (added)
-
tags/1.0.2/inc/Script.php (added)
-
tags/1.0.2/inc/Settings.php (added)
-
tags/1.0.2/inc/Shortcode.php (added)
-
tags/1.0.2/inc/Template.php (added)
-
tags/1.0.2/inc/autoload.php (added)
-
tags/1.0.2/inc/functions.php (added)
-
tags/1.0.2/inc/integrations (added)
-
tags/1.0.2/inc/integrations/dwqa (added)
-
tags/1.0.2/inc/integrations/dwqa/index.php (added)
-
tags/1.0.2/inc/integrations/dwqa/loader.php (added)
-
tags/1.0.2/inc/integrations/index.php (added)
-
tags/1.0.2/inc/integrations/wordpress-post (added)
-
tags/1.0.2/inc/integrations/wordpress-post/index.php (added)
-
tags/1.0.2/inc/integrations/wordpress-post/loader.php (added)
-
tags/1.0.2/languages (added)
-
tags/1.0.2/languages/dw-notifications-ar.mo (added)
-
tags/1.0.2/languages/dw-notifications-ar.po (added)
-
tags/1.0.2/languages/dw-notifications-vi.mo (added)
-
tags/1.0.2/languages/dw-notifications-vi.po (added)
-
tags/1.0.2/languages/dw-notifications.pot (added)
-
tags/1.0.2/libs (added)
-
tags/1.0.2/libs/custom-list-table.php (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/templates (added)
-
tags/1.0.2/templates/default (added)
-
tags/1.0.2/templates/default/notification-alert.php (added)
-
tags/1.0.2/templates/default/notification-item.php (added)
-
tags/1.0.2/templates/default/notification-list.php (added)
-
tags/1.0.2/templates/default/notification-popup-item.php (added)
-
tags/1.0.2/templates/default/notification-popup.php (added)
-
trunk/assets/js/dw-notifications.js (modified) (1 diff)
-
trunk/dw-notifications.php (modified) (2 diffs)
-
trunk/inc/Notification.php (modified) (3 diffs)
-
trunk/inc/Script.php (modified) (2 diffs)
-
trunk/inc/Settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dw-notifications/trunk/assets/js/dw-notifications.js
r1903697 r2012557 13 13 var currentTimeRequest = 10000; 14 14 var timeoutPopup = 15000; 15 16 if(dwnotif.dwnotif_min_time_request >= 2 && dwnotif.dwnotif_min_time_request <= 10){ 17 minTimeRequest = dwnotif.dwnotif_min_time_request * 1000; 18 } 15 19 16 20 -
dw-notifications/trunk/dw-notifications.php
r1903697 r2012557 5 5 * Author: DesignWall 6 6 * Author URI: http://www.designwall.com 7 * Version: 1.0. 17 * Version: 1.0.2 8 8 * Text Domain: dw-notifications 9 9 */ … … 16 16 class DW_Notifications{ 17 17 public function __construct() { 18 $this->version = '1.0. 1';18 $this->version = '1.0.2'; 19 19 $this->define_constants(); 20 20 $this->includes(); -
dw-notifications/trunk/inc/Notification.php
r1891940 r2012557 306 306 'post_type' => 'dw-notification', 307 307 'post_status' => array('publish', 'dw_auto'), 308 'post _per_page' => '-1',308 'posts_per_page' => '-1', 309 309 'meta_query' => array( 310 310 array( … … 349 349 350 350 $notifications = $this->get_notifications($data); 351 // $show_list = $this->getListTemplate($data); 352 // $count_unchecked = $this->countNotificationsUserUnchecked(); 351 $count_unchecked = $this->count_user_unchecked(); 353 352 354 353 $file_dir = dwnotif_load_template( 'notification-alert', false); … … 475 474 ), 476 475 ), 477 'post _per_page' => -1476 'posts_per_page' => -1 478 477 ); 479 478 $args = apply_filters( 'dwnotif_count_user_unchecked_args', $args); -
dw-notifications/trunk/inc/Script.php
r1891940 r2012557 12 12 13 13 function enqueue_style() { 14 global $dw_notif_options; 15 16 $min_time_request = isset( $dw_notif_options['min-time-request'] ) ? $dw_notif_options['min-time-request'] : 0; 17 14 18 $dw_notifications_script_vars = apply_filters('dwnotif_script_vars', array( 15 19 'dwnotif_nonce' => wp_create_nonce('dwnotif_nonce'), … … 26 30 ), 27 31 32 'dwnotif_min_time_request' => $min_time_request 28 33 )); 29 34 -
dw-notifications/trunk/inc/Settings.php
r1891940 r2012557 7 7 class DWNOTIF_Settings { 8 8 public function __construct(){ 9 //not done 10 // add_menu_page( 'DW Notifications', 'DW Notifications', 'manage_options', 'dw-notifications', callable $function = '', 'dashicons-warning'); 9 add_action( 'admin_menu', array( $this, 'admin_menu' ) ); 10 add_action( 'admin_init', array( $this, 'register_settings' ) ); 11 add_action( 'init', array( $this, 'init_options' ), 9 ); 11 12 } 12 13 13 // public function dwnotif_ 14 public function admin_menu(){ 15 add_submenu_page( 'edit.php?post_type=dw-notification', __( 'Plugin Settings','dw-notifications' ), __( 'Settings','dw-notifications' ), 'manage_options', 'dw-notification-settings', array( $this, 'settings_display' ) ); 16 } 17 18 public function settings_display(){ 19 ?> 20 <div class="wrap"> 21 <h2>DW Notification Settings</h2> 22 <?php settings_errors(); ?> 23 24 <form method="post" action="options.php" class="dw-gdpr-settings-body"> 25 <?php 26 27 settings_fields( 'dw-notification-settings' ); 28 do_settings_sections( 'dw-notification-settings' ); 29 submit_button(); 30 31 ?> 32 </form> 33 </div> 34 <?php 35 } 36 37 public function register_settings(){ 38 // Question Settings 39 add_settings_section( 40 'dw-notification-settings', 41 __( 'General Setting', 'dwqa' ), 42 false, 43 'dw-notification-settings' 44 ); 45 46 add_settings_field( 47 'dw_notif_options[min-time-request]', 48 __( 'Min Time Request','dwqa' ), 49 array($this, 'min_time_request'), 50 'dw-notification-settings', 51 'dw-notification-settings' 52 ); 53 54 register_setting( 'dw-notification-settings', 'dw_notif_options' ); 55 } 56 57 public function min_time_request(){ 58 global $dw_notif_options; 59 $value = isset( $dw_notif_options['min-time-request'] ) ? $dw_notif_options['min-time-request'] : 0; 60 echo '<p><input id="dw_notif_min_time_request" type="number" name="dw_notif_options[min-time-request]" class="small-text" value="'.$value.'" min="2" max="10"> <span class="description">'.__( 'Time interval between requests. From 2 to 10','dw-notifications' ).'</span></p>'; 61 } 62 63 public function init_options(){ 64 global $dw_notif_options; 65 $dw_notif_options = wp_parse_args( get_option( 'dw_notif_options' ), array( 66 'min-time-request' => '2' 67 ) ); 68 } 14 69 } -
dw-notifications/trunk/readme.txt
r1907396 r2012557 3 3 Tags: alert, bar, counter, notification, notification bar, mobile, jquery, plugin, foobar 4 4 Requires at least: 3.0.1 5 Tested up to: 4.9.66 Stable tag: 1.0. 15 Tested up to: 5.0.3 6 Stable tag: 1.0.2 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 42 42 We provide support both on support forum on WordPress.org and our [support page](http://www.designwall.com/question/) on DesignWall. 43 43 44 Shortcode: **[dw_notif]**45 46 44 = Source = 47 45 [Free for commercial use](https://www.iconfinder.com/icons/728992/configuration_control_dashboard_setting_speed_system_tool_icon#size=128) … … 49 47 = Languages supported: = 50 48 * English (default) 51 * Arabic (ar_AR) - by Qamdad52 49 * Vietnamese 53 50 … … 56 53 1. Upload `dw-notification` to the `/wp-content/plugins/` directory 57 54 2. Activate the plugin through the 'Plugins' menu in WordPress 58 3. Insert shortcode [dw_notif]59 Very simple with the following shortcode:60 - Use in the page, post or widget: `[dw_notif]`61 - Use in the php file: `<div class="dw-notif-menu"><?php echo do_shortcode('[dw_notif]'); ?></div>`62 - Use in a menu item: `[dw_notif]`63 55 64 56 == Screenshots == 65 57 66 1. Insert shortcode in menu 58 67 59 68 60 == Changelog == 61 62 = 1.0.1 = 63 64 * Fix count alert 65 * Add setting time interval between requests 69 66 70 67 = 1.0.1 =
Note: See TracChangeset
for help on using the changeset viewer.