Mark the calling of wp_get_recent_posts() with just a count as deprecated - only use in core was from XMLRPC.
git-svn-id: https://develop.svn.wordpress.org/trunk@16255 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3a360acc5a
commit
29da3d7730
|
@ -2254,9 +2254,11 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array(
|
||||||
*/
|
*/
|
||||||
function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
|
function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
|
||||||
|
|
||||||
if ( is_numeric( $args ) )
|
if ( is_numeric( $args ) ) {
|
||||||
|
_deprecated_argument( __FUNCTION__, '3.1', __('Passing an integer number of posts is deprecated pass an array instead.' ) );
|
||||||
$args = array( 'numberposts' => absint( $args ) );
|
$args = array( 'numberposts' => absint( $args ) );
|
||||||
|
}
|
||||||
|
|
||||||
// Set default arguments
|
// Set default arguments
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'numberposts' => 10, 'offset' => 0,
|
'numberposts' => 10, 'offset' => 0,
|
||||||
|
|
Loading…
Reference in New Issue