質問するログイン新規登録

質問編集履歴

2

ソースコードを公開しました。

2019/07/07 08:59

投稿

JAMJP
JAMJP

スコア13

title CHANGED
File without changes
body CHANGED
@@ -43,4 +43,75 @@
43
43
 
44
44
  補足します。
45
45
  ![イメージ説明](757cdeb45306c05e31909183ead343d0.jpeg)
46
- 現在のヘッダーのソースコードは下記のような出力となります。
46
+ 現在のヘッダーのソースコードは下記のような出力となります。
47
+
48
+
49
+
50
+ 補足します。
51
+
52
+ ワードプレステーマDIVERにて、
53
+ 親テーマのfunctions.phpを見たところ、
54
+ さらに他の場所にあるファイルを呼び込む記述がありました。
55
+
56
+ style.min.cssを全文検索をかけると、
57
+ それらのファイル群の中で
58
+
59
+ functions/diver_setting.php
60
+ functions/load-script.php
61
+
62
+ の2つのファイルの中でstyle.min.phpの記述がありました。
63
+
64
+ まず一つ目
65
+
66
+ functions/diver_setting.phpの中で
67
+ ```ここに言語名を入力
68
+ function my_theme_add_editor_styles() {
69
+ add_editor_style('//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css');
70
+ add_editor_style(diver_minifier_file('/editor-style.css','/editor-style.min.css','css'));
71
+
72
+ }
73
+ add_action( 'init', 'my_theme_add_editor_styles' );
74
+
75
+ ```
76
+ と記述がありました。
77
+
78
+ そして、
79
+
80
+ 二つ目
81
+
82
+ functions/load-script.phpの中で
83
+ ```ここに言語名を入力
84
+ function my_style() {
85
+ //maincss
86
+ wp_enqueue_style( 'diver-main-style', diver_minifier_file('/style.css','/style.min.css','css'));
87
+
88
+ wp_deregister_style('parent-style');
89
+
90
+
91
+ if(strpos(get_stylesheet_directory_uri(),'bc') !== "diver_child"){
92
+ wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css',array(), null, 'all');
93
+ }
94
+
95
+ if(get_bloginfo('version') >= "5.0.0"){
96
+ wp_enqueue_style( 'diver-block-style', diver_minifier_file('/lib/functions/editor/gutenberg/blocks.css','/lib/functions/editor/gutenberg/blocks.min.css','css'));
97
+ }
98
+
99
+ //swiper
100
+ wp_enqueue_style( 'swipercss','https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css', array(), null, 'all');
101
+
102
+ if(get_option('diver_option_firstview','0') == '4'){
103
+ wp_enqueue_style( 'YTPlayer', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.mb.YTPlayer/3.2.9/css/jquery.mb.YTPlayer.min.css', array(), null, 'all');
104
+ // YTPlayer
105
+ wp_enqueue_script( 'ytplayer', '//cdnjs.cloudflare.com/ajax/libs/jquery.mb.YTPlayer/3.2.9/jquery.mb.YTPlayer.min.js', array(), false, true );
106
+ }
107
+
108
+ if(!is_mobile()){
109
+ // sticky
110
+ wp_enqueue_script( 'sticky', get_template_directory_uri() . '/lib/assets/sticky/jquery.fit-sidebar.min.js', array(), false, true );
111
+ }
112
+
113
+ }
114
+ add_action( 'wp_enqueue_scripts', 'my_style');
115
+
116
+ ```
117
+ と記述がありました。

1

ソースコードを公開しました

2019/07/07 08:59

投稿

JAMJP
JAMJP

スコア13

title CHANGED
File without changes
body CHANGED
@@ -39,4 +39,8 @@
39
39
 
40
40
  よろしくお願いしますm(__)m
41
41
 
42
- ### 補足情報(FW/ツールのバージョンなど)
42
+ ### 補足情報(FW/ツールのバージョンなど)
43
+
44
+ 補足します。
45
+ ![イメージ説明](757cdeb45306c05e31909183ead343d0.jpeg)
46
+ 現在のヘッダーのソースコードは下記のような出力となります。