PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 1.3.14
Shortcodes and extra features for Phlox theme v1.3.14
2.17.22 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 9 years ago accordion-api.php 9 years ago accordion.php 9 years ago attachment-url.php 9 years ago audio.php 9 years ago before-after.php 9 years ago button.php 9 years ago code.php 9 years ago contact-box.php 9 years ago contact-form.php 9 years ago divider.php 9 years ago dropcap.php 9 years ago facebook.php 9 years ago flickr.php 9 years ago gallery.php 9 years ago gmap.php 9 years ago highlight.php 9 years ago image.php 9 years ago instagram-feed.php 9 years ago latest-items.php 10 years ago latest-posts-slider.php 9 years ago popular-posts-widget.php 9 years ago quote.php 9 years ago recent-posts-grid-carousel.php 9 years ago recent-posts-land-style.php 9 years ago recent-posts-masonry.php 9 years ago recent-posts-tiles.php 9 years ago recent-posts-timeline.php 9 years ago recent-posts-widget.php 9 years ago recent-posts.php 9 years ago related-posts.php 9 years ago sample-element.php 9 years ago search.php 9 years ago slider.php 9 years ago socials-list.php 9 years ago tabs-api.php 9 years ago tabs.php 9 years ago text.php 9 years ago touch-slider.php 9 years ago video.php 9 years ago
quote.php
286 lines
1 <?php
2 /**
3 * Quote element
4 *
5 *
6 * @package Auxin
7 * @license LICENSE.txt
8 * @author
9 * @link http://averta.net/phlox/
10 * @copyright (c) 2010-2017
11 */
12 function auxin_get_quote_master_array( $master_array ) {
13
14 $master_array['aux_quote'] = array(
15 'name' => __("[Phlox] 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_so' => true,
24 'is_widget' => true,
25 'is_shortcode' => true,
26 'group' => '',
27 'admin_enqueue_js' => '',
28 'admin_enqueue_css' => '',
29 'front_enqueue_js' => '',
30 'front_enqueue_css' => '',
31 'icon' => 'auxin-element auxin-quote',
32 'custom_markup' => '',
33 'js_view' => '',
34 'html_template' => '',
35 'deprecated' => '',
36 'content_element' => '',
37 'as_parent' => '',
38 'as_child' => '',
39 'params' => array(
40 array(
41 'heading' => __('Quote text','auxin-elements' ),
42 'description' => __('Enter a text as a quote.','auxin-elements' ),
43 'param_name' => 'content',
44 'type' => 'textarea_html',
45 'value' => '',
46 'holder' => '',
47 'class' => 'content',
48 'admin_label' => false,
49 'dependency' => '',
50 'weight' => '',
51 'group' => '' ,
52 'edit_field_class' => ''
53 ),
54 array(
55 'heading' => __('Blockqoute style','auxin-elements' ),
56 'description' => '',
57 'param_name' => 'type',
58 'type' => 'aux_visual_select',
59 'def_value' => 'blockquote-normal',
60 'choices' => array(
61 'quote-normal' => array(
62 'label' => __('Quote Normal', 'auxin-elements'),
63 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal-1.svg'
64 ),
65 'blockquote-normal' => array(
66 'label' => __('Blockquote Normal', 'auxin-elements'),
67 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal.svg'
68 ),
69 'blockquote-bordered' => array(
70 'label' => __('Blockquote Bordered', 'auxin-elements'),
71 'image' => AUXIN_URL . 'images/visual-select/blockquote-bordered.svg'
72 ),
73 'intro-normal' => array(
74 'label' => __('Intro', 'auxin-elements'),
75 'image' => AUXIN_URL . 'images/visual-select/quote-intro-normal.svg'
76 ),
77 'intro-hero' => array(
78 'label' => __('Intro Hero', 'auxin-elements'),
79 'image' => AUXIN_URL . 'images/visual-select/quote-intro-hero.svg'
80 ),
81 'intro-splitter' => array(
82 'label' => __('Intro with Splitter', 'auxin-elements'),
83 'image' => AUXIN_URL . 'images/visual-select/quote-intro-splitter.svg'
84 ),
85 'pullquote-normal' => array(
86 'label' => __('Pullquote Normal', 'auxin-elements'),
87 'image' => AUXIN_URL . 'images/visual-select/pullquote-normal.svg'
88 ),
89 'pullquote-colorized' => array(
90 'label' => __('Pullquote Colorized', 'auxin-elements'),
91 'image' => AUXIN_URL . 'images/visual-select/pullquote-colorized.svg'
92 )
93 ),
94 'holder' => '',
95 'class' => 'type',
96 'admin_label' => true,
97 'dependency' => '',
98 'weight' => '',
99 'group' => '' ,
100 'edit_field_class' => ''
101 ),
102 array(
103 'heading' => __('Text align','auxin-elements' ),
104 'description' => '',
105 'param_name' => 'text_align',
106 'type' => 'dropdown',
107 'def_value' => 'none',
108 'value' => array(
109 'none' => __('Default', 'auxin-elements' ),
110 'left' => __('Left' , 'auxin-elements' ),
111 'right' => __('Right' , 'auxin-elements' ),
112 'center' => __('Center' , 'auxin-elements' )
113 ),
114 'holder' => '',
115 'class' => 'type',
116 'admin_label' => false,
117 'dependency' => '',
118 'weight' => '',
119 'group' => '' ,
120 'edit_field_class' => ''
121 ),
122 // array(
123 // 'param_name' => 'float',
124 // 'type' => 'dropdown',
125 // 'def_value' => 'none',
126 // 'value' => array(
127 // 'none' => __('Default', 'auxin-elements' ),
128 // 'left' =>__('Left' , 'auxin-elements' ),
129 // 'right' => __('Right' , 'auxin-elements' )
130 // ),
131 // 'holder' => 'dropdown',
132 // 'class' => 'type',
133 // 'heading' => __('Block alignment','auxin-elements' ),
134 // 'description' => '',
135 // 'admin_label' => true,
136 // 'dependency' => '',
137 // 'weight' => '',
138 // 'group' => '' ,
139 // 'edit_field_class' => ''
140 // ),
141 array(
142 'heading' => __('Insert quote symbol', 'auxin-elements'),
143 'description' => '',
144 'param_name' => 'quote_symbol',
145 'type' => 'aux_switch',
146 'value' => '1',
147 'holder' => '',
148 'class' => 'showheader',
149 'admin_label' => false,
150 'dependency' => '',
151 'weight' => '',
152 'group' => '' ,
153 'edit_field_class' => ''
154 ),
155 array(
156 'heading' => __('Extra class name','auxin-elements' ),
157 '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' ),
158 'param_name' => 'extra_classes',
159 'type' => 'textfield',
160 'value' => '',
161 'def_value' => '',
162 'holder' => '',
163 'class' => 'extra_classes',
164 'admin_label' => false,
165 'dependency' => '',
166 'weight' => '',
167 'group' => '' ,
168 'edit_field_class' => ''
169 )
170
171 )
172 );
173
174 return $master_array;
175 }
176
177 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_quote_master_array', 10, 1 );
178
179 function auxin_widget_quote_callback( $atts, $shortcode_content = null ){
180
181 /**
182 * type:
183 * intro-hero
184 * intro-normal
185 * intro-splitter
186 *
187 * pullquote-normal
188 * pullquote-colorized
189 *
190 * quote-normal
191 * quote-big
192 *
193 * blockquote-normal
194 * blockquote-bordered
195 *
196 * text-align:
197 * center
198 * right
199 * left
200 *
201 * float:
202 * none
203 * left
204 * right
205 */
206
207 // Defining default attributes
208 $default_atts = array(
209 'content' => '',
210
211 'indent' => '', // custom values: yes, no
212 'type' => 'blockquote-normal',
213 'text_align' => '',
214 'float' => '',
215 'quote_symbol' => '1',
216 'css' => '',
217
218 'extra_classes' => '', // custom css class names for this element
219 'custom_el_id' => '', // custom id attribute for this element
220 'base_class' => 'aux-widget-quote' // base class name for container
221 );
222
223 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
224 extract( $result['parsed_atts'] );
225
226 ob_start();
227
228 // widget header ------------------------------
229 echo $result['widget_header'];
230
231 // widget custom output -----------------------
232
233 $classes_list = array( 'aux-elem-quote' );
234
235 $classes_list[] = 'aux-' . $type;
236
237 if( ! empty( $text_align ) && 'none'!== $text_align ){
238 $classes_list[] = 'aux-text-align-' . $text_align;
239 }
240
241 if( ! empty( $float ) ){
242 $classes_list[] = 'aux-float-' . $float;
243 }
244
245 if( $quote_symbol ){
246 $classes_list[] = 'aux-quote-letter';
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>', $classes, $shortcode_content );
262 break;
263
264 case 'pullquote-normal':
265 case 'pullquote-colorized':
266 echo sprintf( '<blockquote class="%s"><p>%s</p></blockquote>', $classes, $shortcode_content );
267 break;
268
269 case 'quote-normal':
270 case 'quote-big':
271 echo sprintf( '<blockquote class="%s"><p>%s</p></blockquote>', $classes, $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>', $classes, $shortcode_content );
278 break;
279 }
280
281 // widget footer ------------------------------
282 echo $result['widget_footer'];
283
284 return ob_get_clean();
285 }
286