Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




list_theme_updates [ WordPress Function ]

list_theme_updates ( No parameters )
Defined at:



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 &#8220;Update Themes&#8221;.' ); ?></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

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics