Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/12/2015 05:50:45 PM (10 years ago)
Author:
boonebgorges
Message:

Enable richtext editing for xProfile textarea fields.

Profile fields of the 'textarea' type are now edited using wp_editor().
Output escaping has been modified to whitelist all tags permitted by the
"teeny" version of the wp_editor() interface.

Richtext is enabled for all and only 'textarea' fields:

  • To enable richtext editing for a custom field type, set the supports_richtext property of your BP_XProfile_Field_Type class to true. In these cases, you'll need to provide your own editing markup as well; see the edit_field_html() and admin_field_html() methods of BP_XProfile_Field_Type_Textarea for inspiration.
  • To disable richtext editing for specific 'textarea' fields, filter bp_xprofile_is_richtext_enabled_for_field.

Props needle, boonebgorges.
Fixes #5625.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/css/twentyfifteen.scss

    r10162 r10254  
    20412041    select {border: 1px solid rgba($border-color, 0.5);}
    20422042
     2043    // Overrides for embedded WP editors.
     2044    .wp-editor-wrap {
     2045        a.button,
     2046        button,
     2047        input[type=submit],
     2048        input[type=button],
     2049        input[type=reset] {
     2050            padding: 0 5px 1px;
     2051        }
     2052    }
     2053
    20432054} // close #buddypress
    20442055
Note: See TracChangeset for help on using the changeset viewer.