From 00f66fcd3569c2821910de51baf45c1ab9bfee10 Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 9 Jan 2024 16:06:44 +0100 Subject: [PATCH] wait #6564 @1:00 --- .../assets/styles/widgets/flux-post-carousel.styl | 8 +++++++- wp-content/themes/physioassist/resources/functions.php | 7 +------ .../physioassist/resources/views/partials/post.blade.php | 8 ++++++-- .../resources/views/widgets/flux-post-carousel.blade.php | 7 ++++--- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/wp-content/themes/physioassist/resources/assets/styles/widgets/flux-post-carousel.styl b/wp-content/themes/physioassist/resources/assets/styles/widgets/flux-post-carousel.styl index 00c5b62e..3e2b3acb 100644 --- a/wp-content/themes/physioassist/resources/assets/styles/widgets/flux-post-carousel.styl +++ b/wp-content/themes/physioassist/resources/assets/styles/widgets/flux-post-carousel.styl @@ -37,11 +37,17 @@ margin-bottom: 0 !important font-weight: 700 font-size: 14px !important + color: #b3b9c6 &-title font-weight: 500 color: #20548c + &-subtitle + font-size: 14px + font-style: italic + margin-top: 5px + &-item margin-bottom: 30px @@ -49,7 +55,7 @@ text-align: left .arrow-link - margin-top: 10px + margin-top: 5px font-size: 14px !important &-download diff --git a/wp-content/themes/physioassist/resources/functions.php b/wp-content/themes/physioassist/resources/functions.php index 33df8487..509e632f 100644 --- a/wp-content/themes/physioassist/resources/functions.php +++ b/wp-content/themes/physioassist/resources/functions.php @@ -117,12 +117,7 @@ function flux_posts() 'category__in' => !empty($catId) ? [$catId] : $categoriesId, 'order' => 'desc', ]); - - var_dump([ - 'posts_per_page' => -1, - 'category__in' => !empty($catId) ? [$catId] : $categoriesId, - 'order' => 'desc', - ]); + $current_language = apply_filters( 'wpml_current_language', NULL ); foreach ($posts as $item) { echo template('partials/post', compact('item')); diff --git a/wp-content/themes/physioassist/resources/views/partials/post.blade.php b/wp-content/themes/physioassist/resources/views/partials/post.blade.php index af6c7d53..e5933ca6 100644 --- a/wp-content/themes/physioassist/resources/views/partials/post.blade.php +++ b/wp-content/themes/physioassist/resources/views/partials/post.blade.php @@ -1,8 +1,12 @@ +@php +$format = $current_language === "en" ? "Y/m" : "m/Y"; +@endphp +
-

{!! date('Y/m', strtotime($item->post_date)) !!}

+

{!! date($format, strtotime($item->post_date)) !!}

{{ $item->post_title }}

{{ $item->subtitle }}

- @svg('arrow') {{ __('Read more') }} + @svg('arrow') {{ __('Read more', 'sage') }}
{{-- .flux-post-carousel-item-content --}}
{{-- .flux-post-carousel-item --}} diff --git a/wp-content/themes/physioassist/resources/views/widgets/flux-post-carousel.blade.php b/wp-content/themes/physioassist/resources/views/widgets/flux-post-carousel.blade.php index 6a640d41..b1ab8e98 100644 --- a/wp-content/themes/physioassist/resources/views/widgets/flux-post-carousel.blade.php +++ b/wp-content/themes/physioassist/resources/views/widgets/flux-post-carousel.blade.php @@ -35,8 +35,7 @@ ]; $slick = json_encode($settings); - - use function App\template; + $current_language = apply_filters( 'wpml_current_language', NULL ); @endphp
@@ -45,14 +44,16 @@ {{__($title)}}
+ @if($categories)
+ @endif
@foreach ($items as $item) -- 2.39.5