PluginProbe
Bogo / 2.6
Bogo v2.6
3.9.3 trunk 1.0 1.1 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.6 2.6.1 2.7 2.8 2.8.1 2.9 3.0 3.0.1 All 52 releases
← All changes | includes/rewrite.php +7 -9 2.92.6 View file →
@@ -184,19 +184,17 @@
184 184
185 185 $lang_regex = bogo_get_lang_regex();
186 186
187 187 // REST rewrite rules
188 - if ( function_exists( 'rest_get_url_prefix' ) ) {
189 - $rest_url_prefix = rest_get_url_prefix();
188 + $rest_url_prefix = rest_get_url_prefix();
190 189
191 - $extra_rules = array(
192 - "^{$lang_regex}/{$rest_url_prefix}/?$"
193 - => 'index.php?lang=$matches[1]&rest_route=/',
194 - "^{$lang_regex}/{$rest_url_prefix}/(.*)?"
195 - => 'index.php?lang=$matches[1]&rest_route=/$matches[2]' );
190 + $extra_rules = array(
191 + "^{$lang_regex}/{$rest_url_prefix}/?$"
192 + => 'index.php?lang=$matches[1]&rest_route=/',
193 + "^{$lang_regex}/{$rest_url_prefix}/(.*)?"
194 + => 'index.php?lang=$matches[1]&rest_route=/$matches[2]' );
196 195
197 - $rules = $extra_rules + $rules;
198 - }
196 + $rules = $extra_rules + $rules;
199 197
200 198 $post_types = array_diff(
201 199 (array) bogo_localizable_post_types(),
202 200 get_post_types( array( '_builtin' => true ) ) );