Changeset 13888 for trunk/wp-content/themes/twentyten/functions.php
- Timestamp:
- 03/30/2010 12:55:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/functions.php
r13886 r13888 18 18 * Functions that are not pluggable (not wrapped in function_exists()) are instead attached 19 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. For example: 20 * remove_filter() and you can attach your own function to the hook. 21 * 22 * In this example, since both hooks are attached using the default priority (10), the first 23 * one attached (which would be the child theme) will run. We can remove the parent theme's 24 * hook only after it is attached, which means we need to wait until setting up the child theme: 21 25 * 22 26 * <code> 23 * remove_action( 'after_setup_theme', 'twentyten_setup' );24 27 * add_action( 'after_setup_theme', 'my_child_theme_setup' ); 25 28 * function my_child_theme_setup() { 26 * ... 29 * // We are replacing twentyten_setup() with my_child_theme_setup() 30 * remove_action( 'after_setup_theme', 'twentyten_setup' ); 31 * // We are providing our own filter for excerpt_length (or using the unfiltered value) 32 * remove_filter( 'excerpt_length', 'twentyten_excerpt_length' ); 33 * ... 27 34 * } 28 35 * </code>
Note: See TracChangeset
for help on using the changeset viewer.