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
<script type="text/javascript"> | |
function loadGalleryDeepLink() | |
{ | |
var prefix = "#gallery-"; | |
var h = location.hash; | |
if (document.g_magnific_hash_loaded === undefined && h.indexOf(prefix) === 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
<?php | |
error_reporting(E_ALL); | |
/* Get the port for the service. */ | |
$port = "9100"; | |
/* Get the IP address for the target host. */ | |
$host = "172.17.144.89"; | |
/* construct the label */ |
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 | |
class Custom_Hooks { | |
/** | |
* Adds a filter hook for an object | |
* | |
* Custom_Hooks::add_filter( 'filter_data', array( $this, 'filter_data' ) ); | |
* Custom_Hooks::add_filter( 'filter_data', array( $this, 'filter_data' ), 11 ); | |
* Custom_Hooks::add_filter( 'filter_data', 'special_func' ); | |
* Custom_Hooks::add_filter( 'filter_data', 'special_func', 11 ); |
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 strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>') | |
{ | |
mb_regex_encoding('UTF-8'); | |
//replace MS special characters first | |
$search = array('/‘/u', '/’/u', '/“/u', '/”/u', '/—/u'); | |
$replace = array('\'', '\'', '"', '"', '-'); | |
$text = preg_replace($search, $replace, $text); | |
//make sure _all_ html entities are converted to the plain ascii equivalents - it appears | |
//in some MS headers, some html entities are encoded and some aren't |