ob_start();
if ( empty( $redirect ) )
- $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . $stylesheet, 'delete-theme_' . $stylesheet);
+ $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();
}
if ( ! WP_Filesystem($credentials) ) {
- request_filesystem_credentials($url, '', true); // Failed to connect, Error and request again
+ request_filesystem_credentials($redirect, '', true); // Failed to connect, Error and request again
$data = ob_get_contents();
ob_end_clean();
if ( ! empty($data) ) {
function get_theme_feature_list( $api = true ) {
// Hard-coded list is used if api not accessible.
$features = array(
- __('Colors') => array(
+ __( 'Colors' ) => array(
'black' => __( 'Black' ),
'blue' => __( 'Blue' ),
'brown' => __( 'Brown' ),
'light' => __( 'Light' ),
),
- __('Columns') => array(
+ __( 'Columns' ) => array(
'one-column' => __( 'One Column' ),
'two-columns' => __( 'Two Columns' ),
'three-columns' => __( 'Three Columns' ),
'right-sidebar' => __( 'Right Sidebar' ),
),
- __('Width') => array(
+ __( 'Width' ) => array(
'fixed-width' => __( 'Fixed Width' ),
'flexible-width' => __( 'Flexible Width' ),
),
'editor-style' => __( 'Editor Style' ),
'featured-image-header' => __( 'Featured Image Header' ),
'featured-images' => __( 'Featured Images' ),
+ 'flexible-header' => __( 'Flexible Header' ),
'front-page-post-form' => __( 'Front Page Posting' ),
'full-width-template' => __( 'Full Width Template' ),
'microformats' => __( 'Microformats' ),
return $features;
if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) )
- set_site_transient( 'wporg_theme_feature_list', array( ), 10800);
+ set_site_transient( 'wporg_theme_feature_list', array(), 10800);
if ( !$feature_list ) {
- $feature_list = themes_api( 'feature_list', array( ) );
+ $feature_list = themes_api( 'feature_list', array() );
if ( is_wp_error( $feature_list ) )
return $features;
}