Skip to content

Commit bc241b4

Browse files
yoavfdereksmart
authored andcommitted
require_lib: define WP_CONTENT_DIR if it is not defined, for example in the context of the forums
Merges r111982-wpcom.
1 parent 783ec26 commit bc241b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

require-lib.php

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ function jetpack_require_lib( $slug ) {
66
return;
77
}
88
$basename = basename( $slug );
9+
10+
if ( defined( 'ABSPATH' ) && ! defined( 'WP_CONTENT_DIR' ) ) {
11+
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
12+
}
13+
914
$lib_dir = WP_CONTENT_DIR . '/lib';
1015
$lib_dir = apply_filters( 'jetpack_require_lib_dir', $lib_dir );
1116
$choices = array(

0 commit comments

Comments
 (0)