Support » Plugin: Plugin README Parser » Use local version of README

  • Resolved campg2003

    (@campg2003)


    Hi David,

    I am using a modified version of a plugin on my site, and my modified version is not publicly available. I want to display the local version of the README. Is there a way to do that?

    If not, I propose the following solutions:
    1. Look for the local README (of the requested plugin version) before looking for it on the Internet.
    2. If the specified location starts with the plugins_url, use the local version.
    3. Add a “local” option; if specified, treat the location as local.

    By “location”, I mean the second parameter of readme_parser(). I favor solution 1, but I’m not that familiar with how that might affect everyone. I might try to implement 1, but can’t promise. If I do, my initial very brief look suggests I would use the PHP file functions to read the local content instead of the remote contentin arp_get_readme or arp_get_file. I’m not familiar with the wp_remote functions and haven’t spent much time looking at the code, so I’m not sure this will work. Any suggestions would be appreciated, but as mentioned I can’t promise I’ll do it!

    Thanks.

    Gary

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Artiss

    (@dartiss)

    Hi Gary,

    Yes, this can be done.

    If you head to the ‘Other Notes’ section (https://wordpress.org/plugins/wp-readme-parser/other_notes/) and look for the parameter of ‘name’ (it’s about half way down), this will explain how it’s done.

    I tried using a local URL, but I get a 403 forbidden error. I made a local version that works for me. I’m not that familiar with PHP or writing WordPress, so please let me know if there are any poor practices.

    Thanks.

    Oh, I should have mentioned that the link is to a patch to your 1.3.5 version.

    When using a local readme file, screenshots never work. I wish there were a filter wrapped around $screenshot_url so I could change the URL to look locally.

    I am using this plugin on a website in combination with Easy Digital Downloads. Most of the plugins I am selling are not in the repo, so the screenshot URLs all break.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use local version of README’ is closed to new replies.