CSS Tidy: Don't use `__DIR__` to support PHP 5.2.

Props @TobiasBg.

See https://github.com/Automattic/jetpack/commit/cde560693755a4fe4cd4832ba1052db45849cebc#commitcomment-6185297.

Merges r96915-wpcom.
REST API: add new query paramater for filtering the fields returned

This reverts [96768], and thus un-reverts [96761].

This new query paramater allows you to specify which fields to return with endpoint responses by passing an additional comma-separated list of fields as part of the query.

For endpoints that contain one of the following objects: categories, comments, connections, domains, groups, likes, media, notes, posts, services, sites, suggestions, tags, themes, topics, users -- it will filter the contents of that object rather than the "parent" object. Otherwise, it filters the main returned object.

This was originally committed in [96768] however it broke notificaitons in the iOS app due to the notifications endpoint having an existing fields query paramater. The problem was not discovered due to the lack of tests for the notifications enpoint.

This improved commit makes sure that both methods for filtering the API responses are compatible with each other, and that the notifications endpoint functions properly. This also refines the tests used for the notifications endpoint as well as those for the filtering specifically.

This also removes an extra debug that was left in one of the tests.

see https://[private link] for project details

Merges r96808-wpcom.
REST API: add new query paramater for filtering the fields returned

This reverts [96768], and thus un-reverts [96761].

This new query paramater allows you to specify which fields to return with endpoint responses by passing an additional comma-separated list of fields as part of the query.

For endpoints that contain one of the following objects: categories, comments, connections, domains, groups, likes, media, notes, posts, services, sites, suggestions, tags, themes, topics, users -- it will filter the contents of that object rather than the "parent" object. Otherwise, it filters the main returned object.

This was originally committed in [96768] however it broke notificaitons in the iOS app due to the notifications endpoint having an existing fields query paramater. The problem was not discovered due to the lack of tests for the notifications enpoint.

This improved commit makes sure that both methods for filtering the API responses are compatible with each other, and that the notifications endpoint functions properly. This also refines the tests used for the notifications endpoint as well as those for the filtering specifically.

This also removes an extra debug that was left in one of the tests.

see https://[private link] for project details

Merges r96808-wpcom.
REST API: Publicize:
 * enable publicize endpoints: class.wpcom-publicize-api-endpoints.php
 * support passing specific publicize connections whe editing a post.

See https://[private link]

Merges r96816-wpcom.
REST API: Fix some post type/author assignment bugs

In [96732] a post type assignment bug was fixed. However, this now meant that cap checks for editing the author of a post always failed. This commit cleans up the post type and author assignments and the checks involved. It also fixes the `can_edit_post_and_assign_new_author` test which was failing while also passing all the other tests.

Merges r96824-wpcom.
REST API: remove temporary whitelist of VIP CPTs that are allowed in the API and always allow posts which are freshly pressed.

In [96828] I introduced a function for checking if a post is freshly pressed. This is now used in the REST API to bypass post type checks for the freshly pressed endpoints as they fail to return freshly pressed posts that are CPTs (e.g. on VIP sites) otherwise. Previously we had to whitelist every post type manually which was tedious and prone to error. This solves the problem in a more permanent fashion.

Merges r96833-wpcom.