Skip to content

Instantly share code, notes, and snippets.

View fede-ciliberti's full-sized avatar

Fede Ciliberti fede-ciliberti

View GitHub Profile
@iqbalrony
iqbalrony / custom-css.php
Last active November 22, 2023 11:56
How to add custom css control with elementor free version.
<?php
use Elementor\Controls_Manager;
use Elementor\Element_Base;
use Elementor\Core\Files\CSS\Post;
use Elementor\Core\DynamicTags\Dynamic_CSS;
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
<?php
/**
* Renders content before the blog starts. Using a reusable gutenberg block.
*/
function generate_blog_intro() {
/**
* Make sure we are on the posts page.
*/
if ( is_home() ) {
/**
@Jany-M
Jany-M / WP_flush_cache_and_transients.php
Last active January 20, 2025 12:13
[WordPress] Flush Object Cache (Memcached) & Transients - Admin buttons
<?php
// Flush Cache from Admin bar
function flush_memcache_button() {
global $wp_admin_bar;
// If User isnt even logged in or if admin bar is disabled
if ( !is_user_logged_in() || !is_admin_bar_showing() )
return false;
@korinVR
korinVR / open_url.py
Last active September 9, 2020 21:03
Sublime Text plugin : Open the URL under the cursor
import sublime
import sublime_plugin
import webbrowser
class OpenUrlCommand(sublime_plugin.TextCommand):
def run(self, edit):
s = self.view.sel()[0]
# Expand selection to possible URL