function optionsframework_media_scripts( $hook ) {

		$menu = Options_Framework_Admin::menu_settings();

        if ( substr( $hook, -strlen( $menu['menu_slug'] ) ) !== $menu['menu_slug'] )
	        return;

		if ( function_exists( 'wp_enqueue_media' ) )
			wp_enqueue_media();

		wp_register_script( 'of-media-uploader', plugin_dir_url( dirname(__FILE__) ) .'js/media-uploader.js', array( 'jquery' ), Options_Framework::VERSION );
		wp_enqueue_script( 'of-media-uploader' );
		wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array(
			'upload' => __( 'Upload', 'options-framework' ),
			'remove' => __( 'Remove', 'options-framework' )
		) );
	}
function optionsframework_media_scripts( $hook ) {

		$menu = Options_Framework_Admin::menu_settings();

        if ( substr( $hook, -strlen( $menu['menu_slug'] ) ) !== $menu['menu_slug'] )
	        return;

		if ( function_exists( 'wp_enqueue_media' ) )
			wp_enqueue_media();

		wp_register_script( 'of-media-uploader', plugin_dir_url( dirname(__FILE__) ) .'js/media-uploader.js', array( 'jquery' ), Options_Framework::VERSION );
		wp_enqueue_script( 'of-media-uploader' );
		wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array(
			'upload' => __( 'Upload', 'options-framework' ),
			'remove' => __( 'Remove', 'options-framework' )
		) );
	}
function optionsframework_media_scripts ( $ hook ) { $ menu = Options_Framework_Admin :: menu_settings ( ) ; if ( substr ( $ hook , - strlen ( $ menu [ 'menu_slug' ] ) ) !== $ menu [ 'menu_slug' ] ) return ; if ( function_exists ( 'wp_enqueue_media' ) ) wp_enqueue_media ( ) ; wp_register_script ( 'of-media-uploader' , plugin_dir_url ( dirname ( __FILE__ ) ) . 'js/media-uploader.js' , array ( 'jquery' ) , Options_Framework :: VERSION ) ; wp_enqueue_script ( 'of-media-uploader' ) ; wp_localize_script ( 'of-media-uploader' , 'optionsframework_l10n' , array ( 'upload' => __ ( 'Upload' , 'options-framework' ) , 'remove' => __ ( 'Remove' , 'options-framework' ) ) ) ; }
Enqueue scripts for file uploader
Enqueue scripts for file uploader