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 ) ) . '"'; |
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 for displaying pages | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages and that | |
* other "pages" on your WordPress site will use a different template. | |
* | |
* @package WordPress | |
* @subpackage Twenty_Sixteen |
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
/* | |
* Close all bbpress topics | |
*/ | |
/** | |
* Hook into 'the_posts' and check the topic status on single topic pages. If | |
* the topic is not closed, set it to closed. | |
* | |
* @since 0.1.0 | |
* |