From f7e764312bea0124d37e063755ffa9f0470819a3 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 18 Apr 2010 09:51:19 +0000 Subject: [PATCH] Fix invalid paths in requires. See r14139. See #12594 git-svn-id: http://svn.automattic.com/wordpress/trunk@14151 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 f9fd5e254..4edf33b0c 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 70f6af512..a61fbbba9 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 ); }