Changeset 6784
- Timestamp:
- 02/16/2018 10:37:15 PM (7 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/formatting.php
r6774 r6784 748 748 return $reason; 749 749 } 750 -
trunk/src/includes/common/functions.php
r6782 r6784 2310 2310 : 'http://'; 2311 2311 } 2312 2313 /** Titles ********************************************************************/ 2314 2315 /** 2316 * Is a title longer that the maximum title length? 2317 * 2318 * @since 2.6.0 bbPress (r6783) 2319 * 2320 * @param string $title 2321 * @return bool 2322 */ 2323 function bbp_is_title_too_long( $title = '' ) { 2324 $max = bbp_get_title_max_length(); 2325 $len = mb_strlen( $title, '8bit' ); 2326 $result = ( $len > $max ); 2327 2328 // Filter & return 2329 return (bool) apply_filters( 'bbp_is_title_too_long', $result, $title, $max, $len ); 2330 } -
trunk/src/includes/forums/functions.php
r6733 r6784 162 162 } 163 163 164 // Title too long 165 if ( bbp_is_title_too_long( $forum_title ) ) { 166 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) ); 167 } 168 164 169 /** Forum Content *********************************************************/ 165 170 … … 446 451 } 447 452 453 // Title too long 454 if ( bbp_is_title_too_long( $forum_title ) ) { 455 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) ); 456 } 457 448 458 /** Forum Content *********************************************************/ 449 459 -
trunk/src/includes/replies/functions.php
r6721 r6784 275 275 $reply_title = apply_filters( 'bbp_new_reply_pre_title', $reply_title ); 276 276 277 // Title too long 278 if ( bbp_is_title_too_long( $reply_title ) ) { 279 bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) ); 280 } 281 277 282 /** Reply Content *********************************************************/ 278 283 … … 587 592 $reply_title = apply_filters( 'bbp_edit_reply_pre_title', $reply_title, $reply_id ); 588 593 594 // Title too long 595 if ( bbp_is_title_too_long( $reply_title ) ) { 596 bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) ); 597 } 598 589 599 /** Reply Content *********************************************************/ 590 600 -
trunk/src/includes/topics/functions.php
r6777 r6784 159 159 } 160 160 161 // Title too long 162 if ( bbp_is_title_too_long( $topic_title ) ) { 163 bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) ); 164 } 165 161 166 /** Topic Content *********************************************************/ 162 167 … … 526 531 } 527 532 533 // Title too long 534 if ( bbp_is_title_too_long( $topic_title ) ) { 535 bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) ); 536 } 537 528 538 /** Topic Content *********************************************************/ 529 539
Note: See TracChangeset
for help on using the changeset viewer.