Motore principale del plugin plugin-name.php e inserire il costruttore
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
class plugin-name { protected $loader; protected $plugin_name; protected $version; public function __construct() { if ( defined( 'SETTINGS_PAGE_VERSION' ) ) { $this->version = SETTINGS_PAGE_VERSION; } else { $this->version = '1.0.0'; } $this->plugin_name = 'plugin-name'; $this->load_dependencies(); $this->set_locale(); $this->define_admin_hooks(); $this->define_public_hooks(); } |