This file contains hidden or 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 hidden or 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 hidden or 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); | |
} |
OlderNewer