Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
<?php | |
/* | |
Plugin Name: SVG Upload | |
Plugin URI: http://www.lewiscowles.co.uk | |
Description: Super PHP Plugin to add Full SVG Media support to WordPress, I should live in {$webroot}/wp-content/plugins/ folder ;) | |
Author: Lewis Cowles | |
Version: 1.5.2 | |
Author URI: http://www.lewiscowles.co.uk/ | |
*/ | |
namespace lewiscowles\WordPress\Compat\FileTypes; |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
/** | |
* Vertically center Bootstrap 3 modals so they aren't always stuck at the top | |
*/ | |
$(function() { | |
function reposition() { | |
var modal = $(this), | |
dialog = modal.find('.modal-dialog'); |
<?php | |
/** | |
* Hide editor on specific pages. | |
* | |
*/ | |
add_action( 'admin_init', 'hide_editor' ); | |
function hide_editor() { | |
// Get the Post ID. |
<iframe id="forecast_embed" type="text/html" frameborder="0" height="245" width="75%" | |
src="http://forecast.io/embed/#lat=69.649205&lon=18.955324&name=Tromso, Norway&color=#00aaff&font=Helvetica&units=us"> | |
</iframe> |
<?php | |
// This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker | |
// somewhere in your theme. | |
?> | |
<header class="banner navbar navbar-default navbar-static-top" role="banner"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span> |
<?php /** | |
* On the fly image cropping based on WP 3.5 image editor | |
* | |
* @since 1.0 | |
* | |
* @param int $id | |
* @param int $width | |
* @param int $height | |
* @param boolean $crop | |
* @return string |