Advertisement
Guest User

Untitled

a guest
Feb 19th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. <?php
  2. /**
  3. * Twenty Eleven functions and definitions
  4. *
  5. * Sets up the theme and provides some helper functions. Some helper functions
  6. * are used in the theme as custom template tags. Others are attached to action and
  7. * filter hooks in WordPress to change core functionality.
  8. *
  9. * The first function, twentyeleven_setup(), sets up the theme by registering support
  10. * for various features in WordPress, such as post thumbnails, navigation menus, and the like.
  11. *
  12. * When using a child theme (see http://codex.wordpress.org/Theme_Development and
  13. * http://codex.wordpress.org/Child_Themes), you can override certain functions
  14. * (those wrapped in a function_exists() call) by defining them first in your child theme's
  15. * functions.php file. The child theme's functions.php file is included before the parent
  16. * theme's file, so the child theme functions would be used.
  17. *
  18. * Functions that are not pluggable (not wrapped in function_exists()) are instead attached
  19. * to a filter or action hook. The hook can be removed by using remove_action() or
  20. * remove_filter() and you can attach your own function to the hook.
  21. *
  22. * We can remove the parent theme's hook only after it is attached, which means we need to
  23. * wait until setting up the child theme:
  24. *
  25. * <code>
  26. * add_action( 'after_setup_theme', 'my_child_theme_setup' );
  27. * function my_child_theme_setup() {
  28. * // We are providing our own filter for excerpt_length (or using the unfiltered value)
  29. * remove_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
  30. * ...
  31. * }
  32. * </code>
  33. *
  34. * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
  35. *
  36. * @package WordPress
  37. * @subpackage Twenty_Eleven
  38. * @since Twenty Eleven 1.0
  39. */
  40.  
  41. /**
  42. * Set the content width based on the theme's design and stylesheet.
  43. */
  44.  
  45.  
  46.  
  47. if( !is_admin()){
  48. wp_deregister_script('jquery');
  49. wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '1.7.1');
  50. wp_enqueue_script('jquery');
  51. }
  52.  
  53.  
  54.  
  55. wp_enqueue_script( 'slipSlap', get_stylesheet_directory_uri() .'/js/slipSlap.js', array ( 'jquery' ), null, true );
  56. wp_enqueue_script( 'mosaic', get_stylesheet_directory_uri() .'/js/mosaic.1.0.1.js', array ( 'jquery' ), null, true );
  57.  
  58. function custom_excerpt_length( $length ) {
  59. return 20;
  60. }
  61. add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement