render ? (bool) apply_filters( 'aipt_content_structure_banned_phrases_enabled_cache_only', false ) : (bool) apply_filters( 'aipt_content_structure_banned_phrases_enabled', false ); } /** * Clear `rules.bannedPhrases` on this run's copy when the plan does not * include them, and report it. No starter template ships one, so every * list is a merchant's own. * * @param array &$definition Clamped definition (mutated in place). * @param array &$applied Accumulated appliedFreeDefaults entries. * @return void */ public function clamp( array &$definition, array &$applied ): void { $this->refuseInRenderMode( __METHOD__ ); if ( empty( $definition['rules']['bannedPhrases'] ) || ! is_array( $definition['rules']['bannedPhrases'] ) || $this->bannedPhrasesAllowed() ) { return; } $definition['rules']['bannedPhrases'] = array(); $applied[] = $this->freeDefault( 'rules:bannedPhrases', 'templateBannedPhrases', __( 'Banned phrases on this template were not used in this run.', 'ai-product-tools' ), __( 'banned phrases', 'ai-product-tools' ) ); } }