Skip to content

Commit

Permalink
See pewresearch/pewresearch-org@d5601fa 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 7fb51dc commit 90ad450
Show file tree
Hide file tree
Showing 14 changed files with 271 additions and 110 deletions.
5 changes: 5 additions & 0 deletions blocks/core-heading/core-heading.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ public function render( $block_content, $block ) {

if ( array_key_exists('isChapter', $block['attrs']) && true === $block['attrs']['isChapter'] ) {
$heading_tag->set_attribute( 'data-is-chapter', 'true' );
$heading_tag->set_attribute( 'data-wp-interactive', wp_json_encode(array('namespace' => 'prc-block/table-of-contents')) );
$heading_tag->set_attribute( 'data-wp-context', wp_json_encode(array(
'id' => $id,
)));
$heading_tag->set_attribute( 'data-wp-on-document--scroll', 'callbacks.watchForChapterScroll' );
}

$block_content = $heading_tag->get_updated_html();
Expand Down
10 changes: 5 additions & 5 deletions blocks/form-captcha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display a captcha form element
Display a captcha form element, conditionally.

## Description

This is the long description. No limit, and you can use Markdown (as well as in the following sections).
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.

For backwards compatibility, if this section is missing, the full length of the short description will be used, and
Markdown parsed.
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

This section describes how to use the block.
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.

## Frequently Asked Questions

Expand Down
2 changes: 1 addition & 1 deletion blocks/table-of-contents/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('classnames', 'prc-block-utils', 'prc-icons', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '372ced25c6d3d5574964');
<?php return array('dependencies' => array('classnames', 'prc-block-utils', 'prc-icons', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f25b1b9713df21afa5c5');
1 change: 1 addition & 0 deletions blocks/table-of-contents/build/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocks/table-of-contents/build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blocks/table-of-contents/build/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions blocks/table-of-contents/build/style-index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocks/table-of-contents/build/view.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('@wordpress/interactivity', 'wp-polyfill'), 'version' => '0546a0d95d4ff4a902b7', 'type' => 'module');
<?php return array('dependencies' => array('@wordpress/interactivity', 'wp-polyfill'), 'version' => '98f81adb1630c9745c08', 'type' => 'module');
2 changes: 1 addition & 1 deletion blocks/table-of-contents/build/view.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 90ad450

Please sign in to comment.