| 1 |
<?php |
| 2 |
/** |
| 3 |
* The plugin bootstrap file |
| 4 |
* |
| 5 |
* This file is read by WordPress to generate the plugin information in the plugin |
| 6 |
* admin area. This file also includes all of the dependencies used by the plugin, |
| 7 |
* registers the activation and deactivation functions, and defines a function |
| 8 |
* that starts the plugin. |
| 9 |
* |
| 10 |
* @link https://www.enweby.com/ |
| 11 |
* @since 1.0.0 |
| 12 |
* @package Fullscreen_Background |
| 13 |
* |
| 14 |
* @wordpress-plugin |
| 15 |
* Plugin Name: Fullscreen Background |
| 16 |
* Plugin URI: https://www.enweby.com/shop/wordpress-plugins/full-screen-background/ |
| 17 |
* Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. |
| 18 |
* Version: 1.0.0 |
| 19 |
* Author: Enweby |
| 20 |
* Author URI: https://www.enweby.com/ |
| 21 |
* License: GPL-2.0+ |
| 22 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 23 |
* Text Domain: fullscreen-background |
| 24 |
* Domain Path: /languages |
| 25 |
*/ |
| 26 |
|
| 27 |
// If this file is called directly, abort. |
| 28 |
if ( ! defined( 'WPINC' ) ) { |
| 29 |
die; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Currently plugin version. |
| 34 |
* Start at version 1.0.0 and use SemVer - https://semver.org |
| 35 |
* Rename this for your plugin and update it as you release new versions. |
| 36 |
*/ |
| 37 |
define( 'FULLSCREEN_BACKGROUND_VERSION', '1.0.0' ); |
| 38 |
|
| 39 |
/** |
| 40 |
* Plugin base name. |
| 41 |
* used to locate plugin resources primarily code files |
| 42 |
* Start at version 1.0.0 |
| 43 |
*/ |
| 44 |
define( 'FULLSCREEN_BACKGROUND_BASE_NAME', plugin_basename( __FILE__ ) ); |
| 45 |
|
| 46 |
/** |
| 47 |
* Plugin base dir path. |
| 48 |
* used to locate plugin resources primarily code files |
| 49 |
* Start at version 1.0.0 |
| 50 |
*/ |
| 51 |
defined( 'FULLSCREEN_BACKGROUND_DIR' ) || define( 'FULLSCREEN_BACKGROUND_DIR', plugin_dir_path( __FILE__ ) ); |
| 52 |
|
| 53 |
/** |
| 54 |
* The code that runs during plugin activation. |
| 55 |
* This action is documented in includes/class-fullscreen-background-activator.php |
| 56 |
*/ |
| 57 |
function activate_fullscreen_background() { |
| 58 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-fullscreen-background-activator.php'; |
| 59 |
Fullscreen_Background_Activator::activate(); |
| 60 |
} |
| 61 |
|
| 62 |
/** |
| 63 |
* The code that runs during plugin deactivation. |
| 64 |
* This action is documented in includes/class-fullscreen-background-deactivator.php |
| 65 |
*/ |
| 66 |
function deactivate_fullscreen_background() { |
| 67 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-fullscreen-background-deactivator.php'; |
| 68 |
Fullscreen_Background_Deactivator::deactivate(); |
| 69 |
} |
| 70 |
|
| 71 |
register_activation_hook( __FILE__, 'activate_fullscreen_background' ); |
| 72 |
register_deactivation_hook( __FILE__, 'deactivate_fullscreen_background' ); |
| 73 |
|
| 74 |
/** |
| 75 |
* The core plugin class that is used to define internationalization, |
| 76 |
* admin-specific hooks, and public-facing site hooks. |
| 77 |
*/ |
| 78 |
require plugin_dir_path( __FILE__ ) . 'includes/class-fullscreen-background.php'; |
| 79 |
|
| 80 |
/** |
| 81 |
* Begins execution of the plugin. |
| 82 |
* |
| 83 |
* Since everything within the plugin is registered via hooks, |
| 84 |
* then kicking off the plugin from this point in the file does |
| 85 |
* not affect the page life cycle. |
| 86 |
* |
| 87 |
* @since 1.0.0 |
| 88 |
*/ |
| 89 |
function run_fullscreen_background() { |
| 90 |
|
| 91 |
$plugin = new Fullscreen_Background(); |
| 92 |
$plugin->run(); |
| 93 |
|
| 94 |
} |
| 95 |
run_fullscreen_background(); |
| 96 |
|