$tpl, 'plugin_path' => $plugin_path, 'theme_path' => $theme_file ?: '', 'overridden' => ! empty( $theme_file ), 'resolved' => ! empty( $theme_file ) ? $theme_file : $plugin_path, ); } return $map; } /** * Return the theme override directory path (for display in admin). * * @return string e.g. "wp-content/themes/my-theme/webcasata-filterx/" */ public static function get_theme_template_dir_display() { $theme_root = str_replace( ABSPATH, '', get_stylesheet_directory() ); return trailingslashit( $theme_root ) . trailingslashit( self::$theme_template_folder ); } /** * Absolute path to the theme's Webcasata FilterX template override directory. * * @return string Absolute path, e.g. "/var/www/html/wp-content/themes/my-theme/webcasata-filterx/" */ public static function get_theme_template_dir_abs() { return trailingslashit( get_stylesheet_directory() ) . trailingslashit( self::$theme_template_folder ); } /** * Highlight search keywords in a string. * Wraps matches in . * * Proxy for the standalone filterx_highlight() function so templates * can call either FilterX_Template_Loader::highlight() or filterx_highlight(). * * @param string $text * @param string $keyword * @return string */ public static function highlight( $text, $keyword ) { return filterx_highlight( $text, $keyword ); } }