Improve WP Plugin #1
Description
- 1 Add params to shortcodes, which are sent to
div data-properties
to set individual properties directly from WordPress.
Currently, these two divs are injected for our Reactions
and Preview
embeds, respectively:
<div class="attach-reactions" data-property-item="https://example.com"></div>
<div class="attach-preview" data-property-item="https://example.com"></div>
We allow to set many further properties by injecting a JSON map [A] into data-properties
:
<div class='attach-reactions' data-property-item='https://example.com' data-properties='{}'></div>
<div class='attach-preview' data-property-item='https://example.com' data-properties='{}'></div>
also see: https://github.com/attach-live/attach-properties/blob/master/properties/embeds/reactions.html#L18
-
The control for this would be a table where the user can enter key and value if that exists. Otherwise we must talk and find another option. Alternatively, if we can parse this, a JSON editor is fine, too.
-
"
and'
need to be swapped because the JSON may contain"
. If it contains'
and other characters that are not allowed, it needs to be HTML encoded. I don't know the exact rules but will post these as I get response from the dev who wrote it. -
If a key or value is undefined, do not add the property to the JSON.
-
Store the JSON with the plugin parameters and inject it.
-
2 Add query params for
evaluation-key
anddomain-verification-code
to target the correct project indevelopers
platform.
To all links that link to https://developers.attach.live/...
and contain a /latest
segment, add
?evaluation-key={}&domain-verification-code={}
if these properties are set in the plugin UI. This allows our backend to find the correct project. Leave out if a property isn't set.
-
3 The icon is currently a JPG. Does it have to be or shouldn't we switch this to PNG?
-
4 Document how properties can be set as shortcodes. If a shortcode is entered, there is a way to manually add parameters to it in WordPress. These parameters must be added like the JSON as well. We need to speak about this.
- @oliverhausler Plan routing update in
developers
: https://github.com/attach-live/attach-developers/issues/740