Make WordPress Core

Ticket #31605: action-omnibus-1.diff

File action-omnibus-1.diff, 6.2 KB (added by tellyworth, 10 years ago)
  • wp-includes/pluggable.php

     
    570570                 * @since 2.5.0
    571571                 *
    572572                 * @param string $username User login.
     573                 * @param WP_Error $user The WP_Error object
    573574                 */
    574                 do_action( 'wp_login_failed', $username );
     575                do_action( 'wp_login_failed', $username, $user );
    575576        }
    576577
    577578        return $user;
     
    15041505         *
    15051506         * @param string $message_headers Headers for the comment notification email.
    15061507         * @param int    $comment_id      Comment ID.
     1508         * @param int    $post_id         Post ID.
     1509         * @param int    $blog_id         Blog ID.
    15071510         */
    1508         $message_headers = apply_filters( 'comment_notification_headers', $message_headers, $comment_id );
     1511        $message_headers = apply_filters( 'comment_notification_headers', $message_headers, $comment_id, $post->ID, get_current_blog_id() );
    15091512
    15101513        foreach ( $emails as $email ) {
    15111514                @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
  • wp-includes/media.php

     
    10171017                return '';
    10181018        }
    10191019
     1020        /**
     1021         * Filter the post gallery attachments, to allow custom sorting not possible in the get_children() query.
     1022         *
     1023         * @since 4.2
     1024         *
     1025         * @param array   $attachments  The list of attachments, an array of objects
     1026         * @param string  $attr         Attributes to the shortcode
     1027         */
     1028        $attachments = apply_filters( 'post_gallery_attachments', $attachments, $attr );
     1029
    10201030        if ( is_feed() ) {
    10211031                $output = "\n";
    10221032                foreach ( $attachments as $att_id => $attachment ) {
  • wp-includes/functions.php

     
    527527                }
    528528        }
    529529
     530        /**
     531         * Filter the list of enclosure links to check.
     532         *
     533         * @since 4.2
     534         *
     535         * @param array        $post_links  The array of links.
     536         * @param int          $post_ID  Post ID.
     537         */
     538        $post_links = apply_filters( 'do_enclose_links', $post_links, $post_ID );
     539
    530540        foreach ( (array) $post_links as $url ) {
    531541                if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $url ) . '%' ) ) ) {
    532542
     
    17911801                }
    17921802        }
    17931803
     1804        /**
     1805         * Filter the upload basedir.
     1806         *
     1807         * @since 4.2
     1808         *
     1809         * @param string       $dir The base directory.
     1810         */
     1811        $dir = apply_filters( 'upload_basedir', $dir );
     1812        /**
     1813         * Filter the upload base URL.
     1814         *
     1815         * @since 4.2
     1816         *
     1817         * @param string       $url The base URL.
     1818         */
     1819        $url = apply_filters( 'upload_baseurl', $url );
     1820
    17941821        $basedir = $dir;
    17951822        $baseurl = $url;
    17961823
  • wp-admin/upload.php

     
    8282                <div class="error hide-if-js">
    8383                        <p><?php _e( 'The grid view for the Media Library requires JavaScript. <a href="upload.php?mode=list">Switch to the list view</a>.' ); ?></p>
    8484                </div>
     85                <?php
     86                /**
     87                 * Fires when the media grid view is rendered.
     88                 *
     89                 * @since 4.2
     90                 */
     91                do_action( 'media-library-ui' );
     92                ?>
    8593        </div>
    8694        <?php
    8795        include( ABSPATH . 'wp-admin/admin-footer.php' );
     
    262270
    263271if ( !empty($message) ) { ?>
    264272<div id="message" class="updated"><p><?php echo $message; ?></p></div>
    265 <?php } ?>
     273<?php }
     274/**
     275 * Fires when the media grid view is rendered.
     276 *
     277 * @since 4.2
     278 */
     279do_action('media-library-ui'); // WPCOM
     280?>
    266281
    267282<form id="posts-filter" method="get">
    268283
  • wp-admin/revision.php

     
    8686if ( ! $redirect && empty( $post->post_type ) )
    8787        $redirect = 'edit.php';
    8888
     89/**
     90 * Filter the revision redirect URL.
     91 *
     92 * @since 4.2.0
     93 *
     94 * @param string       $redirect The destination URL.
     95 */
     96$redirect = apply_filters('revision_redirect', $redirect);
     97
    8998if ( ! empty( $redirect ) ) {
    9099        wp_redirect( $redirect );
    91100        exit;
  • wp-admin/includes/update.php

     
    222222        }
    223223
    224224        $msg = sprintf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name );
    225 
     225       
    226226        if ( current_user_can('update_core') ) {
    227227                $cur = get_preferred_from_update_core();
    228228
     
    230230                        $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
    231231        }
    232232
     233        /**
     234         * Filter the update right now message.
     235         *
     236         * @since 4.2
     237         *
     238         * @param string $msg         Complete message string.
     239         * @param string $theme_name  Theme name.
     240         */
     241        $msg = apply_filters( 'update_right_now_message', $msg, $theme_name );
     242
    233243        echo "<p id='wp-version-message'>$msg</p>";
    234244}
    235245
  • wp-admin/includes/ajax-actions.php

     
    18151815        if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) {
    18161816                $sidebars[$sidebar_id] = $sidebar;
    18171817                wp_set_sidebars_widgets($sidebars);
     1818                /**
     1819                 * Fires after a widget is deleted.
     1820                 *
     1821                 * @since 4.2
     1822                 *
     1823                 * @param $id_base    Base ID of the removed widget.
     1824                 */
     1825                do_action( 'widget_removed', $id_base );
    18181826                echo "deleted:$widget_id";
    18191827                wp_die();
    18201828        }
    18211829
    1822         if ( !empty($_POST['add_new']) )
     1830        if ( !empty($_POST['add_new']) ) {
     1831                /**
     1832                 * Fires after a widget is added.
     1833                 *
     1834                 * @since 4.2
     1835                 *
     1836                 * @param $id_base    Base ID of the removed widget.
     1837                 */
     1838                do_action( 'widget_added', $id_base );
    18231839                wp_die();
     1840        }
    18241841
    18251842        if ( $form = $wp_registered_widget_controls[$widget_id] )
    18261843                call_user_func_array( $form['callback'], $form['params'] );