gpp_frame_ancestors

  1. Description
  2. Usage
  3. Parameters

Description

Filter allowed frame ancestors for the iframe. By default, only the current site (‘self’) can embed the iframe.

  • Return an array of additional allowed origins to allow cross-origin embedding
  • Return null to disable the CSP header entirely (not recommended)

Usage

Applied globally

add_filter( 'gpp_frame_ancestors', 'my_custom_function' );

Parameters

$additional_ancestors array<string>|null

Additional allowed origins (URLs), or null to disable.