link_advanced_meta_box

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

WordPress Version: 6.4

/**
 * Displays advanced link options form fields.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_advanced_meta_box($link)
{
    ?>
<table class="links-table" cellpadding="0">
	<tr>
		<th scope="row"><label for="link_image"><?php 
    _e('Image Address');
    ?></label></th>
		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php 
    echo isset($link->link_image) ? esc_attr($link->link_image) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="rss_uri"><?php 
    _e('RSS Address');
    ?></label></th>
		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php 
    echo isset($link->link_rss) ? esc_attr($link->link_rss) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_notes"><?php 
    _e('Notes');
    ?></label></th>
		<td><textarea name="link_notes" id="link_notes" rows="10"><?php 
    echo isset($link->link_notes) ? $link->link_notes : '';
    // textarea_escaped 
    ?></textarea></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_rating"><?php 
    _e('Rating');
    ?></label></th>
		<td><select name="link_rating" id="link_rating" size="1">
		<?php 
    for ($rating = 0; $rating <= 10; $rating++) {
        echo '<option value="' . $rating . '"';
        if (isset($link->link_rating) && $link->link_rating === $rating) {
            echo ' selected="selected"';
        }
        echo '>' . $rating . '</option>';
    }
    ?>
		</select>&nbsp;<?php 
    _e('(Leave at 0 for no rating.)');
    ?>
		</td>
	</tr>
</table>
	<?php 
}

WordPress Version: 6.1

/**
 * Displays advanced link options form fields.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_advanced_meta_box($link)
{
    ?>
<table class="links-table" cellpadding="0">
	<tr>
		<th scope="row"><label for="link_image"><?php 
    _e('Image Address');
    ?></label></th>
		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php 
    echo isset($link->link_image) ? esc_attr($link->link_image) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="rss_uri"><?php 
    _e('RSS Address');
    ?></label></th>
		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php 
    echo isset($link->link_rss) ? esc_attr($link->link_rss) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_notes"><?php 
    _e('Notes');
    ?></label></th>
		<td><textarea name="link_notes" id="link_notes" rows="10"><?php 
    echo isset($link->link_notes) ? $link->link_notes : '';
    // textarea_escaped 
    ?></textarea></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_rating"><?php 
    _e('Rating');
    ?></label></th>
		<td><select name="link_rating" id="link_rating" size="1">
		<?php 
    for ($rating = 0; $rating <= 10; $rating++) {
        echo '<option value="' . $rating . '"';
        if (isset($link->link_rating) && $link->link_rating == $rating) {
            echo ' selected="selected"';
        }
        echo '>' . $rating . '</option>';
    }
    ?>
		</select>&nbsp;<?php 
    _e('(Leave at 0 for no rating.)');
    ?>
		</td>
	</tr>
</table>
	<?php 
}

WordPress Version: 5.3

/**
 * Display advanced link options form fields.
 *
 * @since 2.6.0
 *
 * @param object $link
 */
function link_advanced_meta_box($link)
{
    ?>
<table class="links-table" cellpadding="0">
	<tr>
		<th scope="row"><label for="link_image"><?php 
    _e('Image Address');
    ?></label></th>
		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php 
    echo isset($link->link_image) ? esc_attr($link->link_image) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="rss_uri"><?php 
    _e('RSS Address');
    ?></label></th>
		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php 
    echo isset($link->link_rss) ? esc_attr($link->link_rss) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_notes"><?php 
    _e('Notes');
    ?></label></th>
		<td><textarea name="link_notes" id="link_notes" rows="10"><?php 
    echo isset($link->link_notes) ? $link->link_notes : '';
    // textarea_escaped 
    ?></textarea></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_rating"><?php 
    _e('Rating');
    ?></label></th>
		<td><select name="link_rating" id="link_rating" size="1">
		<?php 
    for ($parsed_args = 0; $parsed_args <= 10; $parsed_args++) {
        echo '<option value="' . $parsed_args . '"';
        if (isset($link->link_rating) && $link->link_rating == $parsed_args) {
            echo ' selected="selected"';
        }
        echo '>' . $parsed_args . '</option>';
    }
    ?>
		</select>&nbsp;<?php 
    _e('(Leave at 0 for no rating.)');
    ?>
		</td>
	</tr>
</table>
	<?php 
}

WordPress Version: 5.1

/**
 * Display advanced link options form fields.
 *
 * @since 2.6.0
 *
 * @param object $link
 */
function link_advanced_meta_box($link)
{
    ?>
<table class="links-table" cellpadding="0">
	<tr>
		<th scope="row"><label for="link_image"><?php 
    _e('Image Address');
    ?></label></th>
		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php 
    echo isset($link->link_image) ? esc_attr($link->link_image) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="rss_uri"><?php 
    _e('RSS Address');
    ?></label></th>
		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php 
    echo isset($link->link_rss) ? esc_attr($link->link_rss) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_notes"><?php 
    _e('Notes');
    ?></label></th>
		<td><textarea name="link_notes" id="link_notes" rows="10"><?php 
    echo isset($link->link_notes) ? $link->link_notes : '';
    // textarea_escaped 
    ?></textarea></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_rating"><?php 
    _e('Rating');
    ?></label></th>
		<td><select name="link_rating" id="link_rating" size="1">
		<?php 
    for ($r = 0; $r <= 10; $r++) {
        echo '<option value="' . $r . '"';
        if (isset($link->link_rating) && $link->link_rating == $r) {
            echo ' selected="selected"';
        }
        echo '>' . $r . '</option>';
    }
    ?>
		</select>&nbsp;<?php 
    _e('(Leave at 0 for no rating.)');
    ?>
		</td>
	</tr>
</table>
	<?php 
}

WordPress Version: 3.7

/**
 * Display advanced link options form fields.
 *
 * @since 2.6.0
 *
 * @param object $link
 */
function link_advanced_meta_box($link)
{
    ?>
<table class="links-table" cellpadding="0">
	<tr>
		<th scope="row"><label for="link_image"><?php 
    _e('Image Address');
    ?></label></th>
		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php 
    echo isset($link->link_image) ? esc_attr($link->link_image) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="rss_uri"><?php 
    _e('RSS Address');
    ?></label></th>
		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php 
    echo isset($link->link_rss) ? esc_attr($link->link_rss) : '';
    ?>" /></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_notes"><?php 
    _e('Notes');
    ?></label></th>
		<td><textarea name="link_notes" id="link_notes" rows="10"><?php 
    echo isset($link->link_notes) ? $link->link_notes : '';
    // textarea_escaped 
    ?></textarea></td>
	</tr>
	<tr>
		<th scope="row"><label for="link_rating"><?php 
    _e('Rating');
    ?></label></th>
		<td><select name="link_rating" id="link_rating" size="1">
		<?php 
    for ($r = 0; $r <= 10; $r++) {
        echo '<option value="' . $r . '"';
        if (isset($link->link_rating) && $link->link_rating == $r) {
            echo ' selected="selected"';
        }
        echo '>' . $r . '</option>';
    }
    ?></select>&nbsp;<?php 
    _e('(Leave at 0 for no rating.)');
    ?>
		</td>
	</tr>
</table>
<?php 
}