Plugin Directory

Changeset 2583228


Ignore:
Timestamp:
08/16/2021 12:07:22 AM (5 years ago)
Author:
irunstuff
Message:

change code from function-derived to class-derived to address potential namespace collisions; tagging version 1.1.0

Location:
notification-runner
Files:
2 added
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • notification-runner/tags/1.1.0/notification-runner.php

    r2534541 r2583228  
    55 * Plugin URI:        https://irunstuff.com/plugins/notification-runner
    66 * Description:       Disable successful update notification emails for core updates, plugins, and themes.
    7  * Version:           1.0.1
     7 * Version:           1.1.0
    88 * Author:            IRunStuff.com
    99 * Author URI:        https://irunstuff.com
     
    2222
    2323
    24 add_filter( 'auto_core_update_send_email', 'irunstuff_stop_auto_update_emails', 10, 4 );
     24class Notification_Runner_Plugin {
     25  function __construct() {
     26    add_filter( 'auto_plugin_update_send_email', '__return_false' );
    2527
    26 
    27 function irunstuff_stop_auto_update_emails( $send, $type, $core_update, $result ) {
    28   if ( ! empty( $type ) && $type == 'success' ) {
    29     return false;
     28    add_filter( 'auto_theme_update_send_email', '__return_false' );
     29   
     30    add_filter( 'auto_core_update_send_email', array( $this, 'irunstuff_stop_auto_update_emails' ), 10, 4 );
    3031  }
    3132
    32   return true;
     33  function irunstuff_stop_auto_update_emails( $send, $type, $core_update, $result ) {
     34    if ( ! empty( $type ) && $type == 'success' ) {
     35      return false;
     36    }
     37
     38    return true;
     39  }
    3340}
    3441
    35 
    36 add_filter( 'auto_plugin_update_send_email', '__return_false' );
    37 
    38 
    39 add_filter( 'auto_theme_update_send_email', '__return_false' );
     42$notification_runner_plugin = new Notification_Runner_Plugin();
    4043
    4144?>
  • notification-runner/tags/1.1.0/readme.txt

    r2534541 r2583228  
    44Requires at least: 5.7.2
    55Tested up to: 5.7.2
    6 Stable tag: 1.0.1
     6Stable tag: 1.1.0
    77Requires PHP: 7.0
    88License: GNU General Public License v3 (GPLv3)
  • notification-runner/trunk/notification-runner.php

    r2534541 r2583228  
    55 * Plugin URI:        https://irunstuff.com/plugins/notification-runner
    66 * Description:       Disable successful update notification emails for core updates, plugins, and themes.
    7  * Version:           1.0.1
     7 * Version:           1.1.0
    88 * Author:            IRunStuff.com
    99 * Author URI:        https://irunstuff.com
     
    2222
    2323
    24 add_filter( 'auto_core_update_send_email', 'irunstuff_stop_auto_update_emails', 10, 4 );
     24class Notification_Runner_Plugin {
     25  function __construct() {
     26    add_filter( 'auto_plugin_update_send_email', '__return_false' );
    2527
    26 
    27 function irunstuff_stop_auto_update_emails( $send, $type, $core_update, $result ) {
    28   if ( ! empty( $type ) && $type == 'success' ) {
    29     return false;
     28    add_filter( 'auto_theme_update_send_email', '__return_false' );
     29   
     30    add_filter( 'auto_core_update_send_email', array( $this, 'irunstuff_stop_auto_update_emails' ), 10, 4 );
    3031  }
    3132
    32   return true;
     33  function irunstuff_stop_auto_update_emails( $send, $type, $core_update, $result ) {
     34    if ( ! empty( $type ) && $type == 'success' ) {
     35      return false;
     36    }
     37
     38    return true;
     39  }
    3340}
    3441
    35 
    36 add_filter( 'auto_plugin_update_send_email', '__return_false' );
    37 
    38 
    39 add_filter( 'auto_theme_update_send_email', '__return_false' );
     42$notification_runner_plugin = new Notification_Runner_Plugin();
    4043
    4144?>
  • notification-runner/trunk/readme.txt

    r2534541 r2583228  
    44Requires at least: 5.7.2
    55Tested up to: 5.7.2
    6 Stable tag: 1.0.1
     6Stable tag: 1.1.0
    77Requires PHP: 7.0
    88License: GNU General Public License v3 (GPLv3)
Note: See TracChangeset for help on using the changeset viewer.