Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/slashes.php

    r46586 r47122  
    1313        wp_set_current_user( $this->author_id );
    1414
    15         // it is important to test with both even and odd numbered slashes as
    16         // kses does a strip-then-add slashes in some of its function calls
     15        // It is important to test with both even and odd numbered slashes,
     16        // as KSES does a strip-then-add slashes in some of its function calls.
    1717        $this->slash_1 = 'String with 1 slash \\';
    1818        $this->slash_2 = 'String with 2 slashes \\\\';
     
    2525
    2626    /**
    27      * Tests the controller function that expects slashed data
     27     * Tests the controller function that expects slashed data.
    2828     */
    2929    function test_add_user() {
     
    4141        $_POST['display_name'] = $this->slash_7;
    4242        $_POST['description']  = $this->slash_3;
    43         $_POST                 = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes
     43
     44        $_POST = add_magic_quotes( $_POST ); // The add_user() function will strip slashes.
    4445
    4546        $id   = add_user();
     
    6566        $_POST['display_name'] = $this->slash_2;
    6667        $_POST['description']  = $this->slash_4;
    67         $_POST                 = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes
     68
     69        $_POST = add_magic_quotes( $_POST ); // The add_user() function will strip slashes.
    6870
    6971        $id   = add_user();
     
    7880
    7981    /**
    80      * Tests the controller function that expects slashed data
     82     * Tests the controller function that expects slashed data.
    8183     */
    8284    function test_edit_user() {
     
    9395        $_POST['display_name'] = $this->slash_7;
    9496        $_POST['description']  = $this->slash_3;
    95         $_POST                 = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes
     97
     98        $_POST = add_magic_quotes( $_POST ); // The edit_user() function will strip slashes.
    9699
    97100        $id   = edit_user( $id );
     
    114117        $_POST['display_name'] = $this->slash_2;
    115118        $_POST['description']  = $this->slash_4;
    116         $_POST                 = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes
     119
     120        $_POST = add_magic_quotes( $_POST ); // The edit_user() function will strip slashes.
    117121
    118122        $id   = edit_user( $id );
     
    127131
    128132    /**
    129      * Tests the model function that expects slashed data
     133     * Tests the model function that expects slashed data.
    130134     */
    131135    function test_wp_insert_user() {
     
    174178
    175179    /**
    176      * Tests the model function that expects slashed data
     180     * Tests the model function that expects slashed data.
    177181     */
    178182    function test_wp_update_user() {
Note: See TracChangeset for help on using the changeset viewer.