Make WordPress Core

Changeset 60033


Ignore:
Timestamp:
03/17/2025 08:09:39 PM (14 months ago)
Author:
joemcgill
Message:

Editor: Change hook for 'wp_set_editor_default_mode'.

This is a follow up to [59968], which moves the wp_set_editor_default_mode() callback to init to make sure the subsequent call to create_initial_post_types() doesn't overwrite the post type support settings.

Props mamaduka, psykro.
Fixes #61811.

File:
1 edited

Legend:

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

    r60003 r60033  
    566566// Post.
    567567add_action( 'init', 'create_initial_post_types', 0 ); // Highest priority.
     568add_action( 'init', 'wp_set_editor_default_mode', 1 ); // Run after registering post types.
    568569add_action( 'admin_menu', '_add_post_type_submenus' );
    569570add_action( 'before_delete_post', '_reset_front_page_settings_for_post' );
     
    741742add_action( 'wp_footer', 'the_block_template_skip_link' ); // Retained for backwards-compatibility. Unhooked by wp_enqueue_block_template_skip_link().
    742743add_action( 'after_setup_theme', 'wp_enable_block_templates', 1 );
    743 add_action( 'after_setup_theme', 'wp_set_editor_default_mode', 2 ); // Run after enabling block templates.
    744744add_action( 'wp_loaded', '_add_template_loader_filters' );
    745745
Note: See TracChangeset for help on using the changeset viewer.