# convertkit/3.4.3/admin/class-convertkit-admin-landing-page.php

Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages, version 3.4.3. 79 lines.

- Page: https://pluginprobe.com/plugins/convertkit/3.4.3/code/admin/class-convertkit-admin-landing-page.php
- Raw: https://pluginprobe.com/plugins/convertkit/3.4.3/raw/admin/class-convertkit-admin-landing-page.php
- Modified: 2026-08-19T12:06:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/convertkit/3.4.3/code/admin/class-convertkit-admin-landing-page.php#L10-L20`.

```php
<?php
/**
 * ConvertKit Admin Landing Page class.
 *
 * @package ConvertKit
 * @author ConvertKit
 */

/**
 * Modifies the Pages WP_List_Table to provide:
 * - an 'Add New Landing Page' button next to the 'Add New' button
 *
 * @package ConvertKit
 * @author ConvertKit
 */
class ConvertKit_Admin_Landing_Page {

	/**
	 * Registers action and filter hooks.
	 *
	 * @since   2.5.5
	 */
	public function __construct() {

		// Add New Landing Page Wizard button to Pages.
		add_filter( 'convertkit_admin_post_register_add_new_buttons', array( $this, 'register_add_new_button' ), 10, 2 );

	}

	/**
	 * Registers a button in the Pages WP_List_Table linking to the the Landing Page Setup Wizard.
	 *
	 * @since   2.5.5
	 *
	 * @param   array  $buttons    Buttons.
	 * @param   string $post_type  Post Type.
	 * @return  array               Views
	 */
	public function register_add_new_button( $buttons, $post_type ) {

		// If no API credentials have been set, don't output the button.
		$settings = new ConvertKit_Settings();
		if ( ! $settings->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;

	}

}

```
