<?php $messages = $form_options['messages']; foreach ( $messages as $key => $message ): $elid = str_replace( '-', '_', $key ); $content = apply_filters( 'wpmtst_l10n', $message['text'], wpmtst_get_l10n_context( 'form-messages' ), $key . ' : text' ); ?> <tr> <th scope="row"> <label for="<?php echo $elid; ?>"> <?php _ex( $message['description'], 'description', 'strong-testimonials' ); ?> </label> <input type="hidden" name="wpmtst_form_options[messages][<?php echo $key; ?>][description]" value="<?php esc_attr_e( $message['description'] ); ?>"/> </th> <td> <?php if ( 'submission_success' == $elid ): ?> <?php $settings = array( 'textarea_name' => "wpmtst_form_options[messages][$key][text]", 'textarea_rows' => 10, ); wp_editor( $content, $elid, $settings ); ?> <?php else: ?> <input type="text" id="<?php echo $elid; ?>" name="wpmtst_form_options[messages][<?php echo $key; ?>][text]" value="<?php echo esc_attr( $content ); ?>" required /> <?php endif; ?> </td> <td class="actions"> <input type="button" class="button secondary restore-default-message" value="<?php _ex( 'restore default', 'singular', 'strong-testimonials' ); ?>" data-target-id="<?php echo $elid; ?>"/> </td> </tr> <?php endforeach; ?> Help solve the problem. In the beginning there is a foreach loop. And like in the new version of PHP you need to wrap it in if (is_array ($ messages)) {code}. But something does not work. First, for foreach there are no parentheses, there is a colon and I do not understand how to wrap this code.