This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Modify Spacer Widget to wrap an anchor tag around it | |
* | |
* 1) Add url control to spacer widget for loading w/ a link | |
* | |
* 2) Use 'elementor/widget/render_content' action hook to update the spacer widget's | |
* normal output on the front end | |
* | |
**/ | |
//part 1. to add our url control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nav = false; | |
const menu_close = () => { | |
//elementorProFrontend.modules.popup.closePopup( { id: 191 } ); | |
elementorFrontend.documentsManager.documents[191].getModal().hide(); | |
nav = false; | |
//console.log('menu closed!'); | |
} | |
const menu_open = () => { | |
//elementorProFrontend.modules.popup.showPopup( { id: 191 } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body.admin-bar { | |
position: relative; | |
top: -32px; | |
} | |
div#wpadminbar { | |
transition: top 300ms ease-in-out; | |
top: -32px; | |
} | |
div#wpadminbar:hover, | |
body.f1 div#wpadminbar /* see f1-toggle.js */ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Title: Scroll Top | |
Type: elementor_snippet | |
Author: Website Admin | |
Last edited: 2021-04-02 18:07:14 | |
Note: This was added by Elementor, just copy script code below. | |
Instructions: Add to any site or via Elementor Custom Code feature (Body -> End), | |
then use "up" as the id of the trigger element in your design | |
--- The comment is visible only for administrators --- | |
--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*** | |
* Add to custom plugins or functions.php (i.e. use include) | |
* Allows for custom patterns like: https://www.html5pattern.com/ | |
* See Git issue: https://github.com/elementor/elementor/issues/8587 | |
*/ | |
namespace ElementorPro\Modules\Forms\Classes; | |
use Elementor\Repeater; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* add url control to star rating widget | |
**/ | |
add_action( 'elementor/element/star-rating/section_rating/before_section_end', function( $element, $args ) { | |
$element->add_control( | |
'rating_url', | |
[ | |
'type' => \Elementor\Controls_Manager::URL, | |
'label' => __( 'Link', 'elementor' ), | |
'placeholder' => __( 'https://your-link.com', 'elementor' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Shortcode to output custom Jump-To Recipe button by Create | |
function custom_mvcreate_jumpbutton_func(){ | |
$post_id = get_the_ID(); | |
if( ! function_exists( 'mv_get_post_creations' ) ) | |
return; | |
$recipes = mv_get_post_creations( $post_id ); | |
if( empty( $recipes ) ) | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* add custom widget to switch city page map preferences | |
* | |
* Simply performs an audit on City Pages to check if | |
* the preference is to output custom code or use the | |
* automatic map search by city name | |
* | |
*************************************/ | |
class Custom_City_Map_Widget extends WP_Widget { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'elementor/widget/render_content', function( $content, $widget ) { | |
if ( 'form' === $widget->get_name() ) { | |
$content = preg_replace('/(<[^>]+) name=".*?"/i', '$1', $content); | |
} | |
return $content; | |
}, 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'elementor/widget/render_content', function( $content, $widget ) { | |
if ( 'html' === $widget->get_name() ) { | |
$settings = $widget->get_settings(); //contains all widget settings - read-only! | |
//checks if special id exists | |
if ( ! empty( $settings['_element_id'] ) && $settings['_element_id'] === 'html_notice' ) { | |
$content .= '<div class="disclaimer_notice"><span>Copy and use of the above code is at your own risk.</span></div>'; | |
} | |
} |