name = $name; $this->content = $content; $default_options = array( 'link_class' => '', 'link_aria_label' => '', ); $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']; } /** * 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 ) . '"' : '', $this->link_content ); } /** * Outputs the section content. * * @return void */ public function display_content() { $html = sprintf( '
    ', esc_attr( 'wpseo-meta-section-' . $this->name ) ); $html .= $this->content; $html .= '
    '; $html .= '
    '; echo $html; } }