I hereby claim:
- I am mayeenulislam on github.
- I am mayeenulislam (https://keybase.io/mayeenulislam) on keybase.
- I have a public key whose fingerprint is CFF1 D104 6905 54AF 01CD 06CB EF58 8473 625B 520A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
jQuery(document).ready(function($) { | |
var imgs = $('img'); //grabbing all the images of a DOM | |
imgs.addClass('lazy'); //adding .lazy to all the images | |
imgs.each(function() { | |
var img_src = $(this).attr('src'); //grabbing the 'src=""' value of each of the img | |
$(this).attr('data-original', img_src); //assigning the src value to 'data-original' | |
$(this).removeAttr('src'); //now deleting the 'src' attribute | |
}); |
<?php | |
/** | |
* Ascending order search result - WordPress | |
* @param object $query | |
* @return void | |
*/ | |
function wp20150504_alphabetical_search_query( $query ) { | |
//checking whether we are in the search result page or not | |
if ( $query->is_search && $query->is_main_query() ) { |
.item{ | |
overflow: auto; | |
scroll-snap-type: proximity; | |
scroll-snap-points-x: repeat(300px); | |
} | |
/* Source: https://twitter.com/supersole/status/615924334675296256 */ |
<?php | |
/** | |
* Redirect from wp-login.php | |
* @link http://stackoverflow.com/a/1976804/1743124 | |
*/ | |
function mayeenulislam_wp_login_redirect(){ | |
if( isset($_GET['action']) && $_GET['action'] == 'register' ) { | |
wp_redirect( home_url('/register') ); //i.e. http://example.com/register | |
exit(); | |
} else if( isset($_GET['action']) && $_GET['action'] == 'lostpassword' ) { |
# ---------------------------------------------------------------------- | |
# | Compression | | |
# ---------------------------------------------------------------------- | |
<IfModule mod_deflate.c> | |
# Force compression for mangled `Accept-Encoding` request headers | |
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html | |
<IfModule mod_setenvif.c> |
<?php | |
/** | |
* db QUERIES | |
* Prerequisite: define('SAVEQUERIES', true) | |
*/ | |
function nano_enqueue_db_queries() { | |
global $wpdb; | |
echo '<h2>Database Last Query</h2>'; | |
echo $wpdb->last_query; | |
echo '<hr>'; |
<?php | |
function init_url_rewrite_rule(){ | |
add_rewrite_endpoint( 'edit',EP_PERMALINK | EP_PAGES | EP_ATTACHMENT ); | |
if(get_option("EDIT_REWRITE_RULE")!=1){ | |
flush_rewrite_rules(); | |
update_option("EDIT_REWRITE_RULE",1); | |
} | |
} | |
function redirect_edit_url(){ |