| @@ -250,8 +250,13 @@ | ||
| 250 | 250 | if ( ! in_array( $post_type, convertkit_get_supported_post_types(), true ) ) { |
| 251 | 251 | return $buttons; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | + // Don't show the button if the user cannot create and publish this Post Type. | |
| 255 | + if ( ! convertkit_user_can_create_published_post_type( $post_type ) ) { | |
| 256 | + return $buttons; | |
| 257 | + } | |
| 258 | + | |
| 254 | 259 | // Register button. |
| 255 | 260 | $buttons['convertkit_restrict_content_setup'] = array( |
| 256 | 261 | 'url' => add_query_arg( |
| 257 | 262 | array( |