summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-includes
diff options
context:
space:
mode:
Diffstat (limited to 'src/wp-includes')
-rw-r--r--src/wp-includes/class-wp-locale-switcher.php2
-rw-r--r--src/wp-includes/class-wp-phpmailer.php10
-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/script-loader.php2
-rw-r--r--src/wp-includes/theme.json10
-rw-r--r--src/wp-includes/user.php2
10 files changed, 56 insertions, 20 deletions
diff --git a/src/wp-includes/class-wp-locale-switcher.php b/src/wp-includes/class-wp-locale-switcher.php
index db4ae298c6..55edef3c9c 100644
--- a/src/wp-includes/class-wp-locale-switcher.php
+++ b/src/wp-includes/class-wp-locale-switcher.php
@@ -287,7 +287,7 @@ class WP_Locale_Switcher {
WP_Translation_Controller::get_instance()->set_locale( $locale );
if ( $phpmailer instanceof WP_PHPMailer ) {
- $phpmailer->SetLanguage();
+ $phpmailer->setLanguage();
}
/**
diff --git a/src/wp-includes/class-wp-phpmailer.php b/src/wp-includes/class-wp-phpmailer.php
index b3c976d13d..c3f9f3088e 100644
--- a/src/wp-includes/class-wp-phpmailer.php
+++ b/src/wp-includes/class-wp-phpmailer.php
@@ -24,7 +24,7 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer {
*/
public function __construct( $exceptions = false ) {
parent::__construct( $exceptions );
- $this->SetLanguage();
+ $this->setLanguage();
}
/**
@@ -32,10 +32,12 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer {
*
* @since 6.8.0
*
+ * @param string $langcode Optional. Unused. ISO 639-1 2-character language code. Default 'en'.
+ * @param string $lang_path Optional. Unused. Path to the language file directory. Default empty string.
* @return true Always returns true.
*/
- public function SetLanguage( $langcode = 'en', $lang_path = '' ) {
- $error_strings = array(
+ public function setLanguage( $langcode = 'en', $lang_path = '' ) {
+ $this->language = array(
'authenticate' => __( 'SMTP Error: Could not authenticate.' ),
'buggy_php' => sprintf(
/* translators: 1: mail.add_x_header. 2: php.ini */
@@ -87,7 +89,7 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer {
/* translators: There is a space after the colon. */
'variable_set' => __( 'Cannot set or reset variable: ' ),
);
- $this->language = $error_strings;
+
return true;
}
}
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/script-loader.php b/src/wp-includes/script-loader.php
index c82c620ffe..d439629882 100644
--- a/src/wp-includes/script-loader.php
+++ b/src/wp-includes/script-loader.php
@@ -1497,7 +1497,7 @@ function wp_default_scripts( $scripts ) {
$scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
$scripts->set_translations( 'wp-color-picker' );
- $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y', 'wp-date' ), false, 1 );
+ $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'common', 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y', 'wp-date' ), false, 1 );
$scripts->set_translations( 'dashboard' );
$scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" );
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/src/wp-includes/user.php b/src/wp-includes/user.php
index 1e15b4b0ce..6d53726327 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -3172,7 +3172,7 @@ function retrieve_password( $user_login = '' ) {
$user_data = false;
// Use the passed $user_login if available, otherwise use $_POST['user_login'].
- if ( ! $user_login && ! empty( $_POST['user_login'] ) ) {
+ if ( ! $user_login && ! empty( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
$user_login = $_POST['user_login'];
}