PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 4.9.2
WP STAGING – WordPress Backup, Restore, Migration & Clone v4.9.2
4.9.2 4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / views / clone / ajax / symlink-uploads.php
wp-staging / views / clone / ajax Last commit date
cron-setting.php 5 months ago custom-directory.php 1 month ago directory-navigation.php 2 weeks ago exclude-settings.php 5 months ago external-database.php 3 months ago login-data.php 4 days ago mail-setting.php 5 months ago plugins-update.php 1 year ago process-lock.php 1 year ago scan.php 2 weeks ago start.php 1 year ago symlink-uploads.php 1 year ago update.php 1 year ago
symlink-uploads.php
53 lines
1 <?php
2
3 use WPStaging\Backend\Modules\Jobs\Scan;
4 use WPStaging\Framework\Facades\Info;
5 use WPStaging\Framework\Facades\UI\Checkbox;
6
7 /**
8 * This file is currently being called for the both FREE and PRO version:
9 * @see src/views/clone/ajax/scan.php:89
10 *
11 * @var Scan $scan
12 * @var stdClass $options
13 * @var bool $isPro
14 * @var object $wpDefaultDirectories
15 *
16 * @see Scan::start For details on $options.
17 */
18
19 // By default symlink option is unchecked
20 $uploadsSymlinked = false;
21
22 if ($isPro && !empty($options->current)) {
23 $uploadsSymlinked = isset($options->existingClones[$options->current]['uploadsSymlinked']) && $options->existingClones[$options->current]['uploadsSymlinked'];
24 }
25
26 $disableUploadsSymlink = false;
27 if (Info::canUse('symlink') === false || !$isPro) {
28 $disableUploadsSymlink = true;
29 }
30 ?>
31
32 <div class="wpstg--advanced-settings--checkbox">
33 <label for="wpstg_symlink_upload"><?php esc_html_e('Symlink Uploads Folder', 'wp-staging'); ?></label>
34 <?php Checkbox::render('wpstg_symlink_upload', 'wpstg_symlink_upload', 'true', $uploadsSymlinked, ['isDisabled' => $disableUploadsSymlink]); ?>
35 <span class="wpstg--tooltip wpstg-tooltip-icon">
36 <img class="wpstg--dashicons" src="<?php echo esc_url($scan->getInfoIcon()); ?>" alt="info"/>
37 <span class="wpstg--tooltiptext">
38 <?php if ($disableUploadsSymlink && $isPro) : ?>
39 <span class="wpstg--red">
40 <?php echo sprintf(esc_html__('Symlink Uploads Folder is disabled by default because %s is either unavailable(does\'nt exists) or restricted by your hosting provider.', 'wp-staging'), '<code>symlink</code>'); ?>
41 </span>
42 <br/>
43 <br/>
44 <?php else : ?>
45 <?php echo sprintf(esc_html__('Activate to symlink the folder %s%s%s to the production site. %s All files including images on the production site\'s uploads folder will be linked to the staging site uploads folder. This will speed up the cloning and pushing process tremendously as no files from the uploads folder are copied between both sites. %s Warning: this can lead to mixed and shared content issues if both sites load (custom) stylesheet files from the same uploads folder. %s Using this option means changing images on the staging site will change images on the production site as well. Use this with care! %s', 'wp-staging'), '<code>', esc_html($wpDefaultDirectories->getRelativeUploadPath()), '</code>', '<br><br>', '<br><br><span class="wpstg--red">', '<br><br>', '</span>'); ?>
46 <br/>
47 <br/>
48 <span class="wpstg--red"><?php esc_html_e('This feature only works if the staging site is on the same domain as the production site.', 'wp-staging'); ?></span>
49 <?php endif; ?>
50 </span>
51 </span>
52 </div>
53