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 | |
// Add this to your function.php | |
function please_update_slug( $data, $postarr ) { | |
if($data['post_type'] == 'tribe_events') { | |
if ( !in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) { | |
$post_id = $postarr['ID']; | |
$value = $_POST["EventStartDate"]; | |
$date = new DateTime($value); | |
$data['post_name'] = sanitize_title( $data['post_title'] . '-' . $date->format('d-m-Y')); | |
} |
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
{ | |
"type": "package", | |
"package": { | |
"name": "advanced-custom-fields/advanced-custom-fields-pro", | |
"version": "5.1.9.1", | |
"type": "wordpress-plugin", | |
"dist": { | |
"type": "zip", | |
"url": "http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=YOUR_KEY_HERE=" | |
} |
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 | |
if(!defined('WPINC')) // MUST have WordPress. | |
exit('Do NOT access this file directly: '.basename(__FILE__)); | |
add_action('init', 'github_events::init'); | |
class github_events // Event handler. | |
{ | |
# Configuration ############################################### |
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
/** | |
* Replace Visual Composer initial classes with original Bootstrap 3 classes | |
* | |
* @author http://codecanyon.net/user/adambartholomew1 | |
* @source from http://pastebin.com/qJp9SXvP | |
* @package vc2twbs3classes | |
* @version 0.1 | |
*/ | |
$lCounter = 0; |
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
.nav-tab { | |
... | |
// instead of putting it on | |
border-right: 1px solid #424242; | |
&:last-child { | |
border-right: 0; // and then taking it off | |
} | |
// use CSS not() to only apply to the elements you want | |
&:not(:last-child) { | |
border-right: 1px solid #424242; |
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 | |
/* | |
Plugin Name: WP Migrate DB Pro Tweaks | |
Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks | |
Description: Examples of using WP Migrate DB Pro's filters | |
Author: Delicious Brains | |
Version: 0.1 | |
Author URI: http://deliciousbrains.com | |
*/ |
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
(function() { | |
/* Define a variável que dá swipe no lightbox */ | |
var magnificPopup = $.magnificPopup.instance; | |
/* Carrega a função quando clica no lightbox (senão não pega a classe utilizada) */ | |
$("a.image-lightbox").click(function(e) { | |
/* Espera carregar o lightbox */ | |
setTimeout(function() { | |
/* Swipe para a esquerda - Próximo */ |
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 | |
/** | |
* Double Confirmation Fields | |
* http://gravitywiz.com/2012/05/01/custom-field-confirmation/ | |
*/ | |
register_confirmation_fields( 10, array( 1, 2 ), 'Your custom messages do not match.' ); | |
add_filter( 'gform_validation', 'gfcf_validation' ); | |
function gfcf_validation( $validation_result ) { |
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 GetIpInfo = function(ipAddr) { | |
var info = null; | |
var infoUrl = "http://ipinfo.io/" + ipAddr; | |
$.ajax({ | |
url: infoUrl, | |
type: 'GET', | |
dataType: 'json', | |
async: false, | |
success: function(data) { | |
info = data; |
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
#!/bin/bash | |
set -e | |
show_help() { | |
cat << EOF | |
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE] | |
${0##*/} -h | |
Open a standard connection in Sequel PRO. |