WordPress.org

Make WordPress Core

Changeset 41219


Ignore:
Timestamp:
08/03/2017 03:42:45 PM (2 years ago)
Author:
johnbillion
Message:

General: Fix various instances of incorrect filter docs and incorrect filter and action parameters.

Props keesiemeijer for identifying the issues

See #38462

Location:
trunk
Files:
9 edited

Legend:

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

    r41214 r41219  
    480480         * @param array    $actions An array of action links.
    481481         * @param WP_Theme $theme   The current WP_Theme object.
    482          * @param string   $context Status of the theme.
     482         * @param string   $context Status of the theme, one of all', 'enabled', or 'disabled'.
    483483         */
    484484        $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
     
    496496         * @param array    $actions An array of action links.
    497497         * @param WP_Theme $theme   The current WP_Theme object.
    498          * @param string   $context Status of the theme.
     498         * @param string   $context Status of the theme, one of all', 'enabled', or 'disabled'.
    499499         */
    500500        $actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r41161 r41219  
    17211721                 *
    17221722                 * @param string $column_name Name of the column to edit.
    1723                  * @param string $post_type   The post type slug.
     1723                 * @param string $post_type   The post type slug, or current screen name if this is a taxonomy list table.
     1724                 * @param string taxonomy     The taxonomy name, if any.
    17241725                 */
    1725                 do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
     1726                do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
    17261727            }
    17271728
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r41161 r41219  
    15231523    <?php
    15241524    /** This action is documented in wp-admin/admin-footer.php */
    1525     do_action( 'admin_footer' );
     1525    do_action( 'admin_footer', '' );
    15261526
    15271527    /** This action is documented in wp-admin/admin-footer.php */
  • trunk/src/wp-admin/includes/class-wp-themes-list-table.php

    r41161 r41219  
    193193
    194194            /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
    195             $actions       = apply_filters( 'theme_action_links', $actions, $theme );
     195            $actions       = apply_filters( 'theme_action_links', $actions, $theme, 'all' );
    196196
    197197            /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
    198             $actions       = apply_filters( "theme_action_links_$stylesheet", $actions, $theme );
     198            $actions       = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, 'all' );
    199199            $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
    200200            unset( $actions['delete'] );
  • trunk/src/wp-admin/includes/ms.php

    r41208 r41219  
    261261
    262262    /** This action is documented in wp-admin/includes/user.php */
    263     do_action( 'deleted_user', $id );
     263    do_action( 'deleted_user', $id, null );
    264264
    265265    return true;
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r41162 r41219  
    13831383            $data['guid'] = array(
    13841384                /** This filter is documented in wp-includes/post-template.php */
    1385                 'rendered' => apply_filters( 'get_the_guid', $post->guid ),
     1385                'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
    13861386                'raw'      => $post->guid,
    13871387            );
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php

    r41162 r41219  
    370370            $data['guid'] = array(
    371371                /** This filter is documented in wp-includes/post-template.php */
    372                 'rendered' => apply_filters( 'get_the_guid', $post->guid ),
     372                'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
    373373                'raw'      => $post->guid,
    374374            );
  • trunk/src/wp-includes/theme.php

    r41205 r41219  
    27502750        } else {
    27512751            /** This action is documented in wp-includes/theme.php */
    2752             do_action( 'after_switch_theme', $stylesheet );
     2752            do_action( 'after_switch_theme', $stylesheet, $old_theme );
    27532753        }
    27542754        flush_rewrite_rules();
  • trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php

    r40601 r41219  
    318318        $this->assertEquals( $rendered_excerpt, $response['excerpt']['rendered'] );
    319319
    320         $rendered_guid = apply_filters( 'get_the_guid', $revision->guid );
     320        $rendered_guid = apply_filters( 'get_the_guid', $revision->guid, $revision->ID );
    321321        $this->assertEquals( $rendered_guid, $response['guid']['rendered'] );
    322322
Note: See TracChangeset for help on using the changeset viewer.