WordPress.org

Make WordPress Core

Ticket #5325: do_nothing_faster.diff

File do_nothing_faster.diff, 647 bytes (added by Quandary, 7 years ago)

Be almost two orders of magnitude faster at doing nothing.

  • wp-includes/post.php

     
    428428} 
    429429 
    430430function sanitize_post($post, $context = 'display') { 
     431 
     432        if ( 'raw' == $context ) 
     433                return $post; 
     434 
    431435        // TODO: Use array keys instead of hard coded list 
    432436        $fields = array('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_date', 'post_date_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'post_category'); 
    433437