Use template file from module
I haven't checked the rest of the code but 

if ($block_bundle = 'my_block_bundle') {


should be 

if ($block_bundle == 'my_block_bundle') {

// you could also use
$suggestions[] = 'your_suggestion' // instead of the splice