WordPress.org

Make WordPress Core

Ticket #20212: useragent.patch

File useragent.patch, 994 bytes (added by nprasath002, 6 years ago)
  • class-wp-xmlrpc-server.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    781781                        $this->set_custom_fields( $post_ID, $post_data['custom_fields'] );
    782782                }
    783783
     784                if( isset ( $_SERVER['HTTP_USER_AGENT'] ) ) {
     785                        $this->set_custom_fields( $post_ID, array( array( 'key' => 'user_agent', 'value' => $_SERVER['HTTP_USER_AGENT'] ) ) );
     786                }
     787
    784788                if ( isset( $post_data['terms'] ) || isset( $post_data['terms_names'] ) ) {
    785789                        $post_type_taxonomies = get_object_taxonomies( $post_data['post_type'], 'objects' );
    786790