GC_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
最后更新于:2021-11-27 05:17:31
GC_Customize_Nav_Menu_Item_Setting::amend_customize_save_response( array$data)Export data for the JS client.
参数
- $data
-
(array) (Required) Additional information passed back to the ‘saved’ event on
gc.customize
.
响应
(array) Save response data.
源文件
文件: gc-includes/customize/class-gc-customize-nav-menu-item-setting.php
public function amend_customize_save_response( $data ) {
if ( ! isset( $data['nav_menu_item_updates'] ) ) {
$data['nav_menu_item_updates'] = array();
}
$data['nav_menu_item_updates'][] = array(
'post_id' => $this->post_id,
'previous_post_id' => $this->previous_post_id,
'error' => $this->update_error ? $this->update_error->get_error_code() : null,
'status' => $this->update_status,
);
return $data;
}