Changeset 3173088
- Timestamp:
- 10/21/2024 05:07:24 PM (18 months ago)
- Location:
- kolorweb-log-manager/trunk
- Files:
-
- 7 added
- 8 deleted
- 8 edited
-
assets/css/main.1.1.3.min.css (deleted)
-
assets/css/main.1.1.4.min.css (deleted)
-
assets/css/main.1.1.5.min.css (added)
-
assets/js/main.1.1.3.min.js (deleted)
-
assets/js/main.1.1.4.min.js (deleted)
-
assets/js/main.1.1.5.min.js (added)
-
kolorweb-log-manager.php (added)
-
kw-log-manager.php (deleted)
-
languages/kolorweb-log-manager-it_IT.l10n.php (added)
-
languages/kolorweb-log-manager-it_IT.mo (added)
-
languages/kolorweb-log-manager-it_IT.po (added)
-
languages/kolorweb-log-manager.pot (added)
-
languages/kwlm-it_IT.mo (deleted)
-
languages/kwlm-it_IT.po (deleted)
-
languages/kwlm.pot (deleted)
-
libs/class-ajax.php (modified) (4 diffs)
-
libs/class-config.php (modified) (4 diffs)
-
libs/class-helper.php (modified) (1 diff)
-
libs/class-log.php (modified) (8 diffs)
-
libs/class-plugin.php (modified) (8 diffs)
-
libs/class-settings.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kolorweb-log-manager/trunk/libs/class-ajax.php
r2693368 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 … … 194 193 array( 195 194 'truncated' => $truncated, 195 // phpcs:ignore Squiz.PHP.CommentedOutCode.Found 196 196 // 'entries' => $truncated ? $log->get_recent_entries() : $log->get_entries() 197 197 'entries' => $log->get_entries(), … … 236 236 ) 237 237 ); 238 239 238 } 240 239 … … 358 357 ) 359 358 ); 360 361 } 362 359 } 363 360 } -
kolorweb-log-manager/trunk/libs/class-config.php
r2692326 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 … … 135 134 136 135 return $this->file_exists() && $this->is_wp_config_writable(); 137 138 136 } 139 137 … … 185 183 186 184 return $this->update_debug_status( $status ); 187 188 185 } 189 186 … … 236 233 237 234 return $new_status; 238 239 235 } 240 236 } -
kolorweb-log-manager/trunk/libs/class-helper.php
r2692326 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 -
kolorweb-log-manager/trunk/libs/class-log.php
r2693368 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 … … 191 190 if ( count( $content ) > $check_log_limit ) { 192 191 $content = array_slice( $content, ( count( $content ) - $check_log_limit ) - 1 ); 193 file_put_contents( $this->log_file, $content ); 194 touch( $this->log_file, $last_modified ); 192 file_put_contents( $this->log_file, $content ); // phpcs:ignore 193 touch( $this->log_file, $last_modified ); // phpcs:ignore 195 194 } 196 195 } 197 196 198 $fp = @fopen( $this->log_file, 'r' ); 197 $fp = @fopen( $this->log_file, 'r' ); // phpcs:ignore 199 198 200 199 if ( $fp ) { 201 200 202 while ( false !== ( $line = @fgets( $fp ) ) ) { 201 while ( false !== ( $line = @fgets( $fp ) ) ) { // phpcs:ignore 203 202 204 203 $line = preg_replace( '/^\[([0-9a-zA-Z-]+) ([0-9:]+) ([a-zA-Z_\/]+)\] (.*)$/i', '$1' . $sep . '$2' . $sep . '$3' . $sep . '$4', $line ); … … 208 207 209 208 $entries[] = array( 209 // phpcs:ignore 210 210 // 'date' => strtotime($parts[0] . ' ' . $parts[1] . ' ' . $parts[2]), 211 211 'date' => gmdate( 'Y-m-d', strtotime( $parts[0] ) ), … … 218 218 } 219 219 220 @fclose( $fp ); 220 @fclose( $fp ); // phpcs:ignore 221 221 222 222 } 223 223 } else { 224 224 225 touch( $this->log_file ); 225 touch( $this->log_file ); // phpcs:ignore 226 226 227 227 } … … 235 235 236 236 return array_reverse( $entries ); 237 238 237 } 239 238 … … 248 247 public function get_contents() { 249 248 if ( $this->file_exists() ) { 250 return file_get_contents( $this->log_file ); 249 return file_get_contents( $this->log_file ); // phpcs:ignore 251 250 } 252 251 … … 277 276 public function clear() { 278 277 279 $fp = @fopen( $this->log_file, 'r+' ); 280 return @ftruncate( $fp, 0 ); 281 278 $fp = @fopen( $this->log_file, 'r+' ); // phpcs:ignore 279 return @ftruncate( $fp, 0 ); // phpcs:ignore 282 280 } 283 281 … … 291 289 */ 292 290 public function delete() { 293 return true === unlink( $this->log_file ) ? true : false; 294 } 295 291 return true === unlink( $this->log_file ) ? true : false; // phpcs:ignore 292 } 296 293 } -
kolorweb-log-manager/trunk/libs/class-plugin.php
r3153225 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 … … 82 81 $config = Config::get_instance(); 83 82 $config->enable_debugging(); 84 85 83 } 86 84 … … 94 92 $config = Config::get_instance(); 95 93 $config->disable_debugging(); 96 97 94 } 98 95 … … 105 102 106 103 $path = dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'; 107 $result = load_plugin_textdomain( 'kwlm', false, $path ); 108 104 $result = load_plugin_textdomain( 'kolorweb-log-manager', false, $path ); 109 105 } 110 106 … … 119 115 } 120 116 117 /** 118 * Check if in customize preview mode. 119 */ 120 public function check_if_is_customize_preview() { 121 if ( function_exists( 'is_customize_preview' ) ) { 122 return is_customize_preview(); 123 } else { 124 // Fallback for WordPress < 4.0 version. 125 global $wp_customize; 126 return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview(); 127 } 128 } 121 129 122 130 /** … … 150 158 ); 151 159 152 // Stylesheet files. 153 wp_enqueue_style( 'kwlogmanager-css', KWLOGMANAGER_URL . 'assets/css/main.' . KWLOGMANAGER_VERSION . '.min.css', array(), KWLOGMANAGER_VERSION ); 154 155 // Javascript files. 156 wp_enqueue_script( 'kwlogmanager-react-js', KWLOGMANAGER_URL . 'assets/js/react-framework.min.js', false, KWLOGMANAGER_VERSION, true ); 157 158 wp_enqueue_script( 'kwlogmanager-js', KWLOGMANAGER_URL . 'assets/js/main.' . KWLOGMANAGER_VERSION . '.min.js', array( 'kwlogmanager-react-js' ), KWLOGMANAGER_VERSION, true ); 159 160 // Localize variables. 161 wp_localize_script( 'kwlogmanager-js', 'KWLOGMANAGER', $localized ); 160 // In Customizer preview mode we do not need to enqueue CSS and JS files. 161 if ( ! $this->check_if_is_customize_preview() ) { 162 // Stylesheet files. 163 wp_enqueue_style( 'kwlogmanager-css', KWLOGMANAGER_URL . 'assets/css/main.' . KWLOGMANAGER_VERSION . '.min.css', array(), KWLOGMANAGER_VERSION ); 164 165 // Javascript files. 166 wp_enqueue_script( 'kwlogmanager-react-js', KWLOGMANAGER_URL . 'assets/js/react-framework.min.js', false, KWLOGMANAGER_VERSION, true ); 167 168 wp_enqueue_script( 'kwlogmanager-js', KWLOGMANAGER_URL . 'assets/js/main.' . KWLOGMANAGER_VERSION . '.min.js', array( 'kwlogmanager-react-js' ), KWLOGMANAGER_VERSION, true ); 169 170 // Localize variables. 171 wp_localize_script( 'kwlogmanager-js', 'KWLOGMANAGER', $localized ); 172 } 162 173 } 163 174 } … … 304 315 // Lang Array Data. 305 316 $lang = array( 306 'loadEntries' => __( 'Loading entries ...', 'k wlm' ),307 'enabled' => __( 'Enabled', 'k wlm' ),308 'disabled' => __( 'Disabled', 'k wlm' ),309 'goToDebug' => __( 'Go to Log Viewer', 'k wlm' ),310 'simulating' => __( 'Simulating', 'k wlm' ),311 'notFound' => __( 'No entries found.', 'k wlm' ),312 'back' => __( 'Back', 'k wlm' ),313 'close' => __( 'Close', 'k wlm' ),314 'save' => __( 'Save', 'k wlm' ),315 'update' => __( 'Update', 'k wlm' ),316 'edit' => __( 'Edit', 'k wlm' ),317 'delete' => __( 'Delete', 'k wlm' ),318 'cancel' => __( 'Cancel', 'k wlm' ),319 'disable' => __( 'Disable', 'k wlm' ),320 'currentDate' => __( 'Today', 'k wlm' ),321 'type' => __( 'Type:', 'k wlm' ),322 'line' => __( 'Line:', 'k wlm' ),323 'hideDetails' => __( 'Hide details', 'k wlm' ),324 'moreDetails' => __( 'More details', 'k wlm' ),325 'searchFor' => __( 'Search for ...', 'k wlm' ),326 'searchingFor' => __( 'Searching for', 'k wlm' ),327 'seeHelp' => __( 'See help', 'k wlm' ),328 'lastModified' => __( 'Last Modified', 'k wlm' ),329 'fileSize' => __( 'Filesize', 'k wlm' ),330 'legend' => __( 'Legend', 'k wlm' ),331 'legendInfo' => __( 'Filter Errors by click on this labels...', 'k wlm' ),332 'othersErrors' => __( 'Other', 'k wlm' ),333 'loadWidget' => __( 'Loading Widget Data ...', 'k wlm' ),317 'loadEntries' => __( 'Loading entries ...', 'kolorweb-log-manager' ), 318 'enabled' => __( 'Enabled', 'kolorweb-log-manager' ), 319 'disabled' => __( 'Disabled', 'kolorweb-log-manager' ), 320 'goToDebug' => __( 'Go to Log Viewer', 'kolorweb-log-manager' ), 321 'simulating' => __( 'Simulating', 'kolorweb-log-manager' ), 322 'notFound' => __( 'No entries found.', 'kolorweb-log-manager' ), 323 'back' => __( 'Back', 'kolorweb-log-manager' ), 324 'close' => __( 'Close', 'kolorweb-log-manager' ), 325 'save' => __( 'Save', 'kolorweb-log-manager' ), 326 'update' => __( 'Update', 'kolorweb-log-manager' ), 327 'edit' => __( 'Edit', 'kolorweb-log-manager' ), 328 'delete' => __( 'Delete', 'kolorweb-log-manager' ), 329 'cancel' => __( 'Cancel', 'kolorweb-log-manager' ), 330 'disable' => __( 'Disable', 'kolorweb-log-manager' ), 331 'currentDate' => __( 'Today', 'kolorweb-log-manager' ), 332 'type' => __( 'Type:', 'kolorweb-log-manager' ), 333 'line' => __( 'Line:', 'kolorweb-log-manager' ), 334 'hideDetails' => __( 'Hide details', 'kolorweb-log-manager' ), 335 'moreDetails' => __( 'More details', 'kolorweb-log-manager' ), 336 'searchFor' => __( 'Search for ...', 'kolorweb-log-manager' ), 337 'searchingFor' => __( 'Searching for', 'kolorweb-log-manager' ), 338 'seeHelp' => __( 'See help', 'kolorweb-log-manager' ), 339 'lastModified' => __( 'Last Modified', 'kolorweb-log-manager' ), 340 'fileSize' => __( 'Filesize', 'kolorweb-log-manager' ), 341 'legend' => __( 'Legend', 'kolorweb-log-manager' ), 342 'legendInfo' => __( 'Filter Errors by click on this labels...', 'kolorweb-log-manager' ), 343 'othersErrors' => __( 'Other', 'kolorweb-log-manager' ), 344 'loadWidget' => __( 'Loading Widget Data ...', 'kolorweb-log-manager' ), 334 345 'addCustomErr' => array( 335 'name' => __( 'Add Custom Error', 'k wlm' ),336 'label' => __( 'Label', 'k wlm' ),337 'key' => __( 'Error Key', 'k wlm' ),338 'color' => __( 'Color', 'k wlm' ),339 'bgcolor' => __( 'Background', 'k wlm' ),340 'noErr' => __( 'No custom error messages defined.', 'k wlm' ),341 'addNew' => __( 'Add new', 'k wlm' ),342 'config' => __( 'Feature must be configured.', 'k wlm' ),346 'name' => __( 'Add Custom Error', 'kolorweb-log-manager' ), 347 'label' => __( 'Label', 'kolorweb-log-manager' ), 348 'key' => __( 'Error Key', 'kolorweb-log-manager' ), 349 'color' => __( 'Color', 'kolorweb-log-manager' ), 350 'bgcolor' => __( 'Background', 'kolorweb-log-manager' ), 351 'noErr' => __( 'No custom error messages defined.', 'kolorweb-log-manager' ), 352 'addNew' => __( 'Add new', 'kolorweb-log-manager' ), 353 'config' => __( 'Feature must be configured.', 'kolorweb-log-manager' ), 343 354 ), 344 355 'updCustomErr' => array( 345 'name' => __( 'Edit Custom Error', 'k wlm' ),356 'name' => __( 'Edit Custom Error', 'kolorweb-log-manager' ), 346 357 ), 347 358 'actions' => array( 348 'name' => __( 'Actions', 'k wlm' ),359 'name' => __( 'Actions', 'kolorweb-log-manager' ), 349 360 'options' => array( 350 'refresh' => __( 'Refresh', 'k wlm' ),351 'clearLog' => __( 'Clear Log', 'k wlm' ),352 'download' => __( 'Download', 'k wlm' ),361 'refresh' => __( 'Refresh', 'kolorweb-log-manager' ), 362 'clearLog' => __( 'Clear Log', 'kolorweb-log-manager' ), 363 'download' => __( 'Download', 'kolorweb-log-manager' ), 353 364 ), 354 365 ), 355 366 'sort' => array( 356 'name' => __( 'Sort', 'k wlm' ),367 'name' => __( 'Sort', 'kolorweb-log-manager' ), 357 368 'options' => array( 358 'newest' => __( 'By Newest', 'k wlm' ),359 'oldest' => __( 'By Oldest', 'k wlm' ),369 'newest' => __( 'By Newest', 'kolorweb-log-manager' ), 370 'oldest' => __( 'By Oldest', 'kolorweb-log-manager' ), 360 371 ), 361 372 ), 362 373 'view' => array( 363 'name' => __( 'View as', 'k wlm' ),374 'name' => __( 'View as', 'kolorweb-log-manager' ), 364 375 'options' => array( 365 'group' => __( 'Group', 'k wlm' ),366 'list' => __( 'List', 'k wlm' ),376 'group' => __( 'Group', 'kolorweb-log-manager' ), 377 'list' => __( 'List', 'kolorweb-log-manager' ), 367 378 ), 368 379 ), 369 380 'notify' => array( 370 'notLoaded' => __( 'Plugin could not be loaded. Please try again.', 'k wlm' ),371 'debugStatus' => __( 'Debbugging has been', 'k wlm' ),372 'logCleared' => __( 'Log file successfully cleared', 'k wlm' ),373 'logClearedFail' => __( 'Failed to clear log file. You might not have write permission', 'k wlm' ),374 'viewerUpdate' => __( 'Viewer updated with new entries', 'k wlm' ),375 'noEntries' => __( 'No new entries found', 'k wlm' ),376 'checkError' => __( 'Checking for updates failed.', 'k wlm' ),377 'debugFileWarn' => __( 'Debugging is enabled. However, the debug.log file does not exist or was not found.', 'k wlm' ),378 'debugDisabled' => __( 'Debugging is currently disabled.', 'k wlm' ),379 'isDebug' => __( 'Sorry, we could not detect if debugging is enabled or disabled.', 'k wlm' ),380 'howToDebug' => __( 'How to Enable Debugging?', 'k wlm' ),381 'customErrorAdd' => __( 'Custom error successfully added', 'k wlm' ),382 'customErrorErr' => __( 'Please complete all required fields', 'k wlm' ),383 'customErrorUpd' => __( 'Custom error successfully updated', 'k wlm' ),384 'customErrorAsk' => __( 'Are you sure you want to delete', 'k wlm' ),385 'customErrorDel' => __( 'Custom error successfully deleted', 'k wlm' ),386 'customErrorDie' => __( 'Custom error could not be deleted', 'k wlm' ),387 'logLimitErr' => __( 'Please insert only integer numbers values.', 'k wlm' ),388 'logLimitUpd' => __( 'Log Limit was updated', 'k wlm' ),381 'notLoaded' => __( 'Plugin could not be loaded. Please try again.', 'kolorweb-log-manager' ), 382 'debugStatus' => __( 'Debbugging has been', 'kolorweb-log-manager' ), 383 'logCleared' => __( 'Log file successfully cleared', 'kolorweb-log-manager' ), 384 'logClearedFail' => __( 'Failed to clear log file. You might not have write permission', 'kolorweb-log-manager' ), 385 'viewerUpdate' => __( 'Viewer updated with new entries', 'kolorweb-log-manager' ), 386 'noEntries' => __( 'No new entries found', 'kolorweb-log-manager' ), 387 'checkError' => __( 'Checking for updates failed.', 'kolorweb-log-manager' ), 388 'debugFileWarn' => __( 'Debugging is enabled. However, the debug.log file does not exist or was not found.', 'kolorweb-log-manager' ), 389 'debugDisabled' => __( 'Debugging is currently disabled.', 'kolorweb-log-manager' ), 390 'isDebug' => __( 'Sorry, we could not detect if debugging is enabled or disabled.', 'kolorweb-log-manager' ), 391 'howToDebug' => __( 'How to Enable Debugging?', 'kolorweb-log-manager' ), 392 'customErrorAdd' => __( 'Custom error successfully added', 'kolorweb-log-manager' ), 393 'customErrorErr' => __( 'Please complete all required fields', 'kolorweb-log-manager' ), 394 'customErrorUpd' => __( 'Custom error successfully updated', 'kolorweb-log-manager' ), 395 'customErrorAsk' => __( 'Are you sure you want to delete', 'kolorweb-log-manager' ), 396 'customErrorDel' => __( 'Custom error successfully deleted', 'kolorweb-log-manager' ), 397 'customErrorDie' => __( 'Custom error could not be deleted', 'kolorweb-log-manager' ), 398 'logLimitErr' => __( 'Please insert only integer numbers values.', 'kolorweb-log-manager' ), 399 'logLimitUpd' => __( 'Log Limit was updated', 'kolorweb-log-manager' ), 389 400 ), 390 401 'debugHelp' => array( 391 'intro' => __( 'To turn on debugging, add the following to your wp-config.php file.', 'k wlm' ),392 'moreInfo' => __( 'For more information visit', 'k wlm' ),393 ), 394 'entry' => __( 'entry', 'k wlm' ),395 'entries' => __( 'entries', 'k wlm' ),396 'logEntries' => __( 'Log Entries', 'k wlm' ),402 'intro' => __( 'To turn on debugging, add the following to your wp-config.php file.', 'kolorweb-log-manager' ), 403 'moreInfo' => __( 'For more information visit', 'kolorweb-log-manager' ), 404 ), 405 'entry' => __( 'entry', 'kolorweb-log-manager' ), 406 'entries' => __( 'entries', 'kolorweb-log-manager' ), 407 'logEntries' => __( 'Log Entries', 'kolorweb-log-manager' ), 397 408 'settings' => array( 398 'name' => __( 'Settings', 'k wlm' ),399 'enableDebug' => __( 'Enable Debug?', 'k wlm' ),400 'logLimit' => __( 'Sets the maximum number of lines in the debug.log file to consider. Leave the value at zero to get them all.', 'k wlm' ),401 'fold' => __( 'Fold sidebar to increase viewing area?', 'k wlm' ),402 'general' => __( 'General', 'k wlm' ),403 'customError' => __( 'Custom Errors', 'k wlm' ),409 'name' => __( 'Settings', 'kolorweb-log-manager' ), 410 'enableDebug' => __( 'Enable Debug?', 'kolorweb-log-manager' ), 411 'logLimit' => __( 'Sets the maximum number of lines in the debug.log file to consider. Leave the value at zero to get them all.', 'kolorweb-log-manager' ), 412 'fold' => __( 'Fold sidebar to increase viewing area?', 'kolorweb-log-manager' ), 413 'general' => __( 'General', 'kolorweb-log-manager' ), 414 'customError' => __( 'Custom Errors', 'kolorweb-log-manager' ), 404 415 ), 405 416 'help' => array( 406 'name' => __( 'Help', 'k wlm' ),407 'action' => __( 'Action', 'k wlm' ),408 'learnMore' => __( 'Learn more here...', 'k wlm' ),409 'step' => __( 'Step', 'k wlm' ),417 'name' => __( 'Help', 'kolorweb-log-manager' ), 418 'action' => __( 'Action', 'kolorweb-log-manager' ), 419 'learnMore' => __( 'Learn more here...', 'kolorweb-log-manager' ), 420 'step' => __( 'Step', 'kolorweb-log-manager' ), 410 421 'sections' => array( 411 422 'toggleDebugging' => array( 412 'question' => __( 'How to toggle debugging status?', 'k wlm' ),413 'title' => __( 'Toggle Debugging', 'k wlm' ),414 'p1' => __( 'When configured, you can enable/disable WP_DEBUG with just one click.', 'k wlm' ),415 'action_li_01' => __( 'In the sidebar, click on "Settings", then click on the slider to enable/disable debugging', 'k wlm' ),416 'p2' => __( 'If you do not see the debug toggle button, it means that the automatic WordPress debug activation procedure included in this Plugin has not been successful and you will have to proceed manually to edit the wp-config.php', 'k wlm' ),423 'question' => __( 'How to toggle debugging status?', 'kolorweb-log-manager' ), 424 'title' => __( 'Toggle Debugging', 'kolorweb-log-manager' ), 425 'p1' => __( 'When configured, you can enable/disable WP_DEBUG with just one click.', 'kolorweb-log-manager' ), 426 'action_li_01' => __( 'In the sidebar, click on "Settings", then click on the slider to enable/disable debugging', 'kolorweb-log-manager' ), 427 'p2' => __( 'If you do not see the debug toggle button, it means that the automatic WordPress debug activation procedure included in this Plugin has not been successful and you will have to proceed manually to edit the wp-config.php', 'kolorweb-log-manager' ), 417 428 ), 418 429 'debugToggling' => array( 419 'question' => __( 'How to configure debug toggling?', 'k wlm' ),420 'title' => __( 'Configure Debug Toggling', 'k wlm' ),421 'p1' => __( 'When the plugin is activated, the system tries to automatically set all the DEBUG constants in your wp-config.php', 'k wlm' ),422 'p2' => __( 'If toggle button does not appear in the settings means that your wp-config.php is not writable or not found in the default WordPress configuration path.', 'k wlm' ),423 'p3' => __( 'If wp-config is not writable, you will have to manually set the values for DEBUG constants and you will not be able to use the one-click debug toggle function. The plugin will continue to work without problems, but without the magic of this feature.', 'k wlm' ),424 'step1_1' => __( 'To manually enable WordPress debugging you can paste these lines of code into the wp-config.php file', 'k wlm' ),425 'step1_2' => __( 'To manually disable WordPress debugging you can paste these lines of code into the wp-config.php file', 'k wlm' ),426 'step2_1' => __( 'Refresh the page in the browser (reload page)', 'k wlm' ),430 'question' => __( 'How to configure debug toggling?', 'kolorweb-log-manager' ), 431 'title' => __( 'Configure Debug Toggling', 'kolorweb-log-manager' ), 432 'p1' => __( 'When the plugin is activated, the system tries to automatically set all the DEBUG constants in your wp-config.php', 'kolorweb-log-manager' ), 433 'p2' => __( 'If toggle button does not appear in the settings means that your wp-config.php is not writable or not found in the default WordPress configuration path.', 'kolorweb-log-manager' ), 434 'p3' => __( 'If wp-config is not writable, you will have to manually set the values for DEBUG constants and you will not be able to use the one-click debug toggle function. The plugin will continue to work without problems, but without the magic of this feature.', 'kolorweb-log-manager' ), 435 'step1_1' => __( 'To manually enable WordPress debugging you can paste these lines of code into the wp-config.php file', 'kolorweb-log-manager' ), 436 'step1_2' => __( 'To manually disable WordPress debugging you can paste these lines of code into the wp-config.php file', 'kolorweb-log-manager' ), 437 'step2_1' => __( 'Refresh the page in the browser (reload page)', 'kolorweb-log-manager' ), 427 438 ), 428 439 'foldSidebar' => array( 429 'question' => __( 'How to fold sidebar to increase viewing space?', 'k wlm' ),430 'title' => __( 'Fold Sidebar', 'k wlm' ),431 'p1' => __( 'By default the sidebar will be folded when the log viewer is active. To disable, or toggle this behavior:', 'k wlm' ),432 'action_li_01' => __( 'In the sidebar, click on "Settings", then click on the slider to enable/disable sidebar folding', 'k wlm' ),440 'question' => __( 'How to fold sidebar to increase viewing space?', 'kolorweb-log-manager' ), 441 'title' => __( 'Fold Sidebar', 'kolorweb-log-manager' ), 442 'p1' => __( 'By default the sidebar will be folded when the log viewer is active. To disable, or toggle this behavior:', 'kolorweb-log-manager' ), 443 'action_li_01' => __( 'In the sidebar, click on "Settings", then click on the slider to enable/disable sidebar folding', 'kolorweb-log-manager' ), 433 444 ), 434 445 'addCustomErrors' => array( 435 'question' => __( 'How to add custom errors?', 'k wlm' ),436 'title' => __( 'Manage Custom Errors', 'k wlm' ),437 'p1' => __( 'Custom error messages allow you to create custom errors when testing, color code those errors in the viewer and filter the entries by those errors.', 'k wlm' ),438 'action_li_01' => __( 'To add, edit or remove custom errors go to the "Settings" pane and click on the "Custom Errors" tab', 'k wlm' ),446 'question' => __( 'How to add custom errors?', 'kolorweb-log-manager' ), 447 'title' => __( 'Manage Custom Errors', 'kolorweb-log-manager' ), 448 'p1' => __( 'Custom error messages allow you to create custom errors when testing, color code those errors in the viewer and filter the entries by those errors.', 'kolorweb-log-manager' ), 449 'action_li_01' => __( 'To add, edit or remove custom errors go to the "Settings" pane and click on the "Custom Errors" tab', 'kolorweb-log-manager' ), 439 450 440 451 ), 441 452 'useCustomErrors' => array( 442 'question' => __( 'How to use custom errors?', 'k wlm' ),443 'title' => __( 'How to Use Custom Errors', 'k wlm' ),444 'p1_1' => __( 'When you write an error to the log, you have to start the error message with a', 'k wlm' ),445 'p1_2' => __( 'and the custom error key followed by a', 'k wlm' ),446 'p2' => __( 'Example: If you defined a custom error with a key: my-custom-error', 'k wlm' ),447 'p3' => __( 'In your code:', 'k wlm' ),453 'question' => __( 'How to use custom errors?', 'kolorweb-log-manager' ), 454 'title' => __( 'How to Use Custom Errors', 'kolorweb-log-manager' ), 455 'p1_1' => __( 'When you write an error to the log, you have to start the error message with a', 'kolorweb-log-manager' ), 456 'p1_2' => __( 'and the custom error key followed by a', 'kolorweb-log-manager' ), 457 'p2' => __( 'Example: If you defined a custom error with a key: my-custom-error', 'kolorweb-log-manager' ), 458 'p3' => __( 'In your code:', 'kolorweb-log-manager' ), 448 459 ), 449 460 'sortEntries' => array( 450 'question' => __( 'How to sort log entries?', 'k wlm' ),451 'title' => __( 'Sort Entries', 'k wlm' ),452 'p1' => __( 'Log entries can be sorted in descending or ascending order.', 'k wlm' ),453 'action_li_01' => __( 'In the sidebar, click on the A-Z icon.', 'k wlm' ),454 'action_li_02' => __( 'In the sidebar, click on the Z-A icon.', 'k wlm' ),461 'question' => __( 'How to sort log entries?', 'kolorweb-log-manager' ), 462 'title' => __( 'Sort Entries', 'kolorweb-log-manager' ), 463 'p1' => __( 'Log entries can be sorted in descending or ascending order.', 'kolorweb-log-manager' ), 464 'action_li_01' => __( 'In the sidebar, click on the A-Z icon.', 'kolorweb-log-manager' ), 465 'action_li_02' => __( 'In the sidebar, click on the Z-A icon.', 'kolorweb-log-manager' ), 455 466 ), 456 467 'helpView' => array( 457 'question' => __( 'How to switch between group and list views?', 'k wlm' ),458 'title' => __( 'Switch Between Group and List Views', 'k wlm' ),459 'p1' => __( 'You can switch between Group and List views.', 'k wlm' ),460 'p2_h' => __( 'Group View', 'k wlm' ),461 'p2' => __( 'This view groups all similar entries and shows you just one entry with the latest timestamp for each error. It makes it much easier to analyze the log entries.', 'k wlm' ),462 'p3_h' => __( 'List View', 'k wlm' ),463 'p3' => __( 'This view lists every log entry which is similar to the standard log view.', 'k wlm' ),464 'action_li_01' => __( 'In the sidebar, click on the group icon.', 'k wlm' ),465 'action_li_02' => __( 'In the sidebar, click on the list icon.', 'k wlm' ),468 'question' => __( 'How to switch between group and list views?', 'kolorweb-log-manager' ), 469 'title' => __( 'Switch Between Group and List Views', 'kolorweb-log-manager' ), 470 'p1' => __( 'You can switch between Group and List views.', 'kolorweb-log-manager' ), 471 'p2_h' => __( 'Group View', 'kolorweb-log-manager' ), 472 'p2' => __( 'This view groups all similar entries and shows you just one entry with the latest timestamp for each error. It makes it much easier to analyze the log entries.', 'kolorweb-log-manager' ), 473 'p3_h' => __( 'List View', 'kolorweb-log-manager' ), 474 'p3' => __( 'This view lists every log entry which is similar to the standard log view.', 'kolorweb-log-manager' ), 475 'action_li_01' => __( 'In the sidebar, click on the group icon.', 'kolorweb-log-manager' ), 476 'action_li_02' => __( 'In the sidebar, click on the list icon.', 'kolorweb-log-manager' ), 466 477 ), 467 478 'newLog' => array( 468 'question' => __( 'How to check for new log entries?', 'k wlm' ),469 'title' => __( 'Check For New Errors', 'k wlm' ),470 'p1_1' => __( 'The plugin automatically check for new log errors every', 'k wlm' ),471 'p1_2' => __( 'seconds and will update the view when new errors are found. There is no need to refresh the page.', 'k wlm' ),472 'p2' => __( 'If you still want to manually check for new errors:', 'k wlm' ),473 'action_li_01' => __( 'In the sidebar, click on the refresh icon under "actions".', 'k wlm' ),479 'question' => __( 'How to check for new log entries?', 'kolorweb-log-manager' ), 480 'title' => __( 'Check For New Errors', 'kolorweb-log-manager' ), 481 'p1_1' => __( 'The plugin automatically check for new log errors every', 'kolorweb-log-manager' ), 482 'p1_2' => __( 'seconds and will update the view when new errors are found. There is no need to refresh the page.', 'kolorweb-log-manager' ), 483 'p2' => __( 'If you still want to manually check for new errors:', 'kolorweb-log-manager' ), 484 'action_li_01' => __( 'In the sidebar, click on the refresh icon under "actions".', 'kolorweb-log-manager' ), 474 485 ), 475 486 'clearLog' => array( 476 'question' => __( 'How to clear the log file?', 'k wlm' ),477 'title' => __( 'Clear Log', 'k wlm' ),478 'p1' => __( 'If file permissions allow, the debug.log file will be truncated. If that fails, the file will be deleted. If the file cannot be truncated or deleted, an error will be displayed.', 'k wlm' ),479 'action_li_01' => __( 'In the sidebar, click on the clear icon under "actions".', 'k wlm' ),487 'question' => __( 'How to clear the log file?', 'kolorweb-log-manager' ), 488 'title' => __( 'Clear Log', 'kolorweb-log-manager' ), 489 'p1' => __( 'If file permissions allow, the debug.log file will be truncated. If that fails, the file will be deleted. If the file cannot be truncated or deleted, an error will be displayed.', 'kolorweb-log-manager' ), 490 'action_li_01' => __( 'In the sidebar, click on the clear icon under "actions".', 'kolorweb-log-manager' ), 480 491 ), 481 492 'downloadLog' => array( 482 'question' => __( 'How to download the log file?', 'k wlm' ),483 'title' => __( 'Download Log', 'k wlm' ),484 'p1' => __( 'When you click to download the log view, a smart log will be downloaded. The smart log contains a unique entry for each error with the latest timestamp. This helps make it much easier to review and can considerably reduce filesize.', 'k wlm' ),485 'action_li_01' => __( 'In the sidebar, click on the download icon under "actions".', 'k wlm' ),493 'question' => __( 'How to download the log file?', 'kolorweb-log-manager' ), 494 'title' => __( 'Download Log', 'kolorweb-log-manager' ), 495 'p1' => __( 'When you click to download the log view, a smart log will be downloaded. The smart log contains a unique entry for each error with the latest timestamp. This helps make it much easier to review and can considerably reduce filesize.', 'kolorweb-log-manager' ), 496 'action_li_01' => __( 'In the sidebar, click on the download icon under "actions".', 'kolorweb-log-manager' ), 486 497 ), 487 498 … … 491 502 492 503 return $lang; 493 494 504 } 495 505 } -
kolorweb-log-manager/trunk/libs/class-settings.php
r2693368 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 … … 135 134 136 135 return empty( $settings ) ? false : $settings; 137 138 136 } 139 137 … … 202 200 203 201 return $new; 204 205 } 206 202 } 207 203 } -
kolorweb-log-manager/trunk/readme.txt
r3153225 r3173088 3 3 License: GPLv3 or later 4 4 License URI: http://www.gnu.org/licenses/gpl.html 5 Tags: debug, wp_debug, error log, log, debug tool, debugger, debugging, error, development, display errors, error logging, free debugging, plugin testing, react, react plugin, search log, sort errors, sort log, test, testing, widget error, wordpress error log, wp error, wp error log, wp log viewer5 Tags: wp log viewer, log, error, debug, error log 6 6 Requires at least: 3.9 7 Tested up to: 6. 6.28 Stable tag: 1.1. 47 Tested up to: 6.7 8 Stable tag: 1.1.5 9 9 10 10 Really one click enable/disable debugging, clear debug.log, search, sort, and filter errors. See new errors automatically without refreshing. … … 225 225 All notable changes will be tracked in this change log. 226 226 227 = 1.1.5 = 228 229 * Tested Up to WordPress 6.7 230 * Unload unnecessary CSS and JS in Customizer Preview Mode. 231 * Some readme.txt adjustments 232 * Plugin Check (PCP) test passed. 233 227 234 = 1.1.4 = 228 235 -
kolorweb-log-manager/trunk/uninstall.php
r2692326 r3173088 6 6 * @author Vincenzo Casu <vincenzo.casu@gmail.com> 7 7 * @link https://kolorweb.it 8 * @copyright MIT License9 8 */ 10 9 … … 15 14 16 15 if ( ! defined( 'KWLOGMANAGER_BASE' ) ) { 17 define( 'KWLOGMANAGER_BASE', dirname( __FILE__ ). '/' );16 define( 'KWLOGMANAGER_BASE', __DIR__ . '/' ); 18 17 } 19 18 … … 30 29 */ 31 30 function kw_log_manager_plugin_deactivate() { 32 33 31 $config = Config::get_instance(); 34 32 $config->disable_debugging(); 35 36 33 } 37 34 } … … 57 54 \delete_metadata( 'user', 0, $meta, '', true ); 58 55 } 59 60 $wpdb->query( 'DELETE FROM ' . $wpdb->options . ' WHERE option_name LIKE "%_kwlm_%"' ); 61 56 $wpdb->query( 'DELETE FROM ' . $wpdb->options . ' WHERE option_name LIKE "%_kwlm_%"' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching 62 57 } 63 58 }
Note: See TracChangeset
for help on using the changeset viewer.