Skip to content

Instantly share code, notes, and snippets.

@ericjuden
ericjuden / functions.php
Last active September 3, 2020 13:07
Taxonomy Dropdown Control for WordPress Theme Customizer
<?php
add_action('customize_register', 'my_customize_register');
function my_customize_register($wp_customize){
require_once(TEMPLATEPATH . '/class/wp_customizer_taxonomy_dropdown.php');
$wp_customize->add_section('my_theme_blog_featured_categories', array(
'title' => __('Blog: Featured Categories'),
'priority' => 36,
));
@elimn
elimn / tribe_remove_single_calendar_links.php
Created February 14, 2017 07:39
MT | TEC | Remove the iCal and Google cal links from the single event page
<?php
/**
* Class Customize_Postmeta_Setting.
*
* @package WPSE_257322
*/
namespace WPSE_257322;
/**
@pento
pento / stars-block.js
Last active January 4, 2022 14:00
Gutenberg Stars Block
( function( blocks, element ) {
var el = element.createElement;
function Stars( { stars } ) {
return el( 'div', { key: 'stars' },
'★'.repeat( stars ),
( ( stars * 2 ) % 2 ) ? '½' : '' );
}
blocks.registerBlockType( 'stars/stars-block', {
@lukecav
lukecav / functions.php
Last active September 7, 2018 07:39
Remove the try Gutenberg panel from the dashboard in WordPress admin (WP 4.9.7)
remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
@andrasguseo
andrasguseo / modify-imported-event-venue.php
Created April 17, 2018 08:45
Modify / remove event venue when importing with EA (The Events Calendar)
<?php
/*
* Description: Removes the venue details from the imported event
* Note: Once the event, venue. etc are imported it forces PRO
* to recalculate the venue coords via Google
*
* Usage: modify the URL at the end of the code based on your needs
*
* Version: 1.0
* Plugins: The Events Calendar (Event Aggregator)
@tomjn
tomjn / p2020.diff
Created August 6, 2020 17:20
Changes needed for p2020 theme to work without wp.com
Index: functions.php
===================================================================
--- functions.php (revision 56804)
+++ functions.php (working copy)
@@ -7,9 +7,19 @@
namespace P2020;
+function is_automattician() {
+ return false;