'string', 'default' => '' ); } return $attributes; } /** * Publish the client schema mirror and the editable number control. */ add_action( 'wppb_fb_enqueue_editor_assets_late', 'wppb_mcl_fb_enqueue_editor_payload' ); function wppb_mcl_fb_enqueue_editor_payload() { $field_types = array_intersect( wppb_mcl_fb_supported_field_types(), wppb_fb_all_field_type_labels() ); if ( empty( $field_types ) ) return; $schema = array( 'maximum-character-length' => array( 'type' => 'string', 'default' => '' ) ); $extra = array(); foreach ( $field_types as $field_type ) { $extra[ $field_type ] = $schema; } wppb_fb_extra_attributes_inline_script( $extra ); wppb_fb_register_extra_field_control( array( 'attribute' => 'maximum-character-length', 'label' => __( 'Maximum Character Length', 'profile-builder' ), 'help' => __( 'Specify the maximum number of characters a user can type in this field.', 'profile-builder' ), 'control' => 'number', ) ); }