WPSEO_Bulk_Title_Editor_List_Table::parse_page_specific_column
Parse the title columns.
Метод класса: WPSEO_Bulk_Title_Editor_List_Table{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->parse_page_specific_column( $column_name, $record, $attributes );
- $column_name(строка) (обязательный)
- Column name.
- $record(объект) (обязательный)
- Data object.
- $attributes(строка) (обязательный)
- HTML attributes.
Код WPSEO_Bulk_Title_Editor_List_Table::parse_page_specific_column() WPSEO Bulk Title Editor List Table::parse page specific column Yoast 26.7
protected function parse_page_specific_column( $column_name, $record, $attributes ) {
// Fill meta data if exists in $this->meta_data.
$meta_data = ( ! empty( $this->meta_data[ $record->ID ] ) ) ? $this->meta_data[ $record->ID ] : [];
switch ( $column_name ) {
case 'col_existing_yoast_seo_title':
// @todo Inconsistent return/echo behavior R.
// I traced the escaping of the attributes to WPSEO_Bulk_List_Table::column_attributes.
// The output of WPSEO_Bulk_List_Table::parse_meta_data_field is properly escaped.
// phpcs:ignore WordPress.Security.EscapeOutput
echo $this->parse_meta_data_field( $record->ID, $attributes );
break;
case 'col_new_yoast_seo_title':
return sprintf(
'<input type="text" id="%1$s" name="%1$s" class="wpseo-new-title" data-id="%2$s" aria-labelledby="col_new_yoast_seo_title" />',
'wpseo-new-title-' . $record->ID,
$record->ID
);
}
unset( $meta_data );
}