WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (22 months 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/post/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_edit_post() {
     
    3535        $_POST['content']    = $this->slash_5;
    3636        $_POST['excerpt']    = $this->slash_7;
    37         $_POST               = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes
     37
     38        $_POST = add_magic_quotes( $_POST ); // The edit_post() function will strip slashes.
    3839
    3940        $post_id = edit_post();
     
    4950        $_POST['content']    = $this->slash_4;
    5051        $_POST['excerpt']    = $this->slash_6;
    51         $_POST               = add_magic_quotes( $_POST );
     52
     53        $_POST = add_magic_quotes( $_POST ); // The edit_post() function will strip slashes.
    5254
    5355        $post_id = edit_post();
     
    6062
    6163    /**
    62      * Tests the model function that expects slashed data
     64     * Tests the model function that expects slashed data.
    6365     */
    6466    function test_wp_insert_post() {
     
    9698
    9799    /**
    98      * Tests the model function that expects slashed data
     100     * Tests the model function that expects slashed data.
    99101     */
    100102    function test_wp_update_post() {
Note: See TracChangeset for help on using the changeset viewer.