Between [company name]
And [customer name].
<?php | |
/* | |
* | |
* This small scripts creates a post and attaches a file using Advanced custom field. | |
* | |
* Created by Miguel Garrido | |
* miguel.co.nz | [email protected] | |
* | |
* Notes: |
<?php | |
/* For AJAX, if frustrated, try the following (see http://www.php.net/manual/en/function.flush.php#91556): | |
@apache_setenv('no-gzip', 1); | |
@ini_set('zlib.output_compression', 0); | |
*/ | |
ob_start(); | |
set_time_limit(0); // for scripts that run really long | |
function force_flush ($add_whitespace = TRUE) { |
// NAV TOGGLER | |
// ======================================================= | |
$(".navbar-toggle-custom").click(function () { | |
$(this) | |
.children("div") | |
.toggleClass("active"); | |
$(this).toggleClass("active"); | |
}); | |
function matchHeight(className, addOffset, repeat) { | |
var getDivs = document.querySelectorAll(className); | |
var arrayLength = getDivs.length; | |
var heights = []; | |
for (var i = 0; i < arrayLength; i++) { | |
heights.push(getDivs[i].offsetHeight); | |
} | |
// Útil para filtros de Gutenberg como "allowed_block_types" | |
archives | |
audio | |
button | |
categories | |
code | |
column | |
columns | |
coverImage |
server { | |
listen 80; | |
listen 443 ssl http2; | |
server_name .core.test; | |
root "/home/vagrant/code/test/web"; | |
index index.html index.htm index.php; | |
charset utf-8; |
server { | |
listen 80; | |
listen 443 ssl http2; | |
server_name test.core; | |
root "/home/vagrant/code/test/web"; | |
index index.html index.htm index.php; | |
charset utf-8; | |
<?php | |
function fizzBuzz() { | |
foreach (range(25,250) as $i): | |
$out = ""; | |
if ($i % 7 == 0): | |
$out .= "Fizz "; | |
endif; | |
if ($i % 5 == 0): | |
$out .= "Buzz "; |
<?php | |
if(!function_exists('wc_get_products')) { | |
return; | |
} | |
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; | |
$ordering = WC()->query->get_catalog_ordering_args(); | |
$ordering['orderby'] = array_shift(explode(' ', $ordering['orderby'])); | |
$ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby']; |