| @@ -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 | |
| @@ -96,6 +98,36 @@ | ||
| 96 | 98 | * @return bool True whether the metabox is enabled. |
| 97 | 99 | */ |
| 98 | 100 | public static function has_metabox_enabled( $post_type ) { |
| 99 | 101 | return WPSEO_Options::get( 'display-metabox-pt-' . $post_type, false ); |
| 102 | + } | |
| 103 | + | |
| 104 | + /* ********************* DEPRECATED METHODS ********************* */ | |
| 105 | + | |
| 106 | + /** | |
| 107 | + * Removes the notification related to the post types which have been made public. | |
| 108 | + * | |
| 109 | + * @deprecated 20.10 | |
| 110 | + * @codeCoverageIgnore | |
| 111 | + * | |
| 112 | + * @return void | |
| 113 | + */ | |
| 114 | + public static function remove_post_types_made_public_notification() { | |
| 115 | + _deprecated_function( __METHOD__, 'Yoast SEO 20.10', 'Content_Type_Visibility_Dismiss_Notifications::dismiss_notifications' ); | |
| 116 | + $notification_center = Yoast_Notification_Center::get(); | |
| 117 | + $notification_center->remove_notification_by_id( 'post-types-made-public' ); | |
| 118 | + } | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * Removes the notification related to the taxonomies which have been made public. | |
| 122 | + * | |
| 123 | + * @deprecated 20.10 | |
| 124 | + * @codeCoverageIgnore | |
| 125 | + * | |
| 126 | + * @return void | |
| 127 | + */ | |
| 128 | + public static function remove_taxonomies_made_public_notification() { | |
| 129 | + _deprecated_function( __METHOD__, 'Yoast SEO 20.10', 'Content_Type_Visibility_Dismiss_Notifications::dismiss_notifications' ); | |
| 130 | + $notification_center = Yoast_Notification_Center::get(); | |
| 131 | + $notification_center->remove_notification_by_id( 'taxonomies-made-public' ); | |
| 100 | 132 | } |
| 101 | 133 | } |