Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#24003 closed defect (bug) (fixed)

Post Formats: get_the_post_format_media does not work without the $post global

Reported by: kovshenin Owned by: SergeyBiryukov
Priority: normal Milestone: 3.6
Component: Post Formats Version: 3.6
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

The get_the_post_format_media takes a $post argument, but doesn't pass it on to some of its functions (has_post_format and get_attached_*), making those functions work with the $post global instead.

Attachments (2)

24003.diff (711 bytes ) - added by kovshenin 13 years ago.
24003.2.diff (427 bytes ) - added by kovshenin 13 years ago.

Download all attachments as: .zip

Change History (5)

@kovshenin
13 years ago

#1 @SergeyBiryukov
13 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 23937:

Consistently use the function argument instead of the $post global in get_the_post_format_media(). props kovshenin. fixes #24003.

@kovshenin
13 years ago

#2 @kovshenin
13 years ago

  • Resolution fixed
  • Status closedreopened

24003.2.diff is a similar fix for get_the_post_format_image and get_attached_images. Sorry for not catching these together. Thought I'd squeeze it in here, but let me know if you want a separate ticket for this.

#3 @SergeyBiryukov
13 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 23938:

Use the function argument instead of the $post global in get_the_post_format_image(). props kovshenin. fixes #24003.

Note: See TracTickets for help on using tickets.