Skip to content

Commit 2b65f12

Browse files
authored
Move items that need translation to init (#47)
1 parent 3609f7c commit 2b65f12

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

secure-custom-fields.php

+16-13
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function initialize() {
9191

9292
// Define settings.
9393
$this->settings = array(
94-
'name' => __( 'Secure Custom Fields', 'secure-custom-fields' ),
94+
'name' => 'Secure Custom Fields', // Will be updated in the init hook to i18n string.
9595
'slug' => dirname( ACF_BASENAME ),
9696
'version' => ACF_VERSION,
9797
'basename' => ACF_BASENAME,
@@ -207,18 +207,6 @@ public function initialize() {
207207
acf_include( 'includes/ajax/class-acf-ajax-query-users.php' );
208208
acf_include( 'includes/ajax/class-acf-ajax-local-json-diff.php' );
209209

210-
// Include forms.
211-
acf_include( 'includes/forms/form-attachment.php' );
212-
acf_include( 'includes/forms/form-comment.php' );
213-
acf_include( 'includes/forms/form-customizer.php' );
214-
acf_include( 'includes/forms/form-front.php' );
215-
acf_include( 'includes/forms/form-nav-menu.php' );
216-
acf_include( 'includes/forms/form-post.php' );
217-
acf_include( 'includes/forms/form-gutenberg.php' );
218-
acf_include( 'includes/forms/form-taxonomy.php' );
219-
acf_include( 'includes/forms/form-user.php' );
220-
acf_include( 'includes/forms/form-widget.php' );
221-
222210
// Include admin.
223211
if ( is_admin() ) {
224212
acf_include( 'includes/admin/admin.php' );
@@ -269,6 +257,9 @@ public function init() {
269257
// Load textdomain file.
270258
acf_load_textdomain();
271259

260+
// Update the name setting now that we're in the init hook.
261+
acf_update_setting( 'name', __( 'Secure Custom Fields', 'secure-custom-fields' ) );
262+
272263
// Include 3rd party compatiblity.
273264
acf_include( 'includes/third-party.php' );
274265

@@ -277,6 +268,18 @@ public function init() {
277268
acf_include( 'includes/wpml.php' );
278269
}
279270

271+
// Include forms.
272+
acf_include( 'includes/forms/form-attachment.php' );
273+
acf_include( 'includes/forms/form-comment.php' );
274+
acf_include( 'includes/forms/form-customizer.php' );
275+
acf_include( 'includes/forms/form-front.php' );
276+
acf_include( 'includes/forms/form-nav-menu.php' );
277+
acf_include( 'includes/forms/form-post.php' );
278+
acf_include( 'includes/forms/form-gutenberg.php' );
279+
acf_include( 'includes/forms/form-taxonomy.php' );
280+
acf_include( 'includes/forms/form-user.php' );
281+
acf_include( 'includes/forms/form-widget.php' );
282+
280283
// Add post types and taxonomies.
281284
if ( acf_get_setting( 'enable_post_types' ) ) {
282285
acf_include( 'includes/post-types/class-acf-taxonomy.php' );

0 commit comments

Comments
 (0)