Make WordPress Core

Changeset 26540


Ignore:
Timestamp:
12/02/2013 09:54:24 PM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/includes/update.php.

Props stevenkword for the initial patches.
Fixes #26252.

File:
1 edited

Legend:

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

    r26186 r26540  
    286286            printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );
    287287
    288         do_action( "in_plugin_update_message-$file", $plugin_data, $r );
     288        /**
     289         * Fires at the end of the update message container in each
     290         * row of the plugins list table.
     291         *
     292         * The dynamic portion of the hook name, $file, refers to the path
     293         * of the plugin's primary file relative to the plugins directory.
     294         *
     295         * @since 2.8.0
     296         *
     297         * @param array $plugin_data {
     298         *     An array of plugin metadata.
     299         *
     300         *     @type string $name         The human-readable name of the plugin.
     301         *     @type string $plugin_uri   Plugin URI.
     302         *     @type string $version      Plugin version.
     303         *     @type string $description  Plugin description.
     304         *     @type string $author       Plugin author.
     305         *     @type string $author_uri   Plugin author URI.
     306         *     @type string $text_domain  Plugin text domain.
     307         *     @type string $domain_path  Relative path to the plugin's .mo file(s).
     308         *     @type bool   $network      Whether the plugin can only be activated network wide.
     309         *     @type string $title        The human-readable title of the plugin.
     310         *     @type string $author_name  Plugin author's name.
     311         *     @type bool   $update       Whether there's an available update. Default null.
     312         * }
     313         * @param array $r {
     314         *     An array of metadata about the available plugin update.
     315         *
     316         *     @type int    $id           Plugin ID.
     317         *     @type string $slug         Plugin slug.
     318         *     @type string $new_version  New plugin version.
     319         *     @type string $url          Plugin URL.
     320         *     @type string $package      Plugin update package URL.
     321         * }
     322         */
     323        do_action( "in_plugin_update_message-{$file}", $plugin_data, $r );
    289324
    290325        echo '</div></td></tr>';
     
    343378        printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) );
    344379
    345     do_action( "in_theme_update_message-$theme_key", $theme, $r );
     380    /**
     381     * Fires at the end of the update message container in each
     382     * row of the themes list table.
     383     *
     384     * The dynamic portion of the hook name, $theme_key, refers to
     385     * the theme slug as found in the WordPress.org themes repository.
     386     *
     387     * @since 3.1.0
     388     *
     389     * @param WP_Theme $theme The WP_Theme object.
     390     * @param array    $r {
     391     *     An array of metadata about the available theme update.
     392     *
     393     *     @type string $new_version New theme version.
     394     *     @type string $url         Theme URL.
     395     *     @type string $package     Theme update package URL.
     396     * }
     397     */
     398    do_action( "in_theme_update_message-{$theme_key}", $theme, $r );
    346399
    347400    echo '</div></td></tr>';
Note: See TracChangeset for help on using the changeset viewer.