钩子文档

get_media_item_args

💡 云策文档标注

概述

本文档介绍了 WordPress 中的 get_media_item_args 过滤器,它用于在编辑图像表单中过滤检索图像时使用的参数数组。该过滤器允许开发者自定义参数以调整图像检索行为。

关键要点

  • get_media_item_args 是一个过滤器,应用于检索图像时使用的参数数组。
  • 它主要用于编辑图像表单,允许修改 $parsed_args 参数。
  • 该过滤器自 WordPress 3.1.0 版本引入,相关函数包括 get_media_item() 和 get_compat_media_markup()。

📄 原文内容

Filters the arguments used to retrieve an image for the edit image form.

Description

See also

  • get_media_item

Parameters

$parsed_argsarray
An array of arguments.

Source

$parsed_args = apply_filters( 'get_media_item_args', $parsed_args );

Changelog

Version Description
3.1.0 Introduced.