Skip to content

Instantly share code, notes, and snippets.

View ivo-ivanov's full-sized avatar
🚀

Ivo Ivanov ivo-ivanov

🚀
View GitHub Profile
@ivo-ivanov
ivo-ivanov / admin-styles
Last active March 4, 2019 11:20
Enque inline admin styles from functions.php #wordpress
add_action('admin_head', 'admin_css');
function admin_css() {
echo '<style>
.acf-gallery .acf-gallery-side-data textarea {
display: none;
}
</style>';
}
@ivo-ivanov
ivo-ivanov / disable-default-gutenberg-blocks
Last active September 23, 2019 07:29
Disable all default gutenberg block types and allow custom blocks #wordpress #gutenberg
//Disable all default block types and allow custom blocks
add_filter( 'allowed_block_types', 'show_only_custom_blocks' );
function show_only_custom_blockss( $allowed_blocks ) {
return array(
'custom-block-category/text',
);
}