Skip to content

Commit

Permalink
Show internal CPTs if debug is turned on (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk authored Feb 27, 2025
1 parent a104005 commit b185821
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-mastodon-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function register_custom_post_types() {
'menu_name' => __( 'Mastodon Posts', 'enable-mastodon-apps' ),
),
'description' => __( 'Posted through a Mastodon app.', 'enable-mastodon-apps' ),
'public' => ! get_option( 'mastodon_api_posting_cpt' ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
'public' => ! get_option( 'mastodon_api_posting_cpt' ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || get_option( 'mastodon_api_enable_debug' ),
'show_in_rest' => false,
'rewrite' => false,
'menu_icon' => 'dashicons-megaphone',
Expand All @@ -206,7 +206,7 @@ public function register_custom_post_types() {
'menu_name' => __( 'EMA Announcements', 'enable-mastodon-apps' ),
),
'description' => __( 'Announcement by the Enable Mastodon Apps plugin.', 'enable-mastodon-apps' ),
'public' => defined( 'WP_DEBUG' ) && WP_DEBUG,
'public' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || get_option( 'mastodon_api_enable_debug' ),
'show_in_rest' => false,
'rewrite' => false,
'menu_icon' => 'dashicons-megaphone',
Expand Down

0 comments on commit b185821

Please sign in to comment.