_list_meta_row [ WordPress Function ]
_list_meta_row ( $entry, $count )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: list_meta, link_submit_meta_box, wp_list_comments, get_post_meta, link_target_meta_box
{@internal Missing Short Description}}
Source
<?php
function _list_meta_row( $entry, &$count ) {
static $update_nonce = false;
if ( is_protected_meta( $entry['meta_key'], 'post' ) )
return;
if ( !$update_nonce )
$update_nonce = wp_create_nonce( 'add-meta' );
$r = '';
++ $count;
if ( $count % 2 )
$style = 'alternate';
else
$style = '';
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'>";
$r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' />";
$r .= "\n\t\t<div class='submit'>";
$r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false, array( 'tabindex' => '6' ) );
$r .= "\n\t\t";
$r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false, array( 'tabindex' => '6' ) );
$r .= "</div>";
$r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
$r .= "</td>";
$r .= "\n\t\t<td><label class='screen-reader-text' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
return $r;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Docs for page template.php
If not supplied the global $post is used. _list_meta_row (line 440). since: 2.5.0. unknown _list_meta_row (unknown_type $entry, &$count, unknown_type $count ) ...
phpdoc.ftwr.co.uk - Docs for page template.php - WordPress.org
If not supplied the global $post is used. _list_meta_row (line 458). since: 2.5.0. unknown _list_meta_row (unknown_type $entry, &$count, unknown_type $count ) ...
phpdoc.wordpress.org - list_meta (WordPress Function) - WPSeek.com
Similar Functions: _list_meta_row, register_meta, has_meta, the_meta, delete_meta. {@internal Missing Short Description}} ...
wpseek.com - A HitchHackers guide through WordPress | Function, Filter & Action ...
... _image_get_preview_ratio · _insert_into_post_button · _ipad_meta · _list_meta_row · _maybe_update_core · _media_button · _media_states · _n · _nc · _nx ...
hitchhackerguide.com