Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2. // Registrando estilos
  3. function flx_registrar_estilos() {
  4. // registrar
  5. wp_register_style('flx_styles', plugins_url('css/flexslider.css', __FILE__));
  6.  
  7. // colocar
  8. wp_enqueue_style('flx_styles');
  9. }
  10.  
  11. add_action('wp_print_styles', 'flx_registrar_estilos');
  12.  
  13. // Registrando scripts
  14. function flx_registrar_scripts() {
  15. if (!is_admin()) {
  16. // registrar
  17. // en esta función registramos jquery.flexslider.js y a demás la libreria jquery desde el core de WordPress
  18. wp_register_script('flx_script', plugins_url('js/jquery.flexslider.js', __FILE__), array( 'jquery' ));
  19. wp_register_script('scripts', plugins_url('js/scripts.js', __FILE__));
  20.  
  21. // colocar
  22. wp_enqueue_script('flx_script');
  23. wp_enqueue_script('scripts');
  24. }
  25. }
  26.  
  27. add_action('wp_print_scripts', 'flx_registrar_scripts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement