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
<?php | |
/** | |
* @package Cache Wrapper | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Cache Wrapper | |
Version: 1.0 | |
*/ |
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
# Origin pull in nginx | |
upstream origin { | |
server host.domain.tld:80; | |
} | |
server { | |
listen 80; | |
root /var/www; | |
index index.html index.htm; |
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
<?php | |
function cutstr($str, $length, $ellipsis='') | |
{ | |
$cut=explode('\n\n',wordwrap($str),$length,'\n\n')); | |
return $cut[0].((strlen($cut)<strlen($str))?$ellipsis:''); | |
} | |
echo cutstr('hej hej, nu ska vi kolla på hur det blir här. kommer det här att bli bra? eller vad säger du ? ', 30,'...'); |
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
.-"--"""".__ `. | |
| ` | | |
( `._....------.._.: | |
. ) ( <o> <o> g) | |
) ) / J | |
( |. / . ( | |
$$ (. (_'. , )|` | |
|| |\`-....--'/ ' \ | |
/||. \\ | | | / / \. | |
//||(\ \`-===-' ' \o. |
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
<item> | |
<title>Brinna</title> | |
<link>http://www.scouterna.se/aktiviteter-och-lager/scoutklader-och-marken/intressemarken/brinna/</link> | |
<pubDate>Wed, 21 Nov 2012 22:03:40 +0000</pubDate> | |
<dc:creator>pontus.lof</dc:creator> | |
<guid isPermaLink="false">http://scouterna.spacedout.se/?post_type=marke-intresse&p=15177</guid> | |
<description></description> | |
<content:encoded><![CDATA[<p class="content-preamble">Det här är en fortsättning på intressemärket Tända. Genom att jobba med Brinna lär du dig mer om elden och hur man kan använda den på ett bra sätt. Eld som kan användas till att laga mat på, skapa en mysig stämning eller ge värme.</p> | |
<h2>Innehåll</h2> |
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
<center> | |
http://crazyvideo.com/?Asdkasdkaksda | |
</center> |
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
<?php $download=json_decode(wp_remote_retrieve_body(wp_remote_get('http://www.reddit.com/r/Wordpress/comments/1a23de/reddit_comments/.json'))); | |
foreach ($download as $comments){ | |
?><ul><?php | |
foreach ($comments->data->children as $comment){ | |
if($comment->data->body != null){ | |
?><li><a href="http://www.reddit.com/user/<?php echo($comment->data->author)?>" target="_blank"> | |
<?php echo html_entity_decode($comment->data->author); ?></a><br /><?php | |
echo html_entity_decode($comment->data->body); ?></li><br /><br /><ul><?php | |
foreach($comment->data->replies->data->children as $reply){ | |
?><li><a href="http://www.reddit.com/user/<?php echo($reply->data->author)?>" target="_blank"> |
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
diff --git a/wp-content/plugins/wp-views/embedded/res/js/wpv-pagination-embedded.js b/wp-content/plugins/wp-views/embedded/res/js/wpv-pagination-embedded.js | |
index 374c5f8..ca3e616 100644 | |
--- a/wp-content/plugins/wp-views/embedded/res/js/wpv-pagination-embedded.js | |
+++ b/wp-content/plugins/wp-views/embedded/res/js/wpv-pagination-embedded.js | |
@@ -183,6 +183,7 @@ function wpv_pagination_replace_view(view_number, page, ajax, effect, max_pages, | |
data = {}; | |
data = add_url_query_parameters(data); | |
for (var prop in data['get_params']) { | |
+ prop = prop.replace("%5B%5D",""); | |
if (!(jQuery('form[name=wpv-filter-' + view_number + '] > input[name=' + prop + ']').length > 0)) { |
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_filter('wpv-extra-condition-filters', 'wpv_add_time_functions'); | |
function wpv_add_time_functions($value) | |
{ | |
// is_get_param($_GET['parameter']) - returns true if parameter is set | |
if (preg_match('/is_get_param\((.*)\)/',$value,$matches)) | |
{ | |
$uriparameter = $matches[1]; | |
if (isset ($_GET[$uriparameter])) |
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 (!function_exists('hip_has_children')) | |
{ | |
function hip_has_children($child_of = null) | |
{ | |
// original code based on http://forrst.com/posts/WordPress_has_children_function-DmS | |
$posttype = get_post_type($child_of); | |
if(is_null($child_of)) { | |
global $post; | |
$child_of = ($post->post_parent != '0') ? $post->post_parent : $post->ID; |