Genesis Responsive Slider - Version 0.9.0

Version Description

  • Beta Release
Download this release

Release Info

Developer nathanrice
Plugin Icon 128x128 Genesis Responsive Slider
Version 0.9.0
Comparing to
See all releases

Version 0.9.0

admin.php ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Creates settings and outputs admin menu and settings page
4
+ */
5
+
6
+ /**
7
+ * Return the defaults array
8
+ *
9
+ * @since 0.9
10
+ */
11
+ function genesis_responsive_slider_defaults() {
12
+
13
+ $defaults = array(
14
+ 'post_type' => 'post',
15
+ 'posts_term' => '',
16
+ 'exclude_terms' => '',
17
+ 'include_exclude' => '',
18
+ 'post_id' => '',
19
+ 'posts_num' => 5,
20
+ 'posts_offset' => 0,
21
+ 'orderby' => 'date',
22
+ 'slideshow_timer' => 4000,
23
+ 'slideshow_delay' => 800,
24
+ 'slideshow_arrows' => 1,
25
+ 'slideshow_pager' => 1,
26
+ 'slideshow_loop' => 1,
27
+ 'slideshow_height' => 400,
28
+ 'slideshow_width' => 920,
29
+ 'slideshow_effect' => 'slide',
30
+ 'slideshow_excerpt_content' => 'excerpts',
31
+ 'slideshow_excerpt_content_limit' => 150,
32
+ 'slideshow_more_text' => '[Continue Reading]',
33
+ 'slideshow_excerpt_show' => 1,
34
+ 'slideshow_excerpt_width' => 50,
35
+ 'location_vertical' => 'bottom',
36
+ 'location_horizontal' => 'right',
37
+ 'slideshow_hide_mobile' => 1
38
+ );
39
+
40
+ return apply_filters( 'genesis_responsive_slider_settings_defaults', $defaults );
41
+
42
+ }
43
+
44
+ add_action( 'admin_init', 'register_genesis_responsive_slider_settings' );
45
+ /**
46
+ * This registers the settings field
47
+ */
48
+ function register_genesis_responsive_slider_settings() {
49
+
50
+ register_setting( GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD, GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD );
51
+ add_option( GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD, genesis_responsive_slider_defaults(), '', 'yes' );
52
+
53
+ if ( ! isset($_REQUEST['page']) || $_REQUEST['page'] != 'genesis_responsive_slider' )
54
+ return;
55
+
56
+ if ( genesis_get_responsive_slider_option( 'reset' ) ) {
57
+ update_option( GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD, genesis_responsive_slider_defaults() );
58
+
59
+ genesis_admin_redirect( 'genesis_responsive_slider', array( 'reset' => 'true' ) );
60
+ exit;
61
+ }
62
+
63
+ }
64
+
65
+ add_action('admin_notices', 'genesis_responsive_slider_notice');
66
+ /**
67
+ * This is the notice that displays when you successfully save or reset
68
+ * the slider settings.
69
+ */
70
+ function genesis_responsive_slider_notice() {
71
+
72
+ if ( ! isset( $_REQUEST['page'] ) || $_REQUEST['page'] != 'genesis_responsive_slider' )
73
+ return;
74
+
75
+ if ( isset( $_REQUEST['reset'] ) && 'true' == $_REQUEST['reset'] )
76
+ echo '<div id="message" class="updated"><p><strong>' . __( 'Settings reset.', 'genesis-responsive-slider' ) . '</strong></p></div>';
77
+ elseif ( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' )
78
+ echo '<div id="message" class="updated"><p><strong>' . __( 'Settings saved.', 'genesis-responsive-slider' ) . '</strong></p></div>';
79
+
80
+ }
81
+
82
+ add_action( 'admin_menu', 'genesis_responsive_slider_settings_init', 15 );
83
+ /**
84
+ * This is a necessary go-between to get our scripts and boxes loaded
85
+ * on the theme settings page only, and not the rest of the admin
86
+ */
87
+ function genesis_responsive_slider_settings_init() {
88
+ global $_genesis_responsive_slider_settings_pagehook;
89
+
90
+ // Add "Design Settings" submenu
91
+ $_genesis_responsive_slider_settings_pagehook = add_submenu_page( 'genesis', __( 'Slider Settings', 'genesis-responsive-slider' ), __( 'Slider Settings', 'genesis-responsive-slider' ), 'manage_options', 'genesis_responsive_slider', 'genesis_responsive_slider_settings_admin' );
92
+
93
+ add_action( 'load-' . $_genesis_responsive_slider_settings_pagehook, 'genesis_responsive_slider_settings_scripts' );
94
+ add_action( 'load-' . $_genesis_responsive_slider_settings_pagehook, 'genesis_responsive_slider_settings_boxes' );
95
+ }
96
+
97
+ /**
98
+ * Loads the scripts required for the settings page
99
+ */
100
+ function genesis_responsive_slider_settings_scripts() {
101
+ wp_enqueue_script( 'common' );
102
+ wp_enqueue_script( 'wp-lists' );
103
+ wp_enqueue_script( 'postbox' );
104
+ wp_enqueue_script( 'genesis_responsive_slider_admin_scripts', WP_PLUGIN_URL . '/genesis-responsive-slider/js/admin.js', array( 'jquery' ), '1.0', TRUE );
105
+ }
106
+
107
+ /*
108
+ * Loads the Meta Boxes
109
+ */
110
+ function genesis_responsive_slider_settings_boxes() {
111
+ global $_genesis_responsive_slider_settings_pagehook;
112
+
113
+ add_meta_box( 'genesis-responsive-slider-options', __( 'Genesis Responsive Slider Settings', 'genesis-responsive-slider' ), 'genesis_responsive_slider_options_box', $_genesis_responsive_slider_settings_pagehook, 'column1' );
114
+ }
115
+
116
+
117
+ add_filter( 'screen_layout_columns', 'genesis_responsive_slider_settings_layout_columns', 10, 2 );
118
+ /**
119
+ * Tell WordPress that we want only 1 column available for our meta-boxes
120
+ */
121
+ function genesis_responsive_slider_settings_layout_columns( $columns, $screen ) {
122
+ global $_genesis_responsive_slider_settings_pagehook;
123
+
124
+ if ( $screen == $_genesis_responsive_slider_settings_pagehook ) {
125
+ // This page should have 1 column settings
126
+ $columns[$_genesis_responsive_slider_settings_pagehook] = 1;
127
+ }
128
+
129
+ return $columns;
130
+ }
131
+
132
+ /**
133
+ * This function is what actually gets output to the page. It handles the markup,
134
+ * builds the form, outputs necessary JS stuff, and fires <code>do_meta_boxes()</code>
135
+ */
136
+ function genesis_responsive_slider_settings_admin() {
137
+ global $_genesis_responsive_slider_settings_pagehook, $screen_layout_columns;
138
+
139
+ $width = "width: 99%;";
140
+ $hide2 = $hide3 = " display: none;";
141
+ ?>
142
+ <div id="gs" class="wrap genesis-metaboxes">
143
+ <form method="post" action="options.php">
144
+
145
+ <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
146
+ <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
147
+ <?php settings_fields( GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ); // important! ?>
148
+
149
+ <?php screen_icon( 'plugins' ); ?>
150
+ <h2>
151
+ <?php _e( 'Genesis - Responsive Slider', 'genesis-responsive-slider' ); ?>
152
+ <input type="submit" class="button-primary genesis-h2-button" value="<?php _e( 'Save Settings', 'genesis-responsive-slider' ) ?>" />
153
+ <input type="submit" class="button-highlighted genesis-h2-button" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[reset]" value="<?php _e( 'Reset Settings', 'genesis-responsive-slider' ); ?>" onclick="return genesis_confirm('<?php echo esc_js( __( 'Are you sure you want to reset?', 'genesis-responsive-slider' ) ); ?>');" />
154
+ </h2>
155
+
156
+ <div class="metabox-holder">
157
+ <div class="postbox-container" style="<?php echo $width; ?>">
158
+ <?php do_meta_boxes( $_genesis_responsive_slider_settings_pagehook, 'column1', null ); ?>
159
+ </div>
160
+ </div>
161
+
162
+ <div class="bottom-buttons">
163
+ <input type="submit" class="button-primary" value="<?php _e('Save Settings', 'genesis-responsive-slider') ?>" />
164
+ <input type="submit" class="button-highlighted" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[reset]" value="<?php _e( 'Reset Settings', 'genesis-responsive-slider' ); ?>" />
165
+ </div>
166
+
167
+ </form>
168
+ </div>
169
+ <script type="text/javascript">
170
+ //<![CDATA[
171
+ jQuery(document).ready( function($) {
172
+ // close postboxes that should be closed
173
+ $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
174
+ // postboxes setup
175
+ postboxes.add_postbox_toggles('<?php echo $_genesis_responsive_slider_settings_pagehook; ?>');
176
+ });
177
+ //]]>
178
+ </script>
179
+
180
+ <?php
181
+ }
182
+
183
+ /**
184
+ * This function generates the form code to be used in the metaboxes
185
+ *
186
+ * @since 0.9
187
+ */
188
+ function genesis_responsive_slider_options_box() {
189
+ ?>
190
+
191
+ <div id="genesis-responsive-slider-content-type">
192
+
193
+ <h4><?php _e( 'Type of Content', 'genesis-responsive-slider' ); ?></h4>
194
+
195
+ <p><label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[post_type]"><?php _e( 'Would you like to use posts or pages', 'genesis-responsive-slider' ); ?>?</label>
196
+ <select id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[post_type]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[post_type]">
197
+ <?php
198
+
199
+ $post_types = get_post_types( array( 'public' => true ), 'names', 'and' );
200
+ $post_types = array_filter( $post_types, 'genesis_responsive_slider_exclude_post_types' );
201
+
202
+ foreach ( $post_types as $post_type ) { ?>
203
+
204
+ <option style="padding-right:10px;" value="<?php echo esc_attr( $post_type ); ?>" <?php selected( esc_attr( $post_type ), genesis_get_responsive_slider_option( 'post_type' ) ); ?>><?php echo esc_attr( $post_type ); ?></option><?php } ?>
205
+
206
+ </select></p>
207
+
208
+ </div>
209
+
210
+ <div id="genesis-responsive-slider-content-filter">
211
+
212
+ <div id="genesis-responsive-slider-taxonomy">
213
+
214
+ <p><strong style="display: block; font-size: 11px; margin-top: 10px;"><?php _e( 'By Taxonomy and Terms', 'genesis-responsive-slider' ); ?></strong><label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_term]"><?php _e( 'Choose a term to determine what slides to include', 'genesis-responsive-slider' ); ?>.</label>
215
+
216
+ <select id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_term]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_term]" style="margin-top: 5px;">
217
+
218
+ <option style="padding-right:10px;" value="" <?php selected( '', genesis_get_responsive_slider_option( 'posts_term' ) ); ?>><?php _e( 'All Taxonomies and Terms', 'genesis-responsive-slider' ); ?></option>
219
+ <?php
220
+ $taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
221
+
222
+ $taxonomies = array_filter( $taxonomies, 'genesis_responsive_slider_exclude_taxonomies' );
223
+ $test = get_taxonomies( array( 'public' => true ), 'objects' );
224
+
225
+ foreach ( $taxonomies as $taxonomy ) {
226
+ $query_label = '';
227
+ if ( !empty( $taxonomy->query_var ) )
228
+ $query_label = $taxonomy->query_var;
229
+ else
230
+ $query_label = $taxonomy->name;
231
+ ?>
232
+ <optgroup label="<?php echo esc_attr( $taxonomy->labels->name ); ?>">
233
+
234
+ <option style="margin-left: 5px; padding-right:10px;" value="<?php echo esc_attr( $query_label ); ?>" <?php selected( esc_attr( $query_label ), genesis_get_responsive_slider_option( 'posts_term' ) ); ?>><?php echo $taxonomy->labels->all_items; ?></option><?php
235
+ $terms = get_terms( $taxonomy->name, 'orderby=name&hide_empty=1' );
236
+ foreach ( $terms as $term ) {
237
+ ?>
238
+ <option style="margin-left: 8px; padding-right:10px;" value="<?php echo esc_attr( $query_label ) . ',' . $term->slug; ?>" <?php selected( esc_attr( $query_label ) . ',' . $term->slug, genesis_get_responsive_slider_option( 'posts_term' ) ); ?>><?php echo '-' . esc_attr( $term->name ); ?></option><?php } ?>
239
+
240
+ </optgroup> <?php } ?>
241
+
242
+ </select>
243
+ </p>
244
+
245
+ <p><strong style="display: block; font-size: 11px; margin-top: 10px;"><?php _e( 'Include or Exclude by Taxonomy ID', 'genesis-responsive-slider' ); ?></strong></p>
246
+
247
+ <p>
248
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[exclude_terms]"><?php printf( __( 'List which category, tag or other taxonomy IDs to include / exclude. (1,2,3,4 for example)', 'genesis-responsive-slider' ), '<br />' ); ?></label>
249
+ </p>
250
+
251
+ <p>
252
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[exclude_terms]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[exclude_terms]" value="<?php echo esc_attr( genesis_get_responsive_slider_option( 'exclude_terms' ) ); ?>" style="width:60%;" />
253
+ </p>
254
+
255
+ </div>
256
+
257
+ <p>
258
+ <strong style="font-size:11px;margin-top:10px;"><label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[include_exclude]"><?php printf( __( 'Include or Exclude by %s ID', 'genesis-responsive-slider' ), genesis_get_responsive_slider_option( 'post_type' ) ); ?></label></strong>
259
+ </p>
260
+
261
+ <p><?php _e( 'Choose the include / exclude slides using their post / page ID in a comma-separated list. (1,2,3,4 for example)', 'genesis-responsive-slider' ); ?></p>
262
+
263
+ <p>
264
+ <select style="margin-top: 5px;" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[include_exclude]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[include_exclude]">
265
+ <option style="padding-right:10px;" value="" <?php selected( '', genesis_get_responsive_slider_option( 'include_exclude' ) ); ?>><?php _e( 'Select', 'genesis-responsive-slider' ); ?></option>
266
+ <option style="padding-right:10px;" value="include" <?php selected( 'include', genesis_get_responsive_slider_option( 'include_exclude' ) ); ?>><?php _e( 'Include', 'genesis-responsive-slider' ); ?></option>
267
+ <option style="padding-right:10px;" value="exclude" <?php selected( 'exclude', genesis_get_responsive_slider_option( 'include_exclude' ) ); ?>><?php _e( 'Exclude', 'genesis-responsive-slider' ); ?></option>
268
+ </select>
269
+ </p>
270
+
271
+ <p>
272
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[post_id]"><?php _e( 'List which', 'genesis-responsive-slider' ); ?> <strong><?php echo genesis_get_responsive_slider_option( 'post_type' ) . ' ' . __( 'ID', 'genesis-responsive-slider' ); ?>s</strong> <?php _e( 'to include / exclude. (1,2,3,4 for example)', 'genesis-responsive-slider' ); ?></label></p>
273
+ <p>
274
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[post_id]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[post_id]" value="<?php echo esc_attr( genesis_get_responsive_slider_option( 'post_id' ) ); ?>" style="width:60%;" />
275
+ </p>
276
+
277
+ <p>
278
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_num]"><?php _e( 'Number of Slides to Show', 'genesis-responsive-slider' ); ?>:</label>
279
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_num]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_num]" value="<?php echo esc_attr( genesis_get_responsive_slider_option( 'posts_num' ) ); ?>" size="2" />
280
+ </p>
281
+
282
+ <p>
283
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_offset]"><?php _e( 'Number of Posts to Offset', 'genesis-responsive-slider' ); ?>:</label>
284
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_offset]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[posts_offset]" value="<?php echo esc_attr( genesis_get_responsive_slider_option( 'posts_offset' ) ); ?>" size="2" />
285
+ </p>
286
+
287
+ <p>
288
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[orderby]"><?php _e( 'Order By', 'genesis-responsive-slider' ); ?>:</label>
289
+ <select id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[orderby]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[orderby]">
290
+ <option style="padding-right:10px;" value="date" <?php selected( 'date', genesis_get_responsive_slider_option( 'orderby' ) ); ?>><?php _e( 'Date', 'genesis-responsive-slider' ); ?></option>
291
+ <option style="padding-right:10px;" value="title" <?php selected( 'title', genesis_get_responsive_slider_option( 'orderby' ) ); ?>><?php _e( 'Title', 'genesis-responsive-slider' ); ?></option>
292
+ <option style="padding-right:10px;" value="ID" <?php selected( 'ID', genesis_get_responsive_slider_option( 'orderby' ) ); ?>><?php _e( 'ID', 'genesis-responsive-slider' ); ?></option>
293
+ <option style="padding-right:10px;" value="rand" <?php selected( 'rand', genesis_get_responsive_slider_option( 'orderby' ) ); ?>><?php _e( 'Random', 'genesis-responsive-slider' ); ?></option>
294
+ </select>
295
+ </p>
296
+
297
+ </div>
298
+
299
+ <hr class="div" />
300
+
301
+ <h4><?php _e( 'Transition Settings', 'genesis-responsive-slider' ); ?></h4>
302
+
303
+ <p>
304
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_timer]"><?php _e( 'Time Between Slides (in milliseconds)', 'genesis-responsive-slider' ); ?>:
305
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_timer]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_timer]" value="<?php echo genesis_get_responsive_slider_option( 'slideshow_timer' ); ?>" size="5" /></label>
306
+ </p>
307
+
308
+ <p>
309
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_delay]"><?php _e( 'Slide Transition Speed (in milliseconds)', 'genesis-responsive-slider' ); ?>:
310
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_delay]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_delay]" value="<?php echo genesis_get_responsive_slider_option( 'slideshow_delay' ); ?>" size="5" /></label>
311
+ </p>
312
+
313
+ <p>
314
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_effect]"><?php _e( 'Slider Effect', 'genesis-responsive-slider' ); ?>:
315
+ <?php _e( 'Select one of the following:', 'genesis-responsive-slider' ); ?>
316
+ <select name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_effect]" id="<?php echo GENESIS_SETTINGS_FIELD; ?>[slideshow_effect]">
317
+ <option value="slide" <?php selected( 'slide', genesis_get_option( 'slideshow_effect', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ) ); ?>><?php _e( 'Slide', 'genesis-responsive-slider' ); ?></option>
318
+ <option value="fade" <?php selected( 'fade', genesis_get_option( 'slideshow_effect', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ) ); ?>><?php _e( 'Fade', 'genesis-responsive-slider' ); ?></option>
319
+ </select>
320
+ </p>
321
+
322
+ <hr class="div" />
323
+
324
+ <h4><?php _e( 'Display Settings', 'genesis-responsive-slider' ); ?></h4>
325
+
326
+ <p>
327
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_width]"><?php _e( 'Maximum Slider Width (in pixels)', 'genesis-responsive-slider' ); ?>:
328
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_width]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_width]" value="<?php echo genesis_get_responsive_slider_option( 'slideshow_width' ); ?>" size="5" /></label>
329
+ </p>
330
+
331
+ <p>
332
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_height]"><?php _e( 'Maximum Slider Height (in pixels)', 'genesis-responsive-slider' ); ?>:
333
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_height]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_height]" value="<?php echo genesis_get_responsive_slider_option( 'slideshow_height' ); ?>" size="5" /></label>
334
+ </p>
335
+
336
+ <p>
337
+ <input type="checkbox" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_arrows]" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_arrows]" value="1" <?php checked(1, genesis_get_responsive_slider_option('slideshow_arrows')); ?> /> <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_arrows]"><?php _e( 'Display Next / Previous Arrows in Slider?', 'genesis-responsive-slider' ); ?></label>
338
+ </p>
339
+
340
+ <p>
341
+ <input type="checkbox" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_pager]" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_pager]" value="1" <?php checked(1, genesis_get_responsive_slider_option('slideshow_pager')); ?> /> <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_pager]"><?php _e( 'Display Pagination in Slider?', 'genesis-responsive-slider' ); ?></label>
342
+ </p>
343
+
344
+ <hr class="div" />
345
+
346
+ <h4><?php _e( 'Content Settings', 'genesis-responsive-slider' ); ?></h4>
347
+
348
+ <p>
349
+ <input type="checkbox" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_title_show]" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_title_show]" value="1" <?php checked(1, genesis_get_responsive_slider_option('slideshow_title_show')); ?> /> <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_title_show]"><?php _e( 'Display Post/Page Title in Slider?', 'genesis-responsive-slider' ); ?></label>
350
+ </p>
351
+ <p>
352
+ <input type="checkbox" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_show]" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_show]" value="1" <?php checked(1, genesis_get_responsive_slider_option('slideshow_excerpt_show')); ?> /> <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_show]"><?php _e( 'Display Content in Slider?', 'genesis-responsive-slider' ); ?></label>
353
+ </p>
354
+
355
+ <p>
356
+ <input type="checkbox" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_hide_mobile]" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_hide_mobile]" value="1" <?php checked(1, genesis_get_responsive_slider_option('slideshow_hide_mobile')); ?> /> <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_hide_mobile]"><?php _e( 'Hide Title & Content on Mobile Devices', 'genesis-responsive-slider' ); ?></label>
357
+ </p>
358
+
359
+ <p>
360
+ <?php _e( 'Select one of the following:', 'genesis-responsive-slider' ); ?>
361
+ <select name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_content]" id="<?php echo GENESIS_SETTINGS_FIELD; ?>[slideshow_excerpt_content]">
362
+ <option value="full" <?php selected( 'full', genesis_get_option( 'slideshow_excerpt_content', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ) ); ?>><?php _e( 'Display post content', 'genesis-responsive-slider' ); ?></option>
363
+ <option value="excerpts" <?php selected( 'excerpts', genesis_get_option( 'slideshow_excerpt_content', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ) ); ?>><?php _e( 'Display post excerpts', 'genesis-responsive-slider' ); ?></option>
364
+ </select>
365
+ </p>
366
+
367
+ <p>
368
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_more_text]"><?php _e( 'More Text (if applicable)', 'genesis-responsive-slider' ); ?>:</label>
369
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_more_text]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_more_text]" value="<?php echo esc_attr( genesis_get_option( 'slideshow_more_text', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ) ); ?>" />
370
+ </p>
371
+
372
+ <p>
373
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_content_limit]"><?php _e( 'Limit content to', 'genesis-responsive-slider' ); ?></label>
374
+ <input type="text" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_content_limit]" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_content_limit]" value="<?php echo esc_attr( genesis_option( 'slideshow_excerpt_content_limit', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD ) ); ?>" size="3" />
375
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_content_limit]"><?php _e( 'characters', 'genesis-responsive-slider' ); ?></label>
376
+ </p>
377
+
378
+ <p><span class="description"><?php _e( 'Using this option will limit the text and strip all formatting from the text displayed. To use this option, choose "Display post content" in the select box above.', 'genesis-responsive-slider' ); ?></span></p>
379
+
380
+ <p>
381
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_width]"><?php _e( 'Slider Excerpt Width (in percentage)', 'genesis-responsive-slider' ); ?>:
382
+ <input type="text" id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_width]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[slideshow_excerpt_width]" value="<?php echo genesis_get_responsive_slider_option( 'slideshow_excerpt_width' ); ?>" size="5" /></label>
383
+ </p>
384
+
385
+ <p>
386
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[location_vertical]"><?php _e( 'Excerpt Location (vertical)', 'genesis-responsive-slider' ); ?>:</label>
387
+ <select id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[location_vertical]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[location_vertical]">
388
+ <option style="padding-right:10px;" value="top" <?php selected( 'top', genesis_get_responsive_slider_option( 'location_vertical' ) ); ?>><?php _e( 'Top', 'genesis-responsive-slider' ); ?></option>
389
+ <option style="padding-right:10px;" value="bottom" <?php selected( 'bottom', genesis_get_responsive_slider_option( 'location_vertical' ) ); ?>><?php _e( 'Bottom', 'genesis-responsive-slider' ); ?></option>
390
+ </select>
391
+ </p>
392
+
393
+ <p>
394
+ <label for="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[location_horizontal]"><?php _e( 'Excerpt Location (horizontal)', 'genesis-responsive-slider' ); ?>:</label>
395
+ <select id="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[location_horizontal]" name="<?php echo GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD; ?>[location_horizontal]">
396
+ <option style="padding-right:10px;" value="left" <?php selected( 'left', genesis_get_responsive_slider_option( 'location_horizontal' ) ); ?>><?php _e( 'Left', 'genesis-responsive-slider' ); ?></option>
397
+ <option style="padding-right:10px;" value="right" <?php selected( 'right', genesis_get_responsive_slider_option( 'location_horizontal' ) ); ?>><?php _e( 'Right', 'genesis-responsive-slider' ); ?></option>
398
+ </select>
399
+ </p>
400
+ <?php
401
+ }
402
+
403
+ /*
404
+ * Echos form submit button for settings page.
405
+ */
406
+ function genesis_responsive_slider_form_submit( $args = array( ) ) {
407
+ echo '<p><input type="submit" class="button-primary" value="' . __( 'Save Changes', 'genesis-responsive-slider' ) . '" /></p>';
408
+ }
genesis-responsive-slider.php ADDED
@@ -0,0 +1,429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Genesis Responsive Slider
4
+ Plugin URI: http://www.studiopress.com
5
+ Description: A responsive featured slider for the Genesis Framework.
6
+ Author: StudioPress
7
+ Author URI: http://www.studiopress.com
8
+
9
+ Version: 0.9.0
10
+
11
+ License: GNU General Public License v2.0 (or later)
12
+ License URI: http://www.opensource.org/licenses/gpl-license.php
13
+ */
14
+
15
+ /**
16
+ * Props to Rafal Tomal, Nick Croft, Nathan Rice, Ron Rennick, Josh Byers and Brian Gardner for collaboratively writing this plugin.
17
+ */
18
+
19
+ /**
20
+ * Thanks to Tyler Smith for creating the awesome jquery FlexSlider plugin - http://flex.madebymufffin.com/.
21
+ */
22
+
23
+ define( 'GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD', 'genesis_responsive_slider_settings' );
24
+
25
+ add_action( 'after_setup_theme', 'GenesisResponsiveSliderInit', 15 );
26
+ /**
27
+ * Loads required files and adds image via Genesis Init Hook
28
+ */
29
+ function GenesisResponsiveSliderInit() {
30
+
31
+ /** require Genesis */
32
+ if( ! function_exists( 'genesis_get_option' ) )
33
+ return;
34
+
35
+ // translation support
36
+ load_plugin_textdomain( 'genesis-responsive-slider', false, '/genesis-responsive-slider/languages/' );
37
+
38
+ /** hook all frontend slider functions here to ensure Genesis is active **/
39
+ add_action( 'wp_enqueue_scripts', 'genesis_responsive_slider_scripts' );
40
+ add_action( 'wp_print_styles', 'genesis_responsive_slider_styles' );
41
+ add_action( 'wp_head', 'genesis_responsive_slider_head', 1 );
42
+ add_action( 'wp_footer', 'genesis_responsive_slider_flexslider_params' );
43
+ add_filter( 'excerpt_more', 'genesis_responsive_slider_excerpt_more' );
44
+ add_action( 'widgets_init', 'genesis_responsive_sliderRegister' );
45
+
46
+ /** Include Admin file */
47
+ if ( is_admin() ) require_once( dirname( __FILE__ ) . '/admin.php' );
48
+
49
+ /** Add new image size */
50
+ add_image_size( 'slider', ( int ) genesis_get_responsive_slider_option( 'slideshow_width' ), ( int ) genesis_get_responsive_slider_option( 'slideshow_height' ), TRUE );
51
+
52
+ }
53
+
54
+ add_action( 'genesis_settings_sanitizer_init', 'genesis_responsive_slider_sanitization' );
55
+ /**
56
+ * Add settings to Genesis sanitization
57
+ *
58
+ */
59
+ function genesis_responsive_slider_sanitization() {
60
+ genesis_add_option_filter( 'one_zero', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD,
61
+ array(
62
+ 'slideshow_arrows',
63
+ 'slideshow_excerpt_show',
64
+ 'slideshow_title_show',
65
+ 'slideshow_loop',
66
+ 'slideshow_hide_mobile',
67
+ 'slideshow_pager'
68
+ ) );
69
+ genesis_add_option_filter( 'no_html', GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD,
70
+ array(
71
+ 'post_type',
72
+ 'posts_term',
73
+ 'exclude_terms',
74
+ 'include_exclude',
75
+ 'post_id',
76
+ 'posts_num',
77
+ 'posts_offset',
78
+ 'orderby',
79
+ 'slideshow_timer',
80
+ 'slideshow_delay',
81
+ 'slideshow_height',
82
+ 'slideshow_width',
83
+ 'slideshow_effect',
84
+ 'slideshow_excerpt_content',
85
+ 'slideshow_excerpt_content_limit',
86
+ 'slideshow_more_text',
87
+ 'slideshow_excerpt_width',
88
+ 'location_vertical',
89
+ 'location_horizontal',
90
+ ) );
91
+ }
92
+
93
+ /**
94
+ * Load the script files
95
+ */
96
+ function genesis_responsive_slider_scripts() {
97
+
98
+ /** easySlider JavaScript code */
99
+ wp_enqueue_script( 'flexslider', WP_PLUGIN_URL . '/genesis-responsive-slider/js/jquery.flexslider.js', array( 'jquery' ), '0.9.5', TRUE );
100
+
101
+ }
102
+
103
+ /**
104
+ * Load the CSS files
105
+ */
106
+ function genesis_responsive_slider_styles() {
107
+
108
+ /** standard slideshow styles */
109
+ wp_register_style( 'slider_styles', WP_PLUGIN_URL . '/genesis-responsive-slider/style.css' );
110
+ wp_enqueue_style( 'slider_styles' );
111
+
112
+ }
113
+
114
+ /**
115
+ * Loads scripts and styles via wp_head hook.
116
+ */
117
+ function genesis_responsive_slider_head() {
118
+
119
+ $height = ( int ) genesis_get_responsive_slider_option( 'slideshow_height' );
120
+ $width = ( int ) genesis_get_responsive_slider_option( 'slideshow_width' );
121
+
122
+ $slideInfoWidth = ( int ) genesis_get_responsive_slider_option( 'slideshow_excerpt_width' );
123
+ $slideNavTop = ( int ) ( ($height - 60) * .5 );
124
+
125
+ $vertical = genesis_get_responsive_slider_option( 'location_vertical' );
126
+ $horizontal = genesis_get_responsive_slider_option( 'location_horizontal' );
127
+ $display = ( genesis_get_responsive_slider_option( 'posts_num' ) >= 2 && genesis_get_responsive_slider_option( 'slideshow_arrows' ) ) ? 'top: ' . $slideNavTop . 'px' : 'display: none';
128
+
129
+ $hide_mobile = genesis_get_responsive_slider_option( 'slideshow_hide_mobile' );
130
+ $slideshow_pager = genesis_get_responsive_slider_option( 'slideshow_pager' );
131
+
132
+ echo '
133
+ <style type="text/css">
134
+ .slide-excerpt { width: ' . $slideInfoWidth . '%; }
135
+ .slide-excerpt { ' . $vertical . ': 0; }
136
+ .slide-excerpt { '. $horizontal . ': 0; }
137
+ .flexslider { max-width: ' . $width . 'px; max-height: ' . $height . 'px; }
138
+ .slide-image { max-height: ' . $height . 'px; }
139
+ </style>';
140
+
141
+ if ( $hide_mobile == 1 ) {
142
+ echo '
143
+ <style type="text/css">
144
+ @media only screen
145
+ and (min-device-width : 320px)
146
+ and (max-device-width : 480px) {
147
+ .slide-excerpt { display: none !important; }
148
+ }
149
+ </style> ';
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Outputs slider script on wp_footer hook.
155
+ */
156
+ function genesis_responsive_slider_flexslider_params() {
157
+
158
+ $timer = ( int ) genesis_get_responsive_slider_option( 'slideshow_timer' );
159
+ $duration = ( int ) genesis_get_responsive_slider_option( 'slideshow_delay' );
160
+ $effect = genesis_get_responsive_slider_option( 'slideshow_effect' );
161
+ $controlnav = genesis_get_responsive_slider_option( 'slideshow_pager' );
162
+ $directionnav = genesis_get_responsive_slider_option( 'slideshow_arrows' );
163
+
164
+ $output = 'jQuery(document).ready(function($) {
165
+ $(".flexslider").flexslider({
166
+ controlsContainer: "#genesis-responsive-slider",
167
+ animation: "' . esc_js( $effect ) . '",
168
+ directionNav: ' . $directionnav . ',
169
+ controlNav: ' . $controlnav . ',
170
+ animationDuration: ' . $duration . ',
171
+ slideshowSpeed: ' . $timer . '
172
+ });
173
+ });';
174
+
175
+ $output = str_replace( array( "\n", "\t", "\r" ), '', $output );
176
+
177
+ echo '<script type=\'text/javascript\'>' . $output . '</script>';
178
+ }
179
+
180
+ /**
181
+ * Registers the slider widget
182
+ */
183
+ function genesis_responsive_sliderRegister() {
184
+ register_widget( 'genesis_responsive_sliderWidget' );
185
+ }
186
+
187
+ /** Creates read more link after excerpt */
188
+ function genesis_responsive_slider_excerpt_more( $more ) {
189
+ global $post;
190
+ static $read_more = null;
191
+
192
+ if ( $read_more === null )
193
+ $read_more = genesis_get_responsive_slider_option( 'slideshow_more_text' );
194
+
195
+ if ( !$read_more )
196
+ return '';
197
+
198
+ return '&hellip; <a href="'. get_permalink( $post->ID ) . '">' . __( $read_more, 'genesis-responsive-slider' ) . '</a>';
199
+ }
200
+
201
+ /**
202
+ * Slideshow Widget Class
203
+ */
204
+ class genesis_responsive_sliderWidget extends WP_Widget {
205
+
206
+ function genesis_responsive_sliderWidget() {
207
+ $widget_ops = array( 'classname' => 'genesis_responsive_slider', 'description' => __( 'Displays a slideshow inside a widget area', 'genesis-responsive-slider' ) );
208
+ $control_ops = array( 'width' => 200, 'height' => 250, 'id_base' => 'genesisresponsiveslider-widget' );
209
+ $this->WP_Widget( 'genesisresponsiveslider-widget', __( 'Genesis - Responsive Slider', 'genesis-responsive-slider' ), $widget_ops, $control_ops );
210
+ }
211
+
212
+ function save_settings( $settings ) {
213
+ $settings['_multiwidget'] = 0;
214
+ update_option( $this->option_name, $settings );
215
+ }
216
+
217
+ // display widget
218
+ function widget( $args, $instance ) {
219
+ extract( $args );
220
+
221
+ echo $before_widget;
222
+
223
+ $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
224
+ if ( $title )
225
+ echo $before_title . $title . $after_title;
226
+
227
+ $term_args = array( );
228
+
229
+ if ( 'page' != genesis_get_responsive_slider_option( 'post_type' ) ) {
230
+
231
+ if ( genesis_get_responsive_slider_option( 'posts_term' ) ) {
232
+
233
+ $posts_term = explode( ',', genesis_get_responsive_slider_option( 'posts_term' ) );
234
+
235
+ if ( 'category' == $posts_term['0'] )
236
+ $posts_term['0'] = 'category_name';
237
+
238
+ if ( 'post_tag' == $posts_term['0'] )
239
+ $posts_term['0'] = 'tag';
240
+
241
+ if ( isset( $posts_term['1'] ) )
242
+ $term_args[$posts_term['0']] = $posts_term['1'];
243
+
244
+ }
245
+
246
+ if ( !empty( $posts_term['0'] ) ) {
247
+
248
+ if ( 'category' == $posts_term['0'] )
249
+ $taxonomy = 'category';
250
+
251
+ elseif ( 'post_tag' == $posts_term['0'] )
252
+ $taxonomy = 'post_tag';
253
+
254
+ else
255
+ $taxonomy = $posts_term['0'];
256
+
257
+ } else {
258
+
259
+ $taxonomy = 'category';
260
+
261
+ }
262
+
263
+ if ( genesis_get_responsive_slider_option( 'exclude_terms' ) ) {
264
+
265
+ $exclude_terms = explode( ',', str_replace( ' ', '', genesis_get_responsive_slider_option( 'exclude_terms' ) ) );
266
+ $term_args[$taxonomy . '__not_in'] = $exclude_terms;
267
+
268
+ }
269
+ }
270
+
271
+ if ( genesis_get_responsive_slider_option( 'posts_offset' ) ) {
272
+ $myOffset = genesis_get_responsive_slider_option( 'posts_offset' );
273
+ $term_args['offset'] = $myOffset;
274
+ }
275
+
276
+ if ( genesis_get_responsive_slider_option( 'post_id' ) ) {
277
+ $IDs = explode( ',', str_replace( ' ', '', genesis_get_responsive_slider_option( 'post_id' ) ) );
278
+ if ( 'include' == genesis_get_responsive_slider_option( 'include_exclude' ) )
279
+ $term_args['post__in'] = $IDs;
280
+ else
281
+ $term_args['post__not_in'] = $IDs;
282
+ }
283
+
284
+ $query_args = array_merge( $term_args, array(
285
+ 'post_type' => genesis_get_responsive_slider_option( 'post_type' ),
286
+ 'posts_per_page' => genesis_get_responsive_slider_option( 'posts_num' ),
287
+ 'orderby' => genesis_get_responsive_slider_option( 'orderby' ),
288
+ 'order' => genesis_get_responsive_slider_option( 'order' ),
289
+ 'meta_key' => genesis_get_responsive_slider_option( 'meta_key' )
290
+ ) );
291
+
292
+ $query_args = apply_filters( 'genesis_responsive_slider_query_args', $query_args );
293
+
294
+ ?>
295
+
296
+ <div id="genesis-responsive-slider">
297
+ <div class="flexslider">
298
+ <ul class="slides">
299
+ <?php
300
+ $slider_posts = new WP_Query( $query_args );
301
+ if ( $slider_posts->have_posts() ) {
302
+ $show_excerpt = genesis_get_responsive_slider_option( 'slideshow_excerpt_show' );
303
+ $show_title = genesis_get_responsive_slider_option( 'slideshow_title_show' );
304
+ $show_type = genesis_get_responsive_slider_option( 'slideshow_excerpt_content' );
305
+ $show_limit = genesis_get_responsive_slider_option( 'slideshow_excerpt_content_limit' );
306
+ $more_text = genesis_get_responsive_slider_option( 'slideshow_more_text' );
307
+ }
308
+ while ( $slider_posts->have_posts() ) : $slider_posts->the_post();
309
+ ?>
310
+ <li>
311
+
312
+ <?php if ( $show_excerpt == 1 || $show_title == 1 ) { ?>
313
+ <div class="slide-excerpt slide-<?php the_ID(); ?>">
314
+ <div class="slide-background"></div><!-- end .slide-background -->
315
+ <div class="slide-excerpt-border ">
316
+ <?php
317
+ if ( $show_title == 1 ) {
318
+ ?>
319
+ <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
320
+ <?php
321
+ }
322
+ if ( $show_excerpt ) {
323
+ if ( $show_type != 'full' )
324
+ the_excerpt();
325
+ elseif ( $show_limit )
326
+ the_content_limit( (int)$show_limit, esc_html( $more_text ) );
327
+ else
328
+ the_content( esc_html( $more_text ) );
329
+ }
330
+ ?>
331
+ </div><!-- end .slide-excerpt-border -->
332
+ </div><!-- end .slide-excerpt -->
333
+ <?php } ?>
334
+
335
+ <div class="slide-image">
336
+ <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php genesis_image( "format=url&size=slider" ); ?>"></a>
337
+ </div><!-- end .slide-image -->
338
+
339
+ </li>
340
+ <?php endwhile; ?>
341
+ </ul><!-- end ul.slides -->
342
+ </div><!-- end .flexslider -->
343
+ </div><!-- end #genesis-responsive-slider -->
344
+
345
+ <?php
346
+ echo $after_widget;
347
+ wp_reset_query();
348
+
349
+ }
350
+
351
+ /** Widget options */
352
+ function form( $instance ) {
353
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '') );
354
+ $title = $instance['title'];
355
+ ?>
356
+ <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'genesis-responsive-slider' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></label></p>
357
+ <?php
358
+ echo '<p>';
359
+ printf( __( 'To configure slider options, please go to the <a href="%s">Slider Settings</a> page.', 'genesis-responsive-slider' ), menu_page_url( 'genesis_responsive_slider', 0 ) );
360
+ echo '</p>';
361
+ }
362
+
363
+ function update( $new_instance, $old_instance ) {
364
+ $instance = $old_instance;
365
+ $new_instance = wp_parse_args( (array) $new_instance, array( 'title' => '' ) );
366
+ $instance['title'] = strip_tags( $new_instance['title'] );
367
+ return $instance;
368
+ }
369
+
370
+ }
371
+
372
+ /**
373
+ * Used to exclude taxonomies and related terms from list of available terms/taxonomies in widget form().
374
+ *
375
+ * @since 0.9
376
+ * @author Nick Croft
377
+ *
378
+ * @param string $taxonomy 'taxonomy' being tested
379
+ * @return string
380
+ */
381
+ function genesis_responsive_slider_exclude_taxonomies( $taxonomy ) {
382
+
383
+ $filters = array( '', 'nav_menu' );
384
+ $filters = apply_filters( 'genesis_responsive_slider_exclude_taxonomies', $filters );
385
+
386
+ return ( ! in_array( $taxonomy->name, $filters ) );
387
+
388
+ }
389
+
390
+ /**
391
+ * Used to exclude post types from list of available post_types in widget form().
392
+ *
393
+ * @since 0.9
394
+ * @author Nick Croft
395
+ *
396
+ * @param string $type 'post_type' being tested
397
+ * @return string
398
+ */
399
+ function genesis_responsive_slider_exclude_post_types( $type ) {
400
+
401
+ $filters = array( '', 'attachment' );
402
+ $filters = apply_filters( 'genesis_responsive_slider_exclude_post_types', $filters );
403
+
404
+ return ( ! in_array( $type, $filters ) );
405
+
406
+ }
407
+
408
+ /**
409
+ * Returns Slider Option
410
+ *
411
+ * @param string $key key value for option
412
+ * @return string
413
+ */
414
+ function genesis_get_responsive_slider_option( $key ) {
415
+ return genesis_get_option( $key, GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD );
416
+ }
417
+
418
+ /**
419
+ * Echos Slider Option
420
+ *
421
+ * @param string $key key value for option
422
+ */
423
+ function genesis_responsive_slider_option( $key ) {
424
+
425
+ if ( ! genesis_get_responsive_slider_option( $key ) )
426
+ return false;
427
+
428
+ echo genesis_get_responsive_slider_option( $key );
429
+ }
images/bg_control_nav.png ADDED
Binary file
images/bg_direction_nav.png ADDED
Binary file
js/admin.js ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+
3
+
4
+
5
+ // Array: selector of toggle element, selector of element to show/hide, checkable value for select || null
6
+ var genesis_responsive_slider_toggles = [
7
+ ['#genesis_responsive_slider_settings\\[post_type\\]', '#genesis-slider-taxonomy', 'page']
8
+ ];
9
+
10
+ $.each( genesis_responsive_slider_toggles, function( k, v ) {
11
+ $( v[0] ).live( 'change', function() {
12
+ genesis_responsive_slider_toggle_settings( v[0], v[1], v[2] );
13
+ });
14
+ genesis_responsive_slider_toggle_settings( v[0], v[1], v[2] ); // Check when page loads too.
15
+ });
16
+
17
+ function genesis_responsive_slider_toggle_settings( selector, show_selector, check_value ) {
18
+ if (
19
+ ( check_value === null && $( selector ).is( ':checked' ) ) ||
20
+ ( check_value !== null && $( selector ).val() !== check_value )
21
+ ) {
22
+ $( show_selector ).slideDown( 'fast' );
23
+ } else {
24
+ $( show_selector ).slideUp( 'fast' );
25
+ }
26
+ }
27
+
28
+ function genesis_responsive_slider_checklist_toggle() {
29
+ $('<p><span id="genesis-category-checklist-toggle" class="button">' + genesis.category_checklist_toggle + '</span></p>').insertBefore('ul.categorychecklist');
30
+
31
+ $('#genesis-category-checklist-toggle').live('click.genesis', function (event) {
32
+ var $this = $(this),
33
+ checkboxes = $this.parent().next().find(':checkbox');
34
+
35
+ if ($this.data('clicked')) {
36
+ checkboxes.attr('checked', false);
37
+ $this.data('clicked', false);
38
+ } else {
39
+ checkboxes.attr('checked', true);
40
+ $this.data('clicked', true);
41
+ }
42
+ });
43
+ }
44
+ genesis_responsive_slider_checklist_toggle();
45
+
46
+ $('.genesis-layout-selector input[type="radio"]').change(function() {
47
+ var tmp=$(this).attr('name');
48
+ $('input[name="'+tmp+'"]').parent("label").removeClass("selected");
49
+ $(this).parent("label").toggleClass("selected", this.selected);
50
+ });
51
+
52
+ });
js/jquery.flexslider.js ADDED
@@ -0,0 +1,581 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery FlexSlider v1.8
3
+ * http://flex.madebymufffin.com
4
+ *
5
+ * Copyright 2011, Tyler Smith
6
+ * Free to use under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ *
9
+ * Contrib: Darin Richardson
10
+ */
11
+
12
+ ;(function ($) {
13
+
14
+ //FlexSlider: Object Instance
15
+ $.flexslider = function(el, options) {
16
+ var slider = el;
17
+
18
+ slider.init = function() {
19
+ slider.vars = $.extend({}, $.flexslider.defaults, options);
20
+ slider.data('flexslider', true);
21
+ slider.container = $('.slides', slider);
22
+ slider.slides = $('.slides > li', slider);
23
+ slider.count = slider.slides.length;
24
+ slider.animating = false;
25
+ slider.currentSlide = slider.vars.slideToStart;
26
+ slider.animatingTo = slider.currentSlide;
27
+ slider.atEnd = (slider.currentSlide == 0) ? true : false;
28
+ slider.eventType = ('ontouchstart' in document.documentElement) ? 'touchstart' : 'click';
29
+ slider.cloneCount = 0;
30
+ slider.cloneOffset = 0;
31
+ slider.manualPause = false;
32
+ slider.vertical = (slider.vars.slideDirection == "vertical");
33
+ slider.prop = (slider.vertical) ? "top" : "marginLeft";
34
+ slider.args = {};
35
+
36
+ //Test for webbkit CSS3 Animations
37
+ slider.transitions = "webkitTransition" in document.body.style;
38
+ if (slider.transitions) slider.prop = "-webkit-transform";
39
+
40
+ //Test for controlsContainer
41
+ if (slider.vars.controlsContainer != "") {
42
+ slider.controlsContainer = $(slider.vars.controlsContainer).eq($('.slides').index(slider.container));
43
+ slider.containerExists = slider.controlsContainer.length > 0;
44
+ }
45
+ //Test for manualControls
46
+ if (slider.vars.manualControls != "") {
47
+ slider.manualControls = $(slider.vars.manualControls, ((slider.containerExists) ? slider.controlsContainer : slider));
48
+ slider.manualExists = slider.manualControls.length > 0;
49
+ }
50
+
51
+ ///////////////////////////////////////////////////////////////////
52
+ // FlexSlider: Randomize Slides
53
+ if (slider.vars.randomize) {
54
+ slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
55
+ slider.container.empty().append(slider.slides);
56
+ }
57
+ ///////////////////////////////////////////////////////////////////
58
+
59
+ ///////////////////////////////////////////////////////////////////
60
+ // FlexSlider: Slider Animation Initialize
61
+ if (slider.vars.animation.toLowerCase() == "slide") {
62
+ if (slider.transitions) {
63
+ slider.setTransition(0);
64
+ }
65
+ slider.css({"overflow": "hidden"});
66
+ if (slider.vars.animationLoop) {
67
+ slider.cloneCount = 2;
68
+ slider.cloneOffset = 1;
69
+ slider.container.append(slider.slides.filter(':first').clone().addClass('clone')).prepend(slider.slides.filter(':last').clone().addClass('clone'));
70
+ }
71
+ //create newSlides to capture possible clones
72
+ slider.newSlides = $('.slides > li', slider);
73
+ var sliderOffset = (-1 * (slider.currentSlide + slider.cloneOffset));
74
+ if (slider.vertical) {
75
+ slider.newSlides.css({"display": "block", "width": "100%", "float": "left"});
76
+ slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
77
+ //Timeout function to give browser enough time to get proper height initially
78
+ setTimeout(function() {
79
+ slider.css({"position": "relative"}).height(slider.slides.filter(':first').height());
80
+ slider.args[slider.prop] = (slider.transitions) ? "translate3d(0," + sliderOffset * slider.height() + "px,0)" : sliderOffset * slider.height() + "px";
81
+ slider.container.css(slider.args);
82
+ }, 100);
83
+
84
+ } else {
85
+ slider.args[slider.prop] = (slider.transitions) ? "translate3d(" + sliderOffset * slider.width() + "px,0,0)" : sliderOffset * slider.width() + "px";
86
+ slider.container.width((slider.count + slider.cloneCount) * 200 + "%").css(slider.args);
87
+ //Timeout function to give browser enough time to get proper width initially
88
+ setTimeout(function() {
89
+ slider.newSlides.width(slider.width()).css({"float": "left", "display": "block"});
90
+ }, 100);
91
+ }
92
+
93
+ } else { //Default to fade
94
+ //Not supporting fade CSS3 transitions right now
95
+ slider.transitions = false;
96
+ slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%"}).eq(slider.currentSlide).fadeIn(slider.vars.animationDuration);
97
+ }
98
+ ///////////////////////////////////////////////////////////////////
99
+
100
+ ///////////////////////////////////////////////////////////////////
101
+ // FlexSlider: Control Nav
102
+ if (slider.vars.controlNav) {
103
+ if (slider.manualExists) {
104
+ slider.controlNav = slider.manualControls;
105
+ } else {
106
+ var controlNavScaffold = $('<ol class="flex-control-nav"></ol>');
107
+ var j = 1;
108
+ for (var i = 0; i < slider.count; i++) {
109
+ controlNavScaffold.append('<li><a>' + j + '</a></li>');
110
+ j++;
111
+ }
112
+
113
+ if (slider.containerExists) {
114
+ $(slider.controlsContainer).append(controlNavScaffold);
115
+ slider.controlNav = $('.flex-control-nav li a', slider.controlsContainer);
116
+ } else {
117
+ slider.append(controlNavScaffold);
118
+ slider.controlNav = $('.flex-control-nav li a', slider);
119
+ }
120
+ }
121
+
122
+ slider.controlNav.eq(slider.currentSlide).addClass('active');
123
+
124
+ slider.controlNav.bind(slider.eventType, function(event) {
125
+ event.preventDefault();
126
+ if (!$(this).hasClass('active')) {
127
+ (slider.controlNav.index($(this)) > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
128
+ slider.flexAnimate(slider.controlNav.index($(this)), slider.vars.pauseOnAction);
129
+ }
130
+ });
131
+ }
132
+ ///////////////////////////////////////////////////////////////////
133
+
134
+ //////////////////////////////////////////////////////////////////
135
+ //FlexSlider: Direction Nav
136
+ if (slider.vars.directionNav) {
137
+ var directionNavScaffold = $('<ul class="flex-direction-nav"><li><a class="prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="next" href="#">' + slider.vars.nextText + '</a></li></ul>');
138
+
139
+ if (slider.containerExists) {
140
+ $(slider.controlsContainer).append(directionNavScaffold);
141
+ slider.directionNav = $('.flex-direction-nav li a', slider.controlsContainer);
142
+ } else {
143
+ slider.append(directionNavScaffold);
144
+ slider.directionNav = $('.flex-direction-nav li a', slider);
145
+ }
146
+
147
+ //Set initial disable styles if necessary
148
+ if (!slider.vars.animationLoop) {
149
+ if (slider.currentSlide == 0) {
150
+ slider.directionNav.filter('.prev').addClass('disabled');
151
+ } else if (slider.currentSlide == slider.count - 1) {
152
+ slider.directionNav.filter('.next').addClass('disabled');
153
+ }
154
+ }
155
+
156
+ slider.directionNav.bind(slider.eventType, function(event) {
157
+ event.preventDefault();
158
+ var target = ($(this).hasClass('next')) ? slider.getTarget('next') : slider.getTarget('prev');
159
+
160
+ if (slider.canAdvance(target)) {
161
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
162
+ }
163
+ });
164
+ }
165
+ //////////////////////////////////////////////////////////////////
166
+
167
+ //////////////////////////////////////////////////////////////////
168
+ //FlexSlider: Keyboard Nav
169
+ if (slider.vars.keyboardNav && $('ul.slides').length == 1) {
170
+ function keyboardMove(event) {
171
+ if (slider.animating) {
172
+ return;
173
+ } else if (event.keyCode != 39 && event.keyCode != 37){
174
+ return;
175
+ } else {
176
+ if (event.keyCode == 39) {
177
+ var target = slider.getTarget('next');
178
+ } else if (event.keyCode == 37){
179
+ var target = slider.getTarget('prev');
180
+ }
181
+
182
+ if (slider.canAdvance(target)) {
183
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
184
+ }
185
+ }
186
+ }
187
+ $(document).bind('keyup', keyboardMove);
188
+ }
189
+ //////////////////////////////////////////////////////////////////
190
+
191
+ ///////////////////////////////////////////////////////////////////
192
+ // FlexSlider: Mousewheel interaction
193
+ if (slider.vars.mousewheel) {
194
+ slider.mousewheelEvent = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel";
195
+ slider.bind(slider.mousewheelEvent, function(e) {
196
+ e.preventDefault();
197
+ e = e ? e : window.event;
198
+ var wheelData = e.detail ? e.detail * -1 : e.wheelDelta / 40,
199
+ target = (wheelData < 0) ? slider.getTarget('next') : slider.getTarget('prev');
200
+
201
+ if (slider.canAdvance(target)) {
202
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
203
+ }
204
+ });
205
+ }
206
+ ///////////////////////////////////////////////////////////////////
207
+
208
+ //////////////////////////////////////////////////////////////////
209
+ //FlexSlider: Slideshow Setup
210
+ if (slider.vars.slideshow) {
211
+ //pauseOnHover
212
+ if (slider.vars.pauseOnHover && slider.vars.slideshow) {
213
+ slider.hover(function() {
214
+ slider.pause();
215
+ }, function() {
216
+ if (!slider.manualPause) {
217
+ slider.resume();
218
+ }
219
+ });
220
+ }
221
+
222
+ //Initialize animation
223
+ slider.animatedSlides = setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
224
+ }
225
+ //////////////////////////////////////////////////////////////////
226
+
227
+ //////////////////////////////////////////////////////////////////
228
+ //FlexSlider: Pause/Play
229
+ if (slider.vars.pausePlay) {
230
+ var pausePlayScaffold = $('<div class="flex-pauseplay"><span></span></div>');
231
+
232
+ if (slider.containerExists) {
233
+ slider.controlsContainer.append(pausePlayScaffold);
234
+ slider.pausePlay = $('.flex-pauseplay span', slider.controlsContainer);
235
+ } else {
236
+ slider.append(pausePlayScaffold);
237
+ slider.pausePlay = $('.flex-pauseplay span', slider);
238
+ }
239
+
240
+ var pausePlayState = (slider.vars.slideshow) ? 'pause' : 'play';
241
+ slider.pausePlay.addClass(pausePlayState).text((pausePlayState == 'pause') ? slider.vars.pauseText : slider.vars.playText);
242
+
243
+ slider.pausePlay.bind(slider.eventType, function(event) {
244
+ event.preventDefault();
245
+ if ($(this).hasClass('pause')) {
246
+ slider.pause();
247
+ slider.manualPause = true;
248
+ } else {
249
+ slider.resume();
250
+ slider.manualPause = false;
251
+ }
252
+ });
253
+ }
254
+ //////////////////////////////////////////////////////////////////
255
+
256
+ //////////////////////////////////////////////////////////////////
257
+ //FlexSlider:Touch Swip Gestures
258
+ //Some brilliant concepts adapted from the following sources
259
+ //Source: TouchSwipe - http://www.netcu.de/jquery-touchwipe-iphone-ipad-library
260
+ //Source: SwipeJS - http://swipejs.com
261
+ if ('ontouchstart' in document.documentElement) {
262
+ //For brevity, variables are named for x-axis scrolling
263
+ //The variables are then swapped if vertical sliding is applied
264
+ //This reduces redundant code...I think :)
265
+ //If debugging, recognize variables are named for horizontal scrolling
266
+ var startX,
267
+ startY,
268
+ offset,
269
+ cwidth,
270
+ dx,
271
+ startT,
272
+ scrolling = false;
273
+
274
+ slider.each(function() {
275
+ if ('ontouchstart' in document.documentElement) {
276
+ this.addEventListener('touchstart', onTouchStart, false);
277
+ }
278
+ });
279
+
280
+ function onTouchStart(e) {
281
+ if (slider.animating) {
282
+ e.preventDefault();
283
+ } else if (e.touches.length == 1) {
284
+ slider.pause();
285
+ cwidth = (slider.vertical) ? slider.height() : slider.width();
286
+ startT = Number(new Date());
287
+ offset = (slider.vertical) ? (slider.currentSlide + slider.cloneOffset) * slider.height() : (slider.currentSlide + slider.cloneOffset) * slider.width();
288
+ startX = (slider.vertical) ? e.touches[0].pageY : e.touches[0].pageX;
289
+ startY = (slider.vertical) ? e.touches[0].pageX : e.touches[0].pageY;
290
+ slider.setTransition(0);
291
+
292
+ this.addEventListener('touchmove', onTouchMove, false);
293
+ this.addEventListener('touchend', onTouchEnd, false);
294
+ }
295
+ }
296
+
297
+ function onTouchMove(e) {
298
+ dx = (slider.vertical) ? startX - e.touches[0].pageY : startX - e.touches[0].pageX;
299
+ scrolling = (slider.vertical) ? (Math.abs(dx) < Math.abs(e.touches[0].pageX - startY)) : (Math.abs(dx) < Math.abs(e.touches[0].pageY - startY));
300
+
301
+ if (!scrolling) {
302
+ e.preventDefault();
303
+ if (slider.vars.animation == "slide" && slider.transitions) {
304
+ if (!slider.vars.animationLoop) {
305
+ dx = dx/((slider.currentSlide == 0 && dx < 0 || slider.currentSlide == slider.count - 1 && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
306
+ }
307
+ slider.args[slider.prop] = (slider.vertical) ? "translate3d(0," + (-offset - dx) + "px,0)": "translate3d(" + (-offset - dx) + "px,0,0)";
308
+ slider.container.css(slider.args);
309
+ }
310
+ }
311
+ }
312
+
313
+ function onTouchEnd(e) {
314
+ slider.animating = false;
315
+ if (slider.animatingTo == slider.currentSlide && !scrolling && !(dx == null)) {
316
+ var target = (dx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
317
+ if (slider.canAdvance(target) && Number(new Date()) - startT < 550 && Math.abs(dx) > 20 || Math.abs(dx) > cwidth/2) {
318
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
319
+ } else {
320
+ slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction);
321
+ }
322
+ }
323
+
324
+ //Finish the touch by undoing the touch session
325
+ this.removeEventListener('touchmove', onTouchMove, false);
326
+ this.removeEventListener('touchend', onTouchEnd, false);
327
+ startX = null;
328
+ startY = null;
329
+ dx = null;
330
+ offset = null;
331
+ }
332
+ }
333
+ //////////////////////////////////////////////////////////////////
334
+
335
+ //////////////////////////////////////////////////////////////////
336
+ //FlexSlider: Resize Functions (If necessary)
337
+ if (slider.vars.animation.toLowerCase() == "slide") {
338
+ $(window).resize(function(){
339
+ if (!slider.animating) {
340
+ if (slider.vertical) {
341
+ slider.height(slider.slides.filter(':first').height());
342
+ slider.args[slider.prop] = (-1 * (slider.currentSlide + slider.cloneOffset))* slider.slides.filter(':first').height() + "px";
343
+ if (slider.transitions) {
344
+ slider.setTransition(0);
345
+ slider.args[slider.prop] = (slider.vertical) ? "translate3d(0," + slider.args[slider.prop] + ",0)" : "translate3d(" + slider.args[slider.prop] + ",0,0)";
346
+ }
347
+ slider.container.css(slider.args);
348
+ } else {
349
+ slider.newSlides.width(slider.width());
350
+ slider.args[slider.prop] = (-1 * (slider.currentSlide + slider.cloneOffset))* slider.width() + "px";
351
+ if (slider.transitions) {
352
+ slider.setTransition(0);
353
+ slider.args[slider.prop] = (slider.vertical) ? "translate3d(0," + slider.args[slider.prop] + ",0)" : "translate3d(" + slider.args[slider.prop] + ",0,0)";
354
+ }
355
+ slider.container.css(slider.args);
356
+ }
357
+ }
358
+ });
359
+ }
360
+ //////////////////////////////////////////////////////////////////
361
+
362
+ //////////////////////////////////////////////////////////////////
363
+ //FlexSlider: Destroy the slider entity
364
+ //Destory is not included in the minified version right now, but this is a working function for anyone who wants to include it.
365
+ //Simply bind the actions you need from this function into a function in the start() callback to the event of your chosing
366
+ /*
367
+ slider.destroy = function() {
368
+ slider.pause();
369
+ if (slider.controlNav && slider.vars.manualControls == "") slider.controlNav.closest('.flex-control-nav').remove();
370
+ if (slider.directionNav) slider.directionNav.closest('.flex-direction-nav').remove();
371
+ if (slider.vars.pausePlay) slider.pausePlay.closest('.flex-pauseplay').remove();
372
+ if (slider.vars.keyboardNav && $('ul.slides').length == 1) $(document).unbind('keyup', keyboardMove);
373
+ if (slider.vars.mousewheel) slider.unbind(slider.mousewheelEvent);
374
+ if (slider.transitions) slider.each(function(){this.removeEventListener('touchstart', onTouchStart, false);});
375
+ if (slider.vars.animation == "slide" && slider.vars.animationLoop) slider.newSlides.filter('.clone').remove();
376
+ if (slider.vertical) slider.height("auto");
377
+ slider.slides.hide();
378
+ slider.removeData('flexslider');
379
+ }
380
+ */
381
+ //////////////////////////////////////////////////////////////////
382
+
383
+ //FlexSlider: start() Callback
384
+ slider.vars.start(slider);
385
+ }
386
+
387
+ //FlexSlider: Animation Actions
388
+ slider.flexAnimate = function(target, pause) {
389
+ if (!slider.animating) {
390
+ //Animating flag
391
+ slider.animating = true;
392
+
393
+ //FlexSlider: before() animation Callback
394
+ slider.animatingTo = target;
395
+ slider.vars.before(slider);
396
+
397
+ //Optional paramter to pause slider when making an anmiation call
398
+ if (pause) {
399
+ slider.pause();
400
+ }
401
+
402
+ //Update controlNav
403
+ if (slider.vars.controlNav) {
404
+ slider.controlNav.removeClass('active').eq(target).addClass('active');
405
+ }
406
+
407
+ //Is the slider at either end
408
+ slider.atEnd = (target == 0 || target == slider.count - 1) ? true : false;
409
+ if (!slider.vars.animationLoop && slider.vars.directionNav) {
410
+ if (target == 0) {
411
+ slider.directionNav.removeClass('disabled').filter('.prev').addClass('disabled');
412
+ } else if (target == slider.count - 1) {
413
+ slider.directionNav.removeClass('disabled').filter('.next').addClass('disabled');
414
+ } else {
415
+ slider.directionNav.removeClass('disabled');
416
+ }
417
+ }
418
+
419
+ if (!slider.vars.animationLoop && target == slider.count - 1) {
420
+ slider.pause();
421
+ //FlexSlider: end() of cycle Callback
422
+ slider.vars.end(slider);
423
+ }
424
+
425
+ if (slider.vars.animation.toLowerCase() == "slide") {
426
+ var dimension = (slider.vertical) ? slider.slides.filter(':first').height() : slider.slides.filter(':first').width();
427
+
428
+ if (slider.currentSlide == 0 && target == slider.count - 1 && slider.vars.animationLoop && slider.direction != "next") {
429
+ slider.slideString = "0px";
430
+ } else if (slider.currentSlide == slider.count - 1 && target == 0 && slider.vars.animationLoop && slider.direction != "prev") {
431
+ slider.slideString = (-1 * (slider.count + 1)) * dimension + "px";
432
+ } else {
433
+ slider.slideString = (-1 * (target + slider.cloneOffset)) * dimension + "px";
434
+ }
435
+ slider.args[slider.prop] = slider.slideString;
436
+
437
+ if (slider.transitions) {
438
+ slider.setTransition(slider.vars.animationDuration);
439
+ slider.args[slider.prop] = (slider.vertical) ? "translate3d(0," + slider.slideString + ",0)" : "translate3d(" + slider.slideString + ",0,0)";
440
+ slider.container.css(slider.args).one("webkitTransitionEnd transitionend", function(){
441
+ slider.wrapup(dimension);
442
+ });
443
+ } else {
444
+ slider.container.animate(slider.args, slider.vars.animationDuration, function(){
445
+ slider.wrapup(dimension);
446
+ });
447
+ }
448
+ } else { //Default to Fade
449
+ slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationDuration);
450
+ slider.slides.eq(target).fadeIn(slider.vars.animationDuration, function() {
451
+ slider.wrapup();
452
+ });
453
+ }
454
+ }
455
+ }
456
+
457
+ //FlexSlider: Function to minify redundant animation actions
458
+ slider.wrapup = function(dimension) {
459
+ if (slider.vars.animation == "slide") {
460
+ //Jump the slider if necessary
461
+ if (slider.currentSlide == 0 && slider.animatingTo == slider.count - 1 && slider.vars.animationLoop) {
462
+ slider.args[slider.prop] = (-1 * slider.count) * dimension + "px";
463
+ if (slider.transitions) {
464
+ slider.setTransition(0);
465
+ slider.args[slider.prop] = (slider.vertical) ? "translate3d(0," + slider.args[slider.prop] + ",0)" : "translate3d(" + slider.args[slider.prop] + ",0,0)";
466
+ }
467
+ slider.container.css(slider.args);
468
+ } else if (slider.currentSlide == slider.count - 1 && slider.animatingTo == 0 && slider.vars.animationLoop) {
469
+ slider.args[slider.prop] = -1 * dimension + "px";
470
+ if (slider.transitions) {
471
+ slider.setTransition(0);
472
+ slider.args[slider.prop] = (slider.vertical) ? "translate3d(0," + slider.args[slider.prop] + ",0)" : "translate3d(" + slider.args[slider.prop] + ",0,0)";
473
+ }
474
+ slider.container.css(slider.args);
475
+ }
476
+ }
477
+ slider.animating = false;
478
+ slider.currentSlide = slider.animatingTo;
479
+ //FlexSlider: after() animation Callback
480
+ slider.vars.after(slider);
481
+ }
482
+
483
+ //FlexSlider: Automatic Slideshow
484
+ slider.animateSlides = function() {
485
+ if (!slider.animating) {
486
+ slider.flexAnimate(slider.getTarget("next"));
487
+ }
488
+ }
489
+
490
+ //FlexSlider: Automatic Slideshow Pause
491
+ slider.pause = function() {
492
+ clearInterval(slider.animatedSlides);
493
+ if (slider.vars.pausePlay) {
494
+ slider.pausePlay.removeClass('pause').addClass('play').text(slider.vars.playText);
495
+ }
496
+ }
497
+
498
+ //FlexSlider: Automatic Slideshow Start/Resume
499
+ slider.resume = function() {
500
+ slider.animatedSlides = setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
501
+ if (slider.vars.pausePlay) {
502
+ slider.pausePlay.removeClass('play').addClass('pause').text(slider.vars.pauseText);
503
+ }
504
+ }
505
+
506
+ //FlexSlider: Helper function for non-looping sliders
507
+ slider.canAdvance = function(target) {
508
+ if (!slider.vars.animationLoop && slider.atEnd) {
509
+ if (slider.currentSlide == 0 && target == slider.count - 1 && slider.direction != "next") {
510
+ return false;
511
+ } else if (slider.currentSlide == slider.count - 1 && target == 0 && slider.direction == "next") {
512
+ return false;
513
+ } else {
514
+ return true;
515
+ }
516
+ } else {
517
+ return true;
518
+ }
519
+ }
520
+
521
+ //FlexSlider: Helper function to determine animation target
522
+ slider.getTarget = function(dir) {
523
+ slider.direction = dir;
524
+ if (dir == "next") {
525
+ return (slider.currentSlide == slider.count - 1) ? 0 : slider.currentSlide + 1;
526
+ } else {
527
+ return (slider.currentSlide == 0) ? slider.count - 1 : slider.currentSlide - 1;
528
+ }
529
+ }
530
+
531
+ //FlexSlider: Helper function to set CSS3 transitions
532
+ slider.setTransition = function(dur) {
533
+ slider.container.css({'-webkit-transition-duration': (dur/1000) + "s"});
534
+ }
535
+
536
+ //FlexSlider: Initialize
537
+ slider.init();
538
+ }
539
+
540
+ //FlexSlider: Default Settings
541
+ $.flexslider.defaults = {
542
+ animation: "fade", //String: Select your animation type, "fade" or "slide"
543
+ slideDirection: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
544
+ slideshow: true, //Boolean: Animate slider automatically
545
+ slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
546
+ animationDuration: 600, //Integer: Set the speed of animations, in milliseconds
547
+ directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
548
+ controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
549
+ keyboardNav: true, //Boolean: Allow slider navigating via keyboard left/right keys
550
+ mousewheel: false, //Boolean: Allow slider navigating via mousewheel
551
+ prevText: "Previous", //String: Set the text for the "previous" directionNav item
552
+ nextText: "Next", //String: Set the text for the "next" directionNav item
553
+ pausePlay: false, //Boolean: Create pause/play dynamic element
554
+ pauseText: 'Pause', //String: Set the text for the "pause" pausePlay item
555
+ playText: 'Play', //String: Set the text for the "play" pausePlay item
556
+ randomize: false, //Boolean: Randomize slide order
557
+ slideToStart: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
558
+ animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
559
+ pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
560
+ pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
561
+ controlsContainer: "", //Selector: Declare which container the navigation elements should be appended too. Default container is the flexSlider element. Example use would be ".flexslider-container", "#container", etc. If the given element is not found, the default action will be taken.
562
+ manualControls: "", //Selector: Declare custom control navigation. Example would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
563
+ start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
564
+ before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
565
+ after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
566
+ end: function(){} //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
567
+ }
568
+
569
+ //FlexSlider: Plugin Function
570
+ $.fn.flexslider = function(options) {
571
+ return this.each(function() {
572
+ if ($(this).find('.slides li').length == 1) {
573
+ $(this).find('.slides li').fadeIn(400);
574
+ }
575
+ else if ($(this).data('flexslider') != true) {
576
+ new $.flexslider($(this), options);
577
+ }
578
+ });
579
+ }
580
+
581
+ })(jQuery);
languages/genesis-slider.po ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2011-09-26 10:09-0300\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=CHARSET\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+
19
+ #: admin.php:74
20
+ msgid "Settings reset."
21
+ msgstr ""
22
+
23
+ #: admin.php:76
24
+ msgid "Settings saved."
25
+ msgstr ""
26
+
27
+ #: admin.php:89
28
+ msgid "Slider Settings"
29
+ msgstr ""
30
+
31
+ #: admin.php:111
32
+ msgid "Genesis Slider Settings"
33
+ msgstr ""
34
+
35
+ #: admin.php:149 plugin.php:202
36
+ msgid "Genesis - Slider"
37
+ msgstr ""
38
+
39
+ #: admin.php:150 admin.php:161
40
+ msgid "Save Settings"
41
+ msgstr ""
42
+
43
+ #: admin.php:151 admin.php:162
44
+ msgid "Reset Settings"
45
+ msgstr ""
46
+
47
+ #: admin.php:151
48
+ msgid "Are you sure you want to reset?"
49
+ msgstr ""
50
+
51
+ #: admin.php:191
52
+ msgid "Type of Content"
53
+ msgstr ""
54
+
55
+ #: admin.php:193
56
+ msgid "Would you like to use posts or pages"
57
+ msgstr ""
58
+
59
+ #: admin.php:212
60
+ msgid "By Taxonomy and Terms"
61
+ msgstr ""
62
+
63
+ #: admin.php:212
64
+ msgid "Choose a term to determine what slides to include"
65
+ msgstr ""
66
+
67
+ #: admin.php:216
68
+ msgid "All Taxonomies and Terms"
69
+ msgstr ""
70
+
71
+ #: admin.php:243
72
+ msgid "Include or Exclude by Taxonomy ID"
73
+ msgstr ""
74
+
75
+ #: admin.php:246
76
+ msgid ""
77
+ "List which category, tag or other taxonomy IDs to include / exclude. "
78
+ "(1,2,3,4 for example)"
79
+ msgstr ""
80
+
81
+ #: admin.php:256
82
+ #, php-format
83
+ msgid "Include or Exclude by %s ID"
84
+ msgstr ""
85
+
86
+ #: admin.php:259
87
+ msgid ""
88
+ "Choose the include / exclude slides using their post / page ID in a comma-"
89
+ "separated list. (1,2,3,4 for example)"
90
+ msgstr ""
91
+
92
+ #: admin.php:263
93
+ msgid "Select"
94
+ msgstr ""
95
+
96
+ #: admin.php:264
97
+ msgid "Include"
98
+ msgstr ""
99
+
100
+ #: admin.php:265
101
+ msgid "Exclude"
102
+ msgstr ""
103
+
104
+ #: admin.php:270
105
+ msgid "List which"
106
+ msgstr ""
107
+
108
+ #: admin.php:270 admin.php:290
109
+ msgid "ID"
110
+ msgstr ""
111
+
112
+ #: admin.php:270
113
+ msgid "to include / exclude. (1,2,3,4 for example)"
114
+ msgstr ""
115
+
116
+ #: admin.php:276
117
+ msgid "Number of Slides to Show"
118
+ msgstr ""
119
+
120
+ #: admin.php:281
121
+ msgid "Number of Posts to Offset"
122
+ msgstr ""
123
+
124
+ #: admin.php:286
125
+ msgid "Order By"
126
+ msgstr ""
127
+
128
+ #: admin.php:288
129
+ msgid "Date"
130
+ msgstr ""
131
+
132
+ #: admin.php:289
133
+ msgid "Title"
134
+ msgstr ""
135
+
136
+ #: admin.php:291
137
+ msgid "Random"
138
+ msgstr ""
139
+
140
+ #: admin.php:299
141
+ msgid "Transition Settings"
142
+ msgstr ""
143
+
144
+ #: admin.php:302
145
+ msgid "Time Between Slides (in milliseconds)"
146
+ msgstr ""
147
+
148
+ #: admin.php:307
149
+ msgid "Slide Transition Speed (in milliseconds)"
150
+ msgstr ""
151
+
152
+ #: admin.php:312
153
+ msgid "Slider Effect"
154
+ msgstr ""
155
+
156
+ #: admin.php:313 admin.php:366
157
+ msgid "Select one of the following:"
158
+ msgstr ""
159
+
160
+ #: admin.php:315
161
+ msgid "Scroll right"
162
+ msgstr ""
163
+
164
+ #: admin.php:316
165
+ msgid "Scroll left"
166
+ msgstr ""
167
+
168
+ #: admin.php:317
169
+ msgid "Scroll down"
170
+ msgstr ""
171
+
172
+ #: admin.php:318
173
+ msgid "Scroll up"
174
+ msgstr ""
175
+
176
+ #: admin.php:319
177
+ msgid "Fade"
178
+ msgstr ""
179
+
180
+ #: admin.php:320
181
+ msgid "Wipe"
182
+ msgstr ""
183
+
184
+ #: admin.php:321
185
+ msgid "Cover up"
186
+ msgstr ""
187
+
188
+ #: admin.php:322
189
+ msgid "Cover down"
190
+ msgstr ""
191
+
192
+ #: admin.php:323
193
+ msgid "Cover left"
194
+ msgstr ""
195
+
196
+ #: admin.php:324
197
+ msgid "Cover right"
198
+ msgstr ""
199
+
200
+ #: admin.php:329
201
+ msgid "Scroll Loop (only applies to scroll options)"
202
+ msgstr ""
203
+
204
+ #: admin.php:331
205
+ msgid "Rewind slides"
206
+ msgstr ""
207
+
208
+ #: admin.php:332
209
+ msgid "Loop slides"
210
+ msgstr ""
211
+
212
+ #: admin.php:338
213
+ msgid "Display Settings"
214
+ msgstr ""
215
+
216
+ #: admin.php:341
217
+ msgid "Slider Width (in pixels)"
218
+ msgstr ""
219
+
220
+ #: admin.php:346
221
+ msgid "Slider Height (in pixels)"
222
+ msgstr ""
223
+
224
+ #: admin.php:351
225
+ msgid "Display Next / Previous Arrows in Slider?"
226
+ msgstr ""
227
+
228
+ #: admin.php:356
229
+ msgid "Content Settings"
230
+ msgstr ""
231
+
232
+ #: admin.php:359
233
+ msgid "Display Post/Page Title in Slider?"
234
+ msgstr ""
235
+
236
+ #: admin.php:362
237
+ msgid "Display Content in Slider?"
238
+ msgstr ""
239
+
240
+ #: admin.php:368
241
+ msgid "Display post content"
242
+ msgstr ""
243
+
244
+ #: admin.php:369
245
+ msgid "Display post excerpts"
246
+ msgstr ""
247
+
248
+ #: admin.php:374
249
+ msgid "More Text (if applicable)"
250
+ msgstr ""
251
+
252
+ #: admin.php:379
253
+ msgid "Limit content to"
254
+ msgstr ""
255
+
256
+ #: admin.php:381
257
+ msgid "characters"
258
+ msgstr ""
259
+
260
+ #: admin.php:384
261
+ msgid ""
262
+ "Using this option will limit the text and strip all formatting from the text "
263
+ "displayed. To use this option, choose \"Display post content\" in the select "
264
+ "box above."
265
+ msgstr ""
266
+
267
+ #: admin.php:387
268
+ msgid "Slider Excerpt Width (in pixels)"
269
+ msgstr ""
270
+
271
+ #: admin.php:392
272
+ msgid "Excerpt Location (vertical)"
273
+ msgstr ""
274
+
275
+ #: admin.php:394
276
+ msgid "Top"
277
+ msgstr ""
278
+
279
+ #: admin.php:395
280
+ msgid "Bottom"
281
+ msgstr ""
282
+
283
+ #: admin.php:400
284
+ msgid "Excerpt Location (horizontal)"
285
+ msgstr ""
286
+
287
+ #: admin.php:402
288
+ msgid "Left"
289
+ msgstr ""
290
+
291
+ #: admin.php:403
292
+ msgid "Right"
293
+ msgstr ""
294
+
295
+ #: admin.php:413
296
+ msgid "Save Changes"
297
+ msgstr ""
298
+
299
+ #: plugin.php:200
300
+ msgid "Displays a slideshow inside a widget area"
301
+ msgstr ""
302
+
303
+ #: plugin.php:364
304
+ msgid "Title:"
305
+ msgstr ""
306
+
307
+ #: plugin.php:367
308
+ #, php-format
309
+ msgid ""
310
+ "To configure slider options, please go to the <a href=\"%s\">Slider "
311
+ "Settings</a> page."
312
+ msgstr ""
readme.txt ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Genesis Responsive Slider ===
2
+ Contributors: nathanrice, studiopress, wpmuguru
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
4
+ Tags: slider, slideshow, responsive, genesis, genesiswp, studiopress
5
+ Requires at least: 3.2
6
+ Tested up to: 3.3
7
+ Stable tag: 0.9.0
8
+
9
+ This plugin allows you to create a simple responsive slider that displays the featured image, along with the title and excerpt from each post.
10
+
11
+ == Description ==
12
+
13
+ This plugin allows you to create a simple responsive slider that displays the featured image, along with the title and excerpt from each post.
14
+
15
+ It includes options for the maximum dimensions of your slideshow, allows you to choose to display posts or pages, what category to pull from, and even the specific post IDs of the posts you want to display. It includes next/previous arrows and a pager along with the option to turn both on or off. Finally, you can place the slider into a widget area.
16
+
17
+ The slideshow is also responsive and will automatically adjust for the screen it is being displayed on.
18
+
19
+ Note: This plugin only supports Genesis child themes.
20
+
21
+ == Installation ==
22
+
23
+ 1. Upload the entire `genesis-responsive-slider` folder to the `/wp-content/plugins/` directory
24
+ 1. DO NOT change the name of the `genesis-responsive-slider` folder
25
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
26
+ 1. Navigate to the `Genesis > Slider Settings` menu
27
+ 1. Configure the slider
28
+ 1. In the "Widgets" screen, drag the "Genesis Responsive Slider" widget to the widget area of your choice
29
+
30
+ == Child Theme Integration ==
31
+
32
+ To adjust the slider defaults for a child theme use a filter simiar to the following:
33
+
34
+ `add_filter( 'genesis_responsive_slider_settings_defaults', 'my_child_theme_responsive_slider_defaults' );
35
+
36
+ function my_child_theme_responsive_slider_defaults( $defaults ) {
37
+ $defaults = array(
38
+ 'post_type' => 'post',
39
+ 'posts_term' => '',
40
+ 'exclude_terms' => '',
41
+ 'include_exclude' => '',
42
+ 'post_id' => '',
43
+ 'posts_num' => 5,
44
+ 'posts_offset' => 0,
45
+ 'orderby' => 'date',
46
+ 'slideshow_timer' => 4000,
47
+ 'slideshow_delay' => 800,
48
+ 'slideshow_arrows' => 1,
49
+ 'slideshow_pager' => 1,
50
+ 'slideshow_loop' => 1,
51
+ 'slideshow_height' => 400,
52
+ 'slideshow_width' => 920,
53
+ 'slideshow_effect' => 'slide',
54
+ 'slideshow_excerpt_content' => 'excerpts',
55
+ 'slideshow_excerpt_content_limit' => 150,
56
+ 'slideshow_more_text' => '[Continue Reading]',
57
+ 'slideshow_excerpt_show' => 1,
58
+ 'slideshow_excerpt_width' => 50,
59
+ 'location_vertical' => 'bottom',
60
+ 'location_horizontal' => 'right',
61
+ 'slideshow_hide_mobile' => 1
62
+ );
63
+ return $defaults;
64
+ }
65
+ `
66
+
67
+ == Changelog ==
68
+
69
+ = 0.9.0 =
70
+ * Beta Release
style.css ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Genesis Slider
2
+ ------------------------------------------------------------ */
3
+
4
+ #genesis-responsive-slider {
5
+ background-color: #fff;
6
+ border: 10px solid #eee;
7
+ margin: 0 auto;
8
+ padding: 10px;
9
+ position: relative;
10
+ }
11
+
12
+ .genesis-responsive-slider-wrap {
13
+ clear: both;
14
+ display: block;
15
+ float: left;
16
+ margin: 0;
17
+ padding: 0;
18
+ position: relative;
19
+ z-index: 1;
20
+ }
21
+
22
+ #slides {
23
+ float: left;
24
+ margin: 0;
25
+ overflow: hidden;
26
+ padding: 0;
27
+ position: absolute;
28
+ z-index: 1;
29
+ }
30
+
31
+ .slide-excerpt {
32
+ background-color: #fff;
33
+ filter: alpha(opacity=80);
34
+ display: block;
35
+ margin: 10px;
36
+ opacity: 0.8;
37
+ padding: 0;
38
+ position: absolute;
39
+ z-index: 8;
40
+ }
41
+
42
+ html > body .slide-excerpt-border {
43
+ background: none;
44
+ border: 1px solid #ddd;
45
+ display: inline;
46
+ float: left;
47
+ margin: 10px;
48
+ padding: 14px;
49
+ position: relative;
50
+ z-index: 8;
51
+ }
52
+
53
+ .slide-image {
54
+ overflow: hidden;
55
+ }
56
+
57
+ /*
58
+ * jQuery FlexSlider v1.8
59
+ * http://flex.madebymufffin.com
60
+ *
61
+ * Copyright 2011, Tyler Smith
62
+ * Free to use under the MIT license.
63
+ * http://www.opensource.org/licenses/mit-license.php
64
+ */
65
+
66
+ /* Browser Resets */
67
+ .flex-container a:active,
68
+ .flexslider a:active {
69
+ outline: none;
70
+ }
71
+
72
+ .slides,
73
+ .flex-control-nav,
74
+ .flex-direction-nav {
75
+ list-style: none;
76
+ margin: 0;
77
+ padding: 0;
78
+ }
79
+
80
+ /* FlexSlider Necessary Styles
81
+ *********************************/
82
+ .flexslider {
83
+ margin: 0;
84
+ padding: 0;
85
+ width: 100%;
86
+ }
87
+
88
+ .flexslider .slides > li {
89
+ display: none;
90
+ } /* Hide the slides before the JS is loaded. Avoids image jumping */
91
+
92
+ .flexslider .slides img {
93
+ display: block;
94
+ max-width: 100%;
95
+ }
96
+
97
+ .flex-pauseplay span {
98
+ text-transform: capitalize;
99
+ }
100
+
101
+ /* Clearfix for the .slides element */
102
+ .slides:after {
103
+ clear: both;
104
+ content: ".";
105
+ display: block;
106
+ height: 0;
107
+ line-height: 0;
108
+ visibility: hidden;
109
+ }
110
+
111
+ html[xmlns] .slides {
112
+ display: block;
113
+ }
114
+
115
+ * html .slides {
116
+ height: 1%;
117
+ }
118
+
119
+ /* No JavaScript Fallback */
120
+ /* If you are not using another script, such as Modernizr, make sure you
121
+ * include js that eliminates this class on page load */
122
+ .no-js .slides > li:first-child {
123
+ display: block;
124
+ }
125
+
126
+
127
+ /* FlexSlider Default Theme
128
+ *********************************/
129
+ .flexslider {
130
+ background: #fff;
131
+ position: relative;
132
+ zoom: 1;
133
+ }
134
+
135
+ .flexslider .slides {
136
+ zoom: 1;
137
+ }
138
+
139
+ .flexslider .slides > li {
140
+ position: relative;
141
+ }
142
+
143
+ /* Suggested container for "Slide" animation setups. Can replace this with your own, if you wish */
144
+ .flex-container {
145
+ zoom: 1;
146
+ position: relative;
147
+ }
148
+
149
+ /* Caption style */
150
+ /* IE rgba() hack */
151
+ .flex-caption {
152
+ background:none;
153
+ -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000);
154
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000);
155
+ zoom: 1;
156
+ }
157
+
158
+ .flex-caption {
159
+ background: rgba(0,0,0,.3);
160
+ bottom: 0;
161
+ color: #fff;
162
+ font-size: 14px;
163
+ left: 0;
164
+ line-height: 18px;
165
+ padding: 2%;
166
+ position: absolute;
167
+ text-shadow: 0 -1px 0 rgba(0,0,0,.3);
168
+ width: 96%;
169
+ }
170
+
171
+ /* Direction Nav */
172
+ .flex-direction-nav li a {
173
+ width: 52px;
174
+ height: 52px;
175
+ margin: -20px 0 0;
176
+ display: block;
177
+ background: url(images/bg_direction_nav.png) no-repeat 0 0;
178
+ position: absolute;
179
+ top: 50%;
180
+ cursor: pointer;
181
+ text-indent: -9999px;
182
+ z-index: 100;
183
+ }
184
+
185
+ .flex-direction-nav li .next {
186
+ background-position: -52px 0;
187
+ right: -60px;
188
+ }
189
+
190
+ .flex-direction-nav li .next:hover {
191
+ background-position: -52px -50px;
192
+ }
193
+
194
+ .flex-direction-nav li .prev {
195
+ left: -60px;
196
+ }
197
+
198
+ .flex-direction-nav li .prev:hover {
199
+ background-position: 0 -50px;
200
+ }
201
+
202
+ .flex-direction-nav li .disabled {
203
+ cursor: default;
204
+ filter:alpha(opacity=30);
205
+ opacity: .3;
206
+ }
207
+
208
+ /* Control Nav */
209
+ .flex-control-nav {
210
+ float: left;
211
+ margin: 20px 0 10px;
212
+ position: relative;
213
+ text-align: center;
214
+ width: 100%;
215
+ z-index: 100;
216
+ }
217
+
218
+ .flex-control-nav li {
219
+ *display: inline;
220
+ display: inline-block;
221
+ margin: 0 0 0 5px;
222
+ zoom: 1;
223
+ }
224
+
225
+ .flex-control-nav li:first-child {
226
+ margin: 0;
227
+ }
228
+
229
+ .flex-control-nav li a {
230
+ background: url(images/bg_control_nav.png) no-repeat 0 0;
231
+ cursor: pointer;
232
+ display: block;
233
+ height: 13px;
234
+ text-indent: -9999px;
235
+ width: 13px;
236
+ }
237
+
238
+ .flex-control-nav li a:hover {
239
+ background-position: 0 -13px;
240
+ }
241
+
242
+ .flex-control-nav li a.active {
243
+ background-position: 0 -26px;
244
+ cursor: default;
245
+ }