Make WordPress Core


Ignore:
Timestamp:
06/27/2015 01:11:45 AM (9 years ago)
Author:
wonderboymusic
Message:

ob_get_contents() followed by ob_end_clean() can be replaced by ob_get_clean().

See #32444.

File:
1 edited

Legend:

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

    r32654 r32965  
    2828        $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet);
    2929    if ( false === ($credentials = request_filesystem_credentials($redirect)) ) {
    30         $data = ob_get_contents();
    31         ob_end_clean();
     30        $data = ob_get_clean();
     31
    3232        if ( ! empty($data) ){
    3333            include_once( ABSPATH . 'wp-admin/admin-header.php');
     
    4141    if ( ! WP_Filesystem($credentials) ) {
    4242        request_filesystem_credentials($redirect, '', true); // Failed to connect, Error and request again
    43         $data = ob_get_contents();
    44         ob_end_clean();
     43        $data = ob_get_clean();
     44
    4545        if ( ! empty($data) ) {
    4646            include_once( ABSPATH . 'wp-admin/admin-header.php');
Note: See TracChangeset for help on using the changeset viewer.