diff options
Diffstat (limited to 'plugins/jetpack/modules/widgets/twitter-timeline.php')
-rw-r--r-- | plugins/jetpack/modules/widgets/twitter-timeline.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/widgets/twitter-timeline.php b/plugins/jetpack/modules/widgets/twitter-timeline.php index d9c8c947..0f16e330 100644 --- a/plugins/jetpack/modules/widgets/twitter-timeline.php +++ b/plugins/jetpack/modules/widgets/twitter-timeline.php @@ -138,6 +138,22 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget { echo ' data-partner="' . esc_attr( $partner ) . '"'; } + /** + * Allow the activation of Do Not Track for the Twitter Timeline Widget. + * + * @see https://developer.twitter.com/en/docs/twitter-for-websites/timelines/guides/parameter-reference.html + * + * @module widgets + * + * @since 6.9.0 + * + * @param bool false Should the Twitter Timeline use the DNT attribute? Default to false. + */ + $dnt = apply_filters( 'jetpack_twitter_timeline_default_dnt', false ); + if ( true === $dnt ) { + echo ' data-dnt="true"'; + } + if ( ! empty( $instance['chrome'] ) && is_array( $instance['chrome'] ) ) { echo ' data-chrome="' . esc_attr( join( ' ', $instance['chrome'] ) ) . '"'; } |