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 | |
/** | |
* Admin Columns | |
* @example | |
* | |
new Admin_Columns('my_post_type', [ | |
'order' => __('Order'), | |
'image' => __('Image'), | |
]); |
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 | |
/** | |
* Page Builder | |
* @example tpf_include('html/page-builder', $args); | |
* @param string $folder - folder path from where to include blocks | |
* @param string $container - container class | |
* @param string $display - default display option, should be a class that defines space and style | |
* @param array $layout_settings - individual layout settings | |
* |
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 | |
// process $_POST request | |
if(isset($_POST["submitDropzone"])) { | |
// Do something | |
print_r($_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
<div> | |
<a href="img_1.jpg" data-uk-gallery></a> | |
<a href="img_2.jpg" data-uk-gallery></a> | |
<a href="img_3.jpg" data-uk-gallery></a> | |
</div> | |
<div> | |
<a href="img_1.jpg" data-uk-gallery="cars"></a> | |
<a href="img_2.jpg" data-uk-gallery="cars"></a> | |
<a href="img_3.jpg" data-uk-gallery="cars"></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
function createInput(name, placeholder = "") { | |
let input = document.createElement("INPUT"); | |
input.setAttribute("type", "text"); | |
input.setAttribute("name", name); | |
input.setAttribute("placeholder", placeholder) | |
input.classList.add("uk-input"); | |
return input; |
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
<script> | |
/** | |
* @param {string} id video element css ID | |
* | |
*/ | |
function openFullscreen(id) { | |
event.preventDefault(); | |
elem = document.getElementById(id); |
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
/** | |
* Gradient color mixin | |
* Works great with text & icons fonts | |
*/ | |
.gradient-color-mixin(@color, @color-2, @deg: 90deg) { | |
color: transparent; | |
background-image: -webkit-linear-gradient(@deg, @color-2 0%, @color 100%); | |
background-image: -moz-linear-gradient(@deg, @color-2 0%, @color 100%); | |
background-image: linear-gradient(@deg, @color-2 0%, @color 100%); | |
-webkit-background-clip: text; |
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 animateNumbers() { | |
var elements = document.querySelectorAll(".tm-animate-number"); | |
elements.forEach(e => { | |
let current = 0; | |
let end = e.getAttribute("data-number"); | |
let end_2 = (end > 200) ? end - 50 : end; | |
let increase_by = (end > 200) ? 23 : 1; |
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 | |
/* | |
* REST Helper. | |
* | |
* Copyright (c) 2014 Camilo Castro <camilo@cervezapps.cl> | |
* | |
* Some portions of code are based on the Lime Project | |
* https://github.com/aheinze/Lime/ | |
* Copyright (c) 2014 Artur Heinze | |
* |
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 getUserIP() { | |
// Get real visitor IP behind CloudFlare network | |
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) { | |
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"]; | |
$_SERVER['HTTP_CLIENT_IP'] = $_SERVER["HTTP_CF_CONNECTING_IP"]; | |
} | |
$client = @$_SERVER['HTTP_CLIENT_IP']; | |
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; | |
$remote = $_SERVER['REMOTE_ADDR']; |
NewerOlder