@@ -358,41 +358,41 @@ public function get_translations() {
358
358
public function get_config () {
359
359
360
360
if ( ! $ this ->config ) {
361
- $ config = get_option ( 'wpm_config ' );
362
- $ config = apply_filters ( 'wpm_load_config ' , $ config );
363
-
364
- $ posts_config = apply_filters ( 'wpm_posts_config ' , $ config ['post_types ' ] );
365
- $ post_types = get_post_types ( '' , 'names ' );
361
+ $ config = get_option ( 'wpm_config ' );
362
+ $ this ->config = $ config ;
363
+ }
366
364
367
- foreach ( $ post_types as $ post_type ) {
368
- $ posts_config [ $ post_type ] = apply_filters ( "wpm_post_ {$ post_type }_config " , isset ( $ posts_config [ $ post_type ] ) ? $ posts_config [ $ post_type ] : null );
369
- }
365
+ $ config = apply_filters ( 'wpm_load_config ' , $ this ->config );
370
366
371
- $ config ['post_types ' ] = $ posts_config ;
367
+ $ posts_config = apply_filters ( 'wpm_posts_config ' , $ config ['post_types ' ] );
368
+ $ post_types = get_post_types ( '' , 'names ' );
372
369
373
- $ taxonomies_config = apply_filters ( 'wpm_taxonomies_config ' , $ config ['taxonomies ' ] );
374
- $ taxonomies = get_taxonomies ();
370
+ foreach ( $ post_types as $ post_type ) {
371
+ $ posts_config [ $ post_type ] = apply_filters ( "wpm_post_ {$ post_type }_config " , isset ( $ posts_config [ $ post_type ] ) ? $ posts_config [ $ post_type ] : null );
372
+ }
375
373
376
- foreach ( $ taxonomies as $ taxonomy ) {
377
- $ taxonomies_config [ $ taxonomy ] = apply_filters ( "wpm_taxonomy_ {$ taxonomy }_config " , isset ( $ taxonomies_config [ $ taxonomy ] ) ? $ taxonomies_config [ $ taxonomy ] : null );
378
- }
374
+ $ config ['post_types ' ] = $ posts_config ;
379
375
380
- $ config ['taxonomies ' ] = $ taxonomies_config ;
376
+ $ taxonomies_config = apply_filters ( 'wpm_taxonomies_config ' , $ config ['taxonomies ' ] );
377
+ $ taxonomies = get_taxonomies ();
381
378
382
- $ config ['options ' ] = apply_filters ( 'wpm_options_config ' , $ config ['options ' ] );
379
+ foreach ( $ taxonomies as $ taxonomy ) {
380
+ $ taxonomies_config [ $ taxonomy ] = apply_filters ( "wpm_taxonomy_ {$ taxonomy }_config " , isset ( $ taxonomies_config [ $ taxonomy ] ) ? $ taxonomies_config [ $ taxonomy ] : null );
381
+ }
383
382
384
- if ( is_multisite () ) {
385
- $ config ['site_options ' ] = apply_filters ( 'wpm_site_options_config ' , $ config ['site_options ' ] );
386
- } else {
387
- unset( $ config ['site_options ' ] );
388
- }
383
+ $ config ['taxonomies ' ] = $ taxonomies_config ;
389
384
390
- $ config ['widgets ' ] = apply_filters ( 'wpm_widgets_config ' , $ config ['widgets ' ] );
385
+ $ config ['options ' ] = apply_filters ( 'wpm_options_config ' , $ config ['options ' ] );
391
386
392
- $ this ->config = $ config ;
387
+ if ( is_multisite () ) {
388
+ $ config ['site_options ' ] = apply_filters ( 'wpm_site_options_config ' , $ config ['site_options ' ] );
389
+ } else {
390
+ unset( $ config ['site_options ' ] );
393
391
}
394
392
395
- return $ this ->config ;
393
+ $ config ['widgets ' ] = apply_filters ( 'wpm_widgets_config ' , $ config ['widgets ' ] );
394
+
395
+ return $ config ;
396
396
}
397
397
398
398
/**
0 commit comments