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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// Inspiration partly from: http://stackoverflow.com/questions/1897129 | |
jQuery(document).ready(function($) { | |
$('ul.dropdown').each(function(){ | |
var list = $(this); | |
var select = $(document.createElement('select')) | |
.attr('id',$(this).attr('id')) |
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 | |
/* | |
Template Name: Links | |
*/ | |
?> | |
<?php get_header(); ?> | |
<div id="content"> | |
<?php | |
if (have_posts()) : while (have_posts()) : 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
SELECT c.Content, c.Title, c.ID, c.CTID, c.RID, r.Sitename, | |
CASE WHEN c.Title LIKE '%conversion%' THEN 1 ELSE 0 END AS titlematch, | |
CASE WHEN c.Content LIKE '%conversion%' THEN 1 ELSE 0 END AS contentmatch, | |
MATCH (c.Title, c.Content) AGAINST ('conversion') AS relevance | |
FROM Chapters c LEFT JOIN Reviews r | |
ON c.RID = r.ID | |
WHERE MATCH(c.Title, c.Content) AGAINST ('conversion' IN BOOLEAN MODE) | |
HAVING relevance > 0 | |
ORDER BY titlematch DESC, contentmatch DESC, relevance DESC | |
LIMIT 50 |
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
Index: wp-includes/rewrite.php | |
=================================================================== | |
--- wp-includes/rewrite.php (revision 20781) | |
+++ wp-includes/rewrite.php (working copy) | |
@@ -1927,19 +1927,42 @@ | |
} | |
/** | |
+ * Schedules a flush of the rewrite rules. | |
+ * |
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 | |
// catch some weird locales served out by WP. | |
$locales = array( | |
'ar'=> 'ar_ar', | |
'ca'=> 'ca_es', | |
'en'=> 'en_us', | |
'el'=> 'el_gr', | |
'et'=> 'et_ee', | |
'fi'=> 'fi_fi', | |
'ja'=> 'ja_jp', |
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 | |
if ( preg_match_all( '/<img [^>]+>/', $post->post_content, $matches ) ) { | |
$content_changed = false; | |
foreach ( $matches[0] as $img ) { | |
preg_match( '/title=("|\')([^"\']+)("|\') /', $img, $title_match ); | |
preg_match( '/alt=("|\')([^"\']+)("|\') /', $img, $alt_match ); | |
if ( isset($title_match[2]) && isset($alt_match[2]) && $title_match[2] == $alt_match[2] ) { | |
$post->post_content = str_replace( $title_match[0], '', $post->post_content ); |
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 | |
// If we're not on an admin or login page, make sure we're not on https. | |
if ( !is_admin() && strpos($_SERVER['REQUEST_URI'], 'login.php') === false && $_SERVER['HTTPS'] == 'on' ) { | |
wp_redirect( "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], 301 ); | |
} |
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 | |
/** | |
* PressTrends tracking | |
*/ | |
function presstrends_plugin() { | |
// PressTrends Account API Key | |
$api_key = 'n6svrrn650hyckud8ghhs1o497hcm0g1o3s5'; | |
$auth = 'dhs4fy3nhnx5x0y6gkdfwt7fz2wprguqk'; |
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 orangevalley_link_nofollow( $content ) { | |
$content = preg_replace('#<a href=(\'|")http://www.orangevalley\.(nl|com)/(\'|")#', '<a rel="nofollow" href="http://www.orangevalley.com/"', $content ); | |
return $content; | |
} | |
add_filter('the_content','orangevalley_link_nofollow'); |
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 | |
/** | |
* Retrieve the purchase ID based on the purchase key | |
* | |
* @access public | |
* @since 1.2.3 | |
* | |
* @param string $key the purchase key to search for | |
* @return int $order_id | |
*/ |