From a897bc027583879b2e119b39fce5236a1739bfbf Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 18 Apr 2010 09:51:19 +0000 Subject: [PATCH] Fix invalid paths in requires. See r14139. See #12594 git-svn-id: https://develop.svn.wordpress.org/trunk@14151 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/compat.php | 4 ++-- wp-includes/media.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 ); }