Function __global->import_menu_spreadsheet
Definitions
sources/menus2.php
- Import a spreadsheet file menu structure, after ERASING whole current menu structure.This function is intended for programmers, writing upgrade scripts for a custom site (dev>staging>live).Assumes spreadsheet was generated with export_menu_spreadsheet.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $file_path | ?PATH | No | No | Null | N/A | N/A | The path to the spreadsheet file (null: uploads/website_specific/cms_menu_items.<default file type>) |
| $filename | ?string | No | No | Null | N/A | N/A | The filename of the spreadsheet file (null: detect from $file_path) |
Preview
Code (PHP)
/**
* Import a spreadsheet file menu structure, after ERASING whole current menu structure.This function is intended for programmers, writing upgrade scripts for a custom site (dev>staging>live).Assumes spreadsheet was generated with export_menu_spreadsheet.
*
* @param ?PATH $file_path The path to the spreadsheet file (null: uploads/website_specific/cms_menu_items.<default file type>)
* @param ?string $filename The filename of the spreadsheet file (null: detect from $file_path)
*/
function import_menu_spreadsheet(?string $file_path = null, ?string $filename = null)
* Import a spreadsheet file menu structure, after ERASING whole current menu structure.This function is intended for programmers, writing upgrade scripts for a custom site (dev>staging>live).Assumes spreadsheet was generated with export_menu_spreadsheet.
*
* @param ?PATH $file_path The path to the spreadsheet file (null: uploads/website_specific/cms_menu_items.<default file type>)
* @param ?string $filename The filename of the spreadsheet file (null: detect from $file_path)
*/
function import_menu_spreadsheet(?string $file_path = null, ?string $filename = null)
