| 66 | | $wpdb->query("INSERT INTO $wpdb->terms (name, slug, term_group) VALUES ('$cat_name', '$cat_slug', '0')"); |
|---|
| 67 | | $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('1', 'category', '', '0', '1')"); |
|---|
| | 66 | |
|---|
| | 67 | $wpdb->insert( $wpdb->terms, array('name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) ); |
|---|
| | 68 | $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => '1', 'taxonomy' => 'category', 'description' => '', 'parent' => 0, 'count' => 1)); |
|---|
| 72 | | $wpdb->query("INSERT INTO $wpdb->terms (name, slug, term_group) VALUES ('$cat_name', '$cat_slug', '0')"); |
|---|
| 73 | | $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('2', 'link_category', '', '0', '7')"); |
|---|
| | 73 | |
|---|
| | 74 | $wpdb->insert( $wpdb->terms, array('name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) ); |
|---|
| | 75 | $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => '2', 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 7)); |
|---|
| 76 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://codex.wordpress.org/', 'Documentation', 0, '', '');"); |
|---|
| 77 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (1, 2)" ); |
|---|
| | 78 | $default_links = array(); |
|---|
| | 79 | $default_links[] = array( 'link_url' => 'http://codex.wordpress.org/', |
|---|
| | 80 | 'link_name' => 'Documentation', |
|---|
| | 81 | 'link_category' => 0, |
|---|
| | 82 | 'link_rss' => '', |
|---|
| | 83 | 'link_notes' => ''); |
|---|
| 79 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://wordpress.org/development/', 'Development Blog', 0, 'http://wordpress.org/development/feed/', '');"); |
|---|
| 80 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (2, 2)" ); |
|---|
| | 85 | $default_links[] = array( 'link_url' => 'http://wordpress.org/development/', |
|---|
| | 86 | 'link_name' => 'Development Blog', |
|---|
| | 87 | 'link_category' => 0, |
|---|
| | 88 | 'link_rss' => 'http://wordpress.org/development/feed/', |
|---|
| | 89 | 'link_notes' => ''); |
|---|
| 82 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://wordpress.org/extend/ideas/', 'Suggest Ideas', 0, '', '');"); |
|---|
| 83 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (3, 2)" ); |
|---|
| | 91 | $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/ideas/', |
|---|
| | 92 | 'link_name' => 'Suggest Ideas', |
|---|
| | 93 | 'link_category' => 0, |
|---|
| | 94 | 'link_rss' => '', |
|---|
| | 95 | 'link_notes' =>''); |
|---|
| 85 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://wordpress.org/support/', 'Support Forum', 0, '', '');"); |
|---|
| 86 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (4, 2)" ); |
|---|
| | 97 | $default_links[] = array( 'link_url' => 'http://wordpress.org/support/', |
|---|
| | 98 | 'link_name' => 'Support Forum', |
|---|
| | 99 | 'link_category' => 0, |
|---|
| | 100 | 'link_rss' => '', |
|---|
| | 101 | 'link_notes' =>''); |
|---|
| 88 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://wordpress.org/extend/plugins/', 'Plugins', 0, '', '');"); |
|---|
| 89 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (5, 2)" ); |
|---|
| | 103 | $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/plugins/', |
|---|
| | 104 | 'link_name' => 'Plugins', |
|---|
| | 105 | 'link_category' => 0, |
|---|
| | 106 | 'link_rss' => '', |
|---|
| | 107 | 'link_notes' =>''); |
|---|
| 91 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://wordpress.org/extend/themes/', 'Themes', 0, '', '');"); |
|---|
| 92 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (6, 2)" ); |
|---|
| | 109 | $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/themes/', |
|---|
| | 110 | 'link_name' => 'Themes', |
|---|
| | 111 | 'link_category' => 0, |
|---|
| | 112 | 'link_rss' => '', |
|---|
| | 113 | 'link_notes' =>''); |
|---|
| 94 | | $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://planet.wordpress.org/', 'WordPress Planet', 0, '', '');"); |
|---|
| 95 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (7, 2)" ); |
|---|
| | 115 | $default_links[] = array( 'link_url' => 'http://planet.wordpress.org/', |
|---|
| | 116 | 'link_name' => 'WordPress Planet', |
|---|
| | 117 | 'link_category' => 0, |
|---|
| | 118 | 'link_rss' => '', |
|---|
| | 119 | 'link_notes' =>''); |
|---|
| | 120 | foreach($default_links as $link){ |
|---|
| | 121 | $wpdb->insert( $wpdb->links, $link); |
|---|
| | 122 | $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => 2, 'object_id' => $wpdb->insert_id) ); |
|---|
| | 123 | } |
|---|
| 101 | | $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, guid, comment_count, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'))."', '', '".$wpdb->escape(__('Hello world!'))."', '0', '".$wpdb->escape(_c('hello-world|Default post slug'))."', '$now', '$now_gmt', '$first_post_guid', '1', '', '', '')"); |
|---|
| 102 | | $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (1, 1)" ); |
|---|
| | 129 | |
|---|
| | 130 | $wpdb->insert( $wpdb->posts, array( |
|---|
| | 131 | 'post_author' => $user_id, |
|---|
| | 132 | 'post_date' => $now, |
|---|
| | 133 | 'post_date_gmt' => $now_gmt, |
|---|
| | 134 | 'post_content' => __('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'), |
|---|
| | 135 | 'post_excerpt' => '', |
|---|
| | 136 | 'post_title' => __('Hello world!'), |
|---|
| | 137 | 'post_category' => 0, |
|---|
| | 138 | 'post_name' => _c('hello-world|Default post slug'), |
|---|
| | 139 | 'post_modified' => $now, |
|---|
| | 140 | 'post_modified_gmt' => $now_gmt, |
|---|
| | 141 | 'guid' => $first_post_guid, |
|---|
| | 142 | 'comment_count' => 1, |
|---|
| | 143 | 'to_ping' => '', |
|---|
| | 144 | 'pinged' => '', |
|---|
| | 145 | 'post_content_filtered' => '' |
|---|
| | 146 | )); |
|---|
| | 147 | $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => 1, 'object_id' => 1) ); |
|---|
| 105 | | $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_date_gmt, comment_content) VALUES ('1', '".$wpdb->escape(__('Mr WordPress'))."', '', 'http://wordpress.org/', '$now', '$now_gmt', '".$wpdb->escape(__('Hi, this is a comment.<br />To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.'))."')"); |
|---|
| 106 | | |
|---|
| | 150 | $wpdb->insert( $wpdb->comments, array( |
|---|
| | 151 | 'comment_post_ID' => 1, |
|---|
| | 152 | 'comment_author' => __('Mr WordPress'), |
|---|
| | 153 | 'comment_author_email' => '', |
|---|
| | 154 | 'comment_author_url' => 'http://wordpress.org/', |
|---|
| | 155 | 'comment_date' => $now, |
|---|
| | 156 | 'comment_date_gmt' => $now_gmt, |
|---|
| | 157 | 'comment_content' => __('Hi, this is a comment.<br />To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.') |
|---|
| | 158 | )); |
|---|
| 109 | | $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, guid, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(_c('about|Default page slug'))."', '$now', '$now_gmt','$first_post_guid', 'publish', 'page', '', '', '')"); |
|---|
| | 161 | $wpdb->insert( $wpdb->posts, array( |
|---|
| | 162 | 'post_author' => $user_id, |
|---|
| | 163 | 'post_date' => $now, |
|---|
| | 164 | 'post_date_gmt' => $now_gmt, |
|---|
| | 165 | 'post_content' => __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'), |
|---|
| | 166 | 'post_excerpt' => '', |
|---|
| | 167 | 'post_title' => __('About'), |
|---|
| | 168 | 'post_category' => '', |
|---|
| | 169 | 'post_name' => _c('about|Default page slug'), |
|---|
| | 170 | 'post_modified' => $now, |
|---|
| | 171 | 'post_modified_gmt' => $now_gmt, |
|---|
| | 172 | 'guid' => $first_post_guid, |
|---|
| | 173 | 'post_type' => 'page', |
|---|
| | 174 | 'to_ping' => '', |
|---|
| | 175 | 'pinged' => '', |
|---|
| | 176 | 'post_content_filtered' => '' |
|---|
| | 177 | )); |
|---|
| 360 | | $comment_content = addslashes(deslash($comment->comment_content)); |
|---|
| 361 | | $comment_author = addslashes(deslash($comment->comment_author)); |
|---|
| 362 | | $wpdb->query("UPDATE $wpdb->comments SET comment_content = '$comment_content', comment_author = '$comment_author' WHERE comment_ID = '$comment->comment_ID'"); |
|---|
| | 426 | $comment_content = deslash($comment->comment_content); |
|---|
| | 427 | $comment_author = deslash($comment->comment_author); |
|---|
| | 428 | |
|---|
| | 429 | $wpdb->update($wpdb->comments, compact('comment_content', 'comment_author'), array('comment_ID' => $comment->comment_ID) ); |
|---|
| 370 | | $link_name = addslashes(deslash($link->link_name)); |
|---|
| 371 | | $link_description = addslashes(deslash($link->link_description)); |
|---|
| 372 | | $wpdb->query("UPDATE $wpdb->links SET link_name = '$link_name', link_description = '$link_description' WHERE link_id = '$link->link_id'"); |
|---|
| | 437 | $link_name = deslash($link->link_name); |
|---|
| | 438 | $link_description = deslash($link->link_description); |
|---|
| | 439 | |
|---|
| | 440 | $wpdb->update( $wpdb->links, compact('link_name', 'link_description'), array('link_id' => $link->link_id) ); |
|---|
| 565 | | $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES |
|---|
| 566 | | (%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) ); |
|---|
| | 630 | $wpdb->insert( $wpdb->terms, compact('term_id', 'name', 'slug', 'term_group') ); |
|---|
| 572 | | $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); |
|---|
| | 636 | $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); |
|---|
| 579 | | $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); |
|---|
| | 643 | $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); |
|---|
| 587 | | $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); |
|---|
| | 651 | $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); |
|---|
| 594 | | $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); |
|---|
| | 658 | $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); |
|---|
| 646 | | $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES (%d, 'link_category', '', '0', '0')", $term_id) ); |
|---|
| | 710 | $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $term_id, 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 0) ); |
|---|