From 118dc766314266ff11cc1f7c0bc17edc1276c693 Mon Sep 17 00:00:00 2001 From: Ulrich Pogson Date: Fri, 9 Jun 2017 20:37:13 +0200 Subject: [PATCH] Replace extras.php with template-functions.php fixes #1064 --- functions.php | 14 ++++++++++++-- inc/{extras.php => template-functions.php} | 14 +------------- 2 files changed, 13 insertions(+), 15 deletions(-) rename inc/{extras.php => template-functions.php} (53%) diff --git a/functions.php b/functions.php index 500940a2..b4eff0be 100644 --- a/functions.php +++ b/functions.php @@ -117,6 +117,16 @@ function _s_scripts() { } add_action( 'wp_enqueue_scripts', '_s_scripts' ); +/** + * Add a pingback url auto-discovery header for singularly identifiable articles. + */ +function _s_pingback_header() { + if ( is_singular() && pings_open() ) { + echo ''; + } +} +add_action( 'wp_head', '_s_pingback_header' ); + /** * Implement the Custom Header feature. */ @@ -128,9 +138,9 @@ require get_template_directory() . '/inc/custom-header.php'; require get_template_directory() . '/inc/template-tags.php'; /** - * Custom functions that act independently of the theme templates. + * Additional features to allow styling of the templates. */ -require get_template_directory() . '/inc/extras.php'; +require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. diff --git a/inc/extras.php b/inc/template-functions.php similarity index 53% rename from inc/extras.php rename to inc/template-functions.php index 6ef7ad60..63e7e294 100644 --- a/inc/extras.php +++ b/inc/template-functions.php @@ -1,8 +1,6 @@ '; - } -} -add_action( 'wp_head', '_s_pingback_header' );