Skip to content

Instantly share code, notes, and snippets.

View karamansky's full-sized avatar
🏠
Working from home

Stas karamansky

🏠
Working from home
View GitHub Profile
<div class="block-reviews2__items">
<?php $i=1; foreach ($reviews as $review) {
if ( $i === 1 || ( $i - 1 ) % 2 === 0 ) {
echo '<div class="block-reviews2__slide flex flex-wrap">';
}
?>
<div class="block-reviews__item w-[calc(100%/2-40px)] md:w-full">
<div class="block-reviews__heading flex mb-[16px] md:mb-[12px]">
{% if template == 'index' %}
{% endif %}
public static function prepareSubtitleItemsForAutomaticBreadcrumbs() {
global $post;
//default first breadcrumb
if( !is_front_page() ) {
$subtitle_items[] = [
'url' => get_home_url(),
'title' => __( 'Home', 'hayes' )
];
}
/**
* Add class to first word in text-block/tag by class '.styling-first-word'
*/
function addClassToFirstWord() {
let first_word_class = 'first-word';
let el = jQuery('.styling-first-word');
el.each(function(){
let string = jQuery(this).html();
let first_word = string.split(" ");
.team-partners__items[style*="display: block"]{
display:flex!important;
}
overflow: hidden;
text-overflow: ellipsis;
display: -moz-box;
-moz-box-orient: vertical;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-clamp: 2;
box-orient: vertical;
//remove 'Archive:' from archive title
add_filter( 'get_the_archive_title', function( $title ){
return preg_replace('~^[^:]+: ~', '', $title );
});
function blg_current_location()
{
if (isset($_SERVER['HTTPS']) &&
($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ||
isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
$protocol = 'https://';
} else {
$protocol = 'http://';
}
// reference the Dompdf namespace
use Dompdf\Dompdf;
use Dompdf\Options;
$text_data = [
'<p><b>Analyst:</b> <span>SEAN WIELAND</span> (PIPER SANDLER)</p>',
'<p><b>The Stock:</b> <span>CHNG</span> (Change Healthcare Inc)</p>',
'<p><b>Price Target Change:</b> $494->$549 = $55 (11.13%)</p>',
'<p><b>Average Time For PT To Be Met:</b> 251</p>',
'<p><b>Potential Upside Change:</b> $109.6->$164.6; 198%->133%</p>',
public static function anaCreateImgFromText( $string, $image_random_name = 'tmp_name' ){
// set charset
mb_internal_encoding("UTF-8");
$content = "";
$font = get_stylesheet_directory() . "/assets/fonts/Lato/regular.ttf";
// text width
$width = 540;
//font size
$size = 16;