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
*
* @ author Mark Cheret
2021-04-26 11:46:30 +01:00
* @ since 1.0 . 0
* @ package footnotes
2021-04-26 09:37:19 +01:00
* @ copyright 2021 Mark Cheret ( email : mark @ cheret . de )
* @ license GPL - 3.0 - only
*
* @ 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-04-26 09:38:15 +01:00
declare ( strict_types = 1 );
2021-04-26 09:39:41 +01:00
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-04-26 11:46:30 +01:00
* Current plugin version .
2021-03-24 21:19:07 +00:00
*/
2021-04-26 11:54:58 +01:00
define ( 'C_STR_FOOTNOTES_VERSION' , '2.8.0d' );
2021-03-02 03:09:34 +00:00
2021-03-13 22:21:26 +00:00
/**
2021-04-15 16:52:59 +01:00
* Defines the current environment ( 'development' or 'production' ) .
2021-03-13 22:21:26 +00:00
*
2021-04-26 09:37:19 +01:00
* This primarily affects whether minified or unminified files are requested .
*
2021-04-15 16:52:59 +01:00
* @ since 2.5 . 5
*/
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-04-26 11:46:30 +01:00
* The code that runs during plugin activation .
* This action is documented in includes / class - plugin - name - activator . php
*/
function activate_footnotes () {
require_once plugin_dir_path ( __FILE__ ) . 'includes/class-footnotes-activator.php' ;
Footnotes_Activator :: activate ();
}
/**
* The code that runs during plugin deactivation .
* This action is documented in includes / class - plugin - name - deactivator . php
2021-03-02 03:09:34 +00:00
*/
2021-04-26 11:46:30 +01:00
function deactivate_plugin_name () {
require_once plugin_dir_path ( __FILE__ ) . 'includes/class-footnotes-deactivator.php' ;
Footnotes_Deactivator :: deactivate ();
}
2021-03-02 03:09:34 +00:00
2021-04-26 11:46:30 +01:00
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
/**
* 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-footnotes.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 2.8 . 0
*/
function run_footnotes () {
global $footnotes ;
$footnotes = new Footnotes ();
$footnotes -> run ();
2021-03-02 03:09:34 +00:00
2021-04-26 11:46:30 +01:00
// Add the links to the dashboard plugins page.
// TODO: Move this somewhere more appropriate.
2021-04-26 11:54:58 +01:00
add_filter ( 'plugin_action_links_footnotes/footnotes.php' , array ( 'Footnotes_Hooks' , 'get_plugin_links' ), 10 , 2 );
2021-04-26 11:46:30 +01:00
}
run_footnotes ();