_media_button

Definition:
function _media_button($title, $icon, $type) {}

Parameters

  • $title
  • $icon
  • $type
  • $id

Source code

function _media_button($title, $icon, $type) {

	return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>";

}

4339

_maybe_update_core

Definition:
function _maybe_update_core() {}

Source code

function _maybe_update_core() {

	include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version



	$current = get_site_transient( 'update_core' );



	if ( isset( $current->last_checked ) &&

		43200 > ( time() - $current->last_checked ) &&

		isset( $current->version_checked ) &&

		$current->version_checked == $wp_version )

		return;



	wp_version_check();

}

4337

_list_meta_row

Definition:
function _list_meta_row( $entry, &$count ) {}

Parameters

  • unknown_type $entry
  • unknown_type $count
  • &$count

Source code

function _list_meta_row( $entry, &$count ) {

	static $update_nonce = false;



	if ( is_protected_meta( $entry['meta_key'] ) )

		return;



	if ( !$update_nonce )

		$update_nonce = wp_create_nonce( 'add-meta' );



	$r = '';

	++ $count;

	if ( $count % 2 )

		$style = 'alternate';

	else

		$style = '';

	if ('_' == $entry['meta_key'] { 0 } )

		$style .= ' hidden';



	if ( is_serialized( $entry['meta_value'] ) ) {

		if ( is_serialized_string( $entry['meta_value'] ) ) {

			// this is a serialized string, so we should display it

			$entry['meta_value'] = maybe_unserialize( $entry['meta_value'] );

		} else {

			// this is a serialized array/object so we should NOT display it

			--$count;

			return;

		}

	}



	$entry['meta_key'] = esc_attr($entry['meta_key']);

	$entry['meta_value'] = esc_textarea( $entry['meta_value'] ); // using a <textarea />

	$entry['meta_id'] = (int) $entry['meta_id'];



	$delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] );



	$r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";

4335

_insert_into_post_button

Definition:
function _insert_into_post_button($type) {}

Parameters

  • $type

Source code

function _insert_into_post_button($type) {

	if ( !post_type_supports(get_post_type($_GET['post_id']), 'editor') )

		return '';



	if ( 'image' == $type )

	return '

		<tr>

			<td></td>

			<td>

				<input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />

			</td>

		</tr>

	';



	return '

		<tr>

			<td></td>

			<td>

				' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . '

			</td>

		</tr>

	';

}

4333

_image_get_preview_ratio

Definition:
function _image_get_preview_ratio($w, $h) {}

Parameters

  • $w
  • $h

Source code

function _image_get_preview_ratio($w, $h) {

	$max = max($w, $h);

	return $max > 400 ? (400 / $max) : 1;

}

4331