#6945: add a props block to sync mentions to wp.org #400
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a "props" block as mentioned in #6945.
How
wporg/propswhich is based on the core paragraph block (and similar to the notice block already existing in this repo).save_postit checks for existance of this block (also supports nested blocks) and parses all mentions in this props block.WordPressdotorg\Profiles\add_activity.classnamesdependency since its used in gutenberg and it's my go-to. But wasn't added in this package until yet and I don't think the DependencyExtractionPlugin of core handles that package. If we want to avoid this package for the simple two lines in this block, I can remove that.Questions:
add_activitycall? Is there a test instance or a local instance I can get when running via wp-env?typeparameter ofadd_activityallow?bbp_find_mentionsto parse mentions. I'm reusing this function and provide a fallback if this is not available. If bbPress and this function will always be available, we can remove the fallback.remove_activityfunction?save_posthook here but if we only want to support the post post type, I can switch that tosave_post_post.How to test:
npm start+npm run wp-env startWordPressdotorg\Profiles\add_activitydoes not exist_wporg_propsdoes exist and has the correct values in itScreenshots: