esc_html__( 'Form Entries', 'wpforms-lite' ),
'fields' => esc_html__( 'Form Fields', 'wpforms-lite' ),
'templates' => esc_html__( 'Form Templates', 'wpforms-lite' ),
'conditionals' => esc_html__( 'Smart Conditional Logic', 'wpforms-lite' ),
'marketing' => esc_html__( 'Marketing Integrations', 'wpforms-lite' ),
'payments' => esc_html__( 'Payment Forms', 'wpforms-lite' ),
'surveys' => esc_html__( 'Surveys & Polls', 'wpforms-lite' ),
'advanced' => esc_html__( 'Advanced Form Features', 'wpforms-lite' ),
'addons' => esc_html__( 'WPForms Addons', 'wpforms-lite' ),
'support' => esc_html__( 'Customer Support', 'wpforms-lite' ),
);
// Maybe load tools page.
add_action( 'admin_init', array( $this, 'init' ) );
}
/**
* Determining if the user is viewing the our page, if so, party on.
*
* @since 1.5.0
*/
public function init() {
// Check what page we are on.
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
// Only load if we are actually on the settings page.
if ( self::SLUG !== $page ) {
return;
}
add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
/*
* Define the core views for the our tab.
*/
$this->views = apply_filters(
'wpforms_admin_about_views',
array(
esc_html__( 'About Us', 'wpforms-lite' ) => array( 'about' ),
esc_html__( 'Getting Started', 'wpforms-lite' ) => array( 'getting-started' ),
)
);
$type = $this->get_license_type();
if (
! in_array( $type, self::$licenses_top, true ) || wpforms_debug()
) {
/* translators: $s - license type. */
$this->views[ sprintf( esc_html__( '%s vs Pro', 'wpforms-lite' ), ucfirst( $type ) ) ] = array( 'versus' );
}
// Determine the current active settings tab.
$this->view = ! empty( $_GET['view'] ) ? esc_html( $_GET['view'] ) : self::DEFAULT_TAB;
// If the user tries to load an invalid view fallback to About Us.
if (
! in_array( $this->view, call_user_func_array( 'array_merge', $this->views ), true ) &&
! has_action( 'wpforms_admin_about_display_tab_' . sanitize_key( $this->view ) )
) {
$this->view = self::DEFAULT_TAB;
}
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
// Hook for addons.
do_action( 'wpforms_admin_about_init' );
}
/**
* Enqueue assets for the the page.
*
* @since 1.5.0
*/
public function enqueues() {
wp_enqueue_script(
'jquery-matchheight',
WPFORMS_PLUGIN_URL . 'assets/js/jquery.matchHeight-min.js',
array( 'jquery' ),
'0.7.0',
false
);
}
/**
* Output the basic page structure.
*
* @since 1.5.0
*/
public function output() {
$show_nav = false;
foreach ( $this->views as $view ) {
if ( in_array( $this->view, (array) $view, true ) ) {
$show_nav = true;
break;
}
}
?>
get_am_plugins();
?>
get_license_type();
?>
get_license_type();
?>
array(
'icon' => WPFORMS_PLUGIN_URL . 'assets/images/about/plugin-mi.png',
'name' => esc_html__( 'MonsterInsights', 'wpforms-lite' ),
'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'wpforms-lite' ),
'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
'pro' => array(
'plug' => 'google-analytics-premium/googleanalytics-premium.php',
'icon' => WPFORMS_PLUGIN_URL . 'assets/images/about/plugin-mi.png',
'name' => esc_html__( 'MonsterInsights Pro', 'wpforms-lite' ),
'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'wpforms-lite' ),
'url' => 'https://www.monsterinsights.com/?utm_source=proplugin&utm_medium=pluginheader&utm_campaign=pluginurl&utm_content=7%2E0%2E0',
'act' => 'go-to-url',
),
),
'optinmonster/optin-monster-wp-api.php' => array(
'icon' => WPFORMS_PLUGIN_URL . 'assets/images/about/plugin-om.png',
'name' => esc_html__( 'OptinMonster', 'wpforms-lite' ),
'desc' => esc_html__( 'Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers.', 'wpforms-lite' ),
'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
),
'wp-mail-smtp/wp_mail_smtp.php' => array(
'icon' => WPFORMS_PLUGIN_URL . 'assets/images/about/plugin-smtp.png',
'name' => esc_html__( 'WP Mail SMTP', 'wpforms-lite' ),
'desc' => esc_html__( 'SMTP (Simple Mail Transfer Protocol) is an industry standard for sending emails. SMTP helps increase email deliverability by using proper authentication.', 'wpforms-lite' ),
'url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip',
),
);
return $data;
}
/**
* Get the array of data that compared the license data.
*
* @since 1.5.0
*
* @param string $feature Feature name.
* @param string $license License type to get data for.
*
* @return array|false
*/
protected function get_license_data( $feature, $license ) {
$data = array(
'entries' => array(
'lite' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Entries via Email Only', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Complete Entry Management inside WordPress', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Complete Entry Management inside WordPress', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Complete Entry Management inside WordPress', 'wpforms-lite' ) . '',
),
),
),
'fields' => array(
'lite' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Standard Fields Only', 'wpforms-lite' ) . '',
esc_html__( 'Name, Email, Single Line Text, Paragraph Text, Dropdown, Multiple Choice, Checkboxes, and Numbers', 'wpforms-lite' ),
),
),
'basic' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Access to all Standard and Fancy Fields', 'wpforms-lite' ) . '',
esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'wpforms-lite' ),
),
),
'plus' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Access to all Standard and Fancy Fields', 'wpforms-lite' ) . '',
esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'wpforms-lite' ),
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Access to all Standard and Fancy Fields', 'wpforms-lite' ) . '',
esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'wpforms-lite' ),
),
),
),
'conditionals' => array(
'lite' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not available', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'wpforms-lite' ) . '',
),
),
),
'templates' => array(
'lite' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Basic Form Templates', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Basic Form Templates', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Basic Form Templates', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'All Form Templates including Bonus 150+ pre-made form templates.', 'wpforms-lite' ) . '',
),
),
),
'marketing' => array(
'lite' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Limited Marketing Integration', 'wpforms-lite' ) . '',
esc_html__( 'Constant Contact only', 'wpforms-lite' ),
),
),
'basic' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Limited Marketing Integration', 'wpforms-lite' ) . '',
esc_html__( 'Constant Contact only', 'wpforms-lite' ),
),
),
'plus' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( '6 Email Marketing Integrations', 'wpforms-lite' ) . '',
esc_html__( 'Constant Contact, Mailchimp, AWeber, GetResponse, Campaign Monitor, and Drip', 'wpforms-lite' ),
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'All Marketing Integrations', 'wpforms-lite' ) . '',
esc_html__( 'Constant Contact, MailChimp, AWeber, GetResponse, Campaign Monitor, and Drip.', 'wpforms-lite' ),
'',
wp_kses(
__( 'Bonus: 500+ integrations with Zapier.', 'wpforms-lite' ),
array(
'strong' => array(),
)
),
),
),
),
'payments' => array(
'lite' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not Available', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not Available', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not Available', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Create Payment Forms', 'wpforms-lite' ) . '',
esc_html__( 'Accept payments using Stripe (credit card) and PayPal', 'wpforms-lite' ),
),
),
),
'surveys' => array(
'lite' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not Available', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not Available', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Not Available', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Create interactive Surveys and Polls with beautiful reports', 'wpforms-lite' ) . '',
),
),
),
'advanced' => array(
'lite' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'No Advanced Features', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Limited Advanced Features', 'wpforms-lite' ) . '',
esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'wpforms-lite' ),
),
),
'plus' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Limited Advanced Features', 'wpforms-lite' ) . '',
esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'wpforms-lite' ),
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'All Advanced Features', 'wpforms-lite' ) . '',
esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation, Custom CAPTCHA, Offline Forms, Signature Forms', 'wpforms-lite' ),
),
),
),
'addons' => array(
'lite' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'No Addons Included', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Custom Captcha Addon included', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Email Marketing Addons included', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'All Addons Included', 'wpforms-lite' ) . '',
esc_html__( 'Form Abandonment, Front-end Post Submission, User Registration, Geo-location, and more (17 total)', 'wpforms-lite' ),
),
),
),
'support' => array(
'lite' => array(
'status' => 'none',
'text' => array(
'' . esc_html__( 'Limited Support', 'wpforms-lite' ) . '',
),
),
'basic' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Standard Support', 'wpforms-lite' ) . '',
),
),
'plus' => array(
'status' => 'partial',
'text' => array(
'' . esc_html__( 'Standard Support', 'wpforms-lite' ) . '',
),
),
'pro' => array(
'status' => 'full',
'text' => array(
'' . esc_html__( 'Priority Support', 'wpforms-lite' ) . '',
),
),
),
);
// For debug purposes: copy pro data to ultimate and agency plans.
foreach ( self::$licenses_features as $slug => $name ) {
$data[ $slug ]['ultimate'] = $data[ $slug ]['pro'];
$data[ $slug ]['agency'] = $data[ $slug ]['pro'];
}
// Wrong feature?
if ( ! isset( $data[ $feature ] ) ) {
return false;
}
// Wrong license type?
if ( ! isset( $data[ $feature ][ $license ] ) ) {
return false;
}
return $data[ $feature ][ $license ];
}
/**
* Get the current installation license type (always lowercase).
*
* @since 1.5.0
*
* @return string
*/
protected function get_license_type() {
$type = wpforms_setting( 'type', '', 'wpforms_license' );
if ( empty( $type ) || ! wpforms()->pro ) {
$type = 'lite';
}
return strtolower( $type );
}
}
new WPForms_About();