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
jQuery(window).load(function(){ | |
var scroll_array = window.location.hash.split('/', 2); | |
if(scroll_array[0] === '#!showcomment') | |
window.scroll(0,jQuery('#div-comment-'+scroll_array[1]).offset().top - 100); | |
jQuery('#div-comment-'+scroll_array[1]).css('background-color', '#F5A9A9'); | |
}); |
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
jQuery('.switch-to-fb-comments').live('click', function(){ | |
window.wp_comm_form = jQuery('#respond').html(); | |
jQuery('#facebook_comments').remove(); | |
jQuery('#respond').html('<a href="#" class="switch-to-wp-comments">Switch to WP</a><fb:comments id="facebook_comments" href="url_to_comment"></fb:comments>'); | |
fbAsyncInit(); | |
event.preventDefault(); | |
}); | |
jQuery('.switch-to-wp-comments').live('click', function(){ | |
jQuery('#respond').html(window.wp_comm_form); | |
event.preventDefault(); |
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
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" | |
xmlns:fb="https://www.facebook.com/2008/fbml"> | |
<head prefix="og: http://ogp.me/ns# brandwaffel: | |
http://ogp.me/ns/apps/brandwaffel#"> | |
<meta property="fb:app_id" content="164019983683858" /> | |
<meta property="og:type" content="brandwaffel:the_noid" /> | |
<meta property="og:title" content="the Noid" /> | |
<meta property="og:image" content="http://brandwaffle.info/facebook/noid.gif" /> | |
<meta property="og:description" content="Can you do it?" /> |
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
Index: inc/js.php | |
=================================================================== | |
--- inc/js.php (revision 18733) | |
+++ inc/js.php (working copy) | |
@@ -239,26 +239,26 @@ | |
<script type="text/javascript"> | |
/* <![CDATA[ */ | |
- jQuery(document).ready( function() { | |
+ jQuery(document).ready( function($) { |
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 | |
function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) { | |
global $wp_scripts; | |
if ( !is_a($wp_scripts, 'WP_Scripts') ) | |
$wp_scripts = new WP_Scripts(); | |
if ( $src ) { | |
$_handle = explode('?', $handle); | |
$wp_scripts->add( $_handle[0], $src, $deps, $ver ); |
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
Index: functions.wp-scripts.php | |
=================================================================== | |
--- functions.wp-scripts.php (revision 20792) | |
+++ functions.wp-scripts.php (working copy) | |
@@ -131,6 +131,11 @@ | |
$wp_scripts = new WP_Scripts(); | |
} | |
+ //if a single param is passed as the dependency, convert to an array so WP_Dependencies won't convert | |
+ //it to an empty array |
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
Index: class.wp-dependencies.php | |
=================================================================== | |
--- class.wp-dependencies.php (revision 20792) | |
+++ class.wp-dependencies.php (working copy) | |
@@ -245,7 +245,9 @@ | |
function __construct() { | |
@list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args(); | |
- if ( !is_array($this->deps) ) | |
+ if ( is_string( $this->deps ) ) |
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
//based on and borrowing heavily from http://tdanemar.wordpress.com/2010/01/19/global-events-with-jquery/ | |
//define an addAction plugin method that will store the event in a single container object (WP.eventHolder) | |
//so that it doesn't pollute the global space, but we can still access it in a 'global' way | |
$.fn.addAction = function(eventName, func) { | |
$(WP.eventHolder).bind(eventName, this, function(e) { func.call(e.data); | |
}); | |
//add an action that will fire when the addFeaturedPost WP event fires | |
$('.featured-post').addAction('WP.eventTriggers.addFeaturedPost', function(e){ |
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
document.getElementsByTagName('table')[0].className = "timesheet_summary invoice_dashboard sortable"; | |
/* | |
SortTable | |
version 2 | |
7th April 2007 | |
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ | |
Instructions: | |
Download this file | |
Add <script src="sorttable.js"></script> to your HTML |
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
javascript:(function()%7Bfunction callback()%7Bdocument.getElementsByTagName('table')%5B0%5D.className %3D "timesheet_summary invoice_dashboard sortable"%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D"https%3A%2F%2Fcdn.jsdelivr.net%2Fsorttable%2F2%2Fsorttable.min.js"%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)() |
OlderNewer