Skip to content

Commit

Permalink
Add post_type support for all public & public-queryable post_types at…
Browse files Browse the repository at this point in the history
… once
  • Loading branch information
carstingaxion committed Feb 14, 2023
1 parent a42c69f commit 88fcc8c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions inc/sharing-image/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ function load_plugin() {
add_post_type_support( 'post', POST_TYPE_SUPPORT );
add_post_type_support( 'page', POST_TYPE_SUPPORT );

array_walk(
\get_post_types([
'_builtin' => false,
'public' => true,
'publicly_queryable' => true,
]),
function ($post_type_name) {
add_post_type_support( $post_type_name, POST_TYPE_SUPPORT );
}
);

require_once PLUGINPATH;

//////////////
Expand Down

0 comments on commit 88fcc8c

Please sign in to comment.