Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/duplicat.../src/admin/views
File: options.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Duplicate Post plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package Yoast\WP\Duplicate_Post\Admin\Views
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
if ( ! defined( 'DUPLICATE_POST_CURRENT_VERSION' ) ) {
[7] Fix | Delete
header( 'Status: 403 Forbidden' );
[8] Fix | Delete
header( 'HTTP/1.1 403 Forbidden' );
[9] Fix | Delete
exit();
[10] Fix | Delete
}
[11] Fix | Delete
?>
[12] Fix | Delete
<div class="wrap">
[13] Fix | Delete
<h1>
[14] Fix | Delete
<?php \esc_html_e( 'Duplicate Post Options', 'duplicate-post' ); ?>
[15] Fix | Delete
</h1>
[16] Fix | Delete
[17] Fix | Delete
<form id="duplicate_post_settings_form" method="post" action="options.php" style="clear: both">
[18] Fix | Delete
<?php \settings_fields( 'duplicate_post_group' ); ?>
[19] Fix | Delete
[20] Fix | Delete
<header role="tablist" aria-label="<?php \esc_attr_e( 'Settings sections', 'duplicate-post' ); ?>"
[21] Fix | Delete
class="nav-tab-wrapper">
[22] Fix | Delete
<button
[23] Fix | Delete
type="button"
[24] Fix | Delete
role="tab"
[25] Fix | Delete
class="nav-tab nav-tab-active"
[26] Fix | Delete
aria-selected="true"
[27] Fix | Delete
aria-controls="what-tab"
[28] Fix | Delete
id="what"><?php \esc_html_e( 'What to copy', 'duplicate-post' ); ?>
[29] Fix | Delete
</button>
[30] Fix | Delete
<button
[31] Fix | Delete
type="button"
[32] Fix | Delete
role="tab"
[33] Fix | Delete
class="nav-tab"
[34] Fix | Delete
aria-selected="false"
[35] Fix | Delete
aria-controls="who-tab"
[36] Fix | Delete
id="who"
[37] Fix | Delete
tabindex="-1"><?php \esc_html_e( 'Permissions', 'duplicate-post' ); ?>
[38] Fix | Delete
</button>
[39] Fix | Delete
<button
[40] Fix | Delete
type="button"
[41] Fix | Delete
role="tab"
[42] Fix | Delete
class="nav-tab"
[43] Fix | Delete
aria-selected="false"
[44] Fix | Delete
aria-controls="where-tab"
[45] Fix | Delete
id="where"
[46] Fix | Delete
tabindex="-1"><?php \esc_html_e( 'Display', 'duplicate-post' ); ?>
[47] Fix | Delete
</button>
[48] Fix | Delete
</header>
[49] Fix | Delete
[50] Fix | Delete
<section
[51] Fix | Delete
tabindex="0"
[52] Fix | Delete
role="tabpanel"
[53] Fix | Delete
id="what-tab"
[54] Fix | Delete
aria-labelledby="what">
[55] Fix | Delete
<h2 class="hide-if-js"><?php \esc_html_e( 'What to copy', 'duplicate-post' ); ?></h2>
[56] Fix | Delete
<table class="form-table" role="presentation">
[57] Fix | Delete
<tr>
[58] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Post/page elements to copy', 'duplicate-post' ); ?></th>
[59] Fix | Delete
<td>
[60] Fix | Delete
<fieldset>
[61] Fix | Delete
<legend class="screen-reader-text"><?php \esc_html_e( 'Post/page elements to copy', 'duplicate-post' ); ?></legend>
[62] Fix | Delete
<?php
[63] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[64] Fix | Delete
echo $this->generate_tab_inputs( 'what-to-copy', 'elements-to-copy' );
[65] Fix | Delete
?>
[66] Fix | Delete
</fieldset>
[67] Fix | Delete
</td>
[68] Fix | Delete
</tr>
[69] Fix | Delete
<tr>
[70] Fix | Delete
<th scope="row">
[71] Fix | Delete
<label for="duplicate-post-title-prefix"><?php \esc_html_e( 'Title prefix', 'duplicate-post' ); ?></label>
[72] Fix | Delete
</th>
[73] Fix | Delete
<td>
[74] Fix | Delete
<?php
[75] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[76] Fix | Delete
echo $this->generate_input( 'duplicate_post_title_prefix' );
[77] Fix | Delete
?>
[78] Fix | Delete
</td>
[79] Fix | Delete
</tr>
[80] Fix | Delete
<tr>
[81] Fix | Delete
<th scope="row">
[82] Fix | Delete
<label for="duplicate-post-title-suffix"><?php \esc_html_e( 'Title suffix', 'duplicate-post' ); ?></label>
[83] Fix | Delete
</th>
[84] Fix | Delete
<td>
[85] Fix | Delete
<?php
[86] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[87] Fix | Delete
echo $this->generate_input( 'duplicate_post_title_suffix' );
[88] Fix | Delete
?>
[89] Fix | Delete
</td>
[90] Fix | Delete
</tr>
[91] Fix | Delete
<tr>
[92] Fix | Delete
<th scope="row">
[93] Fix | Delete
<label for="duplicate-post-increase-menu-order-by"><?php \esc_html_e( 'Increase menu order by', 'duplicate-post' ); ?></label>
[94] Fix | Delete
</th>
[95] Fix | Delete
<td>
[96] Fix | Delete
<?php
[97] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[98] Fix | Delete
echo $this->generate_input( 'duplicate_post_increase_menu_order_by' );
[99] Fix | Delete
?>
[100] Fix | Delete
[101] Fix | Delete
</td>
[102] Fix | Delete
</tr>
[103] Fix | Delete
<tr>
[104] Fix | Delete
<th scope="row">
[105] Fix | Delete
<label for="duplicate-post-blacklist"><?php \esc_html_e( 'Do not copy these fields', 'duplicate-post' ); ?></label>
[106] Fix | Delete
</th>
[107] Fix | Delete
<td id="textfield">
[108] Fix | Delete
<?php
[109] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[110] Fix | Delete
echo $this->generate_input( 'duplicate_post_blacklist' );
[111] Fix | Delete
?>
[112] Fix | Delete
</td>
[113] Fix | Delete
</tr>
[114] Fix | Delete
<tr>
[115] Fix | Delete
<th scope="row">
[116] Fix | Delete
<?php \esc_html_e( 'Do not copy these taxonomies', 'duplicate-post' ); ?><br/>
[117] Fix | Delete
</th>
[118] Fix | Delete
<td>
[119] Fix | Delete
<fieldset>
[120] Fix | Delete
<legend class="screen-reader-text"><?php \esc_html_e( 'Do not copy these taxonomies', 'duplicate-post' ); ?></legend>
[121] Fix | Delete
<?php
[122] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[123] Fix | Delete
echo $this->generate_input( 'duplicate_post_taxonomies_blacklist' );
[124] Fix | Delete
?>
[125] Fix | Delete
<button type="button" class="button-link hide-if-no-js toggle-private-taxonomies"
[126] Fix | Delete
aria-expanded="false">
[127] Fix | Delete
<?php \esc_html_e( 'Show/hide private taxonomies', 'duplicate-post' ); ?>
[128] Fix | Delete
</button>
[129] Fix | Delete
</fieldset>
[130] Fix | Delete
</td>
[131] Fix | Delete
</tr>
[132] Fix | Delete
</table>
[133] Fix | Delete
</section>
[134] Fix | Delete
<section
[135] Fix | Delete
tabindex="0"
[136] Fix | Delete
role="tabpanel"
[137] Fix | Delete
id="who-tab"
[138] Fix | Delete
aria-labelledby="who"
[139] Fix | Delete
hidden="hidden">
[140] Fix | Delete
<h2 class="hide-if-js"><?php \esc_html_e( 'Permissions', 'duplicate-post' ); ?></h2>
[141] Fix | Delete
<table class="form-table" role="presentation">
[142] Fix | Delete
<?php if ( \current_user_can( 'promote_users' ) ) { ?>
[143] Fix | Delete
<tr>
[144] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Roles allowed to copy', 'duplicate-post' ); ?></th>
[145] Fix | Delete
<td>
[146] Fix | Delete
<fieldset>
[147] Fix | Delete
<legend class="screen-reader-text"><?php \esc_html_e( 'Roles allowed to copy', 'duplicate-post' ); ?></legend>
[148] Fix | Delete
<?php
[149] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[150] Fix | Delete
echo $this->generate_input( 'duplicate_post_roles' );
[151] Fix | Delete
?>
[152] Fix | Delete
<p>
[153] Fix | Delete
<?php \esc_html_e( 'Warning: users will be able to copy, rewrite and republish all posts, even those of other users.', 'duplicate-post' ); ?>
[154] Fix | Delete
<br/>
[155] Fix | Delete
<?php \esc_html_e( 'Passwords and contents of password-protected posts may become visible to undesired users and visitors.', 'duplicate-post' ); ?>
[156] Fix | Delete
</p>
[157] Fix | Delete
</fieldset>
[158] Fix | Delete
</td>
[159] Fix | Delete
</tr>
[160] Fix | Delete
<?php } ?>
[161] Fix | Delete
<tr>
[162] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Enable for these post types', 'duplicate-post' ); ?>
[163] Fix | Delete
</th>
[164] Fix | Delete
<td>
[165] Fix | Delete
<fieldset>
[166] Fix | Delete
<legend class="screen-reader-text"><?php \esc_html_e( 'Enable for these post types', 'duplicate-post' ); ?></legend>
[167] Fix | Delete
<?php
[168] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[169] Fix | Delete
echo $this->generate_input( 'duplicate_post_types_enabled' );
[170] Fix | Delete
?>
[171] Fix | Delete
<p>
[172] Fix | Delete
<?php \esc_html_e( 'Select the post types you want the plugin to be enabled for.', 'duplicate-post' ); ?>
[173] Fix | Delete
<br/>
[174] Fix | Delete
<?php \esc_html_e( 'Whether the links are displayed for custom post types registered by themes or plugins depends on their use of standard WordPress UI elements.', 'duplicate-post' ); ?>
[175] Fix | Delete
</p>
[176] Fix | Delete
</fieldset>
[177] Fix | Delete
</td>
[178] Fix | Delete
</tr>
[179] Fix | Delete
</table>
[180] Fix | Delete
</section>
[181] Fix | Delete
<section
[182] Fix | Delete
tabindex="0"
[183] Fix | Delete
role="tabpanel"
[184] Fix | Delete
id="where-tab"
[185] Fix | Delete
aria-labelledby="where"
[186] Fix | Delete
hidden="hidden">
[187] Fix | Delete
<h2 class="hide-if-js"><?php \esc_html_e( 'Display', 'duplicate-post' ); ?></h2>
[188] Fix | Delete
<table class="form-table" role="presentation">
[189] Fix | Delete
<tr>
[190] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Show these links', 'duplicate-post' ); ?></th>
[191] Fix | Delete
<td>
[192] Fix | Delete
<fieldset>
[193] Fix | Delete
<?php
[194] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[195] Fix | Delete
echo $this->generate_tab_inputs( 'display', 'show-links' );
[196] Fix | Delete
?>
[197] Fix | Delete
</fieldset>
[198] Fix | Delete
</td>
[199] Fix | Delete
</tr>
[200] Fix | Delete
[201] Fix | Delete
<tr>
[202] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Show links in', 'duplicate-post' ); ?></th>
[203] Fix | Delete
<td>
[204] Fix | Delete
<fieldset>
[205] Fix | Delete
<?php
[206] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[207] Fix | Delete
echo $this->generate_tab_inputs( 'display', 'show-links-in' );
[208] Fix | Delete
?>
[209] Fix | Delete
</fieldset>
[210] Fix | Delete
<p>
[211] Fix | Delete
<?php \esc_html_e( 'Whether the links are displayed for custom post types registered by themes or plugins depends on their use of standard WordPress UI elements.', 'duplicate-post' ); ?>
[212] Fix | Delete
<br/>
[213] Fix | Delete
<?php
[214] Fix | Delete
\printf(
[215] Fix | Delete
/* translators: 1: Code start tag, 2: Code closing tag, 3: Link start tag to the template tag documentation, 4: Link closing tag. */
[216] Fix | Delete
\esc_html__( 'You can also use the template tag %1$sduplicate_post_clone_post_link( $link, $before, $after, $id )%2$s. %3$sMore info on the template tag%4$s.', 'duplicate-post' ),
[217] Fix | Delete
'<code>',
[218] Fix | Delete
'</code>',
[219] Fix | Delete
'<a href="' . \esc_url( 'https://developer.yoast.com/duplicate-post/functions-template-tags#duplicate_post_clone_post_link' ) . '">',
[220] Fix | Delete
'</a>'
[221] Fix | Delete
);
[222] Fix | Delete
?>
[223] Fix | Delete
</p>
[224] Fix | Delete
</td>
[225] Fix | Delete
</tr>
[226] Fix | Delete
<tr>
[227] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Show original item:', 'duplicate-post' ); ?></th>
[228] Fix | Delete
<td>
[229] Fix | Delete
<?php
[230] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[231] Fix | Delete
echo $this->generate_tab_inputs( 'display', 'show-original' );
[232] Fix | Delete
?>
[233] Fix | Delete
</td>
[234] Fix | Delete
</tr>
[235] Fix | Delete
<tr>
[236] Fix | Delete
<th scope="row"><?php \esc_html_e( 'Update notice', 'duplicate-post' ); ?></th>
[237] Fix | Delete
<td>
[238] Fix | Delete
<?php
[239] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
[240] Fix | Delete
echo $this->generate_input( 'duplicate_post_show_notice' );
[241] Fix | Delete
?>
[242] Fix | Delete
</td>
[243] Fix | Delete
</tr>
[244] Fix | Delete
</table>
[245] Fix | Delete
</section>
[246] Fix | Delete
<p class="submit">
[247] Fix | Delete
<input type="submit" class="button button-primary" value="<?php \esc_html_e( 'Save changes', 'duplicate-post' ); ?>"/>
[248] Fix | Delete
</p>
[249] Fix | Delete
</form>
[250] Fix | Delete
</div>
[251] Fix | Delete
[252] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function