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 | |
// 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) | |
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
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 |
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 | |
global $wp_embed; | |
add_filter( 'shopp_product_description', array( $wp_embed, 'autoembed' ), 999 ); | |
add_filter( 'shopp_product_summary', array( $wp_embed, 'autoembed' ), 999 ); | |
?> |
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 | |
// 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 |
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
### Blocking Spammers Section ### | |
# Stop protected folders from being narked. Also helps with spammers | |
ErrorDocument 401 /401.html # this file should be added, check http://halfelf.org/2013/wp-login-protection-htaccess/ | |
# Stop spam attack logins and comments - http://halfelf.org/2013/wp-login-protection-htaccess/ | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_METHOD} POST | |
RewriteCond %{REQUEST_URI} .(wp-comments-post|wp-login)\.php* |
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
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 --> |
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
# 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] |
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
function onx_reset_faceted_menus () | |
{ | |
if ( isset( $_GET['reset'] ) && class_exists( 'Shopp' ) ) | |
{ | |
// the part of the Shopp Object that holds the facet filtering info, make it empty | |
ShoppStorefront()->browsing = array(); | |
// get the current url | |
$url = explode( '?', onx_full_url() ); | |
OlderNewer