Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit f33bbe5

Browse files
committed
Merge branch 'release/1.7.1'
2 parents efbddb7 + 17c973c commit f33bbe5

File tree

3 files changed

+29
-26
lines changed

3 files changed

+29
-26
lines changed

core/class-wpm-setup.php

+24-24
Original file line numberDiff line numberDiff line change
@@ -358,41 +358,41 @@ public function get_translations() {
358358
public function get_config() {
359359

360360
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+
}
366364

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 );
370366

371-
$config['post_types'] = $posts_config;
367+
$posts_config = apply_filters( 'wpm_posts_config', $config['post_types'] );
368+
$post_types = get_post_types( '', 'names' );
372369

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+
}
375373

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;
379375

380-
$config['taxonomies'] = $taxonomies_config;
376+
$taxonomies_config = apply_filters( 'wpm_taxonomies_config', $config['taxonomies'] );
377+
$taxonomies = get_taxonomies();
381378

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+
}
383382

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;
389384

390-
$config['widgets'] = apply_filters( 'wpm_widgets_config', $config['widgets'] );
385+
$config['options'] = apply_filters( 'wpm_options_config', $config['options'] );
391386

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'] );
393391
}
394392

395-
return $this->config;
393+
$config['widgets'] = apply_filters( 'wpm_widgets_config', $config['widgets'] );
394+
395+
return $config;
396396
}
397397

398398
/**

readme.txt

+3
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ If you have opened several browser tabs for editing this post in different langu
154154

155155
== Changelog ==
156156

157+
= 1.7.1 =
158+
* fix apply config filters
159+
157160
= 1.7.0 =
158161
+ add support multisite
159162
+ add support site in subfolders

wp-multilang.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
99
* Text Domain: wpm
1010
* Domain Path: /languages
11-
* Version: 1.7.0
11+
* Version: 1.7.1
1212
*
1313
* @package WPM
1414
* @category Core
@@ -42,7 +42,7 @@ final class WP_Multilang {
4242
*
4343
* @var string
4444
*/
45-
public $version = '1.7.0';
45+
public $version = '1.7.1';
4646

4747
/**
4848
* The single instance of the class.

0 commit comments

Comments
 (0)