/** * Bootstrap. */ public static function init() { register_activation_hook(__FILE__, array('Plugin_Name_Bootstrap', 'activate_plugin_name')); register_deactivation_hook(__FILE__, array('Plugin_Name_Bootstrap', 'deactivate_plugin_name')); /** * The core plugin class that is used to define internationalization, * admin-specific hooks, and public-facing site hooks. */ require plugin_dir_path(__FILE__) . 'includes/class-plugin-name.php'; $plugin = new Plugin_Name(); $plugin->run(); }
/** * Begins execution of the plugin. * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * @since 1.0.0 */ function run_plugin_name() { $plugin = new Plugin_Name(); $plugin->run(); }
/** * Begins execution of the plugin. * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * @since 1.0.0 */ function run_plugin_name() { $plugin = new Plugin_Name(); // Main Plugin Class $plugin->run(); }