Make WordPress Core


Ignore:
Timestamp:
01/16/2015 10:50:20 PM (10 years ago)
Author:
wonderboymusic
Message:

Fix some internal types that are passed to functions to avoid changing the acceptable types passed as arguments to those functions:

  • In WP_Importer->is_user_over_quota(), the default value for the first argument for upload_is_user_over_quota() is true. Don't bother passing 1.
  • When calling submit_button() with no $name, pass empty string instead of false.
  • The default value for the 2nd argument to get_edit_post_link() is 'display'. Because PHP is PHP, passing true is the same as passing 'display' or nothing. Don't bother passing true.
  • In WP_User_Meta_Session_Tokens::drop_sessions(), pass 0 instead of false to delete_metadata() as the value for $object_id, which expects an int.

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r31181 r31220  
    316316                } else {
    317317?>
    318                 <a href="<?php echo get_edit_post_link( $post->ID, true ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $att_title ) ); ?>">
     318                <a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $att_title ) ); ?>">
    319319                    <?php echo $thumb; ?>
    320320                </a>
     
    333333                echo $att_title;
    334334            } else { ?>
    335             <a href="<?php echo get_edit_post_link( $post->ID, true ); ?>"
     335            <a href="<?php echo get_edit_post_link( $post->ID ); ?>"
    336336                title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $att_title ) ); ?>">
    337337                <?php echo $att_title; ?></a>
     
    502502        if ( $this->detached ) {
    503503            if ( current_user_can( 'edit_post', $post->ID ) )
    504                 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID, true ) . '">' . __( 'Edit' ) . '</a>';
     504                $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';
    505505            if ( current_user_can( 'delete_post', $post->ID ) )
    506506                if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
     
    516516        else {
    517517            if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash )
    518                 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID, true ) . '">' . __( 'Edit' ) . '</a>';
     518                $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';
    519519            if ( current_user_can( 'delete_post', $post->ID ) ) {
    520520                if ( $this->is_trash )
Note: See TracChangeset for help on using the changeset viewer.