| @@ -5,10 +5,10 @@ | ||
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | /**************************************************** |
| 9 | - * Plugin Name: Captcha | |
| 10 | - * Plugin URI: https://wordpress.org/plugins/captcha/ | |
| 9 | + * Name of the plugin: Captcha | |
| 10 | + * Homepage: https://wordpress.org/plugins/captcha/ | |
| 11 | 11 | ****************************************************/ |
| 12 | 12 | |
| 13 | 13 | /* |
| 14 | 14 | * Function that ads the Captcha HTML to Profile Builder login form |
| @@ -219,10 +219,10 @@ | ||
| 219 | 219 | |
| 220 | 220 | |
| 221 | 221 | |
| 222 | 222 | /**************************************************** |
| 223 | - * Plugin Name: Easy Digital Downloads | |
| 224 | - * Plugin URI: https://wordpress.org/plugins/easy-digital-downloads/ | |
| 223 | + * Name of the plugin: Easy Digital Downloads | |
| 224 | + * Homepage: https://wordpress.org/plugins/easy-digital-downloads/ | |
| 225 | 225 | ****************************************************/ |
| 226 | 226 | |
| 227 | 227 | /* Function that checks if a user is approved before loggin in, when admin approval is on */ |
| 228 | 228 | function wppb_check_edd_login_form( $auth_cookie, $expire, $expiration, $user_id, $scheme ) { |
| @@ -232,9 +232,9 @@ | ||
| 232 | 232 | if( wppb_get_admin_approval_option_value() === 'yes' ) { |
| 233 | 233 | if( isset( $_REQUEST['edd_login_nonce'] ) ) { |
| 234 | 234 | if( wp_get_object_terms( $user_id, 'user_status' ) ) { |
| 235 | 235 | if( isset( $_REQUEST['edd_redirect'] ) ) { |
| 236 | - wp_redirect( esc_url_raw( $_REQUEST['edd_redirect'] ) ); | |
| 236 | + wp_redirect( wppb_sanitize_request_url( $_REQUEST['edd_redirect'] ) ); | |
| 237 | 237 | edd_set_error( 'user_unapproved', __('Your account has to be confirmed by an administrator before you can log in.', 'profile-builder') ); |
| 238 | 238 | edd_get_errors(); |
| 239 | 239 | edd_die(); |
| 240 | 240 | } |
| @@ -247,10 +247,10 @@ | ||
| 247 | 247 | add_action( 'set_logged_in_cookie', 'wppb_check_edd_login_form', 10, 5 ); |
| 248 | 248 | |
| 249 | 249 | |
| 250 | 250 | /**************************************************** |
| 251 | - * Plugin Name: Page Builder by SiteOrigin && Yoast SEO | |
| 252 | - * Plugin URI: https://wordpress.org/plugins/siteorigin-panels/ && https://wordpress.org/plugins/wordpress-seo/ | |
| 251 | + * Name of the plugin: Page Builder by SiteOrigin && Yoast SEO | |
| 252 | + * Homepage: https://wordpress.org/plugins/siteorigin-panels/ && https://wordpress.org/plugins/wordpress-seo/ | |
| 253 | 253 | * When both plugins are activated SEO generates description tags that execute shortcodes because of the filter on "the_content" added by Page Builder when generating the excerpt |
| 254 | 254 | ****************************************************/ |
| 255 | 255 | if( function_exists( 'siteorigin_panels_filter_content' ) ){ |
| 256 | 256 | add_action( 'wpseo_head', 'wppb_remove_siteorigin_panels_content_filter', 8 ); |
| @@ -274,9 +274,9 @@ | ||
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /**************************************************** |
| 278 | - * Plugin Name: WPML | |
| 278 | + * Name of the plugin: WPML | |
| 279 | 279 | * Compatibility with wp_login_form() that wasn't getting the language code in the site url |
| 280 | 280 | ****************************************************/ |
| 281 | 281 | add_filter( 'site_url', 'wppb_wpml_login_form_compatibility', 10, 4 ); |
| 282 | 282 | function wppb_wpml_login_form_compatibility( $url, $path, $scheme, $blog_id ){ |
| @@ -302,9 +302,9 @@ | ||
| 302 | 302 | return $url; |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /**************************************************** |
| 306 | - * Plugin Name: ACF | |
| 306 | + * Name of the plugin: ACF | |
| 307 | 307 | * Compatibility with Role Editor where ACF includes it's own select 2 and a bit differently then the standard hooks |
| 308 | 308 | ****************************************************/ |
| 309 | 309 | add_action( 'admin_enqueue_scripts', 'wppb_acf_and_user_role_select_2_compatibility' ); |
| 310 | 310 | function wppb_acf_and_user_role_select_2_compatibility(){ |
| @@ -362,9 +362,9 @@ | ||
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | |
| 365 | 365 | /**************************************************** |
| 366 | - * Plugin Name: xCRUD | |
| 366 | + * Name of the plugin: xCRUD | |
| 367 | 367 | * Compatibility in terms of preventing jQuery to be loaded twice |
| 368 | 368 | ****************************************************/ |
| 369 | 369 | if ( class_exists( 'Xcrud_config' ) ){ |
| 370 | 370 | Xcrud_config::$load_jquery = apply_filters( 'wppb_xcrud_jquery_compatibility', false ); |
| @@ -370,10 +370,10 @@ | ||
| 370 | 370 | Xcrud_config::$load_jquery = apply_filters( 'wppb_xcrud_jquery_compatibility', false ); |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | /**************************************************** |
| 374 | - * Plugin Name: bbPress Messages | |
| 375 | - * Plugin URI: https://wordpress.org/plugins/bbp-messages/ | |
| 374 | + * Name of the plugin: bbPress Messages | |
| 375 | + * Homepage: https://wordpress.org/plugins/bbp-messages/ | |
| 376 | 376 | * This plugin relies on the 'bbp_template_before_user_profile' hook |
| 377 | 377 | ****************************************************/ |
| 378 | 378 | if ( function_exists( 'bbp_messages_loaded' ) ){ |
| 379 | 379 | add_action( 'wppb_bbp_template_before_user_profile', 'wppb_bbp_messages_compatibility' ); |
| @@ -382,9 +382,9 @@ | ||
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /**************************************************** |
| 386 | - * Plugin Name: LearnDash LMS | |
| 386 | + * Name of the plugin: LearnDash LMS | |
| 387 | 387 | * This plugin hijacks the 'wp_login_failed' hook not allowing the PB login form to show errors |
| 388 | 388 | ****************************************************/ |
| 389 | 389 | if ( class_exists( 'Semper_Fi_Module' ) ){ |
| 390 | 390 | add_action( 'wppb_process_login_start', 'wppb_learndash_compatibility_login_start' ); |
| @@ -397,9 +397,9 @@ | ||
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | /**************************************************** |
| 401 | - * Plugin Name: MailPoet | |
| 401 | + * Name of the plugin: MailPoet | |
| 402 | 402 | * By default MailPoet disables custom scripts and styles to prevent JavaScript and CSS conflicts with their interface |
| 403 | 403 | * With these filters we can whitelist our styles and scripts |
| 404 | 404 | ****************************************************/ |
| 405 | 405 | |
| @@ -419,10 +419,10 @@ | ||
| 419 | 419 | } |
| 420 | 420 | add_filter('mailpoet_conflict_resolver_whitelist_script', 'wppb_mailpoet_conflict_resolver_whitelist_script'); |
| 421 | 421 | |
| 422 | 422 | /**************************************************** |
| 423 | - * Plugin Name: Advanced Product Fields for Woocommerce | |
| 424 | - * Plugin URI: https://wordpress.org/plugins/advanced-product-fields-for-woocommerce/ | |
| 423 | + * Name of the plugin: Advanced Product Fields for Woocommerce | |
| 424 | + * Homepage: https://wordpress.org/plugins/advanced-product-fields-for-woocommerce/ | |
| 425 | 425 | * When both plugins are activated an '&&' operator from the JS code APF adds to product $content for its Datepicker is encoded |
| 426 | 426 | ****************************************************/ |
| 427 | 427 | if( function_exists( 'SW_WAPF_PRO_auto_loader' ) ){ |
| 428 | 428 | function wppb_WAPF_compatibility( $content ) |
| @@ -433,11 +433,42 @@ | ||
| 433 | 433 | add_filter('the_content', 'wppb_WAPF_compatibility', 13, 1); |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | /**************************************************** |
| 437 | - * Plugin Name: WooCommerce | |
| 438 | - * Plugin URI: https://wordpress.org/plugins/woocommerce/ | |
| 437 | + * Name of the plugin: WooCommerce | |
| 438 | + * Homepage: https://wordpress.org/plugins/woocommerce/ | |
| 439 | 439 | * Don't allow WooCommerce to Login User after registration if PB Admin Approval is Active |
| 440 | 440 | ****************************************************/ |
| 441 | 441 | if( wppb_get_admin_approval_option_value() === 'yes' ) { |
| 442 | 442 | add_filter( 'woocommerce_registration_auth_new_customer', '__return_false' ); |
| 443 | + } | |
| 444 | + | |
| 445 | + /**************************************************** | |
| 446 | + * Name of the plugin: WooCommerce | |
| 447 | + * Homepage: https://wordpress.org/plugins/woocommerce/ | |
| 448 | + * Starting with version 7.7 WooCommerce is restricting access to the dashboard through the admin_init hook. | |
| 449 | + * This hook runs on async-upload.php and they disallow the uploading of files from logged out users. | |
| 450 | + * We remove this restriction so that our users can upload files correctly | |
| 451 | + ****************************************************/ | |
| 452 | + add_filter( 'woocommerce_prevent_admin_access', 'wppb_woo_admin_access_uploads_compatibility' ); | |
| 453 | + function wppb_woo_admin_access_uploads_compatibility( $prevent_access ){ | |
| 454 | + | |
| 455 | + if( isset( $_REQUEST['wppb_upload'] ) && $_REQUEST['wppb_upload'] == 'true' ){ | |
| 456 | + return false; | |
| 457 | + } | |
| 458 | + | |
| 459 | + return $prevent_access; | |
| 460 | + | |
| 461 | + } | |
| 462 | + | |
| 463 | + // This filter makes the PayPal Express confirmation form appear normally when automatic login is enabled for PB | |
| 464 | + add_filter( 'pms_paypal_express_enable_the_content_hook_for_confirmation_form', 'wppb_pms_maybe_enable_the_content_hook_for_paypal_express_confirmation_form' ); | |
| 465 | + function wppb_pms_maybe_enable_the_content_hook_for_paypal_express_confirmation_form( $setting ){ | |
| 466 | + | |
| 467 | + $wppb_general_settings = get_option( 'wppb_general_settings' ); | |
| 468 | + | |
| 469 | + if( isset( $wppb_general_settings['automaticallyLogIn'] ) && $wppb_general_settings['automaticallyLogIn'] == 'Yes' ) | |
| 470 | + return true; | |
| 471 | + | |
| 472 | + return $setting; | |
| 473 | + | |
| 443 | 474 | } |