Is it possible to set custom post type revision limit inside the theme files?

I had a look at the wp_revisions_to_keep() function. There’s a filter called wp_revisions_to_keep that overrides the value of WP_POST_REVISIONS.

Here’s an untested example (PHP 5.4+):

add_filter( 'wp_revisions_to_keep', function( $num, $post )
{
    // Post Types and Revision Numbers - Edit to your needs
    $config = [
        'post' => 10,
        'page' => 9,
        'cpt'  => 8
    ];

    // Get the current post type
    $post_type = get_post_type( $post );

    // Override the WP_POST_REVISIONS value
    if( isset( $config[$post_type] ) && is_int( $config[$post_type] ) )
        $num = $config[$post_type];

    return $num;
}, 10, 2 );

But I think this kind of configuration would make more sense as a plugin than being theme related.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)