WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response
Export data for the JS client.
Метод класса: WP_Customize_Nav_Menu_Item_Setting{}
Хуков нет.
Возвращает
array. Save response data.
Использование
$WP_Customize_Nav_Menu_Item_Setting = new WP_Customize_Nav_Menu_Item_Setting(); $WP_Customize_Nav_Menu_Item_Setting->amend_customize_save_response( $data );
- $data(массив) (обязательный)
- Additional information passed back to the
'saved'event onwp.customize.
Заметки
| Смотрите: WP_Customize_Nav_Menu_Item_Setting::update() |
Список изменений
| С версии 4.3.0 | Введена. |
Код WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() WP Customize Nav Menu Item Setting::amend customize save response WP 7.1.3
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;
}