From c91475ebe194b2ad30aca9c5d74d983737895a32 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 29 Apr 2013 13:26:31 +0000 Subject: [PATCH] Required arguments can't follow optional arguments. Make required arguments optional in confirm_blog_signup(). Mark arguments as required in _future_post_hook(), the walker method display_element(), get_author_link() (deprecated), and the WP_Widget constructor. props rlerdorf. see #24210. git-svn-id: https://develop.svn.wordpress.org/trunk@24126 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-walker.php | 2 +- wp-includes/comment-template.php | 2 +- wp-includes/deprecated.php | 6 +++--- wp-includes/post.php | 2 +- wp-includes/widgets.php | 4 ++-- wp-signup.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-includes/class-wp-walker.php b/wp-includes/class-wp-walker.php index 403bad2dc7..ec905d0420 100644 --- a/wp-includes/class-wp-walker.php +++ b/wp-includes/class-wp-walker.php @@ -115,7 +115,7 @@ class Walker { * @param string $output Passed by reference. Used to append additional content. * @return null Null on failure with no changes to parameters. */ - function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) { + function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { if ( !$element ) return; diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index c70433cbc8..1083892038 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1295,7 +1295,7 @@ class Walker_Comment extends Walker { * 2.2 * */ - function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) { + function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { if ( !$element ) return; diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 5c964a99b1..c83bca6a8a 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -794,12 +794,12 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after * @deprecated Use get_author_posts_url() * @see get_author_posts_url() * - * @param bool $echo Optional. - * @param int $author_id Required. + * @param bool $echo + * @param int $author_id * @param string $author_nicename Optional. * @return string|null */ -function get_author_link($echo = false, $author_id, $author_nicename = '') { +function get_author_link($echo, $author_id, $author_nicename = '') { _deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' ); $link = get_author_posts_url($author_id, $author_nicename); diff --git a/wp-includes/post.php b/wp-includes/post.php index 01f9e8cec3..1f8d571e89 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -4786,7 +4786,7 @@ function _transition_post_status($new_status, $old_status, $post) { * wp_transition_post_status() and the default filter for _future_post_hook(). * @param object $post Object type containing the post information */ -function _future_post_hook( $deprecated = '', $post ) { +function _future_post_hook( $deprecated, $post ) { wp_clear_scheduled_hook( 'publish_future_post', array( $post->ID ) ); wp_schedule_single_event( strtotime( get_gmt_from_date( $post->post_date ) . ' GMT') , 'publish_future_post', array( $post->ID ) ); } diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 61d2cd7d46..6aa319f4f0 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -73,7 +73,7 @@ class WP_Widget { /** * PHP4 constructor */ - function WP_Widget( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { + function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) { WP_Widget::__construct( $id_base, $name, $widget_options, $control_options ); } @@ -90,7 +90,7 @@ class WP_Widget { * - width: required if more than 250px * - height: currently not used but may be needed in the future */ - function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { + function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) { $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base); $this->name = $name; $this->option_name = 'widget_' . $this->id_base; diff --git a/wp-signup.php b/wp-signup.php index 43f3ecf579..0e7fb9b7d8 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -490,7 +490,7 @@ function validate_blog_signup() { * @param string $user_email The user's email address * @param string $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() */ -function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) { +function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) { ?>

{$blog_title}" ) ?>