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

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32965 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-06-27 01:11:45 +00:00
parent f162be6046
commit 550763988b
7 changed files with 32 additions and 33 deletions

View File

@@ -27,8 +27,8 @@ function delete_theme($stylesheet, $redirect = '') {
if ( empty( $redirect ) )
$redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet);
if ( false === ($credentials = request_filesystem_credentials($redirect)) ) {
$data = ob_get_contents();
ob_end_clean();
$data = ob_get_clean();
if ( ! empty($data) ){
include_once( ABSPATH . 'wp-admin/admin-header.php');
echo $data;
@@ -40,8 +40,8 @@ function delete_theme($stylesheet, $redirect = '') {
if ( ! WP_Filesystem($credentials) ) {
request_filesystem_credentials($redirect, '', true); // Failed to connect, Error and request again
$data = ob_get_contents();
ob_end_clean();
$data = ob_get_clean();
if ( ! empty($data) ) {
include_once( ABSPATH . 'wp-admin/admin-header.php');
echo $data;