From 2580a0a69f091b98272bc74e35c347b34a20a52d Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 30 Dec 2014 20:19:28 -0800 Subject: [PATCH] _s: Remove author data shim. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Immediate set up of author data in author archives was added in WordPress 3.7, so it’s safe to remove. See https://core.trac.wordpress.org/ticket/14408. See a156f2cbaba0077e73a424ea4e84590e670a5221. --- inc/extras.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/inc/extras.php b/inc/extras.php index 02bdeea..2e25448 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -81,24 +81,3 @@ if ( version_compare( $GLOBALS['wp_version'], '4.1', '<' ) ) : } add_action( 'wp_head', '_s_render_title' ); endif; - -/** - * Sets the authordata global when viewing an author archive. - * - * This provides backwards compatibility with - * http://core.trac.wordpress.org/changeset/25574 - * - * It removes the need to call the_post() and rewind_posts() in an author - * template to print information about the author. - * - * @global WP_Query $wp_query WordPress Query object. - * @return void - */ -function _s_setup_author() { - global $wp_query; - - if ( $wp_query->is_author() && isset( $wp_query->post ) ) { - $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author ); - } -} -add_action( 'wp', '_s_setup_author' );