Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordpres.../admin/metabox
File: class-metabox-collapsibles-section.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Generates and displays a metabox tab that consists of collapsible sections.
[8] Fix | Delete
*/
[9] Fix | Delete
class WPSEO_Metabox_Collapsibles_Sections extends WPSEO_Abstract_Metabox_Tab_With_Sections {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Holds the tab's collapsibles.
[13] Fix | Delete
*
[14] Fix | Delete
* @var WPSEO_Metabox_Collapsible[]
[15] Fix | Delete
*/
[16] Fix | Delete
private $collapsibles = [];
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Constructor.
[20] Fix | Delete
*
[21] Fix | Delete
* @param string $name The name of the section, used as an identifier in the html.
[22] Fix | Delete
* Can only contain URL safe characters.
[23] Fix | Delete
* @param string $link_content The text content of the section link.
[24] Fix | Delete
* @param array $collapsibles The metabox collapsibles (`WPSEO_Metabox_Collapsible[]`) to be included in the section.
[25] Fix | Delete
* @param array $options Optional link attributes.
[26] Fix | Delete
*/
[27] Fix | Delete
public function __construct( $name, $link_content, array $collapsibles = [], array $options = [] ) {
[28] Fix | Delete
parent::__construct( $name, $link_content, $options );
[29] Fix | Delete
[30] Fix | Delete
$this->collapsibles = $collapsibles;
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* Outputs the section content if any tab has been added.
[35] Fix | Delete
*
[36] Fix | Delete
* @return void
[37] Fix | Delete
*/
[38] Fix | Delete
public function display_content() {
[39] Fix | Delete
if ( $this->has_sections() ) {
[40] Fix | Delete
printf( '<div id="%1$s" class="wpseo-meta-section">', esc_attr( 'wpseo-meta-section-' . $this->name ) );
[41] Fix | Delete
echo '<div class="wpseo_content_wrapper">';
[42] Fix | Delete
[43] Fix | Delete
add_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_forms' ] );
[44] Fix | Delete
add_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_a11y' ] );
[45] Fix | Delete
foreach ( $this->collapsibles as $collapsible ) {
[46] Fix | Delete
echo wp_kses_post( $collapsible->content() );
[47] Fix | Delete
}
[48] Fix | Delete
remove_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_forms' ] );
[49] Fix | Delete
remove_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_a11y' ] );
[50] Fix | Delete
[51] Fix | Delete
echo '</div></div>';
[52] Fix | Delete
}
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
/**
[56] Fix | Delete
* Checks whether the tab has any sections.
[57] Fix | Delete
*
[58] Fix | Delete
* @return bool Whether the tab has any sections
[59] Fix | Delete
*/
[60] Fix | Delete
protected function has_sections() {
[61] Fix | Delete
return ! empty( $this->collapsibles );
[62] Fix | Delete
}
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function