bbp_maybe_append_pending_upgrade_count( string $string = '', string $type = '' )

Maybe append an upgrade count to a string


Description Description


Parameters Parameters

$string

(Optional) Text to append count to

Default value: ''

$type

(Optional) Type of pending upgrades (upgrade|repair|empty)

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/core/update.php

function bbp_maybe_append_pending_upgrade_count( $string = '', $type = '' ) {

	// Look for an upgrade count
	$count = bbp_get_pending_upgrade_count( $type );

	// Append the count to the string
	if ( ! empty( $count ) ) {
		$suffix = ' <span class="awaiting-mod count-' . absint( $count ) . '"><span class="pending-count">' . bbp_number_format( $count ) . '</span></span>';
		$string = "{$string}{$suffix}";
	}

	// Return the string, maybe with a count
	return $string;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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