Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewilson committed Apr 10, 2023
1 parent 916b3c5 commit 928c6eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/Blocks/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );
}

Expand All @@ -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 );
}

Expand Down
2 changes: 2 additions & 0 deletions includes/utilities/DomHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 928c6eb

Please sign in to comment.