We\'d love to hear it. Also, you can create your own templates!', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
'target' => array(),
'rel' => array(),
),
)
),
'https://wpforms.com/form-template-suggestion/',
'https://wpforms.com/docs/how-to-create-a-custom-form-template/'
);
?>
';
}
/**
* Output the panel's sidebar if we have one.
*
* @since 1.0.0
*/
public function panel_sidebar() {
}
/**
* Output panel sidebar sections.
*
* @since 1.0.0
*
* @param string $name
* @param string $slug
* @param string $icon
*/
public function panel_sidebar_section( $name, $slug, $icon = '' ) {
$class = '';
$class .= $slug === 'default' ? ' default' : '';
$class .= ! empty( $icon ) ? ' icon' : '';
echo '';
if ( ! empty( $icon ) ) {
echo '';
}
echo esc_html( $name );
echo '';
echo '';
}
/**
* Output the panel's primary content.
*
* @since 1.0.0
*/
public function panel_content() {
}
}
PK |,\v5 5 panels/class-fields.phpnu W+A name = esc_html__( 'Fields', 'wpforms-lite' );
$this->slug = 'fields';
$this->icon = 'fa-list-alt';
$this->order = 10;
$this->sidebar = true;
if ( $this->form ) {
add_action( 'wpforms_builder_fields', array( $this, 'fields' ) );
add_action( 'wpforms_builder_fields_options', array( $this, 'fields_options' ) );
add_action( 'wpforms_builder_preview', array( $this, 'preview' ) );
// Template for form builder previews.
add_action( 'wpforms_builder_print_footer_scripts', array( $this, 'field_preview_templates' ) );
}
}
/**
* Enqueue assets for the Fields panel.
*
* @since 1.0.0
*/
public function enqueues() {
// CSS.
wp_enqueue_style(
'wpforms-builder-fields',
WPFORMS_PLUGIN_URL . 'assets/css/admin-builder-fields.css',
null,
WPFORMS_VERSION
);
}
/**
* Output the Field panel sidebar.
*
* @since 1.0.0
*/
public function panel_sidebar() {
// Sidebar contents are not valid unless we have a form.
if ( ! $this->form ) {
return;
}
?>
form ); ?>
form ); ?>
form ) {
echo '
';
echo wp_kses(
__( 'You need to setup your form before you can manage the fields.', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
'class' => array(),
'data-panel' => array(),
),
)
);
echo '
';
}
}
/**
* No fields options markup.
*
* @since 1.6.0
*/
public function no_fields_options() {
printf(
'
%s
',
esc_html__( 'You don\'t have any fields yet.', 'wpforms-lite' )
);
}
/**
* No fields preview placeholder markup.
*
* @since 1.6.0
*/
public function no_fields_preview() {
printf(
'
%s
',
esc_html__( 'You don\'t have any fields yet. Add some!', 'wpforms-lite' )
);
}
/**
* Sort Add Field buttons by order provided.
*
* @since 1.0.0
*
* @param array $a
* @param array $b
*
* @return array
*/
public function field_order( $a, $b ) {
return $a['order'] - $b['order'];
}
/**
* Template for form builder preview.
*
* @since 1.4.5
*/
public function field_preview_templates() {
// Checkbox, Radio, and Payment Multiple/Checkbox field choices.
?>
name = esc_html__( 'Payments', 'wpforms-lite' );
$this->slug = 'payments';
$this->icon = 'fa-usd';
$this->order = 10;
$this->sidebar = true;
}
/**
* Output the Payments panel sidebar.
*
* @since 1.0.0
*/
public function panel_sidebar() {
// Sidebar contents are not valid unless we have a form.
if ( ! $this->form ) {
return;
}
$this->panel_sidebar_section( esc_html__( 'Default', 'wpforms-lite' ), 'default' );
do_action( 'wpforms_payments_panel_sidebar', $this->form );
}
/**
* Output the Payments panel primary content.
*
* @since 1.0.0
*/
public function panel_content() {
// An array of all the active provider addons.
$payments_active = apply_filters( 'wpforms_payments_available', array() );
if ( ! $this->form ) {
// Check if there is a form created. When no form has been created
// yet let the user know we need a form to setup a payment.
echo '
';
echo wp_kses(
__( 'You need to setup your form before you can manage these settings.', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
'class' => array(),
'data-panel' => array(),
),
)
);
echo '
';
return;
}
if ( ! wpforms()->pro ) {
// WPForms Lite users.
echo '
';
echo '
Payment integrations are not available on your plan.
';
echo '
Please upgrade to PRO to unlock all the payment integrations and more awesome features.
';
} elseif ( empty( $payments_active ) ) {
// Check for active payment addons. When no payment addons are
// activated let the user know they need to install/activate an
// addon to setup a payment.
echo '
' .
sprintf(
wp_kses(
/* translators: %s - Addons page URL. */
__( 'It seems you do not have any payment addons activated. You can head over to the Addons page to install and activate the addon for your payment service.', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
),
)
),
esc_url( admin_url( 'admin.php?page=wpforms-addons' ) )
) .
'
';
echo '
';
} else {
// Everything is good - display default instructions.
echo '
' . esc_html__( 'Select your payment provider from the options on the left. If you don\'t see your payment service listed, then let us know and we\'ll do our best to get it added as fast as possible.', 'wpforms-lite' ) . '
';
echo '
';
}
do_action( 'wpforms_payments_panel_content', $this->form );
}
}
new WPForms_Builder_Panel_Payments();
PK |,\;Fh h panels/class-settings.phpnu W+A name = esc_html__( 'Settings', 'wpforms-lite' );
$this->slug = 'settings';
$this->icon = 'fa-sliders';
$this->order = 10;
$this->sidebar = true;
}
/**
* Output the Settings panel sidebar.
*
* @since 1.0.0
*/
public function panel_sidebar() {
// Sidebar contents are not valid unless we have a form.
if ( ! $this->form ) {
return;
}
$sections = array(
'general' => esc_html__( 'General', 'wpforms-lite' ),
'notifications' => esc_html__( 'Notifications', 'wpforms-lite' ),
'confirmation' => esc_html__( 'Confirmations', 'wpforms-lite' ),
);
$sections = apply_filters( 'wpforms_builder_settings_sections', $sections, $this->form_data );
foreach ( $sections as $slug => $section ) {
$this->panel_sidebar_section( $section, $slug );
}
}
/**
* Output the Settings panel primary content.
*
* @since 1.0.0
*/
public function panel_content() {
// Check if there is a form created.
if ( ! $this->form ) {
echo '
';
echo wp_kses(
__( 'You need to setup your form before you can manage the settings.', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
'class' => array(),
'data-panel' => array(),
),
)
);
echo '
';
/*
* Custom panels can be added below.
*/
do_action( 'wpforms_form_settings_panel_content', $this );
}
}
new WPForms_Builder_Panel_Settings();
PK |,\tސ panels/class-providers.phpnu W+A name = esc_html__( 'Marketing', 'wpforms-lite' );
$this->slug = 'providers';
$this->icon = 'fa-bullhorn';
$this->order = 10;
$this->sidebar = true;
}
/**
* Enqueue assets for the Providers panel.
*
* @since 1.0.0
*/
public function enqueues() {
wp_enqueue_style(
'wpforms-builder-providers',
WPFORMS_PLUGIN_URL . 'assets/css/admin-builder-providers.css',
null,
WPFORMS_VERSION
);
wp_enqueue_script(
'wpforms-builder-providers',
WPFORMS_PLUGIN_URL . 'assets/js/admin-builder-providers.js',
array( 'jquery' ),
WPFORMS_VERSION,
false
);
wp_localize_script(
'wpforms-builder-providers',
'wpforms_builder_providers',
array(
'url' => esc_url( add_query_arg( array( 'view' => 'providers' ) ) ),
'confirm_save' => esc_html__( 'We need to save your progress to continue to the Marketing panel. Is that OK?', 'wpforms-lite' ),
'confirm_connection' => esc_html__( 'Are you sure you want to delete this connection?', 'wpforms-lite' ),
'prompt_connection' => esc_html__( 'Enter a %type% nickname', 'wpforms-lite' ),
'prompt_placeholder' => esc_html__( 'Eg: Newsletter Optin', 'wpforms-lite' ),
'error_name' => esc_html__( 'You must provide a connection nickname.', 'wpforms-lite' ),
'required_field' => esc_html__( 'Field required', 'wpforms-lite' ),
)
);
}
/**
* Output the Provider panel sidebar.
*
* @since 1.0.0
*/
public function panel_sidebar() {
// Sidebar contents are not valid unless we have a form.
if ( ! $this->form ) {
return;
}
$this->panel_sidebar_section( 'Default', 'default' );
do_action( 'wpforms_providers_panel_sidebar', $this->form );
}
/**
* Output the Provider panel primary content.
*
* @since 1.0.0
*/
public function panel_content() {
if ( ! $this->form ) {
// Check if there is a form created. When no form has been created
// yet let the user know we need a form to setup a provider.
echo '
';
echo wp_kses(
__( 'You need to setup your form before you can manage these settings.', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
'class' => array(),
'data-panel' => array(),
),
)
);
echo '
';
return;
}
// An array of all the active provider addons.
$providers_active = wpforms_get_providers_available();
if ( empty( $providers_active ) ) {
// Check for active provider addons. When no provider addons are
// activated let the user know they need to install/activate an
// addon to setup a provider.
echo '
' .
sprintf(
wp_kses(
/* translators: %s - plugin admin area Addons page. */
__( 'It seems you do not have any marketing addons activated. You can head over to the Addons page to install and activate the addon for your provider.', 'wpforms-lite' ),
array(
'a' => array(
'href' => array(),
),
)
),
esc_url( admin_url( 'admin.php?page=wpforms-addons' ) )
) .
'
';
echo '
';
} else {
// Everything is good - display default instructions.
echo '
' . esc_html__( 'Select your email marketing service provider or CRM from the options on the left. If you don\'t see your email marketing service listed, then let us know and we\'ll do our best to get it added as fast as possible.', 'wpforms-lite' ) . '
';
echo '
';
}
do_action( 'wpforms_providers_panel_content', $this->form );
}
}
new WPForms_Builder_Panel_Providers();
PK |,\ENNX NX class-builder.phpnu W+A PK |,\2,cx- x-
X functions.phpnu W+A PK |,\P8 D panels/class-setup.phpnu W+A PK |,\< { panels/class-base.phpnu W+A PK |,\v5 5 M panels/class-fields.phpnu W+A PK |,\eF1R R 2 panels/class-payments.phpnu W+A PK |,\;Fh h panels/class-settings.phpnu W+A PK |,\tސ ~ panels/class-providers.phpnu W+A PK