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 * FROM `wp_trp_dictionary_en_us_ro_ro` WHERE | |
MATCH original AGAINST( '“That is why, I suppose, you wished him to go on to Bukovina. You cannot | |
deceive me, my friend; I know too much, and my horses are swift.” As he | |
spoke he smiled, and the lamplight fell on a hard-looking mouth, with | |
very red lips and sharp-looking teeth, as white as ivory. One of my | |
companions whispered to another the line from Burger’s “Lenore”:—' ) | |
AND |
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
function ginger_parse_dom($output) | |
{ | |
$ginger_script_tags = array( | |
'platform.twitter.com/widgets.js', | |
'apis.google.com/js/plusone.js', | |
'apis.google.com/js/platform.js', | |
'connect.facebook.net', | |
'platform.linkedin.com', | |
'assets.pinterest.com', |
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('trp_before_translate_content', 'trpc_fix_html_attributes_without_spaces'); | |
function trpc_fix_html_attributes_without_spaces($output){ | |
$size = strlen($output); | |
$pos = 0; | |
$pos_c = 0; | |
while ($pos_c < $size){ | |
$len = strcspn($output, '<' , $pos); |
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 word_hash($str){ | |
$hash =0; | |
$str = str_split($str); | |
foreach($str as $key => $char){ | |
$hash += ord($char) * $key; | |
} | |
return $hash; | |
} |
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 | |
/* | |
Plugin Name: Disable Specific Plugins in Dev - translatepress.com | |
Plugin URI: http://translatepress.com | |
Description: Disable specified plugins in development environment | |
Author: TranslatePress | |
Version: 1.1 | |
Author URI: http://translatepress.com | |
*/ |
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 | |
/** | |
* Plugin Name: Easy Digital Downloads - TranslatePress Customizations | |
* Plugin URI: http://translatepress.com | |
* Description: TranslatePress customizations for edd | |
* Version: 1.0.0 | |
* Author: Madalin Ungureanu | |
*/ | |
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
// http://wordpress.stackexchange.com/questions/9870/how-do-you-create-a-virtual-page-in-wordpress | |
add_action( 'init', 'frugal_add_rewrite_rule' ); | |
function frugal_add_rewrite_rule() | |
{ | |
add_rewrite_rule( 'budget$', 'index.php?budget=1', 'top' ); | |
} | |
add_filter( 'query_vars', 'frugal_query_vars' ); | |
function frugal_query_vars( $query_vars ) | |
{ |
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
/* | |
* Make user listing work with the nicename. Tags: user listing, nicename | |
*/ | |
add_filter('wppb_userlisting_get_user_by_id', create_function('', 'return false;')); | |
// Filter wp_title for single user listing | |
function single_user_list_filter_wp_title( $title, $sep ) { | |
$userID = wppb_get_query_var('username'); |
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 | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/engine/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
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 | |
/** | |
* The template used for displaying private page content | |
* | |
* @package WordPress | |
* @subpackage Twenty_Sixteen | |
* @since Twenty Sixteen 1.0 | |
*/ | |
$private_page_class = 'class="type-page ' . join( ' ', get_post_class( $class, $post_id ) ) . '"'; |