Modify the REL used for the thumbnails when displaying a list of attachments. The filter ‘gdbbx_image_thumbnail_rel‘ allows you to change the REL value.

This filter provides 3 arguments.

Arguments

  • $rel: default REL value, starting from the REL in the plugin settings
  • $obj: attachment post object
  • $ext: extension for the file

Example

If the REL is set in the settings, this example will set it to empty for PDF files only.

add_filter('gdbbx_image_thumbnail_rel', 'custom__gdbbx_image_thumbnail_rel', 10, 3);
function custom__gdbbx_image_thumbnail_rel($rel, $obj, $ext) {
  if ($ext == 'pdf') {
    $rel = '';
  }

  return $rel;
}

 

0
0
343
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply