jonathanlb/signed-s3-links

Update shortcodes to render with Divi Builder

Open

#9 opened on Mar 9, 2023

 (1 comment) (0 reactions) (0 assignees)PHP (0 forks)auto 404
bugenhancementhelp wanted

Repository metrics

Stars
 (0 stars)
PR merge metrics
 (PR metrics pending)

Description

When a WordPress post contains more than 12-18 ss3 shortcodes, Divi Builder will not display previews for many ss3 shortcode invocations, instead showing a spinner and logging a 504. Editing the DIVI module content seems to trigger rendering and removes the spinner, suggesting to me that Divi Builder running at my host is overwhelmed with requests.

The post renders cleanly to the client, however.

I ran across the 504s performing mass replacement (site names redacted):

time wp search-replace '\[et_pb_audio audio="https://XXX/wp-content/uploads/([a-zA-Z0-9_\-]*.mp3)" title="([^"]*)" artist_name="([^"]*)".*?(?=\[/et_pb_audio\])\[/et_pb_audio\]' \
'[et_pb_code][ss3_audio XXX/\1 style="width: 100%;" region=us-east-2 class="wp-audio-shortcode" title="\2 by \3"][/et_pb_code]' \
wp_XXX_posts --include-columns=post_content --regex 

Is there some way to update the shortcodes to be more friendly with Divi Builder preview?

Contributor guide