has_access_and_refresh_token() ) { return $buttons; } // If the Add New Landing Page / Member Content button is disabled, don't output the button. if ( $settings->add_new_button_disabled() ) { return $buttons; } // Bail if the Post Type isn't supported. if ( $post_type !== 'page' ) { return $buttons; } // Don't show the button if the user cannot create and publish Pages. if ( ! convertkit_user_can_create_published_post_type( $post_type ) ) { return $buttons; } // Register button. $buttons['convertkit_landing_page_setup'] = array( 'url' => add_query_arg( array( 'page' => 'convertkit-landing-page-setup', 'ck_post_type' => $post_type, ), admin_url( 'options.php' ) ), 'label' => __( 'Landing Page', 'convertkit' ), ); return $buttons; } }