PluginProbe
SQLite Object Cache / 1.6.0
SQLite Object Cache v1.6.0
1.6.5 trunk 0.1.7 1.0.0 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.4.0 1.4.1 1.5.1 1.5.4 1.5.5 1.5.6 1.5.7 All 30 releases
← All changes | sqlite-object-cache.php +21 -13 1.3.11.6.0 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: SQLite Object Cache
4 - * Version: 1.3.1
4 + * Version: 1.6.0
5 5 * Plugin URI: https://github.com/OllieJones/sqlite-object-cache
6 6 * Description: A persistent object cache backend powered by SQLite3.
7 7 * Author: Oliver Jones
8 8 * Author URI: https://github.com/OllieJones/
@@ -7,9 +7,9 @@
7 7 * Author: Oliver Jones
8 8 * Author URI: https://github.com/OllieJones/
9 9 * Requires at least: 5.5
10 10 * Requires PHP: 5.6
11 - * Tested up to: 6.2
11 + * Tested up to: 6.9
12 12 *
13 13 * Text Domain: sqlite-object-cache
14 14 * Domain Path: /languages/
15 15 *
@@ -18,18 +18,26 @@
18 18 * @since 0.1.0
19 19 */
20 20
21 21 if ( ! defined( 'ABSPATH' ) ) {
22 - exit;
22 + exit;
23 23 }
24 24
25 25 require_once 'includes/class-sqlite-object-cache.php';
26 -if ( is_admin() ) {
27 - require_once 'includes/class-sqlite-object-cache-settings.php';
28 - require_once 'includes/lib/class-sqlite-object-cache-admin-api.php';
29 - require_once 'includes/lib/class-sqlite-object-cache-statistics.php';
30 - require_once 'includes/lib/class-sqlite-backup-exclusion.php';
26 +/* wp-cli interface activation */
27 +$is_cli = false;
28 +if ( defined( 'WP_CLI' ) && WP_CLI ) {
29 + $is_cli = true;
30 + require_once( plugin_dir_path( __FILE__ ) . 'includes/cli.php' );
31 31 }
32 +
33 +if ( is_admin() || $is_cli) {
34 + require_once 'includes/class-sqlite-object-cache-settings.php';
35 + require_once 'includes/lib/class-sqlite-object-cache-admin-api.php';
36 + require_once 'includes/lib/class-sqlite-object-cache-statistics.php';
37 + require_once 'includes/lib/class-sqlite-backup-exclusion.php';
38 + require_once 'includes/lib/class-file.php';
39 +}
32 40 /**
33 41 * Returns the main instance of SQLite_Object_Cache to prevent the need to use globals.
34 42 *
35 43 * @return object SQLite_Object_Cache
@@ -35,14 +43,14 @@
35 43 * @return object SQLite_Object_Cache
36 44 * @since 1.0.0
37 45 */
38 46 function sqlite_object_cache() {
39 - $instance = new SQLite_Object_Cache( __FILE__, '1.3.1' );
47 + $instance = new SQLite_Object_Cache( __FILE__, '1.6.0' );
40 48
41 - if ( is_admin() ) {
42 - $instance->settings = new SQLite_Object_Cache_Settings( $instance );
43 - }
49 + if ( is_admin() ) {
50 + $instance->settings = new SQLite_Object_Cache_Settings( $instance, plugin_basename( __FILE__ ));
51 + }
44 52
45 - return $instance;
53 + return $instance;
46 54 }
47 55
48 56 sqlite_object_cache();