Ticket #32864: 32864.patch
| File 32864.patch, 1.0 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/class-wp-press-this.php
1168 1168 } 1169 1169 1170 1170 /** 1171 * Sets the user agent used for Press This HTTP requests. 1172 * 1173 * @since 4.3.0 1174 * @access public 1175 * 1176 * @global string $wp_version 1177 * 1178 * @return string User agent. 1179 */ 1180 public function ua_string() { 1181 global $wp_version; 1182 1183 $user_agent = 'Press This (WordPress/' . $wp_version . '); ' . get_bloginfo( 'url' ); 1184 1185 return $user_agent; 1186 } 1187 1188 /** 1171 1189 * Serves the app's base HTML, which in turns calls the load script. 1172 1190 * 1173 1191 * @since 4.2.0 … … 1180 1198 public function html() { 1181 1199 global $wp_locale, $wp_version; 1182 1200 1201 // Set explicit user-agent for the $data outbound HTTP requests. 1202 add_filter( 'http_headers_useragent', array( $this, 'ua_string' ) ); 1203 1183 1204 // Get data, new (POST) and old (GET). 1184 1205 $data = $this->merge_or_fetch_data(); 1185 1206