Automattic / Automattic/jetpack
Publicize: wpas_default_prefix, wpas_default_message, and wpas_default_suffix not working in Gutenberg
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce the issue
1. Install latest WP
2. Install Jetpack
3. Activate Publicize module
4. Connect Twitter account to Jetpack
5. Install Gutenberg plugin
6. Install a functional plugin (Code Snippets)
7. Create a new snippet with the following code in Code Snippets:
```php
function set_new_publicize_default_prefix($msg) {
return 'prefix-';
}
add_filter('wpas_default_prefix', 'set_new_publicize_default_prefix');
function set_new_publicize_default_msg($msg) {
return 'default';
}
add_filter('wpas_default_message', 'set_new_publicize_default_msg');
function set_new_publicize_default_suffix($msg) {
return '-suffix';
}
add_filter('wpas_default_suffix', 'set_new_publicize_default_suffix');
```
8. Save & Activate code snippet
9. Create new post with Gutenberg (use any title)
10. Attempt to publish post
#### What I expected
I expected to see, in the "Customize your Message" text area, under "Share This Post" in the "Publish Settings" dialog of Gutenberg, the text `prefix-default-suffix`.
#### What happened instead
What I see in the "Customize your Message" area is the title of the post, instead.
**Screenshots**

Contributor guide
Research direction
Reproduce the issue with Jetpack Publicize, a connected Twitter account, and Gutenberg using the listed PHP filters. Trace how the Publicize defaults reach Gutenberg's Publish Settings dialog; done means the Customize your Message area shows `prefix-default-suffix` instead of the post title.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, wordpress
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100