Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Update the gallery shortcode #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update the gallery shortcode #144

wants to merge 1 commit into from

Conversation

McGun
Copy link

@McGun McGun commented Jul 10, 2013

Now the images does not have to be attached to the specific post/page as the shortcodes goes in.

Someone may have to look a bit closer to the code. I'm not a php-guru, but it took me a few hours to work this out. Anyway, I hope this contributes to the project.

Now the images does not have to be attached to the specific post/page as the shortcodes goes in.

Someone may have to look a bit closer to the code. I'm not a php-guru, but it took me a few hours to work this out. Anyway, I hope this contributes to the project.
@noahbass
Copy link
Contributor

Yes, there are a few issues with the gallery atm.

@McGun, switching to your branch through out a few errors:

Notice: Undefined variable: array in /Users/noah/Repos/wordpress-bootstrap/wp-content/themes/wordpress-bootstrap/library/shortcodes.php on line 15

Notice: Undefined variable: post in /Users/noah/Repos/wordpress-bootstrap/wp-content/themes/wordpress-bootstrap/library/shortcodes.php on line 18

Notice: Trying to get property of non-object in /Users/noah/Repos/wordpress-bootstrap/wp-content/themes/wordpress-bootstrap/library/shortcodes.php on line 18

Notice: Undefined index: in /Users/noah/Repos/wordpress-bootstrap/wp-content/themes/wordpress-bootstrap/library/shortcodes.php on line 28

Notice: Trying to get property of non-object in /Users/noah/Repos/wordpress-bootstrap/wp-content/themes/wordpress-bootstrap/library/shortcodes.php on line 31

Notice: Trying to get property of non-object in /Users/noah/Repos/wordpress-bootstrap/wp-content/themes/wordpress-bootstrap/library/shortcodes.php on line 32
Missing Attachment

The original code shows the gallery. Hopefully a couple of fixes will make it work.

@jsmeltzer
Copy link

The solution is here
#97

@McGun
Copy link
Author

McGun commented Jul 11, 2013

Great that there already is a solution! =)

@rondavis007
Copy link

This code fix is broken. The new line #15 is:

$ids = explode(",",$array['ids']);

it should be:

$ids = explode(",",$attr['ids']);

@19th
Copy link

19th commented Nov 4, 2013

Guys, I found a little bug in new line #32:

$output .= wp_get_attachment_link( $attachment->ID , 'thubnail', true );

should be

$output .= wp_get_attachment_link( $attachment->ID , 'thumbnail', true );

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants