Changeset 1527303
- Timestamp:
- 11/03/2016 10:55:48 AM (9 years ago)
- Location:
- bugfu-console-debugger
- Files:
-
- 6 edited
- 5 copied
-
tags/1.1 (copied) (copied from bugfu-console-debugger/trunk)
-
tags/1.1/bugfu-console-debugger.php (copied) (copied from bugfu-console-debugger/trunk/bugfu-console-debugger.php)
-
tags/1.1/readme.txt (copied) (copied from bugfu-console-debugger/trunk/readme.txt)
-
tags/1.1/views/settings-page.php (copied) (copied from bugfu-console-debugger/trunk/views/settings-page.php)
-
tags/1.2 (copied) (copied from bugfu-console-debugger/trunk)
-
tags/1.2/bugfu-console-debugger.php (modified) (4 diffs)
-
tags/1.2/js/ajax-bugfu-console-debugger.js (modified) (2 diffs)
-
tags/1.2/readme.txt (modified) (2 diffs)
-
trunk/bugfu-console-debugger.php (modified) (4 diffs)
-
trunk/js/ajax-bugfu-console-debugger.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bugfu-console-debugger/tags/1.2/bugfu-console-debugger.php
r1510834 r1527303 5 5 * Plugin URI: https://github.com/fedeandri/bugfu-console-debugger 6 6 * Description: BugFu lets you log from PHP directly to your Browser JavaScript Console - Meant as an aid to those practicing the ancient art of debugging 7 * Version: 1. 17 * Version: 1.2 8 8 * Author: Federico Andrioli 9 9 * Author URI: https://it.linkedin.com/in/fedeandri … … 16 16 17 17 18 if ( ! class_exists( 'BugFu' ) ) {18 if ( !class_exists( 'BugFu' ) ) { 19 19 class BugFu 20 20 { 21 21 22 const PLUGIN_VERSION = '1. 1';22 const PLUGIN_VERSION = '1.2'; 23 23 const PLUGIN_PREFIX = 'bugfu'; 24 24 const PLUGIN_SHORT_NAME = 'BugFu'; … … 104 104 public function bugfu_ajax_read_debug_log() { 105 105 106 $result = self::read_debug_log(); 107 108 if( $result != '' ) { 106 $response = array(); 107 108 $header = self::get_bugfu_header(); 109 $log = self::read_debug_log(); 110 111 if( $log != '' ) { 109 112 update_option( self::OPTION_NAME_LOG, '' ); 110 113 } 111 114 112 echo "\n".self::LOG_HEADER_BAR."\n".self::LOG_HEADER."\n".self::LOG_HEADER_BAR.$result."\n\n\n\n"; 115 $response['header'] = $header; 116 $response['log'] = $log; 117 118 wp_send_json_success( $response ); 113 119 114 120 exit(); 121 } 122 123 public static function get_bugfu_header() { 124 $header = self::LOG_HEADER_BAR."\n".self::LOG_HEADER."\n".self::LOG_HEADER_BAR; 125 return $header; 115 126 } 116 127 … … 156 167 private static function read_debug_log() { 157 168 158 $debug_log = unserialize( get_option( self::OPTION_NAME_LOG) );169 $debug_log = trim( unserialize( get_option( self::OPTION_NAME_LOG ) ) ); 159 170 160 171 return $debug_log; -
bugfu-console-debugger/tags/1.2/js/ajax-bugfu-console-debugger.js
r1484245 r1527303 1 1 (function($) { 2 2 3 var bugfu_previous_log; 3 4 var bugfu_read_log_interval; 4 5 5 6 $( document ).ready( function() { 7 6 8 bugfu_read_log_interval = setInterval( bugfu_read_log, 300 ); 7 9 }); 8 10 9 11 function bugfu_read_log() { 10 12 … … 18 20 data: data, 19 21 success: function( response ) { 20 21 if( response ) { 22 console.log(response); 23 clearInterval( bugfu_read_log_interval ); 22 23 var preheader = "\n"; 24 var header = response.data.header; 25 var log = response.data.log; 26 27 if( (log && log != bugfu_previous_log) || bugfu_previous_log == null ) { 28 29 console.log(preheader.concat(header, "\n\n", log, "\n\n\n")); 30 31 bugfu_previous_log = log; 24 32 } 25 33 -
bugfu-console-debugger/tags/1.2/readme.txt
r1510834 r1527303 1 1 === BugFu Console Debugger === 2 2 Contributors: fedeandri 3 Tags: debug, debugging, debug bar, debug notification, dev, develop, development, error, log, display error, error log, error notification, error reporting, bug, bugs, find bug, bug report, issue, issues, multisite, plugin, browser, console, php, j avascript, stacktrace, backtrace3 Tags: debug, debugging, debug bar, debug notification, dev, develop, development, error, log, display error, error log, error notification, error reporting, bug, bugs, find bug, bug report, issue, issues, multisite, plugin, browser, console, php, jquery, javascript, ajax, stacktrace, backtrace 4 4 Requires at least: 3.8 5 Tested up to: 4. 66 Stable tag: 1. 15 Tested up to: 4.7 6 Stable tag: 1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 1.2 = 79 * Add the ability to debug AJAX calls 80 78 81 = 1.1 = 79 82 * Fixed a bug that made it look like BugFu constantly needed to be updated (thanks to Jonathan Bossenger) -
bugfu-console-debugger/trunk/bugfu-console-debugger.php
r1510834 r1527303 5 5 * Plugin URI: https://github.com/fedeandri/bugfu-console-debugger 6 6 * Description: BugFu lets you log from PHP directly to your Browser JavaScript Console - Meant as an aid to those practicing the ancient art of debugging 7 * Version: 1. 17 * Version: 1.2 8 8 * Author: Federico Andrioli 9 9 * Author URI: https://it.linkedin.com/in/fedeandri … … 16 16 17 17 18 if ( ! class_exists( 'BugFu' ) ) {18 if ( !class_exists( 'BugFu' ) ) { 19 19 class BugFu 20 20 { 21 21 22 const PLUGIN_VERSION = '1. 1';22 const PLUGIN_VERSION = '1.2'; 23 23 const PLUGIN_PREFIX = 'bugfu'; 24 24 const PLUGIN_SHORT_NAME = 'BugFu'; … … 104 104 public function bugfu_ajax_read_debug_log() { 105 105 106 $result = self::read_debug_log(); 107 108 if( $result != '' ) { 106 $response = array(); 107 108 $header = self::get_bugfu_header(); 109 $log = self::read_debug_log(); 110 111 if( $log != '' ) { 109 112 update_option( self::OPTION_NAME_LOG, '' ); 110 113 } 111 114 112 echo "\n".self::LOG_HEADER_BAR."\n".self::LOG_HEADER."\n".self::LOG_HEADER_BAR.$result."\n\n\n\n"; 115 $response['header'] = $header; 116 $response['log'] = $log; 117 118 wp_send_json_success( $response ); 113 119 114 120 exit(); 121 } 122 123 public static function get_bugfu_header() { 124 $header = self::LOG_HEADER_BAR."\n".self::LOG_HEADER."\n".self::LOG_HEADER_BAR; 125 return $header; 115 126 } 116 127 … … 156 167 private static function read_debug_log() { 157 168 158 $debug_log = unserialize( get_option( self::OPTION_NAME_LOG) );169 $debug_log = trim( unserialize( get_option( self::OPTION_NAME_LOG ) ) ); 159 170 160 171 return $debug_log; -
bugfu-console-debugger/trunk/js/ajax-bugfu-console-debugger.js
r1484245 r1527303 1 1 (function($) { 2 2 3 var bugfu_previous_log; 3 4 var bugfu_read_log_interval; 4 5 5 6 $( document ).ready( function() { 7 6 8 bugfu_read_log_interval = setInterval( bugfu_read_log, 300 ); 7 9 }); 8 10 9 11 function bugfu_read_log() { 10 12 … … 18 20 data: data, 19 21 success: function( response ) { 20 21 if( response ) { 22 console.log(response); 23 clearInterval( bugfu_read_log_interval ); 22 23 var preheader = "\n"; 24 var header = response.data.header; 25 var log = response.data.log; 26 27 if( (log && log != bugfu_previous_log) || bugfu_previous_log == null ) { 28 29 console.log(preheader.concat(header, "\n\n", log, "\n\n\n")); 30 31 bugfu_previous_log = log; 24 32 } 25 33 -
bugfu-console-debugger/trunk/readme.txt
r1510834 r1527303 1 1 === BugFu Console Debugger === 2 2 Contributors: fedeandri 3 Tags: debug, debugging, debug bar, debug notification, dev, develop, development, error, log, display error, error log, error notification, error reporting, bug, bugs, find bug, bug report, issue, issues, multisite, plugin, browser, console, php, j avascript, stacktrace, backtrace3 Tags: debug, debugging, debug bar, debug notification, dev, develop, development, error, log, display error, error log, error notification, error reporting, bug, bugs, find bug, bug report, issue, issues, multisite, plugin, browser, console, php, jquery, javascript, ajax, stacktrace, backtrace 4 4 Requires at least: 3.8 5 Tested up to: 4. 66 Stable tag: 1. 15 Tested up to: 4.7 6 Stable tag: 1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 1.2 = 79 * Add the ability to debug AJAX calls 80 78 81 = 1.1 = 79 82 * Fixed a bug that made it look like BugFu constantly needed to be updated (thanks to Jonathan Bossenger)
Note: See TracChangeset
for help on using the changeset viewer.