Warning: This function has been deprecated.

bp_core_admin_php53_admin_notice()

Add an admin notice to installations that are not running PHP 5.3+.


Description Description


Source Source

File: bp-core/deprecated/2.8.php

function bp_core_admin_php53_admin_notice() {
	_deprecated_function( __FUNCTION__, '2.8' );

	// If not on the Plugins page, stop now.
	if ( 'plugins' !== get_current_screen()->parent_base ) {
		return;
	}

	if ( ! current_user_can( 'update_core' ) ) {
		return;
	}

	if ( bp_core_admin_is_running_php53_or_greater() ) {
		return;
	}

	$notice_id = 'bp28-php53';
	if ( bp_get_option( "bp-dismissed-notice-$notice_id" ) ) {
		return;
	}

	$bp  = buddypress();
	$min = bp_core_get_minified_asset_suffix();

	wp_enqueue_script(
		'bp-dismissible-admin-notices',
		"{$bp->plugin_url}bp-core/admin/js/dismissible-admin-notices{$min}.js",
		array( 'jquery' ),
		bp_get_version(),
		true
	);
	?>

	<div id="message" class="error notice is-dismissible bp-is-dismissible" data-noticeid="<?php echo esc_attr( $notice_id ); ?>">
		<p><strong><?php esc_html_e( 'Your site is not ready for BuddyPress 2.8.', 'buddypress' ); ?></strong></p>
		<p><?php printf( esc_html__( 'Your site is currently running PHP version %s, while BuddyPress 2.8 will require version 5.3+.', 'buddypress' ), esc_html( phpversion() ) ); ?> <?php printf( __( 'See <a href="%s">the Codex guide</a> for more information.', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' ); ?></p>
		<?php wp_nonce_field( "bp-dismissible-notice-$notice_id", "bp-dismissible-nonce-$notice_id" ); ?>
	</div>
	<?php
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.8.0 This function has been deprecated.
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.