Skip to content

Instantly share code, notes, and snippets.

@elimn
elimn / reclaimWindows10.ps1
Created Jul 28, 2017 — 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)
View reclaimWindows10.ps1
##########
# 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 Jun 16, 2017
MT | Example for deregistering a script
View tribe_dequeue_script_example.php
<?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 Apr 24, 2017
MT | ET | Add a + Google Calendar link to each ticket in the tickets email
View tribe_add_gcal_to_email.php
<?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 Mar 30, 2017
MT | TEC | Hide the address line on archive views
View tribe_hide_full_address_archive.php
<?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 Mar 15, 2017
MT | TEC | Change List Widget's View More link to go to Page 2 of the calendar
View tribe_customize_widget_view_more_link.php
@elimn
elimn / tribe_additional_feed_views.php
Last active Mar 23, 2017
MT | TEC | Add more display options to the ical feeds
View tribe_additional_feed_views.php
<?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 Mar 1, 2017
MT | ETP | Ask users to enable JavaScript before checking out with ET+
View Tribe__Snippet__Attendee_Meta_Noscript.php
<?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 Mar 1, 2017
MT | ECP | Add a recurring all body class to the recurring all page
View tribe_body_class_recurring_all.php
<?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 Mar 8, 2017
MT | TEC | Change the recurrent events see all page to a different URL
View Tribe__Snippet__Change_All_Link.php
@elimn
elimn / tribe_hide_woo_quantity_change.php
Created Feb 21, 2017
MT | ETP | Hides the Woo Quantity fields on the cart pages
View tribe_hide_woo_quantity_change.php
<?php
/**
* Hide the WooCommerce quantity adjustment fields on cart pages
*/
function tribe_hide_woo_quantity_change() {
if ( ! is_cart() ) {
return;
}