is_admin_theme — Determine whether the script is being executed through the admin interface.

View-related functions

Summary

is_admin_theme()

Determine whether the script is being executed through the admin interface.

Can be used to branch behavior based on whether or not the admin theme is being accessed, but should not be relied upon in place of using the ACL for controlling access to scripts.

Returns:

bool

Usage

Examples

Use to check if user is accessing pages from within the admin views and manage routes accordingly.

// Don't add these routes on the admin side to avoid conflicts.
if (is_admin_theme()) {
    return;
}

See Also