🎨 - Typage strict et retour booléen ajouté à la fonction tree_get_topbar

This commit is contained in:
skycel 2025-02-05 01:12:15 +01:00
parent 7a7881fae0
commit ed86100a4b

View File

@ -8,7 +8,7 @@
* @param array $args Optional. Additional arguments to pass to the template.
* @return bool True if the template was found and loaded, false otherwise.
*/
function tree_get_topbar($name = null, $args = array()) {
function tree_get_topbar(string $name = null, array $args = array()): bool {
do_action("get_topbar", $name, $args);
@ -23,4 +23,5 @@ function tree_get_topbar($name = null, $args = array()) {
if ( ! locate_template( $templates, true, true, $args ) ) {
return false;
}
return true;
}