Skip to content

Commit d9e6c92

Browse files
committed
Renamed back to
1 parent c7eeadc commit d9e6c92

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

core/Helpers/StringHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function get_const( $const, $filter_validate = null ) {
4444
*/
4545
public static function encrypt( $str ) {
4646
$salt = defined( 'WP_ENCRYPT_KEY' ) && WP_ENCRYPT_KEY ? WP_ENCRYPT_KEY : SECURE_AUTH_KEY;
47-
return openssl_encrypt($str, self::$registry->get( 'encrypt_method' ), $salt);
47+
return openssl_encrypt($str, self::$config->get( 'encrypt_method' ), $salt);
4848
}
4949

5050
/**
@@ -57,7 +57,7 @@ public static function encrypt( $str ) {
5757
*/
5858
public static function decrypt( $str ) {
5959
$salt = defined( 'WP_ENCRYPT_KEY' ) && WP_ENCRYPT_KEY ? WP_ENCRYPT_KEY : SECURE_AUTH_KEY;
60-
return openssl_decrypt($str, self::$registry->get( 'encrypt_method' ), $salt);
60+
return openssl_decrypt($str, self::$config->get( 'encrypt_method' ), $salt);
6161
}
6262

6363
/**

core/ObjectCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class ObjectCache extends ToolKit {
2020
*/
2121
public function get_object( $key = null, $callback, $cache_disabled = false ) {
2222

23-
$object_cache_group = self::$registry->get( 'object_cache/group' ) ? self::$registry->get( 'object_cache/group' ) : sanitize_title( self::$registry->get( 'data/Name' ) );
23+
$object_cache_group = self::$config->get( 'object_cache/group' ) ? self::$config->get( 'object_cache/group' ) : sanitize_title( self::$config->get( 'data/Name' ) );
2424
if( is_multisite() ) $object_cache_group .= '_' . get_current_blog_id();
25-
$object_cache_expire = ( is_int( self::$registry->get( 'object_cache/expire_hours' ) ) ? self::$registry->get( 'object_cache/expire_hours' ) : 24 ) * 86400; // Default to 24 hours
25+
$object_cache_expire = ( is_int( self::$config->get( 'object_cache/expire_hours' ) ) ? self::$config->get( 'object_cache/expire_hours' ) : 24 ) * 86400; // Default to 24 hours
2626

2727
$result = null;
2828

core/ScriptObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function __construct( $values ) {
2828
'css_media' => null,
2929
'dependencies' => array(),
3030
'localize' => null,
31-
'variable_name' => $this->prefix( self::$registry->get( 'js_object' ) ?: 'js_object' ),
31+
'variable_name' => $this->prefix( self::$config->get( 'js_object' ) ?: 'js_object' ),
3232
'handle' => $this->prefix( 'dynamic_script' ),
33-
'script_dir' => $this->prefix( self::$registry->get( 'dynamic_scripts_directory' ) ?: 'dynamic' ),
33+
'script_dir' => $this->prefix( self::$config->get( 'dynamic_scripts_directory' ) ?: 'dynamic' ),
3434
'filename' => null
3535
);
3636

core/ToolKit.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class ToolKit {
1010

1111
protected static $cache;
12-
protected static $registry;
12+
protected static $config;
1313

1414
protected function init( $base_dir = null, $args = null ) {
1515

@@ -48,7 +48,7 @@ protected function init( $base_dir = null, $args = null ) {
4848
// Load Environmental Variables
4949
$this->load_env_vars( [ $base_dir, $config->get( 'wordpress/root_dir' ) ] );
5050

51-
self::$registry = $config;
51+
self::$config = $config;
5252
return $config;
5353

5454
}
@@ -64,7 +64,7 @@ protected function init( $base_dir = null, $args = null ) {
6464
*/
6565
public static function prefix( $field_name = null, $before = '', $after = '_' ) {
6666

67-
$prefix = $before . self::$registry->get( 'prefix' ) . $after;
67+
$prefix = $before . self::$config->get( 'prefix' ) . $after;
6868
return $field_name !== null ? $prefix . $field_name : $prefix;
6969

7070
}
@@ -78,7 +78,7 @@ public static function prefix( $field_name = null, $before = '', $after = '_' )
7878
* @since 0.1.4
7979
*/
8080
protected function get_config( $key = null) {
81-
return self::$registry->get( $key );
81+
return self::$config->get( $key );
8282
}
8383

8484
/**
@@ -89,11 +89,11 @@ protected function get_config( $key = null) {
8989
* @since 0.2.0
9090
*/
9191
protected function get_current_plugin_meta( $type = ConfigRegistry ) {
92-
if( !self::$registry->get( 'base_dir' ) ) return [];
92+
if( !self::$config->get( 'base_dir' ) ) return [];
9393

94-
$plugin_data['slug'] = current( explode( DIRECTORY_SEPARATOR, plugin_basename( self::$registry->get( 'base_dir' ) ) ) );
95-
$plugin_data['path'] = trailingslashit( str_replace( plugin_basename( self::$registry->get( 'base_dir' ) ), '', rtrim( self::$registry->get( 'base_dir' ), '/' ) ) . $plugin_data['slug'] );
96-
$plugin_data['url'] = current( explode( $plugin_data['slug'] . '/', plugin_dir_url( self::$registry->get( 'base_dir' ) ) ) ) . $plugin_data['slug'] . '/';
94+
$plugin_data['slug'] = current( explode( DIRECTORY_SEPARATOR, plugin_basename( self::$config->get( 'base_dir' ) ) ) );
95+
$plugin_data['path'] = trailingslashit( str_replace( plugin_basename( self::$config->get( 'base_dir' ) ), '', rtrim( self::$config->get( 'base_dir' ), '/' ) ) . $plugin_data['slug'] );
96+
$plugin_data['url'] = current( explode( $plugin_data['slug'] . '/', plugin_dir_url( self::$config->get( 'base_dir' ) ) ) ) . $plugin_data['slug'] . '/';
9797

9898
// Get plugin path/file identifier
9999
foreach( get_plugins() as $key => $plugin ) {

0 commit comments

Comments
 (0)