99class 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