PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / 1.4.0
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution v1.4.0
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / functions / config.php

config.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution 1.4.0, at src/functions/config.php

33 lines 744 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Global functions that provide access to the plugin configuration.
4 *
5 * @since 0.1.0
6 *
7 * @package SolidWP\Performance
8 */
9
10 use SolidWP\Performance\Config\Config;
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 /**
17 * Returns the config that is created from a set of defaults, site settings, and network settings.
18 *
19 * @since 0.1.0
20 *
21 * @param string $key The key to retrieve from the config in dot notation.
22 *
23 * @return mixed
24 */
25 function swpsp_config_get( string $key ) {
26 // In versions < 1.1.0, advanced-cache.php does not have the app.php require and fatal errors.
27 if ( ! function_exists( 'swpsp_plugin' ) ) {
28 require_once __DIR__ . '/app.php';
29 }
30
31 return swpsp_plugin()->container()->get( Config::class )->get( $key );
32 }
33