WPSEO_Bulk_List_Table::parse_meta_data_field()
Parse the field where the existing meta-data value is displayed.
Метод класса: WPSEO_Bulk_List_Table{}
Хуков нет.
Возвращает
Строку
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->parse_meta_data_field( $record_id, $attributes, $values );
- $record_id(int) (обязательный)
- Record ID.
- $attributes(строка) (обязательный)
- HTML attributes.
- $values(true|false|массив)
- Optional values data array.
По умолчанию: false
Код WPSEO_Bulk_List_Table::parse_meta_data_field() WPSEO Bulk List Table::parse meta data field Yoast 24.9
protected function parse_meta_data_field( $record_id, $attributes, $values = false ) { // Fill meta data if exists in $this->meta_data. $meta_data = ( ! empty( $this->meta_data[ $record_id ] ) ) ? $this->meta_data[ $record_id ] : []; $meta_key = WPSEO_Meta::$meta_prefix . $this->target_db_field; $meta_value = ( ! empty( $meta_data[ $meta_key ] ) ) ? $meta_data[ $meta_key ] : ''; if ( ! empty( $values ) ) { $meta_value = $values[ $meta_value ]; } $id = "wpseo-existing-$this->target_db_field-$record_id"; // $attributes correctly escaped, verified by Alexander. See WPSEO_Bulk_Description_List_Table::parse_page_specific_column. return sprintf( '<td %2$s id="%3$s">%1$s</td>', esc_html( $meta_value ), $attributes, esc_attr( $id ) ); }