ID, 'slider_subtitle', true );
$button_text = get_post_meta( $post->ID, 'slider_button_text', true );
$button_link = get_post_meta( $post->ID, 'slider_button_link', true );
?>
$label ) {
$new[ $key ] = $label;
if ( 'title' === $key ) {
$new['awp_image'] = __( 'Image', 'advance-wp-slider' );
$new['awp_button'] = __( 'Button', 'advance-wp-slider' );
}
}
return $new;
}
/**
* Column content.
*
* @param string $column Column key.
* @param int $post_id Post ID.
*/
public function column_content( $column, $post_id ) {
if ( 'awp_image' === $column ) {
$thumb = get_the_post_thumbnail( $post_id, array( 60, 40 ) );
echo $thumb ? wp_kses_post( $thumb ) : '—';
}
if ( 'awp_button' === $column ) {
$text = get_post_meta( $post_id, 'slider_button_text', true );
echo $text ? esc_html( $text ) : '—';
}
}
}