If the shortcode you’re using provides a standard format filter for the shortcode attributes, then you could perhaps try something like this.
function filter_shortcode_atts_sectionsforce( $out, $pairs, $atts, $shortcode ) {
// is filter set and it contains our dynamic tag
if ( isset( $atts['filter'] ) && false !== strpos( 'Playhouse__c=\'site_id\'', $atts['filter'] ) ) {
// get ID, could use some custom helper function here, if complex logic is required
$site_id = get_current_blog_id();
// Simple string replacement to replace dynamic part with real data
$out['filter'] = str_replace( 'Playhouse__c=\'site_id\'', "Playhouse__c="{$site_id}"", $atts['filter'] );
}
return $out;
}
add_filter( 'shortcode_atts_sectionsforce', 'filter_shortcode_atts_sectionsforce', 10, 4 );
Ot if the shortcode (and its callback) is your own code then use the check above in our callback.
Also, based on https://stackoverflow.com/questions/30490175/use-wp-shortcode-as-an-attribute-in-another-shortcode, I think trying to use [site_id] in a paramater has the potential to break the shortcode, because the shortcode parser might freak out from those extra brackets. That’s why I didn’t include them in my example above.