SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | - | /** Twentyten child theme: twentyten-child-KN */ |
3 | + | |
4 | ||
5 | - | function favicon_link() { |
5 | + | function my_formatter($content) { |
6 | - | echo '<link rel="shortcut icon" type="image/x-icon" href="../wp-content/themes/twentyten-child-KN/images/favicon.ico" />' . "\n"; |
6 | + | $new_content = ''; |
7 | $pattern_full = '{(\[raw\].*?\[/raw\])}is'; | |
8 | - | add_action('wp_head', 'favicon_link'); |
8 | + | $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; |
9 | $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); | |
10 | - | /** Tell WordPress to run child_theme_setup() |
10 | + | |
11 | - | when the 'after_setup_theme' hook is run. |
11 | + | foreach ($pieces as $piece) { |
12 | - | */ |
12 | + | if (preg_match($pattern_contents, $piece, $matches)) { |
13 | - | add_action( 'after_setup_theme', 'child_theme_setup' ); |
13 | + | $new_content .= $matches[1]; |
14 | } else { | |
15 | - | /** This function will hold our new calls and over-rides */ |
15 | + | $new_content .= wptexturize(wpautop($piece)); |
16 | - | if ( !function_exists( 'child_theme_setup' ) ): |
16 | + | } |
17 | - | function child_theme_setup() { |
17 | + | |
18 | return $new_content; | |
19 | - | /* |
19 | + | |
20 | - | We want a Second Navigation Bar right at the top |
20 | + | |
21 | - | This theme uses wp_nav_menu() in two locations. |
21 | + | ?> |