Edit File by line
/home/barbar84/www/wp-conte.../plugins/wordpres.../admin/views
File: paper-collapsible.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin\Views
[4] Fix | Delete
*
[5] Fix | Delete
* @uses string $paper_id The ID of the paper.
[6] Fix | Delete
* @uses string $paper_id_prefix The ID prefix of the paper.
[7] Fix | Delete
* @uses bool $collapsible Whether the collapsible should be rendered.
[8] Fix | Delete
* @uses array $collapsible_config Configuration for the collapsible.
[9] Fix | Delete
* @uses string $collapsible_header_class Class for the collapsible header.
[10] Fix | Delete
* @uses string $title The title.
[11] Fix | Delete
* @uses string $title_after Additional content to render after the title.
[12] Fix | Delete
* @uses string $view_file Path to the view file.
[13] Fix | Delete
* @uses WPSEO_Admin_Help_Panel $help_text The help text.
[14] Fix | Delete
*/
[15] Fix | Delete
[16] Fix | Delete
if ( ! defined( 'WPSEO_VERSION' ) ) {
[17] Fix | Delete
header( 'Status: 403 Forbidden' );
[18] Fix | Delete
header( 'HTTP/1.1 403 Forbidden' );
[19] Fix | Delete
exit();
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
?>
[23] Fix | Delete
<div
[24] Fix | Delete
class="<?php echo esc_attr( 'paper tab-block ' . $class ); ?>"<?php echo ( $paper_id ) ? ' id="' . esc_attr( $paper_id_prefix . $paper_id ) . '"' : ''; ?>>
[25] Fix | Delete
[26] Fix | Delete
<?php
[27] Fix | Delete
if ( ! empty( $title ) ) {
[28] Fix | Delete
[29] Fix | Delete
if ( ! empty( $collapsible ) ) {
[30] Fix | Delete
[31] Fix | Delete
$button_id_attr = '';
[32] Fix | Delete
if ( ! empty( $paper_id ) ) {
[33] Fix | Delete
$button_id_attr = sprintf( ' id="%s"', esc_attr( $paper_id_prefix . $paper_id . '-button' ) );
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
printf(
[37] Fix | Delete
'<h2 class="%1$s"><button%2$s type="button" class="toggleable-container-trigger" aria-expanded="%3$s">%4$s%5$s <span class="toggleable-container-icon dashicons %6$s" aria-hidden="true"></span></button></h2>',
[38] Fix | Delete
esc_attr( 'collapsible-header ' . $collapsible_header_class ),
[39] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- $button_id_attr is escaped above.
[40] Fix | Delete
$button_id_attr,
[41] Fix | Delete
esc_attr( $collapsible_config['expanded'] ),
[42] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- $help_text is an instance of WPSEO_Admin_Help_Panel, which escapes it's own output.
[43] Fix | Delete
$help_text->get_button_html(),
[44] Fix | Delete
esc_html( $title ) . wp_kses_post( $title_after ),
[45] Fix | Delete
wp_kses_post( $collapsible_config['toggle_icon'] )
[46] Fix | Delete
);
[47] Fix | Delete
}
[48] Fix | Delete
else {
[49] Fix | Delete
echo '<div class="paper-title"><h2 class="help-button-inline">',
[50] Fix | Delete
esc_html( $title ),
[51] Fix | Delete
wp_kses_post( $title_after ),
[52] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- $help_text is an instance of WPSEO_Admin_Help_Panel, which escapes it's own output.
[53] Fix | Delete
$help_text->get_button_html(),
[54] Fix | Delete
'</h2></div>';
[55] Fix | Delete
}
[56] Fix | Delete
}
[57] Fix | Delete
?>
[58] Fix | Delete
<?php
[59] Fix | Delete
[60] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- $help_text is an instance of WPSEO_Admin_Help_Panel, which escapes it's own output.
[61] Fix | Delete
echo $help_text->get_panel_html();
[62] Fix | Delete
[63] Fix | Delete
$container_id_attr = '';
[64] Fix | Delete
if ( ! empty( $paper_id ) ) {
[65] Fix | Delete
$container_id_attr = sprintf( ' id="%s"', esc_attr( $paper_id_prefix . $paper_id . '-container' ) );
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
printf(
[69] Fix | Delete
'<div%1$s class="%2$s">%3$s</div>',
[70] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- $container_id_attr is escaped above.
[71] Fix | Delete
$container_id_attr,
[72] Fix | Delete
esc_attr( 'paper-container ' . $collapsible_config['class'] ),
[73] Fix | Delete
$content
[74] Fix | Delete
);
[75] Fix | Delete
?>
[76] Fix | Delete
[77] Fix | Delete
</div>
[78] Fix | Delete
[79] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function