Changeset 42343 for trunk/tests/phpunit/tests/canonical/customRules.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/canonical/customRules.php
r30282 r42343 12 12 global $wp_rewrite; 13 13 // 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_Rule14 $wp_rewrite->add_rule( 'ccr/(.+?)/sort/(asc|desc)', 'index.php?category_name=$matches[1]&order=$matches[2]', 'top' ); // ccr = Custom_Cat_Rule 15 15 $wp_rewrite->flush_rules(); 16 16 } … … 34 34 return array( 35 35 // 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 ), 38 56 ); 39 57 }
Note: See TracChangeset
for help on using the changeset viewer.