PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.0
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
ablocks / templates / email / plain-text / email-table.php

email-table.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.0, at templates/email/plain-text/email-table.php

26 lines 928 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly.
4 }
5
6 $label = str_pad( esc_html__( 'Label', 'ablocks' ), 20, ' ' ); // Prepare raw string first.
7 $value = esc_html__( 'Value', 'ablocks' );
8
9 echo "\n\n\n" . esc_html( $label . $value ) . "\n";
10 echo "-------------------------------------\n";
11
12 // Ensure $data is an array to avoid errors
13 if ( ! empty( $data ) && is_array( $data ) ) {
14 foreach ( $data as $input_id => $attr ) {
15 $attr = apply_filters( 'ablocks/form_email_field', $attr, $input_id );
16 $label_text = ucfirst( preg_replace( '/[_-]/m', ' ', $input_id ) );
17 $label = str_pad( esc_html( $label_text ), 18, ' ' );
18 $value = isset( $attr['value'] ) ? (
19 ( is_iterable( $attr['value'] ) ? wp_kses_post( implode( ', S', $attr['value'] ) ) : \wp_kses_post( $attr['value'] ) )
20 ) : '';
21
22 // Output the formatted label and value
23 echo esc_html( $label . ': ' . $value ) . "\n";
24 }
25 }
26