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
#!/bin/bash | |
# | |
# vvv-init-setup-plugins-post.sh | |
# | |
# This file will perform some additional tasks on installed plugins. | |
# Get Peasant from https://github.com/andrezrv/peasant-vvv-provider. | |
# Include config file. | |
this_dir="$(dirname `readlink -f $(dirname $0)/vvv-init.sh`)" | |
. "${this_dir}/config.sh" |
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
config.vm.provider :virtualbox do |v| | |
v.customize ["modifyvm", :id, "--memory", "3072"] | |
v.customize ["modifyvm", :id, "--cpus", "4"] | |
v.customize ["modifyvm", :id, "--ioapic", "on"] | |
end |
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
jQuery( document ).ready( function( $ ) { | |
$.fn.animate_number = function( options ) { | |
options.fromNumber = options.fromNumber ? options.fromNumber : 0; | |
options.toNumber = options.toNumber ? options.toNumber : 0; | |
options.rounding = options.rounding ? options.rounding : 0; | |
options.thousands = options.thousands ? options.thousands : ''; | |
options.decimals = options.decimals ? options.decimals : '.'; | |
options.element = this; |
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 | |
/* | |
Plugin name: Local Plugins | |
Description: A loader for plugins that should run only in local stages. | |
Author: Andrés Villarreal | |
Author URI: http://about.me/andrezrv | |
Version: 1.0 | |
License: GPL2 | |
*/ | |
function local_plugins_setup() { |
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 | |
/** | |
* Avoid sending mails when working locally. | |
*/ | |
if ( ! function_exists( 'wp_mail' ) | |
&& defined( 'WP_STAGE' ) | |
&& 'local' == WP_STAGE | |
&& ( ! defined( 'WP_MAIL_LOCAL' ) || true !== WP_MAIL_LOCAL ) | |
) { | |
function wp_mail( $to, $subject, $message, $headers = '' ) { |
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 | |
/** | |
* Remove Google Analytics warning from network admin. | |
*/ | |
function remove_analytics_warning_from_network_admin() { | |
if ( is_network_admin() ) { | |
global $ga_admin; | |
remove_filter( 'admin_footer', array( $ga_admin, 'warning' ) ); | |
} | |
} |
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 | |
/** | |
* Blacklist Jetpack modules. | |
*/ | |
function blacklist_jetpack_modules( $modules ){ | |
$jp_mods_to_disable = array( | |
'contact-form', | |
'shortlinks', | |
); |
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 | |
/** | |
* Auto activate Jetpack modules. | |
*/ | |
function activate_jetpack_modules( $modules ){ | |
$modules = array( | |
'widget-visibility', | |
'custom-css', | |
); | |
return $modules; |
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 | |
/** | |
* Show info for current stage in admin toolbar. | |
*/ | |
function show_current_stage_info( $wp_admin_bar ) { | |
if ( defined( 'WP_STAGE' ) && WP_STAGE != '%%WP_STAGE%%' ) { | |
$args = array( | |
'id' => 'current-stage', | |
'title' => '<span class="dashicons dashicons-admin-site" style="font-family: \'dashicons\'; font-size: 20px; margin-right: 5px;"></span> Current stage: ' . WP_STAGE, | |
'meta' => array( 'class' => 'current-stage' ), |
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 | |
/** | |
* Limit file extensions to load from CDN. | |
*/ | |
function override_cdn_file_extensions() { | |
return array( 'jpe?g', 'gif', 'png', 'bmp' ); | |
} | |
add_filter( 'stage_wp_cdn_extensions', 'override_cdn_file_extensions' ); |
OlderNewer