Hi,
Thanks for the code. I tried it and it works, but there are some PHP warnings that this will throw an Error in a future version of PHP.
Warning: Use of undefined constant ‘genesis – assumed ”genesis’
Warning: Use of undefined constant blocks – assumed ‘blocks’
Warning: A non-numeric value encountered
Warning: A non-numeric value encountered
Warning: Use of undefined constant fontawesome’ – assumed ‘fontawesome”
Warning: A non-numeric value encountered in
Warning: call_user_func_array() expects parameter 1 to be a valid callback
This is the code I used:
function remove_genesis_blocks_fontawesome() {
wp_dequeue_style( 'genesis-blocks-fontawesome' );
}
add_action( 'init', 'remove_genesis_blocks_fontawesome', 20 );
add_action( 'enqueue_block_editor_assets', 'remove_genesis_blocks_fontawesome', 20 );
if ( wp_style_is( ‘genesis-blocks-fontawesome’ ) ) {
wp_dequeue_style( ‘genesis-blocks-fontawesome’ );
wp_deregister_style( ‘genesis-blocks-fontawesome’ );
}
The warnings are referring to this line:
if ( wp_style_is( ‘genesis-blocks-fontawesome’ ) ) {
-
This reply was modified 3 years, 8 months ago by handig.
-
This reply was modified 3 years, 8 months ago by handig.
-
This reply was modified 3 years, 8 months ago by handig.