3 * @package WPSEO\Admin\Bulk Editor
8 * Implements table for bulk description editing.
10 class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
13 * Current type for this class will be (meta) description.
17 protected $page_type = 'description';
20 * Settings with are used in __construct
24 protected $settings = array(
25 'singular' => 'wpseo_bulk_description',
26 'plural' => 'wpseo_bulk_descriptions',
31 * The field in the database where meta field is saved.
34 protected $target_db_field = 'metadesc';
37 * The columns shown on the table
41 public function get_columns() {
43 'col_existing_yoast_seo_metadesc' => __( 'Existing Yoast Meta Description', 'wordpress-seo' ),
44 'col_new_yoast_seo_metadesc' => __( 'New Yoast Meta Description', 'wordpress-seo' ),
47 return $this->merge_columns( $columns );
51 * Parse the metadescription
53 * @param string $column_name
54 * @param object $record
55 * @param string $attributes
59 protected function parse_page_specific_column( $column_name, $record, $attributes ) {
60 switch ( $column_name ) {
61 case 'col_new_yoast_seo_metadesc':
63 '<textarea id="%1$s" name="%1$s" class="wpseo-new-metadesc" data-id="%2$s"></textarea>',
64 'wpseo-new-metadesc-' . $record->ID,
69 case 'col_existing_yoast_seo_metadesc':
70 // TODO inconsistent return/echo behavior R.
71 echo $this->parse_meta_data_field( $record->ID, $attributes );