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
$string = preg_replace('/\s+/', '', $string); |
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
/** | |
* Determines whether the supplied PAN is valid. Will also check to see whether the PAN is numeric. | |
* @private | |
* @param pan | |
* The PAN to validate. | |
* @return If the PAN failed the Luhn Check of if the PAN is not numeric. | |
*/ | |
public function isValidLuhn($pan) { | |
if (!ctype_digit((string)$pan)) { |
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 | |
add_action( 'init', 'register_new_taxonomy' ); | |
function register_new_taxonomy() { | |
$labels = array( | |
'name' => _x( 'plural taxonomy', 'Taxonomy general name', 'text_domain' ), | |
'singular_name' => _x( 'single taxonomy', 'Taxonomy singular name', 'text_domain' ), | |
'search_items' => __( 'Search plural taxonomy', 'text_domain' ), |
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: | |
Description: | |
Plugin URI: http:// | |
Author: | |
Author URI: http:// | |
Version: | |
License: GPL2 | |
Text Domain: Text Domain |
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(navigator.appVersion.indexOf("MSIE 6.")!=-1) | |
{ | |
// IE 6 code | |
} | |
if(navigator.appVersion.indexOf("MSIE 7.")!=-1) | |
{ | |
// IE 7 code | |
} |
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 no_follow( $links ) { | |
foreach($links as $link) { | |
$link->link_rel .= ' nofollow'; | |
$link->link_rel = trim($link->link_rel); | |
} | |
return $links; | |
} | |
add_filter('get_bookmarks', 'no_follow'); |
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 wps_force_ssl( $force_ssl, $post_id = 0, $url = '' ) { | |
if ( $post_id == 25 ) { | |
return true | |
} | |
return $force_ssl; | |
} | |
add_filter('force_ssl' , 'wps_force_ssl', 10, 3); |
OlderNewer