Skip to content

Instantly share code, notes, and snippets.

View jkudish's full-sized avatar

Joey Kudish jkudish

View GitHub Profile
@jkudish
jkudish / Style links based on destination
Created August 10, 2010 12:33
Style links based on destination / css
remove_filter('genesis_nav_items', 'genesis_nav_right', 10, 2);
add_filter('genesis_nav_items', 'custom_nav_right', 10, 2);
function custom_nav_right($menu, $args) {
// function goes here
}
remove_action('genesis_post_title', 'genesis_do_post_title'); // remove page titles
Redirect 301 /wp-config.php http://svr.gov.ru/honeyd
if ( isset($_GET['debug']) && $_GET['debug'] == 'debug')
define('WP_DEBUG', true);
/* Code goes into config.php
add ?debug=debug to a URL and see what's causing the trouble
change the second 'debug' to a diff key => anonymous/secure.
add_action('all', create_function('', 'var_dump(current_filter());'));
//show all hooks and filters in source
// remove Genesis purchase menu
remove_theme_support( 'genesis-purchase-menu' );
current_post + 1) < ($wp_query->post_count)) { echo '
Post Divider
';
}
?>
UPDATE wp_posts SET comment_status = 'closed';
RewriteCond %{HTTP_HOST} !^(127\.0\.0\.0|localhost) [NC]
RewriteCond %{HTTP_USER_AGENT} .*(Firs|exac|Cloak|Detect|uchoo|beaut|ASPSeek|swish|ICS\)|MSIE\ 6\.0\;\ Windows\ NT\;\ DigExt\)|pt\-BR\;\ rv\:1\.9\.0\.3\)\ Firefox\/3\.0|pt\-BR\;\ rv\:1\.9\.0\.18\)\ Firefox\/3\.0|\!susie|\$x0e|\%0a|\%0d|\@\$x|\_irc|\_works|\+select\+|\+union\+|\&lt;\?|1\,\1\,1\,|3gse|4all|4anything|5\.1\;\ xv6875\)|59\.64\.153\.|85\.17\.|88\.0\.106\.|98|a\_browser|a1\ site|abac|abach|abby|aberja|abilon|abont|abot|accept|access|accoo|accoon|aceftp|acme|active|address|adopt|adress|advisor|agent|ahead|aihit|aipbot|alarm|albert|alek|alexa\ toolbar\;\ \(r1\ 1\.5\)|alltop|alma|alot|alpha|america\ online\ browser\ 1\.1|amfi|amfibi|anal|andit|anon|ansearch|answer|answerbus|answerchase|antivirx|apollo|appie|arach|archive|arian|aboutoil|asps|aster|atari|atlocal|atom|atrax|atrop|attrib|autoh|autohot|av\ fetch|avsearch|axod|axon|baboom|baby|back|baid|bali|bandit|barry|basichttp|batch|bdfetch|beat|become|bee|beij|betabot|biglotron|bilgi|bison|bitacle
function email_members($post_ID) {
global $wpdb;
$usersarray = $wpdb->get_results("SELECT user_email FROM $wpdb->users;");
$users = implode(",", $usersarray);
mail($users, "New WordPress recipe online!", 'A new recipe have been published on http://www.wprecipes.com');
return $post_ID;
}
add_action('publish_post', 'email_members');