Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkae committed Dec 18, 2024
1 parent 77bf14d commit d539233
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/css-optimize.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,14 @@ public static function parse_block_style( $block, &$style_arr ) {
* @return void
*/
public function load_cached_css_for_post() {
// DEV NOTE #1: If we'll also do this for wp_template and
// DEV NOTE: If we'll also do this for wp_template and
// wp_template_part then we might need to use the actions:
// render_block_core_template_part_post and
// render_block_core_template_part_file
$optimize_css = is_singular() && ! is_preview() && ! is_attachment();
$optimize_css = apply_filters( 'stackable/load_cached_css_for_post', $optimize_css );
if ( $optimize_css ) {
$post_id = apply_filters( 'stackable/get_post_id_for_cached_css', get_the_ID() );

$this->optimized_css = get_post_meta( $post_id, 'stackable_optimized_css', true );

if ( ! empty( $this->optimized_css ) ) {
Expand Down

0 comments on commit d539233

Please sign in to comment.