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