Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_dashboard_php_nag ›

Seit5.0.0
Veraltetn/v
wp_dashboard_php_nag ( Keine Parameter )
Definiert in:
Codex:

Displays the PHP upgrade nag.



Quellcode

function wp_dashboard_php_nag() {
	$response = wp_check_php_version();

	if ( ! $response ) {
		return;
	}

	if ( isset( $response['is_secure'] ) && ! $response['is_secure'] ) {
		$msg = __( 'WordPress has detected that your site is running on an insecure version of PHP.' );
	} else {
		$msg = __( 'WordPress has detected that your site is running on an outdated version of PHP.' );
	}

	?>
	<p><?php echo $msg; ?></p>

	<h3><?php _e( 'What is PHP and how does it affect my site?' ); ?></h3>
	<p><?php _e( 'PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance.' ); ?></p>

	<p class="button-container">
		<?php
			printf(
				'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
				esc_url( _x( 'https://wordpress.org/support/upgrade-php/', 'localized PHP upgrade information page' ) ),
				__( 'Learn more about updating PHP' ),
				/* translators: accessibility text */
				__( '(opens in a new tab)' )
			);
		?>
	</p>
	<?php
}