Jump to content

Editing Wordpress Plugin Code


101ReasonsTo

Recommended Posts

I'm using a Wordpress plugin called YouTube Poster and it's great except I don't want the published date and Youtube video link at the bottom of the post. I think there's a way to remove those by editing the code below. I also want to include a more tag after the first 25 words in the description. Can anybody help?

 

foreach ($a->entry as $entry) {

        $ent=array();

        // get the general info data

        //$link=$entry->link;

 

 

        // media_group has the specific data

        $media=$entry->media_group;

        // next the stuff from the actual media_content to include on the page

        $murl=$media->media_content['url'];

        $link=$media->media_player['url'];

        $type=$media->media_content['type'];

        $medium=$media->media_content['medium'];

        $isDefault=$media->media_content['isDefault'];

        $expression=$media->media_content['expression'];

        $yt_format=$media->media_content['yt_format'];

        // now the other params

        $keywords=$media->media_keywords;

        $media_description=$media->media_description; // long description

        $media_title=$media->media_title; // short description

        $media_thumbnail=$media->media_thumbnail['url'];

        // now we need the YouTube id in order to keep this unique on the db

        $ss=explode('/v/',$murl);

        $ss=explode('?',$ss[1]);

        $id=$ss[0];

        $content="<p style=\"align:center;\"><object width=\"500\" height=\"344\"><param name=\"movie\" value=\"".$murl."\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"".$murl."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"425\" height=\"344\"></embed></object></p><p>$media_description</p>

 

                <a href=\"".$link."\">$media_title</a></p>";

        $excerpt="<p><a href=\"".$link."\" target=\"_blank\"><img src=\"".$media_thumbnail."\"/><br/>".$media_title.'</a></p>'; 

 

Link to comment
https://forums.phpfreaks.com/topic/244714-editing-wordpress-plugin-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.