From 8573a2a325b62adc653e2f406d7856da2aa70bb3 Mon Sep 17 00:00:00 2001 From: Danny Cooper Date: Thu, 28 Mar 2019 14:13:32 +0000 Subject: [PATCH] Add wp_body_open() shim for sites older than 5.2 --- header.php | 1 + inc/template-tags.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/header.php b/header.php index e5c99d76..0b9ec523 100644 --- a/header.php +++ b/header.php @@ -21,6 +21,7 @@ > +
diff --git a/inc/template-tags.php b/inc/template-tags.php index bc5fd31f..652709e0 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -146,3 +146,14 @@ if ( ! function_exists( '_s_post_thumbnail' ) ) : endif; // End is_singular(). } endif; + +if ( ! function_exists( 'wp_body_open' ) ) : + /** + * Shim for sites older than 5.2. + * + * @link https://core.trac.wordpress.org/ticket/12563 + */ + function wp_body_open() { + do_action( 'wp_body_open' ); + } +endif;