瀏覽代碼

Add ‘wp_body_open’ hook.

Starting from WordPress 5.2 a new function is added – `wp_body_open()` – that is used to trigger a `wp_body_open` action. The function should be placed inside of the <body> tag immediately after it is opened.
Milana Cap 5 年之前
父節點
當前提交
4a3825a672
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      varia/header.php

+ 7 - 0
varia/header.php

@@ -20,6 +20,13 @@
 </head>
 </head>
 
 
 <body <?php body_class(); ?>>
 <body <?php body_class(); ?>>
+
+<?php
+	if ( function_exists( 'wp_body_open' ) ) {
+		wp_body_open();
+	}
+?>
+	
 <div id="page" class="site">
 <div id="page" class="site">
 	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
 	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>