WordPress.org

Make WordPress Core

Ticket #24303: 24303.2.diff

File 24303.2.diff, 2.0 KB (added by SergeyBiryukov, 5 years ago)
  • wp-includes/default-filters.php

     
    127127add_filter( 'wp_insert_post_parent', 'wp_check_post_hierarchy_for_loops', 10, 2 );
    128128add_filter( 'wp_update_term_parent', 'wp_check_term_hierarchy_for_loops', 10, 3 );
    129129
     130// Pre save post data
     131add_filter( 'wp_insert_post_data', '_post_formats_fix_empty_title', 10, 2 );
     132
    130133// Display filters
    131134add_filter( 'the_title', 'wptexturize'   );
    132135add_filter( 'the_title', 'convert_chars' );
     
    251254add_action( 'plugins_loaded',             'wp_maybe_load_widgets',                    0    );
    252255add_action( 'plugins_loaded',             'wp_maybe_load_embeds',                     0    );
    253256add_action( 'shutdown',                   'wp_ob_end_flush_all',                      1    );
    254 add_action( 'wp_insert_post_data',        '_post_formats_fix_empty_title',           10, 2 );
    255257add_action( 'wp_insert_post',             'wp_save_post_revision',                   10, 1 );
    256258add_action( 'publish_post',               '_publish_post_hook',                       5, 1 );
    257259add_action( 'transition_post_status',     '_transition_post_status',                  5, 3 );
  • wp-includes/post-formats.php

     
    979979}
    980980
    981981/**
    982  * Runs during save_post, fixes empty titles for asides and statuses.
     982 * Fixes empty titles for aside and status formats.
    983983 *
     984 * Passes a generated post title to the 'wp_insert_post_data' filter.
     985 *
    984986 * @since 3.6.0
    985987 * @access private
     988 *
     989 * @uses _post_formats_generate_title()
    986990 */
    987991function _post_formats_fix_empty_title( $data, $postarr ) {
    988992        if ( 'auto-draft' == $data['post_status'] || ! post_type_supports( $data['post_type'], 'post-formats' ) )