This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Classic Editor: Activate ics links */ | |
add_filter( 'tec_views_v2_subscribe_link_ics_visibility', '__return_true', 20 ); | |
/* Classic Editor: Make ics link first item in dropdown */ | |
add_filter( 'tec_views_v2_subscribe_links', function ($links) { | |
if (isset($links['ics']) && is_singular( 'tribe_events' )) { | |
$links = array_merge(['ics' => $links['ics']], $links); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Disable CPTs und Taxomies in ACF and ACF PRO */ | |
add_filter( 'acf/settings/enable_post_types', '__return_false' ); | |
/* Disable Options Pages in ACF PRO */ | |
add_filter( 'acf/settings/enable_options_pages_ui', '__return_false' ); | |
/* Disable Options Pages in ACF */ | |
add_action( 'admin_init', function () { | |
remove_submenu_page( 'edit.php?post_type=acf-field-group', 'acf_options_preview' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* Remove all blocks from the theme category */ | |
function custom_allowed_block_types ( $allowed_block_types, $block_editor_context ) { | |
$block_types = WP_Block_Type_Registry::get_instance()->get_all_registered(); | |
if (!empty($block_types)) { | |
$allowed_block_types = array(); | |
foreach ($block_types as $key => $value) { | |
if ($value->category != 'theme') { | |
$allowed_block_types[] = $key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Retrieve all events (with ongoing events) in October 2019 | |
$events = tribe_get_events( [ | |
'eventDisplay' => 'custom', | |
'ends_after' => '2019-10-01 00:01', | |
'starts_before' => '2019-10-31 23:59', | |
] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( 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', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the iCal and Google cal links from archive pages | |
*/ | |
function tribe_remove_calendar_export_links() { | |
if ( function_exists( 'tribe' ) ) { | |
remove_action( 'tribe_events_after_footer', array( tribe( 'tec.iCal' ), 'maybe_add_link' ) ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the iCal and Google cal links from the single event page | |
*/ | |
function tribe_remove_single_calendar_links() { | |
if ( function_exists( 'tribe' ) ) { | |
remove_action( 'tribe_events_single_event_after_the_content', array( tribe( 'tec.iCal' ), 'single_event_links' ) ); | |
} | |
} |
NewerOlder