- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.8
- Parse error: syntax error, unexpected ';', expecting ']' in /in/6o0b1 on line 4
Process exited with code 255.
<?php
$getVars = [
"abc" => "[gravityform id=\"6\" title=\"false\" description=\"false\"]";
"xyz" => "[gravityform id=\"5\" title=\"false\" description=\"false\"]";
];
function mde_shortcode_form(){
$formselect = $_GET['formselect'];
if (!empty($formselect) && in_array($formselect,$getVars)) {
do_shortcode($getVars[$formselect]);
}
}
add_shortcode('abcde','mde_shortcode_form');