Yoast\WP\SEO\Presenters
Breadcrumbs_Presenter::get_class() protected Yoast 1.0
Retrieves HTML Class attribute.
{} Это метод класса: Breadcrumbs_Presenter{}
Хуки из метода
Возвращает
Строку. The class attribute.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_class();
Код Breadcrumbs_Presenter::get_class() Breadcrumbs Presenter::get class Yoast 15.7
protected function get_class() {
if ( ! $this->class ) {
/**
* Filter: 'wpseo_breadcrumb_output_class' - Allow changing the HTML class on the Yoast SEO breadcrumbs wrapper element.
*
* @api 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;
}