WordPress.org

Make WordPress Core

Ticket #18302: 18302.twentyeleven.patch

File 18302.twentyeleven.patch, 1.9 KB (added by johnbillion, 3 years ago)

Example usage in TwentyEleven

  • wp-content/themes/twentyeleven/header.php

     
    4949<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> 
    5050<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 
    5151<!--[if lt IE 9]> 
    52 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script> 
     52<script src="<?php echo locate_theme_file( 'js/html5.js' ); ?>" type="text/javascript"></script> 
    5353<![endif]--> 
    5454<?php 
    5555        /* We add some JavaScript to pages with the comment form 
  • wp-content/themes/twentyeleven/inc/theme-options.php

     
    346346        $color_scheme = $options['color_scheme']; 
    347347 
    348348        if ( 'dark' == $color_scheme ) 
    349                 wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); 
     349                wp_enqueue_style( 'dark', locate_theme_file( 'colors/dark.css' ), array(), null ); 
    350350 
    351351        do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme ); 
    352352} 
  • wp-content/themes/twentyeleven/showcase.php

     
    1515 */ 
    1616 
    1717// Enqueue showcase script for the slider 
    18 wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '2011-04-28' ); 
     18wp_enqueue_script( 'twentyeleven-showcase', locate_theme_file( 'js/showcase.js' ), array( 'jquery' ), '2011-04-28' ); 
    1919 
    2020get_header(); ?> 
    2121