media_row_actions

过滤钩子
apply_filters( 'media_row_actions', $actions, $post, $this->detached )
参数
  • (string[]) $actions An array of action links for each attachment. Default 'Edit', 'Delete Permanently', 'View'.
    Required:
  • (WP_Post) $post WP_Post object for the current attachment.
    Required:
  • (bool) $detached Whether the list table contains media not attached to any posts. Default true.
    Required:
定义位置
相关勾子
tag_row_actionspage_row_actionsuser_row_actionscomment_row_actionsms_user_row_actions
相关方法
do_actionmedia_buttonswp_media_attach_actiondid_actionmedia_upload_audiodoing_action
引入
2.8.0
弃用
-

media_row_actions 是一个过滤器,它允许你添加或修改出现在媒体库中每个项目的行中的动作。

过滤媒体列表表中每个附件的行动链接。

return apply_filters( 'media_row_actions', $actions, $post, $this->detached );

常见问题

FAQs
查看更多 >