Changeset 50565
- Timestamp:
- 03/23/2021 01:53:50 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r49946 r50565 1119 1119 ); 1120 1120 1121 if ( isset( $t->rewrite['hierarchical'] ) && $t->rewrite['hierarchical']) {1121 if ( ! empty( $t->rewrite['hierarchical'] ) ) { 1122 1122 $q[ $t->query_var ] = wp_basename( $q[ $t->query_var ] ); 1123 1123 } -
trunk/src/wp-includes/taxonomy.php
r50562 r50565 4476 4476 $termlink = home_url( $termlink ); 4477 4477 } else { 4478 if ( $t->rewrite['hierarchical']) {4478 if ( ! empty( $t->rewrite['hierarchical'] ) ) { 4479 4479 $hierarchical_slugs = array(); 4480 4480 $ancestors = get_ancestors( $term->term_id, $taxonomy, 'taxonomy' ); -
trunk/tests/phpunit/tests/term/getTermLink.php
r49108 r50565 103 103 $this->assertContains( 'taxonomy=wptests_tax2', $actual ); 104 104 $this->assertContains( 'term=bar', $actual ); 105 } 106 107 /** 108 * @ticket 52882 109 */ 110 public function test_taxonomy_with_rewrite_false_and_custom_permalink_structure() { 111 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 112 113 register_taxonomy( 114 'wptests_tax2', 115 'post', 116 array( 117 'rewrite' => false, 118 ) 119 ); 120 121 add_permastruct( 'wptests_tax2', 'foo/%wptests_tax2%' ); 122 123 $t = self::factory()->term->create( 124 array( 125 'taxonomy' => 'wptests_tax2', 126 'slug' => 'bar', 127 ) 128 ); 129 130 $actual = get_term_link( $t, 'wptests_tax2' ); 131 132 remove_permastruct( 'wptests_tax2' ); 133 134 $this->assertContains( '/foo/bar/', $actual ); 105 135 } 106 136
Note: See TracChangeset
for help on using the changeset viewer.