Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View acal's full-sized avatar

Adam acal

  • At large
  • Greystones, IR
View GitHub Profile
@ipokkel
ipokkel / pmpro-account-bullets-list-recurring-levels.php
Last active February 20, 2024 10:55
List automatically renewing (recurring) membership level in the accounts bullet list.
<?php
/**
* Add a list of recurring levels to the account page bullets.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function pmpro_account_bullets_list_recurring_levels() {
@andrewlimaza
andrewlimaza / my-pmpro-change-admin-email.php
Last active February 28, 2024 11:31
Change the admin email for all Paid Memberships Pro admin emails.
<?php
/**
* Change the email address for all admin related emails in Paid Memberships Pro.
* Follow this guide to add custom code to your WordPress site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_change_admin_to_email( $user_email, $email ){
if( strpos( $email->template, "_admin" ) !== false ) {
$user_email = 'memberadmin@someemail.co';
}
@gausam
gausam / pmpro-customizations.php
Last active April 11, 2024 13:46
Add a custom shortcode to display the payment type on a member's most recent order.
<?php
/**
* This recipe adds a custom shortcode ([mypmpro_payment_type]) custom shortcode
* to display the payment type on a member's most recent order.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
@iqbalrony
iqbalrony / functions.php
Last active May 30, 2023 10:09
How to add/use/register elementor dynamic tag with elementor free version. This is a very easy and useful system of Elementor. Especially I feel the need for this when I use URL control. Help link -> (https://developers.elementor.com/dynamic-tags/)
<?php
/**
* Post URL list
*/
if (!function_exists('prefix_get_all_posts_url')) {
function prefix_get_all_posts_url($posttype = 'post') {
$args = array(
'post_type' => $posttype,
'post_status' => 'publish',
@xxlukas42
xxlukas42 / lora_demo.ino
Created June 12, 2019 19:58
Test script based on LMIC example tested with BSFrance Lora32u4 II v1.2, don't forget to change EUIs
/*******************************************************************************
* Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
*
* Permission is hereby granted, free of charge, to anyone
* obtaining a copy of this document and accompanying files,
* to do whatever they want with them without any restriction,
* including, but not limited to, copying, modification and redistribution.
* NO WARRANTY OF ANY KIND IS PROVIDED.
*
* This example sends a valid LoRaWAN packet with payload "Hello,
@coinsandsteeldev
coinsandsteeldev / dialog.html
Last active February 7, 2024 11:23 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<!DOCTYPE html>
<html>
<head>
<script>
var data
var formId = 'form'
function drawForm() {
if (!data) return
var outputEl = document.getElementById(formId);
@vanbo
vanbo / wc-css-make-storefront-product-tabs-horizontal
Created October 27, 2017 11:33
WooCommerce: CSS to make Storefront product tabs horizontal again
.product .woocommerce-tabs ul.tabs {
width: 100%;
float: none;
margin-right: 5.8823529412%;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
list-style: none;
padding: 0 0 0 1em;
margin: 0 0 1.618em;
@ben-heath
ben-heath / add-to-woocommerce-additional-info-tab-single-product.php
Last active October 13, 2022 16:22
Add content to WooCommerce Additional Information Tab on Single Products
<?php
// This code should be added to the functions.php file of the child theme
// Add custom info to Additional Information product tab
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
global $product;
$tabs['additional_information']['callback'] = 'custom_function_name'; // this is the function name which is included below
return $tabs;
}
@absent1706
absent1706 / example.html
Last active July 24, 2021 12:10
Bootstrap-collapse rotate icon. https://jsfiddle.net/1L3xy40k/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style>
[data-toggle="collapse"][aria-expanded="true"] > .js-rotate-if-collapsed
{
-webkit-transform: rotate(180deg);
@mikejolley
mikejolley / functions.php
Created May 6, 2016 10:05
WooCommerce - Change number of displayed upsells on product pages
add_filter( 'woocommerce_upsell_display_args', 'custom_woocommerce_upsell_display_args' );
function custom_woocommerce_upsell_display_args( $args ) {
$args['posts_per_page'] = 5; // Change this number
$args['columns'] = 5; // This is the number shown per row.
return $args;
}