summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/wp-admin/edit-comments.php2
-rw-r--r--src/wp-admin/includes/upgrade.php2
-rw-r--r--src/wp-admin/options.php17
-rw-r--r--src/wp-includes/class-wp-xmlrpc-server.php2
-rw-r--r--src/wp-includes/comment.php2
-rw-r--r--src/wp-includes/general-template.php1
-rw-r--r--src/wp-includes/option.php18
-rw-r--r--src/wp-includes/post.php27
-rw-r--r--src/wp-includes/theme.json10
-rw-r--r--tests/phpunit/tests/comment/query.php4
-rw-r--r--tests/phpunit/tests/theme/wpThemeJsonResolver.php4
11 files changed, 67 insertions, 22 deletions
diff --git a/src/wp-admin/edit-comments.php b/src/wp-admin/edit-comments.php
index 262e2d9c35..8a004b5226 100644
--- a/src/wp-admin/edit-comments.php
+++ b/src/wp-admin/edit-comments.php
@@ -439,7 +439,7 @@ if ( isset( $_REQUEST['approved'] )
<input type="hidden" name="p" value="<?php echo esc_attr( (int) $post_id ); ?>" />
<?php endif; ?>
<input type="hidden" name="comment_status" value="<?php echo esc_attr( $comment_status ); ?>" />
-<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', 1 ) ); ?>" />
+<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', true ) ); ?>" />
<input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'total_items' ) ); ?>" />
<input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'per_page' ) ); ?>" />
diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
index d8d3248edb..a3c7260a04 100644
--- a/src/wp-admin/includes/upgrade.php
+++ b/src/wp-admin/includes/upgrade.php
@@ -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() ) {
diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
index 8348b24c8e..23d0f3971b 100644
--- a/src/wp-admin/options.php
+++ b/src/wp-admin/options.php
@@ -404,21 +404,32 @@ foreach ( (array) $options as $option ) :
continue;
}
+ if ( 'home' === $option->option_name && defined( 'WP_HOME' ) ) {
+ $disabled = true;
+ }
+
+ if ( 'siteurl' === $option->option_name && defined( 'WP_SITEURL' ) ) {
+ $disabled = true;
+ }
+
if ( is_serialized( $option->option_value ) ) {
if ( is_serialized_string( $option->option_value ) ) {
// This is a serialized string, so we should display it.
$value = maybe_unserialize( $option->option_value );
$options_to_update[] = $option->option_name;
- $class = 'all-options';
} else {
$value = 'SERIALIZED DATA';
$disabled = true;
- $class = 'all-options disabled';
}
} else {
$value = $option->option_value;
$options_to_update[] = $option->option_name;
- $class = 'all-options';
+ }
+
+ $class = 'all-options';
+
+ if ( $disabled ) {
+ $class .= ' disabled';
}
$name = esc_attr( $option->option_name );
diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php
index 665fc72b0c..3b50d393de 100644
--- a/src/wp-includes/class-wp-xmlrpc-server.php
+++ b/src/wp-includes/class-wp-xmlrpc-server.php
@@ -5152,7 +5152,7 @@ class wp_xmlrpc_server extends IXR_Server {
$post_content = xmlrpc_removepostdata( $content );
$post_date = current_time( 'mysql' );
- $post_date_gmt = current_time( 'mysql', 1 );
+ $post_date_gmt = current_time( 'mysql', true );
$post_data = compact(
'post_author',
diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index 20c219cd27..d0a7743c0e 100644
--- a/src/wp-includes/comment.php
+++ b/src/wp-includes/comment.php
@@ -2319,7 +2319,7 @@ function wp_new_comment( $commentdata, $wp_error = false ) {
}
if ( empty( $commentdata['comment_date_gmt'] ) ) {
- $commentdata['comment_date_gmt'] = current_time( 'mysql', 1 );
+ $commentdata['comment_date_gmt'] = current_time( 'mysql', true );
}
if ( empty( $commentdata['comment_type'] ) ) {
diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 3a965a2d3d..7bb584af7c 100644
--- a/src/wp-includes/general-template.php
+++ b/src/wp-includes/general-template.php
@@ -2289,7 +2289,6 @@ function get_calendar( $args = array() ) {
* @type bool $display Whether to display the calendar output. Default true.
* @type string $post_type Optional. Post type. Default 'post'.
* }
- * @return array The arguments for the `get_calendar` function.
*/
$args = apply_filters( 'get_calendar_args', wp_parse_args( $args, $defaults ) );
diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php
index 9760304efc..0280d53758 100644
--- a/src/wp-includes/option.php
+++ b/src/wp-includes/option.php
@@ -3176,7 +3176,23 @@ function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
*
* @global array $wp_registered_settings
*
- * @return array List of registered settings, keyed by option name.
+ * @return array {
+ * List of registered settings, keyed by option name.
+ *
+ * @type array ...$0 {
+ * Data used to describe the setting when registered.
+ *
+ * @type string $type The type of data associated with this setting.
+ * Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'.
+ * @type string $label A label of the data attached to this setting.
+ * @type string $description A description of the data attached to this setting.
+ * @type callable $sanitize_callback A callback function that sanitizes the option's value.
+ * @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API.
+ * When registering complex settings, this argument may optionally be an
+ * array with a 'schema' key.
+ * @type mixed $default Default value when calling `get_option()`.
+ * }
+ * }
*/
function get_registered_settings() {
global $wp_registered_settings;
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 62960a6b0f..19fada6383 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -1906,7 +1906,7 @@ function unregister_post_type( $post_type ) {
* Otherwise, an 's' will be added to the value for the plural form. After
* registration, capability_type will always be a string of the singular value.
*
- * By default, eight keys are accepted as part of the capabilities array:
+ * By default, the following keys are accepted as part of the capabilities array:
*
* - edit_post, read_post, and delete_post are meta capabilities, which are then
* generally mapped to corresponding primitive capabilities depending on the
@@ -1921,8 +1921,9 @@ function unregister_post_type( $post_type ) {
* - delete_posts - Controls whether objects of this post type can be deleted.
* - publish_posts - Controls publishing objects of this post type.
* - read_private_posts - Controls whether private objects can be read.
+ * - create_posts - Controls whether objects of this post type can be created.
*
- * These five primitive capabilities are checked in core in various locations.
+ * These primitive capabilities are checked in core in various locations.
* There are also six other primitive capabilities which are not referenced
* directly in core, except in map_meta_cap(), which takes the three aforementioned
* meta capabilities and translates them into one or more primitive capabilities
@@ -1948,7 +1949,25 @@ function unregister_post_type( $post_type ) {
* @see map_meta_cap()
*
* @param object $args Post type registration arguments.
- * @return object Object with all the capabilities as member variables.
+ * @return object {
+ * Object with all the capabilities as member variables.
+ *
+ * @type string $edit_post Capability to edit a post.
+ * @type string $read_post Capability to read a post.
+ * @type string $delete_post Capability to delete a post.
+ * @type string $edit_posts Capability to edit posts.
+ * @type string $edit_others_posts Capability to edit others' posts.
+ * @type string $delete_posts Capability to delete posts.
+ * @type string $publish_posts Capability to publish posts.
+ * @type string $read_private_posts Capability to read private posts.
+ * @type string $create_posts Capability to create posts.
+ * @type string $read Optional. Capability to read a post.
+ * @type string $delete_private_posts Optional. Capability to delete private posts.
+ * @type string $delete_published_posts Optional. Capability to delete published posts.
+ * @type string $delete_others_posts Optional. Capability to delete others' posts.
+ * @type string $edit_private_posts Optional. Capability to edit private posts.
+ * @type string $edit_published_posts Optional. Capability to edit published posts.
+ * }
*/
function get_post_type_capabilities( $args ) {
if ( ! is_array( $args->capability_type ) ) {
@@ -4623,7 +4642,7 @@ function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true )
if ( $update || '0000-00-00 00:00:00' === $post_date ) {
$post_modified = current_time( 'mysql' );
- $post_modified_gmt = current_time( 'mysql', 1 );
+ $post_modified_gmt = current_time( 'mysql', true );
} else {
$post_modified = $post_date;
$post_modified_gmt = $post_date_gmt;
diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json
index 641c379557..85836d6c24 100644
--- a/src/wp-includes/theme.json
+++ b/src/wp-includes/theme.json
@@ -65,7 +65,7 @@
"gradients": [
{
"name": "Vivid cyan blue to vivid purple",
- "gradient": "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",
+ "gradient": "linear-gradient(135deg,rgb(6,147,227) 0%,rgb(155,81,224) 100%)",
"slug": "vivid-cyan-blue-to-vivid-purple"
},
{
@@ -75,12 +75,12 @@
},
{
"name": "Luminous vivid amber to luminous vivid orange",
- "gradient": "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
+ "gradient": "linear-gradient(135deg,rgb(252,185,0) 0%,rgb(255,105,0) 100%)",
"slug": "luminous-vivid-amber-to-luminous-vivid-orange"
},
{
"name": "Luminous vivid orange to vivid red",
- "gradient": "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
+ "gradient": "linear-gradient(135deg,rgb(255,105,0) 0%,rgb(207,46,46) 100%)",
"slug": "luminous-vivid-orange-to-vivid-red"
},
{
@@ -251,12 +251,12 @@
{
"name": "Outlined",
"slug": "outlined",
- "shadow": "6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)"
+ "shadow": "6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0)"
},
{
"name": "Crisp",
"slug": "crisp",
- "shadow": "6px 6px 0px rgba(0, 0, 0, 1)"
+ "shadow": "6px 6px 0px rgb(0, 0, 0)"
}
]
},
diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php
index 4104bc12c7..d01282dfd9 100644
--- a/tests/phpunit/tests/comment/query.php
+++ b/tests/phpunit/tests/comment/query.php
@@ -3001,7 +3001,7 @@ class Tests_Comment_Query extends WP_UnitTestCase {
* @covers WP_Comment_Query::query
*/
public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_ASC() {
- $now = current_time( 'mysql', 1 );
+ $now = current_time( 'mysql', true );
$comments = self::factory()->comment->create_many(
5,
array(
@@ -3028,7 +3028,7 @@ class Tests_Comment_Query extends WP_UnitTestCase {
* @covers WP_Comment_Query::query
*/
public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_DESC() {
- $now = current_time( 'mysql', 1 );
+ $now = current_time( 'mysql', true );
$comments = self::factory()->comment->create_many(
5,
array(
diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php
index 4fb3784f1a..a8c845caeb 100644
--- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php
+++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php
@@ -1207,12 +1207,12 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase {
),
array(
'name' => 'Outlined',
- 'shadow' => '6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)',
+ 'shadow' => '6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0)',
'slug' => 'outlined',
),
array(
'name' => 'Crisp',
- 'shadow' => '6px 6px 0px rgba(0, 0, 0, 1)',
+ 'shadow' => '6px 6px 0px rgb(0, 0, 0)',
'slug' => 'crisp',
),
),