152
165
add_filter( 'wp_update_term_parent', 'wp_check_term_hierarchy_for_loops', 10, 3 );
154
167
// Display filters
155
add_filter( 'the_title', 'wptexturize' );
168
add_filter( 'the_title', 'wptexturize' );
156
169
add_filter( 'the_title', 'convert_chars' );
157
add_filter( 'the_title', 'trim' );
170
add_filter( 'the_title', 'trim' );
159
add_filter( 'the_content', 'do_blocks', 9 );
160
add_filter( 'the_content', 'wptexturize' );
161
add_filter( 'the_content', 'convert_smilies', 20 );
162
add_filter( 'the_content', 'wpautop' );
163
add_filter( 'the_content', 'shortcode_unautop' );
164
add_filter( 'the_content', 'prepend_attachment' );
172
add_filter( 'the_content', 'do_blocks', 9 );
173
add_filter( 'the_content', 'wptexturize' );
174
add_filter( 'the_content', 'convert_smilies', 20 );
175
add_filter( 'the_content', 'wpautop' );
176
add_filter( 'the_content', 'shortcode_unautop' );
177
add_filter( 'the_content', 'prepend_attachment' );
165
178
add_filter( 'the_content', 'wp_make_content_images_responsive' );
167
add_filter( 'the_excerpt', 'wptexturize' );
168
add_filter( 'the_excerpt', 'convert_smilies' );
169
add_filter( 'the_excerpt', 'convert_chars' );
170
add_filter( 'the_excerpt', 'wpautop' );
171
add_filter( 'the_excerpt', 'shortcode_unautop');
172
add_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
180
add_filter( 'the_excerpt', 'wptexturize' );
181
add_filter( 'the_excerpt', 'convert_smilies' );
182
add_filter( 'the_excerpt', 'convert_chars' );
183
add_filter( 'the_excerpt', 'wpautop' );
184
add_filter( 'the_excerpt', 'shortcode_unautop' );
185
add_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
174
add_filter( 'the_post_thumbnail_caption', 'wptexturize' );
187
add_filter( 'the_post_thumbnail_caption', 'wptexturize' );
175
188
add_filter( 'the_post_thumbnail_caption', 'convert_smilies' );
176
add_filter( 'the_post_thumbnail_caption', 'convert_chars' );
189
add_filter( 'the_post_thumbnail_caption', 'convert_chars' );
178
add_filter( 'comment_text', 'wptexturize' );
179
add_filter( 'comment_text', 'convert_chars' );
180
add_filter( 'comment_text', 'make_clickable', 9 );
191
add_filter( 'comment_text', 'wptexturize' );
192
add_filter( 'comment_text', 'convert_chars' );
193
add_filter( 'comment_text', 'make_clickable', 9 );
181
194
add_filter( 'comment_text', 'force_balance_tags', 25 );
182
add_filter( 'comment_text', 'convert_smilies', 20 );
183
add_filter( 'comment_text', 'wpautop', 30 );
195
add_filter( 'comment_text', 'convert_smilies', 20 );
196
add_filter( 'comment_text', 'wpautop', 30 );
185
198
add_filter( 'comment_excerpt', 'convert_chars' );
187
add_filter( 'list_cats', 'wptexturize' );
200
add_filter( 'list_cats', 'wptexturize' );
189
202
add_filter( 'wp_sprintf', 'wp_sprintf_l', 10, 2 );
191
add_filter( 'widget_text', 'balanceTags' );
204
add_filter( 'widget_text', 'balanceTags' );
192
205
add_filter( 'widget_text_content', 'capital_P_dangit', 11 );
193
add_filter( 'widget_text_content', 'wptexturize' );
194
add_filter( 'widget_text_content', 'convert_smilies', 20 );
195
add_filter( 'widget_text_content', 'wpautop' );
196
add_filter( 'widget_text_content', 'shortcode_unautop' );
197
add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run.
206
add_filter( 'widget_text_content', 'wptexturize' );
207
add_filter( 'widget_text_content', 'convert_smilies', 20 );
208
add_filter( 'widget_text_content', 'wpautop' );
209
add_filter( 'widget_text_content', 'shortcode_unautop' );
210
add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run.
199
212
add_filter( 'date_i18n', 'wp_maybe_decline_date' );
202
add_filter( 'the_title_rss', 'strip_tags' );
203
add_filter( 'the_title_rss', 'ent2ncr', 8 );
204
add_filter( 'the_title_rss', 'esc_html' );
205
add_filter( 'the_content_rss', 'ent2ncr', 8 );
206
add_filter( 'the_content_feed', 'wp_staticize_emoji' );
207
add_filter( 'the_content_feed', '_oembed_filter_feed_content' );
208
add_filter( 'the_excerpt_rss', 'convert_chars' );
209
add_filter( 'the_excerpt_rss', 'ent2ncr', 8 );
210
add_filter( 'comment_author_rss', 'ent2ncr', 8 );
211
add_filter( 'comment_text_rss', 'ent2ncr', 8 );
212
add_filter( 'comment_text_rss', 'esc_html' );
213
add_filter( 'comment_text_rss', 'wp_staticize_emoji' );
214
add_filter( 'bloginfo_rss', 'ent2ncr', 8 );
215
add_filter( 'the_author', 'ent2ncr', 8 );
216
add_filter( 'the_guid', 'esc_url' );
215
add_filter( 'the_title_rss', 'strip_tags' );
216
add_filter( 'the_title_rss', 'ent2ncr', 8 );
217
add_filter( 'the_title_rss', 'esc_html' );
218
add_filter( 'the_content_rss', 'ent2ncr', 8 );
219
add_filter( 'the_content_feed', 'wp_staticize_emoji' );
220
add_filter( 'the_content_feed', '_oembed_filter_feed_content' );
221
add_filter( 'the_excerpt_rss', 'convert_chars' );
222
add_filter( 'the_excerpt_rss', 'ent2ncr', 8 );
223
add_filter( 'comment_author_rss', 'ent2ncr', 8 );
224
add_filter( 'comment_text_rss', 'ent2ncr', 8 );
225
add_filter( 'comment_text_rss', 'esc_html' );
226
add_filter( 'comment_text_rss', 'wp_staticize_emoji' );
227
add_filter( 'bloginfo_rss', 'ent2ncr', 8 );
228
add_filter( 'the_author', 'ent2ncr', 8 );
229
add_filter( 'the_guid', 'esc_url' );
219
232
add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
227
add_filter( 'option_ping_sites', 'privacy_ping_filter' );
228
add_filter( 'option_blog_charset', '_wp_specialchars' ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
229
add_filter( 'option_blog_charset', '_canonical_charset' );
230
add_filter( 'option_home', '_config_wp_home' );
231
add_filter( 'option_siteurl', '_config_wp_siteurl' );
232
add_filter( 'tiny_mce_before_init', '_mce_set_direction' );
233
add_filter( 'teeny_mce_before_init', '_mce_set_direction' );
234
add_filter( 'pre_kses', 'wp_pre_kses_less_than' );
235
add_filter( 'sanitize_title', 'sanitize_title_with_dashes', 10, 3 );
236
add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 4 );
237
add_filter( 'comment_flood_filter', 'wp_throttle_comment_flood', 10, 3 );
238
add_filter( 'pre_comment_content', 'wp_rel_nofollow', 15 );
239
add_filter( 'comment_email', 'antispambot' );
240
add_filter( 'option_tag_base', '_wp_filter_taxonomy_base' );
241
add_filter( 'option_category_base', '_wp_filter_taxonomy_base' );
242
add_filter( 'the_posts', '_close_comments_for_old_posts', 10, 2);
243
add_filter( 'comments_open', '_close_comments_for_old_post', 10, 2 );
244
add_filter( 'pings_open', '_close_comments_for_old_post', 10, 2 );
245
add_filter( 'editable_slug', 'urldecode' );
246
add_filter( 'editable_slug', 'esc_textarea' );
247
add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' );
248
add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri' );
249
add_filter( 'xmlrpc_pingback_error', 'xmlrpc_pingback_error' );
250
add_filter( 'title_save_pre', 'trim' );
240
add_filter( 'option_ping_sites', 'privacy_ping_filter' );
241
add_filter( 'option_blog_charset', '_wp_specialchars' ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
242
add_filter( 'option_blog_charset', '_canonical_charset' );
243
add_filter( 'option_home', '_config_wp_home' );
244
add_filter( 'option_siteurl', '_config_wp_siteurl' );
245
add_filter( 'tiny_mce_before_init', '_mce_set_direction' );
246
add_filter( 'teeny_mce_before_init', '_mce_set_direction' );
247
add_filter( 'pre_kses', 'wp_pre_kses_less_than' );
248
add_filter( 'sanitize_title', 'sanitize_title_with_dashes', 10, 3 );
249
add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 4 );
250
add_filter( 'comment_flood_filter', 'wp_throttle_comment_flood', 10, 3 );
251
add_filter( 'pre_comment_content', 'wp_rel_nofollow', 15 );
252
add_filter( 'comment_email', 'antispambot' );
253
add_filter( 'option_tag_base', '_wp_filter_taxonomy_base' );
254
add_filter( 'option_category_base', '_wp_filter_taxonomy_base' );
255
add_filter( 'the_posts', '_close_comments_for_old_posts', 10, 2 );
256
add_filter( 'comments_open', '_close_comments_for_old_post', 10, 2 );
257
add_filter( 'pings_open', '_close_comments_for_old_post', 10, 2 );
258
add_filter( 'editable_slug', 'urldecode' );
259
add_filter( 'editable_slug', 'esc_textarea' );
260
add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' );
261
add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri' );
262
add_filter( 'xmlrpc_pingback_error', 'xmlrpc_pingback_error' );
263
add_filter( 'title_save_pre', 'trim' );
252
265
add_action( 'transition_comment_status', '_clear_modified_cache_on_transition_comment_status', 10, 2 );
254
add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 );
267
add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 );
256
269
// REST API filters.
257
add_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
258
add_action( 'wp_head', 'rest_output_link_wp_head', 10, 0 );
259
add_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
260
add_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );
261
add_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );
262
add_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' );
263
add_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' );
264
add_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
270
add_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
271
add_action( 'wp_head', 'rest_output_link_wp_head', 10, 0 );
272
add_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
273
add_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );
274
add_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );
275
add_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' );
276
add_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' );
277
add_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
265
278
add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );
268
add_action( 'wp_head', '_wp_render_title_tag', 1 );
269
add_action( 'wp_head', 'wp_enqueue_scripts', 1 );
270
add_action( 'wp_head', 'wp_resource_hints', 2 );
271
add_action( 'wp_head', 'feed_links', 2 );
272
add_action( 'wp_head', 'feed_links_extra', 3 );
273
add_action( 'wp_head', 'rsd_link' );
274
add_action( 'wp_head', 'wlwmanifest_link' );
275
add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
276
add_action( 'wp_head', 'locale_stylesheet' );
277
add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
278
add_action( 'wp_head', 'noindex', 1 );
279
add_action( 'wp_head', 'print_emoji_detection_script', 7 );
280
add_action( 'wp_head', 'wp_print_styles', 8 );
281
add_action( 'wp_head', 'wp_print_head_scripts', 9 );
282
add_action( 'wp_head', 'wp_generator' );
283
add_action( 'wp_head', 'rel_canonical' );
284
add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
285
add_action( 'wp_head', 'wp_custom_css_cb', 101 );
286
add_action( 'wp_head', 'wp_site_icon', 99 );
287
add_action( 'wp_footer', 'wp_print_footer_scripts', 20 );
288
add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
289
add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' );
290
add_action( 'init', 'check_theme_switched', 99 );
291
add_action( 'after_switch_theme', '_wp_menus_changed' );
292
add_action( 'after_switch_theme', '_wp_sidebars_changed' );
293
add_action( 'wp_print_styles', 'print_emoji_styles' );
281
add_action( 'wp_head', '_wp_render_title_tag', 1 );
282
add_action( 'wp_head', 'wp_enqueue_scripts', 1 );
283
add_action( 'wp_head', 'wp_resource_hints', 2 );
284
add_action( 'wp_head', 'feed_links', 2 );
285
add_action( 'wp_head', 'feed_links_extra', 3 );
286
add_action( 'wp_head', 'rsd_link' );
287
add_action( 'wp_head', 'wlwmanifest_link' );
288
add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
289
add_action( 'wp_head', 'locale_stylesheet' );
290
add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
291
add_action( 'wp_head', 'noindex', 1 );
292
add_action( 'wp_head', 'print_emoji_detection_script', 7 );
293
add_action( 'wp_head', 'wp_print_styles', 8 );
294
add_action( 'wp_head', 'wp_print_head_scripts', 9 );
295
add_action( 'wp_head', 'wp_generator' );
296
add_action( 'wp_head', 'rel_canonical' );
297
add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
298
add_action( 'wp_head', 'wp_custom_css_cb', 101 );
299
add_action( 'wp_head', 'wp_site_icon', 99 );
300
add_action( 'wp_footer', 'wp_print_footer_scripts', 20 );
301
add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
302
add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' );
303
add_action( 'init', 'check_theme_switched', 99 );
304
add_action( 'after_switch_theme', '_wp_menus_changed' );
305
add_action( 'after_switch_theme', '_wp_sidebars_changed' );
306
add_action( 'wp_print_styles', 'print_emoji_styles' );
295
if ( isset( $_GET['replytocom'] ) )
296
add_action( 'wp_head', 'wp_no_robots' );
308
if ( isset( $_GET['replytocom'] ) ) {
309
add_action( 'wp_head', 'wp_no_robots' );
299
add_filter( 'login_head', 'wp_resource_hints', 8 );
300
add_action( 'login_head', 'wp_print_head_scripts', 9 );
301
add_action( 'login_head', 'print_admin_styles', 9 );
302
add_action( 'login_head', 'wp_site_icon', 99 );
303
add_action( 'login_footer', 'wp_print_footer_scripts', 20 );
304
add_action( 'login_init', 'send_frame_options_header', 10, 0 );
313
add_filter( 'login_head', 'wp_resource_hints', 8 );
314
add_action( 'login_head', 'wp_print_head_scripts', 9 );
315
add_action( 'login_head', 'print_admin_styles', 9 );
316
add_action( 'login_head', 'wp_site_icon', 99 );
317
add_action( 'login_footer', 'wp_print_footer_scripts', 20 );
318
add_action( 'login_init', 'send_frame_options_header', 10, 0 );
306
320
// Feed Generator Tags
307
321
foreach ( array( 'rss2_head', 'commentsrss2_head', 'rss_head', 'rdf_header', 'atom_head', 'comments_atom_head', 'opml_head', 'app_head' ) as $action ) {
317
if ( !defined( 'DOING_CRON' ) )
331
if ( ! defined( 'DOING_CRON' ) ) {
318
332
add_action( 'init', 'wp_cron' );
320
335
// 2 Actions 2 Furious
321
add_action( 'do_feed_rdf', 'do_feed_rdf', 10, 1 );
322
add_action( 'do_feed_rss', 'do_feed_rss', 10, 1 );
323
add_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 );
324
add_action( 'do_feed_atom', 'do_feed_atom', 10, 1 );
325
add_action( 'do_pings', 'do_all_pings', 10, 1 );
326
add_action( 'do_robots', 'do_robots' );
327
add_action( 'set_comment_cookies', 'wp_set_comment_cookies', 10, 3 );
328
add_action( 'sanitize_comment_cookies', 'sanitize_comment_cookies' );
329
add_action( 'admin_print_scripts', 'print_emoji_detection_script' );
330
add_action( 'admin_print_scripts', 'print_head_scripts', 20 );
331
add_action( 'admin_print_footer_scripts', '_wp_footer_scripts' );
332
add_action( 'admin_print_styles', 'print_emoji_styles' );
333
add_action( 'admin_print_styles', 'print_admin_styles', 20 );
334
add_action( 'init', 'smilies_init', 5 );
335
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );
336
add_action( 'plugins_loaded', 'wp_maybe_load_embeds', 0 );
337
add_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
336
add_action( 'do_feed_rdf', 'do_feed_rdf', 10, 1 );
337
add_action( 'do_feed_rss', 'do_feed_rss', 10, 1 );
338
add_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 );
339
add_action( 'do_feed_atom', 'do_feed_atom', 10, 1 );
340
add_action( 'do_pings', 'do_all_pings', 10, 1 );
341
add_action( 'do_robots', 'do_robots' );
342
add_action( 'set_comment_cookies', 'wp_set_comment_cookies', 10, 3 );
343
add_action( 'sanitize_comment_cookies', 'sanitize_comment_cookies' );
344
add_action( 'admin_print_scripts', 'print_emoji_detection_script' );
345
add_action( 'admin_print_scripts', 'print_head_scripts', 20 );
346
add_action( 'admin_print_footer_scripts', '_wp_footer_scripts' );
347
add_action( 'admin_print_styles', 'print_emoji_styles' );
348
add_action( 'admin_print_styles', 'print_admin_styles', 20 );
349
add_action( 'init', 'smilies_init', 5 );
350
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );
351
add_action( 'plugins_loaded', 'wp_maybe_load_embeds', 0 );
352
add_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
338
353
// Create a revision whenever a post is updated.
339
add_action( 'post_updated', 'wp_save_post_revision', 10, 1 );
340
add_action( 'publish_post', '_publish_post_hook', 5, 1 );
341
add_action( 'transition_post_status', '_transition_post_status', 5, 3 );
342
add_action( 'transition_post_status', '_update_term_count_on_transition_post_status', 10, 3 );
343
add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
344
add_action( 'admin_init', 'send_frame_options_header', 10, 0 );
345
add_action( 'welcome_panel', 'wp_welcome_panel' );
354
add_action( 'post_updated', 'wp_save_post_revision', 10, 1 );
355
add_action( 'publish_post', '_publish_post_hook', 5, 1 );
356
add_action( 'transition_post_status', '_transition_post_status', 5, 3 );
357
add_action( 'transition_post_status', '_update_term_count_on_transition_post_status', 10, 3 );
358
add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
359
add_action( 'admin_init', 'send_frame_options_header', 10, 0 );
360
add_action( 'welcome_panel', 'wp_welcome_panel' );
348
363
add_action( 'user_request_action_confirmed', '_wp_privacy_account_request_confirmed' );
355
370
add_action( 'wp_privacy_delete_old_export_files', 'wp_privacy_delete_old_export_files' );
358
add_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
359
add_action( 'wp_scheduled_auto_draft_delete', 'wp_delete_auto_drafts' );
360
add_action( 'importer_scheduled_cleanup', 'wp_delete_attachment' );
361
add_action( 'upgrader_scheduled_cleanup', 'wp_delete_attachment' );
362
add_action( 'delete_expired_transients', 'delete_expired_transients' );
373
add_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
374
add_action( 'wp_scheduled_auto_draft_delete', 'wp_delete_auto_drafts' );
375
add_action( 'importer_scheduled_cleanup', 'wp_delete_attachment' );
376
add_action( 'upgrader_scheduled_cleanup', 'wp_delete_attachment' );
377
add_action( 'delete_expired_transients', 'delete_expired_transients' );
364
379
// Navigation menu actions
365
add_action( 'delete_post', '_wp_delete_post_menu_item' );
366
add_action( 'delete_term', '_wp_delete_tax_menu_item', 10, 3 );
367
add_action( 'transition_post_status', '_wp_auto_add_pages_to_menu', 10, 3 );
368
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
380
add_action( 'delete_post', '_wp_delete_post_menu_item' );
381
add_action( 'delete_term', '_wp_delete_tax_menu_item', 10, 3 );
382
add_action( 'transition_post_status', '_wp_auto_add_pages_to_menu', 10, 3 );
383
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
370
385
// Post Thumbnail CSS class filtering
371
add_action( 'begin_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_add' );
372
add_action( 'end_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_remove' );
386
add_action( 'begin_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_add' );
387
add_action( 'end_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_remove' );
374
389
// Redirect Old Slugs
375
add_action( 'template_redirect', 'wp_old_slug_redirect' );
376
add_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 );
390
add_action( 'template_redirect', 'wp_old_slug_redirect' );
391
add_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 );
377
392
add_action( 'attachment_updated', 'wp_check_for_changed_slugs', 12, 3 );
379
394
// Redirect Old Dates
380
add_action( 'post_updated', 'wp_check_for_changed_dates', 12, 3 );
395
add_action( 'post_updated', 'wp_check_for_changed_dates', 12, 3 );
381
396
add_action( 'attachment_updated', 'wp_check_for_changed_dates', 12, 3 );
383
398
// Nonce check for Post Previews
528
543
add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
531
add_action( 'rest_api_init', 'wp_oembed_register_route' );
546
add_action( 'rest_api_init', 'wp_oembed_register_route' );
532
547
add_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
534
add_action( 'wp_head', 'wp_oembed_add_discovery_links' );
535
add_action( 'wp_head', 'wp_oembed_add_host_js' );
537
add_action( 'embed_head', 'enqueue_embed_scripts', 1 );
538
add_action( 'embed_head', 'print_emoji_detection_script' );
539
add_action( 'embed_head', 'print_embed_styles' );
540
add_action( 'embed_head', 'wp_print_head_scripts', 20 );
541
add_action( 'embed_head', 'wp_print_styles', 20 );
542
add_action( 'embed_head', 'wp_no_robots' );
543
add_action( 'embed_head', 'rel_canonical' );
544
add_action( 'embed_head', 'locale_stylesheet', 30 );
546
add_action( 'embed_content_meta', 'print_embed_comments_button' );
547
add_action( 'embed_content_meta', 'print_embed_sharing_button' );
549
add_action( 'embed_footer', 'print_embed_sharing_dialog' );
550
add_action( 'embed_footer', 'print_embed_scripts' );
551
add_action( 'embed_footer', 'wp_print_footer_scripts', 20 );
553
add_filter( 'excerpt_more', 'wp_embed_excerpt_more', 20 );
554
add_filter( 'the_excerpt_embed', 'wptexturize' );
555
add_filter( 'the_excerpt_embed', 'convert_chars' );
556
add_filter( 'the_excerpt_embed', 'wpautop' );
557
add_filter( 'the_excerpt_embed', 'shortcode_unautop' );
558
add_filter( 'the_excerpt_embed', 'wp_embed_excerpt_attachment' );
560
add_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10, 3 );
561
add_filter( 'oembed_response_data', 'get_oembed_response_data_rich', 10, 4 );
562
add_filter( 'pre_oembed_result', 'wp_filter_pre_oembed_result', 10, 3 );
549
add_action( 'wp_head', 'wp_oembed_add_discovery_links' );
550
add_action( 'wp_head', 'wp_oembed_add_host_js' );
552
add_action( 'embed_head', 'enqueue_embed_scripts', 1 );
553
add_action( 'embed_head', 'print_emoji_detection_script' );
554
add_action( 'embed_head', 'print_embed_styles' );
555
add_action( 'embed_head', 'wp_print_head_scripts', 20 );
556
add_action( 'embed_head', 'wp_print_styles', 20 );
557
add_action( 'embed_head', 'wp_no_robots' );
558
add_action( 'embed_head', 'rel_canonical' );
559
add_action( 'embed_head', 'locale_stylesheet', 30 );
561
add_action( 'embed_content_meta', 'print_embed_comments_button' );
562
add_action( 'embed_content_meta', 'print_embed_sharing_button' );
564
add_action( 'embed_footer', 'print_embed_sharing_dialog' );
565
add_action( 'embed_footer', 'print_embed_scripts' );
566
add_action( 'embed_footer', 'wp_print_footer_scripts', 20 );
568
add_filter( 'excerpt_more', 'wp_embed_excerpt_more', 20 );
569
add_filter( 'the_excerpt_embed', 'wptexturize' );
570
add_filter( 'the_excerpt_embed', 'convert_chars' );
571
add_filter( 'the_excerpt_embed', 'wpautop' );
572
add_filter( 'the_excerpt_embed', 'shortcode_unautop' );
573
add_filter( 'the_excerpt_embed', 'wp_embed_excerpt_attachment' );
575
add_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10, 3 );
576
add_filter( 'oembed_response_data', 'get_oembed_response_data_rich', 10, 4 );
577
add_filter( 'pre_oembed_result', 'wp_filter_pre_oembed_result', 10, 3 );
565
580
add_filter( 'user_has_cap', 'wp_maybe_grant_install_languages_cap', 1 );