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
<script> | |
(function($) { | |
$(function(){ | |
$('a').on('click', function(e) { | |
const href = this.href; | |
const url = new URL(href); | |
if (window.location.origin === url.origin) { | |
e.preventDefault(); |
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
<script src="https://cdn.jsdelivr.net/gh/studio-freight/[email protected]/bundled/lenis.js"></script> | |
<script> | |
if (!document.querySelector("html").classList.contains('w-editor')){ | |
const lenis = new Lenis({ | |
duration: 1.2, | |
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), // https://www.desmos.com/calculator/brs54l4xou | |
direction: 'vertical', // vertical, horizontal | |
gestureDirection: 'vertical', // vertical, horizontal, both | |
smooth: true, |
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
// Building default object | |
var buildingObj = { | |
open: false, | |
uid: null, | |
address1: { | |
value: null, | |
rules: ['required'], | |
valid: true, | |
error: null | |
}, |
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 | |
require_once('includes/vendor/pdfshift/init.php'); | |
use \PDFShift\PDFShift; | |
$pdfshift = new PDFShift( array( | |
'sandbox' => true, | |
'viewport' => '768x1024', | |
'zoom' => 0.8, | |
'css' => $this->get_pdf_css(), // custom function to get a url for the css file |
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 | |
function rewrite_rules(){ | |
add_rewrite_tag( '%course%', '([^&]+)' ); | |
add_rewrite_tag( '%theme%', '([^&]+)' ); | |
add_rewrite_rule("^app/course/([^/]+)/?",'index.php?page_id=3400&course=matches[1]', 'top' ); | |
add_rewrite_rule('^app/course/([^/]+)/theme/([^/]+)/?','index.php?page_id=3400&course=$matches[1]&theme=$matches[2]', 'top' ); | |
} |
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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$roi_min = (get_query_var('roi_min')) ? intval( get_query_var('roi_min') ) : false; | |
$roi_max = (get_query_var('roi_max')) ? intval( get_query_var('roi_max') ) : false; | |
$args = array( | |
'post_type' => 'post', | |
'tax_query' => array(...), | |
'posts_per_page' => 10, |
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 | |
function test_prevent_redirect( $redirect_url ) { | |
if ( is_single() && in_array( get_post_type( get_the_ID() ), array( 'cursos', 'videos', 'disciplinas' ) ) ) $redirect_url = false; | |
return $redirect_url; | |
} | |
add_filter('redirect_canonical', 'test_prevent_redirect' ); |
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 get_header(); ?> | |
<div class="container"> | |
<div class="row"> | |
<?php | |
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; | |
$disciplinas = new WP_Query( array( | |
'post_type' => 'disciplinas', |
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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$roi_min = (get_query_var('roi_min')) ? intval( get_query_var('roi_min') ) : false; | |
$roi_max = (get_query_var('roi_max')) ? intval( get_query_var('roi_max') ) : false; | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page' => 10, | |
'paged' => $paged, |
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
var gulp = require( 'gulp' ), | |
sass = require( 'gulp-sass' ), | |
autoprefixer = require( 'gulp-autoprefixer' ), | |
minifycss = require( 'gulp-minify-css' ), | |
imagemin = require( 'gulp-imagemin' ), | |
rename = require( 'gulp-rename' ), | |
concat = require( 'gulp-concat' ), | |
plumber = require( 'gulp-plumber' ), | |
notify = require( 'gulp-notify' ), | |
inlineCss = require('gulp-inline-css'), |
NewerOlder