99 lines
2.9 KiB
PHP
99 lines
2.9 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace cooini\iniRepo;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* WP iniRepo
|
||
|
*
|
||
|
* WP iniRepo is a plugin that Wordpress hosts, agencies, etc can use to install their in house plugins.
|
||
|
*
|
||
|
* @link http://cooini.com
|
||
|
* @since 1.0.0
|
||
|
* @package Inirepo
|
||
|
*
|
||
|
* @wordpress-plugin
|
||
|
* Plugin Name: iniRepo
|
||
|
* Plugin URI: https://cooini.com/services/wordpress/plugins/inirepo
|
||
|
* Description: Plugin to ensure Wordpress agencies, hosts, etc have their in house plugins installed and updated
|
||
|
* Version: 1.0.0a1
|
||
|
* Author: Cooini, LLC
|
||
|
* Author URI: https://cooini.com/
|
||
|
* Text Domain: Inirepo
|
||
|
* Domain Path: /languages
|
||
|
*/
|
||
|
|
||
|
// If this file is called directly, abort.
|
||
|
if ( ! defined( 'WPINC' ) ) {
|
||
|
die;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Currently plugin version.
|
||
|
* Start at version 1.0.0 and use SemVer - https://semver.org
|
||
|
* Rename this for your plugin and update it as you release new versions.
|
||
|
*/
|
||
|
const INIREPO_VERSION = '1.0.0a1';
|
||
|
|
||
|
/**
|
||
|
* The code that runs during plugin activation.
|
||
|
* This action is documented in includes/class-inirepo-activator.php
|
||
|
*/
|
||
|
function activate_Inirepo() {
|
||
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-inirepo-activator.php';
|
||
|
Inirepo_Activator::activate();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* The code that runs during plugin deactivation.
|
||
|
* This action is documented in includes/class-Inirepo-deactivator.php
|
||
|
*/
|
||
|
function deactivate_Inirepo() {
|
||
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-inirepo-deactivator.php';
|
||
|
Inirepo_Deactivator::deactivate();
|
||
|
}
|
||
|
|
||
|
register_activation_hook( __FILE__, 'activate_Inirepo' );
|
||
|
register_deactivation_hook( __FILE__, 'deactivate_Inirepo' );
|
||
|
|
||
|
/**
|
||
|
* 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-inirepo.php';
|
||
|
|
||
|
/**
|
||
|
* 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_Inirepo() {
|
||
|
|
||
|
$plugin = new Inirepo();
|
||
|
$plugin->run();
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
function autoload($className)
|
||
|
{
|
||
|
if (strpos($className, "iniRepo"))
|
||
|
{
|
||
|
//Only worry about oru classes
|
||
|
$path_includes = __DIR__."/includes/".str_replace('\\', DIRECTORY_SEPARATOR, str_replace("cooini\\iniRepo\\","", $className)).".php";
|
||
|
$path_plugin = __DIR__."/".str_replace('\\', DIRECTORY_SEPARATOR, str_replace("cooini\\iniRepo\\","", $className)).".php";
|
||
|
if (file_exists($path_includes))
|
||
|
include_once($path_includes);
|
||
|
elseif (file_exists($path_plugin))
|
||
|
include_once $path_plugin;
|
||
|
}
|
||
|
} */
|
||
|
$loader = require_once "vendor/autoload.php";
|
||
|
$loader->addPsr4("cooini\\iniRepo\\", __DIR__."/");
|
||
|
$loader->register(true);
|
||
|
//spl_autoload_register('cooini\iniRepo\autoload');
|
||
|
run_Inirepo();
|