HEX
Server: Apache
System: Linux s325.xrea.com 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64
User: yunportfolio (12972)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /virtual/yunportfolio/public_html/yunportfolio.shop/wp-content/themes/cocoon-master/lib/html5.php
<?php //HTML5エラーチェックに関する関数
/**
 * Cocoon WordPress Theme
 * @author: yhira
 * @link: https://wp-cocoon.com/
 * @license: http://www.gnu.org/licenses/gpl-2.0.html GPL v2 or later
 */
if ( !defined( 'ABSPATH' ) ) exit;

//HTML5で警告が出てしまう部分をできるだけ修正する
add_filter('the_content', 'theme_html5_fix');
add_filter('widget_text', 'theme_html5_fix');
add_filter('widget_text_pc_text', 'theme_html5_fix');
//add_filter('widget_classic_text', 'theme_html5_fix');
add_filter('widget_text_mobile_text', 'theme_html5_fix');
add_filter('the_category_tag_content', 'theme_html5_fix');
if ( !function_exists( 'theme_html5_fix' ) ):
function theme_html5_fix($the_content){
  //管理画面は修正不要
  if (!is_admin()) {
    // 不具合が解消?されたため元に戻す
    // //</div>に</p></div>が追加されてしまう
    // //http://tenman.info/labo/snip/archives/5197
    // $the_content = str_replace( '</p></div>','</div>', $the_content );
  }
  return $the_content;
}
endif;