WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress - Version 3.5.6

Version Description

Download this release

Release Info

Developer tareq1988
Plugin Icon 128x128 WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress
Version 3.5.6
Comparing to
See all releases

Code changes from version 3.5.5 to 3.5.6

changelog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  = v3.5.5 (12 November, 2020) =
2
  * Fix - Dashboard page broken and couldn't render [wpuf_account], [wpuf_sub_pack], [wpuf_dashboard] shortcodes
3
 
1
+ = v3.5.6 (13 November, 2020) =
2
+ * Fix - Can't edit post
3
+ * Fix - Show warning if newly created post form doesn't set role base enable
4
+ * Fix - Show warning in dashboard billing address tab
5
+
6
  = v3.5.5 (12 November, 2020) =
7
  * Fix - Dashboard page broken and couldn't render [wpuf_account], [wpuf_sub_pack], [wpuf_dashboard] shortcodes
8
 
includes/class-frontend-form-post.php CHANGED
@@ -98,7 +98,7 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
98
  }
99
 
100
  // has permission?
101
- if ( ! current_user_can( 'delete_others_posts' ) && ( $userdata->ID !== $curpost->post_author ) ) {
102
  return '<div class="wpuf-info">' . __( 'You are not allowed to edit', 'wp-user-frontend' ) . '</div>';
103
  }
104
 
98
  }
99
 
100
  // has permission?
101
+ if ( ! current_user_can( 'delete_others_posts' ) && ( $userdata->ID !== (int) $curpost->post_author ) ) {
102
  return '<div class="wpuf-info">' . __( 'You are not allowed to edit', 'wp-user-frontend' ) . '</div>';
103
  }
104
 
includes/class-frontend-render-form.php CHANGED
@@ -307,7 +307,11 @@ class WPUF_Frontend_Render_Form {
307
  return;
308
  }
309
 
310
- if ( wpuf_validate_boolean( $this->form_settings['role_base'] ) && ! wpuf_user_has_roles( $this->form_settings['roles'] ) ) {
 
 
 
 
311
  ?>
312
  <div class="wpuf-message"><?php esc_html_e( 'You do not have sufficient permissions to access this form.', 'wp-user-frontend' ); ?></div>
313
  <?php
307
  return;
308
  }
309
 
310
+ if (
311
+ isset( $this->form_settings['role_base'] )
312
+ && wpuf_validate_boolean( $this->form_settings['role_base'] )
313
+ && ! wpuf_user_has_roles( $this->form_settings['roles'] )
314
+ ) {
315
  ?>
316
  <div class="wpuf-message"><?php esc_html_e( 'You do not have sufficient permissions to access this form.', 'wp-user-frontend' ); ?></div>
317
  <?php
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Forms, registration, profile-builder, login, membership, frontend-post
5
  Requires at least: 4.0
6
  Tested up to: 5.5.3
7
  Requires PHP: 5.6
8
- Stable tag: 3.5.5
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -263,6 +263,11 @@ redirected to the edit page with that post id. Then you'll see the edit post for
263
 
264
  == Changelog ==
265
 
 
 
 
 
 
266
  = v3.5.5 (12 November, 2020) =
267
  * Fix - Dashboard page broken and couldn't render [wpuf_account], [wpuf_sub_pack], [wpuf_dashboard] shortcodes
268
 
5
  Requires at least: 4.0
6
  Tested up to: 5.5.3
7
  Requires PHP: 5.6
8
+ Stable tag: 3.5.6
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
263
 
264
  == Changelog ==
265
 
266
+ = v3.5.6 (13 November, 2020) =
267
+ * Fix - Can't edit post
268
+ * Fix - Show warning if newly created post form doesn't set role base enable
269
+ * Fix - Show warning in dashboard billing address tab
270
+
271
  = v3.5.5 (12 November, 2020) =
272
  * Fix - Dashboard page broken and couldn't render [wpuf_account], [wpuf_sub_pack], [wpuf_dashboard] shortcodes
273
 
templates/dashboard/billing-address.php CHANGED
@@ -88,6 +88,11 @@ if ( isset( $_POST['update_billing_address'] ) ) {
88
  <?php
89
  $states = $cs->getStates( $selected['country'] );
90
  $selected['state'] = ! ( empty( $address_fields['state'] ) ) ? $address_fields['state'] : '';
 
 
 
 
 
91
  echo wp_kses( wpuf_select( [
92
  'options' => $states,
93
  'name' => 'wpuf_biiling_state',
@@ -121,7 +126,7 @@ if ( isset( $_POST['update_billing_address'] ) ) {
121
  class="required">*</span></div>
122
  <div class="wpuf-fields">
123
  <input type="text" class="input" name="wpuf_biiling_add_line_1" id="wpuf_biiling_add_line_1"
124
- value="<?php echo esc_attr( $address_fields['add_line_1'] ); ?>"/>
125
  </div>
126
  </li>
127
 
@@ -129,7 +134,7 @@ if ( isset( $_POST['update_billing_address'] ) ) {
129
  <div class="wpuf-label"><?php esc_html_e( 'Address Line 2 ', 'wp-user-frontend' ); ?></div>
130
  <div class="wpuf-fields">
131
  <input type="text" class="input" name="wpuf_biiling_add_line_2" id="wpuf_biiling_add_line_2"
132
- value="<?php echo esc_attr( $address_fields['add_line_2'] ); ?>"/>
133
  </div>
134
  </li>
135
 
@@ -138,7 +143,7 @@ if ( isset( $_POST['update_billing_address'] ) ) {
138
  class="required">*</span></div>
139
  <div class="wpuf-fields">
140
  <input type="text" class="input" name="wpuf_biiling_city" id="wpuf_biiling_city"
141
- value="<?php echo esc_attr( $address_fields['city'] ); ?>"/>
142
  </div>
143
  </li>
144
 
@@ -147,7 +152,7 @@ if ( isset( $_POST['update_billing_address'] ) ) {
147
  class="required">*</span></div>
148
  <div class="wpuf-fields">
149
  <input type="text" class="input" name="wpuf_biiling_zip_code" id="wpuf_biiling_zip_code"
150
- value="<?php echo esc_attr( $address_fields['zip_code'] ); ?>"/>
151
  </div>
152
  </li>
153
 
88
  <?php
89
  $states = $cs->getStates( $selected['country'] );
90
  $selected['state'] = ! ( empty( $address_fields['state'] ) ) ? $address_fields['state'] : '';
91
+ $add_line_1 = isset( $address_fields['add_line_1'] ) ? esc_attr( $address_fields['add_line_1'] ) : '';
92
+ $add_line_2 = isset( $address_fields['add_line_2'] ) ? esc_attr( $address_fields['add_line_2'] ) : '';
93
+ $city = isset( $address_fields['city'] ) ? esc_attr( $address_fields['city'] ) : '';
94
+ $zip_code = isset( $address_fields['zip_code'] ) ? esc_attr( $address_fields['zip_code'] ) : '';
95
+
96
  echo wp_kses( wpuf_select( [
97
  'options' => $states,
98
  'name' => 'wpuf_biiling_state',
126
  class="required">*</span></div>
127
  <div class="wpuf-fields">
128
  <input type="text" class="input" name="wpuf_biiling_add_line_1" id="wpuf_biiling_add_line_1"
129
+ value="<?php echo $add_line_1; ?>"/>
130
  </div>
131
  </li>
132
 
134
  <div class="wpuf-label"><?php esc_html_e( 'Address Line 2 ', 'wp-user-frontend' ); ?></div>
135
  <div class="wpuf-fields">
136
  <input type="text" class="input" name="wpuf_biiling_add_line_2" id="wpuf_biiling_add_line_2"
137
+ value="<?php echo $add_line_2; ?>"/>
138
  </div>
139
  </li>
140
 
143
  class="required">*</span></div>
144
  <div class="wpuf-fields">
145
  <input type="text" class="input" name="wpuf_biiling_city" id="wpuf_biiling_city"
146
+ value="<?php echo $city; ?>"/>
147
  </div>
148
  </li>
149
 
152
  class="required">*</span></div>
153
  <div class="wpuf-fields">
154
  <input type="text" class="input" name="wpuf_biiling_zip_code" id="wpuf_biiling_zip_code"
155
+ value="<?php echo $zip_code; ?>"/>
156
  </div>
157
  </li>
158
 
wpuf.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP User Frontend
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: weDevs
7
- Version: 3.5.5
8
  Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
9
  License: GPL2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -12,7 +12,7 @@ Text Domain: wp-user-frontend
12
  Domain Path: /languages
13
  */
14
 
15
- define( 'WPUF_VERSION', '3.5.5' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', __DIR__ );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: weDevs
7
+ Version: 3.5.6
8
  Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
9
  License: GPL2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  Domain Path: /languages
13
  */
14
 
15
+ define( 'WPUF_VERSION', '3.5.6' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', __DIR__ );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );