WordPress开发者和主题制作者的搜索引擎



wp_admin_bar_add_secondary_groups ›

Since3.3.0
已弃用n/a
wp_admin_bar_add_secondary_groups ( $wp_admin_bar )
参数:
  • (WP_Admin_Bar) $wp_admin_bar
    Required: Yes
定义在:
文档:

Add secondary menus.



源码

function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) {
	$wp_admin_bar->add_group(
		array(
			'id'   => 'top-secondary',
			'meta' => array(
				'class' => 'ab-top-secondary',
			),
		)
	);

	$wp_admin_bar->add_group(
		array(
			'parent' => 'wp-logo',
			'id'     => 'wp-logo-external',
			'meta'   => array(
				'class' => 'ab-sub-secondary',
			),
		)
	);
}