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
RewriteEngine On | |
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/hotlinking-thief.jpg [L] |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>My New App</title> | |
<link href="css/styles.css" rel="stylesheet" type="text/css" media="screen" /> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<div id="main"> |
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
<Files ~ ".*..*"> | |
Order Allow,Deny | |
Deny from all | |
</Files> | |
<FilesMatch ".(jpg|jpeg|jpe|gif|png|tif|tiff)$"> | |
Order Deny,Allow | |
Allow from all | |
</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
/** | |
* Add support for JetPack infinite scroll | |
**/ | |
function lc_infinite_scroll_init() { | |
add_theme_support( 'infinite-scroll', array( | |
'container' => 'content', | |
'footer' => 'footer', | |
'render' => 'genesis_do_loop' | |
) ); | |
} |
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
/** Grab IDs from new WP 3.5 gallery **/ | |
function lc_grab_ids_from_gallery() { | |
global $post; | |
$attachment_ids = array(); | |
$pattern = get_shortcode_regex(); | |
$ids = array(); | |
if (preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) ) { //finds the "gallery" shortcode and puts the image ids in an associative array at $matches[3] | |
$count=count($matches[3]); //in case there is more than one gallery in the post. |
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 support for JetPack infinite scroll | |
**/ | |
add_theme_support( 'infinite-scroll', array( | |
'container' => 'content', | |
'footer' => 'page', | |
) | |
); |
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
/** | |
* The Infinite Blog Footer | |
* | |
* @uses self::get_settings, self::set_last_post_time, self::archive_supports_infinity, __, wp_get_theme, get_current_theme, apply_filters, home_url, esc_attr, get_bloginfo, bloginfo | |
* @return string or null | |
*/ | |
function footer() { | |
// Bail if theme requested footer not show | |
if ( false == self::get_settings()->footer ) | |
return; |
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 ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { | |
require_once( WP_CONTENT_DIR . '/maintenance.php' ); | |
die(); | |
} |
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
// Filter video output | |
add_filter('oembed_result','lc_oembed_result', 10, 3); | |
function lc_oembed_result($html, $url, $args) { | |
// $args includes custom argument | |
$newargs = $args; | |
// get rid of discover=true argument | |
array_pop( $newargs ); |
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
[ text* your-name 58/ ] | |
[ email* your-email 58/ ] | |
[ checkbox mailchimp-optin default:1 use_label_element "Subscribe to our newsletter" ] |