Make WordPress Core

Changeset 50916


Ignore:
Timestamp:
05/15/2021 05:36:49 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Miscellaneous DocBlock corrections.

See #52628.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/authorize-application.php

    r50006 r50916  
    1313$new_password = '';
    1414
    15 // This is the no-js fallback script.  Generally this will all be handled by `auth-app.js`
     15// This is the no-js fallback script. Generally this will all be handled by `auth-app.js`.
    1616if ( isset( $_POST['action'] ) && 'authorize_application_password' === $_POST['action'] ) {
    1717    check_admin_referer( 'authorize_application_password' );
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r50764 r50916  
    15141514     */
    15151515    public function get_test_https_status() {
    1516         // Enforce fresh HTTPS detection results. This is normally invoked by using cron, but for Site Health it should
    1517         // always rely on the latest results.
     1516        // Enforce fresh HTTPS detection results. This is normally invoked by using cron,
     1517        // but for Site Health it should always rely on the latest results.
    15181518        wp_update_https_detection_errors();
    15191519
     
    15421542
    15431543        if ( ! wp_is_using_https() ) {
    1544             // If the website is not using HTTPS, provide more information about whether it is supported and how it can
    1545             // be enabled.
     1544            // If the website is not using HTTPS, provide more information
     1545            // about whether it is supported and how it can be enabled.
    15461546            $result['status'] = 'recommended';
    15471547            $result['label']  = __( 'Your website does not use HTTPS' );
  • trunk/src/wp-admin/setup-config.php

    r50779 r50916  
    454454                if ( ! empty( $wp_config_perms ) && ! is_writable( $path_to_wp_config ) ) {
    455455                    $error_message = sprintf(
    456                         /* translators: 1 wp-config.php, 2: Documentation URL. */
     456                        /* translators: 1: wp-config.php, 2: Documentation URL. */
    457457                        __( 'You need to make the file %1$s writable before you can save your changes. See <a href="%2$s">Changing File Permissions</a> for more information.' ),
    458458                        '<code>wp-config.php</code>',
  • trunk/src/wp-includes/class-wp-simplepie-file.php

    r49805 r50916  
    2525     * @since 2.8.0
    2626     * @since 3.2.0 Updated to use a PHP5 constructor.
    27      * @since 5.6.1 Multiple headers are concatenated into a comma-separated string, rather than remaining
    28      *              an array.
     27     * @since 5.6.1 Multiple headers are concatenated into a comma-separated string,
     28     *              rather than remaining an array.
    2929     *
    3030     * @param string       $url             Remote file URL.
     
    7171
    7272                /*
    73                  * SimplePie expects multiple headers to be stored as a comma-separated string, but
    74                  * `wp_remote_retrieve_headers()` returns them as an array, so they need to be
    75                  * converted.
     73                 * SimplePie expects multiple headers to be stored as a comma-separated string,
     74                 * but `wp_remote_retrieve_headers()` returns them as an array, so they need
     75                 * to be converted.
    7676                 *
    77                  * The only exception to that is the `content-type` header, which should ignore any
    78                  * previous values and only use the last one.
     77                 * The only exception to that is the `content-type` header, which should ignore
     78                 * any previous values and only use the last one.
    7979                 *
    8080                 * @see SimplePie_HTTP_Parser::new_line().
  • trunk/src/wp-includes/feed.php

    r49565 r50916  
    797797
    798798    $feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
    799     // We must manually overwrite $feed->sanitize because SimplePie's
    800     // constructor sets it before we have a chance to set the sanitization class.
     799    // We must manually overwrite $feed->sanitize because SimplePie's constructor
     800    // sets it before we have a chance to set the sanitization class.
    801801    $feed->sanitize = new WP_SimplePie_Sanitize_KSES();
    802802
  • trunk/src/wp-includes/https-detection.php

    r50471 r50916  
    4141 * Checks whether the current site's URL where WordPress is stored is using HTTPS.
    4242 *
    43  * This checks the URL where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are
    44  * accessible.
     43 * This checks the URL where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder)
     44 * are accessible.
    4545 *
    4646 * @since 5.7.0
  • trunk/src/wp-includes/sitemaps.php

    r48872 r50916  
    5252function wp_get_sitemap_providers() {
    5353    $sitemaps = wp_sitemaps_get_server();
     54
    5455    return $sitemaps->registry->get_providers();
    5556}
     
    6667function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
    6768    $sitemaps = wp_sitemaps_get_server();
     69
    6870    return $sitemaps->registry->add_provider( $name, $provider );
    6971}
     
    9597 *
    9698 * @param string $name         The sitemap name.
    97  * @param string $subtype_name The sitemap subtype name.  Default empty string.
    98  * @param int    $page         The page of the sitemap.  Default 1.
     99 * @param string $subtype_name The sitemap subtype name. Default empty string.
     100 * @param int    $page         The page of the sitemap. Default 1.
    99101 * @return string|false The sitemap URL or false if the sitemap doesn't exist.
    100102 */
    101103function get_sitemap_url( $name, $subtype_name = '', $page = 1 ) {
    102104    $sitemaps = wp_sitemaps_get_server();
     105
    103106    if ( ! $sitemaps ) {
    104107        return false;
     
    122125        $page = 1;
    123126    }
     127
    124128    return $provider->get_sitemap_url( $subtype_name, $page );
    125129}
  • trunk/src/wp-includes/user.php

    r50790 r50916  
    748748 * @see WP_User_Query
    749749 *
    750  * @param array $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query().
     750 * @param array $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query()
    751751 *                    for more information on accepted arguments.
    752752 * @return array List of users.
  • trunk/src/wp-load.php

    r50914 r50916  
    2626 * it's best to add a dummy function to the wp-config.php file, but as this call to the function
    2727 * is run prior to wp-config.php loading, it is wrapped in a function_exists() check.
    28  *
    29  * Initialize error reporting to a known set of levels.
    30  *
    31  * This will be adapted in wp_debug_mode located in wp-includes/load.php based on WP_DEBUG.
    32  * @see http://php.net/manual/en/errorfunc.constants.php List of known error levels.
    3328 */
    3429if ( function_exists( 'error_reporting' ) ) {
     30    /*
     31     * Initialize error reporting to a known set of levels.
     32     *
     33     * This will be adapted in wp_debug_mode() located in wp-includes/load.php based on WP_DEBUG.
     34     * @see http://php.net/manual/en/errorfunc.constants.php List of known error levels.
     35     */
    3536    error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    3637}
  • trunk/tests/phpunit/tests/general/template.php

    r50339 r50916  
    569569    /**
    570570     * @ticket 9862
     571     * @ticket 51166
    571572     * @dataProvider data_selected_and_checked_with_equal_values
    572573     *
     
    596597    /**
    597598     * @ticket 9862
     599     * @ticket 51166
    598600     * @dataProvider data_selected_and_checked_with_non_equal_values
    599601     *
  • trunk/tests/phpunit/tests/pluggable.php

    r50790 r50916  
    329329     */
    330330    public function test_get_user_by_should_return_same_instance_as_wp_get_current_user() {
    331         // Create a test user
     331        // Create a test user.
    332332        $new_user = self::factory()->user->create( array( 'role' => 'subscriber' ) );
    333333
    334         // Set the test user as the current user
     334        // Set the test user as the current user.
    335335        $current_user = wp_set_current_user( $new_user );
    336336
    337         // Get the test user using get_user_by()
     337        // Get the test user using get_user_by().
    338338        $from_get_user_by = get_user_by( 'id', $new_user );
    339339
Note: See TracChangeset for help on using the changeset viewer.