PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 3.16.6
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v3.16.6
4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 All 340 releases
profile-builder / admin / add-ons.php

add-ons.php in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 3.16.6, at admin/add-ons.php

423 lines 31.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
4 if( ! class_exists( 'CL_Addons_List_Table' ) ) {
5 require_once( WPPB_PLUGIN_DIR . '/assets/lib/cl-add-ons-listing/cl-add-ons-listing.php' );
6 }
7
8 /**
9 * Function that creates the "Add-Ons" submenu page
10 *
11 * @since v.2.1.0
12 *
13 * @return void
14 */
15 function wppb_register_add_ons_submenu_page() {
16 add_submenu_page( 'profile-builder', __( 'Add-Ons', 'profile-builder' ), __( 'Add-Ons', 'profile-builder' ), 'manage_options', 'profile-builder-add-ons', 'wppb_add_ons_content' );
17 }
18 add_action( 'admin_menu', 'wppb_register_add_ons_submenu_page', 28 );
19
20
21 /**
22 * Function that adds content to the "Add-Ons" submenu page
23 *
24 * @since v.2.1.0
25 *
26 * @return string
27 */
28 function wppb_add_ons_content() {
29 //initialize the object
30 $pb_addons_listing = new CL_Addons_List_Table();
31 $pb_addons_listing->images_folder = WPPB_PLUGIN_URL.'assets/images/add-ons/';
32 $pb_addons_listing->text_domain = 'profile-builder';
33 $pb_addons_listing->header = array( 'title' => __('Profile Builder Add-ons', 'profile-builder' ) );
34 $pb_addons_listing->current_version = PROFILE_BUILDER;
35 $pb_addons_listing->tooltip_header = __( 'Profile Builder Add-ons', 'profile-builder' );
36 $pb_addons_listing->tooltip_content = sprintf( __( 'You need an active license to have access to the addon. %1$sRenew%2$s or %3$spurchase a new one here%4$s.', 'profile-builder' ), '<a target="_blank" href="https://www.cozmoslabs.com/account/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-expired-license">', '</a>', '<a target="_blank" href="https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-expired-license#pricing">', '</a>' );
37 $pb_addons_listing->tooltip_content_license_inactive = sprintf( __( 'To activate this add-on, you must first %senter your license key%s.', 'profile-builder' ), '<a target="_blank" href="'.admin_url( 'admin.php?page=profile-builder-general-settings' ).'">', '</a>' );
38
39
40 //Add Pro Section
41 $pb_addons_listing->section_header = array( 'title' => __( 'Pro Add-ons', 'profile-builder' ), 'description' => __( 'These Add-ons are available with the Pro and Agency license', 'profile-builder' ) );
42 $pb_addons_listing->section_header_free = array( 'title' => __( 'Pro Add-ons', 'profile-builder' ), 'description' => sprintf( __( 'Get access to these Add-ons with a Pro or Agency license. %sBuy now%s', 'profile-builder' ), '<a href="https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-pro-addons-upsell#pricing" target="_blank">', '</a>' ) );
43 $pb_addons_listing->section_versions = array( 'Profile Builder Pro', 'Profile Builder Agency', 'Profile Builder Unlimited' );
44 $pb_addons_listing->items = array(
45 array( 'slug' => 'wppb_multipleRegistrationForms',
46 'type' => 'add-on',
47 'name' => __( 'Multiple Registration Forms', 'profile-builder' ),
48 'description' => __( 'Set up multiple registration forms with different fields for certain user roles. Helps capture different information from different types of users.', 'profile-builder' ),
49 'icon' => 'pb-add-on-multiple-registration-forms-logo.png',
50 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/modules/multiple-registration-forms/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-multiple-registration-addon',
51 ),
52 array( 'slug' => 'wppb_multipleEditProfileForms',
53 'type' => 'add-on',
54 'name' => __( 'Multiple Edit Profile Forms', 'profile-builder' ),
55 'description' => __( 'Allow different user roles to edit their specific information. Set up multiple edit-profile forms with different fields for certain user roles.', 'profile-builder' ),
56 'icon' => 'pb-add-on-multiple-edit-profile-forms-icon.png',
57 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/modules/multiple-edit-profile-forms/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-multiple-edit-profile-addon',
58 ),
59 array( 'slug' => 'wppb_userListing',
60 'type' => 'add-on',
61 'name' => __( 'User Listing', 'profile-builder' ),
62 'description' => __( 'Easy to edit templates for listing your users as well as creating single user pages.', 'profile-builder' ),
63 'icon' => 'pb-add-on-userlisting-logo.png',
64 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/modules/user-listing/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-user-listing-addon',
65 ),
66 array( 'slug' => 'wppb_customRedirect',
67 'type' => 'add-on',
68 'name' => __( 'Custom Redirects', 'profile-builder' ),
69 'description' => __( 'Redirect users after login, after they first register or when they try to access the default WordPress dashboard, login, lost password and registration forms.', 'profile-builder' ),
70 'icon' => 'pb-add-on-custom-redirects-logo.png',
71 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/modules/custom-redirects/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-custom-redirects-addon',
72 ),
73 array( 'slug' => 'wppb_fileRestriction',
74 'type' => 'add-on',
75 'name' => __( 'Files Restriction', 'profile-builder' ),
76 'description' => __( 'Protect your Media Library by restricting direct links to media files according to user roles.', 'profile-builder' ),
77 'icon' => 'pb-add-on-file-restriction-logo.png',
78 'doc_url' => 'https://www.cozmoslabs.com/add-ons/files-restriction/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-files-restriction-addon',
79 ),
80 array( 'slug' => 'wppb_repeaterFields',
81 'type' => 'add-on',
82 'name' => __( 'Repeater Fields', 'profile-builder' ),
83 'description' => __( 'The Repeater Field Module makes it really easy to add repeater front-end fields or groups of fields to your user profile. Integration with both the Email Customizer and User Listing modules, makes creating advanced user profiles possible.', 'profile-builder' ),
84 'icon' => 'pb-add-on-repeater-fields-logo.png',
85 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/modules/repeater-fields/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-repeater-fields-addon',
86 ),
87 array( 'slug' => 'buddypress',
88 'type' => 'add-on',
89 'name' => __( 'BuddyPress', 'profile-builder' ),
90 'description' => __( 'This integration add-on allows extending BuddyPress user profiles with Profile Builder user fields.', 'profile-builder' ),
91 'icon' => 'pb-add-on-buddypress-logo.png',
92 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/buddypress/?utm_source=pb-addons-pro&utm_medium=client-site&utm_campaign=pb-buddypress-addon',
93 'download_url' => 'https://www.cozmoslabs.com/add-ons/buddypress/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
94 ),
95 );
96 $pb_addons_listing->add_section();
97
98 //Add Basic section
99 $pb_addons_listing->section_header = array( 'title' => __( 'Basic Add-ons', 'profile-builder' ), 'description' => __( 'These Add-ons are available with the Basic, Pro and Agency license', 'profile-builder' ) );
100 $pb_addons_listing->section_header_free = array( 'title' => __( 'Basic Add-ons', 'profile-builder' ), 'description' => sprintf( __( 'Get access to these Add-ons with a Basic, Pro or Agency license. %sBuy now%s', 'profile-builder' ), '<a href="https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-basic-addons-upsell#pricing" target="_blank">', '</a>' ) );
101 $pb_addons_listing->section_versions = array( 'Profile Builder Pro', 'Profile Builder Hobbyist', 'Profile Builder Basic', 'Profile Builder Agency', 'Profile Builder Unlimited' );
102 $pb_addons_listing->items = array(
103 array( 'slug' => 'form-fields-in-columns',
104 'type' => 'add-on',
105 'name' => __( 'Form Fields in Columns', 'profile-builder' ),
106 'description' => __( 'Extends the functionality of Profile Builder by adding the possibility to organize fields in columns.', 'profile-builder' ),
107 'icon' => 'pb-add-on-form-fields-in-columns-logo.png',
108 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/form-fields-in-columns/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-field-columns-addon',
109 'download_url' => 'https://www.cozmoslabs.com/add-ons/form-fields-in-columns/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
110 ),
111 array( 'slug' => 'social-connect',
112 'type' => 'add-on',
113 'name' => __( 'Social Connect', 'profile-builder' ),
114 'description' => __( 'Easily configure and enable social login on your website. Users can login with social platforms like Facebook, Google or X.', 'profile-builder' ),
115 'icon' => 'pb-add-on-social-connect-logo.png',
116 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/social-connect/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-social-connect-addon',
117 'download_url' => 'https://www.cozmoslabs.com/add-ons/social-connect/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree'
118 ),
119 array( 'slug' => 'woocommerce',
120 'type' => 'add-on',
121 'name' => __( 'WooCommerce Sync', 'profile-builder' ),
122 'description' => __( 'Syncs Profile Builder with WooCommerce, allowing you to manage the user Shipping and Billing fields from WooCommerce with Profile Builder.', 'profile-builder' ),
123 'icon' => 'pb-add-on-woocommerce-logo.png',
124 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/woocommerce-sync/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-woo-sync-addon',
125 'download_url' => 'https://www.cozmoslabs.com/add-ons/woocommerce-sync/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
126 ),
127 array( 'slug' => 'multi-step-forms',
128 'type' => 'add-on',
129 'name' => __( 'Multi Step Forms', 'profile-builder' ),
130 'description' => __( 'Extends the functionality of Profile Builder by adding the possibility of having multi-page registration and edit-profile forms.', 'profile-builder' ),
131 'icon' => 'pb-add-on-multi-step-forms-logo.png',
132 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/multi-step-forms/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-multi-step-addon',
133 'download_url' => 'https://www.cozmoslabs.com/add-ons/multi-step-forms/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
134 ),
135 array( 'slug' => 'mailchimp-integration',
136 'type' => 'add-on',
137 'name' => __( 'MailChimp', 'profile-builder' ),
138 'description' => __( 'Easily associate MailChimp list fields with Profile Builder fields and set advanced settings for each list.', 'profile-builder' ),
139 'icon' => 'pb-add-on-mailchimp-logo.png',
140 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/mailchimp/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-mailchimp-addon',
141 'download_url' => 'https://www.cozmoslabs.com/add-ons/profile-builder-mailchimp/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
142 ),
143 array( 'slug' => 'bbpress',
144 'type' => 'add-on',
145 'name' => __( 'bbPress', 'profile-builder' ),
146 'description' => __( 'This add-on allows you to integrate Profile Builder with the popular forums plugin, bbPress.', 'profile-builder' ),
147 'icon' => 'pb-add-on-bbpress-logo.png',
148 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/bbpress/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-bbpress-addon',
149 'download_url' => 'https://www.cozmoslabs.com/add-ons/bbpress/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
150 ),
151 array( 'slug' => 'campaign-monitor',
152 'type' => 'add-on',
153 'name' => __( 'Campaign Monitor', 'profile-builder' ),
154 'description' => __( 'Easily associate Campaign Monitor client list fields with Profile Builder fields. Use Profile Builder Campaign Monitor Widget to add more subscribers to your lists.', 'profile-builder' ),
155 'icon' => 'pb-add-on-campaign-monitor-logo.png',
156 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/campaign-monitor/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-campaign-monitor-addon',
157 'download_url' => 'https://www.cozmoslabs.com/add-ons/profile-builder-campaign-monitor/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
158 ),
159 array( 'slug' => 'field-visibility',
160 'type' => 'add-on',
161 'name' => __( 'Field Visibility', 'profile-builder' ),
162 'description' => __( 'Extends the functionality of Profile Builder by allowing you to change visibility options for the extra fields.', 'profile-builder' ),
163 'icon' => 'pb-add-on-field-visibility-logo.png',
164 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/field-visibility/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-field-visibility-addon',
165 'download_url' => 'https://www.cozmoslabs.com/add-ons/field-visibility/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
166 ),
167 array( 'slug' => 'edit-profile-approved-by-admin',
168 'type' => 'add-on',
169 'name' => __( 'Edit Profile Approved by Admin', 'profile-builder' ),
170 'description' => __( 'Extends the functionality of Profile Builder by allowing administrators to approve profile changes made by users on individual fields.', 'profile-builder' ),
171 'icon' => 'pb-add-on-edit-profile-updates-approved-by-admins-logo.png',
172 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/edit-profile-approved-by-admin/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-profile-approved-admin-addon',
173 'download_url' => 'https://www.cozmoslabs.com/add-ons/edit-profile-approved-by-admin/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
174 ),
175 array( 'slug' => 'custom-profile-menus',
176 'type' => 'add-on',
177 'name' => __( 'Custom Profile Menus', 'profile-builder' ),
178 'description' => __( 'Add custom menu items like Login/Logout or just Logout button and Login/Register/Edit Profile in iFrame Popup.', 'profile-builder' ),
179 'icon' => 'pb-add-on-custom-profile-menus-logo.png',
180 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/custom-profile-menus/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-custom-profile-menus-addon',
181 'download_url' => 'https://www.cozmoslabs.com/add-ons/custom-profile-menus/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
182 ),
183 array( 'slug' => 'mailpoet-integration',
184 'type' => 'add-on',
185 'name' => __( 'MailPoet', 'profile-builder' ),
186 'description' => __( 'Allow users to subscribe to your MailPoet lists directly from the Register and Edit Profile forms.', 'profile-builder' ),
187 'icon' => 'pb-add-on-mailpoet-logo.png',
188 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/mailpoet/?utm_source=pb-addons-basic&utm_medium=client-site&utm_campaign=pb-mailpoet-addon',
189 'download_url' => 'https://www.cozmoslabs.com/add-ons/mailpoet/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
190 )
191 );
192 $pb_addons_listing->add_section();
193
194 //Add Free section
195 $pb_addons_listing->section_header = array( 'title' => __('Free Add-ons', 'profile-builder' ), 'description' => __('These Add-ons are available in all versions of Profile Builder', 'profile-builder') );
196 $pb_addons_listing->section_versions = array( 'Profile Builder Pro', 'Profile Builder Hobbyist', 'Profile Builder Free', 'Profile Builder Basic', 'Profile Builder Agency', 'Profile Builder Unlimited' );
197 $pb_addons_listing->items = array(
198 array( 'slug' => 'user-profile-picture',
199 'type' => 'add-on',
200 'name' => __( 'User Profile Picture', 'profile-builder' ),
201 'description' => __( 'Set or remove a custom profile image for a user using the standard WordPress media upload tool.', 'profile-builder' ),
202 'icon' => 'pb-add-on-user-profile-picture-logo.png',
203 'doc_url' => 'https://www.cozmoslabs.com/user-profile-picture/?utm_source=pb-addons-free&utm_medium=client-site&utm_campaign=pb-profile-picture-addon',
204 'download_url' => 'https://wordpress.org/plugins/metronet-profile-picture/',
205 'version' => 'free',
206 ),
207 array( 'slug' => 'import-export',
208 'type' => 'add-on',
209 'name' => __( 'Import and Export', 'profile-builder' ),
210 'description' => __( 'With the help of this add-on you will be able to export all Profile Builder Settings data to a .json. You can then use this file as a back-up or you can import this data on another instance of Profile Builder.', 'profile-builder' ),
211 'icon' => 'pb-add-on-import-export-logo.png',
212 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/import-export-pb-settings/?utm_source=pb-addons-free&utm_medium=client-site&utm_campaign=pb-import-export-addon',
213 'download_url' => 'https://www.cozmoslabs.com/add-ons/import-export/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
214 'version' => 'free',
215 ),
216 array( 'slug' => 'custom-css-classes-on-fields',
217 'type' => 'add-on',
218 'name' => __( 'Custom CSS Classes on Fields', 'profile-builder' ),
219 'description' => __( 'This add-on extends the functionality of Profile Builder by allowing you to add custom css classes for fields.', 'profile-builder' ),
220 'icon' => 'pb-add-on-classes-on-fields-logo.png',
221 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/custom-css-classes-on-fields-for-profile-builder/?utm_source=pb-addons-free&utm_medium=client-site&utm_campaign=pb-custom-css-addon',
222 'download_url' => 'https://www.cozmoslabs.com/add-ons/custom-css-classes-fields/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
223 'version' => 'free',
224 ),
225 array( 'slug' => 'maximum-character-length',
226 'type' => 'add-on',
227 'name' => __( 'Maximum Character Length', 'profile-builder' ),
228 'description' => __( 'Using this addon you can limit the maximum number of characters a user can type in a field added and managed with Profile Builder.', 'profile-builder' ),
229 'icon' => 'pb-add-on-maximum-character-length-logo.png',
230 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/maximum-character-length/?utm_source=pb-addons-free&utm_medium=client-site&utm_campaign=pb-max-character-length-addon',
231 'download_url' => 'https://www.cozmoslabs.com/add-ons/maximum-character-length/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
232 'version' => 'free',
233 ),
234 array( 'slug' => 'labels-edit',
235 'type' => 'add-on',
236 'name' => __( 'Labels Edit', 'profile-builder' ),
237 'description' => __( 'This add-on extends the functionality of our plugin and let us easily edit all Profile Builder labels.', 'profile-builder' ),
238 'icon' => 'pb-add-on-labels-edit-logo.png',
239 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/labels-edit/?utm_source=pb-addons-free&utm_medium=client-site&utm_campaign=pb-labels-edit-addon',
240 'download_url' => 'https://www.cozmoslabs.com/add-ons/labels-edit/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
241 'version' => 'free',
242 ),
243 array( 'slug' => 'gdpr-communication-preferences',
244 'type' => 'add-on',
245 'name' => __( 'GDPR Communication Preferences', 'profile-builder' ),
246 'description' => __( 'This add-on plugin adds a GDPR Communication preferences field to Profile Builder.', 'profile-builder' ),
247 'icon' => 'pb-add-on-gdpr-communication-preferences-logo.png',
248 'doc_url' => 'https://www.cozmoslabs.com/add-ons/gdpr-communication-preferences/?utm_source=pb-addons-free&utm_medium=client-site&utm_campaign=pb-gdpr-addon',
249 'download_url' => 'https://www.cozmoslabs.com/add-ons/gdpr-communication-preferences/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree',
250 'version' => 'free',
251 ),
252 );
253 $pb_addons_listing->add_section();
254
255
256
257 //Add Recommended Plugins
258 $pb_addons_listing->section_header = array( 'title' => __('Recommended Plugins', 'profile-builder' ), 'description' => __('These plugins are compatible with all versions of Profile Builder', 'profile-builder') );
259 $pb_addons_listing->section_versions = array( 'Profile Builder Pro', 'Profile Builder Hobbyist', 'Profile Builder Free', 'Profile Builder Basic', 'Profile Builder Agency', 'Profile Builder Unlimited' );
260 $pb_addons_listing->items = array(
261 array( 'slug' => 'translatepress-multilingual/index.php',
262 'type' => 'plugin',
263 'name' => __( 'TranslatePress', 'profile-builder' ),
264 'description' => __( 'Translate your Profile Builder forms with a WordPress translation plugin that anyone can use. It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.', 'profile-builder' ),
265 'icon' => 'pb-add-on-translatepress-logo.png',
266 'doc_url' => 'https://translatepress.com/docs/translatepress/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-tp-upsell',
267 'download_url' => 'https://wordpress.org/plugins/translatepress-multilingual/',
268 ),
269 array( 'slug' => 'paid-member-subscriptions/index.php',
270 'type' => 'plugin',
271 'name' => __( 'Paid Member Subscriptions', 'profile-builder' ),
272 'description' => __( 'Unlock the Subscriptions Field in Profile Builder and offer paid memberships for your site. With Paid Member Subscriptions your registration forms will allow your users to sign up for paid accounts.', 'profile-builder' ),
273 'icon' => 'pb-add-on-pms-logo.png',
274 'doc_url' => 'https://www.cozmoslabs.com/docs/paid-member-subscriptions/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-pms-upsell',
275 'download_url' => 'https://wordpress.org/plugins/paid-member-subscriptions/'
276 ),
277 array( 'slug' => 'wp-webhooks/wp-webhooks.php',
278 'type' => 'plugin',
279 'name' => __( 'WP Webhooks Automations', 'profile-builder' ),
280 'description' => __( 'Easily create powerful no-code automations that connect Profile Builder actions, like sign-ups or edits to a user\'s profile, to actions from other plugins, sites, and apps.', 'profile-builder' ),
281 'icon' => 'pb-add-on-wp-webhooks-icon.jpg',
282 'doc_url' => 'https://wp-webhooks.com/integrations/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-wpwh-upsell',
283 'download_url' => 'https://wordpress.org/plugins/wp-webhooks/'
284 ),
285 array( 'slug' => 'client-portal/index.php',
286 'type' => 'plugin',
287 'name' => __( 'Client Portal', 'profile-builder' ),
288 'description' => __( 'Create private pages for your website users that only an administrator can edit.', 'profile-builder' ),
289 'icon' => 'pb-add-on-client-portal-logo.png',
290 'doc_url' => 'https://www.cozmoslabs.com/add-ons/client-portal/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-client-portal-upsell',
291 'download_url' => 'https://www.cozmoslabs.com/add-ons/client-portal/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree'
292 ),
293 array( 'slug' => 'custom-login-page-templates/custom-login-templates.php',
294 'type' => 'plugin',
295 'name' => __( 'Custom Login Page Templates', 'profile-builder' ),
296 'description' => __( 'Customizes the default WordPress Login Page with different templates, logo and background uploads and also adds support for custom CSS.', 'profile-builder' ),
297 'icon' => 'pb-add-on-custom-login-page-templates-logo.png',
298 'doc_url' => 'https://www.cozmoslabs.com/add-ons/custom-login-page-templates/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-login-templates-upsell',
299 'download_url' => 'https://www.cozmoslabs.com/add-ons/custom-login-page-templates/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree'
300 ),
301 array( 'slug' => 'passwordless-login/passwordless_login.php',
302 'type' => 'plugin',
303 'name' => __( 'Passwordless Login', 'profile-builder' ),
304 'description' => __( 'WordPress Passwordless Login is a plugin that allows your users to login without a password.', 'profile-builder' ),
305 'icon' => 'pb-add-on-passwordless-login-logo.png',
306 'doc_url' => 'https://www.cozmoslabs.com/docs/profile-builder/add-ons/passwordless-login/?utm_source=pb-addons&utm_medium=client-site&utm_campaign=pb-passwordless-upsell',
307 'download_url' => 'https://www.cozmoslabs.com/add-ons/passwordless-login/?utm_source=wpbackend&utm_medium=clientsite&utm_content=add-on-page&utm_campaign=PBFree'
308 ),
309 );
310 $pb_addons_listing->add_section();
311
312
313 //Display the whole listing
314 $pb_addons_listing->display_addons();
315 }
316
317
318 /**
319 * Add this for generating default options on first install
320 */
321 add_action( 'admin_init', 'wppb_generate_modules_default_values' );
322 function wppb_generate_modules_default_values(){
323 $wppb_module_settings = get_option( 'wppb_module_settings', 'not_found' );
324 if ( $wppb_module_settings == 'not_found' ){
325 $wppb_module_settings = array( 'wppb_userListing' => 'hide',
326 'wppb_customRedirect' => 'hide',
327 'wppb_fileRestriction' => 'hide',
328 'wppb_emailCustomizer' => 'hide',
329 'wppb_multipleEditProfileForms' => 'hide',
330 'wppb_multipleRegistrationForms' => 'hide',
331 'wppb_repeaterFields' => 'hide'
332 );
333 update_option( 'wppb_module_settings', $wppb_module_settings );
334 }
335 }
336
337
338 /**
339 * For add-ons (not plugins) the implementation is speciffic to each plugin ( PB/PMS/TP ) and is done through filters in the plugin itself
340 */
341
342 /**
343 * Function that determines if a PB add-on is active
344 */
345 add_filter( 'cl_add_on_is_active', 'wppb_check_add_ons_activation', 10, 2 );
346 function wppb_check_add_ons_activation( $bool, $slug ){
347 return wppb_check_if_add_on_is_active($slug);
348 }
349
350 /**
351 * Function that activates a PB add-on
352 */
353 add_action( 'cl_add_ons_activate', 'wppb_activate_add_ons' );
354 function wppb_activate_add_ons( $slug ){
355 wppb_activate_or_deactivate_add_on( $slug, 'show' );
356
357 do_action( 'wppb_add_ons_activate', $slug );
358 }
359
360 /**
361 * Function that deactivates a PB add-on
362 */
363 add_action( 'cl_add_ons_deactivate', 'wppb_deactivate_add_ons' );
364 function wppb_deactivate_add_ons( $slug ){
365 wppb_activate_or_deactivate_add_on( $slug, 'hide' );
366
367 do_action( 'wppb_add_ons_deactivate', $slug );
368 }
369
370
371 /**
372 * Function used to activate or deactivate a PB add-on
373 */
374 function wppb_activate_or_deactivate_add_on( $slug, $action ){
375 //the old modules part
376 $wppb_module_settings = get_option( 'wppb_module_settings', 'not_found' );
377 if ( $wppb_module_settings != 'not_found' ){
378 foreach( $wppb_module_settings as $add_on_slug => $status ){
379 if( $slug == $add_on_slug ){
380 $wppb_module_settings[$add_on_slug] = $action;
381 }
382 }
383 }
384 update_option( 'wppb_module_settings', $wppb_module_settings );
385
386 //the free addons part
387 $wppb_free_add_ons_settings = get_option( 'wppb_free_add_ons_settings', array() );
388 if ( !empty( $wppb_free_add_ons_settings ) ){
389
390 if( $action == 'show' )
391 $wppb_free_add_ons_settings[$slug] = true;
392 elseif( $action == 'hide' )
393 $wppb_free_add_ons_settings[$slug] = false;
394
395 }
396 update_option( 'wppb_free_add_ons_settings', $wppb_free_add_ons_settings );
397
398 //the advanced addons part
399 $wppb_advanced_add_ons_settings = get_option( 'wppb_advanced_add_ons_settings', array() );
400 if ( !empty( $wppb_advanced_add_ons_settings ) ){
401
402 if( $action == 'show' )
403 $wppb_advanced_add_ons_settings[$slug] = true;
404 elseif( $action == 'hide' )
405 $wppb_advanced_add_ons_settings[$slug] = false;
406
407 }
408 update_option( 'wppb_advanced_add_ons_settings', $wppb_advanced_add_ons_settings );
409 }
410
411 /**
412 * Add a notice on the add-ons page if the save was successful
413 */
414 add_action('init', function()
415 {
416 if ( isset($_GET['cl_add_ons_listing_success']) ){
417 if( class_exists('WPPB_Add_General_Notices') ) {
418 new WPPB_Add_General_Notices('cl_add_ons_listing_success',
419 sprintf(__('%1$sAdd-ons settings saved successfully%2$s', 'profile-builder'), "<p>", "</p>"),
420 'updated notice is-dismissible');
421 }
422 }
423 });