Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / lead2crm.php
Created May 7, 2024 16:44 — forked from iuryLandin/lead2crm.php
Enviar lead para CRM - WebHook para formulário do Elementor
<?php
/*
Plugin Name: Enviar lead para CRM
Plugin URI: https://github.com/iuryLandin
Description: Enviar lead para CRM - WebHook para formulário do Elementor
Author: Iury Landin
Version: 1.0.2
*/
@dexit
dexit / insert-comment.php
Created May 7, 2024 16:44 — forked from joshmarom/insert-comment.php
Form action for inserting comments
class Insert_Comment extends ElementorPro\Modules\Forms\Classes\Action_Base {
public function get_name() {
return 'insert-comment';
}
public function get_label() {
return 'Insert Comment';
}
@dexit
dexit / text-to-speech.php
Created May 7, 2024 16:44 — forked from wpcrazydev/text-to-speech.php
Text to speech anywhere in wordpress
/* Function to create TTS shortcode */
function text_to_speech_shortcode($atts) {
$atts = shortcode_atts(
array(
'value' => 'Na', // Default Value
),
$atts
);
$value = $atts['value'];
@dexit
dexit / formresponseintotable.php
Created May 7, 2024 16:43 — forked from wpcrazydev/formresponseintotable.php
Elementor form response into custom database table
add_action( 'elementor_pro/forms/new_record', function( $record, $ajax_handler ) {
$form_name = $record->get_form_settings( 'form_name' );
// Change Form name according to your need
if ( 'your_form_name_here' == $form_name ) {
$raw_fields = $record->get( 'fields' );
$fields = [];
foreach ( $raw_fields as $id => $field ) {
$fields[ $id ] = $field['value'];
@dexit
dexit / search.php
Created May 7, 2024 16:42 — forked from akther80/search.php
MyTravel - Search widget
<?php
namespace MyTravelElementor\Modules\Search\Widgets;
use MyTravelElementor\Base\Base_Widget;
use Elementor\Controls_Manager;
use Elementor\Widget_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
@dexit
dexit / functions.php
Created May 7, 2024 16:42 — forked from pingram3541/functions.php
Elementor Pro Forms Custom Action - Twilio
<?php
/**
* Twilio Elementor Pro form integration
* requirements:
* - php7.2 or greater
* - twilio php helper library - https://github.com/twilio/twilio-php/archive/main.zip
* - copy into theme folder /twilio and ref below on init
*/
@dexit
dexit / functions.php
Created May 7, 2024 16:42 — forked from MogulChris/functions.php
Custom 'Save submission' action for Jupiter X forms
<?php
/*
This is a quick a dirty way of saving JupiterX form submissions to your database, similar to how you can save the Elementor Pro ones.
I like the Jupiter X form widget because I work with its Hubspot action a lot, which Elementor Pro doesn't have. However the lack of local save sucks.
It seemed easier to implement saving submissions in the JX widget than Hubspot in the EPro one.
*/
//Include the action class. You can save it where you want and adjust the path below
include_once(get_stylesheet_directory() . '/inc/localsave.php');
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
class ProcessHubSpotController extends Controller
{
@dexit
dexit / api_hubspot.php
Created May 7, 2024 16:30 — forked from ablancodev/api_hubspot.php
Trasteando la API de Hubspot para acceder a los contactos y sus notas.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use HubSpot\Factory;
use HubSpot\Client\Crm\Objects\Notes\ApiException;
use HubSpot\Client\Crm\Objects\Notes\Model\Filter;
use HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup;
use HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectSearchRequest;
$client = Factory::createWithAccessToken('pat-eu1-2e01d2f9-f02d-4943-b90a-b314991afa9');
@dexit
dexit / AssociationEnum.php
Created May 7, 2024 16:25 — forked from zzgael/AssociationEnum.php
HubSpot Repository
<?php namespace App;
enum AssociationEnum: int
{
case CONTACT_TO_COMPANY = 1;
case DEAL_TO_CONTACT = 3;
case DEAL_TO_COMPANY = 5;
case QUOTE_TO_DEAL = 64;
case QUOTE_TO_QUOTE_TEMPLATE = 286;
case QUOTE_TO_LINE_ITEM = 67;