Skip to content

Instantly share code, notes, and snippets.

View sinebeef's full-sized avatar
💋
hnnnnggggggg

sinebeef sinebeef

💋
hnnnnggggggg
  • London
View GitHub Profile
@ibndawood
ibndawood / functions.php
Created January 16, 2019 06:11
Electro - Remove TGMPA notification
add_action( 'init', 'ec_child_remove_tgmpa_notification' );
function ec_child_remove_tgmpa_notification() {
remove_action( 'tgmpa_register', 'electro_register_required_plugins', 10 );
}
@zackkatz
zackkatz / gf-import-entries-send-notifications.php
Created May 4, 2017 18:43
Gravity Forms Import Entries - Send notifications for each imported entry
<?php
add_action( 'gform_post_add_entry', 'gv_import_entry_send_notifications', 10, 2 );
/**
* Send notifications
*
* @param $entry
* @param $form
*/
@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;
}
@estrattonbailey
estrattonbailey / object-fit-lazyload.js
Last active June 17, 2019 16:29
Object Fit + Layzr Lazy Load
const objectFit = document.documentElement.style.hasOwnProperty('objectFit')
const images = Layzr({ threshold: 90 })
images.on('src:after', img => {
let parent = img.parentNode
// optional, to style loaded state
parent.setAttribute('data-lazy', 'is-loaded')
@mor10
mor10 / functions.php
Created July 11, 2016 23:44
Custom page template with no sidebar for Twenty Sixteen child theme
<?php
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array (Maybe) filtered body classes.
*/
function wpcampus_body_classes( $classes ) {
// Adds a class of no-sidebar to custom no-sidebar page template.
if ( is_page_template('page-no-sidebar.php') ) {
@butlerblog
butlerblog / wp_config.php
Last active February 1, 2024 09:00
Configure WordPress #wp_mail function to send through #SMTP server https://b.utler.co/Y3
<?php
/*
* Set the following constants in wp-config.php.
* These should be added somewhere BEFORE the constant ABSPATH is defined.
*
* Author: Chad Butler
* Author URI: https://butlerblog.com
*
* For more information and instructions, see: https://b.utler.co/Y3
@kauhat
kauhat / .bashrc
Last active January 11, 2020 20:26
WP-CLI setup on Tsohost and Heart Internet shared servers
# Add ~/bin directory to path if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$PATH:$HOME/bin"
fi
# Set up alias for WP CLI
alias wp="php-7.2 $HOME/bin/wp-cli.phar"
@bekarice
bekarice / edit-woocommerce-checkout-template.php
Last active October 28, 2024 06:16
Add content and notices to the WooCommerce checkout - sample code
/**
* Each of these samples can be used - note that you should pick one rather than add them all.
*
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/
**/
/**
* Add a content block after all notices, such as the login and coupon notices.
*
@kennedy
kennedy / BF888S_default_01012019.csv
Last active May 5, 2025 13:23
Baofeng BF888S default frequencies
Location Name Frequency Duplex Offset Tone rToneFreq cToneFreq DtcsCode DtcsPolarity Mode TStep Skip Comment URCALL RPT1CALL RPT2CALL DVCODE
1 462.125000 0.000000 TSQL 88.5 69.3 023 NN FM 5.00 S
2 462.225000 0.000000 88.5 88.5 023 NN FM 5.00 S
3 462.325000 0.000000 88.5 88.5 023 NN FM 5.00 S
4 462.425000 0.000000 TSQL 88.5 103.5 023 NN FM 5.00 S
5 462.525000 0.000000 TSQL 88.5 114.8 023 NN FM 5.00 S
6 462.625000 0.000000 TSQL 88.5 127.3 023 NN FM 5.00 S
7 462.725000 0.000000 TSQL 88.5 136.5 023 NN FM 5.00 S
8 462.825000 0.000000 TSQL 88.5 162.2 023 NN FM 5.00 S
9 462.925000 0.000000 DTCS 88.5 88.5 023 NN FM 5.00 S
@spivurno
spivurno / gw-gravity-forms-advanced-merge-tags.php
Last active May 5, 2022 18:54
Gravity Wiz // Gravity Forms // Advanced Merge Tags
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-advanced-merge-tags.php
*/
/**
* Gravity Wiz // Gravity Forms // Advanced Merge Tags
*
* Adds support for several advanced merge tags: