2021-03-02 03:09:34 +00:00
< ? php
2021-03-03 18:58:03 +00:00
/**
2021-04-26 11:46:30 +01:00
* The plugin bootstrap file .
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area . This file also includes all of the dependencies used by the plugin ,
* registers the activation and deactivation functions , and defines a function
* that starts the plugin .
2021-04-26 09:37:19 +01:00
*
2021-05-01 21:34:46 +01:00
* @ package footnotes
* @ since 1.0 . 0
2021-04-26 09:37:19 +01:00
*
* @ wordpress - plugin
2021-03-03 18:58:03 +00:00
* Plugin Name : footnotes
* Plugin URI : https :// wordpress . org / plugins / footnotes /
2021-04-23 16:27:39 +01:00
* Description : footnotes lets you easily add highly - customisable footnotes on your WordPress Pages and Posts .
2021-04-26 11:46:30 +01:00
* Version : 2.8 . 0 d
2021-04-26 09:37:19 +01:00
* Requires at least : 3.9
* Requires PHP : 7.0
2021-03-03 18:58:03 +00:00
* Author : Mark Cheret
2021-04-23 16:27:39 +01:00
* Author URI : https :// cheret . org / footnotes
2021-03-03 18:58:03 +00:00
* Text Domain : footnotes
* Domain Path : / languages
2021-04-26 09:37:19 +01:00
* License : GPL v3
* License URI : https :// www . gnu . org / licenses / gpl - 3.0 . html
2021-03-02 03:09:34 +00:00
*/
2021-04-26 09:39:41 +01:00
2021-05-01 21:34:46 +01:00
namespace footnotes ;
2021-04-26 11:46:30 +01:00
// If this file is called directly, abort.
if ( ! defined ( 'WPINC' ) ) {
die ;
}
2021-03-02 03:09:34 +00:00
/**
2021-05-01 19:22:41 +01:00
* The plugin version .
2021-04-29 20:57:30 +01:00
*
* @ link https :// github . com / markcheret / footnotes / wiki / Versioning Versioning Guide
*
2021-05-01 21:34:46 +01:00
* @ since 2.1 . 4
* @ todo Draw from envfile rather than hard - coding .
*
* @ global string PLUGIN_VERSION The version of this instance of the plugin .
2021-03-24 21:19:07 +00:00
*/
2021-04-27 08:47:50 +01:00
define ( 'PLUGIN_VERSION' , '2.8.0d' );
2021-03-02 03:09:34 +00:00
2021-03-13 22:21:26 +00:00
/**
2021-05-01 19:22:41 +01:00
* The environment that the plugin is configured for .
2021-03-13 22:21:26 +00:00
*
2021-05-01 19:22:41 +01:00
* This primarily affects whether minified or unminified CSS / JS files are
* requested .
2021-04-26 09:37:19 +01:00
*
2021-05-01 21:34:46 +01:00
* @ since 2.5 . 5
* @ todo Draw from envfile rather than hard - coding .
* @ todo Replace with string for > 2 environment options .
*
* @ global bool PRODUCTION_ENV Whether the plugin is running in production mode or not .
2021-04-15 16:52:59 +01:00
*/
2021-04-26 11:54:58 +01:00
define ( 'PRODUCTION_ENV' , false );
2021-04-15 16:52:59 +01:00
2021-03-02 03:09:34 +00:00
/**
2021-05-01 19:22:41 +01:00
* Handles the activation of the plugin .
2021-04-29 20:57:30 +01:00
*
2021-05-01 21:34:46 +01:00
* @ since 2.8 . 0
* @ see includes\Activator :: activate ()
2021-04-26 11:46:30 +01:00
*/
2021-05-02 11:56:48 +01:00
function activate_footnotes () : void {
2021-05-01 19:22:41 +01:00
/**
* Provides plugin activation functionality .
*/
2021-05-01 21:34:46 +01:00
require_once plugin_dir_path ( __FILE__ ) . 'includes/class-activator.php' ;
2021-05-01 19:22:41 +01:00
2021-05-01 21:34:46 +01:00
includes\Activator :: activate ();
2021-04-26 11:46:30 +01:00
}
/**
2021-05-01 19:22:41 +01:00
* Handles the deactivation of the plugin .
2021-04-29 20:57:30 +01:00
*
2021-05-01 21:34:46 +01:00
* @ since 2.8 . 0
* @ see includes\Deactivator :: deactivate ()
2021-03-02 03:09:34 +00:00
*/
2021-05-02 11:56:48 +01:00
function deactivate_footnotes () : void {
2021-05-01 19:22:41 +01:00
/**
* Provides plugin deactivation functionality .
*/
2021-05-01 21:34:46 +01:00
require_once plugin_dir_path ( __FILE__ ) . 'includes/class-deactivator.php' ;
2021-05-01 19:22:41 +01:00
2021-05-01 21:34:46 +01:00
includes\Deactivator :: deactivate ();
2021-04-26 11:46:30 +01:00
}
2021-03-02 03:09:34 +00:00
2021-05-02 19:19:22 +01:00
/*
* TODO : currently these throw an error :
* Uncaught TypeError : call_user_func_array () : Argument #1 ($function) must be
* a valid callback , function " deactivate_footnotes " not found or invalid
* function name in / srv / www / wordpress - one / public_html / wp - includes / class - wp - hook . php : 292
*/
//register_activation_hook( __FILE__, 'activate_footnotes' );
//register_deactivation_hook( __FILE__, 'deactivate_footnotes' );
2021-03-02 03:09:34 +00:00
2021-04-26 11:46:30 +01:00
/**
2021-05-01 19:22:41 +01:00
* The core plugin class that defines internationalization , admin - specific and
* public - facing site hooks and functionality .
2021-04-26 11:46:30 +01:00
*/
2021-05-01 21:34:46 +01:00
require_once plugin_dir_path ( __FILE__ ) . 'includes/class-core.php' ;
2021-04-26 11:46:30 +01:00
/**
* Begins execution of the plugin .
*
2021-05-01 19:22:41 +01:00
* Since everything within the plugin is registered via hooks , then kicking off
2021-04-29 20:57:30 +01:00
* the plugin from this point in the file does not affect the page life cycle .
2021-04-26 11:46:30 +01:00
*
2021-05-01 21:34:46 +01:00
* @ since 2.8 . 0
2021-04-26 11:46:30 +01:00
*/
2021-05-02 11:56:48 +01:00
function run_footnotes () : void {
2021-05-01 21:34:46 +01:00
/**
* The plugin core .
*
* @ global includes\Core $footnotes
*/
2021-04-26 11:46:30 +01:00
global $footnotes ;
2021-05-01 21:34:46 +01:00
$footnotes = new includes\Core ();
2021-04-26 11:46:30 +01:00
$footnotes -> run ();
}
run_footnotes ();