Changeset 3246
- Timestamp:
- 05/28/2011 06:00:50 AM (15 years ago)
- Location:
- branches/plugin
- Files:
-
- 3 edited
-
bbp-includes/bbp-core-options.php (modified) (2 diffs)
-
bbp-includes/bbp-general-template.php (modified) (2 diffs)
-
bbp-themes/bbp-twentyten/bbpress/form-topic.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-options.php
r3243 r3246 99 99 /** Topics ************************************************************/ 100 100 101 // Title Max Length 102 '_bbp_title_max_length' => '80', 103 101 104 // Super stickies 102 105 '_bbp_super_sticky_topics' => '', … … 161 164 */ 162 165 function bbp_allow_anonymous( $default = false ) { 163 return apply_filters( 'bbp_allow_anonymous', get_option( '_bbp_allow_anonymous', $default ) );166 return apply_filters( 'bbp_allow_anonymous', (bool) get_option( '_bbp_allow_anonymous', $default ) ); 164 167 } 165 168 169 /** 170 * Output the maximum length of a title 171 * 172 * @since bbPress (r3246) 173 * 174 * @param $default bool Optional. Default value 175 */ 176 function bbp_title_max_length( $default = '80' ) { 177 echo bbp_get_title_max_length( $default ); 178 } 179 /** 180 * Return the maximum length of a title 181 * 182 * @since bbPress (r3246) 183 * 184 * @param $default bool Optional. Default value 185 * 186 * @uses get_option() To get the maximum title length 187 * @return int Is anonymous posting allowed? 188 */ 189 function bbp_get_title_max_length( $default = '80' ) { 190 return apply_filters( 'bbp_get_title_max_length', (int) get_option( '_bbp_title_max_length', $default ) ); 191 } 192 166 193 ?> -
branches/plugin/bbp-includes/bbp-general-template.php
r3243 r3246 845 845 if ( bbp_is_reply_edit() ) { ?> 846 846 847 <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" />847 <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" maxlength="<?php bbp_get_title_max_length(); ?>" /> 848 848 <input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php bbp_reply_id(); ?>" /> 849 849 <input type="hidden" name="action" id="bbp_post_action" value="bbp-edit-reply" /> … … 862 862 ?> 863 863 864 <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" />864 <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" maxlength="<?php bbp_get_title_max_length(); ?>" /> 865 865 <input type="hidden" name="bbp_forum_id" id="bbp_forum_id" value="<?php bbp_forum_id(); ?>" /> 866 866 <input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="<?php bbp_topic_id(); ?>" /> -
branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-topic.php
r3236 r3246 58 58 59 59 <p> 60 <label for="bbp_topic_title"><?php _e( 'Topic Title:', 'bbpress'); ?></label><br />61 <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" />60 <label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br /> 61 <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" /> 62 62 </p> 63 63
Note: See TracChangeset
for help on using the changeset viewer.