summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
committerYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
commit2ab16973706e120bc344c83be6295b54fd908c57 (patch)
tree358267a52d9542c77c90e3663cea32d13b8cb639 /plugins/jetpack/modules/widgets/twitter-timeline.php
parentUpdate twentysixteen 1.7 (diff)
downloadblogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.gz
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.bz2
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.zip
Updating packages for 5.1.1
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/widgets/twitter-timeline.php')
-rw-r--r--plugins/jetpack/modules/widgets/twitter-timeline.php16
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'] ) ) . '"';
}