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
function remove_jetpack_styles(){ | |
wp_deregister_style('AtD_style'); // After the Deadline | |
wp_deregister_style('jetpack-carousel'); // Carousel | |
wp_deregister_style('jetpack-slideshow'); // Jetpack Slideshow | |
wp_deregister_style('grunion.css'); // Grunion contact form | |
wp_deregister_style('the-neverending-homepage'); // Infinite Scroll | |
wp_deregister_style('infinity-twentyten'); // Infinite Scroll - Twentyten Theme | |
wp_deregister_style('infinity-twentyeleven'); // Infinite Scroll - Twentyeleven Theme | |
wp_deregister_style('infinity-twentytwelve'); // Infinite Scroll - Twentytwelve Theme | |
wp_deregister_style('noticons'); // Notes |
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 | |
$rss = new DOMDocument(); | |
$rss->load('http://wordpress.org/news/feed/'); | |
$feed = array(); | |
foreach ($rss->getElementsByTagName('item') as $node) { | |
$item = array ( | |
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, | |
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, | |
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, | |
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, |
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
require 'rubygems' | |
require 'mechanize' | |
agent = Mechanize.new | |
agent.set_proxy '78.186.178.153', 8080 | |
page = agent.get('http://www.google.com/') | |
google_form = page.form('f') | |
google_form.q = 'new york city council' |
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
<?phpfunction override_video_dimensions( $out, $pairs, $atts ) { | |
$out['width'] = '768'; $out['height'] = '583'; | |
return $out; | |
} | |
add_filter( 'shortcode_atts_video', 'override_video_dimensions', 10, 3 );?> |
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
$(document).ready(function () { | |
WebFontConfig = { | |
google: { | |
families: ['Chivo'] | |
}, | |
active: function() { | |
$('#archive').imagesLoaded(function(){ | |
$('#archive').masonry({ | |
itemSelector : '.item', |
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
// To disable the auto-activation of Jetpack's Widget Visibility module: | |
add_filter( 'jetpack_get_default_modules', 'disable_jetpack_widget_visibility_autoactivate' ); | |
function disable_jetpack_widget_visibility_autoactivate( $modules ) { | |
return array_diff( $modules, array( 'widget-visibility' ) ); | |
} | |
// Or, to disable the functionality in your own plugin if the user activates it in Jetpack: | |
if ( ! class_exists( 'Jetpack' ) || ! Jetpack::is_module_active( 'widget-visibility' ) ) { | |
// It's not there, do as you like! | |
} |
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
add_filter( 'publicize_checkbox_default', '__return_false' ); |
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
function jeherve_custom_image( $media, $post_id, $args ) { | |
if ( empty( $media ) ) { | |
$permalink = get_permalink( $post_id ); | |
$url = apply_filters( 'jetpack_photon_url', 'YOUR_LOGO_IMG_URL' ); | |
return array( array( | |
'type' => 'image', | |
'from' => 'custom_fallback', | |
'src' => esc_url( $url ), | |
'href' => $permalink, |
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
jQuery(document).ready(function($) { | |
//capture ipad device change | |
function doOnOrientationChange() | |
{ | |
switch(window.orientation) | |
{ | |
case -90: | |
case 90: | |
alert('landscape'); //debug | |
////add class to assist with libraries like Modernizr |
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
var body = document.getElementsByTagName("body")[0]; | |
var script = document.createElement('script'); | |
script.type = "text/javascript"; | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"; | |
body.appendChild(script); |
NewerOlder