6 if ( ! defined( 'WPSEO_VERSION' ) ) {
7 header( 'Status: 403 Forbidden' );
8 header( 'HTTP/1.1 403 Forbidden' );
13 if ( ! class_exists( 'WPSEO_Bulk_Description_List_Table' ) ) {
17 class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
21 * Current type for this class will be (meta) description.
25 protected $page_type = 'description';
28 * Settings with are used in __construct
32 protected $settings = array(
33 'singular' => 'wpseo_bulk_description',
34 'plural' => 'wpseo_bulk_descriptions',
39 * The field in the database where meta field is saved.
42 protected $target_db_field = 'metadesc';
45 * The columns shown on the table
49 public function get_columns() {
51 'col_existing_yoast_seo_metadesc' => __( 'Existing Yoast Meta Description', 'wordpress-seo' ),
52 'col_new_yoast_seo_metadesc' => __( 'New Yoast Meta Description', 'wordpress-seo' ),
55 return $this->merge_columns( $columns );
59 * Parse the metadescription
61 * @param string $column_name
62 * @param object $record
63 * @param string $attributes
67 protected function parse_page_specific_column( $column_name, $record, $attributes ) {
68 switch ( $column_name ) {
69 case 'col_new_yoast_seo_metadesc' :
70 return sprintf( '<textarea id="%1$s" name="%1$s" class="wpseo-new-metadesc" data-id="%2$s"></textarea>', 'wpseo-new-metadesc-' . $record->ID, $record->ID );
74 case 'col_existing_yoast_seo_metadesc':
75 echo $this->parse_meta_data_field( $record->ID, $attributes );
81 } /* End of class-exists wrapper */