Skip to content

Instantly share code, notes, and snippets.

cfxd / flexslider-with-bootstrap-mixins.less
Last active Aug 29, 2015
FlexSlider v2.2.0 default styles in LESS
View flexslider-with-bootstrap-mixins.less
/* Includes Bootstrap mixins!
/* Browser Resets
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus { outline: none; }
View tax_cpt_filter_class.php
if (!class_exists('Tax_CTP_Filter')){
* Tax CTP Filter Class
* Simple class to add custom taxonomy dropdown to a custom post type admin edit list
* @author Ohad Raz <>
* @version 0.1
class Tax_CTP_Filter
cfxd / selection.less
Last active Aug 29, 2015
LESS Mixin to change selection color
View selection.less
.selection(@color; @bg) {
&::selection {
-webkit-font-smoothing: antialiased;
color: @color;
text-shadow: none;
background: @bg;
background: fadeout(@bg, 1%);
&::-moz-selection {
-webkit-font-smoothing: antialiased;
cfxd / chosenjs-less-for-bootstrap-and-woocommerce-checkout.less
Last active Aug 29, 2015
This will style WooCommerce's ChosenJS select boxes on the WooCommerce checkout page to match your existing Bootstrap form styles (assuming you've made any style changes in LESS) and even replaces the default background images with Bootstrap's built in Glyphicons.
View chosenjs-less-for-bootstrap-and-woocommerce-checkout.less
// first some helpful mixins
.abs {
position: absolute;
.rel {
position: relative;
.position(@top; @right; @bottom; @left) {
top: @top;
right: @right;
View test-plugin.php
* Plugin Name: AA Test Plugin
* Plugin URI:
* Description: Testing all kinds of things!
* Author: Richard Archambault
* Version: 1.0
* License: GPL2+
cfxd / passwordform-bootstrap.php
Last active Aug 29, 2015
Roots theme password protected post form function. Use the Bootstrap free markup with the Bootstrap LESS or use the Bootstrap markup version as standalone.
View passwordform-bootstrap.php
global $post;
$label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
<form action="<?php echo esc_url(site_url('wp-login.php?action=postpass', 'login_post')); ?>" class="post-password-form form-inline" method="post">
<p><?php _e('This content is password protected. To view it please enter your password below:', 'roots'); ?></p>
<p><label for="<?php echo $label; ?>" class="sr-only"><?php _e('Password:', 'roots'); ?></label></p>
<div class="input-group">
<input name="post_password" id="<?php echo $label; ?>" type="password" placeholder="<?php _e('Enter password', 'roots'); ?>" class="form-control" />
<span class="input-group-btn">
cfxd / remove_cf7_assets-action_hook.php
Last active Aug 29, 2015
Load the Contact Form 7 Stylesheet and JavaScript Only When Necessary (the Right Way). See
View remove_cf7_assets-action_hook.php
<?php do_action('cf7_before_wp_head'); ?>
View Gruntfile-config.js
sshexec: {
dump_remote_db: {
options: {
host: '<%= %>',
username: '<%= mysql.remote.username %>',
agent: process.env.SSH_AUTH_SOCK
command: [
'cd <%= mysql.remote.save_path %>',
'mysqldump <%= mysql.remote.dbname %> -u <%= mysql.remote.dbuser %> -p<%= mysql.remote.dbpass %> > remote-<%= timestamp %>.sql'

require_short_url: some hosts require short URLs otherwise they redirect to a forbidden page

no_rewrite_wysijap: some hosts don't work with the URL rewriting wysijap/subscription bounce_max**: by default, we handle 100 bounce emails per process, with this option you can increase or decrease this value

urlstats_base64: to deactivate base 64 links

no_js_val: no AJAX subscription

allow_no_js: with Wysija, you can register with or without JavaScript. This option deactivates the JavaScript-less option which can be used by spammers

View wp-cli.txt
# Install wordpress
wp core download && wp core config --dbname=wordpress_test_db --dbuser=root && wp core install --url=http://localhost/wp-cli/ --title=Wordpress --admin_user=admin --admin_password=admin
# Install and activate Plugins
wp plugin install wordpress-importer --activate && wp plugin install contact-form-7 --activate
# Generate Posts
curl | wp post generate --post_content --count=10
# Activate a theme
You can’t perform that action at this time.