PluginProbe
Polylang / 2.5
Polylang v2.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/filters.php +4 -21 2.92.5 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * Setup filters common to admin and frontend
8 5 *
@@ -23,13 +20,8 @@
23 20 $this->model = &$polylang->model;
24 21 $this->options = &$polylang->options;
25 22 $this->curlang = &$polylang->curlang;
26 23
27 - // Deletes our cache for sticky posts when the list is updated.
28 - add_action( 'update_option_sticky_posts', array( $this, 'delete_sticky_posts_cache' ) );
29 - add_action( 'add_option_sticky_posts', array( $this, 'delete_sticky_posts_cache' ) );
30 - add_action( 'delete_option_sticky_posts', array( $this, 'delete_sticky_posts_cache' ) );
31 -
32 24 // Filters the comments according to the current language
33 25 add_action( 'parse_comment_query', array( $this, 'parse_comment_query' ) );
34 26 add_filter( 'comments_clauses', array( $this, 'comments_clauses' ), 10, 2 );
35 27
@@ -60,17 +52,8 @@
60 52 add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'register_personal_data_exporter' ), 0 ); // Since WP 4.9.6
61 53 }
62 54
63 55 /**
64 - * Deletes the cache for multilingual sticky posts.
65 - *
66 - * @since 2.8.4
67 - */
68 - public function delete_sticky_posts_cache() {
69 - wp_cache_delete( 'sticky_posts', 'options' );
70 - }
71 -
72 - /**
73 56 * Get the language to filter a comments query
74 57 *
75 58 * @since 2.0
76 59 *
@@ -351,12 +334,12 @@
351 334 * @param string $email_address User email address
352 335 * @return array Personal data
353 336 */
354 337 public function user_data_exporter( $email_address ) {
355 - $email_address = trim( $email_address );
356 - $data_to_export = array();
357 - $user_data_to_export = array();
338 + $email_address = trim( $email_address );
358 339
340 + $data_to_export = array();
341 +
359 342 if ( $user = get_user_by( 'email', $email_address ) ) {
360 343 foreach ( $this->model->get_languages_list() as $lang ) {
361 344 if ( $lang->slug !== $this->options['default_lang'] && $value = get_user_meta( $user->ID, 'description_' . $lang->slug, true ) ) {
362 345 $user_data_to_export[] = array(
@@ -369,9 +352,9 @@
369 352
370 353 if ( ! empty( $user_data_to_export ) ) {
371 354 $data_to_export[] = array(
372 355 'group_id' => 'user',
373 - 'group_label' => __( 'User', 'polylang' ),
356 + 'group_label' => __( 'User' ),
374 357 'item_id' => "user-{$user->ID}",
375 358 'data' => $user_data_to_export,
376 359 );
377 360 }