Definition:
function list_theme_updates() {}
Source code
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 ( (array) $themes as $stylesheet => $theme_data) { $screenshot = $theme_data->{'Theme Root URI'} . '/' . $stylesheet . '/' . $theme_data->Screenshot; 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='$screenshot' width='64' height='64' style='float:left; padding: 5px' /><strong>{$theme_data->Name}</strong>" . sprintf(__('You have version %1$s installed. Update to %2$s.'), $theme_data->Version, $theme_data->update['new_version']) . "</td> </tr>"; }
2277
No comments yet... Be the first to leave a reply!