_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

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: