list_theme_updates [ WordPress Function ]
list_theme_updates ( No parameters )
| Defined at: |
|
Similar Functions: get_theme_updates, list_core_update, wp_theme_update_rows, wp_theme_update_row, list_plugin_updates
No description yet.
Source
<?php
function list_theme_updates() {
$themes = get_theme_updates();
if ( empty( $themes ) ) {
echo '<h3>' . __( 'Themes' ) . '</h3>';
echo '<p>' . __( 'Your themes are all up to date.' ) . '</p>';
return;
}
$form_action = 'update-core.php?action=do-theme-upgrade';
?>
<h3><?php _e( 'Themes' ); ?></h3>
<p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click “Update Themes”.' ); ?></p>
<p><?php printf( __('<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.'), _x('http://codex.wordpress.org/Child_Themes', 'Link used in suggestion to use child themes in GUU') ); ?></p>
<form method="post" action="<?php echo $form_action; ?>" name="upgrade-themes" class="upgrade">
<?php wp_nonce_field('upgrade-core'); ?>
<p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p>
<table class="widefat" cellspacing="0" id="update-themes-table">
<thead>
<tr>
<th scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all" /></th>
<th scope="col" class="manage-column"><label for="themes-select-all"><?php _e('Select All'); ?></label></th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all-2" /></th>
<th scope="col" class="manage-column"><label for="themes-select-all-2"><?php _e('Select All'); ?></label></th>
</tr>
</tfoot>
<tbody class="plugins">
<?php
foreach ( $themes as $stylesheet => $theme ) {
echo "
<tr class='active'>
<th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr( $stylesheet ) . "' /></th>
<td class='plugin-title'><img src='" . esc_url( $theme->get_screenshot() ) . "' width='64' height='64' style='float:left; padding: 0 5px 5px' /><strong>" . $theme->display('Name') . '</strong> ' . sprintf( __( 'You have version %1$s installed. Update to %2$s.' ), $theme->display('Version'), $theme->update['new_version'] ) . "</td>
</tr>";
}
?>
</tbody>
</table>
<p><input id="upgrade-themes-2" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p>
</form>
<?php
}
?>
Examples [ wp-snippets.com ]
Top Google Search Results
- PHPXRef 0.7 : WordPress : Detail view of update-core.php
list_plugin_updates() list_theme_updates() do_core_upgrade() ...
phpxref.ftwr.co.uk - Docs for page update-core.php
void list_core_update ( $update). $update. list_plugin_updates (line 195). void list_plugin_updates (). list_theme_updates (line 281). void list_theme_updates () ...
phpdoc.wordpress.org - #20173 (No Titles/Broken screenshot for Theme updates ...
Owner set to nacin; Status changed from new to closed; Resolution set to fixed. In [20113]: Use new WP_Theme API in list_theme_updates(). fixes #20173. see ...
core.trac.wordpress.org - core_upgrade_preamble | A HitchHackers guide through WordPress
Feb 11, 2011... list_plugin_updates(); if ( current_user_can( 'update_themes' ) ) list_theme_updates(); do_action('core_upgrade_preamble'); echo '</div>'; } ...
hitchhackerguide.com