Forums

AP Extended MIME Types
Plugin uses plugins_url, should be plugin_dir_path? (1 post)

  1. bivald
    Member
    Posted 4 months ago #

    Hi,

    The plugin uses plugins_url (i.e it tries to download the file over HTTP, instead of opening the actual file on disc). This pretty much renders the plugin useless if you have strict PHP settings (i.e can't download files over http via file()).

    Following code uses the local file, instead of remote:

    [code]
    $file = 'mime-types.txt';
    $file = plugin_dir_path(__FILE__) . $file;
    $mime_file_lines = file($file);
    [/code]

    http://wordpress.org/extend/plugins/ap-extended-mime-types/

Reply

You must log in to post.

About this Plugin

About this Topic