wip
This commit is contained in:
@@ -208,7 +208,7 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
|
||||
|
||||
// First post.
|
||||
$now = current_time( 'mysql' );
|
||||
$now_gmt = current_time( 'mysql', 1 );
|
||||
$now_gmt = current_time( 'mysql', true );
|
||||
$first_post_guid = get_option( 'home' ) . '/?p=1';
|
||||
|
||||
if ( is_multisite() ) {
|
||||
@@ -315,20 +315,20 @@ Commenter avatars come from <a href="%s">Gravatar</a>.'
|
||||
$first_page .= __( "This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:" );
|
||||
$first_page .= "</p>\n<!-- /wp:paragraph -->\n\n";
|
||||
|
||||
$first_page .= "<!-- wp:quote -->\n<blockquote class=\"wp-block-quote\"><p>";
|
||||
$first_page .= "<!-- wp:quote -->\n<blockquote class=\"wp-block-quote\">\n<!-- wp:paragraph -->\n<p>";
|
||||
/* translators: First page content. */
|
||||
$first_page .= __( "Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin' caught in the rain.)" );
|
||||
$first_page .= "</p></blockquote>\n<!-- /wp:quote -->\n\n";
|
||||
$first_page .= "</p>\n<!-- /wp:paragraph -->\n</blockquote>\n<!-- /wp:quote -->\n\n";
|
||||
|
||||
$first_page .= "<!-- wp:paragraph -->\n<p>";
|
||||
/* translators: First page content. */
|
||||
$first_page .= __( '...or something like this:' );
|
||||
$first_page .= "</p>\n<!-- /wp:paragraph -->\n\n";
|
||||
|
||||
$first_page .= "<!-- wp:quote -->\n<blockquote class=\"wp-block-quote\"><p>";
|
||||
$first_page .= "<!-- wp:quote -->\n<blockquote class=\"wp-block-quote\">\n<!-- wp:paragraph -->\n<p>";
|
||||
/* translators: First page content. */
|
||||
$first_page .= __( 'The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.' );
|
||||
$first_page .= "</p></blockquote>\n<!-- /wp:quote -->\n\n";
|
||||
$first_page .= "</p>\n<!-- /wp:paragraph -->\n</blockquote>\n<!-- /wp:quote -->\n\n";
|
||||
|
||||
$first_page .= "<!-- wp:paragraph -->\n<p>";
|
||||
$first_page .= sprintf(
|
||||
@@ -2414,6 +2414,7 @@ function upgrade_650() {
|
||||
wp_set_option_autoload_values( $autoload );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes changes made in WordPress 6.7.0.
|
||||
*
|
||||
@@ -2932,8 +2933,10 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N
|
||||
// Create a tablename index for an array ($cqueries) of recognized query types.
|
||||
foreach ( $queries as $qry ) {
|
||||
if ( preg_match( '|CREATE TABLE ([^ ]*)|', $qry, $matches ) ) {
|
||||
$cqueries[ trim( $matches[1], '`' ) ] = $qry;
|
||||
$for_update[ $matches[1] ] = 'Created table ' . $matches[1];
|
||||
$table_name = trim( $matches[1], '`' );
|
||||
|
||||
$cqueries[ $table_name ] = $qry;
|
||||
$for_update[ $table_name ] = 'Created table ' . $matches[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3171,7 +3174,7 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N
|
||||
$fieldtype_base = strtok( $fieldtype_without_parentheses, ' ' );
|
||||
|
||||
// Is actual field type different from the field type in query?
|
||||
if ( $tablefield->Type !== $fieldtype ) {
|
||||
if ( $tablefield->Type !== $fieldtype_lowercased ) {
|
||||
$do_change = true;
|
||||
if ( in_array( $fieldtype_lowercased, $text_fields, true ) && in_array( $tablefield_type_lowercased, $text_fields, true ) ) {
|
||||
if ( array_search( $fieldtype_lowercased, $text_fields, true ) < array_search( $tablefield_type_lowercased, $text_fields, true ) ) {
|
||||
@@ -3250,7 +3253,7 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N
|
||||
'fieldname' => $tableindex->Column_name,
|
||||
'subpart' => $tableindex->Sub_part,
|
||||
);
|
||||
$index_ary[ $keyname ]['unique'] = ( '0' === $tableindex->Non_unique ) ? true : false;
|
||||
$index_ary[ $keyname ]['unique'] = ( '0' === (string) $tableindex->Non_unique ) ? true : false;
|
||||
$index_ary[ $keyname ]['index_type'] = $tableindex->Index_type;
|
||||
}
|
||||
|
||||
@@ -3711,7 +3714,7 @@ function pre_schema_upgrade() {
|
||||
}
|
||||
|
||||
// Multisite schema upgrades.
|
||||
if ( $wp_current_db_version < 25448 && is_multisite() && wp_should_upgrade_global_tables() ) {
|
||||
if ( $wp_current_db_version < 60497 && is_multisite() && wp_should_upgrade_global_tables() ) {
|
||||
|
||||
// Upgrade versions prior to 3.7.
|
||||
if ( $wp_current_db_version < 25179 ) {
|
||||
@@ -3725,6 +3728,20 @@ function pre_schema_upgrade() {
|
||||
$wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived varchar(1) NOT NULL default '0'" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" );
|
||||
}
|
||||
|
||||
// Upgrade versions prior to 6.9
|
||||
if ( $wp_current_db_version < 60497 ) {
|
||||
// Convert ID columns from signed to unsigned
|
||||
$wpdb->query( "ALTER TABLE $wpdb->blogs MODIFY blog_id bigint(20) unsigned NOT NULL auto_increment" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->blogs MODIFY site_id bigint(20) unsigned NOT NULL default 0" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->blogmeta MODIFY blog_id bigint(20) unsigned NOT NULL default 0" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->registration_log MODIFY ID bigint(20) unsigned NOT NULL auto_increment" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->registration_log MODIFY blog_id bigint(20) unsigned NOT NULL default 0" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->site MODIFY id bigint(20) unsigned NOT NULL auto_increment" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->sitemeta MODIFY meta_id bigint(20) unsigned NOT NULL auto_increment" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->sitemeta MODIFY site_id bigint(20) unsigned NOT NULL default 0" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->signups MODIFY signup_id bigint(20) unsigned NOT NULL auto_increment" );
|
||||
}
|
||||
}
|
||||
|
||||
// Upgrade versions prior to 4.2.
|
||||
|
||||
Reference in New Issue
Block a user