File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 317317 return 'posts/ ' . $ page ->slug ;
318318 },
319319 'items ' => function ($ post ) {
320- if (isset ( $ _ENV [ ' ACCOUNT_URL ' ] )){
320+ if (empty ( $ post -> get ( ' accountUrl ' ) )){
321321 return [];
322322 }
323- $ categories = json_decode (file_get_contents ($ _ENV [ ' ACCOUNT_URL ' ] . '/wp-json/wp/v2/categories ' ));
323+ $ categories = json_decode (file_get_contents ($ post -> get ( ' accountUrl ' ) . '/wp-json/wp/v2/categories ' ));
324324 $ categories = array_filter ($ categories , fn ($ c ) => $ c ->slug === 'article ' );
325325 $ posts = [];
326326 foreach ($ categories as $ category ) {
327- $ baseUrl = $ _ENV [ ' ACCOUNT_URL ' ] . '/wp-json/wp/v2/posts?_embed&categories= ' . $ category ->id . '&lang= ' . $ category ->lang ;
327+ $ baseUrl = $ post -> get ( ' accountUrl ' ) . '/wp-json/wp/v2/posts?_embed&categories= ' . $ category ->id . '&lang= ' . $ category ->lang ;
328328 $ headers = get_headers ($ baseUrl );
329329 $ totalPages = 1 ;
330330 foreach ($ headers as $ header ) {
344344 };
345345 }
346346
347- $ wordPressLanguages = json_decode (file_get_contents ($ _ENV [ ' ACCOUNT_URL ' ] . '/wp-json/pll/v1/languages ' ));
347+ $ wordPressLanguages = json_decode (file_get_contents ($ post -> get ( ' accountUrl ' ) . '/wp-json/pll/v1/languages ' ));
348348 return collect ($ posts )->map (function ($ fromApi ) use ($ wordPressLanguages , $ post ) {
349349 $ currentLang = current (array_filter ($ wordPressLanguages , fn ($ l ) => $ l ->slug === $ fromApi ['lang ' ]));
350350 $ data = [
Original file line number Diff line number Diff line change 33return [
44 'production ' => true ,
55 'matomo_container ' => '8jNjdh8C ' ,
6- 'accountUrl ' => ' https://account.libresign.coop ' ,
6+ 'accountUrl ' => getenv ( ' ACCOUNT_URL ' ) ,
77 'form_url ' => 'https://contactform.libresign.coop/validate.php ' ,
88 'url_captcha ' => 'https://contactform.libresign.coop/captcha.php ' ,
99 'url_captcha_audio ' => 'https://contactform.libresign.coop/audio_captcha.php ' ,
You can’t perform that action at this time.
0 commit comments