[wp-trac] [WordPress Trac] #44470: meta property=“og:image” doesn't register if an image is executed via a shortcode in WP Post and Pages

WordPress Trac noreply at wordpress.org
Wed Jun 27 03:28:41 UTC 2018


#44470: meta property=“og:image” doesn't register if an image is executed via a
shortcode in WP Post and Pages
--------------------------+-----------------------------
 Reporter:  nlstm         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  4.9.6
 Severity:  critical      |   Keywords:  dev-feedback
  Focuses:                |
--------------------------+-----------------------------
 I want to try and explain a WordPress core issue and bug, in which I dont
 feel there is an available solution, at least I dont think after
 exhaustive research. I ran many many tests on fresh WP installations and
 twenty17 themes. And some may suggest this is a 3rd party plugin issue,
 while I am suggesting that it is both a Core and 3rd Party Plugin issue
 with the most widely used plugin in the world perhaps WPSEO. Applying
 shortcodes to WP post and Pages, of course it renders fine in the front-
 end, the output code that is. However, many recent updates to social media
 platforms Open Graph Protocols. The WPSEO plugin cannot understand that an
 image <img src="file.jpg"> is being executed via php through a shortcode,
 unless the image is hard-coded directly into the WP page editor then it
 works fine. Problem is, no image executed from literally any 3rd party
 plugin shortcode contained within a wordpress post or page will execute
 the meta property="og:image" in the <head> .... In short WordPress Core
 does not support opengraph functions or plugins when shortcodes are being
 used.

 one of the last tests to try to continue to prove this is a WP core issue
 from their last several updates, that I am certainly of course trying to
 gain some attention on, that even an out of the box wordpress stock short
 codes like [gallery ids="21"] to display images, cool enough that it
 displays visually in the post editor, still impossible to hook into the
 main property=og:image meta. Of course the other primary issue, no rhyme
 or reason either that a static front page cannot display the meta in the
 <head> either by any know third party plugin or hard coded functions in
 the theme directory. Being that exhaustive testing has been done, without
 the modification of stock wordpress core files, continues to lead me to
 believe that this is a core issue again.

 And after a lot of I intelligent research I believe wordpress next core
 update should fix this. Please read some other additional testing I have
 done on this issue as well. I am certainly trying to gain some attention
 to this issue because developers need to be able to execute php via
 shortcodes into wp post editors therefore execute images in a dynamic way
 via short codes and still be in compliance with al know third party
 plugins like yoasts og: settings and the social media platform og
 protocols. https://wordpress.stackexchange.com/questions/306973/property-
 ogimage-doesnt-register-with-including-a-php-file-as-a-shortcode-in

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44470>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list