This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BP_Members_Admin::get_signup_notice()
Get admin notice when viewing the sign-up page.
Description
Return
(array)
Source
File: bp-members/classes/class-bp-members-admin.php
1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 | private function get_signup_notice() { // Setup empty notice for return value. $notice = array (); // Updates. if ( ! empty ( $_REQUEST [ 'updated' ] ) ) { switch ( $_REQUEST [ 'updated' ] ) { case 'resent' : $notice = array ( 'class' => 'updated' , 'message' => '' ); if ( ! empty ( $_REQUEST [ 'resent' ] ) ) { $notice [ 'message' ] .= sprintf( _n( '%s activation email successfully sent! ' , '%s activation emails successfully sent! ' , absint( $_REQUEST [ 'resent' ] ), 'buddyboss' ), number_format_i18n( absint( $_REQUEST [ 'resent' ] ) ) ); } if ( ! empty ( $_REQUEST [ 'notsent' ] ) ) { $notice [ 'message' ] .= sprintf( _n( '%s activation email was not sent.' , '%s activation emails were not sent.' , absint( $_REQUEST [ 'notsent' ] ), 'buddyboss' ), number_format_i18n( absint( $_REQUEST [ 'notsent' ] ) ) ); if ( empty ( $_REQUEST [ 'resent' ] ) ) { $notice [ 'class' ] = 'error' ; } } break ; case 'activated' : $notice = array ( 'class' => 'updated' , 'message' => '' ); if ( ! empty ( $_REQUEST [ 'activated' ] ) ) { $notice [ 'message' ] .= sprintf( _n( '%s account successfully activated! ' , '%s accounts successfully activated! ' , absint( $_REQUEST [ 'activated' ] ), 'buddyboss' ), number_format_i18n( absint( $_REQUEST [ 'activated' ] ) ) ); } if ( ! empty ( $_REQUEST [ 'notactivated' ] ) ) { $notice [ 'message' ] .= sprintf( _n( '%s account was not activated.' , '%s accounts were not activated.' , absint( $_REQUEST [ 'notactivated' ] ), 'buddyboss' ), number_format_i18n( absint( $_REQUEST [ 'notactivated' ] ) ) ); if ( empty ( $_REQUEST [ 'activated' ] ) ) { $notice [ 'class' ] = 'error' ; } } break ; case 'deleted' : $notice = array ( 'class' => 'updated' , 'message' => '' ); if ( ! empty ( $_REQUEST [ 'deleted' ] ) ) { $notice [ 'message' ] .= sprintf( _n( '%s sign-up successfully deleted!' , '%s sign-ups successfully deleted!' , absint( $_REQUEST [ 'deleted' ] ), 'buddyboss' ), number_format_i18n( absint( $_REQUEST [ 'deleted' ] ) ) ); } if ( ! empty ( $_REQUEST [ 'notdeleted' ] ) ) { $notice [ 'message' ] .= sprintf( _n( '%s sign-up was not deleted.' , '%s sign-ups were not deleted.' , absint( $_REQUEST [ 'notdeleted' ] ), 'buddyboss' ), number_format_i18n( absint( $_REQUEST [ 'notdeleted' ] ) ) ); if ( empty ( $_REQUEST [ 'deleted' ] ) ) { $notice [ 'class' ] = 'error' ; } } break ; } } // Errors. if ( ! empty ( $_REQUEST [ 'error' ] ) ) { switch ( $_REQUEST [ 'error' ] ) { case 'do_resend' : $notice = array ( 'class' => 'error' , 'message' => esc_html__( 'There was a problem sending the activation emails. Please try again.' , 'buddyboss' ), ); break ; case 'do_activate' : $notice = array ( 'class' => 'error' , 'message' => esc_html__( 'There was a problem activating accounts. Please try again.' , 'buddyboss' ), ); break ; case 'do_delete' : $notice = array ( 'class' => 'error' , 'message' => esc_html__( 'There was a problem deleting sign-ups. Please try again.' , 'buddyboss' ), ); break ; } } return $notice ; } |
Changelog
Version | Description |
---|---|
BuddyPress 2.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.