wp_increase_content_media_count()WP 5.9.0

Increases an internal content media count variable.

Хуков нет.

Возвращает

int. The latest content media count, after the increase.

Использование

wp_increase_content_media_count( $amount );
$amount(int)
Amount to increase by.
По умолчанию: 1

Список изменений

С версии 5.9.0 Введена.

Код wp_increase_content_media_count() WP 6.0

function wp_increase_content_media_count( $amount = 1 ) {
	static $content_media_count = 0;

	$content_media_count += $amount;

	return $content_media_count;
}