| @@ 366-372 (lines=7) @@ | ||
| 363 | * |
|
| 364 | * @param int get_option('embed_autourls') Option to automatically embed all plain text URLs. |
|
| 365 | */ |
|
| 366 | if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) { |
|
| 367 | // We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out. |
|
| 368 | if ( ! is_admin() ) { |
|
| 369 | // Higher priority because we need it before auto-link and autop get to it |
|
| 370 | add_filter( 'comment_text', 'youtube_link', 1 ); |
|
| 371 | } |
|
| 372 | } |
|
| 373 | ||
| 374 | /** |
|
| 375 | * Core changes to do_shortcode (https://core.trac.wordpress.org/changeset/34747) broke "improper" shortcodes |
|
| @@ 295-301 (lines=7) @@ | ||
| 292 | } |
|
| 293 | ||
| 294 | /** This filter is documented in modules/shortcodes/youtube.php */ |
|
| 295 | if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) { |
|
| 296 | // We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out. |
|
| 297 | if ( ! is_admin() ) { |
|
| 298 | // Higher priority because we need it before auto-link and autop get to it |
|
| 299 | add_filter( 'comment_text', 'vimeo_link', 1 ); |
|
| 300 | } |
|
| 301 | } |
|
| 302 | ||