[wp-trac] [WordPress Trac] #48561: Block "Facebook Embed" inserts new fb-root every time it's included on a page
WordPress Trac
noreply at wordpress.org
Mon Nov 11 13:26:50 UTC 2019
#48561: Block "Facebook Embed" inserts new fb-root every time it's included on a
page
-------------------------------+-----------------------------
Reporter: bastianfiessinger | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
Every time a "Facebook" Block is included on a page, the block creates an
element with the following nodes on the start:
{{{
<div id="fb-root"></div>
<script async="1" defer="1" crossorigin="anonymous"
src="https://connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v5.0"></script>
}}}
So there are multiple instances of id="fb-root" and the facebook sdk.js is
also included multiple times if you want to display more than one Facebook
post on a page.
Maybe hook in after get_header() to inlclude these nodes once as there is
no ideal hook right after the body tag.
Btw: why is the sdk loaded from the french version of facebook?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48561>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list