=' ); } /** * Replaces WP's default update notice on plugins.php with an error message, when site is not running PHP 5.3 or greater. * * Originally hooked to 'load-plugins.php' with priority 100. * * @since 2.7.0 * @deprecated 2.8.0 */ function bp_core_admin_maybe_disable_update_row_for_php53_requirement() { if ( bp_core_admin_is_running_php53_or_greater() ) { return; } $loader = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php'; remove_action( "after_plugin_row_{$loader}", 'wp_plugin_update_row', 10 ); add_action( "after_plugin_row_{$loader}", 'bp_core_admin_php52_plugin_row', 10, 2 ); } /** * On the "Dashboard > Updates" page, remove BuddyPress from plugins list if PHP < 5.3. * * Originally hooked to 'load-update-core.php'. * * @since 2.7.0 * @deprecated 2.8.0 */ function bp_core_admin_maybe_remove_from_update_core() { if ( bp_core_admin_is_running_php53_or_greater() ) { return; } // Add filter to remove BP from the update plugins list. add_filter( 'site_transient_update_plugins', 'bp_core_admin_remove_buddypress_from_update_transient' ); } /** * Filter callback to remove BuddyPress from the update plugins list. * * Attached to the 'site_transient_update_plugins' filter. * * @since 2.7.0 * @deprecated 2.8.0 * * @param object $retval Object of plugin update data. * @return object */ function bp_core_admin_remove_buddypress_from_update_transient( $retval ) { _deprecated_function( __FUNCTION__, '2.8' ); $loader = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php'; // Remove BP from update plugins list. if ( isset( $retval->response[ $loader ] ) ) { unset( $retval->response[ $loader ] ); } return $retval; } /** * Outputs a replacement for WP's default update notice, when site is not running PHP 5.3 or greater. * * When we see that a site is not running PHP 5.3 and is trying to update to * BP 2.8+, we replace WP's default notice with our own, which both provides a * link to our documentation of the requirement, and removes the link that * allows a single plugin to be updated. * * @since 2.7.0 * @deprecated 2.8.0 * * @param string $file Plugin filename. buddypress/bp-loader.php. * @param array $plugin_data Data about the BuddyPress plugin, as returned by the * plugins API. */ function bp_core_admin_php52_plugin_row( $file, $plugin_data ) { _deprecated_function( __FUNCTION__, '2.8' ); if ( is_multisite() && ! is_network_admin() ) { return; } $current = get_site_transient( 'update_plugins' ); if ( ! isset( $current->response[ $file ] ) ) { return false; } $response = $current->response[ $file ]; // No need to do this if update is for < BP 2.8. if ( version_compare( $response->new_version, '2.8', '<' ) ) { return false; } $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); if ( is_network_admin() ) { $active_class = is_plugin_active_for_network( $file ) ? ' active' : ''; } else { $active_class = is_plugin_active( $file ) ? ' active' : ''; } // WP 4.6 uses different markup for the plugin row notice. if ( function_exists( 'wp_get_ext_types' ) ) { $p = '

%s

'; // WP < 4.6. } else { $p = '%s'; // Ugh. $active_class .= ' not-shiny'; } echo '
'; printf( $p, esc_html__( 'A BuddyPress update is available, but your system is not compatible.', 'buddypress' ) . ' ' . sprintf( __( 'See the Codex guide for more information.', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' ) ); echo '
'; /* * JavaScript to disable the bulk upgrade checkbox. * See WP_Plugins_List_Table::single_row(). */ $checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] ); echo ""; } /** * Add an admin notice to installations that are not running PHP 5.3+. * * @since 2.7.0 * @deprecated 2.8.0 */ 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 ); ?>

  the Codex guide for more information.', 'deprecated string', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' ); ?>