robotstxt-manager/robotstxt-manager.php
2026-08-17 16:04:38 +00:00

71 lines
2.8 KiB
PHP

<?php
/**
* Plugin Name: Manager (by ROBOTSTXT)
* Plugin URI: https://git.robotstxt.es/ROBOTSTXT/robotstxt-manager
* Description: Client-side dashboard for the ROBOTSTXT plugin ecosystem. Lists the catalog from a remote Plugins Core install, resolves local install/update state, and installs, activates, and updates plugins directly from the store.
* Version: 1.2.1
* Requires at least: 4.4
* Requires PHP: 8.0
* Author: ROBOTSTXT
* Author URI: https://www.robotstxt.es/
* License: GPL-3.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: robotstxt-manager
* Domain Path: /languages
*
* @package Robotstxt_Manager
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** Plugin version. */
define( 'ROBOTSTXT_MANAGER_VERSION', '1.2.1' );
/** Absolute path to the plugin directory, with trailing slash. */
define( 'ROBOTSTXT_MANAGER_DIR', plugin_dir_path( __FILE__ ) );
/** URL to the plugin directory, with trailing slash. */
define( 'ROBOTSTXT_MANAGER_URL', plugin_dir_url( __FILE__ ) );
/** Plugin basename. */
define( 'ROBOTSTXT_MANAGER_BASENAME', plugin_basename( __FILE__ ) );
// Load Composer autoloader, with a manual fallback for environments where
// composer install has not been run.
if ( file_exists( ROBOTSTXT_MANAGER_DIR . 'vendor/autoload.php' ) ) {
require_once ROBOTSTXT_MANAGER_DIR . 'vendor/autoload.php';
} else {
require_once ROBOTSTXT_MANAGER_DIR . 'includes/class-robotstxt-manager-loader.php';
require_once ROBOTSTXT_MANAGER_DIR . 'includes/class-robotstxt-manager-encryption.php';
require_once ROBOTSTXT_MANAGER_DIR . 'includes/class-robotstxt-manager-core-client.php';
require_once ROBOTSTXT_MANAGER_DIR . 'includes/class-robotstxt-manager-activator.php';
require_once ROBOTSTXT_MANAGER_DIR . 'includes/class-robotstxt-manager-plugin.php';
require_once ROBOTSTXT_MANAGER_DIR . 'includes/class-robotstxt-manager-updater.php';
require_once ROBOTSTXT_MANAGER_DIR . 'admin/class-robotstxt-manager-admin.php';
require_once ROBOTSTXT_MANAGER_DIR . 'admin/class-robotstxt-manager-settings.php';
require_once ROBOTSTXT_MANAGER_DIR . 'admin/class-robotstxt-manager-installer.php';
}
register_activation_hook( __FILE__, array( 'Robotstxt_Manager_Activator', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Robotstxt_Manager_Activator', 'deactivate' ) );
/**
* Returns the main plugin instance, creating it on the first call.
*
* @return Robotstxt_Manager_Plugin
*/
function robotstxt_manager(): Robotstxt_Manager_Plugin {
return Robotstxt_Manager_Plugin::get_instance();
}
/**
* Bootstraps the plugin after all other plugins have been loaded.
*
* @return void
*/
function robotstxt_manager_boot(): void {
robotstxt_manager()->run();
}
add_action( 'plugins_loaded', 'robotstxt_manager_boot' );