-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwpnextpreviouslink.php
86 lines (74 loc) · 2.98 KB
/
wpnextpreviouslink.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* @link https://codeboxr.com
* @since 1.0
* @package Wpnextpreviouslink
*
* @wordpress-plugin
* Plugin Name: CBX Next Previous Article
* Plugin URI: https://codeboxr.com/product/show-next-previous-article-for-wordpress
* Description: WordPress Next Previous Article/Link
* Version: 2.7.6
* Author: Codeboxr Team
* Author URI: https://codeboxr.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: wpnextpreviouslink
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
defined( 'WPNEXTPREVIOUSLINK_VERSION' ) or define( 'WPNEXTPREVIOUSLINK_VERSION', '2.7.6' );
defined( 'WPNEXTPREVIOUSLINK_PLUGIN_NAME' ) or define( 'WPNEXTPREVIOUSLINK_PLUGIN_NAME', 'wpnextpreviouslink' );
defined( 'WPNEXTPREVIOUSLINK_ROOT_PATH' ) or define( 'WPNEXTPREVIOUSLINK_ROOT_PATH', plugin_dir_path( __FILE__ ) );
defined( 'WPNEXTPREVIOUSLINK_ROOT_URL' ) or define( 'WPNEXTPREVIOUSLINK_ROOT_URL', plugin_dir_url( __FILE__ ) );
defined( 'WPNEXTPREVIOUSLINK_BASE_NAME' ) or define( 'WPNEXTPREVIOUSLINK_BASE_NAME', plugin_basename( __FILE__ ) );
// Include the main class
if ( ! class_exists( 'WPNextPreviousLink', false ) ) {
include_once WPNEXTPREVIOUSLINK_ROOT_PATH . 'includes/WPNextPreviousLink.php';
}
/**
* The code that runs during plugin activation.
* This action is documented in includes/WPNextPreviousLinkActivator.php
*/
function activate_wpnextpreviouslink() {
require_once plugin_dir_path( __FILE__ ) . 'includes/WPNextPreviousLinkActivator.php';
WPNextPreviousLinkActivator::activate();
}//end method activate_wpnextpreviouslink
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/WPNextPreviousLinkDeactivator.php
*/
function deactivate_wpnextpreviouslink() {
require_once plugin_dir_path( __FILE__ ) . 'includes/WPNextPreviousLinkDeactivator.php';
WPNextPreviousLinkDeactivator::deactivate();
}//end method
register_activation_hook( __FILE__, 'activate_wpnextpreviouslink' );
register_deactivation_hook( __FILE__, 'deactivate_wpnextpreviouslink' );
/**
* Manually init the plugin
*
* @return WPNextPreviouslink|null
*/
function wpnextpreviouslink_core() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
global $wpnextpreviouslink_core;
if ( ! isset( $wpnextpreviouslink_core ) ) {
$wpnextpreviouslink_core = run_wpnextpreviouslink_pro();
}
return $wpnextpreviouslink_core;
}//end method wpnextpreviouslink_core
/**
* 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.7.0
*/
function run_wpnextpreviouslink() {
return WPNextPreviouslink::instance();
}//end method run_wpnextpreviouslink
$GLOBALS['wpnextpreviouslink_core'] = run_wpnextpreviouslink();