Ticket #59818: kitchin59818.alt.diff
| File kitchin59818.alt.diff, 4.3 KB (added by , 2 years ago) |
|---|
-
src/wp-admin/includes/dashboard.php
371 371 372 372 // Check if search engines are asked not to index this site. 373 373 if ( ! is_network_admin() && ! is_user_admin() 374 && current_user_can( 'manage_options' ) && !get_option( 'blog_public' )374 && current_user_can( 'manage_options' ) && 1 !== get_option( 'blog_public' ) 375 375 ) { 376 376 377 377 /** -
src/wp-admin/options.php
179 179 $allowed_options['general'][] = 'default_role'; 180 180 181 181 $allowed_options['writing'] = array_merge( $allowed_options['writing'], $mail_options ); 182 $allowed_options['writing'][] = 'ping_sites';183 182 183 if ( '1' === get_option( 'blog_public' ) ) { 184 $allowed_options['writing'][] = 'ping_sites'; 185 } 186 184 187 $allowed_options['media'][] = 'uploads_use_yearmonth_folders'; 185 188 186 189 /* -
src/wp-includes/comment.php
3155 3155 * @return mixed Empty string if blog is not public, returns $sites, if site is public. 3156 3156 */ 3157 3157 function privacy_ping_filter( $sites ) { 3158 if ( ' 0' != get_option( 'blog_public' ) ) {3158 if ( '1' === get_option( 'blog_public' ) ) { 3159 3159 return $sites; 3160 3160 } else { 3161 3161 return ''; -
src/wp-includes/deprecated.php
4145 4145 _deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_noindex()' ); 4146 4146 4147 4147 // If the blog is not public, tell robots to go away. 4148 if ( ' 0'== get_option( 'blog_public' ) ) {4148 if ( '1' !== get_option( 'blog_public' ) ) { 4149 4149 wp_no_robots(); 4150 4150 } 4151 4151 } … … 4166 4166 function wp_no_robots() { 4167 4167 _deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_no_robots()' ); 4168 4168 4169 if ( get_option( 'blog_public' ) ) {4169 if ( '1' === get_option( 'blog_public' ) ) { 4170 4170 echo "<meta name='robots' content='noindex,follow' />\n"; 4171 4171 return; 4172 4172 } -
src/wp-includes/functions.php
1707 1707 do_action( 'do_robotstxt' ); 1708 1708 1709 1709 $output = "User-agent: *\n"; 1710 $public = get_option( 'blog_public' );1710 $public = (bool) get_option( 'blog_public' ); 1711 1711 1712 1712 $site_url = parse_url( site_url() ); 1713 1713 $path = ( ! empty( $site_url['path'] ) ) ? $site_url['path'] : ''; -
src/wp-includes/robots-template.php
68 68 * @return array Filtered robots directives. 69 69 */ 70 70 function wp_robots_noindex( array $robots ) { 71 if ( !get_option( 'blog_public' ) ) {71 if ( '1' !== get_option( 'blog_public' ) ) { 72 72 return wp_robots_no_robots( $robots ); 73 73 } 74 74 … … 140 140 function wp_robots_no_robots( array $robots ) { 141 141 $robots['noindex'] = true; 142 142 143 if ( get_option( 'blog_public' ) ) {143 if ( '1' === get_option( 'blog_public' ) ) { 144 144 $robots['follow'] = true; 145 145 } else { 146 146 $robots['nofollow'] = true; … … 186 186 * @return array Filtered robots directives. 187 187 */ 188 188 function wp_robots_max_image_preview_large( array $robots ) { 189 if ( get_option( 'blog_public' ) ) {189 if ( '1' === get_option( 'blog_public' ) ) { 190 190 $robots['max-image-preview'] = 'large'; 191 191 } 192 192 return $robots; -
src/wp-signup.php
199 199 200 200 $blog_public_on_checked = ''; 201 201 $blog_public_off_checked = ''; 202 if ( isset( $_POST['blog_public'] ) && ' 0' === $_POST['blog_public'] ) {202 if ( isset( $_POST['blog_public'] ) && '1' !== $_POST['blog_public'] ) { 203 203 $blog_public_off_checked = 'checked="checked"'; 204 204 } else { 205 205 $blog_public_on_checked = 'checked="checked"';