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
const controller = new ScrollMagic.Controller(); | |
window.addEventListener("load", function (event) { | |
/** | |
* Fade In | |
* @type {NodeListOf<Element>} | |
*/ | |
const fadeIn = document.querySelectorAll('.fade-in'); | |
fadeIn.forEach(e => { | |
const delay = e.getAttribute('data-delay') ? e.getAttribute('data-delay') : 0; |
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
<div class="countdown" data-h="" data-m="0" data-s="15"> | |
<div class="countdown__num -h">00</div> | |
<div class="countdown__sep">:</div> | |
<div class="countdown__num -m">00</div> | |
<div class="countdown__sep">:</div> | |
<div class="countdown__num -s">00</div> | |
</div> | |
<div class="countdown__num -finished">FINALIZADA</div> |
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
// of course gulp | |
const {src, dest, parallel, series, watch} = require('gulp'); | |
// css | |
const sass = require('gulp-sass'); | |
sass.compiler = require('node-sass'); | |
const autoprefixer = require('autoprefixer'); | |
const cssnano = require('gulp-cssnano'); | |
const rucksack = require('rucksack-css'); | |
const magicImporter = require('node-sass-magic-importer'); |
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
[alias] | |
co = checkout | |
br = branch | |
ci = commit | |
st = status | |
hide = update-index --assume-unchanged | |
unhide = update-index --no-assume-unchanged | |
unstage = reset HEAD -- | |
last = log -1 HEAD | |
ps = push |
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
function instagramFeed(username, container = ".instagram-feed", numOfImages = 6) { | |
const host = 'https://www.instagram.com/'; | |
const url = host + username; | |
const hostImageUrl = host + 'p/'; | |
let userFeed = {}; | |
// request data | |
$.get(url, function (data) { | |
// get content from script tag |
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 | |
function taxonomy_hierarchy( $taxonomy ) { | |
global $post; | |
$terms = get_the_terms( $post->ID, $taxonomy ); | |
foreach ( $terms as $term ) { | |
if ( $term->parent == 0 ) { | |
$myparent = $term; | |
} | |
} | |
echo '' . $myparent->name . ''; |
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 ( class_exists( 'WPP_Query' ) ) { | |
$data_most_viewed = new WPP_Query( [ | |
'post_type' => 'post', | |
'range' => 'last7days', | |
'limit' => 4 | |
] ); | |
$ids_most_viewed = []; | |
foreach ( $data_most_viewed->get_posts() as $id_post ) : |
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
function ChangeLang(a) { | |
var b, elemento = ""; | |
if (document.createEvent) { | |
var c = document.createEvent("HTMLEvents"); | |
c.initEvent("click", true, true) | |
} | |
if (a == 'pt') { | |
elemento = $(".goog-te-banner-frame:eq(0)").contents().find("button[id*='restore']") | |
} else { | |
switch (a) { |
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 | |
// Disable support for comments and trackbacks in post types | |
add_action( 'admin_init', 'nexo_disable_comments_post_types_support' ); | |
function nexo_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ( $post_types as $post_type ) { | |
if ( post_type_supports( $post_type, 'comments' ) ) { | |
remove_post_type_support( $post_type, 'comments' ); | |
remove_post_type_support( $post_type, 'trackbacks' ); | |
} |