Skip to:
Content

bbPress.org

Changeset 4248


Ignore:
Timestamp:
10/13/2012 06:58:34 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Code Improvement:

  • Move bbp-admin into bbp-includes/admin.
  • Introduce includes_dir and includes_url bbpress() vars.
  • Adjust BBP_Admin include paths.
  • See: #1975.
Location:
trunk
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/bbp-includes/admin/bbp-actions.php

    r4198 r4248  
    1414 *
    1515 *  - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
    16  *  - Admin: More in {@link BBP_Admin::setup_actions()} in
    17  *            bbp-admin/bbp-admin.php
     16 *  - Admin: More in {@link BBP_Admin::setup_actions()} in admin.php
    1817 *
    1918 * @see bbp-core-actions.php
  • trunk/bbp-includes/admin/bbp-admin.php

    r4244 r4248  
    7777    private function setup_globals() {
    7878        $bbp = bbpress();
    79         $this->admin_dir  = trailingslashit( $bbp->plugin_dir . 'bbp-admin' ); // Admin path
    80         $this->admin_url  = trailingslashit( $bbp->plugin_url . 'bbp-admin' ); // Admin url
    81         $this->images_url = trailingslashit( $this->admin_url . 'images'    ); // Admin images URL
    82         $this->styles_url = trailingslashit( $this->admin_url . 'styles'    ); // Admin styles URL
     79        $this->admin_dir  = trailingslashit( $bbp->includes_dir . 'admin' ); // Admin path
     80        $this->admin_url  = trailingslashit( $bbp->includes_url . 'admin' ); // Admin url
     81        $this->images_url = trailingslashit( $this->admin_url   . 'images' ); // Admin images URL
     82        $this->styles_url = trailingslashit( $this->admin_url   . 'styles' ); // Admin styles URL
    8383    }
    8484
  • trunk/bbp-includes/bbp-core-actions.php

    r4236 r4248  
    1616 *  - Component: In {@link BBP_Component::setup_actions()} in
    1717 *                bbp-includes/bbp-classes.php
    18  *  - Admin: More in {@link BBP_Admin::setup_actions()} in
    19  *            bbp-admin/bbp-admin.php
     18 *  - Admin: More in {@link BBP_Admin::setup_actions()} in admin.php
    2019 *
    2120 * @see bbp-core-filters.php
  • trunk/bbp-includes/bbp-core-filters.php

    r4244 r4248  
    1616 *  - Component: In {@link BBP_Component::setup_actions()} in
    1717 *                bbp-includes/bbp-classes.php
    18  *  - Admin: More in {@link BBP_Admin::setup_actions()} in
    19  *            bbp-admin/bbp-admin.php
     18 *  - Admin: More in {@link BBP_Admin::setup_actions()} in admin.php
    2019 *
    2120 * @see bbp-core-actions.php
  • trunk/bbp-includes/bbp-user-functions.php

    r4239 r4248  
    14561456
    14571457    // Setup admin (to include converter)
    1458     require_once( bbpress()->plugin_dir . 'bbp-admin/bbp-admin.php' );
     1458    require_once( bbpress()->includes_dir . 'admin/bbp-admin.php' );
    14591459
    14601460    // Create the admin object
  • trunk/bbpress.php

    r4244 r4248  
    192192        $this->lang_dir   = apply_filters( 'bbp_lang_dir', trailingslashit( $this->plugin_dir . 'bbp-languages' ) );
    193193
     194        // Includes
     195        $this->includes_dir = apply_filters( 'bbp_includes_dir', trailingslashit( $this->plugin_dir . 'bbp-includes' ) );
     196        $this->includes_url = apply_filters( 'bbp_includes_url', trailingslashit( $this->plugin_url . 'bbp-includes' ) );
     197       
    194198        /** Identifiers *******************************************************/
    195199
     
    319323        // Quick admin check and load if needed
    320324        if ( is_admin() ) {
    321             require( $this->plugin_dir . 'bbp-admin/bbp-admin.php'   );
    322             require( $this->plugin_dir . 'bbp-admin/bbp-actions.php' );
     325            require( $this->includes_dir . 'admin/bbp-admin.php'   );
     326            require( $this->includes_dir . 'admin/bbp-actions.php' );
    323327        }
    324328    }
Note: See TracChangeset for help on using the changeset viewer.