Hey aldebaran,
I'll try to answer your first question:
Plugin authors (ideally) define plugin hooks you can hook into in order to execute your functions at a specified time.
In I18N, there's a plugin hook called
Basically, do something like this (untested):
I'll try to answer your first question:
Plugin authors (ideally) define plugin hooks you can hook into in order to execute your functions at a specified time.
In I18N, there's a plugin hook called
theme-header
(which is by the way also a default hook), which accesses the $language
var (so you can be sure to access it if you hook into it). Note that you if you echo
something, it will be outputted in the page's <head>
.Basically, do something like this (untested):
PHP Code:
<?php
function your_function() {
global $language;
// do something based on $language;
}
add_action('theme-header', 'your_function');
?>