Changeset 6026
- Timestamp:
- 05/13/2012 04:52:16 PM (13 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-settings.php
r5885 r6026 263 263 264 264 <?php 265 }266 267 /**268 * Contextual help for BuddyPress settings page269 *270 * @since BuddyPress (r3119)271 */272 function bp_core_admin_settings_help() {273 274 $bp_contextual_help[] = __('This screen provides access to basic BuddyPress settings.', 'buddypress' );275 $bp_contextual_help[] = __('In the Main Settings you have a number of options:', 'buddypress' );276 $bp_contextual_help[] =277 '<ul>' .278 '<li>' . __( 'You can choose to lock a post after a certain number of minutes. "Locking post editing" will prevent the author from editing some amount of time after saving a post.', 'buddypress' ) . '</li>' .279 '<li>' . __( '"Throttle time" is the amount of time required between posts from a single author. The higher the throttle time, the longer a user will need to wait between posting to the forum.', 'buddypress' ) . '</li>' .280 '<li>' . __( 'You may choose to allow favorites, which are a way for users to save and later return to topics they favor. This is enabled by default.', 'buddypress' ) . '</li>' .281 '<li>' . __( 'You may choose to allow subscriptions, which allows users to subscribe for notifications to topics that interest them. This is enabled by default.', 'buddypress' ) . '</li>' .282 '<li>' . __( 'You may choose to allow "Anonymous Posting", which will allow guest users who do not have accounts on your site to both create topics as well as replies.', 'buddypress' ) . '</li>' .283 '</ul>';284 285 $bp_contextual_help[] = __( 'Per Page settings allow you to control the number of topics and replies will appear on each of those pages. This is comparable to the WordPress "Reading Settings" page, where you can set the number of posts that should show on blog pages and in feeds.', 'buddypress' );286 $bp_contextual_help[] = __( 'The Forums section allows you to control the permalink structure for your forums. Each "base" is what will be displayed after your main URL and right before your permalink slug.', 'buddypress' );287 $bp_contextual_help[] = __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.', 'buddypress' );288 $bp_contextual_help[] = __( '<strong>For more information:</strong>', 'buddypress' );289 $bp_contextual_help[] =290 '<ul>' .291 '<li>' . __( '<a href="http://buddypress.org/documentation/">BuddyPress Documentation</a>', 'buddypress' ) . '</li>' .292 '<li>' . __( '<a href="http://buddypress.org/forums/">BuddyPress Support Forums</a>', 'buddypress' ) . '</li>' .293 '</ul>' ;294 295 // Empty the default $contextual_help var296 $contextual_help = '';297 298 // Wrap each help item in paragraph tags299 foreach( $bp_contextual_help as $paragraph )300 $contextual_help .= '<p>' . $paragraph . '</p>';301 302 // Add help303 add_contextual_help( 'settings_page_buddypress', $contextual_help );304 265 } 305 266 -
trunk/bp-core/bp-core-admin.php
r6022 r6026 49 49 50 50 /** 51 * @var string URL to the BuddyPress admin styles directory52 */53 public $styles_url = '';54 55 /**56 51 * @var string URL to the BuddyPress admin CSS directory 57 52 */ … … 63 58 public $js_url = ''; 64 59 65 /** Recounts **************************************************************/66 67 /**68 * @var bool Enable recounts in Tools area69 */70 public $enable_recounts = false;71 72 /** Admin Scheme **********************************************************/73 74 /**75 * @var int Depth of custom WP_CONTENT_DIR difference76 */77 public $content_depth = 0;78 60 79 61 /** Methods ***************************************************************/ … … 117 99 // Admin css URL 118 100 $this->js_url = trailingslashit( $this->admin_url . 'js' ); 119 120 // Admin images URL121 $this->styles_url = trailingslashit( $this->admin_url . 'styles' );122 101 } 123 102 … … 178 157 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 179 158 180 // Forums 'Right now' Dashboard widget181 //add_action( 'wp_dashboard_setup', array( $this, 'dashboard_widget_right_now' ) );182 183 159 /** BuddyPress Actions ************************************************/ 184 185 // Add importers186 //add_action( 'bp_admin_init', array( $this, 'register_importers' ) );187 188 // Add red admin style189 //add_action( 'bp_admin_init', array( $this, 'register_admin_style' ) );190 160 191 161 // Add settings … … 196 166 // Add link to settings page 197 167 add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 10, 2 ); 198 199 // Add sample permalink filter200 //add_filter( 'post_type_link', 'bp_filter_sample_permalink', 10, 4 );201 168 } 202 169 … … 380 347 381 348 /** 382 * Register the importers383 *384 * @since BuddyPress (1.6)385 *386 * @uses do_action() Calls 'bp_register_importers'387 * @uses apply_filters() Calls 'bp_importer_path' filter to allow plugins388 * to customize the importer script locations.389 */390 public function register_importers() {391 392 // Leave if we're not in the import section393 if ( !defined( 'WP_LOAD_IMPORTERS' ) )394 return;395 396 // Load Importer API397 require_once( ABSPATH . 'wp-admin/includes/import.php' );398 399 // Load our importers400 $importers = apply_filters( 'bp_importers', array( 'buddypress' ) );401 402 // Loop through included importers403 foreach ( $importers as $importer ) {404 405 // Allow custom importer directory406 $import_dir = apply_filters( 'bp_importer_path', $this->admin_dir . 'importers', $importer );407 408 // Compile the importer path409 $import_file = trailingslashit( $import_dir ) . $importer . '.php';410 411 // If the file exists, include it412 if ( file_exists( $import_file ) ) {413 require( $import_file );414 }415 }416 417 // Don't do anything we wouldn't do418 do_action( 'bp_register_importers' );419 }420 421 /**422 349 * Add Settings link to plugins area 423 350 * … … 452 379 453 380 /** 454 * Add the 'Right now in Forums' dashboard widget455 *456 * @since BuddyPress (1.6)457 *458 * @uses wp_add_dashboard_widget() To add the dashboard widget459 */460 public function dashboard_widget_right_now() {461 //wp_add_dashboard_widget( 'bp-dashboard-right-now', __( 'Right Now in Forums', 'buddypress' ), 'bp_dashboard_widget_right_now' );462 }463 464 /**465 381 * Add some general styling to the admin area 466 382 * … … 503 419 504 420 do_action( 'bp_admin_head' ); 505 }506 507 /**508 * Registers the BuddyPress admin color scheme509 *510 * Because wp-content can exist outside of the WordPress root there is no511 * way to be certain what the relative path of the admin images is.512 * We are including the two most common configurations here, just in case.513 *514 * @since BuddyPress (1.6)515 *516 * @uses wp_admin_css_color() To register the color scheme517 */518 public function register_admin_style () {519 520 // Normal wp-content dir521 if ( 0 === $this->content_depth )522 $css_file = $this->styles_url . 'admin.css';523 524 // Custom wp-content dir is 1 level away525 elseif ( 1 === $this->content_depth )526 $css_file = $this->styles_url . 'admin-1.css';527 528 // Custom wp-content dir is 1 level away529 elseif ( 2 === $this->content_depth )530 $css_file = $this->styles_url . 'admin-2.css';531 532 // Load the admin CSS styling533 //wp_admin_css_color( 'buddypress', __( 'Green', 'buddypress' ), $css_file, array( '#222222', '#006600', '#deece1', '#6eb469' ) );534 421 } 535 422
Note: See TracChangeset
for help on using the changeset viewer.