'string', 'default' => '' ); } return $attributes; } /** * Publish the client schema mirror and the editable text control. */ add_action( 'wppb_fb_enqueue_editor_assets_late', 'wppb_ccc_fb_enqueue_editor_payload' ); function wppb_ccc_fb_enqueue_editor_payload() { $field_types = array_intersect( wppb_ccc_fb_supported_field_types(), wppb_fb_all_field_type_labels() ); if ( empty( $field_types ) ) return; $schema = array( 'class-field' => 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' => 'class-field', 'label' => __( 'CSS Class', 'profile-builder' ), 'help' => __( 'Add a class to a field. Should not contain dots(.) and for multiple classes separate by space.', 'profile-builder' ), 'control' => 'text', ) ); }