Skip to content

Instantly share code, notes, and snippets.

View delowardev's full-sized avatar
🏠
Working from home

Delowar Hossain delowardev

🏠
Working from home
View GitHub Profile
@delowardev
delowardev / js-scope.js
Created July 18, 2021 17:31
Scope in JavaScript
if (true) {
let x = 10;
var y = 10;
}
// `x` can't be accessed from outside of the if block
console.log(x) // return: Uncaught ReferenceError: x is not defined
// `y` can be accessed from outside of the if block
console.log(y) // return 10
@delowardev
delowardev / override-tutor-login-registration-form.php
Created October 29, 2019 11:15
Helps you to customize the login & registration forms in Tutor LMS WordPress plugin.
<?php
/**
* Fires Before Tutor Global Login Form
* @Hook: tutor_load_template_before
* @Template: global.login
*/
add_action('tutor_load_template_before', 'tutor_global_login_before', 10, 2);
function tutor_global_login_before($template, $variable){
@delowardev
delowardev / css-compress.php
Created February 8, 2018 09:31 — forked from brentonstrine/css-compress.php
Fix space removal so that it doesn't break space-separated values where the developer used more than one space to separate values.
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*
flat.portfolio_isotope = $('.portfolio-isotope');
flat.portfolio_menu = $('.isotope-menu li');
flat.portfolio_isotope.isotope({
itemSelector: '.single-portfolio',
layoutMode: 'fitRows'
});
flat.portfolio_menu.on('click', function () {
flat.portfolio_menu.removeClass("active");
$(this).addClass("active");
{URL}?license=regular&open_purchase_for_item_id={ID}&purchasable=source&ref=idea420
$provision_toolkit_allowed_html_in_st = array(
'a' => array(
'href' => array(),
'class' => array(),
'target' => array(),
),
'img' => array(
'href' => array(),
'class' => array(),
'alt' => array(),
/* Medium Layout: 1280px. */
@media only screen and (min-width: 992px) and (max-width: 1200px) {
}
/* Tablet Layout: 768px. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
}
function wpj_default_menu() {
echo '<ul id="dropmenu">';
if ('page' != get_option('show_on_front')) {
echo '<li><a href="'. home_url() . '/">Home</a></li>';
}
wp_list_pages('title_li=');
echo '</ul>';
}
<?php
/**
* Set a max limit on the number of times
* a repeating group can be added.
*/
/**
* Setup the group field metabox
*/
function js_limited_group_setup() {
Demo & Download Link: http://dimsemenov.com/plugins/magnific-popup/
01. Youtube video >>
// html markup
<a href="http://www.youtube.com/watch?v=0O2aH4XLbto" class="videoBtn">Watch Video</a>
// javascript