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
bounces = 1; //total number of bounces | |
duration = .5; //duration of each bounce in seconds | |
amp = 1.5; //multiplier for incoming velocity used in bounce | |
decay = 2; //exponential decay of bounce height | |
n=0; | |
if(numKeys>0){n=nearestKey(time).index;if(key(n).time>time){n--;}} | |
n==0?t=0:t=time-key(n).time; | |
freq=1/duration; | |
mult = (bounces-Math.floor(t*freq))/bounces; |
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
transition = 20; | |
if (marker.numKeys<2){ | |
tSecs = transition / ( 1 / thisComp.frameDuration); | |
linear(time, inPoint, inPoint + tSecs, 0, 100) | |
- linear(time, outPoint - tSecs, outPoint, 0, 100) | |
}else{ | |
linear(time, inPoint, marker.key(1).time, 0, 100) | |
- linear(time, marker.key(2).time, outPoint, 0, 100) | |
} |
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
function enable_more_buttons($buttons) { | |
$buttons[] = 'sub , sup'; | |
return $buttons; | |
} | |
add_filter("mce_buttons_2", "enable_more_buttons"); |
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
add_filter('comment_form_default_fields', 'url_filtered'); | |
function url_filtered($fields) | |
{ | |
if(isset($fields['url'])) | |
unset($fields['url']); | |
return $fields; | |
} |
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
//hook loading of new page and edit page screens | |
add_action('load-page-new.php','add_custom_help_page'); | |
add_action('load-page.php','add_custom_help_page'); | |
function add_custom_help_page() { | |
//the contextual help filter | |
add_filter('contextual_help','custom_page_help'); | |
} | |
function custom_page_help($help) { |
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
function toggleFields() { | |
$('.additional-field').hide(); | |
var selected = $('#business-type').val(); | |
switch (selected) { | |
case 1: | |
$('#soletrader').show(); | |
break; | |
case 3: | |
$('#publicsector').show(); |
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
//Remove Admin Bar Items | |
function mytheme_admin_bar_render() { | |
global $wp_admin_bar; | |
// we can remove a menu item, like the Comments link, just by knowing the right $id | |
$wp_admin_bar->remove_menu('comments'); | |
// or we can remove a submenu, like New Link. | |
$wp_admin_bar->remove_menu('new-link', 'new-content'); | |
// we can add a submenu item too | |
$wp_admin_bar->add_menu( array( | |
'parent' => 'new-content', |
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 | |
$images =& get_children( array ( | |
'post_parent' => $post->ID, | |
'post_type' => 'attachment', | |
'post_mime_type' => 'image' | |
)); | |
if ( empty($images) ) { | |
// no attachments here | |
} else { |
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
/* | |
Source Tutorial: http://www.paulund.co.uk/create-wordpress-widget-to-display-twitter-updates | |
*/ | |
define('MAGPIE_CACHE_ON', 1); //2.7 Cache Bug | |
define('MAGPIE_CACHE_AGE', 180); | |
define('MAGPIE_INPUT_ENCODING', 'UTF-8'); | |
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8'); |
NewerOlder