PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / trunk
Shortcodes and extra features for Phlox theme vtrunk
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elements / quote.php
auxin-elements / includes / elements Last commit date
about-widget.php 5 months ago accordion-widget.php 1 month ago accordion.php 5 months ago attachment-url.php 5 months ago audio.php 5 months ago before-after.php 5 months ago button.php 5 months ago code.php 5 months ago contact-box.php 5 months ago contact-form.php 5 months ago custom-list.php 5 months ago divider.php 5 months ago dropcap.php 5 months ago facebook.php 5 months ago flickr.php 5 months ago gallery.php 5 months ago gmap.php 5 months ago highlight.php 5 months ago image.php 5 months ago instagram-feed.php 5 months ago latest-posts-slider.php 5 months ago popular-posts-widget.php 5 months ago products-grid.php 5 months ago quote.php 5 months ago recent-posts-grid-carousel.php 5 months ago recent-posts-land-style.php 5 months ago recent-posts-masonry.php 5 months ago recent-posts-tiles-carousel.php 5 months ago recent-posts-tiles.php 5 months ago recent-posts-timeline.php 5 months ago recent-posts-widget.php 5 months ago recent-products.php 5 months ago related-posts.php 8 years ago sample-element.php 5 months ago search.php 5 months ago socials-list.php 5 months ago staff.php 5 months ago tab-widget.php 5 months ago tabs.php 5 months ago testimonial.php 5 months ago text.php 5 months ago touch-slider.php 5 months ago video.php 5 months ago
quote.php
286 lines
1 <?php
2 /**
3 * Quote element
4 *
5 *
6 * @package Auxin
7 * @license LICENSE.txt
8 * @author averta
9 * @link http://phlox.pro/
10 * @copyright (c) 2010-2026 averta
11 */
12 function auxin_get_quote_master_array( $master_array ) {
13
14 $master_array['aux_quote'] = array(
15 'name' => __("Quote", 'auxin-elements' ),
16 'auxin_output_callback' => 'auxin_widget_quote_callback',
17 'base' => 'aux_quote',
18 'description' => __('Blockquote and introduction paragraph', 'auxin-elements' ),
19 'class' => 'aux-widget-quote',
20 'show_settings_on_create' => true,
21 'weight' => 1,
22 'category' => THEME_NAME,
23 'is_widget' => true,
24 'is_shortcode' => true,
25 'group' => '',
26 'admin_enqueue_js' => '',
27 'admin_enqueue_css' => '',
28 'front_enqueue_js' => '',
29 'front_enqueue_css' => '',
30 'icon' => 'aux-element aux-pb-icons-quote',
31 'custom_markup' => '',
32 'js_view' => '',
33 'html_template' => '',
34 'deprecated' => '',
35 'content_element' => '',
36 'as_parent' => '',
37 'as_child' => '',
38 'params' => array(
39 array(
40 'heading' => __('Quote text','auxin-elements' ),
41 'description' => __('Enter a text as a quote.','auxin-elements' ),
42 'param_name' => 'content',
43 'type' => 'textarea_html',
44 'value' => '',
45 'holder' => '',
46 'class' => 'content',
47 'admin_label' => false,
48 'dependency' => '',
49 'weight' => '',
50 'group' => '' ,
51 'edit_field_class' => ''
52 ),
53 array(
54 'heading' => __('Blockqoute style','auxin-elements' ),
55 'description' => '',
56 'param_name' => 'type',
57 'type' => 'aux_visual_select',
58 'def_value' => 'blockquote-normal',
59 'choices' => array(
60 'quote-normal' => array(
61 'label' => __('Quote Normal', 'auxin-elements'),
62 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal-1.svg'
63 ),
64 'blockquote-normal' => array(
65 'label' => __('Blockquote Normal', 'auxin-elements'),
66 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal.svg'
67 ),
68 'blockquote-bordered' => array(
69 'label' => __('Blockquote Bordered', 'auxin-elements'),
70 'image' => AUXIN_URL . 'images/visual-select/blockquote-bordered.svg'
71 ),
72 'intro-normal' => array(
73 'label' => __('Intro', 'auxin-elements'),
74 'image' => AUXIN_URL . 'images/visual-select/quote-intro-normal.svg'
75 ),
76 'intro-hero' => array(
77 'label' => __('Intro Hero', 'auxin-elements'),
78 'image' => AUXIN_URL . 'images/visual-select/quote-intro-hero.svg'
79 ),
80 'intro-splitter' => array(
81 'label' => __('Intro with Splitter', 'auxin-elements'),
82 'image' => AUXIN_URL . 'images/visual-select/quote-intro-splitter.svg'
83 ),
84 'pullquote-normal' => array(
85 'label' => __('Pullquote Normal', 'auxin-elements'),
86 'image' => AUXIN_URL . 'images/visual-select/pullquote-normal.svg'
87 ),
88 'pullquote-colorized' => array(
89 'label' => __('Pullquote Colorized', 'auxin-elements'),
90 'image' => AUXIN_URL . 'images/visual-select/pullquote-colorized.svg'
91 )
92 ),
93 'holder' => '',
94 'class' => 'type',
95 'admin_label' => true,
96 'dependency' => '',
97 'weight' => '',
98 'group' => '' ,
99 'edit_field_class' => ''
100 ),
101 array(
102 'heading' => __('Text alignment','auxin-elements' ),
103 'description' => '',
104 'param_name' => 'text_align',
105 'type' => 'dropdown',
106 'def_value' => 'none',
107 'value' => array(
108 'none' => __('Default', 'auxin-elements' ),
109 'left' => __('Left' , 'auxin-elements' ),
110 'right' => __('Right' , 'auxin-elements' ),
111 'center' => __('Center' , 'auxin-elements' )
112 ),
113 'holder' => '',
114 'class' => 'type',
115 'admin_label' => false,
116 'dependency' => '',
117 'weight' => '',
118 'group' => '' ,
119 'edit_field_class' => ''
120 ),
121 // array(
122 // 'param_name' => 'float',
123 // 'type' => 'dropdown',
124 // 'def_value' => 'none',
125 // 'value' => array(
126 // 'none' => __('Default', 'auxin-elements' ),
127 // 'left' =>__('Left' , 'auxin-elements' ),
128 // 'right' => __('Right' , 'auxin-elements' )
129 // ),
130 // 'holder' => 'dropdown',
131 // 'class' => 'type',
132 // 'heading' => __('Block alignment','auxin-elements' ),
133 // 'description' => '',
134 // 'admin_label' => true,
135 // 'dependency' => '',
136 // 'weight' => '',
137 // 'group' => '' ,
138 // 'edit_field_class' => ''
139 // ),
140 array(
141 'heading' => __('Insert quote symbol', 'auxin-elements'),
142 'description' => '',
143 'param_name' => 'quote_symbol',
144 'type' => 'aux_switch',
145 'value' => '1',
146 'holder' => '',
147 'class' => 'showheader',
148 'admin_label' => false,
149 'dependency' => '',
150 'weight' => '',
151 'group' => '' ,
152 'edit_field_class' => ''
153 ),
154 array(
155 'heading' => __('Extra class name','auxin-elements' ),
156 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements' ),
157 'param_name' => 'extra_classes',
158 'type' => 'textfield',
159 'value' => '',
160 'def_value' => '',
161 'holder' => '',
162 'class' => 'extra_classes',
163 'admin_label' => false,
164 'dependency' => '',
165 'weight' => '',
166 'group' => '' ,
167 'edit_field_class' => ''
168 )
169
170 )
171 );
172
173 return $master_array;
174 }
175
176 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_quote_master_array', 10, 1 );
177
178 function auxin_widget_quote_callback( $atts, $shortcode_content = null ){
179
180 /**
181 * type:
182 * intro-hero
183 * intro-normal
184 * intro-splitter
185 *
186 * pullquote-normal
187 * pullquote-colorized
188 *
189 * quote-normal
190 * quote-big
191 *
192 * blockquote-normal
193 * blockquote-bordered
194 *
195 * text-align:
196 * center
197 * right
198 * left
199 *
200 * float:
201 * none
202 * left
203 * right
204 */
205
206 // Defining default attributes
207 $default_atts = array(
208 'content' => '',
209
210 'indent' => '', // custom values: yes, no
211 'type' => 'blockquote-normal',
212 'text_align' => '',
213 'float' => '',
214 'quote_symbol' => '1',
215 'css' => '',
216
217 'extra_classes' => '', // custom css class names for this element
218 'custom_el_id' => '', // custom id attribute for this element
219 'base_class' => 'aux-widget-quote' // base class name for container
220 );
221
222 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
223 extract( $result['parsed_atts'] );
224
225 ob_start();
226
227 // widget header ------------------------------
228 echo wp_kses_post( $result['widget_header'] );
229
230 // widget custom output -----------------------
231
232 $classes_list = array( 'aux-elem-quote' );
233
234 $classes_list[] = 'aux-' . $type;
235
236 if( ! empty( $text_align ) && 'none'!== $text_align ){
237 $classes_list[] = 'aux-text-align-' . $text_align;
238 }
239
240 if( ! empty( $float ) ){
241 $classes_list[] = 'aux-float-' . $float;
242 }
243
244 if( auxin_is_true( $quote_symbol ) ){
245 //$classes_list[] = 'aux-quote-letter';
246 $classes_list[] = 'aux-quote-symbol';
247 }
248
249 if( !empty($extra_classes) ){
250 $classes_list[] = $extra_classes;
251 }
252
253 $classes = implode( ' ', $classes_list );
254 $shortcode_content = auxin_do_cleanup_shortcode( $shortcode_content );
255 $shortcode_content = empty( $shortcode_content ) ? auxin_do_cleanup_shortcode( $content ) : $shortcode_content;
256
257 switch ( $type ) {
258 case 'intro-hero':
259 case 'intro-normal':
260 case 'intro-splitter':
261 echo sprintf( '<p class="%s">%s</p>', esc_attr( $classes ), wp_kses_post( $shortcode_content ) );
262 break;
263
264 case 'pullquote-normal':
265 case 'pullquote-colorized':
266 echo sprintf( '<blockquote class="%s"><p>%s</p></blockquote>', esc_attr( $classes ), wp_kses_post( $shortcode_content ) );
267 break;
268
269 case 'quote-normal':
270 case 'quote-big':
271 echo sprintf( '<blockquote class="%s"><p>%s</p></blockquote>', esc_attr( $classes ), wp_kses_post( $shortcode_content ) );
272 break;
273
274 case 'blockquote-normal':
275 case 'blockquote-bordered':
276 default:
277 echo sprintf( '<blockquote class="%s"><p>%s</p></blockquote>', esc_attr( $classes ), wp_kses_post( $shortcode_content ) );
278 break;
279 }
280
281 // widget footer ------------------------------
282 echo wp_kses_post( $result['widget_footer'] );
283
284 return ob_get_clean();
285 }
286