Changeset 5861
- Timestamp:
- 02/28/2012 01:09:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/bp-members/bp-members-signup.php
r5841 r5861 113 113 // Add any errors to the action for the field in the template for display. 114 114 if ( !empty( $bp->signup->errors ) ) { 115 foreach ( (array)$bp->signup->errors as $fieldname => $error_message ) 116 add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo apply_filters(\'bp_members_signup_error_message\', "<div class=\"error\">' . $error_message . '</div>" );' ) ); 115 foreach ( (array) $bp->signup->errors as $fieldname => $error_message ) { 116 // addslashes() and stripslashes() to avoid create_function() 117 // syntax errors when the $error_message contains quotes 118 add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo apply_filters(\'bp_members_signup_error_message\', "<div class=\"error\">" . stripslashes( \'' . addslashes( $error_message ) . '\' ) . "</div>" );' ) ); 119 } 117 120 } else { 118 121 $bp->signup->step = 'save-details';
Note: See TracChangeset
for help on using the changeset viewer.