link_target_meta_box

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

WordPress Version: 6.2

/**
 * Displays form fields for changing link target.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_target_meta_box($link)
{
    ?>
<fieldset><legend class="screen-reader-text"><span>
	<?php 
    /* translators: Hidden accessibility text. */
    _e('Target');
    ?>
</span></legend>
<p><label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php 
    echo (isset($link->link_target) && '_blank' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_blank</code> &mdash; new window or tab.');
    ?></label></p>
<p><label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php 
    echo (isset($link->link_target) && '_top' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_top</code> &mdash; current window or tab, with no frames.');
    ?></label></p>
<p><label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php 
    echo (isset($link->link_target) && '' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_none</code> &mdash; same window or tab.');
    ?></label></p>
</fieldset>
<p><?php 
    _e('Choose the target frame for your link.');
    ?></p>
	<?php 
}

WordPress Version: 6.1

/**
 * Displays form fields for changing link target.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_target_meta_box($link)
{
    ?>
<fieldset><legend class="screen-reader-text"><span><?php 
    _e('Target');
    ?></span></legend>
<p><label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php 
    echo (isset($link->link_target) && '_blank' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_blank</code> &mdash; new window or tab.');
    ?></label></p>
<p><label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php 
    echo (isset($link->link_target) && '_top' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_top</code> &mdash; current window or tab, with no frames.');
    ?></label></p>
<p><label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php 
    echo (isset($link->link_target) && '' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_none</code> &mdash; same window or tab.');
    ?></label></p>
</fieldset>
<p><?php 
    _e('Choose the target frame for your link.');
    ?></p>
	<?php 
}

WordPress Version: 5.4

/**
 * Display form fields for changing link target.
 *
 * @since 2.6.0
 *
 * @param object $link
 */
function link_target_meta_box($link)
{
    ?>
<fieldset><legend class="screen-reader-text"><span><?php 
    _e('Target');
    ?></span></legend>
<p><label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php 
    echo (isset($link->link_target) && '_blank' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_blank</code> &mdash; new window or tab.');
    ?></label></p>
<p><label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php 
    echo (isset($link->link_target) && '_top' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_top</code> &mdash; current window or tab, with no frames.');
    ?></label></p>
<p><label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php 
    echo (isset($link->link_target) && '' === $link->link_target) ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_none</code> &mdash; same window or tab.');
    ?></label></p>
</fieldset>
<p><?php 
    _e('Choose the target frame for your link.');
    ?></p>
	<?php 
}

WordPress Version: 5.1

/**
 * Display form fields for changing link target.
 *
 * @since 2.6.0
 *
 * @param object $link
 */
function link_target_meta_box($link)
{
    ?>
<fieldset><legend class="screen-reader-text"><span><?php 
    _e('Target');
    ?></span></legend>
<p><label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php 
    echo (isset($link->link_target) && $link->link_target == '_blank') ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_blank</code> &mdash; new window or tab.');
    ?></label></p>
<p><label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php 
    echo (isset($link->link_target) && $link->link_target == '_top') ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_top</code> &mdash; current window or tab, with no frames.');
    ?></label></p>
<p><label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php 
    echo (isset($link->link_target) && $link->link_target == '') ? 'checked="checked"' : '';
    ?> />
	<?php 
    _e('<code>_none</code> &mdash; same window or tab.');
    ?></label></p>
</fieldset>
<p><?php 
    _e('Choose the target frame for your link.');
    ?></p>
	<?php 
}

WordPress Version: 3.7

/**
 * Display form fields for changing link target.
 *
 * @since 2.6.0
 *
 * @param object $link
 */
function link_target_meta_box($link)
{
    ?>
<fieldset><legend class="screen-reader-text"><span><?php 
    _e('Target');
    ?></span></legend>
<p><label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php 
    echo (isset($link->link_target) && $link->link_target == '_blank') ? 'checked="checked"' : '';
    ?> />
<?php 
    _e('<code>_blank</code> &mdash; new window or tab.');
    ?></label></p>
<p><label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php 
    echo (isset($link->link_target) && $link->link_target == '_top') ? 'checked="checked"' : '';
    ?> />
<?php 
    _e('<code>_top</code> &mdash; current window or tab, with no frames.');
    ?></label></p>
<p><label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php 
    echo (isset($link->link_target) && $link->link_target == '') ? 'checked="checked"' : '';
    ?> />
<?php 
    _e('<code>_none</code> &mdash; same window or tab.');
    ?></label></p>
</fieldset>
<p><?php 
    _e('Choose the target frame for your link.');
    ?></p>
<?php 
}