Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find out if the backend is active
#1
i18n_specialpages uses

PHP Code:
if (basename($_SERVER['PHP_SELF']) && basename($_SERVER['PHP_SELF']) != 'index.php') { 

to find out if GS is in the backend... it works, but this looks more like a bad hack than like the best solution.

May i suggest that the backend entry points define a GSBACKEND=true and the front end defines GSBACKEND=false?

ciao
a.l.e
Reply
#2
In 3.1+ you can use is_frontend()

This was broken in previous versions.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
yep, "is_frontend()" is what i was looking for!
Reply




Users browsing this thread: 1 Guest(s)