Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: press_this_suggested_html

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1162
1163           /**
1164            * Filter the default HTML for the Press This editor.
1165            *
1166            * @since 4.2.0
1167            *
1168            * @param array $default_html Associative array with two keys: 'quote' where %1$s is replaced with the site description
1169            *                            or the selected content, and 'link' there %1$s is link href, %2$s is link text.
1170            */
1171           $default_html = apply_filters( 'press_this_suggested_html', $default_html, $data );
1172
1173           if ( ! empty( $default_html['embed'] ) ) {
1174                $content .= $default_html['embed'];
1175           }
1176
1177           // Wrap suggested content in the specified HTML.
1178           if ( ! empty( $default_html['quote'] ) && $text ) {
1179                $content .= sprintf( $default_html['quote'], $text );
1180           }