Removing plus sign in user login wordpress


[sourcecodelanguage='php']
/* to allow the user to regiter with email ids containing + */
add_filter( ‘sanitize_user’, ‘plus_sanitize_user’, 10, 3);
function plus_sanitize_user($username, $raw_username, $strict) {
$new_username = strip_tags($raw_username);
// Kill octets
$new_username = preg_replace(‘|%([a-fA-F0-9][a-fA-F0-9])|’, ”, $new_username);
$new_username = preg_replace(‘/&.?;/’, ”, $new_username); // Kill entities

// If strict, reduce to ASCII for max portability.
if ( $strict )
$new_username = preg_replace(‘|[^a-z0-9 _.\-@+]|i’, ”, $new_username);

return $new_username;
}

Display posts/pages



<?php
 $args = array('numberposts' => '50', 'offset' => '',
 'category' => 'product_type', 'orderby' => 'post_date',
 'order' => 'DESC',
 'include' => '', 'exclude' => '',
 'meta_key' => '','meta_value' => '',
 'post_type' => 'product', 'post_mime_type' => '', 'post_parent' => '',
 'post_status' => 'publish', 'suppress_filters' => true
 );
 $products = get_posts($args);
 foreach($products as $product) {
 echo $product->post_title; // display product title
 echo get_the_post_thumbnail( $product->ID); // display product image
 echo $product->post_content; // display product description
 }
?>

terms, taxonomy, relationships in wp



little bit of conclusion
wp_terms_taxonomy strutured in this manner:
 1) term_taxonomy_id - category id
 2) term_id - FK->wp_terms.term_id,
 3) taxonomy - eg) category = one of the taxonomy type
 4) description of category
 5) parent 0 if it is parent,
 else any term_taxonomy_id of the main category
 6) count total posts under current category
wp_terms strutured in this manner:
 1) term_id (auto_increment)
 2) name - name of the category
 3) slug - slug of the category
 4) term_group - term with multiple aliases.This feature doesn't seem to be
 fully backed and is therefore practically never used
wp_term_relationships strutured in this manner:
 1) object id - ID of a post or link
 2) term_taxonomy_id - FK->wp_term_taxonomy.term_taxonomy_id
 3) term_order - order of the terms - categories

Perform two actions when clicking the button using jquery triggering



<script src="jquery.js"></script>
<script>
$(document).ready(function(){

 $(".d").click(function(){
 $("input").trigger("click");
 });
});
function sd() {
alert('balas')
}
</script>
</head>
<body>
<div class='link'>Click to see my name...</div>
<input type="submit" name="FirstName" onclick='sd()' value="My name" />

To see demo goto w3schools and copy/paste the above code