Skip to content

Instantly share code, notes, and snippets.

View eversionsystems's full-sized avatar

Andrew Schultz eversionsystems

View GitHub Profile
@eversionsystems
eversionsystems / wp-config.php
Last active March 7, 2018 06:21
WP Config Debug Enable
define('WP_DEBUG', true);
if ( WP_DEBUG ) {
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'log_errors', 'On' );
@ini_set( 'display_errors', 'Off' );
@ini_set( 'error_reporting', E_ALL );
@ini_set( 'error_log', 'php_error.log' );
@eversionsystems
eversionsystems / woocommerce-ajax-checkout-spinner.css
Last active July 24, 2024 23:52
WooCommerce Change AJAX Spinner Gif On Checkout
/*
* Custom AJAX spinner on WooCommerce checkout
* The class used to load the overlay is .blockUI .blockOverlay
* The class used to load the spinner is .woocommerce .loader:before
*
*/
.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before {
height: 3em;
width: 3em;
position: absolute;
@eversionsystems
eversionsystems / config
Last active March 27, 2020 03:59
How to tell Git which SSH Key to use - WPEngine Scenario with multiple accounts
#Examples of using WP Engine to setup repositories. If both sites are on the same account you can use the same private key.
#Windows user file c:\users\user\.ssh\config
Host website1
User git
Hostname git.wpengine.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/key_rsa
IdentitiesOnly yes
@eversionsystems
eversionsystems / multiple-roles-per-user.php
Last active October 25, 2023 13:22 — forked from nikolov-tmw/multiple-roles-per-user.php
Multiple roles per user WordPress plugin. Supports editing your own profile's roles.
<?php
/**
* Plugin Name: Multiple Roles per User
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful.
* Version: 1
* Author: nikolov.tmw
* Author URI: http://paiyakdev.com/
* License: GPL2
*/
@eversionsystems
eversionsystems / select2-bootstrap4.scss
Last active May 24, 2020 08:31
Haven't been able to find anything that formats the select2 control properly for Bootstrap 4 so I complied this sccs file to do so. Includes form validation styling but only includes form-control-lg and form-control classes. Will add the form-control-sm later.
/**
* Feel free to change the colors below.
* Need to update this this to handle form-control-sm.
* Ensure you load these customizations after the select2 css file in order to override them.
*
* This is an example of the input and jQuery you need
*
* <select id="select-example" class="custom-select form-control" style="width:100%">
<option value="">--Add Value--</option>
</select>
@eversionsystems
eversionsystems / .htaccess
Created June 19, 2021 06:52
Load WordPress server upload directory files from localhost. Circumvent having to download large wp-upload directories so we can load images locally.
#Allow us to load images from server instead of having to download them all for large sites
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$
RewriteRule ^wp-content/uploads/(.*)$ https://yourwebsitename.com/wp-content/uploads/$1 [NC,L]
</IfModule>
@eversionsystems
eversionsystems / _ajax-search.php
Last active September 26, 2021 17:24
WordPress AJAX Live Search Without jQuery Dependency Using Fetch API
<?php
namespace ES_AJAX_Search;
function ajax_search_shortcode()
{
ob_start();
?>
<div class="search-wrapper">