Version Description
Download this release
Release Info
Developer | adampickering |
Plugin | Contact Listing for WP Job Manager |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
includes/class-wp-job-manager-contact-listing-form.php
CHANGED
@@ -23,6 +23,10 @@ class Astoundify_Job_Manager_Contact_Listing_Form extends Astoundify_Job_Manager
|
|
23 |
* @return void
|
24 |
*/
|
25 |
public function __construct() {
|
|
|
|
|
|
|
|
|
26 |
global $job_manager;
|
27 |
|
28 |
$this->forms = apply_filters( 'job_manager_contact_listing_forms', array(
|
@@ -44,10 +48,10 @@ class Astoundify_Job_Manager_Contact_Listing_Form extends Astoundify_Job_Manager
|
|
44 |
$this->setup_actions();
|
45 |
|
46 |
// Output the shortcode
|
47 |
-
|
48 |
|
49 |
if ( ! get_option( 'resume_manager_force_application' ) ) {
|
50 |
-
add_action( 'job_manager_application_details_email', array( $this, 'job_manager_application_details_email' ) );
|
51 |
}
|
52 |
|
53 |
if ( class_exists( 'WP_Resume_Manager' ) ) {
|
@@ -124,6 +128,8 @@ class Astoundify_Job_Manager_Contact_Listing_Form extends Astoundify_Job_Manager
|
|
124 |
* @return void
|
125 |
*/
|
126 |
public function job_manager_application_details_email( $apply ) {
|
|
|
|
|
127 |
$plugin = parent::$active_plugin;
|
128 |
$post = get_post();
|
129 |
|
@@ -137,7 +143,11 @@ class Astoundify_Job_Manager_Contact_Listing_Form extends Astoundify_Job_Manager
|
|
137 |
return;
|
138 |
}
|
139 |
|
|
|
|
|
|
|
|
|
140 |
do_action( 'job_manager_contact_listing_form_' . $plugin, $form );
|
141 |
}
|
142 |
|
143 |
-
}
|
23 |
* @return void
|
24 |
*/
|
25 |
public function __construct() {
|
26 |
+
if ( ! class_exists( 'WP_Job_Manager' ) ) {
|
27 |
+
return;
|
28 |
+
}
|
29 |
+
|
30 |
global $job_manager;
|
31 |
|
32 |
$this->forms = apply_filters( 'job_manager_contact_listing_forms', array(
|
48 |
$this->setup_actions();
|
49 |
|
50 |
// Output the shortcode
|
51 |
+
|
52 |
|
53 |
if ( ! get_option( 'resume_manager_force_application' ) ) {
|
54 |
+
add_action( 'job_manager_application_details_email', array( $this, 'job_manager_application_details_email' ), 5 );
|
55 |
}
|
56 |
|
57 |
if ( class_exists( 'WP_Resume_Manager' ) ) {
|
128 |
* @return void
|
129 |
*/
|
130 |
public function job_manager_application_details_email( $apply ) {
|
131 |
+
global $job_manager;
|
132 |
+
|
133 |
$plugin = parent::$active_plugin;
|
134 |
$post = get_post();
|
135 |
|
143 |
return;
|
144 |
}
|
145 |
|
146 |
+
// Only remove the default text when contact form is set.
|
147 |
+
remove_action( 'job_manager_application_details_email', array( $job_manager->post_types, 'application_details_email' ) );
|
148 |
+
|
149 |
+
// Add contact form content
|
150 |
do_action( 'job_manager_contact_listing_form_' . $plugin, $form );
|
151 |
}
|
152 |
|
153 |
+
}
|
includes/forms/cf7.php
CHANGED
@@ -61,7 +61,17 @@ class Astoundify_Job_Manager_Contact_Listing_Form_CF7 extends Astoundify_Job_Man
|
|
61 |
$post_id = (int) $matches[2];
|
62 |
$object = get_post( $post_id );
|
63 |
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
return $components;
|
66 |
}
|
67 |
|
@@ -99,4 +109,4 @@ class Astoundify_Job_Manager_Contact_Listing_Form_CF7 extends Astoundify_Job_Man
|
|
99 |
return $forms;
|
100 |
}
|
101 |
|
102 |
-
}
|
61 |
$post_id = (int) $matches[2];
|
62 |
$object = get_post( $post_id );
|
63 |
|
64 |
+
// Prevent issues when the form is not submitted via a listing/resume page
|
65 |
+
if ( ! isset( $this->forms[ $object->post_type ] ) ) {
|
66 |
+
return $components;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( ! array_search( $cf7->id(), $this->forms[ $object->post_type ] ) ) {
|
70 |
+
return $components;
|
71 |
+
}
|
72 |
+
|
73 |
+
// Bail if this is the second mail
|
74 |
+
if ( isset( $three ) && 'mail_2' == $three->name() ) {
|
75 |
return $components;
|
76 |
}
|
77 |
|
109 |
return $forms;
|
110 |
}
|
111 |
|
112 |
+
}
|
includes/forms/gravityforms.php
CHANGED
@@ -62,6 +62,10 @@ class Astoundify_Job_Manager_Contact_Listing_Form_GravityForms extends Astoundif
|
|
62 |
|
63 |
$object = get_post( $listing );
|
64 |
|
|
|
|
|
|
|
|
|
65 |
if ( ! array_search( $form[ 'id' ], $this->forms[ $object->post_type ] ) ) {
|
66 |
return;
|
67 |
}
|
@@ -94,4 +98,4 @@ class Astoundify_Job_Manager_Contact_Listing_Form_GravityForms extends Astoundif
|
|
94 |
return $forms;
|
95 |
}
|
96 |
|
97 |
-
}
|
62 |
|
63 |
$object = get_post( $listing );
|
64 |
|
65 |
+
if ( ! isset( $this->forms[ $object->post_type ] ) ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
if ( ! array_search( $form[ 'id' ], $this->forms[ $object->post_type ] ) ) {
|
70 |
return;
|
71 |
}
|
98 |
return $forms;
|
99 |
}
|
100 |
|
101 |
+
}
|
readme.txt
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
|
3 |
Author URI: http://astoundify.com
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-job-manager-contact-listing/
|
5 |
-
Donate link: https://www.paypal.
|
6 |
-
Contributors: Astoundify
|
7 |
Tags: job, job listing, job apply, gravity forms, wp job manager, gravity forms, gravityforms, ninja forms, ninjaforms, contact form 7, cf7
|
8 |
-
Requires at least:
|
9 |
-
Tested up to: 4.
|
10 |
-
Stable Tag: 1.0.
|
11 |
License: GPLv3
|
12 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
13 |
|
@@ -75,6 +75,10 @@ If you have purchased Jobify and still have questions, please post on our dedica
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
78 |
= 1.0.4: September 16, 2014 =
|
79 |
|
80 |
* Fix: Compatibility with Ninja Forms 2.8.0+ notification system. Please review the README and documentation for changes needed.
|
2 |
|
3 |
Author URI: http://astoundify.com
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-job-manager-contact-listing/
|
5 |
+
Donate link: https://www.paypal.me/astoundify
|
6 |
+
Contributors: Astoundify
|
7 |
Tags: job, job listing, job apply, gravity forms, wp job manager, gravity forms, gravityforms, ninja forms, ninjaforms, contact form 7, cf7
|
8 |
+
Requires at least: 4.4
|
9 |
+
Tested up to: 4.4.*
|
10 |
+
Stable Tag: 1.0.5
|
11 |
License: GPLv3
|
12 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
13 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 1.0.5: April, 9, 2015 =
|
79 |
+
|
80 |
+
* Fix: Don't override Contact Form 7 Mail (2) email notification.
|
81 |
+
|
82 |
= 1.0.4: September 16, 2014 =
|
83 |
|
84 |
* Fix: Compatibility with Ninja Forms 2.8.0+ notification system. Please review the README and documentation for changes needed.
|
wp-job-manager-contact-listing.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Contact job listings or resume listings with your choice of Gravity Forms, Ninja Forms, or Contact Form 7
|
6 |
* Author: Astoundify
|
7 |
* Author URI: http://astoundify.com
|
8 |
-
* Version: 1.0.
|
9 |
* Text Domain: wp-job-manager-contact-listing
|
10 |
*/
|
11 |
|
5 |
* Description: Contact job listings or resume listings with your choice of Gravity Forms, Ninja Forms, or Contact Form 7
|
6 |
* Author: Astoundify
|
7 |
* Author URI: http://astoundify.com
|
8 |
+
* Version: 1.0.5
|
9 |
* Text Domain: wp-job-manager-contact-listing
|
10 |
*/
|
11 |
|