1. Home
  2. Docs
  3. Function Reference
  4. Functions
  5. get_final_path_fn()

get_final_path_fn()

Return the file path of a Controller. This function takes Multisites and Child Themes into account.

Copy to Clipboard

Parameters

$folder_str

Folder if exists

$file_str

File path

$url_bln

If true, return the URL instead of the file path (default false)

$relative_bln

Whether to include directory or not (default false)

$ignoreMs_bln

Whether to ignore Multisite (default false)

$details_bln

Whether to return file path details or just the path (default false)

Return

mixed

If $details_bln is set to true, return an array:

Copy to Clipboard

If false, just return the file URI.

Example

Trying to find the mvc_front_something.class.php model. This will return /home/your_package/public_html/wp-content/themes/your_theme/mvc/models/mvc_front_something.class.php

Copy to Clipboard

Location

This function can be found here: