2011-05-10, 22:27:41
ccagle8 Wrote:I like the is_frontend() check - i will add that.ok - my fault.
find_url() is already available to the backend
ccagle8 Wrote:get_version() - why do we need this, why cant you check the constant GSVERSION? also, get_site_version()
The problem is that configuration.php is not included by default, so you have to include it yourself, see wiki. If configuration.php is included by default - frontend and backend, that would be ok, too. It should be possible to do checks like (pseudo code):
Code:
if (gs_version > 3) { ... }
Code:
if ((is_frontend() and gs_version_frontend() > 3) or (!is_frontend() and gs_version_backend() > 3)) { ... }
ccagle8 Wrote:we need to discuss the get_frontend_language() idea a little more
The easiest way probably is to include a $LANG = 'en_US' in gsconfig.php for the default frontend language and tell users to change it, if necessary. On the backend it is then changed to the language of the user, when he is identified.
Thus a plugin could always check $LANG for the language (as it could in 2.03) - unless it supports the I18N plugin ;-)