_list_meta_row
函数
_list_meta_row ( $entry, $count )
- 参数
-
-
(array)
$entry- Required: 是
-
(int)
$count- Required: 是
-
(array)
- 返回值
-
- (string)
- 定义位置
-
-
wp-admin/includes/template.php
, line 616
-
wp-admin/includes/template.php
- 引入
- 2.5.0
- 弃用
- –
Outputs a single row of public meta data in the Custom Fields meta box.
function _list_meta_row( $entry, &$count ) { static $update_nonce = ''; if ( is_protected_meta( $entry['meta_key'], 'post' ) ) { return ''; } if ( ! $update_nonce ) { $update_nonce = wp_create_nonce( 'add-meta' ); } $r = ''; ++ $count; 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 . $entry['meta_id'] = (int) $entry['meta_id']; $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] ); $r .= "nt"; $r .= "ntt "; return $r; }"; $r .= "ntt '; $r .= "ntt"; $r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) ); $r .= "ntt"; $r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) ); $r .= ''; $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); $r .= 'nt
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。