GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
textarea.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display the textarea field type
4  *
5  * Use wpautop() to format paragraphs, as expected, instead of line breaks like Gravity Forms displays by default.
6  *
7  * @package GravityView
8  * @subpackage GravityView/templates/fields
9  */
10 
12 
13 extract( $gravityview_view->getCurrentField() );
14 
15 if( !empty( $field_settings['trim_words'] ) ) {
16 
17  /**
18  * @filter `gravityview_excerpt_more` Modify the "Read more" link used when "Maximum Words" setting is enabled and the output is truncated
19  * @since 1.16.1
20  * @param string $excerpt_more Default: ` ...`
21  */
22  $excerpt_more = apply_filters( 'gravityview_excerpt_more', ' ' . '&hellip;' );
23 
24  $entry_link = GravityView_API::entry_link_html( $entry, $excerpt_more, array(), $field_settings );
25  $value = wp_trim_words( $value, $field_settings['trim_words'], $entry_link );
26  unset( $entry_link, $excerpt_more );
27 }
28 
29 if( !empty( $field_settings['make_clickable'] ) ) {
30  $value = make_clickable( $value );
31 }
32 
33 if( ! empty( $field_settings['new_window'] ) ) {
34  $value = links_add_target( $value );
35 }
36 
37 echo wpautop( $value );
38 
$gravityview_view
Definition: textarea.php:11
$field_settings['content']
Definition: custom.php:27
static entry_link_html($entry=array(), $anchor_text= '', $passed_tag_atts=array(), $field_settings=array())
Generate an anchor tag that links to an entry.
Definition: class-api.php:362
static getInstance($passed_post=NULL)
$entry
Definition: notes.php:27