This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: MultilingualPress Alternative Title to Admin Bar Site links | |
* Plugin URI: https://github.com/inpsyde/multilingual-press | |
* Description: | |
* Author: Inpsyde GmbH | |
* Author URI: http://inpsyde.com | |
* Version: 20.05.2015 | |
* Text Domain: multilingualpress | |
* Domain Path: /languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'] ); |