[wp-trac] [WordPress Trac] #32077: get_pages re-factor to reduce line-count, DRY up code & give more specific functions for some of it's main processes

WordPress Trac noreply at wordpress.org
Thu Apr 23 14:56:34 UTC 2015


#32077: get_pages re-factor to reduce line-count, DRY up code & give more specific
functions for some of it's main processes
-------------------------------+-----------------------------
 Reporter:  LewisCowles        |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.1.2
 Severity:  normal             |   Keywords:
  Focuses:  docs, performance  |
-------------------------------+-----------------------------
 While investigating another bug report, I noticed get_pages was more than
 a little unweildy & required significant screen scrolling, and had
 everything thrown into the function.

 Really the whole thing needs a rewrite or to be chopped up into smaller
 functions for readibility and sandboxing some effects of code, which also
 increases adaptability.

 I also noticed the caching seemed to be adding overhead where it was
 unnecesarry, and checks on caching seemed to be in the wrong order.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32077>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list