Skip to content

Commit

Permalink
Font Awesome読み込み関数追加
Browse files Browse the repository at this point in the history
  • Loading branch information
yhira committed Jun 14, 2018
1 parent ede4a7b commit 9d4e29d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/admin.php
Expand Up @@ -9,7 +9,9 @@ function admin_print_styles_custom() {
if (!is_user_administrator()) { if (!is_user_administrator()) {
echo '<style>#toplevel_page_jetpack{display:none;}</style>'; echo '<style>#toplevel_page_jetpack{display:none;}</style>';
} }
wp_enqueue_style( 'font-awesome-style', FONT_AWESOME_CDN_URL );
//Font Awesome
wp_enqueue_style_font_awesome();


//カラーピッカー //カラーピッカー
wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'wp-color-picker' );
Expand Down
2 changes: 1 addition & 1 deletion lib/scripts.php
Expand Up @@ -18,7 +18,7 @@ function wp_enqueue_scripts_custom() {
/////////////////////////////////////////// ///////////////////////////////////////////
//Font Awesome //Font Awesome
/////////////////////////////////////////// ///////////////////////////////////////////
wp_enqueue_style( 'font-awesome-style', FONT_AWESOME_CDN_URL ); wp_enqueue_style_font_awesome();


/////////////////////////////////////////// ///////////////////////////////////////////
//設定変更に必要なCSS //設定変更に必要なCSS
Expand Down
8 changes: 8 additions & 0 deletions lib/utils.php
Expand Up @@ -246,6 +246,14 @@ function get_highlight_js_css_url(){
} }
endif; endif;


//Font Awesomeの読み込み
if ( !function_exists( 'wp_enqueue_style_font_awesome' ) ):
function wp_enqueue_style_font_awesome(){
wp_enqueue_style( 'font-awesome-style', FONT_AWESOME_CDN_URL );
}
endif;

//jQueryファイルの読み込み
if ( !function_exists( 'wp_enqueue_script_jquery_js' ) ): if ( !function_exists( 'wp_enqueue_script_jquery_js' ) ):
function wp_enqueue_script_jquery_js(){ function wp_enqueue_script_jquery_js(){
wp_deregister_script('jquery'); wp_deregister_script('jquery');
Expand Down

0 comments on commit 9d4e29d

Please sign in to comment.