This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream dev_backend { | |
server dev-php:9000; | |
} | |
upstream test_backend { | |
server test-php:9000; | |
} | |
map $http_x_testing_mode $php_backend { | |
"true" "test_backend"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('rest_api_init', 'polylang_json_api_init' ); | |
add_action('rest_api_init', 'polylangroute'); | |
function polylang_json_api_init(){ | |
global $polylang; | |
// $default = pll_default_language(); | |
$langs = pll_languages_list(); | |
$cur_lang = $_GET['lang']; |