Find Jobs
Hire Freelancers

PHP Code To Replace Shortcode with Images

$10-30 AUD

Completed
Posted over 8 years ago

$10-30 AUD

Paid on delivery
Hi, I want some simple PHP code written to replace certain wordpress shortcodes found in html text with this html "<a href="HREF_LINK"><img src="IMGSRC"></a>" Your code will need to extract or caluclate the "HREF_LINK" and "IMGSRC" parts from the text provided The shortcodes that I want replaced are: [embed] youtube and vimeo [video] REGARDING YOUTUBE VIDEOS contained within an [embed] shortcode ****************************************************************** e.g. [embed][login to view URL][/embed] replace with <a href="[login to view URL]"><img src="[login to view URL]"></a> REGARDING IMAGE SOURCE *************************** Youtube videos have a default image source that you can use, which is simply "[login to view URL]<youtube-video-id>/[login to view URL]" In regards to others you can simply use a static image source like "http:\\[login to view URL]" this doesn't really matter, use whatever you like as I will change that later anyway REGARDING VIDEOS - contained within [video] shortcode ********************************************************** Your code will need to extract the mp4 source e.g. "[video width="1920" height="1080" mp4="[login to view URL]][/video]" HTML TEXT TO USE: ************************* For testing purposes you can obviously create your own html text but to assist you here are examples of the shortcodes that I want you to work with <h2>My Youtube video</h2> [embed][login to view URL][/embed] <h2>My Vimeo video</h2> [embed][login to view URL][/embed] <h2>My own In house video</h2> [video width="1920" height="1080" mp4="[login to view URL]][/video] SUMMARY ************** I don't want anything complicated something like $htmltext = '<h2>My Youtube video</h2> [embed][login to view URL][/embed] <h2>My Vimeo video</h2> [embed][login to view URL][/embed] <h2>My own In house video</h2> [video width="1920" height="1080" mp4="[login to view URL]][/video]'; $htmltext = replace_sc_with_images($htmltext); I'm sure you get what I mean Thanks
Project ID: 8905030

About the project

4 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, I am a webdevelopper since 2010, worked on a lot of website like Meetic (french [login to view URL]), E-commerce, corporate website etc. About your problem, here is a small thing I did in a 15 minutes time, the remain tasks should be a pretty easy work to finish : [login to view URL] Small question : is the youtube and vimeo feed will alway be like that ? I mean, with the "?" after the youtube id, and without anything except the ID for the vimeo link ? The regular expression will not be exactly the same if there is some change between links. Best regards, Michael.
$25 AUD in 1 day
5.0 (3 reviews)
1.7
1.7
4 freelancers are bidding on average $26 AUD for this job
User Avatar
La propuesta todavía no ha sido proveída
$29 AUD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I have more than 3 years experience in php. Working on wordpress theme development and plugin development. great hands on php. give me a try, I will work fast
$25 AUD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Bendigo, Australia
5.0
31
Payment method verified
Member since Nov 14, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.