Skip to content

Commit c338685

Browse files
committed
Fixed PHP error with loading translations too early
1 parent f5de03a commit c338685

File tree

3 files changed

+573
-575
lines changed

3 files changed

+573
-575
lines changed

autoclose.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
*/
124124
function acc_get_settings() {
125125

126-
$settings = get_option( 'acc_settings', acc_settings_defaults() );
126+
$settings = get_option( 'acc_settings' );
127127

128128
/**
129129
* Settings array
@@ -145,3 +145,13 @@ function acc_get_settings() {
145145
*/
146146
global $acc_settings;
147147
$acc_settings = acc_get_settings();
148+
149+
/**
150+
* Register settings function
151+
*
152+
* @since 2.0.0
153+
*/
154+
function acc_register_settings() {
155+
AutoClose_Settings::get_instance();
156+
}
157+
add_action( 'admin_menu', 'acc_register_settings', 999 );

0 commit comments

Comments
 (0)