Changeset 14004
- Timestamp:
- 08/09/2024 02:43:17 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/14.0/src/bp-templates/bp-nouveau/buddypress-functions.php
r13898 r14004 121 121 0 122 122 ); 123 124 // When BP Classic is activated, regular themes need this filter. 125 if ( function_exists( 'bp_classic' ) ) { 126 // Set the BP Uri for the Ajax customizer preview. 127 add_filter( 'bp_uri', array( $this, 'customizer_set_uri' ), 10, 1 ); 128 } 123 129 } elseif ( wp_using_themes() && ! isset( $_GET['bp_customizer'] ) ) { 124 130 remove_action( 'customize_register', 'bp_customize_register', 20 ); … … 694 700 * 695 701 * @since 3.0.0 696 * @ deprecated 12.0.0702 * @since 12.0.0 Only fired for regular themes when BP Classic is activated. 697 703 * 698 704 * @param string $path The BP Uri. 699 * @return string The BP Uri.705 * @return string 700 706 */ 701 707 public function customizer_set_uri( $path ) { 702 _deprecated_function( __METHOD__, '12.0.0' );703 708 704 709 if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { … … 708 713 $uri = wp_parse_url( $path ); 709 714 710 if ( false === strpos( $uri['path'], 'customize.php') ) {715 if ( ! str_contains( $uri['path'], 'customize.php' ) || empty( $uri['query'] ) ) { 711 716 return $path; 712 } else {713 $vars = bp_parse_args( 714 $uri['query'],715 array(),716 'customizer_set_uri'717 );718 719 if ( ! empty( $vars['url'] ) ) { 720 $path = str_replace( get_site_url(), '', urldecode( $vars['url'] ) );721 }717 } 718 719 $vars = bp_parse_args( 720 $uri['query'], 721 array(), 722 'customizer_set_uri' 723 ); 724 725 if ( ! empty( $vars['url'] ) ) { 726 $path = str_replace( get_site_url(), '', urldecode( $vars['url'] ) ); 722 727 } 723 728
Note: See TracChangeset
for help on using the changeset viewer.