Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2023 02:05:08 AM (16 months ago)
Author:
imath
Message:

Prevent potential issues with late_includes() in Component classes

Use require_once instead of require to load action & screen files.

See #4954
Fixes #8910
Closes https://github.com/buddypress/buddypress/pull/112

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/classes/class-bp-blogs-component.php

    r13492 r13495  
    177177        // Actions.
    178178        if ( isset( $_GET['random-blog'] ) ) {
    179             require $this->path . 'bp-blogs/actions/random.php';
     179            require_once $this->path . 'bp-blogs/actions/random.php';
    180180        }
    181181
    182182        // Screens.
    183183        if ( bp_is_user() ) {
    184             require $this->path . 'bp-blogs/screens/my-blogs.php';
     184            require_once $this->path . 'bp-blogs/screens/my-blogs.php';
    185185        } else {
    186186            if ( bp_is_blogs_directory() ) {
    187                 require $this->path . 'bp-blogs/screens/directory.php';
     187                require_once $this->path . 'bp-blogs/screens/directory.php';
    188188            }
    189189
    190190            if ( is_user_logged_in() && bp_is_current_action( 'create' ) ) {
    191                 require $this->path . 'bp-blogs/screens/create.php';
     191                require_once $this->path . 'bp-blogs/screens/create.php';
    192192            }
    193193
Note: See TracChangeset for help on using the changeset viewer.