The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
/* Trying to get the theme customizer to accept SVG, no luck.... */ | |
// add svg support for media uploader | |
function cc_mime_types( $mimes ){ | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter( 'upload_mimes', 'cc_mime_types' ); |
/* | |
* Lists out the handles for all enqueued styles and scripts. | |
* Credit: http://wordpress.stackexchange.com/questions/54064/how-do-i-get-the-handle-for-all-enqueued-scripts | |
*/ | |
function wp_inspect_scripts() { | |
global $wp_scripts; | |
echo '<pre><h1>Script Handles</h1><ul>'; | |
foreach( $wp_scripts->queue as $handle ) : | |
echo '<li>' . $handle . '</li>'; |
<?php | |
/** | |
* Output Post Format icons | |
* | |
* Outputs an icon for each post format. Set up to use Fontawesome, | |
* but can be used with anything, or you can just use CSS. | |
* | |
* @return string | |
*/ | |
function post_format_icon() { |
<?php | |
/** | |
* oEmbed Attributes | |
* | |
* Add parameters to oEmbed query string. Useful for | |
* turning off related videos and such. | |
* | |
* Basic field use: $video = videoLink('your_field_name'); | |
* Add second param if in a repeater: $video - videoLink('your_subfield_name', true); | |
* |
<?php | |
namespace App; | |
// Add to functions, or to a dedicated controllers file | |
// Needs a global body class to hook into | |
/** | |
* Navigation arguments | |
* |
<?php | |
/* | |
* Synced sliders, | |
* | |
* See the synced sliders example at http://kenwheeler.github.io/slick/ | |
*/ | |
// Make sure there's stuff to display | |
if ( have_rows( 'add_testimonials' ) ) : |
@php(the_content()) | |
@if($images) | |
@include('partials/slider') | |
@endif |
SHORTCUT="[Desktop Entry] | |
Name=Sublime Text 3 | |
Comment=Edit text files | |
Exec=/opt/sublime-text-3/sublime_text | |
Icon=/opt/sublime-text-3/Icon/128x128/sublime-text.png | |
Terminal=false | |
Type=Application | |
Encoding=UTF-8 | |
Categories=Utility;TextEditor;" |
SHORTCUT="[Desktop Entry] | |
Name=SimpleNote | |
Comment=Edit text files | |
Exec=/opt/Simplenote-linux-x64/Simplenote | |
Icon=/opt/Simplenote-linux-x64/Simplenote.png | |
Terminal=false | |
Type=Application | |
Encoding=UTF-8 | |
Categories=Utility;TextEditor;" |