name = $name;
$this->content = $content;
$default_options = [
'link_class' => '',
'link_aria_label' => '',
'html_after' => '',
];
$options = wp_parse_args( $options, $default_options );
$this->link_content = $link_content;
$this->link_class = $options['link_class'];
$this->link_aria_label = $options['link_aria_label'];
$this->html_after = $options['html_after'];
}
/**
* Outputs the section link.
*
* @return void
*/
public function display_link() {
printf(
'
%4$s',
esc_attr( $this->name ),
esc_attr( $this->link_class ),
( $this->link_aria_label !== '' ) ? ' aria-label="' . esc_attr( $this->link_aria_label ) . '"' : '',
wp_kses_post( $this->link_content )
);
}
/**
* Outputs the section content.
*
* @return void
*/
public function display_content() {
add_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_forms' ] );
add_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_a11y' ] );
printf(
'';
remove_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_forms' ] );
remove_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_a11y' ] );
}
}