Changeset 4067
- Timestamp:
- 07/07/2012 04:24:49 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-options.php
r4065 r4067 30 30 /** Settings **********************************************************/ 31 31 32 '_bbp_edit_lock' => '5',// Lock post editing after 5 minutes33 '_bbp_throttle_time' => '10',// Throttle post time to 10 seconds34 '_bbp_enable_favorites' => true,// Favorites35 '_bbp_enable_subscriptions' => true,// Subscriptions36 '_bbp_allow_anonymous' => false,// Allow anonymous posting37 '_bbp_allow_global_access' => false,// Users from all sites can post38 '_bbp_use_wp_editor' => true,// Use the WordPress editor if available39 '_bbp_use_autoembed' => false,// Allow oEmbed in topics and replies32 '_bbp_edit_lock' => 5, // Lock post editing after 5 minutes 33 '_bbp_throttle_time' => 10, // Throttle post time to 10 seconds 34 '_bbp_enable_favorites' => 1, // Favorites 35 '_bbp_enable_subscriptions' => 1, // Subscriptions 36 '_bbp_allow_anonymous' => 0, // Allow anonymous posting 37 '_bbp_allow_global_access' => 0, // Users from all sites can post 38 '_bbp_use_wp_editor' => 1, // Use the WordPress editor if available 39 '_bbp_use_autoembed' => 0, // Allow oEmbed in topics and replies 40 40 '_bbp_theme_package_id' => 'default', // The ID for the current theme packag. 41 41 42 42 /** Per Page **********************************************************/ 43 43 44 '_bbp_topics_per_page' => '15',// Topics per page45 '_bbp_replies_per_page' => '15',// Replies per page46 '_bbp_forums_per_page' => '50',// Forums per page47 '_bbp_topics_per_rss_page' => '25',// Topics per RSS page48 '_bbp_replies_per_rss_page' => '25',// Replies per RSS page44 '_bbp_topics_per_page' => 15, // Topics per page 45 '_bbp_replies_per_page' => 15, // Replies per page 46 '_bbp_forums_per_page' => 50, // Forums per page 47 '_bbp_topics_per_rss_page' => 25, // Topics per RSS page 48 '_bbp_replies_per_rss_page' => 25, // Replies per RSS page 49 49 50 50 /** Page For **********************************************************/ 51 51 52 '_bbp_page_for_forums' => '0',// Page for forums53 '_bbp_page_for_topics' => '0',// Page for forums54 '_bbp_page_for_login' => '0',// Page for login55 '_bbp_page_for_register' => '0',// Page for register56 '_bbp_page_for_lost_pass' => '0',// Page for lost-pass52 '_bbp_page_for_forums' => 0, // Page for forums 53 '_bbp_page_for_topics' => 0, // Page for forums 54 '_bbp_page_for_login' => 0, // Page for login 55 '_bbp_page_for_register' => 0, // Page for register 56 '_bbp_page_for_lost_pass' => 0, // Page for lost-pass 57 57 58 58 /** Archive Slugs *****************************************************/ … … 63 63 /** Single Slugs ******************************************************/ 64 64 65 '_bbp_include_root' => true,// Include forum-archive before single slugs65 '_bbp_include_root' => 1, // Include forum-archive before single slugs 66 66 '_bbp_forum_slug' => 'forum', // Forum slug 67 67 '_bbp_topic_slug' => 'topic', // Topic slug … … 76 76 /** Topics ************************************************************/ 77 77 78 '_bbp_title_max_length' => '80',// Title Max Length78 '_bbp_title_max_length' => 80, // Title Max Length 79 79 '_bbp_super_sticky_topics' => '', // Super stickies 80 80 … … 86 86 /** BuddyPress ********************************************************/ 87 87 88 '_bbp_enable_group_forums' => true,// Enable BuddyPress Group Extension89 '_bbp_group_forums_root_id' => '0',// Group Forums parent forum id88 '_bbp_enable_group_forums' => 1, // Enable BuddyPress Group Extension 89 '_bbp_group_forums_root_id' => 0, // Group Forums parent forum id 90 90 91 91 /** Akismet ***********************************************************/ 92 92 93 '_bbp_enable_akismet' => true// Users from all sites can post93 '_bbp_enable_akismet' => 1 // Users from all sites can post 94 94 95 95 ) ); … … 165 165 * @return mixed false if not overloaded, mixed if set 166 166 */ 167 function bbp_pre_get_option( $value = false) {167 function bbp_pre_get_option( $value = '' ) { 168 168 $bbp = bbpress(); 169 169 … … 189 189 * @return bool Is favorites enabled or not 190 190 */ 191 function bbp_is_favorites_active( $default = true) {191 function bbp_is_favorites_active( $default = 1 ) { 192 192 return (bool) apply_filters( 'bbp_is_favorites_active', (bool) get_option( '_bbp_enable_favorites', $default ) ); 193 193 } … … 201 201 * @return bool Is subscription enabled or not 202 202 */ 203 function bbp_is_subscriptions_active( $default = true) {203 function bbp_is_subscriptions_active( $default = 1 ) { 204 204 return (bool) apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions', $default ) ); 205 205 } … … 213 213 * @return bool Are revisions allowed? 214 214 */ 215 function bbp_allow_revisions( $default = true) {215 function bbp_allow_revisions( $default = 1 ) { 216 216 return (bool) apply_filters( 'bbp_allow_revisions', (bool) get_option( '_bbp_allow_revisions', $default ) ); 217 217 } … … 225 225 * @return bool Is anonymous posting allowed? 226 226 */ 227 function bbp_allow_anonymous( $default = false) {227 function bbp_allow_anonymous( $default = 0 ) { 228 228 return apply_filters( 'bbp_allow_anonymous', (bool) get_option( '_bbp_allow_anonymous', $default ) ); 229 229 } … … 237 237 * @return bool Is global access allowed? 238 238 */ 239 function bbp_allow_global_access( $default = false) {239 function bbp_allow_global_access( $default = 0 ) { 240 240 return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) ); 241 241 } … … 249 249 * @return bool Use WP editor? 250 250 */ 251 function bbp_use_wp_editor( $default = true) {251 function bbp_use_wp_editor( $default = 1 ) { 252 252 return (bool) apply_filters( 'bbp_use_wp_editor', (bool) get_option( '_bbp_use_wp_editor', $default ) ); 253 253 } … … 261 261 * @return bool Use oEmbed? 262 262 */ 263 function bbp_use_autoembed( $default = true) {263 function bbp_use_autoembed( $default = 1 ) { 264 264 return (bool) apply_filters( 'bbp_use_autoembed', (bool) get_option( '_bbp_use_autoembed', $default ) ); 265 265 } … … 283 283 * @param $default bool Optional. Default value 80 284 284 */ 285 function bbp_title_max_length( $default = '80') {285 function bbp_title_max_length( $default = 80 ) { 286 286 echo bbp_get_title_max_length( $default ); 287 287 } … … 294 294 * @return int Is anonymous posting allowed? 295 295 */ 296 function bbp_get_title_max_length( $default = '80') {296 function bbp_get_title_max_length( $default = 80 ) { 297 297 return (int) apply_filters( 'bbp_get_title_max_length', (int) get_option( '_bbp_title_max_length', $default ) ); 298 298 } … … 302 302 * 303 303 * @since bbPress (r3575) 304 * @param $default boolOptional. Default value305 */ 306 function bbp_group_forums_root_id( $default = '0') {304 * @param $default int Optional. Default value 305 */ 306 function bbp_group_forums_root_id( $default = 0 ) { 307 307 echo bbp_get_group_forums_root_id( $default ); 308 308 } … … 312 312 * @since bbPress (r3575) 313 313 * @param $default bool Optional. Default value 0 314 * @uses get_option() To get the maximum title length315 * @return int Is anonymous posting allowed?314 * @uses get_option() To get the root group forum ID 315 * @return int The post ID for the root forum 316 316 */ 317 function bbp_get_group_forums_root_id( $default = '0') {317 function bbp_get_group_forums_root_id( $default = 0 ) { 318 318 return (int) apply_filters( 'bbp_get_group_forums_root_id', (int) get_option( '_bbp_group_forums_root_id', $default ) ); 319 319 } … … 327 327 * @return bool Is group forums enabled or not 328 328 */ 329 function bbp_is_group_forums_active( $default = true) {329 function bbp_is_group_forums_active( $default = 1 ) { 330 330 return (bool) apply_filters( 'bbp_is_group_forums_active', (bool) get_option( '_bbp_enable_group_forums', $default ) ); 331 331 } … … 339 339 * @return bool Is Akismet enabled or not 340 340 */ 341 function bbp_is_akismet_active( $default = true) {341 function bbp_is_akismet_active( $default = 1 ) { 342 342 return (bool) apply_filters( 'bbp_is_akismet_active', (bool) get_option( '_bbp_enable_akismet', $default ) ); 343 343 } … … 359 359 * 360 360 * @since bbPress (r3759) 361 * @return string362 */ 363 function bbp_include_root_slug( $default = true) {361 * @return bool 362 */ 363 function bbp_include_root_slug( $default = 1 ) { 364 364 return (bool) apply_filters( 'bbp_include_root_slug', (bool) get_option( '_bbp_include_root', $default ) ); 365 365 }
Note: See TracChangeset
for help on using the changeset viewer.