wp/wp-includes/class-wp.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   543 
   543 
   544 			// Only set X-Pingback for single posts that allow pings.
   544 			// Only set X-Pingback for single posts that allow pings.
   545 			if ( $post && pings_open( $post ) ) {
   545 			if ( $post && pings_open( $post ) ) {
   546 				$headers['X-Pingback'] = get_bloginfo( 'pingback_url', 'display' );
   546 				$headers['X-Pingback'] = get_bloginfo( 'pingback_url', 'display' );
   547 			}
   547 			}
       
   548 
       
   549 			// Send nocache headers for password protected posts to avoid unwanted caching.
       
   550 			if ( ! empty( $post->post_password ) ) {
       
   551 				$headers = array_merge( $headers, wp_get_nocache_headers() );
       
   552 			}
   548 		}
   553 		}
   549 
   554 
   550 		/**
   555 		/**
   551 		 * Filters the HTTP headers before they're sent to the browser.
   556 		 * Filters the HTTP headers before they're sent to the browser.
   552 		 *
   557 		 *