Version Description
- Minor bug fixes
Download this release
Release Info
Developer | jasongreen |
Plugin | Contact Form Submissions |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.3
- Admin.php +17 -10
- contact-form-submissions.php +1 -1
- readme.txt +7 -1
Admin.php
CHANGED
@@ -98,7 +98,7 @@ class WPCF7SAdmin
|
|
98 |
public function scripts()
|
99 |
{
|
100 |
// only enqueue if your on the submissions page
|
101 |
-
if ('wpcf7s' === get_post_type() || 'wpcf7s' === $_GET['post_type']) {
|
102 |
wp_enqueue_style('wpcf7s-style', plugins_url('/css/admin.css', WPCF7S_FILE));
|
103 |
}
|
104 |
}
|
@@ -126,7 +126,9 @@ class WPCF7SAdmin
|
|
126 |
{
|
127 |
global $post_type;
|
128 |
if ($query->is_admin && 'wpcf7s' === $post_type && $query->is_main_query()) {
|
129 |
-
|
|
|
|
|
130 |
if (!empty($form_id)) {
|
131 |
$query->set('meta_query', array(
|
132 |
array(
|
@@ -353,6 +355,7 @@ class WPCF7SAdmin
|
|
353 |
*/
|
354 |
public function get_mail_posted_fields($post_id = 0)
|
355 |
{
|
|
|
356 |
$post_meta = get_post_meta($post_id);
|
357 |
$posted = array_intersect_key(
|
358 |
$post_meta,
|
@@ -373,6 +376,7 @@ class WPCF7SAdmin
|
|
373 |
*/
|
374 |
public function get_mail_files($post_id = 0)
|
375 |
{
|
|
|
376 |
$post_meta = get_post_meta($post_id);
|
377 |
if($post_meta){
|
378 |
$posted = array_intersect_key(
|
@@ -411,13 +415,16 @@ class WPCF7SAdmin
|
|
411 |
*/
|
412 |
public function extra_tablenav($which = '')
|
413 |
{
|
414 |
-
$
|
415 |
-
if($
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
|
|
|
|
|
|
421 |
}
|
422 |
}
|
423 |
|
@@ -430,7 +437,7 @@ class WPCF7SAdmin
|
|
430 |
|
431 |
// output headers so that the file is downloaded rather than displayed
|
432 |
header('Content-Type: text/csv; charset=utf-8');
|
433 |
-
header('Content-Disposition: attachment; filename=
|
434 |
|
435 |
// create a file pointer connected to the output stream
|
436 |
$output = fopen('php://output', 'w');
|
98 |
public function scripts()
|
99 |
{
|
100 |
// only enqueue if your on the submissions page
|
101 |
+
if ('wpcf7s' === get_post_type() || (isset($_GET['post_type']) && 'wpcf7s' === $_GET['post_type'])) {
|
102 |
wp_enqueue_style('wpcf7s-style', plugins_url('/css/admin.css', WPCF7S_FILE));
|
103 |
}
|
104 |
}
|
126 |
{
|
127 |
global $post_type;
|
128 |
if ($query->is_admin && 'wpcf7s' === $post_type && $query->is_main_query()) {
|
129 |
+
if(isset($_GET['wpcf7_contact_form'])){
|
130 |
+
$form_id = esc_attr($_GET['wpcf7_contact_form']);
|
131 |
+
}
|
132 |
if (!empty($form_id)) {
|
133 |
$query->set('meta_query', array(
|
134 |
array(
|
355 |
*/
|
356 |
public function get_mail_posted_fields($post_id = 0)
|
357 |
{
|
358 |
+
$posted = array();
|
359 |
$post_meta = get_post_meta($post_id);
|
360 |
$posted = array_intersect_key(
|
361 |
$post_meta,
|
376 |
*/
|
377 |
public function get_mail_files($post_id = 0)
|
378 |
{
|
379 |
+
$posted = array();
|
380 |
$post_meta = get_post_meta($post_id);
|
381 |
if($post_meta){
|
382 |
$posted = array_intersect_key(
|
415 |
*/
|
416 |
public function extra_tablenav($which = '')
|
417 |
{
|
418 |
+
$screen = get_current_screen();
|
419 |
+
if ('wpcf7s' === $screen->post_type){
|
420 |
+
$capability = apply_filters('wpcf7s_export_capatability','export');
|
421 |
+
if($capability){
|
422 |
+
?>
|
423 |
+
<div class="alignleft actions wpcf7s-export">
|
424 |
+
<button type="submit" name="wpcf7s-export" value="1" class="button-primary" title="<?php _e('Export the current set of results as CSV', 'contact-form-submissions'); ?>"><?php _e('Export to CSV', 'contact-form-submissions'); ?></button>
|
425 |
+
</div>
|
426 |
+
<?php
|
427 |
+
}
|
428 |
}
|
429 |
}
|
430 |
|
437 |
|
438 |
// output headers so that the file is downloaded rather than displayed
|
439 |
header('Content-Type: text/csv; charset=utf-8');
|
440 |
+
header('Content-Disposition: attachment; filename=contact-form-submissions.csv');
|
441 |
|
442 |
// create a file pointer connected to the output stream
|
443 |
$output = fopen('php://output', 'w');
|
contact-form-submissions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Contact Form Submissions
|
4 |
Description: Never miss an enquiry again! Save all Contact Form 7 submissions in your database.
|
5 |
-
Version: 1.5.
|
6 |
Author: Jason Green
|
7 |
License: GPLv3
|
8 |
Domain Path: /languages
|
2 |
/*
|
3 |
Plugin Name: Contact Form Submissions
|
4 |
Description: Never miss an enquiry again! Save all Contact Form 7 submissions in your database.
|
5 |
+
Version: 1.5.3
|
6 |
Author: Jason Green
|
7 |
License: GPLv3
|
8 |
Domain Path: /languages
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: contact form 7, save contact form, submissions, contact form db, cf7, wpcf
|
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SNHXWSXSPYATE
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.7.3
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv3
|
9 |
|
10 |
Never miss an enquiry again! Save & Export your Contact Form 7 submissions.
|
@@ -40,6 +40,12 @@ None yet
|
|
40 |
|
41 |
== Changelog ==
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
= 1.5.1 =
|
44 |
* Added ability to export submissions in csv format
|
45 |
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SNHXWSXSPYATE
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.7.3
|
7 |
+
Stable tag: 1.5.3
|
8 |
License: GPLv3
|
9 |
|
10 |
Never miss an enquiry again! Save & Export your Contact Form 7 submissions.
|
40 |
|
41 |
== Changelog ==
|
42 |
|
43 |
+
= 1.5.3 =
|
44 |
+
* Minor bug fixes
|
45 |
+
|
46 |
+
= 1.5.2 =
|
47 |
+
* Minor bug fixes
|
48 |
+
|
49 |
= 1.5.1 =
|
50 |
* Added ability to export submissions in csv format
|
51 |
|