Fix camelCase naming and superglobal access issues

- Renamed methods to follow camelCase convention (initialize_hooks -> initializeHooks, enqueue_admin_assets -> enqueueAdminAssets)
- Renamed variables to follow camelCase convention (plugin_version -> pluginVersion)
- Replaced direct  superglobal access with filter_input() for better security
- Simplified commented-out code with a clear TODO comment
This commit is contained in:
2025-04-21 15:14:15 +01:00
parent ebdb172a14
commit 67c6c65611
3 changed files with 16 additions and 23 deletions

View File

@@ -29,11 +29,11 @@ class Plugin {
private $admin;
/**
* Plugin file
* Plugin file path
*
* @var string
*/
private $plugin_file;
private string $pluginFile;
/**
* Plugin version
@@ -48,8 +48,8 @@ class Plugin {
* @param string $plugin_file Main plugin file path.
* @param string $version Plugin version.
*/
public function __construct( $plugin_file, $version ) {
$this->plugin_file = $plugin_file;
public function __construct( string $pluginFile, string $version ) {
$this->pluginFile = $pluginFile;
$this->version = $version;
$this->core = new Core( $version );
$this->admin = new Admin( $this->core );