Version Description
- Custom CSS Adding option
Download this release
Release Info
Developer | voidthemes |
Plugin | Contact Form7 Widget For Elementor Page Builder |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- readme.txt +7 -4
- void-cf7-widget-elementor.php +66 -2
- widgets/void-section-cf7.php +130 -1
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: voidthemes
|
3 |
Tags: page-builder, elementor, cf7, contact-form-7, contact-form-7 widget, widget, elementor add on, email, contact,form
|
4 |
Requires at least: 4.4
|
5 |
-
Tested up to: 4.8
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -27,7 +27,8 @@ For updates follow us on : [Facebook](https://www.facebook.com/voidthemes).
|
|
27 |
|
28 |
What Does This plugin give you?
|
29 |
|
30 |
-
1. Easy use of contact forms created with Contact form 7 pluing inside elementor live editor
|
|
|
31 |
|
32 |
Note: This plugin is an addon of Elementor Page Builder (https://wordpress.org/plugins/elementor/) and will only work with Elementor Page Builder installed. And your elementor should be up to date to latest version
|
33 |
|
@@ -54,5 +55,7 @@ Our Contact Form7 Widget For Elementor Page Builder adds a new section in the el
|
|
54 |
|
55 |
|
56 |
== Changelog ==
|
57 |
-
= 1.0 =
|
|
|
|
|
58 |
* Initial Launch
|
2 |
Contributors: voidthemes
|
3 |
Tags: page-builder, elementor, cf7, contact-form-7, contact-form-7 widget, widget, elementor add on, email, contact,form
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 4.8.1
|
6 |
+
Stable tag: 1.0.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
27 |
|
28 |
What Does This plugin give you?
|
29 |
|
30 |
+
1. Easy use of contact forms created with Contact form 7 pluing inside elementor live editor
|
31 |
+
2. Add Css directly from elementor live preview to your contact form 7 for different field type!!
|
32 |
|
33 |
Note: This plugin is an addon of Elementor Page Builder (https://wordpress.org/plugins/elementor/) and will only work with Elementor Page Builder installed. And your elementor should be up to date to latest version
|
34 |
|
55 |
|
56 |
|
57 |
== Changelog ==
|
58 |
+
= 1.0.1 =
|
59 |
+
* Custom CSS Adding option
|
60 |
+
= 1.0.0 =
|
61 |
* Initial Launch
|
void-cf7-widget-elementor.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Contact Form 7 Widget For Elementor Page Builder
|
4 |
* Description: Adds Contact Form 7 widget element to Elementor page builder for easy drag & drop the created contact forms with CF7 (contact form 7).
|
5 |
-
* Version: 1.0.
|
6 |
* Author: VOID THEMES
|
7 |
* Plugin URI: http://voidthemes.com/contact-form-7-widget-for-elementor/
|
8 |
* Author URI: http://voidthemes.com
|
@@ -43,4 +43,68 @@ function void_cf7_widget_notice() { ?>
|
|
43 |
<?php endif; ?>
|
44 |
|
45 |
<?php }
|
46 |
-
add_action('admin_notices', 'void_cf7_widget_notice');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Plugin Name: Contact Form 7 Widget For Elementor Page Builder
|
4 |
* Description: Adds Contact Form 7 widget element to Elementor page builder for easy drag & drop the created contact forms with CF7 (contact form 7).
|
5 |
+
* Version: 1.0.1
|
6 |
* Author: VOID THEMES
|
7 |
* Plugin URI: http://voidthemes.com/contact-form-7-widget-for-elementor/
|
8 |
* Author URI: http://voidthemes.com
|
43 |
<?php endif; ?>
|
44 |
|
45 |
<?php }
|
46 |
+
add_action('admin_notices', 'void_cf7_widget_notice');
|
47 |
+
|
48 |
+
|
49 |
+
// add plugin activation time
|
50 |
+
|
51 |
+
function void_cf7_activation_time(){
|
52 |
+
$get_installation_time = strtotime("now");
|
53 |
+
add_option('void_cf7_elementor_activation_time', $get_installation_time );
|
54 |
+
}
|
55 |
+
register_activation_hook( __FILE__, 'void_cf7_activation_time' );
|
56 |
+
|
57 |
+
//check if review notice should be shown or not
|
58 |
+
|
59 |
+
function void_cf7_check_installation_time() {
|
60 |
+
|
61 |
+
$spare_me = get_option('void_cf7_spare_me');
|
62 |
+
if( !$spare_me ){
|
63 |
+
$install_date = get_option( 'void_cf7_elementor_activation_time' );
|
64 |
+
$past_date = strtotime( '-7 days' );
|
65 |
+
|
66 |
+
if ( $past_date >= $install_date ) {
|
67 |
+
|
68 |
+
add_action( 'admin_notices', 'void_cf7_display_admin_notice' );
|
69 |
+
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
add_action( 'admin_init', 'void_cf7_check_installation_time' );
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Display Admin Notice, asking for a review
|
77 |
+
**/
|
78 |
+
function void_cf7_display_admin_notice() {
|
79 |
+
// wordpress global variable
|
80 |
+
global $pagenow;
|
81 |
+
if( $pagenow == 'index.php' ){
|
82 |
+
|
83 |
+
$dont_disturb = esc_url( get_admin_url() . '?spare_me2=1' );
|
84 |
+
$plugin_info = get_plugin_data( __FILE__ , true, true );
|
85 |
+
$reviewurl = esc_url( 'https://wordpress.org/support/plugin/cf7-widget-elementor/reviews/#new-post' );
|
86 |
+
$void_url = esc_url( 'https://voidthemes.com' );
|
87 |
+
|
88 |
+
printf(__('<div class="void-cf7-review wrap">You have been using <b> %s </b> for a while. We hope you liked it ! Please give us a quick rating, it works as a boost for us to keep working on the plugin ! Also you can visit our <a href="%s" target="_blank">site</a> to get more themes & Plugins<div class="void-cf7-review-btn"><a href="%s" class="button button-primary" target=
|
89 |
+
"_blank">Rate Now!</a><a href="%s" class="void-cf7-review-done"> Already Done !</a></div></div>', $plugin_info['TextDomain']), $plugin_info['Name'], $void_url, $reviewurl, $dont_disturb );
|
90 |
+
}
|
91 |
+
}
|
92 |
+
// remove the notice for the user if review already done or if the user does not want to
|
93 |
+
function void_cf7_spare_me(){
|
94 |
+
if( isset( $_GET['spare_me2'] ) && !empty( $_GET['spare_me2'] ) ){
|
95 |
+
$spare_me = $_GET['spare_me2'];
|
96 |
+
if( $spare_me == 1 ){
|
97 |
+
add_option( 'void_cf7_spare_me' , TRUE );
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
add_action( 'admin_init', 'void_cf7_spare_me', 5 );
|
102 |
+
|
103 |
+
//add admin css
|
104 |
+
function void_cf7_admin_css(){
|
105 |
+
global $pagenow;
|
106 |
+
if( $pagenow == 'index.php' ){
|
107 |
+
wp_enqueue_style( 'void-cf7-admin', plugins_url( 'assets/css/void-cf7-admin.css', __FILE__ ) );
|
108 |
+
}
|
109 |
+
}
|
110 |
+
add_action( 'admin_enqueue_scripts', 'void_cf7_admin_css' );
|
widgets/void-section-cf7.php
CHANGED
@@ -58,6 +58,135 @@ protected function _register_controls() {
|
|
58 |
]
|
59 |
);
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
$this->end_controls_section();
|
62 |
}
|
63 |
|
@@ -65,7 +194,7 @@ protected function _register_controls() {
|
|
65 |
protected function render() { //to show on the fontend
|
66 |
$settings = $this->get_settings();
|
67 |
if(!empty($settings['cf7'])){
|
68 |
-
echo'<div class="elementor-shortcode">';
|
69 |
echo do_shortcode('[contact-form-7 id="'.$settings['cf7'].'"]');
|
70 |
echo '</div>';
|
71 |
}
|
58 |
]
|
59 |
);
|
60 |
|
61 |
+
$this->end_controls_section();
|
62 |
+
|
63 |
+
$this->start_controls_section(
|
64 |
+
'section_stype',
|
65 |
+
[
|
66 |
+
'label' => esc_html__( 'Style Contact Form', 'void' ), //section name for controler view
|
67 |
+
]
|
68 |
+
);
|
69 |
+
|
70 |
+
$this->add_control(
|
71 |
+
'cf7_direct_css',
|
72 |
+
[
|
73 |
+
'label' => __( 'Global CSS', 'elementor' ),
|
74 |
+
'type' => Controls_Manager::TEXTAREA,
|
75 |
+
'placeholder' => 'color:#000;',
|
76 |
+
'selectors' => [
|
77 |
+
'{{WRAPPER}} ' => '{{VALUE}}',
|
78 |
+
],
|
79 |
+
]
|
80 |
+
);
|
81 |
+
|
82 |
+
$this->add_control(
|
83 |
+
'alllabel',
|
84 |
+
[
|
85 |
+
'label' => __( 'All Label CSS', 'elementor' ),
|
86 |
+
'type' => Controls_Manager::TEXTAREA,
|
87 |
+
'placeholder' => 'color:#fff;',
|
88 |
+
'selectors' => [
|
89 |
+
'{{WRAPPER}} label' => '{{VALUE}}',
|
90 |
+
],
|
91 |
+
]
|
92 |
+
);
|
93 |
+
$this->add_control(
|
94 |
+
'allinput',
|
95 |
+
[
|
96 |
+
'label' => __( 'All Input CSS', 'elementor' ),
|
97 |
+
'type' => Controls_Manager::TEXTAREA,
|
98 |
+
'placeholder' => 'width:100%;
|
99 |
+
background:red;',
|
100 |
+
'selectors' => [
|
101 |
+
'{{WRAPPER}} input' => '{{VALUE}}',
|
102 |
+
],
|
103 |
+
]
|
104 |
+
);
|
105 |
+
|
106 |
+
$this->add_control(
|
107 |
+
'textinput',
|
108 |
+
[
|
109 |
+
'label' => __( 'Input Type Text CSS', 'elementor' ),
|
110 |
+
'type' => Controls_Manager::TEXTAREA,
|
111 |
+
'placeholder' => 'width:100%;
|
112 |
+
background:red;',
|
113 |
+
'selectors' => [
|
114 |
+
'{{WRAPPER}} .wpcf7-text' => '{{VALUE}}',
|
115 |
+
],
|
116 |
+
]
|
117 |
+
);
|
118 |
+
$this->add_control(
|
119 |
+
'textarea',
|
120 |
+
[
|
121 |
+
'label' => __( 'Textarea CSS', 'elementor' ),
|
122 |
+
'type' => Controls_Manager::TEXTAREA,
|
123 |
+
'placeholder' => 'height:100px;
|
124 |
+
width:100%;',
|
125 |
+
'selectors' => [
|
126 |
+
'{{WRAPPER}} textarea' => '{{VALUE}}',
|
127 |
+
],
|
128 |
+
]
|
129 |
+
);
|
130 |
+
|
131 |
+
$this->add_control(
|
132 |
+
'checkbox',
|
133 |
+
[
|
134 |
+
'label' => __( 'Checkbox/ Radio CSS', 'elementor' ),
|
135 |
+
'type' => Controls_Manager::TEXTAREA,
|
136 |
+
'placeholder' => 'display: block;',
|
137 |
+
'selectors' => [
|
138 |
+
'{{WRAPPER}} .wpcf7-list-item' => '{{VALUE}}',
|
139 |
+
],
|
140 |
+
]
|
141 |
+
);
|
142 |
+
|
143 |
+
$this->add_control(
|
144 |
+
'file',
|
145 |
+
[
|
146 |
+
'label' => __( 'File CSS', 'elementor' ),
|
147 |
+
'type' => Controls_Manager::TEXTAREA,
|
148 |
+
'placeholder' => 'display: block;',
|
149 |
+
'selectors' => [
|
150 |
+
'{{WRAPPER}} input[type="file"]' => '{{VALUE}}',
|
151 |
+
],
|
152 |
+
]
|
153 |
+
);
|
154 |
+
$this->add_control(
|
155 |
+
'date',
|
156 |
+
[
|
157 |
+
'label' => __( 'Date CSS', 'elementor' ),
|
158 |
+
'type' => Controls_Manager::TEXTAREA,
|
159 |
+
'placeholder' => 'display: block;',
|
160 |
+
'selectors' => [
|
161 |
+
'{{WRAPPER}} .wpcf7-date' => '{{VALUE}}',
|
162 |
+
],
|
163 |
+
]
|
164 |
+
);
|
165 |
+
$this->add_control(
|
166 |
+
'inputsubmit',
|
167 |
+
[
|
168 |
+
'label' => __( 'Submit Button CSS', 'elementor' ),
|
169 |
+
'type' => Controls_Manager::TEXTAREA,
|
170 |
+
'placeholder' => 'width:100%;
|
171 |
+
background:red;',
|
172 |
+
'selectors' => [
|
173 |
+
'{{WRAPPER}} input[type="submit"]' => '{{VALUE}}',
|
174 |
+
],
|
175 |
+
]
|
176 |
+
);
|
177 |
+
$this->add_control(
|
178 |
+
'responce',
|
179 |
+
[
|
180 |
+
'label' => __( 'Responce CSS', 'elementor' ),
|
181 |
+
'type' => Controls_Manager::TEXTAREA,
|
182 |
+
'placeholder' => 'color:red;',
|
183 |
+
'selectors' => [
|
184 |
+
'{{WRAPPER}} .wpcf7-response-output' => '{{VALUE}}',
|
185 |
+
],
|
186 |
+
]
|
187 |
+
);
|
188 |
+
|
189 |
+
|
190 |
$this->end_controls_section();
|
191 |
}
|
192 |
|
194 |
protected function render() { //to show on the fontend
|
195 |
$settings = $this->get_settings();
|
196 |
if(!empty($settings['cf7'])){
|
197 |
+
echo'<div class="elementor-shortcode void-cf7">';
|
198 |
echo do_shortcode('[contact-form-7 id="'.$settings['cf7'].'"]');
|
199 |
echo '</div>';
|
200 |
}
|