id = $id; $this->title = $title; } /** * @return mixed */ public function get_id() { return $this->id; } public function add_hooks() { add_filter( 'wpml_mcsetup_navigation_links', array( $this, 'mcsetup_navigation_links' ) ); } public function mcsetup_navigation_links( array $mcsetup_sections ) { $mcsetup_sections[ $this->id ] = esc_html( $this->title ); return $mcsetup_sections; } public function render() { $output = ''; $output .= '
'; $output .= '
'; $output .= '

' . esc_html( $this->title ) . '

'; $output .= '
'; $output .= '
'; $output .= $this->render_content(); $output .= '
'; $output .= '
'; return $output; } /** * @return string */ abstract protected function render_content(); }