Plugin Directory

Changeset 3036574


Ignore:
Timestamp:
02/15/2024 09:45:07 PM (2 years ago)
Author:
roumi
Message:

Release 3.1.0

Location:
wp-admin-notification-center
Files:
3 edited
21 copied

Legend:

Unmodified
Added
Removed
  • wp-admin-notification-center/tags/3.1.0/assets/js/notice.js

    r2994668 r3036574  
    6565
    6666        let numberOfNotification = 0;
    67         for (let i = 0 ; i < this.adminNotifications.length ; i++) {
     67        for (let i = 0; i < this.adminNotifications.length; i++) {
    6868            let containsSpamWord = false;
    6969            if (this.spamWords.length > 0) {
    70                 for (let j = 0 ; j < this.spamWords.length ; j++) {
     70                for (let j = 0; j < this.spamWords.length; j++) {
    7171                    if (this.adminNotifications[i].innerHTML.toLowerCase().indexOf(this.spamWords[j].toLowerCase()) === -1) continue;
    7272                    containsSpamWord = true;
     
    9494        }
    9595
    96         //We display the number of notification
    97         this.buttonNotification.childNodes[0].innerHTML += ' <span id="wanc_display_notification_number">' + numberOfNotification + '</span>';
     96        if (numberOfNotification) {
     97            //We display the number of notification
     98            this.buttonNotification.childNodes[0].innerHTML += ' <span id="wanc_display_notification_number">' + numberOfNotification + '</span>';
     99        }
    98100    },
    99101    initClickDisplayNotificationCenter: function () {
     
    143145    },
    144146    initWhiteList: function () {
    145         for (let i = 0 ; i < this.preAdminNotifications.length ; i++) {
     147        for (let i = 0; i < this.preAdminNotifications.length; i++) {
    146148            let notWhiteListed = true;
    147149            if (this.whiteList.length > 0) {
    148                 for (let j = 0 ; j < this.whiteList.length ; j++) {
     150                for (let j = 0; j < this.whiteList.length; j++) {
    149151                    if (this.preAdminNotifications[i].innerHTML.toLowerCase().indexOf(this.whiteList[j].toLowerCase()) === -1) continue;
    150152                    notWhiteListed = false;
  • wp-admin-notification-center/tags/3.1.0/index.php

    r2994668 r3036574  
    66Author URI: https://github.com/roumilb
    77License: GPLv3
    8 Version: 3.0.0
     8Version: 3.1.0
    99Text Domain: wanc
    1010Domain Path: /languages
  • wp-admin-notification-center/tags/3.1.0/readme.txt

    r2994668 r3036574  
    55Tested up to: 6.4
    66Requires PHP: 7.0
    7 Stable tag: 3.0.0
     7Stable tag: 3.1.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535== Changelog ==
    3636
     37= 3.1.0 =
     38* Fix notification number showing 0
     39
    3740= 3.0.0 =
    3841* Store notice displayed in the admin
  • wp-admin-notification-center/trunk/assets/js/notice.js

    r2994668 r3036574  
    6565
    6666        let numberOfNotification = 0;
    67         for (let i = 0 ; i < this.adminNotifications.length ; i++) {
     67        for (let i = 0; i < this.adminNotifications.length; i++) {
    6868            let containsSpamWord = false;
    6969            if (this.spamWords.length > 0) {
    70                 for (let j = 0 ; j < this.spamWords.length ; j++) {
     70                for (let j = 0; j < this.spamWords.length; j++) {
    7171                    if (this.adminNotifications[i].innerHTML.toLowerCase().indexOf(this.spamWords[j].toLowerCase()) === -1) continue;
    7272                    containsSpamWord = true;
     
    9494        }
    9595
    96         //We display the number of notification
    97         this.buttonNotification.childNodes[0].innerHTML += ' <span id="wanc_display_notification_number">' + numberOfNotification + '</span>';
     96        if (numberOfNotification) {
     97            //We display the number of notification
     98            this.buttonNotification.childNodes[0].innerHTML += ' <span id="wanc_display_notification_number">' + numberOfNotification + '</span>';
     99        }
    98100    },
    99101    initClickDisplayNotificationCenter: function () {
     
    143145    },
    144146    initWhiteList: function () {
    145         for (let i = 0 ; i < this.preAdminNotifications.length ; i++) {
     147        for (let i = 0; i < this.preAdminNotifications.length; i++) {
    146148            let notWhiteListed = true;
    147149            if (this.whiteList.length > 0) {
    148                 for (let j = 0 ; j < this.whiteList.length ; j++) {
     150                for (let j = 0; j < this.whiteList.length; j++) {
    149151                    if (this.preAdminNotifications[i].innerHTML.toLowerCase().indexOf(this.whiteList[j].toLowerCase()) === -1) continue;
    150152                    notWhiteListed = false;
  • wp-admin-notification-center/trunk/index.php

    r2994668 r3036574  
    66Author URI: https://github.com/roumilb
    77License: GPLv3
    8 Version: 3.0.0
     8Version: 3.1.0
    99Text Domain: wanc
    1010Domain Path: /languages
  • wp-admin-notification-center/trunk/readme.txt

    r2994668 r3036574  
    55Tested up to: 6.4
    66Requires PHP: 7.0
    7 Stable tag: 3.0.0
     7Stable tag: 3.1.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535== Changelog ==
    3636
     37= 3.1.0 =
     38* Fix notification number showing 0
     39
    3740= 3.0.0 =
    3841* Store notice displayed in the admin
Note: See TracChangeset for help on using the changeset viewer.