Yoast\WP\SEO\Presenters
Breadcrumbs_Presenter::get_class()
Retrieves HTML Class attribute.
Метод класса: Breadcrumbs_Presenter{}
Хуки из метода
Возвращает
Строку
. The class attribute.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_class();
Код Breadcrumbs_Presenter::get_class() Breadcrumbs Presenter::get class Yoast 24.1
protected function get_class() { if ( ! $this->class ) { /** * Filter: 'wpseo_breadcrumb_output_class' - Allow changing the HTML class on the Yoast SEO breadcrumbs wrapper element. * * @param string $unsigned Class to add to the wrapper element. */ $this->class = \apply_filters( 'wpseo_breadcrumb_output_class', '' ); if ( ! \is_string( $this->class ) ) { return ''; } if ( $this->class !== '' ) { $this->class = ' class="' . \esc_attr( $this->class ) . '"'; } } return $this->class; }