Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11458 closed defect (bug) (fixed)

Remove unnecessary $posts_per_page global in admin.php

Reported by: nacin's profile nacin Owned by:
Milestone: 3.0 Priority: low
Severity: minor Version: 2.9
Component: Administration Keywords: has-patch tested
Focuses: Cc:

Description

First discussed in #11385.

There is an orphaned $posts_per_page = get_option('posts_per_page') in the admin.php bootstrap. The variable is never used and appears to be an artifact that is left over from before the time of screen options.

The posts_per_page option is the reading option for the number of posts to display per page in a theme.

In the off-chance a plugin used this variable, it is overwritten in post.php anyway, and would provide incorrect values on any other page, as they have their own *_per_page user options. As of [12375] they also have a complete set of filters as well.

If someone feels that broken back compat is necessary here, then we can wontfix.

Attachments (1)

11458-posts_per_page.diff (358 bytes) - added by nacin 15 years ago.

Download all attachments as: .zip

Change History (4)

#1 @hakre
15 years ago

I took a look as well and did not find any use of the global $posts_per_page within the admin. Looks OK to me to be zapped.

#2 @hakre
15 years ago

  • Keywords tested added

reviewed and tested again: OK. patch applies clean.

#3 @nacin
15 years ago

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

[12551], thanks westi.

Note: See TracTickets for help on using tickets.