To reference the post ID you need the post object itself.
<?php
// Increase the number of arguments passed.
add_filter( 'page_row_actions', 'remove_page_row_actions', 10, 2 ); // 2, not 1
// pass $post object as second argument.
function remove_page_row_actions( $actions, $post ) {
$post_types_affected = array('page');
$post_ids_affected = array( 111, 222 );
if ( in_array( $post->post_type, $post_types_affected )
&& in_array( $post->ID, $post_ids_affected ) ) {
unset( $actions['inline hide-if-no-js'] );
unset( $actions['edit'] );
unset( $actions['fl-builder'] );
}
return $actions;
}
Don’t forget that page_row_actions
filter is intended for non-hierarchical post types. Use post_row_actions
for hierarchical ones.