WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
1146 | * |
1147 | * @since 4.2.0 |
1148 | * |
1149 | * @param array $default_html Associative array with three possible keys: |
1150 | * - 'quote' where %1$s is replaced with the site description or the selected content. |
1151 | * - 'link' where %1$s is link href, %2$s is link text, usually the source page title. |
1152 | * - 'embed' which contains an [embed] shortcode when the source page offers embeddable content. |
1153 | * @param array $data Associative array containing the data from the source page. |
1154 | */ |
1155 | $default_html = apply_filters( 'press_this_suggested_html', $default_html, $data ); |
1156 |
|
1157 | if ( ! empty( $default_html['embed'] ) ) { |
1158 | $content .= $default_html['embed']; |
1159 | } |
1160 |
|
1161 | // Wrap suggested content in the specified HTML. |
1162 | if ( ! empty( $default_html['quote'] ) && $text ) { |
1163 | $content .= sprintf( $default_html['quote'], $text ); |
1164 | } |