✨feature: Remove unused/replaced blocks, remove gravity forms styling
Sync TODOs with Issues / sync_todos (push) Successful in 7s
Sync TODOs with Issues / sync_todos (push) Successful in 7s
This commit is contained in:
@@ -138,6 +138,28 @@ add_filter(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove unused or replaced core blocks
|
||||||
|
*
|
||||||
|
* @return array List of allowed block types
|
||||||
|
*/
|
||||||
|
add_filter(
|
||||||
|
'allowed_block_types_all',
|
||||||
|
function () {
|
||||||
|
// get all the registered blocks
|
||||||
|
$blocks = \WP_Block_Type_Registry::get_instance()->get_all_registered();
|
||||||
|
|
||||||
|
// then disable some of them
|
||||||
|
unset( $blocks['core/media-text'] );
|
||||||
|
unset( $blocks['core/calendar'] );
|
||||||
|
unset( $blocks['core/buttons'] );
|
||||||
|
unset( $blocks['core/search'] );
|
||||||
|
|
||||||
|
// return the new list of allowed blocks
|
||||||
|
return array_keys( $blocks );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WP Cleanup
|
* WP Cleanup
|
||||||
*/
|
*/
|
||||||
@@ -241,6 +263,13 @@ add_action(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable Gravity Forms theme CSS
|
||||||
|
*/
|
||||||
|
add_filter( 'gform_disable_css', '__return_true' );
|
||||||
|
add_filter( 'gform_disable_form_theme_css', '__return_true' );
|
||||||
|
add_filter( 'gform_disable_form_legacy_css', '__return_true' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the email address used as the sender in outgoing emails.
|
* Filters the email address used as the sender in outgoing emails.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user