This file contains 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
//[foobar] | |
function foobar_func( $atts ){ | |
return "foo and bar"; | |
} | |
add_shortcode( 'foobar', 'foobar_func' ); |
This file contains 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 | |
$img_ID = get_field( '_image', $featured->ID ); | |
$img = wp_get_attachment_image_src( $img_ID, 'course-featured' ); ?> | |
<span style="background-image: url( <?php echo $img[0]; ?> );"> </span> |
This file contains 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
# Attempt to load files from production if they're not in our local version | |
# Adapted from: http://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^assets/(.*\.(gif|jpg|png)) http://site.com/assets/$1 [L,R] | |
</IfModule> |
This file contains 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
$video = wp_oembed_get( esc_url( get_post_meta( $post->ID, 'be_video_url', true ) ), array( 'width' => '270' ) ); |
This file contains 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 | |
//Goal to merge $user['CustomFields'] with $customfields. | |
//fields from API | |
$customfields[] = (object) array('Key' => 'Email Lists', 'Value' => 'Events'); | |
$customfields[] = (object) array('Key' => 'Office Affiliation', 'Value' => 'Oxford'); | |
$customfields[] = (object) array('Key' => 'Office Affiliation', 'Value' => 'San Francisco'); | |
//fields from form |
This file contains 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 | |
$array_name[0] = 'Keith Pelczarski'; | |
$array_name[1] = 'Heather Harding'; | |
$array_bio[0] = 'keith bio'; | |
$array_bio[1] = 'heather bio'; | |
$array_photo[0] = 'url/to/imag.jpg'; |
This file contains 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
#!/bin/bash | |
# | |
# post-update hook for Hub git repo | |
# http://stackoverflow.com/questions/5753346/git-automatically-push-to-dev-and-production-from-central-repository-depending-o?rq=1 | |
# post-update only receives refname | |
# TODO: adjust for post-update ref, and cd to Prime and pull | |
# | |
livepath="/path/to/your/live" | |
devpath="/path/to/your/dev" | |
while read oldrev newrev ref |
This file contains 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
# ############################################################################## | |
# # INTERNET EXPLORER # | |
# ############################################################################## | |
# ------------------------------------------------------------------------------ | |
# | Better website experience | | |
# ------------------------------------------------------------------------------ | |
# Force IE to render pages in the highest available mode in the various | |
# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf. |
This file contains 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
white-space: pre-line; /* CSS 3.0 */ | |
white-space: -pre-wrap; /* Opera 4-6 */ | |
white-space: -o-pre-wrap; /* Opera 7 */ | |
white-space: -moz-pre-wrap; /* Mozilla */ | |
white-space: -hp-pre-wrap; /* HP Printers */ | |
word-wrap: break-word; /* IE 5+ */ |
This file contains 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 | |
// cache bust, register, and enqueue main stylesheet | |
$cache_bust = '?'.filemtime( get_stylesheet_directory() . '/css/style.css'); | |
wp_register_style( 'main-stylesheet', get_stylesheet_directory_uri() . '/css/style.css'.$cache_bust, array(), '', 'all' ); | |
wp_enqueue_style( 'main-stylesheet' ); |