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 | |
/** | |
******************************************************************************* | |
* MAL: Maintenance Auto-Login. | |
******************************************************************************* | |
* Automatically logs you in as the first admin user found in the WordPress | |
* database. | |
* | |
* How to use it: | |
* |
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
orders_export.csv | |
routific-destinations-*.csv | |
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* |
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 | |
// 1) User purchases and payment is complete | |
function capture_completed_transaction($txn) { | |
//It's possible this could be a recurring transaction for a product the user is already subscribed to so probably use a user meta field described below | |
$user = new MeprUser($txn->user_id); //A MeprUser object | |
$membership = new MeprProduct($txn->product_id); //A MeprProduct object | |
$users_memberships = $user->active_product_subscriptions('ids'); //An array of membership CPT ID's | |
//Here you may want to grab a user meta field of your own creating and check to see if the user is already subscribed to this membership or not | |
//If not, then push them to your 3rd party application and update the user meta field |
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
Options -Indexes | |
# .htaccess primary domain to web redirect | |
# this file must be in the (public_html | web ) folder of your hosting account | |
# make the changes to the file according to the instructions. | |
<IfModule mod_rewrite.c> | |
# Do not change this line. | |
RewriteEngine on | |
# Change %host% to be your primary domain. |
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 | |
# Make sites into bedrock or normal WordPress | |
# Version 2.0 | |
# Copyright (c) Kenny Eliason | |
set -a | |
source .env | |
set +a |
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 // ONLY COPY THIS LINE IF NEEDED! | |
/** | |
* Adds the ability to sort products in the shop based on the SKU | |
* Can be combined with tips here to display the SKU on the shop page: https://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
* | |
* @param array $args the sorting args | |
* @return array updated args | |
*/ | |
function sv_add_sku_sorting( $args ) { |
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
<ul class="products"> | |
<?php | |
$args = array( | |
'post_type' => 'product', | |
'posts_per_page' => 12, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'product_visibility', | |
'field' => 'name', | |
'terms' => 'featured', |
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
<div> | |
<label for="sort-by">Sort by</label> | |
<select id="sort-by"> | |
<option value="manual">Featured</option> | |
<option value="price-ascending">Price: Low to High</option> | |
<option value="price-descending">Price: High to Low</option> | |
<option value="title-ascending">A-Z</option> | |
<option value="title-descending">Z-A</option> | |
<option value="created-ascending">Oldest to Newest</option> | |
<option value="created-descending">Newest to Oldest</option> |
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 Slider Revolution's WP_Query to only include Featured Events that have a featured image | |
* | |
* @link https://theeventscalendar.com/knowledgebase/featured-events/ | |
* | |
* From https://gist.github.com/cliffordp/30ac2152a8264ef27235b46b7d16332d | |
* Similar code for Essential Grid: https://gist.github.com/cliffordp/a6aad3c60f469970b1ecb209d85ec755 | |
* Same Slider Revolution code except without requirement for being a Featured Event (works for more than just The Events Calendar): https://gist.github.com/cliffordp/9f0d7cc5e86b2a721cd646d953bb1261 | |
* |
NewerOlder