Skip to content

Instantly share code, notes, and snippets.

👁‍🗨
(-(-_(-_-)_-)-)

Enrique Ballesté Peralta eballeste

👁‍🗨
(-(-_(-_-)_-)-)
Block or report user

Report or block eballeste

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eballeste
eballeste / inline-svg.js
Created May 26, 2015
Replace svg images with inline SVG code
View inline-svg.js
/* Replace all SVG images with inline SVG */
$('img.svg').each(function(){
var $img = $(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
$.get(imgURL, function(data) {
// Get the SVG tag, ignore the rest
var $svg = $(data).find('svg');
@eballeste
eballeste / wp_extra.php
Last active Aug 29, 2015
useful wordpress snippets (replace xx_ with name of project)
View wp_extra.php
/**
*Remove unwanted items from top admin bar
*https://codex.wordpress.org/Plugin_API/Action_Reference/wp_before_admin_bar_render
**/
function xx_remove_admin_bar_links() {
global $wp_admin_bar;
//remove comments from top admin menu
$wp_admin_bar->remove_menu('comments');
//remove wordpress menu from top admin menu
$wp_admin_bar->remove_menu('wporg');
You can’t perform that action at this time.