112 | | if ( 'private' == $post->post_status ) { |
113 | | $post->post_password = ''; |
114 | | $visibility = 'private'; |
115 | | $visibility_trans = __('Private'); |
116 | | } elseif ( !empty( $post->post_password ) ) { |
117 | | $visibility = 'password'; |
118 | | $visibility_trans = __('Password protected'); |
119 | | } elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) { |
120 | | $visibility = 'public'; |
121 | | $visibility_trans = __('Public, Sticky'); |
122 | | } else { |
123 | | $visibility = 'public'; |
124 | | $visibility_trans = __('Public'); |
| 112 | $visibility = apply_filters('post_visibility',null,$post); |
| 113 | $visibility_trans = apply_filters('post_visibility_text',null,$post); |
| 114 | if ($visibility === null) { |
| 115 | if ( 'private' == $post->post_status ) { |
| 116 | $post->post_password = ''; |
| 117 | $visibility = 'private'; |
| 118 | $visibility_trans = __('Private'); |
| 119 | } elseif ( !empty( $post->post_password ) ) { |
| 120 | $visibility = 'password'; |
| 121 | $visibility_trans = __('Password protected'); |
| 122 | } elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) { |
| 123 | $visibility = 'public'; |
| 124 | $visibility_trans = __('Public, Sticky'); |
| 125 | } else { |
| 126 | $visibility = 'public'; |
| 127 | $visibility_trans = __('Public'); |
| 128 | } |