PluginProbe
Bogo / 2.9
Bogo v2.9
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 +9 -7 2.62.9 View file →
@@ -184,17 +184,19 @@
184 184
185 185 $lang_regex = bogo_get_lang_regex();
186 186
187 187 // REST rewrite rules
188 - $rest_url_prefix = rest_get_url_prefix();
188 + if ( function_exists( 'rest_get_url_prefix' ) ) {
189 + $rest_url_prefix = rest_get_url_prefix();
189 190
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]' );
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]' );
195 196
196 - $rules = $extra_rules + $rules;
197 + $rules = $extra_rules + $rules;
198 + }
197 199
198 200 $post_types = array_diff(
199 201 (array) bogo_localizable_post_types(),
200 202 get_post_types( array( '_builtin' => true ) ) );