WordPress.org

Make WordPress Core

Ticket #23829: get_the_content_fix.diff

File get_the_content_fix.diff, 525 bytes (added by norocketsurgeon, 2 years ago)

get_the_content patch

  • wp-includes/category-template.php

     
    7272 * @return array 
    7373 */ 
    7474function get_the_category( $id = false ) { 
     75        if( !$id ) { 
     76                global $post; 
     77                $id = $post->ID; 
     78        } 
     79 
    7580        $categories = get_the_terms( $id, 'category' ); 
    7681        if ( ! $categories || is_wp_error( $categories ) ) 
    7782                $categories = array();