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
/* | |
* Explanation: | |
* When rendering a Breakdance Page via ajax, we need to manually append the styles and scripts that are needed for the page to function properly. | |
* This is because Breakdance pages conditionally load their assets based on the page's content, and we can't predict which assets will be needed if we're loading the page via AJAX. | |
*/ | |
async function openQuickView() { | |
const body = new FormData(); | |
const postId = 2928; // The post ID you want to load via AJAX |
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
/** | |
* Plugin Name: Remove Duotone Code | |
* Description: Remove inline junk added by WordPress | |
* Author: Felipe Marcos | |
* Version: 0.1 | |
*/ | |
add_action('plugins_loaded', function() { | |
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' ); | |
}); |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
/** | |
* Plugin Name: Login por CPF | |
* Description: Permite o usuário se logar utilizando o CPF. | |
* Author: Felipe Marcos | |
* Author URI: https://felipe.zip | |
* License: GNU General Public License v3 or later |
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
# Gzip compression | |
<IfModule mod_deflate.c> | |
# Active compression | |
SetOutputFilter DEFLATE | |
# Force deflate for mangled headers | |
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> | |
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding | |
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding | |
# Don't compress images and other uncompressible content |
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
import Packery from 'packery'; | |
import imagesLoaded from 'imagesloaded'; | |
export default class Mosaic { | |
constructor() { | |
this.options = { | |
pckry: { | |
percentPosition: true, | |
itemSelector: '.mosaic-item', | |
}, |
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
document.addEventListener('mouseleave', function(e) { | |
if ( e.clientY < 0 ) { | |
console.log('Leaving?'); | |
} | |
}); |
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
Element.prototype.dispatch = function(eventName, data) { | |
var event = data ? new CustomEvent(eventName, data) : new Event(eventName); | |
this.dispatchEvent(event); | |
} |