Skip to:
Content

bbPress.org

Changeset 5317


Ignore:
Timestamp:
03/10/2014 03:24:18 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Don't allow build or src in basename in bbPress:setup_globals(). Fixes problems with activation hooks. Fixes #2559. Props DJPaul.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bbpress.php

    r5316 r5317  
    196196        /** Paths *************************************************************/
    197197
    198         // Setup some base path and URL information
     198        // Base name
    199199        $this->file       = __FILE__;
    200         $this->basename   = apply_filters( 'bbp_plugin_basename',  plugin_basename( $this->file ) );
    201         $this->plugin_dir = apply_filters( 'bbp_plugin_dir_path',  plugin_dir_path( $this->file ) );
    202         $this->plugin_url = apply_filters( 'bbp_plugin_dir_url',   plugin_dir_url ( $this->file ) );
     200        $this->basename   = apply_filters( 'bbp_plugin_basename', str_replace( array( 'build/', 'src/' ), '', plugin_basename( $this->file ) ) );
     201
     202        // Path and URL
     203        $this->plugin_dir = apply_filters( 'bbp_plugin_dir_path', plugin_dir_path( $this->file ) );
     204        $this->plugin_url = apply_filters( 'bbp_plugin_dir_url',  plugin_dir_url ( $this->file ) );
    203205
    204206        // Includes
Note: See TracChangeset for help on using the changeset viewer.