Make WordPress Core


Ignore:
Timestamp:
02/10/2021 05:38:23 AM (5 years ago)
Author:
peterwilsoncc
Message:

Canonical: Rename wp_force_plain_ugly_permalink() to match UI terminology.

Rename wp_force_plain_ugly_permalink() to wp_force_plain_post_permalink() to match terminology used in the WordPress dashboard.

Follow up to [50132].
Props SergeyBiryukov.
Fixes #5272.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/postStatus.php

    r50132 r50282  
    216216     *
    217217     * @ticket 5272
    218      * @dataProvider data_canonical_redirects_to_ugly_permalinks
     218     * @dataProvider data_canonical_redirects_to_plain_permalinks
    219219     *
    220220     * @param string $post_key  Post key used for creating fixtures.
     
    223223     * @param string $expected  Expected URL.
    224224     */
    225     public function test_canonical_redirects_to_ugly_permalinks( $post_key, $user_role, $requested, $expected ) {
     225    public function test_canonical_redirects_to_plain_permalinks( $post_key, $user_role, $requested, $expected ) {
    226226        wp_set_current_user( self::$users[ $user_role ] );
    227227        $this->set_permalink_structure( '' );
     
    240240
    241241    /**
    242      * Data provider for test_canonical_redirects_to_ugly_permalinks.
     242     * Data provider for test_canonical_redirects_to_plain_permalinks.
    243243     *
    244244     * @return array[] Array of arguments for tests {
     
    249249     * }
    250250     */
    251     function data_canonical_redirects_to_ugly_permalinks() {
     251    function data_canonical_redirects_to_plain_permalinks() {
    252252        $data              = array();
    253253        $all_user_list     = array( 'anon', 'subscriber', 'content_author', 'editor' );
     
    264264            foreach ( $all_user_list as $user ) {
    265265                /*
    266                  * In the event `redirect_canonical()` is updated to redirect ugly permalinks
    267                  * to a canonical ugly version, these expected values can be changed.
     266                 * In the event `redirect_canonical()` is updated to redirect plain permalinks
     267                 * to a canonical plain version, these expected values can be changed.
    268268                 */
    269269                $data[] = array(
     
    302302            foreach ( $select_allow_list as $user ) {
    303303                /*
    304                  * In the event `redirect_canonical()` is updated to redirect ugly permalinks
    305                  * to a canonical ugly version, these expected values can be changed.
     304                 * In the event `redirect_canonical()` is updated to redirect plain permalinks
     305                 * to a canonical plain version, these expected values can be changed.
    306306                 */
    307307                $data[] = array(
     
    338338            foreach ( $select_block_list as $user ) {
    339339                /*
    340                  * In the event `redirect_canonical()` is updated to redirect ugly permalinks
    341                  * to a canonical ugly version, these expected values MUST NOT be changed.
     340                 * In the event `redirect_canonical()` is updated to redirect plain permalinks
     341                 * to a canonical plain version, these expected values MUST NOT be changed.
    342342                 */
    343343                $data[] = array(
     
    376376            foreach ( $all_user_list as $user ) {
    377377                /*
    378                  * In the event `redirect_canonical()` is updated to redirect ugly permalinks
    379                  * to a canonical ugly version, these expected values MUST NOT be changed.
     378                 * In the event `redirect_canonical()` is updated to redirect plain permalinks
     379                 * to a canonical plain version, these expected values MUST NOT be changed.
    380380                 */
    381381                $data[] = array(
     
    414414            foreach ( $all_user_list as $user ) {
    415415                /*
    416                  * In the event `redirect_canonical()` is updated to redirect ugly permalinks
    417                  * to a canonical ugly version, these expected values MUST NOT be changed.
     416                 * In the event `redirect_canonical()` is updated to redirect plain permalinks
     417                 * to a canonical plain version, these expected values MUST NOT be changed.
    418418                 */
    419419                $data[] = array(
Note: See TracChangeset for help on using the changeset viewer.