Changeset 13808 for trunk/src/bp-groups/bp-groups-functions.php
- Timestamp:
- 04/26/2024 05:44:26 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r13619 r13808 330 330 // Backward compatibility with old method of passing arguments. 331 331 if ( ! is_array( $args ) || count( $function_args ) > 1 ) { 332 _deprecated_argument( __METHOD__, '2.9.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );332 _deprecated_argument( __METHOD__, '2.9.0', sprintf( esc_html__( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 333 333 334 334 $old_args_keys = array( … … 813 813 if ( ! is_array( $args ) || count( $function_args ) > 1 ) { 814 814 /* translators: 1: the name of the method. 2: the name of the file. */ 815 _deprecated_argument( __METHOD__, '2.0.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );815 _deprecated_argument( __METHOD__, '2.0.0', sprintf( esc_html__( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 816 816 817 817 $old_args_keys = array( … … 1832 1832 // Backward compatibility with old method of passing arguments. 1833 1833 if ( ! is_array( $args[0] ) || count( $args ) > 1 ) { 1834 _deprecated_argument( __METHOD__, '5.0.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );1834 _deprecated_argument( __METHOD__, '5.0.0', sprintf( esc_html__( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 1835 1835 1836 1836 $old_args_keys = array( … … 2048 2048 function groups_demote_member( $user_id, $group_id ) { 2049 2049 2050 if ( ! bp_is_item_admin() ) 2050 if ( ! bp_is_item_admin() ) { 2051 2051 return false; 2052 } 2052 2053 2053 2054 $member = new BP_Groups_Member( $user_id, $group_id ); … … 2077 2078 function groups_ban_member( $user_id, $group_id ) { 2078 2079 2079 if ( ! bp_is_item_admin() ) 2080 if ( ! bp_is_item_admin() ) { 2080 2081 return false; 2082 } 2081 2083 2082 2084 $member = new BP_Groups_Member( $user_id, $group_id ); … … 2106 2108 function groups_unban_member( $user_id, $group_id ) { 2107 2109 2108 if ( ! bp_is_item_admin() ) 2110 if ( ! bp_is_item_admin() ) { 2109 2111 return false; 2112 } 2110 2113 2111 2114 $member = new BP_Groups_Member( $user_id, $group_id ); … … 2176 2179 // Backward compatibility with old method of passing arguments. 2177 2180 if ( ! is_array( $args[0] ) || count( $args ) > 1 ) { 2178 _deprecated_argument( __METHOD__, '5.0.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );2181 _deprecated_argument( __METHOD__, '5.0.0', sprintf( esc_html__( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 2179 2182 2180 2183 $old_args_keys = array( … … 2251 2254 if ( ! empty( $membership_id ) ) { 2252 2255 /* translators: 1: the name of the method. 2: the name of the file. */ 2253 _deprecated_argument( __METHOD__, '5.0.0', sprintf( __( 'Argument `membership_id` passed to %1$s is deprecated. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );2256 _deprecated_argument( __METHOD__, '5.0.0', sprintf( esc_html__( 'Argument `membership_id` passed to %1$s is deprecated. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 2254 2257 } 2255 2258 … … 2285 2288 if ( ! empty( $membership_id ) ){ 2286 2289 /* translators: 1: the name of the method. 2: the name of the file. */ 2287 _deprecated_argument( __METHOD__, '5.0.0', sprintf( __( 'Argument `membership_id` passed to %1$s is deprecated. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );2290 _deprecated_argument( __METHOD__, '5.0.0', sprintf( esc_html__( 'Argument `membership_id` passed to %1$s is deprecated. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 2288 2291 } 2289 2292 … … 2323 2326 if ( ! empty( $membership_id ) ){ 2324 2327 /* translators: 1: the name of the method. 2: the name of the file. */ 2325 _deprecated_argument( __METHOD__, '5.0.0', sprintf( __( 'Argument `membership_id` passed to %1$s is deprecated. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );2328 _deprecated_argument( __METHOD__, '5.0.0', sprintf( esc_html__( 'Argument `membership_id` passed to %1$s is deprecated. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 2326 2329 } 2327 2330 … … 2643 2646 */ 2644 2647 function bp_group_type_tax_name() { 2645 echo bp_get_group_type_tax_name();2648 echo esc_html( bp_get_group_type_tax_name() ); 2646 2649 } 2647 2650 … … 2878 2881 2879 2882 if ( isset( $bp->groups->types[ $group_type ] ) ) { 2880 return new WP_Error( 'bp_group_type_exists', __( 'Group type already exists.', 'buddypress' ), $group_type );2883 return new WP_Error( 'bp_group_type_exists', esc_html__( 'Group type already exists.', 'buddypress' ), $group_type ); 2881 2884 } 2882 2885
Note: See TracChangeset
for help on using the changeset viewer.