diff --git a/src/wp-admin/includes/options.php b/src/wp-admin/includes/options.php index 5742e3ccc1ccc..e452f8bad1cd0 100644 --- a/src/wp-admin/includes/options.php +++ b/src/wp-admin/includes/options.php @@ -115,13 +115,13 @@ function options_reading_add_js() { 'blog_charset' ) ); } +/** + * this fillter overrides which post type are show in the dropdown + * + * @uses get_post_types + * + * @param array $args + * @return $args + * + */ +$post_types_allowed_on_home_page = apply_filters( 'post_types_allowed_on_home_page', array_keys( get_post_types( array( 'show_in_home_page_list' => true ) ) ) ); +$args = array( + 'post_type' => $post_types_allowed_on_home_page, + 'post_status' => 'publish', + 'fields' => 'ids' +); +$allowed_pages = new WP_Query( $args ); ?>

+ posts ) ) : ?> +

%s', + 'edit.php?post_type=' . $type, ucfirst( $type ) ); + } + printf( + /* translators: %s: URL to Pages screen. */ + __( 'No selectable pages found! Add/Publish at least one of these content types %s' ), + implode( ', ', $content_type_links ) + ); + ?> +

+

-