Changeset 7111
- Timestamp:
- 08/03/2020 01:33:59 PM (3 years ago)
- Location:
- branches/1.1
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/bb-admin/includes/functions.bb-admin.php
r6170 r7111 38 38 39 39 $message = '<div id="message" class="' . esc_attr( $class ) . '">' . $message . '</div>'; 40 $message = str_replace( "'", "\'", $message ); 41 $lambda = create_function( '', "echo '$message';" ); 40 $lambda = function() use( $message ) { echo $message; }; 42 41 add_action( 'bb_admin_notices', $lambda ); 43 42 return $lambda; … … 153 152 154 153 // Get an array of all plugin added keys 155 $plugin_menu_keys = array_filter( $menu_keys, create_function( '$v', 'if ($v >= ' . $lower . ' && $v < ' . $upper . ') { return $v; }' ));154 $plugin_menu_keys = array_filter( $menu_keys, function( $v ) use ( $lower, $upper ) { if ( $v >= $lower && $v < $upper ) { return $v; } } ); 156 155 157 156 // If there is an array of keys -
branches/1.1/bb-admin/options-discussion.php
r2865 r7111 73 73 ); 74 74 75 $bb_get_option_avatars_show = create_function( '$a', 'return 1;' );75 $bb_get_option_avatars_show = function( $a ) { return 1; }; 76 76 add_filter( 'bb_get_option_avatars_show', $bb_get_option_avatars_show ); 77 77 $avatar_options = array( -
branches/1.1/bb-admin/options-wordpress.php
r2455 r7111 53 53 54 54 $bb_role_names[''] = _c( 'none|no bbPress role' ); 55 $bb_role_names = array_merge( $bb_role_names, array_map( create_function( '$a', 'return sprintf( _c( "bbPress %s|bbPress role" ), $a );' ), $wp_roles->get_names() ) );55 $bb_role_names = array_merge( $bb_role_names, array_map( function( $a ) { return sprintf( _c( "bbPress %s|bbPress role" ), $a ); }, $wp_roles->get_names() ) ); 56 56 57 57 $wpRoles = array( -
branches/1.1/search.php
r2449 r7111 11 11 12 12 /* Recent */ 13 add_filter( 'bb_recent_search_fields', create_function( '$f', 'return $f . ", MAX(post_time) AS post_time";' ));14 add_filter( 'bb_recent_search_group_by', create_function( '', 'return "t.topic_id";' ));13 add_filter( 'bb_recent_search_fields', function( $f ) { return $f . ", MAX(post_time) AS post_time"; } ); 14 add_filter( 'bb_recent_search_group_by', function() { return "t.topic_id"; } ); 15 15 $bb_query_form->BB_Query_Form( 'post', array(), array( 'order_by' => 'p.post_time', 'count' => true, 'per_page' => $per_page, 'post_status' => 0, 'topic_status' => 0, 'post_text' => $q, 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_recent_search' ); 16 16 $recent = $bb_query_form->results;
Note: See TracChangeset
for help on using the changeset viewer.