[wp-hackers] Re: Couple of quick questions: restrict access to
plugin file and loading of l10n
Jennifer Hodgdon
yahgrp at poplarware.com
Fri Oct 19 22:17:55 GMT 2007
Andrew Ozz wrote:
> I'm sorry I didn't explain very well what I'm trying to do. The
> load_plugin_textdomain is called at the beginning of the function that
> outputs the admin page, that is called by options_general.php long after
> the "init" and "plugins_loaded" hooks (as fas as I can tell) and only if
> the user clicks on the menu for it.
>
> That way the translation is only loaded when needed, but I was afraid
> that it may be too late for the .mo file to load properly if the server
> is slow, etc.
PHP runs line by line, and each function/line/command finishes before
the next one is executed. So as long as you call
load_plugin_textdomain before you call __ or _e, there is no problem.
Also, the MO file is read from a file system mounted directly on the
same server that PHP is running on, or at least that would be the norm.
--Jennifer
--
Jennifer Hodgdon
Poplar ProductivityWare * www.poplarware.com
Web Databases/Scripts * Modeling/Analysis/Palm OS Software
More information about the wp-hackers
mailing list