Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
fix(images): don't store transient ids in an array
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz committed Jan 21, 2020
1 parent f902ae6 commit efc1406
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/class-frontity-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function purge_content_media_transients()
// Saves the image id transient key for future purges.
function update_content_media_transients($transient_name, $attachment_id)
{
set_transient($transient_name, $attachment_id);
$transient_keys = get_option('image_id_transient_keys');
$transient_keys[] = $transient_name;
update_option('image_id_transient_keys', $transient_keys);
// set_transient($transient_name, $attachment_id);
// $transient_keys = get_option('image_id_transient_keys');
// $transient_keys[] = $transient_name;
// update_option('image_id_transient_keys', $transient_keys);
}

// Adds data-attachment-id to content images.
Expand Down

0 comments on commit efc1406

Please sign in to comment.