bbp_is_title_too_long( string $title = '' )

Is a title longer that the maximum title length?


Description Description

Uses mb_strlen() in 8bit mode to treat strings as raw. This matches the behavior present in Comments, PHPMailer, RandomCompat, and others.


Parameters Parameters

$title

(Optional)

Default value: ''


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/common/functions.php

function bbp_is_title_too_long( $title = '' ) {
	$max    = bbp_get_title_max_length();
	$len    = mb_strlen( $title, '8bit' );
	$result = ( $len > $max );

	// Filter & return
	return (bool) apply_filters( 'bbp_is_title_too_long', $result, $title, $max, $len );
}

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.