Skip to content

Commit

Permalink
See pewresearch/pewresearch-org@355ef89 from refs/heads/release/5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prcdevgitbot committed Feb 22, 2024
1 parent 90ad450 commit 3e2356a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 2 additions & 9 deletions blocks/form-captcha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ Display a captcha form element, conditionally.
## Description

This captcha is powered by Cloudflare's Turnstile. It is a simple captcha that can be used to protect block applications from bots and spam.
It is conditionally displayed when it's parent and target namespace have a context.captchaHidden value of false, by default most applications will have this set to true.
It is conditionally displayed when it's parent and target namespace have a `context.captchaHidden` value of `false`, by default most applications will have this set to `true`.

Upon successful completion of the captcha, the challenge token will be returned back to the targetnamespace at `context.captchaToken` which you should further validate in your rest request. See `\PRC\Platform\Mailchimp->verify_captcha()` for an example of how to validate the captcha token.

## Instructions

Drop block in block application, set the targetnamespace attribute in the PRC Interactiity API panel. This will be the namespace of the parent block that will control the captcha visibility. It is incumbent upon the parent block to handle toggling the block on|off and further validation of the returned challenge token.
op block in block application, set the targetnamespace attribute in the PRC Interactiity API panel. This will be the namespace of the parent block that will control the captcha visibility. **It is incumbent upon the parent block to handle toggling the block on|off and further validation of the returned challenge token.**

## Frequently Asked Questions

= A question that someone might have =

An answer to that question.

### What about foo bar?

Answer to foo bar dilemma.

## Screenshots

Expand All @@ -41,7 +38,3 @@ Answer to foo bar dilemma.
* Release

## Developer Notes

You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
blocks where more information needs to be conveyed that doesn't fit into the categories of "description" or
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
1 change: 1 addition & 0 deletions includes/print-engine/class-print-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public function render( $block_content, $block ) {
$w = new WP_HTML_Tag_Processor( $block_content );
if ( $w->next_tag() ) {
if ( $hide_on_print ) {
// @TODO: Check for a query var and render the "print view" using /iframe support and exclude the hide on print blocks explicilty from the markup... but do that later.
$w->set_attribute( 'data-hide-on-print', 'true' );
}
if ( $display_on_print ) {
Expand Down

0 comments on commit 3e2356a

Please sign in to comment.