Skip to content

Instantly share code, notes, and snippets.

View jswebschmiede's full-sized avatar
🏠
Working from home

Joerg Schoeneburg jswebschmiede

🏠
Working from home
View GitHub Profile
@jswebschmiede
jswebschmiede / list-style-color.js
Created May 24, 2013 13:09
Skript was es ermöglicht HTML Listen mit farbigen Aufzählungspunkten zu versehen, dazu muss die CSS Klasse span.text mit der Standard Schriftfarbe versehen werden und die ul, ol Listen mit der Farbe in der die Punkte dargestellt werden sollen.
/*
Bsp CSS.:
ul, ol { color: red; }
span.text { color: black; }
*/
$(document).ready(function(){
/* content ist hier der Bereich für die Texte usw. */
$('#content ul li').each(function(i, e) {
$(e).contents().wrap('<span class="text"></span>')
# all php files :: disallow direct access of file
# between <?php and ?>
defined('_JEXEC') or die;
# index.php :: define variable with application
# between <?php and ?>
$app = JFactory::getApplication();
# index.php :: define variable with document
# between <?php and ?>
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@jswebschmiede
jswebschmiede / gist:ab7b0af66d27e495d6befae83cd7aa84
Created March 31, 2022 14:15 — forked from Neolot/gist:7189739
WORDPRESS Ajax contact-form
<!-- contactform.php -->
<div class="cf" id="cf">
<form action="javascript:void(0);">
<div><input type="text" name="name" placeholder="Name"/><span class="error"></span></div>
<div><input type="text" name="email" placeholder="Email"/><span class="error"></span></div>
<div><textarea name="message" placeholder="Message"></textarea><span class="error"></span></div>
<div><button type="submit">Submit</button> <span class="loader"></span></div>
</form>
</div>
<?php
/**
* Load an inline SVG.
*
* @param string $filename The filename of the SVG you want to load.
*
* @return string The content of the SVG you want to load.
*/
function load_inline_svg( $filename ) {
@jswebschmiede
jswebschmiede / breadcrumbs-functions.php
Created April 3, 2022 19:57 — forked from tinotriste/breadcrumbs-functions.php
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@jswebschmiede
jswebschmiede / wc-min-order-amount.php
Created April 13, 2022 11:57 — forked from woogists/wc-min-order-amount.php
Set a minimum order amount for checkout
/**
* Set a minimum order amount for checkout
*/
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 50;
@jswebschmiede
jswebschmiede / wc-show-cart-contents-total-ajax.php
Created April 13, 2022 12:00 — forked from woogists/wc-show-cart-contents-total-ajax.php
[Theming Snippets] Show cart contents / total Ajax
/**
* Show cart contents / total Ajax
*/
add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' );
function woocommerce_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
@jswebschmiede
jswebschmiede / functions.php
Created April 14, 2022 22:46 — forked from corsonr/functions.php
Display WooCommerce product variations dropdown select on the shop page
<?php
// Display variations dropdowns on shop page for variable products
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' );
function woo_display_variation_dropdown_on_shop_page() {
global $product;
if( $product->is_type( 'variable' )) {
@jswebschmiede
jswebschmiede / functions.php
Created April 16, 2022 09:14 — forked from claudiosanches/functions.php
WooCommerce - Hide shipping rates when free shipping is available.
<?php
/**
* Hide shipping rates when free shipping is available.
* Updated to support WooCommerce 2.6 Shipping Zones.
*
* @param array $rates Array of rates found for the package.
* @return array
*/
function my_hide_shipping_when_free_is_available( $rates ) {
$free = array();