• Resolved Denis

    (@denis_miller)


    Hi! Many thanks for plugin! It works awesome!

    $data = json_decode($return);
    $content = preg_replace(
    "#<a href=\"" . $video[0] . "\">.*?</a>#u",
    $data->html,
    $content
    );

    Small change request. Could you add verification for non-existing video?

    Ex: some warning message… because now it’s just PHP error. $data->html is null.

    • This topic was modified 2 years, 8 months ago by Denis.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    Heya @denis_miller,

    I’m glad you like the plugin! ??
    I’m doing my best to make more awesome stuff in the next months hehe

    I guess your message is related to the next one, in the case of multiple Vimeo movies only the first one was rendered. Fixed ??

    If the video does not exist or is not allowed to be embedded (no data->html property), right now the default output – an HTML link – is displayed.
    Could you please tell me more about the warning message? Do you mean outputting the error message to the server log for example? Or adding a warning message to the edit screen?

    Kind regards,

    Peter

    Thread Starter Denis

    (@denis_miller)

    Sure.

    Repro:
    1. define( ‘WP_DEBUG’, true );
    1. Put nonexisting vimeo URL
    2. Open page

    Actual:
    Notice: Trying to get property ‘html’ of non-object in /home/g/glav/public_html/wp-content/plugins/markup-markdown/markup-markdown.php on line 248

    Expected:
    Just url. I could click and verify link. Or maybe some phrases to guide about issue.

    • This reply was modified 2 years, 8 months ago by Denis.
    • This reply was modified 2 years, 8 months ago by Denis.
    Thread Starter Denis

    (@denis_miller)

    [resolved by mistake]

    • This reply was modified 2 years, 8 months ago by Denis.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404’ is closed to new replies.