From 928c6eb8fede916a88d09fdd34af4ff786ae3e11 Mon Sep 17 00:00:00 2001 From: Blake Wilson Date: Mon, 10 Apr 2023 14:49:25 -0500 Subject: [PATCH] Formatting --- includes/Blocks/Block.php | 4 ++-- includes/utilities/DomHelpers.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Blocks/Block.php b/includes/Blocks/Block.php index e9a20520..48c77568 100644 --- a/includes/Blocks/Block.php +++ b/includes/Blocks/Block.php @@ -218,7 +218,7 @@ private function resolve_block_attributes( $block, $attribute_name, $attribute_c case 'html': $value = DOMHelpers::parseHTML( $rendered_block, $attribute_config['selector'], $default ); - if( isset( $attribute_config['multiline'] ) ) { + if ( isset( $attribute_config['multiline'] ) ) { $value = DOMHelpers::getElementsFromHTML( $value, $attribute_config['multiline'] ); } @@ -230,7 +230,7 @@ private function resolve_block_attributes( $block, $attribute_name, $attribute_c }//end switch // if type is set to integer, get the integer value of the attribute. - if( $attribute_config['type'] === 'integer' ) { + if ( $attribute_config['type'] === 'integer' ) { $value = intval( $value ); } diff --git a/includes/utilities/DomHelpers.php b/includes/utilities/DomHelpers.php index eae9a152..a13d0e68 100644 --- a/includes/utilities/DomHelpers.php +++ b/includes/utilities/DomHelpers.php @@ -86,6 +86,8 @@ public static function getTextFromSelector($html, $selector) { return null; } + // Returns the element's "textContent" + // https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent return $nodes[0]->text(); } }