Skip to content

Instantly share code, notes, and snippets.

@corradomatt
corradomatt / SSL and WooCommerce Exclude for Migrate DB Pro
Last active November 23, 2020 18:39
The settings for Migrate-DB-Pro plugin to exclude Better WordPress Security, WooCommerce SSL and WooCommerce Plugin Activation settings when pushing or pulling your database. This code DOES NOT work as a stand-alone gist. You will need to utilize it within this code - https://github.com/deliciousbrains/wp-migrate-db-pro-tweaks/
/**
* Exclude certain WordPress database settings from being migrated when pushing or pulling
* with Migrate-DB-Pro
*
* Useful when developing locally and wanting to push or pull database settings between envirnments
* USE CAUTION! - Must be used with https://github.com/deliciousbrains/wp-migrate-db-pro-tweaks/
*/
function preserved_options( $options ) {
$options[] = 'blog_public'; // discourage search engines setting
$options[] = 'bit51_bwps'; // Better WordPress Security Settings

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@corradomatt
corradomatt / roots-pagination.php
Created November 27, 2013 21:46
Advanced Pagination WordPress Roots Theme
<?php
if ( !function_exists('your_pagination')) :
function your_pagination($custom_query) {
if ( !$current_page = get_query_var( 'paged' ) ) $current_page = 1;
$permalinks = get_option( 'permalink_structure' );
if( is_front_page() ) {
$format = empty( $permalinks ) ? '?paged=%#%' : 'page/%#%/';
} else {
@corradomatt
corradomatt / gravityforms-bs-datepicker.less
Last active November 28, 2023 20:34
Addon for using gravity forms with a bootstrap based development such as the roots.io theme for WordPress. I specifically wrote this for a roots theme and it's based on this post http://roots.io/style-gravity-forms-with-bootstrap/ by Ben Word.This goes one step further and provides support for some native gravity forms style declarations for for…
/**
* Borrowed from https://github.com/addyosmani/jquery-ui-bootstrap
* Styles the datepicker popup for gravityforms used with bootstrap
*/
/*
* jQuery UI Datepicker
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
@corradomatt
corradomatt / WordPress Template Comment
Last active December 20, 2015 05:59
WordPress template file commenting for developers who want to help us out with which file is loading parts of a page.
<?php
// Beginning of File
begin_template( __FILE__ );
// End of File
end_template( __FILE__ );
<?php
/*
* Plugin Name: Commercial Client
* Plugin URI: http://pento.net/
* Description: A sample client plugin for showing updates for non-WordPress.org plugins
* Author: pento
* Version: 0.1
* Author URI: http://pento.net/
* License: GPL2+
*/