WOW Slider - Version 2.7.1

Version Description

Download this release

Release Info

Developer WOWSlider.com
Plugin Icon wp plugin WOW Slider
Version 2.7.1
Comparing to
See all releases

Version 2.7.1

admin-bar.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wowslider_admin_bar_menu(){
4
+ global $wp_admin_bar;
5
+ if (is_super_admin() && is_admin_bar_showing()){
6
+ $wp_admin_bar -> add_menu(array(
7
+ 'parent' => 'new-content',
8
+ 'title' => __('Slider', 'wowslider'),
9
+ 'href' => admin_url('admin.php?page=wowslider-add-new')
10
+ ));
11
+ }
12
+ }
13
+
14
+ add_action('wp_before_admin_bar_render', 'wowslider_admin_bar_menu');
15
+
16
+
17
+ ?>
admin.php ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wowslider_admin_menu(){
4
+ global $submenu;
5
+ $file = __FILE__;
6
+ $path = plugin_basename($file);
7
+ add_filter('admin_body_class', create_function('$class', '
8
+ if ((float)get_bloginfo("version") >= 3.5)
9
+ $class .= "wp-gte-3-5";
10
+ return $class;
11
+ '));
12
+ add_menu_page('WOW Slider', 'WOW Slider', 7, $file, 'wowslider_sliders', WOWSLIDER_PLUGIN_URL . 'data/icon0.gif');
13
+ add_submenu_page($file, __('Add New Slider', 'wowslider'), __('Add New', 'wowslider'), 7, 'wowslider-add-new', 'wowslider_add_new');
14
+ if (isset($submenu[$path][0][0])) $submenu[$path][0][0] = $submenu[$path][0][3] = __('All Sliders', 'wowslider');
15
+ }
16
+
17
+ function wowslider_help($contextual_help, $screen_id, $screen){
18
+ $page = isset($_GET['page']) ? $_GET['page'] : '';
19
+ if ($screen -> parent_file == 'wowslider/admin.php'){
20
+ return sprintf(__('<p>For more information, read help on %s</p>', 'wowslider'), '<a href="http://wowslider.com/wordpress-jquery-slider.html" target="_blank">wowslider.com</a>');
21
+ }
22
+ return $contextual_help;
23
+ }
24
+
25
+ function wowslider_tinymce_button($q = false){
26
+ static $sliders = null;
27
+ if ($sliders === null) $sliders = wowslider_get(array('last' => 30));
28
+ if ($sliders){
29
+ if (is_array($q) && isset($q[0])){
30
+ array_push($q, '|', 'wowslider');
31
+ return $q;
32
+ } else if (is_array($q)){
33
+ $q['wowslider'] = WOWSLIDER_PLUGIN_URL . 'data/tinymce_plugin.js';
34
+ return $q;
35
+ } else if ($q === 'admin_head'){
36
+ $wowslider = array(
37
+ 'title' => __('Insert Slider', 'wowslider'),
38
+ 'sliders' => $sliders
39
+ );
40
+ echo '<script type="text/javascript">
41
+ //<![CDATA[
42
+ var tinymce_wowslider = ' . json_encode($wowslider) . ';
43
+ //]]>
44
+ </script>
45
+ ';
46
+ } else {
47
+ if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) return;
48
+ if (get_user_option('rich_editing') == 'true'){
49
+ add_filter('mce_external_plugins', 'wowslider_tinymce_button');
50
+ add_filter('mce_buttons', 'wowslider_tinymce_button');
51
+ add_filter('admin_head', create_function('', 'wowslider_tinymce_button("admin_head");'));
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ function wowslider_set_screen_id(){
58
+ $screen = get_current_screen();
59
+ if ('toplevel_page_wowslider/admin' == $screen -> id)
60
+ set_current_screen('wowslider_sliders');
61
+ }
62
+
63
+ function wowslider_table_include(){
64
+ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') return false;
65
+ require_once WOWSLIDER_PLUGIN_PATH . 'list-table.php';
66
+ $screen = get_current_screen();
67
+ if ('wowslider_sliders' == $screen -> id){
68
+ if (isset($_POST['wp_screen_options']['value'], $_POST['screenoptionnonce']) &&
69
+ wp_verify_nonce($_REQUEST['screenoptionnonce'], 'screen-options-nonce')){
70
+ update_user_option(get_current_user_id(), 'wowslider_sliders_per_page', max(1, min(100, (int)$_POST['wp_screen_options']['value'])));
71
+ }
72
+ $sliders_per_page = (int)get_user_option('wowslider_sliders_per_page');
73
+ add_filter('manage_wowslider_sliders_columns', array(WOWSlider_List_Table, 'get_columns'), 0);
74
+ add_screen_option('per_page', array('label' => _x('Sliders', 'sliders per page (screen options)'), 'default' => ($sliders_per_page ? $sliders_per_page : 10), 'option' => 'edit_sliders_per_page'));
75
+ }
76
+ }
77
+
78
+ function wowslider_sliders(){
79
+ global $page, $status, $s;
80
+ if (isset($_REQUEST['action'], $_REQUEST['slider']) && $_REQUEST['action'] == 'view') return wowslider_view();
81
+ if (isset($_REQUEST['delete_all'], $_REQUEST['_wpnonce']) &&
82
+ wp_verify_nonce($_REQUEST['_wpnonce'], 'bulk-wowslider') &&
83
+ ($ids = wowslider_delete('*'))){
84
+ echo '<div id="message" class="updated"><p>';
85
+ $deleted = count($ids);
86
+ printf(_n('Item permanently deleted.', '%s items permanently deleted.', $deleted), number_format_i18n($deleted));
87
+ echo '</p></div>';
88
+ } else if (isset($_REQUEST['action'], $_REQUEST['_wpnonce']) &&
89
+ ((isset($_REQUEST['slider']) && wp_verify_nonce($_REQUEST['_wpnonce'], $_REQUEST['action'])) ||
90
+ (isset($_REQUEST['checked']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'bulk-wowslider')))){
91
+ $ids = isset($_REQUEST['checked']) ? $_REQUEST['checked'] : $_REQUEST['slider'];
92
+ if ($_REQUEST['action'] == 'trash' && ($ids = wowslider_delete($ids, 'trash'))){
93
+ echo '<div id="message" class="updated"><p>';
94
+ $trashed = count($ids);
95
+ printf(_n('Item moved to the Trash.', '%s items moved to the Trash.', $trashed), number_format_i18n($trashed));
96
+ echo ' <a href="' . wp_nonce_url('admin.php?page=wowslider/admin.php&amp;slider=' . implode(',', $ids) .'&amp;action=untrash&amp;slider_status=' . $status . '&amp;paged=' . $page, 'untrash') . '" title="' . esc_attr__('Restore this item from the Trash') . '">' . __('Undo') . '</a><br />';
97
+ echo '</p></div>';
98
+ } else if ($_REQUEST['action'] == 'untrash' && ($ids = wowslider_delete($ids, 'restore'))){
99
+ echo '<div id="message" class="updated"><p>';
100
+ $untrashed = count($ids);
101
+ printf(_n('Item restored from the Trash.', '%s items restored from the Trash.', $untrashed), number_format_i18n($untrashed));
102
+ echo '</p></div>';
103
+ } else if ($_REQUEST['action'] == 'delete' && ($ids = wowslider_delete($ids))){
104
+ echo '<div id="message" class="updated"><p>';
105
+ $deleted = count($ids);
106
+ printf(_n('Item permanently deleted.', '%s items permanently deleted.', $deleted), number_format_i18n($deleted));
107
+ echo '</p></div>';
108
+ }
109
+ }
110
+ $wp_list_table = new WOWSlider_List_Table;
111
+ $wp_list_table -> prepare_items();
112
+ ?><div class="wrap">
113
+ <div id="icon-wowslider" class="icon32"><br /></div><h2><?php _e('All Sliders', 'wowslider'); ?><a href="<?php echo admin_url('admin.php?page=wowslider-add-new'); ?>" class="add-new-h2">Add New</a> <?php
114
+ if ($s) printf('<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', htmlspecialchars($s)); ?></h2>
115
+ <?php $wp_list_table -> views(); ?>
116
+ <form method="get" action="">
117
+ <?php $wp_list_table -> search_box(__('Search Sliders', 'wowslider'), 'slider'); ?>
118
+ <input type="hidden" name="page" value="wowslider/admin.php" />
119
+ <input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
120
+ <input type="hidden" name="slider_status" value="<?php echo esc_attr($status) ?>" />
121
+ <?php $wp_list_table -> display(); ?>
122
+ </form>
123
+ </div><?php
124
+ }
125
+
126
+ function wowslider_view(){
127
+ $id = (int)$_REQUEST['slider'];
128
+ if ($html = wowslider_get($id, false)){
129
+ $slider = wowslider_get(array('where' => 'ID = ' . $id, 'limit' => 1));
130
+ ?><div class="wrap">
131
+ <div id="icon-wowslider" class="icon32"><br /></div><h2><?php echo htmlspecialchars($slider[0]['name']); ?><a href="javascript://" onclick="history.back();" class="add-new-h2">&larr; back</a></h2>
132
+ </div>
133
+ <div id="wowslider-view"><?php echo $html; ?></div>
134
+ <strong class="shortcode"><?php _e('shortcode:', 'wowslider'); ?><br/><code>[wowslider id="<?php echo $id; ?>"]</code></strong>
135
+ <strong class="shortcode"><?php _e('php code:', 'wowslider'); ?><br/><code>&lt;?php wowslider(<?php echo $id; ?>); ?&gt;</code></strong>
136
+ <?php
137
+ } else echo '<div id="message" class="error"><p>' . __('Slider not found!', 'wowslider') . '</p></div>';
138
+ }
139
+
140
+ function wowslider_add_new(){
141
+ $tab = (isset($_GET['tab']) && $_GET['tab'] == 'import') ? 'import' : 'upload';
142
+ $verif = (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'wowslider-add-new'));
143
+ if (isset($_GET['message'])){
144
+ if (isset($_GET['error'])) echo '<div id="message" class="error"><p>' . htmlspecialchars(urldecode($_GET['message'])) . '</p></div>';
145
+ else if (isset($_GET['slider'])){
146
+ if ($_GET['message']) echo '<div id="message" class="updated"><p>' . str_replace('%s', '<strong>./import/' . htmlspecialchars(urldecode($_GET['message'])) . '</strong>', __('Slider imported from file %s! To add it on the page use the shortcode:', 'wowslider')) . ' <strong><code>[wowslider id="' . (int)$_GET['slider'] . '"]</code></strong></p></div>';
147
+ else echo '<div id="message" class="updated"><p>' . __('Slider added! To add it on the page use the shortcode:', 'wowslider') . ' <strong><code>[wowslider id="' . (int)$_GET['slider'] . '"]</code></strong></p></div>';
148
+ }
149
+ }
150
+ if ($tab == 'upload' && isset($_FILES['sliderzip']) && $verif){
151
+ $file = wp_handle_upload($_FILES['sliderzip'], array(
152
+ 'test_form' => false,
153
+ 'mimes' => array('zip' => 'application/zip')
154
+ ));
155
+ if (isset($file['error'])) exit(wp_redirect(admin_url('admin.php?page=wowslider-add-new&error=1&message=' . urlencode($file['error']))));
156
+ else if (($status = wowslider_add($file['file'])) !== true) exit(wp_redirect(admin_url('admin.php?page=wowslider-add-new&error=1&message=' . urlencode($status))));
157
+ else exit(wp_redirect(admin_url('admin.php?page=wowslider-add-new&message=&slider=' . wowslider_add())));
158
+ } else if ($tab == 'import' && $verif){
159
+ if (($status = wowslider_import()) !== true) exit(wp_redirect(admin_url('admin.php?page=wowslider-add-new&tab=import&error=1&message=' . urlencode($status))));
160
+ else exit(wp_redirect(admin_url('admin.php?page=wowslider-add-new&tab=import&message=' . urlencode(wowslider_import('file')) . '&slider=' . wowslider_add())));
161
+ }
162
+ ?>
163
+ <div class="wrap">
164
+ <div id="icon-wowslider" class="icon32"><br /></div>
165
+ <h2><?php _e('Add New Slider', 'wowslider'); ?></h2>
166
+ <ul class="subsubsub">
167
+ <li><a href="<?php echo admin_url('admin.php?page=wowslider-add-new'); ?>"<?php if ($tab == 'upload') echo ' class="current"'; ?>><?php _e('Upload', 'wowslider'); ?></a> |</li>
168
+ <li><a href="<?php echo admin_url('admin.php?page=wowslider-add-new&tab=import'); ?>"<?php if ($tab == 'import') echo ' class="current"'; ?>><?php _e('Import from Folder', 'wowslider'); ?></a></li>
169
+ </ul><br class="clear" />
170
+ <? if ($tab == 'upload'): ?>
171
+ <h4><?php _e('Add a slider in .zip format', 'wowslider') ?></h4>
172
+ <p class="install-help"><?php echo str_replace('WOW Slider', '<a href="http://wowslider.com/wordpress-jquery-slider.html" target="_blank">WOW Slider</a>', __('Create a slider with WOW Slider first and then upload it here. <br/>Please see full tutorial+video here: <a href="http://wowslider.com/wordpress-jquery-slider.html" target="_blank">http://wowslider.com/wordpress-jquery-slider.html</a>', 'wowslider')) ?></p>
173
+ <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('admin.php?page=wowslider-add-new&noheader=1') ?>">
174
+ <?php wp_nonce_field('wowslider-add-new') ?>
175
+ <label class="screen-reader-text" for="sliderzip"><?php _e('Slider zip file', 'wowslider'); ?></label>
176
+ <input type="file" id="sliderzip" name="sliderzip" />
177
+ <input type="submit" class="button" value="<?php esc_attr_e('Add Now', 'wowslider') ?>" />
178
+ </form>
179
+ <p><div class="video"><object width="532" height="325">
180
+ <param name="movie" value="http://www.youtube.com/v/o82IuhWtgTo?fs=1" />
181
+ <param name="allowFullScreen" value="true" />
182
+ <param name="allowscriptaccess" value="never" />
183
+ <embed src="http://www.youtube.com/v/o82IuhWtgTo?fs=1" type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" width="532" height="325" />
184
+ </object></div></p>
185
+ <? else: ?>
186
+ <h4><?php _e('Add a slider in .zip format from folder', 'wowslider') ?></h4>
187
+ <p class="install-help"><?php echo str_replace('WOW Slider', '<a href="http://wowslider.com/" target="_blank">WOW Slider</a>', __('Create a slider with WOW Slider app and copy to folder:', 'wowslider')) ?> "./wp-content/uploads/wow-slider-plugin/import/".</p>
188
+ <br />
189
+ <form method="post" action="<?php echo self_admin_url('admin.php?page=wowslider-add-new&tab=import&noheader=1') ?>">
190
+ <?php wp_nonce_field('wowslider-add-new') ?>
191
+ <input type="submit" class="button" value="<?php esc_attr_e('Import from Folder', 'wowslider') ?>" />
192
+ </form>
193
+ <? endif; ?>
194
+ </div>
195
+ <?php
196
+ }
197
+
198
+ function wowslider_add_new_from_plugins($source){
199
+ global $wp_filesystem;
200
+ if (substr($source, -10) == 'wowslider/'){
201
+ $message = $location = '';
202
+ $uploads = wp_upload_dir();
203
+ if (!$wp_filesystem || !is_object($wp_filesystem)) WP_Filesystem();
204
+ $file = $uploads['path'] . '/' . basename(substr($source, 0, -10)) . '.zip';
205
+ @$wp_filesystem -> chmod($source, 0777, true);
206
+ $source = WP_CONTENT_DIR . '/' . substr($source, strlen($wp_filesystem -> wp_content_dir()));
207
+ if (!is_dir($source . 'install/')){
208
+ $location = admin_url('admin.php?page=wowslider-add-new&error=1&message=' . urlencode(__('Wrong slider.', 'wowslider')));
209
+ $message = '<div id="message" class="error"><p>' . htmlspecialchars(__('Wrong slider.', 'wowslider')) . '</p></div>';
210
+ } else if (($status = wowslider_add($source . 'install/')) !== true){
211
+ $location = admin_url('admin.php?page=wowslider-add-new&error=1&message=' . urlencode($status));
212
+ $message = '<div id="message" class="error"><p>' . htmlspecialchars($status) . '</p></div>';
213
+ } else {
214
+ $location = admin_url('admin.php?page=wowslider-add-new&message=&slider=' . wowslider_add());
215
+ $message = '<div id="message" class="updated"><p>' . __('Slider added! To add it on the page use the shortcode:', 'wowslider') . ' <strong><code>[wowslider id="' . wowslider_add() . '"]</code></strong>. ' . str_replace('all sliders', '<a href="' . admin_url('admin.php?page=wowslider/admin.php') . '">all sliders</a>', __('See all sliders.', 'wowslider')) . '</p></div>';
216
+ }
217
+ if (WOWSlider_Helpers::is_new_plugin($source . 'wowslider.php')){
218
+ foreach (array('', 'data/') as $dir){
219
+ if ($list = WOWSlider_Helpers::filesystem_dirlist($source . $dir)){
220
+ foreach ($list as $item){
221
+ if ($item['type'] != 'f') continue;
222
+ WOWSlider_Helpers::filesystem_copy($source . $dir . $item['name'], WOWSLIDER_PLUGIN_PATH . $dir . $item['name'], true);
223
+ }
224
+ }
225
+ }
226
+ }
227
+ echo '
228
+ <script type="text/javascript">
229
+ //<![CDATA[
230
+ (function(){
231
+ var func = function(){ location.href = "' . $location . '"; };
232
+ if (typeof jQuery != "undefined") jQuery(document).ready(func);
233
+ else {
234
+ if (window.addEventListener) window.addEventListener("load", func, false);
235
+ else if (window.attachEvent) window.attachEvent("onload", func);
236
+ else setTimeout(func, 2500);
237
+ }
238
+ })();
239
+ //]]>
240
+ </script>
241
+ <noscript>' . $message . '</noscript>';
242
+ include(ABSPATH . 'wp-admin/admin-footer.php');
243
+ if (file_exists($file)) @unlink($file);
244
+ exit();
245
+ }
246
+ return $source;
247
+ }
248
+
249
+ function wowslider_old_version(){
250
+ $dir = WOWSLIDER_PLUGIN_PATH . 'sliders/';
251
+ if (is_dir($dir)){
252
+ require_once(ABSPATH . 'wp-admin/includes/file.php');
253
+ if ($list = WOWSlider_Helpers::filesystem_dirlist($dir)){
254
+ foreach ($list as $item)
255
+ WOWSlider_Helpers::filesystem_move($source . $dir . $item['name'], wowslider_upload_dir() . $item['name']);
256
+ }
257
+ WOWSlider_Helpers::filesystem_delete($dir, true);
258
+ }
259
+ }
260
+
261
+ register_activation_hook(WOWSLIDER_PLUGIN_PATH . 'wowslider.php', 'wowslider_install');
262
+ add_action('init', 'wowslider_old_version'); // support old versions
263
+ add_action('init', 'wowslider_tinymce_button');
264
+ add_action('admin_menu', 'wowslider_admin_menu');
265
+ add_filter('contextual_help', 'wowslider_help', 10, 3);
266
+ add_filter('in_admin_header', 'wowslider_table_include');
267
+ add_filter('load-toplevel_page_wowslider/admin', 'wowslider_set_screen_id');
268
+ add_filter('upgrader_source_selection', 'wowslider_add_new_from_plugins');
269
+ wp_register_style('wowslider-admin', WOWSLIDER_PLUGIN_URL . 'data/admin.css');
270
+ wp_enqueue_style('wowslider-admin');
271
+
272
+ ?>
api.php ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wowslider_upload_dir($k = 'path'){
4
+ static $dir = '/wow-slider-plugin/';
5
+ if (is_string($dir)){
6
+ $upload_dir = wp_upload_dir();
7
+ $dir = array(
8
+ 'url' => $upload_dir['baseurl'] . $dir,
9
+ 'path' => $upload_dir['basedir'] . $dir
10
+ );
11
+ if (!is_dir($dir['path'])) @mkdir($dir['path']);
12
+ if (!is_dir($dir['path'] . 'import/')) @mkdir($dir['path'] . 'import/');
13
+ }
14
+ return $dir[$k];
15
+ }
16
+
17
+ function wowslider_install($undo = false){
18
+ global $wpdb;
19
+ $table = $wpdb -> prefix . 'wowslider';
20
+ if ($undo){
21
+ $wpdb -> query("DROP TABLE $table;");
22
+ require_once(ABSPATH . 'wp-admin/includes/file.php');
23
+ WOWSlider_Helpers::filesystem_delete(wowslider_upload_dir(), true);
24
+ delete_option('wowslider_installed');
25
+ delete_metadata('user', 0, 'wowslider_last_view', '', true);
26
+ delete_metadata('user', 0, 'wp_wowslider_sliders_per_page', '', true);
27
+ delete_metadata('user', 0, 'managewowslider_sliderscolumnshidden', '', true);
28
+ } else {
29
+ $charset_collate = '';
30
+ if (!empty($wpdb -> charset)) $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
31
+ if (!empty($wpdb -> collate)) $charset_collate .= " COLLATE $wpdb->collate";
32
+ $queries = "CREATE TABLE $table (
33
+ ID bigint(20) unsigned NOT NULL auto_increment,
34
+ slider_name varchar(200) NOT NULL,
35
+ slider_author bigint(20) unsigned NOT NULL default '0',
36
+ slider_date datetime NOT NULL default '0000-00-00 00:00:00',
37
+ slider_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
38
+ slider_public tinyint(3) unsigned NOT NULL default '1',
39
+ slider_images text NOT NULL,
40
+ PRIMARY KEY (ID),
41
+ KEY slider_name (slider_name),
42
+ KEY slider_author (slider_author),
43
+ KEY slider_public (slider_public),
44
+ KEY slider_date (slider_date)
45
+ ) $charset_collate;";
46
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
47
+ dbDelta($queries);
48
+ if (!get_option('wowslider_installed') && is_dir(WOWSLIDER_PLUGIN_PATH . 'install/')){
49
+ add_option('wowslider_installed', 1);
50
+ wowslider_add(WOWSLIDER_PLUGIN_PATH . 'install/');
51
+ }
52
+ }
53
+ return true;
54
+ }
55
+
56
+ function wowslider_add($folder = false, $update = 0, $delete = true){
57
+ global $wpdb, $user_ID;
58
+ static $id = 0;
59
+ if (!$folder) return $id;
60
+ if (is_file($folder) && strtolower(substr($folder, -4)) == '.zip')
61
+ return wowslider_import($folder, $update, $delete);
62
+ $folder = rtrim(str_replace('\\', '/', $folder), '/') . '/';
63
+ if (is_file($folder . 'slider.html') &&
64
+ is_dir($folder . 'images/')){
65
+ $images = array();
66
+ $list = WOWSlider_Helpers::filesystem_dirlist($folder . (is_dir($folder . 'tooltips/') ? 'tooltips/' : 'images/'));
67
+ foreach ($list as $name=>$v){
68
+ if ($v['type'] == 'f' && strtolower(substr($name, -4)) == '.jpg')
69
+ $images[] = $name;
70
+ if (count($images) == 10) break;
71
+ }
72
+ if (count($images)){
73
+ $name = '';
74
+ if (preg_match('/<!--\s*Name:(.+?)\s*-->/ui', file_get_contents($folder . 'slider.html'), $match)) $name = trim($match[1]);
75
+ $date = current_time('mysql');
76
+ $insert = array(
77
+ 'slider_name' => mb_substr($name, 0, 200),
78
+ 'slider_author' => $user_ID,
79
+ 'slider_date' => $date,
80
+ 'slider_date_gmt' => get_gmt_from_date($date),
81
+ 'slider_public' => 1,
82
+ 'slider_images' => serialize($images)
83
+ );
84
+ if ($update) $insert['ID'] = $update;
85
+ foreach ($insert as $k=>$v) $insert[$k] = '"' . $wpdb -> escape($v) . '"';
86
+ $wpdb -> query('INSERT INTO ' . $wpdb -> prefix . 'wowslider (' . implode(',', array_keys($insert)) . ') VALUES (' . implode(',', array_values($insert)) . ');');
87
+ $id = $update ? (int)$update : (int)$wpdb -> get_var('SELECT LAST_INSERT_ID();');
88
+ if ($id){
89
+ $dest = wowslider_upload_dir() . $id . '/';
90
+ if (!is_dir(wowslider_upload_dir())) mkdir(wowslider_upload_dir());
91
+ if (is_dir($dest)) WOWSlider_Helpers::filesystem_delete($dest, true);
92
+ WOWSlider_Helpers::filesystem_move($folder, $dest);
93
+ if ($name == '') $wpdb -> query('UPDATE ' . $wpdb -> prefix . 'wowslider SET slider_name = "' . $wpdb -> escape('Slider ' . $id) . '" WHERE ID = ' . $id . ';');
94
+ file_put_contents($dest . 'slider.html', str_replace('%ID%', $id, file_get_contents($dest . 'slider.html')));
95
+ file_put_contents($dest . 'style.css', str_replace('%ID%', $id, file_get_contents($dest . 'style.css')));
96
+ if (file_exists($dest . 'script.js')) file_put_contents($dest . 'script.js', str_replace('%ID%', $id, file_get_contents($dest . 'script.js')));
97
+ return true;
98
+ } else return __('Failure when added to the table.', 'wowslider');
99
+ }
100
+ }
101
+ return __('Wrong slider.', 'wowslider');
102
+ }
103
+
104
+ function wowslider_import($zip_file = false, $update = 0, $delete = true){
105
+ global $wp_filesystem;
106
+ static $file = '';
107
+ if ($zip_file === 'file') return $file;
108
+ $path = wowslider_upload_dir() . 'import/';
109
+ $status = true;
110
+ if (!$zip_file){
111
+ $list = WOWSlider_Helpers::filesystem_dirlist($path);
112
+ foreach ($list as $name=>$v){
113
+ if ($v['type'] == 'f' && strtolower(substr($name, -4)) == '.zip'){
114
+ $zip_file = $path . $name;
115
+ $file = $name;
116
+ break;
117
+ }
118
+ }
119
+ if (!$zip_file) return __('Files to import not found.', 'wowslider');
120
+ }
121
+ $path .= md5(microtime()) . '/';
122
+ @mkdir($path);
123
+ add_filter('filesystem_method', create_function('', 'return "direct";'));
124
+ WP_Filesystem();
125
+ $unzip = unzip_file($zip_file, $path);
126
+ $install = $path . 'wowslider/install/';
127
+ if ($delete) WOWSlider_Helpers::filesystem_delete($zip_file);
128
+ if (is_object($unzip)) $status = __('Wrong .zip file.', 'wowslider');
129
+ else {
130
+ $status = wowslider_add((is_dir($install) ? $install : $path . 'import/'), $update);
131
+ $install = substr($install, 0, -8);
132
+ if (is_dir($install) && WOWSlider_Helpers::is_new_plugin($install . 'wowslider.php')){
133
+ foreach (array('', 'data/') as $dir){
134
+ if ($list = WOWSlider_Helpers::filesystem_dirlist($install . $dir)){
135
+ foreach ($list as $item){
136
+ if ($item['type'] != 'f') continue;
137
+ WOWSlider_Helpers::filesystem_copy($install . $dir . $item['name'], WOWSLIDER_PLUGIN_PATH . $dir . $item['name'], true);
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ WOWSlider_Helpers::filesystem_delete($path, true);
144
+ return $status;
145
+ }
146
+
147
+ function wowslider_delete($id, $type = 'permanently'){
148
+ global $wpdb;
149
+ $where = '';
150
+ if ($id !== 'all' && $id !== '*'){
151
+ if (is_string($id)) $id = preg_split('/,\s*/', $id);
152
+ else if (!is_array($id)) $id = array($id);
153
+ $id = array_map(create_function('$v', 'return (int)$v;'), $id);
154
+ $where = ' ID IN (' . implode(',', array_unique($id)) . ') AND';
155
+ }
156
+ if ($type == 'permanently'){
157
+ if (!$id = $wpdb -> get_results('SELECT ID FROM ' . $wpdb -> prefix . 'wowslider WHERE' . $where . ' slider_public = 0 ORDER BY ID ASC LIMIT 200', ARRAY_A)) return false;
158
+ $indexes = array_map(create_function('$v', 'return (int)$v[\'ID\'];'), $id);
159
+ foreach ($indexes as $id){
160
+ WOWSlider_Helpers::filesystem_delete(wowslider_upload_dir() . $id . '/', true);
161
+ $wpdb -> query('DELETE FROM ' . $wpdb -> prefix . 'wowslider WHERE ID = ' . $id . ';');
162
+ }
163
+ return $indexes;
164
+ } else if ($type == 'restore') $wpdb -> query('UPDATE ' . $wpdb -> prefix . 'wowslider SET slider_public = 1 WHERE' . $where . ' slider_public = 0;');
165
+ else $wpdb -> query('UPDATE ' . $wpdb -> prefix . 'wowslider SET slider_public = 0 WHERE' . $where . ' slider_public = 1;');
166
+ return $id;
167
+ }
168
+
169
+ function wowslider_get($q){
170
+ global $wpdb;
171
+ static $q_count = 0;
172
+ $sliders = array();
173
+ if (is_integer($q)){
174
+ $id = $q;
175
+ $only_public = func_num_args() > 1 ? func_get_arg(1) : true;
176
+ if ($wpdb -> get_var('SELECT ID FROM ' . $wpdb -> prefix . 'wowslider WHERE ID = ' . $id . ($only_public ? ' AND slider_public = 1' : '') . ' LIMIT 1;')){
177
+ $html = "\n\n<link rel='stylesheet' href='" . wowslider_upload_dir('url') . "$id/style.css' type='text/css' media='all' />\n" . str_replace('%URL%', wowslider_upload_dir('url') . "$id/", file_get_contents(wowslider_upload_dir() . $id . '/slider.html')) . "\n\n";
178
+ if (file_exists(wowslider_upload_dir() . $id . '/script.js')) $html .= "<script type='text/javascript' src='" . wowslider_upload_dir('url') . "$id/script.js'></script>\n\n";
179
+ return $html;
180
+ }
181
+ return '';
182
+ } else if (is_string($q) && ($q = preg_split('/\s+/', $q, 2))){
183
+ list($q, $param) = array_pad($q, 2, '');
184
+ if ($q == 'count') return $q_count;
185
+ else if ($q == 'totals'){
186
+ return array(
187
+ 'published' => (int)$wpdb -> get_var('SELECT COUNT(*) FROM ' . $wpdb -> prefix . 'wowslider WHERE slider_public = 1;'),
188
+ 'trash' => (int)$wpdb -> get_var('SELECT COUNT(*) FROM ' . $wpdb -> prefix . 'wowslider WHERE slider_public = 0;')
189
+ );
190
+ } else if ($q == 'months'){
191
+ if (!in_array($param, array('published', 'trash'))) $param = 'all';
192
+ return $wpdb -> get_results('SELECT DISTINCT YEAR(slider_date) AS year, MONTH(slider_date) AS month FROM ' . $wpdb -> prefix . 'wowslider' . ($param != 'all' ? ' WHERE slider_public = ' . ($param == 'trash' ? 0 : 1) : '') . ' ORDER BY slider_date DESC', ARRAY_A);
193
+ }
194
+ } else if (isset($q['last']) && ($results = $wpdb -> get_results('SELECT ID as id, slider_name as name FROM ' . $wpdb -> prefix . 'wowslider WHERE slider_public = 1 ORDER BY ID DESC LIMIT ' . (int)$q['last'] . ';', ARRAY_A))){
195
+ foreach ($results as $v)
196
+ $sliders[ $v['id'] ] = $v['name'];
197
+ } else {
198
+ if (isset($q['limit'])) $limit = ' LIMIT ' . $q['limit'];
199
+ else if (isset($q['page'])){
200
+ $count = isset($q['count']) ? (int)$q['count'] : 10;
201
+ $limit = ' LIMIT ' . (((int)$q['page'] - 1) * $count) . ', ' . $count;
202
+ } else $limit = '';
203
+ $sort = ' ORDER BY ' . (isset($q['sort']) ? $q['sort'] : 'ID ASC');
204
+ $users = $where = array();
205
+ if (isset($q['where'])) $where[] = $q['where'];
206
+ if (isset($q['month'])) $where[] = 'MONTH(slider_date) = ' . $q['month'];
207
+ if (isset($q['year'])) $where[] = 'YEAR(slider_date) = ' . $q['year'];
208
+ if (isset($q['search'])){
209
+ $s = preg_split('/\s+/', $q['search']);
210
+ foreach ($s as $i=>$v) $s[$i] = 'slider_name LIKE "%' . $wpdb -> escape(like_escape($v)) . '%"';
211
+ $where[] = '((' . implode(' AND ', $s) . ')';
212
+ $where[ count($where) - 1 ] .= (preg_match('/^[0-9]+$/', $q['search']) ? ' OR ID = ' . (int)$q['search'] : '') . ')';
213
+ }
214
+ $where = $where ? ' WHERE ' . implode(' AND ', $where) : '';
215
+ if (!$q_count = (int)$wpdb -> get_var('SELECT COUNT(*) FROM ' . $wpdb -> prefix . 'wowslider ' . $where . ';')) return $sliders;
216
+ $sliders = $wpdb -> get_results('SELECT ID as id, slider_name as name, slider_author as author, slider_date as date, slider_date_gmt as date_gmt, slider_public as public, slider_images as images FROM ' . $wpdb -> prefix . 'wowslider ' . $where . $sort . $limit . ';', ARRAY_A);
217
+ foreach ($sliders as $i=>$v) $users[] = $v['author'];
218
+ $results = get_users(array('include' => array_unique($users)));
219
+ $users = array();
220
+ for ($i = 0, $count = count($results); $i < $count; $i++)
221
+ $users[ (int)$results[$i] -> ID ] = $results[$i] -> display_name;
222
+ foreach ($sliders as $i=>$v){
223
+ $index = (int)$v['author'];
224
+ $sliders[$i]['images'] = unserialize($v['images']);
225
+ $sliders[$i]['author'] = false;
226
+ if (isset($users[$index])){
227
+ $sliders[$i]['author'] = array(
228
+ 'id' => $index,
229
+ 'name' => $users[$index]
230
+ );
231
+ }
232
+ $sliders[$i]['trash'] = (int)$v['public'] ? false : true;
233
+ $sliders[$i]['name'] = htmlspecialchars($sliders[$i]['name']);
234
+ }
235
+ }
236
+ return $sliders;
237
+ }
238
+
239
+ ?>
data/admin.css ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /** icon (main menu) */
3
+ #toplevel_page_wowslider-admin .wp-menu-image img {
4
+ background: url("icons.png") no-repeat 1px 4px;
5
+ opacity: 1;
6
+ filter: alpha(opacity=100);
7
+ }
8
+ body.wp-gte-3-5 #toplevel_page_wowslider-admin .wp-menu-image img {
9
+ background-position: 6px 6px;
10
+ }
11
+ body.admin-color-classic #toplevel_page_wowslider-admin .wp-menu-image img {
12
+ background-position: 1px -29px;
13
+ }
14
+ #toplevel_page_wowslider-admin.wp-has-current-submenu .wp-menu-image img,
15
+ body.admin-color-classic #toplevel_page_wowslider-admin.wp-has-current-submenu .wp-menu-image img,
16
+ body.admin-color-classic #toplevel_page_wowslider-admin:hover .wp-menu-image img,
17
+ #toplevel_page_wowslider-admin:hover .wp-menu-image img {
18
+ background-position: 1px -63px;
19
+ }
20
+ body.wp-gte-3-5.admin-color-classic #toplevel_page_wowslider-admin .wp-menu-image img {
21
+ background-position: 6px -28px;
22
+ }
23
+ body.wp-gte-3-5 #toplevel_page_wowslider-admin.wp-has-current-submenu .wp-menu-image img,
24
+ body.wp-gte-3-5 #toplevel_page_wowslider-admin:hover .wp-menu-image img {
25
+ background-position: 6px -62px;
26
+ }
27
+
28
+ /** icon (header) */
29
+ #icon-wowslider {
30
+ background: url("icons32.png") no-repeat 0 2px;
31
+ }
32
+ body.admin-color-classic #icon-wowslider {
33
+ background-position: 0 -59px;
34
+ }
35
+
36
+ /** table */
37
+ .wowslider-list-table .column-images img {
38
+ width:60px;
39
+ padding:2px;
40
+ background:#fff;
41
+ border:1px solid #ccc;
42
+ }
43
+ .wowslider-list-table .column-images a:hover img {
44
+ border:1px solid #999;
45
+ }
46
+ .wowslider-list-table .column-code small {
47
+ font-size:10px;
48
+ color:#707070;
49
+ }
50
+
51
+ /** wowslider preview */
52
+ body.wp-admin #wowslider-view { margin-top:50px; }
53
+ strong.shortcode {
54
+ margin-top:30px;
55
+ display:block;
56
+ text-align:center;
57
+ font-size:12px;
58
+ font-weight:normal;
59
+ line-height:24px;
60
+ color:#aaa;
61
+ }
62
+ strong.shortcode code {
63
+ font-size:16px;
64
+ color:#333;
65
+ }
data/icon.png ADDED
Binary file
data/icon0.gif ADDED
Binary file
data/icons.png ADDED
Binary file
data/icons32.png ADDED
Binary file
data/tinymce_plugin.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ (function(){
3
+ tinymce.create('tinymce.plugins.wowslider', {
4
+ init : function(ed, url){
5
+ for (var id in tinymce_wowslider.sliders){
6
+ tinymce_wowslider.last = id;
7
+ break;
8
+ }
9
+ tinymce_wowslider.url = url;
10
+ tinymce_wowslider.insert = function(){
11
+ var id = (this.v ? this.v : tinymce_wowslider.last);
12
+ tinymce.execCommand('mceInsertContent', false, '[wowslider id="' + id + '"]');
13
+ };
14
+ },
15
+ createControl : function(n, cm){
16
+ switch (n){
17
+ case 'wowslider':
18
+ var c = cm.createSplitButton('wowslider', {
19
+ title : tinymce_wowslider.title,
20
+ image : tinymce_wowslider.url + '/icon.png',
21
+ onclick : tinymce_wowslider.insert
22
+ });
23
+ c.onRenderMenu.add(function(c, m){
24
+ for (var id in tinymce_wowslider.sliders){
25
+ m.add({
26
+ v : id,
27
+ title : tinymce_wowslider.sliders[id],
28
+ onclick : tinymce_wowslider.insert
29
+ });
30
+ }
31
+ });
32
+ return c;
33
+ }
34
+ return null;
35
+ },
36
+ });
37
+ tinymce.PluginManager.add('wowslider', tinymce.plugins.wowslider);
38
+ })();
helpers.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WOWSlider_Helpers {
4
+
5
+ function filesystem_copy($source, $destination, $overwrite = false) {
6
+ if (!$overwrite && file_exists($destination))
7
+ return false;
8
+ $rtval = @copy($source, $destination);
9
+ return $rtval;
10
+ }
11
+
12
+ function filesystem_move($source, $destination, $overwrite = false){
13
+ if (!file_exists($source) || (!$overwrite && is_file($destination)))
14
+ return false;
15
+ if (@rename($source, $destination))
16
+ return true;
17
+ if (is_dir($source)){
18
+ $dirs = $list = array();
19
+ $source = trailingslashit($source);
20
+ $destination = trailingslashit($destination);
21
+ $length = strlen($source);
22
+ $dirs[] = $source;
23
+ while ($dirs){
24
+ $dir = array_pop($dirs);
25
+ if ($dh = opendir($dir)){
26
+ while (($item = readdir($dh)) !== false){
27
+ if ($item{0} == '.') continue;
28
+ else if (is_dir($dir . $item)){
29
+ $list[] = substr($dir . $item . '/', $length);
30
+ $dirs[] = $dir . $item . '/';
31
+ } else $list[] = substr($dir . $item, $length);
32
+ }
33
+ closedir($dh);
34
+ }
35
+ }
36
+ sort($list);
37
+ if (!is_dir($destination)) @mkdir($destination);
38
+ foreach ($list as $item){
39
+ if (substr($item, -1) == '/'){
40
+ if (!is_dir($destination . $item))
41
+ @mkdir($destination . $item);
42
+ } else {
43
+ if (!file_exists($destination . $item) || $overwrite)
44
+ @copy($source . $item, $destination . $item);
45
+ @unlink($source . $item);
46
+ }
47
+ }
48
+ WOWSlider_Helpers::filesystem_delete($source, true);
49
+ return true;
50
+ }
51
+ if (WOWSlider_Helpers::filesystem_copy($source, $destination, $overwrite) && file_exists($destination)){
52
+ WOWSlider_Helpers::filesystem_delete($source);
53
+ return true;
54
+ } else {
55
+ return false;
56
+ }
57
+ }
58
+
59
+ function filesystem_delete($file, $recursive = false, $type = false){
60
+ if (empty($file)) return false;
61
+ $file = str_replace('\\', '/', $file);
62
+ if ('f' == $type || is_file($file))
63
+ return @unlink($file);
64
+ if (!$recursive && is_dir($file))
65
+ return @rmdir($file);
66
+ $file = trailingslashit($file);
67
+ $filelist = WOWSlider_Helpers::filesystem_dirlist($file, true);
68
+ $retval = true;
69
+ if (is_array($filelist))
70
+ foreach ($filelist as $filename => $fileinfo)
71
+ if (!WOWSlider_Helpers::filesystem_delete($file . $filename, $recursive, $fileinfo['type']))
72
+ $retval = false;
73
+ if (file_exists($file) && !@rmdir($file))
74
+ $retval = false;
75
+ return $retval;
76
+ }
77
+
78
+ function filesystem_dirlist($path, $include_hidden = true, $recursive = false){
79
+ if (is_file($path)){
80
+ $limit_file = basename($path);
81
+ $path = dirname($path);
82
+ } else $limit_file = false;
83
+ if (!is_dir($path)) return false;
84
+ $dir = @dir($path);
85
+ if (!$dir) return false;
86
+ $ret = array();
87
+ while (false !== ($entry = $dir -> read())){
88
+ $struc = array();
89
+ $struc['name'] = $entry;
90
+ if ('.' == $struc['name'] || '..' == $struc['name'])
91
+ continue;
92
+ if (!$include_hidden && '.' == $struc['name'][0])
93
+ continue;
94
+ if ($limit_file && $struc['name'] != $limit_file)
95
+ continue;
96
+ $struc['type'] = is_dir($path.'/'.$entry) ? 'd' : 'f';
97
+ if ('d' == $struc['type']){
98
+ if ($recursive)
99
+ $struc['files'] = WOWSlider_Helpers::filesystem_dirlist($path . '/' . $struc['name'], $include_hidden, $recursive);
100
+ else
101
+ $struc['files'] = array();
102
+ }
103
+ $ret[ $struc['name'] ] = $struc;
104
+ }
105
+ $dir -> close();
106
+ unset($dir);
107
+ return $ret;
108
+ }
109
+
110
+ function is_new_plugin($file){
111
+ if (!file_exists($file)) return false;
112
+ $current = get_file_data(WOWSLIDER_PLUGIN_PATH . 'wowslider.php', array('Version' => 'Version'), 'plugin');
113
+ $new = get_file_data($file, array('Version' => 'Version'), 'plugin');
114
+ return version_compare($new['Version'], $current['Version'], '>');
115
+ }
116
+
117
+ }
118
+
119
+ ?>
install/arrows.gif ADDED
Binary file
install/arrows.png ADDED
Binary file
install/bullet.png ADDED
Binary file
install/images/slide1new.jpg ADDED
Binary file
install/images/slide2new.jpg ADDED
Binary file
install/images/slide3new.jpg ADDED
Binary file
install/script.js ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // -----------------------------------------------------------------------------------
2
+ // http://wowslider.com/
3
+ // JavaScript Wow Slider is a free software that helps you easily generate delicious
4
+ // slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
5
+ // Generated by WOW Slider 2.6
6
+ jQuery.fn.wowSlider = function (d) {
7
+ var e = jQuery;
8
+ var h = this;
9
+ var t = h.get(0);
10
+ d = e.extend({
11
+ prev: "",
12
+ next: "",
13
+ duration: 1000,
14
+ delay: 20 * 100,
15
+ width: 960,
16
+ height: 360,
17
+ controls: true,
18
+ autoPlay: true,
19
+ bullets: true,
20
+ }, d);
21
+ var a = e(".ws_images", h);
22
+ var l = a.find("ul");
23
+
24
+ function u(D) {
25
+ l.css({
26
+ left: -D + "00%"
27
+ })
28
+ }
29
+ e("<div>")
30
+ .css({
31
+ width: "100%",
32
+ visibility: "hidden",
33
+ "font-size": 0,
34
+ "line-height": 0
35
+ })
36
+ .append(a.find("li:first img:first")
37
+ .clone()
38
+ .css({
39
+ width: "100%"
40
+ }))
41
+ .prependTo(a);
42
+ l.css({
43
+ position: "absolute",
44
+ top: 0,
45
+ animation: "none",
46
+ "-moz-animation": "none",
47
+ "-webkit-animation": "none"
48
+ });
49
+ var m = a.find("li");
50
+ var v = m.length;
51
+
52
+ function i(D) {
53
+ return ((D || 0) + v) % v
54
+ }
55
+ var C = navigator.userAgent;
56
+ if ((e.browser.msie && parseInt(e.browser.version, 10) < 8) || (/Safari/.test(C))) {
57
+ var b = Math.pow(10, Math.ceil(Math.LOG10E * Math.log(v)));
58
+ l.css({
59
+ width: b + "00%"
60
+ });
61
+ m.css({
62
+ width: 100 / b + "%"
63
+ })
64
+ } else {
65
+ l.css({
66
+ width: v + "00%",
67
+ display: "table"
68
+ });
69
+ m.css({
70
+ display: "table-cell",
71
+ "float": "none",
72
+ width: "auto"
73
+ })
74
+ }
75
+ u(0);
76
+ var k = [];
77
+ m.each(function (D) {
78
+ var F = e(">img:first,>a:first,>div:first", this)
79
+ .get(0);
80
+ var G = e("<div></div>");
81
+ for (var E = 0; E < this.childNodes.length;) {
82
+ if (this.childNodes[E] != F) {
83
+ G.append(this.childNodes[E])
84
+ } else {
85
+ E++
86
+ }
87
+ }
88
+ if (!e(this)
89
+ .data("descr")) {
90
+ e(this)
91
+ .data("descr", G.html()
92
+ .replace(/^\s+|\s+$/g, ""))
93
+ }
94
+ e(this)
95
+ .css({
96
+ "font-size": 0
97
+ });
98
+ k[k.length] = e(">a>img", this)
99
+ .get(0) || e(">*", this)
100
+ .get(0)
101
+ });
102
+ k = e(k);
103
+ k.css("visibility", "visible");
104
+
105
+ function f(F, D, E) {
106
+ this.go = function (G) {
107
+ E.find("ul")
108
+ .stop(true)
109
+ .animate({
110
+ left: (G ? -G + "00%" : (/Safari/.test(navigator.userAgent) ? "0%" : 0))
111
+ }, F.duration, "easeInOutExpo");
112
+ return G
113
+ }
114
+ }
115
+ var o = new f(d, k, a);
116
+ var c = 0;
117
+
118
+ function r(F, E, D) {
119
+ if (isNaN(F)) {
120
+ F = c + 1
121
+ }
122
+ F = i(F);
123
+ if (c == F) {
124
+ return
125
+ }
126
+ s(F, E, D)
127
+ }
128
+ function s(F, E, D) {
129
+ var F = o.go(F, c, E, D);
130
+ if (F < 0) {
131
+ return
132
+ }
133
+ q(F);
134
+ j(m[F]);
135
+ c = F;
136
+ z()
137
+ }
138
+ var B = h.find(".ws_bullets");
139
+
140
+ function q(D) {
141
+ if (B.length) {
142
+ n(D)
143
+ }
144
+ }
145
+ var p;
146
+
147
+ function z(D) {
148
+ w();
149
+ if (d.autoPlay) {
150
+ p = setTimeout(function () {
151
+ r()
152
+ }, d.delay + (D ? 0 : d.duration))
153
+ }
154
+ }
155
+ function w() {
156
+ if (p) {
157
+ clearTimeout(p)
158
+ }
159
+ p = null
160
+ }
161
+ function y(G, F, E, D) {
162
+ w();
163
+ G.preventDefault();
164
+ r(F, E, D);
165
+ z()
166
+ }
167
+ if (d.controls) {
168
+ var x = e('<a href="#" class="ws_next">' + d.next + "</a>");
169
+ var g = e('<a href="#" class="ws_prev">' + d.prev + "</a>");
170
+ h.append(x);
171
+ h.append(g);
172
+ x.bind("click", function (D) {
173
+ y(D, c + 1)
174
+ });
175
+ g.bind("click", function (D) {
176
+ y(D, c - 1)
177
+ })
178
+ }
179
+ function A() {
180
+ h.find(".ws_bullets a")
181
+ .click(function (L) {
182
+ y(L, e(this)
183
+ .index())
184
+ });
185
+ if (B.length) {
186
+ var F = B.find(">div");
187
+ var K = e("a", B);
188
+ var I = K.find("IMG");
189
+ if (I.length) {
190
+ var H = e('<div class="ws_bulframe"/>')
191
+ .appendTo(F);
192
+ var E = e("<div/>")
193
+ .css({
194
+ width: I.length + 1 + "00%"
195
+ })
196
+ .appendTo(e("<div/>")
197
+ .appendTo(H));
198
+ I.appendTo(E);
199
+ e("<span/>")
200
+ .appendTo(H);
201
+ var G = -1;
202
+
203
+ function J(N) {
204
+ if (N < 0) {
205
+ N = 0
206
+ }
207
+ e(K.get(G))
208
+ .removeClass("ws_overbull");
209
+ e(K.get(N))
210
+ .addClass("ws_overbull");
211
+ H.show();
212
+ var O = {
213
+ left: K.get(N)
214
+ .offsetLeft - H.width() / 2,
215
+ "margin-top": K.get(N)
216
+ .offsetTop - K.get(0)
217
+ .offsetTop + "px",
218
+ "margin-bottom": -K.get(N)
219
+ .offsetTop + K.get(K.length - 1)
220
+ .offsetTop + "px"
221
+ };
222
+ var M = I.get(N);
223
+ var L = {
224
+ left: -M.offsetLeft + (e(M)
225
+ .outerWidth(true) - e(M)
226
+ .outerWidth()) / 2
227
+ };
228
+ if (G < 0) {
229
+ H.css(O);
230
+ E.css(L)
231
+ } else {
232
+ if (!document.all) {
233
+ O.opacity = 1
234
+ }
235
+ H.stop()
236
+ .animate(O, "fast");
237
+ E.stop()
238
+ .animate(L, "fast")
239
+ }
240
+ G = N
241
+ }
242
+ K.hover(function () {
243
+ J(e(this)
244
+ .index())
245
+ });
246
+ var D;
247
+ F.hover(function () {
248
+ if (D) {
249
+ clearTimeout(D);
250
+ D = 0
251
+ }
252
+ J(G)
253
+ }, function () {
254
+ K.removeClass("ws_overbull");
255
+ if (document.all) {
256
+ if (!D) {
257
+ D = setTimeout(function () {
258
+ H.hide();
259
+ D = 0
260
+ }, 400)
261
+ }
262
+ } else {
263
+ H.stop()
264
+ .animate({
265
+ opacity: 0
266
+ }, {
267
+ duration: "fast",
268
+ complete: function () {
269
+ H.hide()
270
+ }
271
+ })
272
+ }
273
+ });
274
+ F.click(function (L) {
275
+ y(L, e(L.target)
276
+ .index())
277
+ })
278
+ }
279
+ }
280
+ }
281
+ function n(D) {
282
+ e("A", B)
283
+ .each(function (E) {
284
+ if (E == D) {
285
+ e(this)
286
+ .addClass("ws_selbull")
287
+ } else {
288
+ e(this)
289
+ .removeClass("ws_selbull")
290
+ }
291
+ })
292
+ }
293
+ h.append("<div class='ws-title' style='display:none'></div>");
294
+
295
+ function j(E) {
296
+ var G = e("img", E)
297
+ .attr("title");
298
+ var F = e(E)
299
+ .data("descr");
300
+ var D = e(".ws-title", h);
301
+ D.stop(1, 1)
302
+ .stop(1, 1)
303
+ .fadeOut(1000 / 3, function () {
304
+ if (G || F) {
305
+ D.html((G ? "<span>" + G + "</span>" : "") + (F ? "<div>" + F + "</div>" : ""));
306
+ D.fadeIn(400, function () {
307
+ if (e.browser.msie) {
308
+ e(this)
309
+ .get(0)
310
+ .style.removeAttribute("filter")
311
+ }
312
+ })
313
+ }
314
+ })
315
+ }
316
+ if (B.length) {
317
+ A()
318
+ }
319
+ q(c);
320
+ j(m[c]);
321
+ z(1);
322
+ return this
323
+ };
324
+ jQuery.extend(jQuery.easing, {
325
+ easeInOutExpo: function (e, f, a, h, g) {
326
+ if (f == 0) {
327
+ return a
328
+ }
329
+ if (f == g) {
330
+ return a + h
331
+ }
332
+ if ((f /= g / 2) < 1) {
333
+ return h / 2 * Math.pow(2, 10 * (f - 1)) + a
334
+ }
335
+ return h / 2 * (-Math.pow(2, - 10 * --f) + 2) + a
336
+ }
337
+ });
338
+
339
+ jQuery("#wowslider-container%ID%").wowSlider({effect:"rotate",prev:"",next:"",duration:20*100,delay:20*100,width:580,height:212,autoPlay:true,stopOnHover:false,loop:false,bullets:true,caption:true,captionEffect:"slide",controls:true,logo:"wowslider/install/loading.gif",images:0});
install/shadow.png ADDED
Binary file
install/slider.html ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Name: WOWSlider -->
2
+
3
+ <!-- Start WOWSlider.com BODY section -->
4
+ <div id="wowslider-container%ID%">
5
+ <div class="ws_images"><ul>
6
+ <li><a href="http://www.wowslider.com/index.html#overview"><img src="%URL%images/slide1new.jpg" alt="" title="" id="wows%ID%_0"/></a></li>
7
+ <li><a href="http://www.wowslider.com/demo.html"><img src="%URL%images/slide2new.jpg" alt="You can add description to slides!" title="You can add description to slides!" id="wows%ID%_1"/></a></li>
8
+ <li><a href="http://www.wowslider.com/index.html#download"><img src="%URL%images/slide3new.jpg" alt="" title="" id="wows%ID%_2"/></a></li>
9
+ </ul></div>
10
+ <div class="ws_bullets"><div>
11
+ <a href="#" title=""><img src="%URL%tooltips/slide1new.jpg" alt=""/>1</a>
12
+ <a href="#" title="You can add description to slides!"><img src="%URL%tooltips/slide2new.jpg" alt="You can add description to slides!"/>2</a>
13
+ <a href="#" title=""><img src="%URL%tooltips/slide3new.jpg" alt=""/>3</a>
14
+ </div></div>
15
+ <!-- Generated by WOWSlider.com v2.5 -->
16
+ <a href="#" class="ws_frame"></a>
17
+ <div class="ws_shadow"></div>
18
+ </div>
19
+ <!-- End WOWSlider.com BODY section -->
install/style.css ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * generated by WOW Slider 2.5
3
+ * template Quiet
4
+ */
5
+ @import url("http://fonts.googleapis.com/css?family=Oswald");
6
+ #wowslider-container%ID% {
7
+ zoom: 1;
8
+ position: relative;
9
+ max-width:580px;
10
+ margin:0 auto;
11
+ z-index:100;
12
+ border:none;
13
+ text-align:left; /* reset align=center */
14
+ }
15
+ * html #wowslider-container%ID%{ width:580px }
16
+ #wowslider-container%ID% ul{
17
+ position:relative;
18
+ width: 10000%;
19
+ height:auto;
20
+ left:0;
21
+ list-style:none;
22
+ margin:0;
23
+ padding:0;
24
+ border-spacing:0;
25
+ overflow: visible;
26
+ /*table-layout:fixed;*/
27
+ }
28
+ #wowslider-container%ID% .ws_images ul li{
29
+ width:1%;
30
+ line-height:0; /*opera*/
31
+ float:left;
32
+ font-size:0;
33
+ padding:0 0 0 0;
34
+ margin:0 0 0 0;
35
+ }
36
+
37
+ #wowslider-container%ID% .ws_images{
38
+ position: relative;
39
+ left:0;
40
+ top:0;
41
+ width:100%;
42
+ height:100%;
43
+ overflow:hidden;
44
+ }
45
+ #wowslider-container%ID% .ws_images a{
46
+ width:100%;
47
+ display:block;
48
+ color:transparent;
49
+ }
50
+
51
+ #wowslider-container%ID% .ws_images img{
52
+ width:100%;
53
+ border:none 0;
54
+ max-width: none;
55
+ }
56
+ #wowslider-container%ID% a{
57
+ text-decoration: none;
58
+ outline: none;
59
+ border: none;
60
+ }
61
+
62
+ #wowslider-container%ID% .ws_bullets {
63
+ font-size: 0px;
64
+ float: left;
65
+ position:absolute;
66
+ z-index:70;
67
+ }
68
+ #wowslider-container%ID% .ws_bullets div{
69
+ position:relative;
70
+ float:left;
71
+ }
72
+ #wowslider-container%ID% a.wsl{
73
+ display:none;
74
+ }
75
+ #wowslider-container%ID% .ws_bullets {
76
+ padding: 10px;
77
+ }
78
+ #wowslider-container%ID% .ws_bullets a {
79
+ width:15px;
80
+ height:15px;
81
+ background: url(./bullet.png) left top;
82
+ float: left;
83
+ text-indent: -4000px;
84
+ position:relative;
85
+ margin-left:3px;
86
+ color:transparent;
87
+ }
88
+ #wowslider-container%ID% .ws_bullets a:hover{
89
+ background-position: 0 50%;
90
+ }
91
+ #wowslider-container%ID% .ws_bullets a.ws_selbull{
92
+ background-position: 0 100%;
93
+ }
94
+ #wowslider-container%ID% a.ws_next, #wowslider-container%ID% a.ws_prev {
95
+ position:absolute;
96
+ display:none;
97
+ top:50%;
98
+ margin-top:-50px;
99
+ z-index:60;
100
+ height: 100px;
101
+ width: 60px;
102
+ background-image: url(./arrows.png);
103
+ }
104
+ #wowslider-container%ID% a.ws_next{
105
+ background-position: 100% 0;
106
+ right:0;
107
+ }
108
+ #wowslider-container%ID% a.ws_prev {
109
+ left:0;
110
+ background-position: 0 0;
111
+ }
112
+ * html #wowslider-container%ID% a.ws_next,* html #wowslider-container%ID% a.ws_prev{display:block}
113
+ #wowslider-container%ID%:hover a.ws_next, #wowslider-container%ID%:hover a.ws_prev {display:block}
114
+ /* bottom center */
115
+ #wowslider-container%ID% .ws_bullets {
116
+ top: 5px;
117
+ right: 10px;
118
+ }
119
+ #wowslider-container%ID% .ws_bullets .ws_bulframe {
120
+ top: 20px;
121
+ }
122
+ #wowslider-container%ID% .ws_bullets .ws_bulframe {
123
+ top: 20px;
124
+ }
125
+ #wowslider-container%ID% .ws-title{
126
+ position: absolute;
127
+ bottom: 10%;
128
+ left: 7%;
129
+ z-index: 50;
130
+ padding:12px;
131
+ color: #000000;
132
+ background:#fff;
133
+ font-family:Oswald,Impact,Charcoal,sans-serif;
134
+ font-size: 30px;
135
+ text-shadow: 1px 1px 1px #BBBBBB;
136
+ line-height: 30px;
137
+ border-radius:5px;
138
+ -moz-border-radius:5px;
139
+ -webkit-border-radius:5px;
140
+ opacity:0.5;
141
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
142
+ }
143
+ #wowslider-container%ID% .ws-title div{
144
+ font-size: 25px;
145
+ text-shadow: 1px 1px 1px #000000;
146
+ }#wowslider-container%ID% ul{
147
+ animation: wsBasic 12s infinite;
148
+ -moz-animation: wsBasic 12s infinite;
149
+ -webkit-animation: wsBasic 12s infinite;
150
+ }
151
+ @keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }
152
+ @-moz-keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }
153
+ @-webkit-keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }
154
+
155
+ #wowslider-container%ID% .ws_shadow{
156
+ background: url(./shadow.png) left 100%;
157
+ background-repeat: no-repeat;
158
+ background-size:100%;
159
+ width:100%;
160
+ height:20%;
161
+ position: absolute;
162
+ left:0;
163
+ bottom:-20%;
164
+ z-index:-1;
165
+ }
166
+ * html #wowslider-container%ID% .ws_shadow{/*ie6*/
167
+ background:none;
168
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( src='wowslider/install/shadow.png', sizingMethod='scale');
169
+ }
170
+ *+html #wowslider-container%ID% .ws_shadow{/*ie7*/
171
+ background:none;
172
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( src='wowslider/install/shadow.png', sizingMethod='scale');
173
+ }
174
+ #wowslider-container%ID% .ws_bullets a img{
175
+ text-indent:0;
176
+ display:block;
177
+ top:15px;
178
+ left:-123px;
179
+ visibility:hidden;
180
+ position:absolute;
181
+ -moz-box-shadow: 0 0 5px #999999;
182
+ box-shadow: 0 0 5px #999999;
183
+ border: 5px solid #FFFFFF;
184
+ max-width:none;
185
+ }
186
+ #wowslider-container%ID% .ws_bullets a:hover img{
187
+ visibility:visible;
188
+ }
189
+
190
+ #wowslider-container%ID% .ws_bulframe div div{
191
+ height:90px;
192
+ overflow:visible;
193
+ position:relative;
194
+ }
195
+ #wowslider-container%ID% .ws_bulframe div {
196
+ left:0;
197
+ overflow:hidden;
198
+ position:relative;
199
+ width:246px;
200
+ background-color:#FFFFFF;
201
+ }
202
+ #wowslider-container%ID% .ws_bullets .ws_bulframe{
203
+ display:none;
204
+ overflow:visible;
205
+ position:absolute;
206
+ cursor:pointer;
207
+ -moz-box-shadow: 0 0 5px #999999;
208
+ box-shadow: 0 0 5px #999999;
209
+ border: 5px solid #FFFFFF;
210
+ }
211
+ #wowslider-container%ID% .ws_bulframe span{
212
+ display:block;
213
+ position:absolute;
214
+ top:-11px;
215
+ margin-left:-5px;
216
+ left:123px;
217
+ background:url(./triangle.png);
218
+ width:15px;
219
+ height:6px;
220
+ }
install/tooltips/slide1new.jpg ADDED
Binary file
install/tooltips/slide2new.jpg ADDED
Binary file
install/tooltips/slide3new.jpg ADDED
Binary file
install/triangle.png ADDED
Binary file
list-table.php ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WOW Slider List Table class.
4
+ *
5
+ * @package WordPress
6
+ * @subpackage List_Table
7
+ */
8
+ class WOWSlider_List_Table extends WP_List_Table {
9
+
10
+ function __construct(){
11
+ global $status, $page, $s;
12
+ $default_status = get_user_option('wowslider_last_view');
13
+ if (empty($default_status)) $default_status = 'published';
14
+ $status = isset($_REQUEST['slider_status']) ? $_REQUEST['slider_status'] : $default_status;
15
+ if (!in_array($status, array('published', 'trash'))) $status = 'published';
16
+ if ($status != $default_status) update_user_meta(get_current_user_id(), 'wowslider_last_view', $status);
17
+ if (isset($_REQUEST['s'])) $_SERVER['REQUEST_URI'] = add_query_arg('s', stripslashes($_REQUEST['s']));
18
+ $page = $this -> get_pagenum();
19
+ parent::__construct(array('plural' => 'wowslider'));
20
+ }
21
+
22
+ function get_table_classes(){
23
+ return array('widefat', 'fixed', 'wowslider-list-table');
24
+ }
25
+
26
+ function prepare_items(){
27
+ global $status, $totals, $page, $orderby, $order, $s, $m, $mode;
28
+ wp_reset_vars(array('orderby', 'order', 's', 'm'));
29
+ $q = $where = array();
30
+ $mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : 'list';
31
+ $order = $order == 'asc' ? 'ASC' : 'DESC';
32
+ $screen = get_current_screen();
33
+ $totals = wowslider_get('totals');
34
+ $this -> items = array();
35
+ $sliders_per_page = $this -> get_items_per_page(str_replace('-', '_', $screen -> id . '_per_page'), 10);
36
+ if ($orderby && !in_array($orderby, array('name', 'code', 'author', 'date'))) $orderby = '';
37
+ $q['sort'] = $orderby ? ($orderby == 'code' ? 'ID' : 'slider_' . $orderby) . ' ' . $order : 'ID DESC';
38
+ $q['page'] = (int)$page;
39
+ $q['count'] = $sliders_per_page;
40
+ if (isset($_GET['author'])) $where[] = 'slider_author = ' . (int)$_GET['author'];
41
+ if (trim($s)) $q['search'] = trim($s);
42
+ if (strlen($m) == 6){
43
+ $q['year'] = (int)substr($m, 0, 4);
44
+ $q['month'] = (int)substr($m, 4, 2);
45
+ }
46
+ $where[] = 'slider_public = ' . ($status == 'published' ? 1 : 0);
47
+ if ($where) $q['where'] = implode(' AND ', $where);
48
+ $this -> items = wowslider_get($q);
49
+ $this -> set_pagination_args(array(
50
+ 'total_items' => wowslider_get('count'),
51
+ 'per_page' => $sliders_per_page,
52
+ ));
53
+ }
54
+
55
+ function pagination($which){
56
+ global $mode;
57
+ parent::pagination($which);
58
+ if ('top' == $which) $this -> view_switcher($mode);
59
+ }
60
+
61
+ function no_items(){
62
+ _e('No sliders found.', 'wowslider');
63
+ }
64
+
65
+ function get_columns(){
66
+ return array(
67
+ 'cb' => '<input type="checkbox" />',
68
+ 'name' => __('Title'),
69
+ 'code' => __('Shortcode', 'wowslider'),
70
+ 'author' => __('Author'),
71
+ 'images' => __('Images', 'wowslider'),
72
+ 'date' => __('Date')
73
+ );
74
+ }
75
+
76
+ function get_sortable_columns() {
77
+ return array(
78
+ 'name' => 'name',
79
+ 'code' => 'code',
80
+ 'author' => 'author',
81
+ 'date' => array('date', true)
82
+ );
83
+ }
84
+
85
+ function get_views(){
86
+ global $totals, $status;
87
+ $status_links = array();
88
+ foreach ($totals as $type=>$count){
89
+ if (!$count) continue;
90
+ switch ($type){
91
+ case 'published':
92
+ $text = __('Published');
93
+ break;
94
+ case 'trash':
95
+ $text = __('Trash');
96
+ break;
97
+ }
98
+ $text .= ' <span class="count">(' . $count . ')</span>';
99
+ $status_links[$type] = sprintf('<a href="%s" %s>%s</a>',
100
+ add_query_arg('slider_status', $type, 'admin.php?page=wowslider/admin.php'),
101
+ ($type == $status) ? ' class="current"' : '',
102
+ sprintf($text, number_format_i18n($count))
103
+ );
104
+ }
105
+ return $status_links;
106
+ }
107
+
108
+ function get_bulk_actions(){
109
+ global $status;
110
+ $actions = array();
111
+ if ('published' == $status) $actions['trash'] = __('Move to Trash');
112
+ if ('trash' == $status){
113
+ $actions['untrash'] = __('Restore');
114
+ $actions['delete'] = __('Delete Permanently');
115
+ }
116
+ return $actions;
117
+ }
118
+
119
+ function bulk_actions($which = false){
120
+ global $status;
121
+ if (func_num_args()) parent::bulk_actions($which);
122
+ else parent::bulk_actions();
123
+ }
124
+
125
+ function extra_tablenav($which){
126
+ global $status;
127
+ ?>
128
+ <div class="alignleft actions">
129
+ <?php
130
+ if ('top' == $which){
131
+ $this -> months_dropdown($status);
132
+ submit_button(__('Filter'), 'secondary', false, false);
133
+ }
134
+ if ('trash' == $status){
135
+ submit_button(__('Empty Trash'), 'button-secondary apply', 'delete_all', false);
136
+ }
137
+ ?>
138
+ </div>
139
+ <?php
140
+ }
141
+
142
+ function months_dropdown($status = 'all'){
143
+ global $wp_locale;
144
+ $months = wowslider_get('months ' . $status);
145
+ $month_count = count($months);
146
+ if (!$month_count) return;
147
+ $m = isset($_GET['m']) ? (int)$_GET['m'] : 0;
148
+ ?>
149
+ <select name="m">
150
+ <option<?php selected($m, 0); ?> value="0"><?php _e('Show all dates'); ?></option>
151
+ <?php
152
+ foreach ($months as $v){
153
+ $month = zeroise($v['month'], 2);
154
+ $year = $v['year'];
155
+ printf("<option %s value='%s'>%s</option>\n",
156
+ selected($m, $year . $month, false),
157
+ esc_attr($v['year'] . $month),
158
+ $wp_locale -> get_month($month) . " $year"
159
+ );
160
+ }
161
+ ?>
162
+ </select>
163
+ <?php
164
+ }
165
+
166
+ function display_rows(){
167
+ $index = 1;
168
+ foreach ($this -> items as $data){
169
+ $this -> single_row($data['id'], $data, $index);
170
+ $index++;
171
+ }
172
+ }
173
+
174
+ function single_row($id, $data, $index){
175
+ global $status, $page, $s, $mode;
176
+ if ($data['trash']){
177
+ $actions = array(
178
+ 'untrash' => '<a href="' . wp_nonce_url('admin.php?page=wowslider/admin.php&amp;slider=' . $id .'&amp;action=untrash&amp;slider_status=' . $status . '&amp;paged=' . $page, 'untrash') . '" title="' . esc_attr__('Restore this item from the Trash') . '">' . __('Restore') . '</a>',
179
+ 'delete' => '<a href="' . wp_nonce_url('admin.php?page=wowslider/admin.php&amp;slider=' . $id .'&amp;action=delete&amp;slider_status=' . $status . '&amp;paged=' . $page, 'delete') . '" title="' . esc_attr__('Delete this item permanently') . '" class="submitdelete">' . __('Delete Permanently') . '</a>'
180
+ );
181
+ } else {
182
+ $actions = array(
183
+ 'trash' => '<a href="' . wp_nonce_url('admin.php?page=wowslider/admin.php&amp;slider=' . $id .'&amp;action=trash&amp;slider_status=' . $status . '&amp;paged=' . $page, 'trash') . '" title="' . esc_attr__('Move this item to the Trash') . '" class="submitdelete">' . __('Trash') . '</a>',
184
+ 'view' => '<a href="' . admin_url('admin.php?page=wowslider/admin.php&amp;slider=' . $id .'&amp;action=view') . '" title="' . esc_attr__('View this item', 'wowslider') . '" class="view">' . __('View') . '</a>'
185
+ );
186
+ }
187
+ echo "<tr id=\"slider-$id\" class=\"" . ($index % 2 ? 'alternate' : '') . "\" valign=\"top\">";
188
+ list($columns, $hidden) = $this -> get_column_info();
189
+ foreach ($columns as $column_name=>$column_display_name){
190
+ $style = '';
191
+ if (in_array($column_name, $hidden)) $style = ' style="display:none;"';
192
+ switch ($column_name){
193
+ case 'cb':
194
+ echo '<th scope="row" class="check-column"><input type="checkbox" name="checked[]" value="' . esc_attr($id) . '" id="checkbox_' . $id . '" /><label class="screen-reader-text" for="checkbox_' . $id . '" >' . __('Select') . ' ' . htmlspecialchars($data['Name']) . '</label></th>';
195
+ break;
196
+ case 'name':
197
+ echo '<td class="column-title"' . $style . '><strong>';
198
+ if ($status == 'trash') echo htmlspecialchars($data['name']);
199
+ else echo '<a href="' . admin_url('admin.php?page=wowslider/admin.php&amp;slider=' . $id .'&amp;action=view') . '" title="' . __('View') . ' ' . esc_attr('"' . $data['name'] . '"') . '">' . htmlspecialchars($data['name']) . '</a>';
200
+ echo '</strong>' . $this -> row_actions($actions);
201
+ echo '</td>';
202
+ break;
203
+ case 'code':
204
+ echo '<td class="column-code"' . $style . '><code>[wowslider id="' . $id . '"]</code>' . ('list' == $mode ? '' : '<br/><small>( ' . __('for templates', 'wowslider') . ': <code>&lt;?php wowslider(' . $id . '); ?&gt;</code>)</small>') . '</td>';
205
+ break;
206
+ case 'author':
207
+ echo '<td class="column-author"' . $style . '>';
208
+ if ($data['author']) echo '<a href="' . admin_url('admin.php?page=wowslider/admin.php&author=' . $data['author']['id']) . '">' . htmlspecialchars($data['author']['name']) . '</a>';
209
+ else echo '&nbsp;';
210
+ echo '</td>';
211
+ break;
212
+ case 'images':
213
+ echo '<td class="column-images"' . $style . ' ' . ('list' == $mode ? '' : 'style="padding-bottom:7px;"') . '>';
214
+ $data['images'] = array_slice($data['images'], 0, ('list' == $mode ? 3 : 6));
215
+ $thumb_dir = is_dir(wowslider_upload_dir() . $id . '/tooltips/') ? '/tooltips/' : '/images/';
216
+ foreach ($data['images'] as $image)
217
+ echo '<a href="' . wowslider_upload_dir('url') . $id . '/images/' . $image . '"><img src="' . wowslider_upload_dir('url') . $id . $thumb_dir . $image . '" /></a> ';
218
+ echo '</td>';
219
+ break;
220
+ case 'date':
221
+ $t_time = mysql2date(__('Y/m/d g:i:s A'), $data['date'], true);
222
+ $m_time = $data['date'];
223
+ $time = mysql2date('G', $data['date_gmt'], false);
224
+ $time_diff = time() - $time;
225
+ if ($time_diff > 0 && $time_diff < 24*60*60) $h_time = sprintf(__('%s ago'), human_time_diff($time));
226
+ else $h_time = mysql2date(__( 'Y/m/d'), $m_time);
227
+ echo '<td class="column-date"' . $style . '>';
228
+ if ('excerpt' == $mode) echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
229
+ else echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
230
+ echo '</td>';
231
+ break;
232
+ default:
233
+ echo "<td class=\"$column_name column-$column_name\"$style>";
234
+ echo '</td>';
235
+ }
236
+ }
237
+ echo '</tr>';
238
+ }
239
+ }
240
+
241
+ ?>
readme.txt ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WOW Slider ===
2
+ Contributors: WOWSlider.com
3
+ Donate link: http://wowslider.com/
4
+ Tags: banner, gallery, image, image slider, images, javascript, jquery, photo, css, photos, picture, pictures, plugin, post, responsive slider, shortcode, posts, slider, slideshow, widget, wordpress, wordpress slider, wow slider, page, links
5
+ Requires at least: 3.1
6
+ Tested up to: 3.5
7
+ Stable tag: trunk
8
+
9
+ Add beautiful image slider to your Wordpress blog! Awesome effects, fancy templates, point-and-click wizard. Fully responsive, pure CSS fallback.
10
+
11
+ == Description ==
12
+
13
+ [WOW Slider](http://wowslider.com/) is a Wordpress slider with stunning visual effects and tons of professionally made templates.
14
+ WOW Slider is packed with a point-and-click wizard to create fantastic image sliders in a matter of seconds without
15
+ coding and image editing.
16
+ Responsive, fully accessible as a pure CSS slider if the Javascript is turned off, touch swipe support,
17
+ all browsers, all devices, search engine friendly, clean and valid markup.
18
+
19
+ **Live Demos**:
20
+
21
+ * [Prime Time - Filmstrip](http://wowslider.com/jquery-image-scroller-prime-time-linear-demo.html "jQuery Image Scroller - Prime Time Template Demo with Basic linear effect")
22
+ * [Elemental Slices Demo](view-source:http://wowslider.com/jquery-slider-css-elemental-slices-demo.html "jQuery Slider CSS Elemental Slices Demo")
23
+ * [Responsive Slider - Shady Stack](view-source:http://wowslider.com/wordpress-gallery-css-shady-stack-v-demo.html "Responsive Slider - Wordpress Shady Stack Demo")
24
+ * [Catalyst Demo](http://wowslider.com/jquery-banner-rotator-catalyst-fade-demo.html "Jquery banner rotator - Catalyst Template Demo with Fade effect")
25
+ * [Catalyst Digital Demo](http://www.wowslider.com/jquery-picture-slider-catalyst-digital-stack-demo.html "jQuery Picture Slider - Catalyst Digital Template Demo with Stack effect")
26
+ * [Dark Matter Demo](http://www.wowslider.com/free-image-slider-dark-matter-squares-demo.html "Free image slider - Dark Matter Demo with Squares effect")
27
+ * [Quiet Demo - Rotate effect](http://www.wowslider.com/javascript-slideshow-quiet-rotate-demo.html "Javascript Slideshow - Quiet Template Demo with Rotate effect")
28
+ * [More amazing demos made with WOW Slider..](view-source:http://wowslider.com/jquery-image-rotator-terse-blur-demo.html "jQuery Slider - Terse Blur")
29
+
30
+ More Info: http://wowslider.com/
31
+
32
+ [How to create Wordpress slider with WOW Slider - Full Tutorial](view-source:http://wowslider.com/wordpress-jquery-slider.html "Wordpress Image Slider Plugin Tutorial")
33
+
34
+ [youtube http://www.youtube.com/watch?v=o82IuhWtgTo]
35
+
36
+ == Installation ==
37
+
38
+ Please see full tutorial+video here:
39
+ http://wowslider.com/wordpress-jquery-slider.html
40
+
41
+ 1. Download WOWSlider app for Win or Mac from
42
+ http://wowslider.com/wowslider-free-setup.zip
43
+ 1. Create an image slideshow in WOW Slider program, click "Publish" button, and select "Wordpress Slider" as a publishing method - wowslider.zip WordPress plugin will be created
44
+ 1. Install and activate the created module � wowslider.zip through the 'Plugins' menu in WordPress
45
+ 1. WOWSlider menu will appear. Go to WOW Slider -> All Sliders and copy the shortcode of your slider
46
+ 1. Add the shortcode inside the page where you want your slider to appear
47
+ 1. Preview changes
48
+ 1. Use WOW Slider menu WOW Slider -> Add New to add each next slider
49
+
50
+ [youtube http://www.youtube.com/watch?v=o82IuhWtgTo]
51
+
52
+ == Frequently Asked Questions ==
53
+
54
+ == Screenshots ==
55
+
56
+ 1. Fancy Templates
57
+ 1. Create an image slideshow in WOW Slider program, click "Publish" button, and select "Wordpress Slider" as a publishing method - wowslider.zip WordPress plugin will be created
58
+ 1. Install and activate the created module � wowslider.zip through the 'Plugins' menu in WordPress
59
+ 1. WOWSlider menu will appear. Go to WOW Slider -> All Sliders and copy the shortcode of your slider
60
+ 1. Add the shortcode inside the page where you want your slider to appear
61
+ 1. Preview changes. Use WOW Slider menu WOW Slider -> Add New to add each next slider
62
+
63
+ == Changelog ==
64
+
65
+ == Upgrade Notice ==
screenshot-1.jpg ADDED
Binary file
screenshot-2.jpg ADDED
Binary file
screenshot-3.jpg ADDED
Binary file
screenshot-4.jpg ADDED
Binary file
screenshot-5.jpg ADDED
Binary file
screenshot-6.jpg ADDED
Binary file
uninstall.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH') || !defined('WP_UNINSTALL_PLUGIN'))
4
+ exit('Invalid deletion.');
5
+
6
+ define('WOWSLIDER_PLUGIN_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/');
7
+ require_once WOWSLIDER_PLUGIN_PATH . 'api.php';
8
+ require_once WOWSLIDER_PLUGIN_PATH . 'helpers.php';
9
+ wowslider_install('undo');
wowslider.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WOW Slider
4
+ Description: This module easily adds image sliders created with WOWSlider app.
5
+ Author: WOWSlider.com
6
+ Version: 2.7.1
7
+ Author URI: http://wowslider.com/
8
+ */
9
+
10
+ /* Copyright (C) 2012 WOWSlider.com. All rights reserved. */
11
+
12
+ // template tag
13
+ function wowslider($id = 0, $write = true){
14
+ static $active = array();
15
+ $id = (int)$id;
16
+ if (in_array($id, $active)) return '';
17
+ $active[] = $id;
18
+ $out = wowslider_get($id);
19
+ if ($write) echo $out;
20
+ else return $out;
21
+ }
22
+
23
+ // wowslider in pages/posts
24
+ function wowslider_injection($output){
25
+ if (preg_match_all('/\[wowslider id="(\d+)"\]/', $output, $matches)){
26
+ $ids = array_unique($matches[1]);
27
+ foreach ($ids as $id)
28
+ $output = str_replace('[wowslider id="' . $id . '"]', wowslider($id, false), $output);
29
+ }
30
+ return $output;
31
+ }
32
+
33
+ // initialization
34
+ define('WOWSLIDER_PLUGIN_URL', plugin_dir_url(__FILE__));
35
+ define('WOWSLIDER_PLUGIN_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/');
36
+ add_filter('the_content', 'wowslider_injection');
37
+ require_once WOWSLIDER_PLUGIN_PATH . 'admin-bar.php';
38
+ require_once WOWSLIDER_PLUGIN_PATH . 'api.php';
39
+ require_once WOWSLIDER_PLUGIN_PATH . 'helpers.php';
40
+ if (is_admin()) require_once WOWSLIDER_PLUGIN_PATH . 'admin.php';
41
+
42
+ wp_enqueue_script('jquery');
43
+ if (file_exists(WOWSLIDER_PLUGIN_PATH . 'data/wowslider.js')){
44
+ wp_register_script('wowslider', WOWSLIDER_PLUGIN_URL . 'data/wowslider.js', array('jquery'));
45
+ wp_enqueue_script('wowslider');
46
+ }
47
+
48
+ ?>