| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | */ |
| 28 | 28 | class Visualizer_Plugin { |
| 29 | 29 | |
| 30 | 30 | const NAME = 'visualizer'; |
| 31 | - const VERSION = '3.0.7'; | |
| 31 | + const VERSION = '3.0.12'; | |
| 32 | 32 | |
| 33 | 33 | // custom post types |
| 34 | 34 | const CPT_VISUALIZER = 'visualizer'; |
| 35 | 35 | |
| @@ -61,8 +61,10 @@ | ||
| 61 | 61 | const FILTER_CHART_WRAPPER_CLASS = 'visualizer-chart-wrapper-class'; |
| 62 | 62 | const FILTER_GET_CHART_SERIES = 'visualizer-get-chart-series'; |
| 63 | 63 | const FILTER_GET_CHART_DATA = 'visualizer-get-chart-data'; |
| 64 | 64 | const FILTER_GET_CHART_SETTINGS = 'visualizer-get-chart-settings'; |
| 65 | + const FILTER_UNDO_REVISIONS = 'visualizer-undo-revisions'; | |
| 66 | + const FILTER_HANDLE_REVISIONS = 'visualizer-handle-revisions'; | |
| 65 | 67 | |
| 66 | 68 | const CF_CHART_URL = 'visualizer-chart-url'; |
| 67 | 69 | const CF_CHART_SCHEDULE = 'visualizer-chart-schedule'; |
| 68 | 70 | // Added by Ash/Upwork |
| @@ -96,8 +98,11 @@ | ||
| 96 | 98 | * |
| 97 | 99 | * @access private |
| 98 | 100 | */ |
| 99 | 101 | private function __construct() { |
| 102 | + if ( VISUALIZER_DEBUG ) { | |
| 103 | + add_action( 'themeisle_log_event', array( $this, 'themeisle_log_event_debug' ), 10, 5 ); | |
| 104 | + } | |
| 100 | 105 | } |
| 101 | 106 | |
| 102 | 107 | /** |
| 103 | 108 | * Returns singletone instance of the plugin. |
| @@ -181,7 +186,17 @@ | ||
| 181 | 186 | * |
| 182 | 187 | * @access private |
| 183 | 188 | */ |
| 184 | 189 | private function __clone() { |
| 190 | + } | |
| 191 | + | |
| 192 | + /** | |
| 193 | + * For local testing, overrides the 'themeisle_log_event' hook and redirects to error.log. | |
| 194 | + */ | |
| 195 | + final function themeisle_log_event_debug( $name, $message, $type, $file, $line ) { | |
| 196 | + if ( Visualizer_Plugin::NAME !== $name ) { | |
| 197 | + return; | |
| 198 | + } | |
| 199 | + error_log( sprintf( '%s (%s): %s in %s:%s', $name, $type, $message, $file, $line ) ); | |
| 185 | 200 | } |
| 186 | 201 | |
| 187 | 202 | } |