Skip to content

Sync: Update whitelist/blacklist#16166

Closed
kraftbj wants to merge 7 commits into
masterfrom
update/blacklist-sync
Closed

Sync: Update whitelist/blacklist#16166
kraftbj wants to merge 7 commits into
masterfrom
update/blacklist-sync

Conversation

@kraftbj

@kraftbj kraftbj commented Jun 15, 2020

Copy link
Copy Markdown
Contributor

Supports #16099

Changes proposed in this Pull Request:

  • Replace usages of whitelist and blacklist.
  • Some PHPCS improvements to pass phpcs-changed.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • pb6Nl-duS-p2

Does this pull request change what data or activity we track or use?

No change.

Testing instructions:

  • Verify tests pass.
  • Run a full sync, verify it completes as expected.
  • Perform various activities on a site, verify it syncs.
  • Bonus points for using filters.

Proposed changelog entry for your changes:

  • Covered under other PRs.

@kraftbj kraftbj added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Package] Sync labels Jun 15, 2020
@kraftbj kraftbj added this to the 8.7 milestone Jun 15, 2020
@kraftbj kraftbj self-assigned this Jun 15, 2020
@matticbot

Copy link
Copy Markdown
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello kraftbj! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D44974-code before merging this PR. Thank you!
This revision will be updated with each commit to this PR

@kraftbj kraftbj mentioned this pull request Jun 15, 2020
7 tasks
@github-actions github-actions Bot added the [Status] Needs Package Release This PR made changes to a package. Let's update that package now. label Jun 15, 2020
@jetpackbot

jetpackbot commented Jun 15, 2020

Copy link
Copy Markdown
Collaborator

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16166

Scheduled Jetpack release: August 4, 2020.
Scheduled code freeze: July 28, 2020

Generated by 🚫 dangerJS against 1e804a0

@kraftbj kraftbj removed the [Status] Needs Review This PR is ready for review. label Jun 15, 2020
@kraftbj kraftbj force-pushed the update/blacklist-sync branch from 3472d8b to 1a321bd Compare June 16, 2020 16:53
@jeherve jeherve removed this from the 8.7 milestone Jun 18, 2020
@kraftbj kraftbj force-pushed the update/blacklist-sync branch from 1a321bd to ef50cfa Compare July 7, 2020 05:29
@kraftbj kraftbj marked this pull request as draft July 7, 2020 05:50
@kraftbj kraftbj marked this pull request as ready for review July 7, 2020 05:51
@kraftbj kraftbj force-pushed the update/blacklist-sync branch from 503b5a8 to decfded Compare July 7, 2020 06:14
@kraftbj kraftbj force-pushed the update/blacklist-sync branch from decfded to df28c46 Compare July 7, 2020 14:41
@kraftbj kraftbj added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Jul 7, 2020
@kraftbj kraftbj added this to the 8.8 milestone Jul 7, 2020

@leogermani leogermani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

I ran the tests and everything works fine.

  • Full sync
  • syncing edits in posts and options

Made some minor comments in the code

I think all the versions in @deprecated and @since tags must be updated to 8.8.0.

* @module json-api
*
* @since 3.8.2
* @deprecated 8.7.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 * @deprecated 8.8.0

Should it be 8.8?


// Publicize filter to prevent publicizing blacklisted post types.
add_filter( 'publicize_should_publicize_published_post', array( __CLASS__, 'prevent_publicize_blacklisted_posts' ), 10, 2 );
// Publicize filter to prevent publicizing b;pcled post types.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Publicize filter to prevent publicizing blocked post types.

typo


/**
* Get default capabilities whitelist.
* Get default capabilities allowlist..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Get default capabilities allowlist.

Extra dot at the end

* @param bool Is the option a site option.
*/
if ( ! in_array( $this->option_name, apply_filters( 'jetpack_options_whitelist', Defaults::$default_options_whitelist, $this->site_option ) ) ) {
$allowlist = apply_filters_deprecated( 'jetpack_options_whitelist', array( Defaults::$default_options_allowlist, $this->site_option ), 'Jetpack 8.7.0', 'jetpack_options_allowlist' );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$allowlist = apply_filters_deprecated( 'jetpack_options_whitelist', array( Defaults::$default_options_allowlist, $this->site_option ), 'jetpack-8.8.0', 'jetpack_options_allowlist' );

*
* @module json-api
*
* @since 8.7.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @since 8.8.0

@leogermani leogermani added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Jul 21, 2020
@jeherve jeherve modified the milestones: 8.8, 8.9 Jul 24, 2020
@jeherve jeherve removed this from the 8.9 milestone Aug 18, 2020
@stale

stale Bot commented Dec 25, 2020

Copy link
Copy Markdown

This PR has been marked as stale. This happened because:

  • It has been inactive in the past 3 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this PR has clear testing instructions, is it up to date with master, and it is still valid. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale stale Bot added the [Status] Stale label Dec 25, 2020
@kraftbj kraftbj closed this Jan 30, 2022
@github-actions github-actions Bot removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jan 30, 2022
@kraftbj kraftbj deleted the update/blacklist-sync branch April 17, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Package] Sync [Status] Needs Package Release This PR made changes to a package. Let's update that package now. Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants