';
echo "
";
echo " ';
echo '
';
echo "";
echo "';
echo '
';
echo "";
echo "";
echo "
";
echo '';
}
function atg_insertion() {
global $reg_errors;
$reg_errors = new WP_Error;
global $wpdb;
if ( isset( $_POST['send'] ) ) {
// sanitize form values
$name = sanitize_text_field( $_POST["your_name"] );
$message = esc_textarea( $_POST["your_message"] );
$wpdb->insert("wp_testimonial", array(
"name" => "$name",
"detail" => "$message"
));
if ( $message ) {
echo '';
} else {
echo '';
}
}
}
function testimonial_shortcode() {
ob_start();
atg_insertion();
atg_form_code();
return ob_get_clean();
}
add_shortcode( 'Testimonials', 'testimonial_shortcode' );
function atg_view_data() {
ob_start();
atg_front_view();
return ob_get_clean();
}
add_shortcode( 'view data', 'atg_view_data' );
define('ROOTDIR', plugin_dir_path(__FILE__));
require_once(ROOTDIR . 'create-table.php');
require_once(ROOTDIR . 'view_testimonial.php');
require_once(ROOTDIR . 'frontend_view.php');
register_activation_hook( __FILE__, 'jal_install' );
register_activation_hook( __FILE__, 'jal_install_data' );
?>