PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | inc/class-post-type.php +33 -1 18.228.5 View file →
@@ -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 }