Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15566 closed enhancement (invalid)

if + else = always

Reported by: hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Comments Keywords: has-patch close
Focuses: Cc:


	if ( 'page' == $post->post_type )
		clean_page_cache( $post_id );
		clean_post_cache( $post_id );

should be written as

	clean_page_cache( $post_id );

Attachments (1)

15566.patch (755 bytes) - added by hakre 5 years ago.

Download all attachments as: .zip

Change History (6)

@hakre5 years ago

comment:1 @hakre5 years ago

  • Keywords has-patch added
  • Version set to 3.1

comment:2 @ocean905 years ago

  • Keywords close added

But you know that clean_page_cache() != clean_post_cache() ?

comment:3 @hakre5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

thanks for the look.

comment:4 @ocean905 years ago

  • Milestone Awaiting Review deleted

comment:5 @Denis-de-Bernardy5 years ago

Indeed it isn't... That said... Shouldn't it be:

	if ( $is_hierarchical )
		clean_page_cache( $post_id );
		clean_post_cache( $post_id );
Note: See TracTickets for help on using tickets.