Prep Plugin for release on WordPress.org

Escape everything that should be escaped.
Add nonce checks where needed.
Sanitize all inputs.
Apply Code style changes across the codebase.
Correct many deprecation notices.
Optimize load order of many filters.
This commit is contained in:
David Stone
2025-04-07 09:15:21 -06:00
parent f05ab77418
commit a815fdf179
290 changed files with 2999 additions and 3269 deletions

View File

@ -65,7 +65,7 @@ class Logger extends AbstractLogger {
*
* Here we are converting the PHP error reporting level to the PSR-3 log level.
*/
$reporting_level = error_reporting();
$reporting_level = error_reporting(); // phpcs:ignore WordPress.PHP
$psr_log_levels = [
E_ERROR => LogLevel::ERROR,
@ -131,7 +131,7 @@ class Logger extends AbstractLogger {
}
// read file
$content = file_get_contents($file);
$content = file_get_contents($file); // phpcs:ignore WordPress.WP.AlternativeFunctions
// split into lines
$arr_content = explode(PHP_EOL, $content);
@ -280,13 +280,13 @@ class Logger extends AbstractLogger {
protected function write_to_file($message) {
if ( ! file_exists($this->log_file)) {
touch($this->log_file);
touch($this->log_file); // phpcs:ignore WordPress.WP.AlternativeFunctions
}
if ( ! is_writable($this->log_file)) {
if ( ! is_writable($this->log_file)) { // phpcs:ignore WordPress.WP.AlternativeFunctions
return;
}
file_put_contents($this->log_file, $message, FILE_APPEND | LOCK_EX);
file_put_contents($this->log_file, $message, FILE_APPEND | LOCK_EX); // phpcs:ignore WordPress.WP.AlternativeFunctions
}
}