<?php /** * Functions and definitions * * Sets up the theme and provides some helper functions.

Some helper functions * are used in the theme as custom template tags. Others are attached to action and * filter hooks in WordPress to change core functionality. * * The first function, twentyten_setup(), sets up the theme by registering support * for various features in WordPress, such as post thumbnails, navigation menus, and the like. * * When using a child theme (see http://codex.wordpress.org/Theme_Development and * http://codex.wordpress.org/Child_Themes), you can override certain functions * (those wrapped in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before the parent * theme's file, so the child theme functions would be used. * * Functions that are not pluggable (not wrapped in function_exists()) are instead attached * to a filter or action hook. The hook can be removed by using remove_action() or * remove_filter() and you can attach your own function to the hook. * * We can remove the parent theme's hook only after it is attached, which means we need to * wait until setting up the child theme: * * <code> * add_action( 'after_setup_theme', 'my_child_theme_setup' ); * function my_child_theme_setup() { * // We are providing our own filter for excerpt_length (or using the unfiltered value) * remove_filter( 'excerpt_length', 'twentyten_excerpt_length' ); * ... * } * </code> * * For more information on hooks, actions, and filters, see http://codex.wordpress.org/ Plugin_API. * * This theme was generated with Lubith - The Wordpress Theme Generator: http:// www.lubith.com * It is based on Twenty Ten (Wordpress 3.x default theme). * */ /** * Set the content width based on the theme's design and stylesheet. * * Used to set the width of images and content. Should be equal to the width the theme * is designed for, generally via the style.css stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 640; /** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'twentyten_setup' ); if ( ! function_exists( 'twentyten_setup' ) ): /**

* Sets up theme defaults and registers support for various WordPress features. * * @uses add_theme_support() To add support for post thumbnails and automatic feed links.php file. The init hook is too late for some features. * @uses add_custom_background() To add support for a custom background. * @uses add_editor_style() To style the visual editor. * @uses register_nav_menus() To add support for navigation menus. which runs * before the init hook.0 */ . add your own twentyten_setup to your child theme's * functions. * @uses register_default_headers() To register the default custom header images provided with the theme. * * To override twentyten_setup() in a child theme. such as indicating * support post thumbnails. * * Note that this function is hooked into the after_setup_theme hook. * @uses load_theme_textdomain() For translation/localization support. * * @since Twenty Ten 1. * @uses add_custom_image_header() To add support for a custom header. * @uses set_post_thumbnail_size() To set a custom post thumbnail size.