Skip to content

Commit

Permalink
Refactor render_block_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahmon committed Dec 21, 2021
1 parent a8d5409 commit e0f3329
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/blocks/site-automation-block/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function render_block_callback( $attributes, $content, $block ) {

$curated_posts_transient_key = 'sophi_curated_posts_' . $page_name . '_' . $widget_name;

if ( false === ( $curated_posts = get_transient( $curated_posts_transient_key ) ) ) {
$curated_posts = get_transient( $curated_posts_transient_key );

if ( false === $curated_posts ) {
// phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts
$curated_posts = get_posts(
[
Expand Down

0 comments on commit e0f3329

Please sign in to comment.