Ticket #39703: 39703.2.patch
File 39703.2.patch, 4.8 KB (added by , 15 months ago) |
---|
-
src/wp-activate.php
11 11 /** Sets up the WordPress Environment. */ 12 12 require __DIR__ . '/wp-load.php'; 13 13 14 require __DIR__ . '/wp-blog-header.php'; 14 wp( array( 15 'pre_query_page' => 'wp-activate', 16 ) ); 15 17 18 require ABSPATH . WPINC . '/template-loader.php'; 19 16 20 if ( ! is_multisite() ) { 17 21 wp_redirect( wp_registration_url() ); 18 22 die(); … … 68 72 $wp_object_cache->cache_enabled = false; 69 73 } 70 74 71 // Fix for page title.72 $wp_query->is_404 = false;73 74 75 /** 75 76 * Fires before the Site Activation page is loaded. 76 77 * … … 105 106 function wpmu_activate_stylesheet() { 106 107 ?> 107 108 <style type="text/css"> 109 #signup-content { width: 90%; margin:0 auto; } 108 110 form { margin-top: 2em; } 109 #submit, #key { width: 90%; font-size: 24px; }111 #submit, #key { width: 100%; font-size: 24px; } 110 112 #language { margin-top: .5em; } 111 113 .error { background: #f66; } 112 114 span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; } -
src/wp-includes/class-wp-query.php
577 577 'fields', 578 578 'menu_order', 579 579 'embed', 580 'pre_query_page', 580 581 ); 581 582 582 583 foreach ( $keys as $key ) { … … 1777 1778 } 1778 1779 1779 1780 /** 1781 * Retrieves the posts for the Multisite signup and activate pages. 1782 * 1783 * @access public 1784 * 1785 * @return array List of posts. 1786 */ 1787 public function posts_pre_query() { 1788 $pre_query_page = $this->get( 'pre_query_page' ); 1789 1790 if ( ! $pre_query_page ) { 1791 return null; 1792 } 1793 1794 $pre_query_pages = array( 1795 'wp-signup' => __( 'Register' ), 1796 'wp-activate' => __( 'Activate' ), 1797 ); 1798 1799 if ( ! isset( $pre_query_pages[ $pre_query_page ] ) ) { 1800 return null; 1801 } 1802 1803 $post = new stdClass; 1804 $post->ID = 0; 1805 $post->post_name = $pre_query_page; 1806 $post->post_title = $pre_query_pages[ $pre_query_page ]; 1807 1808 // Set the queried object to avoid notices. 1809 $this->queried_object = get_post( $post ); 1810 $this->queried_object_id = $post->ID; 1811 1812 // Reset query flags. 1813 $this->init_query_flags(); 1814 $this->is_singular = true; 1815 1816 // Return the posts. 1817 return array( $post ); 1818 } 1819 1820 /** 1780 1821 * Retrieves an array of posts based on query variables. 1781 1822 * 1782 1823 * There are a few filters and actions that can be used to modify the post … … 3058 3099 * or null to allow WP to run its normal queries. 3059 3100 * @param WP_Query $query The WP_Query instance (passed by reference). 3060 3101 */ 3061 $this->posts = apply_filters_ref_array( 'posts_pre_query', array( null, &$this ) );3102 $this->posts = apply_filters_ref_array( 'posts_pre_query', array( $this->posts_pre_query(), &$this ) ); 3062 3103 3063 3104 if ( 'ids' === $q['fields'] ) { 3064 3105 if ( null === $this->posts ) { -
src/wp-includes/class-wp.php
24 24 * @since 2.0.0 25 25 * @var string[] 26 26 */ 27 public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title', 'fields' );27 public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title', 'fields', 'pre_query_page' ); 28 28 29 29 /** 30 30 * Extra query variables set by the user. -
src/wp-signup.php
5 5 6 6 add_filter( 'wp_robots', 'wp_robots_no_robots' ); 7 7 8 require __DIR__ . '/wp-blog-header.php'; 8 wp( array( 9 'pre_query_page' => 'wp-signup', 10 ) ); 9 11 12 require ABSPATH . WPINC . '/template-loader.php'; 13 10 14 nocache_headers(); 11 15 12 16 if ( is_array( get_site_option( 'illegal_names' ) ) && isset( $_GET['new'] ) && in_array( $_GET['new'], get_site_option( 'illegal_names' ), true ) ) { … … 39 43 die(); 40 44 } 41 45 42 // Fix for page title.43 $wp_query->is_404 = false;44 45 46 /** 46 47 * Fires before the Site Sign-up page is loaded. 47 48 *