Changeset 32654 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/29/2015 08:16:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r32643 r32654 166 166 167 167 $wpdb->insert( $wpdb->posts, array( 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 168 'post_author' => $user_id, 169 'post_date' => $now, 170 'post_date_gmt' => $now_gmt, 171 'post_content' => $first_post, 172 'post_excerpt' => '', 173 'post_title' => __('Hello world!'), 174 /* translators: Default post slug */ 175 'post_name' => sanitize_title( _x('hello-world', 'Default post slug') ), 176 'post_modified' => $now, 177 'post_modified_gmt' => $now_gmt, 178 'guid' => $first_post_guid, 179 'comment_count' => 1, 180 'to_ping' => '', 181 'pinged' => '', 182 'post_content_filtered' => '' 183 )); 184 184 $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $cat_tt_id, 'object_id' => 1) ); 185 185 … … 195 195 } 196 196 $wpdb->insert( $wpdb->comments, array( 197 198 199 200 201 202 203 204 197 'comment_post_ID' => 1, 198 'comment_author' => $first_comment_author, 199 'comment_author_email' => '', 200 'comment_author_url' => $first_comment_url, 201 'comment_date' => $now, 202 'comment_date_gmt' => $now_gmt, 203 'comment_content' => $first_comment 204 )); 205 205 206 206 // First Page … … 218 218 $first_post_guid = get_option('home') . '/?page_id=2'; 219 219 $wpdb->insert( $wpdb->posts, array( 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 220 'post_author' => $user_id, 221 'post_date' => $now, 222 'post_date_gmt' => $now_gmt, 223 'post_content' => $first_page, 224 'post_excerpt' => '', 225 'post_title' => __( 'Sample Page' ), 226 /* translators: Default page slug */ 227 'post_name' => __( 'sample-page' ), 228 'post_modified' => $now, 229 'post_modified_gmt' => $now_gmt, 230 'guid' => $first_post_guid, 231 'post_type' => 'page', 232 'to_ping' => '', 233 'pinged' => '', 234 'post_content_filtered' => '' 235 )); 236 236 $wpdb->insert( $wpdb->postmeta, array( 'post_id' => 2, 'meta_key' => '_wp_page_template', 'meta_value' => 'default' ) ); 237 237 … … 393 393 * @global int $wp_db_version 394 394 * @global wpdb $wpdb 395 *396 * @return null If no update is necessary or site isn't completely installed, null.397 395 */ 398 396 function wp_upgrade() { … … 446 444 * @global int $wp_current_db_version 447 445 * @global int $wp_db_version 448 *449 * @return null If no update is necessary, null.450 446 */ 451 447 function upgrade_all() { … … 1748 1744 * @param string $table Database table name. 1749 1745 * @param string $index Index name to drop. 1750 * @return boolTrue, when finished.1746 * @return true True, when finished. 1751 1747 */ 1752 1748 function drop_index($table, $index) { … … 1771 1767 * @param string $table Database table name. 1772 1768 * @param string $index Database table index column. 1773 * @return boolTrue, when done with execution.1769 * @return true True, when done with execution. 1774 1770 */ 1775 1771 function add_clean_index($table, $index) { … … 1790 1786 * @param string $column_name The column name to add to the table. 1791 1787 * @param string $create_ddl The SQL statement used to add the column. 1792 * @return True if already exists or on successful completion, false on error.1788 * @return bool True if already exists or on successful completion, false on error. 1793 1789 */ 1794 1790 function maybe_add_column($table_name, $column_name, $create_ddl) { … … 2279 2275 // Don't copy anything. 2280 2276 continue; 2281 2277 } 2282 2278 } 2283 2279 … … 2332 2328 * @param string $theme_name The name of the theme. 2333 2329 * @param string $template The directory name of the theme. 2334 * @return null|false2330 * @return false|void 2335 2331 */ 2336 2332 function make_site_theme_from_default($theme_name, $template) {
Note: See TracChangeset
for help on using the changeset viewer.