• Resolved ACCOUNT-ABANDONED

    (@kraterdesign)


    When you use fonts with spaces in their names, its practice to wrap the name in quotes. However when fontnames with quotes exist in the typography font-family select boxes (dropdowns), you select them, save and come back to the page, they are not selected.

    This happens because the selected() function call to compare font-family names will never match. Reason for this is the esc_attr() call in the following line in ot-functions-option-types.php:
    $font_family = isset( $field_value['font-family'] ) ? esc_attr( $field_value['font-family'] ) : '';

    change that to:
    $font_family = isset( $field_value['font-family'] ) ? $field_value['font-family'] : '';
    and it will once again match and work as expected. As far as I can see there’s no need to esc_attr this variable anyway, as its not used elsewhere and the selected() call is a simple comparison.

    http://wordpress.org/extend/plugins/option-tree/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Font-family boxes not showing selected fix’ is closed to new replies.