This file contains hidden or 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
<?php | |
function cidr_match($ip, $ranges) | |
{ | |
$ranges = (array)$ranges; | |
foreach($ranges as $range) { | |
list($subnet, $mask) = explode('/', $range); | |
if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) { | |
return true; | |
} | |
} |
This file contains hidden or 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
//Fix for home page navigation error on WP 3.4 | |
function aq_query_for_homepage( $query ) { | |
global $paged; | |
if(get_option('lp_include_reviews') == "true") { $include_reviews = "reviews"; } | |
if(get_option('lp_include_videos') == "true") { $include_videos = "videos"; } | |
if(get_option('lp_include_screenshots') == "true") { $include_screenshots = "screenshots"; } | |
if( $query->is_main_query() && $query->is_home() ) { | |
$query->set( 'post_type', array( 'post', $include_reviews, $include_videos, $include_screenshots ) ); |
This file contains hidden or 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
--- | |
layout: default | |
--- | |
<div class="blog-index"> | |
{% assign post = site.posts.first %} | |
{% assign content = post.content %} | |
{% include post_detail.html %} | |
</div> |