fb-instant-articles icon indicating copy to clipboard operation
fb-instant-articles copied to clipboard

Fix inject_ia_markup_meta_tag() to use is_singular() and get_queried_object_id()

Open jerclarke opened this issue 6 years ago • 0 comments

re: #953

Small fix to ensure that before inserting the ia:markup_url meta tag, we check that we're on a single-post screen (is_singular() which is true for posts, pages and CPT single.php views).
Also uses with get_post(get_queried_object_id()) rather than relying on globals (no argument or using get_the_ID()) so that we always have the right post.

This PR:

  • [x]
  • [ ]
  • [ ]

Follows #

Relates to #

Fixes #

jerclarke avatar Jun 29 '18 17:06 jerclarke