How to get Custom Post ID by adding filter to child theme’s function

add_action( 'manage_posts_custom_column', 'id_data' );
add_filter( 'manage_posts_columns', 'id_column'  );
function id_column( $defaults ) {
    $defaults['id'] = 'ID';
    return $defaults;
}
function id_data( $column_name ) {
    global $post;
    switch ( $column_name ) {
    case 'id':
        echo $post->ID;
    }
}