• Please be advised that my blog has NSFW content.

    Would it be possible to change one shortcode into another shortcode in all posts? The search/replace function would just need to take the name of the video from the first shortcode and insert that name into the second shortcode in two places.

    This is how the shortcodes look like:

    FIRST SHORTCODE:

    [flv:https://www.roughstraightmen.com/wp-content/videos/name_of_video.flv 500 281]
    
    [flv:https://www.roughstraightmen.com/wp-content/videos/name_of_video.mp4 500 375]

    This is the older Flash video shortcode in its two variants. Actually it’s the same shortcode, but the video file can be either a .flv or .mp4 file, so to the search function it would perhaps look like two shortcodes. Both of them should be converted into the second shortcode, which exists only in one variant (for mp4 files).

    THE SECOND SHORTCODE:

    [fvplayer src='https://www.roughstraightmen.com/wp-content/videos/name_of_video.mp4' splash=https://www.roughstraightmen.com/wp-content/videos/name_of_video.jpg splashend=show width=550 height=309]

    So, essentially the only string from the first shortcode that needs to be inserted into the second shortcode is the name of the video file (and to change that name from something.flv into something.mp4, if necessary).

    This name of the video file is usually a shorter string that contains an underscore character. For example: joe_trailer1.mp4 or janet_trailer5.flv.

    I used an older video flash plugin to show flv and mp4 videos on my blog (as flash videos) for several years before I switched to a newer video plugin which displays videos using the HTML5 technology.

    Since Adobe has recently discontinued all support for their Flash plugin, and most browsers don’t display flash videos anymore, I suddenly got a significant number of posts on my blog that have the embedded flash player which virtually nobody can watch anymore.

    So, it would be fantastic if this search/replace job is possible to accomplish with your plugin. Needless to say, I can then avoid doing this manually, and save a lot of time and effort. If it is possible, I would be extremely thankful if you could write the exact codes that I need to put into the plugin.

    • This topic was modified 3 years, 6 months ago by cennadron.

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

  • The topic ‘[NSFW] Is it possible to replace one shortcode with another shortcode in all posts?’ is closed to new replies.