Skip to content

Instantly share code, notes, and snippets.

View eduard-un's full-sized avatar
🎯
Focusing

Eduard Ungureanu eduard-un

🎯
Focusing
View GitHub Profile
.youtube {
background-color: #000;
margin-bottom: 30px;
position: relative;
padding-top: 56.25%;
overflow: hidden;
cursor: pointer;
}
.youtube img {
width: 100%;
@eduard-un
eduard-un / divi_video_preload.js
Created January 11, 2021 10:48
Js code for preloading Youtube Videos in Divi
( function() {
setTimeout( function() {
var youtube = document.querySelectorAll( ".youtube" );
for ( var i = 0; i < youtube.length; i++ ) {
var source = "https://img.youtube.com/vi/" + youtube[ i ].dataset.embed + "/sddefault.jpg";
var image = new Image();
image.src = source;
{"lastUpload":"2020-07-15T10:02:44.618Z","extensionVersion":"v3.4.3"}
@eduard-un
eduard-un / WordPress.com hosting
Last active November 7, 2017 09:20
WordPress.com hosting
Basically, ET doesn’t recommend using Divi at wp.com yet because third party themes allowance on wodpress.com is relatively new and we’re not sure yet whether our themes runs well on wodpress.com due to:
* We don’t have any idea what the server setting is
* No way to test it yet
* We’re under impression that wp.com has unique setting
* We have test sites on most of hosting service but none of the wodpress.com yet.
We’re also under impression that most user who asked this is actually personal plan-tier, not business plan-tier, customer thus they don’t actually have access to custom themes usage - can you please confirm that you are using the business plan and not the personal plan?
/*
Theme Name: Flexible-Child (by Slava 2.0)
Description: Child theme for the Flexible theme
Template: Flexible
Version: 2.0
Author: Slava
*/
@import url("../Flexible/style.css");
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.css meta.selector</string>
<key>settings</key>
<dict>
</dict>
</dict>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.css meta.selector</string>
<key>settings</key>
<dict>
<key>cancelCompletion</key>
<string>.*</string>
<?php
class ET_Builder_Module_Portfolio extends ET_Builder_Module {
function init() {
$this->name = __( 'Portfolio', 'et_builder' );
$this->slug = 'et_pb_portfolio';
$this->whitelisted_fields = array(
'fullwidth',
'posts_number',
'include_categories',