Skip to content

Commit

Permalink
Added - Ai addon image
Browse files Browse the repository at this point in the history
  • Loading branch information
deepench committed Aug 30, 2023
1 parent 667b0df commit 9d6e2ac
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 5 deletions.
14 changes: 14 additions & 0 deletions assets/extensions-json/sections/all_extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"products": [
{
"title": "AI Contact Form",
"slug": "ai-contact-form",
"name": "AI Contact Form",
"image": "extensions-json/sections/images/ai.png",
"excerpt": "Add AI capabilities like interactive chatbox, AI generated email notifications, and more to your forms.",
"link": "https://everestforms.net/features/ai-contact-form/?utm_source=addons-page&utm_medium=banner&utm_campaign=evf-upgrade-to-pro&utm_content=ai-contact-form",
"plan": [
"personal",
"plus",
"professional",
"agency"
]
},
{
"title": "Style Customizer",
"slug": "everest-forms-style-customizer",
Expand Down
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Changelog ==

- 2.0.3 - 29-08-2023
- 2.0.3 - 30-08-2023
* Fix - Accepting numbers below 0 despite minimum limit of 0.
* Fix - Hide empty fields in the email.
* Enhancement - Option to load fonts locally.
Expand Down
60 changes: 58 additions & 2 deletions includes/admin/views/html-admin-page-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
<div class="wp-list-table widefat extension-install">
<h2 class="screen-reader-text"><?php esc_html_e( 'Add-ons list', 'everest-forms' ); ?></h2>
<div class="the-list">
<?php
$plan = evf_get_license_plan();
if ( false === $plan ) {
array_shift( $addons );
?>
<div class="plugin-card plugin-card-everest-forms-ai-contact-form">
<a href="<?php echo esc_url( 'https://everestforms.net/features/convertkit/?utm_source=addons-page&utm_medium=banner&utm_campaign=evf-upgrade-to-pro&utm_content=ai-contact-form' ); ?>">
<div class="plugin-card-top">
Expand All @@ -70,6 +75,19 @@
</div>
</a>
<div class="plugin-card-bottom">
<div class="status column-status">
<strong><?php esc_html_e( 'Status:', 'everest-forms' ); ?></strong>
<?php
$addon_slug = 'ai-contact-form';
if ( is_plugin_active( $addon_slug . '/' . $addon_slug . '.php' ) ) :
?>
<span class="status-label status-active"><?php esc_html_e( 'Activated', 'everest-forms' ); ?></span>
<?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon_slug . '/' . $addon_slug . '.php' ) ) : ?>
<span class="status-label status-inactive"><?php esc_html_e( 'Inactive', 'everest-forms' ); ?></span>
<?php else : ?>
<span class="status-label status-install-now"><?php esc_html_e( 'Not Installed', 'everest-forms' ); ?></span>
<?php endif; ?>
</div>
<div class="action-buttons upgrade-plan">
<?php
$repo_url = 'https://api.github.com/repos/wpeverest/ai-contact-form/releases/latest';
Expand All @@ -79,11 +97,49 @@
$latest_tag = isset( $release['tag_name'] ) ? esc_attr( $release['tag_name'] ) : '';
$download_url = "https://github.com/wpeverest/ai-contact-form/archive/{$latest_tag}.zip";
?>
<a class="button evf-download" href="<?php echo esc_url( $download_url ); ?>"><?php echo esc_html( 'Download' ); ?></a>
<?php if ( is_plugin_active( $addon_slug . '/' . $addon_slug . '.php' ) ) : ?>
<?php
$plugin_file = plugin_basename( $addon_slug . '/' . $addon_slug . '.php' );
$url = wp_nonce_url(
add_query_arg(
array(
'page' => 'evf-addons',
'action' => 'deactivate',
'plugin' => $plugin_file,
),
admin_url( 'admin.php' )
),
'deactivate-plugin_' . $plugin_file
);
?>
<a class="button button-secondary deactivate-now" href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Deactivate', 'everest-forms' ); ?></a>
<?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon_slug . '/' . $addon_slug . '.php' ) ) : ?>
<?php
$plugin_file = plugin_basename( $addon_slug . '/' . $addon_slug . '.php' );
$url = wp_nonce_url(
add_query_arg(
array(
'page' => 'evf-addons',
'action' => 'activate',
'plugin' => $plugin_file,
),
admin_url( 'admin.php' )
),
'activate-plugin_' . $plugin_file
);
?>
<a class="button button-primary activate-now" href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Activate', 'everest-forms' ); ?></a>
<?php else : ?>
<a href="<?php echo esc_url( $download_url ); ?>" class="button install-now"><?php esc_html_e( 'Download Addon', 'everest-forms' ); ?></a>
<?php endif; ?>
</div>
</div>
</div>
<?php foreach ( $addons as $addon ) : ?>
<?php } ?>
<?php
foreach ( $addons as $addon ) :
?>

<div class="plugin-card plugin-card-<?php echo esc_attr( $addon->slug ); ?>">
<a href="<?php echo esc_url( $addon->link ); ?>">
<div class="plugin-card-top">
Expand Down
2 changes: 1 addition & 1 deletion includes/fields/class-evf-field-ai.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function ai_type( $field ) {
'slug' => 'ai_type',
'value' => esc_html__( 'Field Type', 'everest-forms' ),
/* translators: %1$s - ai settings docs url */
'tooltip' => sprintf( esc_html__( 'Click on <> and map the field for your question <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.everestforms.net/docs/ai/#5-toc-title' ) ),
'tooltip' => esc_html__( 'Please select the field type.', 'everest-forms' ),
),
false
);
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ Yes you can! Join in on our [GitHub repository](https://github.com/wpeverest/eve

== Changelog ==

- 2.0.3 - 29-08-2023
- 2.0.3 - 30-08-2023
* Fix - Accepting numbers below 0 despite minimum limit of 0.
* Fix - Hide empty fields in the email.
* Enhancement - Option to load fonts locally.
Expand Down

0 comments on commit 9d6e2ac

Please sign in to comment.