This function has been deprecated. BuddyPress 2.8.0 instead.

bp_core_admin_php53_admin_notice()

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

Description

Source

File: bp-core/deprecated/buddypress/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.', 'buddyboss' ); ?></strong></p>
		<p><?php printf( esc_html__( 'Your site is currently running PHP version %s, while BuddyPress 2.8 will require version 5.3+.', 'buddyboss' ), esc_html( phpversion() ) ); ?> <?php printf( __( 'See <a href="%s">the Codex guide</a> for more information.', 'buddyboss' ), '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
}

Changelog

Changelog
Version Description
BuddyPress 2.8.0 BuddyPress 2.8.0
BuddyPress 2.7.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.