Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions includes/blocks/class-convertkit-block-broadcasts.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ public function get_name() {

}

/**
* Returns this block's title.
*
* @since 3.1.1
*/
public function get_title() {

return __( 'Kit Broadcasts', 'convertkit' );

}

/**
* Returns this block's icon.
*
* @since 3.1.1
*/
public function get_icon() {

return 'resources/backend/images/block-icon-broadcasts.svg';

}

/**
* Returns this block's Title, Icon, Categories, Keywords and properties.
*
Expand All @@ -103,9 +125,9 @@ public function get_overview() {
$settings = new ConvertKit_Settings();

return array(
'title' => __( 'Kit Broadcasts', 'convertkit' ),
'title' => $this->get_title(),
'description' => __( 'Displays a list of your Kit broadcasts.', 'convertkit' ),
'icon' => 'resources/backend/images/block-icon-broadcasts.svg',
'icon' => $this->get_icon(),
'category' => 'convertkit',
'keywords' => array(
__( 'ConvertKit', 'convertkit' ),
Expand Down Expand Up @@ -272,11 +294,6 @@ public function get_supports() {
*/
public function get_fields() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

return array(
'display_grid' => array(
'label' => __( 'Display as grid', 'convertkit' ),
Expand Down Expand Up @@ -380,11 +397,6 @@ public function get_fields() {
*/
public function get_panels() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

return array(
'general' => array(
'label' => __( 'General', 'convertkit' ),
Expand Down
36 changes: 24 additions & 12 deletions includes/blocks/class-convertkit-block-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ public function get_name() {

}

/**
* Returns this block's title.
*
* @since 3.1.1
*/
public function get_title() {

return __( 'Kit Custom Content', 'convertkit' );

}

/**
* Returns this block's icon.
*
* @since 3.1.1
*/
public function get_icon() {

return 'resources/backend/images/block-icon-content.svg';

}

/**
* Returns this block's Title, Icon, Categories, Keywords and properties.
*
Expand All @@ -54,9 +76,9 @@ public function get_name() {
public function get_overview() {

return array(
'title' => __( 'Kit Custom Content', 'convertkit' ),
'title' => $this->get_title(),
'description' => __( 'Displays Kit Custom Content for a subscriber if their tag matches the Page\'s tag.', 'convertkit' ),
'icon' => 'resources/backend/images/block-icon-content.svg',
'icon' => $this->get_icon(),
'category' => 'convertkit',
'keywords' => array(
__( 'ConvertKit', 'convertkit' ),
Expand Down Expand Up @@ -104,11 +126,6 @@ public function get_attributes() {
*/
public function get_fields() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

// Get ConvertKit Tags.
$tags = array();
$convertkit_tags = new ConvertKit_Resource_Tags();
Expand Down Expand Up @@ -137,11 +154,6 @@ public function get_fields() {
*/
public function get_panels() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

return array(
'general' => array(
'label' => __( 'General', 'convertkit' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ public function get_name() {

}

/**
* Returns this block's title.
*
* @since 3.1.1
*/
public function get_title() {

return __( 'Kit Form Builder: Custom Field', 'convertkit' );

}

/**
* Returns this block's icon.
*
* @since 3.1.1
*/
public function get_icon() {

return 'resources/backend/images/block-icon-form-builder-field-custom.svg';

}

/**
* Returns this block's Title, Icon, Categories, Keywords and properties.
*
Expand All @@ -41,9 +63,9 @@ public function get_name() {
public function get_overview() {

return array(
'title' => __( 'Kit Form Builder: Custom Field', 'convertkit' ),
'title' => $this->get_title(),
'description' => __( 'Adds a text field to the Kit Form Builder, whose value is stored in a Kit custom field.', 'convertkit' ),
'icon' => 'resources/backend/images/block-icon-form-builder-field-custom.svg',
'icon' => $this->get_icon(),
'category' => 'convertkit',
'keywords' => array(
__( 'ConvertKit', 'convertkit' ),
Expand Down Expand Up @@ -101,11 +123,6 @@ public function get_attributes() {
*/
public function get_fields() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

// Get Kit Custom Fields.
$custom_fields = new ConvertKit_Resource_Custom_Fields( 'block_form_builder' );
$values = array();
Expand Down Expand Up @@ -150,11 +167,6 @@ public function get_fields() {
*/
public function get_panels() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

// Get Panels from parent class.
$panels = parent::get_panels();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,28 @@ public function get_name() {

}

/**
* Returns this block's title.
*
* @since 3.1.1
*/
public function get_title() {

return __( 'Kit Form Builder: Email Field', 'convertkit' );

}

/**
* Returns this block's icon.
*
* @since 3.1.1
*/
public function get_icon() {

return 'resources/backend/images/block-icon-form-builder-field-email.svg';

}

/**
* Returns this block's Title, Icon, Categories, Keywords and properties.
*
Expand All @@ -68,9 +90,9 @@ public function get_name() {
public function get_overview() {

return array(
'title' => __( 'Kit Form Builder: Email Field', 'convertkit' ),
'title' => $this->get_title(),
'description' => __( 'Adds an email field to the Kit Form Builder.', 'convertkit' ),
'icon' => 'resources/backend/images/block-icon-form-builder-field-email.svg',
'icon' => $this->get_icon(),
'category' => 'convertkit',
'keywords' => array(
__( 'ConvertKit', 'convertkit' ),
Expand Down Expand Up @@ -120,11 +142,6 @@ public function get_attributes() {
*/
public function get_fields() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

// The `required` field is not used for this block,
// as we always require an email address.
$fields = parent::get_fields();
Expand Down
26 changes: 24 additions & 2 deletions includes/blocks/class-convertkit-block-form-builder-field-name.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ public function get_name() {

}

/**
* Returns this block's title.
*
* @since 3.1.1
*/
public function get_title() {

return __( 'Kit Form Builder: Name Field', 'convertkit' );

}

/**
* Returns this block's icon.
*
* @since 3.1.1
*/
public function get_icon() {

return 'resources/backend/images/block-icon-form-builder-field-name.svg';

}

/**
* Returns this block's Title, Icon, Categories, Keywords and properties.
*
Expand All @@ -59,9 +81,9 @@ public function get_name() {
public function get_overview() {

return array(
'title' => __( 'Kit Form Builder: Name Field', 'convertkit' ),
'title' => $this->get_title(),
'description' => __( 'Adds a name field to the Kit Form Builder.', 'convertkit' ),
'icon' => 'resources/backend/images/block-icon-form-builder-field-name.svg',
'icon' => $this->get_icon(),
'category' => 'convertkit',
'keywords' => array(
__( 'ConvertKit', 'convertkit' ),
Expand Down
32 changes: 22 additions & 10 deletions includes/blocks/class-convertkit-block-form-builder-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,28 @@ public function get_name() {

}

/**
* Returns this block's title.
*
* @since 3.1.1
*/
public function get_title() {

return __( 'Kit Form Builder: Field', 'convertkit' );

}

/**
* Returns this block's icon.
*
* @since 3.1.1
*/
public function get_icon() {

return 'resources/backend/images/block-icon-form-builder-field.svg';

}

/**
* Returns this block's Attributes
*
Expand Down Expand Up @@ -194,11 +216,6 @@ public function get_supports() {
*/
public function get_fields() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

return array(
'label' => array(
'label' => __( 'Label', 'convertkit' ),
Expand All @@ -223,11 +240,6 @@ public function get_fields() {
*/
public function get_panels() {

// Bail if the request is not for the WordPress Administration, frontend editor or REST API request.
if ( ! $this->is_admin_frontend_editor_or_rest_request() ) {
return false;
}

return array(
'general' => array(
'label' => __( 'General', 'convertkit' ),
Expand Down
Loading