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
/* Brazilian initialisation for the jQuery UI date picker plugin. */ | |
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ | |
jQuery(function($){ | |
$.datepicker.regional['pt-BR'] = { | |
closeText: 'Fechar', | |
prevText: '<Anterior', | |
nextText: 'Próximo>', | |
currentText: 'Hoje', | |
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', | |
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], |
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
if Vagrant.has_plugin? 'vagrant-hostmanager' | |
config.hostmanager.enabled = true | |
config.hostmanager.manage_host = true | |
config.hostmanager.manage_guest = true | |
config.vm.provision :hostmanager | |
settings = YAML::load(File.read(homesteadYamlPath)) | |
config.hostmanager.aliases = settings['sites'].map { |item| item['map'] } | |
puts "hostmanager aliases: " + config.hostmanager.aliases.join(' ') |
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
#Força a utilizar Cache-Control e Expires header | |
<IfModule mod_headers.c> | |
Header unset ETag | |
</IfModule> | |
FileETag None | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 month" | |
ExpiresByType text/cache-manifest "access plus 0 seconds" | |
# Html |
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 new_post_thumbnail_meta_box() { | |
global $post; | |
echo '<p class="howto">Tamanho recomendado: 1413px × 640px </p>'; | |
$thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); | |
echo _wp_post_thumbnail_html( $thumbnail_id ); | |
} | |
function render_new_post_thumbnail_meta_box() { | |
global $post_type; |
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
display: -webkit-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-box-pack: center; | |
-ms-flex-pack: center; | |
-webkit-justify-content: center; | |
justify-content: center; | |
-webkit-box-align: center; | |
-ms-flex-align: center; |
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
// SCROLL EVENT CAPTURE // | |
var wheel = document.getElementById('wheel'); | |
function report(ammout) { | |
clearTimeout(time); | |
if(ammout > 0){ | |
time = setTimeout(previousPage, 300); |
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 | |
#Usage | |
add in functions | |
function load_more_button($context = 'default', $text = 'Carregar Mais', $template = 'parts/cards', $paged = 0) | |
{ | |
if (empty($paged)) { | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
} | |
$load_more = new Load_More_Posts(); | |
$load_more->load_more_button($context, $text, $template, $paged); |
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 devplus_attachments_wpquery_where( $where ){ | |
if( is_user_logged_in() ){ | |
// we spreken over een ingelogde user | |
if( isset( $_POST['action'] ) ){ | |
// library query | |
if( $_POST['action'] == 'query-attachments' ){ | |
$where .= ' AND post_parent != 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
/** | |
* when cf7 ajax-loader | |
* @param {[type]} form [description] | |
* @return {[type]} [description] | |
*/ | |
wpcf7.submit = function( form ) { | |
if ( typeof window.FormData !== 'function' ) { | |
return; | |
} |
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
version: '2' | |
# Named volumes | |
volumes: | |
# MySQL Data | |
wordpress-mysql-data: | |
driver: local | |
# Redis Data |