Skip to content

Commit 3f505fc

Browse files
committed
v1.3.1
1 parent faf53af commit 3f505fc

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

contact-form-cfdb-7.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
Author: Arshid
77
Author URI: http://ciphercoin.com/
88
Text Domain: contact-form-cfdb7
9+
License: GPL v2 or later
910
Domain Path: /languages/
10-
Version: 1.2.10
11+
Version: 1.3.1
1112
*/
1213

1314
function cfdb7_create_table(){
@@ -48,7 +49,6 @@ function cfdb7_on_activate( $network_wide ){
4849

4950
global $wpdb;
5051
if ( is_multisite() && $network_wide ) {
51-
// Get all blogs in the network and activate plugin on each one
5252
$blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
5353
foreach ( $blog_ids as $blog_id ) {
5454
switch_to_blog( $blog_id );
@@ -59,7 +59,6 @@ function cfdb7_on_activate( $network_wide ){
5959
cfdb7_create_table();
6060
}
6161

62-
// Add custom capability
6362
$role = get_role( 'administrator' );
6463
$role->add_cap( 'cfdb7_access' );
6564
}
@@ -88,7 +87,6 @@ function cfdb7_upgrade_function( $upgrader_object, $options ) {
8887

8988
function cfdb7_on_deactivate() {
9089

91-
// Remove custom capability from all roles
9290
global $wp_roles;
9391

9492
foreach( array_keys( $wp_roles->roles ) as $role ) {
@@ -174,7 +172,6 @@ function cfdb7_before_send_mail( $form_tag ) {
174172
}
175173
}
176174

177-
/* cfdb7 before save data. */
178175
$form_data = apply_filters('cfdb7_before_save_data', $form_data);
179176

180177
do_action( 'cfdb7_before_save', $form_data );
@@ -189,9 +186,8 @@ function cfdb7_before_send_mail( $form_tag ) {
189186
'form_date' => $form_date
190187
) );
191188

192-
/* cfdb7 after save data */
193189
$insert_id = $cfdb->insert_id;
194-
do_action( 'cfdb7_after_save_data', $insert_id );
190+
do_action( 'cfdb7_after_save_data', $insert_id, $form_data );
195191
}
196192

197193
}

css/admin-style.css

100755100644
File mode changed.

inc/add-ons.php

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function cfdb7_extensions(){
1313
<a class="button-primary" href="https://ciphercoin.com/contact-form-7-database-cfdb7-add-ons/"><?php _e( 'Browse All Extensions', 'contact-form-cfdb7' ); ?></a>
1414
</span>
1515
</h2>
16-
<p><?php _e( 'These extensions provide additional features for CFDB7.', 'contact-form-cfdb7' ); ?></p>
16+
<p><?php _e( 'Add extra features to CFDB7 with these extensions.', 'contact-form-cfdb7' ); ?></p>
1717
<?php echo cfdb7_add_ons_get_feed(); ?>
1818
</div>
1919
<?php
@@ -47,4 +47,4 @@ function cfdb7_add_ons_get_feed(){
4747
}
4848
return $cache;
4949
}
50-
// delete_transient('cfdb7_add_ons_feed');
50+
// delete_transient('cfdb7_add_ons_feed');

inc/admin-form-details.php

100755100644
File mode changed.

inc/admin-mainpage.php

100755100644
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function list_table_page()
6666
?>
6767
<div class="wrap">
6868
<div id="icon-users" class="icon32"></div>
69-
<h2><?php _e( 'Contact Forms List', 'contact-form-cfdb7' ); ?></h2>
69+
<h2><?php _e( 'Contact Forms', 'contact-form-cfdb7' ); ?></h2>
7070
<?php $ListTable->display(); ?>
7171
</div>
7272
<?php
@@ -91,9 +91,6 @@ class CFDB7_Main_List_Table extends WP_List_Table
9191
public function prepare_items()
9292
{
9393

94-
global $wpdb;
95-
$cfdb = apply_filters( 'cfdb7_database', $wpdb );
96-
$table_name = $cfdb->prefix.'db7_forms';
9794
$columns = $this->get_columns();
9895
$hidden = $this->get_hidden_columns();
9996
$data = $this->table_data();

inc/admin-subpage.php

100755100644
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function get_columns()
148148
$key_val = str_replace( array('_', '-'), ' ', $key_val);
149149
$columns[$key] = ucwords( $key_val );
150150

151-
$this->column_titles[] = $key;
151+
$this->column_titles[] = $key_val;
152152

153153
if ( sizeof($columns) > 4) break;
154154
}
@@ -241,7 +241,6 @@ private function table_data()
241241

242242
foreach ( $results as $result ) {
243243

244-
$form_values = [];
245244
$form_value = unserialize( $result->form_value );
246245

247246
$link = "<b><a href=admin.php?page=cfdb7-list.php&fid=%s&ufid=%s>%s</a></b>";
@@ -282,7 +281,8 @@ private function table_data()
282281
$form_values['form-date'] = sprintf($link, $fid, $result->form_id, $result->form_date );
283282
$data[] = $form_values;
284283
}
285-
return apply_filters('cfdb7_admin_subpage_table_data', $data);
284+
285+
return $data;
286286
}
287287
/**
288288
* Define bulk action
@@ -467,4 +467,4 @@ protected function bulk_actions( $which = '' ) {
467467
echo '</a>';
468468
do_action('cfdb7_after_export_button');
469469
}
470-
}
470+
}

0 commit comments

Comments
 (0)