Skip to content

PHP Constants

Ashley Kolodziej edited this page Dec 11, 2020 · 2 revisions

PHP Constants

Responsive Framework has several PHP constants that can be used to enable or control various features in the framework. PHP Constants can't be changed after they are defined. A child theme's functions.php

Version Constants

RESPONSIVE_FRAMEWORK_VERSION

The current Responsive Framework theme version.

Overridable in child theme: No.

RESPONSIVE_CHILD_THEME_VERSION

The Responsive child theme version. This should be used in all child themes. If defined in a child theme, this will override RESPONSIVE_FRAMEWORK_VERSION in get_responsive_theme_version().

RESPONSIVE_MODERNIZR_VERSION

The version of Modernizr being loaded in the framework.

Overridable in child theme: Yes.

RESPONSIVE_LIGHTGALLERY_VERSION

The version of jQuery lightGallery packaged with the framework.

Overridable in child theme: Possible, but not supported.

RESPONSIVE_LG_THUMBNAIL_VERSION

The version of lg-thumbnail packaged with the framework.

Overridable in child theme: Possible, but not supported.

Theme Setting Control Constants

The following constants are not defined by the framework. But, if a child theme defines them, they will override features in the framework and always enforce the value the constant is set to (if valid).

BU_RESPONSIVE_POSTS_SIDEBAR_SHOW_BOTTOM

Specifies if the posts sidebar should show at the bottom of the page (narrow).

Falls back to the option value if not defined.

BU_RESPONSIVE_SIDEBAR_POSITION

Defines a sidebar position. Disables the option in the Customizer.

Allowed values:: right, left, bottom.

BU_RESPONSIVE_LAYOUT

Specifies the responsive layout. Disables the option in the Customizer.

Allowed values:: default, top-nav, side-nav, no-nav, mega-nav.

Note: Child themes can filter these allowed values.

BU_SUPPORTS_DYNAMIC_FOOTBARS

Specified whether to enable the alternate footbar. Disables the option in the Customizer.

BU_RESPONSIVE_FONT_PALETTE

Specifies the font palette to use for a child theme.

Other Plugin Constants

Several constants that control plugin behaviors are also defined in Responsive Framework. These are all overridable in a child theme or plugin.

BU_SUPPORTS_COMMENTS

Defines whether the site supports the BU Comments plugin.

Default: true

BU_SUPPORTS_SEO

Defines whether the site supports the BU SEO features of BU Post Details plugin.

Default: true

BU_DISABLE_FOOTER_EDITOR

Defines whether the footer editor in BU Links.

Default: true (disabled)

BU_NAVIGATION_SUPPORTED_DEPTH

Defines maximum depth of the primary navigation in BU Navigation.

Default: 1

BU_BRANDING_TYPE

Defines the site's branding type. Disables the option in the Customizer.

Allowed values:: logotype, signature, unbranded

Default: logotype

Plugin Flags

Several plugins use PHP constants to indicate they are active and available to be used. These constants are defined in the plugins themselves and cannot be overridden.

BU_PROFILES_PLUGIN_ACTIVE

Indicates that the BU Profiles plugin is active.

BU_SITE_MANAGER_VERSION

Indicates that the BU Site Manager plugin is active.

Welcome to Responsive!

Get started

Configuration

Build child themes

Sass

Javascript

PHP

Shortcodes

Templates

GitHub

Tasks

Contribute to the framework

Code Examples

BU Developer Resources

Clone this wiki locally