Skip to content

Instantly share code, notes, and snippets.

View anteprimorac's full-sized avatar

Ante Primorac anteprimorac

View GitHub Profile
@dasevilla
dasevilla / github-issue-to-phab-task.py
Created May 6, 2014 23:01
Copy GitHub issues to Phabricator
import json
import os
import requests
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
if GITHUB_TOKEN is None:
raise Exception('Missing GITHUB_TOKEN from os.environ')
@bueltge
bueltge / mlp-site-link-admin-bar.php
Last active June 8, 2018 19:33
MultilingualPress Alternative Title to Admin Bar Site links
<?php
function iti_get_svg_markup( $svg_id = 0 ) {
// get the file name of the svg
$svg_id = absint( $svg_id );
$svg_file = get_post_meta( $svg_id, '_wp_attached_file', true );
// locate the file on disk
$upload_dir = wp_upload_dir();
$upload_basedir = trailingslashit( $upload_dir['basedir'] );