v0.1.0
This commit is contained in:
commit
bc1cb5e00a
32 changed files with 4254 additions and 0 deletions
69
robotstxt-manager.php
Normal file
69
robotstxt-manager.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?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 surfaces subscription health. Phase 1: read-only catalog view.
|
||||
* Version: 0.1.0
|
||||
* Requires at least: 7.0
|
||||
* Requires PHP: 8.4
|
||||
* 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', '0.1.0' );
|
||||
|
||||
/** 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 . 'admin/class-robotstxt-manager-admin.php';
|
||||
require_once ROBOTSTXT_MANAGER_DIR . 'admin/class-robotstxt-manager-settings.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' );
|
||||
Loading…
Reference in a new issue