debug-bar
7 years ago
3rd-party.php
6 years ago
bbpress.php
6 years ago
beaverbuilder.php
8 years ago
bitly.php
9 years ago
buddypress.php
10 years ago
class-jetpack-bbpress-rest-api.php
6 years ago
class.jetpack-amp-support.php
6 years ago
class.jetpack-modules-overrides.php
8 years ago
debug-bar.php
8 years ago
domain-mapping.php
6 years ago
polldaddy.php
9 years ago
qtranslate-x.php
8 years ago
vaultpress.php
6 years ago
woocommerce-services.php
6 years ago
woocommerce.php
6 years ago
wpml.php
8 years ago
qtranslate-x.php
20 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Prevent qTranslate X from redirecting REST calls. |
| 4 | * |
| 5 | * @since 5.3 |
| 6 | * |
| 7 | * @param string $url_lang Language URL to redirect to. |
| 8 | * @param string $url_orig Original URL. |
| 9 | * @param array $url_info Pieces of original URL. |
| 10 | * |
| 11 | * @return bool |
| 12 | */ |
| 13 | function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) { |
| 14 | if ( false !== strpos( $url_info['wp-path'], 'wp-json/jetpack' ) ) { |
| 15 | return false; |
| 16 | } |
| 17 | return $url_lang; |
| 18 | } |
| 19 | add_filter( 'qtranslate_language_detect_redirect', 'jetpack_no_qtranslate_rest_url_redirect', 10, 3 ); |
| 20 |