X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..256a3b381f63716209b3527d0a14442ae570c283:/wp-admin/update.php diff --git a/wp-admin/update.php b/wp-admin/update.php index caed6e79..4290e58d 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -10,7 +10,7 @@ if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['action'] ) && in_array( $_GE define( 'IFRAME_REQUEST', true ); /** WordPress Administration Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; @@ -252,6 +252,15 @@ if ( isset($_GET['action']) ) { include(ABSPATH . 'wp-admin/admin-footer.php'); } else { - do_action('update-custom_' . $action); + /** + * Fires when a custom plugin or theme update request is received. + * + * The dynamic portion of the hook name, $action, refers to the action + * provided in the request for wp-admin/update.php. Can be used to + * provide custom update functionality for themes and plugins. + * + * @since 2.8.0 + */ + do_action( "update-custom_{$action}" ); } }