Changeset 5002
- Timestamp:
- 06/25/2013 03:06:32 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
-
bbpress.php (modified) (1 diff)
-
includes/admin/admin.php (modified) (1 diff)
-
includes/admin/functions.php (modified) (2 diffs)
-
includes/admin/settings.php (modified) (1 diff)
-
includes/admin/tools.php (modified) (3 diffs)
-
includes/common/functions.php (modified) (2 diffs)
-
includes/common/shortcodes.php (modified) (1 diff)
-
includes/common/template-tags.php (modified) (1 diff)
-
includes/core/capabilities.php (modified) (4 diffs)
-
includes/core/functions.php (modified) (1 diff)
-
includes/core/template-functions.php (modified) (1 diff)
-
includes/extend/akismet.php (modified) (1 diff)
-
includes/extend/buddypress/functions.php (modified) (2 diffs)
-
includes/forums/template-tags.php (modified) (3 diffs)
-
includes/replies/functions.php (modified) (1 diff)
-
includes/topics/functions.php (modified) (3 diffs)
-
includes/topics/template-tags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbpress.php
r4996 r5002 376 376 377 377 // Add the actions 378 foreach ( $actions as $class_action )378 foreach ( $actions as $class_action ) 379 379 add_action( 'bbp_' . $class_action, array( $this, $class_action ), 5 ); 380 380 -
trunk/includes/admin/admin.php
r4995 r5002 210 210 211 211 // Fudge the highlighted subnav item when on a bbPress admin page 212 foreach ( $hooks as $hook ) {212 foreach ( $hooks as $hook ) { 213 213 add_action( "admin_head-$hook", 'bbp_tools_modify_menu_highlight' ); 214 214 } -
trunk/includes/admin/functions.php
r4950 r5002 94 94 95 95 // Add our custom menus 96 foreach ( $custom_menus as $custom_menu ) {96 foreach ( $custom_menus as $custom_menu ) { 97 97 if ( array_search( $custom_menu, $menu_order ) ) { 98 98 $bbp_menu_order[] = $custom_menu; … … 247 247 248 248 // Loop through tabs and build navigation 249 foreach ( array_values( $tabs ) as $tab_data ) {249 foreach ( array_values( $tabs ) as $tab_data ) { 250 250 $is_current = (bool) ( $tab_data['name'] == $active_tab ); 251 251 $tab_class = $is_current ? $active_class : $idle_class; -
trunk/includes/admin/settings.php
r4995 r5002 1743 1743 1744 1744 // Loop through slugs to check 1745 foreach ( $the_core_slugs as $key => $value ) {1745 foreach ( $the_core_slugs as $key => $value ) { 1746 1746 1747 1747 // Get the slug -
trunk/includes/admin/tools.php
r4995 r5002 450 450 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 451 451 if ( !empty( $forums ) ) { 452 foreach ( $forums as $forum ) {452 foreach ( $forums as $forum ) { 453 453 bbp_update_forum_topic_count( $forum->ID ); 454 454 } … … 484 484 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 485 485 if ( !empty( $forums ) ) { 486 foreach ( $forums as $forum ) {486 foreach ( $forums as $forum ) { 487 487 bbp_update_forum_reply_count( $forum->ID ); 488 488 } … … 1178 1178 1179 1179 if ( !empty( $sql_posts ) ) { 1180 foreach ( $sql_posts as $key => $value ) {1180 foreach ( $sql_posts as $key => $value ) { 1181 1181 $sql_meta[] = $key; 1182 1182 } -
trunk/includes/common/functions.php
r5000 r5002 862 862 863 863 // Loop through post data 864 foreach ( $_post as $post_data ) {864 foreach ( $_post as $post_data ) { 865 865 866 866 // Check each user data for current word … … 963 963 964 964 // Loop through post data 965 foreach ( $_post as $post_data ) {965 foreach ( $_post as $post_data ) { 966 966 967 967 // Check each user data for current word -
trunk/includes/common/shortcodes.php
r4996 r5002 106 106 */ 107 107 private function add_shortcodes() { 108 foreach ( (array) $this->codes as $code => $function ) {108 foreach ( (array) $this->codes as $code => $function ) { 109 109 add_shortcode( $code, $function ); 110 110 } -
trunk/includes/common/template-tags.php
r4995 r5002 2285 2285 2286 2286 // Loop through parents 2287 foreach ( (array) $ancestors as $parent_id ) {2287 foreach ( (array) $ancestors as $parent_id ) { 2288 2288 2289 2289 // Parents -
trunk/includes/core/capabilities.php
r4995 r5002 275 275 276 276 // Loop through available roles and add caps 277 foreach ( bbp_get_wp_roles()->role_objects as $role ) {277 foreach ( bbp_get_wp_roles()->role_objects as $role ) { 278 278 foreach ( bbp_get_caps_for_role( $role->name ) as $cap => $value ) { 279 279 $role->add_cap( $cap, $value ); … … 292 292 293 293 // Loop through available roles and remove caps 294 foreach ( bbp_get_wp_roles()->role_objects as $role ) {294 foreach ( bbp_get_wp_roles()->role_objects as $role ) { 295 295 foreach ( array_keys( bbp_get_caps_for_role( $role->name ) ) as $cap ) { 296 296 $role->remove_cap( $cap ); … … 332 332 $wp_roles = bbp_get_wp_roles(); 333 333 334 foreach ( bbp_get_dynamic_roles() as $role_id => $details ) {334 foreach ( bbp_get_dynamic_roles() as $role_id => $details ) { 335 335 $wp_roles->roles[$role_id] = $details; 336 336 $wp_roles->role_objects[$role_id] = new WP_Role( $role_id, $details['capabilities'] ); … … 382 382 */ 383 383 function _bbp_reinit_dynamic_roles( $roles = array() ) { 384 foreach ( bbp_get_dynamic_roles() as $role_id => $details ) {384 foreach ( bbp_get_dynamic_roles() as $role_id => $details ) { 385 385 $roles[$role_id] = $details; 386 386 } -
trunk/includes/core/functions.php
r4998 r5002 334 334 335 335 // Loop through usernames and link to profiles 336 foreach ( (array) $usernames as $username ) {336 foreach ( (array) $usernames as $username ) { 337 337 338 338 // Skip if username does not exist or user is not active -
trunk/includes/core/template-functions.php
r4995 r5002 186 186 // Loop through 'bbp_template_stack' filters, and call callback functions 187 187 do { 188 foreach ( (array) current( $wp_filter[$tag] ) as $the_ ) {188 foreach ( (array) current( $wp_filter[$tag] ) as $the_ ) { 189 189 if ( ! is_null( $the_['function'] ) ) { 190 190 $args[1] = $stack; -
trunk/includes/extend/akismet.php
r4995 r5002 65 65 // Add the checks 66 66 foreach ( $checks as $type => $functions ) 67 foreach ( $functions as $function => $priority )67 foreach ( $functions as $function => $priority ) 68 68 add_filter( $function, array( $this, $type . '_post' ), $priority ); 69 69 -
trunk/includes/extend/buddypress/functions.php
r4995 r5002 432 432 433 433 // Loop through forums and remove this group from each one 434 foreach ( (array) $forum_ids as $forum_id ) {434 foreach ( (array) $forum_ids as $forum_id ) { 435 435 bbp_remove_group_id_from_forum( $group_id, $forum_id ); 436 436 } … … 450 450 451 451 // Loop through groups and remove this forum from each one 452 foreach ( (array) $group_ids as $group_id ) {452 foreach ( (array) $group_ids as $group_id ) { 453 453 bbp_remove_forum_id_from_group( $forum_id, $group_id ); 454 454 } -
trunk/includes/forums/template-tags.php
r4995 r5002 2142 2142 $type_output = '<select name="bbp_forum_type" id="bbp_forum_type_select">' . "\n"; 2143 2143 2144 foreach ( $forum_attr as $value => $label )2144 foreach ( $forum_attr as $value => $label ) 2145 2145 $type_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_type( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n"; 2146 2146 … … 2180 2180 $status_output = '<select name="bbp_forum_status" id="bbp_forum_status_select">' . "\n"; 2181 2181 2182 foreach ( $forum_attr as $value => $label )2182 foreach ( $forum_attr as $value => $label ) 2183 2183 $status_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_status( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n"; 2184 2184 … … 2219 2219 $visibility_output = '<select name="bbp_forum_visibility" id="bbp_forum_visibility_select">' . "\n"; 2220 2220 2221 foreach ( $forum_attr as $value => $label )2221 foreach ( $forum_attr as $value => $label ) 2222 2222 $visibility_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_visibility( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n"; 2223 2223 -
trunk/includes/replies/functions.php
r4995 r5002 777 777 778 778 // Update all anonymous metas 779 foreach ( $r as $anon_key => $anon_value ) {779 foreach ( $r as $anon_key => $anon_value ) { 780 780 update_post_meta( $reply_id, '_' . $anon_key, (string) $anon_value, false ); 781 781 } -
trunk/includes/topics/functions.php
r4995 r5002 804 804 805 805 // Update all anonymous metas 806 foreach ( $r as $anon_key => $anon_value ) {806 foreach ( $r as $anon_key => $anon_value ) { 807 807 update_post_meta( $topic_id, '_' . $anon_key, (string) $anon_value, false ); 808 808 } … … 2791 2791 2792 2792 // Loop through and collect term names 2793 foreach ( $terms as $term ) {2793 foreach ( $terms as $term ) { 2794 2794 $term_names[] = $term->name; 2795 2795 } … … 3277 3277 $topic_tags = array_filter( (array) get_the_terms( $topic_id, bbp_get_topic_tag_tax_id() ) ); 3278 3278 $terms = array(); 3279 foreach ( $topic_tags as $term ) {3279 foreach ( $topic_tags as $term ) { 3280 3280 $terms[] = $term->name; 3281 3281 } -
trunk/includes/topics/template-tags.php
r4995 r5002 3534 3534 3535 3535 // Loop through them 3536 foreach ( $terms as $term ) {3536 foreach ( $terms as $term ) { 3537 3537 $new_terms[] = $term->name; 3538 3538 }
Note: See TracChangeset
for help on using the changeset viewer.