| @@ 356-362 (lines=7) @@ | ||
| 353 | * |
|
| 354 | * @param int get_option('embed_autourls') Option to automatically embed all plain text URLs. |
|
| 355 | */ |
|
| 356 | if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) { |
|
| 357 | // We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out. |
|
| 358 | if ( ! is_admin() ) { |
|
| 359 | // Higher priority because we need it before auto-link and autop get to it |
|
| 360 | add_filter( 'comment_text', 'youtube_link', 1 ); |
|
| 361 | } |
|
| 362 | } |
|
| 363 | ||
| 364 | /** |
|
| 365 | * Core changes to do_shortcode (https://core.trac.wordpress.org/changeset/34747) broke "improper" shortcodes |
|
| @@ 236-242 (lines=7) @@ | ||
| 233 | } |
|
| 234 | ||
| 235 | /** This filter is documented in modules/shortcodes/youtube.php */ |
|
| 236 | if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) { |
|
| 237 | // We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out. |
|
| 238 | if ( ! is_admin() ) { |
|
| 239 | // Higher priority because we need it before auto-link and autop get to it |
|
| 240 | add_filter( 'comment_text', 'vimeo_link', 1 ); |
|
| 241 | } |
|
| 242 | } |
|
| 243 | ||