PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.3
3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 All 196 releases
← All changes | admin/class-convertkit-admin-setup-wizard.php +34 -0 3.3.23.4.3 View file →
@@ -37,8 +37,17 @@
37 37 */
38 38 public $error = false;
39 39
40 40 /**
41 + * Holds the Post Type to generate.
42 + *
43 + * @since 3.3.9
44 + *
45 + * @var string
46 + */
47 + public $post_type = 'page';
48 +
49 + /**
41 50 * The required user capability to access the setup wizard.
42 51 *
43 52 * @since 1.9.8.4
44 53 *
@@ -503,8 +512,33 @@
503 512 return false;
504 513 }
505 514
506 515 return true;
516 +
517 + }
518 +
519 + /**
520 + * Sets the Post Type from the request, ensuring it is supported by the Plugin.
521 + *
522 + * @since 3.3.9
523 + */
524 + protected function set_post_type() {
525 +
526 + $this->post_type = ( filter_has_var( INPUT_GET, 'ck_post_type' ) ? filter_input( INPUT_GET, 'ck_post_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS ) : 'page' );
527 +
528 + if ( ! in_array( $this->post_type, convertkit_get_supported_post_types(), true ) ) {
529 + wp_die(
530 + sprintf(
531 + /* translators: Post Type */
532 + esc_html__( 'The post type `%s` is not supported for Member Content.', 'convertkit' ),
533 + esc_html( $this->post_type )
534 + ),
535 + esc_html__( 'WordPress Error', 'convertkit' ),
536 + array(
537 + 'back_link' => true,
538 + )
539 + );
540 + }
507 541
508 542 }
509 543
510 544 }