User registration & user profile – Profile Builder - Version 2.0.4

Version Description

Added $account_name as a parameter in the wppb_register_success_message filter Fixed typo in password strength meeter.

Download this release

Release Info

Developer reflectionmedia
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

assets/css/style-back-end.css CHANGED
@@ -69,6 +69,15 @@
69
  background:url(../images/logo_free.png) center 20px no-repeat #d54e21;
70
  }
71
 
 
 
 
 
 
 
 
 
 
72
  /* Extra Stuff */
73
  .nowrap {
74
  white-space: nowrap;
69
  background:url(../images/logo_free.png) center 20px no-repeat #d54e21;
70
  }
71
 
72
+ /* Userlist page */
73
+ .wppb-ul-templates > textarea,
74
+ .wppb-single-ul-templates > textarea {
75
+ float: left;
76
+ width: 60%;
77
+ max-width: 100%;
78
+ height: 400px;
79
+ }
80
+
81
  /* Extra Stuff */
82
  .nowrap {
83
  white-space: nowrap;
assets/lib/class_notices.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class that adds a misc notice
4
+ *
5
+ * @since v.2.0
6
+ *
7
+ * @return void
8
+ */
9
+ class WPPB_Add_General_Notices{
10
+ public $notificationId = '';
11
+ public $notificationMessage = '';
12
+ public $notificationClass = '';
13
+ public $startDate = '';
14
+ public $endDate = '';
15
+
16
+ function __construct( $notificationId, $notificationMessage, $notificationClass = 'updated' , $startDate = '', $endDate = '' ){
17
+ $this->notificationId = $notificationId;
18
+ $this->notificationMessage = $notificationMessage;
19
+ $this->notificationClass = $notificationClass;
20
+
21
+ if( !empty( $startDate ) && time() < strtotime( $startDate ) )
22
+ return;
23
+
24
+ if( !empty( $endDate ) && time() > strtotime( $endDate ) )
25
+ return;
26
+
27
+ add_action( 'admin_notices', array( $this, 'add_admin_notice' ) );
28
+ add_action( 'admin_init', array( $this, 'dismiss_notification' ) );
29
+ }
30
+
31
+
32
+ // Display a notice that can be dismissed in case the serial number is inactive
33
+ function add_admin_notice() {
34
+ global $current_user ;
35
+ global $pagenow;
36
+
37
+ $user_id = $current_user->ID;
38
+ do_action( $this->notificationId.'_before_notification_displayed', $current_user, $pagenow );
39
+
40
+ if ( current_user_can( 'manage_options' ) ){
41
+ // Check that the user hasn't already clicked to ignore the message
42
+ if ( ! get_user_meta($user_id, $this->notificationId.'_dismiss_notification' ) ) {
43
+ echo $finalMessage = apply_filters($this->notificationId.'_notification_message','<div class="'. $this->notificationClass .'" >'.$this->notificationMessage.'</div>', $this->notificationMessage);
44
+ }
45
+ do_action( $this->notificationId.'_notification_displayed', $current_user, $pagenow );
46
+ }
47
+ do_action( $this->notificationId.'_after_notification_displayed', $current_user, $pagenow );
48
+ }
49
+
50
+ function dismiss_notification() {
51
+ global $current_user;
52
+
53
+ $user_id = $current_user->ID;
54
+
55
+ do_action( $this->notificationId.'_before_notification_dismissed', $current_user );
56
+
57
+ // If user clicks to ignore the notice, add that to their user meta
58
+ if ( isset( $_GET[$this->notificationId.'_dismiss_notification']) && '0' == $_GET[$this->notificationId.'_dismiss_notification'] )
59
+ add_user_meta( $user_id, $this->notificationId.'_dismiss_notification', 'true', true );
60
+
61
+ do_action( $this->notificationId.'_after_notification_dismissed', $current_user );
62
+ }
63
+ }
64
+ ?>
assets/lib/wck-api/wordpress-creation-kit.php CHANGED
@@ -412,7 +412,7 @@ class Wordpress_Creation_Kit_PB{
412
  $list .= '" post="'.esc_attr($id).'">';
413
 
414
 
415
- if($results != null){
416
  $list .= apply_filters( 'wck_metabox_content_header_'.$meta , '<thead><tr><th class="wck-number">#</th><th class="wck-content">'. __( 'Content', 'wck' ) .'</th><th class="wck-edit">'. __( 'Edit', 'wck' ) .'</th><th class="wck-delete">'. __( 'Delete', 'wck' ) .'</th></tr></thead>' );
417
  $i=0;
418
  foreach ($results as $result){
412
  $list .= '" post="'.esc_attr($id).'">';
413
 
414
 
415
+ if( !empty( $results ) ){
416
  $list .= apply_filters( 'wck_metabox_content_header_'.$meta , '<thead><tr><th class="wck-number">#</th><th class="wck-content">'. __( 'Content', 'wck' ) .'</th><th class="wck-edit">'. __( 'Edit', 'wck' ) .'</th><th class="wck-delete">'. __( 'Delete', 'wck' ) .'</th></tr></thead>' );
417
  $i=0;
418
  foreach ($results as $result){
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
- Version: 2.0.3
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel
8
  Author URI: http://www.cozmoslabs.com/
9
  License: GPL2
@@ -52,7 +52,7 @@ function wppb_return_bytes( $val ) {
52
  *
53
  *
54
  */
55
- define( 'PROFILE_BUILDER_VERSION', '2.0.3' );
56
  define( 'WPPB_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
57
  define( 'WPPB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
58
  define( 'WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', apply_filters( 'wppb_server_max_upload_size_byte_constant', wppb_return_bytes( ini_get( 'upload_max_filesize') ) ) );
@@ -62,6 +62,9 @@ define( 'WPPB_SERVER_MAX_POST_SIZE_MEGA', apply_filters( 'wppb_server_max_post_s
62
  define( 'WPPB_TRANSLATE_DIR', WPPB_PLUGIN_DIR.'/translation' );
63
  define( 'WPPB_TRANSLATE_DOMAIN', 'profilebuilder' );
64
 
 
 
 
65
 
66
  if ( file_exists ( WPPB_PLUGIN_DIR.'/modules/modules.php' ) )
67
  define( 'PROFILE_BUILDER', 'Profile Builder Pro' );
@@ -149,4 +152,11 @@ if ( file_exists ( WPPB_PLUGIN_DIR.'/update/update-checker.php' ) ){
149
 
150
  // these settings are important, so besides running them on page load, we also need to do a check on plugin activation
151
  register_activation_hook( __FILE__, 'wppb_generate_default_settings_defaults' ); //prepoulate general settings
152
- register_activation_hook( __FILE__, 'wppb_prepopulate_fields' ); //prepopulate manage fields list
 
 
 
 
 
 
 
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
+ Version: 2.0.4
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel
8
  Author URI: http://www.cozmoslabs.com/
9
  License: GPL2
52
  *
53
  *
54
  */
55
+ define( 'PROFILE_BUILDER_VERSION', '2.0.4' );
56
  define( 'WPPB_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
57
  define( 'WPPB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
58
  define( 'WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', apply_filters( 'wppb_server_max_upload_size_byte_constant', wppb_return_bytes( ini_get( 'upload_max_filesize') ) ) );
62
  define( 'WPPB_TRANSLATE_DIR', WPPB_PLUGIN_DIR.'/translation' );
63
  define( 'WPPB_TRANSLATE_DOMAIN', 'profilebuilder' );
64
 
65
+ /* include notices class */
66
+ if ( file_exists ( WPPB_PLUGIN_DIR.'/assets/lib/class_notices.php' ) )
67
+ include_once(WPPB_PLUGIN_DIR . '/assets/lib/class_notices.php' );
68
 
69
  if ( file_exists ( WPPB_PLUGIN_DIR.'/modules/modules.php' ) )
70
  define( 'PROFILE_BUILDER', 'Profile Builder Pro' );
152
 
153
  // these settings are important, so besides running them on page load, we also need to do a check on plugin activation
154
  register_activation_hook( __FILE__, 'wppb_generate_default_settings_defaults' ); //prepoulate general settings
155
+ register_activation_hook( __FILE__, 'wppb_prepopulate_fields' ); //prepopulate manage fields list
156
+
157
+ /* Add a halloween notice */
158
+ new WPPB_Add_General_Notices( 'wppb_halloween',
159
+ sprintf( __( '<p style="position:relative;">Halloween treat: 30&#37; OFF on all Profile Builder purchases 29 - 30 -31 October over at %1$swww.cozmslabs.com%2$s Get your discount code! %3$sDismiss%4$s</p>', 'profilebuilder'), "<a href='http://www.cozmoslabs.com/' target='_blank' class='button-primary'>", "</a>", "<a href='". add_query_arg( 'wppb_halloween_dismiss_notification', '0' ) ."' class='wppb-dismiss-notification' style='position: absolute;right: 0;top: 50%;margin-top: -7px;'>", "</a>" ),
160
+ 'updated halloween',
161
+ '28 October 2014',
162
+ '1 November 2014' );
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: registration, user profile, user registration, custom field registration,
6
 
7
  Requires at least: 3.1
8
  Tested up to: 4.0
9
- Stable tag: 2.0.3
10
 
11
  Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
12
 
@@ -102,6 +102,10 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
102
  9. Recover Password Page
103
 
104
  == Changelog ==
 
 
 
 
105
  = 2.0.3 =
106
  Fixed bug that made radio buttons field types not to throw error when they are required
107
  Fixed XSS security vulnerability in fallback-page.php
6
 
7
  Requires at least: 3.1
8
  Tested up to: 4.0
9
+ Stable tag: 2.0.4
10
 
11
  Simple to use profile plugin allowing front-end login, user registration and edit profile by using shortcodes.
12
 
102
  9. Recover Password Page
103
 
104
  == Changelog ==
105
+ = 2.0.4 =
106
+ Added $account_name as a parameter in the wppb_register_success_message filter
107
+ Fixed typo in password strength meeter.
108
+
109
  = 2.0.3 =
110
  Fixed bug that made radio buttons field types not to throw error when they are required
111
  Fixed XSS security vulnerability in fallback-page.php