Make WordPress Core


Ignore:
Timestamp:
04/26/2022 06:30:24 AM (23 months ago)
Author:
audrasjb
Message:

Bootstrap/load: Move administration related hooks to admin-filters.php.

This change moves some administration related hooks from default-filters.php to admin-filters.php. It also updates the default-filters.php docblock to indicate that contextualized hooks should be located in the most appropriate place.

Props dlh, hellofromTonya, antonvlasenko, audrasjb, azaozz.
Fixes #54795.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r53160 r53266  
    88 * hook.
    99 *
    10  * Not all of the default hooks are found in default-filters.php
     10 * Not all of the default hooks are found in this file.
     11 * For instance, administration related hooks are located in
     12 * wp-admin/includes/admin-filters.php.
     13 *
     14 * If a hook should only be called from a specific context
     15 * (admin area, multisite environment…), please move it
     16 * to a more appropriate file instead.
    1117 *
    1218 * @package WordPress
     
    294300add_filter( 'editable_slug', 'urldecode' );
    295301add_filter( 'editable_slug', 'esc_textarea' );
    296 add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' );
    297302add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri' );
    298303add_filter( 'xmlrpc_pingback_error', 'xmlrpc_pingback_error' );
     
    414419add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
    415420add_action( 'admin_init', 'send_frame_options_header', 10, 0 );
    416 add_action( 'welcome_panel', 'wp_welcome_panel' );
    417421
    418422// Privacy.
     
    463467// Admin color schemes.
    464468add_action( 'admin_init', 'register_admin_color_schemes', 1 );
    465 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
    466469
    467470// If the upgrade hasn't run yet, assume link manager is used.
     
    592595add_action( 'wp_footer', 'wp_maybe_inline_styles', 1 ); // Run for late-loaded styles in the footer.
    593596
    594 add_action( 'use_block_editor_for_post_type', '_disable_block_editor_for_navigation_post_type', 10, 2 );
    595 add_action( 'edit_form_after_title', '_disable_content_editor_for_navigation_post_type' );
    596 add_action( 'edit_form_after_editor', '_enable_content_editor_for_navigation_post_type' );
    597 
    598597/*
    599598 * Disable "Post Attributes" for wp_navigation post type. The attributes are
Note: See TracChangeset for help on using the changeset viewer.