Extend SOP shortcodes migration to make it generic.
Closed this issue ยท 7 comments
These all shortcodes are handled as a part of SOP and need to extend where needed.
Shortcode => Gutenberg block
-
et_pb_video => Youtube/Embed block (Based on SOP, this was only Youtube video and need to extend this based on type of videos)
-
et_pb_button => Button block (Check if any style can be managed)
-
et_pb_image => Image block (Check if any style can be managed)
-
et_pb_fullwidth_image => Image block (Currently
et_pb_fullwidth_image
is being treated same aset_pb_image
)
Looping @michiecat
Looking into Image and button shortcodes if any style maps needed
Tested various version of image and button shortcodes:
Added few attributes support and some of them can't be added to core blocks.
- Button block:
-
Added
open link in new tab
support. -
Skipped disable attribute support: Divi supports disable button based on viewpoints like for mobile and/or tablet and/or desktop. - This can be added with diffeent type of css class but it will be needed to be enqueued to the theme or needs to be added via the plugin.
Need you thoughts here @michiecat , We can add the support with CSS class or we can skip.
- Image block:
-
Added alt text support in block
-
Skipped many attributes as per following because, all of them can't be added to default block
force_fullwidth="on" positioning="absolute" disabled_on="off|off|on" module_id="img-test-ID" module_class="img-test-class" border_color_all="#000000" border_width_all="3px" border_color_right="#000000" border_width_right="9px" custom_css_main_element="background:red;" custom_css_before="background:green;" custom_css_after="background:blue;"
Here alsodisabled_on="off|off|on"
is about button behaviour to disable/hide based on view point.
Skipped disable attribute support: Divi supports disable button based on viewpoints like for mobile and/or tablet and/or desktop. - This can be added with diffeent type of css class but it will be needed to be enqueued to the theme or needs to be added via the plugin.
Need you thoughts here @michiecat , We can add the support with CSS class or we can skip.
I think we can skip this one for now, and any other attribute/style that's not part of core. Since core changes so rapidly, let's keep the plugin as simple as possible. The other attributes that can't be converted directly can be things we'd address on a per-site basis with a custom solution, if it's important for that client.
Thanks for all of your work so far on this @DevikVekariya !
Today I have added the media video shortcode to the video block migration. and separated the youtube embed migration.
This was not the case of scienceofpeople (there were all youtube embed shortcodes) but now i tested and added the video attachment type support too.
Now I am looking into full_width_image shortcode and checking how I can map it to core image block with large size of an attribute
@michiecat
I am done with checking and altering all these blocks.
Awesome, thank you @DevikVekariya!
All done here ๐ . closing the issue