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
// Add woocommerce class in body | |
<body <?php body_class('woocommerce'); ?> | |
// Set BlockUI on any element | |
jQuery(element).block({ | |
message: null, | |
overlayCSS: { | |
cursor: 'none', | |
background: '#fff', | |
opacity: 0.6 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Send Bacon Example</title> | |
</head> | |
<body> | |
<button type="button" id="button">Send Response</button> |
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 | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
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
:active,:focus{outline:none;} | |
::-moz-focus-inner{border:0;} | |
input:focus,textarea:focus,button:focus{outline:none !important} | |
body{margin:0;padding:0} | |
img{height:auto;image-rendering:-webkit-optimize-contrast;max-width:100%} | |
select { | |
/* for Firefox */ | |
-moz-appearance: none; | |
/* for Chrome */ | |
-webkit-appearance: none; |
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
{ | |
"wp.theme": { | |
"prefix": "wp.theme", | |
"body": [ | |
"/*", | |
"Theme Name: $1", | |
"Theme URI: $2", | |
"Author: $3", | |
"Author URI: $4", | |
"Description: $5", |
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 | |
if (!function_exists('get_avatar')) { | |
function get_avatar ($email, $size = 32, $default = 'mp') { | |
return 'https://www.gravatar.com/avatar/' . md5($email) . '?' . http_build_query( [ 's' => $size, 'd' => $default ] ); | |
} | |
} |
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 | |
// File: app/Exceptions/Handler.php | |
namespace App\Exceptions; | |
use Exception; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
class Handler extends ExceptionHandler | |
{ |
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
// Plugin URL: https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-deploy | |
{ | |
"files.exclude": { | |
"**/wp-admin": true, | |
"**/wp-includes": true | |
}, | |
"deploy": { | |
"openOutputOnDeploy": false, | |
"showPopupOnSuccess": true, |
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 | |
$href = 'https://in.pinterest.com/bhagyashrijadhav51/happy/?utm_campaign=rdboards&e_t=5c7cb45aadb34115ba86ab4531b61a23&utm_content=733664664235398280&utm_source=31&utm_term=3&utm_medium=2004'; | |
$query_str = parse_url($href, PHP_URL_QUERY); | |
parse_str($query_str, $query_params); | |
echo $query_params['utm_campaign']; |
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
// Source: https://blog.logrocket.com/beyond-cookies-todays-options-for-client-side-data-storage/ | |
const apiRequest = new Request('https://www.example.com/items'); | |
caches.open('exampleCache') // opens the cache | |
.then(cache => { | |
cache.match(apiRequest) // checks if the request is cached | |
.then(cachedResponse => | |
cachedResponse || // return cachedReponse if available | |
fetch(apiRequest) // otherwise, make new request | |
.then(response => { |
NewerOlder