list_meta

The timeline below displays how wordpress function list_meta has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Outputs a post's public meta data in the Custom Fields meta box.
 *
 * @since 1.2.0
 *
 * @param array[] $meta An array of meta data arrays keyed on 'meta_key' and 'meta_value'.
 */
function list_meta($meta)
{
    // Exit if no meta.
    if (!$meta) {
        echo '
<table id="list-table" style="display: none;">
	<thead>
	<tr>
		<th class="left">' . _x('Name', 'meta name') . '</th>
		<th>' . __('Value') . '</th>
	</tr>
	</thead>
	<tbody id="the-list" data-wp-lists="list:meta">
	<tr><td></td></tr>
	</tbody>
</table>';
        // TBODY needed for list-manipulation JS.
        return;
    }
    $count = 0;
    ?>
<table id="list-table">
	<thead>
	<tr>
		<th class="left"><?php 
    _ex('Name', 'meta name');
    ?></th>
		<th><?php 
    _e('Value');
    ?></th>
	</tr>
	</thead>
	<tbody id='the-list' data-wp-lists='list:meta'>
	<?php 
    foreach ($meta as $entry) {
        echo _list_meta_row($entry, $count);
    }
    ?>
	</tbody>
</table>
	<?php 
}

WordPress Version: 5.4

/**
 * Outputs a post's public meta data in the Custom Fields meta box.
 *
 * @since 1.2.0
 *
 * @param array $meta
 */
function list_meta($meta)
{
    // Exit if no meta.
    if (!$meta) {
        echo '
<table id="list-table" style="display: none;">
	<thead>
	<tr>
		<th class="left">' . _x('Name', 'meta name') . '</th>
		<th>' . __('Value') . '</th>
	</tr>
	</thead>
	<tbody id="the-list" data-wp-lists="list:meta">
	<tr><td></td></tr>
	</tbody>
</table>';
        // TBODY needed for list-manipulation JS.
        return;
    }
    $count = 0;
    ?>
<table id="list-table">
	<thead>
	<tr>
		<th class="left"><?php 
    _ex('Name', 'meta name');
    ?></th>
		<th><?php 
    _e('Value');
    ?></th>
	</tr>
	</thead>
	<tbody id='the-list' data-wp-lists='list:meta'>
	<?php 
    foreach ($meta as $entry) {
        echo _list_meta_row($entry, $count);
    }
    ?>
	</tbody>
</table>
	<?php 
}

WordPress Version: 5.1

/**
 * Outputs a post's public meta data in the Custom Fields meta box.
 *
 * @since 1.2.0
 *
 * @param array $meta
 */
function list_meta($meta)
{
    // Exit if no meta
    if (!$meta) {
        echo '
<table id="list-table" style="display: none;">
	<thead>
	<tr>
		<th class="left">' . _x('Name', 'meta name') . '</th>
		<th>' . __('Value') . '</th>
	</tr>
	</thead>
	<tbody id="the-list" data-wp-lists="list:meta">
	<tr><td></td></tr>
	</tbody>
</table>';
        //TBODY needed for list-manipulation JS
        return;
    }
    $count = 0;
    ?>
<table id="list-table">
	<thead>
	<tr>
		<th class="left"><?php 
    _ex('Name', 'meta name');
    ?></th>
		<th><?php 
    _e('Value');
    ?></th>
	</tr>
	</thead>
	<tbody id='the-list' data-wp-lists='list:meta'>
	<?php 
    foreach ($meta as $entry) {
        echo _list_meta_row($entry, $count);
    }
    ?>
	</tbody>
</table>
	<?php 
}

WordPress Version: 4.4

/**
 * Outputs a post's public meta data in the Custom Fields meta box.
 *
 * @since 1.2.0
 *
 * @param array $meta
 */
function list_meta($meta)
{
    // Exit if no meta
    if (!$meta) {
        echo '
<table id="list-table" style="display: none;">
	<thead>
	<tr>
		<th class="left">' . _x('Name', 'meta name') . '</th>
		<th>' . __('Value') . '</th>
	</tr>
	</thead>
	<tbody id="the-list" data-wp-lists="list:meta">
	<tr><td></td></tr>
	</tbody>
</table>';
        //TBODY needed for list-manipulation JS
        return;
    }
    $count = 0;
    ?>
<table id="list-table">
	<thead>
	<tr>
		<th class="left"><?php 
    _ex('Name', 'meta name');
    ?></th>
		<th><?php 
    _e('Value');
    ?></th>
	</tr>
	</thead>
	<tbody id='the-list' data-wp-lists='list:meta'>
<?php 
    foreach ($meta as $entry) {
        echo _list_meta_row($entry, $count);
    }
    ?>
	</tbody>
</table>
<?php 
}

WordPress Version: 4.1

/**
 * {@internal Missing Short Description}}
 *
 * @since 1.2.0
 *
 * @param array $meta
 */
function list_meta($meta)
{
    // Exit if no meta
    if (!$meta) {
        echo '
<table id="list-table" style="display: none;">
	<thead>
	<tr>
		<th class="left">' . _x('Name', 'meta name') . '</th>
		<th>' . __('Value') . '</th>
	</tr>
	</thead>
	<tbody id="the-list" data-wp-lists="list:meta">
	<tr><td></td></tr>
	</tbody>
</table>';
        //TBODY needed for list-manipulation JS
        return;
    }
    $count = 0;
    ?>
<table id="list-table">
	<thead>
	<tr>
		<th class="left"><?php 
    _ex('Name', 'meta name');
    ?></th>
		<th><?php 
    _e('Value');
    ?></th>
	</tr>
	</thead>
	<tbody id='the-list' data-wp-lists='list:meta'>
<?php 
    foreach ($meta as $entry) {
        echo _list_meta_row($entry, $count);
    }
    ?>
	</tbody>
</table>
<?php 
}

WordPress Version: 3.7

/**
 * {@internal Missing Short Description}}
 *
 * @since 1.2.0
 *
 * @param unknown_type $meta
 */
function list_meta($meta)
{
    // Exit if no meta
    if (!$meta) {
        echo '
<table id="list-table" style="display: none;">
	<thead>
	<tr>
		<th class="left">' . _x('Name', 'meta name') . '</th>
		<th>' . __('Value') . '</th>
	</tr>
	</thead>
	<tbody id="the-list" data-wp-lists="list:meta">
	<tr><td></td></tr>
	</tbody>
</table>';
        //TBODY needed for list-manipulation JS
        return;
    }
    $count = 0;
    ?>
<table id="list-table">
	<thead>
	<tr>
		<th class="left"><?php 
    _ex('Name', 'meta name');
    ?></th>
		<th><?php 
    _e('Value');
    ?></th>
	</tr>
	</thead>
	<tbody id='the-list' data-wp-lists='list:meta'>
<?php 
    foreach ($meta as $entry) {
        echo _list_meta_row($entry, $count);
    }
    ?>
	</tbody>
</table>
<?php 
}