Version Description
Release Date: February 5th, 2021
- [Security Fix] Removed the possibilty to add Manual CSS, because WordPress includes it's own, robust, error-checking, CSS editor in the Customizer already.
Download this release
Release Info
Developer | mlehelsz |
Plugin | Contact Form 7 Style |
Version | 3.2 |
Comparing to | |
See all releases |
Code changes from version 3.1.9 to 3.2
- cf7-style.php +4 -4
- inc/editor_page.php +116 -138
- inc/init_style.php +4 -0
- inc/system_status.php +0 -305
- misc/tracking.php +0 -149
- misc/welcome.php +0 -1
- readme.txt +14 -11
- screenshot-10.jpg +0 -0
- screenshot-6.jpg +0 -0
- screenshot-7.jpg +0 -0
- screenshot-8.jpg +0 -0
- screenshot-9.jpg +0 -0
cf7-style.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Contact Form 7 Style
|
4 |
-
Plugin URI:
|
5 |
Description: Simple style customization and templating for Contact Form 7 forms. Requires Contact Form 7 plugin installed.
|
6 |
-
Version: 3.
|
7 |
Author: Johnny, mlehelsz
|
8 |
-
Author URI:
|
9 |
License: GPL2
|
10 |
@Author: Johnny, mlehelsz
|
11 |
*/
|
@@ -20,7 +20,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
20 |
define( 'WPCF7S_PLUGIN', __FILE__ );
|
21 |
define( 'WPCF7S_PLUGIN_DIR', untrailingslashit( dirname( WPCF7S_PLUGIN ) ) );
|
22 |
define( 'WPCF7S_LOCATION',plugin_dir_url( WPCF7S_PLUGIN ) );
|
23 |
-
define( 'WPCF7S_PLUGIN_VER', '3.
|
24 |
define( 'WPCF7S_REQ_PLUGIN', 'contact-form-7/wp-contact-form-7.php' );
|
25 |
|
26 |
/*
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Contact Form 7 Style
|
4 |
+
Plugin URI: https://cf7style.com
|
5 |
Description: Simple style customization and templating for Contact Form 7 forms. Requires Contact Form 7 plugin installed.
|
6 |
+
Version: 3.2
|
7 |
Author: Johnny, mlehelsz
|
8 |
+
Author URI: https://cf7style.com
|
9 |
License: GPL2
|
10 |
@Author: Johnny, mlehelsz
|
11 |
*/
|
20 |
define( 'WPCF7S_PLUGIN', __FILE__ );
|
21 |
define( 'WPCF7S_PLUGIN_DIR', untrailingslashit( dirname( WPCF7S_PLUGIN ) ) );
|
22 |
define( 'WPCF7S_LOCATION',plugin_dir_url( WPCF7S_PLUGIN ) );
|
23 |
+
define( 'WPCF7S_PLUGIN_VER', '3.2' );
|
24 |
define( 'WPCF7S_REQ_PLUGIN', 'contact-form-7/wp-contact-form-7.php' );
|
25 |
|
26 |
/*
|
inc/editor_page.php
CHANGED
@@ -1,27 +1,20 @@
|
|
1 |
-
<?php
|
2 |
/*
|
3 |
* page to save global css
|
4 |
*/
|
5 |
|
6 |
-
if (
|
7 |
-
|
8 |
}
|
9 |
|
10 |
-
if (
|
11 |
add_action('admin_menu', 'cf7style_editor_page_init');
|
12 |
-
function cf7style_editor_page_init()
|
13 |
-
|
|
|
14 |
'edit.php?post_type=cf7_style',
|
15 |
-
__(
|
16 |
-
__(
|
17 |
-
'manage_options',
|
18 |
-
'cf7style-css-editor',
|
19 |
-
'cf7style_editor_page_view'
|
20 |
-
);
|
21 |
-
add_submenu_page(
|
22 |
-
'edit.php?post_type=cf7_style',
|
23 |
-
__( "Settings", "contact-form-7-style" ),
|
24 |
-
__( "Settings", "contact-form-7-style" ),
|
25 |
'manage_options',
|
26 |
'cf7style-settings',
|
27 |
'cf7style_settings_view'
|
@@ -29,178 +22,163 @@ if ( !function_exists( 'cf7style_editor_page_init' ) ) {
|
|
29 |
}
|
30 |
}
|
31 |
|
32 |
-
if (
|
33 |
-
function cf7style_settings_view()
|
|
|
34 |
<form method="POST" action="">
|
35 |
-
<?php
|
36 |
-
|
37 |
-
submit_button(
|
38 |
</form>
|
39 |
<?php }
|
40 |
}
|
41 |
-
|
42 |
-
if ( !function_exists( 'cf7style_editor_page_view' ) ) {
|
43 |
-
function cf7style_editor_page_view() {
|
44 |
-
do_settings_sections( 'cf7style-css-editor' );
|
45 |
-
}
|
46 |
-
}
|
47 |
$initiatenewoptions = new init_sections_register_fields();
|
48 |
|
49 |
-
class init_sections_register_fields
|
50 |
-
|
51 |
-
|
|
|
|
|
52 |
}
|
53 |
-
function cf7style_render_checkbox(
|
54 |
-
|
55 |
-
|
|
|
56 |
}
|
57 |
-
function cf7style_templates_structure
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
71 |
}
|
72 |
|
73 |
-
function cf7style_tooltip_structure(
|
|
|
74 |
$html = "";
|
75 |
$html .= '</tr>';
|
76 |
$html .= '<tr><td colspan="2">';
|
77 |
-
$option = get_option(
|
78 |
-
if(
|
79 |
-
update_option(
|
80 |
}
|
81 |
-
$html .= $this->cf7style_render_checkbox(
|
82 |
$html .= '</td></tr><tr><td colspan="2">';
|
83 |
return $html;
|
84 |
}
|
85 |
|
86 |
-
function cf7style_forcecss_structure(
|
|
|
87 |
$html = "";
|
88 |
$html .= '</tr>';
|
89 |
$html .= '<tr><td colspan="2">';
|
90 |
-
$option = get_option(
|
91 |
-
if(
|
92 |
-
update_option(
|
93 |
}
|
94 |
-
$html .= $this->cf7style_render_checkbox(
|
95 |
$html .= '</td></tr><tr><td colspan="2">';
|
96 |
return $html;
|
97 |
}
|
98 |
|
99 |
-
function cf7style_adminbar_structure(
|
|
|
100 |
$html = "";
|
101 |
$html .= '</tr>';
|
102 |
$html .= '<tr><td colspan="2">';
|
103 |
-
$option = get_option(
|
104 |
-
if(
|
105 |
-
update_option(
|
106 |
|
107 |
}
|
108 |
-
$html .= $this->cf7style_render_checkbox(
|
109 |
$html .= '</td></tr><tr><td colspan="2">';
|
110 |
return $html;
|
111 |
}
|
112 |
|
113 |
-
function register_new_fields()
|
114 |
-
|
115 |
-
|
116 |
-
__('Global CSS', 'contact-form-7-style'),
|
117 |
-
array( $this, 'description' ),
|
118 |
-
'cf7style-css-editor'
|
119 |
-
);
|
120 |
-
add_settings_section(
|
121 |
'cf7stylesettings',
|
122 |
__('Contact Form 7 Style Settings', 'contact-form-7-style'),
|
123 |
-
array(
|
124 |
'cf7style-settings'
|
125 |
);
|
126 |
-
|
127 |
'cf7_style_manual_style' => 'CSS',
|
128 |
-
)
|
129 |
|
130 |
-
$set_fields = array
|
131 |
-
'cf7_style_deleted' =>
|
132 |
-
'cf7_style_form_tooltip'
|
133 |
-
'cf7_style_forcecss'
|
134 |
-
'cf7_style_adminbar'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
);
|
136 |
-
|
137 |
-
|
138 |
-
$field,
|
139 |
-
$value,
|
140 |
-
array($this, 'setting_inputs'),
|
141 |
-
'cf7style-settings',
|
142 |
-
'cf7stylesettings',
|
143 |
-
array( $field )
|
144 |
-
);
|
145 |
-
register_setting( 'general', $field, 'esc_attr' );
|
146 |
-
}
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
}
|
160 |
|
161 |
-
function setting_inputs(
|
|
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
}
|
173 |
}
|
174 |
-
switch($args[0]) {
|
175 |
-
case 'cf7_style_deleted':
|
176 |
-
echo $this->cf7style_templates_structure( $args );
|
177 |
-
break;
|
178 |
-
case 'cf7_style_form_tooltip' :
|
179 |
-
echo $this->cf7style_tooltip_structure( $args );
|
180 |
-
break;
|
181 |
-
case 'cf7_style_forcecss' :
|
182 |
-
echo $this->cf7style_forcecss_structure( $args );
|
183 |
-
break;
|
184 |
-
case 'cf7_style_adminbar' :
|
185 |
-
echo $this->cf7style_adminbar_structure( $args );
|
186 |
-
break;
|
187 |
}
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
-
$option = stripslashes(get_option( $args[0] ));
|
195 |
|
196 |
-
echo '<form method="POST" action="">';
|
197 |
-
echo '<textarea id="'.$args[0].'" name="'.$args[0].'" />' . $option. '</textarea>';
|
198 |
-
submit_button( 'Save CSS', 'primary' );
|
199 |
-
echo '</form>';
|
200 |
-
}
|
201 |
-
function description() {
|
202 |
-
echo '<p>'.__('On this page You can add a custom CSS mark-up, especially rules which could not be loaded via the style customizer above.', 'contact-form-7-style').'</p>';
|
203 |
}
|
204 |
-
function settings_description()
|
|
|
205 |
}
|
206 |
}
|
1 |
+
<?php
|
2 |
/*
|
3 |
* page to save global css
|
4 |
*/
|
5 |
|
6 |
+
if (!defined('ABSPATH')) {
|
7 |
+
exit;
|
8 |
}
|
9 |
|
10 |
+
if (!function_exists('cf7style_editor_page_init')) {
|
11 |
add_action('admin_menu', 'cf7style_editor_page_init');
|
12 |
+
function cf7style_editor_page_init()
|
13 |
+
{
|
14 |
+
add_submenu_page(
|
15 |
'edit.php?post_type=cf7_style',
|
16 |
+
__("Settings", "contact-form-7-style"),
|
17 |
+
__("Settings", "contact-form-7-style"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
'manage_options',
|
19 |
'cf7style-settings',
|
20 |
'cf7style_settings_view'
|
22 |
}
|
23 |
}
|
24 |
|
25 |
+
if (!function_exists('cf7style_settings_view')) {
|
26 |
+
function cf7style_settings_view()
|
27 |
+
{?>
|
28 |
<form method="POST" action="">
|
29 |
+
<?php
|
30 |
+
do_settings_sections('cf7style-settings');
|
31 |
+
submit_button(__("Save Settings", "contact-form-7-style"), 'primary', 'cf7styletracking');?>
|
32 |
</form>
|
33 |
<?php }
|
34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
$initiatenewoptions = new init_sections_register_fields();
|
36 |
|
37 |
+
class init_sections_register_fields
|
38 |
+
{
|
39 |
+
public function __construct()
|
40 |
+
{
|
41 |
+
add_filter('admin_init', array($this, 'register_new_fields'));
|
42 |
}
|
43 |
+
public function cf7style_render_checkbox($option, $args, $description, $tulip)
|
44 |
+
{
|
45 |
+
$tulip = $tulip ? '<div class="cf7style-tooltip" title="more info"><i class="fa fa-question-circle" aria-hidden="true">?</i><div class="cf7style-tooltip-content">' . $tulip . '<div/></div>' : '';
|
46 |
+
return '<label><input type="checkbox" value="1" ' . checked(1, $option, false) . ' id="' . $args[0] . '[' . $args[0] . ']" name="' . $args[0] . '" />' . __($description, 'contact-form-7-style') . '</label>' . $tulip;
|
47 |
}
|
48 |
+
public function cf7style_templates_structure($args)
|
49 |
+
{
|
50 |
+
$html = "";
|
51 |
+
$html .= '</tr>';
|
52 |
+
$html .= '<tr><td colspan="2">';
|
53 |
+
$option = get_option($args[0]);
|
54 |
+
if ($option == '1') {
|
55 |
+
update_option('cf7_style_add_categories', 0);
|
56 |
+
}
|
57 |
+
if (isset($_POST['cf7styletracking'])) {
|
58 |
+
update_option('cf7_style_no_temps', 'show_box');
|
59 |
+
}
|
60 |
+
$html .= $this->cf7style_render_checkbox($option, $args, 'Install predefined templates', '<p>' . __("From here you will be able to import the Contact Form 7 Style predefined templates.", "contact-form-7-style") . '</p><p><small>' . __("This works only if the predefined templates are Deleted Permanently (they don't appear in", "contact-form-7-style") . ' <a href="' . admin_url('edit.php?post_status=trash&post_type=cf7_style') . '">' . __("Trash", "contact-form-7-style") . '</a> ).</small></p>');
|
61 |
+
$html .= '</td></tr><tr><td colspan="2">';
|
62 |
+
return $html;
|
63 |
}
|
64 |
|
65 |
+
public function cf7style_tooltip_structure($args)
|
66 |
+
{
|
67 |
$html = "";
|
68 |
$html .= '</tr>';
|
69 |
$html .= '<tr><td colspan="2">';
|
70 |
+
$option = get_option($args[0]);
|
71 |
+
if (isset($_POST['cf7_style_form_tooltip'])) {
|
72 |
+
update_option('cf7_style_form_tooltip', '1');
|
73 |
}
|
74 |
+
$html .= $this->cf7style_render_checkbox($option, $args, 'Show the frontend form edit button', '');
|
75 |
$html .= '</td></tr><tr><td colspan="2">';
|
76 |
return $html;
|
77 |
}
|
78 |
|
79 |
+
public function cf7style_forcecss_structure($args)
|
80 |
+
{
|
81 |
$html = "";
|
82 |
$html .= '</tr>';
|
83 |
$html .= '<tr><td colspan="2">';
|
84 |
+
$option = get_option($args[0]);
|
85 |
+
if (isset($_POST['cf7_style_forcecss'])) {
|
86 |
+
update_option('cf7_style_forcecss', '1');
|
87 |
}
|
88 |
+
$html .= $this->cf7style_render_checkbox($option, $args, 'Force CSS', '');
|
89 |
$html .= '</td></tr><tr><td colspan="2">';
|
90 |
return $html;
|
91 |
}
|
92 |
|
93 |
+
public function cf7style_adminbar_structure($args)
|
94 |
+
{
|
95 |
$html = "";
|
96 |
$html .= '</tr>';
|
97 |
$html .= '<tr><td colspan="2">';
|
98 |
+
$option = get_option($args[0]);
|
99 |
+
if (isset($_POST['cf7_style_adminbar'])) {
|
100 |
+
update_option('cf7_style_adminbar', '1');
|
101 |
|
102 |
}
|
103 |
+
$html .= $this->cf7style_render_checkbox($option, $args, 'Add Contact Form 7 Style in the adminbar', '');
|
104 |
$html .= '</td></tr><tr><td colspan="2">';
|
105 |
return $html;
|
106 |
}
|
107 |
|
108 |
+
public function register_new_fields()
|
109 |
+
{
|
110 |
+
add_settings_section(
|
|
|
|
|
|
|
|
|
|
|
111 |
'cf7stylesettings',
|
112 |
__('Contact Form 7 Style Settings', 'contact-form-7-style'),
|
113 |
+
array($this, 'settings_description'),
|
114 |
'cf7style-settings'
|
115 |
);
|
116 |
+
/*$fields = array(
|
117 |
'cf7_style_manual_style' => 'CSS',
|
118 |
+
);*/
|
119 |
|
120 |
+
$set_fields = array(
|
121 |
+
'cf7_style_deleted' => __('Import predefined Contact Form 7 Style templates', 'contact-form-7-style'),
|
122 |
+
'cf7_style_form_tooltip' => __('Display form edit tooltip on frontend?', 'contact-form-7-style'),
|
123 |
+
'cf7_style_forcecss' => __('Active theme overrides your form styling?', 'contact-form-7-style'),
|
124 |
+
'cf7_style_adminbar' => __('Display Contact Form 7 Style in admin bar?', 'contact-form-7-style'),
|
125 |
+
);
|
126 |
+
foreach ($set_fields as $field => $value) {
|
127 |
+
add_settings_field(
|
128 |
+
$field,
|
129 |
+
$value,
|
130 |
+
array($this, 'setting_inputs'),
|
131 |
+
'cf7style-settings',
|
132 |
+
'cf7stylesettings',
|
133 |
+
array($field)
|
134 |
);
|
135 |
+
register_setting('general', $field, 'esc_attr');
|
136 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
foreach ($fields as $field => $value) {
|
139 |
+
add_settings_field(
|
140 |
+
$field,
|
141 |
+
$value,
|
142 |
+
//array($this, 'text_inputs'),
|
143 |
+
//'cf7style-css-editor',
|
144 |
+
'cf7styleeditor',
|
145 |
+
array($field)
|
146 |
+
);
|
147 |
+
register_setting('general', $field, 'esc_attr');
|
148 |
+
}
|
149 |
}
|
150 |
|
151 |
+
public function setting_inputs($args)
|
152 |
+
{
|
153 |
|
154 |
+
if (isset($_POST[$args[0]])) {
|
155 |
+
update_option($args[0], 1);
|
156 |
+
echo "<script>location.reload();</script>";
|
157 |
+
} else {
|
158 |
+
if (isset($_POST['cf7styletracking'])) {
|
159 |
+
update_option($args[0], 0);
|
160 |
+
}
|
161 |
+
if (isset($_POST['cf7_style_form_tooltip'])) {
|
162 |
+
update_option($args[0], 0);
|
|
|
163 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
+
switch ($args[0]) {
|
166 |
+
case 'cf7_style_deleted':
|
167 |
+
echo $this->cf7style_templates_structure($args);
|
168 |
+
break;
|
169 |
+
case 'cf7_style_form_tooltip':
|
170 |
+
echo $this->cf7style_tooltip_structure($args);
|
171 |
+
break;
|
172 |
+
case 'cf7_style_forcecss':
|
173 |
+
echo $this->cf7style_forcecss_structure($args);
|
174 |
+
break;
|
175 |
+
case 'cf7_style_adminbar':
|
176 |
+
echo $this->cf7style_adminbar_structure($args);
|
177 |
+
break;
|
178 |
}
|
|
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
181 |
+
public function settings_description()
|
182 |
+
{
|
183 |
}
|
184 |
}
|
inc/init_style.php
CHANGED
@@ -201,6 +201,10 @@ function cf7style_load_elements(){
|
|
201 |
if($cf7s_manual_old_style){
|
202 |
update_option( 'cf7_style_manual_style', $cf7s_manual_old_style );
|
203 |
}
|
|
|
|
|
|
|
|
|
204 |
}
|
205 |
update_option( 'cf7_style_update_saved', 'no' );
|
206 |
}
|
201 |
if($cf7s_manual_old_style){
|
202 |
update_option( 'cf7_style_manual_style', $cf7s_manual_old_style );
|
203 |
}
|
204 |
+
/* when the most users will update their plugin to the 3.2 version - will release this one */
|
205 |
+
if( WPCF7S_PLUGIN_VER == '3.3'){
|
206 |
+
delete_option('cf7_style_manual_style');
|
207 |
+
}
|
208 |
}
|
209 |
update_option( 'cf7_style_update_saved', 'no' );
|
210 |
}
|
inc/system_status.php
DELETED
@@ -1,305 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CF7 Style System status
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( !defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
function cf7style_system_status() {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* let_to_num function.
|
14 |
-
*
|
15 |
-
* This function transforms the php.ini notation for numbers (like '2M') to an integer.
|
16 |
-
*
|
17 |
-
* @param $size
|
18 |
-
* @return int
|
19 |
-
*/
|
20 |
-
function cf7style_let_to_num( $size ) {
|
21 |
-
$l = substr( $size, -1 );
|
22 |
-
$ret = substr( $size, 0, -1 );
|
23 |
-
switch ( strtoupper( $l ) ) {
|
24 |
-
case 'P':
|
25 |
-
$ret *= 1024;
|
26 |
-
case 'T':
|
27 |
-
$ret *= 1024;
|
28 |
-
case 'G':
|
29 |
-
$ret *= 1024;
|
30 |
-
case 'M':
|
31 |
-
$ret *= 1024;
|
32 |
-
case 'K':
|
33 |
-
$ret *= 1024;
|
34 |
-
}
|
35 |
-
return $ret;
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
// Cache variables
|
40 |
-
$html = '';
|
41 |
-
$table = '';
|
42 |
-
$form = '';
|
43 |
-
$table_start = '<table class="wp-list-table widefat striped cf7style-status-table">';
|
44 |
-
$table_end = '</table><small> </small>';
|
45 |
-
|
46 |
-
$html .= '<div class="wrap">';
|
47 |
-
$html .= '<h2>' . __( "System Status", "contact-form-7-style" ) . '</h2>';
|
48 |
-
$html .= '<p>' . __( "The Contact Form 7 Style System Status is a tool for troubleshooting issues with your site.", "contact-form-7-style" ) . '</p>';
|
49 |
-
$html .= '<p>' . __( "With the informations gathered from you we can debug and analyze and try to offer you a fix.", "contact-form-7-style" ) . '</p>';
|
50 |
-
$html .= '<p>' . __( "The System Status is the best way for Contact Form 7 Style Support to help you!", "contact-form-7-style" ) . '</p>';
|
51 |
-
|
52 |
-
// Form
|
53 |
-
$form .= '<form class="cf7style-status-form">';
|
54 |
-
$form .= '<p><input type="text" name="cf7style-name" class="cf7style-name cf7style-input" placeholder="' . __( "Your name", "contact-form-7-style" ) .'" /></p>';
|
55 |
-
$form .= '<p><input type="email" name="cf7style-email" class="cf7style-email cf7style-input" placeholder="' . __( "Your email", "contact-form-7-style" ) .'" /></p>';
|
56 |
-
$form .= '<p><textarea name="cf7style-message" class="cf7style-message cf7style-input" placeholder="' . __( "Your message", "cf7style-message", "contact-form-7-style" ) . '"></textarea></p>';
|
57 |
-
$form .= '<button class="button cf7style-status-info">' . __( "Show the environment report", "contact-form-7-style" ) . '</button>';
|
58 |
-
|
59 |
-
// Debug - system status send button
|
60 |
-
//delete_transient( 'cf7style_system_report' );
|
61 |
-
|
62 |
-
$report_status = get_transient( 'cf7style_system_report' );
|
63 |
-
|
64 |
-
if( $report_status && 'sent' == $report_status ) {
|
65 |
-
$form .= '<button class="button-primary" disabled="disabled">' . __( "Report sent", "contact-form-7-style" ) . '</button>';
|
66 |
-
} else {
|
67 |
-
$form .= '<button class="button-primary cf7style-status-submit">' . __( "I think I have a CF7 Style issue. Send Report to CF7 Style Support team.", "contact-form-7-style" ) . '</button>';
|
68 |
-
}
|
69 |
-
|
70 |
-
$form .= '</form>';
|
71 |
-
|
72 |
-
$html .= $form;
|
73 |
-
|
74 |
-
// General
|
75 |
-
$table .= $table_start;
|
76 |
-
$table .= '<thead><tr><th colspan="2"><strong>' . __( "Your WordPress Setup", "contact-form-7-style" ) . '</strong></th></tr></thead>';
|
77 |
-
|
78 |
-
// Home URL
|
79 |
-
$table .= "<tr><td>" . __( 'Home URL:', 'contact-form-7-style' ) . "</td>";
|
80 |
-
$table .= "<td>" . home_url() . "</td></tr>";
|
81 |
-
|
82 |
-
// Site URL
|
83 |
-
$table .= "<tr><td>" . __( 'Site URL:', 'contact-form-7-style' ) . "</td>";
|
84 |
-
$table .= "<td>" . site_url() . "</td></tr>";
|
85 |
-
|
86 |
-
// CF7 Style Version
|
87 |
-
$table .= "<tr><td>" . __( 'Contact Form 7 Style Version:', 'contact-form-7-style' ) . "</td>";
|
88 |
-
$table .= "<td>" . WPCF7S_PLUGIN_VER . "</td></tr>";
|
89 |
-
|
90 |
-
// WP Version
|
91 |
-
$table .= "<tr><td>" . __( 'WP Version:', 'contact-form-7-style' ) . "</td>";
|
92 |
-
$table .= "<td>" . get_bloginfo( 'version' ) . "</td></tr>";
|
93 |
-
|
94 |
-
// WP Multisite
|
95 |
-
$table .= "<tr><td>" . __( 'WP Multisite:', 'contact-form-7-style' ) . "</td>";
|
96 |
-
$table .= "<td>" . ( ( is_multisite() ) ? "Yes" : "No" ) . "</td></tr>";
|
97 |
-
|
98 |
-
// WP Memory Limit
|
99 |
-
$memory = cf7style_let_to_num( WP_MEMORY_LIMIT );
|
100 |
-
$table .= "<tr><td>" . __( ' WP Memory Limit:', 'contact-form-7-style' ) . "</td>";
|
101 |
-
|
102 |
-
if ( $memory < 100663296 ) {
|
103 |
-
$table .= '<td><mark class="error">' . sprintf( __( '%s - Recommended memory at least 96MB. See: <a href="%s" target="_blank">Increasing memory allocated to PHP</a>', 'contact-form-7-style' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark></td></tr>';
|
104 |
-
} else {
|
105 |
-
$table .= '<td><mark class="yes">' . size_format( $memory ) . '</mark></td></tr>';
|
106 |
-
}
|
107 |
-
|
108 |
-
// WP Debug Mode
|
109 |
-
$table .= "<tr><td>" . __( 'WP Debug Mode:', 'contact-form-7-style' ) . "</td>";
|
110 |
-
$table .= "<td>" . ( ( WP_DEBUG ) ? "enabled" : "disabled" ) . "</td></tr>";
|
111 |
-
|
112 |
-
// Language
|
113 |
-
$table .= "<tr><td>" . __( 'Language:', 'contact-form-7-style' ) . "</td>";
|
114 |
-
$table .= "<td>" . get_locale() . "</td></tr>";
|
115 |
-
|
116 |
-
// Email address for feedback
|
117 |
-
$table .= "<tr><td>" . __( 'Site email address', 'contact-form-7-style' ) . "</td>";
|
118 |
-
$table .= "<td>" . get_option( 'admin_email' ) . "</td></tr>";
|
119 |
-
|
120 |
-
$table .= $table_end;
|
121 |
-
|
122 |
-
|
123 |
-
// Your Server Setup
|
124 |
-
$table .= $table_start;
|
125 |
-
$table .= '<thead><tr><th colspan="2"><strong>' . __( "Your Server Setup", "contact-form-7-style" ) . '</strong></th></tr></thead>';
|
126 |
-
|
127 |
-
// Server info
|
128 |
-
$table .= "<tr><td>" . __( 'Server info', 'contact-form-7-style' ) . "</td>";
|
129 |
-
$table .= "<td>" . esc_html( $_SERVER['SERVER_SOFTWARE'] ) . "</td></tr>";
|
130 |
-
|
131 |
-
// PHP version
|
132 |
-
$table .= "<tr><td>" . __( 'PHP Version', 'contact-form-7-style' ) . "</td>";
|
133 |
-
if ( function_exists( 'phpversion' ) ) :
|
134 |
-
|
135 |
-
$php_version = phpversion();
|
136 |
-
|
137 |
-
if ( version_compare( $php_version, '5.6', '<' ) ) {
|
138 |
-
$table .= '<td><mark class="error">' . sprintf( __( '%s - WordPress recommends a minimum PHP version of 5.6. See: %s', 'contact-form-7-style' ), esc_html( $php_version ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . __( 'WordPress Requirements', 'contact-form-7-style' ) . '</a>' ) . '</mark></td></tr>';
|
139 |
-
} else {
|
140 |
-
$table .= '<td><mark class="yes">' . esc_html( $php_version ) . '</mark></td></tr>';
|
141 |
-
}
|
142 |
-
else :
|
143 |
-
$table .= '<td>' . __( "Couldn't determine PHP version because phpversion() doesn't exist.", 'contact-form-7-style' ) . '</td></tr>';
|
144 |
-
endif;
|
145 |
-
|
146 |
-
if ( function_exists( 'ini_get' ) ) :
|
147 |
-
|
148 |
-
// PHP Post Max Size
|
149 |
-
$table .= "<tr><td>" . __( 'PHP Post Max Size:', 'contact-form-7-style' ) . "</td>";
|
150 |
-
$table .= "<td>" . size_format( cf7style_let_to_num( ini_get( 'post_max_size' ) ) ) . "</td></tr>";
|
151 |
-
|
152 |
-
endif;
|
153 |
-
|
154 |
-
// MySQL Version
|
155 |
-
|
156 |
-
/** @global wpdb $wpdb */
|
157 |
-
global $wpdb;
|
158 |
-
|
159 |
-
$table .= "<tr><td>" . __( 'MySQL Version:', 'contact-form-7-style' ) . "</td>";
|
160 |
-
$table .= "<td>" . $wpdb->db_version() . "</td></tr>";
|
161 |
-
|
162 |
-
// Max Upload Size
|
163 |
-
$table .= "<tr><td>" . __( 'Max Upload Size', 'contact-form-7-style' ) . "</td>";
|
164 |
-
$table .= "<td>" . size_format( wp_max_upload_size() ) . "</td></tr>";
|
165 |
-
|
166 |
-
// Default Timezone
|
167 |
-
$default_timezone = date_default_timezone_get();
|
168 |
-
|
169 |
-
$table .= "<tr><td>" . __( 'Default Timezone:', 'contact-form-7-style' ) . "</td>";
|
170 |
-
$table .= '<td>' . $default_timezone . '</td></tr>';
|
171 |
-
|
172 |
-
$table .= $table_end;
|
173 |
-
|
174 |
-
|
175 |
-
// Active Plugins
|
176 |
-
$active_plugins_count = count( (array) get_option( 'active_plugins' ) );
|
177 |
-
|
178 |
-
$table .= $table_start;
|
179 |
-
$table .= '<thead><tr><th colspan="2"><strong>' . __( "Active Plugins", "contact-form-7-style" ) . ' (' . $active_plugins_count . ')</strong></th></tr></thead>';
|
180 |
-
|
181 |
-
$active_plugins = (array) get_option( 'active_plugins', array() );
|
182 |
-
|
183 |
-
if ( is_multisite() ) {
|
184 |
-
$network_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
|
185 |
-
$active_plugins = array_merge( $active_plugins, $network_activated_plugins );
|
186 |
-
}
|
187 |
-
|
188 |
-
foreach ( $active_plugins as $plugin ) {
|
189 |
-
|
190 |
-
$plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
191 |
-
$dirname = dirname( $plugin );
|
192 |
-
$version_string = '';
|
193 |
-
$network_string = '';
|
194 |
-
|
195 |
-
if ( ! empty( $plugin_data['Name'] ) ) {
|
196 |
-
|
197 |
-
// Link the plugin name to the plugin url if available.
|
198 |
-
$plugin_name = esc_html( $plugin_data['Name'] );
|
199 |
-
|
200 |
-
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
201 |
-
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'contact-form-7-style' ) . '" target="_blank">' . $plugin_name . '</a>';
|
202 |
-
}
|
203 |
-
|
204 |
-
$table .= "<tr><td>" . $plugin_name. "</td>";
|
205 |
-
$table .= "<td>" . sprintf( _x( 'by %s', 'by author', 'contact-form-7-style' ), $plugin_data['Author'] ) . ' – ' . __( 'Version', 'contact-form-7-style' ) . ' ' . esc_html( $plugin_data['Version'] ) . $version_string . $network_string . "</td></tr>";
|
206 |
-
|
207 |
-
}
|
208 |
-
|
209 |
-
}
|
210 |
-
|
211 |
-
$table .= $table_end;
|
212 |
-
|
213 |
-
|
214 |
-
// Active Theme
|
215 |
-
$active_theme = wp_get_theme();
|
216 |
-
|
217 |
-
$table .= $table_start;
|
218 |
-
$table .= '<thead><tr><th colspan="2"><strong>' . __( "Theme", "contact-form-7-style" ) . '</strong></th></tr></thead>';
|
219 |
-
|
220 |
-
$table .= "<tr><td>" . __( 'Name:', 'contact-form-7-style' ) . "</td>";
|
221 |
-
$table .= "<td>" . $active_theme->Name . "</td></tr>";
|
222 |
-
|
223 |
-
$table .= "<tr><td>" . __( 'Version:', 'contact-form-7-style' ) . "</td>";
|
224 |
-
$table .= "<td>" . $active_theme->Version . "</td></tr>";
|
225 |
-
|
226 |
-
$table .= "<tr><td>" . __( 'Child Theme:', 'contact-form-7-style' ) . "</td>";
|
227 |
-
$table .= "<td>" . ( ( is_child_theme() ) ? 'Yes' : 'No' ) . "</td></tr>";
|
228 |
-
|
229 |
-
$table .= "<tr><td>" . __( 'Theme URL:', 'contact-form-7-style' ) . "</td>";
|
230 |
-
$table .= "<td>" . $active_theme->get( 'ThemeURI' ) . "</td></tr>";
|
231 |
-
|
232 |
-
$table .= $table_end;
|
233 |
-
|
234 |
-
$html .= $table;
|
235 |
-
$html .= '</div>';
|
236 |
-
|
237 |
-
echo $html;
|
238 |
-
}
|
239 |
-
|
240 |
-
add_action( 'admin_menu', 'cf7style_register_help_submenu_page' );
|
241 |
-
|
242 |
-
function cf7style_register_help_submenu_page() {
|
243 |
-
add_submenu_page(
|
244 |
-
'edit.php?post_type=cf7_style',
|
245 |
-
'System Status',
|
246 |
-
'System Status',
|
247 |
-
'manage_options',
|
248 |
-
'system-status',
|
249 |
-
'cf7style_system_status'
|
250 |
-
);
|
251 |
-
}
|
252 |
-
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Send status report
|
256 |
-
*/
|
257 |
-
|
258 |
-
function cf7_style_send_status_report() {
|
259 |
-
|
260 |
-
$name = sanitize_text_field( $_POST['name'] );
|
261 |
-
$email = sanitize_email( $_POST['email'] );
|
262 |
-
$message = sanitize_text_field( $_POST['message'] );
|
263 |
-
$site_name = get_bloginfo( 'name' );
|
264 |
-
|
265 |
-
$to = 'cf7style@gmail.com';
|
266 |
-
$subject = __( 'CF7 Style System Status', 'contact-form-7-style' ) . " - {$site_name}";
|
267 |
-
$body = wp_kses_post( $_POST['report'] );
|
268 |
-
$body .= "<table><tr><td>Name: " . $name . "</td></tr>";
|
269 |
-
$body .= "<tr><td>Email: " . $email . "</td></tr>";
|
270 |
-
$body .= "<tr><td>Message: " . $message . "</td></tr></table>";
|
271 |
-
$headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
272 |
-
|
273 |
-
$wp_mail = wp_mail( $to, $subject, $body, $headers );
|
274 |
-
|
275 |
-
// Auto-response
|
276 |
-
$auto_response = "<table><tr><td>" . __( 'Hey there', 'contact-form-7-style' ) . ",</td></tr><tr><td></td></tr>";
|
277 |
-
$auto_response .= "<tr><td>" . __( 'Thank you for using Contact Form 7 Style', 'contact-form-7-style' ) . ".</td></tr>";
|
278 |
-
$auto_response .= "<tr><td>" . __( 'One of our consultants will reply as soon as possible', 'contact-form-7-style' ) . ".</td></tr>";
|
279 |
-
$auto_response .= "<tr><td></td></tr><tr><td></td></tr>";
|
280 |
-
$auto_response .= "<tr style='font-size: 13px;'><td>" . __( 'Thank you!', 'contact-form-7-style' ) . "</td></tr>";
|
281 |
-
$auto_response .= "<tr style='font-size: 13px;'><td>" . __( 'Contact Form 7 Style Support Team', 'contact-form-7-style' ) . "</td></tr><tr><td></td></tr></table>";
|
282 |
-
|
283 |
-
$auto_response .= "<table style='font-size: 12px; color: #777;'>";
|
284 |
-
$auto_response .= "<tr><td></td></tr><tr><td></td></tr>";
|
285 |
-
$auto_response .= "<tr><td>" . __( 'If you like this plugin we hope that you will help support our continued development', 'contact-form-7-style' ) . ".</td></tr>";
|
286 |
-
$auto_response .= "<tr><td>" . __( 'The two best ways to offer your support is to', 'contact-form-7-style' ) . " <a href='http://cf7style.com/back-this-project/'>";
|
287 |
-
$auto_response .= __( 'send us a Donation', 'contact-form-7-style' ) . "</a>. ";
|
288 |
-
$auto_response .= __( 'Even $1 helps encourage us to do more', 'contact-form-7-style' ) . ".</td></tr>";
|
289 |
-
$auto_response .= "<tr><td>" . __( 'If you can’t donate, please help us reach our 5-star rating by', 'contact-form-7-style' );
|
290 |
-
$auto_response .= " <a href='https://wordpress.org/support/view/plugin-reviews/contact-form-7-style#postform'>" . __( 'rating this plugin', 'contact-form-7-style' ) . "</a>.";
|
291 |
-
$auto_response .= "</td></tr><tr><td></td></tr>";
|
292 |
-
$auto_response .= "<tr><td>" . __( 'All contributions will be gratefully acknowledged', 'contact-form-7-style' ) . "!</td></tr></table>";
|
293 |
-
|
294 |
-
$wp_mail2 = wp_mail( $email, $subject, $auto_response, $headers );
|
295 |
-
|
296 |
-
if( false === $wp_mail ) {
|
297 |
-
echo 'error';
|
298 |
-
} else {
|
299 |
-
set_transient( 'cf7style_system_report', 'sent', DAY_IN_SECONDS );
|
300 |
-
echo 'success';
|
301 |
-
}
|
302 |
-
|
303 |
-
wp_die();
|
304 |
-
}
|
305 |
-
add_action( 'wp_ajax_cf7_style_send_status_report', 'cf7_style_send_status_report' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
misc/tracking.php
DELETED
@@ -1,149 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* on deactivation, if tracking is on, it will send info to plugin authors that the plugin is no longer active
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( !defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
define( 'CF7_STYLE_PLUGIN_PATH', WP_PLUGIN_DIR . '/contact-form-7-style/' );
|
12 |
-
if ( !function_exists( 'cf7_style_announce_authors_about_deactivation' ) ) {
|
13 |
-
function cf7_style_announce_authors_about_deactivation () {
|
14 |
-
$allowedornot = get_option( 'cf7_style_allow_tracking' );
|
15 |
-
if( '1' == $allowedornot){
|
16 |
-
cf7style_send_tracking_info( $allowedornot, '1' );
|
17 |
-
}
|
18 |
-
|
19 |
-
}
|
20 |
-
register_deactivation_hook( CF7_STYLE_PLUGIN_PATH . 'cf7-style.php' , 'cf7_style_announce_authors_about_deactivation' );
|
21 |
-
}
|
22 |
-
/*
|
23 |
-
* on activation, if tracking is on, it will send info to plugin authors that the plugin is active.
|
24 |
-
*/
|
25 |
-
if ( !function_exists( 'cf7_style_announce_authors_about_activation' ) ) {
|
26 |
-
function cf7_style_announce_authors_about_activation () {
|
27 |
-
$allowedornot = get_option( 'cf7_style_allow_tracking' );
|
28 |
-
if( '1' == $allowedornot){
|
29 |
-
cf7style_send_tracking_info( $allowedornot, '1' );
|
30 |
-
}
|
31 |
-
}
|
32 |
-
register_activation_hook( CF7_STYLE_PLUGIN_PATH . 'cf7-style.php' , 'cf7_style_announce_authors_about_activation' );
|
33 |
-
}
|
34 |
-
/*
|
35 |
-
* enque pointer
|
36 |
-
*/
|
37 |
-
if ( !function_exists( 'cf7_style_tracking_enque_script' ) ) {
|
38 |
-
add_action( 'admin_enqueue_scripts', 'cf7_style_tracking_enque_script' );
|
39 |
-
function cf7_style_tracking_enque_script() {
|
40 |
-
$activeordismiss = get_option( 'cf7_style_allow_tracking' );
|
41 |
-
if ( $activeordismiss !== '0' && $activeordismiss !== '1' ) {
|
42 |
-
wp_enqueue_style( 'wp-pointer' );
|
43 |
-
wp_enqueue_script( 'wp-pointer' );
|
44 |
-
add_action( 'admin_print_footer_scripts', 'cf7_style_print_tooltip' );
|
45 |
-
}
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
/*
|
50 |
-
* prints the tooltip
|
51 |
-
*/
|
52 |
-
if ( !function_exists( 'cf7_style_print_tooltip' ) ) {
|
53 |
-
function cf7_style_print_tooltip() {
|
54 |
-
$pointer_content = '<h3>'.__( "Thank You for choosing<br/>Contact Form 7 Style!", "contact-form-7-style" ).'</h3>';
|
55 |
-
$pointer_content .= '<p>'.__( "Want to help make CF7 Style even more better? Allow Us to collect non-sensitive diagnostic data.", "contact-form-7-style" ).'</p>';
|
56 |
-
$pointer_content .= '<p>'.__( "We will only collect your website URL, WordPress version, CF7Style plugin version and active status.", "contact-form-7-style" ).'</p>';
|
57 |
-
$pointer_content .= '<p><label>'.__( "Allow collecting data:", "contact-form-7-style" ).'<input id="cf7_style_allow_tracking" type="checkbox" checked="checked" value="1" name="cf7_style_allow_tracking" /></label> </p>'; ?>
|
58 |
-
<script type="text/javascript">
|
59 |
-
//<![CDATA[
|
60 |
-
jQuery(document).ready( function($) {
|
61 |
-
$('.menu-icon-cf7_style').eq(0).pointer({
|
62 |
-
pointerClass: 'cf7style-pointer',
|
63 |
-
content: '<?php echo $pointer_content; ?>',
|
64 |
-
position: 'left',
|
65 |
-
close: function() {
|
66 |
-
$('.cf7style-pointer').hide();
|
67 |
-
return false;
|
68 |
-
}
|
69 |
-
}).pointer('open');
|
70 |
-
});
|
71 |
-
//]]>
|
72 |
-
</script>
|
73 |
-
<style type="text/css">
|
74 |
-
.cf7style-pointer .wp-pointer-arrow {
|
75 |
-
top: 20px;
|
76 |
-
left: -1px;
|
77 |
-
}
|
78 |
-
</style>
|
79 |
-
<?php
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
/*
|
84 |
-
* allow tracking set option
|
85 |
-
*/
|
86 |
-
if ( !function_exists( 'cf7_style_allow_tracking' ) ) {
|
87 |
-
function cf7_style_allow_tracking() {
|
88 |
-
if ( $_POST['action'] == 'cf7_style_allow_tracking' ) {
|
89 |
-
if ( !is_numeric( $_POST['cf7_style_allow_tracking'] ) ) {
|
90 |
-
die();
|
91 |
-
}
|
92 |
-
$allowedornot = $_POST['cf7_style_allow_tracking'];
|
93 |
-
if ( $allowedornot == '1' ) {
|
94 |
-
update_option( 'cf7_style_allow_tracking', '1' );
|
95 |
-
cf7style_send_tracking_info( $allowedornot, '1' );
|
96 |
-
}
|
97 |
-
die();
|
98 |
-
}
|
99 |
-
}
|
100 |
-
add_action( 'wp_ajax_cf7_style_allow_tracking', 'cf7_style_allow_tracking' );
|
101 |
-
}
|
102 |
-
if ( !function_exists( 'cf7_style_show_tracking' ) ) {
|
103 |
-
function cf7_style_show_tracking() {
|
104 |
-
if ( $_POST['action'] == 'cf7_style_show_tracking' ) {
|
105 |
-
if ( !is_numeric( $_POST['cf7_style_allow_tracking'] ) ) {
|
106 |
-
die();
|
107 |
-
}
|
108 |
-
$allowedornot = $_POST['cf7_style_allow_tracking'];
|
109 |
-
if ( $allowedornot == '0' ) {
|
110 |
-
update_option( 'cf7_style_allow_tracking', '0' );
|
111 |
-
}
|
112 |
-
die();
|
113 |
-
}
|
114 |
-
}
|
115 |
-
add_action( 'wp_ajax_cf7_style_show_tracking', 'cf7_style_show_tracking' );
|
116 |
-
}
|
117 |
-
|
118 |
-
|
119 |
-
/*
|
120 |
-
* send traciking info function
|
121 |
-
*/
|
122 |
-
if ( !function_exists( 'cf7style_send_tracking_info' ) ) {
|
123 |
-
function cf7style_send_tracking_info( $allowedornot, $activated ) {
|
124 |
-
$url = 'http://cf7style.com/tracking/index.php';
|
125 |
-
$plugin_folder = get_plugins( '/' . 'contact-form-7-style' );
|
126 |
-
$plugin_file = 'cf7-style.php';
|
127 |
-
$plugindata = $plugin_folder[$plugin_file]['Version'];
|
128 |
-
$multi = ( is_multisite() ? '1' : '0' );
|
129 |
-
$data = array (
|
130 |
-
'allowed' => $allowedornot,
|
131 |
-
'wpversion' => get_bloginfo('version'),
|
132 |
-
'styleversion' => $plugindata,
|
133 |
-
'siteurl' => site_url(),
|
134 |
-
'multisite' => $multi,
|
135 |
-
'activated' => $activated
|
136 |
-
);
|
137 |
-
if(function_exists('curl_version')){
|
138 |
-
$cf7curl = curl_init();
|
139 |
-
$Curl = $url.'?method=withstyle&data='.base64_encode(json_encode($data)).'&format=json';
|
140 |
-
$curlconfig = array (
|
141 |
-
CURLOPT_URL => $Curl,
|
142 |
-
CURLOPT_RETURNTRANSFER => true
|
143 |
-
);
|
144 |
-
curl_setopt_array( $cf7curl, $curlconfig );
|
145 |
-
$output = curl_exec($cf7curl);
|
146 |
-
curl_close($cf7curl);
|
147 |
-
}
|
148 |
-
}
|
149 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
misc/welcome.php
CHANGED
@@ -26,7 +26,6 @@ if ( !function_exists( 'cf7_style_show_welcome_panel' ) ) {
|
|
26 |
<li><h3><?php _e( "Get Started", "contact-form-7-style" ); ?></h3></li>
|
27 |
<li><a href="<?php echo admin_url('post-new.php?post_type=cf7_style'); ?>"><?php _e( "Creating you first custom template", "contact-form-7-style" ); ?></a></li>
|
28 |
<li><a href="<?php echo admin_url('edit.php?post_type=cf7_style'); ?>"><?php _e( "Using predefined templates", "contact-form-7-style" ); ?></a></li>
|
29 |
-
<li><a href="<?php echo admin_url('edit.php?post_type=cf7_style&page=cf7style-css-editor'); ?>"><?php _e( "Adding Extra CSS", "contact-form-7-style" ); ?></a></li>
|
30 |
</ul>
|
31 |
</td>
|
32 |
<td>
|
26 |
<li><h3><?php _e( "Get Started", "contact-form-7-style" ); ?></h3></li>
|
27 |
<li><a href="<?php echo admin_url('post-new.php?post_type=cf7_style'); ?>"><?php _e( "Creating you first custom template", "contact-form-7-style" ); ?></a></li>
|
28 |
<li><a href="<?php echo admin_url('edit.php?post_type=cf7_style'); ?>"><?php _e( "Using predefined templates", "contact-form-7-style" ); ?></a></li>
|
|
|
29 |
</ul>
|
30 |
</td>
|
31 |
<td>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: ionut.iclanzan, dorumarginean, mlehelsz, mircear
|
|
3 |
Donate link: http://cf7style.com/back-this-project/
|
4 |
Tags: contact form 7, contact form 7 style, contact form 7 templates, contact form 7 styling, CF7, CF7 style, styling contact form, styling contact form 7, multiple form styling, custom form styling, CF7 addon, customize, templates, valentine's day templates, Christmas templates, manual styling, live preview, hover state styling, CF7 form messages styling
|
5 |
Requires at least: 4.0.1
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 3.
|
8 |
Requires PHP: 5.6.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -64,11 +64,10 @@ You will find 'Contact Style' menu in your WordPress admin panel.
|
|
64 |
3. Template slider for quick setup of the form styling on the Contact Form 7 Settings Page.
|
65 |
4. Possibility to remove predefined templates only with 2 clicks.
|
66 |
5. Quick Edit on the Contact Style Settings Page, which allows Style Apply on various forms in a few seconds away.
|
67 |
-
6.
|
68 |
-
7.
|
69 |
-
8.
|
70 |
-
9.
|
71 |
-
10. Transparent background
|
72 |
|
73 |
== Frequently Asked Questions ==
|
74 |
|
@@ -76,6 +75,12 @@ Please check our FAQ page where you'll find answers to some of your questions on
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
= 3.1.9 =
|
80 |
|
81 |
Release Date: October 21th, 2020
|
@@ -287,8 +292,6 @@ Release Date: November 3rd, 2017
|
|
287 |
* First plugin version.
|
288 |
|
289 |
== Upgrade Notice ==
|
290 |
-
= Contact Form 7 Style Version 3.
|
291 |
|
292 |
-
* [Security Fix]
|
293 |
-
* [Minor Fix] Google Fonts List updated
|
294 |
-
* [Major Fix] Predefined templates loading issue
|
3 |
Donate link: http://cf7style.com/back-this-project/
|
4 |
Tags: contact form 7, contact form 7 style, contact form 7 templates, contact form 7 styling, CF7, CF7 style, styling contact form, styling contact form 7, multiple form styling, custom form styling, CF7 addon, customize, templates, valentine's day templates, Christmas templates, manual styling, live preview, hover state styling, CF7 form messages styling
|
5 |
Requires at least: 4.0.1
|
6 |
+
Tested up to: 5.6.1
|
7 |
+
Stable tag: 3.2
|
8 |
Requires PHP: 5.6.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
64 |
3. Template slider for quick setup of the form styling on the Contact Form 7 Settings Page.
|
65 |
4. Possibility to remove predefined templates only with 2 clicks.
|
66 |
5. Quick Edit on the Contact Style Settings Page, which allows Style Apply on various forms in a few seconds away.
|
67 |
+
6. Form Selector on the new Custom Style Setup Page.
|
68 |
+
7. Google Font Selector with all the Google Fonts included in one Dropdown with preview on the right side of the Dropdown.
|
69 |
+
8. Enable / disable forcing the CSS on the actual setup (it adds !important to every style property changed on the form)
|
70 |
+
9. Transparent background
|
|
|
71 |
|
72 |
== Frequently Asked Questions ==
|
73 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 3.2 =
|
79 |
+
|
80 |
+
Release Date: February 5th, 2021
|
81 |
+
|
82 |
+
* [Security Fix] Removed the possibilty to add Manual CSS, because WordPress includes it's own, robust, error-checking, CSS editor in the Customizer already.
|
83 |
+
|
84 |
= 3.1.9 =
|
85 |
|
86 |
Release Date: October 21th, 2020
|
292 |
* First plugin version.
|
293 |
|
294 |
== Upgrade Notice ==
|
295 |
+
= Contact Form 7 Style Version 3.2 =
|
296 |
|
297 |
+
* [Security Fix] Removed the possibilty to add Manual CSS, because WordPress includes it's own, robust, error-checking, CSS editor in the Customizer already.
|
|
|
|
screenshot-10.jpg
DELETED
Binary file
|
screenshot-6.jpg
CHANGED
Binary file
|
screenshot-7.jpg
CHANGED
Binary file
|
screenshot-8.jpg
CHANGED
Binary file
|
screenshot-9.jpg
CHANGED
Binary file
|