You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($featuredContentExcludeCurrentPost && $post instanceof WP_Post) {
$excludeList[] = $post->ID;
}
if ($excludeList) {
$args['post__not_in'] = $excludeList;
}
if ($featuredContentPosts) {
$args['post__in'] = array_map(
function ($item) {
return$item['value'];
},
(array)$featuredContentPosts
);
$args['orderby'] = 'post__in';
}
if ($featuredContentRandomOrder) {
$args['orderby'] = 'rand';
}
$mainQuery = newWP_Query($args);
if (!$mainQuery->have_posts()) {
return;
}
wp_reset_postdata();
I understand that this is done in a way it is because you have a standalone block that works, but this should be refactored to use a filter that will return, cache, .etc, the data...
Currently, it mixes presentational and business logic.
The text was updated successfully, but these errors were encountered:
eightshift-frontend-libs/blocks/init/src/Blocks/custom/featured-content/featured-content.php
Lines 29 to 94 in 64a5c3e
I understand that this is done in a way it is because you have a standalone block that works, but this should be refactored to use a filter that will return, cache, .etc, the data...
Currently, it mixes presentational and business logic.
The text was updated successfully, but these errors were encountered: