Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15566 closed enhancement (invalid)

if + else = always

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

Description

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

should be written as

	clean_page_cache( $post_id );

Attachments (1)

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

Download all attachments as: .zip

Change History (6)

@hakre
14 years ago

#1 @hakre
14 years ago

  • Keywords has-patch added
  • Version set to 3.1

#2 @ocean90
14 years ago

  • Keywords close added

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

#3 @hakre
14 years ago

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

thanks for the look.

#4 @ocean90
14 years ago

  • Milestone Awaiting Review deleted

#5 @Denis-de-Bernardy
14 years ago

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

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