- Added proper type declarations to all properties and methods - Fixed inconsistent variable naming (camelCase to snake_case) - Improved path handling in admin class - Added textdomain loading functionality - Removed unused phpcs:ignore comment - Implemented proper return type declarations
51 lines
933 B
PHP
51 lines
933 B
PHP
<?php
|
|
/**
|
|
* Core functionality for the plugin
|
|
*
|
|
* @package WPALLSTARS\PluginStarterTemplate
|
|
*/
|
|
|
|
namespace WPALLSTARS\PluginStarterTemplate;
|
|
|
|
/**
|
|
* Core class
|
|
*/
|
|
class Core {
|
|
|
|
/**
|
|
* Plugin version
|
|
*
|
|
* @var string
|
|
*/
|
|
private string $version;
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param string $version Plugin version.
|
|
*/
|
|
public function __construct( string $version = '' ) {
|
|
// Initialize hooks.
|
|
$this->version = $version;
|
|
}
|
|
|
|
/**
|
|
* Example method to filter content
|
|
*
|
|
* @param string $content The content to filter.
|
|
* @return string The filtered content.
|
|
*/
|
|
public function filter_content( string $content ): string {
|
|
return $content;
|
|
}
|
|
|
|
/**
|
|
* Get the plugin version
|
|
*
|
|
* @return string The plugin version.
|
|
*/
|
|
public function get_plugin_version(): string {
|
|
return $this->version;
|
|
}
|
|
}
|