wp_privacy_generate_personal_data_export_group_html
函数
wp_privacy_generate_personal_data_export_group_html ( $group_data, $group_id = '', $groups_count = 1 )
- 参数
-
-
(array)
$group_data
{ The group data to render. @type string $group_label The user-facing heading for the group, e.g. ‘Comments’. @type array $items { An array of group items. @type array $group_item_data { An array of name-value pairs for the item. @type string $name The user-facing name of an item name-value pair, e.g. ‘IP Address’. @type string $value The user-facing value of an item data pair, e.g. ‘50.60.70.0’. } } }- Required: 是
-
(string)
$group_id
The group identifier.- Required: 否
- Default: (empty)
-
(int)
$groups_count
The number of all groups- Required: 否
- Default: 1
-
(array)
- 返回值
-
- (string) The HTML for this group and its items.
- 定义位置
-
-
wp-admin/includes/privacy-tools.php
, line 252
-
wp-admin/includes/privacy-tools.php
- 引入
- 4.9.6
- 弃用
- –
Generate a single group for the personal data export report.
function wp_privacy_generate_personal_data_export_group_html( $group_data, $group_id = '', $groups_count = 1 ) { $group_id_attr = sanitize_title_with_dashes( $group_data['group_label'] . '-' . $group_id ); $group_html = ''; $group_html .= esc_html( $group_data['group_label'] ); $items_count = count( (array) $group_data['items'] ); if ( $items_count > 1 ) { $group_html .= sprintf( ' (%d)', $items_count ); } $group_html .= '
'; if ( ! empty( $group_data['group_description'] ) ) { $group_html .= '' . esc_html( $group_data['group_description'] ) . '
'; } $group_html .= ''; foreach ( (array) $group_data['items'] as $group_item_id => $group_item_data ) { $group_html .= ''; return $group_html; }'; $group_html .= ''; foreach ( (array) $group_item_data as $group_item_datum ) { $value = $group_item_datum['value']; // If it looks like a link, make it a link. if ( false === strpos( $value, ' ' ) && ( 0 === strpos( $value, 'http://' ) || 0 === strpos( $value, 'https://' ) ) ) { $value = '' . esc_html( $value ) . ''; } $group_html .= '
'; } if ( $groups_count > 1 ) { $group_html .= ''; $group_html .= ' '; } $group_html .= ''; $group_html .= '' . esc_html( $group_item_datum['name'] ) . ' '; $group_html .= '' . wp_kses( $value, 'personal_data_export' ) . ' '; $group_html .= ''; $group_html .= ''; } $group_html .= ' ' . esc_html__( 'Go to top' ) . ''; $group_html .= '
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。