From 22968431bef58968dd0fce883371de5d12aaa783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Avic=20Simmons?= Date: Tue, 8 Sep 2026 04:14:24 -0400 Subject: [PATCH] docs: fix 13 typos in code comments and docblocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spelling and grammar corrections in PHP comments and docblocks only. No identifiers, translation strings or behaviour are changed. Deliberately left unchanged, because renaming them would be a breaking API change: - module::loadDependancies() (src/module.php) - field::$santizer_callback (src/settings/field.php) - only the comment above it is corrected Seven of these were reported by an automated scan; six more of the same kind were found alongside them (owa-plugin.php: 'ot' -> 'to', 'Singelton', 'uneeded', 'Trackes'; settings/page.php: 'boollean', "doesn't allows"). Signed-off-by: Léon Avic Simmons --- owa-plugin.php | 8 ++++---- src/module.php | 12 ++++++------ src/settings/field.php | 2 +- src/settings/page.php | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/owa-plugin.php b/owa-plugin.php index 8b5ff14..95f4050 100644 --- a/owa-plugin.php +++ b/owa-plugin.php @@ -80,7 +80,7 @@ function __construct() { // needed??? ob_start(); - // bail if this isn't a request type that OWA needs ot be loaded on. + // bail if this isn't a request type that OWA needs to be loaded on. if ( ! $this->isProperWordPressRequest() ) { return; @@ -125,7 +125,7 @@ private function isProperWordPressRequest() { } /** - * Singelton + * Singleton */ static function getInstance() { @@ -178,7 +178,7 @@ function _init() { // Create a new tracked site in OWA add_action('wpmu_new_blog', array($this, 'createTrackedSiteForNewBlog'), 10, 6); - // remove this if uneeded + // remove this if unneeded if ( ! $this->isOwaReadyToTrack() ) { $this->adminMsgs[] = ['message' => 'Open Web Analytics requires that you select a Site ID before tracking can begin.', 'class' => 'notice-warning']; @@ -711,7 +711,7 @@ function trackedPostEditAction( $post_id, $post ) { /** * Post Action Tracker * - * Trackes new and edited post actions. Including custom post types. + * Tracks new and edited post actions. Including custom post types. */ function trackPostAction( $new_status, $old_status, $post ) { diff --git a/src/module.php b/src/module.php index 81d08f8..023bcaf 100644 --- a/src/module.php +++ b/src/module.php @@ -78,7 +78,7 @@ public function init() { } /** - * Inititalizes Settings Page Objects + * Initializes Settings Page Objects * */ public function initSettingsPage() { @@ -196,12 +196,12 @@ public function processAdminConfig() { // hook settings fields into WordPress if ( $this->settings ) { - // we need ot init the settings page objects here - // as they are needed by two the callbacks to seperate WordPress Hooks admin_init and admin_menu. + // we need to init the settings page objects here + // as they are needed by the two callbacks to separate WordPress Hooks admin_init and admin_menu. //$this->initSettingsPage(); add_action( 'admin_init', array($this, 'registerSettings'),10,0); - // regsiter the settings pages with WordPress + // register the settings pages with WordPress add_action( 'admin_menu', array($this, 'addSettingsPages'), 11,0); } @@ -221,11 +221,11 @@ public function registerSettings() { //add_action( 'admin_menu', array($this, 'addSettingsPages'), 10, 0 ); - // iterate throught group of settings fields. + // iterate through group of settings fields. foreach ( $this->settings as $group_name => $group ) { - // iterate throug thhe fields in the group + // iterate through the fields in the group foreach ( $group as $k => $v ) { // register each field with WordPress diff --git a/src/settings/field.php b/src/settings/field.php index 5fb82cb..f0f3e30 100644 --- a/src/settings/field.php +++ b/src/settings/field.php @@ -24,7 +24,7 @@ class field { public $validator_callback; // - // name of the santizer callback to be used + // name of the sanitizer callback to be used // public $santizer_callback; diff --git a/src/settings/page.php b/src/settings/page.php index 8bc734e..0956ce3 100644 --- a/src/settings/page.php +++ b/src/settings/page.php @@ -142,7 +142,7 @@ public function validateAndSanitize( $options ) { } else { - // set a false value in case it's a boollean type + // set a false value in case it's a boolean type $sanitized[ $k ] = $f->setFalseValue(); } } @@ -304,7 +304,7 @@ public function renderPage() { // Outputs Settings Sections and Fields // // Sadly this is a replacement for WP's do_settings_sections template function - // because it doesn't allows for filtered output which we need for adding tabs. + // because it doesn't allow for filtered output which we need for adding tabs. // // var $page string name of the settings page. //