• milkaa66

    (@milkaa66)


    Hey. Faced a problem, when creating a new post, instead of a redirect, the Internal Server Error 500.
    For a long time I figured out the problem of why it works on one host, and on the second, a copy of 100% does not work.

    Explain why this piece of code is needed?
    plugins / wp-user-frontend / includes / class-frontend-form-post.php
    Lines: 470 – 472

    $ dom = new DOMDocument ();
    @ $ dom-> loadHTML ($ postarr [‘post_content’]);
    $ images = $ dom-> getElementsByTagName (‘img’);

    They created a problem for me

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @milkaa66,

    Explain why this piece of code is needed?
    plugins / wp-user-frontend / includes / class-frontend-form-post.php
    Lines: 470 – 472

    This piece of code is used to check if the post content contains any images. And If any images are found then those are associated with the post as attachments.

    Regards

    Thread Starter milkaa66

    (@milkaa66)

    But as the situation showed, this is not always a working option. Perhaps this can be redone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bad code’ is closed to new replies.