Skip to content

Instantly share code, notes, and snippets.

View edheltzel's full-sized avatar
🇺🇸
Just your average run-of-the-mill kinda guy

Mr edheltzel

🇺🇸
Just your average run-of-the-mill kinda guy
View GitHub Profile
@edheltzel
edheltzel / gist:3163217
Created July 23, 2012 11:47 — forked from padolsey/gist:527683
JS: detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@edheltzel
edheltzel / gist:3806042
Created September 30, 2012 06:29
CSS: Image Replacement
.ir {
border:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@edheltzel
edheltzel / custom-wp-dashboard.php
Created October 11, 2012 13:44 — forked from arod2634/custom-wp-dashboard.php
Wordpress: Customize Admin Dashboard
<?php
//Add a custom admin dashboard welcome widget
function custom_dashboard_widget() {
echo '<h1>Welcome to your new WordPress site built by an awesome developer</h1>';
}
function add_custom_dashboard_widget() {
wp_add_dashboard_widget('custom_dashboard_widget', 'Integrity Welcomes You To WordPress!', 'custom_dashboard_widget');
}
add_action('wp_dashboard_setup', 'add_custom_dashboard_widget');
@edheltzel
edheltzel / gist:3872419
Created October 11, 2012 13:48 — forked from danielbachhuber/gist:1106704
Wordpress: Admin Improvements
<?php
/**
* Random set of improvements
*/
/**
* Tidy up the admin and remove options we don't need
*/
function db_clean_up_admin() {
@edheltzel
edheltzel / custom-wp-toolbar.php
Created October 12, 2012 15:32 — forked from arod2634/custom-wp-toolbar.php
Wordpress: Customize Admin Toolbar
<?php
// Customize Admin toolbar if you do desiced to keep it around...
function change_toolbar($wp_toolbar) {
$wp_toolbar->remove_node('comments');
$wp_toolbar->add_node(array(
'id' => 'myhelp',
'title' => 'Help',
'meta' => array('target' => 'help')
));
$wp_toolbar->add_node(array(
@edheltzel
edheltzel / funtions.php
Created October 12, 2012 15:41
Update Default Wordpress Email
// CHANGE EMAIL FROM NAME AND ADDRESS
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
return '[email protected]';
@edheltzel
edheltzel / funtions.php
Created October 12, 2012 16:09
Disable admin bar on front-end
<!-- DIABLE ADMIN BAR ON FRONT END -->
add_filter('show_admin_bar', '__return_false');
@edheltzel
edheltzel / functions.php
Created October 12, 2012 16:23
Customizing Wordpress Admin Footer
// Admin footer modification
function remove_footer_admin ()
{
echo '<span id="footer-thankyou">Developed By:<a href="http://www.yourdomain.com" target="_blank">Your Company Name</a></span>';
}
add_filter('admin_footer_text', 'remove_footer_admin');
@edheltzel
edheltzel / customize-wp-tinymce.php
Created October 22, 2012 23:55 — forked from arod2634/customize-wp-tinymce.php
Customize Wordpress TinyMCE Editor
<?php
// Make TinyMCE editor awesome!
function make_mce_awesome( $init ) {
$init['theme_advanced_blockformats'] = 'h2,h3,h4,p';
$init['theme_advanced_buttons1_add'] = 'copy, cut, paste, redo, undo';
$init['theme_advanced_buttons2_add'] = 'anchor, hr, sub, sup';
$init['theme_advanced_disable'] = 'wp_help';
return $init;
}
@edheltzel
edheltzel / custom-wp-widgets.php
Created October 22, 2012 23:56 — forked from arod2634/custom-wp-widgets.php
Customize Wordpress Theme Widgets
<?php
/*
* Remove any unwanted widgets...
*
* WP_Widget_Pages = Pages Widget
* WP_Widget_Calendar = Calendar Widget
* WP_Widget_Archives = Archives Widget
* WP_Widget_Links = Links Widget
* WP_Widget_Meta = Meta Widget
* WP_Widget_Search = Search Widget