From a761e8230cf959ed81786324e64d554236d46b2c Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Sat, 2 Nov 2019 13:47:54 +0000 Subject: [PATCH] Update based on feedback - Fix title. - Clarify description. - Avoid re-using key in same example array. - Make valid and invalid examples be a mirror. - Add missing `` tags. --- WordPress/Docs/WP/PostsPerPageStandard.xml | 37 +++++++++++++++------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/WordPress/Docs/WP/PostsPerPageStandard.xml b/WordPress/Docs/WP/PostsPerPageStandard.xml index f585e7e9b5..1783e95f17 100644 --- a/WordPress/Docs/WP/PostsPerPageStandard.xml +++ b/WordPress/Docs/WP/PostsPerPageStandard.xml @@ -1,7 +1,7 @@ - + @@ -11,21 +11,28 @@ You should always fetch the lowest number possible that still gives you the numb -1, +); +$args = array( 'posts_per_page' => 100, +); +$args = array( 'posts_per_page' => '10', ); $query_args['posts_per_page'] = 100; -$query_args['posts_per_page'] = '10'; + +_query_posts( 'nopaging=1&posts_per_page=50' ); ]]> 999, + 'posts_per_page' => 101, ); -_query_posts( 'nopaging=1&posts_per_page=999' ); +$query_args['posts_per_page'] = 200; + +_query_posts( 'nopaging=1&posts_per_page=999' ); ]]> @@ -33,21 +40,29 @@ _query_posts( 'nopaging=1&posts_per_page=999' ); -1, - 'numberposts' => 100, - 'numberposts' => '10', + 'numberposts' => -1, ); +$args = array( + 'numberposts' => 100, +); +$args = array( + 'numberposts' => '10', +); + +$query_args['numberposts'] = '-1'; -$query_args['numberposts'] = '-1'; +_query_posts( 'numberposts=50' ); ]]> 999, + 'numberposts' => 101, ); -_query_posts( 'numberposts=999' ); +$query_args['numberposts'] = '200'; + +_query_posts( 'numberposts=999' ); ]]>