mirror of
https://gh.wpcy.net/https://github.com/WP-Autoplugin/hub2wp.git
synced 2026-04-28 20:22:36 +08:00
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: hub2wp
|
|
* Description: Browse, install, and update WordPress plugins directly from GitHub repositories.
|
|
* Version: 1.5.2
|
|
* Author: Balázs Piller
|
|
* Text Domain: hub2wp
|
|
* Domain Path: /languages
|
|
* Requires at least: 5.8
|
|
* Requires PHP: 5.7
|
|
* License: GPL2
|
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit; // Exit if accessed directly.
|
|
}
|
|
|
|
define( 'H2WP_VERSION', '1.5.2' );
|
|
define( 'H2WP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
|
define( 'H2WP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
|
define( 'H2WP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
|
define( 'H2WP_RESULTS_PER_PAGE', 12 );
|
|
|
|
// Include autoload.
|
|
require_once H2WP_PLUGIN_DIR . 'vendor/autoload.php';
|
|
|
|
// Activation hook.
|
|
register_activation_hook( __FILE__, array( 'H2WP_Plugin_Updater', 'activate' ) );
|
|
|
|
// Deactivation hook.
|
|
register_deactivation_hook( __FILE__, array( 'H2WP_Plugin_Updater', 'deactivate' ) );
|
|
|
|
// Initialize settings.
|
|
H2WP_Settings::init();
|
|
|
|
// Initialize admin page.
|
|
H2WP_Admin_Page::init();
|
|
|
|
// Handle plugin updates.
|
|
H2WP_Plugin_Updater::init();
|
|
|
|
// Initialize AJAX handler.
|
|
new H2WP_Admin_Ajax();
|
|
|
|
// Register WP-CLI commands.
|
|
H2WP_CLI_Command::init();
|
|
|
|
// Register Abilities API integration when available.
|
|
H2WP_Abilities::init();
|