' . __( 'Insert Shortcode', 'evo-shortcodes' ) . ''; } echo $output; } /** * Build out the input fields for shortcode content * @param string $key * @param array $param the parameters of the input * @return void */ public function tzsc_build_fields($key, $param) { $html = ''; $html .= '' . $param['label'] . ':'; switch( $param['type'] ) { case 'text' : // prepare $output = ''; $output .= '' . "\n"; $output .= '' . $param['desc'] . '' . "\n"; // append $html .= $output; break; case 'textarea' : // prepare $output = ''; $output .= '' . "\n"; $output .= '' . $param['desc'] . '' . "\n"; // append $html .= $output; break; case 'select' : // prepare $output = ''; $output .= '' . "\n"; $output .= '' . $param['desc'] . '' . "\n"; // append $html .= $output; break; case 'checkbox' : // prepare $output = ''; $output .= '' . "\n"; $output .= '' . $param['desc'] . ''; $html .= $output; break; default : break; } $html .= ''; return $html; } /** * Popup window * * Print the footer code needed for the Insert Shortcode Popup * * @since 2.0 * @global $pagenow * @return void Prints HTML */ function tzsc_popup_html() { global $pagenow; include(TZSC_PLUGIN_DIR . 'includes/config.php'); // Only run in add/edit screens if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) { ?>