marcodeltongo / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

Remove useless stuff from functions.php #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
these variables aren't used anywhere else in thematic

-/** 
- * Legacy options global variables likely not needed anymore…
- * Can these be removed safely?
- */
-$themename = "Thematic";
-$shortname = "thm";
-

make.wordpress.org says that this isn't necessary to load a language file.  i 
can confirm this works with 3.4.  idk if any of you can check that it works 
with 3.3 still.  

-       $locale = get_locale();
-       $locale_file = THEMELIB . "/languages/$locale.php";
-       if ( is_readable($locale_file) )
-           require_once ($locale_file);

Original issue reported on code.google.com by helgathe...@gmail.com on 14 Jun 2012 at 1:34

Attachments:

GoogleCodeExporter commented 9 years ago
we can remove the globals but the locale.php is important and need to stay.

Tagging localization

Original comment by eugene.m...@gmail.com on 14 Jun 2012 at 8:15

GoogleCodeExporter commented 9 years ago
why is it important?  it works without it.  check this discussion: 
http://make.wordpress.org/themes/2012/05/08/proposed-wordpress-3-4-guidelines-re
visions/#comment-19427

apparently it has been removed from automattic's _s theme.  

Original comment by helgathe...@gmail.com on 14 Jun 2012 at 9:46

GoogleCodeExporter commented 9 years ago
I think it is important because it was added in support of the I18n community. 
Yes, the mo files provide translation without that code but the purpose of the 
code is not to provide translation. 

It's to provide functionality that is specific to a locale. The link below 
points out a valid use case for desiring the ability to add a local.php to the 
parent. 

http://themeshaper.com/forums/topic/thematic-in-greek

There are likely other alphabets and use cases that may be similar that we 
bloody English speakers don't have the capacity to realize.

I'm in favor of leaving it in for now and giving it further thought. The 
make.themes discussion only mentions that this is not a theme requirement.

Original comment by eugene.m...@gmail.com on 15 Jun 2012 at 1:32

GoogleCodeExporter commented 9 years ago
it sure is convenient being an english-speaker.  you can go everywhere in the 
world and have an (un)reasonable expectation that everyone will understand you 
:)  

ok, so it isn't necessarily related to the translation mo files, but isn't that 
code looking in thematic's language folder?  there aren't any php files in 
there to ever load. if someone needs to load a .php to do some localization 
mods shouldn't that file be in the child theme?  

Original comment by helgathe...@gmail.com on 15 Jun 2012 at 1:29

GoogleCodeExporter commented 9 years ago
yeah I'm leaning toward thinking that whatever "plugin" functionality the files 
might have provided would be better served by a child theme. 

There is a load_childtheme_text_domain function but that looks to be best 
included by a child theme not the framework.

need to run some tests and attempt a locale.php to see if it will run from 
within the child theme dir

Original comment by eugene.m...@gmail.com on 15 Jun 2012 at 1:57

GoogleCodeExporter commented 9 years ago
makes sense to me.  we could maybe change the code to use locate_template() and 
then it would automatically search the child theme first.  

$locale = get_locale();
locate_template(array('library/languages/$locale.php','languages/$locale.php'), 
true);

or completely leave it in the hands of the child themers.  

Original comment by helgathe...@gmail.com on 15 Jun 2012 at 2:27

GoogleCodeExporter commented 9 years ago

Original comment by eugene.m...@gmail.com on 29 Oct 2012 at 12:34