Skip to content

Instantly share code, notes, and snippets.

@nicoboni
nicoboni / functions.php
Last active February 3, 2019 10:51
Wordpress - CSS rules for admin area
//this goes in your functions.php file
<?php //this line is only for the Gist syntax highlight, don't need to put it in your file
function my_admin_styles() {
wp_enqueue_style('admin_styles' , get_stylesheet_directory_uri().'/admin-style.css');
}
add_action('admin_head', 'my_admin_styles');
@nicoboni
nicoboni / php.ini
Created December 16, 2018 13:04
php.ini snippet with cURL timeout setting
; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
default_socket_timeout = 300
@nicoboni
nicoboni / active_tag_description_shortcode.php
Created December 14, 2018 22:36
Wordpress shortcode displaying the active tag description
/*Active tag description shortcode*/
add_shortcode('tag_desc', 'tag_desc_shortcode');
function tag_desc_shortcode( $atts, $content = null ) {
$output .= '<span class="tag_description">'.$description = tag_description().'</span>';
return $output;
}