Changeset 13690
- Timestamp:
- 01/05/2024 03:50:01 AM (13 months ago)
- Location:
- branches/12.0/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/12.0/src/bp-activity/classes/class-bp-activity-component.php
r13522 r13690 482 482 } 483 483 484 if ( home_url( '/' ) === bp_get_requested_url() && bp_is_directory_homepage( $this->id ) ) {484 if ( bp_is_site_home() && bp_is_directory_homepage( $this->id ) ) { 485 485 $query->set( $this->rewrite_ids['directory'], 1 ); 486 486 } -
branches/12.0/src/bp-core/bp-core-template.php
r13493 r13690 1924 1924 */ 1925 1925 return (bool) apply_filters( 'bp_is_blog_page', $is_blog_page ); 1926 } 1927 1928 /** 1929 * Checks whether the requested URL is site home's one. 1930 * 1931 * @since 12.1.0 1932 * 1933 * @return boolean True if the requested URL is site home's one. False otherwise. 1934 */ 1935 function bp_is_site_home() { 1936 $requested_url = bp_get_requested_url(); 1937 $home_url = home_url( '/' ); 1938 1939 if ( is_customize_preview() ) { 1940 $requested_url = wp_parse_url( $requested_url, PHP_URL_PATH ); 1941 $home_url = wp_parse_url( $home_url, PHP_URL_PATH ); 1942 } 1943 1944 return $home_url === $requested_url; 1926 1945 } 1927 1946 -
branches/12.0/src/bp-groups/classes/class-bp-groups-component.php
r13525 r13690 1065 1065 } 1066 1066 1067 if ( home_url( '/' ) === bp_get_requested_url() && bp_is_directory_homepage( $this->id ) ) {1067 if ( bp_is_site_home() && bp_is_directory_homepage( $this->id ) ) { 1068 1068 $query->set( $this->rewrite_ids['directory'], 1 ); 1069 1069 } -
branches/12.0/src/bp-members/classes/class-bp-members-component.php
r13621 r13690 797 797 } 798 798 799 if ( home_url( '/' ) === bp_get_requested_url() && bp_is_directory_homepage( $this->id ) ) {799 if ( bp_is_site_home() && bp_is_directory_homepage( $this->id ) ) { 800 800 $query->set( $this->rewrite_ids['directory'], 1 ); 801 801 }
Note: See TracChangeset
for help on using the changeset viewer.