• I’m developing a plugin that has a hook for the_content. When it is passed this, it identifies some parameters in an img tag. For example:

    <img src="http://example.com/blah.png" protect="http://an-image-host.com/blah.png" />

    How can I get the values from src and protect? I figured someone here would be able to help, because many plugins allow users to pass parameters through HTML.

    (Also, if the earlier issue is resolved, after I get the values and evaluate something, how can I select that entire string and replace it with a different image string?) For example, replacing this:

    <img src="http://example.com/blah.png" protect="http://an-image-host.com/blah.png" />

    with this:

    <img src="http://an-image-host.com/blah.png" />

    or this:

    <img src="http://example.com/blah.png" />

    depending on what the outcome is from one of my functions.

    Thanks,
    sandman

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Get value of HTML tags?’ is closed to new replies.