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 | |
/* | |
Template Name: Redirect To First Child | |
*/ | |
if (have_posts()) { | |
while (have_posts()) { | |
the_post(); | |
$pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order"); | |
$firstchild = $pagekids[0]; | |
wp_redirect(get_permalink($firstchild->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
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
wp_redirect(get_permalink()); | |
endwhile; | |
endif; |
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
// will take the alt tags from all input fields and make it the default text | |
// default text will disappear on focus and reappear on blur if field is blank | |
$('input').each(function(){ | |
if(this.alt){ | |
this.value=this.alt; | |
this.onfocus=function(){if(this.value==this.alt)this.value=''} | |
this.onblur=function(){if(this.value=='')this.value=this.alt} | |
} | |
}); |
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 isMSIE = /*@cc_on!@*/0; if (isMSIE) { // do IE-specific things | |
} else { // do non IE-specific things | |
} |
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
// Replace source | |
$('img').error(function(){ $(this).attr('src', 'missing.png'); | |
}); // Or, hide them | |
$("img").error(function(){ $(this).hide(); | |
}); |
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
<? if ( !is_user_logged_in() && (DEVENV != 'on') ): ?> | |
<div id="header-login-text"> | |
<? if ( bp_get_signup_allowed() ) : ?> | |
<? printf( __( '<a class="create-account" href="%s" title="Create an account">Create an account</a>', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?> | |
<? endif; ?> | |
<?= 'or'; jfb_output_facebook_btn(); ?> | |
<? kj_dev_only(); ?> | |
</div> | |
<? endif; ?> |
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 | |
/** | |
* limit_submissions_by_ip() | |
* filters a Gravity Form to prevent submissions from an already submitted IP, good for spam prevention | |
* change the ID to match your form (ex: gform_pre_render_6) | |
* @param $form (array) the form | |
* @return $form (array) the filtered form | |
* @author Joachim Kudish <[email protected]> | |
* @link http://jkudish.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 | |
add_action('wp_dashboard_setup', 'rm_dashboard_widgets'); | |
function rm_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // right now [content, discussion, theme, etc] | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // plugins | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // incoming links | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); // wordpress blog | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); // other wordpress news | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // quickpress |
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: SSL File API Fix | |
Plugin URI: http://jkudish.com/ | |
Description: A one function plugin which fixes the plugin update API to allow SSL downloads | |
Version: 0.1 | |
Author: Joachim Kudish | |
Author URI: http://jkudish.com/ | |
License: GPLv2 | |
*/ |
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
$ whois google.ca | |
Domain name: google.ca | |
Domain status: registered | |
Creation date: 2000/10/03 | |
Expiry date: 2012/04/28 | |
Updated date: 2011/03/27 | |
Registrar: | |
Name: Webnames.ca Inc. | |
Number: 70 |