質問編集履歴

2

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

2019/07/07 08:59

投稿

JAMJP
JAMJP

スコア13

test CHANGED
File without changes
test CHANGED
@@ -89,3 +89,145 @@
89
89
  ![イメージ説明](757cdeb45306c05e31909183ead343d0.jpeg)
90
90
 
91
91
  現在のヘッダーのソースコードは下記のような出力となります。
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ 補足します。
100
+
101
+
102
+
103
+ ワードプレステーマDIVERにて、
104
+
105
+ 親テーマのfunctions.phpを見たところ、
106
+
107
+ さらに他の場所にあるファイルを呼び込む記述がありました。
108
+
109
+
110
+
111
+ style.min.cssを全文検索をかけると、
112
+
113
+ それらのファイル群の中で
114
+
115
+
116
+
117
+ functions/diver_setting.php
118
+
119
+ functions/load-script.php
120
+
121
+
122
+
123
+ の2つのファイルの中でstyle.min.phpの記述がありました。
124
+
125
+
126
+
127
+ まず一つ目
128
+
129
+
130
+
131
+ functions/diver_setting.phpの中で
132
+
133
+ ```ここに言語名を入力
134
+
135
+ function my_theme_add_editor_styles() {
136
+
137
+ add_editor_style('//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css');
138
+
139
+ add_editor_style(diver_minifier_file('/editor-style.css','/editor-style.min.css','css'));
140
+
141
+
142
+
143
+ }
144
+
145
+ add_action( 'init', 'my_theme_add_editor_styles' );
146
+
147
+
148
+
149
+ ```
150
+
151
+ と記述がありました。
152
+
153
+
154
+
155
+ そして、
156
+
157
+
158
+
159
+ 二つ目
160
+
161
+
162
+
163
+ functions/load-script.phpの中で
164
+
165
+ ```ここに言語名を入力
166
+
167
+ function my_style() {
168
+
169
+ //maincss
170
+
171
+ wp_enqueue_style( 'diver-main-style', diver_minifier_file('/style.css','/style.min.css','css'));
172
+
173
+
174
+
175
+ wp_deregister_style('parent-style');
176
+
177
+
178
+
179
+
180
+
181
+ if(strpos(get_stylesheet_directory_uri(),'bc') !== "diver_child"){
182
+
183
+ wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css',array(), null, 'all');
184
+
185
+ }
186
+
187
+
188
+
189
+ if(get_bloginfo('version') >= "5.0.0"){
190
+
191
+ wp_enqueue_style( 'diver-block-style', diver_minifier_file('/lib/functions/editor/gutenberg/blocks.css','/lib/functions/editor/gutenberg/blocks.min.css','css'));
192
+
193
+ }
194
+
195
+
196
+
197
+ //swiper
198
+
199
+ wp_enqueue_style( 'swipercss','https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css', array(), null, 'all');
200
+
201
+
202
+
203
+ if(get_option('diver_option_firstview','0') == '4'){
204
+
205
+ 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');
206
+
207
+ // YTPlayer
208
+
209
+ wp_enqueue_script( 'ytplayer', '//cdnjs.cloudflare.com/ajax/libs/jquery.mb.YTPlayer/3.2.9/jquery.mb.YTPlayer.min.js', array(), false, true );
210
+
211
+ }
212
+
213
+
214
+
215
+ if(!is_mobile()){
216
+
217
+ // sticky
218
+
219
+ wp_enqueue_script( 'sticky', get_template_directory_uri() . '/lib/assets/sticky/jquery.fit-sidebar.min.js', array(), false, true );
220
+
221
+ }
222
+
223
+
224
+
225
+ }
226
+
227
+ add_action( 'wp_enqueue_scripts', 'my_style');
228
+
229
+
230
+
231
+ ```
232
+
233
+ と記述がありました。

1

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

2019/07/07 08:59

投稿

JAMJP
JAMJP

スコア13

test CHANGED
File without changes
test CHANGED
@@ -81,3 +81,11 @@
81
81
 
82
82
 
83
83
  ### 補足情報(FW/ツールのバージョンなど)
84
+
85
+
86
+
87
+ 補足します。
88
+
89
+ ![イメージ説明](757cdeb45306c05e31909183ead343d0.jpeg)
90
+
91
+ 現在のヘッダーのソースコードは下記のような出力となります。