bp_core_admin_php53_admin_notice

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

Description

bp_core_admin_php53_admin_notice(); 

Usage

  1. if ( !function_exists( 'bp_core_admin_php53_admin_notice' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/2.8.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_admin_php53_admin_notice(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/deprecated/2.8.php  
  1. function bp_core_admin_php53_admin_notice() { 
  2. // If not on the Plugins page, stop now. 
  3. if ( 'plugins' !== get_current_screen()->parent_base ) { 
  4. return; 
  5.  
  6. if ( ! current_user_can( 'update_core' ) ) { 
  7. return; 
  8.  
  9. return; 
  10.  
  11. $notice_id = 'bp28-php53'; 
  12. if ( bp_get_option( "bp-dismissed-notice-$notice_id" ) ) { 
  13. return; 
  14.  
  15. $bp =buddypress); 
  16.  
  17. 'bp-dismissible-admin-notices',  
  18. "{$bp->plugin_url}bp-core/admin/js/dismissible-admin-notices{$min}.js",  
  19. array( 'jquery' ),  
  20. true 
  21. ); 
  22.  
  23. $php_version = PHP_VERSION; 
  24.  
  25. ?> 
  26.  
  27. <div id="message" class="error notice is-dismissible bp-is-dismissible" data-noticeid="<?php echo esc_attr( $notice_id ); ?>"> 
  28. <p><strong><?php esc_html_e( 'Your site is not ready for BuddyPress 2.8.', buddypress ); ?></strong></p> 
  29. <p><?php printf( esc_html__( 'Your site is currently running PHP version %s, while BuddyPress 2.8 will require version 5.3+.', buddypress ), $php_version ); ?> <?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> 
  30. <?php wp_nonce_field( "bp-dismissible-notice-$notice_id", "bp-dismissible-nonce-$notice_id" ); ?> 
  31. </div> 
  32. <?php