• Hi, I’m Claire,
    I use this plugin in a site, and I find it a shame not to have integrated the srcset support in textarea fields.
    So I did it !
    Here is my modification, in class.field-wysiwyg.php file (wp-content/smart-custom-fields/classes/fields)
    in the last function of the file :

    /**
    * Hooking functions that is hooked to the_content
    *
    * @param string $value
    * @return string
    */
    protected function add_the_content_filter( $value ) {
    if ( has_filter( ‘the_content’, ‘wptexturize’ ) ) {
    $value = wptexturize( $value );
    }
    if ( has_filter( ‘the_content’, ‘convert_smilies’ ) ) {
    $value = convert_smilies( $value );
    }
    if ( has_filter( ‘the_content’, ‘convert_chars’ ) ) {
    $value = convert_chars( $value );
    }
    if ( has_filter( ‘the_content’, ‘wpautop’ ) ) {
    $value = wpautop( $value );
    }
    if ( has_filter( ‘the_content’, ‘shortcode_unautop’ ) ) {
    $value = shortcode_unautop( $value );
    }
    if ( has_filter( ‘the_content’, ‘prepend_attachment’ ) ) {
    $value = prepend_attachment( $value );
    }
    // SRCSET SUPPORT HERE !!!
    if ( has_filter( ‘the_content’, ‘wp_make_content_images_responsive’ ) ) {
    $value = wp_make_content_images_responsive( $value );
    }
    return $value;
    }

    The page I need help with: [log in to see the link]

  • The topic ‘[suggestion] srcset support in textarea field’ is closed to new replies.