Plugin Directory

Changeset 1125422


Ignore:
Timestamp:
04/01/2015 02:27:37 PM (11 years ago)
Author:
samface
Message:

version 0.6 - more new routines and better log display

Location:
angry-creative-logger/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • angry-creative-logger/trunk/plugin.php

    r1125402 r1125422  
    44Plugin URI: http://angrycreative.se
    55Description: Inspects and logs possible issues with your Wordpress installation.
    6 Version: 0.5.4
     6Version: 0.6.0
    77Author: Robin Björklund, Sammy Nordström, Angry Creative AB
    88*/
    99
    10 define( 'ACI_PLUGIN_VERSION', '0.5.4' );
     10define( 'ACI_PLUGIN_VERSION', '0.6.0' );
    1111
    1212define( 'ACI_PLUGIN_DIR', dirname( __FILE__ ) );
  • angry-creative-logger/trunk/readme.txt

    r1125402 r1125422  
    44Requires at least: 4.0
    55Tested up to: 4.1.1
    6 Stable tag: 0.5.4
     6Stable tag: 0.6.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2222== Changelog ==
    2323
     24= 0.6.x =
     25* New routine for checking mysql database collations
     26* New routine for logging user profile updates
     27* New routine for logging new user registrations
     28* New routine for logging new site registrations
     29* Fixed a bug in the routine for javascript errors that prevented browser debugging
     30* Added function for downloading log file
     31* Better log file display in wp-admin
     32
    2433= 0.5.x =
    25 * New routine for checking mysql database collations
    2634* New routine for logging javascript errors
    2735* New routine for logging user capability changes
  • angry-creative-logger/trunk/routines/git_status.php

    r958063 r1125422  
    5656                }
    5757
    58                 if ( !is_array($routine_options['ignore_files']) ) {
    59                     $routine_options['ignore_files'] = array();
     58                if ( empty( $routine_options['ignore_files'] ) ) {
     59                    $routine_options['ignore_files'] = self::$_default_ignore_files;
     60                } else if ( !is_array( $routine_options['ignore_files'] ) ) {
     61                    $routine_options['ignore_files'] = (array) $routine_options['ignore_files'];
    6062                }
    6163
     
    9799
    98100                $routine_options['changed_files'] = $changed_files;
     101
    99102                ACI_Routine_Handler::set_options( __CLASS__, $routine_options );
    100103
  • angry-creative-logger/trunk/routines/js_errors.php

    r943417 r1125422  
    5656                          "&e=" + encodeURIComponent(errorObj);
    5757            }
    58             return true;
     58            return false;
    5959        }
    6060        </script>
  • angry-creative-logger/trunk/routines/site_change.php

    r943414 r1125422  
    55 */
    66
    7 class ACI_Routine_Log_Site_Change {
     7if ( is_multisite() && is_plugin_active_for_network( ACI_PLUGIN_BASENAME ) ) {
    88
    9     const LOG_LEVEL = "warning";
     9    class ACI_Routine_Log_Site_Change {
    1010
    11     const DESCRIPTION = "Logs if a site in the network has been activated or deactivated.";
     11        const LOG_LEVEL = "warning";
    1212
    13     public static function register() {
     13        const DESCRIPTION = "Logs if a site in the network has been activated or deactivated.";
    1414
    15         $default_options = array( 'log_level' => self::LOG_LEVEL,
    16                                   'description' => self::DESCRIPTION );
    17        
    18         aci_register_routine( __CLASS__, $default_options, "activate_blog", 10, 1 );
    19         aci_register_routine( __CLASS__, $default_options, "deactivate_blog", 10, 1 );
     15        public static function register() {
     16
     17            $default_options = array( 'log_level' => self::LOG_LEVEL,
     18                                      'description' => self::DESCRIPTION );
     19           
     20            aci_register_routine( __CLASS__, $default_options, "activate_blog", 10, 1 );
     21            aci_register_routine( __CLASS__, $default_options, "deactivate_blog", 10, 1 );
     22
     23        }
     24
     25        public static function inspect( $site ) {
     26
     27            $user = wp_get_current_user();
     28            $usermsg = ($user instanceof WP_User) ? ' (user: '.$user->user_login.')' : '';
     29           
     30            switch( current_filter() ) {
     31                case 'activate_blog':
     32                    $status = 'activated';
     33                    break;
     34                case 'deactivate_blog':
     35                    $status = 'deactivated';
     36                    break;
     37            }
     38
     39            $message = 'Site ' . get_blog_details($site)->blogname . ' (id: '.$site . ')' . ' was ' . $status . $usermsg;
     40
     41            AC_Inspector::log( $message, __CLASS__ );
     42
     43            return "";
     44
     45        }
    2046
    2147    }
    2248
    23     public static function inspect( $site ) {
    24 
    25         $user = wp_get_current_user();
    26         $usermsg = ($user instanceof WP_User) ? ' (user: '.$user->user_login.')' : '';
    27        
    28         switch( current_filter() ) {
    29             case 'activate_blog':
    30                 $status = 'activated';
    31                 break;
    32             case 'deactivate_blog':
    33                 $status = 'deactivated';
    34                 break;
    35         }
    36 
    37         $message = 'Site ' . get_blog_details($site)->blogname . ' (id: '.$site . ')' . ' was ' . $status . $usermsg;
    38 
    39         AC_Inspector::log( $message, __CLASS__ );
    40 
    41         return "";
    42 
    43     }
     49    ACI_Routine_Log_Site_Change::register();
    4450
    4551}
    46 
    47 ACI_Routine_Log_Site_Change::register();
Note: See TracChangeset for help on using the changeset viewer.