This file contains hidden or 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 hidden or 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 hidden or 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_action( 'init', 'register_cpt_cp_name' ); | |
function register_cpt_cp_name() { | |
$labels = array( | |
'name' => __( 'plural post type name', 'text_domain' ), | |
'singular_name' => __( 'single post type name', 'text_domain' ), | |
'add_new' => _x( 'Add New single post type name', '${4:Name}', 'text_domain' ), | |
'add_new_item' => __( 'Add New single post type name', 'text_domain}' ), | |
'edit_item' => __( 'Edit single post type name', 'text_domain' ), |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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'); |
OlderNewer