• 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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Don’t edit core WordPress files.

    Thread Starter etchel1

    (@etchel1)

    so how will I be able to put that?

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

    Thread Starter etchel1

    (@etchel1)

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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Break down $link in media.php’ is closed to new replies.