wp_get_auto_update_message example

$auto_update_settings = array(
        'dev'   => $upgrade_dev,
        'minor' => $upgrade_minor,
        'major' => $upgrade_major,
    );

    if ( $upgrade_major ) {
        $wp_version = get_bloginfo( 'version' );
        $updates    = get_core_updates();

        if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
            echo '<p>' . wp_get_auto_update_message() . '</p>';
        }
    }

    $action_url = self_admin_url( 'update-core.php?action=core-major-auto-updates-settings' );
    ?> <p class="auto-update-status"> <?php
        if ( $updater->is_vcs_checkout( ABSPATH ) ) {
            _e( 'This site appears to be under version control. Automatic updates are disabled.' );
        }


                        $html[] = '<span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span>';
                        $html[] = '<span class="label">' . $text . '</span>';
                        $html[] = '</a>';
                    }

                    if ( ! empty( $plugin_data['update'] ) ) {
                        $html[] = sprintf(
                            '<div class="auto-update-time%s">%s</div>',
                            $time_class,
                            wp_get_auto_update_message()
                        );
                    }

                    $html = implode( '', $html );

                    /** * Filters the HTML of the auto-updates setting for each plugin in the Plugins list table. * * @since 5.5.0 * * @param string $html The HTML of the plugin's auto-update column content, * including toggle auto-update action links and * time to next update. * @param string $plugin_file Path to the plugin file relative to the plugins directory. * @param array $plugin_data An array of plugin data. See get_plugin_data() * and the {@see 'plugin_row_meta'} filter for the list * of possible values. */
$html[] = '<span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span>';
            $html[] = '<span class="label">' . $text . '</span>';
            $html[] = '</a>';

        }

        if ( isset( $available_updates->response[ $stylesheet ] ) ) {
            $html[] = sprintf(
                '<div class="auto-update-time%s">%s</div>',
                $time_class,
                wp_get_auto_update_message()
            );
        }

        $html = implode( '', $html );

        /** * Filters the HTML of the auto-updates setting for each theme in the Themes list table. * * @since 5.5.0 * * @param string $html The HTML for theme's auto-update setting, including * toggle auto-update action link and time to next update. * @param string $stylesheet Directory name of the theme. * @param WP_Theme $theme WP_Theme object. */
 . __( 'Enable auto-updates' ) . '</span> </button> <# } #> <# } #> <# if ( data.hasUpdate ) { #> <# if ( data.autoupdate.supported && data.autoupdate.enabled ) { #> <span class="auto-update-time"> <# } else { #> <span class="auto-update-time hidden"> <# } #> <br />' . wp_get_auto_update_message() . '</span> <# } #> <div class="notice notice-error notice-alt inline hidden"><p></p></div> </div> ';

    /** * Filters the JavaScript template used to display the auto-update setting for a theme (in the overlay). * * See {@see wp_prepare_themes_for_js()} for the properties of the `data` object. * * @since 5.5.0 * * @param string $template The template for displaying the auto-update setting link. */
Home | Imprint | This part of the site doesn't use cookies.