Skip to content
Permalink
Browse files

スキンのjavascript.jsの読み込み関数追加

  • Loading branch information...
yhira committed Jun 14, 2018
1 parent 6c1872c commit 6da1c51f668e61c6cfc66d53da6ff87b546d6974
Showing with 13 additions and 13 deletions.
  1. +1 −13 lib/scripts.php
  2. +12 −0 lib/utils.php
@@ -153,20 +153,8 @@ function wp_enqueue_scripts_custom() {
//スキンscriptの呼び出し
//
////////////////////////////////////////////////////////////////
if (is_child_theme()) {
///////////////////////////////////////////
//子テーマのjavascript.js
///////////////////////////////////////////
$js_url = get_skin_js_url();
$js_path = url_to_local($js_url);
//javascript.jsファイルがスキンフォルダに存在する場合
if ($js_url && file_exists($js_path)) {
//var_dump($js_path);
wp_enqueue_script( THEME_SKIN_JS, $js_url, array( 'jquery', THEME_JS ), false, true );
}
}
wp_enqueue_script_theme_skin_js();
////////////////////////////////////////////////////////////////
//
@@ -307,6 +307,18 @@ function wp_enqueue_script_theme_js(){
}
endif;
//スキンのjavascript.jsの読み込み
if ( !function_exists( 'wp_enqueue_script_theme_skin_js' ) ):
function wp_enqueue_script_theme_skin_js(){
$js_url = get_skin_js_url();
$js_path = url_to_local($js_url);
//javascript.jsファイルがスキンフォルダに存在する場合
if ($js_url && file_exists($js_path)) {
wp_enqueue_script( THEME_SKIN_JS, $js_url, array( 'jquery', THEME_JS ), false, true );
}
}
endif;
//はてなシェアボタンスクリプトの読み込み
if ( !function_exists( 'wp_enqueue_script_hatebu_share_button_js' ) ):
function wp_enqueue_script_hatebu_share_button_js(){

0 comments on commit 6da1c51

Please sign in to comment.
You can’t perform that action at this time.