TinyMCE – Add class to OL – selector doesn’t seem to get parent OL,UL, just LI’s (4.6.3)

I figured this out! I ended up running across this page today searching for something else and thought, THIS IS IT.

I needed this property 'selector', because it seems like that guides what the selection should be targeting so I changed 'block' => ol to 'selector' => 'ol'.

function bb_mce_before_init_insert_formats( $init_array ) {  
  $style_formats = array(  
    array(  
      'title' => 'Bold Numbers',
      'selector' => 'ol',
      'classes' => 'bold-numbers',
      'wrapper' => true,
    )
  );
  $init_array['style_formats'] = json_encode( $style_formats );
  return $init_array;  
} 
add_filter( 'tiny_mce_before_init', 'bb_mce_before_init_insert_formats' );