Hi ! I´m developing my first wordpress plugin. To create a shortcode according to tutorial i should duplicate following code. But why is it function form_creation(){ ?> instead of function form_creation(){} ?> I mean why is only a part of function form_creations curled bracket inside the php ending tag ? I think i used to know the concept , but even googling didnt refresh my memory. What is the reason behind this ? Thx
<?php
/*
* Plugin Name: WordPress ShortCode
* Description: Create your WordPress shortcode.
* Version: 1.0
* Author: InkThemes
* Author URI: https://inkthemes.com
*/
// Example 1 : WP Shortcode to display form on any page or post.
function form_creation(){
?>
<form>
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname"><br>
Message: <textarea name="message"> Enter text here...</textarea>
</form>]
<?php
}
add_shortcode('test', 'form_creation');
?>