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
// Define Style Margin - Padding | |
.marginAndPadding(@iterations) | |
{ | |
.p0 {padding: 0px;} | |
.pT0{padding-top: 0px;} | |
.pR0{padding-right: 0px;} | |
.pB0{padding-bottom: 0px;} | |
.pL0{padding-left: 0px;} | |
.m0 {margin: 0px;} |
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
function put_attachment_image($atts) { | |
$atts = shortcode_atts( | |
array( | |
'id' => '1', | |
'title' => get_the_title($atts['id']), | |
'alt' => get_the_title($atts['id']), | |
'class' => '', | |
'size' => 'full', | |
), $atts | |
); |
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 | |
if ( !function_exists( 'ch_hide_column_elementor_controls' ) ) { | |
add_action( 'elementor/element/before_section_end' , 'ch_hide_column_elementor_controls', 10, 3 ); | |
function ch_hide_column_elementor_controls( $section, $section_id, $args ) { | |
if( $section_id == 'section_advanced' ) : | |
$section->add_control( | |
'hide_desktop_column', | |
[ | |
'label' => __( 'Hide On Desktop', '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
<?php | |
add_action( 'wp_print_styles', 'dequeue_font_awesome_style' ); | |
function dequeue_font_awesome_style() { | |
wp_dequeue_style( 'font-awesome' ); | |
wp_deregister_style( 'font-awesome' ); | |
} | |
?> |
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 ) { | |
$settings = $widget->get_settings(); | |
if (strpos($settings['_css_classes'],"lineawesome")!==false) { | |
$content= str_replace('fa', 'la', $content); | |
} |
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 ('theme-post-featured-image' === $widget->get_name()) { | |
$settings = $widget->get_settings(); | |
$caption=get_the_post_thumbnail_caption(get_the_ID()); | |
$content .= '<figcaption class="widget-image-caption wp-caption-text">' . $caption . '</figcaption>'; | |
} |
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 Image Stretch Option Control to the Image Gallery Widget */ | |
add_action( 'elementor/element/before_section_end', function( $element, $section_id, $args ) { | |
/** @var \Elementor\Element_Base $element */ | |
if ( 'image-gallery' === $element->get_name() && 'section_gallery' === $section_id ) { | |
$element->add_control( | |
'image_stretch', | |
[ | |
'label' => __( 'Image Stretch', 'elementor' ), | |
'type' => \Elementor\Controls_Manager::SELECT, |
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/element/before_section_end', function( $element, $section_id, $args ) { | |
/** @var \Elementor\Element_Base $element */ | |
if ('theme-post-featured-image' === $element->get_name()) { | |
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
/** | |
* Schema.org addtions for better SEO | |
* @param string Type of the element | |
* @return string HTML Attribute | |
*/ | |
function get_schema_markup($type, $echo = false) { | |
if (empty($type)) return false; | |
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_filter('get_avatar_url', function( $url, $id_or_email, $args ) { | |
if (is_email($id_or_email)) { | |
$user = get_user_by('email', $id_or_email); | |
$user_id = $user->ID; | |
} else { | |
$user_id = $id_or_email; | |
} | |
if (has_wp_user_avatar($user_id)) { | |
return get_wp_user_avatar_src($user_id, 'writer-avatar'); |
OlderNewer