mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew. Fixes #36495. git-svn-id: https://develop.svn.wordpress.org/trunk@37985 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1023,7 +1023,7 @@ function register_post_type( $post_type, $args = array() ) {
|
||||
$post_type = sanitize_key( $post_type );
|
||||
|
||||
if ( empty( $post_type ) || strlen( $post_type ) > 20 ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2.0' );
|
||||
return new WP_Error( 'post_type_length_invalid', __( 'Post type names must be between 1 and 20 characters in length.' ) );
|
||||
}
|
||||
|
||||
@@ -2777,7 +2777,7 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array(
|
||||
function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
|
||||
|
||||
if ( is_numeric( $args ) ) {
|
||||
_deprecated_argument( __FUNCTION__, '3.1', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
|
||||
_deprecated_argument( __FUNCTION__, '3.1.0', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
|
||||
$args = array( 'numberposts' => absint( $args ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user