$val ) { if( strpos( $post->post_content, ' $val ) { if( strpos( $post->post_content, 'block_styles( $list_view_content ); } // レスポンシブプレビュー if( isset( $_GET['respond_frame'] ) && $_is['customize_preview'] === false && $_is['edit_posts'] === true ) { $load .= thk_fgc( $css_dir . 'respond.css' ); } $load = trim( thk_simple_css_minify( $load ) ); if( !empty( $load ) ) { if( isset( $luxe['child_css'] ) && TPATH !== SPATH ) { wp_add_inline_style( 'luxech', $load ); } else { wp_add_inline_style( 'luxe', $load ); } } if( isset( $luxe['captcha_enable'] ) ) { // Google reCAPTCHA v3 if( $luxe['captcha_enable'] === 'recaptcha-v3' && isset( $luxe['recaptcha_site_key'] ) && !empty( $luxe['recaptcha_site_key'] ) ) { wp_enqueue_script( 'recaptcha-v3', '//www.google.com/recaptcha/api.js?render=' . $luxe['recaptcha_site_key'], array(), false, true ); wp_add_inline_script( 'recaptcha-v3', 'grecaptcha.ready(function(){' . 'grecaptcha.execute("' . $luxe['recaptcha_site_key'] . '",{action:"homepage"})' . '.then(function(token){' . 'if( document.getElementById("g-recaptcha-response") !== null ) {' . 'document.getElementById("g-recaptcha-response").value=token;' . '}});' . '});' ); } // Google reCAPTCHA v2 elseif( $luxe['captcha_enable'] === 'recaptcha' && isset( $luxe['recaptcha_site_key'] ) && !empty( $luxe['recaptcha_site_key'] ) ) { wp_enqueue_script( 'recaptcha', '//www.google.com/recaptcha/api.js', array(), false, true ); } } // シンタックスハイライター $highlighter_list = thk_syntax_highlighter_list(); $highlighter_active = false; if( $_is['singular'] === true ) { $loads = thk_highlighter_load( $loads, $highlighter_list, $highlighter_active ); } else { if( have_posts() === true ) { while( have_posts() === true ) { the_post(); if( ( isset( $luxe['list_view'] ) && $luxe['list_view'] === 'content' ) || ( isset( $luxe['sticky_no_excerpt'] ) && $luxe['sticky_no_excerpt'] && is_sticky() === true ) ) { $loads = thk_highlighter_load( $loads, $highlighter_list, $highlighter_active ); } } } unset( $luxe['highlighter_css_loaded'] ); } if( !empty( $loads[0] ) ) { wp_enqueue_script( 'luxe-inline-script', TURI . '/js/thk-dummy.js', array( 'jquery' ), false ); $loads[0] = '(function(){var jqueryCheck=function(b){if(window.jQuery){b(jQuery)}else{window.setTimeout(function(){jqueryCheck(b)},100)}};jqueryCheck(function(a){;' . "\n" . $loads[0] . '});}());'; wp_add_inline_script( 'luxe-inline-script', $loads[0] ); } });