valendesigns/option-tree — pull request #255 by bitcommit (2014-02-09 08:56:55+00:00)
Title: Make Radio Image source filterable

Related to https://github.com/valendesigns/option-tree/issues/109

Allows to filter the Radio Image src URL. If using OptionTree from a plugin (rather than from a theme), then paths to images will neither be in the theme directory (`OT_THEME_URL`) neither in the option-tree plugin directory (`OT_URL`), but will instead be located in the current plugin directory, which can be set only by the plugin itself using a filter.

Example usage:

add_filter('ot_radio_image_src', 'bitcommit_radio_image_src', 10, 2);
function bitcommit_radio_image_src($src, $field_id) {

$src = str_replace( 'MY_CUSTOM_PLUGIN', plugin_dir_url( __FILE__ ), $src );
return $src;
}