This file contains hidden or 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
if ( ! function_exists( 'atmosphere_posted_on' ) ) : | |
/** | |
* Prints HTML with meta information for the current post-date/time and author. | |
*/ | |
function atmosphere_posted_on() { | |
global $post; | |
$author_id = $post->post_author; | |
$author = get_the_author_meta('display_name', $author_id); | |
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; | |
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { |
This file contains hidden or 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 | |
/* Pull apart OEmbed video link to get thumbnails out*/ | |
function get_video_thumbnail_uri( $video_uri ) { | |
$thumbnail_uri = ''; | |
// determine the type of video and the video id | |
$video = parse_video_uri( $video_uri ); | |
// get youtube thumbnail |
This file contains hidden or 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
'use strict'; | |
// TODO: better timing and size informations | |
// TODO: add sass sourcemaps | |
// TODO: bower wiredep | |
var gulp = require('gulp'); | |
var del = require('del'); | |
var $$ = require('gulp-load-plugins')(); |
This file contains hidden or 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
<!--Referenced from https://css-tricks.com/snippets/php/automatic-copyright-year/--> | |
<!--Start date with error protection--> | |
<?php function auto_copyright($year = 'auto'){ ?> | |
<?php if(intval($year) == 'auto'){ $year = date('Y'); } ?> | |
<?php if(intval($year) == date('Y')){ echo intval($year); } ?> | |
<?php if(intval($year) < date('Y')){ echo intval($year) . ' - ' . date('Y'); } ?> | |
<?php if(intval($year) > date('Y')){ echo date('Y'); } ?> | |
<?php } ?> |
This file contains hidden or 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 | |
global $woocommerce; | |
// Extra post classes | |
$classes = array(); | |
if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns'] ) | |
$classes[] = 'first'; | |
if ( 0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns'] ) | |
$classes[] = 'last'; | |
// If item is in cart add this class | |
foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) { |
This file contains hidden or 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
// Display additional data in admin columns for testimonials section | |
function my_testimonials_columns($columns) | |
{ | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'title' => 'Title', | |
'testimonialType' => 'Testimonial Type', | |
'videoID' => 'Video ID', | |
'author' => 'Author', | |
'date' => 'Date', |
This file contains hidden or 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
// Includes toggle select for either youtube/vimeo | |
// using foundation 5 (modal, block grid) | |
<ul class="small-block-grid-1 medium-block-grid-3"> | |
<?php | |
if ( have_rows( 'academy_video_box' ) ) : | |
while ( have_rows( 'academy_video_box' ) ) : the_row(); | |
$type = get_sub_field( 'academy_box_video_toggle' ); | |
$video_id = get_sub_field('academy_box_video_id'); | |
if( $type === 'youtube' ): ?> |
This file contains hidden or 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
/** | |
* returns taxonomy lists that have children with checkboxes | |
* | |
*/ | |
function get_subject_list($taxonomy){ | |
// Sets the taxonomy to pull a list of terms from. | |
// Throws them into a nifty object for referencing and counting | |
$terms = get_terms($taxonomy,array('parent' => 0)); | |
if ($terms) { |
This file contains hidden or 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
// Custom Dashboard widgets | |
function custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); | |
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); |
NewerOlder