Skip to content

Instantly share code, notes, and snippets.

View aschweigert's full-sized avatar

Adam Schweigert aschweigert

View GitHub Profile
if ( ! function_exists( 'largo_opengraph' ) ) {
function largo_opengraph() {
global $current_url, $post;
// set a default thumbnail, if a post has a featured image use that instead
if ( is_single() && has_post_thumbnail( $post->ID ) ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' );
$thumbnailURL = $image[0];
} else if ( of_get_option( 'logo_thumbnail_sq' ) ) {
@aschweigert
aschweigert / functions.php
Created July 18, 2012 18:25 — forked from johnmegahan/functions.php
Extended Walker class for use with the Twitter Bootstrap toolkit Dropdown menus in Wordpress. (adds support for second level dropdowns)
<?php
add_action( 'after_setup_theme', 'bootstrap_setup' );
if ( ! function_exists( 'bootstrap_setup' ) ):
function bootstrap_setup(){
add_action( 'init', 'register_menu' );