Переглянути джерело

Change the styles hook

Change the styles enqueue hook in favour of `wp_enqueue_scripts` since `wp_print_styles` is not recommended from WP 3.4 as shown in codex. (http://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles)
Gabriel 11 роки тому
батько
коміт
612dfec3d0
1 змінених файлів з 2 додано та 3 видалено
  1. 2 3
      functions.php

+ 2 - 3
functions.php

@@ -202,11 +202,10 @@ can replace these fonts, change it in your scss files
 and be up and running in seconds.
 */
 function bones_fonts() {
-  wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic');
-  wp_enqueue_style( 'googleFonts');
+  wp_enqueue_style('googleFonts', 'http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic');
 }
 
-add_action('wp_print_styles', 'bones_fonts');
+add_action('wp_enqueue_scripts ', 'bones_fonts');