diff --git a/wp-includes/compat.php b/wp-includes/compat.php index f9fd5e2548..4edf33b0ce 100644 --- a/wp-includes/compat.php +++ b/wp-includes/compat.php @@ -129,7 +129,7 @@ if ( !function_exists('json_encode') ) { global $wp_json; if ( !is_a($wp_json, 'Services_JSON') ) { - require_once( './class-json.php' ); + require_once( ABSPATH . WPINC . '/class-json.php' ); $wp_json = new Services_JSON(); } @@ -142,7 +142,7 @@ if ( !function_exists('json_decode') ) { global $wp_json; if ( !is_a($wp_json, 'Services_JSON') ) { - require_once( './class-json.php' ); + require_once( ABSPATH . WPINC . '/class-json.php' ); $wp_json = new Services_JSON(); } diff --git a/wp-includes/media.php b/wp-includes/media.php index 70f6af5122..a61fbbba92 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1337,7 +1337,7 @@ function wp_expand_dimensions( $example_width, $example_height, $max_width, $max * @return string The original URL on failure or the embed HTML on success. */ function wp_oembed_get( $url, $args = '' ) { - require_once( './class-oembed.php' ); + require_once( ABSPATH . WPINC . '/class-oembed.php' ); $oembed = _wp_oembed_get_object(); return $oembed->get_html( $url, $args ); } @@ -1355,7 +1355,7 @@ function wp_oembed_get( $url, $args = '' ) { * @param boolean $regex Whether the $format parameter is in a regex format. */ function wp_oembed_add_provider( $format, $provider, $regex = false ) { - require_once( './class-oembed.php' ); + require_once( ABSPATH . WPINC . '/class-oembed.php' ); $oembed = _wp_oembed_get_object(); $oembed->providers[$format] = array( $provider, $regex ); }