Forums

Break down $link in media.php (6 posts)

  1. etchel1
    Member
    Posted 7 months ago #

    Can someone break down $link for me?

    $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
    
    		$output .= "<{$itemtag} class='gallery-item'>";
    		$output .= "
    			<{$icontag} class='gallery-icon'>
    				$link
    			</{$icontag}>";

    coz I need to put "rel=fanceh" inside it to make a lightbox. I hope you guys can understand what I mean.

    break down is to give me the details little by little because I only have a little knowledge in php.

    rel is just like putting an id or a class but this one is different though. I need to put it inside the link:

    <a rel='fanceh' href='image-link'><img src='img-link' /> </a>

    ^ something like that

  2. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    Don't edit core WordPress files.

  3. etchel1
    Member
    Posted 7 months ago #

    so how will I be able to put that?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    What are you trying to do? Write a lightbox plugin?

  5. etchel1
    Member
    Posted 7 months ago #

    yes sir. I actually want to use the gallery of wordpress instead of making my own gallery. is it not really possible?

  6. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 7 months ago #

    esmi would be 'yes, ma'am' ;)

    What you want to do is write a plugin though, not edit core :)

    Can you provide more details of what you want in your own gallery? Are you just looking for a way to show, in a lightbox-esque format, the images or do you need uploading and all that jazz?

Reply

You must log in to post.

About this Topic