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('h1.widget-title').each(function(i) { | |
var new_heading = jQuery('<h3></h3>').append(jQuery(this).contents()); | |
new_heading.attr('id', jQuery(this).attr('id')); | |
new_heading.attr('class', jQuery(this).attr('class')); | |
jQuery(this).replaceWith(new_heading); | |
}) | |
jQuery('body.home #content h1.entry-title').each(function(i) { | |
var new_heading = jQuery('<h2></h2>').append(jQuery(this).contents()); | |
new_heading.attr('id', jQuery(this).attr('id')); |
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 | |
function pg_test_dk( $reply_url, $redirect_to, $reply_id ) { | |
error_log('redirecting: ' . print_r(compact($reply_url, $redirect_to, $reply_id), true)); | |
} | |
add_filter( 'bbp_new_reply_redirect_to', 'pg_test_dk', 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
<?php | |
function x_allow_ids_on_tags() { | |
global $allowedposttags; | |
$tags = array( 'section', 'article' ); | |
$new_attributes = array( 'id' => array() ); | |
foreach ( $tags as $tag ) { | |
if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) | |
$allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes ); |
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
[dpa-achievements-index] | |
[dpa-single-achievement 1] | |
[dpa-breadcrumb] |
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
// very rough, basic javascript calls to use the W3 Web Notifications api, rather than all the webkitNotifications stuff which you find in google. | |
(function($) { | |
$(document).ready(function() { | |
// Ask for permission | |
$('#ask_permission').click(function(e) { | |
e.preventDefault(); | |
// webkitNotifications.requestPermission(function(){}); // use this for safari / w3 standards | |
// window.Notification.requestPermission(function(e) { alert(e); }); // use this for chrome (w3 standard causes a crash) |
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 | |
/* | |
Plugin Name: Plugin Name | |
Plugin URI: http://example.com/ | |
Description: Description | |
Version: 0.1 | |
Author: Your Name | |
Author URI: http://example.com/ | |
*/ |
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 | |
$site_name = 'news_blog'; // e.g. "example.com/news_blog" | |
$site_domain = 'example.com'; | |
/** | |
* Construct a fake $_SERVER global to get WordPress to load a specific site. | |
* This avoids alot of messing about with switch_to_blog() and all its pitfalls. | |
*/ | |
$_SERVER = array( | |
'HTTP_HOST' => $site_domain, |
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
http://wordpress.org/grav-redirect.php?user=DJPaul&s=100 -> http://0.gravatar.com/avatar/3bc9ab796299d67ce83dceb9554f75df?d=retro&s=100 |
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 | |
// include this near the top of your plugin file | |
$my_plugin_file = __FILE__; | |
if (isset($plugin)) { | |
$my_plugin_file = $plugin; | |
} | |
else if (isset($mu_plugin)) { |
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
nyt: | |
<meta name="twitter:card" value="summary"> | |
<meta name="twitter:site" value="@nytimes"> | |
<meta name="twitter:creator" value="@markoff"> | |
wsj: | |
<meta name="twitter:player:width" value="512" /> | |
<meta name="twitter:player:height" value="363" /> | |
<meta name="twitter:card" value="player" /> | |
<meta name="twitter:site" value="@WSJ" /> |