Skip to main content

Filter: gk/gravityview/view/secret/allow-legacy

Whether to accept a View's previous (pre per-site-key) secret.

Anyone can work it out from the View ID, so by default it is accepted only for Views created before this site established its per-site key, and only outside post content or in a post last saved by someone who can edit the View or not changed since the key. Return true to accept it anyway, or false to require the per-site secret everywhere.

Parameters​

NameTypeDescription
$allow_legacyboolWhether to accept the previous secret. Default: true only in the cases above.
$view\ViewThe View being validated.

Since​

  • 3.1.0
  • 3.9.0: Runs only when the previous secret matches, and the default also checks where the embed is.

Source​

Defined in src/View/View.php at line 3561