WordPress.org

Make WordPress Core

Changeset 24126


Ignore:
Timestamp:
04/29/13 13:26:31 (12 months ago)
Author:
nacin
Message:

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.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-walker.php

    r23346 r24126  
    116116     * @return null Null on failure with no changes to parameters. 
    117117     */ 
    118     function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) { 
     118    function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { 
    119119 
    120120        if ( !$element ) 
  • trunk/wp-includes/comment-template.php

    r23932 r24126  
    12961296     * 
    12971297     */ 
    1298     function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) { 
     1298    function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { 
    12991299 
    13001300        if ( !$element ) 
  • trunk/wp-includes/deprecated.php

    r23554 r24126  
    795795 * @see get_author_posts_url() 
    796796 * 
    797  * @param bool $echo Optional. 
    798  * @param int $author_id Required. 
     797 * @param bool $echo 
     798 * @param int $author_id 
    799799 * @param string $author_nicename Optional. 
    800800 * @return string|null 
    801801 */ 
    802 function get_author_link($echo = false, $author_id, $author_nicename = '') { 
     802function get_author_link($echo, $author_id, $author_nicename = '') { 
    803803    _deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' ); 
    804804 
  • trunk/wp-includes/post.php

    r24015 r24126  
    47874787 * @param object $post Object type containing the post information 
    47884788 */ 
    4789 function _future_post_hook( $deprecated = '', $post ) { 
     4789function _future_post_hook( $deprecated, $post ) { 
    47904790    wp_clear_scheduled_hook( 'publish_future_post', array( $post->ID ) ); 
    47914791    wp_schedule_single_event( strtotime( get_gmt_from_date( $post->post_date ) . ' GMT') , 'publish_future_post', array( $post->ID ) ); 
  • trunk/wp-includes/widgets.php

    r23554 r24126  
    7474     * PHP4 constructor 
    7575     */ 
    76     function WP_Widget( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { 
     76    function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) { 
    7777        WP_Widget::__construct( $id_base, $name, $widget_options, $control_options ); 
    7878    } 
     
    9191     *   - height: currently not used but may be needed in the future 
    9292     */ 
    93     function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { 
     93    function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) { 
    9494        $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base); 
    9595        $this->name = $name; 
  • trunk/wp-signup.php

    r24058 r24126  
    491491 * @param string $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() 
    492492 */ 
    493 function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) { 
     493function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) { 
    494494    ?> 
    495495    <h2><?php printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2> 
Note: See TracChangeset for help on using the changeset viewer.