For developers

Updated on October 22, 2026

Enhance for GP does not add blocks, shortcodes, GeneratePress Elements, REST routes or WP-CLI commands. All settings are stored in the generate_settings option.

Filter

enhance4gp_sidebar_contexts

Add your own page type to Layout → Sidebars. The filter receives an array of contexts. Each context is an array with these keys:

KeyDescription
settingKey stored in generate_settings.
labelLabel of the select control.
defaultDefault value. The default layout is an empty string, which means Inherit.
priorityControl order in the Customizer. Built-in contexts use 40 to 46.
conditionCallable that returns true when the context matches, for example is_front_page.

The first context that matches, in array order, supplies the layout.

Action

  • efgp_fs_loaded runs after the licensing SDK is initialised.

Helper functions

FunctionReturns
enhance4gp_settings()The generate_settings array with GeneratePress defaults applied.
enhance4gp_setting( $key, $default )One value from that array, or $default when it is not set.
enhance4gp_default( $key, $fallback )The default for a key, using GeneratePress’ default (including a theme default from generate_option_defaults) before $fallback.
enhance4gp_theme_design()The active theme’s decoded efgp-design.json as an array, or null when it is missing or invalid.

CSS classes

  • .enhance4gp-after-comments wraps the After the Comments widget area.
  • .enhance4gp-author-avatar is the class of the byline avatar image.

Defaults

A default supplied by a theme through generate_option_defaults wins over the plugin’s own default. A value saved with Publish wins over both.

Integrations

  • Simple Author Box: byline avatar and author box position.
  • FluentComments: comment form fields for logged-out visitors.
  • GP Premium Blog: Enhance for GP settings win where both set the same thing.