Skip to content

Instantly share code, notes, and snippets.

@elimn
elimn / reclaimWindows10.ps1
Created July 28, 2017 16:29 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@elimn
elimn / tribe_dequeue_script_example.php
Created June 16, 2017 19:18
MT | Example for deregistering a script
<?php
/**
* An example for how to dequeue a script
*
* Obtain the handle of your script by searching through the code, and then
* add a wp_deregister_script() function call for that handle.
*/
function tribe_dequeue_script_example() {
wp_deregister_script( 'tribe-events-jquery-resize' );
@elimn
elimn / tribe_add_gcal_to_email.php
Created April 24, 2017 16:04
MT | ET | Add a + Google Calendar link to each ticket in the tickets email
<?php
/**
* Adds a + Google Calendar link to each ticket in the tickets email
*/
function tribe_add_gcal_to_email( $event ) {
printf(
'<a class="tribe-events-gcal tribe-events-button" href="%1$s" title="%2$s">%3$s</a>',
Tribe__Events__Main::instance()->esc_gcal_url( tribe_get_gcal_link( $event ) ),
esc_attr__( 'Add to Google Calendar', 'the-events-calendar' ),
@elimn
elimn / tribe_hide_full_address_archive.php
Created March 30, 2017 00:28
MT | TEC | Hide the address line on archive views
<?php
/**
* Hides the address line on archive views
*/
function tribe_hide_full_address_archive() {
if ( is_main_query() && ! is_single() ) {
add_filter( 'tribe_get_full_address', '__return_empty_string' );
}
}
@elimn
elimn / tribe_customize_widget_view_more_link.php
Created March 15, 2017 20:18
MT | TEC | Change List Widget's View More link to go to Page 2 of the calendar
@elimn
elimn / tribe_additional_feed_views.php
Last active March 23, 2017 14:54
MT | TEC | Add more display options to the ical feeds
<?php
/**
* Adds more display options to the ical feeds
*
* This will show recently published events, up to 40 of them:
* events-slug/?ical=1&tribe_display=recently-published&tribe_posts_amount=40
*
* This will show all events in the year 2012
* events-slug/?ical=1&tribe_display=year&eventDate=2012
@elimn
elimn / Tribe__Snippet__Attendee_Meta_Noscript.php
Created March 1, 2017 21:24
MT | ETP | Ask users to enable JavaScript before checking out with ET+
<?php
/**
* Adds a notice to your ticket purchase forms asking users without JavaScript enabled to enable it
*/
class Tribe__Snippet__Attendee_Meta_Noscript {
protected $tickets_hook;
public function __construct() {
add_filter( 'tribe_tickets_commerce_tickets_form_hook', array( $this, 'get_hook' ), PHP_INT_MAX );
@elimn
elimn / tribe_body_class_recurring_all.php
Created March 1, 2017 08:46
MT | ECP | Add a recurring all body class to the recurring all page
<?php
if ( ! function_exists( 'tribe_body_class_recurring_all' ) ) {
/**
* Adds a recurring all body class to the recurring all page
*
* @see body_class
*/
function tribe_body_class_recurring_all( $classes, $class ) {
@elimn
elimn / Tribe__Snippet__Change_All_Link.php
Last active March 8, 2017 14:25
MT | TEC | Change the recurrent events see all page to a different URL
@elimn
elimn / tribe_hide_woo_quantity_change.php
Created February 21, 2017 18:05
MT | ETP | Hides the Woo Quantity fields on the cart pages
<?php
/**
* Hide the WooCommerce quantity adjustment fields on cart pages
*/
function tribe_hide_woo_quantity_change() {
if ( ! is_cart() ) {
return;
}