WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/23/2017 05:06:40 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Pass $post parameter to post_submitbox_start, attachment_submitbox_misc_actions, media_submitbox_misc_sections, audio_submitbox_misc_sections filters.

Props sebastian.pisula, SergeyBiryukov.
Fixes #36206.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r41563 r41581  
    245245 *
    246246 * @since 2.7.0
    247  */
    248 do_action( 'post_submitbox_start' );
     247 * @since 4.9.0 Added the `$post` parameter.
     248 *
     249 * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
     250 *                           null on Edit Link screen.
     251 */
     252do_action( 'post_submitbox_start', $post );
    249253?>
    250254<div id="delete-action">
     
    327331     *
    328332     * @since 3.5.0
     333     * @since 4.9.0 Added the `$post` parameter.
     334     *
     335     * @param WP_Post $post WP_Post object for the current attachment.
    329336     */
    330     do_action( 'attachment_submitbox_misc_actions' );
     337    do_action( 'attachment_submitbox_misc_actions', $post );
    331338    ?>
    332339</div><!-- #misc-publishing-actions -->
     
    915922<?php
    916923/** This action is documented in wp-admin/includes/meta-boxes.php */
    917 do_action( 'post_submitbox_start' );
     924do_action( 'post_submitbox_start', null );
    918925?>
    919926<div id="delete-action">
Note: See TracChangeset for help on using the changeset viewer.