-
Notifications
You must be signed in to change notification settings - Fork 1
/
where-did-they-go-from-here.php
120 lines (108 loc) · 2.97 KB
/
where-did-they-go-from-here.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
/**
* WebberZone Followed Posts.
*
* Display a list of posts that are visited from the custom post.
*
* @package WebberZone\WFP
* @author Ajay D'Souza
* @license GPL-2.0+
* @link https://webberzone.com
* @copyright 2008-2023 Ajay D'Souza
*
* @wordpress-plugin
* Plugin Name: WebberZone Followed Posts
* Plugin URI: https://webberzone.com/plugins/webberzone-followed-posts/
* Description: The best way to display posts followed by users a.k.a. "Readers who viewed this page, also viewed" links
* Version: 3.1.0
* Author: Ajay D'Souza
* Author URI: https://webberzone.com
* License: GPL-2.0+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: where-did-they-go-from-here
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/WebberZone/where-did-they-go-from-here/
*/
namespace WebberZone\WFP;
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Plugin Version
*
* @since 3.0.0
*/
if ( ! defined( 'WFP_VERSION' ) ) {
define( 'WFP_VERSION', '3.1.0' );
}
/**
* Holds the filesystem directory path (with trailing slash) for WebberZone Followed Posts.
*
* @since 2.0.0
*/
if ( ! defined( 'WHEREGO_PLUGIN_FILE' ) ) {
define( 'WHEREGO_PLUGIN_FILE', __FILE__ );
}
/**
* Holds the filesystem directory path (with trailing slash) for WebberZone Followed Posts.
*
* @since 2.0.0
*/
if ( ! defined( 'WHEREGO_PLUGIN_DIR' ) ) {
define( 'WHEREGO_PLUGIN_DIR', plugin_dir_path( WHEREGO_PLUGIN_FILE ) );
}
/**
* Holds the filesystem directory path (with trailing slash) for WebberZone Followed Posts.
*
* @since 2.0.0
*/
if ( ! defined( 'WHEREGO_PLUGIN_URL' ) ) {
define( 'WHEREGO_PLUGIN_URL', plugin_dir_url( WHEREGO_PLUGIN_FILE ) );
}
/**
* Cache expiration time.
*
* @since 3.0.0
*/
if ( ! defined( 'WFP_CACHE_TIME' ) ) {
define( 'WFP_CACHE_TIME', WEEK_IN_SECONDS );
}
// Load the autoloder.
require_once WHEREGO_PLUGIN_DIR . 'includes/autoloader.php';
/**
* The code that runs during plugin activation.
*
* @since 3.1.0
*
* @param bool $network_wide Whether the plugin is being activated network-wide.
*/
function activate_wfp( $network_wide ) {
\WebberZone\WFP\Admin\Activator::activation_hook( $network_wide );
}
register_activation_hook( __FILE__, __NAMESPACE__ . '\activate_wfp' );
/**
* The main function responsible for returning the one true WebberZone Snippetz instance to functions everywhere.
*
* @since 3.1.0
*/
function load_wfp() {
\WebberZone\WFP\Main::get_instance();
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wfp' );
/*
*----------------------------------------------------------------------------
* Include files
*----------------------------------------------------------------------------
*/
require_once WHEREGO_PLUGIN_DIR . 'includes/options-api.php';
require_once WHEREGO_PLUGIN_DIR . 'includes/functions.php';
/**
* Plugin settings.
*
* @since 1.6
*
* @var string
*/
global $wherego_settings;
$wherego_settings = wherego_get_settings();