public function get_source_to_enqueue( $relative_path, $filename, $filename_debug = null ) {

        $source_file = $filename;

        if ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG && !empty( $filename_debug ) ) {

            $source_file = $filename_debug;

        }

        $path = realpath( trailingslashit( $relative_path ) . $source_file );

        return WP_Url_Util::get_instance()->convert_absolute_path_to_url( $path );

    }
public function get_source_to_enqueue( $relative_path, $filename, $filename_debug = null ) {

        $source_file = $filename;

        if ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG && !empty( $filename_debug ) ) {

            $source_file = $filename_debug;

        }

        $path = realpath( trailingslashit( $relative_path ) . $source_file );

        return WP_Url_Util::get_instance()->convert_absolute_path_to_url( $path );

    }
public function get_source_to_enqueue ( $ relative_path , $ filename , $ filename_debug = null ) { $ source_file = $ filename ; if ( defined ( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG && ! empty ( $ filename_debug ) ) { $ source_file = $ filename_debug ; } $ path = realpath ( trailingslashit ( $ relative_path ) . $ source_file ) ; return WP_Url_Util :: get_instance ( ) -> convert_absolute_path_to_url ( $ path ) ; }
Gets the source to enqueue based upon whether or not debugging is enabled.

@param $relative_path string Relative path to the potential files to enqueue.
@param $filename string Filename of the production file to enqueue.
@param $filename_debug string Filename of the file to enqueue when debugging.
@return string A url to the source to enqueue.
Gets the source to enqueue based upon whether or not debugging is enabled .