wp_increase_content_media_count

The timeline below displays how wordpress function wp_increase_content_media_count has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.9

/**
 * Increases an internal content media count variable.
 *
 * @since 5.9.0
 * @access private
 *
 * @param int $amount Optional. Amount to increase by. Default 1.
 * @return int The latest content media count, after the increase.
 */
function wp_increase_content_media_count($amount = 1)
{
    static $content_media_count = 0;
    $content_media_count += $amount;
    return $content_media_count;
}