rewrite.script is the .htaccess alternative for Zeus Servers
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
#!/bin/sh | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Wil Brown | |
# | |
# @uses /bin/sh scriptname.sh path | |
# @params text path to your WordPress folder from the www root e.g. / or /WordPress | |
# |
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
<ifModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault A300 | |
# Expires after 1 month | |
ExpiresByType image/gif A2592000 | |
ExpiresByType image/png A2592000 | |
ExpiresByType image/jpg A2592000 | |
ExpiresByType image/x-icon A2592000 | |
ExpiresByType application/pdf A2592000 |
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
/** Jetpack Share Buttons **/ | |
function lc_add_jetpack_share_buttons(){ | |
remove_filter( 'the_content', 'sharing_display', 19 ); | |
remove_filter( 'the_excerpt', 'sharing_display', 19 ); | |
if ( function_exists( 'sharing_display' ) ) { | |
echo sharing_display(); | |
} | |
} | |
add_action( 'genesis_before_post_content', 'lc_add_jetpack_share_buttons' ); |
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
// Add new image sizes | |
function lc_insert_custom_image_sizes( $image_sizes ) { | |
// get the custom image sizes | |
global $_wp_additional_image_sizes; | |
// if there are none, just return the built-in sizes | |
if ( empty( $_wp_additional_image_sizes ) ) | |
return $image_sizes; | |
// add all the custom sizes to the built-in sizes | |
foreach ( $_wp_additional_image_sizes as $id => $data ) { |
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
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
/* IE10+ specific styles go here */ | |
} |
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
<!--[if lte IE 9]> | |
Your IE8 and below HTML code here. | |
Perhaps importing a specific style sheet. | |
<![endif]--> |
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
add_action('admin_init', 'lc_disable_theme'); | |
function lc_disable_theme() { | |
global $menuitem, $userdata; | |
get_currentuserinfo(); | |
if ($userdata->ID != 1) { | |
unset($menuitem['themes.php'][5]); | |
unset($menuitem['themes.php'][15]); | |
} | |
} |
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
/* Enable alternative WP Cron */ | |
define('ALTERNATE_WP_CRON', 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
/** Stop comments being used on Media Files **/ | |
add_filter( 'comments_open', 'stopMediaComments', 10, 2 ); | |
function stopMediaComments( $open, $post_id ) { | |
$post = get_post( $post_id ); | |
if ( 'attachment' == $post->post_type ) | |
$open = false; | |
return $open; | |
} | |
/** This is used to get around non-native WordPress plugins **/ |
NewerOlder