acf_admin_tools::html
html
description
Method of the class: acf_admin_tools{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_admin_tools = new acf_admin_tools(); $acf_admin_tools->html();
Changelog
| Since 5.6.3 | Introduced. |
acf_admin_tools::html() acf admin tools::html code ACF 6.0.4
function html() {
// vars
$screen = get_current_screen();
$active = acf_maybe_get_GET( 'tool' );
// view
$view = array(
'screen_id' => $screen->id,
'active' => $active,
);
// register metaboxes
foreach ( $this->get_tools() as $tool ) {
// check active
if ( $active && $active !== $tool->name ) {
continue;
}
// add metabox
add_meta_box( 'acf-admin-tool-' . $tool->name, acf_esc_html( $tool->title ), array( $this, 'metabox_html' ), $screen->id, 'normal', 'default', array( 'tool' => $tool->name ) );
}
// view
acf_get_view( 'html-admin-tools', $view );
}