Version Description
- Changed: Announcement feed data
Download this release
Release Info
Developer | jaredatch |
Plugin | Contact Form by WPForms – Drag & Drop Form Builder for WordPress |
Version | 1.4.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.2.1 to 1.4.2.2
- changelog.txt +3 -0
- includes/admin/class-am-notification.php +9 -85
- readme.txt +5 -2
- wpforms.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
3 |
= 1.4.2.1 =
|
4 |
- Added: Setting to hide Announcement feed
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.4.2.2 =
|
4 |
+
- Changed: Announcement feed data
|
5 |
+
|
6 |
= 1.4.2.1 =
|
7 |
- Added: Setting to hide Announcement feed
|
8 |
|
includes/admin/class-am-notification.php
CHANGED
@@ -10,7 +10,7 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
10 |
* @author Benjamin Rojas
|
11 |
* @license GPL-2.0+
|
12 |
* @copyright Copyright (c) 2017, Retyp LLC
|
13 |
-
* @version 1.0.
|
14 |
*/
|
15 |
class AM_Notification {
|
16 |
/**
|
@@ -41,24 +41,6 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
41 |
*/
|
42 |
public $plugin_version;
|
43 |
|
44 |
-
/**
|
45 |
-
* The list of installed plugins.
|
46 |
-
*
|
47 |
-
* @since 1.0.0
|
48 |
-
*
|
49 |
-
* @var array
|
50 |
-
*/
|
51 |
-
public $plugin_list = array();
|
52 |
-
|
53 |
-
/**
|
54 |
-
* The list of installed themes.
|
55 |
-
*
|
56 |
-
* @since 1.0.0
|
57 |
-
*
|
58 |
-
* @var string
|
59 |
-
*/
|
60 |
-
public $theme_list = array();
|
61 |
-
|
62 |
/**
|
63 |
* Flag if a notice has been registered.
|
64 |
*
|
@@ -93,7 +75,9 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
93 |
*/
|
94 |
public function custom_post_type() {
|
95 |
register_post_type( 'amn_' . $this->plugin, array(
|
96 |
-
'
|
|
|
|
|
97 |
) );
|
98 |
}
|
99 |
|
@@ -124,8 +108,6 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
124 |
'slug' => $this->plugin,
|
125 |
'version' => $this->plugin_version,
|
126 |
'last_notification' => $notification_id,
|
127 |
-
'plugins' => $this->get_plugins_list(),
|
128 |
-
'themes' => $this->get_themes_list(),
|
129 |
),
|
130 |
) ) );
|
131 |
|
@@ -150,16 +132,14 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
150 |
|
151 |
if ( empty( $notifications ) ) {
|
152 |
$new_notification_id = wp_insert_post( array(
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
|
158 |
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
159 |
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
160 |
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
161 |
-
update_post_meta( $new_notification_id, 'plugins', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->plugins ) : json_encode( $data->plugins ) );
|
162 |
-
update_post_meta( $new_notification_id, 'theme', sanitize_text_field( trim( $data->theme ) ) );
|
163 |
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
164 |
update_post_meta( $new_notification_id, 'viewed', 0 );
|
165 |
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
@@ -190,68 +170,12 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
190 |
public function get_plugin_notifications( $limit = -1, $args = array() ) {
|
191 |
return get_posts(
|
192 |
array(
|
193 |
-
'
|
194 |
-
'post_type'
|
195 |
) + $args
|
196 |
);
|
197 |
}
|
198 |
|
199 |
-
/**
|
200 |
-
* Retrieve a list of plugins that are currently installed.
|
201 |
-
*
|
202 |
-
* @since 1.0.0
|
203 |
-
*
|
204 |
-
* @return array An array of plugins that are currently installed.
|
205 |
-
*/
|
206 |
-
public function get_plugins_list() {
|
207 |
-
if ( ! empty( $this->plugin_list ) ) {
|
208 |
-
return $this->plugin_list;
|
209 |
-
}
|
210 |
-
|
211 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
212 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
213 |
-
}
|
214 |
-
|
215 |
-
$plugins = get_plugins();
|
216 |
-
|
217 |
-
foreach ( $plugins as $slug => $plugin ) {
|
218 |
-
$this->plugin_list[ $slug ] = array(
|
219 |
-
'slug' => $slug,
|
220 |
-
'name' => $plugin['Name'],
|
221 |
-
'version' => $plugin['Version'],
|
222 |
-
'active' => is_plugin_active( $slug ),
|
223 |
-
);
|
224 |
-
}
|
225 |
-
|
226 |
-
return $this->plugin_list;
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Retrieve a list of themes that are currently installed.
|
231 |
-
*
|
232 |
-
* @since 1.0.0
|
233 |
-
*
|
234 |
-
* @return array An array of themes that are currently installed.
|
235 |
-
*/
|
236 |
-
public function get_themes_list() {
|
237 |
-
if ( ! empty( $this->theme_list ) ) {
|
238 |
-
return $this->theme_list;
|
239 |
-
}
|
240 |
-
|
241 |
-
$themes = wp_get_themes();
|
242 |
-
|
243 |
-
foreach ( $themes as $slug => $theme ) {
|
244 |
-
$this->theme_list[ $slug ] = array(
|
245 |
-
'slug' => $slug,
|
246 |
-
'name' => $theme->Name,
|
247 |
-
'version' => $theme->Version,
|
248 |
-
'active' => (string) wp_get_theme() === $theme->Name,
|
249 |
-
);
|
250 |
-
}
|
251 |
-
|
252 |
-
return $this->theme_list;
|
253 |
-
}
|
254 |
-
|
255 |
/**
|
256 |
* Display any notifications that should be displayed.
|
257 |
*
|
10 |
* @author Benjamin Rojas
|
11 |
* @license GPL-2.0+
|
12 |
* @copyright Copyright (c) 2017, Retyp LLC
|
13 |
+
* @version 1.0.2
|
14 |
*/
|
15 |
class AM_Notification {
|
16 |
/**
|
41 |
*/
|
42 |
public $plugin_version;
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* Flag if a notice has been registered.
|
46 |
*
|
75 |
*/
|
76 |
public function custom_post_type() {
|
77 |
register_post_type( 'amn_' . $this->plugin, array(
|
78 |
+
'label' => $this->plugin . ' Announcements',
|
79 |
+
'can_export' => false,
|
80 |
+
'supports' => false,
|
81 |
) );
|
82 |
}
|
83 |
|
108 |
'slug' => $this->plugin,
|
109 |
'version' => $this->plugin_version,
|
110 |
'last_notification' => $notification_id,
|
|
|
|
|
111 |
),
|
112 |
) ) );
|
113 |
|
132 |
|
133 |
if ( empty( $notifications ) ) {
|
134 |
$new_notification_id = wp_insert_post( array(
|
135 |
+
'post_content' => wp_kses_post( $data->content ),
|
136 |
+
'post_type' => 'amn_' . $this->plugin,
|
137 |
+
) );
|
138 |
|
139 |
update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
|
140 |
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
141 |
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
142 |
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
|
|
|
|
143 |
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
144 |
update_post_meta( $new_notification_id, 'viewed', 0 );
|
145 |
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
170 |
public function get_plugin_notifications( $limit = -1, $args = array() ) {
|
171 |
return get_posts(
|
172 |
array(
|
173 |
+
'posts_per_page' => $limit,
|
174 |
+
'post_type' => 'amn_' . $this->plugin,
|
175 |
) + $args
|
176 |
);
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
/**
|
180 |
* Display any notifications that should be displayed.
|
181 |
*
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: wpforms, jaredatch, smub, slaFFik
|
3 |
Tags: contact form, contact form plugin, forms, form builder, custom form, contact button, contact me, custom contact form, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
|
4 |
Requires at least: 4.6
|
5 |
-
Tested up to: 4.9
|
6 |
Stable tag: trunk
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GNU General Public License v2.0 or later
|
@@ -210,8 +210,11 @@ Syed Balkhi
|
|
210 |
|
211 |
== Changelog ==
|
212 |
|
|
|
|
|
|
|
213 |
= 1.4.2.1 =
|
214 |
-
-
|
215 |
|
216 |
= 1.4.2 =
|
217 |
- Added: Import your old Ninja Forms or Contact Form 7 forms! (WPForms > Tools > Import)
|
2 |
Contributors: wpforms, jaredatch, smub, slaFFik
|
3 |
Tags: contact form, contact form plugin, forms, form builder, custom form, contact button, contact me, custom contact form, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
|
4 |
Requires at least: 4.6
|
5 |
+
Tested up to: 4.9.1
|
6 |
Stable tag: trunk
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GNU General Public License v2.0 or later
|
210 |
|
211 |
== Changelog ==
|
212 |
|
213 |
+
= 1.4.2.2 =
|
214 |
+
- Changed: Announcement feed data
|
215 |
+
|
216 |
= 1.4.2.1 =
|
217 |
+
- Changed: Setting to hide Announcement feed
|
218 |
|
219 |
= 1.4.2 =
|
220 |
- Added: Import your old Ninja Forms or Contact Form 7 forms! (WPForms > Tools > Import)
|
wpforms.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
|
6 |
* Author: WPForms
|
7 |
* Author URI: https://wpforms.com
|
8 |
-
* Version: 1.4.2.
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -90,7 +90,7 @@ if ( class_exists( 'WPForms' ) ) {
|
|
90 |
*
|
91 |
* @var string
|
92 |
*/
|
93 |
-
public $version = '1.4.2.
|
94 |
|
95 |
/**
|
96 |
* The form data handler instance.
|
5 |
* Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
|
6 |
* Author: WPForms
|
7 |
* Author URI: https://wpforms.com
|
8 |
+
* Version: 1.4.2.2
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
90 |
*
|
91 |
* @var string
|
92 |
*/
|
93 |
+
public $version = '1.4.2.2';
|
94 |
|
95 |
/**
|
96 |
* The form data handler instance.
|