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 / functions.php
Created June 12, 2024 19:19 — forked from mgratch/functions.php
Use Elementor Pro & Elementor Hello Theme Customization on Attendee Registration Page with Modern Tribe Event Tickets.
<?php
/**
* Load Elementor template if available.
*
* @param $template
*
* @return string
*/
function redirect_virtual_templates_to_index( $template ) {
function screddit_filter_single_elementor_template($manager)
{
if (ElementorPro\Modules\ThemeBuilder\Module::is_preview()) // Do not change content when editing.
return;
$theme_builder = ElementorPro\Modules\ThemeBuilder\Module::instance();
$current_template = $theme_builder->get_conditions_manager()->get_documents_for_location('single');
if (is_singular('property')) {
We are not using any third-party plugin for variations; this is made simply through WooCommerce.
Screenshots:
Attribute: https://ibb.co/82zCz05
Variations: https://ibb.co/vjbzsHY
Logs: https://ibb.co/y61k6FZ
This issue is occurring only with this product, the variations for other products are working fine:
https://restyseat-demo-site-db2a8d.ingress-baronn.ewp.live/product/resty-seat-gel-cushion/
@dexit
dexit / elementor-sapi.php
Created June 12, 2024 19:19 — forked from sajt/elementor-sapi.php
Ezt a file-t feltöltve a Wordpress wp-content/plugins-ba és bekapcsolva, az Elementor Pro-ban form adatokat lehet küldeni a SAPI-nak. Fontos, hogy a form-ban lévő mezők id-ja megegyezzen a SAPI-ban lévő Mező nevekkel. A kódban a megfelelő változók értékeit át kell írni
<?php
/**
* Plugin Name: Elementor SAPI integration
* Plugin URI: https://webfeszek.hu
* Description: Adds a webhook for easy integration to SAPI
* Version: 0.1.0
* Author: Tamas Amon
* Author URI: https://amon.hu
* License: GPLv2 or later
/**
* Class Elementor_Form_Email_Attachments
*
* Send Elementor Form upload field as attachments to email
*/
class Elementor_Form_Email_Attachments {
// Set to true if you want the files to be removed from
// the server after they are sent by email
const DELETE_ATTACHMENT_FROM_SERVER = true;
public $attachments_array = [];
<?php
/**
* Preload Elementor background images if they are among the first elements on a page.
*
* @return void
*/
function sitecare_preload_elementor_background_images(): void {
if ( ! did_action( 'elementor/loaded' ) ) {
/**
* Applies eager loading to the first three (3) posts in the "recipe_list" FacetWP listing.
*
* @param array $output
* @param array $params
*
* @return array
*/
function sitecare_facetwp_image_loading_strategy( array $output, array $params ): array {
<?php
// Pretendard 글꼴 Import
function custom_font_pretendard() {
wp_enqueue_style( 'custom_font_style', 'https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css', false );
}
add_action( 'wp_enqueue_scripts', 'custom_font_pretendard' );
// Pretendard 글꼴을 Jetcraft 콤포넌트 요소에만 적용
add_action( 'wp_head', function () { ?>
@dexit
dexit / elementor.php
Created June 12, 2024 19:18 — forked from alfanjauhari/elementor.php
Create Human Readable Elementor CSS Global Variables
<?php
// START
function elementor_beautify_global_colors_and_typography( $data, \Elementor\Core\Base\Document $document_instance ) {
if ( ! isset( $data['settings']['custom_colors'] ) ) {
return $data;
}
$custom_colors = $data['settings']['custom_colors'];
@dexit
dexit / functions.php
Created June 12, 2024 19:17 — forked from chairmanbrando/functions.php
Remove Elementor's AI prompts, link, and buttons
<?php
add_action('elementor/editor/after_enqueue_scripts', function () {
wp_dequeue_script('elementor-ai');
wp_dequeue_script('elementor-ai-layout');
});