summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-10-23 07:44:25 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-10-23 07:44:25 -0400
commite615e1dc974dd17d20ec6aeb1b7718099241562c (patch)
tree736d0e069aa69affcd7c3c57a7bb5a158c8b953a /plugins/jetpack/modules/carousel/jetpack-carousel.php
parentUpdate plugin akismet to 3.2 (diff)
downloadblogs-gentoo-e615e1dc974dd17d20ec6aeb1b7718099241562c.tar.gz
blogs-gentoo-e615e1dc974dd17d20ec6aeb1b7718099241562c.tar.bz2
blogs-gentoo-e615e1dc974dd17d20ec6aeb1b7718099241562c.zip
Update plugin jetpack to 4.3.2
Diffstat (limited to 'plugins/jetpack/modules/carousel/jetpack-carousel.php')
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.php b/plugins/jetpack/modules/carousel/jetpack-carousel.php
index 39612633..65d69471 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.php
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.php
@@ -215,7 +215,17 @@ class Jetpack_Carousel {
* Handle WP stats for images in full-screen.
* Build string with tracking info.
*/
- if ( in_array( 'stats', Jetpack::get_active_modules() ) && ! Jetpack::is_development_mode() ) {
+
+ /**
+ * Filter if Jetpack should enable stats collection on carousel views
+ *
+ * @module carousel
+ *
+ * @since 4.3.2
+ *
+ * @param bool Enable Jetpack Carousel stat collection. Default false.
+ */
+ if ( apply_filters( 'jetpack_enable_carousel_stats', false ) && in_array( 'stats', Jetpack::get_active_modules() ) && ! Jetpack::is_development_mode() ) {
$localize_strings['stats'] = 'blog=' . Jetpack_Options::get_option( 'id' ) . '&host=' . parse_url( get_option( 'home' ), PHP_URL_HOST ) . '&v=ext&j=' . JETPACK__API_VERSION . ':' . JETPACK__VERSION;
// Set the stats as empty if user is logged in but logged-in users shouldn't be tracked.