WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/10/2019 07:22:07 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Docs: Fix placement of some duplicate hook references.

Hook documentation should be on the line directly above the line containing the do_action() or apply_filters() call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/paginateLinks.php

    r43571 r46088  
    1717
    1818        $expected = <<<EXPECTED
    19 <span aria-current='page' class='page-numbers current'>1</span>
    20 <a class='page-numbers' href='$page2'>2</a>
    21 <a class='page-numbers' href='$page3'>3</a>
     19<span aria-current="page" class="page-numbers current">1</span>
     20<a class="page-numbers" href="$page2">2</a>
     21<a class="page-numbers" href="$page3">3</a>
    2222<span class="page-numbers dots">&hellip;</span>
    23 <a class='page-numbers' href='$page50'>50</a>
     23<a class="page-numbers" href="$page50">50</a>
    2424<a class="next page-numbers" href="$page2">Next &raquo;</a>
    2525EXPECTED;
     
    3535
    3636        $expected = <<<EXPECTED
    37 <span aria-current='page' class='page-numbers current'>1</span>
    38 <a class='page-numbers' href='$page2'>2</a>
    39 <a class='page-numbers' href='$page3'>3</a>
     37<span aria-current="page" class="page-numbers current">1</span>
     38<a class="page-numbers" href="$page2">2</a>
     39<a class="page-numbers" href="$page3">3</a>
    4040<span class="page-numbers dots">&hellip;</span>
    41 <a class='page-numbers' href='$page50'>50</a>
     41<a class="page-numbers" href="$page50">50</a>
    4242<a class="next page-numbers" href="$page2">Next &raquo;</a>
    4343EXPECTED;
     
    5959
    6060        $expected = <<<EXPECTED
    61 <a class='page-numbers' href='$home'>1</a>
    62 <span aria-current='page' class='page-numbers current'>2</span>
    63 <a class='page-numbers' href='$page3'>3</a>
    64 <a class='page-numbers' href='$page4'>4</a>
     61<a class="page-numbers" href="$home">1</a>
     62<span aria-current="page" class="page-numbers current">2</span>
     63<a class="page-numbers" href="$page3">3</a>
     64<a class="page-numbers" href="$page4">4</a>
    6565<span class="page-numbers dots">&hellip;</span>
    66 <a class='page-numbers' href='$page50'>50</a>
     66<a class="page-numbers" href="$page50">50</a>
    6767EXPECTED;
    6868
     
    8585        $expected = <<<EXPECTED
    8686<a class="prev page-numbers" href="$home">&laquo; Previous</a>
    87 <a class='page-numbers' href='$home'>1</a>
    88 <span aria-current='page' class='page-numbers current'>2</span>
    89 <a class='page-numbers' href='$page3'>3</a>
    90 <a class='page-numbers' href='$page4'>4</a>
     87<a class="page-numbers" href="$home">1</a>
     88<span aria-current="page" class="page-numbers current">2</span>
     89<a class="page-numbers" href="$page3">3</a>
     90<a class="page-numbers" href="$page4">4</a>
    9191<span class="page-numbers dots">&hellip;</span>
    92 <a class='page-numbers' href='$page50'>50</a>
     92<a class="page-numbers" href="$page50">50</a>
    9393<a class="next page-numbers" href="$page3">Next &raquo;</a>
    9494EXPECTED;
     
    334334        );
    335335
    336         $this->assertContains( "<span aria-current='page' class='page-numbers current'>3</span>", $links );
     336        $this->assertContains( '<span aria-current="page" class="page-numbers current">3</span>', $links );
    337337    }
    338338
     
    356356
    357357        $page_2_url = home_url() . '?foo=2';
    358         $this->assertContains( "<a class='page-numbers' href='$page_2_url'>2</a>", $links );
     358        $this->assertContains( "<a class=\"page-numbers\" href=\"$page_2_url\">2</a>", $links );
    359359    }
    360360}
Note: See TracChangeset for help on using the changeset viewer.