Skip to content

Instantly share code, notes, and snippets.

View KZeni's full-sized avatar

Kurt Zenisek KZeni

View GitHub Profile
@claygriffiths
claygriffiths / gppa-list-users-from-entire-ms-network.php
Created November 29, 2019 20:58
GP Populate Anything: List users from entire Multisite Network
<?php
/**
* See https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ for details on how to install snippets like these.
*
* Requires GP Populate Anything 1.0-beta-3.38 or newer
*/
add_filter( 'gppa_object_type_user_limit_to_current_site', '__return_false' );

Tools to choose from

The official SASS site has a list of possible options here: https://sass-lang.com/install

There are paid options, free options, and even open source options. These are then available on Windows, Mac, and/or Linux. They’re also inter-operable so it’s not a requirement that we use the same tool (though some consistency might be nice when it comes to sharing settings, discussing things, etc.)

I’ve personally used https://codekitapp.com (paid & Mac only; my current app of choice), and http://livereload.com (has paid options for helping further development & support, but it is provided 100% free per it being fully open source [Windows option is fully free even from the main download option]).

There’s then also http://koala-app.com (free & open source), https://prepros.io (paid), https://scout-app.io (free & open source), and others.

What’s nice is that you can really use the tool of your choice and it should play nice (I know Kaitlyn uses a different tool from me) since it’s still just

function disableWPGMPolygonLineOpacityOnInteraction(){
if(window.location.href.indexOf("communities") > -1 || window.location.href.indexOf("community") > -1){
$(WPGM_Path_Polygon).each(function(i){
if(this !== window){
google.maps.event.addListener(WPGM_Path_Polygon[i], "mouseover", function(event) {
this.setOptions({strokeOpacity: 0});
});
google.maps.event.addListener(WPGM_Path_Polygon[i], "click", function(event) {
this.setOptions({strokeOpacity: 0});
});
if(isset($_GET['location']) && $_GET['location'] != ''){
$location = sanitize_text_field($_GET['location']);
}else{
$location = 'Wausau';
}
$output = '
<div id="zillow-large-search-box-widget-container" style="width:432px;overflow:hidden;background-color:#e7f1fd;color:#555; font: normal normal normal 13px verdana,arial,sans-serif;line-height:13px;margin:0 auto;padding:0;text-align:center;border:1px solid #adcfff;letter-spacing:0;text-transform:none;">
<h2 style="color:#d61;text-align:left;font-size:20px;line-height:20px;font-weight:normal;float:left;width:200px;margin-left:10px;margin-top:5px;letter-spacing:0;text-transform:none;">Find Homes</h2>
<div style="float:right;">
<a href="https://www.zillow.com/" target="_blank" rel="nofollow"><img alt="Zillow Real Estate Information" style="border:0;" src="https://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif"></img>
@ShannonScott
ShannonScott / readme.md
Last active May 6, 2024 06:15
[Transcode h265] Use ffmpeg to transcode a video to h.265 / hvc1 which will play natively on a Mac (and Linux). #tags: video, python, ffmpeg
@aaemnnosttv
aaemnnosttv / gravity-forms-select-optgroupify.php
Created October 5, 2018 09:58
GravityForms filter to allow for grouping select choices into labelled groups using special choice options.
<?php
/**
* Filter for GravityForms to group select field choices by a special "optgroup" choice.
*
* Simply add a new choice with a value of 'optgroup' to the dropdown to start a group of options.
* All following choices will be grouped under it using its label for the group.
* Any number of groups can be created, as each optgroup choice will start a new group.
* Supports field placeholder & ungrouped options, but must be before the first group.
*
* This snippet can be added to your theme's functions.php, or a custom plugin.
@michaelbourne
michaelbourne / cart-count-shortcode.php
Last active March 20, 2024 17:06
Create a simple shortcode to output the Woocommerce cart count
<?php
// Add cart count shortcode [cart_count]
// =============================================================================
add_shortcode( 'cart_count', 'mb_cart_count' );
function mb_cart_count() {
if ( class_exists( 'WooCommerce' ) && function_exists( 'WC' ) ) { // Check for WooCommerce and WC() function.
if ( ! WC()->cart->is_empty() ) {
return (string) WC()->cart->get_cart_contents_count(); // Cast to string for consistency.
@KZeni
KZeni / content-download-url-only.php
Last active October 1, 2018 08:00
Make Download Monitor's native download permalinks (which some search services grab instead of the custom endpoint in the plugin's settings) resolve to the correct download on the site. Add the `content-download-url-only.php` file to your WordPress theme and add the `functions snippet.txt` code snippet to your theme's `functions.php` file.
<?php
/**
* Simply outputs the URL for the download
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
?>
<?php $dlm_download->the_download_link(); ?>
@spivurno
spivurno / gw-gravity-forms-save-and-continue-auto-load.php
Last active August 19, 2021 19:36
Gravity Wiz // Gravity Forms // Automatic Save & Continue
<?php
/**
* Gravity Wiz // Gravity Forms // Automatic Save & Continue
*
* Automatically save
* load previously saved data (via Gravity Forms' Save & Continue functionality) when a logged-in user views a form.
*
* @version 0.4
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
@andrasguseo
andrasguseo / modify-imported-event-timezones.php
Last active November 1, 2019 21:51
Modify timezone and time when importing with EA (The Events Calendar)
<?php
/*
* Description: Modifies the timezone and the time of imported events, if the source
* feed timezone is UTC
*
* Usage: Copy the snippet into your theme's (preferably child theme's) functions.php file.
* Modify the URL and the timezone at the end of the code based on your needs
* Timzone name list: the TZ* column on this page
* https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
*