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 +14 -18 2023080920260916 View file →
@@ -7,18 +7,16 @@
7 7 Attributes:
8 8 class = classes for the parent element (optional, default: none)
9 9 value = link text (optional, default: "Reset form")
10 10 url = the URL where your form is displayed (can use %%current%% for current URL)
11 - custom = any attributes or custom code for the link element
12 11
13 12 */
14 13 function usp_reset_button_shortcode($args) {
15 14
16 15 extract(shortcode_atts(array(
17 - 'class' => '',
18 - 'value' => __('Reset form', 'usp'),
19 - 'url' => '#please-check-shortcode',
20 - 'custom' => '',
16 + 'class' => '',
17 + 'value' => __('Reset form', 'usp'),
18 + 'url' => '#please-check-shortcode',
21 19 ), $args));
22 20
23 21 $protocol = is_ssl() ? 'https://' : 'http://';
24 22
@@ -33,9 +31,9 @@
33 31 $href = get_option('permalink_structure') ? $url .'?usp_reset_form=true"' : $url .'&usp_reset_form=true';
34 32
35 33 $class = empty($class) ? '' : ' class="'. esc_attr($class) .'"';
36 34
37 - $output = '<p'. $class .'><a href="'. esc_url($href) .'"'. esc_attr($custom) .'>'. esc_html($value) .'</a></p>';
35 + $output = '<p'. $class .'><a href="'. esc_url($href) .'">'. esc_html($value) .'</a></p>';
38 36
39 37 return $output;
40 38
41 39 }
@@ -149,13 +147,10 @@
149 147
150 148 /*
151 149 Shortcode: [usp_gallery]
152 150 Displays a gallery of submitted images for the current post
153 - Syntax: [usp_gallery size="" before="" after="" number="" id=""]
154 - Notes:
155 - Use curly brackets to output angle brackets
156 - Use single quotes in before/after attributes
157 - 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
158 153 */
159 154 if (!function_exists('usp_gallery')) :
160 155
161 156 function usp_gallery($attr, $content = null) {
@@ -161,17 +156,18 @@
161 156 function usp_gallery($attr, $content = null) {
162 157
163 158 extract(shortcode_atts(array(
164 159
165 - 'size' => 'thumbnail',
166 - 'before' => '{a href="%%url%%"}{img src="',
167 - 'after' => '" /}{/a}',
168 - 'number' => false,
169 - 'id' => false,
160 + 'size' => 'thumbnail',
161 + 'format' => 'image',
162 + 'target' => 'blank',
163 + 'class' => '',
164 + 'number' => 100,
165 + 'id' => false,
170 166
171 167 ), $attr));
172 168
173 - $images = usp_get_images($size, $before, $after, $number, $id);
169 + $images = usp_get_images($size, $format, $target, $class, $number, $id);
174 170
175 171 $gallery = '';
176 172
177 173 foreach ($images as $image) $gallery .= $image;
@@ -182,5 +178,5 @@
182 178
183 179 }
184 180 add_shortcode('usp_gallery', 'usp_gallery');
185 181
186 -endif;
182 +endif;