Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:public:functions-nav

This is an old revision of the document!


public/themes/blog/functions-nav.php

Source: public/themes/blog/functions-nav.php · 227 lines, ~1175 statements · namespace: (global) · `declare(strict_types=1)`: no


Blog Theme Navigation Helpers

Navigation and menu helpers for the Bootstrap Blog theme. Extracted from the monolithic functions.php (Phase 5 remediation). All functions use function_exists() guards to avoid redeclaration errors.

Functions (6)

^ Function ^ Line ^ Params ^ Returns ^ Summary ^
| ''request_path'' | 20 | 0 |  | request_path() - Get request path object |
| ''build_menu_tree'' | 40 | 3 | ''array'' | build_menu_tree() - Build a recursive MenuViewModel tree from raw menu rows. |
| ''render_menu_tree'' | 72 | 1 | ''string'' | render_menu_tree() - Render a MenuViewModel tree to HTML. |
| ''front_navigation'' | 104 | 2 |  | front_navigation() - Render navigation menu from a MenuViewModel tree. |
| ''convert_menu_link'' | 136 | 2 | ''string'' | convert_menu_link() - Convert menu link between URL formats |
| ''retrieve_site_url'' | 221 | 0 |  | retrieve_site_url() - Get site URL from config |

request_path()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function request_path()

request_path() - Get request path object

build_menu_tree()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function build_menu_tree(array $items, array $parents, int $rootId = 0): array

build_menu_tree() - Build a recursive MenuViewModel tree from raw menu rows.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$items'' | ''array'' | //required// |  |
| ''$parents'' | ''array'' | //required// |  |
| ''$rootId'' | ''int'' | ''0'' | Parent id whose children form the tree root |

render_menu_tree()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function render_menu_tree(array $nodes): string

render_menu_tree() - Render a MenuViewModel tree to HTML.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$nodes'' | ''array'' | //required// |  |

front_navigation()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function front_navigation($parent, $menu)

front_navigation() - Render navigation menu from a MenuViewModel tree.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$parent'' | ''(untyped)'' | //required// | Root menu parent id (usually 0) |
| ''$menu'' | ''(untyped)'' | //required// |  |

convert_menu_link()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function convert_menu_link(string $link, bool $permalinkEnabled): string

convert_menu_link() - Convert menu link between URL formats

^ Parameter ^ Type ^ Default ^ Description ^
| ''$link'' | ''string'' | //required// |  |
| ''$permalinkEnabled'' | ''bool'' | //required// |  |

retrieve_site_url()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function retrieve_site_url()

retrieve_site_url() - Get site URL from config


Generated by 'tools/gendoc'.

scriptlog/public/functions-nav.1790413764.txt.gz · Last modified: by admin