acf_admin_tools::metabox_html
Output the metabox HTML for specific tools
Метод класса: acf_admin_tools{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$acf_admin_tools = new acf_admin_tools(); $acf_admin_tools->metabox_html( $post, $metabox );
- $post(разное) (обязательный)
- The post this metabox is being displayed on, should be an empty string always for us on a tools page.
- $metabox(массив) (обязательный)
- An array of the metabox attributes.
Список изменений
| С версии 5.6.3 | Введена. |
Код acf_admin_tools::metabox_html() acf admin tools::metabox html ACF 6.4.2
public function metabox_html( $post, $metabox ) {
$tool = $this->get_tool( $metabox['args']['tool'] );
$form_attrs = array( 'method' => 'post' );
if ( $metabox['args']['tool'] === 'import' ) {
$form_attrs['onsubmit'] = 'acf.disableForm(event)';
}
printf( '<form %s>', acf_esc_attrs( $form_attrs ) );
$tool->html();
acf_nonce_input( $tool->name );
echo '</form>';
}