This file contains 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
# Force download by filetype | |
<FilesMatch "\.(mp3|pdf)$"> | |
ForceType application/octet-stream | |
Header set Content-Disposition attachment | |
</FilesMatch> |
This file contains 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
// Improve jpg quality | |
add_filter('jpeg_quality', 'op_jpeg_quality'); | |
function op_jpeg_quality($arg) { | |
return (int)80; // value between 60-100 | |
} | |
This file contains 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
// Modify breadcrumb arguments | |
add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' ); | |
function sp_breadcrumb_args( $args ) { | |
// $args['home'] = 'Home'; | |
$args['sep'] = ' <span>›</span> '; | |
// $args['list_sep'] = ', '; // Genesis 1.5 and later | |
// $args['prefix'] = '<div class="breadcrumb">'; | |
// $args['suffix'] = '</div>'; | |
// $args['heirarchial_attachments'] = true; // Genesis 1.5 and later | |
// $args['heirarchial_categories'] = true; // Genesis 1.5 and later |
This file contains 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
// Remove empty p tags for custom shortcodes | |
add_filter('the_content', 'op_content_filter'); | |
function op_content_filter($content) { | |
// array of custom shortcodes requiring the fix | |
$block = join('|',array('shortcode1')); | |
// opening tag | |
$rep = preg_replace("/(<p>)?\[($block)(\s[^\]]+)?\](<\/p>|<br \/>)?/","[$2$3]",$content); | |
// closing tag |
This file contains 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
// Disable XML-RPC | |
add_filter( 'xmlrpc_enabled', '__return_false' ); |
This file contains 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
/** Disable Theme Editor */ | |
define('DISALLOW_FILE_EDIT', true); |
This file contains 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
// jQuery.noConflict(); | |
(function($) { | |
})(jQuery); |
This file contains 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
$content = 'CONTENT'; | |
$editor_id = 'EDITOR_ID'; | |
$settings = array( 'tinymce' => false, 'media_buttons' => false, 'quicktags' => false, 'wpautop' => false ); | |
wp_editor($content, $editor_id, $settings); |
This file contains 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
/** 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; | |
} |
This file contains 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
/** Change footer copyright text */ | |
add_filter('genesis_footer_creds_text', 'op_footer_creds_text'); | |
function op_footer_creds_text( $creds ) { | |
$creds = 'Copyright © '.date('Y').' <a href="'.home_url().'">'.get_bloginfo('description').'</a> · All Rights Reserved.'; | |
return $creds; | |
} |
OlderNewer