' . $disabled_message . '
'; } /** * Determines whether we are dealing with the Usage tracking feature on a multisite subsite. * This feature requires specific behavior for the toggle switch. * * @param string $feature_setting The feature setting. * * @return bool True if we are dealing with the Usage tracking feature on a multisite subsite. */ protected function is_tracking_on_subsite( $feature_setting ) { return ( $feature_setting === 'tracking' && ! is_network_admin() && ! is_main_site() ); } /** * Returns the disabled attribute HTML. * * @param string $variable The variable within the option of the related form element. * @param array $attr Extra attributes added to the form element. * * @return string The disabled attribute HTML. */ protected function get_disabled_attribute( $variable, $attr ) { if ( $this->is_control_disabled( $variable ) || ( isset( $attr['disabled'] ) && $attr['disabled'] ) ) { return ' disabled'; } return ''; } }