wp_direct_php_update_button()
- Since
- 5.1.1
- Source
wp-includes/functions.php:8557
Displays a button directly linking to a PHP update process.
Description
This provides hosts with a way for users to be sent directly to their PHP update process. The button is only displayed if a URL is returned by
wp_get_direct_php_update_url().Uses · 3
- wp_get_direct_php_update_url()Gets the URL for directly updating the PHP version the site is running on.
- esc_url()Checks and cleans a URL.
- __()Retrieves the translation of $text.
Used by · 1
- wp_dashboard_php_nag()Displays the PHP update nag.
Source
function wp_direct_php_update_button() { $direct_update_url = wp_get_direct_php_update_url(); if ( empty( $direct_update_url ) ) { return; } echo '<p class="button-container">'; printf( '<a class="button button-primary" href="%1$s" target="_blank">%2$s<span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>', esc_url( $direct_update_url ), __( 'Update PHP' ), /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) ); echo '</p>';}History
Introduced in 5.1.1. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, from
src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.