• Resolved Contemplating Sweets

    (@contemplatingsweets)


    I am using the wprm plugin. Youtube Lyte will not read the videos located inside of the plugin. I have read other posts that state it is possible to read videos that are embedded within this particular plugin with some code modifications. The filters for the wprm plugin are locate at:

    https://help.bootstrapped.ventures/article/129-plugin-hooks-and-filters

    There is a short code used for the video area [wprm-recipe-video] short codes can be filtered according to the page above.

    I am not familiar enough with php to put these pieces together. I assume that I add the your custom fields code plus the filters to the functions.php. If you can give me some direction that would be great. Thanks.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    This is an example of what _migth_ work. I can’t test it, so use with care!

    function recipe_name_output( $output, $attributes, $recipe ) {
        if ( function_exists('lyte_parse') ) {
            $output = lyte_parse( $output );
        }
        return $output;
    }
    add_filter( 'wprm_recipe_name_shortcode', 'recipe_name_output', 10, 3 );

    hope this helps,
    frank

    Thread Starter Contemplating Sweets

    (@contemplatingsweets)

    Thanks for this. For anyone else who needs to know, I did have to adapt this a bit. I used the following

    function recipe_video_output( $output, $attributes, $recipe ) {
        if ( function_exists('lyte_parse') ) {
            $output = lyte_parse( $output );
        }
        return $output;
    }
    add_filter( 'wprm_recipe_video_shortcode', 'recipe_video_output', 10, 3 );

    It works perfectly! Thanks so much for your help! This has been a difficult problem to solve.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

    frank

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘need code to read a video embeded inside a plugin’ is closed to new replies.