Skip to content

Instantly share code, notes, and snippets.

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

Eduard Ungureanu eduard-ungureanu

🎯
Focusing
View GitHub Profile
@eduard-ungureanu
eduard-ungureanu / Blog.php
Created November 10, 2023 11:23
Custom Blog module with Social Icons (Social Share by Supsystic plugin)
<?php
get_template_part( '/includes/builder/module/helpers/Overlay.php' );
class custom_ET_Builder_Module_Blog extends ET_Builder_Module_Type_PostBased {
/**
* Track if the module is currently rendering to prevent unnecessary rendering and recursion.
*
* @var bool
*/
@eduard-ungureanu
eduard-ungureanu / test.php
Created October 12, 2023 13:42
This is a simple PHP code
<?php
echo "hello world;
?>
@eduard-ungureanu
eduard-ungureanu / custom_functions.php
Created October 6, 2023 07:10
Update the PHP code to solve the get_page_by_title deprecation
<?php
// Prevent file from being loaded directly
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
add_theme_support( 'custom-background', apply_filters( 'et_custom_background_args', array() ) );
if ( function_exists( 'add_post_type_support' ) ) {
@eduard-ungureanu
eduard-ungureanu / code.html
Created May 9, 2023 08:45
Custom HTML Code
<div>
<div class="tab">
<button class="tablinks active" onclick="openPart(event, 'FRONT-UPPER')" id="defaultOpen">FRONT - UPPER</button>
<button class="tablinks" onclick="openPart(event, 'FRONT-LOWER')">FRONT - LOWER</button>
<button class="tablinks" onclick="openPart(event, 'DOOR-UPPER')">DOOR - UPPER</button>
<button class="tablinks" onclick="openPart(event, 'DOOR-LOWER')">DOOR - LOWER</button>
<button class="tablinks" onclick="openPart(event, 'SIDE-BEHIND-DOOR')">SIDE BEHIND DOOR</button>
<button class="tablinks" onclick="openPart(event, 'BACKLIGHT')">BACKLIGHT</button>
<button class="tablinks" onclick="openPart(event, 'RIGHTHAND-FRONT-SLIDER')">RIGHTHAND - FRONT - SLIDER</button>
<button class="tablinks" onclick="openPart(event, 'RIGHTHAND-REAR-SLIDER')">RIGHTHAND - REAR - SLIDER</button>
@eduard-ungureanu
eduard-ungureanu / old-code.css
Created May 3, 2023 12:21
Katalin Balogh old CSS Code
.uppercase {
text-transform: uppercase;
}
@media all and (mnin-width:981px) {
#page-container .logo_container {
position: relative;
}
#page-container div#et-top-navigation {
@eduard-ungureanu
eduard-ungureanu / reset-monarch.css
Created March 7, 2023 11:41
Override Divi Builder's CSS reset for Monarch Sharing icons - inline
.et-db #et-boc .et-l .et_social_inline .et_social_inline_top {
margin-bottom: 40px;
}
.et-db #et-boc .et-l .et_social_inline .et_social_left {
text-align: left;
}
.et-db #et-boc .et-l .et_social_inline .et_social_networks {
width: 100%;
@eduard-ungureanu
eduard-ungureanu / clear-presets-history.php
Created February 13, 2023 10:46
Clear Divi's Presets History
<?
add_action('after_setup_theme', function(){
if ( isset( $_GET['delete_global_presets'] ) ) {
delete_option( 'et_divi_builder_global_presets_history_ng' );
delete_option( 'et_divi_builder_global_presets_ng' );
die('Global Presets Deleted! :diviboom:');
}
}, 100);
<script>
(function($) {
$(document).ready(function(){
$('.et-show-more-toggle').on('click', function(e) {
e.preventDefault();
$(e.target).closest('.et-show-more-container').children('.et-show-more-content').slideToggle("300");
$(this).toggleClass('et-show-more-toggle_active');
if ($(this).hasClass('et-show-more-toggle_active')) {
$(this).text('Show Less');
} else {
1:d83:{s:39:"static_css_custom_css_safety_check_done";b:1;s:23:"2_5_flush_rewrite_rules";s:4:"done";s:30:"et_flush_rewrite_rules_library";s:6:"4.19.2";s:31:"divi_previous_installed_version";s:6:"4.19.1";s:29:"divi_latest_installed_version";s:6:"4.19.2";s:27:"divi_skip_font_subset_force";b:1;s:27:"et_pb_clear_templates_cache";b:1;s:23:"builder_custom_defaults";O:8:"stdClass":0:{}s:33:"customizer_settings_migrated_flag";b:1;s:34:"builder_custom_defaults_unmigrated";b:0;s:40:"divi_email_provider_credentials_migrated";b:1;s:22:"builder_global_presets";O:8:"stdClass":0:{}s:29:"custom_defaults_migrated_flag";b:1;s:15:"divi_1_3_images";s:7:"checked";s:21:"et_pb_layouts_updated";b:1;s:30:"library_removed_legacy_layouts";b:1;s:30:"divi_2_4_documentation_message";s:9:"triggered";s:9:"divi_logo";s:95:"https://d1bkyw59exdwu5.cloudfront.net/wp-content/uploads/2022/10/24203402/bestpicks.com_300.png";s:14:"divi_fixed_nav";s:2:"on";s:26:"divi_gallery_layout_enable";s:5:"false";s:18:"divi_color_palette";s:63:"#000000|#ffffff|
@eduard-ungureanu
eduard-ungureanu / CSS.css
Last active November 3, 2022 13:24
Custom CSS For Hana's custom product template
@media (min-width: 981px) {
body {
--custom-height: 100vh;
--menu-height: 68.5px;
--buttons-wrapper-height: 35px;
}
}
@media (max-width: 980px) {
body {