equal
deleted
inserted
replaced
53 /** |
53 /** |
54 * Retrieve list of WordPress theme features (aka theme tags). |
54 * Retrieve list of WordPress theme features (aka theme tags). |
55 * |
55 * |
56 * @since 2.8.0 |
56 * @since 2.8.0 |
57 * |
57 * |
58 * @deprecated since 3.1.0 Use get_theme_feature_list() instead. |
58 * @deprecated 3.1.0 Use get_theme_feature_list() instead. |
59 * |
59 * |
60 * @return array |
60 * @return array |
61 */ |
61 */ |
62 function install_themes_feature_list() { |
62 function install_themes_feature_list() { |
63 _deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' ); |
63 _deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' ); |
64 |
64 |
65 if ( ! $cache = get_transient( 'wporg_theme_feature_list' ) ) { |
65 $cache = get_transient( 'wporg_theme_feature_list' ); |
|
66 if ( ! $cache ) { |
66 set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS ); |
67 set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS ); |
67 } |
68 } |
68 |
69 |
69 if ( $cache ) { |
70 if ( $cache ) { |
70 return $cache; |
71 return $cache; |
176 /** |
177 /** |
177 * @since 2.8.0 |
178 * @since 2.8.0 |
178 */ |
179 */ |
179 function install_themes_upload() { |
180 function install_themes_upload() { |
180 ?> |
181 ?> |
181 <p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install it by uploading it here.' ); ?></p> |
182 <p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install or update it by uploading it here.' ); ?></p> |
182 <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>"> |
183 <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>"> |
183 <?php wp_nonce_field( 'theme-upload' ); ?> |
184 <?php wp_nonce_field( 'theme-upload' ); ?> |
184 <label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label> |
185 <label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label> |
185 <input type="file" id="themezip" name="themezip" /> |
186 <input type="file" id="themezip" name="themezip" accept=".zip"/> |
186 <?php submit_button( __( 'Install Now' ), '', 'install-theme-submit', false ); ?> |
187 <?php submit_button( __( 'Install Now' ), '', 'install-theme-submit', false ); ?> |
187 </form> |
188 </form> |
188 <?php |
189 <?php |
189 } |
190 } |
190 |
191 |