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
<div class="comments wrapper"> | |
<h4 class="comments__title">Leave a Comment</h4> | |
<ul class="comments__list"> | |
<?php | |
$comments_args = array( | |
'hierarchical' => 'threaded', | |
); | |
$comments = get_comments($comments_args); | |
foreach ($comments as $comment) { ?> | |
<li class="comments__item"> |
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_shortcode('wp_caption', 'fixed_img_caption_shortcode'); | |
add_shortcode('caption', 'fixed_img_caption_shortcode'); | |
function fixed_img_caption_shortcode($attr, $content = null) | |
{ | |
if (!isset($attr['caption'])) { | |
if (preg_match('#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches)) { | |
$content = $matches[1]; | |
$attr['caption'] = trim($matches[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 | |
namespace ElementorPro\Modules\Posts\Skins; | |
use Elementor\Controls_Manager; | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
class Skin_Custom extends Skin_Base { | |
public function get_id() { |
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 strip_entire_image_class($html) { | |
return preg_replace('/ class="(.*)"/', '', $html); | |
} | |
add_filter('get_image_tag', 'strip_entire_image_class', 0, 4); |
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
$('.menu-toggle').on('click', function () { | |
$(this).toggleClass('menu-toggle--on'); | |
$('.header__nav-mobile').toggleClass('header__nav-mobile--on'); | |
$('nav ul').toggleClass('hidden'); | |
}); |
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 trim_title_chars($count, $after) { | |
$title = get_the_title(); | |
if (mb_strlen($title) > $count) $title = mb_substr($title, 0, $count); | |
else $after = ''; | |
echo $title . $after; | |
} |