PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 4.0.3
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v4.0.3
4.0.3 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 All 341 releases
← All changes | assets/misc/gutenberg/blocks/register.php +8 -1 3.16.4 → 4.0.3 View file →
@@ -24,9 +24,9 @@
24 24 'admin_enqueue_scripts',
25 25 function () {
26 26 $wppb_module_settings = get_option( 'wppb_module_settings', 'not_found' );
27 27
28 - $registration_form_options[] = [ "label" => __( 'Default' , 'profile-builder' ), "value" => "" ];
28 + $registration_form_options = array();
29 29
30 30 if ( !( ( $wppb_module_settings !== 'not_found' && (
31 31 !isset( $wppb_module_settings['wppb_multipleRegistrationForms'] ) ||
32 32 $wppb_module_settings['wppb_multipleRegistrationForms'] !== 'show'
@@ -31,10 +31,17 @@
31 31 !isset( $wppb_module_settings['wppb_multipleRegistrationForms'] ) ||
32 32 $wppb_module_settings['wppb_multipleRegistrationForms'] !== 'show'
33 33 ) ) ||
34 34 $wppb_module_settings === 'not_found' ) ){
35 + // Published forms only. WP_Query adds the admin-visible protected
36 + // statuses (draft, pending, future, private) when it runs in the
37 + // admin, and this list is built on admin_enqueue_scripts — so
38 + // without the explicit status a draft form would be offered here
39 + // while its form_name resolves to nothing on the front end (the
40 + // resolver queries post_status = 'publish').
35 41 $args = array(
36 42 'post_type' => 'wppb-rf-cpt',
43 + 'post_status' => 'publish',
37 44 'posts_per_page' => -1
38 45 );
39 46
40 47 $the_query = new WP_Query( $args );