Load Member Data

/** Get Member Data **/ global $member; function hvt_get_member_data( $email) { //FOR DEBUGGING ONLY: // $email = “[email protected]”; $user = get_user_by( ’email’, $email ); ////FOR DEBUGGING ONLY: // echo “ USER ID: “.$user->ID; if ( ! $user ) { //Leave…Continue reading

Display Width in Pixel – Elementor

// Description: Displays the responsive width of the preview in the Elementor editor // Author: Carlos Béjinha // Author URI: https://binformatica.pt // ———————————— // Info Width In Elementor Editor function add_custom_script_to_elementor() { ?>Continue reading

Url Refer Shortcode

// Check if Referral URL exists if (isset($_SERVER[‘HTTP_REFERER’])) { // Store Referral URL in a variable $refURL = $_SERVER[‘HTTP_REFERER’]; // Display the Referral URL on web page echo $refURL; } else { echo “No referer URL”; }Continue reading

Strength-Based ABA – Referring Domain

add_filter(‘frm_get_default_value’, ‘my_custom_default_value’, 10, 2); function my_custom_default_value($new_value, $field){ if($field->id == 25){ //change 25 to the ID of the field $new_value = reset($_SESSION[‘frm_http_referer’]); //stores the value of the referring URL } return $new_value; }Continue reading

WP Rocket Purge Varnish Cache

function purge_varnish_shell() { $key = ‘6d6d9436-4d82-4404-9592-a3d0e40d80f4’; $cmd = “echo ‘$key’ | varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 ‘ban req.url ~ .’”; exec($cmd, $output, $result); error_log(‘Varnishadm purge: ‘ . ($result === 0 ? ‘erfolgreich’ : ‘fehlgeschlagen’)); } add_action(‘after_rocket_clean_domain’, ‘purge_varnish_shell’);Continue reading

PRT Add – Collapse One Section

add_filter( ‘frm_section_is_open’, ‘open_section_for_target_field’, 10, 2 ); function open_section_for_target_field( $open, $field ) { $target_section_id = 2812; //Replace 18635 with the section field ID $id = is_object( $field ) ? $field->id : $field[‘id’]; if ( (int) $id === $target_section_id ) { $open…Continue reading

PRT Add Activity – All Sections Start Opened

add_filter( ‘frm_section_is_open’, ‘open_section_for_target_form’, 10, 2 ); function open_section_for_target_form( $open, $field ) { $form_id = is_object( $field ) ? $field->form_id : $field[‘form_id’]; $target_form_id = 102; //Replace 1012 with your form ID if ( (int) $form_id === $target_form_id ) { $open =…Continue reading