| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Lead Form Builder |
| 4 |
Description: Lead Form Builder Plugin is a contact form builder as well as lead generator. This contact form is compatible with all page builders like Elementor, Brizy, SiteOrigin, Gutenburg etc. Plugin comes with nearly all field options required to create Contact form, Registration form, News letter and contain Ajax based drag & drop field ordering. <a href="https://themehunk.com/plugins/" target="_blank">Get more plugins for your website on <strong>ThemeHunk</strong></a> |
| 5 |
Version: 2.1.2 |
| 6 |
Author: ThemeHunk |
| 7 |
Text Domain: lead-form-builder |
| 8 |
Author URI: http://www.themehunk.com/ |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 12 |
// Version constant for easy CSS refreshes |
| 13 |
|
| 14 |
if (!function_exists('lfb_plugin_action_links')){ |
| 15 |
|
| 16 |
define( 'LFB_VER', '2.1.2' ); |
| 17 |
define( 'LFB_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); |
| 18 |
define( 'LFB_BASE_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 19 |
|
| 20 |
include_once( plugin_dir_path( __FILE__ ) . 'inc/lfb-constant.php' ); |
| 21 |
include_once( plugin_dir_path( __FILE__ ) . 'inc/themehunk-menu/admin-menu.php' ); |
| 22 |
include_once( plugin_dir_path( __FILE__ ) . 'block/app.php' ); |
| 23 |
|
| 24 |
/** |
| 25 |
* Add the settings link to the Lead Form Plugin plugin row |
| 26 |
* |
| 27 |
* @param array $links - Links for the plugin |
| 28 |
* @return array - Links |
| 29 |
*/ |
| 30 |
function lfb_plugin_action_links($links){ |
| 31 |
$settings_page = add_query_arg(array('page' => 'wplf-plugin-menu'), admin_url('/admin.php?')); |
| 32 |
$settings_link = '<a href="'.esc_url($settings_page).'">'.__('Settings', 'lead-form-builder' ).'</a>'; |
| 33 |
array_unshift($links, $settings_link); |
| 34 |
return $links; |
| 35 |
} |
| 36 |
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'lfb_plugin_action_links', 10, 1); |
| 37 |
|
| 38 |
add_filter('plugin_row_meta', 'lfb_plugin_meta_links', 10, 2); |
| 39 |
|
| 40 |
|
| 41 |
/** |
| 42 |
* Add links to plugin's description in plugins table |
| 43 |
* |
| 44 |
* @param array $links Initial list of links. |
| 45 |
* @param string $file Basename of current plugin. |
| 46 |
* |
| 47 |
* @return array |
| 48 |
*/ |
| 49 |
if ( ! function_exists( 'lfb_plugin_meta_links' ) ){ |
| 50 |
|
| 51 |
function lfb_plugin_meta_links($links, $file){ |
| 52 |
|
| 53 |
if ($file !== plugin_basename(__FILE__)) { |
| 54 |
return $links; |
| 55 |
} |
| 56 |
|
| 57 |
$demo_link = '<a target="_blank" href="https://wpthemes.themehunk.com/lead-form-builder-pro/" title="' . __('Live Demo', 'lead-form-builder') . '"><span class="dashicons dashicons-laptop"></span>' . __('Live Demo', 'lead-form-builder') . '</a>'; |
| 58 |
|
| 59 |
$doc_link = '<a target="_blank" href="https://themehunk.com/docs/lead-form/" title="' . __('Documentation', 'lead-form-builder') . '"><span class="dashicons dashicons-search"></span>' . __('Documentation', 'lead-form-builder') . '</a>'; |
| 60 |
|
| 61 |
$support_link = '<a target="_blank" href="https://themehunk.com/contact-us/" title="' . __('Support', 'lead-form-builder') . '"><span class="dashicons dashicons-admin-users"></span>' . __('Support', 'lead-form-builder') . '</a>'; |
| 62 |
|
| 63 |
$pro_link = '<a target="_blank" href="https://themehunk.com/product/lead-form-builder-pro/" title="' . __('Premium Version', 'lead-form-builder') . '"><span class="dashicons dashicons-cart"></span>' . __('Premium Version', 'lead-form-builder') . '</a>'; |
| 64 |
|
| 65 |
$links[] = $demo_link; |
| 66 |
$links[] = $doc_link; |
| 67 |
$links[] = $support_link; |
| 68 |
$links[] = $pro_link; |
| 69 |
|
| 70 |
return $links; |
| 71 |
|
| 72 |
} // plugin_meta_links |
| 73 |
|
| 74 |
} |
| 75 |
|
| 76 |
|
| 77 |
include_once( plugin_dir_path(__FILE__) . 'inc/lf-db.php' ); |
| 78 |
|
| 79 |
register_activation_hook(__FILE__, 'lfb_plugin_activate'); |
| 80 |
if(!function_exists('lfb_include_file')) { |
| 81 |
function lfb_include_file(){ |
| 82 |
include_once( plugin_dir_path(__FILE__) . 'inc/inc.php' ); |
| 83 |
} |
| 84 |
add_action('init','lfb_include_file'); |
| 85 |
} |
| 86 |
include_once( plugin_dir_path(__FILE__) . 'inc/lfb-widget.php' ); |
| 87 |
include_once( plugin_dir_path(__FILE__) . 'elementor/lfb-addon-elementor.php' ); |
| 88 |
// show notify |
| 89 |
include_once( plugin_dir_path(__FILE__) . 'notify/notify.php' ); |
| 90 |
} |
| 91 |
|