| Server IP : 89.108.64.180 / Your IP : 216.73.217.92 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dom-schastya.ru/wp-content/plugins/duplicate-page/inc/ |
Upload File : |
<?php if (!defined('ABSPATH')) {
exit;
} ?>
<script>
var dp_ajax_url = "<?php echo admin_url( 'admin-ajax.php' );?>";
</script>
<?php $this->custom_assets();
?>
<div class="wrap duplicate_page_settings">
<?php $this->load_help_desk(); ?>
<h1><?php _e('Duplicate Page Settings ', 'duplicate-page'); ?><a href="https://duplicatepro.com/pro/" target="_blank" class="button button-primary"><?php _e('Buy PRO', 'duplicate-page'); ?></a></h1>
<?php $duplicatepageoptions = array();
$opt = get_option('duplicate_page_options');
$msg = isset($_GET['msg']) ? $_GET['msg'] : '';
if (isset($_POST['submit_duplicate_page']) && wp_verify_nonce($_POST['duplicatepage_nonce_field'], 'duplicatepage_action')):
_e('<strong>Saving Please wait...</strong>', 'duplicate-page');
$needToUnset = array('submit_duplicate_page'); //no need to save in Database
foreach ($needToUnset as $noneed):
unset($_POST[$noneed]);
endforeach;
foreach ($_POST as $key => $val):
$duplicatepageoptions[$key] = $val;
endforeach;
$saveSettings = update_option('duplicate_page_options', $duplicatepageoptions);
if ($saveSettings) {
duplicate_page::dp_redirect('options-general.php?page=duplicate_page_settings&msg=1');
} else {
duplicate_page::dp_redirect('options-general.php?page=duplicate_page_settings&msg=2');
}
endif;
if (!empty($msg) && $msg == 1):
_e('<div class="updated settings-error notice is-dismissible" id="setting-error-settings_updated">
<p><strong>Settings saved.</strong></p><button class="notice-dismiss" type="button"><span class="screen-reader-text">Dismiss this notice.</span></button></div>', 'duplicate-page');
elseif (!empty($msg) && $msg == 2):
_e('<div class="error settings-error notice is-dismissible" id="setting-error-settings_updated">
<p><strong>Settings not saved.</strong></p><button class="notice-dismiss" type="button"><span class="screen-reader-text">Dismiss this notice.</span></button></div>', 'duplicate-page');
endif;
?>
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content" style="position: relative;">
<form action="" method="post" name="duplicate_page_form">
<?php wp_nonce_field('duplicatepage_action', 'duplicatepage_nonce_field'); ?>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="duplicate_post_editor"><?php _e('Choose Editor', 'duplicate-page'); ?></label></th>
<td>
<select id="duplicate_post_editor" name="duplicate_post_editor">
<option value="all" <?php echo (isset($opt['duplicate_post_editor']) && $opt['duplicate_post_editor'] == 'all') ? "selected = 'selected'" : ''; ?>><?php _e('All Editors', 'duplicate-page'); ?></option>
<option value="classic" <?php echo (isset($opt['duplicate_post_editor']) && $opt['duplicate_post_editor'] == 'classic') ? "selected = 'selected'" : ''; ?>><?php _e('Classic Editor', 'duplicate-page'); ?></option>
<option value="gutenberg" <?php echo (isset($opt['duplicate_post_editor']) && $opt['duplicate_post_editor'] == 'gutenberg') ? "selected = 'selected'" : ''; ?>><?php _e('Gutenberg Editor', 'duplicate-page'); ?></option>
</select>
<p><?php _e('Please select which editor your are using. <strong>Default:</strong> Classic Editor', 'duplicate-page'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="duplicate_post_status"><?php _e('Duplicate Post Status', 'duplicate-page'); ?></label></th>
<td>
<select id="duplicate_post_status" name="duplicate_post_status">
<option value="draft" <?php echo($opt['duplicate_post_status'] == 'draft') ? "selected = 'selected'" : ''; ?>><?php _e('Draft', 'duplicate-page'); ?></option>
<option value="publish" <?php echo($opt['duplicate_post_status'] == 'publish') ? "selected = 'selected'" : ''; ?>><?php _e('Publish', 'duplicate-page'); ?></option>
<option value="private" <?php echo($opt['duplicate_post_status'] == 'private') ? "selected = 'selected'" : ''; ?>><?php _e('Private', 'duplicate-page'); ?></option>
<option value="pending" <?php echo($opt['duplicate_post_status'] == 'pending') ? "selected = 'selected'" : ''; ?>><?php _e('Pending', 'duplicate-page'); ?></option>
</select>
<p><?php _e('Please select any post status you want to assign for duplicate post. <strong>Default:</strong> Draft.', 'duplicate-page'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="duplicate_post_redirect"><?php _e('Redirect to after click on <strong>Duplicate This Link</strong>', 'duplicate-page'); ?></label></th>
<td><select id="duplicate_post_redirect" name="duplicate_post_redirect">
<option value="to_list" <?php echo($opt['duplicate_post_redirect'] == 'to_list') ? "selected = 'selected'" : ''; ?>><?php _e('To All Posts List', 'duplicate-page'); ?></option>
<option value="to_page" <?php echo($opt['duplicate_post_redirect'] == 'to_page') ? "selected = 'selected'" : ''; ?>><?php _e('To Duplicate Edit Screen', 'duplicate-page'); ?></option>
</select>
<p><?php _e('Please select any post redirection, redirect you to selected after click on duplicate this link. <strong>Default:</strong> To current list.', 'duplicate-page'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="duplicate_post_suffix"><?php _e('Duplicate Post Suffix', 'duplicate-page'); ?></label></th>
<td>
<input type="text" class="regular-text" value="<?php echo !empty($opt['duplicate_post_suffix']) ? $opt['duplicate_post_suffix'] : ''; ?>" id="duplicate_post_suffix" name="duplicate_post_suffix">
<p><?php _e('Add a suffix for duplicate or clone post as Copy, Clone etc. It will show after title.', 'duplicate-page'); ?></p>
</td>
</tr>
</tbody></table>
<p class="submit"><input type="submit" value="Save Changes" class="button button-primary" id="submit" name="submit_duplicate_page"></p>
</form>
</div>
</div>
</div>
</div>