'', 'link_class' => '', 'link_aria_label' => '', ]; $options = array_merge( $default_options, $options ); $this->name = $name; $this->link_content = $link_content; $this->link_title = $options['link_title']; $this->link_class = $options['link_class']; $this->link_aria_label = $options['link_aria_label']; } /** * Outputs the section link if any section has been added. */ public function display_link() { if ( $this->has_sections() ) { printf( '
  • %5$s
  • ', esc_attr( $this->name ), esc_attr( $this->link_class ), ( $this->link_title !== '' ) ? ' title="' . esc_attr( $this->link_title ) . '"' : '', ( $this->link_aria_label !== '' ) ? ' aria-label="' . esc_attr( $this->link_aria_label ) . '"' : '', $this->link_content ); } } /** * Checks whether the tab has any sections. * * @return bool Whether the tab has any sections */ abstract protected function has_sections(); }