Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#9944 closed defect (bug) (fixed)

workflow issue with loop_start, loop_end, the_post hooks

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by: ryan's profile ryan
Milestone: 2.8 Priority: normal
Severity: major Version:
Component: Query Keywords: has-patch tested commit
Focuses: Cc:

Description

Finally got a chance to try these out today, and... there is a slight workflow issue:

add_action('loop_start', array('article_uploader', 'loop_start'));
add_action('the_post', array('article_uploader', 'the_post'));
add_action('loop_end', array('article_uploader', 'loop_end'));

the plugin disables wpautop, among other things, on a per post basis. trouble is, the hooks get fired in the following order:

  • the_post
  • loop_start
  • the_post
  • ...
  • loop_end

... so we've a workflow issue. patch coming right up.

Attachments (1)

9944.diff (1015 bytes) - added by Denis-de-Bernardy 16 years ago.

Download all attachments as: .zip

Change History (6)

#1 @Denis-de-Bernardy
16 years ago

patch does two things:

  • it moves loop_start where it should be, to ensure it gets fired before the first "the_post"
  • it moves the_post further down, for consistency with the remaining wp hooks (i.e. after the event, rather than before)

#2 @Denis-de-Bernardy
16 years ago

  • Keywords has-patch tested commit added

#3 @Denis-de-Bernardy
16 years ago

Expanding on the above, it also sorts out the various oddities that occurred when I tried inserting a WP_Query in the loop.

#4 @Denis-de-Bernardy
16 years ago

Oh, and... just to confirm, it's not needlessly firing loop_start on a 404 either (that being another bug we fixed in 2.8).

#5 @ryan
16 years ago

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

(In [11464]) Fix loop start, loop end workflow. Props Denis-de-Bernardy. fixes #9944

Note: See TracTickets for help on using tickets.