Skip to content

Instantly share code, notes, and snippets.

View escobar022's full-sized avatar

Andres Escobar escobar022

View GitHub Profile
@escobar022
escobar022 / php5.ini
Created September 21, 2017 17:08 — forked from jennimckinnon/php5.ini
Increasing the file upload limit for WordPress.
upload_max_filesize = 1000M
post_max_size = 2000M
memory_limit = 3000M
file_uploads = On
max_execution_time = 180
<?php
class JSONQuery {
public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'json_localize' ) );
}
@escobar022
escobar022 / post-receive
Created February 9, 2016 20:02 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@escobar022
escobar022 / header.php
Last active August 29, 2015 14:20
Wordpress Bootstrap Navwalker
<header class="banner navbar navbar-default navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?= esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a>