type_url_form_image

Definition:
function type_url_form_image() {}

Defined filters

  • disable_captions
    apply_filters( 'disable_captions', '' )

Source code

function type_url_form_image() {

	if ( !apply_filters( 'disable_captions', '' ) ) {

		$caption = '

		<tr>

			<th valign="top" scope="row" class="label">

				<span class="alignleft"><label for="caption">' . __('Image Caption') . '</label></span>

			</th>

			<td class="field"><input id="caption" name="caption" value="" type="text" /></td>

		</tr>

';

	} else {

		$caption = '';

	}



	$default_align = get_option('image_default_align');

	if ( empty($default_align) )

		$default_align = 'none';



	return '

	<h4 class="media-sub-title">' . __('Insert an image from another web site') . '</h4>

	<table class="describe"><tbody>

		<tr>

			<th valign="top" scope="row" class="label" style="width:130px;">

				<span class="alignleft"><label for="src">' . __('Image URL') . '</label></span>

				<span class="alignright"><abbr id="status_img" title="required" class="required">*</abbr></span>

			</th>

			<td class="field"><input id="src" name="src" value="" type="text" aria-required="true" onblur="addExtImage.getImageData()" /></td>

		</tr>



		<tr>

			<th valign="top" scope="row" class="label">

				<span class="alignleft"><label for="title">' . __('Image Title') . '</label></span>

				<span class="alignright"><abbr title="required" class="required">*</abbr></span>

			</th>

			<td class="field"><input id="title" name="title" value="" type="text" aria-required="true" /></td>

		</tr>



		<tr>

			<th valign="top" scope="row" class="label">

				<span class="alignleft"><label for="alt">' . __('Alternate Text') . '</label></span>

			</th>

			<td class="field"><input id="alt" name="alt" value="" type="text" aria-required="true" />

			<p class="help">' . __('Alt text for the image, e.g. “The Mona Lisa”') . '</p></td>

		</tr>

		' . $caption . '

		<tr class="align">

			<th valign="top" scope="row" class="label"><p><label for="align">' . __('Alignment') . '</label></p></th>

			<td class="field">

				<input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />

				<label for="align-none" class="align image-align-none-label">' . __('None') . '</label>

				<input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />

				<label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>

				<input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />

				<label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>

				<input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />

				<label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>

			</td>

		</tr>



		<tr>

			<th valign="top" scope="row" class="label">

				<span class="alignleft"><label for="url">' . __('Link Image To:') . '</label></span>

			</th>

			<td class="field"><input id="url" name="url" value="" type="text" /><br />



			<button type="button" class="button" value="" onclick="document.forms[0].url.value=null">' . __('None') . '</button>

			<button type="button" class="button" value="" onclick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button>

			<p class="help">' . __('Enter a link URL or click above for presets.') . '</p></td>

		</tr>

	' . _insert_into_post_button('image') . '

	</tbody></table>

';



}

3121

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: