Automattic / Automattic/jetpack

Sharing: move Enhanced Open Graph into the basic Open Graph functions

Open
#3,004 2 comments 0 reactions 0 assignees View on GitHub
[Feature] Publicize [Feature] Sharing [Pri] Low Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Jetpack uses 2 different files to generate Open Graph Meta tags:
- The first one, `functions.opengraph.php`, is used as soon as you use either Sharing or Publicize, and as long as you don't use a conflicting plugin.
- The second, `enhanced-open-graph.php`, hooks into the `jetpack_open_graph_tags` filter that is used to render the tags, and is only used when the Publicize module is active.

The file includes the following features (functions):
- Better OG Image Tags for Image Post Formats (`enhanced_og_image`)
- Better OG Image Tags for Gallery Post Formats (`enhanced_og_gallery`)
- Allows VideoPress, YouTube, and Vimeo videos to play inline on Facebook (`enhanced_og_video`)

I think it would make sense to offer these functions to everyone using the Open Graph Meta tags, even if they don't use the Publicize module.

@justinshreve It seems you originally merged that file back from WordPress.com. Can you recall why it wasn't added to the original tags?

Contributor guide

Open the contributing guide

Research direction

Start by reading functions.opengraph.php and enhanced-open-graph.php, including enhanced_og_image, enhanced_og_gallery, and enhanced_og_video. Trace how jetpack_open_graph_tags is registered for Sharing and Publicize, then verify that these enhancements are available whenever Open Graph tags are enabled, without changing existing tag output unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
web-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.