Skip to content

Commit

Permalink
revert back the ID attribute rendering
Browse files Browse the repository at this point in the history
add this attribute manually because of this Gutenberg's change WordPress/gutenberg#51288
  • Loading branch information
nk-o committed Jun 30, 2023
1 parent 21c1a9f commit ed46d0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions classes/class-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,14 @@ public function render_callback( $attributes, $content = null, $context = 'front
$array_atts['class'] .= ' align' . $attributes['align'];
}

// The anchor rendering was removed in v3.4.0 because of Gutenberg added support for automatic anchor render.
// Then they are removed this option and we reverted this anchor render back
//
// @link https://github.com/WordPress/gutenberg/pull/51288.
if ( isset( $attributes['anchor'] ) && $attributes['anchor'] ) {
$array_atts['id'] = esc_attr( $attributes['anchor'] );
}

if ( isset( $attributes['ghostkitSR'] ) && $attributes['ghostkitSR'] ) {
$array_atts['data-ghostkit-sr'] = esc_attr( $attributes['ghostkitSR'] );
}
Expand Down

0 comments on commit ed46d0f

Please sign in to comment.