View pre-submission-gf.php
<?php | |
/** | |
* Better Pre-submission Confirmation | |
* http://gravitywiz.com/2012/08/04/better-pre-submission-confirmation/ | |
*/ | |
class GWPreviewConfirmation { | |
private static $lead; |
View functions.php
<?php | |
new HiddenShopp; | |
class HiddenShopp | |
{ | |
/** | |
* Construct everything | |
* | |
* @author Hiranthi Molhoek-Herlaar |
View view-all.php
<?php | |
/** | |
* Filter $load_options | |
*/ | |
function onx_custom_filter($load_options) | |
{ | |
if ( is_admin() ) return $load_options; | |
if ( isset($_REQUEST['viewall']) || isset($_REQUEST['view-all']) ) |
View account-link.php
<?php | |
// Account-link, either inside <li> tags (with inmenu=true) or in a <p> (with inmenu=false) | |
shopp('wishlist-pro','account-link','options'); | |
// Options: | |
# before - text before the link | |
# inmenu - whether it's inside the account-menu or not, false | true, (default is false) |
View ajax.js
jQuery(document).ready(function($) { | |
// the add-to-wishlist links should be inside an id="edit-wishlist-pro", ie a div or a span | |
$('#edit-wishlist-pro a').click(function(e) { | |
e.preventDefault(); | |
// the surrounding grandparent should have a rel attached that holds the ID of the product (ie rel="12") | |
var product = $(this).parent().parent().attr('rel'); | |
// the parent (<p>) doesn't have a 'remove' class, so we're adding to the wishlist |
View autoembed.php
<?php | |
global $wp_embed; | |
add_filter( 'shopp_product_description', array( $wp_embed, 'autoembed' ), 999 ); | |
add_filter( 'shopp_product_summary', array( $wp_embed, 'autoembed' ), 999 ); | |
?> |
View add2wishlist-cart.php
<?php | |
// load product, should be inside the cartitem loop | |
shopp('storefront','product','load=true&id=' . shopp('cartitem','product','return=true')); | |
// then place the add-to-wishlist link/checkbox where you want it -> inside that same loop (options below) | |
shopp('wishlist-pro','add-button','options'); | |
// Options: | |
# type - link | checkbox | |
# before - add something before the link/checkbox |
View .htaccess
RewriteEngine on | |
RewriteBase / | |
# WP automatically redirects domain.com/admin to the correct wp-admin URL, we want to stop this so we're sending the visitor to the homepage | |
RewriteRule ^admin/?(.*?) http://www.domain.com [R=301,L] | |
# Cloaking the wp-admin folder and changing it to domain.com/my-administration/ | |
RewriteRule ^my-administration/(.*?) wp-admin/$1?%{QUERY_STRING} [L] | |
# Default WP stuff goes here --> |
View .htaccess
# Place this below the .htaccess code from https://onexa.nl/nieuwsberichten/brute-force-attacks-wp-login-php-verminderen/ | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{QUERY_STRING} !(^|&)secure=XXXXXXXXX($|&) | |
RewriteCond %{REQUEST_URI} .wp-admin* [OR] | |
RewriteCond %{REQUEST_URI} .wp-login\.php* | |
RewriteCond %{HTTP_REFERER} !.*domain.com.* [OR] | |
RewriteCond %{HTTP_USER_AGENT} ^$ | |
RewriteRule (.*) http://%{REMOTE_ADDR}/ [R=301,L] |
OlderNewer