[wp-trac] [WordPress Trac] #39703: wp-signup.php & wp-activate.php are doing an avoidable posts query

WordPress Trac noreply at wordpress.org
Thu Jan 26 14:56:02 UTC 2017


#39703: wp-signup.php & wp-activate.php are doing an avoidable posts query
------------------------------------+-----------------------------
 Reporter:  imath                   |      Owner:
     Type:  defect (bug)            |     Status:  new
 Priority:  normal                  |  Milestone:  Awaiting Review
Component:  Login and Registration  |    Version:  trunk
 Severity:  normal                  |   Keywords:
  Focuses:  multisite               |
------------------------------------+-----------------------------
 Hi,

 If in the reading settings of the site, i chose to list my latest posts as
 the home page: going on `wp-signup.php` or `wp-activate.php` will query &
 fetch the 10 latests posts for nothing in a way. Moreover In this case
 `is_home()` is true which is a bit confusing.

 If in the reading settings of the site, i chose a static front page as the
 home page, it will be requested and fetched when going on `wp-signup.php`
 or `wp-activate.php`. In this case `is_page()` is true which is less
 confusing.

 So i guess, the particularity of these two specific pages is they're
 getting the header and the footer of the active theme.

 But i wonder why running `wp()` ?

 By simply directly loading the `wp-includes/template-loader.php` it can
 save a query.
 > see signup-activate-1.patch

 If running `wp()` is required for a reason i don't see, a query could
 still be saved and it could be interested to use this to set a "page"
 title for the `<title>` tag.
 > see signup-activate-2.patch

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


More information about the wp-trac mailing list