[wp-trac] [WordPress Trac] #22919: Gallery shortcode columns attribute present, even when default
WordPress Trac
noreply at wordpress.org
Thu Dec 13 15:19:11 UTC 2012
#22919: Gallery shortcode columns attribute present, even when default
-----------------------------+--------------------------
Reporter: kovshenin | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Media
Version: 3.5 | Severity: normal
Keywords: |
-----------------------------+--------------------------
I love new media! Anyway, the default columns value is 3, so here's a
scenario:
1. Add a new post
1. Hit Add Media, Create Gallery, select a few images and hit insert.
Switch to Text mode. You'll see the gallery shortcode has been inserted
with only the `ids` attribute, which is expected.
1. Make sure you're in Visual mode. Select the Gallery and hit the little
Edit Gallery button, set Columns to 5, hit Update Gallery and switch to
Text mode. You'll see that the gallery shortcode now also has
`columns="5"` which is expected.
1. Edit the gallery again and set Columns back to 3. Hit Update and switch
to Text. You'll see the shortcode has `columns="3"` but expected to see no
`columns` attribute since 3 is the default.
The same behavior happens on the `link` attribute. The "correct" behavior
happens on the `orderby="rand"` attribute, which is removed from the
shortcode when set to the default (off) state.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22919>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list