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