[wp-trac] [WordPress Trac] #62244: Just-in-time translation loading for plugins/themes not in the directory
WordPress Trac
noreply at wordpress.org
Wed Nov 27 10:12:19 UTC 2024
#62244: Just-in-time translation loading for plugins/themes not in the directory
--------------------------------------+-------------------------
Reporter: swissspidy | Owner: swissspidy
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.8
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-dev-note | Focuses:
--------------------------------------+-------------------------
Comment (by neo2k23):
Here is the complete code of the functions.php
{{{#!php
<?php
<?php
/**
* Theme framework initialization
*
* Sets up the theme and provides some helper functions.
*
* This file will not be overridden by theme updates. So you can add your
custom functions down below where indicated and they are safe.
*
* 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.
* This file is like a child functions file, and serves the same purpose,
without having to go to the
* trouble of implementing a child theme, if only having one or two simple
custom functions.
*
* NOTE: IF UPDATING THE THEME BY FTP, RENAME THIS FILE SO THAT IT IS NOT
OVERRIDDEN OR DO NOT ALLOW
* IT TO BE REPLACED IN THE FTP UPDATE. IF SAVED BY A RENAME, OF COURSE
REMEMBER TO COME BACK AND
* COPY ITS CUSTOM FUNCTIONS TO YOUR NEW FUNCTIONS.PHP FILE.
*/
if(!class_exists('Theme')){
/* Load the Theme class. */
require_once (TEMPLATEPATH . '/framework/theme.php');
$theme = new Theme();
$options = include(TEMPLATEPATH . '/framework/info.php');
$theme->init($options);
}
}}}
$theme is not called global.
I can change it to any other name and that fixes the issue. I guess more
custom themes could run into this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62244#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list