Changeset 11774
- Timestamp:
- 12/13/2017 01:16:42 AM (7 years ago)
- Location:
- branches/2.9
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.9
-
branches/2.9/src/bp-core/deprecated/1.6.php
r10544 r11774 266 266 // For each of the problematic hooks, exit at the very end of execution 267 267 foreach( $actions as $action ) { 268 add_action( 'wp_ajax_' . $action, create_function( '', 'exit;' ), 9999 ); 269 add_action( 'wp_ajax_nopriv_' . $action, create_function( '', 'exit;' ), 9999 ); 268 add_action( 'wp_ajax_' . $action, function() { 269 exit; 270 }, 9999 ); 271 272 add_action( 'wp_ajax_nopriv_' . $action, function() { 273 exit; 274 }, 9999 ); 270 275 } 271 276 } -
branches/2.9/src/bp-groups/classes/class-bp-group-extension.php
r11554 r11774 754 754 if ( bp_is_current_action( $this->slug ) ) { 755 755 add_filter( 'bp_group_user_has_access', array( $this, 'group_access_protection' ), 10, 2 ); 756 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 757 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 756 757 $extension_name = $this->name; 758 add_action( 'bp_template_content_header', function() use ( $extension_name ) { 759 echo esc_attr( $extension_name ); 760 } ); 761 add_action( 'bp_template_title', function() use ( $extension_name ) { 762 echo esc_attr( $extension_name ); 763 } ); 758 764 } 759 765 } … … 1197 1203 $screen = $this->screens['admin']; 1198 1204 1205 $extension_slug = $this->slug; 1206 $callback = function() use ( $extension_slug, $group_id ) { 1207 do_action( 'bp_groups_admin_meta_box_content_' . $extension_slug, $group_id ); 1208 }; 1209 1199 1210 add_meta_box( 1200 1211 $screen['slug'], 1201 1212 $screen['name'], 1202 create_function( '', 'do_action( "bp_groups_admin_meta_box_content_' . $this->slug . '", ' . $group_id . ' );' ),1213 $callback, 1203 1214 get_current_screen()->id, 1204 1215 $screen['metabox_context'], -
branches/2.9/src/bp-members/bp-members-screens.php
r11360 r11774 184 184 if ( !empty( $bp->signup->errors ) ) { 185 185 foreach ( (array) $bp->signup->errors as $fieldname => $error_message ) { 186 /*187 * The addslashes() and stripslashes() used to avoid create_function()188 * syntax errors when the $error_message contains quotes.189 */190 191 186 /** 192 187 * Filters the error message in the loop. … … 196 191 * @param string $value Error message wrapped in html. 197 192 */ 198 add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo apply_filters(\'bp_members_signup_error_message\', "<div class=\"error\">" . stripslashes( \'' . addslashes( $error_message ) . '\' ) . "</div>" );' ) ); 193 add_action( 'bp_' . $fieldname . '_errors', function() use ( $error_message ) { 194 echo apply_filters( 'bp_members_signup_error_message', "<div class=\"error\">" . $error_message . "</div>" ); 195 } ); 199 196 } 200 197 } else { -
branches/2.9/src/bp-templates/bp-legacy/buddypress-functions.php
r11726 r11774 1612 1612 1613 1613 // Add new-message css class. 1614 add_filter( 'bp_get_the_thread_message_css_class', create_function( '$retval', '1615 $retval[] = "new-message";1614 add_filter( 'bp_get_the_thread_message_css_class', function( $retval ) { 1615 $retval[] = 'new-message'; 1616 1616 return $retval; 1617 ' ));1617 } ); 1618 1618 1619 1619 // Output single message template part.
Note: See TracChangeset
for help on using the changeset viewer.