Skip to content

Instantly share code, notes, and snippets.

@moskowite
Created February 21, 2012 21:47
Show Gist options
  • Select an option

  • Save moskowite/1879201 to your computer and use it in GitHub Desktop.

Select an option

Save moskowite/1879201 to your computer and use it in GitHub Desktop.
add_action( 'init', 'makeblog_check_contribute');
function makeblog_check_contribute(){
if( is_page('contribute') ){
add_action( 'init', 'makeblog_process_post' );
add_action('wp_enqueue_scripts', 'makeblog_contribute_script');
}
}
function makeblog_contribute_script() {
// load a JS file from my theme: js/theme.js
wp_enqueue_script('contribute.validate', get_bloginfo('template_url') . '/js/contribute.validate.js', array('jquery'), '1.0', true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment