Roger Stringer freekrai

View retina.php
1 2 3 4 5 6 7 8 9 10
<?php
 
$google_analytics_id = 'UA-YOUR-ANALYTICS-ID';
$domain = preg_replace('/^www\./', '', $_SERVER['SERVER_NAME']);
?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
View slugify.php
1 2 3 4 5 6 7 8 9 10
<?php
 
function slugify($text)
{
// replace non letter or digits by -
$text = preg_replace('~[^\\pL\d]+~u', '-', $text);
// trim
$text = trim($text, '-');
View grab thumb url.php
1 2 3 4 5 6 7 8 9 10
<?php
/**
* Retrieves the thumbnail URL to use for a post
* @param string $text The body of the post (get_content)
* @param string $size The image size to retrieve
* @return string The image URL to use
*/
function rw_get_thumb_url($text, $size){
global $post;
$imageurl = FALSE;
View wp-img-defaults.css
1 2 3 4 5 6 7 8 9 10
/*
* Default WP Alignment Classes
*****************************************************************************/
 
.aligncenter,.alignleft,.alignright {
display: block;
padding: 0;
}
 
.aligncenter {
View grab thumb url.php
1 2 3 4 5 6 7 8 9 10
<?php
 
function rw_thumb_url($text, $size){
global $post;
$imageurl="";
// Check to see which image is set as "Featured Image"
$featuredimg = get_post_thumbnail_id($post->ID);
 
// Get source for featured image
View gist:8566195
1 2 3 4 5 6 7 8 9
<?php
 
$limit = 5;
$strictlimit = TRUE;
$weight = array(
'body'=>1,
'title'=>1,
'tax'=>1
);
View single.php
1 2 3 4 5 6 7 8 9 10
<?php
// Place the following code inside your single.php:
include("related.class.php");
$related = new rs_related();
$postids = $related->get_related($post->ID,5);
 
if( count($postids) ){
?>
<h3>Related posts:</h3>
<ul>
View related.class.php
1 2 3 4 5 6 7 8 9 10
View related.php
1 2 3 4 5 6 7 8 9 10
View hash_djb2.php
1 2 3 4 5 6 7 8 9 10
<?php
 
function hash_djb2($str){
$hash = 5381;
$length = strlen($str);
for($i = 0; $i &lt; $length; $i++) {
$hash = ( ($hash << 5) + $hash ) + $str[$i];
}
return ($hash & 0xFFFFFFFF);
}
Something went wrong with that request. Please try again.