Skip to content

Instantly share code, notes, and snippets.

View lancewillett's full-sized avatar

Lance Willett lancewillett

View GitHub Profile
@lancewillett
lancewillett / gist:6178854
Created August 7, 2013 21:23
P2 fix comment toggle issue, should only be on non-singular pages
Index: p2/inc/js.php
===================================================================
--- p2/inc/js.php (revision 14979)
+++ p2/inc/js.php (working copy)
@@ -271,7 +271,7 @@
$('.commentlist').show();
$('.discussion').hide();
}
- <?php if ( (int) $hide_threads ) : ?>
+ <?php if ( (int) $hide_threads && ! is_singular() ) : ?>
/*
Theme Name: Your Theme Name
Theme URI: Your Theme URL
Author: Your Name
Author URI: Your URL
Description: Describe your theme and its features.
Version: Your Theme's Version Number
License: GNU General Public License
License URI: license.txt
Tags: insert tags to describe your theme to help users search for it. Find the list of tags at: http://wordpress.org/extend/themes/about/
<a href="http://wordpress-trunk:8888/about/clearing-floats/olympus-digital-camera/"><img src="http://wordpress-trunk:8888/wp-content/uploads/2012/07/manhattansummer.jpg" width="640" height="480" alt="OLYMPUS DIGITAL CAMERA" class="wp-image-827 alignnone size-large" /></a>
<video class="wp-video-shortcode" id="video-975-1" width="724" height="360" controls="controls" preload="none"><source type="video/m4v" src="http://wordpress-trunk:8888/wp-content/uploads/2013/03/merge-1.m4v" /><source type="" src="http://wordpress-trunk:8888/?attachment_id=976" /><a href="http://wordpress-trunk:8888/wp-content/uploads/2013/03/merge-1.m4v">http://wordpress-trunk:8888/wp-content/uploads/2013/03/merge-1.m4v</a></video> </div>
function twentythirteen_compat_customizer() {
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '>=' ) )
return;
wp_redirect( '/wp-admin/themes.php' );
}
add_action( 'load-customize.php', 'twentythirteen_compat_customizer' );
<div class="entry-content">
<p>This video is so cool.</p>
<p><iframe width="584" height="329" src="http://www.youtube.com/embed/pAE7mqHWkyg?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
<div class="post-format-content"><a href="http://www.youtube.com/watch?v=MBfjeFr67Ls">www.youtube.com/watch?v=MBfjeFr67Ls</a></div>
</div><!-- .entry-content -->
@lancewillett
lancewillett / gist:3762698
Created September 21, 2012 17:10
List markup example
<ul>
<li>Top List 1</li>
<li>Top List 2, with children
<ul>
<li>Second level, child of Top List 2</li>
<li>And another list item</li>
<li>And a third list item, with children
<ul>
<li>I'm a third-level list item</li>
</ul><!-- Closing third level child list -->
/**
* Loads our special font CSS file.
*
* To override in a childe theme, simply unhook the 'twentytwelve_custom_font_style' action.
*
* @since Twenty Twelve 1.0
*/
function twentytwelve_custom_font_style() {
$protocol = is_ssl() ? 'https' : 'http';
wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", array(), null );
/**
* navigation.js
*
* Handles toggling the navigation menu for small screens.
*/
( function() {
var button = document.getElementById( 'site-navigation' ).getElementsByTagName( 'h3' )[0],
menu = document.getElementById( 'site-navigation' ).getElementsByTagName( 'ul' )[0];
button.onclick = function() {
Index: /p2/style.css
===================================================================
--- /p2/style.css (revision 10382)
+++ /p2/style.css (revision 10384)
@@ -985,7 +985,10 @@
.inlineediting .tags {
float: left;
+ position: relative;
+ z-index: 2;
}