function convert_url_to_absolute_path( $file_url ) {

        // Remove WordPress site url from file url.
        $file_base = str_replace( trailingslashit( site_url() ), '', $file_url );

        // Add WordPress installation path to file base.
        $absolute_path = ABSPATH . $file_base;

        return $absolute_path;

    }
function convert_url_to_absolute_path( $file_url ) {

        // Remove WordPress site url from file url.
        $file_base = str_replace( trailingslashit( site_url() ), '', $file_url );

        // Add WordPress installation path to file base.
        $absolute_path = ABSPATH . $file_base;

        return $absolute_path;

    }
function convert_url_to_absolute_path ( $ file_url ) { // Remove WordPress site url from file url. $ file_base = str_replace ( trailingslashit ( site_url ( ) ) , '' , $ file_url ) ; // Add WordPress installation path to file base. $ absolute_path = ABSPATH . $ file_base ; return $ absolute_path ; }
Converts a url to a file into an absolute path to the file.

@param string $file_url Url to file.
@return string Absolute path to file.
Converts a url to a file into an absolute path to the file .