| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* The plugin bootstrap file |
| 5 |
* |
| 6 |
* This file is read by WordPress to generate the plugin information in the plugin |
| 7 |
* admin area. This file also includes all of the dependencies used by the plugin, |
| 8 |
* registers the activation and deactivation functions, and defines a function |
| 9 |
* that starts the plugin. |
| 10 |
* |
| 11 |
* @link http://ownerrez.com |
| 12 |
* @since 1.0.0 |
| 13 |
* @package OwnerRez |
| 14 |
* |
| 15 |
* @wordpress-plugin |
| 16 |
* Plugin Name: OwnerRez |
| 17 |
* Plugin URI: https://www.ownerrez.com/support/wordpress |
| 18 |
* Description: The official WordPress plugin for the OwnerRez API. |
| 19 |
* Version: 1.2.4 |
| 20 |
* Author: OwnerRez, Inc. |
| 21 |
* Author URI: https://www.ownerrez.com/ |
| 22 |
* License: MIT |
| 23 |
* License URI: https://github.com/ownerrez/orez-wp/blob/master/LICENSE |
| 24 |
* Text Domain: ownerrez |
| 25 |
* Domain Path: /languages |
| 26 |
*/ |
| 27 |
|
| 28 |
// If this file is called directly, abort. |
| 29 |
if (!defined('WPINC')) { |
| 30 |
die; |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Currently plugin version. |
| 35 |
* Start at version 1.0.0 and use SemVer - https://semver.org |
| 36 |
* Rename this for your plugin and update it as you release new versions. |
| 37 |
*/ |
| 38 |
define('OWNERREZ_VERSION', '1.2.4'); |
| 39 |
|
| 40 |
/** |
| 41 |
* The code that runs during plugin activation. |
| 42 |
* This action is documented in includes/class-ownerrez-activator.php |
| 43 |
*/ |
| 44 |
function activate_ownerrez() |
| 45 |
{ |
| 46 |
require_once plugin_dir_path(__FILE__) . 'includes/class-ownerrez-activator.php'; |
| 47 |
OwnerRez_Activator::activate(); |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* The code that runs AFTER plugin activation. |
| 52 |
* This action is documented in includes/class-ownerrez-activator.php |
| 53 |
*/ |
| 54 |
function activated_ownerrez($plugin) |
| 55 |
{ |
| 56 |
require_once plugin_dir_path(__FILE__) . 'includes/class-ownerrez-activator.php'; |
| 57 |
OwnerRez_Activator::activated(); |
| 58 |
} |
| 59 |
|
| 60 |
/** |
| 61 |
* The code that runs during plugin deactivation. |
| 62 |
* This action is documented in includes/class-ownerrez-deactivator.php |
| 63 |
*/ |
| 64 |
function deactivate_ownerrez() |
| 65 |
{ |
| 66 |
require_once plugin_dir_path(__FILE__) . 'includes/class-ownerrez-deactivator.php'; |
| 67 |
OwnerRez_Deactivator::deactivate(); |
| 68 |
} |
| 69 |
|
| 70 |
register_activation_hook(__FILE__, 'activate_ownerrez'); |
| 71 |
register_deactivation_hook(__FILE__, 'deactivate_ownerrez'); |
| 72 |
|
| 73 |
add_action("activated_plugin", "activated_ownerrez"); |
| 74 |
|
| 75 |
/** |
| 76 |
* The core plugin class that is used to define internationalization, |
| 77 |
* admin-specific hooks, and public-facing site hooks. |
| 78 |
*/ |
| 79 |
require plugin_dir_path(__FILE__) . 'includes/class-ownerrez.php'; |
| 80 |
|
| 81 |
/** |
| 82 |
* Begins execution of the plugin. |
| 83 |
* |
| 84 |
* Since everything within the plugin is registered via hooks, |
| 85 |
* then kicking off the plugin from this point in the file does |
| 86 |
* not affect the page life cycle. |
| 87 |
* |
| 88 |
* @since 1.0.0 |
| 89 |
*/ |
| 90 |
function run_ownerrez() |
| 91 |
{ |
| 92 |
if ( is_readable( plugin_dir_path(__FILE__) . 'lib/autoload.php' ) ) { |
| 93 |
require plugin_dir_path(__FILE__) . 'lib/autoload.php'; |
| 94 |
} |
| 95 |
|
| 96 |
$plugin = new OwnerRez(); |
| 97 |
$plugin->run(); |
| 98 |
} |
| 99 |
run_ownerrez(); |
| 100 |
|