Repository navigation
Allow plugins to inject additional template-specific open graph tags - #2
Merged
Merged
Conversation
Contributor
|
Pinging @justinshreve |
Contributor
|
Added to 2.8 milestone. I will test this this week |
Contributor
Author
|
Here's some sample code to utilize one of these new filters to add Open Graph meta tags to a category template: add_filter( 'jetpack_open_graph_base_tags', function ( $meta ) {
if ( is_category() ) {
$category = get_queried_object();
$meta['og:title'] = $category->name;
$meta['og:url'] = get_category_link( $category->term_id );
if ( ! empty( $category->description ) ) {
$meta['og:description'] = $category->description;
}
}
return $meta;
} ); |
blobaugh
added a commit
that referenced
this pull request
Jan 15, 2014
Allow plugins to inject additional template-specific open graph tags
blobaugh
pushed a commit
that referenced
this pull request
Mar 13, 2014
…ific open graph tags. Allows plugins to inject template specific code on pages other than the default pages that Open Graph is available on. See #2 Merges r89169-wpcom.
jeherve
referenced
this pull request
in jeherve/jetpack
Jul 20, 2016
Dailymotion shortcode: fix failing test.
stevenlinx
pushed a commit
to stevenlinx/jetpack
that referenced
this pull request
Apr 23, 2018
This was referenced Aug 12, 2026
This was referenced Aug 14, 2026
This was referenced Aug 18, 2026
Backup: refuse an empty restore/download selection, and report the failures the dashboard hid
#51336
Merged
This was referenced Aug 25, 2026
This was referenced Sep 1, 2026
This was referenced Sep 21, 2026
adamwoodnz
added a commit
that referenced
this pull request
Oct 21, 2026
With the keyboard tooltip open, hiding a series from the legend left the selection in place, because the point count did not change. The tooltip effect then re-showed the remaining series on top of the old tooltip data, so the hidden series stayed listed. Pass the visible labels as visibleSeriesKey, as BarChart does, so the navigation hook clears the selection when the visible set changes. (Codex round 2 P2 #2)
adamwoodnz
added a commit
that referenced
this pull request
Oct 22, 2026
With the keyboard tooltip open, hiding a series from the legend left the selection in place, because the point count did not change. The tooltip effect then re-showed the remaining series on top of the old tooltip data, so the hidden series stayed listed. Pass the visible labels as visibleSeriesKey, as BarChart does, so the navigation hook clears the selection when the visible set changes. (Codex round 2 P2 #2)
adamwoodnz
added a commit
that referenced
this pull request
Oct 23, 2026
…3910) * Charts: Keep hidden series out of the line chart keyboard tooltip LineChart handed the keyboard tooltip every series, hidden ones included. In group mode the tooltip shows a datum for each series it gets, so arrowing through a chart with a legend-hidden line still listed that line, while the pointer tooltip (which only sees rendered lines) did not. The last series shown also became nearestDatum, which consumers read for the tooltip heading. Pass only the visible series. The two existing visible-series filters now share the same memoized list. * Changelog: Add entries for the line chart keyboard tooltip fix Premium Analytics renders line charts that can hide series, through its interactive comparison legend and defaultHiddenSeries, so its users can see the fix. The Jetpack plugin ships the same dashboard behind jetpack_premium_analytics_enabled. Publicize, VideoPress and Newsletter line charts cannot hide a series, so they get no entry. * Address review: Name keyboard points from the first visible series With the first series hidden, the tooltip now showed the next visible series, but Enter and Space still handed the hidden series' datum to onDatumActivate, and the keyboard stopped at the hidden series' last point. So the activated point disagreed with the tooltip, and a longer visible series could not be reached. Read both from the first visible series instead. (Codex P2 #1) * Address review: Close the keyboard tooltip when visible series change With the keyboard tooltip open, hiding a series from the legend left the selection in place, because the point count did not change. The tooltip effect then re-showed the remaining series on top of the old tooltip data, so the hidden series stayed listed. Pass the visible labels as visibleSeriesKey, as BarChart does, so the navigation hook clears the selection when the visible set changes. (Codex round 2 P2 #2) * Address review: Reach every visible point by keyboard Counting stops from the first visible series broke navigation when that series was empty or shorter than a later one: hiding the first of [A, empty B, C] left no stops at all, although C is drawn. Before this branch the hidden first series set the count, so that chart was still navigable. Count stops from the longest visible series, and name an activated point from the first visible series that has one at that index. (Codex round 3 P2 #1) * Address review: Rebuild the grouped keyboard tooltip from scratch visx merges every shown datum into the previous tooltip data. When a series was hidden while the keyboard tooltip stayed open (focus in the chart and a changed point count, so the navigation hook clamped rather than cleared), the group re-show added the visible series but never dropped the hidden one, and its row stayed in the tooltip. Clear the tooltip before showing the group, so it holds only the series it is given. (Claude final review) * Address review: Describe index re-pointing for line charts too The navigation hook comment said hiding a series moves every index onto a different bar. LineChart now passes visibleSeriesKey as well, where an index is an x position, so the bar wording no longer fits. (Claude final review nit) * Address review: Check the clamped tooltip stays open The assertion only checked that Series A left the tooltip, which also holds if the tooltip closes. Checking that Series B is still listed keeps the test on the clamp path it exists for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently it is not possible to use Jetpack to add
ogtags for archive templates. This makes it possible to addogtags for them and other templates.