diff --git a/gp-templates/gptoolbox-header.php b/gp-templates/gptoolbox-header.php index cf1c961..1931cc5 100644 --- a/gp-templates/gptoolbox-header.php +++ b/gp-templates/gptoolbox-header.php @@ -9,10 +9,16 @@ namespace GP_Toolbox; -$defined_vars = get_defined_vars(); +$defined_vars = get_defined_vars(); +$template_args = is_array( $defined_vars['args'] ) ? $defined_vars['args'] : array(); -$page_title = $defined_vars['args']['title'] ?? ''; -$page_description = $defined_vars['args']['description'] ?? ''; +$template_args = wp_parse_args( + $template_args, + array( + 'title' => '', + 'description' => '', + ) +); $tools_pages = Toolbox::tools_pages(); @@ -21,7 +27,7 @@

@@ -58,7 +64,7 @@