mega['settings'] ); echo wpautop( $text ), '
'; } public function ajaxCallback() { check_ajax_referer( 'contact_data', 'security' ); $post = stripslashes_deep( $_POST );//wp_unslash $this->parseWidgetSettings( $post['ins'] ); $mega_error = new Mega_Error(); if (( current_time( 'timestamp' ) - intval( $post['aa'] )) < 5 ) { $mega_error->add_error( '', esc_html__( 'It seems you are submitting too fast, take it slowly!', 'mega' )); } unset( $post['security'], $post['action'], $post['ins'], $post['aa'], $post['_wp_http_referer'] ); foreach( $post as $po => $poval ) { call_user_func( $this->megaForm['validate'][$po]['callback'], $poval, $mega_error ); $post[$po] = call_user_func( $this->megaForm['sanitize'][$po]['callback'], $poval ); } $this->validate( $post, $mega_error ); if ( !$mega_error->errors ) { //echo json_encode( $mega_error->errors ); $this->ajax( $post ); } else { foreach( $mega_error->errors as $j => $dat ) { echo '