PluginProbe
Polylang / 2.6.3
Polylang v2.6.3
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 | admin/admin-filters.php +0 -26 2.82.6.3 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * Setup miscellaneous admin filters as well as filters common to admin and frontend
8 5 *
@@ -44,11 +41,8 @@
44 41 add_filter( 'sanitize_user', array( $this, 'sanitize_user' ), 10, 3 );
45 42 }
46 43
47 44 add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
48 -
49 - // Add post state for translations of the privacy policy page
50 - add_filter( 'display_post_states', array( $this, 'display_post_states' ), 10, 2 );
51 45 }
52 46
53 47 /**
54 48 * Modifies the widgets forms to add our language dropdown list
@@ -71,9 +65,8 @@
71 65 array_merge(
72 66 array( (object) array( 'slug' => 0, 'name' => __( 'All languages', 'polylang' ) ) ),
73 67 $this->model->get_languages_list()
74 68 ),
75 - -1,
76 69 array(
77 70 'name' => $widget->id . '_lang_choice',
78 71 'class' => 'tags-input pll-lang-choice',
79 72 'selected' => empty( $instance['pll_lang'] ) ? '' : $instance['pll_lang'],
@@ -269,25 +262,6 @@
269 262 if ( ! empty( $this->curlang ) ) {
270 263 $classes .= ' pll-dir-' . ( $this->curlang->is_rtl ? 'rtl' : 'ltr' );
271 264 }
272 265 return $classes;
273 - }
274 -
275 - /**
276 - * Add post state for translations of the privacy policy page
277 - *
278 - * @since 2.7
279 - *
280 - * @param array $post_states An array of post display states.
281 - * @param object $post The current post object.
282 - * @return array
283 - */
284 - public function display_post_states( $post_states, $post ) {
285 - $page_for_privacy_policy = get_option( 'wp_page_for_privacy_policy' );
286 -
287 - if ( $page_for_privacy_policy && in_array( $post->ID, $this->model->post->get_translations( $page_for_privacy_policy ) ) ) {
288 - $post_states['page_for_privacy_policy'] = __( 'Privacy Policy Page', 'polylang' );
289 - }
290 -
291 - return $post_states;
292 266 }
293 267 }