list_core_update() – Lists available core updates.

You appear to be a bot. Output may be restricted

Description

Lists available core updates.

Usage

list_core_update( $update );

Parameters

$update
( object ) required

Returns

void

Source

File name: wordpress/wp-admin/update-core.php
Lines:

101 to 159 of 159
          $update->mysql_version,
          $mysql_version
        );
      } else {
        $message = sprintf(
          /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
          __( 'You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:' ),
          $wp_version,
          $version_url,
          $version_string
        );
      }

      if ( ! $mysql_compat || ! $php_compat ) {
        $show_buttons = false;
      }
    }
  }

  echo '<p>';
  echo $message;
  echo '</p>';

  echo '<form method="post" action="' . esc_url( $form_action ) . '" name="upgrade" class="upgrade">';
  wp_nonce_field( 'upgrade-core' );

  echo '<p>';
  echo '<input name="version" value="' . esc_attr( $update->current ) . '" type="hidden" />';
  echo '<input name="locale" value="' . esc_attr( $update->locale ) . '" type="hidden" />';
  if ( $show_buttons ) {
    if ( $first_pass ) {
      submit_button( $submit, $current ? '' : 'primary regular', 'upgrade', false );
      $first_pass = false;
    } else {
      submit_button( $submit, '', 'upgrade', false );
    }
  }
  if ( 'en_US' !== $update->locale ) {
    if ( ! isset( $update->dismissed ) || ! $update->dismissed ) {
      submit_button( __( 'Hide this update' ), '', 'dismiss', false );
    } else {
      submit_button( __( 'Bring back this update' ), '', 'undismiss', false );
    }
  }
  echo '</p>';

  if ( 'en_US' !== $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) {
    echo '<p class="hint">' . __( 'This localized version contains both the translation and various other localization fixes.' ) . '</p>';
  } elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) {
    // Partial builds don't need language-specific warnings.
    echo '<p class="hint">' . sprintf(
      /* translators: %s: WordPress version. */
      __( 'You are about to install WordPress %s <strong>in English (US)</strong>. There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.' ),
      'development' !== $update->response ? $update->current : ''
    ) . '</p>';
  }

  echo '</form>';
}
 

 View on GitHub View on Trac