Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme.php

    r17264 r17928  
    164164 * @since 1.5.0
    165165 *
    166  * @return array Key is template name, Value is template name
     166 * @return array Key is the template name, value is the filename of the template
    167167 */
    168168function get_page_templates() {
     
    180180            // don't allow template files in subdirectories
    181181            if ( false !== strpos($basename, '/') )
     182                continue;
     183
     184            if ( 'functions.php' == $basename )
    182185                continue;
    183186
     
    394397            $res = new WP_Error('themes_api_failed', __('An Unexpected HTTP Error occurred during the API request.'), $request->get_error_message() );
    395398        } else {
    396             $res = unserialize($request['body']);
     399            $res = unserialize( wp_remote_retrieve_body( $request ) );
    397400            if ( ! $res )
    398             $res = new WP_Error('themes_api_failed', __('An unknown error occurred.'), $request['body']);
     401            $res = new WP_Error('themes_api_failed', __('An unknown error occurred.'), wp_remote_retrieve_body( $request ) );
    399402        }
    400403    }
Note: See TracChangeset for help on using the changeset viewer.