sm:item:contentDisposition

sm:item:contentDisposition

Hook Type: filter

See hook in core

Displaying hooks found in version: wp-stateless.4.1.2

apply_filters('sm:item:contentDisposition') is found 3 times:

  • /lib/classes/class-sync-non-media.php line 159
                 */
                try {
                  $mediaOptions = array(
                    'cacheControl' => apply_filters('sm:item:cacheControl', ud_get_stateless_media()->get_default_cache_control(), $absolutePath),
                    'contentDisposition' => apply_filters('sm:item:contentDisposition', null, $absolutePath)
                  );
    
                  if ( !defined('WP_STATELESS_SKIP_ACL_SET') || !WP_STATELESS_SKIP_ACL_SET) {
                    $mediaOptions['predefinedAcl'] = 'publicRead';
                  }
    
    
  • /lib/classes/class-sync-non-media.php line 177
                  'name' => $name,
                  'force' => ($forced == 2),
                  'absolutePath' => $absolutePath,
                  'cacheControl' => apply_filters('sm:item:cacheControl', ud_get_stateless_media()->get_default_cache_control(), $absolutePath), //@todo use cacheControl from settings page.
                  'contentDisposition' => apply_filters('sm:item:contentDisposition', null, $absolutePath),
                  'mimeType' => $file_type,
                  'metadata' => array(
                    'child-of' => dirname($name),
                    'file-hash' => md5($name),
                    'source' => $args['source'] ?? '',
                    'sourceVersion' => $args['source_version'] ?? '',
    
  • /lib/classes/class-utility.php line 117
           * @return string
           */
          public static function getContentDisposition($attachment_id = null, $metadata = array(), $data = array()) {
            // return 'Content-Disposition: attachment; filename=some-file.sql';
            return apply_filters('sm:item:contentDisposition', null, array('attachment_id' => $attachment_id, 'mime_type' => get_post_mime_type($attachment_id), 'metadata' => $metadata, 'data' => $data));
          }
    
          /**
           * @param null $attachment_id
           * @param array $metadata
           * @param array $data