wp_stateless_add_media_args
wp_stateless_add_media_args
Appears in: wp-stateless.2.3.2, wp-stateless.3.0, wp-stateless.3.0.1, wp-stateless.3.0.2, wp-stateless.3.0.3, wp-stateless.3.0.4, wp-stateless.3.1.0, wp-stateless.3.1.1, wp-stateless.3.2.2, wp-stateless.3.2.4, wp-stateless.3.2.5, wp-stateless.3.3.0, wp-stateless.3.4.0, wp-stateless.3.4.1, wp-stateless.4.0.3, wp-stateless.4.0.4, wp-stateless.4.1.1, wp-stateless.4.1.2
Hook Type: filter
See hook in action
Displaying hooks found in version: wp-stateless.4.1.2apply_filters('wp_stateless_add_media_args') is found 3 times:
- /lib/classes/class-gs-client.php line 203
$object_id = isset($args['metadata']['object-id']) ? $args['metadata']['object-id'] : (isset($args['metadata']['child-of']) ? $args['metadata']['child-of'] : ""); $object_size = isset($args['metadata']['size']) ? $args['metadata']['size'] : ""; $args['name'] = apply_filters('wp_stateless_file_name', $args['name'], $args['use_root'], $object_id, $object_size); $args = apply_filters('wp_stateless_add_media_args', $args); $name = $args['name']; // If media exists we just return it if (!$args['force'] && $media = $this->media_exists($name)) { if ($media->getCacheControl() != $args['cacheControl']) { $media->setCacheControl($args['cacheControl']);
- /lib/classes/class-sync-non-media.php line 150
), 'is_webp' => '', )); $args = apply_filters('wp_stateless_add_media_args', $args); /** * Updating object metadata, ACL, CacheControl and contentDisposition * @return media object */ try {
- /lib/classes/class-utility.php line 317
'mimeType' => 'image/jpeg', 'metadata' => array(), 'is_webp' => '', )); $media_args = apply_filters('wp_stateless_add_media_args', $media_args); //Bucket $bucket = ud_get_stateless_media()->get('sm.bucket'); $bucket = $gs_client->bucket($bucket); $object = $bucket->object($media_args['name']);