| @@ -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 | } |