WordPress.org

Ready to get started?Download WordPress

Forums

Delightful Downloads
Solution download file different port (1 post)

  1. kapsule
    Member
    Posted 8 months ago #

    Hello

    Then tell them that I applied the solution for those who have a URL with a different port (80). By having a different port discharge process does not work. By clicking on the link shows "the file does not exist." That is why I implemented the following code in the functions.php file of the plugin.

    function dedo_root_url function ($ path ='')
    {
    $ url = parse_url (site_url ());

    if ($ _SERVER ["SERVER_PORT"]! = 80) {
    $ url = $ url ['scheme']. ':/ /'. $ url ['host']. ':'. $ _SERVER ["SERVER_PORT"]. $ path;
    }
    else {$ url = $ url ['scheme']. ':/ /'. $ url ['host']. $ path;}

    return $ url;
    }

    I hope you find it helpful.

    http://wordpress.org/plugins/delightful-downloads/

Reply

You must log in to post.

About this Plugin

About this Topic