Changeset 13798
- Timestamp:
- 04/21/2024 06:37:13 AM (11 months ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-tools.php
r13775 r13798 928 928 ), 929 929 'BP_SIGNUPS_SKIP_USER_CREATION' => array( 930 'label' => 'BP_SIGNUPS_SKIP_USER_CREATION ',930 'label' => 'BP_SIGNUPS_SKIP_USER_CREATION (deprecated)', 931 931 'value' => defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) && BP_SIGNUPS_SKIP_USER_CREATION ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ), 932 932 'debug' => defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) ? BP_SIGNUPS_SKIP_USER_CREATION : 'undefined', -
trunk/src/bp-members/bp-members-functions.php
r13743 r13798 1859 1859 $user_email = sanitize_email( $user_email ); 1860 1860 $activation_key = wp_generate_password( 32, false ); 1861 $create_user = false; 1862 1863 // @deprecated. 1864 if ( defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) ) { 1865 _doing_it_wrong( 'BP_SIGNUPS_SKIP_USER_CREATION', esc_html__( 'the `BP_SIGNUPS_SKIP_USER_CREATION` constant is deprecated as skipping user creation is now the default behavior.', 'buddypress' ), 'BuddyPress 14.0.0' ); 1866 1867 // Creating a user is the opposite of skipping user creation. 1868 $create_user = ! BP_SIGNUPS_SKIP_USER_CREATION; 1869 } 1861 1870 1862 1871 /** 1863 * WordPress's default behavior is to create user accounts 1864 * immediately at registration time. BuddyPress uses a system 1865 * borrowed from WordPress Multisite, where signups are stored 1866 * separately and accounts are only created at the time of 1867 * activation. For backward compatibility with plugins that may 1868 * be anticipating WP's default behavior, BP silently creates 1869 * accounts for registrations (though it does not use them). If 1870 * you know that you are not running any plugins dependent on 1871 * these pending accounts, you may want to save a little DB 1872 * clutter by defining setting the BP_SIGNUPS_SKIP_USER_CREATION 1873 * to true in your wp-config.php file. 1872 * Filter here to keep creating a user when a registration is performed on regular WordPress configs. 1873 * 1874 * @since 14.0.0 1875 * @todo Fully deprecate in 15.0.0 1876 * 1877 * @param boolean $create_user True to carry on creating a user when a registration is performed. 1878 * False otherwise. 1874 1879 */ 1875 if ( ! defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) || ! BP_SIGNUPS_SKIP_USER_CREATION) {1880 if ( apply_filters( 'bp_signups_create_user', $create_user ) ) { 1876 1881 $user_id = BP_Signup::add_backcompat( $user_login, $user_password, $user_email, $usermeta ); 1877 1882 … … 2018 2023 $user_id = wp_create_user( $signup->user_login, $password, $signup->user_email ); 2019 2024 2020 // Otherwise, update the existing user's status. 2025 /* 2026 * @todo Remove this `elseif` statement in version 15.0.0. 2027 * 2028 * Since 2.0.0 BuddyPress is using the $wpdb->signups table even in regular WordPress configs. 2029 * In 14.0.0, we are deprecating the `BP_SIGNUPS_SKIP_USER_CREATION` as well as creating a user 2030 * each time a registration is performed. 2031 */ 2021 2032 } elseif ( $key === bp_get_user_meta( $user_id, 'activation_key', true ) || $key === wp_hash( $user_id ) ) { 2022 2033 -
trunk/src/bp-members/classes/class-bp-signup.php
r13499 r13798 534 534 * 535 535 * @since 2.0.0 536 * @deprecated 14.0.0 536 537 * 537 538 * @global wpdb $wpdb The WordPress database object. … … 544 545 */ 545 546 public static function add_backcompat( $user_login = '', $user_password = '', $user_email = '', $usermeta = array() ) { 547 _deprecated_function( __METHOD__, '14.0.0' ); 548 546 549 global $wpdb; 547 550 … … 604 607 * 605 608 * @since 10.0.0 609 * @deprecated 14.0.0 606 610 * 607 611 * @param int $user_id ID of the WP_User just added. 608 612 */ 609 do_action ( 'bp_core_signups_after_add_backcompat', $user_id);613 do_action_deprecated( 'bp_core_signups_after_add_backcompat', array( $user_id ), '14.0.0' ); 610 614 611 615 /** … … 613 617 * 614 618 * @since 2.0.0 619 * @deprecated 14.0.0 615 620 * 616 621 * @param int $user_id User ID being registered. 617 622 */ 618 return apply_filters ( 'bp_core_signups_add_backcompat', $user_id);623 return apply_filters_deprecated( 'bp_core_signups_add_backcompat', array( $user_id ), '14.0.0' ); 619 624 } 620 625
Note: See TracChangeset
for help on using the changeset viewer.