Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r30282 r42343  
    1212        global $wp_rewrite;
    1313        // Add a custom Rewrite rule to test category redirections.
    14         $wp_rewrite->add_rule('ccr/(.+?)/sort/(asc|desc)', 'index.php?category_name=$matches[1]&order=$matches[2]', 'top'); // ccr = Custom_Cat_Rule
     14        $wp_rewrite->add_rule( 'ccr/(.+?)/sort/(asc|desc)', 'index.php?category_name=$matches[1]&order=$matches[2]', 'top' ); // ccr = Custom_Cat_Rule
    1515        $wp_rewrite->flush_rules();
    1616    }
     
    3434        return array(
    3535            // Custom Rewrite rules leading to Categories
    36             array( '/ccr/uncategorized/sort/asc/', array( 'url' => '/ccr/uncategorized/sort/asc/', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'asc' ) ) ),
    37             array( '/ccr/uncategorized/sort/desc/', array( 'url' => '/ccr/uncategorized/sort/desc/', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'desc' ) ) ),
     36            array(
     37                '/ccr/uncategorized/sort/asc/',
     38                array(
     39                    'url' => '/ccr/uncategorized/sort/asc/',
     40                    'qv'  => array(
     41                        'category_name' => 'uncategorized',
     42                        'order'         => 'asc',
     43                    ),
     44                ),
     45            ),
     46            array(
     47                '/ccr/uncategorized/sort/desc/',
     48                array(
     49                    'url' => '/ccr/uncategorized/sort/desc/',
     50                    'qv'  => array(
     51                        'category_name' => 'uncategorized',
     52                        'order'         => 'desc',
     53                    ),
     54                ),
     55            ),
    3856        );
    3957    }
Note: See TracChangeset for help on using the changeset viewer.