get_theme_updates example

// Updates are important!         if ( 'success' !== $type || $newer_version_available ) {
            $body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' );
        }

        if ( $critical_support ) {
            $body .= ' ' . __( "Reach out to WordPress Core developers to ensure you'll never have this problem again." );
        }

        // If things are successful and we're now on the latest, mention plugins and themes if any are out of date.         if ( 'success' === $type && ! $newer_version_available && ( get_plugin_updates() || get_theme_updates() ) ) {
            $body .= "\n\n" . __( 'You also have some plugins or themes with updates available. Update them now:' );
            $body .= "\n" . network_admin_url();
        }

        $body .= "\n\n" . __( 'The WordPress Team' ) . "\n";

        if ( 'critical' === $type && is_wp_error( $result ) ) {
            $body .= "\n***\n\n";
            /* translators: %s: WordPress version. */
            $body .= sprintf( __( 'Your site was running version %s.' )get_bloginfo( 'version' ) );
            $body .= ' ' . __( 'Some data that describes the error your site encountered has been put together.' );
            
<?php esc_attr_e( 'Update Plugins' ); ?>" name="upgrade" /></p> </form> <?php }

/** * Display the upgrade themes form. * * @since 2.9.0 */
function list_theme_updates() {
    $themes = get_theme_updates();
    if ( empty( $themes ) ) {
        echo '<h2>' . __( 'Themes' ) . '</h2>';
        echo '<p>' . __( 'Your themes are all up to date.' ) . '</p>';
        return;
    }

    $form_action = 'update-core.php?action=do-theme-upgrade';

    $themes_count = count( $themes );
    ?> <h2>
// Populate the section for the currently active theme.         $theme_features = array();

        if ( ! empty( $_wp_theme_features ) ) {
            foreach ( $_wp_theme_features as $feature => $options ) {
                $theme_features[] = $feature;
            }
        }

        $active_theme  = wp_get_theme();
        $theme_updates = get_theme_updates();
        $transient     = get_site_transient( 'update_themes' );

        $active_theme_version       = $active_theme->version;
        $active_theme_version_debug = $active_theme_version;

        $auto_updates         = array();
        $auto_updates_enabled = wp_is_auto_update_enabled_for_type( 'theme' );
        if ( $auto_updates_enabled ) {
            $auto_updates = (array) get_site_option( 'auto_update_themes', array() );
        }

        
'<p>%s</p>',
                __( 'Themes add your site&#8217;s look and feel. It&#8217;s important to keep them up to date, to stay consistent with your brand and keep your site secure.' )
            ),
            'actions'     => sprintf(
                '<p><a href="%s">%s</a></p>',
                esc_url( admin_url( 'themes.php' ) ),
                __( 'Manage your themes' )
            ),
            'test'        => 'theme_version',
        );

        $theme_updates = get_theme_updates();

        $themes_total        = 0;
        $themes_need_updates = 0;
        $themes_inactive     = 0;

        // This value is changed during processing to determine how many themes are considered a reasonable amount.         $allowed_theme_count = 1;

        $has_default_theme   = false;
        $has_unused_themes   = false;
        $show_unused_themes  = true;
        
Home | Imprint | This part of the site doesn't use cookies.