Skip to main content

gravityview_is_themed()

function gravityview_is_themed( $view=null )

Checks whether a non-legacy theme applies to a View.

Returns true when the View's theme setting is a non-legacy theme or when the gk/gravityview/theme/force-active filter forces the stack on. This is the supported detection API for themes and integrations that need to branch on the themed front-end, and it matches the gate gv_container_class() uses to stamp the gv-themed marker class on the View container.

When called without a View on a page that renders multiple Views, returns true if any of those Views qualifies.

Since: TBD

Source: src/API/class-api.php:261

Parameters

NameTypeDefaultDescription
$view\GV\View | int | string | nullnullThe View, a View ID, or null to detect the current View from context.

Returns

  • bool — True when a non-legacy theme applies.