Skip to:
Content

BuddyPress.org

Changeset 6026


Ignore:
Timestamp:
05/13/2012 04:52:16 PM (13 years ago)
Author:
djpaul
Message:

Remove a bunch of admin screen helper functions which came from bbPress. See #4008

Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-settings.php

    r5885 r6026  
    263263
    264264<?php
    265 }
    266 
    267 /**
    268  * Contextual help for BuddyPress settings page
    269  *
    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 var
    296     $contextual_help = '';
    297 
    298     // Wrap each help item in paragraph tags
    299     foreach( $bp_contextual_help as $paragraph )
    300         $contextual_help .= '<p>' . $paragraph . '</p>';
    301 
    302     // Add help
    303     add_contextual_help( 'settings_page_buddypress', $contextual_help );
    304265}
    305266
  • trunk/bp-core/bp-core-admin.php

    r6022 r6026  
    4949
    5050    /**
    51      * @var string URL to the BuddyPress admin styles directory
    52      */
    53     public $styles_url = '';
    54 
    55     /**
    5651     * @var string URL to the BuddyPress admin CSS directory
    5752     */
     
    6358    public $js_url = '';
    6459
    65     /** Recounts **************************************************************/
    66 
    67     /**
    68      * @var bool Enable recounts in Tools area
    69      */
    70     public $enable_recounts = false;
    71 
    72     /** Admin Scheme **********************************************************/
    73 
    74     /**
    75      * @var int Depth of custom WP_CONTENT_DIR difference
    76      */
    77     public $content_depth = 0;
    7860
    7961    /** Methods ***************************************************************/
     
    11799        // Admin css URL
    118100        $this->js_url     = trailingslashit( $this->admin_url . 'js'     );
    119 
    120         // Admin images URL
    121         $this->styles_url = trailingslashit( $this->admin_url . 'styles' );
    122101    }
    123102
     
    178157        add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts'   ) );
    179158
    180         // Forums 'Right now' Dashboard widget
    181         //add_action( 'wp_dashboard_setup', array( $this, 'dashboard_widget_right_now' ) );
    182 
    183159        /** BuddyPress Actions ************************************************/
    184 
    185         // Add importers
    186         //add_action( 'bp_admin_init',      array( $this, 'register_importers'      ) );
    187 
    188         // Add red admin style
    189         //add_action( 'bp_admin_init',      array( $this, 'register_admin_style'    ) );
    190160
    191161        // Add settings
     
    196166        // Add link to settings page
    197167        add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 10, 2 );
    198 
    199         // Add sample permalink filter
    200         //add_filter( 'post_type_link',     'bp_filter_sample_permalink',         10, 4 );
    201168    }
    202169
     
    380347
    381348    /**
    382      * Register the importers
    383      *
    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 plugins
    388      *                        to customize the importer script locations.
    389      */
    390     public function register_importers() {
    391 
    392         // Leave if we're not in the import section
    393         if ( !defined( 'WP_LOAD_IMPORTERS' ) )
    394             return;
    395 
    396         // Load Importer API
    397         require_once( ABSPATH . 'wp-admin/includes/import.php' );
    398 
    399         // Load our importers
    400         $importers = apply_filters( 'bp_importers', array( 'buddypress' ) );
    401 
    402         // Loop through included importers
    403         foreach ( $importers as $importer ) {
    404 
    405             // Allow custom importer directory
    406             $import_dir  = apply_filters( 'bp_importer_path', $this->admin_dir . 'importers', $importer );
    407 
    408             // Compile the importer path
    409             $import_file = trailingslashit( $import_dir ) . $importer . '.php';
    410 
    411             // If the file exists, include it
    412             if ( file_exists( $import_file ) ) {
    413                 require( $import_file );
    414             }
    415         }
    416 
    417         // Don't do anything we wouldn't do
    418         do_action( 'bp_register_importers' );
    419     }
    420 
    421     /**
    422349     * Add Settings link to plugins area
    423350     *
     
    452379
    453380    /**
    454      * Add the 'Right now in Forums' dashboard widget
    455      *
    456      * @since BuddyPress (1.6)
    457      *
    458      * @uses wp_add_dashboard_widget() To add the dashboard widget
    459      */
    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     /**
    465381     * Add some general styling to the admin area
    466382     *
     
    503419
    504420        do_action( 'bp_admin_head' );
    505     }
    506 
    507     /**
    508      * Registers the BuddyPress admin color scheme
    509      *
    510      * Because wp-content can exist outside of the WordPress root there is no
    511      * 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 scheme
    517      */
    518     public function register_admin_style () {
    519 
    520         // Normal wp-content dir
    521         if ( 0 === $this->content_depth )
    522             $css_file = $this->styles_url . 'admin.css';
    523 
    524         // Custom wp-content dir is 1 level away
    525         elseif ( 1 === $this->content_depth )
    526             $css_file = $this->styles_url . 'admin-1.css';
    527 
    528         // Custom wp-content dir is 1 level away
    529         elseif ( 2 === $this->content_depth )
    530             $css_file = $this->styles_url . 'admin-2.css';
    531 
    532         // Load the admin CSS styling
    533         //wp_admin_css_color( 'buddypress', __( 'Green', 'buddypress' ), $css_file, array( '#222222', '#006600', '#deece1', '#6eb469' ) );
    534421    }
    535422
Note: See TracChangeset for help on using the changeset viewer.