Changeset 33061
- Timestamp:
- 07/03/2015 11:16:08 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-press-this.php
r33052 r33061 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 * … … 1180 1198 public function html() { 1181 1199 global $wp_locale, $wp_version; 1200 1201 // Set explicit user-agent for the $data outbound HTTP requests. 1202 add_filter( 'http_headers_useragent', array( $this, 'ua_string' ) ); 1182 1203 1183 1204 // Get data, new (POST) and old (GET).
Note: See TracChangeset
for help on using the changeset viewer.