Skip to content

Instantly share code, notes, and snippets.

View joshuafredrickson's full-sized avatar
🍊
Orange pineapple

Joshua Fredrickson joshuafredrickson

🍊
Orange pineapple
View GitHub Profile
@joshuafredrickson
joshuafredrickson / gist:4757981
Last active December 12, 2015 10:19
WordPress: Disable Theme Editor - wp-config.php
/** Disable Theme Editor */
define('DISALLOW_FILE_EDIT', true);
@joshuafredrickson
joshuafredrickson / gist:4758120
Last active December 12, 2015 10:19 — forked from plavet/gist:2806211
jQuery: function, noConflict
// jQuery.noConflict();
(function($) {
})(jQuery);
@joshuafredrickson
joshuafredrickson / gist:4772190
Last active December 12, 2015 12:29
WordPress: Create wp_editor for code; disable WYSIWYG functions
$content = 'CONTENT';
$editor_id = 'EDITOR_ID';
$settings = array( 'tinymce' => false, 'media_buttons' => false, 'quicktags' => false, 'wpautop' => false );
wp_editor($content, $editor_id, $settings);
@joshuafredrickson
joshuafredrickson / gist:5286107
Last active December 15, 2015 15:59
WordPress - Genesis: Change "Speak your mind" comment title
/** Modify the speak your mind text */
add_filter( 'genesis_comment_form_args', 'op_comment_form_args' );
function op_comment_form_args($args) {
$args['title_reply'] = 'Leave a Comment';
return $args;
}
@joshuafredrickson
joshuafredrickson / gist:5286127
Created April 1, 2013 16:50
WordPress - Genesis: Change footer copyright text
/** Change footer copyright text */
add_filter('genesis_footer_creds_text', 'op_footer_creds_text');
function op_footer_creds_text( $creds ) {
$creds = 'Copyright &copy; '.date('Y').' <a href="'.home_url().'">'.get_bloginfo('description').'</a> &middot; All Rights Reserved.';
return $creds;
}
@joshuafredrickson
joshuafredrickson / gist:5296515
Created April 2, 2013 21:49
WordPress: Change URL for dev server
// Change WordPress URL for dev server
define('WP_HOME','http://');
define('WP_SITEURL','http://');
@joshuafredrickson
joshuafredrickson / gist:5296663
Created April 2, 2013 22:09
.htaccess: Redirect from www.*
# Redirect from www.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@joshuafredrickson
joshuafredrickson / gist:5302564
Last active December 15, 2015 18:19
.htaccess: Deny based on IP
<Limit GET POST PUT>
order deny,allow
deny from all
allow from 0.0.0.0
</Limit>
@joshuafredrickson
joshuafredrickson / gist:5331189
Last active December 15, 2015 22:09
CSS: Default web font styles for strong and italic
strong em, strong i, b em, b i, em strong, em b, i strong, i b {
font-weight: normal;
font-style: normal;
font-family: '[WEBFONT-Bold+Italic]', Helvetica, Arial, sans-serif;
}
strong, b {
font-weight: normal;
font-style: normal;
font-family: '[WEBFONT-Bold]', Helvetica, Arial, sans-serif;
@joshuafredrickson
joshuafredrickson / gist:5389204
Last active December 16, 2015 06:08
jQuery: document ready, noConflict
// jQuery.noConflict();
jQuery(document).ready(function($) {
});