PluginProbe
Vimeography: Vimeo Video Gallery WordPress Plugin / 0.9.3
Vimeography: Vimeo Video Gallery WordPress Plugin v0.9.3
2.4.9 2.4.8 trunk 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.7 0.6 0.6.1 0.6.2 0.6.3 0.6.4 0.6.5 0.6.6 0.6.7 0.6.8 0.6.8.1 0.6.9 0.6.9.1 0.6.9.2 0.7 0.8 All 103 releases
vimeography / vimeography.php

vimeography.php in Vimeography: Vimeo Video Gallery WordPress Plugin 0.9.3, at vimeography.php

585 lines 20.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Vimeography
4 Plugin URI: http://vimeography.com
5 Description: Vimeography is the easiest way to set up a custom Vimeo gallery on your site.
6 Version: 0.9.3
7 Author: Dave Kiss
8 Author URI: http://davekiss.com
9 License: MIT
10 */
11
12 if (!function_exists('json_decode'))
13 wp_die('Vimeography requires the JSON PHP extension.');
14
15 global $wpdb;
16
17 $wp_upload_dir = wp_upload_dir();
18
19 // Define constants
20 define( 'VIMEOGRAPHY_URL', plugin_dir_url(__FILE__) );
21 define( 'VIMEOGRAPHY_PATH', plugin_dir_path(__FILE__) );
22 define( 'VIMEOGRAPHY_THEME_URL', $wp_upload_dir['baseurl'].'/vimeography-themes/' );
23 define( 'VIMEOGRAPHY_THEME_PATH', $wp_upload_dir['basedir'].'/vimeography-themes/' );
24 define( 'VIMEOGRAPHY_ASSETS_URL', $wp_upload_dir['baseurl'].'/vimeography-assets/' );
25 define( 'VIMEOGRAPHY_ASSETS_PATH', $wp_upload_dir['basedir'].'/vimeography-assets/' );
26 define( 'VIMEOGRAPHY_BASENAME', plugin_basename( __FILE__ ) );
27 define( 'VIMEOGRAPHY_VERSION', '0.9.3');
28 define( 'VIMEOGRAPHY_GALLERY_TABLE', $wpdb->prefix . "vimeography_gallery");
29 define( 'VIMEOGRAPHY_GALLERY_META_TABLE', $wpdb->prefix . "vimeography_gallery_meta");
30 define( 'VIMEOGRAPHY_CURRENT_PAGE', basename($_SERVER['PHP_SELF']));
31
32 require_once(VIMEOGRAPHY_PATH . 'lib/exception.php');
33
34 // Require Mustache.php
35 if (! class_exists('Mustache'))
36 require_once(VIMEOGRAPHY_PATH . '/vendor/mustache/Mustache.php');
37
38 class Vimeography
39 {
40 public function __construct()
41 {
42 add_action( 'init', array(&$this, 'vimeography_init') );
43 add_action( 'admin_init', array(&$this, 'vimeography_requires_wordpress_version') );
44 add_action( 'admin_init', array(&$this, 'vimeography_check_if_db_exists') );
45 add_action( 'init', array(&$this, 'vimeography_move_folders') );
46 add_action( 'plugins_loaded', array(&$this, 'vimeography_update_database') );
47 add_action( 'admin_menu', array(&$this, 'vimeography_add_menu') );
48 add_action( 'do_robots', array(&$this, 'vimeography_block_robots') );
49
50 register_activation_hook( VIMEOGRAPHY_BASENAME, array(&$this, 'vimeography_update_tables') );
51
52 add_filter( 'plugin_action_links', array(&$this, 'vimeography_filter_plugin_actions'), 10, 2 );
53 add_shortcode( 'vimeography', array(&$this, 'vimeography_shortcode') );
54
55 // Add shortcode support for widgets
56 add_filter( 'widget_text', 'do_shortcode' );
57 }
58
59 /**
60 * Check the wordpress version is compatible, and disable plugin if not.
61 *
62 * @access public
63 * @return void
64 */
65 public function vimeography_requires_wordpress_version()
66 {
67 global $wp_version;
68 $plugin_data = get_plugin_data( __FILE__, false );
69
70 if ( version_compare($wp_version, "3.3", "<" ) )
71 {
72 if( is_plugin_active( VIMEOGRAPHY_BASENAME ) )
73 {
74 deactivate_plugins( VIMEOGRAPHY_BASENAME );
75 wp_die( "'".$plugin_data['Name']."' requires WordPress 3.3 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );
76 }
77 }
78 }
79
80 /**
81 * Runs on every page load.
82 *
83 * @access public
84 * @return void
85 */
86 public function vimeography_init()
87 {
88 require_once(VIMEOGRAPHY_PATH . 'lib/init.php');
89 $init = new Vimeography_Init;
90
91 $init->vimeography_register_jquery();
92 $init->vimeography_add_gallery_helper();
93 $init->vimeography_written_block_robots();
94
95 require_once(VIMEOGRAPHY_PATH . 'lib/ajax.php');
96 new Vimeography_Ajax;
97 }
98
99 public function vimeography_update_database()
100 {
101 require_once(VIMEOGRAPHY_PATH . 'lib/database.php');
102 $db = new Vimeography_Database;
103
104 $db->vimeography_update_db_to_0_6();
105 $db->vimeography_update_db_to_0_7();
106 $db->vimeography_update_db_to_0_8();
107 $this->vimeography_update_db_version();
108 }
109
110 public function vimeography_check_if_db_exists()
111 {
112 if (get_option('vimeography_db_version') == FALSE)
113 $this->vimeography_update_db_version();
114 }
115
116 /**
117 * Updates the Vimeography version stored in the database.
118 *
119 * @access public
120 * @return void
121 */
122 public function vimeography_update_db_version()
123 {
124 update_option('vimeography_db_version', VIMEOGRAPHY_VERSION);
125 }
126
127 /**
128 * Move the defined folders to the defined target path in wp-content/uploads.
129 *
130 * @access public
131 * @return void
132 */
133 public function vimeography_move_folders()
134 {
135 $this->_move_folder(array('source' => VIMEOGRAPHY_PATH . 'bugsauce/', 'destination' => VIMEOGRAPHY_THEME_PATH.'bugsauce/', 'clear_destination' => true, 'clear_working' => true));
136 $this->_move_folder(array('source' => VIMEOGRAPHY_PATH . 'theme-assets/', 'destination' => VIMEOGRAPHY_ASSETS_PATH, 'clear_destination' => true, 'clear_working' => true));
137
138 // Now, check if the .htaccess exists in the VIMEOGRAPHY_THEME_PATH
139 if (file_exists(VIMEOGRAPHY_THEME_PATH.'.htaccess'))
140 {
141 unlink(VIMEOGRAPHY_THEME_PATH.'.htaccess');
142 }
143 // file_put_contents(VIMEOGRAPHY_THEME_PATH.'.htaccess', "Options All -Indexes\n<FilesMatch \".(htaccess|mustache)$\">\nOrder Allow,Deny\nDeny from all\n</FilesMatch>");
144 }
145
146 /**
147 * Add Settings link to "installed plugins" admin page.
148 *
149 * @access public
150 * @param mixed $links
151 * @param mixed $file
152 * @return void
153 */
154 public function vimeography_filter_plugin_actions($links, $file)
155 {
156 if ( $file == VIMEOGRAPHY_BASENAME )
157 {
158 $settings_link = '<a href="admin.php?page=vimeography-edit-galleries">' . __('Settings') . '</a>';
159 if (!in_array($settings_link, $links))
160 array_unshift( $links, $settings_link ); // before other links
161 }
162 return $links;
163 }
164
165 /**
166 * Adds a new top level menu to the admin menu.
167 *
168 * @access public
169 * @return void
170 */
171 public function vimeography_add_menu()
172 {
173 global $submenu;
174
175 add_menu_page( 'Vimeography Page Title', 'Vimeography', 'manage_options', 'vimeography-edit-galleries', '', VIMEOGRAPHY_URL.'media/img/vimeography-icon.png' );
176 add_submenu_page( 'vimeography-edit-galleries', 'Edit Galleries', 'Edit Galleries', 'manage_options', 'vimeography-edit-galleries', array(&$this, 'vimeography_render_template' ));
177 add_submenu_page( 'vimeography-edit-galleries', 'New Gallery', 'New Gallery', 'manage_options', 'vimeography-new-gallery', array(&$this, 'vimeography_render_template' ));
178 add_submenu_page( 'vimeography-edit-galleries', 'My Themes', 'My Themes', 'manage_options', 'vimeography-my-themes', array(&$this, 'vimeography_render_template' ));
179 $submenu['vimeography-edit-galleries'][500] = array( 'Buy Themes', 'manage_options' , 'http://vimeography.com/themes' );
180 add_submenu_page( 'vimeography-edit-galleries', 'Vimeography Pro', 'Vimeography Pro', 'manage_options', 'vimeography-pro', array(&$this, 'vimeography_render_template' ));
181 add_submenu_page( 'vimeography-edit-galleries', 'Help', 'Help', 'manage_options', 'vimeography-help', array(&$this, 'vimeography_render_template' ));
182 }
183
184 /**
185 * Renders the admin template for the current page.
186 *
187 * @access public
188 * @return void
189 */
190 public function vimeography_render_template()
191 {
192 if ( !current_user_can( 'manage_options' ) )
193 wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
194
195 wp_register_style( 'bootstrap', VIMEOGRAPHY_URL.'media/css/bootstrap.min.css');
196 wp_register_style( 'bootstrap-responsive', VIMEOGRAPHY_URL.'media/css/bootstrap-responsive.min.css');
197 wp_register_style( 'vimeography-admin', VIMEOGRAPHY_URL.'media/css/admin.css');
198
199 wp_register_script( 'bootstrap-transition', VIMEOGRAPHY_URL.'media/js/bootstrap-transition.js');
200 wp_register_script( 'bootstrap-alert', VIMEOGRAPHY_URL.'media/js/bootstrap-alert.js');
201 wp_register_script( 'vimeography-admin.js', VIMEOGRAPHY_URL.'media/js/admin.js', 'jquery');
202
203 wp_enqueue_style( 'bootstrap');
204 wp_enqueue_style( 'bootstrap-responsive');
205 wp_enqueue_style( 'vimeography-admin');
206
207 wp_enqueue_script( 'bootstrap-transition');
208 wp_enqueue_script( 'bootstrap-alert');
209 wp_enqueue_script( 'vimeography-admin.js');
210
211 require_once(VIMEOGRAPHY_PATH . 'lib/admin/base.php');
212
213 switch(current_filter())
214 {
215 case 'vimeography_page_vimeography-new-gallery':
216 require_once(VIMEOGRAPHY_PATH . 'lib/admin/view/gallery/new.php');
217 $mustache = new Vimeography_Gallery_New();
218 $template = $this->_load_template('gallery/new');
219 break;
220 case 'toplevel_page_vimeography-edit-galleries':
221 if (isset($_GET['id']))
222 {
223 require_once(VIMEOGRAPHY_PATH . 'lib/admin/view/gallery/edit.php');
224 $mustache = new Vimeography_Gallery_Edit();
225 $template = $this->_load_template('gallery/edit/layout');
226 }
227 else
228 {
229 require_once(VIMEOGRAPHY_PATH . 'lib/admin/view/gallery/list.php');
230 $mustache = new Vimeography_Gallery_List();
231 $template = $this->_load_template('gallery/list');
232 }
233 break;
234 case 'vimeography_page_vimeography-my-themes':
235 require_once(VIMEOGRAPHY_PATH . 'lib/admin/view/theme/list.php');
236 $mustache = new Vimeography_Theme_List();
237 $template = $this->_load_template('theme/list');
238 break;
239 case 'vimeography_page_vimeography-pro':
240 require_once(VIMEOGRAPHY_PATH . 'lib/admin/view/vimeography/pro.php');
241 $mustache = new Vimeography_Pro();
242 $template = $this->_load_template('vimeography/pro');
243 break;
244 case 'vimeography_page_vimeography-help':
245 require_once(VIMEOGRAPHY_PATH . 'lib/admin/view/vimeography/help.php');
246 $mustache = new Vimeography_Help();
247 $template = $this->_load_template('vimeography/help');
248 break;
249 default:
250 wp_die( __('The admin template for "'.current_filter().'" cannot be found.') );
251 break;
252 }
253 echo $mustache->render($template);
254 }
255
256 /**
257 * Returns the file contents for the provided mustache template. Common Function.
258 *
259 * @access protected
260 * @param mixed $name
261 * @return void
262 */
263 protected function _load_template($name)
264 {
265 $path = VIMEOGRAPHY_PATH . 'lib/admin/templates/' . $name .'.mustache';
266 if (! $result = @file_get_contents($path))
267 wp_die('The admin template "'.$name.'" cannot be found.');
268 return $result;
269 }
270
271 /**
272 * Create tables and define defaults when plugin is activated.
273 *
274 * @access public
275 * @return void
276 */
277 public function vimeography_update_tables() {
278 global $wpdb;
279
280 delete_option('vimeography_default_settings');
281 delete_option('vimeography_advanced_settings');
282
283 add_option('vimeography_advanced_settings', array(
284 'active' => FALSE,
285 'client_id' => '',
286 'client_secret' => '',
287 'access_token' => '',
288 'access_token_secret' => '',
289 ));
290
291 add_option('vimeography_default_settings', array(
292 'source_url' => 'https://vimeo.com/channels/staffpicks/',
293 'video_limit' => 20,
294 'featured_video' => '',
295 'cache_timeout' => 3600,
296 'theme_name' => 'bugsauce',
297 ));
298
299 $sql = 'CREATE TABLE '.VIMEOGRAPHY_GALLERY_TABLE.' (
300 id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
301 title varchar(150) NOT NULL,
302 date_created datetime NOT NULL,
303 is_active tinyint(1) NOT NULL,
304 PRIMARY KEY (id)
305 );
306 CREATE TABLE '.VIMEOGRAPHY_GALLERY_META_TABLE.' (
307 id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
308 gallery_id mediumint(8) unsigned NOT NULL,
309 source_url varchar(100) NOT NULL,
310 video_limit mediumint(7) NOT NULL,
311 featured_video varchar(100) DEFAULT NULL,
312 gallery_width varchar(10) DEFAULT NULL,
313 cache_timeout mediumint(7) NOT NULL,
314 theme_name varchar(50) NOT NULL,
315 PRIMARY KEY (id)
316 );
317 ';
318
319 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
320 dbDelta($sql);
321 }
322
323 /**
324 * Read the shortcode and return the output.
325 * example:
326 * [vimeography id="1" theme='apple']
327 *
328 * @access public
329 * @param mixed $atts
330 * @return void
331 */
332 public function vimeography_shortcode($atts, $content = NULL)
333 {
334
335 // Let's get the data for this gallery from the db
336 if (intval($atts['id']))
337 {
338 global $wpdb;
339 $gallery_info = $wpdb->get_results('SELECT * from '.VIMEOGRAPHY_GALLERY_META_TABLE.' AS meta JOIN '.VIMEOGRAPHY_GALLERY_TABLE.' AS gallery ON meta.gallery_id = gallery.id WHERE meta.gallery_id = '.$atts['id'].' LIMIT 1;');
340 }
341
342 // Get admin panel options
343 $default_settings = get_option('vimeography_default_settings');
344
345 $gallery_settings['theme'] = isset($gallery_info[0]->theme_name) ? $gallery_info[0]->theme_name : $default_settings['theme_name'];
346 $gallery_settings['featured'] = isset($gallery_info[0]->featured_video) ? $gallery_info[0]->featured_video : $default_settings['featured_video'];
347 $gallery_settings['source'] = isset($gallery_info[0]->source_url) ? $gallery_info[0]->source_url : $default_settings['source_url'];
348 $gallery_settings['limit'] = isset($gallery_info[0]->video_limit) ? $gallery_info[0]->video_limit : $default_settings['video_limit'];
349 $gallery_settings['cache'] = isset($gallery_info[0]->cache_timeout) ? $gallery_info[0]->cache_timeout : $default_settings['cache_timeout'];
350 $gallery_settings['width'] = isset($gallery_info[0]->gallery_width) ? $gallery_info[0]->gallery_width : '';
351
352 // Get shortcode attributes
353 $settings = shortcode_atts( array(
354 'id' => '',
355 'theme' => $gallery_settings['theme'],
356 'featured' => $gallery_settings['featured'],
357 'source' => $gallery_settings['source'],
358 'limit' => $gallery_settings['limit'],
359 'cache' => $gallery_settings['cache'],
360 'width' => $gallery_settings['width'],
361 ), $atts );
362
363 if (!empty($settings['width']))
364 {
365 preg_match('/(\d*)(px|%?)/', $settings['width'], $matches);
366 // If a number value is set...
367 if (!empty($matches[1]))
368 {
369 // If a '%' or 'px' is set...
370 if (!empty($matches[2]))
371 {
372 // Accept the valid matching string
373 $settings['width'] = $matches[0];
374 }
375 else
376 {
377 // Append a 'px' value to the matching number
378 $settings['width'] = $matches[1] . 'px';
379 }
380 }
381 else
382 {
383 // Not a valid width
384 $settings['width'] = '';
385 }
386 }
387
388 try
389 {
390 if ( file_exists( VIMEOGRAPHY_PATH . 'lib/pro/core.php' ) )
391 {
392 require_once(VIMEOGRAPHY_PATH . 'lib/pro/core.php');
393 $vimeography = Vimeography_Pro_Core::factory('videos', $settings);
394 }
395 else
396 {
397 require_once(VIMEOGRAPHY_PATH . 'lib/core.php');
398 $vimeography = Vimeography_Core::factory('videos', $settings);
399 }
400
401 require_once(VIMEOGRAPHY_PATH . 'lib/cache.php');
402 $cache = new Vimeography_Cache;
403
404 $settings_check = $settings;
405 $unused_id = array_shift($settings_check);
406
407 // If the shortcode settings are equal to the DB settings, the
408 // gallery isn't being overloaded by shortcode, so proceed to render
409 // the standard cache.
410
411 if ($settings_check == $gallery_settings)
412 {
413 // If the cache isn't set,
414 if (($vimeography_data = $cache->get($settings['id'])) === FALSE)
415 {
416 // make the request,
417 $vimeography_data = $vimeography->get('videos');
418
419 // and cache the results.
420 if ($settings['cache'] != 0)
421 $transient = $cache->set($settings['id'], $vimeography_data, $settings['cache']);
422 }
423 }
424 // Otherwise, let's see if a cache exists for these particular
425 // shortcode settings, and if not, we'll create one using an
426 // alternate cache name generated using an md5 of the serialized
427 // shortcode combined with the gallery id.
428 else
429 {
430 $cache_hash = $settings['id'].'_'.md5(serialize($settings_check));
431
432 // The `option_name` column has a limit of 64 characters,
433 // so we need to shorten the generated hash.
434 $cache_hash = substr($cache_hash, 0, -10);
435
436 // If the cache isn't set,
437 if (($vimeography_data = $cache->get($cache_hash)) === FALSE)
438 {
439 // make the request,
440 $vimeography_data = $vimeography->get('videos');
441
442 // and cache the results.
443 if ($settings['cache'] != 0)
444 $transient = $cache->set($cache_hash, $vimeography_data, $settings['cache']);
445 }
446 }
447
448 // Render that ish.
449 return $vimeography->render($vimeography_data);
450 }
451 catch (Vimeography_Exception $e)
452 {
453 return "Vimeography error: ".$e->getMessage();
454 }
455 }
456
457 /**
458 * Adds the VIMEOGRAPHY_THEME_URL and VIMEOGRAPHY_ASSETS_URL to the virtual robots.txt restricted list.
459 *
460 * @access public
461 * @static
462 * @return void
463 */
464 public static function vimeography_block_robots()
465 {
466 $blocked_theme_path = str_ireplace(site_url(), '', VIMEOGRAPHY_THEME_URL);
467 $blocked_asset_path = str_ireplace(site_url(), '', VIMEOGRAPHY_ASSETS_URL);
468 echo 'Disallow: '.$blocked_theme_path."\n";
469 echo 'Disallow: '.$blocked_asset_path."\n";
470 }
471
472 /**
473 * Moves the given folder to the given destination.
474 *
475 * @access private
476 * @param array $args (default: array())
477 * @return void
478 */
479 private function _move_folder($args = array())
480 {
481 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
482 // Replaces simple `WP_Filesystem();` call to prevent any extraction issues
483 // @link http://wpquestions.com/question/show/id/2685
484 if (! function_exists('__return_direct'))
485 {
486 function __return_direct() { return 'direct'; }
487 }
488
489 add_filter( 'filesystem_method', '__return_direct' );
490 WP_Filesystem();
491 remove_filter( 'filesystem_method', '__return_direct' );
492
493 global $wp_filesystem;
494 $defaults = array( 'source' => '', 'destination' => '', //Please always pass these
495 'clear_destination' => false, 'clear_working' => false,
496 'hook_extra' => array());
497
498 $args = wp_parse_args($args, $defaults);
499 extract($args);
500
501 @set_time_limit( 300 );
502
503 if ( empty($source) || empty($destination) )
504 return new WP_Error('bad_request', 'bad request.');
505
506 // $this->skin->feedback('installing_package');
507
508 //Retain the Original source and destinations
509 $remote_source = $source;
510 $local_destination = $destination;
511
512 if (! $wp_filesystem->dirlist($remote_source)) return FALSE;
513
514 $source_files = array_keys( $wp_filesystem->dirlist($remote_source) );
515 $remote_destination = $wp_filesystem->find_folder($local_destination);
516
517 //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
518 if ( 1 == count($source_files) && $wp_filesystem->is_dir( trailingslashit($source) . $source_files[0] . '/') ) //Only one folder? Then we want its contents.
519 $source = trailingslashit($source) . trailingslashit($source_files[0]);
520 elseif ( count($source_files) == 0 )
521 return new WP_Error( 'incompatible_archive', 'incompatible archive string', __( 'The plugin contains no files.' ) ); //There are no files?
522 else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename.
523 $source = trailingslashit($source);
524
525 //Has the source location changed? If so, we need a new source_files list.
526 if ( $source !== $remote_source )
527 $source_files = array_keys( $wp_filesystem->dirlist($source) );
528
529 if ( $clear_destination ) {
530 //We're going to clear the destination if there's something there
531 //$this->skin->feedback('remove_old');
532 $removed = true;
533 if ( $wp_filesystem->exists($remote_destination) )
534 $removed = $wp_filesystem->delete($remote_destination, true);
535 if ( is_wp_error($removed) )
536 return $removed;
537 else if ( ! $removed )
538 return new WP_Error('remove_old_failed', 'couldnt remove old');
539 } elseif ( $wp_filesystem->exists($remote_destination) ) {
540 //If we're not clearing the destination folder and something exists there already, Bail.
541 //But first check to see if there are actually any files in the folder.
542 $_files = $wp_filesystem->dirlist($remote_destination);
543 if ( ! empty($_files) ) {
544 $wp_filesystem->delete($remote_source, true); //Clear out the source files.
545 return new WP_Error('folder_exists', 'folder exists string', $remote_destination );
546 }
547 }
548
549 //Create themes folder, if needed
550 if ( !$wp_filesystem->exists(VIMEOGRAPHY_THEME_PATH) )
551 if ( !$wp_filesystem->mkdir(VIMEOGRAPHY_THEME_PATH, FS_CHMOD_DIR) )
552 return new WP_Error('mkdir_failed', 'mkdir failer string', $remote_destination);
553
554 //Create destination if needed
555 if ( !$wp_filesystem->exists($remote_destination) )
556 if ( !$wp_filesystem->mkdir($remote_destination, FS_CHMOD_DIR) )
557 return new WP_Error('mkdir_failed', 'mkdir failer string', $remote_destination);
558
559 // Copy new version of item into place.
560 $result = copy_dir($source, $remote_destination);
561
562 if ( is_wp_error($result) ) {
563 if ( $clear_working )
564 $wp_filesystem->delete($remote_source, true);
565 return $result;
566 }
567
568 //Clear the Working folder?
569 if ( $clear_working )
570 $wp_filesystem->delete($remote_source, true);
571
572 $destination_name = basename( str_replace($local_destination, '', $destination) );
573 if ( '.' == $destination_name )
574 $destination_name = '';
575
576 $result = compact('local_source', 'source', 'source_name', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination', 'delete_source_dir');
577
578 //Bombard the calling function will all the info which we've just used.
579 return $result;
580
581 }
582
583 }
584
585 new Vimeography;