Changeset 20023
- Timestamp:
- 02/28/2012 08:29:33 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin.php
r19712 r20023 31 31 32 32 if ( get_option('db_upgraded') ) { 33 $wp_rewrite->flush_rules();33 flush_rewrite_rules(); 34 34 update_option( 'db_upgraded', false ); 35 35 -
trunk/wp-admin/includes/misc.php
r19712 r20023 197 197 * @since 2.1.0 198 198 * 199 * @param unknown_type$old_value200 * @param unknown_type$value199 * @param string $old_value 200 * @param string $value 201 201 */ 202 202 function update_home_siteurl( $old_value, $value ) { 203 global $wp_rewrite;204 205 203 if ( defined( "WP_INSTALLING" ) ) 206 204 return; 207 205 208 206 // If home changed, write rewrite rules to new location. 209 $wp_rewrite->flush_rules();207 flush_rewrite_rules(); 210 208 } 211 209 -
trunk/wp-admin/includes/schema.php
r19863 r20023 822 822 */ 823 823 function populate_network( $network_id = 1, $domain = '', $email = '', $site_name = '', $path = '/', $subdomain_install = false ) { 824 global $wpdb, $current_site, $wp_db_version , $wp_rewrite;824 global $wpdb, $current_site, $wp_db_version; 825 825 826 826 $errors = new WP_Error(); … … 943 943 update_option( 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/'); 944 944 945 $wp_rewrite->flush_rules();945 flush_rewrite_rules(); 946 946 947 947 if ( $subdomain_install ) { -
trunk/wp-admin/includes/upgrade.php
r20022 r20023 36 36 */ 37 37 function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '' ) { 38 global $wp_rewrite;39 40 38 if ( !empty( $deprecated ) ) 41 39 _deprecated_argument( __FUNCTION__, '2.6' ); … … 83 81 wp_install_defaults($user_id); 84 82 85 $wp_rewrite->flush_rules();83 flush_rewrite_rules(); 86 84 87 85 wp_new_blog_notification($blog_title, $guessurl, $user_id, ($email_password ? $user_password : __('The password you chose during the install.') ) ); … … 392 390 */ 393 391 function upgrade_all() { 394 global $wp_current_db_version, $wp_db_version , $wp_rewrite;392 global $wp_current_db_version, $wp_db_version; 395 393 $wp_current_db_version = __get_option('db_version'); 396 394 -
trunk/wp-admin/options-permalink.php
r19684 r20023 141 141 $usingpi = false; 142 142 143 $wp_rewrite->flush_rules();143 flush_rewrite_rules(); 144 144 145 145 if (isset($_POST['submit'])) : ?> -
trunk/wp-includes/category-template.php
r19927 r20023 606 606 */ 607 607 function wp_generate_tag_cloud( $tags, $args = '' ) { 608 global $wp_rewrite;609 608 $defaults = array( 610 609 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0, -
trunk/wp-includes/link-template.php
r20000 r20023 590 590 */ 591 591 function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { 592 global $wp_rewrite;593 594 592 $term_id = ( int ) $term_id; 595 593 -
trunk/wp-includes/post.php
r19924 r20023 1007 1007 1008 1008 if ( $args->hierarchical ) 1009 $wp_rewrite->add_rewrite_tag("%$post_type%", '(.+?)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name=");1009 add_rewrite_tag("%$post_type%", '(.+?)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name="); 1010 1010 else 1011 $wp_rewrite->add_rewrite_tag("%$post_type%", '([^/]+)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name=");1011 add_rewrite_tag("%$post_type%", '([^/]+)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name="); 1012 1012 1013 1013 if ( $args->has_archive ) { … … 1018 1018 $archive_slug = $wp_rewrite->root . $archive_slug; 1019 1019 1020 $wp_rewrite->add_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' );1020 add_rewrite_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' ); 1021 1021 if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) { 1022 1022 $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')'; 1023 $wp_rewrite->add_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' );1024 $wp_rewrite->add_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' );1023 add_rewrite_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' ); 1024 add_rewrite_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' ); 1025 1025 } 1026 1026 if ( $args->rewrite['pages'] ) 1027 $wp_rewrite->add_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' );1027 add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' ); 1028 1028 } 1029 1029 1030 $wp_rewrite->add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite );1030 add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite ); 1031 1031 } 1032 1032 … … 1962 1962 */ 1963 1963 function wp_delete_post( $postid = 0, $force_delete = false ) { 1964 global $wpdb , $wp_rewrite;1964 global $wpdb; 1965 1965 1966 1966 if ( !$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) ) … … 2400 2400 * @since 1.0.0 2401 2401 * @uses $wpdb 2402 * @uses $wp_rewrite2403 2402 * @uses $user_ID 2404 2403 * @uses do_action() Calls 'pre_post_update' on post ID if this is an update. … … 2413 2412 */ 2414 2413 function wp_insert_post($postarr, $wp_error = false) { 2415 global $wpdb, $ wp_rewrite, $user_ID;2414 global $wpdb, $user_ID; 2416 2415 2417 2416 $defaults = array('post_status' => 'draft', 'post_type' => 'post', 'post_author' => $user_ID, -
trunk/wp-includes/taxonomy.php
r19975 r20023 297 297 * @since 2.3.0 298 298 * @uses $wp_taxonomies Inserts new taxonomy object into the list 299 * @uses $wp_rewrite Adds rewrite tags and permastructs300 299 * @uses $wp Adds query vars 301 300 * … … 305 304 */ 306 305 function register_taxonomy( $taxonomy, $object_type, $args = array() ) { 307 global $wp_taxonomies, $wp _rewrite, $wp;306 global $wp_taxonomies, $wp; 308 307 309 308 if ( ! is_array($wp_taxonomies) ) … … 344 343 $tag = '([^/]+)'; 345 344 346 $wp_rewrite->add_rewrite_tag("%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");347 $wp_rewrite->add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] );345 add_rewrite_tag( "%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=" ); 346 add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] ); 348 347 } 349 348
Note: See TracChangeset
for help on using the changeset viewer.