Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Dave McHale on "showposts in WP_Query"

$
0
0

Hi all,

I don't know if this has been discussed in the past so sorry if I'm bringing up old news... I was just digging through the WP_Query class and on line 2436 of /wp-includes/query.php there is code that supports the showposts parameter.

The parameter isn't even mentioned in the docblock, and according to the codex has been officially replaced by posts_per_page since 2.1 - so, 7.5 years ago. http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters (see the notes for posts_per_page)

Is this a case of "it's not hurting anything to keep it, and will do more harm than good to remove it"? Simply a case of "forgotten code"? Would/could/should it be officially deprecated so it can be removed later?

Just curious what others thought, or if anyone had any insight into previous conversations about this.


Viewing all articles
Browse latest Browse all 8245

Trending Articles