Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!


媒体 → 媒体库

媒体文件包括您上传的图像、视频、录音,以及数据文件。用户通常在撰写文章时上传媒体文件,并将其插入文章内容。您可在设置 媒体页面中的“上传设置”区域指定路径和目录结构。若您仅需要上传,而不希望插入文章,您就需要使用媒体 添加多媒体文件页面。




Media Library

Table of Media

A table lists all of your Media, by row. The Media are listed with the newest uploaded Media first.

The table of Media contains the following columns:

  • [ ] – This checkbox, when clicked (checked), 'selects' that particular Media to be processed by a Bulk Action.
  • "media type" - There is no column heading for "media type", but a thumbnail of the actual image or a thumbnail representing the Media Type (audio, video, test, PDF, Doc) is displayed in this column
  • Media - Media is the actual name of the file that holds this particular Media.
  • Description - The description of the Media you assigned at the time of upload.
  • Attached to - Attached to describes the post or Page and the date of that post or Page. Click on the title of the post or Page to view that post or Page in an edit Screen. If unattached, an "Attach" link will appear and when clicked this Media can be attached to selected posts or Pages.
  • Date - The date the Media was uploaded.

If there are more than 10 objects in the Media Library, at the top and bottom right of the Table of Media, Media to Next (or Previous), and to pages numbers, allow you to navigate to other pages of Media Library entries.

Screen Options

The Screen Options allow you to choose which columns are displayed, or not displayed, in the underlying Table. Clicking on the Screen Options tab shows a list of the columns with a check-box next to each column. Check the box for each column you want displayed in the Table, or uncheck the box to not display that column. In addition, the number of Media items to display in the Table of Media can be set. Click the Screen Options tab again to close the Screen Options.


Above the Table, to the right, is a search box where you can enter a word, or series of words, and click the "Search Media" button to search and display all the Media meeting your search words.

Filtering Options

At the top of this Screen are links such as All, Images, and Movies, that when clicked will cause just the Media of that type to be displayed in the underlying Table.

Below that, and to the right of the Bulk Actions Apply button, is another filter option:

Show all Dates
This dropdown allows you to select, by date, which Media are displayed in the Table of Media. By default, "Show all dates" is selected and all of your Media are displayed.
Clicking this button applies the settings you select in the dropdown.

Using Selection, Actions, and Apply


This Screen allows Bulk Actions to be performed on one or more Media selected in the Table. For Bulk Actions to be performed on multiple Media at once, those Media must be first selected via one of these methods:
  • Select one Media at a time - To select a Media, the checkbox to the left of the Media entry must be checked (clicked). It is possible to keep selecting more Media by checking their respective checkbox.
  • Select all Media in given Table - All Media in a given table can be selected by checking the checkbox in the Table's title, or footer bar. Of course, unchecking the header or footer title bar checkbox will cause all entries in that Table to be unchecked (NOT selected).
  • Reverse Selection - A Reverse Selection means checked items become unchecked, and unchecked items become checked. A Reverse Selection is accomplished by holding the Shift key on the keyboard and clicking the header or footer title bar checkbox.


Actions describe the process to be performed on particular Media. There are two styles of Actions that will be referred to as Bulk Actions and Immediate Actions. The follow describes these Actions:
  • Bulk Actions - These Actions can be performed on one, or more Media, at one time, if those Media have been previously selected. Bulk Actions are available, when appropriate, as choices in the Bulk Actions pulldown box, above the Table. The only Bulk Action allowed is Delete.
  • Immediate Actions - Immediate Actions are performed immediately, on an individual Media. Hovering the mouse cursor over the Media row reveals the Edit, Delete, and View options under the Name column, in that Media row. Clicking on a Media Name will also initiate the Edit Action.
The available Actions are described below:
  • Edit - This Immediate Action displays the Edit Media Screen. This Action can be initiated by click on the Media Name or clicking on the Edit option just below the Media Name. See the Edit Media section for details on editing Media information.
  • Delete Permanently - This Action deletes the Media. Delete is available both as a Bulk Action, and an Immediate Action.
  • View - This Action presents the Media in a simulated view of how the image would look when displayed in your Theme. View is available only as an Immediate Action.
  • Attach (if unattached) - Click this link in the "Attached to" column (or the "Media" column when Unattached view) to attach the media to a post/Page. If clicked, the Find Posts or Pages dialogue box will appear:
    1. Search posts or Pages by keyword.
    2. Select the post/Page one wants to attach the media.
    3. Click the Select button.


After one or more Media are selected, and after a Bulk Action is specified, the Apply button performs the given Action on the selected Media.
  • Apply - Click the Apply button to execute the Bulk Action, specified in the Actions pulldown, on the selected Media. Remember, prior to executing Actions, one or more Media must be selected, as described before.

Edit Media

This mode is essentially the same as the Media Add New Screen so see the Edit Media section of that article for more information. The only difference is that the buttons to save your work are called "Save Changes" instead of "Save All Changes".


本文已被标记为未完成状态。您可以将其补充或翻译完整,以此帮助完善 Codex。