| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Profile Builder |
| 4 | 4 | * Plugin URI: https://www.cozmoslabs.com/wordpress-profile-builder/ |
| 5 | 5 | * Description: Login, registration and edit profile shortcodes for the front-end. Also you can choose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard. |
| 6 | - * Version: 3.16.4 | |
| 6 | + * Version: 4.0.3 | |
| 7 | 7 | * Author: Cozmoslabs |
| 8 | 8 | * Author URI: https://www.cozmoslabs.com/ |
| 9 | 9 | * Text Domain: profile-builder |
| 10 | 10 | * Domain Path: /translation |
| @@ -9,11 +9,11 @@ | ||
| 9 | 9 | * Text Domain: profile-builder |
| 10 | 10 | * Domain Path: /translation |
| 11 | 11 | * License: GPL2 |
| 12 | 12 | * WC requires at least: 3.0.0 |
| 13 | - * WC tested up to: 10.9 | |
| 14 | - * Elementor tested up to: 4.1.4 | |
| 15 | - * Elementor Pro tested up to: 4.1.4 | |
| 13 | + * WC tested up to: 11.1 | |
| 14 | + * Elementor tested up to: 4.3.0 | |
| 15 | + * Elementor Pro tested up to: 4.3.0 | |
| 16 | 16 | * |
| 17 | 17 | * == Copyright == |
| 18 | 18 | * Copyright 2014 Cozmoslabs (www.cozmoslabs.com) |
| 19 | 19 | * |
| @@ -157,14 +157,18 @@ | ||
| 157 | 157 | if ( file_exists( WPPB_PLUGIN_DIR . '/admin/register-version.php' ) ) { |
| 158 | 158 | include_once( WPPB_PLUGIN_DIR . '/admin/register-version.php' ); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | + // Forms Rework (free): default forms always; extra forms need paid | |
| 162 | + // (wppb_fb_multiple_forms_available). require_once — silent skip would | |
| 163 | + // break per-form field lists with no error. | |
| 164 | + require_once( WPPB_PLUGIN_DIR . 'form-builder/form-builder-init.php' ); | |
| 165 | + | |
| 161 | 166 | if ( defined( 'WPPB_PAID_PLUGIN_DIR' ) && file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons/add-ons.php' ) ) { |
| 162 | 167 | |
| 163 | 168 | include_once(WPPB_PAID_PLUGIN_DIR . '/add-ons/add-ons.php'); |
| 164 | 169 | // include_once(WPPB_PAID_PLUGIN_DIR . '/add-ons/repeater-field/repeater-module.php'); |
| 165 | 170 | include_once(WPPB_PAID_PLUGIN_DIR . '/add-ons/custom-redirects/custom-redirects.php'); |
| 166 | - include_once(WPPB_PAID_PLUGIN_DIR . '/add-ons/multiple-forms/multiple-forms.php'); | |
| 167 | 171 | include_once(WPPB_PAID_PLUGIN_DIR . '/add-ons/user-listing/userlisting.php'); |
| 168 | 172 | |
| 169 | 173 | if( file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons-advanced/file-restriction/index.php' ) ) |
| 170 | 174 | include_once( WPPB_PAID_PLUGIN_DIR . '/add-ons-advanced/file-restriction/index.php' ); |
| @@ -333,8 +337,13 @@ | ||
| 333 | 337 | if( file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons-advanced/mailpoet-integration/index.php' ) ) |
| 334 | 338 | include_once WPPB_PAID_PLUGIN_DIR . '/add-ons-advanced/mailpoet-integration/index.php'; |
| 335 | 339 | } |
| 336 | 340 | |
| 341 | + if( isset( $wppb_advanced_add_ons_settings['progress-bar'] ) && $wppb_advanced_add_ons_settings['progress-bar'] ){ | |
| 342 | + if( file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons-advanced/progress-bar/index.php' ) ) | |
| 343 | + include_once WPPB_PAID_PLUGIN_DIR . '/add-ons-advanced/progress-bar/index.php'; | |
| 344 | + } | |
| 345 | + | |
| 337 | 346 | } |
| 338 | 347 | |
| 339 | 348 | /** |
| 340 | 349 | * Include add-on files that contain activation hooks even when add-ons are deactivated |
| @@ -364,77 +373,8 @@ | ||
| 364 | 373 | |
| 365 | 374 | } |
| 366 | 375 | |
| 367 | 376 | |
| 368 | - /** | |
| 369 | - * Add explanatory message on the plugins page when updates are not available | |
| 370 | - * | |
| 371 | - */ | |
| 372 | - if ( defined( 'WPPB_PAID_PLUGIN_DIR' ) && ! wppb_paid_plugin_owns_updates() && file_exists( WPPB_PLUGIN_DIR . '/update/class-edd-sl-plugin-updater.php' ) ) { | |
| 373 | - | |
| 374 | - if ( class_exists( 'WPPB_EDD_SL_Plugin_Updater' ) ) { | |
| 375 | - | |
| 376 | - $serial = wppb_get_serial_number(); | |
| 377 | - | |
| 378 | - if( ! function_exists('get_plugin_data') ){ | |
| 379 | - require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
| 380 | - } | |
| 381 | - | |
| 382 | - $plugin_data = get_plugin_data( WPPB_PAID_PLUGIN_DIR . '/index.php', false, false ); | |
| 383 | - $pb_plugin_version = ( $plugin_data && $plugin_data['Version'] ) ? $plugin_data['Version'] : '3.7.6' ; | |
| 384 | - | |
| 385 | - if( PROFILE_BUILDER == 'Profile Builder Pro' ) | |
| 386 | - $pb_cl_plugin_id = '30695'; | |
| 387 | - else if( PROFILE_BUILDER == 'Profile Builder Basic' ) | |
| 388 | - $pb_cl_plugin_id = '30697'; | |
| 389 | - else if( PROFILE_BUILDER == 'Profile Builder Agency' ) | |
| 390 | - $pb_cl_plugin_id = '416191'; | |
| 391 | - else if( PROFILE_BUILDER == 'Profile Builder Unlimited' ) | |
| 392 | - $pb_cl_plugin_id = '30699'; | |
| 393 | - | |
| 394 | - // setup the updater | |
| 395 | - $wppb_edd_updater = new WPPB_EDD_SL_Plugin_Updater('https://cozmoslabs.com', WPPB_PAID_PLUGIN_DIR . '/index.php', array( | |
| 396 | - 'version' => $pb_plugin_version, // current version number | |
| 397 | - 'license' => $serial, | |
| 398 | - 'item_name' => PROFILE_BUILDER, // name of this plugin | |
| 399 | - 'item_id' => $pb_cl_plugin_id, | |
| 400 | - 'author' => 'Cozmoslabs', // author of this plugin | |
| 401 | - 'beta' => false | |
| 402 | - ) | |
| 403 | - ); | |
| 404 | - | |
| 405 | - } | |
| 406 | - | |
| 407 | - if ( ! function_exists( 'wppb_plugin_update_message' ) ) { | |
| 408 | - function wppb_plugin_update_message( $plugin_data, $new_data ) { | |
| 409 | - | |
| 410 | - $wppb_profile_builder_serial = wppb_get_serial_number(); | |
| 411 | - $wppb_profile_builder_serial_status = wppb_get_serial_number_status(); | |
| 412 | - | |
| 413 | - if( empty( $wppb_profile_builder_serial ) ){ | |
| 414 | - | |
| 415 | - echo '<br />' . wp_kses_post( sprintf( __('To enable updates, please enter your license key on the %sSettings%s page. If you don\'t have a license key, you can %sbuy one now%s.', 'profile-builder' ), '<a href="'.esc_url( admin_url('admin.php?page=profile-builder-general-settings') ).'">', '</a>', '<a href="https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wpbackend&utm_medium=clientsite&utm_content=license-updates-disabled-notification&utm_campaign=PBPro#pricing" target="_blank">', '</a>' ) ); | |
| 416 | - | |
| 417 | - } else if( $wppb_profile_builder_serial_status == 'expired' ) { | |
| 418 | - | |
| 419 | - echo '<br />' . wp_kses_post( sprintf( __('To enable updates, your licence needs to be renewed. Please go to the <a href="%s">Cozmoslabs Account</a> page and login to renew.', 'profile-builder' ), 'https://www.cozmoslabs.com/account/?utm_source=wpbackend&utm_medium=clientsite&utm_content=license-updates-disabled-notification&utm_campaign=PBPro' ) ); | |
| 420 | - | |
| 421 | - } else if ( $wppb_profile_builder_serial_status != 'valid' ) { | |
| 422 | - | |
| 423 | - echo '<br />' . wp_kses_post( sprintf( __('To enable updates, you need an active license. %1$sRenew%2$s or %3$spurchase a new license%4$s.', 'profile-builder' ), '<a href="https://www.cozmoslabs.com/account/?utm_source=wpbackend&utm_medium=clientsite&utm_content=license-updates-disabled-notification&utm_campaign=PBPro" target="_blank">', '</a>', '<a href="https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wpbackend&utm_medium=clientsite&utm_content=license-updates-disabled-notification&utm_campaign=PBPro#pricing" target="_blank">', '</a>' ) ); | |
| 424 | - | |
| 425 | - } | |
| 426 | - | |
| 427 | - } | |
| 428 | - } | |
| 429 | - | |
| 430 | - $update_message_hook = 'in_plugin_update_message-' . plugin_basename( WPPB_PAID_PLUGIN_DIR . '/index.php' ); | |
| 431 | - | |
| 432 | - if ( ! has_action( $update_message_hook, 'wppb_plugin_update_message' ) && ! function_exists( 'wppb_paid_plugin_update_message' ) ) | |
| 433 | - add_action( $update_message_hook, 'wppb_plugin_update_message', 10, 2 ); | |
| 434 | - } | |
| 435 | - | |
| 436 | - | |
| 437 | 377 | // these settings are important, so besides running them on page load, we also need to do a check on plugin activation |
| 438 | 378 | add_action('init', 'wppb_generate_default_settings_defaults'); //prepoulate general settings |
| 439 | 379 | add_action('init', 'wppb_prepopulate_fields'); //prepopulate manage fields list |
| 440 | 380 | |
| @@ -446,9 +386,9 @@ | ||
| 446 | 386 | * Definitions |
| 447 | 387 | * |
| 448 | 388 | * |
| 449 | 389 | */ |
| 450 | -define('PROFILE_BUILDER_VERSION', '3.16.4' ); | |
| 390 | +define('PROFILE_BUILDER_VERSION', '4.0.3' ); | |
| 451 | 391 | define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__)); |
| 452 | 392 | define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 453 | 393 | define('WPPB_PLUGIN_BASENAME', plugin_basename(__FILE__)); |
| 454 | 394 | define('WPPB_TRANSLATE_DIR', WPPB_PLUGIN_DIR . '/translation'); |
| @@ -505,8 +445,11 @@ | ||
| 505 | 445 | |
| 506 | 446 | } |
| 507 | 447 | } |
| 508 | 448 | |
| 449 | +/** | |
| 450 | + * Load the EDD updater from the paid wrapper when it owns updates. | |
| 451 | + */ | |
| 509 | 452 | if ( ! function_exists( 'wppb_paid_plugin_load_updater' ) ) { |
| 510 | 453 | function wppb_paid_plugin_load_updater() { |
| 511 | 454 | |
| 512 | 455 | if ( class_exists( 'WPPB_Plugin_Updater', false ) ) |
| @@ -511,19 +454,12 @@ | ||
| 511 | 454 | |
| 512 | 455 | if ( class_exists( 'WPPB_Plugin_Updater', false ) ) |
| 513 | 456 | return; |
| 514 | 457 | |
| 515 | - if ( function_exists( 'wppb_paid_plugin_owns_updates' ) && wppb_paid_plugin_owns_updates() ) { | |
| 516 | - $wppb_updater_file = WPPB_PAID_PLUGIN_DIR . '/update/class-edd-sl-plugin-updater.php'; | |
| 517 | - } elseif ( file_exists( WPPB_PLUGIN_DIR . '/update/class-edd-sl-plugin-updater.php' ) ) { | |
| 518 | - $wppb_updater_file = WPPB_PLUGIN_DIR . '/update/class-edd-sl-plugin-updater.php'; | |
| 519 | - } else { | |
| 458 | + if ( ! function_exists( 'wppb_paid_plugin_owns_updates' ) || ! wppb_paid_plugin_owns_updates() ) | |
| 520 | 459 | return; |
| 521 | - } | |
| 522 | 460 | |
| 523 | - if ( file_exists( $wppb_updater_file ) ) { | |
| 524 | - require_once $wppb_updater_file; | |
| 525 | - } | |
| 461 | + require_once WPPB_PAID_PLUGIN_DIR . '/update/class-edd-sl-plugin-updater.php'; | |
| 526 | 462 | |
| 527 | 463 | } |
| 528 | 464 | } |
| 529 | 465 | |