129 |
129 |
130 // Add proper rel values for links with target. |
130 // Add proper rel values for links with target. |
131 add_action( 'init', 'wp_init_targeted_link_rel_filters' ); |
131 add_action( 'init', 'wp_init_targeted_link_rel_filters' ); |
132 |
132 |
133 // Format strings for display. |
133 // Format strings for display. |
134 foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) { |
134 foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'document_title', 'widget_title' ) as $filter ) { |
135 add_filter( $filter, 'wptexturize' ); |
135 add_filter( $filter, 'wptexturize' ); |
136 add_filter( $filter, 'convert_chars' ); |
136 add_filter( $filter, 'convert_chars' ); |
137 add_filter( $filter, 'esc_html' ); |
137 add_filter( $filter, 'esc_html' ); |
138 } |
138 } |
139 |
139 |
140 // Format WordPress. |
140 // Format WordPress. |
141 foreach ( array( 'the_content', 'the_title', 'wp_title' ) as $filter ) { |
141 foreach ( array( 'the_content', 'the_title', 'wp_title', 'document_title' ) as $filter ) { |
142 add_filter( $filter, 'capital_P_dangit', 11 ); |
142 add_filter( $filter, 'capital_P_dangit', 11 ); |
143 } |
143 } |
144 add_filter( 'comment_text', 'capital_P_dangit', 31 ); |
144 add_filter( 'comment_text', 'capital_P_dangit', 31 ); |
145 |
145 |
146 // Format titles. |
146 // Format titles. |
174 add_filter( 'the_content', 'convert_smilies', 20 ); |
174 add_filter( 'the_content', 'convert_smilies', 20 ); |
175 add_filter( 'the_content', 'wpautop' ); |
175 add_filter( 'the_content', 'wpautop' ); |
176 add_filter( 'the_content', 'shortcode_unautop' ); |
176 add_filter( 'the_content', 'shortcode_unautop' ); |
177 add_filter( 'the_content', 'prepend_attachment' ); |
177 add_filter( 'the_content', 'prepend_attachment' ); |
178 add_filter( 'the_content', 'wp_filter_content_tags' ); |
178 add_filter( 'the_content', 'wp_filter_content_tags' ); |
|
179 add_filter( 'the_content', 'wp_replace_insecure_home_url' ); |
179 |
180 |
180 add_filter( 'the_excerpt', 'wptexturize' ); |
181 add_filter( 'the_excerpt', 'wptexturize' ); |
181 add_filter( 'the_excerpt', 'convert_smilies' ); |
182 add_filter( 'the_excerpt', 'convert_smilies' ); |
182 add_filter( 'the_excerpt', 'convert_chars' ); |
183 add_filter( 'the_excerpt', 'convert_chars' ); |
183 add_filter( 'the_excerpt', 'wpautop' ); |
184 add_filter( 'the_excerpt', 'wpautop' ); |
184 add_filter( 'the_excerpt', 'shortcode_unautop' ); |
185 add_filter( 'the_excerpt', 'shortcode_unautop' ); |
185 add_filter( 'the_excerpt', 'wp_filter_content_tags' ); |
186 add_filter( 'the_excerpt', 'wp_filter_content_tags' ); |
|
187 add_filter( 'the_excerpt', 'wp_replace_insecure_home_url' ); |
186 add_filter( 'get_the_excerpt', 'wp_trim_excerpt', 10, 2 ); |
188 add_filter( 'get_the_excerpt', 'wp_trim_excerpt', 10, 2 ); |
187 |
189 |
188 add_filter( 'the_post_thumbnail_caption', 'wptexturize' ); |
190 add_filter( 'the_post_thumbnail_caption', 'wptexturize' ); |
189 add_filter( 'the_post_thumbnail_caption', 'convert_smilies' ); |
191 add_filter( 'the_post_thumbnail_caption', 'convert_smilies' ); |
190 add_filter( 'the_post_thumbnail_caption', 'convert_chars' ); |
192 add_filter( 'the_post_thumbnail_caption', 'convert_chars' ); |
207 add_filter( 'widget_text_content', 'wptexturize' ); |
209 add_filter( 'widget_text_content', 'wptexturize' ); |
208 add_filter( 'widget_text_content', 'convert_smilies', 20 ); |
210 add_filter( 'widget_text_content', 'convert_smilies', 20 ); |
209 add_filter( 'widget_text_content', 'wpautop' ); |
211 add_filter( 'widget_text_content', 'wpautop' ); |
210 add_filter( 'widget_text_content', 'shortcode_unautop' ); |
212 add_filter( 'widget_text_content', 'shortcode_unautop' ); |
211 add_filter( 'widget_text_content', 'wp_filter_content_tags' ); |
213 add_filter( 'widget_text_content', 'wp_filter_content_tags' ); |
|
214 add_filter( 'widget_text_content', 'wp_replace_insecure_home_url' ); |
212 add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run. |
215 add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run. |
|
216 |
|
217 add_filter( 'widget_block_content', 'do_blocks', 9 ); |
|
218 add_filter( 'widget_block_content', 'wp_filter_content_tags' ); |
|
219 add_filter( 'widget_block_content', 'do_shortcode', 11 ); |
|
220 |
|
221 add_filter( 'block_type_metadata', 'wp_migrate_old_typography_shape' ); |
|
222 |
|
223 add_filter( 'wp_get_custom_css', 'wp_replace_insecure_home_url' ); |
213 |
224 |
214 // RSS filters. |
225 // RSS filters. |
215 add_filter( 'the_title_rss', 'strip_tags' ); |
226 add_filter( 'the_title_rss', 'strip_tags' ); |
216 add_filter( 'the_title_rss', 'ent2ncr', 8 ); |
227 add_filter( 'the_title_rss', 'ent2ncr', 8 ); |
217 add_filter( 'the_title_rss', 'esc_html' ); |
228 add_filter( 'the_title_rss', 'esc_html' ); |
229 add_filter( 'the_guid', 'esc_url' ); |
240 add_filter( 'the_guid', 'esc_url' ); |
230 |
241 |
231 // Email filters. |
242 // Email filters. |
232 add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); |
243 add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); |
233 |
244 |
|
245 // Robots filters. |
|
246 add_filter( 'wp_robots', 'wp_robots_noindex' ); |
|
247 add_filter( 'wp_robots', 'wp_robots_noindex_embeds' ); |
|
248 add_filter( 'wp_robots', 'wp_robots_noindex_search' ); |
|
249 add_filter( 'wp_robots', 'wp_robots_max_image_preview_large' ); |
|
250 |
234 // Mark site as no longer fresh. |
251 // Mark site as no longer fresh. |
235 foreach ( array( 'publish_post', 'publish_page', 'wp_ajax_save-widget', 'wp_ajax_widgets-order', 'customize_save_after' ) as $action ) { |
252 foreach ( |
|
253 array( |
|
254 'publish_post', |
|
255 'publish_page', |
|
256 'wp_ajax_save-widget', |
|
257 'wp_ajax_widgets-order', |
|
258 'customize_save_after', |
|
259 'rest_after_save_widget', |
|
260 'rest_delete_widget', |
|
261 'rest_save_sidebar', |
|
262 ) as $action |
|
263 ) { |
236 add_action( $action, '_delete_option_fresh_site', 0 ); |
264 add_action( $action, '_delete_option_fresh_site', 0 ); |
237 } |
265 } |
238 |
266 |
239 // Misc filters. |
267 // Misc filters. |
240 add_filter( 'option_ping_sites', 'privacy_ping_filter' ); |
268 add_filter( 'option_ping_sites', 'privacy_ping_filter' ); |
274 add_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' ); |
302 add_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' ); |
275 add_action( 'auth_cookie_expired', 'rest_cookie_collect_status' ); |
303 add_action( 'auth_cookie_expired', 'rest_cookie_collect_status' ); |
276 add_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' ); |
304 add_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' ); |
277 add_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' ); |
305 add_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' ); |
278 add_action( 'auth_cookie_valid', 'rest_cookie_collect_status' ); |
306 add_action( 'auth_cookie_valid', 'rest_cookie_collect_status' ); |
|
307 add_action( 'application_password_failed_authentication', 'rest_application_password_collect_status' ); |
|
308 add_action( 'application_password_did_authenticate', 'rest_application_password_collect_status', 10, 2 ); |
|
309 add_filter( 'rest_authentication_errors', 'rest_application_password_check_errors', 90 ); |
279 add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 ); |
310 add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 ); |
280 |
311 |
281 // Actions. |
312 // Actions. |
282 add_action( 'wp_head', '_wp_render_title_tag', 1 ); |
313 add_action( 'wp_head', '_wp_render_title_tag', 1 ); |
283 add_action( 'wp_head', 'wp_enqueue_scripts', 1 ); |
314 add_action( 'wp_head', 'wp_enqueue_scripts', 1 ); |
284 add_action( 'wp_head', 'wp_resource_hints', 2 ); |
315 add_action( 'wp_head', 'wp_resource_hints', 2 ); |
285 add_action( 'wp_head', 'feed_links', 2 ); |
316 add_action( 'wp_head', 'feed_links', 2 ); |
286 add_action( 'wp_head', 'feed_links_extra', 3 ); |
317 add_action( 'wp_head', 'feed_links_extra', 3 ); |
287 add_action( 'wp_head', 'rsd_link' ); |
318 add_action( 'wp_head', 'rsd_link' ); |
288 add_action( 'wp_head', 'wlwmanifest_link' ); |
319 add_action( 'wp_head', 'wlwmanifest_link' ); |
289 add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); |
|
290 add_action( 'wp_head', 'locale_stylesheet' ); |
320 add_action( 'wp_head', 'locale_stylesheet' ); |
291 add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 ); |
321 add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 ); |
292 add_action( 'wp_head', 'noindex', 1 ); |
322 add_action( 'wp_head', 'wp_robots', 1 ); |
293 add_action( 'wp_head', 'print_emoji_detection_script', 7 ); |
323 add_action( 'wp_head', 'print_emoji_detection_script', 7 ); |
294 add_action( 'wp_head', 'wp_print_styles', 8 ); |
324 add_action( 'wp_head', 'wp_print_styles', 8 ); |
295 add_action( 'wp_head', 'wp_print_head_scripts', 9 ); |
325 add_action( 'wp_head', 'wp_print_head_scripts', 9 ); |
296 add_action( 'wp_head', 'wp_generator' ); |
326 add_action( 'wp_head', 'wp_generator' ); |
297 add_action( 'wp_head', 'rel_canonical' ); |
327 add_action( 'wp_head', 'rel_canonical' ); |
300 add_action( 'wp_head', 'wp_site_icon', 99 ); |
330 add_action( 'wp_head', 'wp_site_icon', 99 ); |
301 add_action( 'wp_footer', 'wp_print_footer_scripts', 20 ); |
331 add_action( 'wp_footer', 'wp_print_footer_scripts', 20 ); |
302 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); |
332 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); |
303 add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); |
333 add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); |
304 add_action( 'init', '_register_core_block_patterns_and_categories' ); |
334 add_action( 'init', '_register_core_block_patterns_and_categories' ); |
|
335 add_action( 'current_screen', '_load_remote_block_patterns' ); |
305 add_action( 'init', 'check_theme_switched', 99 ); |
336 add_action( 'init', 'check_theme_switched', 99 ); |
|
337 add_action( 'init', array( 'WP_Block_Supports', 'init' ), 22 ); |
|
338 add_action( 'switch_theme', array( 'WP_Theme_JSON_Resolver', 'clean_cached_data' ) ); |
306 add_action( 'after_switch_theme', '_wp_menus_changed' ); |
339 add_action( 'after_switch_theme', '_wp_menus_changed' ); |
307 add_action( 'after_switch_theme', '_wp_sidebars_changed' ); |
340 add_action( 'after_switch_theme', '_wp_sidebars_changed' ); |
308 add_action( 'wp_print_styles', 'print_emoji_styles' ); |
341 add_action( 'wp_print_styles', 'print_emoji_styles' ); |
309 |
342 |
310 if ( isset( $_GET['replytocom'] ) ) { |
343 if ( isset( $_GET['replytocom'] ) ) { |
311 add_action( 'wp_head', 'wp_no_robots' ); |
344 add_filter( 'wp_robots', 'wp_robots_no_robots' ); |
312 } |
345 } |
313 |
346 |
314 // Login actions. |
347 // Login actions. |
|
348 add_action( 'login_head', 'wp_robots', 1 ); |
315 add_filter( 'login_head', 'wp_resource_hints', 8 ); |
349 add_filter( 'login_head', 'wp_resource_hints', 8 ); |
316 add_action( 'login_head', 'wp_print_head_scripts', 9 ); |
350 add_action( 'login_head', 'wp_print_head_scripts', 9 ); |
317 add_action( 'login_head', 'print_admin_styles', 9 ); |
351 add_action( 'login_head', 'print_admin_styles', 9 ); |
318 add_action( 'login_head', 'wp_site_icon', 99 ); |
352 add_action( 'login_head', 'wp_site_icon', 99 ); |
319 add_action( 'login_footer', 'wp_print_footer_scripts', 20 ); |
353 add_action( 'login_footer', 'wp_print_footer_scripts', 20 ); |
332 // WP Cron. |
366 // WP Cron. |
333 if ( ! defined( 'DOING_CRON' ) ) { |
367 if ( ! defined( 'DOING_CRON' ) ) { |
334 add_action( 'init', 'wp_cron' ); |
368 add_action( 'init', 'wp_cron' ); |
335 } |
369 } |
336 |
370 |
|
371 // HTTPS detection. |
|
372 add_action( 'init', 'wp_schedule_https_detection' ); |
|
373 add_action( 'wp_https_detection', 'wp_update_https_detection_errors' ); |
|
374 add_filter( 'cron_request', 'wp_cron_conditionally_prevent_sslverify', 9999 ); |
|
375 |
|
376 // HTTPS migration. |
|
377 add_action( 'update_option_home', 'wp_update_https_migration_required', 10, 2 ); |
|
378 |
337 // 2 Actions 2 Furious. |
379 // 2 Actions 2 Furious. |
338 add_action( 'do_feed_rdf', 'do_feed_rdf', 10, 0 ); |
380 add_action( 'do_feed_rdf', 'do_feed_rdf', 10, 0 ); |
339 add_action( 'do_feed_rss', 'do_feed_rss', 10, 0 ); |
381 add_action( 'do_feed_rss', 'do_feed_rss', 10, 0 ); |
340 add_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 ); |
382 add_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 ); |
341 add_action( 'do_feed_atom', 'do_feed_atom', 10, 1 ); |
383 add_action( 'do_feed_atom', 'do_feed_atom', 10, 1 ); |
342 add_action( 'do_pings', 'do_all_pings', 10, 0 ); |
384 add_action( 'do_pings', 'do_all_pings', 10, 0 ); |
|
385 add_action( 'do_all_pings', 'do_all_pingbacks', 10, 0 ); |
|
386 add_action( 'do_all_pings', 'do_all_enclosures', 10, 0 ); |
|
387 add_action( 'do_all_pings', 'do_all_trackbacks', 10, 0 ); |
|
388 add_action( 'do_all_pings', 'generic_ping', 10, 0 ); |
343 add_action( 'do_robots', 'do_robots' ); |
389 add_action( 'do_robots', 'do_robots' ); |
344 add_action( 'do_favicon', 'do_favicon' ); |
390 add_action( 'do_favicon', 'do_favicon' ); |
345 add_action( 'set_comment_cookies', 'wp_set_comment_cookies', 10, 3 ); |
391 add_action( 'set_comment_cookies', 'wp_set_comment_cookies', 10, 3 ); |
346 add_action( 'sanitize_comment_cookies', 'sanitize_comment_cookies' ); |
392 add_action( 'sanitize_comment_cookies', 'sanitize_comment_cookies' ); |
347 add_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |
393 add_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |
426 add_filter( 'heartbeat_nopriv_send', 'wp_auth_check' ); |
472 add_filter( 'heartbeat_nopriv_send', 'wp_auth_check' ); |
427 |
473 |
428 // Default authentication filters. |
474 // Default authentication filters. |
429 add_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 ); |
475 add_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 ); |
430 add_filter( 'authenticate', 'wp_authenticate_email_password', 20, 3 ); |
476 add_filter( 'authenticate', 'wp_authenticate_email_password', 20, 3 ); |
|
477 add_filter( 'authenticate', 'wp_authenticate_application_password', 20, 3 ); |
431 add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); |
478 add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); |
432 add_filter( 'determine_current_user', 'wp_validate_auth_cookie' ); |
479 add_filter( 'determine_current_user', 'wp_validate_auth_cookie' ); |
433 add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20 ); |
480 add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20 ); |
|
481 add_filter( 'determine_current_user', 'wp_validate_application_password', 20 ); |
434 |
482 |
435 // Split term updates. |
483 // Split term updates. |
436 add_action( 'admin_init', '_wp_check_for_scheduled_split_terms' ); |
484 add_action( 'admin_init', '_wp_check_for_scheduled_split_terms' ); |
437 add_action( 'split_shared_term', '_wp_check_split_default_terms', 10, 4 ); |
485 add_action( 'split_shared_term', '_wp_check_split_default_terms', 10, 4 ); |
438 add_action( 'split_shared_term', '_wp_check_split_terms_in_menus', 10, 4 ); |
486 add_action( 'split_shared_term', '_wp_check_split_terms_in_menus', 10, 4 ); |
503 // Script Loader. |
551 // Script Loader. |
504 add_action( 'wp_default_scripts', 'wp_default_scripts' ); |
552 add_action( 'wp_default_scripts', 'wp_default_scripts' ); |
505 add_action( 'wp_default_scripts', 'wp_default_packages' ); |
553 add_action( 'wp_default_scripts', 'wp_default_packages' ); |
506 |
554 |
507 add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); |
555 add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); |
|
556 add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); |
508 add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); |
557 add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); |
509 add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); |
|
510 add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); |
558 add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); |
511 add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); |
559 add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); |
|
560 add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 ); |
512 add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); |
561 add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); |
|
562 add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' ); |
|
563 add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); |
|
564 add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' ); |
513 add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' ); |
565 add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' ); |
514 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); |
566 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); |
515 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); |
567 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); |
516 add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 ); |
568 add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 ); |
517 add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 ); |
569 add_action( 'admin_head', 'wp_check_widget_editor_deps' ); |
518 add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' ); |
570 |
519 add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); |
571 // Global styles can be enqueued in both the header and the footer. See https://core.trac.wordpress.org/ticket/53494. |
|
572 add_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' ); |
|
573 add_action( 'wp_footer', 'wp_enqueue_global_styles', 1 ); |
520 |
574 |
521 add_action( 'wp_default_styles', 'wp_default_styles' ); |
575 add_action( 'wp_default_styles', 'wp_default_styles' ); |
522 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); |
576 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); |
|
577 |
|
578 add_action( 'wp_head', 'wp_maybe_inline_styles', 1 ); // Run for styles enqueued in <head>. |
|
579 add_action( 'wp_footer', 'wp_maybe_inline_styles', 1 ); // Run for late-loaded styles in the footer. |
|
580 |
|
581 add_action( 'admin_footer-post.php', 'wp_add_iframed_editor_assets_html' ); |
|
582 add_action( 'admin_footer-post-new.php', 'wp_add_iframed_editor_assets_html' ); |
523 |
583 |
524 // Taxonomy. |
584 // Taxonomy. |
525 add_action( 'init', 'create_initial_taxonomies', 0 ); // Highest priority. |
585 add_action( 'init', 'create_initial_taxonomies', 0 ); // Highest priority. |
526 add_action( 'change_locale', 'create_initial_taxonomies' ); |
586 add_action( 'change_locale', 'create_initial_taxonomies' ); |
527 |
587 |
569 add_action( 'embed_head', 'enqueue_embed_scripts', 1 ); |
630 add_action( 'embed_head', 'enqueue_embed_scripts', 1 ); |
570 add_action( 'embed_head', 'print_emoji_detection_script' ); |
631 add_action( 'embed_head', 'print_emoji_detection_script' ); |
571 add_action( 'embed_head', 'print_embed_styles' ); |
632 add_action( 'embed_head', 'print_embed_styles' ); |
572 add_action( 'embed_head', 'wp_print_head_scripts', 20 ); |
633 add_action( 'embed_head', 'wp_print_head_scripts', 20 ); |
573 add_action( 'embed_head', 'wp_print_styles', 20 ); |
634 add_action( 'embed_head', 'wp_print_styles', 20 ); |
574 add_action( 'embed_head', 'wp_no_robots' ); |
635 add_action( 'embed_head', 'wp_robots' ); |
575 add_action( 'embed_head', 'rel_canonical' ); |
636 add_action( 'embed_head', 'rel_canonical' ); |
576 add_action( 'embed_head', 'locale_stylesheet', 30 ); |
637 add_action( 'embed_head', 'locale_stylesheet', 30 ); |
577 |
638 |
578 add_action( 'embed_content_meta', 'print_embed_comments_button' ); |
639 add_action( 'embed_content_meta', 'print_embed_comments_button' ); |
579 add_action( 'embed_content_meta', 'print_embed_sharing_button' ); |
640 add_action( 'embed_content_meta', 'print_embed_sharing_button' ); |
597 // Capabilities. |
658 // Capabilities. |
598 add_filter( 'user_has_cap', 'wp_maybe_grant_install_languages_cap', 1 ); |
659 add_filter( 'user_has_cap', 'wp_maybe_grant_install_languages_cap', 1 ); |
599 add_filter( 'user_has_cap', 'wp_maybe_grant_resume_extensions_caps', 1 ); |
660 add_filter( 'user_has_cap', 'wp_maybe_grant_resume_extensions_caps', 1 ); |
600 add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 ); |
661 add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 ); |
601 |
662 |
|
663 // Block Templates CPT and Rendering |
|
664 add_filter( 'render_block_context', '_block_template_render_without_post_block_context' ); |
|
665 add_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10, 5 ); |
|
666 add_action( 'wp_footer', 'the_block_template_skip_link' ); |
|
667 add_action( 'setup_theme', 'wp_enable_block_templates' ); |
|
668 |
602 unset( $filter, $action ); |
669 unset( $filter, $action ); |