/home/runcloud/webapps/app-highfield/web/app/themes/highfield/resources/functions/menu-functions.php
*/
function get_nav_menu_items_by_location( $location, $args = [] ) {
// Get all locations
$locations = get_nav_menu_locations();
// Get object id by location
$object = wp_get_nav_menu_object( $locations[$location] );
// Get menu items by menu name
$menu_items = wp_get_nav_menu_items( $object->name, $args );
$the_menu_items;
foreach($menu_items as $item) {
$item->children = [];
$item->path = parse_url($item->url, PHP_URL_PATH);
if($item->menu_item_parent) {
$the_menu_items[$item->menu_item_parent]->children[] = $item;
} else {
$the_menu_items[$item->ID] = $item;
}
}
// Return menu post objects
return array_values($the_menu_items);
}
Arguments
"array_values(): Argument #1 ($array) must be of type array, null given"
/home/runcloud/webapps/app-highfield/web/app/themes/highfield/resources/functions/menu-functions.php
*/
function get_nav_menu_items_by_location( $location, $args = [] ) {
// Get all locations
$locations = get_nav_menu_locations();
// Get object id by location
$object = wp_get_nav_menu_object( $locations[$location] );
// Get menu items by menu name
$menu_items = wp_get_nav_menu_items( $object->name, $args );
$the_menu_items;
foreach($menu_items as $item) {
$item->children = [];
$item->path = parse_url($item->url, PHP_URL_PATH);
if($item->menu_item_parent) {
$the_menu_items[$item->menu_item_parent]->children[] = $item;
} else {
$the_menu_items[$item->ID] = $item;
}
}
// Return menu post objects
return array_values($the_menu_items);
}
/home/runcloud/webapps/app-highfield/web/app/themes/highfield/resources/controllers/AppController.php
}
public function displayHeaderToolbar() {
echo view( 'app/header-toolbar', ['items' => get_nav_menu_items_by_location('header-toolbar')] );
}
public function displayHeaderToolbarMobile() {
echo view( 'app/header-toolbar_mobile', ['items' => get_nav_menu_items_by_location('header-toolbar')] );
}
public function displayFooterQuickLinks() {
echo view( 'app/footer-quick-links', ['items' => get_nav_menu_items_by_location('quick-links')] );
}
public function displayFooterMenu() {
echo view( 'app/footer-menu', ['items' => get_nav_menu_items_by_location('footer-menu')] );
}
public function displayMainMenu() {
echo view( 'app/main-menu', ['items' => get_nav_menu_items_by_location('main-menu')] );
}
public function displayMobileMenu() {
echo view( 'app/main-menu_mobile', ['items' => get_nav_menu_items_by_location('main-menu')] );
}
public static function renderBlock($block, $inner_blocks) {
echo view('blocks.' . $block['name'], compact('block', 'inner_blocks'));
}
}
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/class-wp-hook.php
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/class-wp-hook.php
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/plugin.php
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_actions Stores the number of times each action was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
/home/runcloud/webapps/app-highfield/web/app/themes/highfield/header.php
<a href="https://highbrook.parents.isamshosting.cloud/#/" target="_blank">
Parent Portal
<i class="fak fa-hb-parent"></i>
</a>
</div>
<div>
<!-- Search -->
<a href="/?s="><i class="fak fa-hb-search"></i></a>
</div>
<div class="js_open-menu">
<span class="show-for-xlarge">Close</span>
<i class="fak fa-hb-close"></i>
</div>
</div>
<div class="menu cell small-12 ">
<div class="grid-x width-100 show-for-medium">
<?php do_action( "app_main_menu" ); ?>
</div>
<div class="width-100 hide-for-medium">
<?php do_action( "app_main_menu_mobile" ); ?>
</div>
</div>
<div class="social cell small-12">
<?php
if ( have_rows( "footer_social", "option" ) ) :
while ( have_rows( "footer_social", "option" ) ) :
the_row();
$Link = get_sub_field( "link" ); ?>
<div class="social__icon">
<a href="<?= $Link[ "url" ]; ?>" target="<?= $Link[ "target" ]; ?>"><img src="<?= the_sub_field( "logo" ); ?>"></a>
</div>
<?php
endwhile;
endif; ?>
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/template.php
extract( $wp_query->query_vars, EXTR_SKIP );
}
if ( isset( $s ) ) {
$s = esc_attr( $s ); // @phpstan-ignore variable.undefined (It's extracted from query vars.)
}
/**
* Fires before a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_after_load_template', $_template_file, $load_once, $args );
}
/**
* Checks whether the template should be output buffered for enhancement.
*
* By default, an output buffer is only started if a {@see 'wp_template_enhancement_output_buffer'} filter has been
Arguments
"/home/runcloud/webapps/app-highfield/web/app/themes/highfield/header.php"
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/template.php
$located = '';
foreach ( (array) $template_names as $template_name ) {
if ( ! $template_name ) {
continue;
}
if ( file_exists( $wp_stylesheet_path . '/' . $template_name ) ) {
$located = $wp_stylesheet_path . '/' . $template_name;
break;
} elseif ( $is_child_theme && file_exists( $wp_template_path . '/' . $template_name ) ) {
$located = $wp_template_path . '/' . $template_name;
break;
} elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
$located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
/**
* Requires the template file with WordPress environment.
*
* The globals are set up for the template file to ensure that the WordPress
* environment is available from within the function. The query variables are
* also available.
*
* @since 1.5.0
* @since 5.5.0 The `$args` parameter was added.
*
* @global array $posts
* @global WP_Post $post Global post object.
* @global bool $wp_did_header
* @global WP_Query $wp_query WordPress Query object.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/general-template.php
* Fires before the header template file is loaded.
*
* @since 2.1.0
* @since 2.8.0 The `$name` parameter was added.
* @since 5.5.0 The `$args` parameter was added.
*
* @param string|null $name Name of the specific header file to use. Null for the default header.
* @param array $args Additional arguments passed to the header template.
*/
do_action( 'get_header', $name, $args );
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "header-{$name}.php";
}
$templates[] = 'header.php';
if ( ! locate_template( $templates, true, true, $args ) ) {
return false;
}
}
/**
* Loads footer template.
*
* Includes the footer template for a theme or if a name is specified then a
* specialized footer will be included.
*
* For the parameter, if the file is called "footer-special.php" then specify
* "special".
*
* @since 1.5.0
* @since 5.5.0 A return value was added.
* @since 5.5.0 The `$args` parameter was added.
*
* @param string|null $name The name of the specialized footer. Default null.
* @param array $args Optional. Additional arguments passed to the footer template.
* Default empty array.
/home/runcloud/webapps/app-highfield/web/app/themes/highfield/page.php
<?php get_header(); ?>
<!--------------------------------------------------------->
<!-- Index -->
<!--------------------------------------------------------->
<div class="grid-container full">
<div class="grid-x">
<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
<div class="cell small-12">
<article <?php post_class(); ?>>
<?php the_content(); ?>
</article>
</div>
<?php endwhile; endif; ?>
</div>
</div>
<?php get_footer(); ?>
/home/runcloud/webapps/app-highfield/web/wp/wp-includes/template-loader.php
*/
$template = apply_filters( 'template_include', $template );
$is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
$template = $is_stringy ? realpath( (string) $template ) : null;
if (
is_string( $template ) &&
( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
is_file( $template ) &&
is_readable( $template )
) {
/**
* Fires immediately before including the template.
*
* @since 6.9.0
*
* @param string $template The path of the template about to be included.
*/
do_action( 'wp_before_include_template', $template );
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
Arguments
"/home/runcloud/webapps/app-highfield/web/app/themes/highfield/page.php"
/home/runcloud/webapps/app-highfield/web/wp/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
Arguments
"/home/runcloud/webapps/app-highfield/web/wp/wp-includes/template-loader.php"
/home/runcloud/webapps/app-highfield/web/index.php
<?php
/**
* WordPress View Bootstrapper
*/
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
Arguments
"/home/runcloud/webapps/app-highfield/web/wp/wp-blog-header.php"