Support » Plugin: Advanced Custom Post Types » Can not find dashicons.json – why use plugin_dir_url ?

  • Resolved mrksdiehl


    when installing the plugin I got the error that the dashicons.json could not be found in Class Dashicons on line 14 in the constructor. I have the WP_PLUGIN_URL set to a relative path (‘/’), which I think could be the reason for this not working. But why don’t you just load the dashicons.json like this:

    file_get_contents( plugin_dir_path( __FILE__ ) . 'dashicons.json')

    with plugin_dir_path instead of using plugin_dir_url? This seems like the better approach to me. You are handling the json file serverside anyway, so no need to call it by its domain name, no?

    The same problem exists in class-fields.php on line 18.
    Replacing both plugin_dir_url with plugin_dir_path let me use your plugin, which is awesome btw! Thank you very much for it, it is the perfect custom post type generator!
    But I don’t want to forgot about my change and then overwrite it with an update, so I hope you can implement this in a future release… unless I am missing something of course.

    • This topic was modified 3 years, 7 months ago by mrksdiehl.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can not find dashicons.json – why use plugin_dir_url ?’ is closed to new replies.