WPSEO_Paper_Presenter::__construct()
WPSEO_presenter_paper constructor.
Метод класса: WPSEO_Paper_Presenter{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WPSEO_Paper_Presenter = new WPSEO_Paper_Presenter(); $WPSEO_Paper_Presenter->__construct( $title, $view_file, $settings );
- $title(строка) (обязательный)
- The title of the paper.
- $view_file(строка|null)
- The path to the view file. Use the content setting if do not wish to use a view file.
По умолчанию: null - $settings(массив)
- Settings for the paper.
По умолчанию: []
Код WPSEO_Paper_Presenter::__construct() WPSEO Paper Presenter:: construct Yoast 22.4
public function __construct( $title, $view_file = null, array $settings = [] ) { $defaults = [ 'paper_id' => null, 'paper_id_prefix' => 'wpseo-', 'collapsible' => false, 'collapsible_header_class' => '', 'expanded' => false, 'help_text' => '', 'title_after' => '', 'class' => '', 'content' => '', 'view_data' => [], ]; $this->settings = wp_parse_args( $settings, $defaults ); $this->title = $title; $this->view_file = $view_file; }