Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blacklist is now Blocklist (WP 5.5) #17

Closed
Zodiac1978 opened this issue Jul 11, 2020 · 4 comments · Fixed by #18
Closed

Blacklist is now Blocklist (WP 5.5) #17

Zodiac1978 opened this issue Jul 11, 2020 · 4 comments · Fixed by #18

Comments

@Zodiac1978
Copy link
Member

With the coming WordPress 5.5 the blacklist_keys are changed to blocklist_keys.

See this changeset:
https://core.trac.wordpress.org/changeset/48121

Affected line:

@Zodiac1978
Copy link
Member Author

Zodiac1978 commented Jul 23, 2020

The name of the option has changed in the final version of WordPress 5.5 to disallowed_keys
https://make.wordpress.org/core/2020/07/23/codebase-language-improvements-in-5-5/

@Zodiac1978
Copy link
Member Author

If this plugin will still be maintained in the future and not added to ASB here is solution for the issue:

		/* Update blocklist */
		if ( false === get_option( 'disallowed_keys' ) ) {
			// WordPress before 5.5.
			update_option(
				'blacklist_keys',
				wp_remote_retrieve_body( $response )
			);
		} else {
			// WordPress 5.5 or higher.
			update_option(
				'disallowed_keys',
				wp_remote_retrieve_body( $response )
			);
		}

See also:
pluginkollektiv/antispam-bee#338
pluginkollektiv/antispam-bee#22

@stkjj
Copy link
Member

stkjj commented Aug 11, 2020

Regardless of the inclusion into ASB: the field in the WP backend is called "Blocklist" (already in 5.4). We can't update a blacklist, that doesn't factually exist any longer. Let's rename this plugin

@Zodiac1978
Copy link
Member Author

Like I wrote in Slack: The new name is “Disallowed Comment Keys” instead of Blocklist (which was valid in 5.4).

And we can change the name but not the slug:
https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/#can-i-change-my-plugins-urlslug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants