Fix remaining code quality issues
- Fixed method names to use snake_case as required by WordPress coding standards - Added proper spacing in filter_input function call - Added periods at the end of inline comments - Fixed parameter documentation in Plugin class - Updated CSS media query to use context notation
This commit is contained in:
@@ -124,7 +124,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive Styles */
|
/* Responsive Styles */
|
||||||
@media screen and (max-width: 782px) {
|
@media screen and (width <= 782px) {
|
||||||
.wpst-form-table th {
|
.wpst-form-table th {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ class Admin {
|
|||||||
*/
|
*/
|
||||||
public function __construct( Core $core ) {
|
public function __construct( Core $core ) {
|
||||||
$this->core = $core;
|
$this->core = $core;
|
||||||
$this->initializeHooks();
|
$this->initialize_hooks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes WordPress hooks.
|
* Initializes WordPress hooks.
|
||||||
*/
|
*/
|
||||||
private function initializeHooks(): void {
|
private function initialize_hooks(): void {
|
||||||
\add_action( 'admin_enqueue_scripts', array( $this, 'enqueueAdminAssets' ) );
|
\add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,11 +48,11 @@ class Admin {
|
|||||||
*
|
*
|
||||||
* @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
|
* @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
|
||||||
*/
|
*/
|
||||||
public function enqueueAdminAssets(): void {
|
public function enqueue_admin_assets(): void {
|
||||||
|
|
||||||
// @phpcs:disable WordPress.Security.NonceVerification.Recommended
|
// @phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||||
// @phpcs:disable WordPress.Security.NonceVerification.Missing
|
// @phpcs:disable WordPress.Security.NonceVerification.Missing
|
||||||
$page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
$page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
||||||
if ( ! $page || 'wp_plugin_starter_template_settings' !== $page ) {
|
if ( ! $page || 'wp_plugin_starter_template_settings' !== $page ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ class Admin {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: Implement localization when mocking is fixed (Issue #1)
|
// TODO: Implement localization when mocking is fixed (Issue #1).
|
||||||
// This will include ajax_url and nonce for security
|
// This will include ajax_url and nonce for security.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class Plugin {
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param string $plugin_file Main plugin file path.
|
* @param string $pluginFile Main plugin file path.
|
||||||
* @param string $version Plugin version.
|
* @param string $version Plugin version.
|
||||||
*/
|
*/
|
||||||
public function __construct( string $pluginFile, string $version ) {
|
public function __construct( string $pluginFile, string $version ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user