Changeset 30153
- Timestamp:
- 11/01/2014 07:44:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r30139 r30153 2764 2764 if ( $all_tags = get_tags() ) { 2765 2765 foreach( (array) $all_tags as $tag ) { 2766 $struct = array(); 2766 2767 $struct['tag_id'] = $tag->term_id; 2767 2768 $struct['name'] = $tag->name; … … 3221 3222 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3222 3223 3224 $comment = array(); 3223 3225 $comment['comment_post_ID'] = $post_id; 3224 3226 … … 3484 3486 return new IXR_Error( 403, __( 'You are not allowed to update options.' ) ); 3485 3487 3488 $option_names = array(); 3486 3489 foreach ( $options as $o_name => $o_value ) { 3487 3490 $option_names[] = $o_name; … … 3629 3632 $supported = get_theme_support( 'post-formats' ); 3630 3633 3634 $data = array(); 3631 3635 $data['all'] = $formats; 3632 3636 $data['supported'] = $supported[0]; … … 4075 4079 } 4076 4080 4081 $recent_posts = array(); 4077 4082 foreach ($posts_list as $entry) { 4078 4083 if ( !current_user_can( 'edit_post', $entry['ID'] ) ) … … 4086 4091 $content .= wp_unslash($entry['post_content']); 4087 4092 4088 $ struct[] = array(4093 $recent_posts[] = array( 4089 4094 'userid' => $entry['post_author'], 4090 4095 'dateCreated' => $post_date, … … 4092 4097 'postid' => (string) $entry['ID'], 4093 4098 ); 4094 4095 }4096 4097 $recent_posts = array();4098 for ( $j=0; $j<count($struct); $j++ ) {4099 array_push($recent_posts, $struct[$j]);4100 4099 } 4101 4100 … … 5103 5102 return array(); 5104 5103 5105 $ struct= array();5104 $recent_posts = array(); 5106 5105 foreach ($posts_list as $entry) { 5107 5106 if ( !current_user_can( 'edit_post', $entry['ID'] ) ) … … 5147 5146 $post_format = 'standard'; 5148 5147 5149 $ struct[] = array(5148 $recent_posts[] = array( 5150 5149 'dateCreated' => $post_date, 5151 5150 'userid' => $entry['post_author'], … … 5175 5174 'date_modified_gmt' => $post_modified_gmt, 5176 5175 'sticky' => ( $entry['post_type'] === 'post' && is_sticky( $entry['ID'] ) ), 5176 'wp_post_thumbnail' => get_post_thumbnail_id( $entry['ID'] ) 5177 5177 ); 5178 5179 $entry_index = count( $struct ) - 1;5180 $struct[ $entry_index ][ 'wp_post_thumbnail' ] = get_post_thumbnail_id( $entry['ID'] );5181 }5182 5183 $recent_posts = array();5184 for ( $j=0; $j<count($struct); $j++ ) {5185 array_push($recent_posts, $struct[$j]);5186 5178 } 5187 5179 … … 5217 5209 if ( $cats = get_categories(array('get' => 'all')) ) { 5218 5210 foreach ( $cats as $cat ) { 5211 $struct = array(); 5219 5212 $struct['categoryId'] = $cat->term_id; 5220 5213 $struct['parentId'] = $cat->parent; … … 5437 5430 if ( $cats = get_categories(array('hide_empty' => 0, 'hierarchical' => 0)) ) { 5438 5431 foreach ( $cats as $cat ) { 5432 $struct = array(); 5439 5433 $struct['categoryId'] = $cat->term_id; 5440 5434 $struct['categoryName'] = $cat->name;
Note: See TracChangeset
for help on using the changeset viewer.