| @@ -50,9 +50,11 @@ | ||
| 50 | 50 | * |
| 51 | 51 | * @return array The filtered array. |
| 52 | 52 | */ |
| 53 | 53 | public static function filter_attachment_post_type( array $post_types ) { |
| 54 | - unset( $post_types['attachment'] ); | |
| 54 | + if ( WPSEO_Options::get( 'disable-attachment' ) === true ) { | |
| 55 | + unset( $post_types['attachment'] ); | |
| 56 | + } | |
| 55 | 57 | |
| 56 | 58 | return $post_types; |
| 57 | 59 | } |
| 58 | 60 | |