Advanced Contact form 7 DB - Version 1.6.2

Version Description

  • We have fixed SQL injection related bugs at the back office query.
Download this release

Release Info

Developer vsourz1td
Plugin Icon 128x128 Advanced Contact form 7 DB
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

README.txt CHANGED
@@ -2,160 +2,166 @@
2
  Contributors: vsourz1td
3
  Tags: contact form 7 db, advanced cf7 db, contact form 7 database, contact form db, contact form 7, save form data, save contact form, save cf7, database, cf7db, save-contact-form, Save-Forms-Data, import-cf7, export-contact-data, view-cf7-entry
4
  Requires at least: 4.0
5
- Tested up to: 5.1.1
6
- Stable tag: 1.6.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Save all contact form 7 form submitted data to the database, View, Ordering, Change field labels and Import/Export data using CSV.
11
 
12
  == Description ==
13
- Plug and Play, No Confrontation is required after install and activated, you can see it in wp-admin.
14
 
15
- Each and every submission of Contact Form 7 is stored in the database and manage easily using the default WordPress interface. There is a nice drop-down to select the form and view all form data for that particular form. you can filter by searching keywords or select a date range.
16
-
17
- Attached files are stored in the /wp-content/uploads/advanced-cf7-upload directory and also download from wp-admin.
 
 
 
 
18
 
19
 
20
  = Features =
21
- * **Multisite compatible** to store individual site wise contact form data.
22
- * Save Contact Form 7 form submitted data to the database.
23
- * Easy to update/edit enquiry data.
24
- * Display **all** created contact form 7 form list.
25
- * Keyword search for all the entries of selected form.
26
- * **Date range filter** to filter specific date related entries easily.
27
- * **Export all**, or only searched, filtered results with selected fields.
28
- * Export data in **CSV**, **EXCEL** and **PDF** file.
29
- * Display attachment download link.
30
- * Given **advance pagination** on the listing screen so all the records are not loaded at once, to save resources.
31
- * Given go to page functionality within pagination so view specific page related entries.
32
- * **Enable or disable columns display**.
33
- * **Drag and drop** to reorder columns once the entries are stored.
34
- * Multiple select of records and selected records will be deleted or export in the sheet.
35
- * Facility to update each record.
36
- * Easy to update each field label name.
37
- * Easy to setup **import functionality.**
38
- * Facility to import form related entries from CSV file.
39
- * Provided filters for excluding particular contact form entry to CF7 DB.
40
- * Provided filter to add,modify,remove CF7 fields and data before submitting to CF7 DB.
41
- * You can display the contact form DB data to user by using shortcodes.
42
- * Generate shortcode using different parameters to display specific data only.
43
- * For more details checkout the plugin "Shortcode" screen.
44
 
45
  == Commercial Features ==
46
- **1. Advanced CF7 DB - GDPR compliant**
47
- Advanced CF7 DB – GDPR compliant plugin assists website and web-shop owners to comply with European privacy regulations known as GDPR. Advanced CF7 DB – GDPR compliant is an add-on of Advanced Cf7 DB, based on GDPR rules to Export or Erase user’s personal data stored with advanced cf7 DB. For more details you can check the below download link.
48
 
49
- You can download the plugin from <a target="_blank" href="https://codecanyon.net/item/advanced-cf7-db-gdpr-compliant/22386060">here</a>
50
 
51
- = Advanced CF7 DB - GDPR compliant Plugin Features =
52
- * Compatible with the latest WordPress version 4.9.6 and later for GDPR compliances. Meets with the new regulations for the data to be handled.
53
- * Individual CF7 form wise settings to show the personal data on user’s request.
54
- * Erase only the CF7 form personal data, that are required.
55
- * Site owners can export a ZIP file containing a user’s personal data, including data collected by Advanced CF7 DB plugin.
56
- * Site owners can erase a user’s personal data, including data collected by Advanced CF7 DB plugin.
 
57
 
58
  **2. Schedule Report**
59
- We have also introduced new feature "Schedule Report". This add-on is specially for businesses that require daily, weekly or monthly reports for the data that are stored at **Advanced Contact form 7 DB**. **Schedule Report For Advanced CF7 DB** plugin will do the same and send the email as per schedule set(Daily, Monthly, Weekly or Yearly) with report attachment.
 
 
 
 
60
 
61
- You can download the plugin from <a target="_blank" href="https://codecanyon.net/item/schedule-report-for-advanced-cf7-db/21560647?s_rank=8">here</a>
 
 
62
 
63
  = Schedule Report Plugin Features =
64
- * Automatically generating the CSV report, Send an email with report attachment based on the scheduled time.
65
- * Option to create more than one scheduling event to get different enquiry form data report.
66
- * Option to select report datasheet columns from enquiry form field.
67
- * Provision to filter the data while creating the scheduled event for the particular report.
68
- * You can manage the email content by defining TO, FROM and email body content for each scheduling event.
69
- * The added schedule event will be added to WordPress cron schedule and accordingly will be fire at the scheduled time.
70
 
71
  **3. Advanced CF7 DB - User Access Manager**
72
- Need to provide access to other users? Your, search ends now, this plugin provides access to individual users OR based on user Role and accordingly user can view or edit the contact form DB data. For more details you can check the below download link.
73
 
74
- You can download the plugin from <a target="_blank" href="https://codecanyon.net/item/advanced-cf7-db-user-access-manager/22058788">here</a>
75
 
76
  = Advanced CF7 DB - User Access Manager Plugin Features =
77
- * Provide access of contact form 7 DB to View & Update data to individual users OR based on user Role.
78
- * Provide access of Single/Multiple forms to single user.
 
79
 
80
 
81
  == Plugin Customization ==
82
- = Restrict IP address storage =
83
- * Some of Countries have introduced a Law to don't store the user's IP addresses into the database, So we had given provision to Restrict IP address storage.
84
 
85
- = How to Restrict IP address storage? =
86
- 1. Goto -> wp-content/themes/{active theme folder}/functions.php
87
- 2. Open the functions.php file and place the code **do_shortcode( '[cf7-db-display-ip]' );** at the end of the file.
88
 
89
- **Need Support?** <mehul@vsourz.com>
90
 
91
  = How to use? =
92
- 1. Install Plugin via WordPress Admin - Go to Admin > Plugins > Add New.
93
- 2. View form entries Go To Admin >> Advanced CF7 DB >> Select form name.
94
- 3. Import CSV file Go To Admin >> Import CSV >> Import CSV tab >> Select form name.
95
 
96
  == Installation ==
97
 
98
  = Install via WordPress Admin =
99
- 1. Ready the zip file of the plugin
100
- 2. Go to Admin > Plugins > Add New
101
- 3. On the upper portion click the Upload link
102
- 4. Using the file upload field, upload the plugin zip file here and activate the plugin
103
 
104
  = Install via FTP =
105
- 1. First, unzip the plugin file
106
- 2. Using FTP go to your server's wp-content/plugins directory
107
- 3. Upload the unzipped plugin here
108
- 4. Once finished login into your WP Admin and go to Admin > Plugins
109
- 5. Look for Advanced CF7 DB and activate it
110
 
111
 
112
  == Frequently Asked Questions ==
113
 
114
- = Can I use this plugin when contact form 7 not install or activate? =
115
- No, without contact form this plugin is not worked.
116
 
117
  = How can I import CSV sheet? =
118
- First, you need to add CSV sheet related column name on Import CSV screen in the field setting tab and save values then import sheet on import CSV tab screen.
119
 
120
- = Can I change the field name? =
121
- No, You can change only field label name from Display settings screen.
122
 
123
- = Any Difficulty to exported data in CSV? =
124
- While exporting the data as CSV, the sheet needs to be opened with delimiter as "," comma separated else the sheet data will not be displayed properly.
125
 
126
- = What to do if advanced CF7 DB not work? =
127
- If the plugin does not work on the website, contact our Support Team via following email address: <mehul@vsourz.com>.
128
- If you think, that you found a bug in our plugin or have any question contact us at <mehul@vsourz.com>. Our support team will solve within 24 hours.
129
 
130
  = Can I restrict the plugin from storing IP address of the user to contact form DB? =
131
- Yes, you can strict the plugin for storing IP address of the user.
132
 
133
- = Can I display contact form DB data to user ? =
134
- Yes, you can display contact form DB data to user. You can use short code for this purpose. For detail please visit "Shortcode" screen of plugin.
135
 
136
  = How to restrict the plugin from storing IP address of the user to contact form DB? =
137
- Restriction is simple, just code **do_shortcode( '[cf7-db-display-ip]' );** to be placed in theme folder functions.php. By placing the code the IP address of the user will not been stored. Step by step process is explained below :
138
- - Goto -> wp-content/themes/{active theme folder}/functions.php
139
- - Open the functions.php file and place the code **do_shortcode( '[cf7-db-display-ip]' );** at the end of the file.
140
- **For Multisite** it should be **do_shortcode( '[cf7-db-display-ip site_id="(your-site-id)"]' );**
141
- - You need to add different shortcode for each site with specific siteId. If you need to restrict for all the sites then just place the shortcode without the parameter.
142
-
143
- = How to restrict the plugin from storing form entry to contact form DB? =
144
- Restriction is simple, just following below steps :
145
- - Goto -> wp-content/themes/{active theme folder}/functions.php
146
- - Open the functions.php file and place below code at the end of the file.
147
- add_filter('vsz_cf7_unwanted_form_data_submission','vsz_restrict_form_data_submission');
148
- function vsz_restrict_form_data_submission($contact_form_ids){
149
- $contact_form_ids[] = {your-contact-form-id};
150
- return $contact_form_ids;
151
- }
152
- **For multiple forms**
153
- add_filter('vsz_cf7_unwanted_form_data_submission','vsz_restrict_form_data_submission');
154
- function vsz_restrict_form_data_submission($contact_form_ids){
155
- $contact_form_ids[] = ['{your-contact-form-id}','{your-contact-form-id}'];
156
- return $contact_form_ids;
157
  }
158
 
 
 
 
 
 
 
 
159
 
160
  == Screenshots ==
161
 
@@ -169,11 +175,14 @@ function vsz_restrict_form_data_submission($contact_form_ids){
169
 
170
  == Changelog ==
171
 
 
 
 
172
  = 1.6.1 =
173
  * We have upgraded with Security patched for shortcode.
174
 
175
  = 1.6.0 =
176
- * We have upgraded with Security patched to securing user's uploaded data which managed on advanced-cf7-upload directory..
177
 
178
  = 1.5.1 =
179
  * Minor bug fixing related to variable mismatch for wordpress 5.0.1.
2
  Contributors: vsourz1td
3
  Tags: contact form 7 db, advanced cf7 db, contact form 7 database, contact form db, contact form 7, save form data, save contact form, save cf7, database, cf7db, save-contact-form, Save-Forms-Data, import-cf7, export-contact-data, view-cf7-entry
4
  Requires at least: 4.0
5
+ Tested up to: 5.2.2
6
+ Stable tag: 1.6.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Save all contact form 7 form submitted data to the database, View, Ordering, Change field labels and Import/Export data using CSV.
11
 
12
  == Description ==
13
+ Easy plug & play plugin to store all enquiry details received through website Contact Form 7 forms. Simply install & activate plugin to store all your enquiries in wp-admin.
14
 
15
+ Every form that is submitted in the website will be captured into database using “Advanced Contact Form 7” plugin. Follow below steps to view form details:
16
+
17
+ * Select form from drop-down
18
+ * View all form data for that particular form
19
+ * Option to search / filter forms by keyword or date range
20
+ * View attachments in wp-content/uploads/advanced-cf7-upload
21
+ * Option to download attachments from wp-admin
22
 
23
 
24
  = Features =
25
+ * Compatible with **Multisite feature** Efficient data management by storing form details website wise
26
+ * Securely stores form data into database
27
+ * Easily modify enquiry data
28
+ * View list of all forms received through Contact Form 7
29
+ * Search / filter form details using keyword
30
+ * Search / filter enquiries using custom date-range filter
31
+ * Export data in **CSV, Excel or PDF** format by applying filters
32
+ * View attachment download link
33
+ * Advanced pagination with an option to jump to any page to view specific entries
34
+ * Enable/Disable columns with personalized tabular structure
35
+ * Drag & Drop with ease to view data in customized tabular view
36
+ * Option to select multiple entries at a time for deleting / exporting entries
37
+ * Rename field label names easily
38
+ * Import form details using CSV
39
+ * Filter to exclude data from creating record in CF7 database
40
+ * Modify form data before creating record in CF7 database
41
+ * Generate shortcode using different parameters to display specific data only. For more details, please refer plugin “Shortcode” screen
 
 
 
 
 
 
42
 
43
  == Commercial Features ==
44
+ **1. Advanced CF7 DB - GDPR Compliant**
45
+ Advanced CF7 DB – GDPR Compliant plugin assists website and web-shop owners to comply with European privacy regulations known as GDPR. Advanced CF7 DB – GDPR Compliant is an add-on of Advanced CF7 DB, it is based on GDPR rules to export or erase user’s personal data stored with advanced CF7 DB.
46
 
47
+ Download Advanced CF7 DB – GDPR Complaint plugin from <a target="_blank" href="https://codecanyon.net/item/advanced-cf7-db-gdpr-compliant/22386060">here</a>
48
 
49
+ = Advanced CF7 DB - GDPR Compliant Plugin Features =
50
+ * Compatible with the latest WordPress version 5.1.1 and later for GDPR compliances
51
+ * Manages data as per new regulations and up to the mark performance
52
+ * View personal data of individual record On-Request, categorized as per CF7 forms and websites
53
+ * Erase personal data specific to CF7 that are not required
54
+ * Website owners can export a ZIP file containing a user’s personal data, including data collected by Advanced CF7 DB plugin
55
+ * Website owners can erase a user’s personal data, including data collected by Advanced CF7 DB plugin
56
 
57
  **2. Schedule Report**
58
+ We have introduced a new add-on Schedule Report focusing on day-to-day business specific requirement like:
59
+
60
+ * Daily Report
61
+ * Weekly Report
62
+ * Monthly Report
63
 
64
+ Reports will be automatically generated and will be available to you in your e-mail address as per scheduled routine.
65
+
66
+ Download Schedule Report plugin from <a target="_blank" href="https://codecanyon.net/item/schedule-report-for-advanced-cf7-db/21560647?s_rank=8">here</a>
67
 
68
  = Schedule Report Plugin Features =
69
+ * Auto-generated CSV report are sent in emails at scheduled time
70
+ * Schedule multiple email events for receiving different enquiry form reports
71
+ * Option to select datasheet columns for reports to be generated
72
+ * Option to filter data while creating the scheduled event for a particular report
73
+ * Option to create email templates by defining To, From, Email message for schedule reports
74
+ * Scheduled Report will also be added to wp-cron and will be triggered as per schedule
75
 
76
  **3. Advanced CF7 DB - User Access Manager**
77
+ Need to provide access to other users? Your, search ends now, this plugin provides access to individual users or user groups and accordingly user(s) can view or edit their contact form DB data.
78
 
79
+ Download Advanced CF7 DB – User Access Manager plugin from <a target="_blank" href="https://codecanyon.net/item/advanced-cf7-db-user-access-manager/22058788">here</a>
80
 
81
  = Advanced CF7 DB - User Access Manager Plugin Features =
82
+ * Provide access of CF7 DB to view & update data to individual users or user groups
83
+ * Provide access to single user for creating single/multiple forms
84
+
85
 
86
 
87
  == Plugin Customization ==
88
+ Restrict IP address storage – Various countries restrict websites to store end users IP address. We have a provision to Restrict IP address storage. Now, IP address can be neglected while storing form’s data into database.
 
89
 
90
+ **How to restrict IP address storage?**
91
+ Navigate to -> wp-content/themes/{active theme folder}/functions.php
92
+ Open the functions.php file and place the code do_shortcode( [cf7-db-display-ip] ); at the end of the file.
93
 
94
+ For support, email us at: <wp.support@vsourz.com>
95
 
96
  = How to use? =
97
+ 1. Install Plugin via WordPress Admin Go to Admin > Plugins > Add New.
98
+ 2. View form entries Go To Admin >> Advanced CF7 DB >> Advanced CF7 DB >> Select form name.
99
+ 3. Import CSV file Go To Admin >> Advanced CF7 DB >> Import CSV >> Select form name.
100
 
101
  == Installation ==
102
 
103
  = Install via WordPress Admin =
104
+ 1. Go to Admin > Plugins > Add New
105
+ 2. On the upper portion click the Upload link.
106
+ 3. Using the file upload field, upload the plugin zip file here and activate the plugin.
 
107
 
108
  = Install via FTP =
109
+ 1. Unzip the plugin file.
110
+ 2. Using FTP go to your servers wp-content/plugins directory.
111
+ 3. Upload the unzipped plugin here.
112
+ 4. Once finished, login into your WP Admin and go to Plugins.
113
+ 5. Find Advanced CF7 DB and activate it.
114
 
115
 
116
  == Frequently Asked Questions ==
117
 
118
+ = Can I use this plugin if Contact Form 7 is not installed or activated? =
119
+ No, this plugin work only when Contact Form 7 is installed & activated.
120
 
121
  = How can I import CSV sheet? =
122
+ Go to "Field Setting Tab" under "Import CSV" screen, define/add column names as per your sheet, save those values and click "Import CSV".
123
 
124
+ = Can I modify field names? =
125
+ No, you can only change field’s label name from “display settings screen.
126
 
127
+ = Are you facing difficulty in viewing data in CSV? =
128
+ Please note while exporting data in CSV format, the sheet must be opened with delimiter an it - (,)comma separated otherwise you may face difficulty in viewing the data sheet.
129
 
130
+ = What needs to be done if advanced CF7 DB is not working? =
131
+ Please contact our support team at <wp.support@vsourz.com> in case you face any difficulty. In case you have spotted a bug, please report at <wp.support@vsourz.com> & our support team will get is resolved in 24 hours.
 
132
 
133
  = Can I restrict the plugin from storing IP address of the user to contact form DB? =
134
+ Yes, you can restrict the plugin from storing user's IP address.
135
 
136
+ = Can I display Contact Form DB data to user ? =
137
+ Yes, you can use short codes for displaying contact form data to users. For more detail please visit Shortcode plugin's description page.
138
 
139
  = How to restrict the plugin from storing IP address of the user to contact form DB? =
140
+ Restriction is simple, just place "do_shortcode( [cf7-db-display-ip] );" in the theme folders functions.php file By placing the code, IP address of the user's will not been stored.
141
+
142
+ Please follow below steps:
143
+ Goto -> wp-content/themes/{active theme folder}/functions.php
144
+ Open the functions.php file and place the code do_shortcode( ‘[cf7-db-display-ip]’ ); at the end of the file.
145
+ **For Multisite** - do_shortcode( ‘[cf7-db-display-ip site_id=”(your-site-id)”]’ );
146
+ You need to add different shortcode for each site with specific siteId. If you need to restrict for all the sites then just place the shortcode without the parameter.
147
+
148
+ = How to restrict the plugin from storing form entry to Contact Form DB? =
149
+ Please follow below steps for restricting the plugin to store data
150
+ Goto -> wp-content/themes/{active theme folder}/functions.php
151
+ Open the functions.php file and place below code at the end of the file.
152
+ add_filter(‘vsz_cf7_unwanted_form_data_submission’,’vsz_restrict_form_data_submission’);
153
+ function vsz_restrict_form_data_submission($contact_form_ids){
154
+ $contact_form_ids[] = {your-contact-form-id};
155
+ return $contact_form_ids;
 
 
 
 
156
  }
157
 
158
+ **For Multiple Forms**
159
+ add_filter(‘vsz_cf7_unwanted_form_data_submission’,’vsz_restrict_form_data_submission’);
160
+ function vsz_restrict_form_data_submission($contact_form_ids){
161
+ $contact_form_ids[] = [‘{your-contact-form-id}’,'{your-contact-form-id}’];
162
+ return $contact_form_ids;
163
+ }
164
+
165
 
166
  == Screenshots ==
167
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.6.2 =
179
+ * We have fixed SQL injection related bugs at the back office query.
180
+
181
  = 1.6.1 =
182
  * We have upgraded with Security patched for shortcode.
183
 
184
  = 1.6.0 =
185
+ * We have upgraded with Security patched to securing user's uploaded data which managed on advanced-cf7-upload directory.
186
 
187
  = 1.5.1 =
188
  * Minor bug fixing related to variable mismatch for wordpress 5.0.1.
admin/partials/contact_form_listing.php CHANGED
@@ -240,14 +240,17 @@ else{
240
  //Call when any filter not active on Listing screen
241
  else{
242
 
243
- if(isset($_GET["orderby"]) && isset($_GET["order"]) && !empty($_GET["orderby"]) && !empty($_GET["order"])){
244
- $qry = "SELECT `data_id` FROM `".VSZ_CF7_DATA_ENTRY_TABLE_NAME."` WHERE `cf7_id` = ".$fid." AND `name` = '".$_GET['orderby']."' AND data_id IN(
 
 
 
245
  SELECT * FROM (
246
  SELECT data_id FROM `".VSZ_CF7_DATA_ENTRY_TABLE_NAME."` WHERE 1 = 1 AND `cf7_id` = ".$fid."
247
  GROUP BY `data_id` ORDER BY ".$cf7d_entry_order_by." LIMIT ".$offset.",".$items_per_page."
248
  )
249
  temp_table)
250
- ORDER BY `value` ".$_GET["order"]."," . $cf7d_entry_order_by;
251
  $idVals = $wpdb->get_results ( $qry );
252
  $id_val = array();
253
  if(!empty($idVals)){
240
  //Call when any filter not active on Listing screen
241
  else{
242
 
243
+ if(isset($_GET["orderby"]) && isset($_GET["order"]) && !empty($_GET["orderby"]) && !empty($_GET["order"]) && (strtolower($_GET["order"]) == 'asc' || strtolower($_GET["order"]) == 'desc')){
244
+
245
+ $order = esc_sql($_GET['order']);
246
+ $orderby = esc_sql($_GET['orderby']);
247
+ $qry = "SELECT `data_id` FROM `".VSZ_CF7_DATA_ENTRY_TABLE_NAME."` WHERE `cf7_id` = ".$fid." AND `name` = '".$orderby."' AND data_id IN(
248
  SELECT * FROM (
249
  SELECT data_id FROM `".VSZ_CF7_DATA_ENTRY_TABLE_NAME."` WHERE 1 = 1 AND `cf7_id` = ".$fid."
250
  GROUP BY `data_id` ORDER BY ".$cf7d_entry_order_by." LIMIT ".$offset.",".$items_per_page."
251
  )
252
  temp_table)
253
+ ORDER BY `value` ".$order."," . $cf7d_entry_order_by;
254
  $idVals = $wpdb->get_results ( $qry );
255
  $id_val = array();
256
  if(!empty($idVals)){
advanced-cf7-db.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: Advanced CF7 DB
10
  * Plugin URI: https://wordpress.org/plugins/advanced-cf7-db/
11
  * Description: Save all contact form 7 submitted data to the database, View, Export, ordering, Change field labels, Import data using CSV very easily.
12
- * Version: 1.6.1
13
  * Author: Vsourz Digital
14
  * Author URI: https://www.vsourz.com
15
  * License: GPL-2.0+
@@ -23,7 +23,7 @@ if ( ! defined( 'WPINC' ) ) {
23
  die;
24
  }
25
  global $vsz_cf7db_current_version;
26
- $vsz_cf7db_current_version = '1.6.1';
27
  /**
28
  * Defining all the table names and setting their prefix here
29
  */
9
  * Plugin Name: Advanced CF7 DB
10
  * Plugin URI: https://wordpress.org/plugins/advanced-cf7-db/
11
  * Description: Save all contact form 7 submitted data to the database, View, Export, ordering, Change field labels, Import data using CSV very easily.
12
+ * Version: 1.6.2
13
  * Author: Vsourz Digital
14
  * Author URI: https://www.vsourz.com
15
  * License: GPL-2.0+
23
  die;
24
  }
25
  global $vsz_cf7db_current_version;
26
+ $vsz_cf7db_current_version = '1.6.2';
27
  /**
28
  * Defining all the table names and setting their prefix here
29
  */
includes/class-advanced-cf7-db-activator.php CHANGED
@@ -100,11 +100,11 @@ function create_table_cf7_vdata_entry(){
100
 
101
  function create_f7_capability(){
102
  // Add Capability when update plugin
103
- $role = get_role( 'administrator');
104
- $args = array('post_type' => 'wpcf7_contact_form', 'posts_per_page' => -1);
105
- $cf7Forms = get_posts( $args );
106
- foreach($cf7Forms as $data){
107
- $role->add_cap('cf7_db_form_view'.$data->ID);
108
- $role->add_cap('cf7_db_form_edit_'.$data->ID);
109
- }
110
  }
100
 
101
  function create_f7_capability(){
102
  // Add Capability when update plugin
103
+ $role = get_role( 'administrator');
104
+ $args = array('post_type' => 'wpcf7_contact_form', 'posts_per_page' => -1);
105
+ $cf7Forms = get_posts( $args );
106
+ foreach($cf7Forms as $data){
107
+ $role->add_cap('cf7_db_form_view'.$data->ID);
108
+ $role->add_cap('cf7_db_form_edit_'.$data->ID);
109
+ }
110
  }
includes/class-advanced-cf7-db.php CHANGED
@@ -69,7 +69,7 @@ class Advanced_Cf7_Db {
69
  public function __construct() {
70
 
71
  $this->plugin_name = 'advanced-cf7-db';
72
- $this->version = '1.1.2';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
  public function __construct() {
70
 
71
  $this->plugin_name = 'advanced-cf7-db';
72
+ $this->version = '1.6.2';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();