| 1 |
<?php |
| 2 |
|
| 3 |
//extract styles & classes |
| 4 |
extract($extra_attr); |
| 5 |
?> |
| 6 |
|
| 7 |
<div class="<?php echo esc_attr( $wrapper_class ); ?>" <?php echo (!empty($wrapper_style) ? 'style="'.esc_attr($wrapper_style).'"' : '');?>><?php |
| 8 |
if ( $attributes['showContent'] == 'excerpt' || has_getwid_nested_blocks() ) { |
| 9 |
?><p><?php echo esc_html( wp_trim_words( get_the_excerpt(), $contentLength ) ); ?></p><?php |
| 10 |
} elseif ( $attributes['showContent'] == 'content' ) { |
| 11 |
the_content(); |
| 12 |
} elseif ( $attributes['showContent'] == 'full' ) { |
| 13 |
echo do_blocks( wp_kses_post( html_entity_decode( $current_post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 14 |
} ?> |
| 15 |
</div> |
| 16 |
|