WordPress.org

Make WordPress Core

Ticket #18071: 18071.2.diff

File 18071.2.diff, 1.5 KB (added by solarissmoke, 7 years ago)

Change both Twenty Ten and Twenty Eleven

  • wp-content/themes/twentyten/functions.php

     
    8888
    8989        // Make theme available for translation
    9090        // Translations can be filed in the /languages/ directory
    91         load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );
     91        load_theme_textdomain( 'twentyten', get_template_directory() . '/languages' );
    9292
    9393        $locale = get_locale();
    94         $locale_file = TEMPLATEPATH . "/languages/$locale.php";
     94        $locale_file = get_template_directory() . "/languages/$locale.php";
    9595        if ( is_readable( $locale_file ) )
    9696                require_once( $locale_file );
    9797
  • wp-content/themes/twentyeleven/functions.php

     
    7878         * If you're building a theme based on Twenty Eleven, use a find and replace
    7979         * to change 'twentyeleven' to the name of your theme in all the template files.
    8080         */
    81         load_theme_textdomain( 'twentyeleven', TEMPLATEPATH . '/languages' );
     81        load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' );
    8282
    8383        $locale = get_locale();
    84         $locale_file = TEMPLATEPATH . "/languages/$locale.php";
     84        $locale_file = get_template_directory() . "/languages/$locale.php";
    8585        if ( is_readable( $locale_file ) )
    8686                require_once( $locale_file );
    8787