79587861

Date: 2025-04-23 04:56:20
Score: 1
Natty:
Report link

Since WordPress 5.7 you can make use of the wp_script_attributes filter:

add_filter('wp_script_attributes', function ($attributes) {
  if ($attributes['id'] === 'jquery-js') {
    $attributes['integrity'] = 'foobar';
    $attributes['crossorigin'] = 'anonymous';
  }
  return $attributes;
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: meteorlxy