PluginProbe
User Submitted Posts – Enable Users to Submit Posts from the Front End / 20260916
User Submitted Posts – Enable Users to Submit Posts from the Front End v20260916
20260916 20260810 20260608 20230806 20230809 20230811 20230901 20230902 20230914 20231102 20240319 20240516 20240703 20241026 20250327 20250329 20251121 20251210 20260110 20260113 20260207 20260217 20260407 20260422 trunk All 59 releases
← All changes | library/shortcode-misc.php +10 -12 2023081120260916 View file →
@@ -147,13 +147,10 @@
147 147
148 148 /*
149 149 Shortcode: [usp_gallery]
150 150 Displays a gallery of submitted images for the current post
151 - Syntax: [usp_gallery size="" before="" after="" number="" id=""]
152 - Notes:
153 - Use curly brackets to output angle brackets
154 - Use single quotes in before/after attributes
155 - See usp_get_images() for inline notes and more infos
151 + Syntax: [usp_gallery size="" format="" target="" class="" number="" id=""]
152 + Notes: See usp_get_images() for inline notes and more infos
156 153 */
157 154 if (!function_exists('usp_gallery')) :
158 155
159 156 function usp_gallery($attr, $content = null) {
@@ -159,17 +156,18 @@
159 156 function usp_gallery($attr, $content = null) {
160 157
161 158 extract(shortcode_atts(array(
162 159
163 - 'size' => 'thumbnail',
164 - 'before' => '{a href="%%url%%"}{img src="',
165 - 'after' => '" /}{/a}',
166 - 'number' => false,
167 - 'id' => false,
160 + 'size' => 'thumbnail',
161 + 'format' => 'image',
162 + 'target' => 'blank',
163 + 'class' => '',
164 + 'number' => 100,
165 + 'id' => false,
168 166
169 167 ), $attr));
170 168
171 - $images = usp_get_images($size, $before, $after, $number, $id);
169 + $images = usp_get_images($size, $format, $target, $class, $number, $id);
172 170
173 171 $gallery = '';
174 172
175 173 foreach ($images as $image) $gallery .= $image;
@@ -180,5 +178,5 @@
180 178
181 179 }
182 180 add_shortcode('usp_gallery', 'usp_gallery');
183 181
184 -endif;
182 +endif;