' . __('Activate', 'profile-builder') . '';
// If add-on is network activated don't allow deactivation
} elseif (!$pms_add_on_is_network_active) {
echo '' . __('Deactivate', 'profile-builder') . '';
}
// Display message to the user
if( !$pms_add_on_is_active ){
echo '' . __('Plugin is inactive', 'profile-builder') . '';
} else {
echo '' . __('Plugin is active', 'profile-builder') . '';
}
} else {
// If we're on a multisite don't add the wpp-add-on-download class to the button so we don't fire the js that
// handles the in-page download
if (is_multisite()) {
$wppb_paid_link_class = 'button-primary';
$wppb_paid_link_text = __('Download Now', 'profile-builder' );
} else {
$wppb_paid_link_class = 'button-primary wppb-add-on-download';
$wppb_paid_link_text = __('Install Now', 'profile-builder');
}
echo '' . $wppb_paid_link_text . '';
echo '' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '';
}
?>
install manually.', 'profile-builder'), esc_url( 'http://www.wordpress.org/plugins/paid-member-subscriptions' )) ?>.
Setting up Paid Member Subscriptions opens the door to paid user accounts.
Create Subscription Plans
With Paid Member Subscriptions it’s fairly easy to create tiered subscription plans for your users.
Adding a new subscription gives you access to the following options to set up: subscription name, description, duration, the price, status and user role.
Add Subscriptions field to Profile Builder -> Manage Fields
The new Subscription Plans field will add a list of radio buttons with membership details to Profile Builder registration forms.
Start getting user payments
To finalize registration for a paid account, users will need to complete the payment.
Members created with Profile Builder registration form will have the user role of the selected subscription.
' . __('Activate', 'profile-builder') . '';
// If add-on is network activated don't allow deactivation
} elseif (!$pms_add_on_is_network_active) {
echo '' . __('Deactivate', 'profile-builder') . '';
}
// Display message to the user
if( !$pms_add_on_is_active ){
echo '' . __('Plugin is inactive', 'profile-builder') . '';
} else {
echo '' . __('Plugin is active', 'profile-builder') . '';
}
} else {
// If we're on a multisite don't add the wpp-add-on-download class to the button so we don't fire the js that
// handles the in-page download
if (is_multisite()) {
$wppb_paid_link_class = 'button-secondary';
$wppb_paid_link_text = __('Download Now', 'profile-builder' );
} else {
$wppb_paid_link_class = 'button-secondary wppb-add-on-download';
$wppb_paid_link_text = __('Install Now', 'profile-builder');
}
echo '' . $wppb_paid_link_text . '';
echo '' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '';
}
?>
install manually.', 'profile-builder'), esc_url( 'http://www.wordpress.org/plugins/paid-member-subscriptions' )) ?>. */ ?>
paid accounts with Profile Builder. %1$sFind out how >%2$s %3$sDismiss%4$s', 'profile-builder'), "", "", "", ""),
'pms-cross-promo');
}
admin/manage-fields.php 0000666 00000262025 15214165110 0011050 0 ustar 00 __('Form Fields', 'profile-builder'),
'page_title' => __('Manage Form Fields', 'profile-builder'),
'menu_slug' => 'manage-fields',
'page_type' => 'submenu_page',
'capability' => 'manage_options',
'priority' => 5,
'parent_slug' => 'profile-builder'
);
$manage_fields_page = new WCK_Page_Creator_PB($args);
}
add_action( 'admin_menu', 'wppb_manage_fields_submenu', 1 );
function wppb_populate_manage_fields(){
$manage_field_types = array(
'optgroups' => array(
'default' =>
array(
'label' => __('Default'),
'options' => array(
'Default - Name (Heading)',
'Default - Contact Info (Heading)',
'Default - About Yourself (Heading)',
'Default - Username',
'Default - First Name',
'Default - Last Name',
'Default - Nickname',
'Default - E-mail',
'Default - Website',
'Default - Password',
'Default - Repeat Password',
'Default - Biographical Info',
'Default - Display name publicly as',
),
),
'standard' =>
array(
'label' => __('Standard'),
'options' => array(),
),
'advanced' =>
array(
'label' => __('Advanced'),
'options' => array(),
),
'other' =>
array(
'label' => __('Other'),
'options' => array(
'GDPR Checkbox', // since 2.8.2
'GDPR Delete Button', // since 3.0.1
),
),
),
);
// Default contact methods were removed in WP 3.6. A filter dictates contact methods.
if ( apply_filters( 'wppb_remove_default_contact_methods', get_site_option( 'initial_db_version' ) < 23588 ) ){
$manage_field_types['optgroups']['default']['options'][] = 'Default - AIM';
$manage_field_types['optgroups']['default']['options'][] = 'Default - Yahoo IM';
$manage_field_types['optgroups']['default']['options'][] = 'Default - Jabber / Google Talk';
}
if ( wppb_can_users_signup_blog() ) {
$manage_field_types['optgroups']['advanced']['options'][] = 'Default - Blog Details';
}
if( PROFILE_BUILDER != 'Profile Builder Free' ) {
$manage_field_types['optgroups']['standard']['options'][] = 'Heading';
$manage_field_types['optgroups']['standard']['options'][] = 'Input';
$manage_field_types['optgroups']['standard']['options'][] = 'Number';
$manage_field_types['optgroups']['standard']['options'][] = 'Input (Hidden)';
$manage_field_types['optgroups']['standard']['options'][] = 'Textarea';
$manage_field_types['optgroups']['standard']['options'][] = 'WYSIWYG';
$manage_field_types['optgroups']['standard']['options'][] = 'Select';
$manage_field_types['optgroups']['standard']['options'][] = 'Select (Multiple)';
$manage_field_types['optgroups']['standard']['options'][] = 'Checkbox';
$manage_field_types['optgroups']['standard']['options'][] = 'Radio';
$manage_field_types['optgroups']['standard']['options'][] = 'HTML';
$manage_field_types['optgroups']['standard']['options'][] = 'Upload';
$manage_field_types['optgroups']['standard']['options'][] = 'Avatar';
$manage_field_types['optgroups']['advanced']['options'][] = 'Phone';
$manage_field_types['optgroups']['advanced']['options'][] = 'Select (Country)';
$manage_field_types['optgroups']['advanced']['options'][] = 'Select (Timezone)';
$manage_field_types['optgroups']['advanced']['options'][] = 'Select (Currency)';
$manage_field_types['optgroups']['advanced']['options'][] = 'Select (CPT)';
$manage_field_types['optgroups']['advanced']['options'][] = 'Checkbox (Terms and Conditions)';
$manage_field_types['optgroups']['advanced']['options'][] = 'Datepicker';
$manage_field_types['optgroups']['advanced']['options'][] = 'Timepicker';
$manage_field_types['optgroups']['advanced']['options'][] = 'Colorpicker';
$manage_field_types['optgroups']['advanced']['options'][] = 'Validation';
$manage_field_types['optgroups']['advanced']['options'][] = 'Map';
$manage_field_types['optgroups']['other']['options'][] = 'Email';
$manage_field_types['optgroups']['other']['options'][] = 'URL';
}
/* added recaptcha and user role field since version 2.6.2 */
$manage_field_types['optgroups']['advanced']['options'][] = 'reCAPTCHA';
$manage_field_types['optgroups']['advanced']['options'][] = 'Select (User Role)';
$manage_field_types['optgroups']['other']['options'] = apply_filters( 'wppb_manage_fields_types', $manage_field_types['optgroups']['other']['options'] );
$manage_field_types = apply_filters( 'wppb_all_manage_fields_types', $manage_field_types );
//Free to Pro call to action on Manage Fields page
$field_description = __('Choose one of the supported field types','profile-builder');
if( PROFILE_BUILDER == 'Profile Builder Free' ) {
$field_description .= sprintf( __('. Extra Field Types are available in Hobbyist or PRO versions.' , 'profile-builder'), esc_url( 'https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wpbackend&utm_medium=clientsite&utm_content=manage-fields-link&utm_campaign=PBFree' ) );
}
//user roles
global $wp_roles;
// @TODO - The block below could use refactoring, see new function wppb_prepare_key_value_options.
$user_roles = array();
foreach( $wp_roles->roles as $user_role_slug => $user_role )
if( $user_role_slug !== 'administrator' )
array_push( $user_roles, '%' . wppb_prepare_wck_labels( $user_role['name'] ) . '%' . $user_role_slug );
// @TODO - The block below could use refactoring, see new function wppb_prepare_key_value_options.
// country select
$default_country_array = wppb_country_select_options( 'back_end' );
foreach( $default_country_array as $iso_country_code => $country_name ) {
$default_country_options[] = '%'. wppb_prepare_wck_labels( $country_name ) .'%'.$iso_country_code;
}
// @TODO - The block below could use refactoring, see new function wppb_prepare_key_value_options.
// currency select
$default_currency_array = wppb_get_currencies( 'back_end' );
array_unshift( $default_currency_array, '' );
foreach( $default_currency_array as $iso_currency_code => $currency_name ) {
$default_currency_options[] = '%'. wppb_prepare_wck_labels( $currency_name ) .'%'.$iso_currency_code;
}
//cpt select
$post_types = get_post_types( array( 'public' => true ), 'names' );
if( apply_filters( 'wppb_update_field_meta_key_in_db', false ) ) {
$meta_key_description = __( 'Use this in conjunction with WordPress functions to display the value in the page of your choosing Auto-completed but in some cases editable (in which case it must be unique) Changing this might take long in case of a very big user-count', 'profile-builder' );
}
else{
$meta_key_description = __( 'Use this in conjunction with WordPress functions to display the value in the page of your choosing Auto-completed but in some cases editable (in which case it must be unique) Changing this will only affect subsequent entries', 'profile-builder' );
}
// Initiate the list of available tags for the pin bubble.
if( function_exists( 'wppb_generate_userlisting_merge_tags' ) ) {
$bubble_meta_tags = wppb_generate_userlisting_merge_tags('meta');
$bubble_meta_tags = wp_list_pluck($bubble_meta_tags, 'label', 'name');
}
else
$bubble_meta_tags = array();
// set up the fields array
$fields = apply_filters( 'wppb_manage_fields', array(
array( 'type' => 'text', 'slug' => 'field-title', 'title' => __( 'Field Title', 'profile-builder' ), 'description' => __( 'Title of the field', 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'field', 'title' => __( 'Field', 'profile-builder' ), 'options' => apply_filters( 'wppb_manage_fields_types_options', $manage_field_types ), 'default-option' => true, 'description' => $field_description ),
array( 'type' => 'text', 'slug' => 'meta-name', 'title' => __( 'Meta-name', 'profile-builder' ), 'default' => wppb_get_meta_name(), 'description' => $meta_key_description ),
array( 'type' => 'text', 'slug' => 'id', 'title' => __( 'ID', 'profile-builder' ), 'default' => wppb_get_unique_id(), 'description' => __( "A unique, auto-generated ID for this particular field You can use this in conjuction with filters to target this element if needed Can't be edited", 'profile-builder' ), 'readonly' => true ),
array( 'type' => 'textarea', 'slug' => 'description', 'title' => __( 'Description', 'profile-builder' ), 'description' => __( 'Enter a (detailed) description of the option for end users to read Optional', 'profile-builder') ),
array( 'type' => 'text', 'slug' => 'row-count', 'title' => __( 'Row Count', 'profile-builder' ), 'default' => 5, 'description' => __( "Specify the number of rows for a 'Textarea' field If not specified, defaults to 5", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'allowed-image-extensions', 'title' => __( 'Allowed Image Extensions', 'profile-builder' ), 'default' => '.*', 'description' => __( 'Specify the extension(s) you want to limit to upload Example: .ext1,.ext2,.ext3 If not specified, defaults to: .jpg,.jpeg,.gif,.png (.*)', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'allowed-upload-extensions', 'title' => __( 'Allowed Upload Extensions', 'profile-builder' ), 'default' => '.*', 'description' => __( 'Specify the extension(s) you want to limit to upload Example: .ext1,.ext2,.ext3 If not specified, defaults to all WordPress allowed file extensions (.*)', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'avatar-size', 'title' => __( 'Avatar Size', 'profile-builder' ), 'default' => 100, 'description' => __( "Enter a value (between 20 and 200) for the size of the 'Avatar' If not specified, defaults to 100", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'date-format', 'title' => __( 'Date-format', 'profile-builder' ), 'default' => 'mm/dd/yy', 'description' => __( 'Specify the format of the date when using Datepicker Valid options: mm/dd/yy, mm/yy/dd, dd/yy/mm, dd/mm/yy, yy/dd/mm, yy/mm/dd, mm-dd-yy, yy-mm-dd, D, dd M yy, D, d M y, DD, dd-M-y, D, d M yy, mm/yy, mm/dd, dd/mm, @ If not specified, defaults to mm/dd/yy', 'profile-builder' ) ),
array( 'type' => 'textarea', 'slug' => 'terms-of-agreement', 'title' => __( 'Terms of Agreement', 'profile-builder' ), 'description' => __( 'Enter a detailed description of the temrs of agreement for the user to read. Links can be inserted by using standard HTML syntax: <a href="custom_url">custom_text</a>', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'options', 'title' => __( 'Options', 'profile-builder' ), 'description' => __( "Enter a comma separated list of values This can be anything, as it is hidden from the user, but should not contain special characters or apostrophes", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'labels', 'title' => __( 'Labels', 'profile-builder' ), 'description' => __( "Enter a comma separated list of labels Visible for the user", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'recaptcha-type', 'title' => __( 'reCAPTCHA Type', 'profile-builder' ), 'options' => array('%reCAPTCHA V2%v2', '%Invisible reCAPTCHA%invisible'), 'default' => 'v2', 'description' => __( 'Choose the type of reCAPTCHA you wish to add to this site.', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'public-key', 'title' => __( 'Site Key', 'profile-builder' ), 'description' => __( 'The site key from Google, www.google.com/recaptcha', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'private-key', 'title' => __( 'Secret Key', 'profile-builder' ), 'description' => __( 'The secret key from Google, www.google.com/recaptcha', 'profile-builder' ) ),
array( 'type' => 'checkbox', 'slug' => 'captcha-pb-forms', 'title' => __( 'Display on PB forms', 'profile-builder' ), 'options' => array( '%'.__('PB Login','profile-builder').'%'.'pb_login', '%'.__('PB Register','profile-builder').'%'.'pb_register', '%'.__('PB Recover Password','profile-builder').'%'.'pb_recover_password' ), 'default' => 'pb_register', 'description' => __( "Select on which Profile Builder forms to display reCAPTCHA", 'profile-builder' ) ),
array( 'type' => 'checkbox', 'slug' => 'captcha-wp-forms', 'title' => __( 'Display on default WP forms', 'profile-builder' ), 'options' => array( '%'.__('Default WP Login', 'profile-builder').'%'.'default_wp_login', '%'.__('Default WP Register', 'profile-builder').'%'.'default_wp_register', '%'.__('Default WP Recover Password', 'profile-builder').'%'.'default_wp_recover_password'), 'default' => 'default_wp_register', 'description' => __( "Select on which default WP forms to display reCAPTCHA", 'profile-builder' ) ),
array( 'type' => 'checkbox', 'slug' => 'user-roles', 'title' => __( 'User Roles', 'profile-builder' ), 'options' => $user_roles, 'description' => __( "Select which user roles to show to the user ( drag and drop to re-order )", 'profile-builder' ) ),
array( 'type' => 'checkbox', 'slug' => 'user-roles-on-edit-profile', 'title' => __( 'Display on Edit Profile', 'profile-builder' ), 'options' => array('%Yes%yes'), 'description' => __( "Check if you want the select user role field to appear on Edit Profile forms", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'user-roles-sort-order', 'title' => __( 'User Roles Order', 'profile-builder' ), 'description' => __( "Save the user role order from the user roles checkboxes", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'default-value', 'title' => __( 'Default Value', 'profile-builder' ), 'description' => __( "Default value of the field", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'default-option', 'title' => __( 'Default Option', 'profile-builder' ), 'description' => __( "Specify the option which should be selected by default", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'default-options', 'title' => __( 'Default Option(s)', 'profile-builder' ), 'description' => __( "Specify the option which should be checked by default If there are multiple values, separate them with a ',' (comma)", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'default-option-country', 'title' => __( 'Default Option', 'profile-builder' ), 'options' => ( isset( $default_country_options ) ) ? $default_country_options : '', 'description' => __( "Default option of the field", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'default-option-timezone', 'title' => __( 'Default Option', 'profile-builder' ), 'options' => wppb_timezone_select_options( 'back_end' ), 'description' => __( "Default option of the field", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'default-option-currency', 'title' => __( 'Default Option', 'profile-builder' ), 'options' => ( isset( $default_currency_options ) ) ? $default_currency_options : '', 'description' => __( "Default option of the field", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'show-currency-symbol', 'title' => __( 'Show Currency Symbol', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the currency symbol should be displayed after the currency name in the select option.', 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'cpt', 'title' => __( 'Show Post Type', 'profile-builder' ), 'options' => $post_types, 'default' => 'post', 'description' => __( 'Posts from what post type will be displayed in the select.', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'validation-possible-values', 'title' => __( 'Allowable Values', 'profile-builder' ), 'description' => __( "Enter a comma separated list of possible values. Upon registration if the value provided by the user does not match one of these values, the user will not be registered.", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'custom-error-message', 'title' => __( 'Error Message', 'profile-builder' ), 'description' => __( "Set a custom error message that will be displayed to the user.", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'time-format', 'title' => __( 'Time Format', 'profile-builder' ), 'options' => array( '%12 Hours%12', '%24 Hours%24' ), 'description' => __( 'Specify the time format.', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'map-api-key', 'title' => __( 'Google Maps API Key', 'profile-builder' ), 'description' => __( 'Enter your Google Maps API key ( Get your API key ). If more than one map fields are added to a form the API key from the first map displayed will be used.', 'profile-builder' ) ),
array(
'type' => 'text',
'slug' => 'map-default-lat',
'title' => __( 'Default Latitude', 'profile-builder' ),
'description' => __( 'The latitude at which the map should be displayed when no pins are attached.', 'profile-builder' ),
'default' => WPPB_DEFAULTS_MAP_LAT,
),
array(
'type' => 'text',
'slug' => 'map-default-lng',
'title' => __( 'Default Longitude', 'profile-builder' ),
'description' => __( 'The longitude at which the map should be displayed when no pins are attached.', 'profile-builder' ),
'default' => WPPB_DEFAULTS_MAP_LNG,
),
array(
'type' => 'text',
'slug' => 'map-default-zoom',
'title' => __( 'Default Zoom Level', 'profile-builder' ),
'description' => __( 'Add a number from 0 to 19. The higher the number the higher the zoom.', 'profile-builder' ),
'default' => WPPB_DEFAULTS_MAP_ZOOM,
),
array( 'type' => 'text', 'slug' => 'map-height', 'title' => __( 'Map Height', 'profile-builder' ), 'description' => __( "The height of the map.", 'profile-builder' ), 'default' => 400 ),
array( 'type' => 'textarea', 'slug' => 'default-content', 'title' => __( 'Default Content', 'profile-builder' ), 'description' => __( "Default value of the textarea", 'profile-builder' ) ),
array( 'type' => 'textarea', 'slug' => 'html-content', 'title' => __( 'HTML Content', 'profile-builder' ), 'description' => __( "Add your HTML (or text) content", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'phone-format', 'title' => __( 'Phone Format', 'profile-builder' ), 'default' => '(###) ###-####', 'description' => __( "You can use: # for numbers, parentheses ( ), - sign, + sign, dot . and spaces.", 'profile-builder' ) .' '. __( "Eg. (###) ###-####", 'profile-builder' ) .' '. __( "Empty field won't check for correct phone number.", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'heading-tag', 'title' => __( 'Heading Tag', 'profile-builder' ), 'options' => array( '%h1 - biggest size%h1', 'h2', 'h3', 'h4', 'h5', '%h6 - smallest size%h6' ), 'default' => 'h4', 'description' => __( 'Change heading field size on front-end forms', 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'min-number-value', 'title' => __( 'Min Number Value', 'profile-builder' ), 'description' => __( "Min allowed number value (0 to allow only positive numbers)", 'profile-builder' ) .' '. __( "Leave it empty for no min value", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'max-number-value', 'title' => __( 'Max Number Value', 'profile-builder' ), 'description' => __( "Max allowed number value (0 to allow only negative numbers)", 'profile-builder' ) .' '. __( "Leave it empty for no max value", 'profile-builder' ) ),
array( 'type' => 'text', 'slug' => 'number-step-value', 'title' => __( 'Number Step Value', 'profile-builder' ), 'description' => __( "Step value 1 to allow only integers, 0.1 to allow integers and numbers with 1 decimal", 'profile-builder' ) .' '. __( "To allow multiple decimals use for eg. 0.01 (for 2 deciamls) and so on", 'profile-builder' ) .' '. __( "You can also use step value to specify the legal number intervals (eg. step value 2 will allow only -4, -2, 0, 2 and so on)", 'profile-builder' ) .' '. __( "Leave it empty for no restriction", 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'required', 'title' => __( 'Required', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( 'Whether the field is required or not', 'profile-builder' ) ),
array( 'type' => 'select', 'slug' => 'overwrite-existing', 'title' => __( 'Overwrite Existing', 'profile-builder' ), 'options' => array( 'No', 'Yes' ), 'default' => 'No', 'description' => __( "Selecting 'Yes' will add the field to the list, but will overwrite any other field in the database that has the same meta-name Use this at your own risk", 'profile-builder' ) ),
// Added the new option for the map field type, that allows to customize the POIs load type.
array(
'type' => 'select',
'slug' => 'map-pins-load-type',
'title' => __( 'POIs Load Type', 'profile-builder' ),
'options' => array(
'%' . __( 'POIs of the listed users (as filtered & paginated)', 'profile-builder' ) . '%',
'%' . __( 'POIs of all the users for the filter* (no pagination)', 'profile-builder' ) . '%all',
),
'default' => '',
'description' => __( 'This option allows you to load on a single map the POIs for all users, or just these for the listed ones (this will take into account the filters and the faceted menus). *Please use this feature wisely, it will impact the performance.', 'profile-builder' ),
),
// Added the new option for the map field type, that allows to customize the POI bubble content.
array(
'type' => 'checkbox',
'slug' => 'map-bubble-fields',
'title' => __( 'POI Bubble Info', 'profile-builder' ),
'options' => wppb_prepare_key_value_options( apply_filters( 'wppb_map_bubble_fields', $bubble_meta_tags ) ),
'default' => 'avatar_or_gravatar, meta_display_name',
'description' => __( 'Select the attributes to be listed inside the POI bubble.', 'profile-builder' ),
'extra_attributes' => array(
'dropdown_options' => true,
'sortable_options' => true,
),
),
// Added the new option for the map field type, that allows to customize the number of users per iteration.
array(
'type' => 'text',
'slug' => 'map-pagination-number',
'title' => __( 'Number of Users per Map Iteration', 'profile-builder' ),
'description' => __( 'When loading the map of all users with no pagination, the map script will iterate multiple times and will expose gradually POIs on the map, until all the POIs for the users that match the criteria will be added on the map (think of this as of pagination for the map POIs). The smaller the number of users per iteration, the fastest the iteration response will be, but for a large number of users, the map script will iterate multiple times. Setting a higher limit will decrease the performance, but might produce a smaller number of iterations.
';
}
add_action( 'wck_metabox_content_header_wppb_manage_fields', 'wppb_manage_fields_header' );
/**
* Add contextual help to the side of manage fields for the shortcodes
*
* @since v.2.0
*
* @param $hook
*
* @return string
*/
function wppb_add_content_before_manage_fields(){
?>
[wppb-register]
[wppb-edit-profile]
[wppb-register role="author"]
wppb_disable_delete_on_default_mandatory_fields();";
if ( $meta_name == 'wppb_manage_fields' ) {
echo "";
echo "";
}
}
add_action("wck_after_adding_form", "wppb_remove_properties_from_added_form", 10, 3);
/*
* WPML Support for dynamic strings in Profile Builder. Tags: WPML, fields, translate
*/
add_filter( 'update_option_wppb_manage_fields', 'wppb_wpml_compat_with_fields', 10, 2 );
function wppb_wpml_compat_with_fields( $oldvalue, $_newvalue ){
$default_fields = array(
'Default - Name (Heading)',
'Default - Contact Info (Heading)',
'Default - About Yourself (Heading)',
'Default - Username',
'Default - First Name',
'Default - Last Name',
'Default - Nickname',
'Default - E-mail',
'Default - Website',
'Default - AIM',
'Default - Yahoo IM',
'Default - Jabber / Google Talk',
'Default - Password',
'Default - Repeat Password',
'Default - Biographical Info',
'Default - Blog Details',
'Default - Display name publicly as'
);
if ( is_array( $_newvalue ) ){
foreach ( $_newvalue as $field ){
if ( in_array($field['field'], $default_fields) ){
$prefix = 'default_field_';
} else {
$prefix = 'custom_field_';
}
if (function_exists('icl_register_string')){
if( !empty( $field['field-title'] ) )
icl_register_string('plugin profile-builder-pro', $prefix . $field['id'].'_title_translation' , $field['field-title'] );
if( !empty( $field['description'] ) )
icl_register_string('plugin profile-builder-pro', $prefix . $field['id'].'_description_translation', $field['description'] );
if( !empty( $field['labels'] ) )
icl_register_string('plugin profile-builder-pro', $prefix . $field['id'].'_labels_translation', $field['labels'] );
if( !empty( $field['default-value'] ) )
icl_register_string('plugin profile-builder-pro', $prefix . $field['id'].'_default_value_translation', $field['default-value'] );
if( !empty( $field['default-content'] ) )
icl_register_string('plugin profile-builder-pro', $prefix . $field['id'].'_default_content_translation', $field['default-content'] );
}
}
}
}
/*
* Returns the HTML for a map given the field
*
*/
function wppb_get_map_output( $field, $args ) {
$defaults = array(
'markers' => array(),
'editable' => true,
'show_search' => true,
'extra_attr' => ''
);
$args = wp_parse_args( $args, $defaults );
$return = '';
// Search box
// The style:left=-99999px is set to hide the input from the viewport. It will be rewritten when the map gets initialised
if ( $args['show_search'] ) {
$return .= '';
}
$lng = ( ! empty( $field['map-default-lng'] ) ) ? (float) $field['map-default-lng'] : WPPB_DEFAULTS_MAP_LNG;
$lat = ( ! empty( $field['map-default-lat'] ) ) ? (float) $field['map-default-lat'] : WPPB_DEFAULTS_MAP_LAT;
$zoom = ( ! empty( $field['map-default-zoom'] ) ) ? (int) $field['map-default-zoom'] : WPPB_DEFAULTS_MAP_ZOOM;
// Get one time the settings.
$settings = wppb_options_get_map_settings();
$pin_info = ( ! empty( $args['user_id'] ) ) ? wppb_compute_simple_pin_content_for_user( $args['user_id'], $settings ) : '';
// Map container.
$return .= '';
if ( ! empty( $args['markers'] ) ) {
foreach ( $args['markers'] as $marker ) {
if ( ! empty( $args['user_id'] ) ) {
// Also compute the marker bubble content.
$bubble = wppb_get_user_pin_bubble(
$args['user_id'],
strstr( $marker, ',', true ),
ltrim( strstr( $marker, ',' ), ',' ),
$pin_info,
''
);
$return .= $bubble;
}
$return .= '';
}
}
return $return;
}
/*
* Returns all the saved markers for a map field for a particular user
*
*/
function wppb_get_user_map_markers( $user_id, $meta_name ) {
global $wpdb;
$meta_name_underlined = $meta_name . '_';
$results = $wpdb->get_results( "SELECT meta_value, meta_key FROM {$wpdb->usermeta} WHERE user_id={$user_id} AND meta_key LIKE '%{$meta_name_underlined}%'", ARRAY_N );
$markers = array();
$i = 0;
foreach( $results as $key => $result ) {
$pattern = '/^' . $meta_name . '_[0-9]+$/';
preg_match( $pattern, $result[1], $matches );
if ( count ($matches) > 0 ) {
$markers[$i] = $result[0];
$i++;
}
}
return $markers;
}
/*
* Deletes from the database all saved markers
*
*/
function wppb_delete_user_map_markers( $user_id, $meta_name ) {
global $wpdb;
$meta_name .= '_';
$delete = $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->usermeta} WHERE user_id=%d AND meta_key LIKE %s", $user_id, '%' . $meta_name . '%' ) );
wp_cache_delete( $user_id, 'user_meta' );
}
if ( ! function_exists( 'wppb_options_get_map_settings' ) ) {
/**
* Get all the map related attributes.
*
* @return string
*/
function wppb_options_get_map_settings() {
$manage_fields = apply_filters(
'wppb_form_fields',
get_option( 'wppb_manage_fields', 'not_set' ),
array( 'context' => 'map_api_key' )
);
foreach ( $manage_fields as $field ) {
if ( ! empty( $field['map-api-key'] ) ) {
// Fail-fast. This is what we need.
return $field;
}
}
// Fallback.
return null;
}
}
if ( ! function_exists( 'wppb_get_user_pin_bubble' ) ) {
/**
* Returns the map usable marker info.
*
* @param integer $id The user ID.
* @param float $lat The latitude.
* @param float $lng The longitude.
* @param string $info The bubble inner info.
* @param string $icon The pin custom icon.
* @return string
*/
function wppb_get_user_pin_bubble( $id, $lat, $lng, $info, $icon = '' ) {
return '
' . wp_kses_post( $info ) . '
';
}
}
if ( ! function_exists( 'wppb_compute_simple_pin_content_for_user' ) ) {
/**
* Compute simple pin content for user.
*
* @param integer $id_user User ID.
* @param array $settings Settings array.
* @return string
*/
function wppb_compute_simple_pin_content_for_user( $id_user, $settings = array() ) {
if ( empty( $id_user ) ) {
// Fail-fast.
return '';
}
if ( empty( $settings ) ) {
// Get one time the settings.
$settings = wppb_options_get_map_settings();
}
$args = ( ! empty( $settings['map-bubble-fields'] ) ) ? explode( ', ', $settings['map-bubble-fields'] ) : array();
$result = '';
if ( ! empty( $args ) ) {
foreach ( $args as $tag ) {
// Go to souce.
if ( 'avatar_or_gravatar' == $tag ) {
$val = apply_filters( 'mustache_variable_avatar_or_gravatar', '', $tag, array(), array(
'user_id' => $id_user,
) );
} else {
$val = apply_filters( 'mustache_variable_default_user_field', '', $tag, array(), array(
'user_id' => $id_user,
) );
}
if ( ! empty( $val ) ) {
$result .= '
' . wp_kses_post( $val ) . '
';
}
}
}
return $result;
}
}
/**
* Disable the add button again after we added a field
*/
add_action( 'wck_ajax_add_form_wppb_manage_fields', 'wppb_redisable_the_add_button' );
function wppb_redisable_the_add_button(){
?>
update(
$wpdb->usermeta,
array('meta_key' => sanitize_text_field($values['meta-name'])),
array('meta_key' => sanitize_text_field($wppb_manage_fields[$element_id]['meta-name']))
);
}
}
}
}
}
if ( ! function_exists( 'wppb_prepare_key_value_options' ) ) {
/**
* Convert an array with keys and values into a usable option for the defined fields types.
*
* @param arrays $array List of options.
* @return array Usable options.
*/
function wppb_prepare_key_value_options( $array = array() ) {
$result = array();
if ( ! empty( $array ) ) {
foreach ( $array as $name => $label ) {
$result[] = '%' . wppb_prepare_wck_labels( $label ) . '%' . $name;
}
}
return $result;
}
}
if ( ! function_exists( 'wppb_filter_map_bubble_fields' ) ) {
/**
* Filter the map POI's bubble content.
*
* @param arrays $tags List of available tags.
* @return array Filtered and sorted tags.
*/
function wppb_filter_map_bubble_fields( $tags ) {
// Attempt to preseve one tag example.
$maybe_avatar = ( ! empty( $tags['avatar_or_gravatar'] ) ) ? $tags['avatar_or_gravatar'] : false;
// Remove some of the tags.
unset( $tags['meta_user_name'] );
unset( $tags['more_info_url'] );
unset( $tags['avatar_or_gravatar'] );
if ( ! empty( $maybe_avatar ) ) {
// Perhaps preprend this to the list.
$tags = array_merge( array( 'avatar_or_gravatar' => $maybe_avatar ), $tags );
}
return $tags;
}
}
add_filter( 'wppb_map_bubble_fields', 'wppb_filter_map_bubble_fields' );
admin/private-website.php 0000666 00000016414 15214165110 0011465 0 ustar 00 'no',
'redirect_to' => '',
'allowed_pages' => array(),
'hide_menus' => 'no',
)
);
}
/**
* Function that generates the content for the settings page
*/
function wppb_private_website_content() {
wppb_private_website_settings_defaults();
$wppb_private_website_settings = get_option( 'wppb_private_website_settings', 'not_found' );
$all_pages = get_pages();
?>
';
// PB minimum version number is all good
if ($wppb_version_validation != -1) {
// PB version type does match
if (in_array(strtolower($version), $wppb_add_on['product_version_type'])) {
if ($wppb_add_on_exists) {
// Display activate/deactivate buttons
if (!$wppb_add_on_is_active) {
echo '' . __('Activate', 'profile-builder') . '';
// If add-on is network activated don't allow deactivation
} elseif (!$wppb_add_on_is_network_active) {
echo '' . __('Deactivate', 'profile-builder') . '';
}
// Display message to the user
if (!$wppb_add_on_is_active) {
echo '' . __('Add-On is inactive', 'profile-builder') . '';
} else {
echo '' . __('Add-On is active', 'profile-builder') . '';
}
} else {
// If we're on a multisite don't add the wpp-add-on-download class to the button so we don't fire the js that
// handles the in-page download
($wppb_add_on['paid']) ? $wppb_paid_link_class = 'button-primary' : $wppb_paid_link_class = 'button-secondary';
($wppb_add_on['paid']) ? $wppb_paid_link_text = __('Learn More', 'profile-builder') : $wppb_paid_link_text = __('Download Now', 'profile-builder');
($wppb_add_on['paid']) ? $wppb_paid_href_utm_text = '?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page-buy-button&utm_campaign=PB' . $version : $wppb_paid_href_utm_text = '?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PB' . $version;
echo '' . $wppb_paid_link_text . '';
echo '' . __('Compatible with your version of Profile Builder.', 'profile-builder') . '';
}
echo '';
// PB version type does not match
} else {
echo '' . __('Upgrade Profile Builder', 'profile-builder') . '';
echo '' . __('Not compatible with Profile Builder', 'profile-builder') . ' ' . $version . '';
}
} else {
// If PB version is older than the minimum required version of the add-on
echo ' ' . '' . __('Update', 'profile-builder') . '';
echo '' . __('Not compatible with your version of Profile Builder.', 'profile-builder') . ' ';
echo '' . __('Minimum required Profile Builder version:', 'profile-builder') . ' ' . $wppb_add_on['product_version'] . '';
}
// We had to put this error here because we need the url of the add-on
echo '' . sprintf(__('Could not install add-on. Retry or install manually.', 'profile-builder'), esc_url($wppb_add_on['url'])) . '';
echo '
pluginPrefix = $pluginPrefix;
$this->pluginName = $pluginName;
$this->notificaitonMessage = $notificaitonMessage;
$this->pluginSerialStatus = $pluginSerialStatus;
add_action( 'admin_notices', array( $this, 'add_admin_notice' ) );
add_action( 'admin_init', array( $this, 'dismiss_notification' ) );
}
// Display a notice that can be dismissed in case the serial number is inactive
function add_admin_notice() {
global $current_user ;
global $pagenow;
$user_id = $current_user->ID;
do_action( $this->pluginPrefix.'_before_notification_displayed', $current_user, $pagenow );
if ( current_user_can( 'manage_options' ) ){
$plugin_serial_status = get_option( $this->pluginSerialStatus );
if ( $plugin_serial_status != 'found' ){
//we want to show the expiration notice on our plugin pages even if the user dismissed it on the rest of the site
$force_show = false;
if ( $plugin_serial_status == 'expired' ) {
$notification_instance = WPPB_Plugin_Notifications::get_instance();
if ($notification_instance->is_plugin_page()){
$force_show = true;
}
}
// Check that the user hasn't already clicked to ignore the message
if ( ! get_user_meta($user_id, $this->pluginPrefix.'_dismiss_notification' ) || $force_show ) {
echo $finalMessage = apply_filters($this->pluginPrefix.'_notification_message','
'.$this->notificaitonMessage.'
', $this->notificaitonMessage);
}
}
do_action( $this->pluginPrefix.'_notification_displayed', $current_user, $pagenow, $plugin_serial_status );
}
do_action( $this->pluginPrefix.'_after_notification_displayed', $current_user, $pagenow );
}
function dismiss_notification() {
global $current_user;
$user_id = $current_user->ID;
do_action( $this->pluginPrefix.'_before_notification_dismissed', $current_user );
// If user clicks to ignore the notice, add that to their user meta
if ( isset( $_GET[$this->pluginPrefix.'_dismiss_notification']) && '0' == $_GET[$this->pluginPrefix.'_dismiss_notification'] )
add_user_meta( $user_id, $this->pluginPrefix.'_dismiss_notification', 'true', true );
do_action( $this->pluginPrefix.'_after_notification_dismissed', $current_user );
}
}
// Switch to the main site
if( is_multisite() && function_exists( 'switch_to_blog' )
&& function_exists( 'get_main_site_id' ))
switch_to_blog( get_main_site_id() );
if ( PROFILE_BUILDER == 'Profile Builder Pro' ){
$wppb_profile_builder_pro_hobbyist_serial_status = get_option( 'wppb_profile_builder_pro_serial_status', 'empty' );
$version = 'pro';
} elseif( PROFILE_BUILDER == 'Profile Builder Hobbyist' ) {
$wppb_profile_builder_pro_hobbyist_serial_status = get_option( 'wppb_profile_builder_hobbyist_serial_status', 'empty' );
$version = 'hobbyist';
}
if( is_multisite() && function_exists( 'restore_current_blog' ) )
restore_current_blog();
if ( $wppb_profile_builder_pro_hobbyist_serial_status == 'notFound' || $wppb_profile_builder_pro_hobbyist_serial_status == 'empty' ){
if( !is_multisite() )
$register_url = 'admin.php?page=profile-builder-register';
else
$register_url = network_admin_url( 'admin.php?page=profile-builder-register' );
new WPPB_add_notices( 'wppb', 'profile_builder_pro', sprintf( __( '
Your Profile Builder serial number is invalid or missing. Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s
', 'profile-builder'), "", "", "", "" ), 'wppb_profile_builder_pro_serial_status' );
}
elseif ( $wppb_profile_builder_pro_hobbyist_serial_status == 'expired' ){
/* on our plugin pages do not add the dismiss button for the expired notification*/
$notification_instance = WPPB_Plugin_Notifications::get_instance();
if( $notification_instance->is_plugin_page() )
$message = __( '
Your Profile Builder license has expired. Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s
', 'profile-builder');
else
$message = __( '
Your Profile Builder license has expired. Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %5$sDismiss%6$s
Your Profile Builder license is about to expire on %5$s. Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %6$sDismiss%7$s
', 'profile-builder'), "", "", "", "", $date, "", "" ), 'wppb_profile_builder_pro_serial_status' );
}
admin/admin-functions.php 0000666 00000037756 15214165110 0011465 0 ustar 00 ' . sprintf(__('Login is set to be done using the E-mail. This field will NOT appear in the front-end! ( you can change these settings under the "%s" tab )', 'profile-builder'), '' . __('General Settings', 'profile-builder') . '') . '';
}
break;
case 'Default - Display name publicly as':
$form .= '
' . __( 'Display name publicly as - only appears on the Edit Profile page!', 'profile-builder' ) . '
';
break;
case 'Default - Blog Details':
$form .= '
' . __( 'Blog Details - only appears on the Registration page!', 'profile-builder' ) . '
';
break;
}
return $form;
}
add_filter( 'wck_after_content_element', 'wppb_manage_fields_display_field_title_slug' );
/**
* Check if field type is 'Default - Display name publicly as' so we can add a notification for it
*
* @since v.2.2
*
* @param string $wck_element_class
* @param string $meta
* @param array $results
* @param integer $element_id
*
*/
function wppb_manage_fields_display_name_notice( $wck_element_class, $meta, $results, $element_id ) {
global $wppb_results_field;
$wppb_results_field = $results[$element_id]['field'];
}
add_filter( 'wck_element_class_wppb_manage_fields', 'wppb_manage_fields_display_name_notice', 10, 4 );
/**
* Function that adds a custom class to the existing container
*
* @since v.2.0
*
* @param string $update_container_class - the new class name
* @param string $meta - the name of the meta
* @param array $results
* @param integer $element_id - the ID of the element
*
* @return string
*/
function wppb_update_container_class( $update_container_class, $meta, $results, $element_id ) {
$wppb_element_type = Wordpress_Creation_Kit_PB::wck_generate_slug( $results[$element_id]["field"] );
return "class='wck_update_container update_container_$meta update_container_$wppb_element_type element_type_$wppb_element_type'";
}
add_filter( 'wck_update_container_class_wppb_manage_fields', 'wppb_update_container_class', 10, 4 );
/**
* Function that adds a custom class to the existing element
*
* @since v.2.0
*
* @param string $element_class - the new class name
* @param string $meta - the name of the meta
* @param array $results
* @param integer $element_id - the ID of the element
*
* @return string
*/
function wppb_element_class( $element_class, $meta, $results, $element_id ){
$wppb_element_type = Wordpress_Creation_Kit_PB::wck_generate_slug( $results[$element_id]["field"] );
return "class='element_type_$wppb_element_type added_fields_list'";
}
add_filter( 'wck_element_class_wppb_manage_fields', 'wppb_element_class', 10, 4 );
/**
* Functions to check password length and strength
*
* @since v.2.0
*/
/* on add user and update profile from WP admin area */
add_action( 'user_profile_update_errors', 'wppb_password_check_on_profile_update', 0, 3 );
function wppb_password_check_on_profile_update( $errors, $update, $user ){
wppb_password_check_extra_conditions( $errors, $user );
}
/* on reset password */
add_action( 'validate_password_reset', 'wppb_password_check_extra_conditions', 10, 2 );
function wppb_password_check_extra_conditions( $errors, $user ){
$password = ( isset( $_POST[ 'pass1' ] ) && trim( $_POST[ 'pass1' ] ) ) ? $_POST[ 'pass1' ] : false;
if( $password ){
$wppb_generalSettings = get_option( 'wppb_general_settings' );
if( !empty( $wppb_generalSettings['minimum_password_length'] ) ){
if( strlen( $password ) < $wppb_generalSettings['minimum_password_length'] )
$errors->add( 'pass', sprintf( __( 'ERROR: The password must have the minimum length of %s characters', 'profile-builder' ), $wppb_generalSettings['minimum_password_length'] ) );
}
if( isset( $_POST['wppb_password_strength'] ) && !empty( $wppb_generalSettings['minimum_password_strength'] ) ){
$password_strength_array = array( 'short' => 0, 'bad' => 1, 'good' => 2, 'strong' => 3 );
$password_strength_text = array( 'short' => __( 'Very weak', 'profile-builder' ), 'bad' => __( 'Weak', 'profile-builder' ), 'good' => __( 'Medium', 'profile-builder' ), 'strong' => __( 'Strong', 'profile-builder' ) );
foreach( $password_strength_text as $psr_key => $psr_text ){
if( $psr_text == sanitize_text_field( $_POST['wppb_password_strength'] ) ){
$password_strength_result_slug = $psr_key;
break;
}
}
if( !empty( $password_strength_result_slug ) ){
if( $password_strength_array[$password_strength_result_slug] < $password_strength_array[$wppb_generalSettings['minimum_password_strength']] )
$errors->add( 'pass', sprintf( __( 'ERROR: The password must have a minimum strength of %s', 'profile-builder' ), $password_strength_text[$wppb_generalSettings['minimum_password_strength']] ) );
}
}
}
return $errors;
}
/* we need to create a hidden field that contains the results of the password strength from the js strength tester */
add_action( 'admin_footer', 'wppb_add_hidden_password_strength_on_backend' );
add_action( 'login_footer', 'wppb_add_hidden_password_strength_on_backend' );
function wppb_add_hidden_password_strength_on_backend(){
if( $GLOBALS['pagenow'] == 'profile.php' || $GLOBALS['pagenow'] == 'user-new.php' || ( $GLOBALS['pagenow'] == 'wp-login.php' && isset( $_GET['action'] ) && ( $_GET['action'] == 'rp' || $_GET['action'] == 'resetpass' ) ) ){
$wppb_generalSettings = get_option( 'wppb_general_settings' );
if( !empty( $wppb_generalSettings['minimum_password_strength'] ) ){
?>
parent_base == 'profile-builder'){
$rate_text = sprintf( __( 'If you enjoy using %1$s please rate us on WordPress.org. More happy users means more features, less bugs and better support for everyone. ', 'profile-builder' ),
PROFILE_BUILDER,
'https://wordpress.org/support/view/plugin-reviews/profile-builder?filter=5#postform'
);
return '' .$rate_text . '';
} else {
return $footer_text;
}
}
add_filter('admin_footer_text','wppb_admin_rate_us');
/**
* add links on plugin page
*/
add_filter( 'plugin_action_links', 'wppb_plugin_action_links', 10, 2 );
function wppb_plugin_action_links( $links, $file ) {
if ( $file != WPPB_PLUGIN_BASENAME ) {
return $links;
}
if ( ! current_user_can( 'manage_options' ) ) {
return $links;
}
$settings_link = sprintf( '%2$s',
menu_page_url( 'profile-builder-general-settings', false ),
esc_html( __( 'Settings', 'profile-builder' ) ) );
array_unshift( $links, $settings_link );
return $links;
}
/**
* add links on plugin page
*/
add_filter( 'plugin_row_meta', 'wppb_plugin_row_meta', 10, 2 );
function wppb_plugin_row_meta( $links, $file ) {
if ( WPPB_PLUGIN_BASENAME == $file ) {
$row_meta = array(
'docs' => '' . esc_html__( 'Docs', 'profile-builder' ) . '',
);
return array_merge( $links, $row_meta );
}
return (array) $links;
}
/* In plugin notifications */
add_action( 'admin_init', 'wppb_add_plugin_notifications' );
function wppb_add_plugin_notifications() {
/* initiate the plugin notifications class */
$notifications = WPPB_Plugin_Notifications::get_instance();
/* this must be unique */
$notification_id = 'wppb_new_feature_customization_toolbox';
$message = '';
$message .= '
' . __( 'Check out the Customization Toolbox add-on which packs the most popular customization requests from Profile Builder.', 'profile-builder' ) . '
';
// be careful to use wppb_dismiss_admin_notification as query arg
$message .= '