21 if ( empty($stylesheet) ) |
21 if ( empty($stylesheet) ) |
22 return false; |
22 return false; |
23 |
23 |
24 ob_start(); |
24 ob_start(); |
25 if ( empty( $redirect ) ) |
25 if ( empty( $redirect ) ) |
26 $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . $stylesheet, 'delete-theme_' . $stylesheet); |
26 $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet); |
27 if ( false === ($credentials = request_filesystem_credentials($redirect)) ) { |
27 if ( false === ($credentials = request_filesystem_credentials($redirect)) ) { |
28 $data = ob_get_contents(); |
28 $data = ob_get_contents(); |
29 ob_end_clean(); |
29 ob_end_clean(); |
30 if ( ! empty($data) ){ |
30 if ( ! empty($data) ){ |
31 include_once( ABSPATH . 'wp-admin/admin-header.php'); |
31 include_once( ABSPATH . 'wp-admin/admin-header.php'); |
149 * @return array Array of features keyed by category with translations keyed by slug. |
149 * @return array Array of features keyed by category with translations keyed by slug. |
150 */ |
150 */ |
151 function get_theme_feature_list( $api = true ) { |
151 function get_theme_feature_list( $api = true ) { |
152 // Hard-coded list is used if api not accessible. |
152 // Hard-coded list is used if api not accessible. |
153 $features = array( |
153 $features = array( |
154 __('Colors') => array( |
154 __( 'Colors' ) => array( |
155 'black' => __( 'Black' ), |
155 'black' => __( 'Black' ), |
156 'blue' => __( 'Blue' ), |
156 'blue' => __( 'Blue' ), |
157 'brown' => __( 'Brown' ), |
157 'brown' => __( 'Brown' ), |
158 'gray' => __( 'Gray' ), |
158 'gray' => __( 'Gray' ), |
159 'green' => __( 'Green' ), |
159 'green' => __( 'Green' ), |
167 'yellow' => __( 'Yellow' ), |
167 'yellow' => __( 'Yellow' ), |
168 'dark' => __( 'Dark' ), |
168 'dark' => __( 'Dark' ), |
169 'light' => __( 'Light' ), |
169 'light' => __( 'Light' ), |
170 ), |
170 ), |
171 |
171 |
172 __('Columns') => array( |
172 __( 'Columns' ) => array( |
173 'one-column' => __( 'One Column' ), |
173 'one-column' => __( 'One Column' ), |
174 'two-columns' => __( 'Two Columns' ), |
174 'two-columns' => __( 'Two Columns' ), |
175 'three-columns' => __( 'Three Columns' ), |
175 'three-columns' => __( 'Three Columns' ), |
176 'four-columns' => __( 'Four Columns' ), |
176 'four-columns' => __( 'Four Columns' ), |
177 'left-sidebar' => __( 'Left Sidebar' ), |
177 'left-sidebar' => __( 'Left Sidebar' ), |
178 'right-sidebar' => __( 'Right Sidebar' ), |
178 'right-sidebar' => __( 'Right Sidebar' ), |
179 ), |
179 ), |
180 |
180 |
181 __('Width') => array( |
181 __( 'Width' ) => array( |
182 'fixed-width' => __( 'Fixed Width' ), |
182 'fixed-width' => __( 'Fixed Width' ), |
183 'flexible-width' => __( 'Flexible Width' ), |
183 'flexible-width' => __( 'Flexible Width' ), |
184 ), |
184 ), |
185 |
185 |
186 __( 'Features' ) => array( |
186 __( 'Features' ) => array( |
191 'custom-header' => __( 'Custom Header' ), |
191 'custom-header' => __( 'Custom Header' ), |
192 'custom-menu' => __( 'Custom Menu' ), |
192 'custom-menu' => __( 'Custom Menu' ), |
193 'editor-style' => __( 'Editor Style' ), |
193 'editor-style' => __( 'Editor Style' ), |
194 'featured-image-header' => __( 'Featured Image Header' ), |
194 'featured-image-header' => __( 'Featured Image Header' ), |
195 'featured-images' => __( 'Featured Images' ), |
195 'featured-images' => __( 'Featured Images' ), |
|
196 'flexible-header' => __( 'Flexible Header' ), |
196 'front-page-post-form' => __( 'Front Page Posting' ), |
197 'front-page-post-form' => __( 'Front Page Posting' ), |
197 'full-width-template' => __( 'Full Width Template' ), |
198 'full-width-template' => __( 'Full Width Template' ), |
198 'microformats' => __( 'Microformats' ), |
199 'microformats' => __( 'Microformats' ), |
199 'post-formats' => __( 'Post Formats' ), |
200 'post-formats' => __( 'Post Formats' ), |
200 'rtl-language-support' => __( 'RTL Language Support' ), |
201 'rtl-language-support' => __( 'RTL Language Support' ), |