File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11{
2- "toolkit-version" : " 0.3.0 " ,
2+ "toolkit-version" : " 0.3.1 " ,
33 "prefix" : " wptk" ,
44 "object_cache" : {
55 "group" : " default_cache" ,
Original file line number Diff line number Diff line change @@ -162,8 +162,9 @@ public function has($key)
162162 public function merge ( ConfigRegistry $ config )
163163 {
164164
165- if ( $ this ->config && $ config ->get () ) {
166- $ this ->config = array_merge ( $ this ->config , $ config ->get () );
165+ $ current = $ config ->get ();
166+ if ( $ this ->config && $ current ) {
167+ $ this ->config = array_merge ( $ this ->config , $ current );
167168 }
168169 return $ this ;
169170
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ class ToolKit {
1313
1414 protected function init ( $ base_dir = null , $ args = null ) {
1515
16+ include_once ( ABSPATH . 'wp-admin/includes/plugin.php ' );
17+
18+ // Define cookies
19+ $ site_slug = strtolower ( sanitize_title ( $ _SERVER ['SERVER_NAME ' ] ) );
20+ if ( !defined ( 'SECURE_AUTH_COOKIE ' ) ) define ( 'SECURE_AUTH_COOKIE ' , $ site_slug . '_sec_ ' . md5 ( SECURE_AUTH_SALT ) );
21+ if ( !defined ( 'AUTH_COOKIE ' ) ) define ( 'AUTH_COOKIE ' , $ site_slug . '_ ' . md5 ( AUTH_SALT ) );
22+ if ( !defined ( 'LOGGED_IN_COOKIE ' ) ) define ( 'LOGGED_IN_COOKIE ' , $ site_slug . '_logged_in_ ' . md5 ( LOGGED_IN_SALT ) );
23+
1624 // Load ToolKit defaults
1725 $ config = new ConfigRegistry ( trailingslashit ( dirname ( __DIR__ ) ) . 'config.json ' );
1826 $ wp_upload_dir = wp_upload_dir ();
You can’t perform that action at this time.
0 commit comments