Skip to:
Content

BuddyPress.org


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.