Skip to content

Instantly share code, notes, and snippets.

@danielortiz
danielortiz / designer.html
Last active August 29, 2015 14:27
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@danielortiz
danielortiz / WP Share icons with Font awesome
Created August 14, 2014 02:10
Displays share icons in WordPress using Font Awesome that open on pop ups
if( ! function_exists('prefix_share_icons')):
/**
* Display share icons
*/
function prefix_share_icons(){
$share_string = '<a class="share-icon" href="%1$s" title="' . '%2$s' . '" onclick="%3$s">%4$s<span class="hidden">%2$s</span></a>' ;
$share_facebook = sprintf($share_string,
'https://www.facebook.com/sharer/sharer.php?u=' . get_the_permalink() ,
_x('Share on Facebook', 'mytextdomain') ,
@danielortiz
danielortiz / WP Post Format icon with Font Awesome
Created August 12, 2014 21:00
Prints Post Format icon using Font Awesome in WordPress
if ( ! function_exists( 'prefix_post_format_icon' ) ) :
/**
* Prints HTML with meta information for the current post format using Font Awesome.
*/
function prefix_post_format_icon(){
$icon_string = '<span class="format-icon"><i class="fa %1$s"></i></span>';
if(is_sticky()){
$format_icon_class = 'fa-thumb-tack';
}else{
switch (get_post_format()) {
@danielortiz
danielortiz / WordPress Header Image as Header Background
Last active August 29, 2015 14:05
displays header_image as header background
if ( ! function_exists( 'prefix_display_header_img' ) ) :
/**
* Displays header_image as header background
* Change 'prefix' to your theme's prefix
* It's ready to be used with _s class '.site-header'
* @see prefix_display_header_img().
*/
function prefix_display_header_img(){
if ( get_header_image() ){
$image = esc_url(get_header_image());