-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheacObjectCache.php
More file actions
executable file
·84 lines (79 loc) · 2.4 KB
/
eacObjectCache.php
File metadata and controls
executable file
·84 lines (79 loc) · 2.4 KB
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
<?php
namespace EarthAsylumConsulting;
/**
* {eac}ObjectCache - a light-weight and efficient persistent object cache using APCu & SQLite to cache WordPress objects.
*
* @category WordPress Plugin
* @package {eac}ObjectCache\{eac}Doojigger Extensions
* @author Kevin Burkholder <KBurkholder@EarthAsylum.com>
* @copyright Copyright (c) 2025 EarthAsylum Consulting <www.earthasylum.com>
* @link https://eacDoojigger.earthasylum.com/
*
* @wordpress-plugin
* Plugin Name: {eac}ObjectCache
* Description: {eac}ObjectCache - a light-weight and efficient persistent object cache using APCu & SQLite to cache WordPress objects.
* Version: 2.1.2
* Requires at least: 5.8
* Tested up to: 6.8
* Requires PHP: 8.1
* Plugin URI: https://eacdoojigger.earthasylum.com/eacobjectcache/
* Author: EarthAsylum Consulting
* Author URI: http://www.earthasylum.com
* License: GPLv3 or later
* License URI: https://www.gnu.org/licenses/gpl.html
*/
if (!defined('EACDOOJIGGER_VERSION'))
{
/*
* Detached installer. Installs object-cache.php to /wp-content.
*/
include 'detached-install.php';
return;
}
class eacObjectCache
{
/**
* constructor method
*
* @return void
*/
public function __construct()
{
/**
* {pluginname}_load_extensions - get the extensions directory to load
*
* @param array $extensionDirectories - array of [plugin_slug => plugin_directory]
* @return array updated $extensionDirectories
*/
add_filter( 'eacDoojigger_load_extensions', function($extensionDirectories)
{
/*
* Enable update notice (self hosted or wp hosted)
*/
eacDoojigger::loadPluginUpdater(__FILE__,'wp');
/*
* Add links on plugins page
*/
add_filter( (is_network_admin() ? 'network_admin_' : '').'plugin_action_links_' . plugin_basename( __FILE__ ),
function($pluginLinks, $pluginFile, $pluginData) {
return array_merge(
[
'settings' => eacDoojigger::getSettingsLink($pluginData,'object-cache'),
'documentation' => eacDoojigger::getDocumentationLink($pluginData),
'support' => eacDoojigger::getSupportLink($pluginData),
],
$pluginLinks
);
},20,3
);
/*
* Add our extension to load
*/
$extensionDirectories[ plugin_basename( __FILE__ ) ] = [plugin_dir_path( __FILE__ )];
return $extensionDirectories;
}
);
}
}
new \EarthAsylumConsulting\eacObjectCache();
?>